VTK  9.3.1
vtkGenericCutter.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
37 #ifndef vtkGenericCutter_h
38 #define vtkGenericCutter_h
39 
40 #include "vtkFiltersGenericModule.h" // For export macro
41 #include "vtkPolyDataAlgorithm.h"
42 
43 VTK_ABI_NAMESPACE_BEGIN
44 class vtkContourValues;
45 
48 class vtkPointData;
49 class vtkCellData;
50 
51 class VTKFILTERSGENERIC_EXPORT vtkGenericCutter : public vtkPolyDataAlgorithm
52 {
53 public:
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
61  static vtkGenericCutter* New();
62 
67  void SetValue(int i, double value);
68 
72  double GetValue(int i);
73 
78  double* GetValues();
79 
85  void GetValues(double* contourValues);
86 
92  void SetNumberOfContours(int number);
93 
97  vtkIdType GetNumberOfContours();
98 
103  void GenerateValues(int numContours, double range[2]);
104 
109  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
110 
115  vtkMTimeType GetMTime() override;
116 
118 
121  virtual void SetCutFunction(vtkImplicitFunction*);
122  vtkGetObjectMacro(CutFunction, vtkImplicitFunction);
124 
126 
131  vtkSetMacro(GenerateCutScalars, vtkTypeBool);
132  vtkGetMacro(GenerateCutScalars, vtkTypeBool);
133  vtkBooleanMacro(GenerateCutScalars, vtkTypeBool);
135 
137 
141  void SetLocator(vtkIncrementalPointLocator* locator);
142  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
144 
149  void CreateDefaultLocator();
150 
151 protected:
152  vtkGenericCutter(vtkImplicitFunction* cf = nullptr);
153  ~vtkGenericCutter() override;
154 
156 
160  int FillInputPortInformation(int, vtkInformation*) override;
162 
167 
168  // Used internal by vtkGenericAdaptorCell::Contour()
172 
173 private:
174  vtkGenericCutter(const vtkGenericCutter&) = delete;
175  void operator=(const vtkGenericCutter&) = delete;
176 };
177 
178 VTK_ABI_NAMESPACE_END
179 #endif
abstract interface for implicit functions
cut a vtkGenericDataSet with an implicit function or scalar data
helper object to manage setting and generating contour values
vtkTypeBool GenerateCutScalars
represent and manipulate point attribute data
Definition: vtkPointData.h:29
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.
represent and manipulate cell attribute data
Definition: vtkCellData.h:30
vtkCellData * SecondaryCD
Abstract class in support of both point location and point insertion.
vtkImplicitFunction * CutFunction
int vtkIdType
Definition: vtkType.h:315
vtkContourValues * ContourValues
vtkPointData * InternalPD
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:64
vtkIncrementalPointLocator * Locator
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkPointData * SecondaryPD
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.