VTK
vtkPeriodicFilter.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
35#ifndef vtkPeriodicFilter_h
36#define vtkPeriodicFilter_h
37
38#include "vtkFiltersParallelModule.h" // For export macro
40
41#include <set> // For block selection
42#include <vector> // For pieces number
43
48
49#define VTK_ITERATION_MODE_DIRECT_NB 0 // Generate a user-provided number of periods
50#define VTK_ITERATION_MODE_MAX 1 // Generate a maximum of periods, i.e. a full period.
51
52class VTKFILTERSPARALLEL_EXPORT vtkPeriodicFilter : public vtkMultiBlockDataSetAlgorithm
53{
54public:
56 void PrintSelf(ostream& os, vtkIndent indent);
57
59
64 vtkSetClampMacro(IterationMode, int,
67 vtkGetMacro(IterationMode, int);
69 { this->SetIterationMode(VTK_ITERATION_MODE_DIRECT_NB); }
71 { this->SetIterationMode(VTK_ITERATION_MODE_MAX); }
73
75
79 vtkSetMacro(NumberOfPeriods, int);
80 vtkGetMacro(NumberOfPeriods, int);
82
91 virtual void AddIndex(unsigned int index);
92
96 virtual void RemoveIndex(unsigned int index);
97
101 virtual void RemoveAllIndices();
102
103protected:
106
107 // see algorithm for more info
109
113
118 vtkCompositeDataSet* output,
119 vtkCompositeDataSet* input) = 0;
120
125 vtkCompositeDataSet* output,
126 int nbPeriod) = 0;
127
128 std::vector<int> PeriodNumbers; // Periods numbers by leaf
130
131private:
132 vtkPeriodicFilter(const vtkPeriodicFilter&) VTK_DELETE_FUNCTION;
133 void operator=(const vtkPeriodicFilter&) VTK_DELETE_FUNCTION;
134
135 int IterationMode;
136 int NumberOfPeriods; // User provided number of periods
137
138 std::set<vtkIdType> Indices; // Selected indices
139};
140
141#endif
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
superclass for composite data iterators
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
composite dataset to encapsulates pieces of dataset.
A filter to produce mapped periodic multiblock dataset from a single block.
void SetIterationModeToDirectNb()
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
virtual void AddIndex(unsigned int index)
Select the periodic pieces indices.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
virtual void RemoveAllIndices()
Clear selected indices tree.
std::vector< int > PeriodNumbers
virtual void RemoveIndex(unsigned int index)
Remove an index from selected indices tress.
virtual void SetPeriodNumber(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, int nbPeriod)=0
Manually set the number of period on a specific leaf.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void CreatePeriodicDataSet(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, vtkCompositeDataSet *input)=0
Create a periodic data, leaf of the tree.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
@ index
Definition: vtkX3D.h:246
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_ITERATION_MODE_DIRECT_NB
#define VTK_ITERATION_MODE_MAX