VTK  9.1.0
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=========================================================================*/
70#ifndef vtkContourLoopExtraction_h
71#define vtkContourLoopExtraction_h
72
73#include "vtkFiltersModelingModule.h" // For export macro
75
76#define VTK_LOOP_CLOSURE_OFF 0
77#define VTK_LOOP_CLOSURE_BOUNDARY 1
78#define VTK_LOOP_CLOSURE_ALL 2
79
80#define VTK_OUTPUT_POLYGONS 0
81#define VTK_OUTPUT_POLYLINES 1
82#define VTK_OUTPUT_BOTH 2
83
84class VTKFILTERSMODELING_EXPORT vtkContourLoopExtraction : public vtkPolyDataAlgorithm
85{
86public:
88
93 void PrintSelf(ostream& os, vtkIndent indent) override;
95
97
103 vtkSetClampMacro(LoopClosure, int, VTK_LOOP_CLOSURE_OFF, VTK_LOOP_CLOSURE_ALL);
104 vtkGetMacro(LoopClosure, int);
105 void SetLoopClosureToOff() { this->SetLoopClosure(VTK_LOOP_CLOSURE_OFF); }
106 void SetLoopClosureToBoundary() { this->SetLoopClosure(VTK_LOOP_CLOSURE_BOUNDARY); }
107 void SetLoopClosureToAll() { this->SetLoopClosure(VTK_LOOP_CLOSURE_ALL); }
110
112
117 vtkSetMacro(ScalarThresholding, bool);
118 vtkGetMacro(ScalarThresholding, bool);
119 vtkBooleanMacro(ScalarThresholding, bool);
121
123
128 vtkSetVector2Macro(ScalarRange, double);
129 vtkGetVector2Macro(ScalarRange, double);
131
133
137 vtkSetVector3Macro(Normal, double);
138 vtkGetVector3Macro(Normal, double);
140
142
147 vtkSetClampMacro(OutputMode, int, VTK_OUTPUT_POLYGONS, VTK_OUTPUT_BOTH);
148 vtkGetMacro(OutputMode, int);
149 void SetOutputModeToPolygons() { this->SetOutputMode(VTK_OUTPUT_POLYGONS); }
150 void SetOutputModeToPolylines() { this->SetOutputMode(VTK_OUTPUT_POLYLINES); }
151 void SetOutputModeToBoth() { this->SetOutputMode(VTK_OUTPUT_BOTH); }
154
155protected:
158
161 double ScalarRange[2];
162 double Normal[3];
164
166
167private:
169 void operator=(const vtkContourLoopExtraction&) = delete;
170};
171
172#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:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
@ Normal
Definition: vtkX3D.h:51
#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