Good afternoon,
I’m trying to save a big bunch of .stl files to .nrrd binary label maps through python. I’m using the code below:
volume = slicer.util.loadVolume('C:\\Users\mreib\OneDrive - upf.edu\Burdeos\images\Bordeaux_Case1\image.mha', returnNode=True)
segmentation = slicer.util.loadSegmentation('C:\Users\mreib\OneDrive - upf.edu\Burdeos\Observer_1\case1_1.stl', returnNode=True)
labelmapVolumeNode = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLLabelMapVolumeNode')
ids = vtk.vtkStringArray()
seg = getNode('case1_1')
seg.GetDisplayNode().GetVisibleSegmentIDs(ids)
slicer.modules.segmentations.logic().ExportSegmentsToLabelmapNode(seg, ids,
labelmapVolumeNode, volume)
I keep getting the following error.
Traceback (most recent call last):
File "<console>", line 1, in <module>
TypeError: no overloads of ExportSegmentsToLabelmapNode() take 2 arguments
Thanks in advance!