[MINC-users] Compute overlap?

Andrew Janke a.janke at gmail.com
Mon Aug 29 19:39:03 EDT 2011


Hi Lisa,

On 30 August 2011 09:23, Lisa F. Akiyama <lrisa87 at uw.edu> wrote:
> Is there a MINC tool that will compute overlaps (dice coefficient, jaccard
> coefficient, etc)?

You could compute a dice coefficient using mincmath and mincstats
assuming both volumes are masks:

   $ mincmath -and in1.mnc in2.mnc and.mnc
   $ nvox1=`mincstats -count -quiet in1.mnc`
   $ nvox2=`mincstats -count -quiet in2.mnc`
   $ nvoxand=`mincstats -count -quiet and.mnc`

   $ dice=`echo "(2 * $nvoxand) / ($nvox1 + $nvox2)" | bc -l`

Note that I haven't checked the above! but it should put you on the right track!

Other options are to write you own by adding a function to minccmp.
There is also a rather unfriendly tool in conglomerate called voldiff
that computes all sorts of wonderful segmentation comparison things.
It expects input to be in the same form as the output of classify
IIRC.  Perhaps someone else who has battled voldiff before can give
some insight.


a


More information about the MINC-users mailing list