Open Quintin1995 opened 1 year ago
Hello,
The norm and maximum values are calculated using:
import numpy as np
norm = np.linalg.norm(im_recon[:])
max = np.max(im_recon[:])
In the code above, im_recon refers to the cropped reconstructed T2 image, i.e. im_recon = hf["reconstruction_rss"][:].
Thanks, Radhika
Hi,
Thank you so much! That is very helpful. So, if I understand correctly. You transform the k-space into image space by using the GRAPPA from the library. After this the max and norm are calculated. That is how I get the same values as logged in the h5 attributes 'max' and 'norm'. This function assumes the calibration data to be in a specific format. I am building my own dataset from two different institutes and have all the k-space in the correct format. However, I can't seem to get the calibration data in the right format. Would you be willing to share the code that transforms the .mrd calibration data into the array with shape (30, 20, 640, 32).
Thanks in advance!
Kind regards, Quintin van Lohuizen PhD Radiology Email: @.**@.> University Medical Center Groningen University of Groningen
Van: radhikatibrewala @.> Verzonden: donderdag 24 augustus 2023 18:41 Aan: cai2r/fastMRI_prostate @.> CC: Quintin van Lohuizen @.>; Author @.> Onderwerp: Re: [cai2r/fastMRI_prostate] Inquiry about Determination of 'max' and 'norm' Values for Each Patient (Issue #3)
Hello,
The norm and maximum values are calculated using: norm = np.linalg.norm(im_recon[:]) max = np.max(im_recon[:])
In the code above, im_recon refers to the cropped reconstructed T2 image, i.e. im_recon = hf["reconstruction_rss"][:].
— Reply to this email directly, view it on GitHubhttps://github.com/cai2r/fastMRI_prostate/issues/3#issuecomment-1692047588, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEMQLNAYR6OVEFKUMJPGMKDXW574RANCNFSM6AAAAAA344U2LA. You are receiving this because you authored the thread.Message ID: @.***>
Hello,
Sorry for the late response! We use the Python library Twixtools to read the calibration data from the raw data file.
Thanks Radhika
Hi,
I'm seeking clarification on the process of determining the 'max' and 'norm' values for NYU patients. These values are crucial for intensity scaling during data analysis. Understanding their origins is pivotal to ensure accurate results.
We've attempted to calculate these values independently, but they don't match the values present in the h5 attributes.
While our code reads the 'max' and 'norm' values from the h5 file, it currently doesn't use them. However, an RIM reconstruction model relies on these values for intensity scaling.
This code reads in the max and norm value, but is not used further. However, an RIM reconstruction model uses these values for intensity scaling. with h5py.File(fname, "r") as hf: kspace = hf["kspace"][:]
calibration_data = hf["calibration_data"][:] hdr = hf["ismrmrd_header"][()] im_recon = hf["reconstruction_rss"][:]
atts = dict() atts['max'] = hf.attrs['max'] atts['norm'] = hf.attrs['norm'] atts['patient_id'] = hf.attrs['patient_id'] atts['acquisition'] = hf.attrs['acquisition']
Your insights into this matter are greatly appreciated. Looking forward to your response.