VTK: Interaction/Widgets/vtkContourRepresentation.h Source File

| VTK 9.3.1

vtkContourRepresentation.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
59 #ifndef vtkContourRepresentation_h
60 #define vtkContourRepresentation_h
61
62 #include "vtkInteractionWidgetsModule.h" // For export macro
63 #include "vtkWidgetRepresentation.h"
64 #include <vector> // STL Header; Required for vector
65
66 VTK_ABI_NAMESPACE_BEGIN
67 class vtkContourLineInterpolator;
68 class vtkIncrementalOctreePointLocator;
69 class vtkPointPlacer;
70 class vtkPolyData;
71 class vtkIdList;
72
73 //----------------------------------------------------------------------
74 class vtkContourRepresentationPoint
75 {
76 public:
77 double WorldPosition[3];
78 double NormalizedDisplayPosition[2];
79
80 // The point id. This is blank except in the case of
81 // vtkPolygonalSurfaceContourLineInterpolator
82 vtkIdType PointId;
83 };
84
85 class vtkContourRepresentationNode
86 {
87 public:
88 double WorldPosition[3];
89 double WorldOrientation[9];
90 double NormalizedDisplayPosition[2];
91 int Selected;
92 std::vector<vtkContourRepresentationPoint*> Points;
93
94 // The point id. This is blank except in the case of
95 // vtkPolygonalSurfaceContourLineInterpolator
96 vtkIdType PointId;
97 };
98
99 class vtkContourRepresentationInternals
100 {
101 public:
102 std::vector<vtkContourRepresentationNode*> Nodes;
103 void ClearNodes()
104 {
105 for (unsigned int i = 0; i < this->Nodes.size(); i++)
106 {
107 for (unsigned int j = 0; j < this->Nodes[i]->Points.size(); j++)
108 {
109 delete this->Nodes[i]->Points[j];
110 }
111 this->Nodes[i]->Points.clear();
112 delete this->Nodes[i];
113 }
114 this->Nodes.clear();
115 }
116 };
117
118 class VTKINTERACTIONWIDGETS_EXPORT vtkContourRepresentation : public vtkWidgetRepresentation
119 {
120 friend class vtkContourWidget;
121
122 public:
124
127 vtkTypeMacro(vtkContourRepresentation, vtkWidgetRepresentation);
128 void PrintSelf(ostream& os, vtkIndent indent) override;
130
132
136 virtual int AddNodeAtWorldPosition(double x, double y, double z);
137 virtual int AddNodeAtWorldPosition(double worldPos[3]);
138 virtual int AddNodeAtWorldPosition(double worldPos[3], double worldOrient[9]);
140
142
148 virtual int AddNodeAtDisplayPosition(double displayPos[2]);
149 virtual int AddNodeAtDisplayPosition(int displayPos[2]);
150 virtual int AddNodeAtDisplayPosition(int X, int Y);
152
154
160 virtual int ActivateNode(double displayPos[2]);
161 virtual int ActivateNode(int displayPos[2]);
162 virtual int ActivateNode(int X, int Y);
164
165 // Description:
166 // Move the active node to a specified world position.
167 // Will return 0 if there is no active node or the node
168 // could not be moved to that position. 1 will be returned
169 // on success.
170 virtual int SetActiveNodeToWorldPosition(double pos[3]);
171 virtual int SetActiveNodeToWorldPosition(double pos[3], double orient[9]);
172
174
181 virtual int SetActiveNodeToDisplayPosition(double pos[2]);
182 virtual int SetActiveNodeToDisplayPosition(int pos[2]);
183 virtual int SetActiveNodeToDisplayPosition(int X, int Y);
185
187
190 virtual int ToggleActiveNodeSelected();
191 virtual int GetActiveNodeSelected();
192 virtual int GetNthNodeSelected(int);
193 virtual int SetNthNodeSelected(int);
195
200 virtual int GetActiveNodeWorldPosition(double pos[3]);
201
206 virtual int GetActiveNodeWorldOrientation(double orient[9]);
207
212 virtual int GetActiveNodeDisplayPosition(double pos[2]);
213
217 virtual int GetNumberOfNodes();
218
224 virtual int GetNthNodeDisplayPosition(int n, double pos[2]);
225
231 virtual int GetNthNodeWorldPosition(int n, double pos[3]);
232
236 virtual vtkContourRepresentationNode* GetNthNode(int n);
237
243 virtual int GetNthNodeWorldOrientation(int n, double orient[9]);
244
246
254 virtual int SetNthNodeDisplayPosition(int n, int X, int Y);
255 virtual int SetNthNodeDisplayPosition(int n, int pos[2]);
256 virtual int SetNthNodeDisplayPosition(int n, double pos[2]);
258
260
267 virtual int SetNthNodeWorldPosition(int n, double pos[3]);
268 virtual int SetNthNodeWorldPosition(int n, double pos[3], double orient[9]);
270
276 virtual int GetNthNodeSlope(int idx, double slope[3]);
277
278 // Description:
279 // For a given node n, get the number of intermediate
280 // points between this node and the node at
281 // (n+1). If n is the last node and the loop is
282 // closed, this is the number of intermediate points
283 // between node n and node 0. 0 is returned if n is
284 // out of range.
285 virtual int GetNumberOfIntermediatePoints(int n);
286
293 virtual int GetIntermediatePointWorldPosition(int n, int idx, double point[3]);
294
300 virtual int AddIntermediatePointWorldPosition(int n, double point[3]);
301
308 virtual int AddIntermediatePointWorldPosition(int n, double point[3], vtkIdType ptId);
309
314 virtual int DeleteLastNode();
315
320 virtual int DeleteActiveNode();
321
326 virtual int DeleteNthNode(int n);
327
331 virtual void ClearAllNodes();
332
337 virtual int AddNodeOnContour(int X, int Y);
338
340
344 vtkSetClampMacro(PixelTolerance, int, 1, 100);
345 vtkGetMacro(PixelTolerance, int);
347
349
353 vtkSetClampMacro(WorldTolerance, double, 0.0, VTK_DOUBLE_MAX);
354 vtkGetMacro(WorldTolerance, double);
356
357 // Used to communicate about the state of the representation
358 enum
359 {
360 Outside = 0,
361 Nearby
362 };
363
364 enum
365 {
366 Inactive = 0,
367 Translate,
368 Shift,
369 Scale
370 };
371
373
377 vtkGetMacro(CurrentOperation, int);
378 vtkSetClampMacro(
379 CurrentOperation, int, vtkContourRepresentation::Inactive, vtkContourRepresentation::Scale);
380 void SetCurrentOperationToInactive()
381 {
382 this->SetCurrentOperation(vtkContourRepresentation::Inactive);
383 }
384 void SetCurrentOperationToTranslate()
385 {
386 this->SetCurrentOperation(vtkContourRepresentation::Translate);
387 }
388 void SetCurrentOperationToShift() { this->SetCurrentOperation(vtkContourRepresentation::Shift); }
389 void SetCurrentOperationToScale() { this->SetCurrentOperation(vtkContourRepresentation::Scale); }
391
392 // Description:
393 // Set / get the Point Placer. The point placer is
394 // responsible for converting display coordinates into
395 // world coordinates according to some constraints, and
396 // for validating world positions.
397 void SetPointPlacer(vtkPointPlacer*);
398 vtkGetObjectMacro(PointPlacer, vtkPointPlacer);
399
401
406 void SetLineInterpolator(vtkContourLineInterpolator*);
407 vtkGetObjectMacro(LineInterpolator, vtkContourLineInterpolator);
409
411
414 void BuildRepresentation() override = 0;
415 int ComputeInteractionState(int X, int Y, int modified = 0) override = 0;
416 void StartWidgetInteraction(double e[2]) override = 0;
417 void WidgetInteraction(double e[2]) override = 0;
419
421
424 void ReleaseGraphicsResources(vtkWindow* w) override = 0;
425 int RenderOverlay(vtkViewport* viewport) override = 0;
426 int RenderOpaqueGeometry(vtkViewport* viewport) override = 0;
427 int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override = 0;
428 vtkTypeBool HasTranslucentPolygonalGeometry() override = 0;
430
432
436 void SetClosedLoop(vtkTypeBool val);
437 vtkGetMacro(ClosedLoop, vtkTypeBool);
438 vtkBooleanMacro(ClosedLoop, vtkTypeBool);
440
442
446 virtual void SetShowSelectedNodes(vtkTypeBool);
447 vtkGetMacro(ShowSelectedNodes, vtkTypeBool);
448 vtkBooleanMacro(ShowSelectedNodes, vtkTypeBool);
450
454 virtual vtkPolyData* GetContourRepresentationAsPolyData() = 0;
455
460 void GetNodePolyData(vtkPolyData* poly);
461
462 vtkSetMacro(RebuildLocator, bool);
463
464 protected:
465 vtkContourRepresentation();
466 ~vtkContourRepresentation() override;
467
468 // Selection tolerance for the handles
469 int PixelTolerance;
470 double WorldTolerance;
471
472 vtkPointPlacer* PointPlacer;
473 vtkContourLineInterpolator* LineInterpolator;
474
475 int ActiveNode;
476
477 int CurrentOperation;
478 vtkTypeBool ClosedLoop;
479
480 // A flag to indicate whether to show the Selected nodes
481 vtkTypeBool ShowSelectedNodes;
482
483 vtkContourRepresentationInternals* Internal;
484
485 void AddNodeAtPositionInternal(double worldPos[3], double worldOrient[9], int displayPos[2]);
486 void AddNodeAtPositionInternal(double worldPos[3], double worldOrient[9], double displayPos[2]);
487 void SetNthNodeWorldPositionInternal(int n, double worldPos[3], double worldOrient[9]);
488
490
494 void GetRendererComputedDisplayPositionFromWorldPosition(
495 double worldPos[3], double worldOrient[9], int displayPos[2]);
496 void GetRendererComputedDisplayPositionFromWorldPosition(
497 double worldPos[3], double worldOrient[9], double displayPos[2]);
499
500 virtual void UpdateLines(int index);
501 void UpdateLine(int idx1, int idx2);
502
503 virtual int FindClosestPointOnContour(int X, int Y, double worldPos[3], int* idx);
504
505 virtual void BuildLines() = 0;
506
507 // This method is called when something changes in the point placer.
508 // It will cause all points to be updated, and all lines to be regenerated.
509 // It should be extended to detect changes in the line interpolator too.
510 virtual int UpdateContour();
511 vtkTimeStamp ContourBuildTime;
512
513 void ComputeMidpoint(double p1[3], double p2[3], double mid[3])
514 {
515 mid[0] = (p1[0] + p2[0]) / 2;
516 mid[1] = (p1[1] + p2[1]) / 2;
517 mid[2] = (p1[2] + p2[2]) / 2;
518 }
519
531 virtual void Initialize(vtkPolyData*, vtkIdList*);
532
537 virtual void Initialize(vtkPolyData*);
538
543 virtual void InitializeContour(vtkPolyData*, vtkIdList*);
544
549 vtkIncrementalOctreePointLocator* Locator;
550
555 void ResetLocator();
556
557 void BuildLocator();
558
559 bool RebuildLocator;
560
561 private:
562 vtkContourRepresentation(const vtkContourRepresentation&) = delete;
563 void operator=(const vtkContourRepresentation&) = delete;
564 };
565
566 VTK_ABI_NAMESPACE_END
567 #endif
vtkContourLineInterpolator
Defines API for interpolating/modifying nodes from a vtkContourRepresentation.
Definition: vtkContourLineInterpolator.h:32
vtkContourRepresentationInternals
Definition: vtkContourRepresentation.h:100
vtkContourRepresentationInternals::Nodes
std::vector< vtkContourRepresentationNode * > Nodes
Definition: vtkContourRepresentation.h:102
vtkContourRepresentationInternals::ClearNodes
void ClearNodes()
Definition: vtkContourRepresentation.h:103
vtkContourRepresentationNode
Definition: vtkContourRepresentation.h:86
vtkContourRepresentationNode::WorldOrientation
double WorldOrientation[9]
Definition: vtkContourRepresentation.h:89
vtkContourRepresentationNode::PointId
vtkIdType PointId
Definition: vtkContourRepresentation.h:96
vtkContourRepresentationNode::Points
std::vector< vtkContourRepresentationPoint * > Points
Definition: vtkContourRepresentation.h:92
vtkContourRepresentationNode::NormalizedDisplayPosition
double NormalizedDisplayPosition[2]
Definition: vtkContourRepresentation.h:90
vtkContourRepresentationNode::Selected
int Selected
Definition: vtkContourRepresentation.h:91
vtkContourRepresentationNode::WorldPosition
double WorldPosition[3]
Definition: vtkContourRepresentation.h:88
vtkContourRepresentationPoint
Definition: vtkContourRepresentation.h:75
vtkContourRepresentationPoint::PointId
vtkIdType PointId
Definition: vtkContourRepresentation.h:82
vtkContourRepresentationPoint::WorldPosition
double WorldPosition[3]
Definition: vtkContourRepresentation.h:77
vtkContourRepresentationPoint::NormalizedDisplayPosition
double NormalizedDisplayPosition[2]
Definition: vtkContourRepresentation.h:78
vtkContourRepresentation
represent the vtkContourWidget
Definition: vtkContourRepresentation.h:119
vtkContourRepresentation::AddNodeAtDisplayPosition
virtual int AddNodeAtDisplayPosition(int X, int Y)
Add a node at a specific display position.
vtkContourRepresentation::StartWidgetInteraction
void StartWidgetInteraction(double e[2]) override=0
These are methods that satisfy vtkWidgetRepresentation's API.
vtkContourRepresentation::AddNodeAtDisplayPosition
virtual int AddNodeAtDisplayPosition(double displayPos[2])
Add a node at a specific display position.
vtkContourRepresentation::SetClosedLoop
void SetClosedLoop(vtkTypeBool val)
Set / Get the ClosedLoop value.
vtkContourRepresentation::ShowSelectedNodes
vtkTypeBool ShowSelectedNodes
Definition: vtkContourRepresentation.h:481
vtkContourRepresentation::Internal
vtkContourRepresentationInternals * Internal
Definition: vtkContourRepresentation.h:483
vtkContourRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
vtkContourRepresentation::AddNodeAtPositionInternal
void AddNodeAtPositionInternal(double worldPos[3], double worldOrient[9], double displayPos[2])
vtkContourRepresentation::WidgetInteraction
void WidgetInteraction(double e[2]) override=0
These are methods that satisfy vtkWidgetRepresentation's API.
vtkContourRepresentation::PixelTolerance
int PixelTolerance
Definition: vtkContourRepresentation.h:469
vtkContourRepresentation::SetCurrentOperationToTranslate
void SetCurrentOperationToTranslate()
Set / get the current operation.
Definition: vtkContourRepresentation.h:384
vtkContourRepresentation::SetCurrentOperationToInactive
void SetCurrentOperationToInactive()
Set / get the current operation.
Definition: vtkContourRepresentation.h:380
vtkContourRepresentation::AddNodeOnContour
virtual int AddNodeOnContour(int X, int Y)
Given a specific X, Y pixel location, add a new node on the contour at this location.
vtkContourRepresentation::SetNthNodeWorldPosition
virtual int SetNthNodeWorldPosition(int n, double pos[3], double orient[9])
Set the nth node's world position.
vtkContourRepresentation::GetNthNodeSlope
virtual int GetNthNodeSlope(int idx, double slope[3])
Get the nth node's slope.
vtkContourRepresentation::GetNodePolyData
void GetNodePolyData(vtkPolyData *poly)
Get the nodes and not the intermediate points in this contour as a vtkPolyData.
vtkContourRepresentation::UpdateContour
virtual int UpdateContour()
vtkContourRepresentation::GetNumberOfIntermediatePoints
virtual int GetNumberOfIntermediatePoints(int n)
vtkContourRepresentation::SetCurrentOperationToScale
void SetCurrentOperationToScale()
Set / get the current operation.
Definition: vtkContourRepresentation.h:389
vtkContourRepresentation::Locator
vtkIncrementalOctreePointLocator * Locator
Adding a point locator to the representation to speed up lookup of the active node when dealing with ...
Definition: vtkContourRepresentation.h:549
vtkContourRepresentation::GetActiveNodeSelected
virtual int GetActiveNodeSelected()
Set/Get whether the active or nth node is selected.
vtkContourRepresentation::SetNthNodeWorldPositionInternal
void SetNthNodeWorldPositionInternal(int n, double worldPos[3], double worldOrient[9])
vtkContourRepresentation::GetNthNode
virtual vtkContourRepresentationNode * GetNthNode(int n)
Get the nth node.
vtkContourRepresentation::RebuildLocator
bool RebuildLocator
Definition: vtkContourRepresentation.h:559
vtkContourRepresentation::SetActiveNodeToWorldPosition
virtual int SetActiveNodeToWorldPosition(double pos[3])
vtkContourRepresentation::SetActiveNodeToDisplayPosition
virtual int SetActiveNodeToDisplayPosition(int X, int Y)
Move the active node based on a specified display position.
vtkContourRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w) override=0
Methods required by vtkProp superclass.
vtkContourRepresentation::GetRendererComputedDisplayPositionFromWorldPosition
void GetRendererComputedDisplayPositionFromWorldPosition(double worldPos[3], double worldOrient[9], int displayPos[2])
Given a world position and orientation, this computes the display position using the renderer of this...
vtkContourRepresentation::DeleteNthNode
virtual int DeleteNthNode(int n)
Delete the nth node.
vtkContourRepresentation::ContourBuildTime
vtkTimeStamp ContourBuildTime
Definition: vtkContourRepresentation.h:511
vtkContourRepresentation::DeleteLastNode
virtual int DeleteLastNode()
Delete the last node.
vtkContourRepresentation::FindClosestPointOnContour
virtual int FindClosestPointOnContour(int X, int Y, double worldPos[3], int *idx)
vtkContourRepresentation::BuildRepresentation
void BuildRepresentation() override=0
These are methods that satisfy vtkWidgetRepresentation's API.
vtkContourRepresentation::GetContourRepresentationAsPolyData
virtual vtkPolyData * GetContourRepresentationAsPolyData()=0
Get the points in this contour as a vtkPolyData.
vtkContourRepresentation::UpdateLine
void UpdateLine(int idx1, int idx2)
vtkContourRepresentation::SetPointPlacer
void SetPointPlacer(vtkPointPlacer *)
vtkContourRepresentation::GetIntermediatePointWorldPosition
virtual int GetIntermediatePointWorldPosition(int n, int idx, double point[3])
Get the world position of the intermediate point at index idx between nodes n and (n+1) (or n and 0 i...
vtkContourRepresentation::ClosedLoop
vtkTypeBool ClosedLoop
Definition: vtkContourRepresentation.h:478
vtkContourRepresentation::Initialize
virtual void Initialize(vtkPolyData *)
Overloaded initialize method, that is called when the vtkIdList is nullptr to maintain backwards comp...
vtkContourRepresentation::SetLineInterpolator
void SetLineInterpolator(vtkContourLineInterpolator *)
Set / Get the Line Interpolator.
vtkContourRepresentation::SetNthNodeSelected
virtual int SetNthNodeSelected(int)
Set/Get whether the active or nth node is selected.
vtkContourRepresentation::vtkContourRepresentation
vtkContourRepresentation()
vtkContourRepresentation::RenderOverlay
int RenderOverlay(vtkViewport *viewport) override=0
Methods required by vtkProp superclass.
vtkContourRepresentation::DeleteActiveNode
virtual int DeleteActiveNode()
Delete the active node.
vtkContourRepresentation::InitializeContour
virtual void InitializeContour(vtkPolyData *, vtkIdList *)
Internal implementation, delegated to another method, so that users who override the method Initializ...
vtkContourRepresentation::GetActiveNodeWorldOrientation
virtual int GetActiveNodeWorldOrientation(double orient[9])
Get the world orientation of the active node.
vtkContourRepresentation::UpdateLines
virtual void UpdateLines(int index)
vtkContourRepresentation::WorldTolerance
double WorldTolerance
Definition: vtkContourRepresentation.h:470
vtkContourRepresentation::HasTranslucentPolygonalGeometry
vtkTypeBool HasTranslucentPolygonalGeometry() override=0
Methods required by vtkProp superclass.
vtkContourRepresentation::ComputeInteractionState
int ComputeInteractionState(int X, int Y, int modified=0) override=0
These are methods that satisfy vtkWidgetRepresentation's API.
vtkContourRepresentation::AddNodeAtWorldPosition
virtual int AddNodeAtWorldPosition(double worldPos[3])
Add a node at a specific world position.
vtkContourRepresentation::SetCurrentOperationToShift
void SetCurrentOperationToShift()
Set / get the current operation.
Definition: vtkContourRepresentation.h:388
vtkContourRepresentation::AddNodeAtPositionInternal
void AddNodeAtPositionInternal(double worldPos[3], double worldOrient[9], int displayPos[2])
vtkContourRepresentation::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override=0
Methods required by vtkProp superclass.
vtkContourRepresentation::SetNthNodeDisplayPosition
virtual int SetNthNodeDisplayPosition(int n, int X, int Y)
Set the nth node's display position.
vtkContourRepresentation::SetNthNodeWorldPosition
virtual int SetNthNodeWorldPosition(int n, double pos[3])
Set the nth node's world position.
vtkContourRepresentation::Scale
@ Scale
Definition: vtkContourRepresentation.h:369
vtkContourRepresentation::Translate
@ Translate
Definition: vtkContourRepresentation.h:367
vtkContourRepresentation::Inactive
@ Inactive
Definition: vtkContourRepresentation.h:366
vtkContourRepresentation::Shift
@ Shift
Definition: vtkContourRepresentation.h:368
vtkContourRepresentation::SetNthNodeDisplayPosition
virtual int SetNthNodeDisplayPosition(int n, int pos[2])
Set the nth node's display position.
vtkContourRepresentation::GetNthNodeWorldOrientation
virtual int GetNthNodeWorldOrientation(int n, double orient[9])
Get the nth node's world orientation.
vtkContourRepresentation::ActivateNode
virtual int ActivateNode(int displayPos[2])
Given a display position, activate a node.
vtkContourRepresentation::AddNodeAtWorldPosition
virtual int AddNodeAtWorldPosition(double x, double y, double z)
Add a node at a specific world position.
vtkContourRepresentation::ToggleActiveNodeSelected
virtual int ToggleActiveNodeSelected()
Set/Get whether the active or nth node is selected.
vtkContourRepresentation::~vtkContourRepresentation
~vtkContourRepresentation() override
vtkContourRepresentation::GetActiveNodeWorldPosition
virtual int GetActiveNodeWorldPosition(double pos[3])
Get the world position of the active node.
vtkContourRepresentation::GetActiveNodeDisplayPosition
virtual int GetActiveNodeDisplayPosition(double pos[2])
Get the display position of the active node.
vtkContourRepresentation::GetNthNodeWorldPosition
virtual int GetNthNodeWorldPosition(int n, double pos[3])
Get the nth node's world position.
vtkContourRepresentation::SetShowSelectedNodes
virtual void SetShowSelectedNodes(vtkTypeBool)
A flag to indicate whether to show the Selected nodes Default is to set it to false.
vtkContourRepresentation::AddIntermediatePointWorldPosition
virtual int AddIntermediatePointWorldPosition(int n, double point[3])
Add an intermediate point between node n and n+1 (or n and 0 if n is the last node and the loop is cl...
vtkContourRepresentation::ActivateNode
virtual int ActivateNode(double displayPos[2])
Given a display position, activate a node.
vtkContourRepresentation::GetRendererComputedDisplayPositionFromWorldPosition
void GetRendererComputedDisplayPositionFromWorldPosition(double worldPos[3], double worldOrient[9], double displayPos[2])
Given a world position and orientation, this computes the display position using the renderer of this...
vtkContourRepresentation::ActivateNode
virtual int ActivateNode(int X, int Y)
Given a display position, activate a node.
vtkContourRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *viewport) override=0
Methods required by vtkProp superclass.
vtkContourRepresentation::SetNthNodeDisplayPosition
virtual int SetNthNodeDisplayPosition(int n, double pos[2])
Set the nth node's display position.
vtkContourRepresentation::GetNumberOfNodes
virtual int GetNumberOfNodes()
Get the number of nodes.
vtkContourRepresentation::PointPlacer
vtkPointPlacer * PointPlacer
Definition: vtkContourRepresentation.h:472
vtkContourRepresentation::SetActiveNodeToDisplayPosition
virtual int SetActiveNodeToDisplayPosition(int pos[2])
Move the active node based on a specified display position.
vtkContourRepresentation::ClearAllNodes
virtual void ClearAllNodes()
Delete all nodes.
vtkContourRepresentation::BuildLocator
void BuildLocator()
vtkContourRepresentation::ComputeMidpoint
void ComputeMidpoint(double p1[3], double p2[3], double mid[3])
Definition: vtkContourRepresentation.h:513
vtkContourRepresentation::BuildLines
virtual void BuildLines()=0
vtkContourRepresentation::ResetLocator
void ResetLocator()
Deletes the previous locator if it exists and creates a new locator.
vtkContourRepresentation::AddIntermediatePointWorldPosition
virtual int AddIntermediatePointWorldPosition(int n, double point[3], vtkIdType ptId)
Add an intermediate point between node n and n+1 (or n and 0 if n is the last node and the loop is cl...
vtkContourRepresentation::GetNthNodeDisplayPosition
virtual int GetNthNodeDisplayPosition(int n, double pos[2])
Get the nth node's display position.
vtkContourRepresentation::SetActiveNodeToDisplayPosition
virtual int SetActiveNodeToDisplayPosition(double pos[2])
Move the active node based on a specified display position.
vtkContourRepresentation::AddNodeAtDisplayPosition
virtual int AddNodeAtDisplayPosition(int displayPos[2])
Add a node at a specific display position.
vtkContourRepresentation::ActiveNode
int ActiveNode
Definition: vtkContourRepresentation.h:475
vtkContourRepresentation::CurrentOperation
int CurrentOperation
Definition: vtkContourRepresentation.h:477
vtkContourRepresentation::Initialize
virtual void Initialize(vtkPolyData *, vtkIdList *)
Build a contour representation from externally supplied PolyData.
vtkContourRepresentation::GetNthNodeSelected
virtual int GetNthNodeSelected(int)
Set/Get whether the active or nth node is selected.
vtkContourRepresentation::LineInterpolator
vtkContourLineInterpolator * LineInterpolator
Definition: vtkContourRepresentation.h:473
vtkContourRepresentation::SetActiveNodeToWorldPosition
virtual int SetActiveNodeToWorldPosition(double pos[3], double orient[9])
vtkContourRepresentation::AddNodeAtWorldPosition
virtual int AddNodeAtWorldPosition(double worldPos[3], double worldOrient[9])
Add a node at a specific world position.
vtkContourWidget
create a contour with a set of points
Definition: vtkContourWidget.h:138
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:32
vtkIncrementalOctreePointLocator
Incremental octree in support of both point location and point insertion.
Definition: vtkIncrementalOctreePointLocator.h:63
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkPointPlacer
Abstract interface to translate 2D display positions to world coordinates.
Definition: vtkPointPlacer.h:39
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:34
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:54
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:65
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkX3D::point
@ point
Definition: vtkX3D.h:236
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkIdType
int vtkIdType
Definition: vtkType.h:315
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154
vtkWidgetRepresentation.h