[MINC-users] minimum cluster size

Andrew Janke a.janke at gmail.com
Wed May 30 22:23:39 EDT 2012


Hi Jonathan,

On 31 May 2012 03:45, Jonathan DuBois <jonathan.m.dubois at gmail.com> wrote:
> Does anyone have a script or method for setting a minimum cluster size for a minc image? I would like to only view significant voxels (greater than a specified p-value) in a cluster of 3 or more for a z or t map.

I don't know of a specific tool for this but here's what I'd do:

# find all voxels above your threshold
mincmath -gt -const <thresh> tmap.mnc thresh.mnc

# use mincmorph to find the groups (using a 3D 6 connectivity kernel)
# mincmorph will order the groups by size.
mincmorph -group -3D06 thresh.mnc groups.mnc

# use mincstats to find the number of values in each group via a histogram
mincstats -histogram hist.txt -discrete_histogram group.mnc

Then look at hist.txt and find the group number that suits the number
of voxels you want in each group. You can then find all groups greater
than this by a simple threshold

mincmath -gt -const <group-threshold> group.mnc mask.mnc

>From there you can just apply the final mask to your original data

mincmath -mult tmap.mnc mask.mnc tmap-masked.mnc



a


More information about the MINC-users mailing list