VTK  9.3.1
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
66 #include "vtkPolyDataAlgorithm.h"
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 
76 VTK_ABI_NAMESPACE_BEGIN
77 class VTKFILTERSMODELING_EXPORT vtkContourLoopExtraction : public vtkPolyDataAlgorithm
78 {
79 public:
81 
84  static vtkContourLoopExtraction* New();
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); }
101  const char* GetLoopClosureAsString();
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); }
145  const char* GetOutputModeAsString();
147 
149 
158  vtkSetMacro(CleanPoints, bool);
159  vtkGetMacro(CleanPoints, bool);
160  vtkBooleanMacro(CleanPoints, bool);
162 
163 protected:
165  ~vtkContourLoopExtraction() override;
166 
169  double ScalarRange[2];
170  double Normal[3];
173 
175 
176 private:
178  void operator=(const vtkContourLoopExtraction&) = delete;
179 };
180 
181 VTK_ABI_NAMESPACE_END
182 #endif
#define VTK_OUTPUT_BOTH
#define VTK_LOOP_CLOSURE_ALL
Store vtkAlgorithm input/output information.
void SetLoopClosureToOff()
Specify whether to close loops or not.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
void SetOutputModeToPolygons()
Specify the form of the output.
#define VTK_OUTPUT_POLYGONS
#define VTK_LOOP_CLOSURE_BOUNDARY
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
#define VTK_LOOP_CLOSURE_OFF
void SetLoopClosureToBoundary()
Specify whether to close loops or not.
void SetOutputModeToPolylines()
Specify the form of the output.
#define VTK_OUTPUT_POLYLINES
Store zero or more vtkInformation instances.
void SetLoopClosureToAll()
Specify whether to close loops or not.
void SetOutputModeToBoth()
Specify the form of the output.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
extract closed loops (polygons) from lines and polylines