# Unable to create LabelMaps for ModelMaker

**URL:** https://discourse.slicer.org/t/unable-to-create-labelmaps-for-modelmaker/32163
**Category:** Development
**Tags:** 3d-model, labelmap
**Created:** [October 11, 2023, 4:53pm UTC](https://discourse.slicer.org/t/unable-to-create-labelmaps-for-modelmaker/32163 "2023-10-11T16:53:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![BlancaRodriguez](https://avatars.discourse-cdn.com/v4/letter/b/ba9def/32.png) [@BlancaRodriguez](https://discourse.slicer.org/u/BlancaRodriguez)
#### Post date: [October 11, 2023, 4:53pm UTC](https://discourse.slicer.org/t/unable-to-create-labelmaps-for-modelmaker/32163/1 "2023-10-11T16:53:55Z")

</div>

Hello!

My team and I are currently working in a segmentation project, and have been actively using Slicer. However, we are currently facing some challenges and hope we can get some help from the community.

Specifically, we are trying to generate some _vtk volumes_ from a .nii.gz storing the segmentations done by a DL models. This file contains integer values for each label. In order to generate the vtk model, we have decided to use the ModelMaker module.

Due to the big number of data we are dealing with, we’ve been using **linux terminal** to automatize the proccess. However, when doing so, models are not being generated. After debugging the process, we realized that our images are not being understood as LabelMaps and, therefore, ModelMaker can’t work with our images. To solve this issue, we have renamed our files as {name}\_Label.nii.gz. Although this approach seems to work when using the user’s interface, models are yet not generated when working from terminal.

Is there a way we can _transform_ our original volumes into labelmaps from linux terminal??

Maybe there is a simpler method to generate our models that we are missing out.

Thanks a lot for your help!!

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [October 11, 2023, 5:56pm UTC](https://discourse.slicer.org/t/unable-to-create-labelmaps-for-modelmaker/32163/2 "2023-10-11T17:56:46Z")

</div>

You can use `slicer.util.loadLabelVolume()` to load as a label volume. If you are still having trouble you can post your exact script and the command line you execute to run it and we can probably give more targeted advice.
