PennLINC / ConFixel

Companion converter software for ModelArray for converting data back and forth from the HDF5 file format.
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Bypass NIfTI conversion #25

Open Lestropie opened 1 year ago

Lestropie commented 1 year ago

I couldn't help noticing from a quick perusal of your code that converting from fixel data .mif files to HDF5 currently requires an intermediate conversion to NIfTI-2 via MRtrix3 mrconvert, such that the resulting .nii can be loaded using NiBabel.

It would be quite a lot more preferable if NiBabel could itself directly read .mif images.

I mentioned this in https://github.com/MRtrix3/mrtrix3/issues/2087, and it was also mentioned over at NiBabel in https://github.com/nipy/nibabel/issues/927. Unfortunately the intern I placed on the project wasn't able to finalise the contribution, but it might be possible to finish that code off and contribute it to NiBabel, which would likely be of use to many people but also would simplify the ConFixel code.

mattcieslak commented 1 year ago

@Lestropie that would be amazing! The nifti conversion is a big vulnerability here, as it sometimes flips the array of fixel values.

Lestropie commented 1 year ago

Yeah, that'll happen. Welcome to the wonderful world of image strides... :grimacing: