OTB  6.7.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | 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 Types inherited from itk::ImageSource< TOuptut >
typedef SmartPointer< const SelfConstPointer
 
typedef
Superclass::DataObjectIdentifierType 
DataObjectIdentifierType
 
typedef DataObject::Pointer DataObjectPointer
 
typedef
Superclass::DataObjectPointerArraySizeType 
DataObjectPointerArraySizeType
 
typedef OutputImageType::PixelType OutputImagePixelType
 
typedef OutputImageType::Pointer OutputImagePointer
 
typedef OutputImageType::RegionType OutputImageRegionType
 
typedef TOuptut OutputImageType
 
typedef SmartPointer< SelfPointer
 
typedef ImageSource Self
 
typedef ProcessObject Superclass
 
- Public Types inherited from itk::ProcessObject
typedef SmartPointer< const SelfConstPointer
 
typedef
DataObject::DataObjectIdentifierType 
DataObjectIdentifierType
 
typedef DataObject::Pointer DataObjectPointer
 
typedef std::vector
< DataObjectPointer
DataObjectPointerArray
 
typedef
DataObjectPointerArray::size_type 
DataObjectPointerArraySizeType
 
typedef std::vector
< DataObjectIdentifierType
NameArray
 
typedef SmartPointer< SelfPointer
 
typedef ProcessObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
template<typename Tag >
const InputImageType
< internal::tuple_index< Tag,
TInputNameMap >::value > * 
GetInput (Tag)
 
template<typename Tag >
void SetInput (Tag, const InputImageType< internal::tuple_index< Tag, TInputNameMap >::value > *inputPtr)
 
template<typename Tag >
void SetInput (const InputImageType< internal::tuple_index< Tag, TInputNameMap >::value > *inputPtr)
 
template<typename Tag >
const InputImageType
< internal::tuple_index< Tag,
TInputNameMap >::value > * 
GetInput ()
 
- Public Member Functions inherited from otb::VariadicInputsImageFilter< TOuptut, TInputs...>
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
 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 SetInput (const InputImageType< I > *inputPtr)
 
void SetInputs (TInputs *...inputs)
 
auto GetInputs ()
 
- Public Member Functions inherited from itk::ImageSource< TOuptut >
virtual const char * GetNameOfClass () const
 
OutputImageTypeGetOutput (unsigned int idx)
 
const OutputImageTypeGetOutput () const
 
OutputImageTypeGetOutput ()
 
virtual void GraftNthOutput (unsigned int idx, DataObject *output)
 
virtual void GraftOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void GraftOutput (DataObject *output)
 
virtual
ProcessObject::DataObjectPointer 
MakeOutput (const ProcessObject::DataObjectIdentifierType &) override
 
virtual
ProcessObject::DataObjectPointer 
MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) override
 
- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual void EnlargeOutputRequestedRegion (DataObject *)
 
virtual const bool & GetAbortGenerateData () const
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
NameArray GetInputNames () const
 
DataObjectPointerArray GetInputs ()
 
MultiThreader * GetMultiThreader () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedInputs () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
DataObjectPointerArraySizeType GetNumberOfInputs () const
 
DataObjectPointerArraySizeType GetNumberOfOutputs () const
 
virtual const ThreadIdTypeGetNumberOfThreads () const
 
virtual
DataObjectPointerArraySizeType 
GetNumberOfValidRequiredInputs () const
 
NameArray GetOutputNames () const
 
DataObjectPointerArray GetOutputs ()
 
virtual const float & GetProgress () const
 
virtual const bool & GetReleaseDataBeforeUpdateFlag () const
 
virtual bool GetReleaseDataFlag () const
 
NameArray GetRequiredInputNames () const
 
bool HasInput (const DataObjectIdentifierType &key) const
 
bool HasOutput (const DataObjectIdentifierType &key) const
 
virtual void PrepareOutputs ()
 
virtual void PropagateRequestedRegion (DataObject *output)
 
virtual void ReleaseDataBeforeUpdateFlagOff ()
 
virtual void ReleaseDataBeforeUpdateFlagOn ()
 
void ReleaseDataFlagOff ()
 
void ReleaseDataFlagOn ()
 
virtual void ResetPipeline ()
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void SetNumberOfThreads (ThreadIdType _arg)
 
void SetProgress (float progress)
 
virtual void SetReleaseDataBeforeUpdateFlag (bool _arg)
 
virtual void SetReleaseDataFlag (bool flag)
 
virtual void Update ()
 
virtual void UpdateLargestPossibleRegion ()
 
virtual void UpdateOutputData (DataObject *output)
 
virtual void UpdateOutputInformation ()
 
void UpdateProgress (float progress)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
virtual ModifiedTimeType GetMTime () const
 
virtual const std::string & GetObjectName () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from otb::VariadicInputsImageFilter< TOuptut, TInputs...>
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
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
 
- Static Public Attributes inherited from itk::ImageSource< TOuptut >
static const unsigned int OutputImageDimension
 

Protected Member Functions

 VariadicNamedInputsImageFilter ()=default
 
 ~VariadicNamedInputsImageFilter ()=default
 
- Protected Member Functions inherited from otb::VariadicInputsImageFilter< TOuptut, TInputs...>
 VariadicInputsImageFilter ()
 
 ~VariadicInputsImageFilter ()=default
 
- Protected Member Functions inherited from itk::ImageSource< TOuptut >
virtual void AfterThreadedGenerateData ()
 
virtual void AllocateOutputs ()
 
virtual void BeforeThreadedGenerateData ()
 
virtual void GenerateData () override
 
virtual const
ImageRegionSplitterBase
GetImageRegionSplitter () const
 
 ImageSource ()
 
virtual unsigned int SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion)
 
virtual void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
 
virtual ~ImageSource ()
 
- Protected Member Functions inherited from itk::ProcessObject
virtual void AddInput (DataObject *input)
 
virtual void AddOutput (DataObject *output)
 
bool AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
bool AddRequiredInputName (const DataObjectIdentifierType &)
 
virtual void CacheInputReleaseDataFlags ()
 
virtual void GenerateInputRequestedRegion ()
 
virtual void GenerateOutputInformation ()
 
virtual void GenerateOutputRequestedRegion (DataObject *output)
 
const DataObjectGetInput (const DataObjectIdentifierType &key) const
 
DataObjectGetInput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetInput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetInput (const DataObjectIdentifierType &key)
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredInputs () const
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredOutputs () const
 
DataObjectGetOutput (const DataObjectIdentifierType &key)
 
const DataObjectGetOutput (const DataObjectIdentifierType &key) const
 
DataObjectGetOutput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetOutput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetPrimaryInput ()
 
const DataObjectGetPrimaryInput () const
 
virtual const char * GetPrimaryInputName (void) const
 
DataObjectGetPrimaryOutput ()
 
const DataObjectGetPrimaryOutput () const
 
virtual const char * GetPrimaryOutputName (void) const
 
bool IsIndexedInputName (const DataObjectIdentifierType &) const
 
bool IsIndexedOutputName (const DataObjectIdentifierType &) const
 
bool IsRequiredInputName (const DataObjectIdentifierType &) const
 
 itkLegacyMacro (virtual void RemoveInput(DataObject *input))
 
 itkLegacyMacro (void SetNumberOfInputs(DataObjectPointerArraySizeType num))
 
 itkLegacyMacro (virtual void RemoveOutput(DataObject *output))
 
 itkLegacyMacro (void SetNumberOfOutputs(DataObjectPointerArraySizeType num))
 
DataObjectPointerArraySizeType MakeIndexFromInputName (const DataObjectIdentifierType &name) const
 
DataObjectPointerArraySizeType MakeIndexFromOutputName (const DataObjectIdentifierType &name) const
 
DataObjectIdentifierType MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectIdentifierType MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const
 
virtual void PopBackInput ()
 
virtual void PopFrontInput ()
 
virtual void PrintSelf (std::ostream &os, Indent indent) const override
 
 ProcessObject ()
 
virtual void PropagateResetPipeline ()
 
virtual void PushBackInput (const DataObject *input)
 
virtual void PushFrontInput (const DataObject *input)
 
virtual void ReleaseInputs ()
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 
virtual void RemoveInput (DataObjectPointerArraySizeType)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
virtual void RemoveOutput (DataObjectPointerArraySizeType idx)
 
bool RemoveRequiredInputName (const DataObjectIdentifierType &)
 
virtual void RestoreInputReleaseDataFlags ()
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetNthInput (DataObjectPointerArraySizeType num, DataObject *input)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output)
 
void SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num)
 
void SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num)
 
virtual void SetNumberOfRequiredInputs (DataObjectPointerArraySizeType)
 
virtual void SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg)
 
virtual void SetOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void SetPrimaryInput (DataObject *input)
 
virtual void SetPrimaryInputName (const DataObjectIdentifierType &key)
 
virtual void SetPrimaryOutput (DataObject *output)
 
virtual void SetPrimaryOutputName (const DataObjectIdentifierType &key)
 
void SetRequiredInputNames (const NameArray &)
 
virtual void VerifyInputInformation ()
 
virtual void VerifyPreconditions ()
 
 ~ProcessObject ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Member Functions

void operator= (const Self &)=delete
 
 VariadicNamedInputsImageFilter (const Self &)=delete
 

Additional Inherited Members

- Static Protected Member Functions inherited from itk::ImageSource< TOuptut >
static const
ImageRegionSplitterBase
GetGlobalDefaultSplitter ()
 
static ITK_THREAD_RETURN_TYPE ThreaderCallback (void *arg)
 
- Protected Attributes inherited from itk::ProcessObject
TimeStamp m_OutputInformationMTime
 
bool m_Updating
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

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 to add 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 91 of file otbVariadicNamedInputsImageFilter.h.

Member Typedef Documentation

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

Definition at line 96 of file otbVariadicNamedInputsImageFilter.h.

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 101 of file otbVariadicNamedInputsImageFilter.h.

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

Definition at line 100 of file otbVariadicNamedInputsImageFilter.h.

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

Definition at line 95 of file otbVariadicNamedInputsImageFilter.h.

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

Definition at line 94 of file otbVariadicNamedInputsImageFilter.h.

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

Definition at line 97 of file otbVariadicNamedInputsImageFilter.h.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Reimplemented from itk::Object.

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

Get the input corresponding to tag Tag

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

Definition at line 145 of file otbVariadicNamedInputsImageFilter.h.

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

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 158 of file otbVariadicNamedInputsImageFilter.h.

template<class TOuptut , class TInputNameMap , class... TInputs>
static Pointer otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >::New ( )
static
template<class TOuptut , class TInputNameMap , class... TInputs>
void otb::VariadicNamedInputsImageFilter< TOuptut, TInputNameMap, TInputs >::operator= ( const Self )
privatedelete
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 121 of file otbVariadicNamedInputsImageFilter.h.

References itk::ProcessObject::SetNthInput().

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 134 of file otbVariadicNamedInputsImageFilter.h.

Member Data Documentation

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

Definition at line 102 of file otbVariadicNamedInputsImageFilter.h.


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