Skip to content

Commit 3639b9f

Browse files
aylwarddzenanz
authored andcommitted
BUG: Set FastMarching targets prior to reach mode
With updates to FastMarching in ITK, it is necessary to SetTargetPoints prior to setting TargetReachMode. Without this change, an exception is thrown in itkFastMarchingUpwindGradientImageFilter:: VerifyTargetReachedModeConditions() when called by SetTargetReachedModeToAllTargets() which is called by itkSpeedfunctionToPathFilter:: ComputeArrivalFunction()
1 parent 8efc307 commit 3639b9f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/itkSpeedFunctionToPathFilter.hxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ SpeedFunctionToPathFilter<TInputImage, TOutputPath>::ComputeArrivalFunction()
6767
marching->SetInput(speed);
6868
marching->SetGenerateGradientImage(false);
6969
marching->SetTargetOffset(2.0 * Superclass::m_TerminationValue);
70-
marching->SetTargetReachedModeToAllTargets();
7170

7271
// Add next and previous front sources as target points to
7372
// limit the front propagation to just the required zones
@@ -102,6 +101,8 @@ SpeedFunctionToPathFilter<TInputImage, TOutputPath>::ComputeArrivalFunction()
102101
}
103102
marching->SetTargetPoints(targets);
104103

104+
marching->SetTargetReachedModeToAllTargets();
105+
105106
// Get the next Front source point and add as trial point
106107
typename NodeContainer::Pointer trial = NodeContainer::New();
107108
trial->Initialize();

0 commit comments

Comments
 (0)