ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtk::IterationCommand< TCaller > Class Template Referenceabstract

#include <rtkIterationCommands.h>

Detailed Description

template<typename TCaller>
class rtk::IterationCommand< TCaller >

Abstract superclass to all iteration callbacks. Derived classes must implement the Run() method. Run() can be triggered only once in every n iterations.

Author
Aurélien Coussat

Definition at line 38 of file rtkIterationCommands.h.

+ Inheritance diagram for rtk::IterationCommand< TCaller >:
+ Collaboration diagram for rtk::IterationCommand< TCaller >:

Public Types

using Pointer = itk::SmartPointer<Self>
 
using Self = IterationCommand
 
using Superclass = itk::Command
 
- Public Types inherited from itk::Command
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = Command
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = LightObject
 

Public Member Functions

void Execute (const itk::Object *caller, const itk::EventObject &event) override
 
void Execute (itk::Object *caller, const itk::EventObject &event) override
 
virtual void SetTriggerEvery (unsigned int _arg)
 
- Public Member Functions inherited from itk::Command
virtual const char * GetNameOfClass () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *cmd) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
Command * GetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionary & GetMetaDataDictionary ()
 
const MetaDataDictionary & GetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStamp & GetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag) const
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Protected Member Functions

virtual void End (const TCaller *caller)
 
virtual void Run (const TCaller *caller)=0
 
- Protected Member Functions inherited from itk::Command
 Command ()
 
 ~Command () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- 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 ()
 

Protected Attributes

unsigned int m_IterationCount = 0
 
unsigned int m_TriggerEvery = 1
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Member Typedef Documentation

◆ Pointer

template<typename TCaller>
using rtk::IterationCommand< TCaller >::Pointer = itk::SmartPointer<Self>

Definition at line 44 of file rtkIterationCommands.h.

◆ Self

template<typename TCaller>
using rtk::IterationCommand< TCaller >::Self = IterationCommand

Standard class typedefs.

Definition at line 42 of file rtkIterationCommands.h.

◆ Superclass

template<typename TCaller>
using rtk::IterationCommand< TCaller >::Superclass = itk::Command

Definition at line 43 of file rtkIterationCommands.h.

Member Function Documentation

◆ End()

template<typename TCaller>
virtual void rtk::IterationCommand< TCaller >::End ( const TCaller * caller)
inlineprotectedvirtual

Callback function executed when filter concludes.

Reimplemented in rtk::VerboseIterationCommand< TCaller >.

Definition at line 89 of file rtkIterationCommands.h.

Referenced by Execute().

◆ Execute() [1/2]

template<typename TCaller>
void rtk::IterationCommand< TCaller >::Execute ( const itk::Object * caller,
const itk::EventObject & event )
inlineoverridevirtual

Abstract method that defines the action to be taken by the command. This variant is expected to be used when requests comes from a const Object

Implements itk::Command.

Definition at line 55 of file rtkIterationCommands.h.

References End(), m_IterationCount, m_TriggerEvery, and Run().

◆ Execute() [2/2]

template<typename TCaller>
void rtk::IterationCommand< TCaller >::Execute ( itk::Object * caller,
const itk::EventObject & event )
inlineoverridevirtual

Abstract method that defines the action to be taken by the command.

Implements itk::Command.

Definition at line 49 of file rtkIterationCommands.h.

References Execute().

Referenced by Execute().

◆ Run()

template<typename TCaller>
virtual void rtk::IterationCommand< TCaller >::Run ( const TCaller * caller)
protectedpure virtual

Callback function to be redefined by derived classes.

Implemented in rtk::OutputIterationCommand< TCaller, TOutputImage >, and rtk::VerboseIterationCommand< TCaller >.

Referenced by Execute().

◆ SetTriggerEvery()

template<typename TCaller>
virtual void rtk::IterationCommand< TCaller >::SetTriggerEvery ( unsigned int _arg)
virtual

Member Data Documentation

◆ m_IterationCount

template<typename TCaller>
unsigned int rtk::IterationCommand< TCaller >::m_IterationCount = 0
protected

How many times this command has been executed.

Definition at line 78 of file rtkIterationCommands.h.

Referenced by Execute().

◆ m_TriggerEvery

template<typename TCaller>
unsigned int rtk::IterationCommand< TCaller >::m_TriggerEvery = 1
protected

Trigger the callback every n iterations.

Definition at line 81 of file rtkIterationCommands.h.

Referenced by Execute().


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