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 
40 #ifndef vtkAngularPeriodicFilter_h
41 #define vtkAngularPeriodicFilter_h
42 
43 #include "vtkFiltersParallelModule.h" // For export macro
44 #include "vtkPeriodicFilter.h"
45 
48 class vtkPointSet;
49 
50 #define VTK_ROTATION_MODE_DIRECT_ANGLE 0 // Use user-provided angle
51 #define VTK_ROTATION_MODE_ARRAY_VALUE 1 // Use array from input data as angle
52 
54 {
55 public:
56  static vtkAngularPeriodicFilter* New();
58  void PrintSelf(ostream& os, vtkIndent indent);
59 
61 
64  vtkSetClampMacro(RotationMode, int,
66  vtkGetMacro(RotationMode, int);
68  { this->SetRotationMode(VTK_ROTATION_MODE_DIRECT_ANGLE); }
70  { this->SetRotationMode(VTK_ROTATION_MODE_ARRAY_VALUE); }
72 
74 
76  vtkSetMacro(RotationAngle, double);
77  vtkGetMacro(RotationAngle, double);
79 
81 
83  vtkSetStringMacro(RotationArrayName);
84  vtkGetStringMacro(RotationArrayName);
86 
88 
89  vtkSetClampMacro(RotationAxis, int, 0, 2);
90  vtkGetMacro(RotationAxis, int);
91  void SetRotationAxisToX();
92  void SetRotationAxisToY();
93  void SetRotationAxisToZ();
95 
97 
98  vtkSetVector3Macro(Center, double);
99  vtkGetVector3Macro(Center, double);
101 
102 protected:
105 
106  virtual int RequestData(vtkInformation *,
109 
111 
112  vtkDataArray* TransformDataArray(vtkDataArray* inputArray,
113  double angle,
114  bool useCenter = true,
115  bool normalize = false);
117 
119 
121  void AppendPeriodicPiece(double angle, vtkIdType iPiece,
122  vtkDataObject* inputNode,
123  vtkMultiPieceDataSet* multiPiece);
125 
127 
128  virtual void SetPeriodNumber(vtkCompositeDataIterator* loc,
129  vtkCompositeDataSet* output,
130  int nbPeriod);
132 
134 
135  void ComputePeriodicMesh(vtkPointSet* dataset, vtkPointSet* rotatedDataset,
136  double angle);
138 
140 
141  void ComputeAngularPeriodicData(vtkDataSetAttributes* data,
142  vtkDataSetAttributes* rotatedData,
143  double angle);
145 
147 
149  vtkCompositeDataSet* output,
150  vtkCompositeDataSet* input);
152 
154 
156  virtual void GeneratePieceName(vtkCompositeDataSet* input,
157  vtkCompositeDataIterator* inputLoc,
158  vtkMultiPieceDataSet* output,
159  vtkIdType outputId);
160 private:
161  vtkAngularPeriodicFilter(const vtkAngularPeriodicFilter&); // Not implemented.
162  void operator=(const vtkAngularPeriodicFilter&); // Not implemented.
164 
165  int RotationMode;
166  char* RotationArrayName; // user-provided array name to use as angle, for ROTATION_MODE_ARRAY_VALUE
167 
168  // Transform parameters
169  double RotationAngle;
170  int RotationAxis; // Axis to rotate around, 0 for X, 1 for Y, 2 for Z
171  double Center[3]; // Center of rotation
172 };
173 
174 #endif
virtual void SetPeriodNumber(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, int nbPeriod)=0
#define VTK_ROTATION_MODE_ARRAY_VALUE
Store vtkAlgorithm input/output information.
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:44
#define VTK_ROTATION_MODE_DIRECT_ANGLE
int vtkIdType
Definition: vtkType.h:275
#define VTKFILTERSPARALLEL_EXPORT
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:38
composite dataset to encapsulates pieces of dataset.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
void PrintSelf(ostream &os, vtkIndent indent)
represent and manipulate attribute data in a dataset
A filter to produce mapped periodic multiblock dataset from a single block.
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
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:64