I've just obtain a datset of 82 nifti files in the format .nii.gz,for every file i would like a .JSON file with the relative metadata information for each nifti file, how can i obtain it?
how obtain a .json file from (nifti file) .nii.gz file with python
1.9k Views Asked by AudioBubble At
2
You can use SimpleITK to read the metadata dictionary of a Nifti file, and then use python's JSON library to write it out.
For a single image:
For every image in a single folder:
See also this SimpleITK example