Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkNonBlockingAlgorithmEvents.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkNonBlockingAlgorithmEvents_h
14 #define mitkNonBlockingAlgorithmEvents_h
15 
16 #include <itkEventObject.h>
17 
18 namespace mitk
19 {
20  class NonBlockingAlgorithm;
21 
22  class NonBlockingAlgorithmEvent : public itk::AnyEvent
23  {
24  public:
26  typedef itk::AnyEvent Superclass;
27 
28  NonBlockingAlgorithmEvent(const NonBlockingAlgorithm *algorithm = nullptr) : m_Algorithm(algorithm) {}
30  const char *GetEventName() const override { return "NonBlockingAlgorithmEvent"; }
31  bool CheckEvent(const ::itk::EventObject *e) const override { return dynamic_cast<const Self *>(e); }
32  ::itk::EventObject *MakeObject() const override { return new Self(m_Algorithm); }
33  const mitk::NonBlockingAlgorithm *GetAlgorithm() const { return m_Algorithm.GetPointer(); }
34  NonBlockingAlgorithmEvent(const Self &s) : itk::AnyEvent(s), m_Algorithm(s.m_Algorithm){};
35 
36  protected:
37  mitk::NonBlockingAlgorithm::ConstPointer m_Algorithm;
38 
39  private:
40  void operator=(const Self &);
41  };
42 
44  {
45  public:
46  ResultAvailable(const NonBlockingAlgorithm *algorithm = nullptr) : NonBlockingAlgorithmEvent(algorithm) {}
47  ~ResultAvailable() override {}
48  };
49 
51  {
52  public:
53  ProcessingError(const NonBlockingAlgorithm *algorithm = nullptr) : NonBlockingAlgorithmEvent(algorithm) {}
54  ~ProcessingError() override {}
55  };
56 }
57 
58 #endif
mitk::ResultAvailable
Definition: mitkNonBlockingAlgorithmEvents.h:43
mitk::NonBlockingAlgorithmEvent::Self
NonBlockingAlgorithmEvent Self
Definition: mitkNonBlockingAlgorithmEvents.h:25
mitk::ProcessingError
Definition: mitkNonBlockingAlgorithmEvents.h:50
mitk::NonBlockingAlgorithmEvent::~NonBlockingAlgorithmEvent
~NonBlockingAlgorithmEvent() override
Definition: mitkNonBlockingAlgorithmEvents.h:29
mitk::NonBlockingAlgorithmEvent::NonBlockingAlgorithmEvent
NonBlockingAlgorithmEvent(const NonBlockingAlgorithm *algorithm=nullptr)
Definition: mitkNonBlockingAlgorithmEvents.h:28
mitk::NonBlockingAlgorithmEvent::GetAlgorithm
const mitk::NonBlockingAlgorithm * GetAlgorithm() const
Definition: mitkNonBlockingAlgorithmEvents.h:33
mitk::NonBlockingAlgorithmEvent::GetEventName
const char * GetEventName() const override
Definition: mitkNonBlockingAlgorithmEvents.h:30
mitk::ProcessingError::ProcessingError
ProcessingError(const NonBlockingAlgorithm *algorithm=nullptr)
Definition: mitkNonBlockingAlgorithmEvents.h:53
mitk::NonBlockingAlgorithmEvent::m_Algorithm
mitk::NonBlockingAlgorithm::ConstPointer m_Algorithm
Definition: mitkNonBlockingAlgorithmEvents.h:34
mitk::ProcessingError::~ProcessingError
~ProcessingError() override
Definition: mitkNonBlockingAlgorithmEvents.h:54
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::NonBlockingAlgorithmEvent::Superclass
itk::AnyEvent Superclass
Definition: mitkNonBlockingAlgorithmEvents.h:26
mitk::ResultAvailable::ResultAvailable
ResultAvailable(const NonBlockingAlgorithm *algorithm=nullptr)
Definition: mitkNonBlockingAlgorithmEvents.h:46
mitk::NonBlockingAlgorithm
Definition: mitkNonBlockingAlgorithm.h:78
mitk::ResultAvailable::~ResultAvailable
~ResultAvailable() override
Definition: mitkNonBlockingAlgorithmEvents.h:47
mitk::NonBlockingAlgorithmEvent::MakeObject
::itk::EventObject * MakeObject() const override
Definition: mitkNonBlockingAlgorithmEvents.h:32
mitk::NonBlockingAlgorithmEvent::NonBlockingAlgorithmEvent
NonBlockingAlgorithmEvent(const Self &s)
Definition: mitkNonBlockingAlgorithmEvents.h:34
mitk::NonBlockingAlgorithmEvent::CheckEvent
bool CheckEvent(const ::itk::EventObject *e) const override
Definition: mitkNonBlockingAlgorithmEvents.h:31
itk
SET FUNCTIONS.
Definition: itkIntelligentBinaryClosingFilter.h:30
mitk::NonBlockingAlgorithmEvent
Definition: mitkNonBlockingAlgorithmEvents.h:22