Medical Imaging Interaction Toolkit  2018.4.99-9c019225
Medical Imaging Interaction Toolkit
mitk::NonBlockingAlgorithm Class Reference

#include <mitkNonBlockingAlgorithm.h>

Inheritance diagram for mitk::NonBlockingAlgorithm:
Collaboration diagram for mitk::NonBlockingAlgorithm:

Classes

class  ThreadParameters
 

Public Member Functions

 mitkClassMacroItkParent (NonBlockingAlgorithm, itk::Object)
 
void SetDataStorage (DataStorage &storage)
 
DataStorageGetDataStorage ()
 
template<typename T >
void SetParameter (const char *parameter, const T &value)
 For any kind of normal types. More...
 
template<typename T >
void SetPointerParameter (const char *parameter, const itk::SmartPointer< T > &value)
 For any kind of smart pointers. More...
 
void SetPointerParameter (const char *parameter, BaseData *value)
 For any kind of BaseData, like Image, Surface, etc. Will be stored inside some SmartPointerProperty. More...
 
template<typename TPixel , unsigned int VImageDimension>
void SetItkImageAsMITKImagePointerParameter (const char *parameter, itk::Image< TPixel, VImageDimension > *itkImage)
 For any kind of ITK images (C pointers) More...
 
template<typename TPixel , unsigned int VImageDimension>
void SetItkImageAsMITKImagePointerParameter (const char *parameter, const itk::SmartPointer< itk::Image< TPixel, VImageDimension >> &itkImage)
 For any kind of ITK images (smartpointers) More...
 
template<typename T >
void GetParameter (const char *parameter, T &value) const
 
template<typename T >
void GetPointerParameter (const char *parameter, itk::SmartPointer< T > &value) const
 
virtual void Reset ()
 
void StartAlgorithm ()
 
void StartBlockingAlgorithm ()
 
void StopAlgorithm ()
 
void TriggerParameterModified (const itk::EventObject &)
 
void ThreadedUpdateSuccessful (const itk::EventObject &)
 
void ThreadedUpdateFailed (const itk::EventObject &)
 

Protected Member Functions

 NonBlockingAlgorithm ()
 
 ~NonBlockingAlgorithm () override
 
void DefineTriggerParameter (const char *)
 
void UnDefineTriggerParameter (const char *)
 
virtual void Initialize (const NonBlockingAlgorithm *other=nullptr)
 
virtual bool ReadyToRun ()
 
virtual bool ThreadedUpdateFunction ()
 
virtual void ThreadedUpdateSuccessful ()
 
virtual void ThreadedUpdateFailed ()
 

Protected Attributes

PropertyList::Pointer m_Parameters
 
WeakPointer< DataStoragem_DataStorage
 

Detailed Description

Invokes ResultsAvailable with each new result

done centralize use of itk::MultiThreader in this class

Definition at line 79 of file mitkNonBlockingAlgorithm.h.

Constructor & Destructor Documentation

◆ NonBlockingAlgorithm()

mitk::NonBlockingAlgorithm::NonBlockingAlgorithm ( )
protected

Definition at line 20 of file mitkNonBlockingAlgorithm.cpp.

References m_Parameters, and mitk::PropertyList::New().

◆ ~NonBlockingAlgorithm()

mitk::NonBlockingAlgorithm::~NonBlockingAlgorithm ( )
overrideprotected

Definition at line 27 of file mitkNonBlockingAlgorithm.cpp.

Member Function Documentation

◆ DefineTriggerParameter()

void mitk::NonBlockingAlgorithm::DefineTriggerParameter ( const char *  parameter)
protected

Definition at line 50 of file mitkNonBlockingAlgorithm.cpp.

References m_Parameters, and TriggerParameterModified().

◆ GetDataStorage()

DataStorage * mitk::NonBlockingAlgorithm::GetDataStorage ( )

Definition at line 29 of file mitkNonBlockingAlgorithm.cpp.

References m_DataStorage.

◆ GetParameter()

◆ GetPointerParameter()

◆ Initialize()

void mitk::NonBlockingAlgorithm::Initialize ( const NonBlockingAlgorithm other = nullptr)
protectedvirtual

◆ mitkClassMacroItkParent()

mitk::NonBlockingAlgorithm::mitkClassMacroItkParent ( NonBlockingAlgorithm  ,
itk::Object   
)

◆ ReadyToRun()

bool mitk::NonBlockingAlgorithm::ReadyToRun ( )
protectedvirtual

◆ Reset()

void mitk::NonBlockingAlgorithm::Reset ( )
virtual

Definition at line 79 of file mitkNonBlockingAlgorithm.cpp.

References Initialize().

◆ SetDataStorage()

void mitk::NonBlockingAlgorithm::SetDataStorage ( DataStorage storage)

Definition at line 28 of file mitkNonBlockingAlgorithm.cpp.

References m_DataStorage.

◆ SetItkImageAsMITKImagePointerParameter() [1/2]

template<typename TPixel , unsigned int VImageDimension>
void mitk::NonBlockingAlgorithm::SetItkImageAsMITKImagePointerParameter ( const char *  parameter,
itk::Image< TPixel, VImageDimension > *  itkImage 
)
inline

For any kind of ITK images (C pointers)

Definition at line 126 of file mitkNonBlockingAlgorithm.h.

References mitk::ImportItkImage(), and mitk::Image::New().

◆ SetItkImageAsMITKImagePointerParameter() [2/2]

template<typename TPixel , unsigned int VImageDimension>
void mitk::NonBlockingAlgorithm::SetItkImageAsMITKImagePointerParameter ( const char *  parameter,
const itk::SmartPointer< itk::Image< TPixel, VImageDimension >> &  itkImage 
)
inline

For any kind of ITK images (smartpointers)

Definition at line 138 of file mitkNonBlockingAlgorithm.h.

References mitk::ImportItkImage(), and mitk::Image::New().

◆ SetParameter()

template<typename T >
void mitk::NonBlockingAlgorithm::SetParameter ( const char *  parameter,
const T &  value 
)
inline

For any kind of normal types.

Definition at line 98 of file mitkNonBlockingAlgorithm.h.

Referenced by mitk::SegmentationSink::Initialize(), and mitk::ShowSegmentationAsSurface::Initialize().

◆ SetPointerParameter() [1/2]

template<typename T >
void mitk::NonBlockingAlgorithm::SetPointerParameter ( const char *  parameter,
const itk::SmartPointer< T > &  value 
)
inline

For any kind of smart pointers.

Definition at line 108 of file mitkNonBlockingAlgorithm.h.

References mitk::SmartPointerProperty::New().

Referenced by mitk::SegmentationSink::Initialize(), and Initialize().

◆ SetPointerParameter() [2/2]

void mitk::NonBlockingAlgorithm::SetPointerParameter ( const char *  parameter,
BaseData value 
)

For any kind of BaseData, like Image, Surface, etc. Will be stored inside some SmartPointerProperty.

Definition at line 43 of file mitkNonBlockingAlgorithm.cpp.

References m_Parameters, and mitk::SmartPointerProperty::New().

◆ StartAlgorithm()

void mitk::NonBlockingAlgorithm::StartAlgorithm ( )

◆ StartBlockingAlgorithm()

void mitk::NonBlockingAlgorithm::StartBlockingAlgorithm ( )

Definition at line 80 of file mitkNonBlockingAlgorithm.cpp.

References StartAlgorithm(), and StopAlgorithm().

◆ StopAlgorithm()

◆ ThreadedUpdateFailed() [1/2]

void mitk::NonBlockingAlgorithm::ThreadedUpdateFailed ( const itk::EventObject &  )

◆ ThreadedUpdateFailed() [2/2]

void mitk::NonBlockingAlgorithm::ThreadedUpdateFailed ( )
protectedvirtual

Definition at line 197 of file mitkNonBlockingAlgorithm.cpp.

Referenced by StopAlgorithm(), and ThreadedUpdateFailed().

◆ ThreadedUpdateFunction()

bool mitk::NonBlockingAlgorithm::ThreadedUpdateFunction ( )
protectedvirtual

◆ ThreadedUpdateSuccessful() [1/2]

void mitk::NonBlockingAlgorithm::ThreadedUpdateSuccessful ( const itk::EventObject &  )

◆ ThreadedUpdateSuccessful() [2/2]

void mitk::NonBlockingAlgorithm::ThreadedUpdateSuccessful ( )
protectedvirtual

◆ TriggerParameterModified()

void mitk::NonBlockingAlgorithm::TriggerParameterModified ( const itk::EventObject &  )

Definition at line 162 of file mitkNonBlockingAlgorithm.cpp.

References StartAlgorithm().

Referenced by DefineTriggerParameter().

◆ UnDefineTriggerParameter()

void mitk::NonBlockingAlgorithm::UnDefineTriggerParameter ( const char *  parameter)
protected

Definition at line 63 of file mitkNonBlockingAlgorithm.cpp.

References m_Parameters, and MITK_ERROR.

Referenced by mitk::SegmentationSink::Initialize().

Member Data Documentation

◆ m_DataStorage

◆ m_Parameters

PropertyList::Pointer mitk::NonBlockingAlgorithm::m_Parameters
protected

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