MagneticResonanceImaging / MRIReco.jl

Julia Package for MRI Reconstruction
https://magneticresonanceimaging.github.io/MRIReco.jl/latest/
Other
85 stars 22 forks source link

add offsets for bruker sequence #90

Closed aTrotier closed 2 years ago

aTrotier commented 2 years ago

Offset correction for Bruker data. axial

Works on :

TO DO :

Remarks / question :

1) maybe a slight offset by one voxel due to the way bruker performs the FFT ? 2) Bruker only need to correct the offset along Phase1/phase2 (not read), how do you want to manages that ? For now the offset correction is performed under AcquisitionData(). Do you prefer to create a dedicated function object that takes either the AcquisitionData or RawData, correct the offset along R/P/S according to a tuple (False,True,True) ? 3) a permutation along the data is required between the 2dseq and the reconstructed image.

# Permute according to direction
if b["PVM_FovSatSliceOri"][1] == "axial"
    @info "axial"
    Isos_cor = permutedims(Isos_cor,(2,1,3,4,5))

elseif b["PVM_FovSatSliceOri"][1] == "coronal"
    @info "coronal"

elseif b["PVM_FovSatSliceOri"][1] == "sagittal"
    @info "sagittal"
    Isos_cor = permutedims(Isos_cor, (2,1,3,4,5))
end
codecov-commenter commented 2 years ago

Codecov Report

Merging #90 (2025f5d) into master (7437e5b) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #90   +/-   ##
=======================================
  Coverage   64.28%   64.28%           
=======================================
  Files          37       37           
  Lines        1554     1554           
=======================================
  Hits          999      999           
  Misses        555      555           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7437e5b...2025f5d. Read the comment docs.

aTrotier commented 2 years ago

I think it is ready. Do you have some remarks

I have some questions :

  1. I have multiple datasets with oblique plan along axial/coro/sag each with 2 read orientations AP/HF/LR. Maybe we can only use one of them for the test ?
  2. Where should I put correctOffset(acq::AcquisitionData,offsetCor=[0,0,0])
  3. I think the read/phase/slice direction and head position and fov should be in mm according to : https://github.com/ismrmrd/ismrmrd/blob/master/include/ismrmrd/ismrmrd.h#L286. Do you want to change that ? (maybe it is better to do that in another PR)

I might give it a try directly on my scanner

aTrotier commented 2 years ago

I try it directly on the scanner and it seems to work even in other position that head_supine .