casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SliceStatistics.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 
27 #ifndef SLICESTATISTICS_H_
28 #define SLICESTATISTICS_H_
29 #include <casa/Arrays/Vector.h>
32 
33 #include <QString>
34 
35 namespace casacore{
36 
37  class Record;
38 }
39 
40 namespace casa {
41 
42 
50  public:
53  double getAngle( std::pair<int,int> pixelStart,
54  std::pair<int,int> pixelEnd ) const;
55  virtual double getLength(std::pair<double,double> worldStart,
56  std::pair<double,double> worldEnd,
57  std::pair<int,int> pixelStart,
58  std::pair<int,int> pixelEnd ) const = 0;
59  virtual double getLength( double value1World, double value2World,
60  double value1Pixel, double value2Pixel ) const = 0;
61  virtual double getStart( double value1World, double value2World,
62  double value1Pixel, double value2Pixel ) const = 0;
63  virtual double getEnd( double value1World, double value2World,
64  double value1Pixel, double value2Pixel ) const = 0;
65  virtual QString getLengthLabel() const = 0;
66  virtual QVector<double> interpolate( double start, double end,
67  const QVector<double>& values ) const;
68  virtual void adjustStart( QVector<double>& values, double start ) const=0;
70  double convertArcUnits( double value ) const;
71  virtual QVector<double> fromResults( casacore::Record* record )const = 0;
72  virtual void storeIncrement( double* incr, QVector<double>& values, int index) const = 0;
73  static QVector<double> getFromArray( const casacore::Array<float>& source );
74  virtual ~SliceStatistics();
75  protected:
76  QString getUnitText() const;
77 
78  double radiansToArcseconds( double rad ) const;
80  };
81 
82 } // end namespace casa
83 
84 
85 #endif /* SLICESTATISTICS_H_ */
static QVector< double > getFromArray(const casacore::Array< float > &source)
double getAngle(std::pair< int, int > pixelStart, std::pair< int, int > pixelEnd) const
SliceStatistics(SliceStatisticsFactory::AxisXUnits units)
virtual double getStart(double value1World, double value2World, double value1Pixel, double value2Pixel) const =0
const_iterator end() const
virtual void adjustStart(QVector< double > &values, double start) const =0
virtual double getEnd(double value1World, double value2World, double value1Pixel, double value2Pixel) const =0
virtual QVector< double > interpolate(double start, double end, const QVector< double > &values) const
virtual QString getLengthLabel() const =0
virtual double getLength(std::pair< double, double > worldStart, std::pair< double, double > worldEnd, std::pair< int, int > pixelStart, std::pair< int, int > pixelEnd) const =0
A hierarchical collection of named fields of various types.
Definition: Record.h:180
virtual void storeIncrement(double *incr, QVector< double > &values, int index) const =0
template &lt;class T, class U&gt; class vector;
Definition: MSFlagger.h:37
double radiansToArcseconds(double rad) const
Computes the angle and distance for a single line segment in the slice.
virtual ~SliceStatistics()
SliceStatisticsFactory::AxisXUnits xUnits
QVector< double > convertArcUnits(QVector< double > arcseconds) const
virtual QVector< double > fromResults(casacore::Record *record) const =0
QString getUnitText() const
void setXUnits(SliceStatisticsFactory::AxisXUnits units)
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42