[Insight-users] Problem with BoundingBox
Parag Chandra
pchandra@radonc.unc.edu
Wed, 22 Jan 2003 16:54:53 -0500
This is a multi-part message in MIME format.
------=_NextPart_000_001B_01C2C236.FC1BFB70
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I have a 2-D set of points that I want to compute the bounding box of. =
Using itk::BoundingBox->ComputeBoundingBox() gives the correct values =
for the first three points (xMin, xMax, yMin), but the fourth point =
(yMax) is always 2.225e-308, the default value as returned by =
NumericTraits<double>::min(). All the y-values in my point set are =
negative, so of course, the following block:
if ( point[i] > m_Bounds[2*i+1] )
{
m_Bounds[2*i+1] =3D point[i];
}
will never be executed. Is this a bug that needs to be/has already been =
addressed?
Thanks,
-Parag
------=_NextPart_000_001B_01C2C236.FC1BFB70
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1126" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have a 2-D set of points that I want =
to compute=20
the bounding box of. Using itk::BoundingBox->ComputeBoundingBox() =
gives the=20
correct values for the first three points (xMin, xMax, yMin), but the =
fourth=20
point (yMax) is always 2.225e-308, the default value as returned by=20
NumericTraits<double>::min(). All the y-values in my point set are =
negative, so of course, the following block:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial =
size=3D2> if (=20
point[i] > m_Bounds[2*i+1]=20
)<BR> =20
{<BR> =
m_Bounds[2*i+1] =3D=20
point[i];<BR> =20
}<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>will never be executed. Is this a bug =
that needs to=20
be/has already been addressed?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-Parag</DIV></FONT></BODY></HTML>
------=_NextPart_000_001B_01C2C236.FC1BFB70--