JuliaNeuroscience / NIfTI.jl

Julia module for reading/writing NIfTI MRI files
Other
71 stars 35 forks source link

NIfTI-2 support #69

Open PallHaraldsson opened 11 months ago

PallHaraldsson commented 11 months ago

I see from the source code you support NIfTI-1, but it's unclear if you support NIfTI-2 too, and both endian formats.

https://brainder.org/2015/04/03/the-nifti-2-file-format/

I think it should be documented either way. Do you know which is the most common format, and do you plan to support both?

Tokazama commented 11 months ago

It's not supported yet, but I do have the basic code in place. If I can muster up a days work for managing some slightly breaking changes and more comprehensive tests it should get done. I wish I could give a time estimate but I'm stuck in the middle of two papers and a thesis so my OSS contributions are pretty slow.

PallHaraldsson commented 11 months ago

No pressure, I was just curious. I use neither. I suggest documenting only NIfTI-1 is supported (for now; in the README? this issue sort of does too), and that NIfTI-2 also exists and its support is on the TODO list.

What about both endian formats?

Tokazama commented 11 months ago

It detects whether the endian format a file is saved in and byte swaps accordingly. Users shouldn't really have to worry about that for NIfTI.

Some of the apprehension behind jumping into breaking changes for NIfTI-2 is that any software that supports it for standard MRIs also supports NIfTI-1 but the inverse is not true. v2 is also used for CIFTI in some cases. So it becomes a bit of a user interface nightmare if not done with a lot of thought and care.