-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvtkLassoImageTool.h
104 lines (85 loc) · 2.84 KB
/
vtkLassoImageTool.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*=========================================================================
Program: ToolCursor
Module: vtkLassoImageTool.h
Copyright (c) 2010 David Gobbi
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkLassoImageTool - Draw contours on an image.
// .SECTION Description
// This class allows contours to be drawn on an image for manual segmentation
// and region-of-interest definition.
#ifndef __vtkLassoImageTool_h
#define __vtkLassoImageTool_h
#include "vtkImageTool.h"
class vtkMatrix4x4;
class vtkTransform;
class vtkROIContourData;
class vtkROIContourDataToPolyData;
class vtkGlyph3D;
class vtkPoints;
class vtkPolyData;
class vtkPointSet;
class vtkDataSetMapper;
class vtkCellLocator;
class vtkActor;
class vtkRenderer;
class vtkFollowerPlane;
class VTK_EXPORT vtkLassoImageTool : public vtkImageTool
{
public:
// Description:
// Instantiate the object.
static vtkLassoImageTool *New();
// Description:
// Standard vtkObject methods
vtkTypeMacro(vtkLassoImageTool,vtkImageTool);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// The ROI data to interact with.
void SetROIContourData(vtkROIContourData *data);
vtkROIContourData *GetROIContourData() {
return this->ROIData; }
// Description:
// The matrix to use when rendering the contour data.
void SetROIMatrix(vtkMatrix4x4 *matrix);
vtkMatrix4x4 *GetROIMatrix() {
return this->ROIMatrix; }
// Description:
// Set the marker to use at each point.
virtual void SetMarker(vtkPolyData *data);
virtual vtkPolyData *GetMarker();
// Description:
// These are the methods that are called when the action takes place.
virtual void StartAction();
virtual void StopAction();
virtual void DoAction();
// Description:
// Add any associated items to the renderer.
virtual void AddViewPropsToRenderer(vtkRenderer *renderer);
virtual void RemoveViewPropsFromRenderer(vtkRenderer *renderer);
protected:
vtkLassoImageTool();
~vtkLassoImageTool();
vtkCellLocator *CellLocator;
vtkROIContourData *ROIData;
vtkMatrix4x4 *ROIMatrix;
vtkFollowerPlane *ROISelectionPlane;
vtkROIContourDataToPolyData *ROIDataToPointSet;
vtkROIContourDataToPolyData *ROIDataToPolyData;
vtkGlyph3D *Glyph3D;
vtkDataSetMapper *GlyphMapper;
vtkActor *GlyphActor;
vtkDataSetMapper *ContourMapper;
vtkActor *ContourActor;
vtkTransform *OffsetTransform;
vtkIdType CurrentPointId;
int CurrentContourId;
double InitialPointPosition[3];
private:
vtkLassoImageTool(const vtkLassoImageTool&); //Not implemented
void operator=(const vtkLassoImageTool&); //Not implemented
};
#endif