VTK  9.3.1
vtkDiscreteFlyingEdgesClipper2D.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
45 #ifndef vtkDiscreteFlyingEdgesClipper2D_h
46 #define vtkDiscreteFlyingEdgesClipper2D_h
47 
48 #include "vtkContourValues.h" // Needed for direct access to ContourValues
49 #include "vtkFiltersGeneralModule.h" // For export macro
50 #include "vtkPolyDataAlgorithm.h"
51 
52 VTK_ABI_NAMESPACE_BEGIN
53 class vtkImageData;
54 
55 class VTKFILTERSGENERAL_EXPORT vtkDiscreteFlyingEdgesClipper2D : public vtkPolyDataAlgorithm
56 {
57 public:
59 
64  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
71  vtkMTimeType GetMTime() override;
72 
80  void SetValue(int i, double value) { this->ContourValues->SetValue(i, value); }
81 
85  double GetValue(int i) { return this->ContourValues->GetValue(i); }
86 
91  double* GetValues() { return this->ContourValues->GetValues(); }
92 
98  void GetValues(double* contourValues) { this->ContourValues->GetValues(contourValues); }
99 
105  void SetNumberOfContours(int number) { this->ContourValues->SetNumberOfContours(number); }
106 
110  vtkIdType GetNumberOfContours() { return this->ContourValues->GetNumberOfContours(); }
111 
113 
117  void GenerateValues(int numContours, double range[2])
118  {
119  this->ContourValues->GenerateValues(numContours, range);
120  }
121  void GenerateValues(int numContours, double rangeStart, double rangeEnd)
122  {
123  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
124  }
126 
128 
132  vtkSetMacro(ComputeScalars, vtkTypeBool);
133  vtkGetMacro(ComputeScalars, vtkTypeBool);
134  vtkBooleanMacro(ComputeScalars, vtkTypeBool);
136 
138 
142  vtkSetMacro(ArrayComponent, int);
143  vtkGetMacro(ArrayComponent, int);
145 
146 protected:
149 
151  int FillInputPortInformation(int port, vtkInformation* info) override;
152 
156 
157 private:
159  void operator=(const vtkDiscreteFlyingEdgesClipper2D&) = delete;
160 };
161 
162 VTK_ABI_NAMESPACE_END
163 #endif
helper object to manage setting and generating contour values
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
int vtkIdType
Definition: vtkType.h:315
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between the specified range.
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:64
double * GetValues()
Get a pointer to an array of contour values.
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
virtual vtkMTimeType GetMTime()
Return this object's modified time.
void SetValue(int i, double value)
Set a particular contour value at contour number i.
double GetValue(int i)
Get the ith contour value.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void GetValues(double *contourValues)
Fill a supplied list with contour values.
Store zero or more vtkInformation instances.
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
Generate numContours equally spaced contour values between the specified range.
vtkIdType GetNumberOfContours()
Get the number of contours in the list of contour values.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
generate filled regions from segmented 2D image data