VTK
vtkReflectionFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkReflectionFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
25 #ifndef vtkReflectionFilter_h
26 #define vtkReflectionFilter_h
27 
28 #include "vtkDataObjectAlgorithm.h"
29 #include "vtkFiltersGeneralModule.h" // For export macro
30 
32 class vtkDataSet;
33 
34 class VTKFILTERSGENERAL_EXPORT vtkReflectionFilter : public vtkDataObjectAlgorithm
35 {
36 public:
37  static vtkReflectionFilter *New();
38 
40  void PrintSelf(ostream &os, vtkIndent indent) override;
41 
43  {
44  USE_X_MIN = 0,
45  USE_Y_MIN = 1,
46  USE_Z_MIN = 2,
47  USE_X_MAX = 3,
48  USE_Y_MAX = 4,
49  USE_Z_MAX = 5,
50  USE_X = 6,
51  USE_Y = 7,
52  USE_Z = 8
53  };
54 
56 
59  vtkSetClampMacro(Plane, int, 0, 8);
60  vtkGetMacro(Plane, int);
61  void SetPlaneToX() { this->SetPlane(USE_X); };
62  void SetPlaneToY() { this->SetPlane(USE_Y); };
63  void SetPlaneToZ() { this->SetPlane(USE_Z); };
64  void SetPlaneToXMin() { this->SetPlane(USE_X_MIN); };
65  void SetPlaneToYMin() { this->SetPlane(USE_Y_MIN); };
66  void SetPlaneToZMin() { this->SetPlane(USE_Z_MIN); };
67  void SetPlaneToXMax() { this->SetPlane(USE_X_MAX); };
68  void SetPlaneToYMax() { this->SetPlane(USE_Y_MAX); };
69  void SetPlaneToZMax() { this->SetPlane(USE_Z_MAX); };
71 
73 
77  vtkSetMacro(Center, double);
78  vtkGetMacro(Center, double);
80 
82 
86  vtkSetMacro(CopyInput, vtkTypeBool);
87  vtkGetMacro(CopyInput, vtkTypeBool);
88  vtkBooleanMacro(CopyInput, vtkTypeBool);
90 
92 
99  vtkSetMacro(FlipAllInputArrays, bool);
100  vtkGetMacro(FlipAllInputArrays, bool);
101  vtkBooleanMacro(FlipAllInputArrays, bool);
103 
104 protected:
106  ~vtkReflectionFilter() override;
107 
115  vtkInformationVector*) override;
116 
120  virtual int RequestDataInternal(vtkDataSet* input, vtkUnstructuredGrid* output,
121  double bounds[6]);
122 
126  virtual int ComputeBounds(vtkDataObject* input, double bounds[6]);
127 
131  virtual vtkIdType ReflectNon3DCell(vtkDataSet* input, vtkUnstructuredGrid* output,
132  vtkIdType cellId, vtkIdType numInputPoints);
133 
135  int FillInputPortInformation(int port, vtkInformation *info) override;
136 
137  void FlipTuple(double* tuple, int* mirrorDir, int nComp);
138 
139  int Plane;
140  double Center;
143 
144 private:
145  vtkReflectionFilter(const vtkReflectionFilter&) = delete;
146  void operator=(const vtkReflectionFilter&) = delete;
147 };
148 
149 #endif
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
void SetPlaneToYMin()
Set the normal of the plane to use as mirror.
reflects a data set across a plane
void SetPlaneToXMax()
Set the normal of the plane to use as mirror.
Store vtkAlgorithm input/output information.
void SetPlaneToY()
Set the normal of the plane to use as mirror.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
static vtkDataObjectAlgorithm * New()
void SetPlaneToZMax()
Set the normal of the plane to use as mirror.
int vtkIdType
Definition: vtkType.h:347
int vtkTypeBool
Definition: vtkABI.h:69
a simple class to control print indentation
Definition: vtkIndent.h:33
void SetPlaneToXMin()
Set the normal of the plane to use as mirror.
dataset represents arbitrary combinations of all possible cell types
void SetPlaneToZMin()
Set the normal of the plane to use as mirror.
void SetPlaneToYMax()
Set the normal of the plane to use as mirror.
void SetPlaneToX()
Set the normal of the plane to use as mirror.
Superclass for algorithms that produce only data object as output.
void SetPlaneToZ()
Set the normal of the plane to use as mirror.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Store zero or more vtkInformation instances.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
general representation of visualization data
Definition: vtkDataObject.h:58
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.