21 #ifndef otbComputeGainLutFilter_h
22 #define otbComputeGainLutFilter_h
24 #include "itkImageToImageFilter.h"
42 template <
class TInputImage,
class TOutputImage>
52 typedef itk::ImageToImageFilter<InputImageType, OutputImageType>
Superclass;
56 typedef typename InputImageType::PixelType
HistoType;
57 typedef typename OutputImageType::PixelType
LutType;
68 itkSetMacro(NbPixel,
unsigned long);
69 itkGetMacro(NbPixel,
unsigned long);
73 itkSetMacro(Min,
double);
74 itkGetMacro(Min,
double);
78 itkSetMacro(Max,
double);
79 itkGetMacro(Max,
double);
87 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
89 void BeforeThreadedGenerateData()
override;
91 void ThreadedGenerateData(
const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId)
override;
95 void operator=(
const Self&) =
delete;
98 OutputPixelType PostProcess(
unsigned int countMapValue,
unsigned int countValue);
102 void Equalized(
const HistoType& inputHisto, HistoType& targetHisto, LutType& lut);
105 void CreateTarget(
const HistoType& inputHisto, HistoType& targetHisto);
109 bool IsValid(
const HistoType& inputHisto);
121 #ifndef OTB_MANUAL_INSTANTIATION