VTK  9.7.20260727
vtkAxisAlignedReflectionFilter.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
25
26#ifndef vtkAxisAlignedReflectionFilter_h
27#define vtkAxisAlignedReflectionFilter_h
28
30#include "vtkFiltersGeneralModule.h" // for export macro
31#include "vtkPlane.h" // for vtkPlane class
32#include "vtkSmartPointer.h" // for smart pointer
33
34VTK_ABI_NAMESPACE_BEGIN
36class vtkDataSet;
40class vtkImageData;
44class vtkPolyData;
47
48class VTKFILTERSGENERAL_EXPORT vtkAxisAlignedReflectionFilter : public vtkCompositeDataSetAlgorithm
49{
50public:
52
54 void PrintSelf(ostream& os, vtkIndent indent) override;
55
57 {
61 };
62
64 {
65 PLANE = 0,
66 X_MIN = 1,
67 Y_MIN = 2,
68 Z_MIN = 3,
69 X_MAX = 4,
70 Y_MAX = 5,
71 Z_MAX = 6,
72 };
73
75
79 vtkSetSmartPointerMacro(ReflectionPlane, vtkPlane);
80 vtkGetSmartPointerMacro(ReflectionPlane, vtkPlane);
82
84
91 vtkSetClampMacro(PlaneMode, int, 0, 6);
92 vtkGetMacro(PlaneMode, int);
101
103
108 vtkSetMacro(CopyInput, bool);
109 vtkGetMacro(CopyInput, bool);
110 vtkBooleanMacro(CopyInput, bool);
112
114
122 vtkSetMacro(ReflectAllInputArrays, bool);
123 vtkGetMacro(ReflectAllInputArrays, bool);
124 vtkBooleanMacro(ReflectAllInputArrays, bool);
126
133
134protected:
137
140 int FillInputPortInformation(int port, vtkInformation* info) override;
141
147 virtual void ComputeBounds(vtkDataObject* input, double bounds[6]);
148
149private:
151 void operator=(const vtkAxisAlignedReflectionFilter&) = delete;
152
156 void FindAndReflectArrays(vtkDataSet* input, vtkDataSet* output, int mirrorDir[3],
157 int mirrorSymmetricTensorDir[6], int mirrorTensorDir[9]);
158
162 bool ProcessPDC(vtkPartitionedDataSetCollection* inputPDC,
163 vtkPartitionedDataSetCollection* outputPDC, double bounds[6]);
164
168 bool ProcessMB(
169 vtkMultiBlockDataSet* inputMB, vtkPartitionedDataSetCollection* outputMB, double bounds[6]);
170
174 bool ProcessPDS(
175 vtkPartitionedDataSet* inputPDS, vtkPartitionedDataSetCollection* outputPDC, double bounds[6]);
176
180 bool ProcessDO(
181 vtkDataObject* inputDObj, vtkPartitionedDataSetCollection* outputPDC, double bounds[6]);
182
186 bool ProcessLeaf(vtkDataObject* inputDO, vtkDataObject* outputDO, double bounds[6]);
187
189
192 void ProcessExplicitStructuredGrid(vtkExplicitStructuredGrid* input,
193 vtkExplicitStructuredGrid* output, double constant[3], int mirrorDir[3],
194 int mirrorSymmetricTensorDir[6], int mirrorTensorDir[9]);
195 void ProcessHtg(vtkHyperTreeGrid* input, vtkHyperTreeGrid* output, int mirrorDir[3],
196 int mirrorSymmetricTensorDir[6], int mirrorTensorDir[9]);
197 void ProcessImageData(vtkImageData* input, vtkImageData* output, double constant[3],
198 int mirrorDir[3], int mirrorSymmetricTensorDir[6], int mirrorTensorDir[9]);
199 void ProcessPolyData(vtkPolyData* input, vtkPolyData* output, double constant[3],
200 int mirrorDir[3], int mirrorSymmetricTensorDir[6], int mirrorTensorDir[9]);
201 void ProcessRectilinearGrid(vtkRectilinearGrid* input, vtkRectilinearGrid* output,
202 double constant[3], int mirrorDir[3], int mirrorSymmetricTensorDir[6], int mirrorTensorDir[9]);
203 void ProcessStructuredGrid(vtkStructuredGrid* input, vtkStructuredGrid* output,
204 double constant[3], int mirrorDir[3], int mirrorSymmetricTensorDir[6], int mirrorTensorDir[9]);
206
211 bool GetMirrorValues(
212 double bounds[6], int mirrorDir[3], int mirrorSymmetricTensorDir[6], int mirrorTensorDir[9]);
213
214 bool CopyInput = true;
215 bool ReflectAllInputArrays = false;
216 int PlaneMode = PLANE;
217 vtkSmartPointer<vtkPlane> ReflectionPlane;
218
219 PlaneAxis PlaneAxisInternal = X_PLANE;
220 double PlaneOriginInternal[3] = { 0.0, 0.0, 0.0 };
221
223};
224
225VTK_ABI_NAMESPACE_END
226#endif
void SetPlaneModeToZMax()
Determines which plane to reflect across.
~vtkAxisAlignedReflectionFilter() override
void SetPlaneModeToZMin()
Determines which plane to reflect across.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetPlaneModeToXMin()
Determines which plane to reflect across.
virtual void SetPlaneMode(int)
Determines which plane to reflect across.
void SetPlaneModeToPlane()
Determines which plane to reflect across.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkMTimeType GetMTime() override
Get the last modified time of this filter.
void SetPlaneModeToYMax()
Determines which plane to reflect across.
void SetPlaneModeToXMax()
Determines which plane to reflect across.
static vtkAxisAlignedReflectionFilter * New()
void SetPlaneModeToYMin()
Determines which plane to reflect across.
virtual void ComputeBounds(vtkDataObject *input, double bounds[6])
Compute the bounds of the input data object.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkDataObjectMeshCache is a class to store and reuse the mesh of a vtkDataSet, while forwarding data ...
general representation of visualization data
represent and manipulate attribute data in a dataset
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
structured grid with explicit topology and geometry
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Composite dataset that organizes datasets into blocks.
Allocate and hold a VTK object.
Definition vtkNew.h:168
Composite dataset that groups datasets as a collection.
composite dataset to encapsulates a dataset consisting of partitions.
perform various plane computations
Definition vtkPlane.h:141
concrete dataset represents vertices, lines, polygons, and triangle strips
a dataset that is topologically regular with variable spacing in the three coordinate directions
Hold a reference to a vtkObjectBase instance.
topologically regular array of data
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318