casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ComponentListWrapper.h
Go to the documentation of this file.
1 //# Copyright (C) 1994,1995,1996,1997,1998,1999,2000
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 
26 #ifndef COMPONENTLISTWRAPPER_H_
27 #define COMPONENTLISTWRAPPER_H_
28 
29 #include <casa/BasicSL/String.h>
31 #include <QTextStream>
32 namespace casacore{
33 
34  template <class T> class ImageInterface;
35 }
36 
37 namespace casa {
38 
39  class RegionShape;
40  class RegionBox;
41 
47  public:
49  int getSize() const;
50  string getRA( int i ) const;
51  string getDEC( int i ) const;
52  string getType( int i ) const;
53  const ComponentShape* getShape( int i ) const;
54  casacore::Quantity getMajorAxis( int i ) const;
55  casacore::Quantity getMinorAxis( int i ) const;
56  casacore::Quantity getAngle( int i ) const;
58  casacore::Quantity getFlux( int i ) const;
59  //QString getEstimateFixed( int index ) const;
60  void clear();
61  void remove( QVector<int> indices );
62  void fromComponentList( ComponentList list );
63  bool fromRecord( casacore::String& errorMsg, casacore::Record& record );
64  bool toEstimateFile( QTextStream& stream,
65  const casacore::ImageInterface<casacore::Float>*const image, QString& errorMsg,
66  bool screenEstimates = false, RegionBox* screenBox = NULL) const;
67  QList<RegionShape*> toDrawingDisplay(const casacore::ImageInterface<casacore::Float>* image, const QString& colorName) const;
68  bool toRegionFile(const casacore::ImageInterface<float>* image, int channelIndex, const QString& filePath ) const;
69  virtual ~ComponentListWrapper();
70 
71  private:
72  void toRecord( casacore::Record& record, const casacore::Quantity& quantity ) const;
73  double getRAValue( int i, const casacore::String& unit ) const;
74  double getDECValue( int i, const casacore::String& unit ) const;
75  double radiansToDegrees( double value ) const;
76  double degreesToArcSecs( double Value ) const;
77  casacore::Quantity getAxis( int listIndex, int shapeIndex, bool toArcSecs ) const;
78  double rotateAngle( double value ) const;
79  void deconvolve(const casacore::ImageInterface<float>* image, int channel,
80  casacore::Quantity& majorAxis, casacore::Quantity& minorAxis, casacore::Quantity& positionAngle) const;
81 
86  };
87 
88 } // end namespace casa
89 
90 #endif /* COMPONENTLISTWRAPPER_H_ */
casacore::Quantity getMinorAxis(int i) const
casacore::Quantity getAngle(int i) const
casacore::Quantity getMajorAxis(int i) const
bool toRegionFile(const casacore::ImageInterface< float > *image, int channelIndex, const QString &filePath) const
void fromComponentList(ComponentList list)
QList< RegionShape * > toDrawingDisplay(const casacore::ImageInterface< casacore::Float > *image, const QString &colorName) const
string getType(int i) const
double radiansToDegrees(double value) const
const casacore::String DEG
string getDEC(int i) const
double getRAValue(int i, const casacore::String &unit) const
casacore::Quantum< casacore::Vector< double > > getLatLong(int i) const
Provides convenient accessors and functionality for a ComponentList.
bool fromRecord(casacore::String &errorMsg, casacore::Record &record)
const casacore::String RAD
Base class for component shapes.
const casacore::String ARC_SEC
void deconvolve(const casacore::ImageInterface< float > *image, int channel, casacore::Quantity &majorAxis, casacore::Quantity &minorAxis, casacore::Quantity &positionAngle) const
double getDECValue(int i, const casacore::String &unit) const
bool toEstimateFile(QTextStream &stream, const casacore::ImageInterface< casacore::Float > *const image, QString &errorMsg, bool screenEstimates=false, RegionBox *screenBox=NULL) const
A hierarchical collection of named fields of various types.
Definition: Record.h:180
void toRecord(casacore::Record &record, const casacore::Quantity &quantity) const
double rotateAngle(double value) const
A class for manipulating groups of components.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::Quantity getAxis(int listIndex, int shapeIndex, bool toArcSecs) const
string getRA(int i) const
double degreesToArcSecs(double Value) const
void clear()
QString getEstimateFixed(int index) const;.
const ComponentShape * getShape(int i) const
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
casacore::Quantity getFlux(int i) const
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42