Go to the documentation of this file.
28 #ifndef LATTICES_LATTICEINDEXER_H
29 #define LATTICES_LATTICEINDEXER_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Arrays/IPosition.h>
void subSection(const IPosition &blc, const IPosition &trc)
void fullSize()
Revert from a sub-Lattice description back to the main Lattice.
A Vector of integers, for indexing into Array<T> objects.
Bool ok() const
Is this LatticeIndexer consistent, i.e.
const IPosition & fullShape() const
Returns the length of each axis (or the requested one) in the parent Lattice.
IPosition absolutePosition(const IPosition &position) const
Function which returns an IPosition in the parent Lattice given an IPostion in the sub-Lattice.
const IPosition & shape() const
Returns the length of each axis (or the requested one) in the sub-Lattice.
Bool isInside(const IPosition &index) const
Function which returns a value of True if the IPosition argument is within the sub-Lattice.
Bool tiledCursorMove(Bool incr, IPosition &cursorPos, const IPosition &cursorShape, const IPosition &cursorHeading) const
Function which increments (incr=True) or decrements (incr=False) the cursor position (the first IPosi...
uInt offset(uInt axis) const
LatticeIndexer & operator=(const LatticeIndexer &other)
The assignment operator uses copy semantics.
uInt fullShape(uInt axis) const
LatticeIndexer()
Default constructor (one dimensional, unit-length instance).
const IPosition & increment() const
Function to return the increments along each axis (or the requested one) of the Lattice.
void subSection(const IPosition &blc, const IPosition &trc, const IPosition &inc)
Function which subsections a LatticeIndexer.
uInt ndim() const
Function which returns the number of dimensions in the Lattice (or sub-Lattice).
this file contains all the compiler specific defines
LatticeIndexer(const IPosition &shape)
Specify the size of the Lattice.
A helper class for stepping through Lattices.
size_t nelements() const
Function which returns the number of elements in the sub-Lattice; this value is equal to the product ...
uInt shape(uInt axis) const
bool Bool
Define the standard types used by Casacore.
LatticeIndexer(const LatticeIndexer &other)
The copy constructor uses copy semantics.
void resize(const IPosition &newShape)
Function to change the shape of the Lattice.
const IPosition & offset() const
Function to return the offset (on a specified axis) between the sub-Lattice and the parent one.
uInt increment(uInt axis) const
Int64 product() const
Returns 0 if nelements() == 0, otherwise it returns the product of its elements.
LatticeIndexer(const IPosition &shape, const IPosition &blc, const IPosition &trc, const IPosition &inc)
Specify a Lattice and define a sub-Lattice within it.