LELLattice.h

Classes

LELLattice -- This LEL class handles access to Lattices (full description)

template <class T> class LELLattice : public LELInterface<T>

Interface

Public Members
LELLattice (const Lattice<T>& lattice)
LELLattice (const MaskedLattice<T>& lattice)
~LELLattice()
virtual void eval(LELArray<T>& result, const Slicer& section) const
virtual void evalRef(LELArrayRef<T>& result, const Slicer& section) const
virtual LELScalar<T> getScalar() const
virtual Bool prepareScalarExpr()
virtual String className() const
virtual Bool lock (FileLocker::LockType, uInt nattempts)
virtual void unlock()
virtual Bool hasLock (FileLocker::LockType) const
virtual void resync()

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

This derived LEL letter class handles access to the pixels in a Lattice

Synopsis

This LEL letter class is derived from LELInterface. It is used to construct LEL objects that access the pixels in a Lattice. It works with Lattices of type Float,Double,Complex,DComplex and Bool.

A description of the implementation details of the LEL classes can be found in Note 216

Example

Examples are not very useful as the user would never use these classes directly. Look in LatticeExprNode.cc to see how it invokes these classes. An example of how the user would indirectly use this class (through the envelope) is:
    IPosition shape(2,5,10);
    ArrayLattice<Float> x(shape); x.set(1.0);
    ArrayLattice<Float> y(shape); 
    y.copyData(x);                 // y = x
    

Motivation

Accessing Lattices is fundamental to manipulating their pixel values

To Do

Member Description

LELLattice (const Lattice<T>& lattice)
LELLattice (const MaskedLattice<T>& lattice)

Constructor takes lattice to fetch from it

~LELLattice()

Destructor does nothing

virtual void eval(LELArray<T>& result, const Slicer& section) const

Evaluate the expression; this means get the chunk of the lattice.

virtual void evalRef(LELArrayRef<T>& result, const Slicer& section) const

virtual LELScalar<T> getScalar() const

Getting a scalar value is not possible (throws exception).

virtual Bool prepareScalarExpr()

Do further preparations (e.g. optimization) on the expression.

virtual String className() const

Get class name

virtual Bool lock (FileLocker::LockType, uInt nattempts)
virtual void unlock()
virtual Bool hasLock (FileLocker::LockType) const
virtual void resync()

Handle locking/syncing of a lattice in a lattice expression.