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 
34 #ifndef vtkPeriodicFilter_h
35 #define vtkPeriodicFilter_h
36 
37 #include "vtkFiltersParallelModule.h" // For export macro
39 
40 #include <set> // For block selection
41 #include <vector> // For pieces number
42 
47 
48 #define VTK_ITERATION_MODE_DIRECT_NB 0 // Generate a user-provided number of periods
49 #define VTK_ITERATION_MODE_MAX 1 // Generate a maximum of periods, i.e. a full period.
50 
52 {
53 public:
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
58 
61  vtkSetClampMacro(IterationMode, int,
64  vtkGetMacro(IterationMode, int);
66  { this->SetIterationMode(VTK_ITERATION_MODE_DIRECT_NB); }
68  { this->SetIterationMode(VTK_ITERATION_MODE_MAX); }
70 
72 
73  vtkSetMacro(NumberOfPeriods, int);
74  vtkGetMacro(NumberOfPeriods, int);
76 
82  virtual void AddIndex(unsigned int index);
83 
85  virtual void RemoveIndex(unsigned int index);
86 
88  virtual void RemoveAllIndices();
89 
90 protected:
93 
94  virtual int RequestData(vtkInformation *,
97 
99 
100  virtual void CreatePeriodicDataSet(vtkCompositeDataIterator* loc,
101  vtkCompositeDataSet* output,
102  vtkCompositeDataSet* input) = 0;
104 
106 
107  virtual void SetPeriodNumber(vtkCompositeDataIterator* loc,
108  vtkCompositeDataSet* output,
109  int nbPeriod) = 0;
111 
112  std::vector<int> PeriodNumbers; // Periods numbers by leaf
114 
115 private:
116  vtkPeriodicFilter(const vtkPeriodicFilter&); // Not implemented.
117  void operator=(const vtkPeriodicFilter&); // Not implemented.
118 
119  int IterationMode;
120  int NumberOfPeriods; // User provided number of periods
121 
122  std::set<vtkIdType> Indices; // Selected indices
123 };
124 
125 #endif
#define VTK_ITERATION_MODE_DIRECT_NB
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
#define VTK_ITERATION_MODE_MAX
#define VTKFILTERSPARALLEL_EXPORT
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.
A filter to produce mapped periodic multiblock dataset from a single block.
void SetIterationModeToDirectNb()
void PrintSelf(ostream &os, vtkIndent indent)
Store zero or more vtkInformation instances.
superclass for composite data iterators
std::vector< int > PeriodNumbers