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

An option to produce BIDS sidecar .json files to accompany .nii{.gz} #41

Open
yarikoptic opened this issue Jun 1, 2022 · 2 comments
Open

Comments

@yarikoptic
Copy link

@wtclarke , thanks for chiming in on nipy/heudiconv#381 (comment)! I've decided to proceed with specific question here since pertains more to spec2nii than to heudiconv ;)

Are you familiar with BIDS?
I wonder if similarly to -b option of dcm2niix by @neurolabusc for DICOM to NIfTI conversion, spec2cli could also produce a side car .json files filling up "interesting" fields as being harmonized in the BIDS Enhancement proposal for MRS: BEP022?

@wtclarke
Copy link
Owner

wtclarke commented Jul 8, 2022

Hi @yarikoptic,

Apols for the delay in responding. NIfTI MRS uses json to encode metadata in a NIfTI header extension already. This can be generated as an additional sidecar file by spec2nii by either using the -j, --json Create json sidecar option at conversion time, or by using spec2nii extract after conversion.

The fields that are defined for this JSON are in the NIfTI-MRS specification. I'd be up for helping someone to create a small program which then takes this file and adds the extra BIDs specified info.

@yarikoptic
Copy link
Author

Thanks @wtclarke ! Great to hear that there is already extraction of metadata! FWIW

  • I barely ever relied/used extensions within niftis since AFAIK they were never standardized across tools and thus always required a specific tool to be capable of understanding them
  • so it is great that spec2nii extract can already extract it into a separate json file (didn't try yet)
  • Great to discover NIfTI-MRS specification and closing the "loop" for ignorant myself since BIDS MRS BEP022 (3.1) already mentions NIfTI-MRS and you already had brief comments exchange with Mark Mikkelsen which I joined to now ;)
  • I found centralization of such extractions/conversions in the tool which does initial extraction (i.e. in our case dcm2niix) very beneficial since avoids breeding of half-breed solutions. May be it could be just an option to spec2nii extract --bids or alike?
  • But may be it all could be avoided at large? I am yet to get basic understanding of difference in sidecar info of NIfTI-MRS and BIDS BEP022 to see why they couldn't be "compatible". Any specific example/pointer would be appreciated

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