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) override;
55 
57 
60  vtkSetStringMacro(Program);
61  vtkGetStringMacro(Program);
63 
64 protected:
66  ~vtkDataObjectGenerator() override;
67 
68  int RequestData(vtkInformation *req,
70  vtkInformationVector *outV) override;
73  vtkInformationVector *outV) override;
76  vtkInformationVector *outV) override;
79  vtkInformationVector *outV) 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
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
120 
121  //assign point and cell values to each point and cell
122  void MakeValues(vtkDataSet *ds);
123 
124 private:
126  void operator=(const vtkDataObjectGenerator&) = delete;
127 };
128 
129 #endif
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
static vtkDataObjectAlgorithm * New()
int vtkIdType
Definition: vtkType.h:347
produces simple (composite or atomic) data sets for testing.
vtkInternalStructureCache * Structure
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Superclass for algorithms that produce only data object as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
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.