VTK  9.2.6
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 "vtkDataObjectAlgorithm.h"
44 #include "vtkFiltersCoreModule.h" // For export macro
45 
46 class vtkInternalStructureCache;
47 
48 class VTKFILTERSCORE_EXPORT vtkDataObjectGenerator : public vtkDataObjectAlgorithm
49 {
50 public:
51  static vtkDataObjectGenerator* New();
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
56 
59  vtkSetStringMacro(Program);
60  vtkGetStringMacro(Program);
62 
63 protected:
65  ~vtkDataObjectGenerator() override;
66 
67  int RequestData(
68  vtkInformation* req, vtkInformationVector** inV, vtkInformationVector* outV) override;
70  vtkInformation* req, vtkInformationVector** inV, vtkInformationVector* outV) override;
72  vtkInformation* req, vtkInformationVector** inV, vtkInformationVector* outV) override;
74  vtkInformation* req, vtkInformationVector** inV, vtkInformationVector* outV) override;
75 
76  // the string to parse to create a structure
77  char* Program;
78  // a record of the structure
79  vtkInternalStructureCache* Structure;
80 
81  // Helper for RequestDataObject
82  vtkDataObject* CreateOutputDataObjects(vtkInternalStructureCache* structure);
83  // Helper for RequestData
84  vtkDataObject* FillOutputDataObjects(
85  vtkInternalStructureCache* structure, int level, int stripe = 0);
86 
87  // to determine which composite data stripe to fill in
90 
91  // create the templated atomic data sets
92  void MakeImageData1(vtkDataSet* ds);
93  void MakeImageData2(vtkDataSet* ds);
94  void MakeUniformGrid1(vtkDataSet* ds);
95  void MakeRectilinearGrid1(vtkDataSet* ds);
96  void MakeStructuredGrid1(vtkDataSet* ds);
97  void MakePolyData1(vtkDataSet* ds);
98  void MakePolyData2(vtkDataSet* ds);
99  void MakeUnstructuredGrid1(vtkDataSet* ds);
100  void MakeUnstructuredGrid2(vtkDataSet* ds);
101  void MakeUnstructuredGrid3(vtkDataSet* ds);
102  void MakeUnstructuredGrid4(vtkDataSet* ds);
103 
104  // used to spatially separate sub data sets within composites
105  double XOffset; // increases for each dataset index
106  double YOffset; // increases for each sub data set
107  double ZOffset; // increases for each group index
108 
109  // used to filling in point and cell values with unique Ids
112 
113  // assign point and cell values to each point and cell
114  void MakeValues(vtkDataSet* ds);
115 
116 private:
118  void operator=(const vtkDataObjectGenerator&) = delete;
119 };
120 
121 #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:332
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:65
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.