casa
$Rev:20696$
|
00001 //# LELLattCoordBase.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: LELLattCoordBase.h 18093 2004-11-30 17:51:10Z ddebonis $ 00027 00028 #ifndef LATTICES_LELLATTCOORDBASE_H 00029 #define LATTICES_LELLATTCOORDBASE_H 00030 00031 00032 //# Includes 00033 #include <casa/aips.h> 00034 #include <casa/BasicSL/String.h> 00035 00036 namespace casa { //# NAMESPACE CASA - BEGIN 00037 00038 //# Forward Declarations 00039 class LELImageCoord; 00040 class IPosition; 00041 template<class T> class Vector; 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="Bob Garwood" date="2000/01/25" tests="tLatticeExpr"> 00051 // </reviewed> 00052 00053 // <prerequisite> 00054 // <li> <linkto class="Lattice"> Lattice</linkto> 00055 // <li> <linkto class="LELCoordinates"> LELCoordinates</linkto> 00056 // </prerequisite> 00057 00058 // <synopsis> 00059 // This abstract base class is the basic letter for the envelope class 00060 // <linkto class=LELCoordinates>LELCoordinates</linkto>. 00061 // It does not do anything, but makes it possible that derived classes 00062 // (like <linkto class=LELLattCoord>LELLattCoord</linkto> and 00063 // <linkto class=LELImageCoord>LELImageCoord</linkto>) 00064 // implement their own behaviour. 00065 // </synopsis> 00066 00067 // <motivation> 00068 // It must be possible to handle image coordinates in a lattice 00069 // expression. 00070 // </motivation> 00071 00072 //# <todo asof="1998/01/31"> 00073 //# <li> 00074 //# </todo> 00075 00076 00077 class LELLattCoordBase 00078 { 00079 public: 00080 LELLattCoordBase() 00081 {}; 00082 00083 // A virtual destructor is needed so that it will use the actual 00084 // destructor in the derived class. 00085 virtual ~LELLattCoordBase(); 00086 00087 // Does the class have true coordinates? 00088 virtual Bool hasCoordinates() const = 0; 00089 00090 // The name of the class. 00091 virtual String classname() const = 0; 00092 00093 // Get the coordinates of the spectral axis for the given shape. 00094 // It returns the pixel axis number of the spectral coordinates. 00095 // -1 indicates that there is no pixel spectral axis. 00096 // An exception is thrown if there are no world spectral coordinates. 00097 virtual uInt getSpectralInfo (Vector<Double>& worldCoordinates, 00098 const IPosition& shape) const = 0; 00099 00100 // Check how the coordinates of this and that compare. 00101 virtual Int compare (const LELLattCoordBase& other) const = 0; 00102 00103 // Check how the coordinates of this and that image compare. 00104 // This function is used by <src>conform</src> to make a 00105 // double virtual dispatch possible. 00106 virtual Int doCompare (const LELImageCoord& other) const = 0; 00107 }; 00108 00109 00110 00111 } //# NAMESPACE CASA - END 00112 00113 #endif 00114