Public Member Functions | Friends

vtkArraySlice Class Reference

Describes a subset of an N-way array. More...

#include <vtkArraySlice.h>

List of all members.

Public Member Functions

 vtkArraySlice ()
vtkIdType GetDimensions () const
const vtkArrayExtents GetExtents () const
const vtkArrayCoordinates GetCoordinatesN (vtkIdType n) const
void SetDimensions (vtkIdType dimensions)
vtkArrayRangeoperator[] (vtkIdType i)
const vtkArrayRangeoperator[] (vtkIdType i) const

 vtkArraySlice (const vtkArrayRange &i)

 vtkArraySlice (const vtkArrayRange &i, const vtkArrayRange &j)

 vtkArraySlice (const vtkArrayRange &i, const vtkArrayRange &j, const vtkArrayRange &k)

Friends

ostream & operator<< (ostream &stream, const vtkArraySlice &rhs)

Detailed Description

Describes a subset of an N-way array.

vtkArraySlice describes a subset of a vtkArray as a set of half-open ranges along each dimension.

Convenience constructors are provided for specifying one, two, and three dimension slices. For higher dimensions, use the default constructor, the SetDimensions() method and operator[] to assign a range along each dimension of a slice.

vtkArraySlice is most commonly used with the vtkInterpolate() function, which is used to compute weighted sums of vtkArray slices.

See also:
vtkArray, vtkRange
Thanks:
Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National Laboratories.
Tests:
vtkArraySlice (Tests)

Definition at line 56 of file vtkArraySlice.h.


Constructor & Destructor Documentation

vtkArraySlice::vtkArraySlice (  ) 

Create a zero-dimensional slice.

vtkArraySlice::vtkArraySlice ( const vtkArrayRange i  ) 

Create a one-dimensional slice.

vtkArraySlice::vtkArraySlice ( const vtkArrayRange i,
const vtkArrayRange j 
)

Create a two-dimensional slice.

vtkArraySlice::vtkArraySlice ( const vtkArrayRange i,
const vtkArrayRange j,
const vtkArrayRange k 
)

Create a three-dimensional slice.


Member Function Documentation

vtkIdType vtkArraySlice::GetDimensions (  )  const

Returns the number of dimensions in this slice.

const vtkArrayExtents vtkArraySlice::GetExtents (  )  const

Returns the extents of this slice - i.e: the size of the range along each dimension.

const vtkArrayCoordinates vtkArraySlice::GetCoordinatesN ( vtkIdType  n  )  const

Returns coordinates that reference the n-th value in the slice, where n is in the range [0, GetExtents().GetSize()). Note that the order in which coordinates are visited is undefined.

void vtkArraySlice::SetDimensions ( vtkIdType  dimensions  ) 

Sets the number of slice dimensions. Use operator[] to set the range along each dimension. Note that the range along each slice dimension will be empty after calling SetDimensions(), so you must explicitly set them all.

vtkArrayRange& vtkArraySlice::operator[] ( vtkIdType  i  ) 

Accesses the range of the i-th dimension.

const vtkArrayRange& vtkArraySlice::operator[] ( vtkIdType  i  )  const

Accesses the rnage of the i-th dimension.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  stream,
const vtkArraySlice rhs 
) [friend]

The documentation for this class was generated from the following file: