VTK  9.0.1
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:
49 
54  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
60  virtual void Render();
61 
63 
66  virtual void AddItem(vtkAbstractWidget*);
67  virtual void RemoveItem(vtkAbstractWidget*);
68  virtual void RemoveAllItems();
70 
72 
78  vtkSetClampMacro(ProcessEvents, vtkTypeBool, 0, 1);
79  vtkGetMacro(ProcessEvents, vtkTypeBool);
80  vtkBooleanMacro(ProcessEvents, vtkTypeBool);
82 
84 
87  vtkSetMacro(Tolerance, double);
88  vtkGetMacro(Tolerance, double);
90 
92 
97  vtkGetObjectMacro(ResliceImageViewer, vtkResliceImageViewer);
99 
104  virtual void Update();
105 
106 protected:
109 
111 
123  bool IsPositionOnReslicedPlane(double p[3]);
125 
126  // Handles the events; centralized here for all widgets.
127  static void ProcessEventsHandler(
128  vtkObject* object, unsigned long event, void* clientdata, void* calldata);
129 
132 
133  // Handle the visibility of the measurements.
135 
136  // Flag indicating if we should handle events.
137  // On by default.
139 
140  // Tolerance for Point-in-plane computation
141  double Tolerance;
142 
143 private:
145  void operator=(const vtkResliceImageViewerMeasurements&) = delete;
146 };
147 
148 #endif
vtkResliceImageViewerMeasurements::Tolerance
double Tolerance
Definition: vtkResliceImageViewerMeasurements.h:141
vtkAngleWidget
measure the angle between two rays (defined by three points)
Definition: vtkAngleWidget.h:82
vtkDistanceWidget
measure the distance between two points
Definition: vtkDistanceWidget.h:80
vtkResliceImageViewerMeasurements::Update
virtual void Update()
Update the measurements.
vtkHandleWidget
a general widget for moving handles
Definition: vtkHandleWidget.h:73
vtkResliceImageViewerMeasurements::IsWidgetOnReslicedPlane
bool IsWidgetOnReslicedPlane(vtkBiDimensionalWidget *w)
vtkResliceImageViewerMeasurements::RemoveItem
virtual void RemoveItem(vtkAbstractWidget *)
vtkResliceImageViewerMeasurements::IsWidgetOnReslicedPlane
bool IsWidgetOnReslicedPlane(vtkHandleWidget *w)
vtkResliceImageViewerMeasurements::AddItem
virtual void AddItem(vtkAbstractWidget *)
Add / remove a measurement widget.
vtkResliceImageViewerMeasurements::EventCallbackCommand
vtkCallbackCommand * EventCallbackCommand
Definition: vtkResliceImageViewerMeasurements.h:134
vtkCaptionWidget
widget for placing a caption (text plus leader)
Definition: vtkCaptionWidget.h:51
vtkHandleRepresentation
abstract class for representing widget handles
Definition: vtkHandleRepresentation.h:56
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:54
vtkContourWidget
create a contour with a set of points
Definition: vtkContourWidget.h:134
vtkResliceImageViewerMeasurements::IsWidgetOnReslicedPlane
bool IsWidgetOnReslicedPlane(vtkContourWidget *w)
vtkResliceImageViewerMeasurements::RemoveAllItems
virtual void RemoveAllItems()
vtkResliceImageViewerMeasurements::vtkResliceImageViewerMeasurements
vtkResliceImageViewerMeasurements()
vtkResliceImageViewerMeasurements::~vtkResliceImageViewerMeasurements
~vtkResliceImageViewerMeasurements() override
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:131
vtkAbstractWidget
define the API for widget / widget representation
Definition: vtkAbstractWidget.h:63
vtkResliceImageViewerMeasurements::IsWidgetOnReslicedPlane
bool IsWidgetOnReslicedPlane(vtkCaptionWidget *w)
vtkResliceImageViewerMeasurements::IsWidgetOnReslicedPlane
bool IsWidgetOnReslicedPlane(vtkDistanceWidget *w)
vtkCollection
create and manipulate ordered lists of objects
Definition: vtkCollection.h:53
vtkSeedWidget
place multiple seed points
Definition: vtkSeedWidget.h:82
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
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:130
vtkResliceImageViewerMeasurements::ProcessEvents
vtkTypeBool ProcessEvents
Definition: vtkResliceImageViewerMeasurements.h:138
vtkResliceImageViewerMeasurements::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkBiDimensionalWidget
measure the bi-dimensional lengths of an object
Definition: vtkBiDimensionalWidget.h:105
vtkObject.h
vtkResliceImageViewerMeasurements::ProcessEventsHandler
static void ProcessEventsHandler(vtkObject *object, unsigned long event, void *clientdata, void *calldata)
vtkResliceImageViewerMeasurements::IsWidgetOnReslicedPlane
bool IsWidgetOnReslicedPlane(vtkSeedWidget *w)
vtkResliceImageViewerMeasurements::New
static vtkResliceImageViewerMeasurements * New()
Standard VTK methods.
vtkCallbackCommand
supports function callbacks
Definition: vtkCallbackCommand.h:45
vtkResliceImageViewer
Display an image along with a reslice cursor.
Definition: vtkResliceImageViewer.h:45
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkResliceImageViewerMeasurements::IsPositionOnReslicedPlane
bool IsPositionOnReslicedPlane(double p[3])
h
vtkFrustumSelector is a vtkSelector that selects elements based on whether they are inside or interse...
vtkResliceImageViewerMeasurements::IsWidgetOnReslicedPlane
bool IsWidgetOnReslicedPlane(vtkAngleWidget *w)