OTB  6.7.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
otb::FunctorImageFilter< TFunction, TNameMap > Class Template Reference

#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

const FunctorTypeGetFunctor () const
 
virtual const char * GetNameOfClass () const
 
FunctorTypeGetModifiableFunctor ()
 

Static Public Member Functions

template<typename F = TFunction>
static std::enable_if_t
< std::is_default_constructible
< F >::value, Pointer
New ()
 
template<typename F = TFunction>
static std::enable_if_t
<!std::is_default_constructible
< F >::value, Pointer
New ()
 

Protected Member Functions

 FunctorImageFilter (const FunctorType &f, itk::Size< 2 > radius)
 
 FunctorImageFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 
 ~FunctorImageFilter ()=default
 

Private Member Functions

void GenerateInputRequestedRegion (void) override
 
void GenerateOutputInformation () override
 
void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId) override
 

Private Attributes

FunctorType m_Functor
 
itk::Size< 2 > m_Radius
 

Friends

auto NewFunctorFilter (TFunction f, itk::Size< 2 > radius)
 

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 285 of file otbFunctorImageFilter.h.

Member Typedef Documentation

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

Definition at line 294 of file otbFunctorImageFilter.h.

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

Definition at line 292 of file otbFunctorImageFilter.h.

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

Definition at line 304 of file otbFunctorImageFilter.h.

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 306 of file otbFunctorImageFilter.h.

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

Definition at line 305 of file otbFunctorImageFilter.h.

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

Definition at line 300 of file otbFunctorImageFilter.h.

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

Definition at line 299 of file otbFunctorImageFilter.h.

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

Definition at line 293 of file otbFunctorImageFilter.h.

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

Definition at line 291 of file otbFunctorImageFilter.h.

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

Definition at line 298 of file otbFunctorImageFilter.h.

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

Definition at line 297 of file otbFunctorImageFilter.h.

Constructor & Destructor Documentation

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 361 of file otbFunctorImageFilter.h.

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

Member Function Documentation

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

Pad the input requested region by radius

Definition at line 247 of file otbFunctorImageFilter.hxx.

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

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

Definition at line 261 of file otbFunctorImageFilter.hxx.

References otb::functor_filter_details::GetNumberOfComponentsPerInput().

template<class TFunction, class TNameMap = void>
const FunctorType& otb::FunctorImageFilter< TFunction, TNameMap >::GetFunctor ( void  ) 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 354 of file otbFunctorImageFilter.h.

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 342 of file otbFunctorImageFilter.h.

template<class TFunction, class TNameMap = void>
virtual const char* otb::FunctorImageFilter< TFunction, TNameMap >::GetNameOfClass ( ) const
virtual
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 ( void  )
inlinestatic

New() macro defined only if TFunction is default constructible

Definition at line 313 of file otbFunctorImageFilter.h.

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 ( void  )
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 326 of file otbFunctorImageFilter.h.

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

Friends And Related Function Documentation

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

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

Definition at line 385 of file otbFunctorImageFilter.h.

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

Definition at line 388 of file otbFunctorImageFilter.h.


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