@@ -81,9 +81,9 @@ SpeedFunctionToPathFilter<TInputImage, TOutputPath>::ComputeArrivalFunction()
8181
8282 for (auto it = PrevFront.begin (); it != PrevFront.end (); it++)
8383 {
84- IndexType indexTargetPrevious ;
85- NodeType nodeTargetPrevious;
86- speed->TransformPhysicalPointToIndex (*it, indexTargetPrevious );
84+ NodeType nodeTargetPrevious ;
85+ const IndexType indexTargetPrevious =
86+ speed->template TransformPhysicalPointToIndex < typename PointType::ValueType> (*it);
8787 nodeTargetPrevious.SetValue (0.0 );
8888 nodeTargetPrevious.SetIndex (indexTargetPrevious);
8989 targets->InsertElement (0 , nodeTargetPrevious);
@@ -92,9 +92,8 @@ SpeedFunctionToPathFilter<TInputImage, TOutputPath>::ComputeArrivalFunction()
9292
9393 for (auto it = NextFront.begin (); it != NextFront.end (); it++)
9494 {
95- IndexType indexTargetNext;
96- NodeType nodeTargetNext;
97- speed->TransformPhysicalPointToIndex (*it, indexTargetNext);
95+ NodeType nodeTargetNext;
96+ const IndexType indexTargetNext = speed->template TransformPhysicalPointToIndex <typename PointType::ValueType>(*it);
9897 nodeTargetNext.SetValue (0.0 );
9998 nodeTargetNext.SetIndex (indexTargetNext);
10099 targets->InsertElement (1 , nodeTargetNext);
@@ -112,9 +111,8 @@ SpeedFunctionToPathFilter<TInputImage, TOutputPath>::ComputeArrivalFunction()
112111
113112 for (auto it = CurrentFront.begin (); it != CurrentFront.end (); it++)
114113 {
115- IndexType indexTrial;
116- NodeType nodeTrial;
117- speed->TransformPhysicalPointToIndex (*it, indexTrial);
114+ NodeType nodeTrial;
115+ const IndexType indexTrial = speed->template TransformPhysicalPointToIndex <typename PointType::ValueType>(*it);
118116 nodeTrial.SetValue (0.0 );
119117 nodeTrial.SetIndex (indexTrial);
120118 trial->InsertElement (0 , nodeTrial);
@@ -234,9 +232,10 @@ SpeedFunctionToPathFilter<TInputImage, TOutputPath>::Execute(const Object *
234232 else if (currentValue >= Superclass::m_TerminationValue)
235233 {
236234 // Convert point to continuous index
237- InputImagePointer input = const_cast <InputImageType *>(this ->GetInput ());
238- ContinuousIndexType cindex;
239- input->TransformPhysicalPointToContinuousIndex (point, cindex);
235+ InputImagePointer input = const_cast <InputImageType *>(this ->GetInput ());
236+ const ContinuousIndexType cindex =
237+ input->template TransformPhysicalPointToContinuousIndex <typename ContinuousIndexType::ValueType,
238+ typename PointType::ValueType>(point);
240239
241240 // Add point as vertex in path
242241 OutputPathPointer output = this ->GetOutput (Superclass::m_CurrentOutput);
0 commit comments