Hi,
There may be a simpler way, but off hand, you could do something like this

cluter -i input -t 0.01 --osize=sizeim
fslmaths sizeim -thr THRESH -bin mask

adjusting the THRESH parameter as necessary to remove the clusters made up of a small number of voxels.



On Sun, Feb 12, 2017 at 3:05 PM, Eric HG <[log in to unmask]> wrote:
Hi everyone, 

I'm currently trying to create a ventricle mask using fslmaths. However, I keep getting a mask with just a few single voxels in brain and I was wondering if there is a function in FSL that can remove voxels without "neighbours"? 

I've already tried erosion in fslmaths but it removes too many voxels. 

Best,

Eric



--
Niels Bergsland
Integration Director
Buffalo Neuroimaging Analysis Center
100 High St. Buffalo NY 14203
[log in to unmask]