FSL developers/experts,
I wanted to re-raise this issue from a couple years ago as we've just encountered it and found this email on the list that didn't reach a resolution.
The issue seems to be a problem with how FSL is calculating clusters under the 18 connectivity case.
In theory, for a given thresholded image, as you decrease the value of your connectivity you should always have an equal or greater number of clusters, because all existing clusters at, for example connectivity=26, will either remain a single cluster or break into multiple clusters. Testing FSL's cluster vs SPM's bwlabel function results in a divergence at connectivity=18.
Here are the values for a test image
Connectivity SPM FSL
26 177 177
18 184 230
6 212 212
They agree perfectly on the anchor points but diverge in the case of connectivity=18.
Here are the commands we used in SPM/FSL
[~,num] = spm_bwlabel(data,26)
[~,num] = spm_bwlabel(data,18)
[~,num] = spm_bwlabel(data,6)
cluster -i data_continuous.nii -t 0.99 --connectivity=26 | wc
cluster -i data_continuous.nii -t 0.99 --connectivity=18 | wc
cluster -i data_continuous.nii -t 0.99 --connectivity=6 | wc
In the FSL case, subtracting 1 from the line count for the header row produces the numbers above.
It would definitely seem that FSL is acting oddly in the connectivity=18 case, since the value is inappropriately larger for 18 than it is for 6.
You can download both continuous and binary test images as well as a text file with the commands that will reproduce the values here:
https://umich.box.com/s/qadu0zypr1tiy4hhd0xnly6e9jkt9xdw
This is using FSL version 5.0.8 (also tested and got identical results in 5.0.5 and 5.0.9), and SPM8 (R4667) in MATLAB R2013a (though results in SPM12 (R6470) in MATLAB 2015b are identical).
--
Mike Angstadt
Research Computer Specialist / PANLab Lab Manager
Department of Psychiatry / University of Michigan
(734) 936-8229
> -----Original Message-----
> From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On
> Behalf Of Mark Jenkinson
> Sent: Tuesday, December 16, 2014 6:45 PM
> To: [log in to unmask]
> Subject: Re: [FSL] Matlab bwlabeln vs Cluster command
>
> Hi,
>
> Are these binary images?
> What is your exact cluster command and your exact matlab command?
> Without this information it is hard to know what might be different.
>
> All the best,
> Mark
>
>
> > On 3 Dec 2014, at 12:21, Habib Ganjgahi <[log in to unmask]> wrote:
> >
> > Hi fslers
> >
> > I'm trying to find clusters in an image with 18 connectivity criterion. but
> cluster command and Matlab bwlabel gave me 2 different answers, The
> number of clusters are 371 and 11 for the cluster command and bwlabeln
> respectively. Does anybody know why they are different?
> > Thank you very much in advance.
> >
> >
> > Bests,
> > Habib
> >
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues
|