Class SharedAnnotationContext

This class is a container to hold annotations and having methods to manage them

Hierarchy

  • SharedAnnotationContext

Index

Constructors

constructor

Properties

Private circleAnnotations

circleAnnotations: Array<CircleGraphicAnnotation> = []

Private ellipseAnnotations

ellipseAnnotations: Array<EllipseGraphicAnnotation> = []

Private lineAnnotations

lineAnnotations: Array<PolylineGraphicAnnotation> = []

Private pointAnnotations

pointAnnotations: Array<PointGraphicAnnotation> = []

Private selectedIndex

selectedIndex: number = -1

Private textAnnotations

textAnnotations: Array<TextGraphicAnnotation> = []

Methods

addAnnotation

  • addAnnotation(graphicType: GraphicType, annotation: GraphicAnnotation, referencedSopInstanceUID: string, frameNumber: number, isMultiFrame?: boolean): boolean
  • description

    Add annotation in the correspoding list

    Parameters

    • graphicType: GraphicType

      annotation type

    • annotation: GraphicAnnotation

      annotation to be added

    • referencedSopInstanceUID: string

      sop instance uid of the annotation

    • frameNumber: number

      frame number of the annotation to be added

    • Default value isMultiFrame: boolean = false

      true if it refers multi frame, false if it is a multi frame

    Returns boolean

    True will be returned in success case, false on failure case

addCircleAnnotation

  • addCircleAnnotation(annotation: CircleGraphicAnnotation, referencedSopInstanceUID: string, frameNumber: number, isMultiFrame?: boolean): boolean
  • description

    Add given circle annotation to it's point annotation array

    Parameters

    • annotation: CircleGraphicAnnotation

      A circle graphic annotation

    • referencedSopInstanceUID: string

      referenced sop instance uid

    • frameNumber: number
    • Default value isMultiFrame: boolean = false

    Returns boolean

    True will be returned in success case, false on failure case

addEllipseAnnotation

  • addEllipseAnnotation(annotation: EllipseGraphicAnnotation, referencedSopInstanceUID: string, frameNumber: number, isMultiFrame?: boolean): boolean
  • description

    Add given ellipse annotation to it's point annotation array

    Parameters

    • annotation: EllipseGraphicAnnotation

      An ellipse graphic annotation

    • referencedSopInstanceUID: string

      referenced sop instance uid

    • frameNumber: number
    • Default value isMultiFrame: boolean = false

    Returns boolean

    True will be returned in success case, false on failure case

addLineAnnotation

  • addLineAnnotation(annotation: PolylineGraphicAnnotation, referencedSopInstanceUID: string, frameNumber: number, isMultiFrame?: boolean): boolean
  • description

    Add given line annotation to it's line annotation array

    Parameters

    • annotation: PolylineGraphicAnnotation

      A line graphic annotation

    • referencedSopInstanceUID: string

      referenced sop instance uid

    • frameNumber: number
    • Default value isMultiFrame: boolean = false

    Returns boolean

    True will be returned in success case, false on failure case

addPointAnnotation

  • addPointAnnotation(annotation: PointGraphicAnnotation, referencedSopInstanceUID: string, frameNumber: number, isMultiFrame?: boolean): boolean
  • description

    Add given point annotation to this point annotation array

    Parameters

    • annotation: PointGraphicAnnotation

      A point graphic annotation

    • referencedSopInstanceUID: string

      referenced sop instance uid

    • frameNumber: number
    • Default value isMultiFrame: boolean = false

    Returns boolean

    True will be returned in success case, false on failure case

addTextAnnotation

  • addTextAnnotation(annotation: TextGraphicAnnotation, referencedSopInstanceUID: string, frameNumber: number, isMultiFrame?: boolean): boolean
  • description

    Add given text annotation to it's point annotation array

    Parameters

    • annotation: TextGraphicAnnotation

      A text graphic annotation

    • referencedSopInstanceUID: string

      referenced sop instance uid

    • frameNumber: number
    • Default value isMultiFrame: boolean = false

    Returns boolean

    True will be returned in success case, false on failure case

cloneCircleAnnotations

cloneEllipseAnnotations

clonePointAnnotations

clonePolylineAnnotations

cloneTextAnnotations

deleteAnnotation

  • deleteAnnotation(graphicType: GraphicType, sopInstanceUID: string): boolean
  • Delete the specific annotation for given sopInstanceUID

    Parameters

    Returns boolean

    boolean stating whether annotation deleted or not

deleteCircleAnnotation

  • deleteCircleAnnotation(): boolean
  • Delete selected circle annotations.

    Returns boolean

    true if successfully deleted. Otherwise false

deleteEllipseAnnotation

  • deleteEllipseAnnotation(): boolean
  • Delete selected circle annotations.

    Returns boolean

    true if successfully deleted. Otherwise false

deleteLineAnnotation

  • deleteLineAnnotation(): boolean
  • Delete selected line annotations.

    Returns boolean

    true if successfully deleted. Otherwise false

deletePointAnnotation

  • deletePointAnnotation(): boolean
  • Delete selected point annotations.

    Returns boolean

    true if successfully deleted. Otherwise false

deleteTextAnnotation

  • deleteTextAnnotation(): boolean
  • Delete selected text annotations.

    Returns boolean

    true if successfully deleted. Otherwise false

empty

  • empty(): boolean
  • Check if annotations are empty or not

    Returns boolean

    true if annotations available. Otherwise false

getAnnotations

getCircleAnnotations

  • description

    Get circle annotations

    Parameters

    • Default value deepcopy: boolean = false

      This argument specifies that whether the copy is deep copy or shallow copy of annotations by default this one is false

    Returns Array<CircleGraphicAnnotation>

    Return circle annotation list on success case, empty list will be returned in failure case

getEllipseAnnotations

  • description

    Get ellipse annotations for given sop instance UID

    Parameters

    • Default value deepcopy: boolean = false

      This argument specifies that whether the copy is deep copy or shallow copy of annotations by default this one is false

    Returns Array<EllipseGraphicAnnotation>

    Return ellipse annotation list on success case, empty list will be returned in failure case

getLineAnnotations

  • description

    Get line annotations

    Parameters

    • Default value deepcopy: boolean = false

      This argument specifies that whether the copy is deep copy or shallow copy of annotations by default this one is false

    Returns Array<PolylineGraphicAnnotation>

    Return line annotation list on success case, empty list will be returned in failure case

getPointAnnotations

  • description

    Get point annotations

    Parameters

    • Default value deepcopy: boolean = false

      This argument specifies that whether the copy is deep copy or shallow copy of annotations by default this one is false

    Returns Array<PointGraphicAnnotation>

    Return point annotation list on success case, empty list will be returned in failure case

getSelectedAnnotation

  • description

    Get selected annotation from annotations

    Parameters

    • currentPoint: Point
    • renderEngine: any

    Returns GraphicAnnotation

    a Annotation if success or null

getTextAnnotations

  • description

    Get text annotations

    Parameters

    • Default value deepcopy: boolean = false

      This argument specifies that whether the copy is deep copy or shallow copy of annotations by default this one is false

    Returns Array<TextGraphicAnnotation>

    Return text annotation list on success case, empty list will be returned in failure case

merge

  • Concat all annotations from given shared annotation context to this object

    Parameters

    • sharedAnnotationContext: SharedAnnotationContext

      Fovia.SharedAnnotationContext class holding list of annotations

    • Default value deepcopy: boolean = false

    Returns void

removeTextAnnotationAndEditBtn

  • removeTextAnnotationAndEditBtn(sopInstanceUID: string): boolean
  • Remove the edit btn, which is associated to the current delete text annotation. And also remove the annotation

    Parameters

    • sopInstanceUID: string

    Returns boolean