VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
34 
35 VTK_ABI_NAMESPACE_BEGIN
36 class vtkInternalStructureCache;
37 
39 {
40 public:
41  static vtkDataObjectGenerator* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
49  vtkSetStringMacro(Program);
50  vtkGetStringMacro(Program);
52 
53 protected:
55  ~vtkDataObjectGenerator() override;
56 
57  int RequestData(
58  vtkInformation* req, vtkInformationVector** inV, vtkInformationVector* outV) override;
60  vtkInformation* req, vtkInformationVector** inV, vtkInformationVector* outV) override;
62  vtkInformation* req, vtkInformationVector** inV, vtkInformationVector* outV) override;
64  vtkInformation* req, vtkInformationVector** inV, vtkInformationVector* outV) override;
65 
66  // the string to parse to create a structure
67  char* Program;
68  // a record of the structure
69  vtkInternalStructureCache* Structure;
70 
71  // Helper for RequestDataObject
72  vtkDataObject* CreateOutputDataObjects(vtkInternalStructureCache* structure);
73  // Helper for RequestData
74  vtkDataObject* FillOutputDataObjects(
75  vtkInternalStructureCache* structure, int level, int stripe = 0);
76 
77  // to determine which composite data stripe to fill in
80 
81  // create the templated atomic data sets
82  void MakeImageData1(vtkDataSet* ds);
83  void MakeImageData2(vtkDataSet* ds);
84  void MakeUniformGrid1(vtkDataSet* ds);
85  void MakeRectilinearGrid1(vtkDataSet* ds);
86  void MakeStructuredGrid1(vtkDataSet* ds);
87  void MakePolyData1(vtkDataSet* ds);
88  void MakePolyData2(vtkDataSet* ds);
89  void MakeUnstructuredGrid1(vtkDataSet* ds);
90  void MakeUnstructuredGrid2(vtkDataSet* ds);
91  void MakeUnstructuredGrid3(vtkDataSet* ds);
92  void MakeUnstructuredGrid4(vtkDataSet* ds);
93 
94  // used to spatially separate sub data sets within composites
95  double XOffset; // increases for each dataset index
96  double YOffset; // increases for each sub data set
97  double ZOffset; // increases for each group index
98 
99  // used to filling in point and cell values with unique Ids
102 
103  // assign point and cell values to each point and cell
104  void MakeValues(vtkDataSet* ds);
105 
106 private:
108  void operator=(const vtkDataObjectGenerator&) = delete;
109 };
110 
111 VTK_ABI_NAMESPACE_END
112 #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:56
static vtkDataObjectAlgorithm * New()
int vtkIdType
Definition: vtkType.h:363
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.
#define VTK_MARSHALAUTO
general representation of visualization data
Definition: vtkDataObject.h:55
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.