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

Luis Ibanez luis.ibanez@kitware.com
Fri, 17 Jan 2003 15:39:55 -0500


Hi Parag,

Thanks for pointing this out.
This was still buggy in the cvs version.

We just checked in a fix.

Thanks


Luis


---------------------------------

Parag Chandra wrote:

> 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
>