21 #ifndef otbTransformPointSetFilter_hxx
22 #define otbTransformPointSetFilter_hxx
33 template <
class TInputPo
intSet,
class TOutputPo
intSet,
class TTransform>
36 m_Transform = TransformType::New();
42 template <
class TInputPo
intSet,
class TOutputPo
intSet,
class TTransform>
45 Superclass::PrintSelf(os, indent);
48 os << indent <<
"Transform: " << m_Transform << std::endl;
56 template <
class TInputPo
intSet,
class TOutputPo
intSet,
class TTransform>
60 typedef typename TInputPointSet::PointsContainer InputPointsContainer;
61 typedef typename TOutputPointSet::PointsContainer OutputPointsContainer;
63 typedef typename TInputPointSet::PointsContainerPointer InputPointsContainerPointer;
64 typedef typename TOutputPointSet::PointsContainerPointer OutputPointsContainerPointer;
71 itkExceptionMacro(<<
"Missing Input PointSet");
76 itkExceptionMacro(<<
"Missing Output PointSet");
79 outputPointSet->SetBufferedRegion(outputPointSet->GetRequestedRegion());
81 InputPointsContainerPointer inPoints = inputPointSet->GetPoints();
82 OutputPointsContainerPointer outPoints = outputPointSet->GetPoints();
84 outPoints->Reserve(inputPointSet->GetNumberOfPoints());
88 typename InputPointsContainer::ConstIterator inputPoint = inPoints->Begin();
89 typename OutputPointsContainer::Iterator outputPoint = outPoints->Begin();
91 while (inputPoint != inPoints->End())
93 outputPoint.Value() = m_Transform->TransformPoint(inputPoint.Value());
101 outputPointSet->SetPointData(inputPointSet->GetPointData());