VTK
vtkAngularPeriodicFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPeriodicFiler.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 =========================================================================*/
15 
38 #ifndef vtkAngularPeriodicFilter_h
39 #define vtkAngularPeriodicFilter_h
40 
41 #include "vtkFiltersParallelModule.h" // For export macro
42 #include "vtkPeriodicFilter.h"
43 
46 class vtkPointSet;
47 
48 #define VTK_ROTATION_MODE_DIRECT_ANGLE 0 // Use user-provided angle
49 #define VTK_ROTATION_MODE_ARRAY_VALUE 1 // Use array from input data as angle
50 
51 class VTKFILTERSPARALLEL_EXPORT vtkAngularPeriodicFilter : public vtkPeriodicFilter
52 {
53 public:
54  static vtkAngularPeriodicFilter* New();
56  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
57 
59 
64  vtkSetMacro(ComputeRotationsOnTheFly, bool);
65  vtkGetMacro(ComputeRotationsOnTheFly, bool);
66  vtkBooleanMacro(ComputeRotationsOnTheFly, bool);
68 
70 
75  vtkSetClampMacro(RotationMode, int,
77  vtkGetMacro(RotationMode, int);
79  { this->SetRotationMode(VTK_ROTATION_MODE_DIRECT_ANGLE); }
81  { this->SetRotationMode(VTK_ROTATION_MODE_ARRAY_VALUE); }
83 
85 
90  vtkSetMacro(RotationAngle, double);
91  vtkGetMacro(RotationAngle, double);
93 
95 
99  vtkSetStringMacro(RotationArrayName);
100  vtkGetStringMacro(RotationArrayName);
102 
104 
107  vtkSetClampMacro(RotationAxis, int, 0, 2);
108  vtkGetMacro(RotationAxis, int);
109  void SetRotationAxisToX();
110  void SetRotationAxisToY();
111  void SetRotationAxisToZ();
113 
115 
118  vtkSetVector3Macro(Center, double);
119  vtkGetVector3Macro(Center, double);
121 
122 protected:
124  ~vtkAngularPeriodicFilter() VTK_OVERRIDE;
125 
128  vtkInformationVector *) VTK_OVERRIDE;
129 
133  vtkDataArray* TransformDataArray(vtkDataArray* inputArray,
134  double angle,
135  bool useCenter = true,
136  bool normalize = false);
137 
141  void AppendPeriodicPiece(double angle, vtkIdType iPiece,
142  vtkDataObject* inputNode,
143  vtkMultiPieceDataSet* multiPiece);
144 
149  vtkCompositeDataSet* output,
150  int nbPeriod) VTK_OVERRIDE;
151 
155  void ComputePeriodicMesh(vtkPointSet* dataset, vtkPointSet* rotatedDataset,
156  double angle);
157 
161  void ComputeAngularPeriodicData(vtkDataSetAttributes* data,
162  vtkDataSetAttributes* rotatedData,
163  double angle);
164 
169  vtkCompositeDataSet* output,
170  vtkCompositeDataSet* input) VTK_OVERRIDE;
171 
175  virtual void GeneratePieceName(vtkCompositeDataSet* input,
176  vtkCompositeDataIterator* inputLoc,
177  vtkMultiPieceDataSet* output,
178  vtkIdType outputId);
179 
180 private:
181  vtkAngularPeriodicFilter(const vtkAngularPeriodicFilter&) VTK_DELETE_FUNCTION;
182  void operator=(const vtkAngularPeriodicFilter&) VTK_DELETE_FUNCTION;
183 
184  bool ComputeRotationsOnTheFly;
185 
186  int RotationMode;
187  char* RotationArrayName; // user-provided array name to use as angle, for ROTATION_MODE_ARRAY_VALUE
188 
189  // Transform parameters
190  double RotationAngle;
191  int RotationAxis; // Axis to rotate around, 0 for X, 1 for Y, 2 for Z
192  double Center[3]; // Center of rotation
193 };
194 
195 #endif
virtual void SetPeriodNumber(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, int nbPeriod)=0
Manually set the number of period on a specific leaf.
#define VTK_ROTATION_MODE_ARRAY_VALUE
Store vtkAlgorithm input/output information.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:39
#define VTK_ROTATION_MODE_DIRECT_ANGLE
int vtkIdType
Definition: vtkType.h:345
void SetRotationModeToArrayValue()
Set/Get The rotation mode.
static vtkMultiBlockDataSetAlgorithm * New()
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
a simple class to control print indentation
Definition: vtkIndent.h:33
composite dataset to encapsulates pieces of dataset.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
represent and manipulate attribute data in a dataset
A filter to produce mapped periodic multiblock dataset from a single block.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
A filter to produce mapped angular periodic multiblock dataset from a single block, by rotation.
virtual void CreatePeriodicDataSet(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, vtkCompositeDataSet *input)=0
Create a periodic data, leaf of the tree.
Store zero or more vtkInformation instances.
void SetRotationModeToDirectAngle()
Set/Get The rotation mode.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
general representation of visualization data
Definition: vtkDataObject.h:58