Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition > Class Template Reference

#include <otbOverlapSaveConvolutionImageFilter.h>

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

Public Types

typedef itk::Array< InputRealTypeArrayType
 
typedef TBoundaryCondition BoundaryConditionType
 
typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef InputImageType::RegionType InputImageRegionType
 
typedef TInputImage InputImageType
 
typedef InputImageType::PixelType InputPixelType
 
typedef itk::NumericTraits
< InputPixelType >::RealType 
InputRealType
 
typedef InputImageType::SizeType InputSizeType
 
typedef OutputImageType::RegionType OutputImageRegionType
 
typedef TOutputImage OutputImageType
 
typedef OutputImageType::PixelType OutputPixelType
 
typedef itk::SmartPointer< SelfPointer
 
typedef
OverlapSaveConvolutionImageFilter 
Self
 
typedef
itk::ImageToImageFilter
< InputImageType,
OutputImageType
Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual void GenerateInputRequestedRegion () throw (itk::InvalidRequestedRegionError)
 
virtual const ArrayTypeGetFilter ()
 
virtual const char * GetNameOfClass () const
 
virtual bool GetNormalizeFilter ()
 
virtual const InputSizeTypeGetRadius ()
 
virtual void NormalizeFilterOff ()
 
virtual void NormalizeFilterOn ()
 
void SetFilter (ArrayType filter)
 
virtual void SetNormalizeFilter (bool _arg)
 
virtual void SetRadius (const InputSizeType rad)
 
 typedef (itk::Concept::HasNumericTraits< InputPixelType >) InputHasNumericTraitsCheck
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::ImageSource< TOutputImage >
static const
ImageRegionSplitterBase
GetGlobalDefaultSplitter (void)
 

Static Public Attributes

static const unsigned int InputImageDimension = TInputImage::ImageDimension
 
static const unsigned int OutputImageDimension = TOutputImage::ImageDimension
 

Protected Member Functions

 OverlapSaveConvolutionImageFilter ()
 
virtual ~OverlapSaveConvolutionImageFilter ()
 
void GenerateData ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const
 

Private Member Functions

 OverlapSaveConvolutionImageFilter (const Self &)
 
void operator= (const Self &)
 

Private Attributes

ArrayType m_Filter
 
bool m_NormalizeFilter
 
InputSizeType m_Radius
 

Detailed Description

template<class TInputImage, class TOutputImage, class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
class otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >

This filter implements the convolution operation between a kernel and an image using the overlap save algorithm (http://wikipedia.org/wiki/Overlap-save_method).

This method takes advantages of the FFTW implementation of Fast Fourrier Transform to exchange an intensive convolution product in the space domain for a simple term by term product in the Fourrier domain. This result in tremendous speed gain when using large kernel with exactly the same result as the classical convolution filter.

Note
This filter could be threaded but requires additional design due to limited thread-safety of the FFTW library.
For the moment only constant zero boundary conditions are used in this filter. This could produce very different results from the classical convolution filter with zero flux neumann boundary condition, especially with large kernels.
ITK must be set to use FFTW (double implementation) for this filter to work properly. If not, exception will be raised at filter creation. Install fftw and set the cmake variable ITK_USE_FFTWD to ON.
See Also
ConvolutionImageFilter

Definition at line 59 of file otbOverlapSaveConvolutionImageFilter.h.

Member Typedef Documentation

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
typedef itk::Array<InputRealType> otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::ArrayType

Definition at line 90 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
typedef TBoundaryCondition otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::BoundaryConditionType

Definition at line 91 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
typedef itk::SmartPointer<const Self> otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::ConstPointer

Definition at line 75 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
typedef InputImageType::RegionType otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::InputImageRegionType

Definition at line 87 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
typedef TInputImage otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::InputImageType

Convenient typedefs for simplifying declarations.

Definition at line 68 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
typedef InputImageType::PixelType otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::InputPixelType

Image typedef support.

Definition at line 81 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
typedef itk::NumericTraits<InputPixelType>::RealType otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::InputRealType

Definition at line 86 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
typedef InputImageType::SizeType otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::InputSizeType

Definition at line 89 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
typedef OutputImageType::RegionType otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::OutputImageRegionType

Definition at line 88 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
typedef TOutputImage otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::OutputImageType

Definition at line 69 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
typedef OutputImageType::PixelType otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::OutputPixelType

Definition at line 85 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
typedef itk::SmartPointer<Self> otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::Pointer

Definition at line 74 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
typedef OverlapSaveConvolutionImageFilter otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::Self

Standard class typedefs.

Definition at line 72 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
typedef itk::ImageToImageFilter<InputImageType, OutputImageType> otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::Superclass

Definition at line 73 of file otbOverlapSaveConvolutionImageFilter.h.

Constructor & Destructor Documentation

template<class TInputImage , class TOutputImage , class TBoundaryCondition >
otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::OverlapSaveConvolutionImageFilter ( )
protected

End concept checking Constructor

Definition at line 41 of file otbOverlapSaveConvolutionImageFilter.txx.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
virtual otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::~OverlapSaveConvolutionImageFilter ( )
inlineprotectedvirtual

destructor

Definition at line 153 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::OverlapSaveConvolutionImageFilter ( const Self )
private

Member Function Documentation

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
virtual::itk::LightObject::Pointer otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::CreateAnother ( void  ) const
template<class TInputImage , class TOutputImage , class TBoundaryCondition >
void otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::GenerateData ( void  )
protected
template<class TInputImage , class TOutputImage , class TBoundaryCondition >
void otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::GenerateInputRequestedRegion ( void  )
throw (itk::InvalidRequestedRegionError
)
virtual

Since this filter implements a neighborhood operation, it requests a largest input region than the output region.

Definition at line 52 of file otbOverlapSaveConvolutionImageFilter.txx.

References itk::DataObjectError::SetDataObject(), itk::DataObjectError::SetDescription(), and itk::DataObjectError::SetLocation().

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
virtual const ArrayType& otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::GetFilter ( )
virtual

Get the filter

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
virtual const char* otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::ImageSource< TOutputImage >.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
virtual bool otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::GetNormalizeFilter ( )
virtual
template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
virtual const InputSizeType& otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::GetRadius ( )
virtual

Get the radius of the neighborhood used to compute the mean

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
static Pointer otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::New ( )
static

Method for creation through the object factory.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
virtual void otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::NormalizeFilterOff ( )
virtual
template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
virtual void otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::NormalizeFilterOn ( )
virtual
template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
void otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::operator= ( const Self )
private
template<class TInputImage , class TOutput , class TBoundaryCondition >
void otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutput, TBoundaryCondition >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protected

Standard "PrintSelf" method

Definition at line 302 of file otbOverlapSaveConvolutionImageFilter.txx.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
void otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::SetFilter ( ArrayType  filter)
inline

Set the input filter

Definition at line 115 of file otbOverlapSaveConvolutionImageFilter.h.

References itk::Array< TValue >::Size().

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
virtual void otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::SetNormalizeFilter ( bool  _arg)
virtual

Set/Get methods for the normalization of the filter

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
virtual void otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::SetRadius ( const InputSizeType  rad)
inlinevirtual

Set the radius of the neighborhood used to compute the mean.

Definition at line 94 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::typedef ( itk::Concept::HasNumericTraits< InputPixelType )

Begin concept checking This class requires InputHasNumericTraitsCheck in the form of (itk::Concept::HasNumericTraits<InputPixelType>)

Member Data Documentation

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
const unsigned int otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::InputImageDimension = TInputImage::ImageDimension
static

Extract dimension from input and output image.

Definition at line 64 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
ArrayType otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::m_Filter
private

Filter array

Definition at line 170 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
bool otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::m_NormalizeFilter
private

Flag for filter normalization

Definition at line 173 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
InputSizeType otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::m_Radius
private

Radius of the filter

Definition at line 167 of file otbOverlapSaveConvolutionImageFilter.h.

template<class TInputImage , class TOutputImage , class TBoundaryCondition = itk::ZeroFluxNeumannBoundaryCondition<TInputImage>>
const unsigned int otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::OutputImageDimension = TOutputImage::ImageDimension
static

Definition at line 65 of file otbOverlapSaveConvolutionImageFilter.h.


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