My team and I are working on the study of segmentations as vtk volumes, however we are trying to automatize the process with the python console from slicer. We have thought that, once we have loaded the nifti volumes as labels, we should be able to use the Model Maker Module, however we were not able to do so. I will be adding the code that we were using for this task. we executed each line separately in the python console:
labelVolume = slicer.util.getNode(‘SMALL_015’)
single_label_volume = slicer.vtkMRMLLabelMapVolumeNode()
label_array = slicer.util.array(labelVolume.GetID())
single_label_array = (label_array == label_value).astype(‘uint8’)
This way, I achieved an isolated structure from my segmentations, and now I tried creating a node with vtkMRMLModelMakerNode but we were not able to manage how to use it.
We appreciate the help beforehand!