Please sign in to comment.
BUG: itkPolyLineParametricPath infinite loop for degenerate paths
itkPolyLineParametricPath inherits EvalateDerivative and IncrementInput from its superclass: itkParametricPath. IncrementInput uses a default timestep and a derivative estimated from that default timestep to implement a tooBig/tooSmall search strategy to find the next pixel along the path. This strategy will result in oscillation between tooBig and tooSmall for degenerate itkPolyLineParametricPath paths, such as those with a lot of verticies at the beginning less than one image index away from each other followed by a single vertex at the end that is multiple image indices away. This patch overrides the inherited IncrementInputs and EvaluateDerivative function and takes advantage of the fact that it is possible to calculate an instantaneous derivative which allows to calculate the exact timestep to effect a change in one pixel. A test is also added for one of the degenerate paths mentioned in paragraph 2. The ExtractOrthogonalSwatch2DImageFilterTest baseline image was updated due to the old tooSmall/tooLarge search strategy not always honoring the 8-connected neighborhood. Change-Id: Ibe2d5b8fb913e6311ee0f3b977fdadf1321f0653
- Loading branch information...
Showing with 144 additions and 8 deletions.
- +11 −0 Modules/Filtering/Path/include/itkPolyLineParametricPath.h
- +103 −7 Modules/Filtering/Path/include/itkPolyLineParametricPath.hxx
- +29 −0 Modules/Filtering/Path/test/itkPolyLineParametricPathTest.cxx
- +1 −1 Testing/Data/Baseline/BasicFilters/ExtractOrthogonalSwath2DImageFilterTest.png.md5
- BIN Testing/Data/Baseline/Filtering/ExtractOrthogonalSwath2DImageFilterTest.png
|@@ -1 +1 @@|