VTK  9.2.5
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=========================================================================*/
74#ifndef vtkContourLoopExtraction_h
75#define vtkContourLoopExtraction_h
76
77#include "vtkFiltersModelingModule.h" // For export macro
79
80#define VTK_LOOP_CLOSURE_OFF 0
81#define VTK_LOOP_CLOSURE_BOUNDARY 1
82#define VTK_LOOP_CLOSURE_ALL 2
83
84#define VTK_OUTPUT_POLYGONS 0
85#define VTK_OUTPUT_POLYLINES 1
86#define VTK_OUTPUT_BOTH 2
87
88class VTKFILTERSMODELING_EXPORT vtkContourLoopExtraction : public vtkPolyDataAlgorithm
89{
90public:
92
97 void PrintSelf(ostream& os, vtkIndent indent) override;
99
101
107 vtkSetClampMacro(LoopClosure, int, VTK_LOOP_CLOSURE_OFF, VTK_LOOP_CLOSURE_ALL);
108 vtkGetMacro(LoopClosure, int);
109 void SetLoopClosureToOff() { this->SetLoopClosure(VTK_LOOP_CLOSURE_OFF); }
110 void SetLoopClosureToBoundary() { this->SetLoopClosure(VTK_LOOP_CLOSURE_BOUNDARY); }
111 void SetLoopClosureToAll() { this->SetLoopClosure(VTK_LOOP_CLOSURE_ALL); }
114
116
121 vtkSetMacro(ScalarThresholding, bool);
122 vtkGetMacro(ScalarThresholding, bool);
123 vtkBooleanMacro(ScalarThresholding, bool);
125
127
132 vtkSetVector2Macro(ScalarRange, double);
133 vtkGetVector2Macro(ScalarRange, double);
135
137
141 vtkSetVector3Macro(Normal, double);
142 vtkGetVector3Macro(Normal, double);
144
146
151 vtkSetClampMacro(OutputMode, int, VTK_OUTPUT_POLYGONS, VTK_OUTPUT_BOTH);
152 vtkGetMacro(OutputMode, int);
153 void SetOutputModeToPolygons() { this->SetOutputMode(VTK_OUTPUT_POLYGONS); }
154 void SetOutputModeToPolylines() { this->SetOutputMode(VTK_OUTPUT_POLYLINES); }
155 void SetOutputModeToBoth() { this->SetOutputMode(VTK_OUTPUT_BOTH); }
158
160
169 vtkSetMacro(CleanPoints, bool);
170 vtkGetMacro(CleanPoints, bool);
171 vtkBooleanMacro(CleanPoints, bool);
173
174protected:
177
180 double ScalarRange[2];
181 double Normal[3];
184
186
187private:
189 void operator=(const vtkContourLoopExtraction&) = delete;
190};
191
192#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:40
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