[MINC-users] mincstats and ranges that exceed the volume value range

Robert D. Vincent bert at phalarope.com
Sat Oct 21 14:03:22 EDT 2017


Hi Alex,

Thanks for the report - I completely agree that this seems wrong.

Looking over the code, I can confirm that the issue arises because we
blindly adopt the -floor and -ceil values as defining the histogram range.
We can wind up with a histogram with only a single non-empty bin, throwing
the calculation off.

My first thought would be to ignore a -floor or -ceil value that is outside
the reported real range of the volume. I can't think of a situation where
this would be incorrect, as long as the header values are close to correct.

    -bert

On Thu, Oct 19, 2017 at 10:03 PM, Alex Zijdenbos <zijdenbos at gmail.com>
wrote:

> Hi all,
>
> Thought I'd post this here, in case there is discussion; but I noticed that
> mincstats' histogram measures can be quite wrong if you happen to specify a
> range to mincstats that exceeds the range of the volume.
>
> An example:
>
> $ mincstats -min -max -mean -median mni_icbm152_t1_tal_nlin_sym_09a.mnc
> *** mincstats - reported min (0.0677952) doesn't equal header (0.0677952)
> Min:               0.06779524744
> Max:               97.32924302
> Mean:              28.32028821
> Median:            *11.22854638*
>
> $ mincstats -min -max -mean -median *-ceil 1e6*
> mni_icbm152_t1_tal_nlin_sym_09a.mnc
> *** mincstats - reported min (0.0677952) doesn't equal header (0.0677952)
> Min:               0.06779524744
> Max:               97.32924302
> Mean:              28.32028821
> Median:            *500.0677626*
>
> The reason for the massive change in the median is that the histogram
> range/bins are apparently calculated based on the user-supplied range. I
> would say that this is wrong, and that these should be clamped to the
> actual range of the volume - especially since mincstats already has
> -hist_{floor,ceil,range} options with which you could fully control these.
>
> -- A
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>


More information about the MINC-users mailing list