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