VTK  9.2.6
vtkContourWidget.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkContourWidget.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=========================================================================*/
125
126#ifndef vtkContourWidget_h
127#define vtkContourWidget_h
128
129#include "vtkAbstractWidget.h"
130#include "vtkInteractionWidgetsModule.h" // For export macro
131
133class vtkPolyData;
134class vtkIdList;
135
136class VTKINTERACTIONWIDGETS_EXPORT vtkContourWidget : public vtkAbstractWidget
137{
138public:
143
145
149 void PrintSelf(ostream& os, vtkIndent indent) override;
151
157 void SetEnabled(int) override;
158
168
173 {
174 return reinterpret_cast<vtkContourRepresentation*>(this->WidgetRep);
175 }
176
181
185 void CloseLoop();
186
188
191 vtkSetMacro(WidgetState, int);
193
195
198 vtkGetMacro(WidgetState, int);
200
202
208 vtkBooleanMacro(AllowNodePicking, vtkTypeBool);
210
212
221 vtkBooleanMacro(FollowCursor, vtkTypeBool);
223
225
237 vtkBooleanMacro(ContinuousDraw, vtkTypeBool);
239
248 virtual void Initialize(vtkPolyData* poly, int state = 1, vtkIdList* idList = nullptr);
249 virtual void Initialize() { this->Initialize(nullptr); }
250
251 // The state of the widget
252
253 enum
254 {
258 };
259
260protected:
263
270
271 // Callback interface to capture events when
272 // placing the widget.
281
282 // Internal helper methods
284 void AddNode();
285
286private:
287 vtkContourWidget(const vtkContourWidget&) = delete;
288 void operator=(const vtkContourWidget&) = delete;
289};
290
291#endif
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkWidgetRepresentation * WidgetRep
represent the vtkContourWidget
static void TranslateContourAction(vtkAbstractWidget *)
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
void CloseLoop()
Convenient method to close the contour loop.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for a VTK class.
vtkTypeBool FollowCursor
static void MoveAction(vtkAbstractWidget *)
static void ResetAction(vtkAbstractWidget *)
void SetRepresentation(vtkContourRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
~vtkContourWidget() override
static void SelectAction(vtkAbstractWidget *)
virtual void Initialize(vtkPolyData *poly, int state=1, vtkIdList *idList=nullptr)
Initialize the contour widget from a user supplied set of points.
static void AddFinalPointAction(vtkAbstractWidget *)
static void DeleteAction(vtkAbstractWidget *)
vtkTypeBool AllowNodePicking
vtkTypeBool ContinuousDraw
vtkContourRepresentation * GetContourRepresentation()
Return the representation as a vtkContourRepresentation.
static void EndSelectAction(vtkAbstractWidget *)
static vtkContourWidget * New()
Instantiate this class.
static void ScaleContourAction(vtkAbstractWidget *)
virtual void Initialize()
void SetAllowNodePicking(vtkTypeBool)
Set / Get the AllowNodePicking value.
void SetEnabled(int) override
The method for activating and deactivating this widget.
list of point or cell ids
Definition vtkIdList.h:31
a simple class to control print indentation
Definition vtkIndent.h:34
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:85
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:69