# It is allowed to export segmented files in NIfti format?

**URL:** <https://discourse.slicer.org/t/it-is-allowed-to-export-segmented-files-in-nifti-format/38259>\
**Category:** Support\
**Created:** [September 6, 2024, 12:54pm UTC](https://discourse.slicer.org/t/it-is-allowed-to-export-segmented-files-in-nifti-format/38259 "2024-09-06T12:54:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Filippo\_Parronchi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/filippo_parronchi/32/77852_2.png) [@Filippo\_Parronchi](https://discourse.slicer.org/u/Filippo_Parronchi)\
**Post date:** [September 6, 2024, 12:54pm UTC](https://discourse.slicer.org/t/it-is-allowed-to-export-segmented-files-in-nifti-format/38259/1 "2024-09-06T12:54:54Z")

</div>

Operating system:  
Slicer version:  
Expected behavior:  
Actual behavior:

---

<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:** [September 6, 2024, 1:33pm UTC](https://discourse.slicer.org/t/it-is-allowed-to-export-segmented-files-in-nifti-format/38259/2 "2024-09-06T13:33:21Z")

</div>

Exporting segmentations into NIFTI file format is [allowed](https://slicer.readthedocs.io/en/latest/user_guide/modules/segmentations.html#export-segmentation-to-labelmap-volume-file), it is just [not recommended](https://github.com/lassoan/slicerio/blob/main/SegmentationFileFormat.md).

---

<div class="post-metadata">

**Author:** ![Filippo\_Parronchi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/filippo_parronchi/32/77852_2.png) [@Filippo\_Parronchi](https://discourse.slicer.org/u/Filippo_Parronchi)\
**Post date:** [September 6, 2024, 1:40pm UTC](https://discourse.slicer.org/t/it-is-allowed-to-export-segmented-files-in-nifti-format/38259/3 "2024-09-06T13:40:52Z")

</div>

Thanks. Can you explain me the reasons?  
I need segmentation Nifti file to use in AR with hololens2? Do you think it’s a problem?

---

<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:** [September 6, 2024, 1:44pm UTC](https://discourse.slicer.org/t/it-is-allowed-to-export-segmented-files-in-nifti-format/38259/4 "2024-09-06T13:44:15Z")

</div>

> [@Filippo\_Parronchi](#):
>
> Can you explain me the reasons?

I included a link above to a page that compares DICOM, NRRD, NIFTI, but let me copy the reasons against NIFTI here then:

> - Orientation definition in NIFTI files can be ambiguous: there are multiple ways to define orientation, they can be both present, and contain contradicting information. Various softare will interpret these ambiguous files differently. See for example these discussions: [1](https://www.openfmri.org/dataset-orientation-issues/), [2](https://discourse.slicer.org/t/orientation-origin/23365), [3](https://github.com/spinalcordtoolbox/spinalcordtoolbox/issues/3283)
> - Not compatible with clinical software
> - Common convention for storing essential metadata does not exist
> - File header is not human-readable: you cannot use a text editor/viewer to see the actual file header but you always have to rely on a parser to give you an interpretation of the file header

> [@Filippo\_Parronchi](#):
>
> I need segmentation Nifti file to use in AR with hololens2?

You actually don’t need to use NIFTI for this purpose, as NRRD can store all (and more) metadata and voxel information that NIFTI can.

Anyway, if you need to use some specific software that is limited to NIFTI then you can export segmentation as NIFTI file from Slicer as I described in the link above.
