pyushkevich / itksnap

ITK-SNAP medical image segmentation tool
http://www.itksnap.org
GNU General Public License v3.0
278 stars 78 forks source link

ITK 5.2.1 Bug Affecting NiFTI Loading in Current Version of ITK-Snap #102

Open liamtimms opened 1 year ago

liamtimms commented 1 year ago

Hi,

When loading certain Nifti files using the most recent binary release, I encounter the error:

/data/hippogang/build/buildbot/Nightly/itk/v5.2.1/itk/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx:1980:
ITK ERROR: ITK only supports orthonormal direction cosines.  No orthonormal definition found!

After doing a little digging, it looks like this started here in ITK upstream:

https://github.com/InsightSoftwareConsortium/ITK/issues/3514

and was fixed by these PRs to ITK:

https://github.com/InsightSoftwareConsortium/ITK/pull/3339

https://github.com/InsightSoftwareConsortium/ITK/pull/2701

that means ITK 5.2.1 fell in the middle of the bug and the fix: https://github.com/InsightSoftwareConsortium/ITK/releases/tag/v5.2.1

Is it possible to release a new binary built against a more recent version of ITK?

Thank you.

PolarBean commented 4 days ago

I agree this would be nice to fix

Many older volumes do not have any direction cosigns set. previously this was not an issue. However since at least 4.0 opening these volumes returns

ITK ERROR: ITK only supports orthonormal direction cosines. No orthonormal definition found!

In practice this means we now need to have two versions of ITK snap installed. 3.8 in case we come across a volume without these headers set and the most recent version for everything else. In my experience a large number of available volumes are now unusable due to this.

Thank you for your help, ITK snap is hugely useful to us.

Versions

4.0 and above

liamtimms commented 4 days ago

Agreed, unfortunately staying on 3.8 has been my recommendation to colleagues for now.

jilei-hao commented 1 day ago

We plan to upgrade to itk 5.4 in the itk-snap 4.4 release. Hopefully that will fix this issue.