VTK
vtkResliceImageViewerMeasurements.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkResliceImageViewerMeasurements.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
25 #ifndef vtkResliceImageViewerMeasurements_h
26 #define vtkResliceImageViewerMeasurements_h
27 
28 #include "vtkInteractionImageModule.h" // For export macro
29 #include "vtkObject.h"
30 
32 class vtkAbstractWidget;
33 class vtkCallbackCommand;
34 class vtkCollection;
35 class vtkDistanceWidget;
36 class vtkAngleWidget;
39 class vtkHandleWidget;
40 class vtkCaptionWidget;
41 class vtkContourWidget;
42 class vtkSeedWidget;
43 
45 {
46 public:
47 
49 
52  void PrintSelf(ostream& os, vtkIndent indent);
54 
56  virtual void Render();
57 
59 
60  virtual void AddItem(vtkAbstractWidget *);
61  virtual void RemoveItem(vtkAbstractWidget *);
62  virtual void RemoveAllItems();
64 
66 
70  vtkSetClampMacro(ProcessEvents, int, 0, 1);
71  vtkGetMacro(ProcessEvents, int);
72  vtkBooleanMacro(ProcessEvents, int);
74 
76 
77  vtkSetMacro( Tolerance, double );
78  vtkGetMacro( Tolerance, double );
80 
82 
84  virtual void SetResliceImageViewer( vtkResliceImageViewer * );
85  vtkGetObjectMacro( ResliceImageViewer, vtkResliceImageViewer );
87 
90  virtual void Update();
91 
92 protected:
95 
97 
98  bool IsItemOnReslicedPlane( vtkAbstractWidget * w );
99  bool IsWidgetOnReslicedPlane( vtkDistanceWidget * w );
100  bool IsWidgetOnReslicedPlane( vtkAngleWidget * w );
101  bool IsWidgetOnReslicedPlane( vtkBiDimensionalWidget * w );
102  bool IsWidgetOnReslicedPlane( vtkCaptionWidget * w );
103  bool IsWidgetOnReslicedPlane( vtkContourWidget * w );
104  bool IsWidgetOnReslicedPlane( vtkSeedWidget * w );
105  bool IsWidgetOnReslicedPlane( vtkHandleWidget * w );
106  bool IsPointOnReslicedPlane( vtkHandleRepresentation * h );
107  bool IsPositionOnReslicedPlane( double p[3] );
109 
110  // Handles the events; centralized here for all widgets.
111  static void ProcessEventsHandler(vtkObject* object, unsigned long event,
112  void* clientdata, void* calldata);
113 
116 
117  // Handle the visibility of the measurements.
119 
120  // Flag indicating if we should handle events.
121  // On by default.
123 
124  // Tolerance for Point-in-plane computation
125  double Tolerance;
126 
127 private:
129  void operator=(const vtkResliceImageViewerMeasurements&); // Not implemented.
130 };
131 
132 #endif
measure the bi-dimensional lengths of an object
widget for placing a caption (text plus leader)
abstract base class for most VTK objects
Definition: vtkObject.h:61
abstract class for representing widget handles
measure the distance between two points
a general widget for moving handles
virtual void Update()
place multiple seed points
Definition: vtkSeedWidget.h:85
Manage measurements on a resliced image.
supports function callbacks
virtual void PrintSelf(ostream &os, vtkIndent indent)
#define VTKINTERACTIONIMAGE_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
measure the angle between two rays (defined by three points)
define the API for widget / widget representation
create a contour with a set of points
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
Display an image along with a reslice cursor.
static vtkObject * New()