Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkSlicerTask.h
Go to the documentation of this file.
1#ifndef __vtkSlicerTask_h
2#define __vtkSlicerTask_h
3
4#include "vtkObject.h"
5#include "vtkSmartPointer.h"
8
9class VTK_SLICER_BASE_LOGIC_EXPORT vtkSlicerTask : public vtkObject
10{
11public:
12 static vtkSlicerTask* New();
13 vtkTypeMacro(vtkSlicerTask, vtkObject);
14 void PrintSelf(ostream& os, vtkIndent indent) override;
15
17
21
24 virtual void Execute();
25
29 enum
30 {
34 };
35
37 vtkGetMacro(Type, int);
40
41 const char* GetTypeAsString()
42 {
43 switch (this->Type)
44 {
45 case vtkSlicerTask::Undefined: return "Undefined";
46 case vtkSlicerTask::Processing: return "Processing";
47 case vtkSlicerTask::Networking: return "Networking";
48 }
49 return "Unknown";
50 }
51
52protected:
54 ~vtkSlicerTask() override;
57
58private:
59 vtkSmartPointer<vtkMRMLAbstractLogic> TaskObject;
61 void* TaskClientData;
62
63 int Type;
64};
65#endif
Superclass for MRML logic classes.
void(vtkMRMLAbstractLogic::* TaskFunctionPointer)(void *clientdata)
void operator=(const vtkSlicerTask &)
virtual void Execute()
Execute the task.
const char * GetTypeAsString()
virtual void SetType(int)
void SetTaskFunction(vtkMRMLAbstractLogic *, TaskFunctionPointer, void *clientdata)
Set the function and object to call for the task.
~vtkSlicerTask() override
void SetTypeToNetworking()
void SetTypeToProcessing()
void PrintSelf(ostream &os, vtkIndent indent) override
vtkSlicerTask(const vtkSlicerTask &)
static vtkSlicerTask * New()
vtkMRMLAbstractLogic::TaskFunctionPointer TaskFunctionPointer