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

Spiral rawdata (pulseq acquisition) is reversed during conversion from raw to acq #191

Open
aTrotier opened this issue Jun 25, 2024 · 2 comments

Comments

@aTrotier
Copy link
Contributor

aTrotier commented Jun 25, 2024

This issue happens when read_dir[1] < 0 and I have a mismatch between the trajectory (extracted from the pulseq file and the data in the acquisition)

kdata[:,cnt,:] .= reverse(kdata[:,cnt,:], dims=1)

Screenshot 2024-06-25 at 11 50 38

Does this line is required ? We have a reverse flag for that no ?

My temporary fix :

for p in eachindex(raw.profiles)
  raw.profiles[p].traj = Float32.(traj[:,:,p])
  raw.profiles[p].head.trajectory_dimensions=2
  # issue with reverse
  raw.profiles[p].head.read_dir = (0.0,0.0,0.0)
end
@tknopp
Copy link
Member

tknopp commented Jun 25, 2024

But doesn't that imply that read_dir is wrong than? I would rather want to fix inconsistent/wrong data at the origin (BrukerFile -> RawDataAcq conversion) and not later.

@aTrotier
Copy link
Contributor Author

I am not sure the read_dir is wrong.
It is siemens acquisition (not a bruker one) and the read_dir is converted during siemens_to_ismrmrd. I think the value should be true.

julia> raw.profiles[1].head.read_dir
(-0.99999994f0, 5.9604645f-8, 0.0f0)

Interestingly the values are the same here :
https://github.com/ismrmrd/ismrmrd/blob/d364e03d3faa3ca516da7807713b5acc72218a37/doc/mrd_files.md?plain=1#L44

I guess it is a numerical approximation for pure axial sequence : (-1,0,0)


I think the data should be revert only with the flag ? Otherwise the rotation is performed by the nifti viewer (if the metadata are correctly filled)

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

No branches or pull requests

2 participants