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  // see algorithm for more info
96 
97  virtual int RequestData(vtkInformation *,
100 
102 
103  virtual void CreatePeriodicDataSet(vtkCompositeDataIterator* loc,
104  vtkCompositeDataSet* output,
105  vtkCompositeDataSet* input) = 0;
107 
109 
110  virtual void SetPeriodNumber(vtkCompositeDataIterator* loc,
111  vtkCompositeDataSet* output,
112  int nbPeriod) = 0;
114 
115  std::vector<int> PeriodNumbers; // Periods numbers by leaf
117 
118 private:
119  vtkPeriodicFilter(const vtkPeriodicFilter&); // Not implemented.
120  void operator=(const vtkPeriodicFilter&); // Not implemented.
121 
122  int IterationMode;
123  int NumberOfPeriods; // User provided number of periods
124 
125  std::set<vtkIdType> Indices; // Selected indices
126 };
127 
128 #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()
virtual int FillInputPortInformation(int port, vtkInformation *info)
void PrintSelf(ostream &os, vtkIndent indent)
Store zero or more vtkInformation instances.
superclass for composite data iterators
std::vector< int > PeriodNumbers