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

Inquiry about Determination of 'max' and 'norm' Values for Each Patient #3

Open
Quintin1995 opened this issue Aug 24, 2023 · 3 comments

Comments

@Quintin1995
Copy link

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.

@radhikatibrewala
Copy link
Collaborator

radhikatibrewala commented Aug 24, 2023

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

@Quintin1995
Copy link
Author

Quintin1995 commented Aug 28, 2023 via email

@radhikatibrewala
Copy link
Collaborator

Hello,

Sorry for the late response! We use the Python library Twixtools to read the calibration data from the raw data file.

Thanks
Radhika

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

2 participants