I have been using 3dslicer for a while and wrote some Python codes for repetitive tasks.
When I create a segmentation in 3dslicer it would have the same resolution as the imported images (in my case 0.004x0.004x0.004) so when I threshold the segmentation and grow it using margin i can grow it by 0.004 which is 1 pixel. as shown here
I noticed that when I do the same using Python it says “Not feasible at current resolution” so i increased it to see what is the minimum i can grow and apparently is 0.02 meaning that the resolution is 0.02x0.02x0.02 for 1x1x1 pixel. as shown here
can someone help me get a 0.004x0.004x0.004 resolution using python?
This is my code:
segmentationNode = slicer.mrmlScene.AddNewNodeByClass(“vtkMRMLSegmentationNode”)
segmentationNode.CreateDefaultDisplayNodes() # only needed for display
Thanks in advance!