21 #ifndef otbBinaryImageDensityFunction_h
22 #define otbBinaryImageDensityFunction_h
24 #include "itkImageFunction.h"
25 #include "itkNumericTraits.h"
47 template <
class TInputImage,
class TCoordRep =
float>
49 :
public itk::ImageFunction<TInputImage, typename itk::NumericTraits<typename TInputImage::PixelType>::RealType, TCoordRep>
55 typedef itk::ImageFunction<TInputImage, typename itk::NumericTraits<typename TInputImage::PixelType>::RealType, TCoordRep>
Superclass;
73 itkStaticConstMacro(ImageDimension,
unsigned int, InputImageType::ImageDimension);
76 typedef typename itk::NumericTraits<typename InputImageType::PixelType>::RealType
RealType;
85 this->ConvertPointToNearestIndex(point, index);
86 return this->EvaluateAtIndex(index);
91 this->ConvertContinuousIndexToNearestIndex(cindex, index);
92 return this->EvaluateAtIndex(index);
99 itkGetConstReferenceMacro(NeighborhoodRadius,
RadiusType);
102 m_NeighborhoodRadius.Fill(rad);
112 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
123 #ifndef OTB_MANUAL_INSTANTIATION
Calculate the density pixel of in the neighborhood of a pixel.
BinaryImageDensityFunction(const Self &)=delete
itk::NumericTraits< typename InputImageType::PixelType >::RealType RealType
BinaryImageDensityFunction Self
itk::ImageFunction< TInputImage, typename itk::NumericTraits< typename TInputImage::PixelType >::RealType, TCoordRep > Superclass
Superclass::ContinuousIndexType ContinuousIndexType
void operator=(const Self &)=delete
Superclass::IndexType IndexType
RealType EvaluateAtContinuousIndex(const ContinuousIndexType &cindex) const override
void SetNeighborhoodRadius(unsigned int rad)
TInputImage InputImageType
itk::SmartPointer< Self > Pointer
Superclass::OutputType OutputType
itk::SmartPointer< const Self > ConstPointer
RadiusType m_NeighborhoodRadius
Superclass::PointType PointType
~BinaryImageDensityFunction() override
RealType Evaluate(const PointType &point) const override
InputImageType::SizeType RadiusType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.