Trouble saving segment as an STL

I’m having trouble saving a segment as an STL. When I try to save, I’d expect to see a file called “Intervertebral Disc 1.vtk” that I could save as an STL, but I am not seeing that option. What am I doing wrong? Thanks for your help.

You need to export the segment to a model node so that you can save it to STL. Easiest way is to go to Data module’s Subject hierarchy view, right-click the segmentation and select Export visible segments to models.

1 Like

I only have the option to export to DICOM.

Use the latest nightly version of Slicer.

I have multiple contours (e.g. contour_1, contour_2, contour_3). I created a model and it looks fine. But 3D slicer forced me to save the contours as three separate models (model_1.stl, model_2.stl, model_3.stl). How do I save all of the models as a single stl file rather than three?

Thank you!

You can use Merge models module for this.

Hi Adras,

I have a brain and a tumor model. After merging them, it seems like the hierarchical structure is lost. That is, I can’t differentiate between the brain and tumor. Is that possible to merge them into one file, while assigning them with two different colors?

Thanks!!

STL files cannot store scalar data. There are tricks that some software support, but you have to do the model merging in that software then. What would you like to do with the merged model?

Implemented direct STL file export from segmentation - will be available in tomorrow’s nightly build. There is an option to merge all models to a single file STL and an option to save single-file .obj file, where each segment is saved with a different color.

Hi a would like to export my swgmentations to .obj file. I am using slicer 4.9.0. When I try to export from segment editor I always get error that is shown on one of the pictures.

Thanks very much for help


Sn%C3%ADmka

“unable to open .obj files” error is logged when the .obj file cannot be written. Make sure the target obj files are not open in any viewer or editor application and/or choose a different destination folder.