VTK  9.2.6
vtkContourLoopExtraction.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkContourLoopExtraction.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=========================================================================*/
71#ifndef vtkContourLoopExtraction_h
72#define vtkContourLoopExtraction_h
73
74#include "vtkFiltersModelingModule.h" // For export macro
76
77#define VTK_LOOP_CLOSURE_OFF 0
78#define VTK_LOOP_CLOSURE_BOUNDARY 1
79#define VTK_LOOP_CLOSURE_ALL 2
80
81#define VTK_OUTPUT_POLYGONS 0
82#define VTK_OUTPUT_POLYLINES 1
83#define VTK_OUTPUT_BOTH 2
84
85class VTKFILTERSMODELING_EXPORT vtkContourLoopExtraction : public vtkPolyDataAlgorithm
86{
87public:
89
94 void PrintSelf(ostream& os, vtkIndent indent) override;
96
98
104 vtkSetClampMacro(LoopClosure, int, VTK_LOOP_CLOSURE_OFF, VTK_LOOP_CLOSURE_ALL);
105 vtkGetMacro(LoopClosure, int);
106 void SetLoopClosureToOff() { this->SetLoopClosure(VTK_LOOP_CLOSURE_OFF); }
107 void SetLoopClosureToBoundary() { this->SetLoopClosure(VTK_LOOP_CLOSURE_BOUNDARY); }
108 void SetLoopClosureToAll() { this->SetLoopClosure(VTK_LOOP_CLOSURE_ALL); }
111
113
118 vtkSetMacro(ScalarThresholding, bool);
119 vtkGetMacro(ScalarThresholding, bool);
120 vtkBooleanMacro(ScalarThresholding, bool);
122
124
129 vtkSetVector2Macro(ScalarRange, double);
130 vtkGetVector2Macro(ScalarRange, double);
132
134
138 vtkSetVector3Macro(Normal, double);
139 vtkGetVector3Macro(Normal, double);
141
143
148 vtkSetClampMacro(OutputMode, int, VTK_OUTPUT_POLYGONS, VTK_OUTPUT_BOTH);
149 vtkGetMacro(OutputMode, int);
150 void SetOutputModeToPolygons() { this->SetOutputMode(VTK_OUTPUT_POLYGONS); }
151 void SetOutputModeToPolylines() { this->SetOutputMode(VTK_OUTPUT_POLYLINES); }
152 void SetOutputModeToBoth() { this->SetOutputMode(VTK_OUTPUT_BOTH); }
155
157
166 vtkSetMacro(CleanPoints, bool);
167 vtkGetMacro(CleanPoints, bool);
168 vtkBooleanMacro(CleanPoints, bool);
170
171protected:
174
177 double ScalarRange[2];
178 double Normal[3];
181
183
184private:
186 void operator=(const vtkContourLoopExtraction&) = delete;
187};
188
189#endif
extract closed loops (polygons) from lines and polylines
~vtkContourLoopExtraction() override
const char * GetOutputModeAsString()
Specify the form of the output.
void SetOutputModeToPolylines()
Specify the form of the output.
const char * GetLoopClosureAsString()
Specify whether to close loops or not.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetLoopClosureToAll()
Specify whether to close loops or not.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods to instantiate, print and provide type information.
void SetOutputModeToPolygons()
Specify the form of the output.
void SetOutputModeToBoth()
Specify the form of the output.
void SetLoopClosureToBoundary()
Specify whether to close loops or not.
static vtkContourLoopExtraction * New()
Standard methods to instantiate, print and provide type information.
void SetLoopClosureToOff()
Specify whether to close loops or not.
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
#define VTK_LOOP_CLOSURE_ALL
#define VTK_OUTPUT_POLYLINES
#define VTK_OUTPUT_POLYGONS
#define VTK_LOOP_CLOSURE_BOUNDARY
#define VTK_OUTPUT_BOTH
#define VTK_LOOP_CLOSURE_OFF