Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix reverse readdir for echoes (bruker) #186

Open
aTrotier opened this issue May 24, 2024 · 5 comments
Open

fix reverse readdir for echoes (bruker) #186

aTrotier opened this issue May 24, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@aTrotier
Copy link
Contributor

dee7b36#commitcomment-142358273

@aTrotier aTrotier added the enhancement New feature or request label May 24, 2024
@aTrotier aTrotier changed the title fix reverse readdir for echoes for bruker data fix reverse readdir for echoes (bruker) May 24, 2024
@aTrotier
Copy link
Contributor Author

How would you prefer to proceed this :

  • I can handle that directly in BrukerFiles, just checking if the parameter with positive readout exists which is, to my knowledge, specific to MGE and implement the reverse like you did (I have to do that in PV360 and PV6)
  • Create a dedicated function to reverse the lines according to the echo number function raw = reverseEchoDir(raw)

@tknopp
Copy link
Member

tknopp commented May 29, 2024

I think the first one is better. The conversion should then be done when converting RawAcqData -> AcqData. I would say also the offset correction in the conversion should be done automatically. Currently there is a parameter "OffsetBruker" (https://github.com/MagneticResonanceImaging/MRIReco.jl/blob/master/MRIBase/src/Datatypes/RawAcqData.jl#L283), which should not be named that way since at that point, there is nothing Bruker specific.

@aTrotier
Copy link
Contributor Author

I don't know if the offset is required for all the dataset from clinical scanner but the OffSetBruker is specific because it should be only applied along phase and partition direction (Bruker directly handle the frequency one).

If we have to apply it automatically it should be handle during the conversion from datasets to raw.

or we don't handle that automatically and just create a specific function like

function correctOffset(acq::AcquisitionData{T,D}, offsetCor=[0,0,0]) where {T,D}

  • that parts
  if OffsetBruker
    ROT = [[f.profiles[1].head.read_dir...] [f.profiles[1].head.phase_dir...] [f.profiles[1].head.slice_dir...]]
    offset = inv(ROT) * [f.profiles[1].head.position...]
    offset = offset .*[0 1 1]'; @info "read offset not performed (only phase + slice)";
    acq = correctOffset(acq, offset)
  end

@tknopp
Copy link
Member

tknopp commented May 29, 2024

Ah, ok, thats a good point. Then, we could probably could simply set the offset when converting from BrukerData to RawData in that direction to zero. In the RawAcq -> Acq conversion one would then only do the correction, if the offset is different from zero in the respective direction. In that way, the RawAcq -> Acq conversion is generic.

The same line of thoughts holds for the ROT. By setting it correct in BrukerFile (like I did for MGE), one can implement this in a generic fashion in the later conversion.

@aTrotier
Copy link
Contributor Author

aTrotier commented May 29, 2024

One of my colleague told me that the offset is generally handle by Siemens in each sequence but I still have to verify that point.

If it is the case we should change the head.position = (0,0,0) during ismrmrd -> raw.
and for Bruker : head.position = (0,posy,posz)

But we don't anymore have the correspondance between the mrd format and the raw format ?
And maybe the offset is not corrected for GE / Philips but we don't know if the .MRD files was converted by siemens/GE/...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants