ComponentListWrapper.h

Go to the documentation of this file.
00001 //# Copyright (C) 1994,1995,1996,1997,1998,1999,2000
00002 //# Associated Universities, Inc. Washington DC, USA.
00003 //#
00004 //# This library is free software; you can redistribute it and/or modify it
00005 //# under the terms of the GNU Library General Public License as published by
00006 //# the Free Software Foundation; either version 2 of the License, or (at your
00007 //# option) any later version.
00008 //#
00009 //# This library is distributed in the hope that it will be useful, but WITHOUT
00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00012 //# License for more details.
00013 //#
00014 //# You should have received a copy of the GNU Library General Public License
00015 //# along with this library; if not, write to the Free Software Foundation,
00016 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00017 //#
00018 //# Correspondence concerning AIPS++ should be addressed as follows:
00019 //#        Internet email: aips2-request@nrao.edu.
00020 //#        Postal address: AIPS++ Project Office
00021 //#                        National Radio Astronomy Observatory
00022 //#                        520 Edgemont Road
00023 //#                        Charlottesville, VA 22903-2475 USA
00024 //#
00025 
00026 #ifndef COMPONENTLISTWRAPPER_H_
00027 #define COMPONENTLISTWRAPPER_H_
00028 
00029 #include <casa/BasicSL/String.h>
00030 #include <components/ComponentModels/ComponentList.h>
00031 #include <QTextStream>
00032 namespace casa {
00033 
00034         template <class T> class ImageInterface;
00035         class RegionShape;
00036         class RegionBox;
00037 
00042         class ComponentListWrapper {
00043         public:
00044                 ComponentListWrapper();
00045                 int getSize() const;
00046                 string getRA( int i ) const;
00047                 string getDEC( int i ) const;
00048                 string getType( int i ) const;
00049                 const ComponentShape* getShape( int i ) const;
00050                 Quantity getMajorAxis( int i ) const;
00051                 Quantity getMinorAxis( int i ) const;
00052                 Quantity getAngle( int i ) const;
00053                 Quantum< Vector<double> > getLatLong( int i ) const;
00054                 Quantity getFlux( int i ) const;
00055                 //QString getEstimateFixed( int index ) const;
00056                 void clear();
00057                 void remove( QVector<int> indices );
00058                 void fromComponentList( ComponentList list );
00059                 bool fromRecord( String& errorMsg, Record& record );
00060                 bool toEstimateFile( QTextStream& stream,
00061                                      const ImageInterface<Float>*const image, QString& errorMsg,
00062                                      bool screenEstimates = false, RegionBox* screenBox = NULL) const;
00063                 QList<RegionShape*> toDrawingDisplay(const ImageInterface<Float>* image, const QString& colorName) const;
00064                 bool toRegionFile(const ImageInterface<float>* image, int channelIndex, const QString& filePath ) const;
00065                 virtual ~ComponentListWrapper();
00066 
00067         private:
00068                 void toRecord( Record& record, const Quantity& quantity ) const;
00069                 double getRAValue( int i, const String& unit ) const;
00070                 double getDECValue( int i, const String& unit ) const;
00071                 double radiansToDegrees( double value ) const;
00072                 double degreesToArcSecs( double Value ) const;
00073                 Quantity getAxis( int listIndex, int shapeIndex, bool toArcSecs ) const;
00074                 double rotateAngle( double value ) const;
00075                 void deconvolve(const ImageInterface<float>* image, int channel,
00076                                 Quantity& majorAxis, Quantity& minorAxis, Quantity& positionAngle) const;
00077 
00078                 ComponentList skyList;
00079                 const String RAD;
00080                 const String DEG;
00081                 const String ARC_SEC;
00082         };
00083 
00084 } /* namespace casa */
00085 #endif /* COMPONENTLISTWRAPPER_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1