![]() |
CARTA Backend
The backend component of CARTA
|
#include <FileLoader.h>
Public Types | |
| using | ImageRef = std::shared_ptr< casacore::ImageInterface< float > > |
Public Member Functions | |
| 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 ®ion, casacore::SubImage< float > &sub_image) |
| virtual void | LoadImageStats (bool load_percentiles=false) |
| virtual FileInfo::ImageStats & | GetImageStats (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 ®ion_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 () |
| virtual bool | SaveFile (const CARTA::FileType type, const std::string &output_filename, std::string &message) |
| bool | IsGenerated () |
| bool | IsHistoryBeam () |
| void | SetHistoryBeam (const casacore::GaussianBeam &history_beam) |
Static Public Member Functions | |
| static FileLoader * | GetLoader (const std::string &filename, const std::string &directory="") |
| static FileLoader * | GetLoader (std::shared_ptr< casacore::ImageInterface< float > > image, const std::string &filename) |
Protected Member Functions | |
| 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 () |
| virtual void | AllocateImage (const std::string &hdu)=0 |
Protected Attributes | |
| 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 |
| using carta::FileLoader::ImageRef = std::shared_ptr<casacore::ImageInterface<float> > |
| FileLoader::FileLoader | ( | const std::string & | filename, |
| const std::string & | directory = "", |
||
| bool | is_gz = false, |
||
| bool | is_generated = false |
||
| ) |
|
virtualdefault |
|
protectedpure virtual |
Implemented in carta::CasaLoader, carta::CompListLoader, carta::ConcatLoader, carta::ExprLoader, carta::FitsLoader, carta::Hdf5Loader, carta::ImagePtrLoader, and carta::MiriadLoader.
|
protected |
|
virtual |
Reimplemented in carta::MiriadLoader.
| void FileLoader::CloseImageIfUpdated | ( | ) |
| bool FileLoader::FindCoordinateAxes | ( | std::string & | message | ) |
| bool FileLoader::GetAipsBeamSupport | ( | ) |
| AxesInfo FileLoader::GetAxes | ( | ) |
| bool FileLoader::GetBeams | ( | std::vector< CARTA::Beam > & | beams, |
| std::string & | error | ||
| ) |
|
virtual |
Reimplemented in carta::Hdf5Loader.
| std::shared_ptr< casacore::CoordinateSystem > FileLoader::GetCoordinateSystem | ( | const StokesSource & | stokes_source = StokesSource() | ) |
|
virtual |
Reimplemented in carta::Hdf5Loader.
| casacore::DataType FileLoader::GetDataType | ( | ) |
| DimsInfo FileLoader::GetDims | ( | ) |
|
virtual |
Reimplemented in carta::Hdf5Loader.
| std::string FileLoader::GetFileName | ( | ) |
| FileLoader::ImageRef FileLoader::GetImage | ( | bool | check_data_type = true | ) |
|
virtual |
|
static |
|
static |
|
virtual |
Reimplemented in carta::Hdf5Loader.
| casacore::IPosition FileLoader::GetShape | ( | ) |
| bool FileLoader::GetSlice | ( | casacore::Array< float > & | data, |
| const StokesSlicer & | stokes_slicer | ||
| ) |
|
protectedvirtual |
|
protectedvirtual |
| FileLoader::ImageRef FileLoader::GetStokesImage | ( | const StokesSource & | stokes_source | ) |
|
inline |
|
virtual |
|
virtual |
| bool FileLoader::GetSubImage | ( | const casacore::Slicer & | slicer, |
| const casacore::LattRegionHolder & | region, | ||
| casacore::SubImage< float > & | sub_image | ||
| ) |
| bool FileLoader::GetSubImage | ( | const StokesRegion & | stokes_region, |
| casacore::SubImage< float > & | sub_image | ||
| ) |
| bool FileLoader::GetSubImage | ( | const StokesSlicer & | stokes_slicer, |
| casacore::SubImage< float > & | sub_image | ||
| ) |
|
virtual |
|
virtual |
Reimplemented in carta::Hdf5Loader.
| bool FileLoader::ImageUpdated | ( | ) |
| bool FileLoader::IsComplexDataType | ( | ) |
|
inline |
|
inline |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
|
virtual |
Reimplemented in carta::ExprLoader.
| void FileLoader::SetAipsBeamSupport | ( | bool | support | ) |
|
inline |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Reimplemented in carta::Hdf5Loader.
|
virtual |
Reimplemented in carta::Hdf5Loader.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |