VTK
vtkDataObjectGenerator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDataObjectGenerator.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 =========================================================================*/
40 #ifndef vtkDataObjectGenerator_h
41 #define vtkDataObjectGenerator_h
42 
43 #include "vtkFiltersCoreModule.h" // For export macro
44 #include "vtkDataObjectAlgorithm.h"
45 
46 class vtkInternalStructureCache;
47 
48 class VTKFILTERSCORE_EXPORT vtkDataObjectGenerator
50 {
51  public:
52  static vtkDataObjectGenerator *New();
54  void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE;
55 
57 
60  vtkSetStringMacro(Program);
61  vtkGetStringMacro(Program);
63 
64 protected:
66  ~vtkDataObjectGenerator() VTK_OVERRIDE;
67 
68  int RequestData(vtkInformation *req,
70  vtkInformationVector *outV) VTK_OVERRIDE;
71  int RequestDataObject(vtkInformation *req,
73  vtkInformationVector *outV) VTK_OVERRIDE;
74  int RequestInformation(vtkInformation *req,
76  vtkInformationVector *outV) VTK_OVERRIDE;
77  int RequestUpdateExtent(vtkInformation *req,
79  vtkInformationVector *outV) VTK_OVERRIDE;
80 
81  //the string to parse to create a structure
82  char *Program;
83  //a record of the structure
84  vtkInternalStructureCache *Structure;
85 
86  //Helper for RequestDataObject
88  CreateOutputDataObjects(vtkInternalStructureCache *structure);
89  //Helper for RequestData
91  FillOutputDataObjects(vtkInternalStructureCache *structure,
92  int level,
93  int stripe=0);
94 
95  //to determine which composite data stripe to fill in
96  vtkIdType Rank;
97  vtkIdType Processors;
98 
99  //create the templated atomic data sets
100  void MakeImageData1(vtkDataSet *ds);
101  void MakeImageData2(vtkDataSet *ds);
102  void MakeUniformGrid1(vtkDataSet *ds);
103  void MakeRectilinearGrid1(vtkDataSet *ds);
104  void MakeStructuredGrid1(vtkDataSet *ds);
105  void MakePolyData1(vtkDataSet *ds);
106  void MakePolyData2(vtkDataSet *ds);
107  void MakeUnstructuredGrid1(vtkDataSet *ds);
108  void MakeUnstructuredGrid2(vtkDataSet *ds);
109  void MakeUnstructuredGrid3(vtkDataSet *ds);
110  void MakeUnstructuredGrid4(vtkDataSet *ds);
111 
112  //used to spatially separate sub data sets within composites
113  double XOffset; //increases for each dataset index
114  double YOffset; //increases for each sub data set
115  double ZOffset; //increases for each group index
116 
117  //used to filling in point and cell values with unique Ids
118  vtkIdType CellIdCounter;
119  vtkIdType PointIdCounter;
120 
121  //assign point and cell values to each point and cell
122  void MakeValues(vtkDataSet *ds);
123 
124 private:
125  vtkDataObjectGenerator(const vtkDataObjectGenerator&) VTK_DELETE_FUNCTION;
126  void operator=(const vtkDataObjectGenerator&) VTK_DELETE_FUNCTION;
127 };
128 
129 #endif
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
static vtkDataObjectAlgorithm * New()
int vtkIdType
Definition: vtkType.h:287
produces simple (composite or atomic) data sets for testing.
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
Superclass for algorithms that produce only data object as output.
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:64
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.