casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AnnCenterBox.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_ANNCENTERBOX_H
18 #define ANNOTATIONS_ANNCENTERBOX_H
19 
20 #include <casa/aips.h>
22 
23 namespace casa {
24 
25 // <summary>
26 // This class represents a annotation for rectangular (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 side widths.
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 rectangular region as specified in ASCII format.
40 // Specified by center position and widths of sides.
41 // </etymology>
42 
43 // <synopsis>
44 // This class represents an annotation of rectangular region in coordinate space specified by
45 // center and widths of sides. In general, in order
46 // to preserve the region through a rotation (eg from one coordinate frame to another), all four corners
47 // must be tracked through the rotation. Hence, this region is effectively a four corner polygon.
48 // </synopsis>
49 
50 
51 class AnnCenterBox: public AnnPolygon {
52 
53 public:
54 
56  const casacore::Quantity& centerx,
57  const casacore::Quantity& centery,
58  const casacore::Quantity& xwidth,
59  const casacore::Quantity& ywidth,
60  const casacore::String& dirRefFrameString,
61  const casacore::CoordinateSystem& csys,
62  const casacore::IPosition& imShape,
63  const casacore::Quantity& beginFreq,
64  const casacore::Quantity& endFreq,
65  const casacore::String& freqRefFrameString,
66  const casacore::String& dopplerString,
67  const casacore::Quantity& restfreq,
69  const casacore::Bool annotationOnly,
70  const casacore::Bool requireImageRegion=true
71  );
72 
73  // Simplified constructor.
74  // all frequencies are used (these can be set after construction).
75  // centerx and centery
76  // must be in the same frame as the csys direction coordinate.
77  // is a region (not just an annotation), although this value can be changed after
78  // construction.
80  const casacore::Quantity& centerx,
81  const casacore::Quantity& centery,
82  const casacore::Quantity& xwidth,
83  const casacore::Quantity& ywidth,
84  const casacore::CoordinateSystem& csys,
85  const casacore::IPosition& imShape,
87  const casacore::Bool requireImageRegion=true
88  );
89 
90  // implicit copy constructor and destructor are fine
91 
92  AnnCenterBox& operator=(const AnnCenterBox& other);
93 
94  std::ostream& print(std::ostream &os) const;
95 
96 private:
98 
99 };
100 
101 }
102 
103 #endif /* ASCIICENTERBOXREGION_H_ */
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
A 1-D Specialization of the Array class.
AnnCenterBox & operator=(const AnnCenterBox &other)
implicit copy constructor and destructor are fine
This class represents a single polygon (in position coordinates) annotation specified in an ascii reg...
Definition: AnnPolygon.h:46
AnnCenterBox(const casacore::Quantity &centerx, const casacore::Quantity &centery, const casacore::Quantity &xwidth, const casacore::Quantity &ywidth, 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)
casacore::Quantity _inpXCenter
Definition: AnnCenterBox.h:97
casacore::Quantity _inpYWidth
Definition: AnnCenterBox.h:97
casacore::Quantity _inpYCenter
Definition: AnnCenterBox.h:97
This class represents a annotation for rectangular (in position coordinates) region specified in an a...
Definition: AnnCenterBox.h:51
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Quantity _inpXWidth
Definition: AnnCenterBox.h:97
std::ostream & print(std::ostream &os) const
String: the storage and methods of handling collections of characters.
Definition: String.h:223
Interconvert pixel and world coordinates.