18 #ifndef __otbNearestPointDeformationFieldGenerator_txx
19 #define __otbNearestPointDeformationFieldGenerator_txx
28 template <
class TPo
intSet,
class TDeformationField>
35 defaultValue.Fill(this->GetDefaultValue());
36 outputPtr->Allocate();
37 outputPtr->FillBuffer(defaultValue);
40 IteratorType it(outputPtr, outputPtr->GetRequestedRegion());
42 for (it.GoToBegin(); !it.IsAtEnd(); ++it)
44 IndexVectorType indexVector = this->GenerateNearestValidPointsPointSet(it.GetIndex(), 1);
46 if (indexVector.size() >= 1)
48 p[0] =
static_cast<ValueType>(this->GetPointSet()->GetPointData()->GetElement(indexVector[0])[1]);
49 p[1] =
static_cast<ValueType>(this->GetPointSet()->GetPointData()->GetElement(indexVector[0])[2]);
61 template <
class TPo
intSet,
class TDeformationField>
66 Superclass::PrintSelf(os, indent);