Class TextObject

This class is the container to hold text graphic data and fetched from Text Object Sequence Attribute (0070,0008) on native side

Hierarchy

  • TextObject

Index

Constructors

constructor

  • description

    Constructs the TextObject object from given arguments

    Parameters

    • anchorPoint: Point

      A Fovia.Util.Point object and value for dicom tag (0070,0014)

    • Default value unformattedText: string = ""

      A text value for dicom tag (0070,0006)

    • Default value anchorPointVisibility: boolean = true

      A value for dicom tag (0070,0015). Defaults to true

    • Default value boundingBoxTextHorizontalJustification: HorizontalJustification = Fovia.HorizontalJustification.left

      One of the enum of Fovia.HorizontalJustification and value for dicom tag (0070,0012)

    • Default value topLeftCorner: Point = null

      A Fovia.Util.Point object and value for dicom tag (0070,0010)

    • Default value bottomRightCorner: Point = null

      A Fovia.Util.Point object and value for dicom tag (0070,0011)

    • Default value boundingBoxAnnotationUnits: MeasurementUnits = Fovia.MeasurementUnits.pixel

      One of the enum Fovia.MeasurementUnits and defaults to Fovia.MeasurementUnits.pixel and value for dicom tag (0070,0003)

    • Default value anchorPointAnnotationUnits: MeasurementUnits = Fovia.MeasurementUnits.pixel

      One of the enum Fovia.MeasurementUnits and defaults to Fovia.MeasurementUnits.pixel and value for dicom tag (0070,0004)

    Returns TextObject

    Returns the newly TextObject

Properties

anchorPoint

anchorPoint: Array<Point> = []

anchorPointAnnotationUnits

anchorPointAnnotationUnits: MeasurementUnits = Fovia.MeasurementUnits.none

anchorPointVisibility

anchorPointVisibility: boolean = false

boundingBottomRightCorner

boundingBottomRightCorner: Point

boundingBoxAnnotationUnits

boundingBoxAnnotationUnits: MeasurementUnits = Fovia.MeasurementUnits.none

boundingBoxTextHorizontalJustification

boundingBoxTextHorizontalJustification: HorizontalJustification = Fovia.HorizontalJustification.none

boundingTopLeftCorner

boundingTopLeftCorner: Point

Private endPoints

endPoints: any[] = []

Private height

height: number = 0

unformattedTextValue

unformattedTextValue: string

Private width

width: number = 0

Methods

adjustBottomRightPoint

  • adjustBottomRightPoint(): void
  • description

    Adjust the bottom right points based on the text value.

    Returns void

Private adjustBoundingPoints

  • adjustBoundingPoints(): void
  • description

    Adjust the bounding points based on the text value.

    Returns void

adjustTopLeftPoint

  • adjustTopLeftPoint(): void
  • description

    Adjust the top left points based on the text value.

    Returns void

calculateEndPoints

  • calculateEndPoints(): void
  • description

    Calculate the end points based on the bounding points.

    Returns void

Private calculateHeight

  • calculateHeight(): void
  • description

    Calculate the height based on the bounding points

    Returns void

Private calculateWidth

  • calculateWidth(): void
  • description

    Calculate the width based on the bounding points

    Returns void

clone

  • description

    Clone the current text object.

    Returns TextObject

    Return the new cloned instance

getBottomRightPoint

  • getBottomRightPoint(): Point
  • description

    Get bottom right hand corner point

    Returns Point

    Returns a point instance

getEndPoints

  • getEndPoints(): any[]
  • description

    get end points of the text object

    Returns any[]

    Returns end points

getHeight

  • getHeight(): number
  • description

    Get height of the bounding rectangle

    Returns number

    height

getLabelBoundingBox

  • getLabelBoundingBox(): Rect2D
  • description

    Get 2D rectangle (Label bounding box)

    Returns Rect2D

    Returns Rect2D object

getTopLeftPoint

  • getTopLeftPoint(): Point
  • description

    Get Top left hand corner point

    Returns Point

    Returns a point instance

getUnformattedText

  • getUnformattedText(): string
  • description

    Get unformatted(encoded) text value

    Returns string

    Returns the unformatted text

getWidth

  • getWidth(): number
  • description

    Get width of the bounding rectangle

    Returns number

    width

Private getWidthAndApplyLineBreak

  • getWidthAndApplyLineBreak(): number
  • description

    Get line break up text based on the width

    Returns number

    a Width

move

  • move(deltaX: number, deltaY: number): void
  • description

    Move the bounding points to the given deviation

    Parameters

    • deltaX: number

      x position deviation

    • deltaY: number

      y position deviation

    Returns void

setBottomRightPoint

  • setBottomRightPoint(point: Point): void
  • description

    Set bottom right point and internally invokes calculateWidth and calculateHeight

    Parameters

    • point: Point

      Bottom right hand corner point to be updated

    Returns void

setEndPoints

  • setEndPoints(endPoints?: any[]): void
  • description

    Set end points.

    Parameters

    • Default value endPoints: any[] = []

      End points to be updated

    Returns void

setTopLeftPoint

  • setTopLeftPoint(point: Point): void
  • description

    Set top left point and internally invokes calculateWidth and calculateHeight

    Parameters

    • point: Point

      Top left hand corner point to be updated

    Returns void

updateFirstBoundsPoint

  • updateFirstBoundsPoint(deltaX: number, deltaY: number): void
  • description

    Update first bounds point. Re-calculate the width and height based on the updated bounding points.

    Parameters

    • deltaX: number

      x position deviation

    • deltaY: number

      y position deviation

    Returns void

updateSecondBoundsPoint

  • updateSecondBoundsPoint(deltaX: number, deltaY: number): void
  • description

    Update second bounds point. Re-calculate the width and height based on the updated bounding points.

    Parameters

    • deltaX: number

      x position deviation

    • deltaY: number

      y position deviation

    Returns void