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

This class provides a priori image information derived from the image itself. More...

#include <ImageProperties.h>

Public Member Functions

 ImageProperties ()
 
 ImageProperties (const std::string &)
 
 ImageProperties (std::shared_ptr< casacore::ImageInterface< casacore::Float > >)
 
 ImageProperties (std::shared_ptr< casacore::ImageInterface< std::complex< float > > >)
 
const ImagePropertiesoperator= (const std::string &)
 
bool hasDirectionAxis () const
 
const std::string & directionType () const
 
bool hasSpectralAxis () const
 
const casacore::Vector
< casacore::Int > & 
shape () const
 
casacore::Vector< double > raRange () const
 
std::vector< std::string > raRangeAsStr () const
 
casacore::Vector< double > decRange () const
 
std::vector< std::string > decRangeAsStr () const
 
size_t nBeams () const
 
std::vector< std::vector
< double > > 
restoringBeams () const
 
std::vector< double > restoringBeam (size_t channel) const
 
std::vector< std::string > restoringBeamAsStr (size_t channel) const
 
std::vector< double > medianRestoringBeam () const
 
std::vector< std::string > medianRestoringBeamAsStr () const
 
casacore::Vector< double > freqRange (const std::string &units="") const
 
const std::string & frequencyUnits () const
 
const std::string & velocityUnits () const
 
const std::string & path () const
 
const DisplayCoordinateSystemcs () const
 
bool ok () const
 
int spectralAxisNumber () const
 export required DisplayCoordinateSystem functions instead of returning a DisplayCoordinateSystem reference... More...
 
const std::vector< double > & frequencies () const
 
const std::vector< double > & velocities () const
 

Private Member Functions

std::vector< double > beam_as_vector (const casacore::GaussianBeam &beam) const
 
std::vector< std::string > beam_as_string_vector (const casacore::GaussianBeam &beam) const
 
void clear_state ()
 
void initialize_state (std::shared_ptr< casacore::ImageInterface< casacore::Float > > image)
 
void reset (std::shared_ptr< casacore::ImageInterface< casacore::Float > > image)
 
void reset (const std::string &path="")
 

Private Attributes

bool status_ok
 
std::string path_
 
casacore::Vector< casacore::Intshape_
 
bool has_direction_axis
 
std::string direction_type
 
bool has_spectral_axis
 
std::vector< double > frequencies_
 
std::vector< double > velocities_
 
std::string freq_units
 
std::string velo_units
 
casacore::Vector< double > ra_range
 
std::vector< std::string > ra_range_str
 
casacore::Vector< double > dec_range
 
std::vector< std::string > dec_range_str
 
std::vector
< casacore::GaussianBeam
restoring_beams
 
DisplayCoordinateSystem cs_
 

Detailed Description

This class provides a priori image information derived from the image itself.

It was created to standardize the access to image properties, since this information is needed in a variety of places and is currently found in a variety of manners. The idea was that it would provide easy, standardized (e.g. velocity provided in km/s) access. There are still likely issues to iron out with expericence from new images.

It may be desirable to have 2nd order image information, e.g. which axes map to the x, y and z viewer display axes (or perhaps not), but if so, this information should be provided by a derived class.

Definition at line 55 of file ImageProperties.h.

Constructor & Destructor Documentation

casa::viewer::ImageProperties::ImageProperties ( )
casa::viewer::ImageProperties::ImageProperties ( const std::string &  )
casa::viewer::ImageProperties::ImageProperties ( std::shared_ptr< casacore::ImageInterface< casacore::Float > >  )
casa::viewer::ImageProperties::ImageProperties ( std::shared_ptr< casacore::ImageInterface< std::complex< float > > >  )

Member Function Documentation

std::vector<std::string> casa::viewer::ImageProperties::beam_as_string_vector ( const casacore::GaussianBeam beam) const
private

Referenced by restoringBeamAsStr().

std::vector<double> casa::viewer::ImageProperties::beam_as_vector ( const casacore::GaussianBeam beam) const
private

Referenced by restoringBeam().

void casa::viewer::ImageProperties::clear_state ( )
private
const DisplayCoordinateSystem& casa::viewer::ImageProperties::cs ( ) const
inline

Definition at line 112 of file ImageProperties.h.

References cs_.

casacore::Vector<double> casa::viewer::ImageProperties::decRange ( ) const
inline

Definition at line 82 of file ImageProperties.h.

References dec_range.

std::vector<std::string> casa::viewer::ImageProperties::decRangeAsStr ( ) const
inline

Definition at line 85 of file ImageProperties.h.

References dec_range_str.

const std::string& casa::viewer::ImageProperties::directionType ( ) const
inline

Definition at line 67 of file ImageProperties.h.

References direction_type.

casacore::Vector<double> casa::viewer::ImageProperties::freqRange ( const std::string &  units = "") const
const std::vector<double>& casa::viewer::ImageProperties::frequencies ( ) const
inline

Definition at line 123 of file ImageProperties.h.

References frequencies_.

const std::string& casa::viewer::ImageProperties::frequencyUnits ( ) const
inline

Definition at line 101 of file ImageProperties.h.

References freq_units.

bool casa::viewer::ImageProperties::hasDirectionAxis ( ) const
inline

Definition at line 64 of file ImageProperties.h.

References has_direction_axis.

bool casa::viewer::ImageProperties::hasSpectralAxis ( ) const
inline

Definition at line 70 of file ImageProperties.h.

References has_spectral_axis.

void casa::viewer::ImageProperties::initialize_state ( std::shared_ptr< casacore::ImageInterface< casacore::Float > >  image)
private
std::vector<double> casa::viewer::ImageProperties::medianRestoringBeam ( ) const
std::vector<std::string> casa::viewer::ImageProperties::medianRestoringBeamAsStr ( ) const
size_t casa::viewer::ImageProperties::nBeams ( ) const
inline

Definition at line 88 of file ImageProperties.h.

References restoring_beams.

bool casa::viewer::ImageProperties::ok ( ) const
inline

Definition at line 114 of file ImageProperties.h.

References status_ok.

const ImageProperties& casa::viewer::ImageProperties::operator= ( const std::string &  )
const std::string& casa::viewer::ImageProperties::path ( ) const
inline

Definition at line 108 of file ImageProperties.h.

References path_.

casacore::Vector<double> casa::viewer::ImageProperties::raRange ( ) const
inline

Definition at line 76 of file ImageProperties.h.

References ra_range.

std::vector<std::string> casa::viewer::ImageProperties::raRangeAsStr ( ) const
inline

Definition at line 79 of file ImageProperties.h.

References ra_range_str.

void casa::viewer::ImageProperties::reset ( std::shared_ptr< casacore::ImageInterface< casacore::Float > >  image)
private
void casa::viewer::ImageProperties::reset ( const std::string &  path = "")
private
std::vector<double> casa::viewer::ImageProperties::restoringBeam ( size_t  channel) const
inline

Definition at line 92 of file ImageProperties.h.

References beam_as_vector(), and restoring_beams.

std::vector<std::string> casa::viewer::ImageProperties::restoringBeamAsStr ( size_t  channel) const
inline

Definition at line 95 of file ImageProperties.h.

References beam_as_string_vector(), and restoring_beams.

std::vector<std::vector<double> > casa::viewer::ImageProperties::restoringBeams ( ) const
const casacore::Vector<casacore::Int>& casa::viewer::ImageProperties::shape ( ) const
inline

Definition at line 73 of file ImageProperties.h.

References shape_.

int casa::viewer::ImageProperties::spectralAxisNumber ( ) const
inline

export required DisplayCoordinateSystem functions instead of returning a DisplayCoordinateSystem reference...

Definition at line 119 of file ImageProperties.h.

References cs_, and casa::DisplayCoordinateSystem::spectralAxisNumber().

const std::vector<double>& casa::viewer::ImageProperties::velocities ( ) const
inline

Definition at line 124 of file ImageProperties.h.

References velocities_.

const std::string& casa::viewer::ImageProperties::velocityUnits ( ) const
inline

Definition at line 105 of file ImageProperties.h.

References velo_units.

Member Data Documentation

DisplayCoordinateSystem casa::viewer::ImageProperties::cs_
private

Definition at line 148 of file ImageProperties.h.

Referenced by cs(), and spectralAxisNumber().

casacore::Vector<double> casa::viewer::ImageProperties::dec_range
private

Definition at line 145 of file ImageProperties.h.

Referenced by decRange().

std::vector<std::string> casa::viewer::ImageProperties::dec_range_str
private

Definition at line 146 of file ImageProperties.h.

Referenced by decRangeAsStr().

std::string casa::viewer::ImageProperties::direction_type
private

Definition at line 137 of file ImageProperties.h.

Referenced by directionType().

std::string casa::viewer::ImageProperties::freq_units
private

Definition at line 141 of file ImageProperties.h.

Referenced by frequencyUnits().

std::vector<double> casa::viewer::ImageProperties::frequencies_
private

Definition at line 139 of file ImageProperties.h.

Referenced by frequencies().

bool casa::viewer::ImageProperties::has_direction_axis
private

Definition at line 136 of file ImageProperties.h.

Referenced by hasDirectionAxis().

bool casa::viewer::ImageProperties::has_spectral_axis
private

Definition at line 138 of file ImageProperties.h.

Referenced by hasSpectralAxis().

std::string casa::viewer::ImageProperties::path_
private

Definition at line 134 of file ImageProperties.h.

Referenced by path().

casacore::Vector<double> casa::viewer::ImageProperties::ra_range
private

Definition at line 143 of file ImageProperties.h.

Referenced by raRange().

std::vector<std::string> casa::viewer::ImageProperties::ra_range_str
private

Definition at line 144 of file ImageProperties.h.

Referenced by raRangeAsStr().

std::vector<casacore::GaussianBeam> casa::viewer::ImageProperties::restoring_beams
private

Definition at line 147 of file ImageProperties.h.

Referenced by nBeams(), restoringBeam(), and restoringBeamAsStr().

casacore::Vector<casacore::Int> casa::viewer::ImageProperties::shape_
private

Definition at line 135 of file ImageProperties.h.

Referenced by shape().

bool casa::viewer::ImageProperties::status_ok
private

Definition at line 133 of file ImageProperties.h.

Referenced by ok().

std::string casa::viewer::ImageProperties::velo_units
private

Definition at line 142 of file ImageProperties.h.

Referenced by velocityUnits().

std::vector<double> casa::viewer::ImageProperties::velocities_
private

Definition at line 140 of file ImageProperties.h.

Referenced by velocities().


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