VTK  9.3.1
vtkDataObjectGenerator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
28 #ifndef vtkDataObjectGenerator_h
29 #define vtkDataObjectGenerator_h
30 
31 #include "vtkDataObjectAlgorithm.h"
32 #include "vtkFiltersCoreModule.h" // For export macro
33 
34 VTK_ABI_NAMESPACE_BEGIN
35 class vtkInternalStructureCache;
36 
37 class VTKFILTERSCORE_EXPORT vtkDataObjectGenerator : public vtkDataObjectAlgorithm
38 {
39 public:
40  static vtkDataObjectGenerator* New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
48  vtkSetStringMacro(Program);
49  vtkGetStringMacro(Program);
51 
52 protected:
54  ~vtkDataObjectGenerator() override;
55 
56  int RequestData(
57  vtkInformation* req, vtkInformationVector** inV, vtkInformationVector* outV) override;
59  vtkInformation* req, vtkInformationVector** inV, vtkInformationVector* outV) override;
61  vtkInformation* req, vtkInformationVector** inV, vtkInformationVector* outV) override;
63  vtkInformation* req, vtkInformationVector** inV, vtkInformationVector* outV) override;
64 
65  // the string to parse to create a structure
66  char* Program;
67  // a record of the structure
68  vtkInternalStructureCache* Structure;
69 
70  // Helper for RequestDataObject
71  vtkDataObject* CreateOutputDataObjects(vtkInternalStructureCache* structure);
72  // Helper for RequestData
73  vtkDataObject* FillOutputDataObjects(
74  vtkInternalStructureCache* structure, int level, int stripe = 0);
75 
76  // to determine which composite data stripe to fill in
79 
80  // create the templated atomic data sets
81  void MakeImageData1(vtkDataSet* ds);
82  void MakeImageData2(vtkDataSet* ds);
83  void MakeUniformGrid1(vtkDataSet* ds);
84  void MakeRectilinearGrid1(vtkDataSet* ds);
85  void MakeStructuredGrid1(vtkDataSet* ds);
86  void MakePolyData1(vtkDataSet* ds);
87  void MakePolyData2(vtkDataSet* ds);
88  void MakeUnstructuredGrid1(vtkDataSet* ds);
89  void MakeUnstructuredGrid2(vtkDataSet* ds);
90  void MakeUnstructuredGrid3(vtkDataSet* ds);
91  void MakeUnstructuredGrid4(vtkDataSet* ds);
92 
93  // used to spatially separate sub data sets within composites
94  double XOffset; // increases for each dataset index
95  double YOffset; // increases for each sub data set
96  double ZOffset; // increases for each group index
97 
98  // used to filling in point and cell values with unique Ids
101 
102  // assign point and cell values to each point and cell
103  void MakeValues(vtkDataSet* ds);
104 
105 private:
107  void operator=(const vtkDataObjectGenerator&) = delete;
108 };
109 
110 VTK_ABI_NAMESPACE_END
111 #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:52
static vtkDataObjectAlgorithm * New()
int vtkIdType
Definition: vtkType.h:315
produces simple (composite or atomic) data sets for testing.
vtkInternalStructureCache * Structure
a simple class to control print indentation
Definition: vtkIndent.h:28
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:54
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.