casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
LELLattCoord.h
Go to the documentation of this file.
00001 //# LELLattCoord.h: The base letter class for lattice coordinates in LEL
00002 //# Copyright (C) 1998,1999,2000,2001
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: LELLattCoord.h 18093 2004-11-30 17:51:10Z ddebonis $
00027 
00028 #ifndef LATTICES_LELLATTCOORD_H
00029 #define LATTICES_LELLATTCOORD_H
00030 
00031 
00032 //# Includes
00033 #include <lattices/Lattices/LELLattCoordBase.h>
00034 #include <casa/BasicSL/String.h>
00035 
00036 namespace casa { //# NAMESPACE CASA - BEGIN
00037 
00038 //# Forward Declarations
00039 class LatticeExprNode;
00040 class LattRegionHolder;
00041 class IPosition;
00042 
00043 
00044 // <summary>
00045 // The base letter class for lattice coordinates in LEL.
00046 // </summary>
00047 
00048 // <use visibility=local>
00049 
00050 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
00051 // </reviewed>
00052 
00053 // <prerequisite>
00054 //   <li> <linkto class="Lattice"> Lattice</linkto>
00055 //   <li> <linkto class="LELLattCoordBase"> LELLattCoordBase</linkto>
00056 // </prerequisite>
00057 
00058 // <synopsis>
00059 // This class is a letter class for the envelope class
00060 // <linkto class=LELCoordinates>LELCoordinates</linkto>.
00061 // It acts as the coordinates class for Lattice objects without
00062 // coordinates (like PagedArray).
00063 //
00064 // It does not do anything, but makes it possible that other classes
00065 // (like <linkto class=LELImageCoord>LELImageCoord</linkto>)
00066 // implement their own behaviour.
00067 // </synopsis> 
00068 
00069 // <motivation>
00070 // It must be possible to handle image coordinates in a lattice
00071 // expression.   
00072 // </motivation>
00073 
00074 //# <todo asof="1998/01/31">
00075 //#  <li>
00076 //# </todo>
00077 
00078 
00079 class LELLattCoord : public LELLattCoordBase
00080 {
00081 public:
00082   LELLattCoord();
00083 
00084   // A virtual destructor is needed so that it will use the actual
00085   // destructor in the derived class.
00086   virtual ~LELLattCoord();
00087 
00088   // The class does not have true coordinates.
00089   virtual Bool hasCoordinates() const;
00090 
00091   // Create a SubLattice for an expression node.
00092   virtual LatticeExprNode makeSubLattice
00093                                     (const LatticeExprNode& expr,
00094                                      const LattRegionHolder& region) const;
00095 
00096   // Create an extension for an expression node.
00097   virtual LatticeExprNode makeExtendLattice
00098                                     (const LatticeExprNode& expr,
00099                                      const IPosition& newShape,
00100                                      const LELLattCoordBase& newCoord) const;
00101 
00102   // Create a rebinning for an expression node.
00103   virtual LatticeExprNode makeRebinLattice
00104                                     (const LatticeExprNode& expr,
00105                                      const IPosition& binning) const;
00106 
00107   // Get the coordinates of the spectral axis for the given shape.
00108   // This function throws an exception as a Lattice has no coordinates.
00109   virtual uInt getSpectralInfo (Vector<Double>& worldCoordinates,
00110                                 const IPosition& shape) const;
00111 
00112   // The name of the class.
00113   virtual String classname() const;
00114 
00115   // Check how the coordinates of this and that compare.
00116   virtual Int compare (const LELLattCoordBase& other) const;
00117 
00118   // Check how the coordinates of this and that image compare.
00119   // This function is used by <src>conform</src> to make a
00120   // double virtual dispatch possible.
00121   virtual Int doCompare (const LELImageCoord& other) const;
00122 };
00123 
00124 
00125 
00126 } //# NAMESPACE CASA - END
00127 
00128 #endif
00129