# About dicom or nifti standardization

**URL:** <https://discourse.slicer.org/t/about-dicom-or-nifti-standardization/35517>\
**Category:** Support\
**Created:** [April 16, 2024, 8:12am UTC](https://discourse.slicer.org/t/about-dicom-or-nifti-standardization/35517 "2024-04-16T08:12:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Berk\_Gezgin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/berk_gezgin/32/65862_2.png) [@Berk\_Gezgin](https://discourse.slicer.org/u/Berk_Gezgin)\
**Post date:** [April 16, 2024, 8:12am UTC](https://discourse.slicer.org/t/about-dicom-or-nifti-standardization/35517/1 "2024-04-16T08:12:37Z")

</div>

Hello.  
I have 2 different nifti. One of them comes in the same way on the same axes as the original dicom. The other one is inverted or axial, sagittal displaced. What should I do to apply a standardization? Is there a python code to make them all look and come in the same way? Is there a module that I can examine the code on Slicer?

A nifti that looks wrong

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/9/b9754af01fbe51e07407a3b2a04c8fb575812aec.jpeg)

The right-looking nifti

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/e/4e21bdd87c0656c55c87d95c0b8bc8bbebec5e17.jpeg)

---

<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:** [April 16, 2024, 1:28pm UTC](https://discourse.slicer.org/t/about-dicom-or-nifti-standardization/35517/2 "2024-04-16T13:28:51Z")

</div>

There’s no general solution for this, since nifti files can be created by many different tools making different assumptions. You need to take care through whatever process you use that the geometry information of the scans is preserved. We try to be very careful about this within the Slicer code but can’t control for external software.

---

<div class="post-metadata">

**Author:** ![Berk\_Gezgin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/berk_gezgin/32/65862_2.png) [@Berk\_Gezgin](https://discourse.slicer.org/u/Berk_Gezgin)\
**Post date:** [April 16, 2024, 1:43pm UTC](https://discourse.slicer.org/t/about-dicom-or-nifti-standardization/35517/3 "2024-04-16T13:43:26Z")

</div>

Can I make their postures similar to each other? Or should I do this when converting from dicom to nifti? I have many nifti in this way. I guess I can’t translate them all according to a fixed rule.

---

<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:** [April 16, 2024, 3:39pm UTC](https://discourse.slicer.org/t/about-dicom-or-nifti-standardization/35517/4 "2024-04-16T15:39:56Z")

</div>

Probably the best way to deal with this is to fix incorrect/ambiguous NIFTI images before loading them into Slicer. For example, you can use [nibabel](https://nipy.org/nibabel/nifti_images.html) to read the file, fix information in the header, and then write to file.

---

<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:** [April 16, 2024, 4:03pm UTC](https://discourse.slicer.org/t/about-dicom-or-nifti-standardization/35517/5 "2024-04-16T16:03:57Z")

</div>

Be aware that it’s possible for there to be a left-right flip as well, so even manual correction may not be definitive depending on the pipeline used.
