# \[vtkMRMLSegmentationNode\] Unable to load .mha file as a segmentation node

**URL:** <https://discourse.slicer.org/t/vtkmrmlsegmentationnode-unable-to-load-mha-file-as-a-segmentation-node/13742>\
**Category:** Support\
**Created:** [September 29, 2020, 10:07am UTC](https://discourse.slicer.org/t/vtkmrmlsegmentationnode-unable-to-load-mha-file-as-a-segmentation-node/13742 "2020-09-29T10:07:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![strider\_hunter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/strider_hunter/32/8253_2.png) [@strider\_hunter](https://discourse.slicer.org/u/strider_hunter)\
**Post date:** [September 29, 2020, 10:28am UTC](https://discourse.slicer.org/t/vtkmrmlsegmentationnode-unable-to-load-mha-file-as-a-segmentation-node/13742/2 "2020-09-29T10:28:53Z")

</div>

- I just found [documentation](https://github.com/Slicer/Slicer/blob/master/Docs/user_guide/modules/segmentations.md#import-an-existing-segmentation-from-volume-file) which states that only NRRD/NIFTI files can be directly loaded as segmentations. Is there a particular reason for this choice? Are there plans to add more file formats?

- I was also able to find a python binding for [“Convert labelmap to segmentation node”](https://github.com/Slicer/Slicer/search?q=%22Convert+labelmap+to+segmentation+node%22) from [the slicer forum](https://discourse.slicer.org/t/how-to-automatically-convert-a-labelmap-volume-to-a-segmentation-node-upon-loading-labelmap-volume/9931/8)

```python
tmp = slicer.util.loadLabelVolume(pathMaskFile)
mask = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLSegmentationNode')
slicer.modules.segmentations.logic().ImportLabelmapToSegmentationNode(tmp, mask)
slicer.mrmlScene.RemoveNode(tmp)

```

---

_[View the full topic](https://discourse.slicer.org/t/vtkmrmlsegmentationnode-unable-to-load-mha-file-as-a-segmentation-node/13742)._
