I want to manipulate the module created from the segmentation.
what i did was to export the segmentation to modules
and now I want to manipulate the colors and the visibility of the modules.
here’s the code:
#export segmentation
segmentationNode=getNode(‘Segmentation’)
modelHierarchyNode = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLModelHierarchyNode')
slicer.modules.segmentations.logic().ExportVisibleSegmentsToModelHierarchy(segmentationNode, modelHierarchyNode)