casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
casa::LatticeModel Class Reference

models with an internal & external representation as an casacore::Lattice More...

#include <LatticeModel.h>

Inheritance diagram for casa::LatticeModel:
casa::LinearModel< casacore::Lattice< casacore::Float > >

Public Member Functions

 LatticeModel (casacore::Lattice< casacore::Float > &mod)
 
virtual ~LatticeModel ()
 The destructor does nothing. More...
 
virtual const
casacore::Lattice
< casacore::Float > & 
getModel () const
 returns a reference to the model More...
 
virtual void setModel (const casacore::Lattice< casacore::Float > &model)
 Change the underlying Model to to the one specified. More...
 
- Public Member Functions inherited from casa::LinearModel< casacore::Lattice< casacore::Float > >
virtual ~LinearModel ()
 A virtual destructor is necessary. More...
 

Private Attributes

casacore::Lattice
< casacore::Float > * 
itsModelPtr
 

Detailed Description

models with an internal & external representation as an casacore::Lattice

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Synopsis

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.

Example

LatticeModel<casacore::Float> currentModel(); // Cannot use the model yet!
{
casacore::PagedImage<casacore::Float> bestGuess(Iposition(2,32,32));
... put your best guess into the casacore::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.

Motivation

All the different image plane based clean algorithms have a common implementation in that they can use an casacore::Lattice (ie, casacore::PagedImage) to store the current model. This class provides a way to abstract this functionality.

Template Type Argument Requirements (T)

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

Thrown Exceptions

class does not explicitly throw exceptions however the objects used by this class may

To Do

Definition at line 107 of file LatticeModel.h.

Constructor & Destructor Documentation

casa::LatticeModel::LatticeModel ( casacore::Lattice< casacore::Float > &  mod)
virtual casa::LatticeModel::~LatticeModel ( )
virtual

The destructor does nothing.

Member Function Documentation

virtual const casacore::Lattice<casacore::Float>& casa::LatticeModel::getModel ( ) const
inlinevirtual

returns a reference to the model

Implements casa::LinearModel< casacore::Lattice< casacore::Float > >.

Definition at line 117 of file LatticeModel.h.

References itsModelPtr.

virtual void casa::LatticeModel::setModel ( const casacore::Lattice< casacore::Float > &  model)
inlinevirtual

Change the underlying Model to to the one specified.

Reference semantics are used so that no data is copied.

Implements casa::LinearModel< casacore::Lattice< casacore::Float > >.

Definition at line 121 of file LatticeModel.h.

References casacore::Lattice< T >::clone(), and itsModelPtr.

Member Data Documentation

casacore::Lattice<casacore::Float>* casa::LatticeModel::itsModelPtr
private

Definition at line 125 of file LatticeModel.h.

Referenced by getModel(), and setModel().


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