Slicer 5.8
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 {
31 Undefined = 0,
33 Networking
34 };
35
37 vtkGetMacro (Type, int);
40
41 const char* GetTypeAsString( ) {
42 switch (this->Type)
43 {
44 case vtkSlicerTask::Undefined: return "Undefined";
45 case vtkSlicerTask::Processing: return "Processing";
46 case vtkSlicerTask::Networking: return "Networking";
47 }
48 return "Unknown";
49 }
50
51protected:
53 ~vtkSlicerTask() override;
56
57private:
58 vtkSmartPointer<vtkMRMLAbstractLogic> TaskObject;
60 void *TaskClientData;
61
62 int Type;
63
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()
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