CARTA Backend
The backend component of CARTA
Loading...
Searching...
No Matches
carta::ExprLoader Class Reference

#include <ExprLoader.h>

Inheritance diagram for carta::ExprLoader:
[legend]
Collaboration diagram for carta::ExprLoader:
[legend]

Public Member Functions

 ExprLoader (const std::string &filename, const std::string &directory="")
 
bool SaveFile (const CARTA::FileType type, const std::string &output_filename, std::string &message) override
 
- Public Member Functions inherited from carta::FileLoader
 FileLoader (const std::string &filename, const std::string &directory="", bool is_gz=false, bool is_generated=false)
 
virtual ~FileLoader ()=default
 
virtual bool CanOpenFile (std::string &error)
 
virtual void OpenFile (const std::string &hdu)
 
virtual bool HasData (FileInfo::Data ds) const
 
void SetAipsBeamSupport (bool support)
 
bool GetAipsBeamSupport ()
 
void CloseImageIfUpdated ()
 
ImageRef GetImage (bool check_data_type=true)
 
casacore::DataType GetDataType ()
 
bool IsComplexDataType ()
 
ImageRef GetStokesImage (const StokesSource &stokes_source)
 
bool GetBeams (std::vector< CARTA::Beam > &beams, std::string &error)
 
casacore::IPosition GetShape ()
 
AxesInfo GetAxes ()
 
DimsInfo GetDims ()
 
std::shared_ptr< casacore::CoordinateSystem > GetCoordinateSystem (const StokesSource &stokes_source=StokesSource())
 
bool FindCoordinateAxes (std::string &message)
 
bool GetSlice (casacore::Array< float > &data, const StokesSlicer &stokes_slicer)
 
bool GetSubImage (const StokesSlicer &stokes_slicer, casacore::SubImage< float > &sub_image)
 
bool GetSubImage (const StokesRegion &stokes_region, casacore::SubImage< float > &sub_image)
 
bool GetSubImage (const casacore::Slicer &slicer, const casacore::LattRegionHolder &region, casacore::SubImage< float > &sub_image)
 
virtual void LoadImageStats (bool load_percentiles=false)
 
virtual FileInfo::ImageStatsGetImageStats (int current_stokes, int channel)
 
virtual bool GetCursorSpectralData (std::vector< float > &data, int stokes, int cursor_x, int count_x, int cursor_y, int count_y, std::mutex &image_mutex)
 
virtual bool UseRegionSpectralData (const casacore::IPosition &region_shape, std::mutex &image_mutex)
 
virtual bool GetRegionSpectralData (int region_id, const AxisRange &z_range, int stokes, const casacore::ArrayLattice< casacore::Bool > &mask, const casacore::IPosition &origin, std::mutex &image_mutex, std::map< CARTA::StatsType, std::vector< double > > &results, float &progress)
 
virtual bool GetDownsampledRasterData (std::vector< float > &data, int z, int stokes, CARTA::ImageBounds &bounds, int mip, std::mutex &image_mutex)
 
virtual bool GetChunk (std::vector< float > &data, int &data_width, int &data_height, int min_x, int min_y, int z, int stokes, std::mutex &image_mutex)
 
virtual bool HasMip (int mip) const
 
virtual bool UseTileCache () const
 
std::string GetFileName ()
 
virtual void SetStokesCrval (float stokes_crval)
 
virtual void SetStokesCrpix (float stokes_crpix)
 
virtual void SetStokesCdelt (int stokes_cdelt)
 
virtual bool GetStokesTypeIndex (const CARTA::PolarizationType &stokes_type, int &stokes_index)
 
virtual bool GetStokesType (const int &stokes_index, CARTA::PolarizationType &stokes_type)
 
std::unordered_map< CARTA::PolarizationType, int > GetStokesIndices ()
 
bool ImageUpdated ()
 
bool IsGenerated ()
 
bool IsHistoryBeam ()
 
void SetHistoryBeam (const casacore::GaussianBeam &history_beam)
 

Private Member Functions

void AllocateImage (const std::string &hdu) override
 

Additional Inherited Members

- Public Types inherited from carta::FileLoader
using ImageRef = std::shared_ptr< casacore::ImageInterface< float > >
 
- Static Public Member Functions inherited from carta::FileLoader
static FileLoaderGetLoader (const std::string &filename, const std::string &directory="")
 
static FileLoaderGetLoader (std::shared_ptr< casacore::ImageInterface< float > > image, const std::string &filename)
 
- Protected Member Functions inherited from carta::FileLoader
virtual const casacore::IPosition GetStatsDataShape (FileInfo::Data ds)
 
virtual std::unique_ptr< casacore::ArrayBase > GetStatsData (FileInfo::Data ds)
 
virtual void LoadStats2DBasic (FileInfo::Data ds)
 
virtual void LoadStats2DHist ()
 
virtual void LoadStats2DPercent ()
 
virtual void LoadStats3DBasic (FileInfo::Data ds)
 
virtual void LoadStats3DHist ()
 
virtual void LoadStats3DPercent ()
 
double CalculateBeamArea ()
 
- Protected Attributes inherited from carta::FileLoader
std::string _filename
 
std::string _directory
 
std::string _hdu
 
bool _is_gz
 
bool _is_generated
 
unsigned int _modify_time
 
bool _support_aips_beam
 
bool _is_history_beam
 
casacore::GaussianBeam _history_beam
 
std::shared_ptr< casacore::ImageInterface< casacore::Float > > _image
 
std::shared_ptr< casacore::ImageInterface< float > > _computed_stokes_image
 
StokesSource _stokes_source
 
casacore::IPosition _image_shape
 
size_t _num_dims
 
DimsInfo _dims
 
AxesInfo _axes
 
std::shared_ptr< casacore::CoordinateSystem > _coord_sys
 
bool _has_pixel_mask
 
casacore::DataType _data_type
 
std::vector< std::vector< FileInfo::ImageStats > > _z_stats
 
std::vector< FileInfo::ImageStats_cube_stats
 
FileInfo::ImageStats _empty_stats
 
std::unordered_map< CARTA::PolarizationType, int > _stokes_indices
 
std::unordered_map< int, CARTA::PolarizationType > _stokes_types
 
float _stokes_crval
 
float _stokes_crpix
 
int _stokes_cdelt
 

Constructor & Destructor Documentation

◆ ExprLoader()

carta::ExprLoader::ExprLoader ( const std::string &  filename,
const std::string &  directory = "" 
)

Member Function Documentation

◆ AllocateImage()

void carta::ExprLoader::AllocateImage ( const std::string &  hdu)
overrideprivatevirtual

Implements carta::FileLoader.

Here is the call graph for this function:

◆ SaveFile()

bool carta::ExprLoader::SaveFile ( const CARTA::FileType  type,
const std::string &  output_filename,
std::string &  message 
)
overridevirtual

Reimplemented from carta::FileLoader.

Here is the call graph for this function:

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