VTK  9.5.20250911
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
42
43VTK_ABI_NAMESPACE_BEGIN
44class vtkSphereTree;
45class vtkPlane;
46
49{
50public:
52
57 void PrintSelf(ostream& os, vtkIndent indent) override;
59
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
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);
169protected:
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
208
209private:
211 void operator=(const vtkStructuredDataPlaneCutter&) = delete;
212};
213
214VTK_ABI_NAMESPACE_END
215#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:141
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:287
#define VTK_INT_MAX
Definition vtkType.h:161
#define VTK_MARSHALAUTO