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

#include <RegionHandler.h>

Collaboration diagram for carta::RegionHandler:
[legend]

Public Member Functions

 RegionHandler ()=default
 
 ~RegionHandler ()
 
bool SetRegion (int &region_id, RegionState &region_state, std::shared_ptr< casacore::CoordinateSystem > csys)
 
void RemoveRegion (int region_id)
 
std::shared_ptr< RegionGetRegion (int region_id)
 
void ImportRegion (int file_id, std::shared_ptr< Frame > frame, CARTA::FileType region_file_type, const std::string &region_file, bool file_is_filename, CARTA::ImportRegionAck &import_ack)
 
void ExportRegion (int file_id, std::shared_ptr< Frame > frame, CARTA::FileType region_file_type, CARTA::CoordinateType coord_type, std::map< int, CARTA::RegionStyle > &region_styles, std::string &filename, bool overwrite, CARTA::ExportRegionAck &export_ack)
 
void RemoveFrame (int file_id)
 
bool SetHistogramRequirements (int region_id, int file_id, std::shared_ptr< Frame > frame, const std::vector< CARTA::HistogramConfig > &configs)
 
bool SetSpatialRequirements (int region_id, int file_id, std::shared_ptr< Frame > frame, const std::vector< CARTA::SetSpatialRequirements_SpatialConfig > &spatial_profiles)
 
bool SetSpectralRequirements (int region_id, int file_id, std::shared_ptr< Frame > frame, const std::vector< CARTA::SetSpectralRequirements_SpectralConfig > &configs)
 
bool SetStatsRequirements (int region_id, int file_id, std::shared_ptr< Frame > frame, const std::vector< CARTA::SetStatsRequirements_StatsConfig > &stats_configs)
 
bool FillRegionHistogramData (std::function< void(CARTA::RegionHistogramData histogram_data)> region_histogram_callback, int region_id, int file_id)
 
bool FillSpectralProfileData (std::function< void(CARTA::SpectralProfileData profile_data)> cb, int region_id, int file_id, bool stokes_changed)
 
bool FillRegionStatsData (std::function< void(CARTA::RegionStatsData stats_data)> cb, int region_id, int file_id)
 
bool FillPointSpatialProfileData (int file_id, int region_id, std::vector< CARTA::SpatialProfileData > &spatial_data_vec)
 
bool FillLineSpatialProfileData (int file_id, int region_id, std::function< void(CARTA::SpatialProfileData profile_data)> cb)
 
bool CalculateMoments (int file_id, int region_id, const std::shared_ptr< Frame > &frame, GeneratorProgressCallback progress_callback, const CARTA::MomentRequest &moment_request, CARTA::MomentResponse &moment_response, std::vector< GeneratedImage > &collapse_results)
 
bool IsPointRegion (int region_id)
 
bool IsLineRegion (int region_id)
 
bool IsClosedRegion (int region_id)
 
std::vector< int > GetSpatialReqRegionsForFile (int file_id)
 
std::vector< int > GetSpatialReqFilesForRegion (int region_id)
 
bool CalculatePvImage (const CARTA::PvRequest &pv_request, std::shared_ptr< Frame > &frame, GeneratorProgressCallback progress_callback, CARTA::PvResponse &pv_response, GeneratedImage &pv_image)
 
bool UpdatePvPreviewRegion (int region_id, RegionState &region_state)
 
bool UpdatePvPreviewImage (int file_id, int region_id, bool quick_update, std::function< void(CARTA::PvResponse &pv_response, GeneratedImage &pv_image)> cb)
 
void StopPvCalc (int file_id)
 
void StopPvPreview (int preview_id)
 
void StopPvPreviewUpdates (int preview_id)
 
void ClosePvPreview (int preview_id)
 
bool FitImage (const CARTA::FittingRequest &fitting_request, CARTA::FittingResponse &fitting_response, std::shared_ptr< Frame > frame, GeneratedImage &model_image, GeneratedImage &residual_image, GeneratorProgressCallback progress_callback)
 

Private Types

using ProfilesMap = std::map< CARTA::StatsType, std::vector< double > >
 

Private Member Functions

int GetNextRegionId ()
 
int GetNextTemporaryRegionId ()
 
bool RegionFileIdsValid (int region_id, int file_id, bool check_annotation=false)
 
bool RegionSet (int region_id, bool check_annotation=false)
 
bool FrameSet (int file_id)
 
bool HasSpectralRequirements (int region_id, int file_id, const std::string &coordinate, const std::vector< CARTA::StatsType > &required_stats)
 
bool HasSpatialRequirements (int region_id, int file_id, const std::string &coordinate, int width)
 
void UpdateNewSpectralRequirements (int region_id)
 
void RemoveRegionRequirementsCache (int region_id)
 
void RemoveFileRequirementsCache (int file_id)
 
void ClearRegionCache (int region_id)
 
std::shared_ptr< casacore::LCRegion > ApplyRegionToFile (int region_id, int file_id, const StokesSource &stokes_source=StokesSource(), bool report_error=true)
 
bool ApplyRegionToFile (int region_id, int file_id, const AxisRange &z_range, int stokes, std::shared_ptr< casacore::LCRegion > lc_region, StokesRegion &stokes_region)
 
bool GetRegionHistogramData (int region_id, int file_id, std::vector< HistogramConfig > &configs, std::vector< CARTA::RegionHistogramData > &histogram_messages)
 
bool GetRegionSpectralData (int region_id, int file_id, const AxisRange &z_range, std::string &coordinate, int stokes_index, std::vector< CARTA::StatsType > &required_stats, bool report_error, const std::function< void(std::map< CARTA::StatsType, std::vector< double > >, float)> &partial_results_callback)
 
bool GetRegionStatsData (int region_id, int file_id, int stokes, const std::vector< CARTA::StatsType > &required_stats, CARTA::RegionStatsData &stats_message)
 
bool GetLineSpatialData (int file_id, int region_id, const std::string &coordinate, int stokes_index, int width, const std::function< void(std::vector< float > &, casacore::Quantity &)> &spatial_profile_callback)
 
bool GetLineProfiles (int file_id, int region_id, int width, const AxisRange &z_range, bool per_z, int stokes_index, const std::string &coordinate, std::function< void(float)> &progress_callback, casacore::Matrix< float > &profiles, casacore::Quantity &increment, bool &cancelled, std::string &message, bool reverse=false)
 
bool CancelLineProfiles (int region_id, int file_id, RegionState &region_state)
 
casacore::Vector< float > GetTemporaryRegionProfile (int region_idx, int file_id, RegionState &region_state, std::shared_ptr< casacore::CoordinateSystem > csys, bool per_z, const AxisRange &z_range, int stokes_index, double &num_pixels)
 
void GetStokesPtotal (const ProfilesMap &profiles_q, const ProfilesMap &profiles_u, const ProfilesMap &profiles_v, ProfilesMap &profiles_ptotal)
 
void GetStokesPftotal (const ProfilesMap &profiles_i, const ProfilesMap &profiles_q, const ProfilesMap &profiles_u, const ProfilesMap &profiles_v, ProfilesMap &profiles_pftotal)
 
void GetStokesPlinear (const ProfilesMap &profiles_q, const ProfilesMap &profiles_u, ProfilesMap &profiles_plinear)
 
void GetStokesPflinear (const ProfilesMap &profiles_i, const ProfilesMap &profiles_q, const ProfilesMap &profiles_u, ProfilesMap &profiles_pflinear)
 
void GetStokesPangle (const ProfilesMap &profiles_q, const ProfilesMap &profiles_u, ProfilesMap &profiles_pangle)
 
void CombineStokes (ProfilesMap &profiles_out, const ProfilesMap &profiles_q, const ProfilesMap &profiles_u, const std::function< double(double, double)> &func)
 
void CombineStokes (ProfilesMap &profiles_out, const ProfilesMap &profiles_other, const std::function< double(double, double)> &func)
 
bool IsValid (double a, double b)
 
bool GetComputedStokesProfiles (ProfilesMap &profiles, int stokes, const std::function< bool(ProfilesMap &, std::string)> &get_profiles_data)
 
bool CalculatePvImage (int file_id, int region_id, int width, AxisRange &spectral_range, bool reverse, bool keep, std::shared_ptr< Frame > &frame, GeneratorProgressCallback progress_callback, CARTA::PvResponse &pv_response, GeneratedImage &pv_image)
 
int GetPvPreviewFrameId (int preview_id)
 
bool CalculatePvPreviewImage (int file_id, int region_id, int width, AxisRange &spectral_range, bool reverse, std::shared_ptr< Frame > &frame, const CARTA::PvPreviewSettings &preview_settings, GeneratorProgressCallback progress_callback, CARTA::PvResponse &pv_response, GeneratedImage &pv_image)
 
bool CalculatePvPreviewImage (int frame_id, int preview_id, bool quick_update, std::shared_ptr< PvPreviewCut > preview_cut, std::shared_ptr< PvPreviewCube > preview_cube, GeneratorProgressCallback progress_callback, CARTA::PvResponse &pv_response, GeneratedImage &pv_image)
 

Private Attributes

std::unordered_map< int, std::shared_ptr< Region > > _regions
 
std::mutex _region_mutex
 
std::unordered_map< int, std::shared_ptr< Frame > > _frames
 
std::unordered_map< ConfigId, RegionHistogramConfig, ConfigIdHash_histogram_req
 
std::unordered_map< ConfigId, RegionSpectralConfig, ConfigIdHash_spectral_req
 
std::unordered_map< ConfigId, RegionStatsConfig, ConfigIdHash_stats_req
 
std::unordered_map< ConfigId, std::vector< CARTA::SetSpatialRequirements_SpatialConfig >, ConfigIdHash_spatial_req
 
std::mutex _spatial_mutex
 
std::mutex _spectral_mutex
 
std::unordered_map< CacheId, HistogramCache, CacheIdHash_histogram_cache
 
std::unordered_map< CacheId, SpectralCache, CacheIdHash_spectral_cache
 
std::unordered_map< CacheId, StatsCache, CacheIdHash_stats_cache
 
std::vector< CARTA::StatsType > _spectral_stats
 
std::unordered_map< int, bool > _stop_pv
 
std::unordered_map< int, int > _pv_name_index
 
std::unordered_map< int, std::shared_ptr< PvPreviewCut > > _pv_preview_cuts
 
std::unordered_map< int, std::shared_ptr< PvPreviewCube > > _pv_preview_cubes
 
std::shared_mutex _pv_cut_mutex
 
std::shared_mutex _pv_cube_mutex
 
std::mutex _line_profile_mutex
 

Member Typedef Documentation

◆ ProfilesMap

using carta::RegionHandler::ProfilesMap = std::map<CARTA::StatsType, std::vector<double> >
private

Constructor & Destructor Documentation

◆ RegionHandler()

carta::RegionHandler::RegionHandler ( )
default

◆ ~RegionHandler()

carta::RegionHandler::~RegionHandler ( )
Here is the call graph for this function:

Member Function Documentation

◆ ApplyRegionToFile() [1/2]

bool carta::RegionHandler::ApplyRegionToFile ( int  region_id,
int  file_id,
const AxisRange z_range,
int  stokes,
std::shared_ptr< casacore::LCRegion >  lc_region,
StokesRegion stokes_region 
)
private
Here is the call graph for this function:

◆ ApplyRegionToFile() [2/2]

std::shared_ptr< casacore::LCRegion > carta::RegionHandler::ApplyRegionToFile ( int  region_id,
int  file_id,
const StokesSource stokes_source = StokesSource(),
bool  report_error = true 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateMoments()

bool carta::RegionHandler::CalculateMoments ( int  file_id,
int  region_id,
const std::shared_ptr< Frame > &  frame,
GeneratorProgressCallback  progress_callback,
const CARTA::MomentRequest &  moment_request,
CARTA::MomentResponse &  moment_response,
std::vector< GeneratedImage > &  collapse_results 
)
Here is the call graph for this function:

◆ CalculatePvImage() [1/2]

bool carta::RegionHandler::CalculatePvImage ( const CARTA::PvRequest &  pv_request,
std::shared_ptr< Frame > &  frame,
GeneratorProgressCallback  progress_callback,
CARTA::PvResponse &  pv_response,
GeneratedImage pv_image 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculatePvImage() [2/2]

bool carta::RegionHandler::CalculatePvImage ( int  file_id,
int  region_id,
int  width,
AxisRange spectral_range,
bool  reverse,
bool  keep,
std::shared_ptr< Frame > &  frame,
GeneratorProgressCallback  progress_callback,
CARTA::PvResponse &  pv_response,
GeneratedImage pv_image 
)
private
Here is the call graph for this function:

◆ CalculatePvPreviewImage() [1/2]

bool carta::RegionHandler::CalculatePvPreviewImage ( int  file_id,
int  region_id,
int  width,
AxisRange spectral_range,
bool  reverse,
std::shared_ptr< Frame > &  frame,
const CARTA::PvPreviewSettings &  preview_settings,
GeneratorProgressCallback  progress_callback,
CARTA::PvResponse &  pv_response,
GeneratedImage pv_image 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculatePvPreviewImage() [2/2]

bool carta::RegionHandler::CalculatePvPreviewImage ( int  frame_id,
int  preview_id,
bool  quick_update,
std::shared_ptr< PvPreviewCut preview_cut,
std::shared_ptr< PvPreviewCube preview_cube,
GeneratorProgressCallback  progress_callback,
CARTA::PvResponse &  pv_response,
GeneratedImage pv_image 
)
private
Here is the call graph for this function:

◆ CancelLineProfiles()

bool carta::RegionHandler::CancelLineProfiles ( int  region_id,
int  file_id,
RegionState region_state 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearRegionCache()

void carta::RegionHandler::ClearRegionCache ( int  region_id)
private
Here is the caller graph for this function:

◆ ClosePvPreview()

void carta::RegionHandler::ClosePvPreview ( int  preview_id)
Here is the call graph for this function:

◆ CombineStokes() [1/2]

void carta::RegionHandler::CombineStokes ( ProfilesMap profiles_out,
const ProfilesMap profiles_other,
const std::function< double(double, double)> &  func 
)
private
Here is the call graph for this function:

◆ CombineStokes() [2/2]

void carta::RegionHandler::CombineStokes ( ProfilesMap profiles_out,
const ProfilesMap profiles_q,
const ProfilesMap profiles_u,
const std::function< double(double, double)> &  func 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExportRegion()

void carta::RegionHandler::ExportRegion ( int  file_id,
std::shared_ptr< Frame frame,
CARTA::FileType  region_file_type,
CARTA::CoordinateType  coord_type,
std::map< int, CARTA::RegionStyle > &  region_styles,
std::string &  filename,
bool  overwrite,
CARTA::ExportRegionAck &  export_ack 
)
Here is the call graph for this function:

◆ FillLineSpatialProfileData()

bool carta::RegionHandler::FillLineSpatialProfileData ( int  file_id,
int  region_id,
std::function< void(CARTA::SpatialProfileData profile_data)>  cb 
)
Here is the call graph for this function:

◆ FillPointSpatialProfileData()

bool carta::RegionHandler::FillPointSpatialProfileData ( int  file_id,
int  region_id,
std::vector< CARTA::SpatialProfileData > &  spatial_data_vec 
)
Here is the call graph for this function:

◆ FillRegionHistogramData()

bool carta::RegionHandler::FillRegionHistogramData ( std::function< void(CARTA::RegionHistogramData histogram_data)>  region_histogram_callback,
int  region_id,
int  file_id 
)
Here is the call graph for this function:

◆ FillRegionStatsData()

bool carta::RegionHandler::FillRegionStatsData ( std::function< void(CARTA::RegionStatsData stats_data)>  cb,
int  region_id,
int  file_id 
)
Here is the call graph for this function:

◆ FillSpectralProfileData()

bool carta::RegionHandler::FillSpectralProfileData ( std::function< void(CARTA::SpectralProfileData profile_data)>  cb,
int  region_id,
int  file_id,
bool  stokes_changed 
)
Here is the call graph for this function:

◆ FitImage()

bool carta::RegionHandler::FitImage ( const CARTA::FittingRequest &  fitting_request,
CARTA::FittingResponse &  fitting_response,
std::shared_ptr< Frame frame,
GeneratedImage model_image,
GeneratedImage residual_image,
GeneratorProgressCallback  progress_callback 
)
Here is the call graph for this function:

◆ FrameSet()

bool carta::RegionHandler::FrameSet ( int  file_id)
private
Here is the caller graph for this function:

◆ GetComputedStokesProfiles()

bool carta::RegionHandler::GetComputedStokesProfiles ( ProfilesMap profiles,
int  stokes,
const std::function< bool(ProfilesMap &, std::string)> &  get_profiles_data 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetLineProfiles()

bool carta::RegionHandler::GetLineProfiles ( int  file_id,
int  region_id,
int  width,
const AxisRange z_range,
bool  per_z,
int  stokes_index,
const std::string &  coordinate,
std::function< void(float)> &  progress_callback,
casacore::Matrix< float > &  profiles,
casacore::Quantity &  increment,
bool &  cancelled,
std::string &  message,
bool  reverse = false 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetLineSpatialData()

bool carta::RegionHandler::GetLineSpatialData ( int  file_id,
int  region_id,
const std::string &  coordinate,
int  stokes_index,
int  width,
const std::function< void(std::vector< float > &, casacore::Quantity &)> &  spatial_profile_callback 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNextRegionId()

int carta::RegionHandler::GetNextRegionId ( )
private
Here is the caller graph for this function:

◆ GetNextTemporaryRegionId()

int carta::RegionHandler::GetNextTemporaryRegionId ( )
private
Here is the caller graph for this function:

◆ GetPvPreviewFrameId()

int carta::RegionHandler::GetPvPreviewFrameId ( int  preview_id)
private
Here is the caller graph for this function:

◆ GetRegion()

std::shared_ptr< Region > carta::RegionHandler::GetRegion ( int  region_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRegionHistogramData()

bool carta::RegionHandler::GetRegionHistogramData ( int  region_id,
int  file_id,
std::vector< HistogramConfig > &  configs,
std::vector< CARTA::RegionHistogramData > &  histogram_messages 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRegionSpectralData()

bool carta::RegionHandler::GetRegionSpectralData ( int  region_id,
int  file_id,
const AxisRange z_range,
std::string &  coordinate,
int  stokes_index,
std::vector< CARTA::StatsType > &  required_stats,
bool  report_error,
const std::function< void(std::map< CARTA::StatsType, std::vector< double > >, float)> &  partial_results_callback 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRegionStatsData()

bool carta::RegionHandler::GetRegionStatsData ( int  region_id,
int  file_id,
int  stokes,
const std::vector< CARTA::StatsType > &  required_stats,
CARTA::RegionStatsData &  stats_message 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSpatialReqFilesForRegion()

std::vector< int > carta::RegionHandler::GetSpatialReqFilesForRegion ( int  region_id)

◆ GetSpatialReqRegionsForFile()

std::vector< int > carta::RegionHandler::GetSpatialReqRegionsForFile ( int  file_id)

◆ GetStokesPangle()

void carta::RegionHandler::GetStokesPangle ( const ProfilesMap profiles_q,
const ProfilesMap profiles_u,
ProfilesMap profiles_pangle 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetStokesPflinear()

void carta::RegionHandler::GetStokesPflinear ( const ProfilesMap profiles_i,
const ProfilesMap profiles_q,
const ProfilesMap profiles_u,
ProfilesMap profiles_pflinear 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetStokesPftotal()

void carta::RegionHandler::GetStokesPftotal ( const ProfilesMap profiles_i,
const ProfilesMap profiles_q,
const ProfilesMap profiles_u,
const ProfilesMap profiles_v,
ProfilesMap profiles_pftotal 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetStokesPlinear()

void carta::RegionHandler::GetStokesPlinear ( const ProfilesMap profiles_q,
const ProfilesMap profiles_u,
ProfilesMap profiles_plinear 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetStokesPtotal()

void carta::RegionHandler::GetStokesPtotal ( const ProfilesMap profiles_q,
const ProfilesMap profiles_u,
const ProfilesMap profiles_v,
ProfilesMap profiles_ptotal 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTemporaryRegionProfile()

casacore::Vector< float > carta::RegionHandler::GetTemporaryRegionProfile ( int  region_idx,
int  file_id,
RegionState region_state,
std::shared_ptr< casacore::CoordinateSystem >  csys,
bool  per_z,
const AxisRange z_range,
int  stokes_index,
double &  num_pixels 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasSpatialRequirements()

bool carta::RegionHandler::HasSpatialRequirements ( int  region_id,
int  file_id,
const std::string &  coordinate,
int  width 
)
private
Here is the caller graph for this function:

◆ HasSpectralRequirements()

bool carta::RegionHandler::HasSpectralRequirements ( int  region_id,
int  file_id,
const std::string &  coordinate,
const std::vector< CARTA::StatsType > &  required_stats 
)
private
Here is the caller graph for this function:

◆ ImportRegion()

void carta::RegionHandler::ImportRegion ( int  file_id,
std::shared_ptr< Frame frame,
CARTA::FileType  region_file_type,
const std::string &  region_file,
bool  file_is_filename,
CARTA::ImportRegionAck &  import_ack 
)
Here is the call graph for this function:

◆ IsClosedRegion()

bool carta::RegionHandler::IsClosedRegion ( int  region_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsLineRegion()

bool carta::RegionHandler::IsLineRegion ( int  region_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsPointRegion()

bool carta::RegionHandler::IsPointRegion ( int  region_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsValid()

bool carta::RegionHandler::IsValid ( double  a,
double  b 
)
private
Here is the caller graph for this function:

◆ RegionFileIdsValid()

bool carta::RegionHandler::RegionFileIdsValid ( int  region_id,
int  file_id,
bool  check_annotation = false 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegionSet()

bool carta::RegionHandler::RegionSet ( int  region_id,
bool  check_annotation = false 
)
private
Here is the caller graph for this function:

◆ RemoveFileRequirementsCache()

void carta::RegionHandler::RemoveFileRequirementsCache ( int  file_id)
private
Here is the caller graph for this function:

◆ RemoveFrame()

void carta::RegionHandler::RemoveFrame ( int  file_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveRegion()

void carta::RegionHandler::RemoveRegion ( int  region_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveRegionRequirementsCache()

void carta::RegionHandler::RemoveRegionRequirementsCache ( int  region_id)
private
Here is the caller graph for this function:

◆ SetHistogramRequirements()

bool carta::RegionHandler::SetHistogramRequirements ( int  region_id,
int  file_id,
std::shared_ptr< Frame frame,
const std::vector< CARTA::HistogramConfig > &  configs 
)
Here is the call graph for this function:

◆ SetRegion()

bool carta::RegionHandler::SetRegion ( int &  region_id,
RegionState region_state,
std::shared_ptr< casacore::CoordinateSystem >  csys 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSpatialRequirements()

bool carta::RegionHandler::SetSpatialRequirements ( int  region_id,
int  file_id,
std::shared_ptr< Frame frame,
const std::vector< CARTA::SetSpatialRequirements_SpatialConfig > &  spatial_profiles 
)
Here is the call graph for this function:

◆ SetSpectralRequirements()

bool carta::RegionHandler::SetSpectralRequirements ( int  region_id,
int  file_id,
std::shared_ptr< Frame frame,
const std::vector< CARTA::SetSpectralRequirements_SpectralConfig > &  configs 
)
Here is the call graph for this function:

◆ SetStatsRequirements()

bool carta::RegionHandler::SetStatsRequirements ( int  region_id,
int  file_id,
std::shared_ptr< Frame frame,
const std::vector< CARTA::SetStatsRequirements_StatsConfig > &  stats_configs 
)
Here is the call graph for this function:

◆ StopPvCalc()

void carta::RegionHandler::StopPvCalc ( int  file_id)
Here is the caller graph for this function:

◆ StopPvPreview()

void carta::RegionHandler::StopPvPreview ( int  preview_id)
Here is the caller graph for this function:

◆ StopPvPreviewUpdates()

void carta::RegionHandler::StopPvPreviewUpdates ( int  preview_id)
Here is the caller graph for this function:

◆ UpdateNewSpectralRequirements()

void carta::RegionHandler::UpdateNewSpectralRequirements ( int  region_id)
private
Here is the caller graph for this function:

◆ UpdatePvPreviewImage()

bool carta::RegionHandler::UpdatePvPreviewImage ( int  file_id,
int  region_id,
bool  quick_update,
std::function< void(CARTA::PvResponse &pv_response, GeneratedImage &pv_image)>  cb 
)
Here is the call graph for this function:

◆ UpdatePvPreviewRegion()

bool carta::RegionHandler::UpdatePvPreviewRegion ( int  region_id,
RegionState region_state 
)

Member Data Documentation

◆ _frames

std::unordered_map<int, std::shared_ptr<Frame> > carta::RegionHandler::_frames
private

◆ _histogram_cache

std::unordered_map<CacheId, HistogramCache, CacheIdHash> carta::RegionHandler::_histogram_cache
private

◆ _histogram_req

std::unordered_map<ConfigId, RegionHistogramConfig, ConfigIdHash> carta::RegionHandler::_histogram_req
private

◆ _line_profile_mutex

std::mutex carta::RegionHandler::_line_profile_mutex
private

◆ _pv_cube_mutex

std::shared_mutex carta::RegionHandler::_pv_cube_mutex
private

◆ _pv_cut_mutex

std::shared_mutex carta::RegionHandler::_pv_cut_mutex
private

◆ _pv_name_index

std::unordered_map<int, int> carta::RegionHandler::_pv_name_index
private

◆ _pv_preview_cubes

std::unordered_map<int, std::shared_ptr<PvPreviewCube> > carta::RegionHandler::_pv_preview_cubes
private

◆ _pv_preview_cuts

std::unordered_map<int, std::shared_ptr<PvPreviewCut> > carta::RegionHandler::_pv_preview_cuts
private

◆ _region_mutex

std::mutex carta::RegionHandler::_region_mutex
private

◆ _regions

std::unordered_map<int, std::shared_ptr<Region> > carta::RegionHandler::_regions
private

◆ _spatial_mutex

std::mutex carta::RegionHandler::_spatial_mutex
private

◆ _spatial_req

std::unordered_map<ConfigId, std::vector<CARTA::SetSpatialRequirements_SpatialConfig>, ConfigIdHash> carta::RegionHandler::_spatial_req
private

◆ _spectral_cache

std::unordered_map<CacheId, SpectralCache, CacheIdHash> carta::RegionHandler::_spectral_cache
private

◆ _spectral_mutex

std::mutex carta::RegionHandler::_spectral_mutex
private

◆ _spectral_req

std::unordered_map<ConfigId, RegionSpectralConfig, ConfigIdHash> carta::RegionHandler::_spectral_req
private

◆ _spectral_stats

std::vector<CARTA::StatsType> carta::RegionHandler::_spectral_stats
private
Initial value:
= {CARTA::StatsType::Sum, CARTA::StatsType::FluxDensity, CARTA::StatsType::Mean,
CARTA::StatsType::RMS, CARTA::StatsType::Sigma, CARTA::StatsType::SumSq, CARTA::StatsType::Min, CARTA::StatsType::Max,
CARTA::StatsType::Extrema, CARTA::StatsType::NumPixels}

◆ _stats_cache

std::unordered_map<CacheId, StatsCache, CacheIdHash> carta::RegionHandler::_stats_cache
private

◆ _stats_req

std::unordered_map<ConfigId, RegionStatsConfig, ConfigIdHash> carta::RegionHandler::_stats_req
private

◆ _stop_pv

std::unordered_map<int, bool> carta::RegionHandler::_stop_pv
private

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