VTK  9.4.20241222
vtkStructuredCellArray.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
22#ifndef vtkStructuredCellArray_h
23#define vtkStructuredCellArray_h
24
26#include "vtkCommonDataModelModule.h" // For export macro
27#include "vtkSmartPointer.h" // For vtkSmartPointer
28
29VTK_ABI_NAMESPACE_BEGIN
30
31template <typename T>
33
34class VTKCOMMONDATAMODEL_EXPORT vtkStructuredCellArray : public vtkAbstractCellArray
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
44 void Initialize() override;
45
49 vtkIdType GetNumberOfCells() const override;
50
55 vtkIdType GetNumberOfOffsets() const override;
56
60 vtkIdType GetOffset(vtkIdType cellId) override;
61
69
74 void SetData(int extent[6], bool usePixelVoxelOrientation);
75
82 bool IsStorageShareable() const override { return false; }
83
93
103 void GetCellAtId(vtkIdType cellId, vtkIdType& cellSize, vtkIdType const*& cellPoints,
104 vtkIdList* ptIds) VTK_SIZEHINT(cellPoints, cellSize)
105 VTK_EXPECTS(0 <= cellId && cellId < GetNumberOfCells()) override;
106
112 void GetCellAtId(vtkIdType cellId, vtkIdList* ptIds)
113 VTK_EXPECTS(0 <= cellId && cellId < GetNumberOfCells()) override;
114
122 void GetCellAtId(vtkIdType cellId, vtkIdType& cellSize, vtkIdType* cellPoints) VTK_SIZEHINT(
123 cellPoints, cellSize) VTK_EXPECTS(0 <= cellId && cellId < GetNumberOfCells()) override;
124
130 void GetCellAtId(int ijk[3], vtkIdList* ptIds);
131
139 void GetCellAtId(int ijk[3], vtkIdType& cellSize, vtkIdType* cellPoints);
140
144 vtkIdType GetCellSize(vtkIdType cellId) const override;
145
150 int GetMaxCellSize() override;
151
155 void DeepCopy(vtkAbstractCellArray* ca) override;
156
161
162protected:
165
169 struct vtkStructuredCellBackend;
170 template <int DataDescription, bool UsePixelVoxelOrientation>
173
174private:
176 void operator=(const vtkStructuredCellArray&) = delete;
177};
178
179VTK_ABI_NAMESPACE_END
180#endif // vtkStructuredCellArray_h
abstract object to represent cell connectivity
virtual vtkIdType GetNumberOfCells() const =0
Get the number of cells in the array.
list of point or cell ids
Definition vtkIdList.h:133
A read only array class that wraps an implicit function from integers to any value type supported by ...
a simple class to control print indentation
Definition vtkIndent.h:108
Hold a reference to a vtkObjectBase instance.
implicit object to represent cell connectivity
void ShallowCopy(vtkAbstractCellArray *ca) override
Shallow copy ca into this cell array.
int GetMaxCellSize() override
Returns the size of the largest cell.
void GetCellAtId(int ijk[3], vtkIdList *ptIds)
Return the point ids for the cell at ijk.
vtkIdType GetNumberOfConnectivityIds() const override
Get the size of the connectivity array that stores the point ids.
void Initialize() override
Free any memory and reset to an empty state.
void GetCellAtId(vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints, vtkIdList *ptIds) override
Return the point ids for the cell at cellId.
vtkIdType GetOffset(vtkIdType cellId) override
Get the offset (into the connectivity) for a specified cell id.
void GetCellAtId(vtkIdType cellId, vtkIdType &cellSize, vtkIdType *cellPoints) override
Return the point ids for the cell at cellId.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIdType GetNumberOfOffsets() const override
Get the number of elements in the offsets array.
static vtkStructuredCellArray * New()
void SetData(int extent[6], bool usePixelVoxelOrientation)
Create a new cell array given extent and a flag indicating whether the data should be stored in a vox...
bool IsStorageShareable() const override
~vtkStructuredCellArray() override
void GetCellAtId(int ijk[3], vtkIdType &cellSize, vtkIdType *cellPoints)
Return the point ids for the cell at ijk.
vtkIdType GetCellSize(vtkIdType cellId) const override
Return the size of the cell at cellId.
vtkIdType IsHomogeneous() override
Check if all cells have the same number of vertices.
void DeepCopy(vtkAbstractCellArray *ca) override
Perform a deep copy (no reference counting) of the given cell array.
vtkSmartPointer< vtkImplicitArray< vtkStructuredCellBackend > > Connectivity
vtkIdType GetNumberOfCells() const override
Get the number of cells in the array.
void GetCellAtId(vtkIdType cellId, vtkIdList *ptIds) override
Return the point ids for the cell at cellId.
int vtkIdType
Definition vtkType.h:315
#define VTK_SIZEHINT(...)
#define VTK_EXPECTS(x)