casa
$Rev:20696$
|
models with an internal & external representation as an Lattice More...
#include <LatticeModel.h>
Public Member Functions | |
LatticeModel (Lattice< Float > &mod) | |
virtual | ~LatticeModel () |
The destructor does nothing. | |
virtual const Lattice< Float > & | getModel () const |
returns a reference to the model | |
virtual void | setModel (const Lattice< Float > &model) |
Change the underlying Model to to the one specified. | |
Private Attributes | |
Lattice< Float > * | itsModelPtr |
models with an internal & external representation as an Lattice
Public interface
<h3>Review Status</h3><dl><dt>Date Reviewed:<dd>yyyy/mm/dd</dl>
An LatticeModel is a base class for Models that can be represented by Lattices. It is expected that this class will be mainly used as base classes for other classes which will then provide the solve() functions necessary to update the model given an equation.
However this class does not contain any pure virtual functions and hence can be used "as is". An example of this is given below. For an example of how this class can be used by derived classes see the HogbomCleanModel class.
LatticeModel<Float> currentModel(); // Cannot use the model yet! { PagedImage<Float> bestGuess(Iposition(2,32,32)); ... put your best guess into the Matrix ..\. currentModel.setModel(bestGuess); // This does a real copy } ConvolutionEquation eqn(psf, dirty); // psf, and dirty are PagedImages defined // elsewhere. eqn.evaluate(result, currentModel); // Here result is the convolution of // of the model with the psf.
All the different image plane based clean algorithms have a common implementation in that they can use an Lattice (ie, PagedImage) to store the current model. This class provides a way to abstract this functionality.
the template arguement for this class can be just about anything, the use of this class with an equation class will significantly restrict the possible templates. I have used this class (or derivations of it) with the following data types. Float StokesVector
class does not explicitly throw exceptions however the objects used by this class may
Definition at line 107 of file LatticeModel.h.
casa::LatticeModel::LatticeModel | ( | Lattice< Float > & | mod | ) |
virtual casa::LatticeModel::~LatticeModel | ( | ) | [virtual] |
The destructor does nothing.
virtual const Lattice<Float>& casa::LatticeModel::getModel | ( | ) | const [inline, virtual] |
returns a reference to the model
Implements casa::LinearModel< Lattice< Float > >.
Definition at line 117 of file LatticeModel.h.
References itsModelPtr.
virtual void casa::LatticeModel::setModel | ( | const Lattice< Float > & | model | ) | [inline, virtual] |
Change the underlying Model to to the one specified.
Reference semantics are used so that no data is copied.
Implements casa::LinearModel< Lattice< Float > >.
Definition at line 121 of file LatticeModel.h.
References casa::Lattice< T >::clone(), and itsModelPtr.
Lattice<Float>* casa::LatticeModel::itsModelPtr [private] |
Definition at line 125 of file LatticeModel.h.
Referenced by getModel(), and setModel().