Hi Katharina,

I think it's safe to replace with spm_bwlabel.

I test a little bit, for connect = 18 or 26, the output is exactly the same.
For connect = 6, slightly label index difference exist in "theCluster", i.e., a cluster will be labelled as different numbers in spm_bwlabel and bwlabeln, but this will not affect the following analyses.

Best,

Chao-Gan


On Tue, Jan 8, 2013 at 6:22 AM, Katharina Wittfeld <[log in to unmask]> wrote:
Dear SPM user and developer,

at the moment I try to run the REST toolbox for SPM.

Problem is that the toolbox uses the bwlabeln function from MATLAB Image Processing Toolbox which I don't have here.

Is it safe to replace this function by the spm_bwlabel function?
Does anyone know if the output is the same?

In more detail I talk about the function rest_AlphaSim.m

And I replaced
[theCluster, theCount] =bwlabeln(fim, connect);
by
[theCluster, theCount] = spm_bwlabel(fim, connect);

It's running but are the results really the same?

I appreciate any hint or comment!

Thank you in advance.

Best regards,
Katharina



--
Chao-Gan YAN, Ph.D.
Research Scientist
The Nathan Kline Institute for Psychiatric Research, 140 Old Orangeburg Road, Orangeburg, NY 10962
Center for the Developing Brain, Child Mind Institute, 445 Park Avenue, New York, NY 10022
The Phyllis Green and Randolph Cowen Institute for Pediatric Neuroscience, New York University Child Study Center, New York, NY 10016
http://www.restfmri.net
http://scholar.google.com/citations?user=lJQ9B58AAAAJ&hl=en