Mercurial > hg > minc-tools
changeset 2392:2a0ec41643a8
* bugfix to histogram stats with a zero volume, discovered by Simon, fixed by
Claude
author | rotor <rotor> |
---|---|
date | Thu, 27 Sep 2007 01:06:31 +0000 (2007-09-27) |
parents | 885ec11c4915 |
children | 27c6986055fc |
files | progs/mincstats/mincstats.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/progs/mincstats/mincstats.c +++ b/progs/mincstats/mincstats.c @@ -5,7 +5,11 @@ * University of Queensland, Australia * * $Log: mincstats.c,v $ - * Revision 1.22 2005-07-29 16:46:21 bert + * Revision 1.23 2007-09-27 01:06:31 rotor + * * bugfix to histogram stats with a zero volume, discovered by Simon, fixed by + * Claude + * + * Revision 1.22 2005/07/29 16:46:21 bert * Add warning message for mincstats -mask w/o -mask_range, -mask_binvalue, etc. * * Revision 1.21 2005/07/25 19:56:52 bert @@ -1369,7 +1373,8 @@ } } - if(Hist && (value >= hist_range[0]) && (value <= hist_range[1])) { + if(Hist && (value >= hist_range[0]) && (value <= hist_range[1]) && + (hist_sep > 0.0) ) { /*lower limit <= value < upper limit */ hist_index = (int)floor((value - hist_range[0]) / hist_sep); if(hist_index >= hist_bins) {