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

[BUG] - Inconsistent mapping of .seq parameter in nii_hdr_ext - osp_generate_nii_hdr_ext - Alex Craven #748

Open
alexcraven opened this issue Jul 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@alexcraven
Copy link
Contributor

Describe the bug

osp_generate_nii_hdr_ext maps in.seq to the ProtocolName attribute of the nifti header extension, while io_loadspec_niimrs attempts to read the SequenceName attribute into seq. Hence: the value for seq is not preserved using Osprey functions to load a nifti file which was originally created using Osprey functions.

To Reproduce

  1. Create a nifti file with io_writenii_mrs, defining the seq attribute
  2. Load that same nifti file with io_loadspec_niimrs
  3. Be dismayed by the disappearance of the seq attribute.

Expected behavior
The mapping between header elements and internal structures should be consistent across save and load.
The shorter SequenceName attribute seems more appropriate given its usage within Osprey (eg, in basis set selection), so I suggest osp_generate_nii_hdr_ext should map in.seq to SequenceName.

Additional info
Note that io_loadspec_niimrs also uses the ProtocolName attribute to identify Philips HBCD data, so an eventual fix would need to take this into account (I don't have data to test this case, hence not submitting a patch this time). Probably it's sufficient to change this instance to SequenceName too, unless these data are generated by an external tool.

@alexcraven alexcraven added the bug Something isn't working label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant