# Wrong output volume using Model to LabelMap

**URL:** https://discourse.slicer.org/t/wrong-output-volume-using-model-to-labelmap/18750
**Category:** Support
**Tags:** segmentation
**Created:** [July 15, 2021, 2:16pm UTC](https://discourse.slicer.org/t/wrong-output-volume-using-model-to-labelmap/18750 "2021-07-15T14:16:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jean-marie\_bonny](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jean-marie_bonny/32/11640_2.png) [@jean-marie\_bonny](https://discourse.slicer.org/u/jean-marie_bonny)
#### Post date: [July 15, 2021, 2:16pm UTC](https://discourse.slicer.org/t/wrong-output-volume-using-model-to-labelmap/18750/1 "2021-07-15T14:16:24Z")

</div>

Dear 3D slicer community  
I have a question relating to the Model to labelmap module. I generated a .vtp model with the RATS software. Under 3dslicer, the model looks correct and the segmentation overlaps well with the image volume input. However, it is not possible to convert the model into a nifti image with the module. All the image voxels are 0. What did I do wrong?  
Thanks,  
JMb

---

<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: [July 15, 2021, 2:31pm UTC](https://discourse.slicer.org/t/wrong-output-volume-using-model-to-labelmap/18750/2 "2021-07-15T14:31:48Z")

</div>

The most robust way of converting model to labelmap volume is to [import the model to segmentation](https://slicer.readthedocs.io/en/latest/user_guide/modules/segmentations.html#import-an-existing-segmentation-from-model-surface-mesh-file) and then [export the segmentation to labelmap](https://slicer.readthedocs.io/en/latest/user_guide/modules/segmentations.html#export-segmentation-to-labelmap-volume).

---

<div class="post-metadata">

### Author: ![jean-marie\_bonny](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jean-marie_bonny/32/11640_2.png) [@jean-marie\_bonny](https://discourse.slicer.org/u/jean-marie_bonny)
#### Post date: [July 18, 2021, 7:36pm UTC](https://discourse.slicer.org/t/wrong-output-volume-using-model-to-labelmap/18750/3 "2021-07-18T19:36:31Z")

</div>

Thank you for the advise. However if import the model to segmentation goes well, the export still leads to a blank image. Can you tell me how to find a solution?

---

<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: [July 19, 2021, 1:44pm UTC](https://discourse.slicer.org/t/wrong-output-volume-using-model-to-labelmap/18750/4 "2021-07-19T13:44:44Z")

</div>

It means that the reference volume is not at the right place. You can fill the voxels of the reference volume and display it using volume rendering to see where you placed it.
