Dear Pierre,
This warning message was added 6 years ago! If I remember correctly,
there are mainly two reasons for this: 1) spm_mask can be seen as a
special case of ImCalc and it would be preferable to have a single
implementation to ease maintenance (instead of having several dedicated
utility functions), 2) I wanted to repurpose spm_mask.m so that it
becomes a more general function working in tandem with spm_atlas,
spm_bwlabel, spm_summarise and others.
That said, I understand your use case and you should continue using
spm_mask and ignore the warning - this function is not going to
disappear in SPM12. It should be straightforward to add the missing
datatypes to ImCalc; I'll have a look. I agree with you concerning the
limitation with 4D files - this has already been highlighted in the past
and I hope to have a "better" ImCalc at some point.
Best regards,
Guillaume.
On 15/11/17 10:41, Pierre Maurel wrote:
> Dear SPM experts,
>
> spm_mask is throwing a warning "'ImCalc should be preferred to spm_mask whenever possible."
>
> * I would like to know why ImCalc should be preferred ?
>
> * Moreover, when I try to use ImCalc to mask an image, I am facing two issues :
> - some of the datatypes are not supported by ImCalc but are supported by spm_mask (e.g. uint16)
> - more important, if I am not mistaken, 4D images are not supported by ImCalc but are handled nicely by spm_mask
>
>
> Is there a way around ?
>
> thanks for your help,
>
> Pierre
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|