15 #ifndef niftkItkSignalCollector_h
16 #define niftkItkSignalCollector_h
18 #include <itkCommand.h>
19 #include <itkEventObject.h>
21 #include <mitkCommon.h>
69 Signals
GetSignals(const
itk::Object*
object, const
itk::EventObject& event =
itk::AnyEvent()) const;
83 virtual ~ItkSignalCollector();
86 virtual
void PrintSelf(
std::ostream & os,
itk::Indent indent) const override;
91 virtual
void Execute(
itk::Object* caller, const
itk::EventObject& event) override;
94 virtual
void Execute(const
itk::Object*
object, const
itk::EventObject& event) override;
96 typedef
std::multimap<
itk::Object::Pointer,
unsigned long> ObserverMap;
97 ObserverMap m_ObserverTags;
Class for collecting ITK signals and sending notifications of them to registered listeners.
Definition: niftkItkSignalCollector.h:41
void AddListener(ItkSignalListener *listener)
Adds a listener that will get notified of the ITK signals that this object is connected to...
Definition: niftkItkSignalCollector.cxx:56
void Connect(itk::Object *object, const itk::EventObject &event)
Connects this object to the events of the given object. The current object will collect the given typ...
Definition: niftkItkSignalCollector.cxx:48
Definition: niftkMeshSmoother.cxx:19
std::vector< Signal > Signals
Definition: niftkItkSignalCollector.h:48
const Signals & GetSignals() const
Gets the signals collected by this object.
Definition: niftkItkSignalCollector.cxx:107
Definition: niftkITKAffineResampleImage.cxx:74
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const override
Prints the collected signals to the given stream or to the standard output if no stream is given...
Definition: niftkItkSignalCollector.cxx:156
virtual void ProcessEvent(const itk::Object *object, const itk::EventObject &event)
Adds the object-event pair to the list of collected signals.
Definition: niftkItkSignalCollector.cxx:92
std::pair< const itk::Object *, itk::EventObject * > Signal
Definition: niftkItkSignalCollector.h:47
virtual void OnItkSignalReceived(const itk::Object *object, const itk::EventObject &event)=0
virtual void Clear()
Clears all the signals collected by now.
Definition: niftkItkSignalCollector.cxx:140
Abstract class to be implemented by ITK signal listeners.
Definition: niftkItkSignalCollector.h:31
cl_event event
Definition: glew.h:3231
void RemoveListener(ItkSignalListener *listener)
Removes a listener. The listener will not get notified about the ITK signals observed by the current ...
Definition: niftkItkSignalCollector.cxx:67
mitkClassMacroItkParent(ItkSignalCollector, itk::Command) static Pointer New()
Definition: niftkExceptionObject.h:21