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

MRSI support in osp_exportParams #572

Merged
merged 1 commit into from
Mar 6, 2023

Conversation

JohnLaMaster
Copy link
Contributor

Can now handle SVS, nDatasets>1, and MRSI data.

The use of auxiliary nested functions make the code more legible.

The auxiliary function at the bottom, get_header, has a variable possible_keys (line 123). This list will need to be updated to account for all types of fitting nomenclature. The exampledata/nifti-mrs example produces a container with the structure MRSCont.fit.results.metab.fitParams{1,nDatasets}. The MRSI container has the structure MRSCont.fit.results{5,5,5}.off.fitParams{1,1}. Some of the structures become cell arrays of structures and some of the field names change. The MRSI example also uses the labels "off" and "A" depending on the parent field whereas the other example always uses "metab". The struct vs cell array of struct has been taken care of using assertCell(). The pairs of these labels, though, will need to be hard coded at the bottom. That's something I would need from the Osprey team.

There is a section where irrelevant fieldnames can be specified to be ignored. This helps avoid throwing errors. They are only modified if the field exists. These also need to be explicitly listed - more help from the Osprey team.

A limitation of the current code regarding the label pairs is that the data type should be uniform. Future work can add functionality for exporting related types, i.e. edit_on, edit_off, and diff or off and water.

Can now handle SVS, nDatasets>1, and MRSI data.  get_header's possible_keys list will need to be updated to account for all types of fitting nomenclature.
@HJZollner HJZollner merged commit 8de3fd3 into schorschinho:develop Mar 6, 2023
@HJZollner
Copy link
Collaborator

Hi @JohnLaMaster,

Thanks for working on this.

Wrt differences in the struct field names are related to the fact that the MRSI-branch is based on Osprey v.1. In v.2 we introduced a complete overhaul of the struct.

Best,
Helge

@JohnLaMaster
Copy link
Contributor Author

Hi @HJZollner,

Thanks for the info. Does that overhaul explain the differences in naming too? Or do the naming differences depend on the type of spectra being fitted? I'm referring to the field names specified on lines 123-124. Is that something that needs to be more comprehensive or does that work for all use cases now?

Thanks again!

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

Successfully merging this pull request may close these issues.

2 participants