[Insight-users] Possible bug in MinimumMaximumImageFilter and MinimumMaximumImageCalculator
Julien Jomier
jjomier@cs.unc.edu
Mon, 7 Apr 2003 16:22:10 -0500
Hi Parag,
Bill Lorensen fixed it on March 1st (after the 1.2 release)
Thanks for the report.
Julien
-----Original Message-----
From: insight-users-admin@public.kitware.com
[mailto:insight-users-admin@public.kitware.com] On Behalf Of Parag =
Chandra
Sent: Monday, April 07, 2003 1:39 PM
To: ITK Mailing List
Subject: [Insight-users] Possible bug in MinimumMaximumImageFilter and
MinimumMaximumImageCalculator
Hi,
I think I've caught this before in StatisticsImageFilter, but neither of =
the
two classes mentioned in the subject line seem to calculate the minimum
value correctly for an image that contains negative values. I think the
following two lines in both classes:
m_Maximum =3D NumericTraits<InputPixelType>::min() ;
m_Minimum =3D NumericTraits<InputPixelType>::max() ;
need to be changed to the following:
m_Minimum =3D NumericTraits<RealType>::max();
m_Maximum =3D NumericTraits<RealType>::NonpositiveMin();
-Parag