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 =========================================================================*/
36 #ifndef __vtkDataObjectGenerator_h
37 #define __vtkDataObjectGenerator_h
38 
39 #include "vtkDataObjectAlgorithm.h"
40 
41 class vtkInternalStructureCache;
42 
45 {
46  public:
47  static vtkDataObjectGenerator *New();
49  void PrintSelf(ostream &os, vtkIndent indent);
50 
52 
53  vtkSetStringMacro(Program);
54  vtkGetStringMacro(Program);
56 
57 protected:
60 
61  virtual int RequestData(vtkInformation *req,
63  vtkInformationVector *outV);
64  virtual int RequestDataObject(vtkInformation *req,
66  vtkInformationVector *outV);
67  virtual int RequestInformation(vtkInformation *req,
69  vtkInformationVector *outV);
70  virtual int RequestUpdateExtent(vtkInformation *req,
72  vtkInformationVector *outV);
73 
74  //the string to parse to create a structure
75  char *Program;
76  //a record of the structure
77  vtkInternalStructureCache *Structure;
78 
79  //Helper for RequestDataObject
80  vtkDataObject *
81  CreateOutputDataObjects(vtkInternalStructureCache *structure);
82  //Helper for RequestData
83  vtkDataObject *
84  FillOutputDataObjects(vtkInternalStructureCache *structure,
85  int level,
86  int stripe=0);
87 
88  //to determine which composite data stripe to fill in
91 
92  //create the templated atomic data sets
93  void MakeImageData1(vtkDataSet *ds);
94  void MakeImageData2(vtkDataSet *ds);
95  void MakeUniformGrid1(vtkDataSet *ds);
96  void MakeRectilinearGrid1(vtkDataSet *ds);
97  void MakeStructuredGrid1(vtkDataSet *ds);
98  void MakePolyData1(vtkDataSet *ds);
99  void MakePolyData2(vtkDataSet *ds);
100  void MakeUnstructuredGrid1(vtkDataSet *ds);
101  void MakeUnstructuredGrid2(vtkDataSet *ds);
102  void MakeUnstructuredGrid3(vtkDataSet *ds);
103  void MakeUnstructuredGrid4(vtkDataSet *ds);
104 
105  //used to spatially separate sub data sets within composites
106  double XOffset; //increases for each dataset index
107  double YOffset; //increases for each sub data set
108  double ZOffset; //increases for each group index
109 
110  //used to filling in point and cell values with unique Ids
113 
114  //assign point and cell values to each point and cell
115  void MakeValues(vtkDataSet *ds);
116 
117 private:
118  vtkDataObjectGenerator(const vtkDataObjectGenerator&); // Not implemented.
119  void operator=(const vtkDataObjectGenerator&); // Not implemented.
120 };
121 
122 #endif