[MINC-development] volume_stats/mincstats???

Jacqueline Chen minc-development@bic.mni.mcgill.ca
Wed, 13 Aug 2003 14:35:44 -0400 (EDT)


Many thanks!

Appreciatively,
  Jacqueline







On Wed, 13 Aug 2003, Andrew Janke wrote:

> On Tue, 12 Aug 2003, Robert VINCENT wrote:
> 
> > I've taken a look at this.  If I follow Peter's comments and the program's
> > logic, it looks as though the following line needs to be added to
> > mincstats.c:
> >
> > *** 618,623 ****
> > --- 618,624 ----
> >               else
> >                  stats->median = ((double)median_bin + (0.5 - cdf[median_bin])
> >                                   * pdf[median_bin + 1]) *  hist_sep;
> > + 	    stats->median += hist_centre[0];
> >
> >               stats->majority = hist_centre[majority_bin];
> >               stats->biModalT = hist_centre[bimodalt_bin];
> >
> > Does this look correct?
> 
> >From what I can tell yes.  I have a slightly more extensive diff (attached) of
> which the only change of consequence (I hope!) is the one above.  Once I get a
> go-ahead WRT indenting I'll commit extensive indenting changes + the change
> above to CVS.
> 
> Howver on this matter, those comparing mincstats and volume_stats should note
> that the output at least of histogramming is never going to be identical, this
> comes down to a fundamental "algorithmic mis-match" between what peter & I and
> Alex think the centre of a discrete minc histogram should be and also how many
> default bins should be used for a discrete minc file. :)
> 
> In order to more closely replicate the behaviour of volume_stats with mincstats
> on a discrete (non float or double) minc file, mincstats should be used as such:
> 
>    $ mincstats -discrete_histogram file.mnc
> 
> (see the mincstats man page for the gory details of this)
> 
> --
> Andrew Janke   ( rotor@cmr.uq.edu.au || www.cmr.uq.edu.au/~rotor )
> Australia->University of Queensland->Centre for Magnetic Resonance
> W: +61 7 3365 4100  ||  H: +61 7 3800 4042  ||  M: +61 4 2138 8581