21 #ifndef otbApplyGainFilter_h
22 #define otbApplyGainFilter_h
24 #include "itkImageToImageFilter.h"
41 template <
class TInputImage,
class TLut,
class TOutputImage>
42 class ITK_EXPORT
ApplyGainFilter :
public itk::ImageToImageFilter<TInputImage, TOutputImage>
51 typedef itk::ImageToImageFilter<InputImageType, OutputImageType>
Superclass;
72 itkBooleanMacro(NoDataFlag);
73 itkGetMacro(NoDataFlag,
bool);
74 itkSetMacro(NoDataFlag,
bool);
78 itkBooleanMacro(ThumbSizeFromSpacing);
79 itkGetMacro(ThumbSizeFromSpacing,
bool);
80 itkSetMacro(ThumbSizeFromSpacing,
bool);
84 itkSetMacro(ThumbSize,
typename InputImageType::SizeType);
85 itkGetMacro(ThumbSize,
typename InputImageType::SizeType);
99 void SetInputLut(
const LutType* lut);
109 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
112 const InputImageType* GetInputImage()
const;
115 const LutType* GetInputLut()
const;
117 void GenerateInputRequestedRegion()
override;
119 void BeforeThreadedGenerateData()
override;
121 void ThreadedGenerateData(
const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId)
override;
126 void operator=(
const Self&) =
delete;
129 double InterpolateGain(
typename LutType::ConstPointer gridLut,
unsigned int pixelValue,
typename InputImageType::IndexType index);
137 typename LutType::SizeType m_LutSize{0,0};
138 typename InputImageType::SizeType m_ThumbSize{0,0};
143 #ifndef OTB_MANUAL_INSTANTIATION