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

#include <otbVariadicNamedInputsImageFilter.h>

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

Public Types

using ConstPointer = itk::SmartPointer< const Self >
 
template<vcl_size_t I>
using InputImageType = typename Superclass::template InputImageType< I >
 
using InputTypesTupleType = typename Superclass::InputTypesTupleType
 
using Pointer = itk::SmartPointer< Self >
 
using Self = VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs... >
 
using Superclass = VariadicInputsImageFilter< TOuptut, TInputs... >
 
- Public Types inherited from otb::VariadicInputsImageFilter< TOuptut, TInputs... >
using ConstPointer = itk::SmartPointer< const Self >
 
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
 
- Public Member Functions inherited from otb::VariadicInputsImageFilter< TOuptut, TInputs... >
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
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)
 
const InputImageType< I > * GetInput ()
 
void SetInputs (TInputs *... inputs)
 
auto GetInputs ()
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from otb::VariadicInputsImageFilter< TOuptut, TInputs... >
static Pointer New ()
 

Static Public Attributes

static constexpr vcl_size_t NumberOfInputs = Superclass::NumberOfInputs
 
- Static Public Attributes inherited from otb::VariadicInputsImageFilter< TOuptut, TInputs... >
static constexpr vcl_size_t NumberOfInputs
 
template<typename Tag >
void SetInput (const InputImageType< internal::tuple_index< Tag, TInputNameMap >::value > *inputPtr)
 
template<typename Tag >
void SetInput (Tag, const InputImageType< internal::tuple_index< Tag, TInputNameMap >::value > *inputPtr)
 
template<typename Tag >
const InputImageType< internal::tuple_index< Tag, TInputNameMap >::value > * GetInput ()
 
template<typename Tag >
const InputImageType< internal::tuple_index< Tag, TInputNameMap >::value > * GetInput (Tag)
 
 VariadicNamedInputsImageFilter ()=default
 
 ~VariadicNamedInputsImageFilter ()=default
 
 VariadicNamedInputsImageFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from otb::VariadicInputsImageFilter< TOuptut, TInputs... >
 VariadicInputsImageFilter ()
 
 ~VariadicInputsImageFilter ()=default
 

Detailed Description

template<class TOuptut, class TInputNameMap, class... TInputs>
class otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >

Adds tagged versions for Get/SetInput to otb::VariadicInputsImageFilter.

This class extends otb::VariadicInputsImageFilter with SetInput<>() and GetInput<>() with tags.

Template parameter TInputNameMap should be a tuple of same size as variadic template parameter TInputs. Each type in the tuple will be used as a tag to set/get the corresponding input and thus should be unique in tuple.

This allows adding semantic to inputs and remove the need for the user to know input orders and set them by their index.

Example of use:

struct Foo {};
struct Bar {};
using Names = std::tuple<<Foo,Bar>;
using Filter = VariadicNamedInputsImageFilter<OutputType, Names,
InputType1, InputType2>;
// Set the input corresponding to Foo tag:
filter->SetInput<Foo>(in);
// Get the input corresponding to Bar tag:
auto in = filter->GetInput<Bar>();
See also
otb::VariadicNamedInputsImageFilter
otb::FunctorImageFilter

Definition at line 96 of file otbVariadicNamedInputsImageFilter.h.

Member Typedef Documentation

◆ ConstPointer

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

Definition at line 101 of file otbVariadicNamedInputsImageFilter.h.

◆ InputImageType

template<class TOuptut , class TInputNameMap , class... TInputs>
template<vcl_size_t I>
using otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >::InputImageType = typename Superclass::template InputImageType<I>

Definition at line 108 of file otbVariadicNamedInputsImageFilter.h.

◆ InputTypesTupleType

template<class TOuptut , class TInputNameMap , class... TInputs>
using otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >::InputTypesTupleType = typename Superclass::InputTypesTupleType

Definition at line 106 of file otbVariadicNamedInputsImageFilter.h.

◆ Pointer

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

Definition at line 100 of file otbVariadicNamedInputsImageFilter.h.

◆ Self

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

Definition at line 99 of file otbVariadicNamedInputsImageFilter.h.

◆ Superclass

template<class TOuptut , class TInputNameMap , class... TInputs>
using otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >::Superclass = VariadicInputsImageFilter<TOuptut, TInputs...>

Definition at line 102 of file otbVariadicNamedInputsImageFilter.h.

Constructor & Destructor Documentation

◆ VariadicNamedInputsImageFilter() [1/2]

template<class TOuptut , class TInputNameMap , class... TInputs>
otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >::VariadicNamedInputsImageFilter ( )
protecteddefault

Set the input corresponding to tag Tag

Template Parameters
Tagtag of the input
Parameters
inputPtrthe pointer to the input image

◆ ~VariadicNamedInputsImageFilter()

template<class TOuptut , class TInputNameMap , class... TInputs>
otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >::~VariadicNamedInputsImageFilter ( )
protecteddefault

Set the input corresponding to tag Tag

Template Parameters
Tagtag of the input
Parameters
inputPtrthe pointer to the input image

◆ VariadicNamedInputsImageFilter() [2/2]

template<class TOuptut , class TInputNameMap , class... TInputs>
otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >::VariadicNamedInputsImageFilter ( const Self )
privatedelete

Set the input corresponding to tag Tag

Template Parameters
Tagtag of the input
Parameters
inputPtrthe pointer to the input image

Member Function Documentation

◆ CreateAnother()

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

◆ GetInput() [1/2]

template<class TOuptut , class TInputNameMap , class... TInputs>
template<typename Tag >
const InputImageType<internal::tuple_index<Tag, TInputNameMap>::value>* otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >::GetInput ( )
inline

Get the input corresponding to tag Tag

Template Parameters
Tagtag of the input
Returns
the pointer to the input image

Definition at line 152 of file otbVariadicNamedInputsImageFilter.h.

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

◆ GetInput() [2/2]

template<class TOuptut , class TInputNameMap , class... TInputs>
template<typename Tag >
const InputImageType<internal::tuple_index<Tag, TInputNameMap>::value>* otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >::GetInput ( Tag  )
inline

Get the input corresponding to tag Tag

Parameters
tagtag of the input
Returns
the pointer to the input image

Definition at line 165 of file otbVariadicNamedInputsImageFilter.h.

◆ New()

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

◆ operator=()

template<class TOuptut , class TInputNameMap , class... TInputs>
void otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >::operator= ( const Self )
privatedelete

Set the input corresponding to tag Tag

Template Parameters
Tagtag of the input
Parameters
inputPtrthe pointer to the input image

◆ SetInput() [1/2]

template<class TOuptut , class TInputNameMap , class... TInputs>
template<typename Tag >
void otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >::SetInput ( const InputImageType< internal::tuple_index< Tag, TInputNameMap >::value > *  inputPtr)
inline

Set the input corresponding to tag Tag

Template Parameters
Tagtag of the input
Parameters
inputPtrthe pointer to the input image

Definition at line 128 of file otbVariadicNamedInputsImageFilter.h.

◆ SetInput() [2/2]

template<class TOuptut , class TInputNameMap , class... TInputs>
template<typename Tag >
void otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >::SetInput ( Tag  ,
const InputImageType< internal::tuple_index< Tag, TInputNameMap >::value > *  inputPtr 
)
inline

Set the input corresponding to tag Tag

Parameters
tagtag of the input
inputPtrthe pointer to the input image

Definition at line 141 of file otbVariadicNamedInputsImageFilter.h.

Member Data Documentation

◆ NumberOfInputs

template<class TOuptut , class TInputNameMap , class... TInputs>
constexpr vcl_size_t otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >::NumberOfInputs = Superclass::NumberOfInputs
staticconstexpr

Definition at line 109 of file otbVariadicNamedInputsImageFilter.h.


The documentation for this class was generated from the following file:
otb::VariadicNamedInputsImageFilter::VariadicNamedInputsImageFilter
VariadicNamedInputsImageFilter()=default
otb::Wrapper::Tags::Filter
static const std::string Filter
Definition: otbWrapperTags.h:39