casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AnnCircle.h
Go to the documentation of this file.
1 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
3 //# License for more details.
4 //#
5 //# You should have received a copy of the GNU Library General Public License
6 //# along with this library; if not, write to the Free Software Foundation,
7 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
8 //#
9 //# Correspondence concerning AIPS++ should be addressed as follows:
10 //# Internet email: aips2-request@nrao.edu.
11 //# Postal address: AIPS++ Project Office
12 //# National Radio Astronomy Observatory
13 //# 520 Edgemont Road
14 //# Charlottesville, VA 22903-2475 USA
15 //#
16 
17 #ifndef ANNOTATIONS_ANNCIRCLE_H
18 #define ANNOTATIONS_ANNCIRCLE_H
19 
20 #include <casa/aips.h>
22 
23 namespace casa {
24 
25 // <summary>
26 // This class represents an annotation for a circular (in position coordinates) region specified
27 // in an ascii region file as proposed in CAS-2285. It is specified by its center position
28 // and radius.
29 // </summary>
30 // <author>Dave Mehringer</author>
31 // <use visibility=export>
32 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
33 // </reviewed>
34 // <prerequisite>
35 
36 // </prerequisite>
37 
38 // <etymology>
39 // Holds the specification of an annotation of a circular region as specified in ASCII format.
40 // Specified by center position and radius.
41 // </etymology>
42 
43 // <synopsis>
44 // This class represents an annotation of a circular region in coordinate space specified by
45 // center and radius. Note that this represents a world coordinate region, even if the input
46 // radius is in pixels. If the direction coordinate does not have square pixels, then
47 // AnnEllipse should be used instead.
48 // </synopsis>
49 
50 class AnnCircle: public AnnRegion {
51 
52 public:
53 
54  AnnCircle(
55  const casacore::Quantity& xcenter,
56  const casacore::Quantity& ycneter,
57  const casacore::Quantity& radius,
58  const casacore::String& dirRefFrameString,
59  const casacore::CoordinateSystem& csys,
60  const casacore::IPosition& imShape,
61  const casacore::Quantity& beginFreq,
62  const casacore::Quantity& endFreq,
63  const casacore::String& freqRefFrameString,
64  const casacore::String& dopplerString,
65  const casacore::Quantity& restfreq,
67  const casacore::Bool annotationOnly,
68  const casacore::Bool requireImageRegion=true
69  );
70 
71  // Simplified constructor.
72  // all frequencies are used (these can be set after construction).
73  // xcenter and ycenter
74  // must be in the same frame as the csys direction coordinate.
75  // is a region (not just an annotation), although this value can be changed after
76  // construction.
77  AnnCircle(
78  const casacore::Quantity& xcenter,
79  const casacore::Quantity& ycneter,
80  const casacore::Quantity& radius,
81  const casacore::CoordinateSystem& csys,
82  const casacore::IPosition& imShape,
84  const casacore::Bool requireImageRegion=true
85  );
86 
87  // implicit copy constructor and destructor are fine
88 
89  AnnCircle& operator=(const AnnCircle& other);
90 
91  // get center position, converted to the reference frame
92  // of the coordinate system if necessary
94 
95  // get the radius of the circle with angular units
97 
98  virtual std::ostream& print(std::ostream &os) const;
99 
100 private:
103 
104  void _init(const casacore::Quantity& xcenter, const casacore::Quantity& ycenter);
105 
106 };
107 
108 }
109 
110 #endif /* ASCIICIRCLEREGION_H_ */
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
A Measure: astronomical direction.
Definition: MDirection.h:174
A 1-D Specialization of the Array class.
casacore::Quantity _inputRadius
Definition: AnnCircle.h:102
casacore::Quantity getRadius() const
get the radius of the circle with angular units
AnnotationBase::Direction _inputCenter
Definition: AnnCircle.h:101
This class represents a annotation referring to a region specified in an ascii region file as propose...
Definition: AnnRegion.h:53
AnnCircle(const casacore::Quantity &xcenter, const casacore::Quantity &ycneter, const casacore::Quantity &radius, const casacore::String &dirRefFrameString, const casacore::CoordinateSystem &csys, const casacore::IPosition &imShape, const casacore::Quantity &beginFreq, const casacore::Quantity &endFreq, const casacore::String &freqRefFrameString, const casacore::String &dopplerString, const casacore::Quantity &restfreq, const casacore::Vector< casacore::Stokes::StokesTypes > stokes, const casacore::Bool annotationOnly, const casacore::Bool requireImageRegion=true)
AnnCircle & operator=(const AnnCircle &other)
implicit copy constructor and destructor are fine
casacore::MDirection getCenter() const
get center position, converted to the reference frame of the coordinate system if necessary ...
This class represents an annotation for a circular (in position coordinates) region specified in an a...
Definition: AnnCircle.h:50
virtual std::ostream & print(std::ostream &os) const
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::Quantity _convertedRadius
Definition: AnnCircle.h:102
Interconvert pixel and world coordinates.