Pass it a 3D array - rather than a file name. If you are using SPM5, you can
load the image by:
NI = nifti('E:\luosisi\luosisi\individual-result\B3\I1-mask.img');
X = NI.dat(:,:,:,1);
... and then you would run ...
[L,NUM] = spm_bwlabel(X,18);
Best regards,
-John
On Thursday 28 August 2008 03:56, Haibo> <Xu wrote:
> Dear SPMlist:
>
> I got the following error message when using the 'bwlabel.m', but do not
> know what I did wrong with it. I use 'imCalc' as 'i1>5' to creat binary
> mask (I1- mask.hdr/.img) form con_*.img or spmT_*.img, then typy the
> following cmdline and got the error message below. Any suggestion or advice
> will be greatly appreciated.
>
> > > [L,NUM] = spm_bwlabel('E:\luosisi\luosisi\individual-result\B3\I1-
>
> mask.img',18)
> ??? spm_bwlabel: BW must be numeric, real, full and double
>
> Haibo
|