|
| | Ds9Importer (std::shared_ptr< casacore::CoordinateSystem > coord_sys, int file_id, const std::string &file, bool file_is_filename) |
| | Constructor for Ds9Importer class for importing regions in DS9 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.
|
| |
| bool | IsDs9Coord (std::string &file_line) |
| | Check if region file line is a DS9 coordinate.
|
| |
| bool | SetFileCoordFrame (std::string &ds9_coord) |
| | Convert DS9 coordinate frame to casacore coordinate frame.
|
| |
| void | SetGlobals (std::string &file_line) |
| | Set properties from global file line.
|
| |
| RegionProperties | SetRegion (std::string &file_line) |
| | Parse file line to set a region.
|
| |
| RegionState | ImportPointRegion (std::vector< std::string > ¶meters, bool is_annotation=false) |
| | Import point or text region.
|
| |
| RegionState | ImportCircleRegion (std::vector< std::string > ¶meters, bool is_annotation=false) |
| | Import circle or compass region.
|
| |
| RegionState | ImportEllipseRegion (std::vector< std::string > ¶meters, bool is_annotation=false) |
| | Import ellipse, circle, or compass region.
|
| |
| RegionState | ImportRectangleRegion (std::vector< std::string > ¶meters, bool is_annotation=false) |
| | Import rectangle region.
|
| |
| RegionState | ImportPolygonLineRegion (std::vector< std::string > ¶meters, bool is_annotation=false) |
| | Import polygon and line-based regions.
|
| |
| RegionState | ImportVectorRegion (std::vector< std::string > ¶meters) |
| | Import vector region.
|
| |
| RegionState | ImportRulerRegion (std::vector< std::string > ¶meters, std::unordered_map< std::string, std::string > &properties, CARTA::RegionStyle ®ion_style) |
| | Import ruler region and its style parameters.
|
| |
| RegionState | ImportCompassRegion (std::vector< std::string > ¶meters, std::unordered_map< std::string, std::string > &properties, CARTA::RegionStyle ®ion_style) |
| | Import compass region and its style parameters.
|
| |
| CARTA::RegionStyle | ImportStyle (CARTA::RegionType region_type, std::unordered_map< std::string, std::string > &properties) |
| | Set common region style parameters.
|
| |
| void | ImportPointStyle (std::unordered_map< std::string, std::string > &properties, CARTA::AnnotationStyle *annotation_style) |
| | Set annotation style point parameters.
|
| |
| void | ImportFontStyle (std::unordered_map< std::string, std::string > &properties, CARTA::AnnotationStyle *annotation_style) |
| | Set annotation style font parameters.
|
| |
| bool | ParameterToQuantity (std::string ¶meter, bool is_angle, bool is_xy, std::string ®ion_name, casacore::Quantity ¶m_quantity) |
| | Convert region parameter string to casacore Quantity.
|
| |
| bool | Ds9ToCasacoreUnit (const std::string ®ion_name, std::string ¶meter) |
| | Convert DS9 unit to casacore unit in parameter.
|
| |
| void | ConvertTimeFormatToAngle (std::string ¶meter) |
| | Convert parameter in sexagesimal format to angle format.
|
| |
|
| 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 DS9 format.