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

#include <Region.h>

Collaboration diagram for carta::Region:
[legend]

Public Member Functions

 Region (const RegionState &state, std::shared_ptr< casacore::CoordinateSystem > csys)
 
bool IsValid ()
 
bool RegionChanged ()
 
bool UpdateRegion (const RegionState &state)
 
RegionState GetRegionState ()
 
bool IsPoint ()
 
bool IsLineType ()
 
bool IsInReferenceImage (int file_id)
 
bool IsAnnotation ()
 
std::shared_ptr< casacore::CoordinateSystem > CoordinateSystem ()
 
bool IsConnected ()
 
void WaitForTaskCancellation ()
 
std::shared_mutex & GetActiveTaskMutex ()
 
std::shared_ptr< casacore::LCRegion > GetImageRegion (int file_id, std::shared_ptr< casacore::CoordinateSystem > csys, const casacore::IPosition &shape, const StokesSource &stokes_source=StokesSource(), bool report_error=true)
 
casacore::ArrayLattice< casacore::Bool > GetImageRegionMask (int file_id)
 
casacore::TableRecord GetImageRegionRecord (int file_id, std::shared_ptr< casacore::CoordinateSystem > csys, const casacore::IPosition &shape)
 

Private Member Functions

bool CheckPoints (const std::vector< CARTA::Point > &points, CARTA::RegionType type)
 
bool PointsFinite (const std::vector< CARTA::Point > &points)
 
void ResetRegionCache ()
 
std::shared_ptr< casacore::LCRegion > GetCachedLCRegion (int file_id, const StokesSource &stokes_source)
 
casacore::TableRecord GetControlPointsRecord (const casacore::IPosition &shape)
 
casacore::TableRecord GetRotboxRecordForLCRegion (const casacore::IPosition &shape)
 
void CompleteRegionRecord (casacore::TableRecord &record, const casacore::IPosition &image_shape)
 

Private Attributes

std::shared_ptr< casacore::CoordinateSystem > _coord_sys
 
RegionState _region_state
 
std::mutex _region_state_mutex
 
bool _valid
 
bool _region_changed
 
std::shared_ptr< casacore::LCRegion > _lcregion
 
std::mutex _lcregion_mutex
 
bool _lcregion_set
 
std::unique_ptr< RegionConverter_region_converter
 
std::shared_mutex _active_task_mutex
 
volatile bool _connected = true
 

Constructor & Destructor Documentation

◆ Region()

Region::Region ( const RegionState state,
std::shared_ptr< casacore::CoordinateSystem >  csys 
)
Here is the call graph for this function:

Member Function Documentation

◆ CheckPoints()

bool Region::CheckPoints ( const std::vector< CARTA::Point > &  points,
CARTA::RegionType  type 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CompleteRegionRecord()

void Region::CompleteRegionRecord ( casacore::TableRecord &  record,
const casacore::IPosition &  image_shape 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CoordinateSystem()

std::shared_ptr< casacore::CoordinateSystem > carta::Region::CoordinateSystem ( )
inline

◆ GetActiveTaskMutex()

std::shared_mutex & Region::GetActiveTaskMutex ( )
Here is the caller graph for this function:

◆ GetCachedLCRegion()

std::shared_ptr< casacore::LCRegion > Region::GetCachedLCRegion ( int  file_id,
const StokesSource stokes_source 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetControlPointsRecord()

casacore::TableRecord Region::GetControlPointsRecord ( const casacore::IPosition &  shape)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetImageRegion()

std::shared_ptr< casacore::LCRegion > Region::GetImageRegion ( int  file_id,
std::shared_ptr< casacore::CoordinateSystem >  csys,
const casacore::IPosition &  shape,
const StokesSource stokes_source = StokesSource(),
bool  report_error = true 
)
Here is the call graph for this function:

◆ GetImageRegionMask()

casacore::ArrayLattice< casacore::Bool > Region::GetImageRegionMask ( int  file_id)
Here is the call graph for this function:

◆ GetImageRegionRecord()

casacore::TableRecord Region::GetImageRegionRecord ( int  file_id,
std::shared_ptr< casacore::CoordinateSystem >  csys,
const casacore::IPosition &  shape 
)
Here is the call graph for this function:

◆ GetRegionState()

RegionState carta::Region::GetRegionState ( )
inline
Here is the caller graph for this function:

◆ GetRotboxRecordForLCRegion()

casacore::TableRecord Region::GetRotboxRecordForLCRegion ( const casacore::IPosition &  shape)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsAnnotation()

bool carta::Region::IsAnnotation ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsConnected()

bool Region::IsConnected ( )

◆ IsInReferenceImage()

bool carta::Region::IsInReferenceImage ( int  file_id)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsLineType()

bool carta::Region::IsLineType ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsPoint()

bool carta::Region::IsPoint ( )
inline
Here is the call graph for this function:

◆ IsValid()

bool carta::Region::IsValid ( )
inline

◆ PointsFinite()

bool Region::PointsFinite ( const std::vector< CARTA::Point > &  points)
private
Here is the caller graph for this function:

◆ RegionChanged()

bool carta::Region::RegionChanged ( )
inline

◆ ResetRegionCache()

void Region::ResetRegionCache ( )
private
Here is the caller graph for this function:

◆ UpdateRegion()

bool Region::UpdateRegion ( const RegionState state)
Here is the call graph for this function:

◆ WaitForTaskCancellation()

void Region::WaitForTaskCancellation ( )
Here is the call graph for this function:

Member Data Documentation

◆ _active_task_mutex

std::shared_mutex carta::Region::_active_task_mutex
mutableprivate

◆ _connected

volatile bool carta::Region::_connected = true
private

◆ _coord_sys

std::shared_ptr<casacore::CoordinateSystem> carta::Region::_coord_sys
private

◆ _lcregion

std::shared_ptr<casacore::LCRegion> carta::Region::_lcregion
private

◆ _lcregion_mutex

std::mutex carta::Region::_lcregion_mutex
private

◆ _lcregion_set

bool carta::Region::_lcregion_set
private

◆ _region_changed

bool carta::Region::_region_changed
private

◆ _region_converter

std::unique_ptr<RegionConverter> carta::Region::_region_converter
private

◆ _region_state

RegionState carta::Region::_region_state
private

◆ _region_state_mutex

std::mutex carta::Region::_region_state_mutex
private

◆ _valid

bool carta::Region::_valid
private

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