VTK  9.3.20240329
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 
42 VTK_ABI_NAMESPACE_BEGIN
43 class vtkSphereTree;
44 class vtkPlane;
45 
46 class VTKFILTERSCORE_EXPORT vtkStructuredDataPlaneCutter : public vtkPolyDataAlgorithm
47 {
48 public:
50 
55  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
61  vtkMTimeType GetMTime() override;
62 
64 
69  virtual void SetPlane(vtkPlane*);
70  vtkGetObjectMacro(Plane, vtkPlane);
72 
74 
79  vtkSetMacro(GeneratePolygons, bool);
80  vtkGetMacro(GeneratePolygons, bool);
81  vtkBooleanMacro(GeneratePolygons, bool);
83 
85 
93  vtkSetMacro(BuildTree, bool);
94  vtkGetMacro(BuildTree, bool);
95  vtkBooleanMacro(BuildTree, bool);
97 
99 
107  vtkSetMacro(BuildHierarchy, bool);
108  vtkGetMacro(BuildHierarchy, bool);
109  vtkBooleanMacro(BuildHierarchy, bool);
111 
113 
117  virtual void SetSphereTree(vtkSphereTree*);
118  vtkGetObjectMacro(SphereTree, vtkSphereTree);
120 
122 
128  vtkSetMacro(ComputeNormals, bool);
129  vtkGetMacro(ComputeNormals, bool);
130  vtkBooleanMacro(ComputeNormals, bool);
132 
134 
139  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
140  vtkGetMacro(OutputPointsPrecision, int);
142 
144 
150  vtkSetMacro(InterpolateAttributes, bool);
151  vtkGetMacro(InterpolateAttributes, bool);
152  vtkBooleanMacro(InterpolateAttributes, bool);
154 
156 
164  vtkSetClampMacro(BatchSize, unsigned int, 1, VTK_INT_MAX);
165  vtkGetMacro(BatchSize, unsigned int);
167 protected:
170 
171  vtkPlane* Plane = nullptr;
172  vtkSphereTree* SphereTree = nullptr;
173  bool ComputeNormals = false;
174  bool InterpolateAttributes = true;
175  bool GeneratePolygons = true;
176  bool BuildTree = true;
177  bool BuildHierarchy = true;
178  int OutputPointsPrecision = DEFAULT_PRECISION;
179  unsigned int BatchSize = 1000;
180 
182  {
185 
187  : Input(nullptr)
188  , LastMTime(0)
189  {
190  }
192  : Input(input)
193  , LastMTime(mtime)
194  {
195  }
196  };
198 
199  // Pipeline-related methods
203 
204 private:
206  void operator=(const vtkStructuredDataPlaneCutter&) = delete;
207 };
208 
209 VTK_ABI_NAMESPACE_END
210 #endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
perform various plane computations
Definition: vtkPlane.h:135
Superclass for algorithms that produce only polydata as output.
class to build and traverse sphere trees
Definition: vtkSphereTree.h:62
fast plane cutting of vtkImageData/vtkRectilinearGrid/vtkStructuredGrid
vtkMTimeType GetMTime() override
The modified time depends on the delegated cut plane.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard construction and print methods.
virtual void SetPlane(vtkPlane *)
Specify the plane (an implicit function) to perform the cutting.
int FillInputPortInformation(int, vtkInformation *info) override
Fill the input port information objects for this algorithm.
static vtkStructuredDataPlaneCutter * New()
Standard construction and print methods.
virtual void SetSphereTree(vtkSphereTree *)
Specify the sphere tree object.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
~vtkStructuredDataPlaneCutter() override
@ info
Definition: vtkX3D.h:376
vtkInputInfo(vtkDataSet *input, vtkMTimeType mtime)
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
#define VTK_INT_MAX
Definition: vtkType.h:144