Merging two models

Operating system:windows
Slicer version:4.6.2
Expected behavior: I am trying to merge two different models that I made in the editor module. I trying to put dots to map out where buds are on a tree trunk that I have a scan of. I first used the threshold effect to create the surface of the trunk, this was my “master volume” and then I clicked the “create new label map” under “merge volume” and used the paint brush to create map of dots. I want to have my finished model showing these two models together
Actual behavior: When I go to save as an .stl, I can only save each model separately (the dots as one model, and the trunk as another). I can see the models together in the viewer, but I don’t know how to make them one who I go to save. Thanks

I would recommend to use Segment Editor module (http://slicer.readthedocs.io/en/latest/user_guide/module_segmenteditor.html) in latest nightly version of Slicer. You can merge segments using Logical operators effect.

Thank you for the reply. I’ve found the logical operator effect, but I can’t seem to figure out how to merge segments or how to make a segment. Do I need to repeat the process that I did in the regular editor to make the map and surface or can I use what I already have?

Thank you for your help

Adding a segment: Click Add segment

Merging: See 3D printing tutorial Documentation/Nightly/Training - Slicer Wiki
Here’s the relevant figure
image

You will need to import the models first into a segmentation. Go to Segmentations module, make a new segmentation, then in the Import/export section make a selection to import the model hierarchy:

@cpinter the “Import” button in the import/export section should either automatically make a new segmentation node on import, or be disabled until segmentation node is selected - agreed?

Thank you for your help, that seems to have worked. My ultimate goal is to be able to input my model into a powerpoint presentation. So far, I am only familiar with saving the model as a .stl file and then converting it to a pdf to input into powerpoint. When I go to save my segmentation, the only file format options I have are .seg.nrrd or .nrrd. Do you know if either of those is an acceptable format to put into powerpoint or how I would go about doing that. Thank you

1 Like

You can use the “Export” option from the module to export your segmentation to “Models”. Those can be saved as STL.

You can also create nice video animations (rotate your model, sweep through slices) by using Screen Capture module (in Utilities category). You can export videos that you can add into your PPT directly.

Thank you for all your help, that worked. The only problem I have now is that when I open the .stl file and convert it to a pdf the whole model is in the grey scale color of the scan. Is there a way that I can keep the color of my segments from segment editor?

STL file format has no standard way of storing colors.

For simple animations, you can export videos using ScreenCapture module.

If you need more sophisticated animations then you can export the complete scenes (including color and opacity information) and use a professional animation software, such as Blender, to create a video.

I can’t seem to get the screen capture module to take video. It’s capturing single image but not video. I’ve set up the ffmpeg.exe, still nothing though. Thanks

At “Number of images”, unclick the “single” option.

That worked perfectly. Thank you

1 Like

Any hints on how to do this via python? I’m thinking of being able to accept an STL file from the user and automatically build the segmentation without any other clicks.

Do you mean you would like to be able to load an STL file directly as a Segmentation node (avoid going to Segmentations module, creating new segmentation, and importing the model node)?

That would be great, but I’d settle for tips on how to import the model into the segmentation via python rather than going through the interface.

I’ll implement it now, it should be really simple.

Implementation is completed, it’ll be available in the nightly release tomorrow.

image

@cpinter