21 #ifndef otbFastNLMeansImageFilter_h
22 #define otbFastNLMeansImageFilter_h
24 #include "itkImageToImageFilter.h"
47 template <
class TInputImage,
class TOutputImage>
48 class ITK_EXPORT
NLMeansFilter :
public itk::ImageToImageFilter<TInputImage, TOutputImage>
53 typedef itk::ImageToImageFilter<TInputImage, TOutputImage>
Superclass;
81 m_Var = 2.0 * sigma * sigma;
86 m_HalfPatchSize.Fill(hws);
88 m_NormalizeDistance = (2 * hws + 1) * (2 * hws + 1) * m_CutoffDistance * m_CutoffDistance;
93 m_HalfSearchSize.Fill(hss);
97 m_CutoffDistance = thresh;
99 m_NormalizeDistance = (2 * m_HalfPatchSize[0] + 1) * (2 * m_HalfPatchSize[1] + 1) * m_CutoffDistance * m_CutoffDistance;
109 void ThreadedGenerateData(
const OutRegionType& outputRegionForThread, itk::ThreadIdType itkNotUsed(threadId))
override;
111 void GenerateInputRequestedRegion()
override;
120 std::tuple<InRegionType, int, int, int, int, bool> OutputRegionToInputRegion(
const OutRegionType& outputRegion)
const;
123 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
166 static const int m_ROW = 1;
167 static const int m_COL = 0;
171 #ifndef OTB_MANUAL_INSTANTIATION