[Insight-users] Error in itk::PointSet (v1.0)?

Parag Chandra pchandra@radonc.unc.edu
Fri, 17 Jan 2003 15:18:46 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_004F_01C2BE3B.BAB70660
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

At the risk of pointing out something that has probably already been =
fixed in the CVS version of the code, I believe there is an error in the =
itkPointSet class, v1.0. The GetNumberOfPoints() method does the =
following:

return m_PointsContainer->Size()

but if no points have been added to the pointset, then m_PointsContainer =
has not yet been constructed and the method causes an exception to be =
thrown. Perhaps m_PointsContainer could be initialized to NULL, and then =
GetNumberOfPoints() would return 0 if m_PointsContainer is NULL?

Best regards,
-Parag Chandra
------=_NextPart_000_004F_01C2BE3B.BAB70660
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>At the risk of pointing out something =
that has=20
probably already been fixed in the CVS version of the code, I believe =
there is=20
an error in the itkPointSet class, v1.0. The GetNumberOfPoints() method =
does the=20
following:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>return =
m_PointsContainer-&gt;Size()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>but if no points have been added to the =
pointset,=20
then m_PointsContainer has not yet been constructed and the method =
causes an=20
exception to be thrown. Perhaps m_PointsContainer could be initialized =
to NULL,=20
and then GetNumberOfPoints() would return 0 if m_PointsContainer is=20
NULL?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Best regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-Parag =
Chandra</FONT></DIV></BODY></HTML>

------=_NextPart_000_004F_01C2BE3B.BAB70660--