Thank you so much Mark... I forgot to eliminate voxel of zero intensity when I calculated the mean. Thanks again for your quick response.

From: Mark Jenkinson <[log in to unmask]>
To: [log in to unmask]
Sent: Thu, August 26, 2010 4:52:44 PM
Subject: Re: [FSL] intensity normalization


You can find the C++ code for this easily in (in $FSLDIR/src/avwutils/ )
This shows that it just excludes the zero voxels - see the code below
where the key line is the binarise with the exclusive option to form the

    else if (string(argv[i])=="-inm")
      double target,tmean;
      target = atof(argv[++i]);
      volume4D<T> mask(input_volume);
      for(int t=0;t<input_volume.tsize();t++)
        for(int z=0;z<input_volume.zsize();z++)
          for(int y=0;y<input_volume.ysize();y++)   
        for(int x=0;x<input_volume.xsize();x++)

All the best,

On 26 Aug 2010, at 22:39, Kim Chi Nguyen wrote:

> Hello,
> I have a question about intensity normalization command: fslmaths inputVol -inm 10000 outputVol. To my understanding, that command should make the mean of each volume in the 4D inputVol to 10000. Particularly, let h be the 1st volume in the 4D inputVol: h=inputVol(:,:,:,1) . After the normalization step, let  t=outputVol(:,:,:,1). So we should have t=h.*10000/mean(h) i.e. mean(t)=10000 (mean function here denotes for 3D mean calculation).
> In fact I used that command and I also do the normalization manually in Matlab. However, the two normalization results does not match. I suspected that you only include the voxels that are greater than some certain voxels into the processing of calculating the mean and normalizing it... Am I correct? If yes, please let me know what is the default threshold that FSL uses? If not, please explain to me what I do/think wrongly here.
> Thank you very much.
> Sincerely,
> KC