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

Add JSON Keys Automatically During Conversion #254

Open
karl-koschutnig opened this issue Dec 14, 2024 · 4 comments
Open

Add JSON Keys Automatically During Conversion #254

karl-koschutnig opened this issue Dec 14, 2024 · 4 comments

Comments

@karl-koschutnig
Copy link

Hi Marcel,

Apologies for bringing up more issues – and thank you for all your hard work on this amazing tool!

As you’re likely aware, the BIDS Validator has been completely redesigned. For many BIDS Apps, the validator is the first step in the workflow. At our MRI Lab, where I’m the head, we rely on ensuring BIDS validity across all our studies – which currently amounts to over 140 datasets. Your tool has been an absolute game-changer for us.

With the new validator, I was wondering if there’s a way to automatically add specific JSON keys during the conversion process? While we’re not encountering many errors with the updated validator, we are seeing a substantial number of warnings.

I’ve attached an example of a validator output (generated via bidscoiner) for reference:
karl_validator_output.txt

Thanks again for your support and for maintaining this fantastic tool!

Best regards,
Karl

@mateuszpawlik
Copy link

I remember a comment in the BIDS Validator project, which I can't find anymore, saying that they would like to suppress the warnings for recommended JSON sidecar keys.

@marcelzwiers
Copy link
Collaborator

marcelzwiers commented Jan 8, 2025

Of course, with the GUI this is done by adding it to the meta table, but you are asking about an automatic way. So the JSON keys need to be available on disk so BIDScoin can read them and add it to the JSON output file. It happens that such a mechanism has existed already for quite a while, but I never used it myself. I named it "extended attributes", which works by putting a JSON sidecar file with your custom key-value pairs, next to the raw data. See item 3:

https://bidscoin.readthedocs.io/en/stable/bidsmap.html#structure-and-content

@marcelzwiers
Copy link
Collaborator

Btw, if the keys are available in the DICOM header, then it is as simple as adding it to the meta table of the template bidsmap....

@marcelzwiers
Copy link
Collaborator

But I see you are dealing with a lot of SJON keys here (which is actually something that dcm2niix should fix)

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

3 participants