Is there any relation between h5 and dicom? #342
Replies: 2 comments 2 replies
-
These files are in the special h5 format because they also have the kspace data in that file. The MRI images are called reconstructions in these files because, well, they are constructed from kspaces. import h5py
file = h5py.File(file_path, "r")
print(file.keys()) # to see what is inside this file
reconstructions_numpy = file["reconstructions_rss"][()] After that you will have 3 dimensional numpy array. (num_slices, height, width) |
Beta Was this translation helpful? Give feedback.
-
Hello @osbm, some of the information that you would find in the DICOM header is in the ISMRMD XML header. We have a helper function for querying the header information here: fastMRI/fastmri/data/mri_data.py Lines 37 to 69 in b661598 We use this to get the final matrix resolution size. However, this only includes the information necessary for reconstruction, and other information you would find in a DICOM is not present. To read the full ISMRMD header you'll need to read up a little bit on XML - the function above shows a few basics. |
Beta Was this translation helpful? Give feedback.
-
I download the annotations from fastMRI+, but it labeled based on h5. I want to use dicom data, so is there any method to relate h5 and dicom? like how to find the dicom file for 'file1000001'
Beta Was this translation helpful? Give feedback.
All reactions