I am looking for a way to get my segments out of 3D slicer and into a stack of 2D binary images (say TIF). Is this possible? Naively, it seems possible because Slicer already displays the series of 2D images I want (the segment as I move down the sections of the Z axis). How to export this?
I followed your instructions for exporting an .stl file and this works great for 3D printing and display, but I cannot find software that can convert this .stl file to a 2D image series.
Thanks
p.s., I am a beginner to slicer but finding it quite nifty. Thanks for providing so many tools!
Since 2D formats do not preserve such critical imaging metadata about image spacing, orientation and geometry, slicer does not allow 3D volumes to be exported as 2D image sequences. Saving 3D volumes as 2D image series will result in data loss.
Why do you need to export 2D binary masks? What is your use case? perhaps it is doable within Slicer?
If you must, you can export your segmentation as a label map and then save it as a NRRD file, which you can open Fiji/ImageJ, and then save it as 2D image sequence.
Thanks. muratmaga’s suggestion worked great. In case anyone else is also new here, this is what I did:
After creating segments in Slicer, I opened the module “Data”. I made sure only the segment I wanted as a 2D image stack was visible. I then right clicked this segment and selected “export visible segments to binary labelmap” (the .nrrd file). FIJI/ImageJ was able to open this file as an image stack and resave as a TIF with no problems.
Cheers
You now lost all the information about the spacing of your scan, possible offset (if your dataset is cropped), and will be having a hard time bringing it back anything you derived from it to Slicer and reliably compare to the original data.
This may or may not be an issue for you, but I am adding this comment for posterity for future users who might be considering using this.
Thanks for the warning. I might come back to this post if I encounter issues. I suppose this relates to my next question: If I generate a stack of 2D binary images/masks as a TIF in different software, what is the best way to bring them into Slicer as segments?
Thanks, this also seemed to work. I didn’t use SlicerMorph (still trying to understand when and when not to). I just directly dragged into slicer the TIF stack that contained the series of 2D masks. In the Volume module I corrected for the voxel distortion (as you warned me about), and here I also converted to labelmap (as suggested, see image). To make Slicer see the labelmap as a segment I went to the Data module, right clicked the recently created labelmap, and selected “convert labelmap to segment node”. I didn’t test, but the goal is that all the tools in Segment Editor will now work on this imported segment.