# Merging two models

**URL:** <https://discourse.slicer.org/t/merging-two-models/931>\
**Category:** Support\
**Created:** [August 23, 2017, 3:45pm UTC](https://discourse.slicer.org/t/merging-two-models/931 "2017-08-23T15:45:25Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmylarson](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jimmylarson](https://discourse.slicer.org/u/jimmylarson)\
**Post date:** [August 23, 2017, 3:45pm UTC](https://discourse.slicer.org/t/merging-two-models/931/1 "2017-08-23T15:45:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 23, 2017, 3:51pm UTC](https://discourse.slicer.org/t/merging-two-models/931/2 "2017-08-23T15:51:26Z")

</div>

I would recommend to use Segment Editor module ([http://slicer.readthedocs.io/en/latest/user\_guide/module\_segmenteditor.html](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.

---

<div class="post-metadata">

**Author:** ![jimmylarson](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jimmylarson](https://discourse.slicer.org/u/jimmylarson)\
**Post date:** [August 23, 2017, 6:10pm UTC](https://discourse.slicer.org/t/merging-two-models/931/3 "2017-08-23T18:10:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [August 23, 2017, 6:27pm UTC](https://discourse.slicer.org/t/merging-two-models/931/4 "2017-08-23T18:27:10Z")

</div>

Adding a segment: Click Add segment

Merging: See 3D printing tutorial [Documentation/Nightly/Training - Slicer Wiki](https://www.slicer.org/wiki/Documentation/Nightly/Training#Slicer4_3D_Printing)  
Here’s the relevant figure  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/a/2a3c65f67c0515f5f5dcc85ba0709191732cf743.png)

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [August 23, 2017, 6:34pm UTC](https://discourse.slicer.org/t/merging-two-models/931/5 "2017-08-23T18:34:45Z")

</div>

> [@jimmylarson](#):
>
> I am trying to merge two different models that I made in the editor module.  
> I can’t seem to figure out how to […] make a segment

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:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/e/7e8226e054acbb658dab2def33d8edbb4da44b5b.png)

@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?

---

<div class="post-metadata">

**Author:** ![jimmylarson](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jimmylarson](https://discourse.slicer.org/u/jimmylarson)\
**Post date:** [August 24, 2017, 3:55pm UTC](https://discourse.slicer.org/t/merging-two-models/931/6 "2017-08-24T15:55:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [August 24, 2017, 4:09pm UTC](https://discourse.slicer.org/t/merging-two-models/931/7 "2017-08-24T16:09:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 24, 2017, 6:00pm UTC](https://discourse.slicer.org/t/merging-two-models/931/8 "2017-08-24T18:00:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jimmylarson](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jimmylarson](https://discourse.slicer.org/u/jimmylarson)\
**Post date:** [August 25, 2017, 1:40pm UTC](https://discourse.slicer.org/t/merging-two-models/931/9 "2017-08-25T13:40:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 25, 2017, 1:51pm UTC](https://discourse.slicer.org/t/merging-two-models/931/10 "2017-08-25T13:51:48Z")

</div>

STL file format has no standard way of storing colors.

For simple animations, you can export videos using [ScreenCapture module](https://www.slicer.org/wiki/Documentation/4.6/Modules/ScreenCapture).

If you need more sophisticated animations then you can [export the complete scenes (including color and opacity information)](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Export_entire_scene_as_VRML) and use a professional animation software, such as [Blender](https://www.blender.org/), to create a video.

---

<div class="post-metadata">

**Author:** ![jimmylarson](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jimmylarson](https://discourse.slicer.org/u/jimmylarson)\
**Post date:** [August 25, 2017, 4:08pm UTC](https://discourse.slicer.org/t/merging-two-models/931/11 "2017-08-25T16:08:06Z")

</div>

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

 ![IMG_2463](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/e/9ec15980120ba186e570a0804cec941a4a10d52b.jpeg)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 25, 2017, 4:37pm UTC](https://discourse.slicer.org/t/merging-two-models/931/12 "2017-08-25T16:37:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jimmylarson](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jimmylarson](https://discourse.slicer.org/u/jimmylarson)\
**Post date:** [August 25, 2017, 5:23pm UTC](https://discourse.slicer.org/t/merging-two-models/931/13 "2017-08-25T17:23:27Z")

</div>

That worked perfectly. Thank you

---

<div class="post-metadata">

**Author:** ![gleman](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@gleman](https://discourse.slicer.org/u/gleman)\
**Post date:** [January 25, 2018, 4:52pm UTC](https://discourse.slicer.org/t/merging-two-models/931/14 "2018-01-25T16:52:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [January 25, 2018, 6:50pm UTC](https://discourse.slicer.org/t/merging-two-models/931/15 "2018-01-25T18:50:27Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![gleman](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@gleman](https://discourse.slicer.org/u/gleman)\
**Post date:** [January 25, 2018, 7:11pm UTC](https://discourse.slicer.org/t/merging-two-models/931/16 "2018-01-25T19:11:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [January 25, 2018, 7:56pm UTC](https://discourse.slicer.org/t/merging-two-models/931/17 "2018-01-25T19:56:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [January 25, 2018, 9:58pm UTC](https://discourse.slicer.org/t/merging-two-models/931/18 "2018-01-25T21:58:08Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/d/5db3d50f8517651e2ca56847ab1cfdd892f54624.png)

@cpinter
