OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | List of all members

#include <otbFunctorImageFilter.h>

+ Inheritance diagram for otb::FunctorImageFilter< TFunction, TNameMap >:
+ Collaboration diagram for otb::FunctorImageFilter< TFunction, TNameMap >:

Public Types

using ConstPointer = itk::SmartPointer< const Self >
 
using FunctorType = TFunction
 
using InputHasNeighborhood = typename SuperclassHelper::InputHasNeighborhood
 
template<vcl_size_t I>
using InputImageType = typename Superclass::template InputImageType< I >
 
using InputTypesTupleType = typename Superclass::InputTypesTupleType
 
using OutputImageRegionType = typename OutputImageType::RegionType
 
using OutputImageType = typename Superclass::OutputImageType
 
using Pointer = itk::SmartPointer< Self >
 
using Self = FunctorImageFilter
 
using Superclass = typename SuperclassHelper::FilterType
 
using SuperclassHelper = FunctorFilterSuperclassHelper< TFunction, TNameMap >
 

Public Member Functions

virtual const char * GetNameOfClass () const
 

Static Public Member Functions

template<typename F = TFunction>
static std::enable_if_t< std::is_default_constructible< F >::value, PointerNew ()
 
template<typename F = TFunction>
static std::enable_if_t<!std::is_default_constructible< F >::value, PointerNew ()
 
FunctorType m_Functor
 
itk::Size< 2 > m_Radius
 
FunctorTypeGetModifiableFunctor ()
 
const FunctorTypeGetFunctor () const
 
 FunctorImageFilter (const FunctorType &f, itk::Size< 2 > radius)
 
 FunctorImageFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 
 ~FunctorImageFilter ()=default
 
auto NewFunctorFilter (TFunction f, itk::Size< 2 > radius)
 
void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId) override
 
void GenerateInputRequestedRegion (void) override
 
void GenerateOutputInformation () override
 

Detailed Description

template<class TFunction, class TNameMap = void>
class otb::FunctorImageFilter< TFunction, TNameMap >

A generic functor filter templated by its functor.

Template Parameters
TFunctioncan be any operator() (const or non-const) that matches the following:
  • Accepts any number of arguments of T, (const) itk::VariableLengthVector<T> (&),const itk::ConstNeighborhoodIterator<Image<T>> &, const itk::ConstNeighborhoodIterator<VectorImage<T>> & with T a scalar type
  • returns T or itk::VariableLengthVector<T>, with T a scalar type or returns void and has first parameter as output (i.e. T& or itk::VariableLengthVector<T>&)

All image types will be deduced from the TFunction operator().

See also
VariadicInputsImageFilter
NewFunctorFilter

Definition at line 322 of file otbFunctorImageFilter.h.

Member Typedef Documentation

◆ ConstPointer

template<class TFunction , class TNameMap = void>
using otb::FunctorImageFilter< TFunction, TNameMap >::ConstPointer = itk::SmartPointer<const Self>

Definition at line 330 of file otbFunctorImageFilter.h.

◆ FunctorType

template<class TFunction , class TNameMap = void>
using otb::FunctorImageFilter< TFunction, TNameMap >::FunctorType = TFunction

Definition at line 328 of file otbFunctorImageFilter.h.

◆ InputHasNeighborhood

template<class TFunction , class TNameMap = void>
using otb::FunctorImageFilter< TFunction, TNameMap >::InputHasNeighborhood = typename SuperclassHelper::InputHasNeighborhood

Definition at line 340 of file otbFunctorImageFilter.h.

◆ InputImageType

template<class TFunction , class TNameMap = void>
template<vcl_size_t I>
using otb::FunctorImageFilter< TFunction, TNameMap >::InputImageType = typename Superclass::template InputImageType<I>

Definition at line 343 of file otbFunctorImageFilter.h.

◆ InputTypesTupleType

template<class TFunction , class TNameMap = void>
using otb::FunctorImageFilter< TFunction, TNameMap >::InputTypesTupleType = typename Superclass::InputTypesTupleType

Definition at line 341 of file otbFunctorImageFilter.h.

◆ OutputImageRegionType

template<class TFunction , class TNameMap = void>
using otb::FunctorImageFilter< TFunction, TNameMap >::OutputImageRegionType = typename OutputImageType::RegionType

Definition at line 336 of file otbFunctorImageFilter.h.

◆ OutputImageType

template<class TFunction , class TNameMap = void>
using otb::FunctorImageFilter< TFunction, TNameMap >::OutputImageType = typename Superclass::OutputImageType

Definition at line 335 of file otbFunctorImageFilter.h.

◆ Pointer

template<class TFunction , class TNameMap = void>
using otb::FunctorImageFilter< TFunction, TNameMap >::Pointer = itk::SmartPointer<Self>

Definition at line 329 of file otbFunctorImageFilter.h.

◆ Self

template<class TFunction , class TNameMap = void>
using otb::FunctorImageFilter< TFunction, TNameMap >::Self = FunctorImageFilter

Definition at line 327 of file otbFunctorImageFilter.h.

◆ Superclass

template<class TFunction , class TNameMap = void>
using otb::FunctorImageFilter< TFunction, TNameMap >::Superclass = typename SuperclassHelper::FilterType

Definition at line 334 of file otbFunctorImageFilter.h.

◆ SuperclassHelper

template<class TFunction , class TNameMap = void>
using otb::FunctorImageFilter< TFunction, TNameMap >::SuperclassHelper = FunctorFilterSuperclassHelper<TFunction, TNameMap>

Definition at line 333 of file otbFunctorImageFilter.h.

Constructor & Destructor Documentation

◆ FunctorImageFilter() [1/2]

template<class TFunction , class TNameMap = void>
otb::FunctorImageFilter< TFunction, TNameMap >::FunctorImageFilter ( const FunctorType f,
itk::Size< 2 >  radius 
)
inlineprotected

Constructor of functor filter, will copy the functor.

Definition at line 401 of file otbFunctorImageFilter.h.

◆ FunctorImageFilter() [2/2]

template<class TFunction , class TNameMap = void>
otb::FunctorImageFilter< TFunction, TNameMap >::FunctorImageFilter ( const Self )
protecteddelete

Get the functor object.

 \return A non-const reference to the Functor in use. Note that
 this call will call the Modified() function of the filter, which
 will trigger a full output computation upon Update(). For
 inspection only, prefer using GetFunctor()

◆ ~FunctorImageFilter()

template<class TFunction , class TNameMap = void>
otb::FunctorImageFilter< TFunction, TNameMap >::~FunctorImageFilter ( )
protecteddefault

Get the functor object.

 \return A non-const reference to the Functor in use. Note that
 this call will call the Modified() function of the filter, which
 will trigger a full output computation upon Update(). For
 inspection only, prefer using GetFunctor()

Member Function Documentation

◆ GenerateInputRequestedRegion()

template<class TFunction , class TNameMap >
void otb::FunctorImageFilter< TFunction, TNameMap >::GenerateInputRequestedRegion ( void  )
overrideprivate

Pad the input requested region by radius

Definition at line 289 of file otbFunctorImageFilter.hxx.

◆ GenerateOutputInformation()

template<class TFunction , class TNameMap >
void otb::FunctorImageFilter< TFunction, TNameMap >::GenerateOutputInformation
overrideprivate

Will use the OutputSize() method of the functor if output is VectorImage

Definition at line 302 of file otbFunctorImageFilter.hxx.

◆ GetFunctor()

template<class TFunction , class TNameMap = void>
const FunctorType& otb::FunctorImageFilter< TFunction, TNameMap >::GetFunctor ( ) const
inline

Get the functor object.

Returns
A const reference to the Functor in use. For a modifiable version of the functor, see GetModifiableFunctor().

Definition at line 394 of file otbFunctorImageFilter.h.

◆ GetModifiableFunctor()

template<class TFunction , class TNameMap = void>
FunctorType& otb::FunctorImageFilter< TFunction, TNameMap >::GetModifiableFunctor ( )
inline

Get the functor object.

 \return A non-const reference to the Functor in use. Note that
 this call will call the Modified() function of the filter, which
 will trigger a full output computation upon Update(). For
 inspection only, prefer using GetFunctor()

Definition at line 382 of file otbFunctorImageFilter.h.

◆ GetNameOfClass()

template<class TFunction , class TNameMap = void>
virtual const char* otb::FunctorImageFilter< TFunction, TNameMap >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

◆ New() [1/2]

template<class TFunction , class TNameMap = void>
template<typename F = TFunction>
static std::enable_if_t<std::is_default_constructible<F>::value, Pointer> otb::FunctorImageFilter< TFunction, TNameMap >::New ( )
inlinestatic

New() macro defined only if TFunction is default constructible

Definition at line 351 of file otbFunctorImageFilter.h.

◆ New() [2/2]

template<class TFunction , class TNameMap = void>
template<typename F = TFunction>
static std::enable_if_t<!std::is_default_constructible<F>::value, Pointer> otb::FunctorImageFilter< TFunction, TNameMap >::New ( )
inlinestatic

New() macro defined only if TFunction is NOT default constructible This will yield an error message since New() can not be implemented in this case.

Definition at line 365 of file otbFunctorImageFilter.h.

◆ operator=()

template<class TFunction , class TNameMap = void>
void otb::FunctorImageFilter< TFunction, TNameMap >::operator= ( const Self )
protecteddelete

Get the functor object.

 \return A non-const reference to the Functor in use. Note that
 this call will call the Modified() function of the filter, which
 will trigger a full output computation upon Update(). For
 inspection only, prefer using GetFunctor()

◆ ThreadedGenerateData()

template<class TFunction , class TNameMap >
void otb::FunctorImageFilter< TFunction, TNameMap >::ThreadedGenerateData ( const OutputImageRegionType outputRegionForThread,
itk::ThreadIdType  threadId 
)
overrideprivate

Overload of ThreadedGenerateData

ThreadedGenerateData Performs the neighborhood-wise operation

Definition at line 321 of file otbFunctorImageFilter.hxx.

Friends And Related Function Documentation

◆ NewFunctorFilter

template<class TFunction , class TNameMap = void>
auto NewFunctorFilter ( TFunction  f,
itk::Size< 2 >  radius 
)
friend

Actual creation of the filter is handled by this free function.

Member Data Documentation

◆ m_Functor

template<class TFunction , class TNameMap = void>
FunctorType otb::FunctorImageFilter< TFunction, TNameMap >::m_Functor
private

Get the functor object.

 \return A non-const reference to the Functor in use. Note that
 this call will call the Modified() function of the filter, which
 will trigger a full output computation upon Update(). For
 inspection only, prefer using GetFunctor()

Definition at line 425 of file otbFunctorImageFilter.h.

◆ m_Radius

template<class TFunction , class TNameMap = void>
itk::Size<2> otb::FunctorImageFilter< TFunction, TNameMap >::m_Radius
private

Get the functor object.

 \return A non-const reference to the Functor in use. Note that
 this call will call the Modified() function of the filter, which
 will trigger a full output computation upon Update(). For
 inspection only, prefer using GetFunctor()

Definition at line 428 of file otbFunctorImageFilter.h.


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