shimming-toolbox / shimming-toolbox-matlab

Code for performing real-time shimming using external MRI shim coils
GNU General Public License v3.0
16 stars 5 forks source link

Create a function to write nifti file #60

Open jcohenadad opened 4 years ago

jcohenadad commented 4 years ago

Currently we are writing nifti by going through dicom format, which is problematic because of re-normalization.

Suggestion: write a function that would write nifti directly, with json that woudl include useful metadata (freq, shim coeff, etc.)

jcohenadad commented 4 years ago

Maybe look into official matlab functions:

jaystock commented 4 years ago

How does the NeuroPoly team handle the 90 deg rotation and R-L flip that occurs in DICOM-to-NIFTI conversion? Do you manually correct for this or is there a systematic way to keep track of the re-ordering of Matlab matrix dimensions? I find that it's easy to accidentally reverse R and L.

jcohenadad commented 4 years ago

How does the NeuroPoly team handle the 90 deg rotation and R-L flip that occurs in DICOM-to-NIFTI conversion? Do you manually correct for this or is there a systematic way to keep track of the re-ordering of Matlab matrix dimensions? I find that it's easy to accidentally reverse R and L.

We deal with it by systematically relying on the nifti header when opening a data matrix. One thing that could be done, to simplify code, is to reorient the data in a specific orientation (eg RPI) before entering the optimization pipeline. This is indeed an important aspect that needs to be clarified in the code base.