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 
41 #ifndef vtkAngularPeriodicFilter_h
42 #define vtkAngularPeriodicFilter_h
43 
44 #include "vtkFiltersParallelModule.h" // For export macro
45 #include "vtkPeriodicFilter.h"
46 
49 class vtkPointSet;
50 
51 #define VTK_ROTATION_MODE_DIRECT_ANGLE 0 // Use user-provided angle
52 #define VTK_ROTATION_MODE_ARRAY_VALUE 1 // Use array from input data as angle
53 
54 class VTKFILTERSPARALLEL_EXPORT vtkAngularPeriodicFilter : public vtkPeriodicFilter
55 {
56 public:
59  void PrintSelf(ostream& os, vtkIndent indent);
60 
62 
67  vtkSetMacro(ComputeRotationsOnTheFly, bool);
68  vtkGetMacro(ComputeRotationsOnTheFly, bool);
69  vtkBooleanMacro(ComputeRotationsOnTheFly, bool);
71 
73 
78  vtkSetClampMacro(RotationMode, int,
80  vtkGetMacro(RotationMode, int);
82  { this->SetRotationMode(VTK_ROTATION_MODE_DIRECT_ANGLE); }
84  { this->SetRotationMode(VTK_ROTATION_MODE_ARRAY_VALUE); }
86 
88 
93  vtkSetMacro(RotationAngle, double);
94  vtkGetMacro(RotationAngle, double);
96 
98 
102  vtkSetStringMacro(RotationArrayName);
103  vtkGetStringMacro(RotationArrayName);
105 
107 
110  vtkSetClampMacro(RotationAxis, int, 0, 2);
111  vtkGetMacro(RotationAxis, int);
116 
118 
121  vtkSetVector3Macro(Center, double);
122  vtkGetVector3Macro(Center, double);
124 
125 protected:
128 
132 
137  double angle,
138  bool useCenter = true,
139  bool normalize = false);
140 
144  void AppendPeriodicPiece(double angle, vtkIdType iPiece,
145  vtkDataObject* inputNode,
146  vtkMultiPieceDataSet* multiPiece);
147 
152  vtkCompositeDataSet* output,
153  int nbPeriod);
154 
158  void ComputePeriodicMesh(vtkPointSet* dataset, vtkPointSet* rotatedDataset,
159  double angle);
160 
165  vtkDataSetAttributes* rotatedData,
166  double angle);
167 
172  vtkCompositeDataSet* output,
173  vtkCompositeDataSet* input);
174 
179  vtkCompositeDataIterator* inputLoc,
180  vtkMultiPieceDataSet* output,
181  vtkIdType outputId);
182 
183 private:
184  vtkAngularPeriodicFilter(const vtkAngularPeriodicFilter&) VTK_DELETE_FUNCTION;
185  void operator=(const vtkAngularPeriodicFilter&) VTK_DELETE_FUNCTION;
186 
187  bool ComputeRotationsOnTheFly;
188 
189  int RotationMode;
190  char* RotationArrayName; // user-provided array name to use as angle, for ROTATION_MODE_ARRAY_VALUE
191 
192  // Transform parameters
193  double RotationAngle;
194  int RotationAxis; // Axis to rotate around, 0 for X, 1 for Y, 2 for Z
195  double Center[3]; // Center of rotation
196 };
197 
198 #endif
vtkAngularPeriodicFilter
A filter to produce mapped angular periodic multiblock dataset from a single block,...
Definition: vtkAngularPeriodicFilter.h:55
vtkAngularPeriodicFilter::CreatePeriodicDataSet
void CreatePeriodicDataSet(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, vtkCompositeDataSet *input)
Create a periodic data, leaf of the tree.
vtkMultiPieceDataSet
composite dataset to encapsulates pieces of dataset.
Definition: vtkMultiPieceDataSet.h:44
vtkAngularPeriodicFilter::SetRotationAxisToZ
void SetRotationAxisToZ()
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkAngularPeriodicFilter::ComputeAngularPeriodicData
void ComputeAngularPeriodicData(vtkDataSetAttributes *data, vtkDataSetAttributes *rotatedData, double angle)
Compute periodic point/cell data, using provided angle.
vtkPeriodicFilter
A filter to produce mapped periodic multiblock dataset from a single block.
Definition: vtkPeriodicFilter.h:53
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:59
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkAngularPeriodicFilter::~vtkAngularPeriodicFilter
~vtkAngularPeriodicFilter()
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkCompositeDataSet
abstract superclass for composite (multi-block or AMR) datasets
Definition: vtkCompositeDataSet.h:52
vtkPeriodicFilter.h
vtkAngularPeriodicFilter::SetRotationAxisToY
void SetRotationAxisToY()
vtkAngularPeriodicFilter::SetRotationModeToArrayValue
void SetRotationModeToArrayValue()
Definition: vtkAngularPeriodicFilter.h:83
VTK_ROTATION_MODE_DIRECT_ANGLE
#define VTK_ROTATION_MODE_DIRECT_ANGLE
Definition: vtkAngularPeriodicFilter.h:51
vtkAngularPeriodicFilter::SetRotationModeToDirectAngle
void SetRotationModeToDirectAngle()
Definition: vtkAngularPeriodicFilter.h:81
vtkCompositeDataIterator
superclass for composite data iterators
Definition: vtkCompositeDataIterator.h:39
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkAngularPeriodicFilter::AppendPeriodicPiece
void AppendPeriodicPiece(double angle, vtkIdType iPiece, vtkDataObject *inputNode, vtkMultiPieceDataSet *multiPiece)
Append a periodic piece to dataset, by computing rotated mesh and data.
vtkAngularPeriodicFilter::New
static vtkAngularPeriodicFilter * New()
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkAngularPeriodicFilter::vtkAngularPeriodicFilter
vtkAngularPeriodicFilter()
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkAngularPeriodicFilter::TransformDataArray
vtkDataArray * TransformDataArray(vtkDataArray *inputArray, double angle, bool useCenter=true, bool normalize=false)
Create a transform copy of the provided data array.
vtkAngularPeriodicFilter::SetRotationAxisToX
void SetRotationAxisToX()
vtkAngularPeriodicFilter::SetPeriodNumber
virtual void SetPeriodNumber(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, int nbPeriod)
Manually set the number of period on a specific leaf.
vtkPointSet
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:43
vtkAngularPeriodicFilter::ComputePeriodicMesh
void ComputePeriodicMesh(vtkPointSet *dataset, vtkPointSet *rotatedDataset, double angle)
Compute periodic pointset, rotating point, using provided angle.
vtkAngularPeriodicFilter::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkAngularPeriodicFilter::GeneratePieceName
virtual void GeneratePieceName(vtkCompositeDataSet *input, vtkCompositeDataIterator *inputLoc, vtkMultiPieceDataSet *output, vtkIdType outputId)
Generate a name for a piece in the periodic dataset from the input dataset.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
VTK_ROTATION_MODE_ARRAY_VALUE
#define VTK_ROTATION_MODE_ARRAY_VALUE
Definition: vtkAngularPeriodicFilter.h:52
vtkAngularPeriodicFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.