casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
casa::Util Class Reference

#include <Util.h>

Static Public Member Functions

static const QString & ORGANIZATION ()
 
static const QString & APPLICATION ()
 
static void showUserMessage (QString &msg, QWidget *parent)
 
static double degMinSecToRadians (int degrees, int mins, float secs)
 
static double hrMinSecToRadians (int hours, int mins, float secs)
 
static QString toHTML (const QString &baseStr)
 
static int getCenter (const casacore::Vector< casacore::Double > &values, casacore::Double &mean)
 
static void getRa (double radians, int &raHour, int &raMin, double &raSec)
 
static void getDec (double radians, int &decDeg, int &decMin, double &decSec)
 
static void minMax (double &min, double &max, const casacore::Vector< casacore::Double > &values)
 
static QString toDegreeString (int hrs, int mins, double secs)
 
static QString toDecString (int hrs, int mins, double secs)
 
static void appendSign (double rad, QString &degreeString)
 
static QList< QString > getTitleCaseVariations (QString source)
 
static QString toTitleCase (QString word)
 
static casacore::String mainImageName (casacore::String path)
 
static QString stripBrackets (QString unitStr)
 Designed to take an input string of the format '[km/s]' and return 'km/s'. More...
 
static QString stripFont (QString unitStr)
 Designed to take an input string of the format <font color="black">km/s</font>' and return 'km/s'. More...
 
static int getTabularFrequencyAxisIndex (std::shared_ptr< const casacore::ImageInterface< casacore::Float > > img)
 Support for tabular axes that are frequency. More...
 
static casacore::Record getRegionRecord (casacore::String shape, const DisplayCoordinateSystem &cSys, const casacore::Vector< casacore::Double > &x, const casacore::Vector< casacore::Double > &y)
 
static std::pair
< casacore::Vector
< casacore::Float >
, casacore::Vector
< casacore::Float > > 
getProfile (std::shared_ptr< const casacore::ImageInterface< casacore::Float > > &imagePtr, const casacore::Vector< casacore::Double > &x, const casacore::Vector< casacore::Double > &y, const casacore::String &shape, int tabularAxis, ImageCollapserData::AggregateType, casacore::String unit, const casacore::String &coordinateType, const casacore::Quantity *const restFreq=0, const casacore::String &frame="")
 
static casacore::Record getEllipticalRegion3D (const DisplayCoordinateSystem &cSys, const casacore::Vector< casacore::Double > &x, const casacore::Vector< casacore::Double > &y, int channelMin, int channelMax, int spectralAxisNumber)
 Returns the record of a 3-dimension region with the base in the shape of an ellipse and height given by the channel range. More...
 
static casacore::Record getPolygonalRegion3D (const DisplayCoordinateSystem &cSys, const casacore::Vector< casacore::Double > &x, const casacore::Vector< casacore::Double > &y, int channelMin, int channelMax, int spectralAxisNumber)
 Returns the record of a 3-dimension region with the base in the shape of a polygon and height given by the channel range. More...
 
static casacore::ImageRegiongetEllipsoid (const DisplayCoordinateSystem &cSys, const casacore::Vector< casacore::Double > &x, const casacore::Vector< casacore::Double > &y)
 Return a 2D region in the shape of an ellipse. More...
 
static casacore::ImageRegiongetPolygon (const DisplayCoordinateSystem &cSys, const casacore::Vector< casacore::Double > &x, const casacore::Vector< casacore::Double > &y)
 Return a 2D region in the shape of a polygon. More...
 
static bool arrayEquals (const casacore::Vector< casacore::Double > &a, const casacore::Vector< casacore::Double > &b)
 Tests whether the contents of the two arrays are the same. More...
 

Private Member Functions

 Util ()
 
virtual ~Util ()
 

Static Private Member Functions

static double toRadians (double degrees)
 
static double toDecimalDegrees (int hrs, int mins, float seconds)
 
static casacore::Record make3DRegion (const DisplayCoordinateSystem &cSys, casacore::ImageRegion *shape3D, int channelMin, int channelMax, int spectralAxisNumber)
 

Static Private Attributes

static const double PI
 
static const double TIME_CONV
 
static const double RAD_DEGREE_CONVERSION
 

Detailed Description

Definition at line 45 of file Util.h.

Constructor & Destructor Documentation

casa::Util::Util ( )
private
virtual casa::Util::~Util ( )
privatevirtual

Member Function Documentation

static void casa::Util::appendSign ( double  rad,
QString &  degreeString 
)
static
static const QString& casa::Util::APPLICATION ( )
inlinestatic

Definition at line 53 of file Util.h.

static bool casa::Util::arrayEquals ( const casacore::Vector< casacore::Double > &  a,
const casacore::Vector< casacore::Double > &  b 
)
static

Tests whether the contents of the two arrays are the same.

Returns true if the arrays have the same size and contents; false otherwise.

static double casa::Util::degMinSecToRadians ( int  degrees,
int  mins,
float  secs 
)
static
static int casa::Util::getCenter ( const casacore::Vector< casacore::Double > &  values,
casacore::Double mean 
)
static
static void casa::Util::getDec ( double  radians,
int &  decDeg,
int &  decMin,
double &  decSec 
)
static
static casacore::ImageRegion* casa::Util::getEllipsoid ( const DisplayCoordinateSystem cSys,
const casacore::Vector< casacore::Double > &  x,
const casacore::Vector< casacore::Double > &  y 
)
static

Return a 2D region in the shape of an ellipse.

Parameters
cSysthe image coordinate system.
xthe x-coordinates of the ellipse bounding box.
ythe y-coordinates of the ellipse bounding box.
Returns
the 2D image region of the ellipse.
static casacore::Record casa::Util::getEllipticalRegion3D ( const DisplayCoordinateSystem cSys,
const casacore::Vector< casacore::Double > &  x,
const casacore::Vector< casacore::Double > &  y,
int  channelMin,
int  channelMax,
int  spectralAxisNumber 
)
static

Returns the record of a 3-dimension region with the base in the shape of an ellipse and height given by the channel range.

Parameters
cSysthe image coordinate system.
xthe x-coordinates of the ellipse bounding box.
ythe y-coordinates of the ellipse bounding box.
Returns
a casacore::Record describing cylindrical volume with a elliptical base.
static casacore::ImageRegion* casa::Util::getPolygon ( const DisplayCoordinateSystem cSys,
const casacore::Vector< casacore::Double > &  x,
const casacore::Vector< casacore::Double > &  y 
)
static

Return a 2D region in the shape of a polygon.

Parameters
cSysthe image coordinate system.
xthe x-coordinates of the polygon corner points.
ythe y-coordinates of the polygon corner points.
Returns
the 2D image region of the polygon.
static casacore::Record casa::Util::getPolygonalRegion3D ( const DisplayCoordinateSystem cSys,
const casacore::Vector< casacore::Double > &  x,
const casacore::Vector< casacore::Double > &  y,
int  channelMin,
int  channelMax,
int  spectralAxisNumber 
)
static

Returns the record of a 3-dimension region with the base in the shape of a polygon and height given by the channel range.

Parameters
cSysthe image coordinate system.
xthe x-coordinates of the polygon corner points.
ythe y-coordinates of the polygon corner points.
Returns
a casacore::Record describing cylindrical volume with a polygonal base.
static std::pair<casacore::Vector<casacore::Float>,casacore::Vector<casacore::Float> > casa::Util::getProfile ( std::shared_ptr< const casacore::ImageInterface< casacore::Float > > &  imagePtr,
const casacore::Vector< casacore::Double > &  x,
const casacore::Vector< casacore::Double > &  y,
const casacore::String shape,
int  tabularAxis,
ImageCollapserData::AggregateType  ,
casacore::String  unit,
const casacore::String coordinateType,
const casacore::Quantity *const  restFreq = 0,
const casacore::String frame = "" 
)
static
static void casa::Util::getRa ( double  radians,
int &  raHour,
int &  raMin,
double &  raSec 
)
static
static casacore::Record casa::Util::getRegionRecord ( casacore::String  shape,
const DisplayCoordinateSystem cSys,
const casacore::Vector< casacore::Double > &  x,
const casacore::Vector< casacore::Double > &  y 
)
static
static int casa::Util::getTabularFrequencyAxisIndex ( std::shared_ptr< const casacore::ImageInterface< casacore::Float > >  img)
static

Support for tabular axes that are frequency.

Returns -1 if there is no tabular index in the image in frequency units.

static QList<QString> casa::Util::getTitleCaseVariations ( QString  source)
static
static double casa::Util::hrMinSecToRadians ( int  hours,
int  mins,
float  secs 
)
static
static casacore::String casa::Util::mainImageName ( casacore::String  path)
static
static casacore::Record casa::Util::make3DRegion ( const DisplayCoordinateSystem cSys,
casacore::ImageRegion shape3D,
int  channelMin,
int  channelMax,
int  spectralAxisNumber 
)
staticprivate
static void casa::Util::minMax ( double &  min,
double &  max,
const casacore::Vector< casacore::Double > &  values 
)
static
static const QString& casa::Util::ORGANIZATION ( )
inlinestatic

Definition at line 49 of file Util.h.

static void casa::Util::showUserMessage ( QString &  msg,
QWidget *  parent 
)
static
static QString casa::Util::stripBrackets ( QString  unitStr)
static

Designed to take an input string of the format '[km/s]' and return 'km/s'.

static QString casa::Util::stripFont ( QString  unitStr)
static

Designed to take an input string of the format <font color="black">km/s</font>' and return 'km/s'.

static double casa::Util::toDecimalDegrees ( int  hrs,
int  mins,
float  seconds 
)
staticprivate
static QString casa::Util::toDecString ( int  hrs,
int  mins,
double  secs 
)
static
static QString casa::Util::toDegreeString ( int  hrs,
int  mins,
double  secs 
)
static
static QString casa::Util::toHTML ( const QString &  baseStr)
static
static double casa::Util::toRadians ( double  degrees)
staticprivate
static QString casa::Util::toTitleCase ( QString  word)
static

Member Data Documentation

const double casa::Util::PI
staticprivate

Definition at line 152 of file Util.h.

const double casa::Util::RAD_DEGREE_CONVERSION
staticprivate

Definition at line 154 of file Util.h.

const double casa::Util::TIME_CONV
staticprivate

Definition at line 153 of file Util.h.


The documentation for this class was generated from the following file: