21 #ifndef otbSarParametricMapFunction_h
22 #define otbSarParametricMapFunction_h
24 #include "itkImageFunction.h"
25 #include "itkPointSet.h"
26 #include "itkVariableSizeMatrix.h"
42 template <
class TInputImage,
class TCoordRep =
float>
44 :
public itk::ImageFunction<TInputImage, typename itk::NumericTraits<typename TInputImage::PixelType>::ScalarRealType, TCoordRep>
49 typedef itk::ImageFunction<TInputImage, typename itk::NumericTraits<typename TInputImage::PixelType>::ScalarRealType, TCoordRep>
Superclass;
67 itkStaticConstMacro(ImageDimension,
unsigned int, InputImageType::ImageDimension);
78 typedef typename itk::NumericTraits<InputPixelType>::ScalarRealType
RealType;
87 point[0] =
static_cast<typename PointType::ValueType
>(index[0]);
88 point[1] =
static_cast<typename PointType::ValueType
>(index[1]);
89 return this->Evaluate(point);
96 this->ConvertContinuousIndexToNearestIndex(cindex, index);
97 return this->EvaluateAtIndex(index);
105 m_IsInitialize =
false;
118 itkGetConstReferenceMacro(IsInitialize,
bool);
121 void SetPolynomalSize(
const IndexType PolynomalSize);
126 void EvaluateParametricCoefficient();
129 void SetConstantValue(
const RealType& value);
136 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
153 #ifndef OTB_MANUAL_INSTANTIATION
Evaluates a parametric bidimensionnal polynomial model from a PointSet.
PointSetType::Pointer PointSetPointer
PointSetType::PointType PointType
RealType EvaluateAtIndex(const IndexType &index) const override
itkGetObjectMacro(PointSet, PointSetType)
itk::SmartPointer< const Self > ConstPointer
itk::PointSet< OutputType, ImageDimension > PointSetType
double m_ProductHeight
the width of the complete product (read from metadata)
bool m_IsInitialize
the width of the complete product (read from metadata)
std::array< int, 2 > ArrayIndexType
PointSetType::ConstPointer PointSetConstPointer
RealType EvaluateAtContinuousIndex(const ContinuousIndexType &cindex) const override
the width of the complete product (read from metadata)
void SetPointSet(PointSetPointer val)
the width of the complete product (read from metadata)
itk::SmartPointer< Self > Pointer
Superclass::IndexType IndexType
Superclass::ContinuousIndexType ContinuousIndexType
itk::ImageFunction< TInputImage, typename itk::NumericTraits< typename TInputImage::PixelType >::ScalarRealType, TCoordRep > Superclass
PointSetType::PixelType PixelType
itk::NumericTraits< InputPixelType >::ScalarRealType RealType
TInputImage InputImageType
double m_ProductWidth
the width of the complete product (read from metadata)
itk::VariableSizeMatrix< double > MatrixType
InputImageType::PixelType InputPixelType
void operator=(const Self &)=delete
the width of the complete product (read from metadata)
MatrixType m_Coeff
the width of the complete product (read from metadata)
SarParametricMapFunction Self
~SarParametricMapFunction() override
the width of the complete product (read from metadata)
PointSetPointer m_PointSet
the width of the complete product (read from metadata)
SarParametricMapFunction(const Self &)=delete
the width of the complete product (read from metadata)
Superclass::OutputType OutputType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.