nav.annotation

Bases: object

Represents an annotation for an observation image.

This class handles overlays and text annotations to be displayed on observation images.

Parameters:
  • obs – The observation snapshot to annotate

  • overlay – Boolean mask indicating where the overlay should appear

  • overlay_color – RGB color tuple for the overlay

  • thicken_overlay – Number of pixels to thicken the overlay by

  • text_info – Text annotation information

  • avoid_mask – Boolean mask indicating areas where text should not be placed

  • config – Configuration object

Adds text annotation information to this annotation.

Parameters:

text_info – One or more text annotation information objects to add

Returns the mask indicating areas where text should not be placed, if any.

Returns the configuration object for this annotation.

Returns the observation snapshot associated with this annotation.

Returns the boolean mask representing the overlay area.

Returns the RGB color tuple for the overlay.

Returns the list of text annotation information objects.

Bases: NavBase

Manages a collection of annotation objects for an observation.

This class provides functionality to combine multiple annotations into a single overlay image and handle text placement.

Adds one or more annotations to this collection.

Parameters:

annotations – The annotation(s) to add. Can be a single Annotation, a list of Annotations, another Annotations object, or None.

Raises:
  • ValueError – If an annotation is for a different observation than existing

  • annotations.

Return the list of annotations.

Combines all annotations into a single graphic overlay image.

Parameters:
  • offset – Optional offset (dv,du) to apply to all annotations

  • include_text – Whether to include text annotations

  • text_use_avoid_mask – Whether to use avoid masks for text placement

  • text_avoid_other_text – Whether text should avoid other text

  • text_show_all_positions – Whether to show all possible text positions

Returns:

A combined RGB array containing all annotations, or None if no annotations exist.

Bases: object

Returns a string representation of the text annotation information.

Returns a string representation of the text annotation information.

Returns the RGB or RGBA color tuple for the text.

Returns the font filename used for rendering the text.

Returns the font size in points.

Returns the reference point (v, u) that the text is associated with.

Returns the annotation text.

Returns the list of possible text locations.

Bases: tuple

Alias for field number 0

Alias for field number 2

Alias for field number 1