Display LabelMapVolumeNode After creating

In Python, I create a script to create a segmentation of a vertebrae after selecting it with a fiducial marker. It works as expected, but I am unable to have the segmentation automatically display. Here is what I currently have, but I am unsure why this isn’t working.

segVolumeNode = sitkUtils.PushVolumeToSlicer(seg,
                                             name='Segmentation',
                                             className='vtkMRMLLabelMapVolumeNode')

slicer.mrmlScene.AddNode(segVolumeNode)
segVolumeNode.CreateDefaultDisplayNodes()
segVolumeNode.SetVisibility(1)

This does not seem to work, and I am not entirely sure what the issue is.

A post was merged into an existing topic: Automatically view LabelMapNodes