casacore
Loading...
Searching...
No Matches
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: casa-feedback@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#ifndef LATTICES_LELLATTCOORD_H
27#define LATTICES_LELLATTCOORD_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/lattices/LEL/LELLattCoordBase.h>
32#include <casacore/casa/BasicSL/String.h>
33
34namespace casacore { // # NAMESPACE CASACORE - BEGIN
35
36// # Forward Declarations
37class LatticeExprNode;
39class IPosition;
40
41// <summary>
42// The base letter class for lattice coordinates in LEL.
43// </summary>
44
45// <use visibility=local>
46
47// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
48// </reviewed>
49
50// <prerequisite>
51// <li> <linkto class="Lattice"> Lattice</linkto>
52// <li> <linkto class="LELLattCoordBase"> LELLattCoordBase</linkto>
53// </prerequisite>
54
55// <synopsis>
56// This class is a letter class for the envelope class
57// <linkto class=LELCoordinates>LELCoordinates</linkto>.
58// It acts as the coordinates class for Lattice objects without
59// coordinates (like PagedArray).
60//
61// It does not do anything, but makes it possible that other classes
62// (like <linkto class=LELImageCoord>LELImageCoord</linkto>)
63// implement their own behaviour.
64// </synopsis>
65
66// <motivation>
67// It must be possible to handle image coordinates in a lattice
68// expression.
69// </motivation>
70
71// # <todo asof="1998/01/31">
72// # <li>
73// # </todo>
74
76 public:
78
79 // A virtual destructor is needed so that it will use the actual
80 // destructor in the derived class.
81 virtual ~LELLattCoord();
82
83 // The class does not have true coordinates.
84 virtual Bool hasCoordinates() const;
85
86 // Create a SubLattice for an expression node.
88 const LattRegionHolder& region) const;
89
90 // Create an extension for an expression node.
91 virtual LatticeExprNode makeExtendLattice(const LatticeExprNode& expr, const IPosition& newShape,
92 const LELLattCoordBase& newCoord) const;
93
94 // Create a rebinning for an expression node.
96 const IPosition& binning) const;
97
98 // Get the coordinates of the spectral axis for the given shape.
99 // This function throws an exception as a Lattice has no coordinates.
100 virtual uInt getSpectralInfo(Vector<Double>& worldCoordinates, const IPosition& shape) const;
101
102 // The name of the class.
103 virtual String classname() const;
104
105 // Check how the coordinates of this and that compare.
106 virtual Int compare(const LELLattCoordBase& other) const;
107
108 // Check how the coordinates of this and that image compare.
109 // This function is used by <src>conform</src> to make a
110 // double virtual dispatch possible.
111 virtual Int doCompare(const LELImageCoord& other) const;
112};
113
114} // namespace casacore
115
116#endif
virtual LatticeExprNode makeRebinLattice(const LatticeExprNode &expr, const IPosition &binning) const
Create a rebinning for an expression node.
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 LatticeExprNode makeSubLattice(const LatticeExprNode &expr, const LattRegionHolder &region) const
Create a SubLattice for an expression node.
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 LatticeExprNode makeExtendLattice(const LatticeExprNode &expr, const IPosition &newShape, const LELLattCoordBase &newCoord) const
Create an extension for an expression node.
virtual uInt getSpectralInfo(Vector< Double > &worldCoordinates, const IPosition &shape) const
Get the coordinates of the spectral axis for the given shape.
virtual Int doCompare(const LELImageCoord &other) const
Check how the coordinates of this and that image compare.
String: the storage and methods of handling collections of characters.
Definition String.h:355
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49
IPosition shape(const RecordFieldId &) const
Get the actual shape of this field.
int Int
Definition aipstype.h:48
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40