icon-lab/pGAN-cGAN

How to normalize intensity of Brats datasets to [0, 1]?

huaibovip opened this issue · 1 comments

"The protocol variability in the BRATS dataset was observed to cause large deviations in image intensity and contrast across subjects. Thus, for normalization, the mean intensity across the brain volume was normalized to 1 within individual subjects. To attain an intensity scale in [0 1], three standard deviations above the mean intensity of voxels pooled across subjects was then mapped to 1."

I can not understand these steps for normalization. So could you describe the normalization in detail? Would you share python script with me?

Assume a 3-D variable named 'data', where dimensions (1, 2, 3) correspond to (number of slices within the subject, x-size, y-size).
The pseudo-code for normalization is given as:
mean_data = data.mean()
std_data = data.std()
data[data>mean_data + 3 * std_data] = mean_data + 3 * std_data
data=data/data.max()