[Insight-users] PolylineParametricPath
Thomas Boettger
t . boettger at dkfz-heidelberg . de
Fri, 28 Nov 2003 09:22:24 +0100
Hi Luis,
I simply wanted to iterate over the all indices and call Evaluate(). The
loop shouldn't crash if there is no point in the path, but it does when
I use EndOfInput() of cause.
I read the documentation and saw the class was suggested for contour
representation. So I play around and don't see the benefit of this
datastructure. I am not interested in some image values following the
path, maybe in future. For now I simply want to traverse the path, to
get the values and then draw it into a widget. One could use a point
list. Furthermore there is no direct bounding box computation. And I am
not sure how to access the vertex list. Do I have to use PathIterator
and does a path only make sense together with an image?
Thanks,
Thomas
Luis Ibanez wrote:
>
> 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
>>
>>
>>
>
>
>
>
--
Dipl.-Inform. Thomas Boettger
Deutsches Krebsforschungszentrum (German Cancer Research Center)
Div. Medical and Biological Informatics H0100 Tel: (+49) 6221-42 2328
Im Neuenheimer Feld 280 Fax: (+49) 6221-42 2345
D-69120 Heidelberg e-mail: t . boettger at dkfz . de
Germany http://www . dkfz . de/mbi/people/thomasb . shtml