forked from InsightSoftwareConsortium/ITK
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
1 parent
00bda1f
commit 706a6bf
Showing
5 changed files
with
144 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Testing/Data/Baseline/BasicFilters/ExtractOrthogonalSwath2DImageFilterTest.png.md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1 +1 @@ | |||
e28ea77794e99f1da041ac67fa55e7ed | b79c0a553750ed6fce228b23df79f7d8 |
Binary file added
BIN
+773 Bytes
Testing/Data/Baseline/Filtering/ExtractOrthogonalSwath2DImageFilterTest.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.