[Insight-users] itkParametricPath

Luis Ibanez luis.ibanez at kitware.com
Thu, 22 Jan 2004 21:05:15 -0500


Hi Thomas,

The "IncrementInput()" method of the ParametricPath
is searching for the "inputStepSize" that is large
enough for moving from one pixel to a contiguous
pixel.

The search is performed by starting with a user
supplied value. If the value is so small that the
position on the path doesn't move from one pixel
to the next, then the step is doubled and tried
again.

If, on the other hand, the step is so large that
it moves the position to a non-contiguous pixel
then the step is divided by 1.5.

Since this can be seen as a binary search, it
makes sense to set a limit to the number of
times you multiply or divide.


What is probably occurring in your case is that
the DefaultStepSize may be going unitialized
and it may be starting with a random very large
number.

It is actually a bug in this class, to not initialize
the m_DefaultInputStepSize member variable to a
reasonable value.

This has been entered as bug # 534
http://www.itk.org/Bug/bug.php?op=show&bugid=534&pos=0

and has already been fixed in the CVS repository.

It is recommended however that you set up
a step size that corresponds to the distance
you expect to need to move in the parametric
path in order to move from one pixel to the
next.


Please let us know if you find any further problem.


Thanks


    Luis



-----------------------------
Thomas Boettger wrote:

> Hi,
> 
> I am using a PolylineParametricPath and get an excpetion when iterating 
> an image using the path from itkParametricPath.txx line 79:
> 
>    if( iterationCount++ > 10000 ) {itkExceptionMacro(<<"Too 
> many                                     iterations");}
> 
> My question is why one is not allowed to do a higher number of iterations?
> 
> 
> Regards,
> 
> Thomas
> 
> 
>