Module Lattices

Changes made in the current development cycle can be found in the changelog.

Description (classes)

Regular N-dimensional data structures.

Prerequisite

Review Status

Reviewed By:
Peter Barnes
Date Reviewed:
1999/10/30

Etymology

Lattice: "A regular, periodic configuration of points, particles, or objects, throughout an area of a space..." (American Heritage Directory) This definition matches our own: an N-dimensional arrangement of data on regular orthogonal axes.

In AIPS++, we have used the ability to call many things by one generic name (Lattice) to create a number of classes which have different storage techniques (e.g. core memory, disk, etc...). The name Lattice should make the user think of a class interface (or member functions) which all Lattice objects have in common. If functions require a Lattice argument, the classes described here may be used interchangeably, even though their actual internal workings are very different.

Synopsis

The Lattice module may be broken up into a few areas:

  1. Lattices - the actual holders of lattice-like data which all share a common interface. The following items are all Lattices and may be used polymorphically wherever a Lattice is called for.

  2. LatticeIterator - the object which allows iteration through any Lattice's data. This comes in two types: the RO_LatticeIterator which should be used if you are not going to change the Lattice's data, and the LatticeIterator if you need to change the data in the Lattice.
    Note that iteration can also be done using LatticeApply and some helper classes. It makes it possible to concentrate on the algorithm.

  3. LatticeNavigators - the objects which define the method and path used by a LatticeIterator to move the cursor through a Lattice. Many different paths are possible. We leave it you to choose the LatticeNavigator (method and path) when using a LatticeIterator.

  4. MaskedLattice - a Lattice with a mask. It is an abstract base class for various types of MaskedLattices. A MaskedLattice does not need to contain a mask (see e.g. SubLattice below), although the user can always ask for the mask. The function isMasked() tells if there is really a mask. If not, users could take advantage by shortcutting some code for better performance. I.e. a function can test if a the MaskedLattice is really masked and can take a special route if not. Of course, doing that requires more coding, so it should only be done where performance is a real issue.

  5. LatticeLocker can be used to acquire a (user) lock on a lattice. The lock can be a read or write lock. The destructor releases the lock when needed.
    Lattices on disk can be used (read and write) by multiple processes. The Table locking/synchronization mechanism takes care that sharing such a lattice is done in an orderly way. Usually the default locking mechanism is sufficient. LatticeLocker is useful when finer locking control is needed for a disk-based lattice.

Warning The following are listed for low-level programmers. Lattice users need not understand them.
The Lattice directory contains several files relevant only to implementation.

Motivation

Lattices allow the various holders of data to assume a general method of treatment; by making interfaces in terms of the Lattice class, the programmer can polymorphically operate on objects derived from the Lattice class.

To Do


Classes

165 LatticeUtilities -- Global functions on Lattices (full description)
ArrayLattice -- A memory resident Lattice (full description)
CLIPNearest2D -- Arbitrarily shaped 1-dim lattice crosscut (full description)
CLInterpolator2D -- Abstract base class for interpolator used by CurvedLattice2D. (full description)
CleanEnums -- Lists the different types of Convolutions that can be done (full description)
ConvEnums -- Lists the different types of Convolutions that can be done (full description)
CurvedLattice2D -- A lattice crosscut based on a curve in a plane. (full description)
ExtendLattice -- An extension of a Lattice or MaskedLattice (full description)
FITSMask -- Provides an on-the-fly mask for FITS images (full description)
GlobalLatticeExprNode -- (full description)
HistTiledCollapser -- Generate histograms, tile by tile, from a masked lattice (full description)
LCBox -- Class to define a rectangular box of interest. (full description)
LCComplement -- Make the complement of a region. (full description)
LCConcatenation -- Combine multiple LCRegion's into a new dimension. (full description)
LCDifference -- Make the difference of 2 regions. (full description)
LCEllipsoid -- Define an N-dimensional ellipsoidal region of interest. (full description)
LCExtension -- Extend an LCRegion along straight lines to other dimensions (full description)
LCIntersection -- Make the intersection of 2 or more regions. (full description)
LCLELMask -- Class to define a mask as a LEL expression (full description)
LCMask -- Class to define a rectangular mask as a temporary region (full description)
LCPagedMask -- Class to define a rectangular mask as a region (full description)
LCPixelSet -- Class to define a rectangular mask as a region (full description)
LCPolygon -- Define a 2-dimensional region by a polygon. (full description)
LCRegion -- Abstract base class to define a region of interest in lattice coordinates. (full description)
LCRegionFixed -- Abstract base class to define a fixed region. (full description)
LCRegionMulti -- Make the intersection of 2 or more regions. (full description)
LCRegionSingle -- Abstract base class to define a single region. (full description)
LCSlicer -- Class to define a rectangular box of interest with strides. (full description)
LCStretch -- Stretch length 1 axes in an LCRegion along straight lines (full description)
LCUnion -- Make the union of 2 or more regions. (full description)
LELArray -- This LEL class holds an array with a mask. (full description)
LELArrayBase -- Base class for LELArray holding the mask. (full description)
LELArrayRef -- This LEL class holds a possible referenced array with a mask. (full description)
LELAttribute -- Ancillary information for the LEL letter classes. (full description)
LELBinary -- This LEL class handles numerical binary operators (full description)
LELBinaryBool -- This LEL class handles logical binary operators (full description)
LELBinaryCmp -- This LEL class handles relational binary numerical operators (full description)
LELBinaryEnums -- Each LEL binary operation is described in this enum (full description)
LELCondition -- Class to make a mask from a condition. (full description)
LELConvert -- Class to convert a LEL node from one numerical type to another (full description)
LELCoordinates -- Envelope class to handle Lattice Coordinates in LEL. (full description)
LELFunction1D -- This LEL class handles numerical (real and complex) 1-argument functions (full description)
LELFunctionBool -- This LEL class handles logical functions (full description)
LELFunctionComplex -- This LEL class handles complex numerical functions (full description)
LELFunctionDComplex -- This LEL class handles double complex numerical functions (full description)
LELFunctionDouble -- This LEL class handles numerical functions whose return type is a Double (full description)
LELFunctionEnums -- Each LEL function is described in this enum (full description)
LELFunctionFloat -- This LEL class handles numerical functions whose return type is a Float (full description)
LELFunctionND -- This LEL class handles functions with a variable number of arguments. (full description)
LELFunctionReal1D -- This LEL class handles numerical (real only) 1-argument functions (full description)
LELInterface -- This base class provides the interface for Lattice expressions (full description)
LELLattCoord -- The base letter class for lattice coordinates in LEL. (full description)
LELLattCoordBase -- The base letter class for lattice coordinates in LEL. (full description)
LELLattice -- This LEL class handles access to Lattices (full description)
LELRegion -- Class to hold a region as a LEL node (full description)
LELRegionAsBool -- Class to convert a region to a boolean node (full description)
LELScalar -- This LEL class holds a scalar with a mask. (full description)
LELSpectralIndex -- This LEL class handles calculation of the spectral index. (full description)
LELUnary -- This LEL class handles numerical unary operators (full description)
LELUnaryBool -- This LEL class handles logical unary operators (full description)
LELUnaryConst -- This LEL class handles scalar (unary) constants (full description)
LELUnaryEnums -- Each LEL unary operation is described in this enum (full description)
LattRegionHolder -- Class to hold a region of interest in an image. (full description)
LattStatsProgress -- Provides a progress meter for the LatticeStatistics class (full description)
LattStatsSpecialize -- (full description)
Lattice -- A templated, abstract base class for array-like objects. (full description)
LatticeAddNoise -- Add noise from specified distribution to a lattice (full description)
LatticeApply -- Optimally iterate through a Lattice and apply provided function object (full description)
LatticeBase -- A non-templated, abstract base class for array-like objects. (full description)
LatticeCache -- a class for caching image access via tiles (full description)
LatticeCleanProgress -- Abstract base class to monitor progress in lattice operations (full description)
LatticeCleaner -- A class for doing multi-dimensional cleaning (full description)
LatticeConcat -- Concatenates lattices along a specified axis (full description)
LatticeConvolver -- A class for doing multi-dimensional convolution (full description)
LatticeExpr -- Class to allow C++ expressions involving lattices (full description)
LatticeExprNode -- Bridging class to allow C++ expressions involving lattices (full description)
LatticeFFT -- Functions for Fourier transforming Lattices (full description)
LatticeFractile -- Static functions to get median and fractiles of a lattice (full description)
LatticeHistProgress -- Provides a progress meter for the LatticeHistograms class (full description)
LatticeHistSpecialize -- Specialized functions for LatticeHistograms (full description)
LatticeHistograms -- Displays histograms of regions from a lattice. (full description)
LatticeIndexer -- A helper class for stepping through Lattices. (full description)
LatticeIterInterface -- A base class for Lattice iterators (full description)
LatticeIterator -- A read/write lattice iterator (full description)
LatticeLocker -- Class to hold a (user) lock on a lattice. (full description)
LatticeNavigator -- Abstract base class to steer lattice iterators. (full description)
LatticeProgress -- Abstract base class to monitor progress in lattice operations (full description)
LatticeRegion -- An optionally strided region in a Lattice (full description)
LatticeSlice1D -- Extract a 1-D slice from a Lattice (full description)
LatticeStatistics -- Compute and display various statistics from a lattice (full description)
LatticeStatsBase -- Base class for LatticeStatistics class (full description)
LatticeStepper -- Traverse a Lattice by cursor shape (full description)
LatticeTwoPtCorr -- Compute two point auto-correlation functions from a lattice (full description)
LatticeUtilities -- Static functions for Lattices (full description)
LineCollapser -- Abstract base class for LatticeApply function signatures (full description)
MaskedLattice -- A templated, abstract base class for array-like objects with masks. (full description)
PagedArrIter -- A read/write Lattice iterator for PagedArrays. (full description)
PagedArray -- A Lattice that is read from or written to disk. (full description)
PixelCurve1D -- Arbitrary 1-dim curve in a lattice plane. (full description)
RO_LatticeIterator -- A readonly iterator for Lattices (full description)
RO_MaskedLatticeIterator -- A readonly iterator for masked Lattices. (full description)
RebinLattice -- Rebin a masked lattice. (full description)
RegionType -- Define the various region types. (full description)
StatsTiledCollapser -- Generate statistics, tile by tile, from a masked lattice (full description)
SubLattice -- A subset of a Lattice or MaskedLattice (full description)
TempLattice -- A Lattice that can be used for temporary storage (full description)
TileStepper -- traverse a tiled Lattice optimally with a tile cursor (full description)
TiledCollapser -- Abstract base class to collapse chunks for LatticeApply (full description)
TiledLineStepper -- Step a Vector cursor optimally through a tiled Lattice. (full description)
TiledShape -- Define the shape and tile shape (full description)