[Neuroimaging] Question about maximum intensity of nifti images

Matthew Brett matthew.brett at gmail.com
Fri Mar 8 17:10:53 EST 2019


On Fri, Mar 8, 2019 at 10:08 PM Abdullah Alhalabi <absalhalabi at gmail.com> wrote:
> Dear sirs
> This is Abdullah Alhalabi, a biomedical engineering student at Jordan university of science and technology, My graduation project is brain tumor segmentation using deep neural network , I have downloaded the dataset that I'm going to use, the images format is nifti , my problem that I want to know the maximum display intensity of all the images and use it in scaling, but when I display the image header it gives a 'cal_max' value of zero(please find attached screen shot of the code), I searched a lot and I didn't find any solution, I'll be very grateful if you help me.

A lot of software doesn't write the cal_max field.   I think you'll
have to read in the values and get the maximum directly:

>>> np.max(img.get_fdata())



More information about the Neuroimaging mailing list