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

the same sidecar files for three different MRS files #138

Open
juliam98 opened this issue Jun 6, 2024 · 5 comments
Open

the same sidecar files for three different MRS files #138

juliam98 opened this issue Jun 6, 2024 · 5 comments

Comments

@juliam98
Copy link

juliam98 commented Jun 6, 2024

Hi,
I used the spec2nii command to generate sidecar files for Siemens dicom MRS data. I three types single-voxel MRS files: _ref (water reference file), _ECC (eddy current corrected), and _noECC - for ACC and Hip.

The resulting sidecar files are identical for the three filetypes, I can distingush only based on the brain region of the svs (see below), but no way to distinguish between ref, ECC, and noECC.

{
  "SequenceName": "*svs_se",
  "ProtocolName": "ACC_svs"
}

I was hoping to use the sidecar files to sort the fies into BIDS format (improvised since BIDS doesn't define MRS, but still). Do you know if there's a way I can do that?

@wtclarke
Copy link
Owner

wtclarke commented Jun 7, 2024

Hi @juliam98,

Is this data from the Siemens PRESS sequence (svs_se) or another? What parameter do you change on the scanner to achieve these different conditions, and are there differences int he DICOM header to identify each case?

This is an area I want to improve spec2nii in as, as you say, it would help the user experience.

Will

@juliam98
Copy link
Author

juliam98 commented Jun 7, 2024

Hi Will,

I used pydicom to read the dicom headers and this is the output I got header.txt. In my case I could use (0008, 103e) Series Description, but I am not sure how helpful it would be to rely on this property in other cases- it's probably to used in a consisent enough way.

After some reading I found information about CSA headers and using this package I was able to access the contents of the (0029, 1120) [CSA Series Header Info] array using this repository, and in the array I found thatWaterReferencedPhaseCorrection property might be useful here to distinguish between ECC and noECC. The remaining issue was to find something to distinguish the ref file and I think the WaterReferencedImageUid might be useful for this, although I am not sure what it means. Here's a summary:

WaterReferencedPhaseCorrection WaterReferencedImageUid
ref None None
ECC YES None
noECC None 1.3.12.2.1107.5.2.43.166001.2023102613381695701550251

I hope this is helpful.

@wtclarke
Copy link
Owner

Thanks, yes not terribly specific. Did you figure out exactly which sequence it is? It should be in the CSA headers.

@juliam98
Copy link
Author

I have attached the content of CSA Image Header Info of the noECC file: noecc_csa_headers.json, ECC file: ecc_csa_headers.json, and `ref' file: ref_csa_headers.json

and here is the scanning protocol:
MRS_scan.pdf

This is the best I've got, sorry if that's not very helpful. If you have any ideas where to look/ check let me know.

@juliam98
Copy link
Author

Hi @wtclarke,

I had a go with accessing the private headers and had some success- that is until our scanner had a software update and my code doesn't quite work for half the data.

I put the little that I figured out here, I managed to access a bit more headers than I get with spec2nii. Here is an example comparison between the headers I get from spec2nii:
sub-223_ses-MRI2_voi-ACC_acq-pres_svs.json
and from the code I linked:
sub-223_ses-MRI2_voi-ACC_acq-pres_svs.txt

I was hoping if I post the bits I figured out then hopefully you might be able to incorporate the bits that work into spec2nii. The repository I linked has two example files if that helps. Happy to help if I can, but I didn't feel qualified enough to attempt to do a pull request myself.

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