Class PointGraphicAnnotation

description

This class is the representation of point graphic data, and a sub class of graphic annotation

Hierarchy

Index

Constructors

constructor

  • description

    constructs the GraphicAnnotation object;

    Parameters

    • graphicLayer: string

      graphicLayer object

    • Default value graphicObjects: Array<GraphicObject> = []

      graphic objects

    • Default value textObjects: Array<TextObject> = []

      text objects

    • Default value referencedImageSequence: Array<ReferencedImage> = []

      referenced image sequence

    • Default value graphicLayerIndex: number = -1

      graphicLayer index

    • Default value annotationColor: any = null

      annotation color

    Returns PointGraphicAnnotation

    Returns the newly created instance GraphicAnnotation

Properties

annotationColor

annotationColor: Color

Protected endPoints

endPoints: Array<Point> = []

Protected firstBoundsPoint

firstBoundsPoint: Point = new Fovia.Util.Point(0, 0)

Protected frameOfReference

frameOfReference: string

graphicLayer

graphicLayer: string

graphicLayerIndex

graphicLayerIndex: number = -1

graphicObjects

graphicObjects: Array<GraphicObject> = []

Protected isNew

isNew: boolean = false

Protected isObjectHighlight

isObjectHighlight: boolean = false

Protected isPointHighlight

isPointHighlight: boolean = false

Protected measurement

measurement: number = 0

Protected measurementLabel

measurementLabel: string

Protected measurementUnits

measurementUnits: string

patientOrientationColumn

patientOrientationColumn: string

patientOrientationRow

patientOrientationRow: string

pixelSpacing

pixelSpacing: Point = new Fovia.Util.Point(0.0, 0.0)

referencedImageSequence

referencedImageSequence: Array<ReferencedImage> = []

Protected secondBoundsPoint

secondBoundsPoint: Point = new Fovia.Util.Point(0, 0)

selectedObjectIndex

selectedObjectIndex: number = -1

Protected selectedPointIndex

selectedPointIndex: number = -1

showLabel

showLabel: boolean = true

textObjects

textObjects: Array<TextObject> = []

Protected volumeDataContext

volumeDataContext: VolumeDataContext = null

Methods

addGraphicData

  • addGraphicData(point: Point): void

addReferencedImage

  • addReferencedImage(sopInstanceUID: string, frameNumber: number, isMultiFrame?: boolean): void
  • description

    Add referenced image, this annotation referred

    Parameters

    • sopInstanceUID: string

      sop instance uid of the referred image

    • frameNumber: number

      frame number of the referred image

    • Default value isMultiFrame: boolean = false

      true if it is multi frame, false on single frame

    Returns void

calculateMeasurementLabel

  • calculateMeasurementLabel(pixelSpacing: number[]): void

clone

getEndPoints

  • getEndPoints(): Array<Point>

getFirstBoundsPoint

  • getFirstBoundsPoint(): Point

getGraphicData

  • getGraphicData(index?: number): Point
  • description

    Get graphic data at specified index from graphic object

    Parameters

    • Default value index: number = 0

      graphic data index

    Returns Point

getGraphicObject

  • description

    Get graphic object at specified index. Returns null if list is empty or index is invalid

    Parameters

    • Default value index: number = 0

      graphic object index

    Returns GraphicObject

Protected getMeasurement

  • getMeasurement(): string

getSecondBoundsPoint

  • getSecondBoundsPoint(): Point

getSelectedPointIndex

  • getSelectedPointIndex(): number

hasCadGraphicAnnotation

  • description

    Check whether the given sop instance uid referred and it is a cad annotation

    Parameters

    Returns boolean

    true will be returned in success case, false will be returned in failure case

isHighlighted

  • isHighlighted(): boolean
  • description

    Check if object is highlight or not

    Returns boolean

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

isImagePresent

  • isImagePresent(sopInstanceUID: string): boolean
  • description

    Check whether the sop instance uid already referred or not

    Parameters

    • sopInstanceUID: string

      SOP Instance Uid to be checked

    Returns boolean

    True will be returned if already exists , false will be returned if not exists

isLargerObject

  • isLargerObject(): boolean
  • description

    Check whether the annotation has large number of graphic objects

    Returns boolean

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

isLayerWithinThreaholdMeasurement

  • isLayerWithinThreaholdMeasurement(): boolean

isPointHighlighted

  • isPointHighlighted(): boolean
  • description

    Check if point is highlight or not

    Returns boolean

    True returned if highlighted, false will be returned if not

isPointSelected

  • isPointSelected(currentPoint: Point, pointToCompare: Point): boolean
  • description

    Check whether the point is selected or not

    Parameters

    • currentPoint: Point

      current mouse point

    • pointToCompare: Point

      point to compare

    Returns boolean

    true will be returned in success case false on failure case

isValidObjectSelected

  • isValidObjectSelected(): boolean

resetTextObjects

  • resetTextObjects(): void

setAnnotationColor

  • setAnnotationColor(r: number, g: number, b: number): void
  • description

    update the annotation color to be rendered

    Parameters

    • r: number

      red value to be updated

    • g: number

      green value to be updated

    • b: number

      blue value to be updated

    Returns void

setFirstBoundPoint

  • setFirstBoundPoint(point: Point): void
  • description

    Set first bounding point. This will be set when user performs mouseDown event

    Parameters

    • point: Point

      a point in dicom image.

    Returns void

setHighlight

  • setHighlight(flag: boolean): void
  • description

    Set whether the annotation is highlighted or not

    Parameters

    • flag: boolean

      True if highlighted false if not

    Returns void

setIsNewFlag

  • setIsNewFlag(flag: boolean): void
  • description

    update the flag whether it is newly added annotation or else it is loaded from dicom file

    Parameters

    • flag: boolean

      True for new one, false for loaded for dicom file

    Returns void

setMeasurement

  • setMeasurement(measurement: number): void

setMeasurementLabel

  • setMeasurementLabel(value: string): void

setMeasurementUnits

  • setMeasurementUnits(value: string): void

setPoint

  • setPoint(point: Point): void
  • description

    Set point and update the text objects

    Parameters

    • point: Point

      Point to be updated

    Returns void

setPointHighlight

  • setPointHighlight(flag: boolean): void
  • description

    Set the flag, that says point is highlighted or not

    Parameters

    • flag: boolean

      True for highlighted, false for not

    Returns void

setSecondBoundPoint

  • setSecondBoundPoint(point: Point): void
  • description

    Set second bounding point. It will be changing when user moves mouse or releases at some point

    Parameters

    • point: Point

      a point in dicom image.

    Returns void

setSelectedObjectIndex

  • setSelectedObjectIndex(index: number): void

setSelectedPointIndex

  • setSelectedPointIndex(selectedIndex: number): void

setShowLabelFlag

  • setShowLabelFlag(flag: boolean): void
  • description

    Update the show label flag, based on that label will render or hide later

    Parameters

    • flag: boolean

      True to render, false to hide

    Returns void

updateBoundingPoints

  • updateBoundingPoints(center: Point, endPoint: Point): void
  • description

    Calculate distance from given center and end point. Update first and second bounding points

    Parameters

    • center: Point

      center point to be updated

    • endPoint: Point

      end point to be updated

    Returns void

updateNoOfGraphicPoints

  • updateNoOfGraphicPoints(): void

Protected updateTextObjects

  • updateTextObjects(anchorPoint: Point): void