VTK  9.2.6
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
78 #include "vtkPolyDataAlgorithm.h"
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 
88 class VTKFILTERSMODELING_EXPORT vtkContourLoopExtraction : public vtkPolyDataAlgorithm
89 {
90 public:
92 
95  static vtkContourLoopExtraction* New();
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); }
112  const char* GetLoopClosureAsString();
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); }
156  const char* GetOutputModeAsString();
158 
160 
169  vtkSetMacro(CleanPoints, bool);
170  vtkGetMacro(CleanPoints, bool);
171  vtkBooleanMacro(CleanPoints, bool);
173 
174 protected:
176  ~vtkContourLoopExtraction() override;
177 
180  double ScalarRange[2];
181  double Normal[3];
184 
186 
187 private:
189  void operator=(const vtkContourLoopExtraction&) = delete;
190 };
191 
192 #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:39
#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