|
| CrtfImporter (std::shared_ptr< casacore::CoordinateSystem > image_coord_sys, int file_id, const std::string &file, bool file_is_filename) |
| Constructor for CrtfImporter class for importing regions in CRTF region file.
|
|
| RegionImporter (std::shared_ptr< casacore::CoordinateSystem > coord_sys, int file_id) |
| Constructor for RegionImporter class.
|
|
virtual | ~RegionImporter ()=default |
| Default destructor.
|
|
std::vector< RegionProperties > | GetRegions (std::string &error) |
| Return imported regions and report errors.
|
|
|
void | SetFileLineRegions (std::vector< std::string > &file_lines) |
| Parse each line of file to import regions.
|
|
std::string | GetRegionDirectionFrame (const std::unordered_map< std::string, std::string > &properties) |
| Get direction frame coord value in region properties.
|
|
RegionState | ImportAnnSymbolText (std::vector< std::string > ¶meters, std::string &coord_frame) |
| Import point or text region.
|
|
RegionState | ImportAnnBox (std::vector< std::string > ¶meters, std::string &coord_frame) |
| Import rectangle region.
|
|
RegionState | ImportAnnEllipse (std::vector< std::string > ¶meters, std::string &coord_frame) |
| Import ellipse region.
|
|
RegionState | ImportAnnPoly (std::vector< std::string > ¶meters, std::string &coord_frame) |
| Import polygon or line-based region.
|
|
CARTA::RegionStyle | ImportStyle (CARTA::RegionType region_type, std::unordered_map< std::string, std::string > &properties) |
| Import region style parameters for region type.
|
|
void | ImportFontStyle (std::unordered_map< std::string, std::string > &properties, CARTA::AnnotationStyle *annotation_style) |
| Set annotation style font parameters.
|
|
void | ImportPointStyle (const std::string &symbol_char, std::unordered_map< std::string, std::string > &properties, CARTA::AnnotationStyle *annotation_style) |
| Set annotation style point parameters.
|
|
bool | GetBoxControlPoints (std::vector< std::string > ¶meters, std::string &coord_frame, std::vector< CARTA::Point > &control_points, float &rotation) |
| Convert box definition with all corner points to control points.
|
|
bool | GetCenterBoxPoints (const std::string ®ion, casacore::Quantity &cx, casacore::Quantity &cy, casacore::Quantity &width, casacore::Quantity &height, std::string &coord_frame, std::vector< CARTA::Point > &control_points) |
| Convert box definition with center and width/height to control points.
|
|
bool | GetRectBoxPoints (casacore::Quantity &blcx, casacore::Quantity &blcy, casacore::Quantity &trcx, casacore::Quantity &trcy, std::string &coord_frame, std::vector< CARTA::Point > &control_points) |
| Convert box definition with blc, trc corners to control points.
|
|
|
virtual std::vector< std::string > | ReadRegionFile (const std::string &file, bool file_is_filename, const char extra_delim='\0') |
| Read region file into file lines.
|
|
virtual bool | IsCommentLine (const std::string &file_line) |
| Determine whether file line starting with comment marker is a comment and not an annotation region.
|
|
virtual void | SetParserDelim (const std::string &delim) |
| Set parser delimiter to use in parsing file line.
|
|
virtual void | ParseRegionParameters (std::string ®ion_definition, std::vector< std::string > ¶meters, std::unordered_map< std::string, std::string > &properties) |
| Parse file line into region parameters and style properties.
|
|
virtual std::string | GetProperty (const std::string &name, const std::unordered_map< std::string, std::string > &properties, bool check_global=false) |
| Return value of name in region properties or global properties.
|
|
CARTA::TextAnnotationPosition | GetTextPosition (const std::string &position) |
| Convert text region position to CARTA position enum.
|
|
void | AddTextStyleToProperties (const CARTA::RegionStyle &text_style, RegionProperties &textbox_properties) |
| Add text region style to textbox region properties.
|
|
double | WorldToPixelLength (casacore::Quantity length, unsigned int pixel_axis) |
| Convert length region parameter to pixels if in world coordinates.
|
|
void | ImportCompassStyle (std::string &compass_properties, std::string &compass_coord, CARTA::AnnotationStyle *annotation_style) |
| Set style parameters for compass region.
|
|
void | ImportRulerStyle (std::string &ruler_properties, std::string &ruler_coord) |
| Get style parameters for ruler region.
|
|
std::shared_ptr< casacore::CoordinateSystem > | _coord_sys |
| Image coordinate system.
|
|
int | _file_id |
| File id of reference image.
|
|
std::string | _parser_delim |
| Delimiter for parsing region file, specific to file type.
|
|
std::unordered_map< std::string, std::string > | _global_properties |
| Map of properties from global line of region file.
|
|
std::unordered_map< CARTA::RegionType, std::string > | _region_names |
| Region names for conversion CRTF or DS9 name to CARTA type.
|
|
std::string | _errors |
| Errors for region lines which failed.
|
|
std::vector< RegionProperties > | _regions |
| Imported regions.
|
|
A class for importing region files in CRTF format.