-
Notifications
You must be signed in to change notification settings - Fork 6
/
vtkImageTool.h
72 lines (56 loc) · 2.12 KB
/
vtkImageTool.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
/*=========================================================================
Program: ToolCursor
Module: vtkImageTool.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 vtkImageTool - Superclass for tools that act on the active image.
// .SECTION Description
// This class finds the active image in the renderer and sets it as the
// current image for the tool when StartAction is called. This is for
// actions that should always be applied to the image, even if there are
// other pickable actors in the scene.
#ifndef __vtkImageTool_h
#define __vtkImageTool_h
#include "vtkTool.h"
class vtkImageProperty;
class vtkImageMapper3D;
class vtkMatrix4x4;
class VTK_EXPORT vtkImageTool : public vtkTool
{
public:
// Description:
// Instantiate the object.
static vtkImageTool *New();
// Description:
// Standard vtkObject methods
vtkTypeMacro(vtkImageTool, vtkTool);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// These are the methods that are called when the action takes place.
virtual void StartAction();
virtual void StopAction();
virtual void DoAction();
protected:
vtkImageTool();
~vtkImageTool();
// Description:
// Find the image to perform the interaction on. If an ImageStack is
// present, then the active layer in the stack will be used. Otherwise,
// the last visible image in the renderer will be used.
void FindCurrentImage();
// Description:
// Set the current image by setting the mapper, property, and matrix.
void SetCurrentImage(
vtkImageMapper3D *mapper, vtkImageProperty *property, vtkMatrix4x4 *matrix);
vtkImageProperty *CurrentImageProperty;
vtkImageMapper3D *CurrentImageMapper;
vtkMatrix4x4 *CurrentImageMatrix;
private:
vtkImageTool(const vtkImageTool&); //Not implemented
void operator=(const vtkImageTool&); //Not implemented
};
#endif