21 #ifndef otbComputeHistoFilter_h
22 #define otbComputeHistoFilter_h
24 #include "itkImageToImageFilter.h"
26 #include "itkImageRegionIterator.h"
42 template <
class TInputImage,
class TOutputImage>
52 typedef itk::ImageToImageFilter<InputImageType, OutputImageType>
Superclass;
57 typedef typename InputImageType::IndexType
IndexType;
58 typedef typename InputImageType::SizeType
SizeType;
68 itkSetMacro(NbBin,
unsigned int);
69 itkGetMacro(NbBin,
unsigned int);
88 itkBooleanMacro(NoDataFlag);
89 itkGetMacro(NoDataFlag,
bool);
90 itkSetMacro(NoDataFlag,
bool);
99 itkSetMacro(Threshold,
float);
100 itkGetMacro(Threshold,
float);
103 typename OutputImageType::Pointer GetHistoOutput();
105 virtual itk::ProcessObject::DataObjectPointer MakeOutput(itk::ProcessObject::DataObjectPointerArraySizeType idx)
override;
107 virtual itk::ProcessObject::DataObjectPointer MakeOutput(
const itk::ProcessObject::DataObjectIdentifierType&)
override;
115 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
117 void GenerateInputRequestedRegion()
override;
119 void GenerateOutputInformation()
override;
122 void GenerateData()
override;
125 void BeforeThreadedGenerateData()
override;
127 virtual void ThreadedGenerateData(
const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId)
override;
129 void AfterThreadedGenerateData()
override;
131 void GenerateOutputRequestedRegion(itk::DataObject* output)
override;
135 void operator=(
const Self&) =
delete;
137 void SetRequestedRegion(itk::ImageBase<2>* image);
139 void ApplyThreshold(
typename itk::ImageRegionIterator<OutputImageType> oit,
unsigned int total);
155 #ifndef OTB_MANUAL_INSTANTIATION