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