OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
otb::VariadicInputsImageFilter< TOuptut, TInputs > Class Template Reference

#include <otbVariadicInputsImageFilter.h>

+ Inheritance diagram for otb::VariadicInputsImageFilter< TOuptut, TInputs >:
+ Collaboration diagram for otb::VariadicInputsImageFilter< TOuptut, TInputs >:

Public Types

using ConstPointer = itk::SmartPointer< const Self >
 
template<vcl_size_t I>
using InputImageType = typename std::tuple_element< I, InputTypesTupleType >::type
 
using InputTypesTupleType = std::tuple< TInputs... >
 
using Pointer = itk::SmartPointer< Self >
 
using Self = VariadicInputsImageFilter< TOuptut, TInputs... >
 
using Superclass = itk::ImageSource< TOuptut >
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 

Static Public Member Functions

static Pointer New ()
 

Static Public Attributes

static constexpr vcl_size_t NumberOfInputs = std::tuple_size<InputTypesTupleType>::value
 
template<std::vcl_size_t I = 0>
void SetInput (const InputImageType< I > *inputPtr)
 
 DefineLegacySetInputMacro (1)
 
 DefineLegacySetInputMacro (2)
 
 DefineLegacySetInputMacro (3)
 
 DefineLegacySetInputMacro (4)
 
 DefineLegacySetInputMacro (5)
 
 DefineLegacySetInputMacro (6)
 
 DefineLegacySetInputMacro (7)
 
 DefineLegacySetInputMacro (8)
 
 DefineLegacySetInputMacro (9)
 
 DefineLegacySetInputMacro (10)
 
template<std::vcl_size_t I = 0>
const InputImageType< I > * GetInput ()
 
void SetInputs (TInputs *... inputs)
 
auto GetInputs ()
 
 VariadicInputsImageFilter ()
 
 ~VariadicInputsImageFilter ()=default
 
template<class Tuple , vcl_size_t... Is>
void SetInputsImpl (Tuple &t, std::index_sequence< Is... >)
 
template<vcl_size_t... Is>
auto GetInputsImpl (std::index_sequence< Is... >)
 
 VariadicInputsImageFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 

Detailed Description

template<class TOuptut, class... TInputs>
class otb::VariadicInputsImageFilter< TOuptut, TInputs >

Base class for image filter with variadic inputs.

This filter act as a base class for all filters that will take several input images with different types and produce an output image.

Type for each input is taken from the variadic template parameter TInputs.

Inputs get be set/get with SetInput<N>() and GetInput<N>(), when N is the index (first input is 0) of the input. This is resolved at compile time: you can not call SetInput<N>() with an argument not matching the Nth input type (it will lead to type mismatch compilation error).

Note that you can also call SetInput() and GetInput() which will automatically fetch the first input.

Alternatively, you can call SetInputs() with all the input image in the same order as in the template parameters.

Last, there is a macro that generates SetInput1() ... SetInput10() (iff the number of varidic input types is large enough) for backward compatibility.

Definition at line 58 of file otbVariadicInputsImageFilter.h.

Member Typedef Documentation

◆ ConstPointer

template<class TOuptut , class... TInputs>
using otb::VariadicInputsImageFilter< TOuptut, TInputs >::ConstPointer = itk::SmartPointer<const Self>

Definition at line 63 of file otbVariadicInputsImageFilter.h.

◆ InputImageType

template<class TOuptut , class... TInputs>
template<vcl_size_t I>
using otb::VariadicInputsImageFilter< TOuptut, TInputs >::InputImageType = typename std::tuple_element<I, InputTypesTupleType>::type

Definition at line 70 of file otbVariadicInputsImageFilter.h.

◆ InputTypesTupleType

template<class TOuptut , class... TInputs>
using otb::VariadicInputsImageFilter< TOuptut, TInputs >::InputTypesTupleType = std::tuple<TInputs...>

Definition at line 67 of file otbVariadicInputsImageFilter.h.

◆ Pointer

template<class TOuptut , class... TInputs>
using otb::VariadicInputsImageFilter< TOuptut, TInputs >::Pointer = itk::SmartPointer<Self>

Definition at line 62 of file otbVariadicInputsImageFilter.h.

◆ Self

template<class TOuptut , class... TInputs>
using otb::VariadicInputsImageFilter< TOuptut, TInputs >::Self = VariadicInputsImageFilter<TOuptut, TInputs...>

Definition at line 61 of file otbVariadicInputsImageFilter.h.

◆ Superclass

template<class TOuptut , class... TInputs>
using otb::VariadicInputsImageFilter< TOuptut, TInputs >::Superclass = itk::ImageSource<TOuptut>

Definition at line 64 of file otbVariadicInputsImageFilter.h.

Constructor & Destructor Documentation

◆ VariadicInputsImageFilter() [1/2]

template<class TOuptut , class... TInputs>
otb::VariadicInputsImageFilter< TOuptut, TInputs >::VariadicInputsImageFilter ( )
inlineprotected
Parameters
Setthe Ith input

Definition at line 141 of file otbVariadicInputsImageFilter.h.

◆ ~VariadicInputsImageFilter()

template<class TOuptut , class... TInputs>
otb::VariadicInputsImageFilter< TOuptut, TInputs >::~VariadicInputsImageFilter ( )
protecteddefault
Parameters
Setthe Ith input

◆ VariadicInputsImageFilter() [2/2]

template<class TOuptut , class... TInputs>
otb::VariadicInputsImageFilter< TOuptut, TInputs >::VariadicInputsImageFilter ( const Self )
privatedelete
Parameters
Setthe Ith input

Member Function Documentation

◆ CreateAnother()

template<class TOuptut , class... TInputs>
virtual::itk::LightObject::Pointer otb::VariadicInputsImageFilter< TOuptut, TInputs >::CreateAnother ( void  ) const

◆ DefineLegacySetInputMacro() [1/10]

template<class TOuptut , class... TInputs>
otb::VariadicInputsImageFilter< TOuptut, TInputs >::DefineLegacySetInputMacro ( )
Parameters
Setthe Ith input

◆ DefineLegacySetInputMacro() [2/10]

template<class TOuptut , class... TInputs>
otb::VariadicInputsImageFilter< TOuptut, TInputs >::DefineLegacySetInputMacro ( 10  )
Parameters
Setthe Ith input

◆ DefineLegacySetInputMacro() [3/10]

template<class TOuptut , class... TInputs>
otb::VariadicInputsImageFilter< TOuptut, TInputs >::DefineLegacySetInputMacro ( )
Parameters
Setthe Ith input

◆ DefineLegacySetInputMacro() [4/10]

template<class TOuptut , class... TInputs>
otb::VariadicInputsImageFilter< TOuptut, TInputs >::DefineLegacySetInputMacro ( )
Parameters
Setthe Ith input

◆ DefineLegacySetInputMacro() [5/10]

template<class TOuptut , class... TInputs>
otb::VariadicInputsImageFilter< TOuptut, TInputs >::DefineLegacySetInputMacro ( )
Parameters
Setthe Ith input

◆ DefineLegacySetInputMacro() [6/10]

template<class TOuptut , class... TInputs>
otb::VariadicInputsImageFilter< TOuptut, TInputs >::DefineLegacySetInputMacro ( )
Parameters
Setthe Ith input

◆ DefineLegacySetInputMacro() [7/10]

template<class TOuptut , class... TInputs>
otb::VariadicInputsImageFilter< TOuptut, TInputs >::DefineLegacySetInputMacro ( )
Parameters
Setthe Ith input

◆ DefineLegacySetInputMacro() [8/10]

template<class TOuptut , class... TInputs>
otb::VariadicInputsImageFilter< TOuptut, TInputs >::DefineLegacySetInputMacro ( )
Parameters
Setthe Ith input

◆ DefineLegacySetInputMacro() [9/10]

template<class TOuptut , class... TInputs>
otb::VariadicInputsImageFilter< TOuptut, TInputs >::DefineLegacySetInputMacro ( )
Parameters
Setthe Ith input

◆ DefineLegacySetInputMacro() [10/10]

template<class TOuptut , class... TInputs>
otb::VariadicInputsImageFilter< TOuptut, TInputs >::DefineLegacySetInputMacro ( )
Parameters
Setthe Ith input

◆ GetInput()

template<class TOuptut , class... TInputs>
template<std::vcl_size_t I = 0>
const InputImageType<I>* otb::VariadicInputsImageFilter< TOuptut, TInputs >::GetInput ( )
inline
Parameters
Setthe Ith input

Definition at line 115 of file otbVariadicInputsImageFilter.h.

Referenced by otb::VariadicInputsImageFilter< TOuptut, TInputs... >::GetInput().

◆ GetInputs()

template<class TOuptut , class... TInputs>
auto otb::VariadicInputsImageFilter< TOuptut, TInputs >::GetInputs ( )
inline
Returns
A tuple with all inputs

Definition at line 134 of file otbVariadicInputsImageFilter.h.

◆ GetInputsImpl()

template<class TOuptut , class... TInputs>
template<vcl_size_t... Is>
auto otb::VariadicInputsImageFilter< TOuptut, TInputs >::GetInputsImpl ( std::index_sequence< Is... >  )
inlineprivate
Parameters
Setthe Ith input

Definition at line 158 of file otbVariadicInputsImageFilter.h.

Referenced by otb::VariadicInputsImageFilter< TOuptut, TInputs... >::GetInputs().

◆ New()

template<class TOuptut , class... TInputs>
static Pointer otb::VariadicInputsImageFilter< TOuptut, TInputs >::New ( )
static

◆ operator=()

template<class TOuptut , class... TInputs>
void otb::VariadicInputsImageFilter< TOuptut, TInputs >::operator= ( const Self )
privatedelete
Parameters
Setthe Ith input

◆ SetInput()

template<class TOuptut , class... TInputs>
template<std::vcl_size_t I = 0>
void otb::VariadicInputsImageFilter< TOuptut, TInputs >::SetInput ( const InputImageType< I > *  inputPtr)
inline
Parameters
Setthe Ith input

Definition at line 85 of file otbVariadicInputsImageFilter.h.

◆ SetInputs()

template<class TOuptut , class... TInputs>
void otb::VariadicInputsImageFilter< TOuptut, TInputs >::SetInputs ( TInputs *...  inputs)
inline
Parameters
inputsA vararg list of inputs

Definition at line 124 of file otbVariadicInputsImageFilter.h.

◆ SetInputsImpl()

template<class TOuptut , class... TInputs>
template<class Tuple , vcl_size_t... Is>
void otb::VariadicInputsImageFilter< TOuptut, TInputs >::SetInputsImpl ( Tuple &  t,
std::index_sequence< Is... >   
)
inlineprivate
Parameters
Setthe Ith input

Definition at line 150 of file otbVariadicInputsImageFilter.h.

Referenced by otb::VariadicInputsImageFilter< TOuptut, TInputs... >::SetInputs().

Member Data Documentation

◆ NumberOfInputs

template<class TOuptut , class... TInputs>
constexpr vcl_size_t otb::VariadicInputsImageFilter< TOuptut, TInputs >::NumberOfInputs = std::tuple_size<InputTypesTupleType>::value
staticconstexpr

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