# Nifti file orientation change between 2019-08-26 and ITK v5.1rc01

**URL:** https://discourse.itk.org/t/nifti-file-orientation-change-between-2019-08-26-and-itk-v5-1rc01/2594
**Category:** Engineering
**Created:** [January 9, 2020, 3:57am UTC](https://discourse.itk.org/t/nifti-file-orientation-change-between-2019-08-26-and-itk-v5-1rc01/2594 "2020-01-09T03:57:58Z")
**Posts on this page:** 10
**Page:** 2

<div class="post-metadata">

### Author: ![lassoan](https://discourse.itk.org/user_avatar/discourse.itk.org/lassoan/32/27_2.png) [@lassoan](https://discourse.itk.org/u/lassoan)
#### Post date: [January 9, 2020, 3:57pm UTC](https://discourse.itk.org/t/nifti-file-orientation-change-between-2019-08-26-and-itk-v5-1rc01/2594/21 "2020-01-09T15:57:37Z")

</div>

This suggestion looks perfect to me, as it does not cause any breaking change, it safely prevents dealing with ill-defined file formats, and the old behavior is still available for anyone who still needs it.

---

<div class="post-metadata">

### Author: ![dclunie](https://discourse.itk.org/user_avatar/discourse.itk.org/dclunie/32/2178_2.png) [@dclunie](https://discourse.itk.org/u/dclunie)
#### Post date: [January 9, 2020, 3:58pm UTC](https://discourse.itk.org/t/nifti-file-orientation-change-between-2019-08-26-and-itk-v5-1rc01/2594/22 "2020-01-09T15:58:10Z")

</div>

IMHO the default behavior should be whatever the original Mayo Analyze software did, regardless of the manner in which some later software abused the format (e.g., see the original Analyze 7.5 header description, a copy of which is at [http://eeg.sourceforge.net/ANALYZE75.pdf](http://eeg.sourceforge.net/ANALYZE75.pdf)).

---

<div class="post-metadata">

### Author: ![hjmjohnson](https://discourse.itk.org/user_avatar/discourse.itk.org/hjmjohnson/32/23_2.png) [@hjmjohnson](https://discourse.itk.org/u/hjmjohnson)
#### Post date: [January 9, 2020, 4:07pm UTC](https://discourse.itk.org/t/nifti-file-orientation-change-between-2019-08-26-and-itk-v5-1rc01/2594/23 "2020-01-09T16:07:09Z")

</div>

@ David Clunie, I agree with you! That was exactly what I attempted to do a decade ago, and that is the position that I have always advocated for. I, however, have failed to provided convincing enough arguments all the times, and the community has disagreed with that position from time-to-time.

I have had a hard prohibition on using Analyze75/FSL/SPM/AFNI ambiguous files in all research I am associated with for about 15 years now.

---

<div class="post-metadata">

### Author: ![Vladimir\_Fonov](https://discourse.itk.org/user_avatar/discourse.itk.org/vladimir_fonov/32/247_2.png) [@Vladimir\_Fonov](https://discourse.itk.org/u/Vladimir_Fonov)
#### Post date: [January 9, 2020, 9:16pm UTC](https://discourse.itk.org/t/nifti-file-orientation-change-between-2019-08-26-and-itk-v5-1rc01/2594/24 "2020-01-09T21:16:13Z")

</div>

So, little implementation issue: ITK NIFTI reader tests are using mostly files in Analyze format, so making it disabled by default breaks lots of tests , see [https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/NIFTI/test/CMakeLists.txt#L30](https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/NIFTI/test/CMakeLists.txt#L30)

---

<div class="post-metadata">

### Author: ![seanm](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.itk.org/u/seanm)
#### Post date: [January 9, 2020, 10:16pm UTC](https://discourse.itk.org/t/nifti-file-orientation-change-between-2019-08-26-and-itk-v5-1rc01/2594/25 "2020-01-09T22:16:42Z")

</div>

So to be clear… Nobody is actually having problems with NIfTI files, right? Only Analyze files?

Andras, our motivation for the change was also backwards compatibility. ITK removed the AnalyzeImageIO reader and stated that NiftiImageIO should be used instead. But it didn’t give the same results. This has kept us stuck on ITK 4 for a long time now.

So _you_ need backwards compatibility with how ITK 4.x/5.0 NiftiImageIO read Analyze files, and _we_ need backwards compatibility with ITK 4.x’s AnalyzeImageIO. (We never used NiftiImageIO for Analyze.)

Hans’ suggestion of providing an option to NiftiImageIO seems correct. But it should default to behaving the same way ITK 4.x/5.0 did. In our app, we can use the new option to behave the AnalyzeImageIO way.

Vlad is working on such a patch.

Cheers,

Sean

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.itk.org/user_avatar/discourse.itk.org/lassoan/32/27_2.png) [@lassoan](https://discourse.itk.org/u/lassoan)
#### Post date: [January 10, 2020, 2:40am UTC](https://discourse.itk.org/t/nifti-file-orientation-change-between-2019-08-26-and-itk-v5-1rc01/2594/26 "2020-01-10T02:40:41Z")

</div>

Thanks for the clarification.

I’m just curious, why do people still use Analyze file format today?

---

<div class="post-metadata">

### Author: ![seanm](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.itk.org/u/seanm)
#### Post date: [January 10, 2020, 3:49am UTC](https://discourse.itk.org/t/nifti-file-orientation-change-between-2019-08-26-and-itk-v5-1rc01/2594/27 "2020-01-10T03:49:30Z")

</div>

Andras, I’ve never polled our users, but I hope they rarely use Analyze files. If you use one in our app it shows a warning that the format is obsolete and fragile, but we still try to support it as best we can.

Sean

---

<div class="post-metadata">

### Author: ![Vladimir\_Fonov](https://discourse.itk.org/user_avatar/discourse.itk.org/vladimir_fonov/32/247_2.png) [@Vladimir\_Fonov](https://discourse.itk.org/u/Vladimir_Fonov)
#### Post date: [January 10, 2020, 8:02pm UTC](https://discourse.itk.org/t/nifti-file-orientation-change-between-2019-08-26-and-itk-v5-1rc01/2594/28 "2020-01-10T20:02:24Z")

</div>

[https://github.com/InsightSoftwareConsortium/ITK/pull/1557](https://github.com/InsightSoftwareConsortium/ITK/pull/1557) - proposed change

---

<div class="post-metadata">

### Author: ![pip010](https://discourse.itk.org/user_avatar/discourse.itk.org/pip010/32/1363_2.png) [@pip010](https://discourse.itk.org/u/pip010)
#### Post date: [January 14, 2020, 1:54pm UTC](https://discourse.itk.org/t/nifti-file-orientation-change-between-2019-08-26-and-itk-v5-1rc01/2594/29 "2020-01-14T13:54:42Z")

</div>

How about simply drop the support for Analyze in ITK5.x and do us all a favor. If researchers (I truly hope no medical professional will ever use Analyze for good reasons) one can always convert to nii.

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.itk.org/user_avatar/discourse.itk.org/lassoan/32/27_2.png) [@lassoan](https://discourse.itk.org/u/lassoan)
#### Post date: [January 14, 2020, 10:30pm UTC](https://discourse.itk.org/t/nifti-file-orientation-change-between-2019-08-26-and-itk-v5-1rc01/2594/30 "2020-01-14T22:30:46Z")

</div>

If we made our 3D Slicer reject Analyze 7.5 files completely then I’m afraid users would start complaining that X and Y and Z software can load an image file without problems (they would not notice the incorrect image orientation), and Slicer cannot.

However, if we all agree that we disable Analyze 7.5 loading in our upcoming software releases then it would send a clear message to the few affected users that the problem is in their data management practices and not in our software.

Maybe we’ll do it anyway, but it would be reassuring to know that we all make the move together.

[Previous page](https://discourse.itk.org/t/nifti-file-orientation-change-between-2019-08-26-and-itk-v5-1rc01/2594.md?page=1)
