casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AnnRectBox.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_ANNRECTBOX_H
18 #define ANNOTATIONS_ANNRECTBOX_H
19 
20 #include <casa/aips.h>
22 
23 namespace casa {
24 
25 // <summary>
26 // This class represents an annotation for rectangular (in position coordinates) region specified
27 // in an ascii region file as proposed in CAS-2285
28 // </summary>
29 // <author>Dave Mehringer</author>
30 // <use visibility=export>
31 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
32 // </reviewed>
33 // <prerequisite>
34 
35 // </prerequisite>
36 
37 // <etymology>
38 // Holds the specification of an annotation for a rectangular region as specified in ASCII format.
39 // </etymology>
40 
41 // <synopsis>
42 // This class represents an annotation for a rectangular region in coordinate space. In general, in order
43 // to preserve the region through a rotation (eg from one coordinate frame to another), all four corners
44 // must be tracked through the rotation. Hence, this region is effectively a four corner polygon.
45 // </synopsis>
46 
47 
48 class AnnRectBox: public AnnPolygon {
49 
50 public:
51 
52  AnnRectBox(
53  const casacore::Quantity& blcx,
54  const casacore::Quantity& blcy,
55  const casacore::Quantity& trcx,
56  const casacore::Quantity& trcy,
57  const casacore::String& dirRefFrameString,
58  const casacore::CoordinateSystem& csys,
59  const casacore::IPosition& imShape,
60  const casacore::Quantity& beginFreq,
61  const casacore::Quantity& endFreq,
62  const casacore::String& freqRefFrameString,
63  const casacore::String& dopplerString,
64  const casacore::Quantity& restfreq,
66  const casacore::Bool annotationOnly,
67  const casacore::Bool requireImageRegion=true
68  );
69 
70  // Simplified constructor.
71  // all frequencies are used (these can be set after construction).
72  // blcx, blcy, trcx, and trcy
73  // must be in the same frame as the csys direction coordinate.
74  // is a region (not just an annotation), although this value can be changed after
75  // construction.
76  AnnRectBox(
77  const casacore::Quantity& blcx,
78  const casacore::Quantity& blcy,
79  const casacore::Quantity& trcx,
80  const casacore::Quantity& trcy,
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  AnnRectBox& operator=(const AnnRectBox& other);
90 
91  // get the blc and trc direction coords for the box.
92  // The output directions will be converted from the input
93  // reference frame to the reference frame of the input
94  // coordinate system if necessary.
95  // blc is the 0th component, trc the 1st in the returned vector.
96 
97  //casacore::Vector<casacore::MDirection> getCorners() const;
98 
99  std::ostream& print(std::ostream &os) const;
100 
101 private:
103 };
104 
105 }
106 
107 #endif
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
A 1-D Specialization of the Array class.
This class represents an annotation for rectangular (in position coordinates) region specified in an ...
Definition: AnnRectBox.h:48
This class represents a single polygon (in position coordinates) annotation specified in an ascii reg...
Definition: AnnPolygon.h:46
AnnRectBox(const casacore::Quantity &blcx, const casacore::Quantity &blcy, const casacore::Quantity &trcx, const casacore::Quantity &trcy, 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)
AnnRectBox & operator=(const AnnRectBox &other)
implicit copy constructor and destructor are fine
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
AnnotationBase::Direction _inputCorners
Definition: AnnRectBox.h:102
String: the storage and methods of handling collections of characters.
Definition: String.h:223
std::ostream & print(std::ostream &os) const
get the blc and trc direction coords for the box.
Interconvert pixel and world coordinates.