VTK
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 
91  static vtkContourLoopExtraction *New();
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);
106  {this->SetLoopClosure(VTK_LOOP_CLOSURE_OFF);};
108  {this->SetLoopClosure(VTK_LOOP_CLOSURE_BOUNDARY);};
110  {this->SetLoopClosure(VTK_LOOP_CLOSURE_ALL);};
111  const char *GetLoopClosureAsString();
113 
115 
120  vtkSetMacro(ScalarThresholding,bool);
121  vtkGetMacro(ScalarThresholding,bool);
122  vtkBooleanMacro(ScalarThresholding,bool);
124 
126 
131  vtkSetVector2Macro(ScalarRange,double);
132  vtkGetVector2Macro(ScalarRange,double);
134 
136 
140  vtkSetVector3Macro(Normal,double);
141  vtkGetVector3Macro(Normal,double);
143 
145 
150  vtkSetClampMacro(OutputMode,int,VTK_OUTPUT_POLYGONS,VTK_OUTPUT_BOTH);
151  vtkGetMacro(OutputMode,int);
153  {this->SetOutputMode(VTK_OUTPUT_POLYGONS);};
155  {this->SetOutputMode(VTK_OUTPUT_POLYLINES);};
157  {this->SetOutputMode(VTK_OUTPUT_BOTH);};
158  const char *GetOutputModeAsString();
160 
161 
162 protected:
164  ~vtkContourLoopExtraction() override;
165 
168  double ScalarRange[2];
169  double Normal[3];
171 
173  vtkInformationVector *) override;
174 
175 private:
177  void operator=(const vtkContourLoopExtraction&) = delete;
178 };
179 
180 
181 #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