VTK  9.0.1
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
74 #include "vtkPolyDataAlgorithm.h"
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 
84 class VTKFILTERSMODELING_EXPORT vtkContourLoopExtraction : public vtkPolyDataAlgorithm
85 {
86 public:
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); }
108  const char* GetLoopClosureAsString();
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); }
152  const char* GetOutputModeAsString();
154 
155 protected:
158 
161  double ScalarRange[2];
162  double Normal[3];
164 
166 
167 private:
169  void operator=(const vtkContourLoopExtraction&) = delete;
170 };
171 
172 #endif
extract closed loops (polygons) from lines and polylines
~vtkContourLoopExtraction() override
const char * GetLoopClosureAsString()
const char * GetOutputModeAsString()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkContourLoopExtraction * New()
Standard methods to instantiate, print and provide type information.
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.
@ 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