21 #ifndef otbHorizontalSobelVectorImageFilter_h
22 #define otbHorizontalSobelVectorImageFilter_h
36 template <
class TInput,
class TOutput>
49 unsigned int length = input.GetPixel(0).Size();
50 TOutput output(length);
51 for (
unsigned int i = 0; i < length; ++i)
53 output[i] =
static_cast<typename TOutput::ValueType
>((input.GetPixel(0)[i] - input.GetPixel(2)[i]) + 2 * (input.GetPixel(3)[i] - input.GetPixel(5)[i]) +
54 (input.GetPixel(6)[i] - input.GetPixel(8)[i]));
67 template <
class TInputImage,
class TOutputImage>
70 TInputImage, TOutputImage, Functor::HorizontalSobelOperator<typename itk::ConstNeighborhoodIterator<TInputImage>, typename TOutputImage::PixelType>>
92 this->SetRadius(radius);
Performs the calculation of horizontal Sobel derivation.
HorizontalSobelOperator()
TOutput operator()(const TInput &input)
virtual ~HorizontalSobelOperator()
Implements the Horizontal Sobel Gradient to be processed on a vector image.
HorizontalSobelVectorImageFilter Self
UnaryFunctorNeighborhoodVectorImageFilter< TInputImage, TOutputImage, Functor::HorizontalSobelOperator< typename itk::ConstNeighborhoodIterator< TInputImage >, typename TOutputImage::PixelType > > Superclass
HorizontalSobelVectorImageFilter()
void operator=(const Self &)
HorizontalSobelVectorImageFilter(const Self &)
itk::SmartPointer< Self > Pointer
~HorizontalSobelVectorImageFilter() override
itk::SmartPointer< const Self > ConstPointer
Implements neighborhood-wise generic operation of one vector image.
NeighborhoodIteratorType::RadiusType RadiusType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.