OTB  9.0.0
Orfeo Toolbox
Public Types | List of all members
otb::NLMeansFilter< TInputImage, TOutputImage > Class Template Reference

#include <otbFastNLMeansImageFilter.h>

+ Inheritance diagram for otb::NLMeansFilter< TInputImage, TOutputImage >:
+ Collaboration diagram for otb::NLMeansFilter< TInputImage, TOutputImage >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef InImageType::ConstPointer InImageConstPointerType
 
typedef InImageType::Pointer InImagePointerType
 
typedef TInputImage InImageType
 
typedef InImageType::IndexType InIndexType
 
typedef InImageType::OffsetType InOffsetType
 
typedef InImageType::RegionType InRegionType
 
typedef InImageType::SizeType InSizeType
 
typedef OutImageType::Pointer OutImagePointerType
 
typedef TOutputImage OutImageType
 
typedef OutImageType::IndexType OutIndexType
 
typedef OutImageType::PixelType OutPixelType
 
typedef OutImageType::RegionType OutRegionType
 
typedef OutImageType::SizeType OutSizeType
 
typedef itk::SmartPointer< SelfPointer
 
typedef NLMeansFilter Self
 
typedef itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
 
 const
 
InSizeType m_HalfSearchSize {0,0}
 
InSizeType m_HalfPatchSize {0,0}
 
float m_Var
 
float m_CutoffDistance
 
float m_NormalizeDistance
 
static const int m_ROW = 1
 
static const int m_COL = 0
 
static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
void SetSigma (const float sigma)
 
void SetHalfWindowSize (const unsigned int hws)
 
void SetHalfSearchSize (const unsigned int hss)
 
void SetCutOffDistance (const float thresh)
 
 NLMeansFilter ()
 
 ~NLMeansFilter () override=default
 
void ThreadedGenerateData (const OutRegionType &outputRegionForThread, itk::ThreadIdType) override
 
void GenerateInputRequestedRegion () override
 
std::tuple< InRegionType, int, int, int, int, bool > OutputRegionToInputRegion (const OutRegionType &outputRegion) const
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 NLMeansFilter (const Self &)=delete
 
NLMeansFilteroperator= (const Self &)=delete
 

Detailed Description

template<class TInputImage, class TOutputImage>
class otb::NLMeansFilter< TInputImage, TOutputImage >

This class implements a fast approximated version of NL Means denoising algorithm. This implementation is based on code in scikit module skimage. This fast version of the NL Means algorithm has been described in the following papers :

J. Darbon, A. Cunha, T.F. Chan, S. Osher, and G.J. Jensen, Fast nonlocal filtering applied to electron cryomicroscopy, in 5th IEEE International Symposium on Biomedical Imaging: From Nano to Macro, 2008, pp. 1331-1334.

Jacques Froment. Parameter-Free Fast Pixelwise Non-Local Means Denoising. Image Processing On Line, 2014, vol. 4, p. 300-326.

Definition at line 48 of file otbFastNLMeansImageFilter.h.

Member Typedef Documentation

◆ ConstPointer

template<class TInputImage , class TOutputImage >
typedef itk::SmartPointer<const Self> otb::NLMeansFilter< TInputImage, TOutputImage >::ConstPointer

Definition at line 55 of file otbFastNLMeansImageFilter.h.

◆ InImageConstPointerType

template<class TInputImage , class TOutputImage >
typedef InImageType::ConstPointer otb::NLMeansFilter< TInputImage, TOutputImage >::InImageConstPointerType

Definition at line 63 of file otbFastNLMeansImageFilter.h.

◆ InImagePointerType

template<class TInputImage , class TOutputImage >
typedef InImageType::Pointer otb::NLMeansFilter< TInputImage, TOutputImage >::InImagePointerType

Typedef to describe the image pointer types.

Definition at line 62 of file otbFastNLMeansImageFilter.h.

◆ InImageType

template<class TInputImage , class TOutputImage >
typedef TInputImage otb::NLMeansFilter< TInputImage, TOutputImage >::InImageType

Typedef to image types

Definition at line 58 of file otbFastNLMeansImageFilter.h.

◆ InIndexType

template<class TInputImage , class TOutputImage >
typedef InImageType::IndexType otb::NLMeansFilter< TInputImage, TOutputImage >::InIndexType

Definition at line 65 of file otbFastNLMeansImageFilter.h.

◆ InOffsetType

template<class TInputImage , class TOutputImage >
typedef InImageType::OffsetType otb::NLMeansFilter< TInputImage, TOutputImage >::InOffsetType

Definition at line 67 of file otbFastNLMeansImageFilter.h.

◆ InRegionType

template<class TInputImage , class TOutputImage >
typedef InImageType::RegionType otb::NLMeansFilter< TInputImage, TOutputImage >::InRegionType

Definition at line 64 of file otbFastNLMeansImageFilter.h.

◆ InSizeType

template<class TInputImage , class TOutputImage >
typedef InImageType::SizeType otb::NLMeansFilter< TInputImage, TOutputImage >::InSizeType

Definition at line 66 of file otbFastNLMeansImageFilter.h.

◆ OutImagePointerType

template<class TInputImage , class TOutputImage >
typedef OutImageType::Pointer otb::NLMeansFilter< TInputImage, TOutputImage >::OutImagePointerType

Definition at line 68 of file otbFastNLMeansImageFilter.h.

◆ OutImageType

template<class TInputImage , class TOutputImage >
typedef TOutputImage otb::NLMeansFilter< TInputImage, TOutputImage >::OutImageType

Definition at line 59 of file otbFastNLMeansImageFilter.h.

◆ OutIndexType

template<class TInputImage , class TOutputImage >
typedef OutImageType::IndexType otb::NLMeansFilter< TInputImage, TOutputImage >::OutIndexType

Definition at line 72 of file otbFastNLMeansImageFilter.h.

◆ OutPixelType

template<class TInputImage , class TOutputImage >
typedef OutImageType::PixelType otb::NLMeansFilter< TInputImage, TOutputImage >::OutPixelType

Definition at line 70 of file otbFastNLMeansImageFilter.h.

◆ OutRegionType

template<class TInputImage , class TOutputImage >
typedef OutImageType::RegionType otb::NLMeansFilter< TInputImage, TOutputImage >::OutRegionType

Definition at line 69 of file otbFastNLMeansImageFilter.h.

◆ OutSizeType

template<class TInputImage , class TOutputImage >
typedef OutImageType::SizeType otb::NLMeansFilter< TInputImage, TOutputImage >::OutSizeType

Definition at line 71 of file otbFastNLMeansImageFilter.h.

◆ Pointer

template<class TInputImage , class TOutputImage >
typedef itk::SmartPointer<Self> otb::NLMeansFilter< TInputImage, TOutputImage >::Pointer

Definition at line 54 of file otbFastNLMeansImageFilter.h.

◆ Self

template<class TInputImage , class TOutputImage >
typedef NLMeansFilter otb::NLMeansFilter< TInputImage, TOutputImage >::Self

Standard class typedefs

Definition at line 52 of file otbFastNLMeansImageFilter.h.

◆ Superclass

template<class TInputImage , class TOutputImage >
typedef itk::ImageToImageFilter<TInputImage, TOutputImage> otb::NLMeansFilter< TInputImage, TOutputImage >::Superclass

Definition at line 53 of file otbFastNLMeansImageFilter.h.

Constructor & Destructor Documentation

◆ NLMeansFilter() [1/2]

template<class TInputImage , class TOutputImage >
otb::NLMeansFilter< TInputImage, TOutputImage >::NLMeansFilter
protected

Constructor

Definition at line 34 of file otbFastNLMeansImageFilter.hxx.

◆ ~NLMeansFilter()

template<class TInputImage , class TOutputImage >
otb::NLMeansFilter< TInputImage, TOutputImage >::~NLMeansFilter ( )
overrideprotecteddefault

Destructor

◆ NLMeansFilter() [2/2]

template<class TInputImage , class TOutputImage >
otb::NLMeansFilter< TInputImage, TOutputImage >::NLMeansFilter ( const Self )
privatedelete

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Member Function Documentation

◆ CreateAnother()

template<class TInputImage , class TOutputImage >
virtual::itk::LightObject::Pointer otb::NLMeansFilter< TInputImage, TOutputImage >::CreateAnother ( void  ) const

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

◆ GenerateInputRequestedRegion()

template<class TInputImage , class TOutputImage >
void otb::NLMeansFilter< TInputImage, TOutputImage >::GenerateInputRequestedRegion
overrideprotected

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Definition at line 108 of file otbFastNLMeansImageFilter.hxx.

◆ GetNameOfClass()

template<class TInputImage , class TOutputImage >
virtual const char* otb::NLMeansFilter< TInputImage, TOutputImage >::GetNameOfClass ( ) const
virtual

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

◆ New()

template<class TInputImage , class TOutputImage >
static Pointer otb::NLMeansFilter< TInputImage, TOutputImage >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<class TInputImage , class TOutputImage >
NLMeansFilter& otb::NLMeansFilter< TInputImage, TOutputImage >::operator= ( const Self )
privatedelete

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

◆ OutputRegionToInputRegion()

template<class TInputImage , class TOutputImage >
std::tuple< typename NLMeansFilter< TInputImage, TOutputImage >::InRegionType, int, int, int, int, bool > otb::NLMeansFilter< TInputImage, TOutputImage >::OutputRegionToInputRegion ( const OutRegionType outputRegion) const
protected

Compute the requested input region, given an output region. If the input requested region is outside the largest input region, a mirror padding is necessary. The returned tuple is composed of the following parameters :

  • input requested region (always lie inside the largest input region)
  • top rows, left cols, bottom rows, right cols : numbers of rows/cols to add with a mirror padding
  • boolean : if true, a mirror padding (in at least one direction) has to be computed

Definition at line 50 of file otbFastNLMeansImageFilter.hxx.

◆ PrintSelf()

template<class TInputImage , class TOutputImage >
void otb::NLMeansFilter< TInputImage, TOutputImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

PrintSelf method

Definition at line 327 of file otbFastNLMeansImageFilter.hxx.

◆ SetCutOffDistance()

template<class TInputImage , class TOutputImage >
void otb::NLMeansFilter< TInputImage, TOutputImage >::SetCutOffDistance ( const float  thresh)
inline

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Definition at line 95 of file otbFastNLMeansImageFilter.h.

◆ SetHalfSearchSize()

template<class TInputImage , class TOutputImage >
void otb::NLMeansFilter< TInputImage, TOutputImage >::SetHalfSearchSize ( const unsigned int  hss)
inline

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Definition at line 91 of file otbFastNLMeansImageFilter.h.

◆ SetHalfWindowSize()

template<class TInputImage , class TOutputImage >
void otb::NLMeansFilter< TInputImage, TOutputImage >::SetHalfWindowSize ( const unsigned int  hws)
inline

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Definition at line 84 of file otbFastNLMeansImageFilter.h.

◆ SetSigma()

template<class TInputImage , class TOutputImage >
void otb::NLMeansFilter< TInputImage, TOutputImage >::SetSigma ( const float  sigma)
inline

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Definition at line 79 of file otbFastNLMeansImageFilter.h.

◆ ThreadedGenerateData()

template<class TInputImage , class TOutputImage >
void otb::NLMeansFilter< TInputImage, TOutputImage >::ThreadedGenerateData ( const OutRegionType outputRegionForThread,
itk::ThreadIdType   
)
overrideprotected

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Definition at line 124 of file otbFastNLMeansImageFilter.hxx.

Member Data Documentation

◆ const

template<class TInputImage , class TOutputImage >
otb::NLMeansFilter< TInputImage, TOutputImage >::const
private

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Definition at line 143 of file otbFastNLMeansImageFilter.h.

◆ m_COL

template<class TInputImage , class TOutputImage >
const int otb::NLMeansFilter< TInputImage, TOutputImage >::m_COL = 0
staticprivate

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Definition at line 167 of file otbFastNLMeansImageFilter.h.

◆ m_CutoffDistance

template<class TInputImage , class TOutputImage >
float otb::NLMeansFilter< TInputImage, TOutputImage >::m_CutoffDistance
private

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Definition at line 163 of file otbFastNLMeansImageFilter.h.

◆ m_HalfPatchSize

template<class TInputImage , class TOutputImage >
InSizeType otb::NLMeansFilter< TInputImage, TOutputImage >::m_HalfPatchSize {0,0}
private

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Definition at line 161 of file otbFastNLMeansImageFilter.h.

◆ m_HalfSearchSize

template<class TInputImage , class TOutputImage >
InSizeType otb::NLMeansFilter< TInputImage, TOutputImage >::m_HalfSearchSize {0,0}
private

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Definition at line 160 of file otbFastNLMeansImageFilter.h.

◆ m_NormalizeDistance

template<class TInputImage , class TOutputImage >
float otb::NLMeansFilter< TInputImage, TOutputImage >::m_NormalizeDistance
private

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Definition at line 164 of file otbFastNLMeansImageFilter.h.

◆ m_ROW

template<class TInputImage , class TOutputImage >
const int otb::NLMeansFilter< TInputImage, TOutputImage >::m_ROW = 1
staticprivate

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Definition at line 166 of file otbFastNLMeansImageFilter.h.

◆ m_Var

template<class TInputImage , class TOutputImage >
float otb::NLMeansFilter< TInputImage, TOutputImage >::m_Var
private

For a given shift in rows and cols, this function computes the squared difference between the image and its shifted version. Results are added to form an integral image. < input data stored in a vector < output parameter. Contains the integral image of squared difference < Shift (dcol, drow) to apply to compute the difference < Integral image size < input data image size

This function computes the squared euclidean distance between a patch and its shifted version. Computation relies on the integral image obtained before. < Upper left corner row coordinate of patch < Upper left corner col coordinate of patch < Integral image of squared difference < Integral image number of columns

Definition at line 162 of file otbFastNLMeansImageFilter.h.


The documentation for this class was generated from the following files: