VTK  9.3.20240419
vtkResliceImageViewerMeasurements.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkResliceImageViewerMeasurements_h
15 #define vtkResliceImageViewerMeasurements_h
16 
17 #include "vtkInteractionImageModule.h" // For export macro
18 #include "vtkObject.h"
19 
20 VTK_ABI_NAMESPACE_BEGIN
22 class vtkAbstractWidget;
23 class vtkCallbackCommand;
24 class vtkCollection;
25 class vtkDistanceWidget;
26 class vtkAngleWidget;
29 class vtkHandleWidget;
30 class vtkCaptionWidget;
31 class vtkContourWidget;
32 class vtkSeedWidget;
33 
34 class VTKINTERACTIONIMAGE_EXPORT vtkResliceImageViewerMeasurements : public vtkObject
35 {
36 public:
38 
43  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
49  virtual void Render();
50 
52 
55  virtual void AddItem(vtkAbstractWidget*);
56  virtual void RemoveItem(vtkAbstractWidget*);
57  virtual void RemoveAllItems();
59 
61 
67  vtkSetClampMacro(ProcessEvents, vtkTypeBool, 0, 1);
68  vtkGetMacro(ProcessEvents, vtkTypeBool);
69  vtkBooleanMacro(ProcessEvents, vtkTypeBool);
71 
73 
76  vtkSetMacro(Tolerance, double);
77  vtkGetMacro(Tolerance, double);
79 
81 
86  vtkGetObjectMacro(ResliceImageViewer, vtkResliceImageViewer);
88 
93  virtual void Update();
94 
95 protected:
98 
100 
112  bool IsPositionOnReslicedPlane(double p[3]);
114 
115  // Handles the events; centralized here for all widgets.
116  static void ProcessEventsHandler(
117  vtkObject* object, unsigned long event, void* clientdata, void* calldata);
118 
121 
122  // Handle the visibility of the measurements.
124 
125  // Flag indicating if we should handle events.
126  // On by default.
128 
129  // Tolerance for Point-in-plane computation
130  double Tolerance;
131 
132 private:
134  void operator=(const vtkResliceImageViewerMeasurements&) = delete;
135 };
136 
137 VTK_ABI_NAMESPACE_END
138 #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:46
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:108
abstract base class for most VTK objects
Definition: vtkObject.h:162
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:64