21 #ifndef otbClampImageFilter_h 22 #define otbClampImageFilter_h 25 #include "itkUnaryFunctorImageFilter.h" 47 template <
class TInputImage,
class TOutputImage = TInputImage>
49 :
public itk::UnaryFunctorImageFilter<TInputImage, TOutputImage,
50 Functor::ConvertTypeFunctor<typename TInputImage::PixelType, typename TOutputImage::PixelType>>
55 typedef itk::UnaryFunctorImageFilter<TInputImage, TOutputImage,
82 void ClampAbove(
const OutputPixelValueType& thresh);
85 void ClampBelow(
const OutputPixelValueType& thresh);
88 void ClampOutside(
const OutputPixelValueType& lower,
const OutputPixelValueType& upper);
91 void SetLower(OutputPixelValueType val);
93 itkGetConstMacro(Lower, OutputPixelValueType);
96 void SetUpper(OutputPixelValueType val);
98 itkGetConstMacro(Upper, OutputPixelValueType);
104 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
108 Superclass::GenerateOutputInformation();
109 unsigned int sizeIn = this->GetInput()->GetNumberOfComponentsPerPixel();
110 this->GetFunctor().SetInputComponents(sizeIn);
111 this->GetOutput()->SetNumberOfComponentsPerPixel(this->GetFunctor().GetOutputSize());
116 void operator=(
const Self&) =
delete;
125 #ifndef OTB_MANUAL_INSTANTIATION TInputImage InputImageType
OutputImageType::PixelType OutputImagePixelType
InputImageType::RegionType InputImageRegionType
~ClampImageFilter() override
Clamp image values to be below, over, or between threhold values.
TOutputImage OutputImageType
OutputPixelValueType m_Lower
itk::NumericTraits< OutputInternalPixelType >::ValueType OutputPixelValueType
OutputImageType::InternalPixelType OutputInternalPixelType
itk::SmartPointer< const Self > ConstPointer
itk::UnaryFunctorImageFilter< TInputImage, TOutputImage, Functor::ConvertTypeFunctor< typename TInputImage::PixelType, typename TOutputImage::PixelType > > Superclass
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
itk::SmartPointer< Self > Pointer
void GenerateOutputInformation(void) override
OutputImageType::RegionType OutputImageRegionType
OutputPixelValueType m_Upper
InputImageType::PixelType InputImagePixelType