Create .json sidecar file out of header information

Dear all,

How can I generate a .json sidecar file out of the header information. I have anatomic mri files which are already in .nii.gz format.


If you have your raw dicoms, you can use dcm2niix to make the JSON sidecar files. Unfortunately, the JSON file is designed to store metadata that is not available in NIFTIs, so you can’t produce a full JSON sidecar from a NIFTI.

Yes, exactly. This is the problem that I do not have to raw dicoms.

By design, the BIDS JSON sidecar contains information that is not stored in the NIfTI image. If you do not have access to the DICOM images, you can get the required details from the scanner console. For example, Siemens scanners allow you to export sequence details in PDF format. You can manually drive most of the BIDS tags from these PDFs. You can download example Siemens PDFs and DICOMs from here. If you do not have access to the DICOMs, PDFs, or scanner console, you will not be able to determine all the parameters required by BIDS.