# loadVolume: how can I include properties like lablemap when loading?

**URL:** <https://discourse.slicer.org/t/loadvolume-how-can-i-include-properties-like-lablemap-when-loading/302>\
**Category:** Development\
**Tags:** segmentation\
**Created:** [May 12, 2017, 2:12pm UTC](https://discourse.slicer.org/t/loadvolume-how-can-i-include-properties-like-lablemap-when-loading/302 "2017-05-12T14:12:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![drAl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dral/32/176_2.png) [@drAl](https://discourse.slicer.org/u/drAl)\
**Post date:** [May 12, 2017, 2:12pm UTC](https://discourse.slicer.org/t/loadvolume-how-can-i-include-properties-like-lablemap-when-loading/302/1 "2017-05-12T14:12:21Z")

</div>

Hi everyone!

i’m writing a script in python and I would like to set the labelmap to TRUE when loading a volume.  
I can’t find the way to do it with the slicer.util.loadVolume(fileName, properties, returnNode) instruction.  
I don’t konw how to pass the correct property!  
I’m trying to load an atlas mask (atlasmask.mha) to perform a Swiss Skull Stripper process.  
This is the line:  
aMask = slicer.util.loadVolume(’/myroot/atlasMask.mha’, returnNode=True)

any clue on how to make it?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![mangotee](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@mangotee](https://discourse.slicer.org/u/mangotee)\
**Post date:** [May 12, 2017, 2:39pm UTC](https://discourse.slicer.org/t/loadvolume-how-can-i-include-properties-like-lablemap-when-loading/302/2 "2017-05-12T14:39:30Z")

</div>

Labelmaps have their own routine for loading, I think you need to use that instead of loadVolume.  
You would need to write:  
aMask = slicer.util.loadLabelVolume(’/myroot/atlasMask.mha’, returnNode=True)

---

<div class="post-metadata">

**Author:** ![drAl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dral/32/176_2.png) [@drAl](https://discourse.slicer.org/u/drAl)\
**Post date:** [May 12, 2017, 2:41pm UTC](https://discourse.slicer.org/t/loadvolume-how-can-i-include-properties-like-lablemap-when-loading/302/3 "2017-05-12T14:41:12Z")

</div>

Hi again guys!!

ok…I’m very sorry ☹ …the very second I went back to slicer after writing this post I begin typing and I saw this: slicer.util.loadLabelVolume()…

again…I’m sorry!!

I guess the “I’m new to slicer” excuse is worth it here, isn’t it?

Thaanks to anyone who’s read it 🙂

---

<div class="post-metadata">

**Author:** ![drAl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dral/32/176_2.png) [@drAl](https://discourse.slicer.org/u/drAl)\
**Post date:** [May 12, 2017, 2:42pm UTC](https://discourse.slicer.org/t/loadvolume-how-can-i-include-properties-like-lablemap-when-loading/302/4 "2017-05-12T14:42:26Z")

</div>

ohh hey mangotee!!  
Thanks a lot for replying…I’ll try to exhaust my options next time before asking 🙂

Appreciate it!!

> [@mangotee](#):
>
> s have their own routine for loading, I think you need to use that instead of loadVolume.  
> You would need to write:  
> aMask = slicer.util.loadLabelVolume(‘/myroot/atlasMask.mha’, returnNode=True)

---

<div class="post-metadata">

**Author:** ![mangotee](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@mangotee](https://discourse.slicer.org/u/mangotee)\
**Post date:** [May 12, 2017, 2:44pm UTC](https://discourse.slicer.org/t/loadvolume-how-can-i-include-properties-like-lablemap-when-loading/302/5 "2017-05-12T14:44:11Z")

</div>

no problem 🙂 first time I’m able to ANSWER a question! Usually, I’m on the receiving end of things…
