Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <mitkNonBlockingAlgorithm.h>
Classes | |
class | ThreadParameters |
Public Member Functions | |
mitkClassMacroItkParent (NonBlockingAlgorithm, itk::Object) | |
void | SetDataStorage (DataStorage &storage) |
DataStorage * | GetDataStorage () |
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< DataStorage > | m_DataStorage |
Invokes ResultsAvailable with each new result
done centralize use of itk::MultiThreader in this class
Definition at line 79 of file mitkNonBlockingAlgorithm.h.
|
protected |
Definition at line 20 of file mitkNonBlockingAlgorithm.cpp.
References m_Parameters, and mitk::PropertyList::New().
|
overrideprotected |
Definition at line 27 of file mitkNonBlockingAlgorithm.cpp.
|
protected |
Definition at line 50 of file mitkNonBlockingAlgorithm.cpp.
References m_Parameters, and TriggerParameterModified().
DataStorage * mitk::NonBlockingAlgorithm::GetDataStorage | ( | ) |
Definition at line 29 of file mitkNonBlockingAlgorithm.cpp.
References m_DataStorage.
|
inline |
Definition at line 152 of file mitkNonBlockingAlgorithm.h.
References mitk::GenericProperty< T >::GetValue().
Referenced by mitk::ShowSegmentationAsSmoothedSurface::Initialize(), mitk::SegmentationSink::Initialize(), mitk::ShowSegmentationAsSurface::Initialize(), mitk::LabelSetImageToSurfaceThreadedFilter::ThreadedUpdateFunction(), mitk::ShowSegmentationAsSurface::ThreadedUpdateFunction(), and mitk::ShowSegmentationAsSurface::ThreadedUpdateSuccessful().
|
inline |
Definition at line 173 of file mitkNonBlockingAlgorithm.h.
References mitk::SmartPointerProperty::GetSmartPointer().
Referenced by mitk::SegmentationSink::GetGroupNode(), mitk::SegmentationSink::Initialize(), mitk::SegmentationSink::LookForPointerTargetBelowGroupNode(), mitk::CalculateSegmentationVolume::ReadyToRun(), mitk::SegmentationSink::ReadyToRun(), mitk::LabelSetImageToSurfaceThreadedFilter::ReadyToRun(), mitk::ShowSegmentationAsSurface::ReadyToRun(), mitk::CalculateSegmentationVolume::ThreadedUpdateFunction(), mitk::LabelSetImageToSurfaceThreadedFilter::ThreadedUpdateFunction(), mitk::ShowSegmentationAsSurface::ThreadedUpdateFunction(), mitk::LabelSetImageToSurfaceThreadedFilter::ThreadedUpdateSuccessful(), and mitk::ShowSegmentationAsSurface::ThreadedUpdateSuccessful().
|
protectedvirtual |
Reimplemented in mitk::ShowSegmentationAsSurface, mitk::LabelSetImageToSurfaceThreadedFilter, mitk::SegmentationSink, and mitk::ShowSegmentationAsSmoothedSurface.
Definition at line 30 of file mitkNonBlockingAlgorithm.cpp.
References SetPointerParameter().
Referenced by Reset().
mitk::NonBlockingAlgorithm::mitkClassMacroItkParent | ( | NonBlockingAlgorithm | , |
itk::Object | |||
) |
|
protectedvirtual |
Reimplemented in mitk::ShowSegmentationAsSurface, mitk::LabelSetImageToSurfaceThreadedFilter, mitk::SegmentationSink, mitk::CalculateSegmentationVolume, and mitk::ShowSegmentationAsSmoothedSurface.
Definition at line 163 of file mitkNonBlockingAlgorithm.cpp.
Referenced by StartAlgorithm().
|
virtual |
Definition at line 79 of file mitkNonBlockingAlgorithm.cpp.
References Initialize().
void mitk::NonBlockingAlgorithm::SetDataStorage | ( | DataStorage & | storage | ) |
Definition at line 28 of file mitkNonBlockingAlgorithm.cpp.
References m_DataStorage.
|
inline |
For any kind of ITK images (C pointers)
Definition at line 126 of file mitkNonBlockingAlgorithm.h.
References mitk::ImportItkImage(), and mitk::Image::New().
|
inline |
For any kind of ITK images (smartpointers)
Definition at line 138 of file mitkNonBlockingAlgorithm.h.
References mitk::ImportItkImage(), and mitk::Image::New().
|
inline |
For any kind of normal types.
Definition at line 98 of file mitkNonBlockingAlgorithm.h.
Referenced by mitk::SegmentationSink::Initialize(), and mitk::ShowSegmentationAsSurface::Initialize().
|
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().
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().
void mitk::NonBlockingAlgorithm::StartAlgorithm | ( | ) |
Definition at line 86 of file mitkNonBlockingAlgorithm.cpp.
References mitk::NonBlockingAlgorithm::ThreadParameters::m_Algorithm, and ReadyToRun().
Referenced by StartBlockingAlgorithm(), and TriggerParameterModified().
void mitk::NonBlockingAlgorithm::StartBlockingAlgorithm | ( | ) |
Definition at line 80 of file mitkNonBlockingAlgorithm.cpp.
References StartAlgorithm(), and StopAlgorithm().
void mitk::NonBlockingAlgorithm::StopAlgorithm | ( | ) |
Definition at line 107 of file mitkNonBlockingAlgorithm.cpp.
References mitk::CallbackFromGUIThread::CallThisFromGUIThread(), mitk::CallbackFromGUIThread::GetInstance(), mitk::NonBlockingAlgorithm::ThreadParameters::m_Algorithm, ThreadedUpdateFailed(), and ThreadedUpdateSuccessful().
Referenced by StartBlockingAlgorithm().
void mitk::NonBlockingAlgorithm::ThreadedUpdateFailed | ( | const itk::EventObject & | ) |
Definition at line 187 of file mitkNonBlockingAlgorithm.cpp.
References mitk::NonBlockingAlgorithm::ThreadParameters::m_Algorithm, and ThreadedUpdateFailed().
|
protectedvirtual |
Definition at line 197 of file mitkNonBlockingAlgorithm.cpp.
Referenced by StopAlgorithm(), and ThreadedUpdateFailed().
|
protectedvirtual |
Reimplemented in mitk::ShowSegmentationAsSurface, mitk::LabelSetImageToSurfaceThreadedFilter, mitk::SegmentationSink, mitk::CalculateSegmentationVolume, and mitk::ShowSegmentationAsSmoothedSurface.
Definition at line 168 of file mitkNonBlockingAlgorithm.cpp.
void mitk::NonBlockingAlgorithm::ThreadedUpdateSuccessful | ( | const itk::EventObject & | ) |
Definition at line 170 of file mitkNonBlockingAlgorithm.cpp.
References mitk::NonBlockingAlgorithm::ThreadParameters::m_Algorithm, and ThreadedUpdateSuccessful().
|
protectedvirtual |
Reimplemented in mitk::ShowSegmentationAsSurface, mitk::LabelSetImageToSurfaceThreadedFilter, and mitk::ShowSegmentationAsSmoothedSurface.
Definition at line 180 of file mitkNonBlockingAlgorithm.cpp.
Referenced by StopAlgorithm(), and ThreadedUpdateSuccessful().
void mitk::NonBlockingAlgorithm::TriggerParameterModified | ( | const itk::EventObject & | ) |
Definition at line 162 of file mitkNonBlockingAlgorithm.cpp.
References StartAlgorithm().
Referenced by DefineTriggerParameter().
|
protected |
Definition at line 63 of file mitkNonBlockingAlgorithm.cpp.
References m_Parameters, and MITK_ERROR.
Referenced by mitk::SegmentationSink::Initialize().
|
protected |
Definition at line 228 of file mitkNonBlockingAlgorithm.h.
Referenced by GetDataStorage(), mitk::SegmentationSink::InsertBelowGroupNode(), mitk::SegmentationSink::LookForPointerTargetBelowGroupNode(), and SetDataStorage().
|
protected |
Definition at line 226 of file mitkNonBlockingAlgorithm.h.
Referenced by DefineTriggerParameter(), NonBlockingAlgorithm(), SetPointerParameter(), and UnDefineTriggerParameter().