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);
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 
98  vtkGetObjectMacro( ResliceImageViewer, vtkResliceImageViewer );
100 
105  virtual void Update();
106 
107 protected:
110 
112 
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 
133 
134  // Handle the visibility of the measurements.
136 
137  // Flag indicating if we should handle events.
138  // On by default.
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
vtkResliceImageViewerMeasurements::Tolerance
double Tolerance
Definition: vtkResliceImageViewerMeasurements.h:142
vtkAngleWidget
measure the angle between two rays (defined by three points)
Definition: vtkAngleWidget.h:89
vtkDistanceWidget
measure the distance between two points
Definition: vtkDistanceWidget.h:87
vtkResliceImageViewerMeasurements::Update
virtual void Update()
Update the measurements.
vtkHandleWidget
a general widget for moving handles
Definition: vtkHandleWidget.h:77
vtkResliceImageViewerMeasurements::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkResliceImageViewerMeasurements::IsWidgetOnReslicedPlane
bool IsWidgetOnReslicedPlane(vtkBiDimensionalWidget *w)
vtkResliceImageViewerMeasurements::RemoveItem
virtual void RemoveItem(vtkAbstractWidget *)
vtkResliceImageViewerMeasurements::~vtkResliceImageViewerMeasurements
~vtkResliceImageViewerMeasurements()
vtkResliceImageViewerMeasurements::IsWidgetOnReslicedPlane
bool IsWidgetOnReslicedPlane(vtkHandleWidget *w)
vtkResliceImageViewerMeasurements::AddItem
virtual void AddItem(vtkAbstractWidget *)
Add / remove a measurement widget.
vtkResliceImageViewerMeasurements::EventCallbackCommand
vtkCallbackCommand * EventCallbackCommand
Definition: vtkResliceImageViewerMeasurements.h:135
vtkCaptionWidget
widget for placing a caption (text plus leader)
Definition: vtkCaptionWidget.h:55
vtkHandleRepresentation
abstract class for representing widget handles
Definition: vtkHandleRepresentation.h:59
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkContourWidget
create a contour with a set of points
Definition: vtkContourWidget.h:137
vtkResliceImageViewerMeasurements::IsWidgetOnReslicedPlane
bool IsWidgetOnReslicedPlane(vtkContourWidget *w)
vtkResliceImageViewerMeasurements::RemoveAllItems
virtual void RemoveAllItems()
vtkResliceImageViewerMeasurements::vtkResliceImageViewerMeasurements
vtkResliceImageViewerMeasurements()
vtkResliceImageViewerMeasurements
Manage measurements on a resliced image.
Definition: vtkResliceImageViewerMeasurements.h:46
vtkResliceImageViewerMeasurements::SetResliceImageViewer
virtual void SetResliceImageViewer(vtkResliceImageViewer *)
Set the reslice image viewer.
vtkResliceImageViewerMeasurements::WidgetCollection
vtkCollection * WidgetCollection
Definition: vtkResliceImageViewerMeasurements.h:132
vtkAbstractWidget
define the API for widget / widget representation
Definition: vtkAbstractWidget.h:64
vtkResliceImageViewerMeasurements::IsWidgetOnReslicedPlane
bool IsWidgetOnReslicedPlane(vtkCaptionWidget *w)
vtkResliceImageViewerMeasurements::IsWidgetOnReslicedPlane
bool IsWidgetOnReslicedPlane(vtkDistanceWidget *w)
vtkCollection
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
vtkSeedWidget
place multiple seed points
Definition: vtkSeedWidget.h:84
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkResliceImageViewerMeasurements::IsItemOnReslicedPlane
bool IsItemOnReslicedPlane(vtkAbstractWidget *w)
Check if a measurement widget is on the resliced plane.
vtkResliceImageViewerMeasurements::Render
virtual void Render()
Render the measurements.
vtkResliceImageViewerMeasurements::IsPointOnReslicedPlane
bool IsPointOnReslicedPlane(vtkHandleRepresentation *h)
vtkResliceImageViewerMeasurements::ResliceImageViewer
vtkResliceImageViewer * ResliceImageViewer
Definition: vtkResliceImageViewerMeasurements.h:131
vtkBiDimensionalWidget
measure the bi-dimensional lengths of an object
Definition: vtkBiDimensionalWidget.h:109
vtkObject.h
vtkResliceImageViewerMeasurements::ProcessEventsHandler
static void ProcessEventsHandler(vtkObject *object, unsigned long event, void *clientdata, void *calldata)
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkResliceImageViewerMeasurements::IsWidgetOnReslicedPlane
bool IsWidgetOnReslicedPlane(vtkSeedWidget *w)
vtkResliceImageViewerMeasurements::New
static vtkResliceImageViewerMeasurements * New()
Standard VTK methods.
vtkCallbackCommand
supports function callbacks
Definition: vtkCallbackCommand.h:51
vtkResliceImageViewer
Display an image along with a reslice cursor.
Definition: vtkResliceImageViewer.h:48
vtkResliceImageViewerMeasurements::IsPositionOnReslicedPlane
bool IsPositionOnReslicedPlane(double p[3])
vtkResliceImageViewerMeasurements::IsWidgetOnReslicedPlane
bool IsWidgetOnReslicedPlane(vtkAngleWidget *w)
vtkResliceImageViewerMeasurements::ProcessEvents
int ProcessEvents
Definition: vtkResliceImageViewerMeasurements.h:139