![]() |
CARTA Backend
The backend component of CARTA
|
#include <RegionImportExport.h>
Public Member Functions | |
RegionImportExport (std::shared_ptr< casacore::CoordinateSystem > image_coord_sys, const casacore::IPosition &image_shape, int file_id) | |
RegionImportExport (std::shared_ptr< casacore::CoordinateSystem > image_coord_sys, const casacore::IPosition &image_shape) | |
virtual | ~RegionImportExport ()=default |
std::vector< RegionProperties > | GetImportedRegions (std::string &error) |
virtual bool | AddExportRegion (const RegionState ®ion_state, const CARTA::RegionStyle ®ion_style)=0 |
bool | AddExportRegion (const RegionState ®ion_state, const CARTA::RegionStyle ®ion_style, const casacore::RecordInterface ®ion_record, bool pixel_coord) |
virtual bool | ExportRegions (std::string &filename, std::string &error)=0 |
virtual bool | ExportRegions (std::vector< std::string > &contents, std::string &error)=0 |
Protected Member Functions | |
virtual void | AddRegionNames ()=0 |
virtual std::vector< std::string > | ReadRegionFile (const std::string &file, bool file_is_filename, const char extra_delim='\0') |
virtual bool | IsCommentLine (const std::string &line) |
virtual void | SetParserDelim (const std::string &delim) |
virtual void | ParseRegionParameters (std::string ®ion_definition, std::vector< std::string > ¶meters, std::unordered_map< std::string, std::string > &properties) |
CARTA::TextAnnotationPosition | GetTextPosition (const std::string &position) |
void | AddTextStyleToProperties (const CARTA::RegionStyle &text_style, RegionProperties &textbox_properties) |
virtual bool | AddExportRegion (CARTA::RegionType region_type, const std::vector< casacore::Quantity > &control_points, const casacore::Quantity &rotation, const CARTA::RegionStyle ®ion_style)=0 |
bool | ConvertPointToPixels (std::string ®ion_frame, std::vector< casacore::Quantity > &point, casacore::Vector< casacore::Double > &pixel_coords) |
double | WorldToPixelLength (casacore::Quantity input, unsigned int pixel_axis) |
std::string | FormatColor (const std::string &color) |
void | ExportAnnCompassStyle (const CARTA::RegionStyle ®ion_style, const std::string &ann_coord_sys, std::string ®ion_line) |
void | ImportCompassStyle (std::string &compass_properties, std::string &coordinate_system, CARTA::AnnotationStyle *annotation_style) |
void | ImportRulerStyle (std::string &ruler_properties, std::string &coordinate_system) |
Protected Attributes | |
std::shared_ptr< casacore::CoordinateSystem > | _coord_sys |
casacore::IPosition | _image_shape |
int | _file_id |
std::string | _parser_delim |
std::string | _import_errors |
std::vector< RegionProperties > | _import_regions |
std::vector< std::string > | _export_regions |
std::unordered_map< CARTA::RegionType, std::string > | _region_names |
std::unordered_map< CARTA::TextAnnotationPosition, std::string > | _text_positions |
Private Member Functions | |
bool | ConvertRecordToPoint (const casacore::RecordInterface ®ion_record, bool pixel_coord, std::vector< casacore::Quantity > &control_points) |
bool | ConvertRecordToRectangle (const casacore::RecordInterface ®ion_record, bool pixel_coord, std::vector< casacore::Quantity > &control_points) |
bool | ConvertRecordToEllipse (const RegionState ®ion_state, const casacore::RecordInterface ®ion_record, bool pixel_coord, std::vector< casacore::Quantity > &control_points, casacore::Quantity &qrotation) |
bool | ConvertRecordToPolygonLine (const casacore::RecordInterface ®ion_record, bool pixel_coord, std::vector< casacore::Quantity > &control_points) |
RegionImportExport::RegionImportExport | ( | std::shared_ptr< casacore::CoordinateSystem > | image_coord_sys, |
const casacore::IPosition & | image_shape, | ||
int | file_id | ||
) |
RegionImportExport::RegionImportExport | ( | std::shared_ptr< casacore::CoordinateSystem > | image_coord_sys, |
const casacore::IPosition & | image_shape | ||
) |
|
virtualdefault |
|
protectedpure virtual |
Implemented in carta::CrtfImportExport, and carta::Ds9ImportExport.
|
pure virtual |
Implemented in carta::CrtfImportExport, and carta::Ds9ImportExport.
bool RegionImportExport::AddExportRegion | ( | const RegionState & | region_state, |
const CARTA::RegionStyle & | region_style, | ||
const casacore::RecordInterface & | region_record, | ||
bool | pixel_coord | ||
) |
|
protectedpure virtual |
Implemented in carta::CrtfImportExport, and carta::Ds9ImportExport.
|
protected |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
pure virtual |
Implemented in carta::CrtfImportExport, and carta::Ds9ImportExport.
|
pure virtual |
Implemented in carta::CrtfImportExport, and carta::Ds9ImportExport.
|
protected |
std::vector< RegionProperties > RegionImportExport::GetImportedRegions | ( | std::string & | error | ) |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
inlineprotectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |