VTK  9.4.20241217
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
41
42VTK_ABI_NAMESPACE_BEGIN
43class vtkSphereTree;
44class vtkPlane;
45
46class VTKFILTERSCORE_EXPORT vtkStructuredDataPlaneCutter : public vtkPolyDataAlgorithm
47{
48public:
50
55 void PrintSelf(ostream& os, vtkIndent indent) override;
57
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
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);
167protected:
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
201 int FillInputPortInformation(int, vtkInformation* info) override;
203
204 // Garbage collection method
206
207private:
209 void operator=(const vtkStructuredDataPlaneCutter&) = delete;
210};
211
212VTK_ABI_NAMESPACE_END
213#endif
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
Detect and break reference loops.
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:138
Superclass for algorithms that produce only polydata as output.
class to build and traverse sphere trees
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.
void ReportReferences(vtkGarbageCollector *) override
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
vtkInputInfo(vtkDataSet *input, vtkMTimeType mtime)
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_INT_MAX
Definition vtkType.h:144