Dear Natalia,
by default, ImCalc will rescale the raw values in the output image to
make use of the full range provided by the data type (int16 by default).
If you need a binary mask consisting of 0 and 1 (and a scale factor of
1), you can do the following:
V = spm_vol('mask_brainstem.nii');
VV = spm_read_vols(V);
V.pinfo=[1 0 0]';
V.dt(1) = spm_type('uint8');
spm_write_vol(V,VV);
Note that you can create a mask of the brainstem in SPM12 (using the
Neuromorphometrics atlas) with:
V = spm_atlas('mask','Neuromorphometrics','Brain Stem');
V.fname = 'mask_brainstem.nii';
spm_write_vol(V,V.dat);
Best regards,
Guillaume.
On 16/12/15 07:49, Natalia Yakunina wrote:
> Dear experts,
>
> I want to perform GLM only in the brainstem. The mask that I created has
> values 327671/1.003981 after converting it to a binary mask in the image
> calculator, while normally masks have these values as 1/1. Is this
> crucial for performing the analysis, and if it, how can I reset these
> values to 1 and 1?
>
> Thank you!
>
> Sincerely,
> Natalia
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|