[Insight-users] PolylineParametricPath

Luis Ibanez luis . ibanez at kitware . com
Thu, 27 Nov 2003 22:23:31 -0500


Hi Thomas,

The method PolylineParametricPath::EndOfInput()
is defined in the file

   Insight/Code/Commong/itkPolyLineParametricPath.txx

in lines 107-110 and it is simply returning

          m_VertexList->Size() - 1;

Unfortunately this value will be different from
zero for a newly created path.

This method is used for avoiding to visit the
first point twice in a closed path.

Given that the Vertex container m_VertexList is
actually a VectorContainer that derives from the
std::vector, we could redefine this method in
terms of the std::vector    ::end()
and use iterators in order to visit all the points.


This is actually a bit confusing in the API, since
EndOfInput() is not used as a vertex counter but
rather as a discretized measure of the parameterization
of the path.

Could you please describe the use that you were
intending to make of this method ?

Is is likely that another method will actual
provide the functionality that you need.


Please let us know,


Thanks


   Luis


===================================================
Thomas Boettger wrote:

> Hi all,
> 
> I tried to use the class PolylineParametricPath.
> 
> After instantiating a new PolylineParametricPath the EndOfInput() method 
> returns a value different from zero. Is this correct? Because there is 
> no point in the path and I thought the EndOfInput would return the same 
> index as StartOfInput().
> 
> Cheers,
> Thomas
> 
> 
>