casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CasaImageBeamSet.h
Go to the documentation of this file.
1 //# Copyright (C) 1996,1997,1998,1999,2000,2001,2003
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 
26 #ifndef IMAGEANALYSIS_CASACasaImageBeamSet
27 #define IMAGEANALYSIS_CASACasaImageBeamSet
28 
30 
31 namespace casa {
32 
33 // <summary>
34 // Represents a set of restoring beams associated with an image. Implements getCommonBeam()
35 // </summary>
36 
37 // <use visibility=export>
38 
39 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
40 // </reviewed>
41 
42 // <prerequisite>
43 // </prerequisite>
44 
45 // <etymology>
46 // A Set of Beams associated with an Image.
47 // </etymology>
48 
49 // <synopsis>
50 // </synopsis>
51 //
52 // <example>
53 
54 // </example>
55 
56 
57 // <motivation>
58 // Restoring beams are used many places in image analysis tasks.
59 // </motivation>
60 
61 // <todo>
62 // </todo>
63 
65 public:
66 
67  // Construct an empty beam set.
69 
70  // Construct a beam set from an 2-D array of beams representing
71  // the frequency and stokes axis.
72  // Axis length 1 means it is valid for all channels cq. stokes.
73  // If the image has 0 spectral channels or stokes, the corresponding
74  // length of the axis in the provided matrix should be 1.
77  );
78 
79  // construct an CasaImageBeamSet representing a single beam which is valid for
80  // all channels and stokes
82 
83  // Create an CasaImageBeamSet of the specified shape with all
84  // GaussianBeams initialized to <src>beam</src>.
86 
87  // The copy constructor (reference semantics).
88  CasaImageBeamSet(const CasaImageBeamSet& other);
90 
92 
93  // Assignment can change the shape (copy semantics).
95 
96  static const casacore::String& className();
97 
98  // Get a beam to which all other beams in the set can be convolved.
99  // If all other beams can be convolved to the maximum area beam in the set, that beam will be returned.
100  // If not, this is guaranteed to be the minimum area beam to which
101  // all beams in the set can be convolved if all but one of the beams in the set can be convolved to the beam in the set with the
102  // largest area. Otherwise, the returned beam may or may not be the smallest possible beam to which all the beams in the set
103  // can be convolved.
105 
106 private:
107 
108  static void _transformEllipseByScaling(
109  casacore::Double& transformedMajor, casacore::Double& transformedMinor,
110  casacore::Double& transformedPa, casacore::Double major, casacore::Double minor,
111  casacore::Double pa, casacore::Double xScaleFactor, casacore::Double yScaleFactor
112  );
113 };
114 
115 std::ostream &operator<<(std::ostream &os, const CasaImageBeamSet& beamSet);
116 
117 }
118 
119 #endif
120 
CasaImageBeamSet()
Construct an empty beam set.
uInt nstokes() const
Get the number of stokes in the beam array.
Definition: ImageBeamSet.h:162
ostream & operator<<(ostream &os, const PageHeaderCache &cache)
CasaImageBeamSet & operator=(const CasaImageBeamSet &other)
Assignment can change the shape (copy semantics).
Represents a Gaussian restoring beam associated with an image.
Definition: GaussianBeam.h:68
static const casacore::String & className()
LatticeExprNode pa(const LatticeExprNode &left, const LatticeExprNode &right)
This function finds 180/pi*atan2(left,right)/2.
static void _transformEllipseByScaling(casacore::Double &transformedMajor, casacore::Double &transformedMinor, casacore::Double &transformedPa, casacore::Double major, casacore::Double minor, casacore::Double pa, casacore::Double xScaleFactor, casacore::Double yScaleFactor)
Represents a set of restoring beams associated with an image.
Definition: ImageBeamSet.h:88
double Double
Definition: aipstype.h:55
casacore::GaussianBeam getCommonBeam() const
Get a beam to which all other beams in the set can be convolved.
Represents a set of restoring beams associated with an image. Implements getCommonBeam() ...
String: the storage and methods of handling collections of characters.
Definition: String.h:223
static const GaussianBeam NULL_BEAM
Definition: GaussianBeam.h:71
unsigned int uInt
Definition: aipstype.h:51
uInt nchan() const
Get the number of channels in the beam array.
Definition: ImageBeamSet.h:157