VTK  9.2.20230207
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 
32 VTK_ABI_NAMESPACE_BEGIN
34 class vtkAbstractWidget;
35 class vtkCallbackCommand;
36 class vtkCollection;
37 class vtkDistanceWidget;
38 class vtkAngleWidget;
41 class vtkHandleWidget;
42 class vtkCaptionWidget;
43 class vtkContourWidget;
44 class vtkSeedWidget;
45 
46 class VTKINTERACTIONIMAGE_EXPORT vtkResliceImageViewerMeasurements : public vtkObject
47 {
48 public:
50 
55  void PrintSelf(ostream& os, vtkIndent indent) 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, vtkTypeBool, 0, 1);
80  vtkGetMacro(ProcessEvents, vtkTypeBool);
81  vtkBooleanMacro(ProcessEvents, vtkTypeBool);
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(
129  vtkObject* object, unsigned long event, 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&) = delete;
147 };
148 
149 VTK_ABI_NAMESPACE_END
150 #endif
define the API for widget / widget representation
measure the angle between two rays (defined by three points)
measure the bi-dimensional lengths of an object
supports function callbacks
widget for placing a caption (text plus leader)
create and manipulate ordered lists of objects
Definition: vtkCollection.h:57
create a contour with a set of points
measure the distance between two points
abstract class for representing widget handles
a general widget for moving handles
a simple class to control print indentation
Definition: vtkIndent.h:120
abstract base class for most VTK objects
Definition: vtkObject.h:83
Manage measurements on a resliced image.
bool IsWidgetOnReslicedPlane(vtkBiDimensionalWidget *w)
Check if a measurement widget is on the resliced plane.
bool IsWidgetOnReslicedPlane(vtkDistanceWidget *w)
Check if a measurement widget is on the resliced plane.
virtual void RemoveItem(vtkAbstractWidget *)
Add / remove a measurement widget.
virtual void SetResliceImageViewer(vtkResliceImageViewer *)
Set the reslice image viewer.
static void ProcessEventsHandler(vtkObject *object, unsigned long event, void *clientdata, void *calldata)
bool IsItemOnReslicedPlane(vtkAbstractWidget *w)
Check if a measurement widget is on the resliced plane.
virtual void AddItem(vtkAbstractWidget *)
Add / remove a measurement widget.
virtual void RemoveAllItems()
Add / remove a measurement widget.
bool IsWidgetOnReslicedPlane(vtkHandleWidget *w)
Check if a measurement widget is on the resliced plane.
virtual void Render()
Render the measurements.
bool IsWidgetOnReslicedPlane(vtkCaptionWidget *w)
Check if a measurement widget is on the resliced plane.
static vtkResliceImageViewerMeasurements * New()
Standard VTK methods.
virtual void Update()
Update the measurements.
bool IsPointOnReslicedPlane(vtkHandleRepresentation *h)
Check if a measurement widget is on the resliced plane.
bool IsWidgetOnReslicedPlane(vtkContourWidget *w)
Check if a measurement widget is on the resliced plane.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
bool IsWidgetOnReslicedPlane(vtkSeedWidget *w)
Check if a measurement widget is on the resliced plane.
bool IsWidgetOnReslicedPlane(vtkAngleWidget *w)
Check if a measurement widget is on the resliced plane.
bool IsPositionOnReslicedPlane(double p[3])
Check if a measurement widget is on the resliced plane.
Display an image along with a reslice cursor.
place multiple seed points
Computes the portion of a dataset which is inside a selection.
int vtkTypeBool
Definition: vtkABI.h:71