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 =========================================================================*/
26 #ifndef vtkResliceImageViewerMeasurements_h
27 #define vtkResliceImageViewerMeasurements_h
28 
29 #include "vtkInteractionImageModule.h" // For export macro
30 #include "vtkObject.h"
31 
33 class vtkAbstractWidget;
34 class vtkCallbackCommand;
35 class vtkCollection;
36 class vtkDistanceWidget;
37 class vtkAngleWidget;
40 class vtkHandleWidget;
41 class vtkCaptionWidget;
42 class vtkContourWidget;
43 class vtkSeedWidget;
44 
45 class VTKINTERACTIONIMAGE_EXPORT vtkResliceImageViewerMeasurements : public vtkObject
46 {
47 public:
48 
50 
55  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
57 
61  virtual void Render();
62 
64 
67  virtual void AddItem(vtkAbstractWidget *);
68  virtual void RemoveItem(vtkAbstractWidget *);
69  virtual void RemoveAllItems();
71 
73 
79  vtkSetClampMacro(ProcessEvents, int, 0, 1);
80  vtkGetMacro(ProcessEvents, int);
81  vtkBooleanMacro(ProcessEvents, int);
83 
85 
88  vtkSetMacro( Tolerance, double );
89  vtkGetMacro( Tolerance, double );
91 
93 
97  virtual void SetResliceImageViewer( vtkResliceImageViewer * );
98  vtkGetObjectMacro( ResliceImageViewer, vtkResliceImageViewer );
100 
105  virtual void Update();
106 
107 protected:
109  ~vtkResliceImageViewerMeasurements() VTK_OVERRIDE;
110 
112 
115  bool IsItemOnReslicedPlane( vtkAbstractWidget * w );
116  bool IsWidgetOnReslicedPlane( vtkDistanceWidget * w );
117  bool IsWidgetOnReslicedPlane( vtkAngleWidget * w );
118  bool IsWidgetOnReslicedPlane( vtkBiDimensionalWidget * w );
119  bool IsWidgetOnReslicedPlane( vtkCaptionWidget * w );
120  bool IsWidgetOnReslicedPlane( vtkContourWidget * w );
121  bool IsWidgetOnReslicedPlane( vtkSeedWidget * w );
122  bool IsWidgetOnReslicedPlane( vtkHandleWidget * w );
123  bool IsPointOnReslicedPlane( vtkHandleRepresentation * h );
124  bool IsPositionOnReslicedPlane( double p[3] );
126 
127  // Handles the events; centralized here for all widgets.
128  static void ProcessEventsHandler(vtkObject* object, unsigned long event,
129  void* clientdata, void* calldata);
130 
131  vtkResliceImageViewer * ResliceImageViewer;
132  vtkCollection * WidgetCollection;
133 
134  // Handle the visibility of the measurements.
135  vtkCallbackCommand * EventCallbackCommand; //
136 
137  // Flag indicating if we should handle events.
138  // On by default.
139  int ProcessEvents;
140 
141  // Tolerance for Point-in-plane computation
142  double Tolerance;
143 
144 private:
146  void operator=(const vtkResliceImageViewerMeasurements&) VTK_DELETE_FUNCTION;
147 };
148 
149 #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:59
abstract class for representing widget handles
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
measure the distance between two points
a general widget for moving handles
virtual void Update()
Updates the extensions string.
place multiple seed points
Definition: vtkSeedWidget.h:83
Manage measurements on a resliced image.
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:39
measure the angle between two rays (defined by three points)
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
define the API for widget / widget representation
create a contour with a set of points
create and manipulate ordered lists of objects
Definition: vtkCollection.h:51
Display an image along with a reslice cursor.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...