casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LELLattCoord.h
Go to the documentation of this file.
1 //# LELLattCoord.h: The base letter class for lattice coordinates in LEL
2 //# Copyright (C) 1998,1999,2000,2001
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef LATTICES_LELLATTCOORD_H
29 #define LATTICES_LELLATTCOORD_H
30 
31 
32 //# Includes
33 #include <casacore/casa/aips.h>
36 
37 namespace casacore { //# NAMESPACE CASACORE - BEGIN
38 
39 //# Forward Declarations
40 class LatticeExprNode;
41 class LattRegionHolder;
42 class IPosition;
43 
44 
45 // <summary>
46 // The base letter class for lattice coordinates in LEL.
47 // </summary>
48 
49 // <use visibility=local>
50 
51 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
52 // </reviewed>
53 
54 // <prerequisite>
55 // <li> <linkto class="Lattice"> Lattice</linkto>
56 // <li> <linkto class="LELLattCoordBase"> LELLattCoordBase</linkto>
57 // </prerequisite>
58 
59 // <synopsis>
60 // This class is a letter class for the envelope class
61 // <linkto class=LELCoordinates>LELCoordinates</linkto>.
62 // It acts as the coordinates class for Lattice objects without
63 // coordinates (like PagedArray).
64 //
65 // It does not do anything, but makes it possible that other classes
66 // (like <linkto class=LELImageCoord>LELImageCoord</linkto>)
67 // implement their own behaviour.
68 // </synopsis>
69 
70 // <motivation>
71 // It must be possible to handle image coordinates in a lattice
72 // expression.
73 // </motivation>
74 
75 //# <todo asof="1998/01/31">
76 //# <li>
77 //# </todo>
78 
79 
81 {
82 public:
83  LELLattCoord();
84 
85  // A virtual destructor is needed so that it will use the actual
86  // destructor in the derived class.
87  virtual ~LELLattCoord();
88 
89  // The class does not have true coordinates.
90  virtual Bool hasCoordinates() const;
91 
92  // Create a SubLattice for an expression node.
94  (const LatticeExprNode& expr,
95  const LattRegionHolder& region) const;
96 
97  // Create an extension for an expression node.
99  (const LatticeExprNode& expr,
100  const IPosition& newShape,
101  const LELLattCoordBase& newCoord) const;
102 
103  // Create a rebinning for an expression node.
105  (const LatticeExprNode& expr,
106  const IPosition& binning) const;
107 
108  // Get the coordinates of the spectral axis for the given shape.
109  // This function throws an exception as a Lattice has no coordinates.
110  virtual uInt getSpectralInfo (Vector<Double>& worldCoordinates,
111  const IPosition& shape) const;
112 
113  // The name of the class.
114  virtual String classname() const;
115 
116  // Check how the coordinates of this and that compare.
117  virtual Int compare (const LELLattCoordBase& other) const;
118 
119  // Check how the coordinates of this and that image compare.
120  // This function is used by <src>conform</src> to make a
121  // double virtual dispatch possible.
122  virtual Int doCompare (const LELImageCoord& other) const;
123 };
124 
125 
126 
127 } //# NAMESPACE CASACORE - END
128 
129 #endif
130 
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:118
virtual Int doCompare(const LELImageCoord &other) const
Check how the coordinates of this and that image compare.
int Int
Definition: aipstype.h:50
virtual ~LELLattCoord()
A virtual destructor is needed so that it will use the actual destructor in the derived class...
virtual String classname() const
The name of the class.
virtual Bool hasCoordinates() const
The class does not have true coordinates.
virtual Int compare(const LELLattCoordBase &other) const
Check how the coordinates of this and that compare.
virtual uInt getSpectralInfo(Vector< Double > &worldCoordinates, const IPosition &shape) const
Get the coordinates of the spectral axis for the given shape.
virtual LatticeExprNode makeExtendLattice(const LatticeExprNode &expr, const IPosition &newShape, const LELLattCoordBase &newCoord) const
Create an extension for an expression node.
virtual LatticeExprNode makeRebinLattice(const LatticeExprNode &expr, const IPosition &binning) const
Create a rebinning for an expression node.
The letter class for image coordinates.
Definition: LELImageCoord.h:77
Class to hold a region of interest in an image.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
Definition: ExprNode.h:1987
The base letter class for lattice coordinates in LEL.
Bridging class to allow C++ expressions involving lattices.
String: the storage and methods of handling collections of characters.
Definition: String.h:225
virtual LatticeExprNode makeSubLattice(const LatticeExprNode &expr, const LattRegionHolder &region) const
Create a SubLattice for an expression node.
The base letter class for lattice coordinates in LEL.
Definition: LELLattCoord.h:80
unsigned int uInt
Definition: aipstype.h:51