Medical Imaging Interaction Toolkit  2016.11.0
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 ()
 
virtual ~NonBlockingAlgorithm ()
 
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 83 of file mitkNonBlockingAlgorithm.h.

Constructor & Destructor Documentation

mitk::NonBlockingAlgorithm::NonBlockingAlgorithm ( )
protected

Definition at line 24 of file mitkNonBlockingAlgorithm.cpp.

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

mitk::NonBlockingAlgorithm::~NonBlockingAlgorithm ( )
protectedvirtual

Definition at line 31 of file mitkNonBlockingAlgorithm.cpp.

Member Function Documentation

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

Definition at line 33 of file mitkNonBlockingAlgorithm.cpp.

References m_DataStorage.

void mitk::NonBlockingAlgorithm::Initialize ( const NonBlockingAlgorithm other = nullptr)
protectedvirtual
mitk::NonBlockingAlgorithm::mitkClassMacroItkParent ( NonBlockingAlgorithm  ,
itk::Object   
)
bool mitk::NonBlockingAlgorithm::ReadyToRun ( )
protectedvirtual
void mitk::NonBlockingAlgorithm::Reset ( )
virtual

Definition at line 83 of file mitkNonBlockingAlgorithm.cpp.

References Initialize().

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 130 of file mitkNonBlockingAlgorithm.h.

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

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 142 of file mitkNonBlockingAlgorithm.h.

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

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

For any kind of normal types.

Definition at line 102 of file mitkNonBlockingAlgorithm.h.

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

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 112 of file mitkNonBlockingAlgorithm.h.

References mitk::SmartPointerProperty::New().

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

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 47 of file mitkNonBlockingAlgorithm.cpp.

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

void mitk::NonBlockingAlgorithm::StartAlgorithm ( )
void mitk::NonBlockingAlgorithm::StartBlockingAlgorithm ( )

Definition at line 84 of file mitkNonBlockingAlgorithm.cpp.

References StartAlgorithm(), and StopAlgorithm().

void mitk::NonBlockingAlgorithm::StopAlgorithm ( )

Definition at line 111 of file mitkNonBlockingAlgorithm.cpp.

Referenced by StartBlockingAlgorithm().

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

Definition at line 201 of file mitkNonBlockingAlgorithm.cpp.

Referenced by ThreadedUpdateFailed().

bool mitk::NonBlockingAlgorithm::ThreadedUpdateFunction ( )
protectedvirtual
void mitk::NonBlockingAlgorithm::ThreadedUpdateSuccessful ( const itk::EventObject &  )
void mitk::NonBlockingAlgorithm::ThreadedUpdateSuccessful ( )
protectedvirtual
void mitk::NonBlockingAlgorithm::TriggerParameterModified ( const itk::EventObject &  )

Definition at line 166 of file mitkNonBlockingAlgorithm.cpp.

References StartAlgorithm().

Referenced by DefineTriggerParameter().

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

Definition at line 67 of file mitkNonBlockingAlgorithm.cpp.

References m_Parameters, and MITK_ERROR.

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

Member Data Documentation

WeakPointer<DataStorage> mitk::NonBlockingAlgorithm::m_DataStorage
protected
PropertyList::Pointer mitk::NonBlockingAlgorithm::m_Parameters
protected

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