VTK  9.5.20250718
vtkContourLoopExtraction.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
62#ifndef vtkContourLoopExtraction_h
63#define vtkContourLoopExtraction_h
64
65#include "vtkFiltersModelingModule.h" // For export macro
67
68#define VTK_LOOP_CLOSURE_OFF 0
69#define VTK_LOOP_CLOSURE_BOUNDARY 1
70#define VTK_LOOP_CLOSURE_ALL 2
71
72#define VTK_OUTPUT_POLYGONS 0
73#define VTK_OUTPUT_POLYLINES 1
74#define VTK_OUTPUT_BOTH 2
75
76VTK_ABI_NAMESPACE_BEGIN
77class VTKFILTERSMODELING_EXPORT vtkContourLoopExtraction : public vtkPolyDataAlgorithm
78{
79public:
81
86 void PrintSelf(ostream& os, vtkIndent indent) override;
88
90
96 vtkSetClampMacro(LoopClosure, int, VTK_LOOP_CLOSURE_OFF, VTK_LOOP_CLOSURE_ALL);
97 vtkGetMacro(LoopClosure, int);
98 void SetLoopClosureToOff() { this->SetLoopClosure(VTK_LOOP_CLOSURE_OFF); }
99 void SetLoopClosureToBoundary() { this->SetLoopClosure(VTK_LOOP_CLOSURE_BOUNDARY); }
100 void SetLoopClosureToAll() { this->SetLoopClosure(VTK_LOOP_CLOSURE_ALL); }
103
105
110 vtkSetMacro(ScalarThresholding, bool);
111 vtkGetMacro(ScalarThresholding, bool);
112 vtkBooleanMacro(ScalarThresholding, bool);
114
116
121 vtkSetVector2Macro(ScalarRange, double);
122 vtkGetVector2Macro(ScalarRange, double);
124
126
130 vtkSetVector3Macro(Normal, double);
131 vtkGetVector3Macro(Normal, double);
133
135
140 vtkSetClampMacro(OutputMode, int, VTK_OUTPUT_POLYGONS, VTK_OUTPUT_BOTH);
141 vtkGetMacro(OutputMode, int);
142 void SetOutputModeToPolygons() { this->SetOutputMode(VTK_OUTPUT_POLYGONS); }
143 void SetOutputModeToPolylines() { this->SetOutputMode(VTK_OUTPUT_POLYLINES); }
144 void SetOutputModeToBoth() { this->SetOutputMode(VTK_OUTPUT_BOTH); }
147
149
158 vtkSetMacro(CleanPoints, bool);
159 vtkGetMacro(CleanPoints, bool);
160 vtkBooleanMacro(CleanPoints, bool);
162
163protected:
166
169 double ScalarRange[2];
170 double Normal[3];
173
175
176private:
178 void operator=(const vtkContourLoopExtraction&) = delete;
179};
180
181VTK_ABI_NAMESPACE_END
182#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:108
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