# Missing exception handling

**URL:** <https://discourse.slicer.org/t/missing-exception-handling/34473>\
**Category:** Development\
**Tags:** data-loading\
**Created:** [February 22, 2024, 11:45am UTC](https://discourse.slicer.org/t/missing-exception-handling/34473 "2024-02-22T11:45:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [February 22, 2024, 3:56pm UTC](https://discourse.slicer.org/t/missing-exception-handling/34473/2 "2024-02-22T15:56:40Z")

</div>

Thanks for reporting this. It’s probably good that newer versions of ITK are more careful about interpreting nifti variants, as this has been an ongoing source of confusion. I don’t think we should push back in that, but instead offer a more robust nifti loader that as you suggest is more user-friendly in pointing out bad data and offering loading solutions. This would be a chance to handle other variants nifti types, like time series.

I did a prototype of a [python-based reader for diffusion MRI](https://github.com/SlicerDMRI/SlicerDMRI/compare/master...pieper:SlicerDMRI:nifiio) that could be used as a starting point. It would be great if people who rely on nifti in their workflows could pick up and generalize this to support their needs. Perhaps even a dedicated module like [RawImageGuess](https://discourse.slicer.org/t/new-extension-rawimageguess-for-loading-of-images-from-unrecognized-file-format/9219) or [ImageStacks](https://github.com/SlicerMorph/SlicerMorph/tree/master/Docs/ImageStacks) would help people deal with some not-uncommon issues like left-right flip, qform/sform disagreement, or making use of intent types.

---

_[View the full topic](https://discourse.slicer.org/t/missing-exception-handling/34473)._
