VTK  9.7.1
vtkStructuredDataPlaneCutter.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
36 #ifndef vtkStructuredDataPlaneCutter_h
37 #define vtkStructuredDataPlaneCutter_h
38 
39 #include "vtkFiltersCoreModule.h" // For export macro
40 #include "vtkPolyDataAlgorithm.h"
41 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
42 
43 VTK_ABI_NAMESPACE_BEGIN
44 class vtkSphereTree;
45 class vtkPlane;
46 
47 class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkStructuredDataPlaneCutter
48  : public vtkPolyDataAlgorithm
49 {
50 public:
52 
57  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
63  vtkMTimeType GetMTime() override;
64 
66 
71  virtual void SetPlane(vtkPlane*);
72  vtkGetObjectMacro(Plane, vtkPlane);
74 
76 
81  vtkSetMacro(GeneratePolygons, bool);
82  vtkGetMacro(GeneratePolygons, bool);
83  vtkBooleanMacro(GeneratePolygons, bool);
85 
87 
95  vtkSetMacro(BuildTree, bool);
96  vtkGetMacro(BuildTree, bool);
97  vtkBooleanMacro(BuildTree, bool);
99 
101 
109  vtkSetMacro(BuildHierarchy, bool);
110  vtkGetMacro(BuildHierarchy, bool);
111  vtkBooleanMacro(BuildHierarchy, bool);
113 
115 
119  virtual void SetSphereTree(vtkSphereTree*);
120  vtkGetObjectMacro(SphereTree, vtkSphereTree);
122 
124 
130  vtkSetMacro(ComputeNormals, bool);
131  vtkGetMacro(ComputeNormals, bool);
132  vtkBooleanMacro(ComputeNormals, bool);
134 
136 
141  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
142  vtkGetMacro(OutputPointsPrecision, int);
144 
146 
152  vtkSetMacro(InterpolateAttributes, bool);
153  vtkGetMacro(InterpolateAttributes, bool);
154  vtkBooleanMacro(InterpolateAttributes, bool);
156 
158 
166  vtkSetClampMacro(BatchSize, unsigned int, 1, VTK_INT_MAX);
167  vtkGetMacro(BatchSize, unsigned int);
169 protected:
171  ~vtkStructuredDataPlaneCutter() override;
172 
173  vtkPlane* Plane = nullptr;
174  vtkSphereTree* SphereTree = nullptr;
175  bool ComputeNormals = false;
176  bool InterpolateAttributes = true;
177  bool GeneratePolygons = true;
178  bool BuildTree = true;
179  bool BuildHierarchy = true;
180  int OutputPointsPrecision = DEFAULT_PRECISION;
181  unsigned int BatchSize = 1000;
182 
184  {
187 
189  : Input(nullptr)
190  , LastMTime(0)
191  {
192  }
194  : Input(input)
195  , LastMTime(mtime)
196  {
197  }
198  };
200 
201  // Pipeline-related methods
203  int FillInputPortInformation(int, vtkInformation* info) override;
205 
206  // Garbage collection method
207  void ReportReferences(vtkGarbageCollector*) override;
208 
209 private:
211  void operator=(const vtkStructuredDataPlaneCutter&) = delete;
212 };
213 
214 VTK_ABI_NAMESPACE_END
215 #endif
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:192
void ReportReferences(vtkGarbageCollector *) override
Detect and break reference loops.
static vtkPolyDataAlgorithm * New()
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkInputInfo(vtkDataSet *input, vtkMTimeType mtime)
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.
perform various plane computations
Definition: vtkPlane.h:31
class to build and traverse sphere trees
Definition: vtkSphereTree.h:61
fast plane cutting of vtkImageData/vtkRectilinearGrid/vtkStructuredGrid
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.