# 3D model to segmentation

**URL:** <https://discourse.slicer.org/t/3d-model-to-segmentation/5135>\
**Category:** Support\
**Tags:** segmentation, faq\
**Created:** [December 18, 2018, 9:48pm UTC](https://discourse.slicer.org/t/3d-model-to-segmentation/5135 "2018-12-18T21:48:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [December 18, 2018, 9:48pm UTC](https://discourse.slicer.org/t/3d-model-to-segmentation/5135/1 "2018-12-18T21:48:42Z")

</div>

I would like to able to clean some 3D models from surface scanner. Currently, what I do is to import the model as a segmentation node, and then export the resultant segmentation node as a label map, which I use it as the master volume in the segment editor.

It seems to work. Would there be any downsides to this approach?

---

<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:** [December 18, 2018, 9:57pm UTC](https://discourse.slicer.org/t/3d-model-to-segmentation/5135/2 "2018-12-18T21:57:19Z")

</div>

This is a good approach. In recent nightly Slicer versions this process is streamlined:

- Drag-and-drop STL file to Slicer window and in Add data dialog, choose “Segmentation” in Description column (there is no need to load as model and then import to segmentation but you can directly load as segmentation)
- Go to Segment Editor, click “Specify geometry” button (next to Master volume selector)
- Choose current segmentation node as source geometry, set spacing values, click OK

This automatically creates a blank master volume with the necessary size and chosen resolution so that you can edit the segmentation right away.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [December 18, 2018, 10:07pm UTC](https://discourse.slicer.org/t/3d-model-to-segmentation/5135/3 "2018-12-18T22:07:19Z")

</div>

Thanks @lassoan. How recent is this? My nightly from 12/11 still shows only model/scalar overlay/volume as options in description column. My data is in ply format, not stl by the way.

---

<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:** [December 18, 2018, 10:22pm UTC](https://discourse.slicer.org/t/3d-model-to-segmentation/5135/4 "2018-12-18T22:22:44Z")

</div>

We have not enabled direct segmentation import for all surface mesh files. Probably ply you still have to load as model and then import to segmentation.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [February 18, 2020, 4:33am UTC](https://discourse.slicer.org/t/3d-model-to-segmentation/5135/5 "2020-02-18T04:33:07Z")

</div>

@lassoan are you planning to enable importing segmentation from non-stl 3D model formats at all?

---

<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:** [February 18, 2020, 4:36am UTC](https://discourse.slicer.org/t/3d-model-to-segmentation/5135/6 "2020-02-18T04:36:50Z")

</div>

We can import STL and OBJ. Would there be any other mesh file formats that you would like load directly as segmentation?

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [February 18, 2020, 4:38am UTC](https://discourse.slicer.org/t/3d-model-to-segmentation/5135/7 "2020-02-18T04:38:17Z")

</div>

I think it would be good to have PLY and VTK. Particularly latter being the default format for 3D models in Slicer.

---

<div class="post-metadata">

**Author:** ![jwalk](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@jwalk](https://discourse.slicer.org/u/jwalk)\
**Post date:** [June 13, 2020, 1:25am UTC](https://discourse.slicer.org/t/3d-model-to-segmentation/5135/8 "2020-06-13T01:25:05Z")

</div>

Hello,  
I am trying to import a segmentation from one CT examination volume into a new, similar CT examination volume. When I attempt to do so, the segmentation and/or model that I import is located in a different location/ coordinate than the CT volume.

I would like to simply move and maybe rotate the 3d segmentation a little in order to superimpose it over the new CT exam volume.

I hope someone can help with this. Also happy to work together to figure it out over zoom.  
Thanks.

 ![scan](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/7/27f177b01bb928f0a21fb74e2c5de9683fde9d58.jpeg)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [June 13, 2020, 2:12am UTC](https://discourse.slicer.org/t/3d-model-to-segmentation/5135/9 "2020-06-13T02:12:16Z")

</div>

Short answer is you can use `Transforms` module to create a blank transform, assign your segmentation to it, and the use the position sliders to manually align in 3D space. Registration might be an option too.

But, unless these are coming from the same subject, they probably won’t line up very well due to difference between individuals. You should be able to segment your volume with the existing segmentation tools quite effectively, so you don’t have to worry aligning another segmentation.

---

<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:** [June 13, 2020, 4:27am UTC](https://discourse.slicer.org/t/3d-model-to-segmentation/5135/10 "2020-06-13T04:27:04Z")

</div>

Yes, probably landmark-based registration would get these aligned the fastest. If you use Fiducial registration wizard module (in SlicerIGT extension) then you can choose warping transform, which can deal with large differences.

What is your goal with the registration? Why don’t you segment the CT image instead?

---

<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:** [June 23, 2020, 11:31pm UTC](https://discourse.slicer.org/t/3d-model-to-segmentation/5135/11 "2020-06-23T23:31:38Z")

</div>

2 posts were split to a new topic: [Image is not aligned with segmentation](https://discourse.slicer.org/t/image-is-not-aligned-with-segmentation/12190)
