AnnAnnulus.h

Go to the documentation of this file.
00001 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00002 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00003 //# License for more details.
00004 //#
00005 //# You should have received a copy of the GNU Library General Public License
00006 //# along with this library; if not, write to the Free Software Foundation,
00007 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00008 //#
00009 //# Correspondence concerning AIPS++ should be addressed as follows:
00010 //#        Internet email: aips2-request@nrao.edu.
00011 //#        Postal address: AIPS++ Project Office
00012 //#                        National Radio Astronomy Observatory
00013 //#                        520 Edgemont Road
00014 //#                        Charlottesville, VA 22903-2475 USA
00015 //#
00016 
00017 #ifndef REGIONS_ANNANNULUS_H
00018 #define REGIONS_ANNANNULUS_H
00019 
00020 #include <casa/aips.h>
00021 #include <imageanalysis/Annotations/AnnRegion.h>
00022 
00023 namespace casa {
00024 
00025 // <summary>
00026 // This class represents an annotation for an annular (in position coordinates) region specified
00027 // in an ascii region file as proposed in CAS-2285. It is specified by its center position
00028 // and inner and outer radii.
00029 // </summary>
00030 // <author>Dave Mehringer</author>
00031 // <use visibility=export>
00032 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
00033 // </reviewed>
00034 // <prerequisite>
00035 
00036 // </prerequisite>
00037 
00038 // <etymology>
00039 // Holds the specification of a annotation for an annular region as specified in ASCII format.
00040 // Specified by center position and inner and outer radii.
00041 // </etymology>
00042 
00043 // <synopsis>
00044 // This class represents a annotation for an annular region in specified by
00045 // center and inner and outer radii.
00046 // </synopsis>
00047 
00048 
00049 class AnnAnnulus: public AnnRegion {
00050 
00051 public:
00052 
00053         // avoid using the default constructor, it's behavior is subject to change
00054         AnnAnnulus();
00055 
00056         AnnAnnulus(
00057                 const Quantity& xcenter,
00058                 const Quantity& ycenter,
00059                 const Quantity& innerRadius,
00060                 const Quantity& outerRadius,
00061                 const String& dirRefFrameString,
00062                 const CoordinateSystem& csys,
00063                 const IPosition& imShape,
00064                 const Quantity& beginFreq,
00065                 const Quantity& endFreq,
00066                 const String& freqRefFrameString,
00067                 const String& dopplerString,
00068                 const Quantity& restfreq,
00069                 const Vector<Stokes::StokesTypes> stokes,
00070                 const Bool annotationOnly
00071         );
00072 
00073         // Simplified constructor.
00074         // all frequencies and all polarizations are used (these can be set after construction).
00075         // xcenter and ycenter
00076         // must be in the same frame as the csys direction coordinate.
00077         // is a region (not just an annotation), although this value can be changed after
00078         // construction.
00079         AnnAnnulus(
00080                 const Quantity& xcenter,
00081                 const Quantity& ycenter,
00082                 const Quantity& innerRadius,
00083                 const Quantity& outerRadius,
00084                 const CoordinateSystem& csys,
00085                 const IPosition& imShape,
00086                 const Vector<Stokes::StokesTypes>& stokes
00087         );
00088 
00089         // the default copy constructor and destructor are fine
00090 
00091         AnnAnnulus& operator=(const AnnAnnulus& other);
00092 
00093         Bool operator==(const AnnAnnulus& other);
00094 
00095 
00096         // get the center position, converted to the frame
00097         // of the input coordinate system if necessary
00098         MDirection getCenter() const;
00099 
00100         // get the radii in angular units. The first
00101         // value will be the inner radius, the second
00102         // the outer
00103         Vector<Quantity> getRadii() const;
00104 
00105         virtual ostream& print(ostream &os) const;
00106 
00107 private:
00108         Vector<Quantity> _convertedRadii;
00109         Quantity _xcenter, _ycenter, _innerRadius, _outerRadius;
00110 
00111         void _init();
00112 };
00113 
00114 }
00115 
00116 #endif /* ANNANNULUS_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1