VTK  9.7.1
vtkUniformGrid.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
16 #ifndef vtkUniformGrid_h
17 #define vtkUniformGrid_h
18 
19 #include "vtkAMRBox.h" // Fox vtkAMRBox
20 #include "vtkCommonDataModelModule.h" // For export macro
21 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_6_0
22 #include "vtkImageData.h"
23 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class vtkEmptyCell;
28 
29 class VTKCOMMONDATAMODEL_EXPORT VTK_MARSHALAUTO vtkUniformGrid : public vtkImageData
30 {
31 public:
33 
36  static vtkUniformGrid* New();
37  vtkTypeMacro(vtkUniformGrid, vtkImageData);
39 
43  int GetDataObjectType() VTK_FUTURE_CONST override { return VTK_UNIFORM_GRID; }
44 
46 
54  VTK_DEPRECATED_IN_9_6_0("Use vtkAMRBox::InitializeGrid instead")
55  int Initialize(const vtkAMRBox* def, double* origin, double* spacing)
56  {
57  return def->InitializeGrid(this, origin, spacing);
58  };
59 
68  VTK_DEPRECATED_IN_9_6_0("Use vtkAMRBox::InitializeGrid instead")
69  int Initialize(const vtkAMRBox* def, double* origin, double* spacing, int nGhosts)
70  {
71  return def->InitializeGrid(this, origin, spacing, nGhosts);
72  };
73 
82  VTK_DEPRECATED_IN_9_6_0("Use vtkAMRBox::InitializeGrid instead")
83  int Initialize(const vtkAMRBox* def, double* origin, double* spacing, const int nGhosts[3])
84  {
85  return def->InitializeGrid(this, origin, spacing, nGhosts);
86  };
87 
97  VTK_DEPRECATED_IN_9_6_0("Use vtkAMRBox::InitializeGrid instead")
98  int Initialize(
99  const vtkAMRBox* def, double* origin, double* spacing, int nGhostsI, int nGhostsJ, int nGhostsK)
100  {
101  return def->InitializeGrid(this, origin, spacing, nGhostsI, nGhostsJ, nGhostsK);
102  };
103 
104  VTK_DEPRECATED_IN_9_6_0("Will be removed, create a vtkImageData manually if needed")
105  virtual VTK_NEWINSTANCE vtkImageData* NewImageDataCopy();
106 
108 
114  static vtkUniformGrid* GetData(vtkInformationVector* v, int i = 0);
116 
117 protected:
118  vtkUniformGrid();
119  ~vtkUniformGrid() override;
120 
121 private:
122  vtkUniformGrid(const vtkUniformGrid&) = delete;
123  void operator=(const vtkUniformGrid&) = delete;
124 };
125 
126 VTK_ABI_NAMESPACE_END
127 #endif
static vtkImageData * New()
Store vtkAlgorithm input/output information.
Encloses a rectangular region of voxel like cells.
Definition: vtkAMRBox.h:29
void Initialize() override
Standard vtkDataSet API methods.
an empty cell used as a place-holder during processing
Definition: vtkEmptyCell.h:21
#define VTK_DEPRECATED_IN_9_6_0(reason)
int GetDataObjectType() VTK_FUTURE_CONST override
Return what type of dataset this is.
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkSmartPointer< vtkDataArray > GetData(const Ioss::GroupingEntity *entity, const std::string &fieldname, Ioss::Transform *transform=nullptr, Cache *cache=nullptr, const std::string &cachekey=std::string())
Returns a VTK array for a given field (fieldname) on the chosen block (or set) entity.
#define VTK_NEWINSTANCE
dynamic, self-adjusting array of unsigned char
Deprecated vtkImageData.
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO