Save segmentation directly to STL or OBJ files

We often received questions about how to export segmentation to STL file for 3D printing. We’ve added a simplified, dedicated tool to make this step easier.

1-minute demo video:

Main features:

  • Export STL file: each segment as a separate file or all segments merged into a single mesh
  • Export OBJ file: all segments are saved in one file, segment colors and opacities are preserved
  • Export all or visible segments only
  • Coordinate system can be LPS (for compatibility external software) or RAS (for compatibility with current default model save in Slicer)

The tool is available in Segment editor module (“Segmentations” button / drop-down arrow / “Export to files”) and in Segmentations module (“Export to files” section).

image

image

4 Likes

Out of interest in the video what is viewer you are using for STL visualization?

Ah found it, Mixed Reality viewer for Windows 10.

1 Like

Dear Andras,

I have succeeded in exporting all segments together in one file. But I still have two questions. The first is about exporting STL file. What do you mean by “all segments merged into a single mesh” when ticked the box “Merge into single file”? Does the single mesh still compose of different segments or just merge into one mesh? I have export STL file to Solidworks and found three parts the same in Slicer (as shown in the following figure). The second is that when exporting OBJ file, I found another solid apart from the three segments (a very small spot??). I really don’t know where it may be from. Could you give some advice? Thank you very much!

Best regards,
Crayon

1

If merge is enabled then all mesh points and triangles of the three segments are included in a single file. If you want to manage the segments separately then turn off this option.

If you did not intend to create that segment and don’t need it then you can delete it.

I got it. Thank you!

2 posts were split to a new topic: Keep DICOM coordinate system when exporting segmentation

Newbie here requesting a hand:

I exported using “export segments to files” a segmentation of several structures, with color and opacity set for each, into a merged OBJ but upon loading it back into Slicer none of the color and opacity settings were preserved. The entire model was default yellow. Additionally, when I tried to scale the size down for the sake of storage space, but whether the slider is 1 or 0.3 the output file size remains the same.

Any advice for these 2 newbie issues? Thanks!

This is a great new function. Thank you !

“Export to files” feature is for exporting for 3D printing or visualization/processing in external software. If you want to preserve colors and all other display properties then save the segmentation using File / Save.

When an OBJ file is loaded into Slicer then the texture/color information is ignored but the MaterialIds cell array is made available in the mesh. This array contains a different value for each segment, and you can choose to use this value for coloring in Models module’s Scalars section. If you choose a color table that matches the original segment colors then you can make the model appear similarly as it was exported.

This feature is for scaling of coordinates (for example, if you want to have your model coordinates to be defined in meters instead of millimeters). You can find explanation of all parameters in tooltips.