Go to the documentation of this file.
66 #ifndef vtkArrayExtents_h
67 #define vtkArrayExtents_h
69 #include "vtkCommonCoreModule.h"
239 std::vector<vtkArrayRange> Storage;
bool Contains(const vtkArrayExtents &extents) const
Returns true if the given extents are a non-overlapping subset of the current extents.
const vtkArrayRange & operator[](DimensionT i) const
Accesses the extent of the i-th dimension.
Stores a half-open range of array coordinates.
vtkArrayRange & operator[](DimensionT i)
Accesses the extent of the i-th dimension.
SizeT GetSize() const
Return the number of values that could be stored using the current extents.
bool operator!=(const vtkArrayExtents &rhs) const
Inequality comparison.
void SetDimensions(DimensionT dimensions)
Set the current number of dimensions.
DimensionT GetDimensions() const
Return the current number of dimensions.
vtkArrayExtents(const CoordinateT i, const CoordinateT j, const CoordinateT k)
Create zero-based three-dimensional extents.
vtkArrayExtents(const CoordinateT i, const CoordinateT j)
Create zero-based two-dimensional extents.
VTKCOMMONCORE_EXPORT friend ostream & operator<<(ostream &stream, const vtkArrayExtents &rhs)
void SetExtent(DimensionT i, const vtkArrayRange &)
Set the extent of the i-th dimension.
void GetLeftToRightCoordinatesN(SizeT n, vtkArrayCoordinates &coordinates) const
Returns coordinates that reference the n-th value in the extents, where n is in the range [0,...
void Append(const vtkArrayRange &extent)
Grow the number of dimensions by one, specifying the extent of the new dimension.
vtkArrayExtents(const CoordinateT i)
Create zero-based one-dimensional extents.
vtkArrayExtents(const vtkArrayRange &i)
Create one-dimensional extents.
void GetRightToLeftCoordinatesN(SizeT n, vtkArrayCoordinates &coordinates) const
Returns coordinates that reference the n-th value in the extents, where n is in the range [0,...
bool Contains(const vtkArrayCoordinates &coordinates) const
Returns true if the given array coordinates are completely contained by the current extents (i....
bool SameShape(const vtkArrayExtents &rhs) const
Returns true iff the given extents have the same number of dimensions and size along each dimension.
vtkArrayExtents(const vtkArrayRange &i, const vtkArrayRange &j, const vtkArrayRange &k)
Create three-dimensional extents.
vtkArrayRange GetExtent(DimensionT i) const
Get the extent of the i-th dimension.
static const vtkArrayExtents Uniform(DimensionT n, CoordinateT m)
Create n-dimensional extents with extent [0, m) along each dimension.
vtkArrayExtents()
Create zero-dimensional extents.
bool ZeroBased() const
Returns true iff every range in the current extents is zero-based.
vtkArrayCoordinates::DimensionT DimensionT
vtkArrayExtents(const vtkArrayRange &i, const vtkArrayRange &j)
Create two-dimensional extents.
Stores the number of dimensions and valid coordinate ranges along each dimension for vtkArray.
Stores coordinate into an N-way array.
vtkArrayCoordinates::CoordinateT CoordinateT
bool operator==(const vtkArrayExtents &rhs) const
Equality comparison.