#include <RegionSpatialProfile.h>
|
| | RegionSpatialProfile ()=default |
| | Default constructor.
|
| |
| | RegionSpatialProfile (int region_id, int file_id, const std::vector< CARTA::SetSpatialRequirements_SpatialConfig > &configs) |
| | Constructor which sets spatial configurations.
|
| |
| void | SetConfigurations (int file_id, const std::vector< CARTA::SetSpatialRequirements_SpatialConfig > &configs) |
| | Set spatial profile configurations.
|
| |
| bool | GetConfigurations (int file_id, std::vector< CARTA::SetSpatialRequirements_SpatialConfig > &configs) |
| | Get spatial configurations for file id.
|
| |
| std::vector< int > | GetConfigFileIds (int file_id) |
| | Get file ids in configurations which match file id.
|
| |
| bool | GetPointSpatialProfile (int file_id, std::shared_ptr< Frame > frame, std::vector< CARTA::SetSpatialRequirements_SpatialConfig > &configs, std::shared_ptr< casacore::LCRegion > lc_region, std::vector< CARTA::SpatialProfileData > &spatial_profile_messages) |
| | Add calculated region spatial profile for point region to message.
|
| |
| bool | GetLineSpatialProfile (int file_id, std::shared_ptr< Frame > frame, std::shared_ptr< Region > region, int stokes_index, int z, CARTA::SetSpatialRequirements_SpatialConfig &config, bool &cancelled, std::string &message, CARTA::SpatialProfileData &spatial_profile_message) |
| | Add calculated spatial profile for line region to message.
|
| |
| void | ClearFileConfigs (int file_id) |
| | Clear configurations for frame.
|
| |
|
| bool | HasConfiguration (int file_id, CARTA::SetSpatialRequirements_SpatialConfig &config) |
| | Check if configuration exists with input parameters, for line profile cancellation.
|
| |
| bool | GetLineProfile (int file_id, std::shared_ptr< Frame > frame, std::shared_ptr< Region > region, int stokes_index, int z, CARTA::SetSpatialRequirements_SpatialConfig &config, bool &cancelled, std::string &message, std::vector< float > &profile, casacore::Quantity &increment) |
| | Calculate profile for line region by approximating as a box region for each pixel.
|
| |
| float | GetBoxMeanValue (int file_id, std::shared_ptr< Frame > frame, RegionState ®ion_state, std::shared_ptr< casacore::CoordinateSystem > coord_sys, int z, int stokes_index) |
| | Calculate mean value for box region along line.
|
| |
| bool | CancelLineProfile (int file_id, std::shared_ptr< Frame > frame, std::shared_ptr< Region > line_region, int z, RegionState &line_region_state, CARTA::SetSpatialRequirements_SpatialConfig &config) |
| | Check whether to cancel line profile calculation.
|
| |
◆ RegionSpatialProfile() [1/2]
| carta::RegionSpatialProfile::RegionSpatialProfile |
( |
| ) |
|
|
default |
◆ RegionSpatialProfile() [2/2]
| carta::RegionSpatialProfile::RegionSpatialProfile |
( |
int |
region_id, |
|
|
int |
file_id, |
|
|
const std::vector< CARTA::SetSpatialRequirements_SpatialConfig > & |
configs |
|
) |
| |
Constructor which sets spatial configurations.
- Parameters
-
| region_id | Region id for spatial profiles |
| file_id | File id for image frame |
| configs | Spatial configurations |
◆ CancelLineProfile()
| bool carta::RegionSpatialProfile::CancelLineProfile |
( |
int |
file_id, |
|
|
std::shared_ptr< Frame > |
frame, |
|
|
std::shared_ptr< Region > |
line_region, |
|
|
int |
z, |
|
|
RegionState & |
line_region_state, |
|
|
CARTA::SetSpatialRequirements_SpatialConfig & |
config |
|
) |
| |
|
private |
Check whether to cancel line profile calculation.
- Parameters
-
| file_id | File id for image frame |
| frame | Image frame |
| line_region | Line or polyline region |
| z | Z axis index |
| line_region_state | Line region parameters when profile started |
| config | Spatial profile configuration |
- Returns
- Whether to cancel
◆ ClearFileConfigs()
| void carta::RegionSpatialProfile::ClearFileConfigs |
( |
int |
file_id | ) |
|
Clear configurations for frame.
- Parameters
-
| file_id | File id for image frame |
◆ GetBoxMeanValue()
| float carta::RegionSpatialProfile::GetBoxMeanValue |
( |
int |
file_id, |
|
|
std::shared_ptr< Frame > |
frame, |
|
|
RegionState & |
region_state, |
|
|
std::shared_ptr< casacore::CoordinateSystem > |
coord_sys, |
|
|
int |
z, |
|
|
int |
stokes_index |
|
) |
| |
|
private |
Calculate mean value for box region along line.
- Parameters
-
| file_id | File id for image frame |
| frame | Image frame |
| region_state | Box region parameters |
| coord_sys | Coordinate system used to define box |
| z | Z axis index |
| stokes_index | Stokes axis index |
- Returns
- Mean value of box region
◆ GetConfigFileIds()
| std::vector< int > carta::RegionSpatialProfile::GetConfigFileIds |
( |
int |
file_id | ) |
|
Get file ids in configurations which match file id.
- Parameters
-
| file_id | File id for image frame |
- Returns
- File ids
◆ GetConfigurations()
| bool carta::RegionSpatialProfile::GetConfigurations |
( |
int |
file_id, |
|
|
std::vector< CARTA::SetSpatialRequirements_SpatialConfig > & |
configs |
|
) |
| |
Get spatial configurations for file id.
- Parameters
-
| [in] | file_id | File id for image frame |
| [out] | configs | Spatial configurations |
- Returns
- Whether configs exist for file id
◆ GetLineProfile()
| bool carta::RegionSpatialProfile::GetLineProfile |
( |
int |
file_id, |
|
|
std::shared_ptr< Frame > |
frame, |
|
|
std::shared_ptr< Region > |
region, |
|
|
int |
stokes_index, |
|
|
int |
z, |
|
|
CARTA::SetSpatialRequirements_SpatialConfig & |
config, |
|
|
bool & |
cancelled, |
|
|
std::string & |
message, |
|
|
std::vector< float > & |
profile, |
|
|
casacore::Quantity & |
increment |
|
) |
| |
|
private |
Calculate profile for line region by approximating as a box region for each pixel.
- Parameters
-
| [in] | file_id | File id for image frame |
| [in] | frame | Image frame |
| [in] | region | Line or polyline region |
| [in] | stokes_index | Stokes axis index |
| [in] | z | Z axis index |
| [in] | config | Spatial configuration |
| [out] | cancelled | Whether profile was cancelled |
| [out] | message | Error message |
| [out] | profile | Result of profile calculation |
| [out] | increment | Increment of spatial axis in profile |
- Returns
- Whether profile calculation completed
◆ GetLineSpatialProfile()
| bool carta::RegionSpatialProfile::GetLineSpatialProfile |
( |
int |
file_id, |
|
|
std::shared_ptr< Frame > |
frame, |
|
|
std::shared_ptr< Region > |
region, |
|
|
int |
stokes_index, |
|
|
int |
z, |
|
|
CARTA::SetSpatialRequirements_SpatialConfig & |
config, |
|
|
bool & |
cancelled, |
|
|
std::string & |
message, |
|
|
CARTA::SpatialProfileData & |
spatial_profile_message |
|
) |
| |
Add calculated spatial profile for line region to message.
- Parameters
-
| [in] | file_id | File id for image frame |
| [in] | frame | Image frame |
| [in] | region | Line or polyline region |
| [in] | stokes_index | Stokes axis index |
| [in] | z | Z axis index |
| [in] | config | Spatial configuration |
| [out] | cancelled | Whether line profile was cancelled |
| [out] | message | Message if line profile failed |
| [out] | spatial_profile_message | Region spatial profile data message |
- Returns
- Whether profile was added
◆ GetPointSpatialProfile()
| bool carta::RegionSpatialProfile::GetPointSpatialProfile |
( |
int |
file_id, |
|
|
std::shared_ptr< Frame > |
frame, |
|
|
std::vector< CARTA::SetSpatialRequirements_SpatialConfig > & |
configs, |
|
|
std::shared_ptr< casacore::LCRegion > |
lc_region, |
|
|
std::vector< CARTA::SpatialProfileData > & |
spatial_profile_messages |
|
) |
| |
Add calculated region spatial profile for point region to message.
- Parameters
-
| [in] | file_id | File id for image frame |
| [in] | frame | Image frame |
| [in] | configs | Spatial configurations |
| [in] | lc_region | Region applied to image |
| [out] | spatial_profile_messages | Region spatial profile data messages |
- Returns
- Whether profiles were added
◆ HasConfiguration()
| bool carta::RegionSpatialProfile::HasConfiguration |
( |
int |
file_id, |
|
|
CARTA::SetSpatialRequirements_SpatialConfig & |
config |
|
) |
| |
|
private |
Check if configuration exists with input parameters, for line profile cancellation.
- Parameters
-
| file_id | File id for image frame |
| [in] | config | Spatial configuration |
- Returns
- Whether configuration exists
◆ SetConfigurations()
| void carta::RegionSpatialProfile::SetConfigurations |
( |
int |
file_id, |
|
|
const std::vector< CARTA::SetSpatialRequirements_SpatialConfig > & |
configs |
|
) |
| |
Set spatial profile configurations.
- Parameters
-
| file_id | File id for image frame |
| configs | Spatial configurations |
◆ _config_mutex
| std::mutex carta::RegionSpatialProfile::_config_mutex |
|
private |
Lock to add/remove configurations.
◆ _configs
| std::unordered_map<ConfigId, std::vector<CARTA::SetSpatialRequirements_SpatialConfig>, ConfigIdHash> carta::RegionSpatialProfile::_configs |
|
private |
Spatial profile configurations.
◆ _profile_mutex
| std::mutex carta::RegionSpatialProfile::_profile_mutex |
|
private |
Lock for calculating during line profiles, for cancellation.
◆ _region_id
| int carta::RegionSpatialProfile::_region_id |
|
private |
The documentation for this class was generated from the following files: