Class RenderParams2D

A RenderParams2D object contains the complete state of a 2D render engine. This includes the current image number, sopInstanceUID, DICOM image width and height, window/level/zoom, offset (pan) as well as rotate and flip state that is passed through to the GSPS native layer. This object is constructed on the client and is passed to the server using the setRenderParams. This object is also returned to the client during getRenderParams , and when an image is returned from the server.

Hierarchy

Index

Constructors

constructor

  • Synchronous method to construct a client side RenderParams2D object. The default constructor marks all fields as undefined; any undefined fields will be ignored by the server. It can also be initialized using an existing RenderParams2D object.

    Returns RenderParams2D

  • Synchronous method to construct a client side RenderParams2D object. The default constructor marks all fields as undefined; any undefined fields will be ignored by the server. It can also be initialized using an existing RenderParams2D object.

    Parameters

    Returns RenderParams2D

Properties

backgroundColor

backgroundColor: Color

background color for any pixels outside the displayed image data

flip

flip: number

DICOM GSPS Image Horizontal Flip (0070,0041) field; this is an enum that indicates if image is flipped horizontally. There is no vertical flip in the GSPS model. This is achieved with a combination of 180 degree rotation followed by a horizontal flip.

imageHeight

imageHeight: number

image height in pixels

imageNumber

imageNumber: number

current image number. This is zero-based and is in the range of 0 and getnumimages - 1. This is NOT the DICOM instance number

imageWidth

imageWidth: number

image width in pixels

interpolation

interpolation: ResampleType

indicates resample mode, which is nearest neightbor, bi-linear, or bi-cubic

level

level: number

Current "level" value applied in the DICOM rendering pipeline

Private name

name: string = "RenderParams2D"

offsetX

offsetX: number

X-offset for a pan operation

offsetY

offsetY: number

Y-offset for a pan operation

renderType

renderType: RenderType2D

will be default (normal) or invert

reserved

reserved: number

reserved field (should be 0)

roi

roi: Rect

DICOM GSPS fieldOfView field (currently not implemented)

rotate

DICOM GSPS Image Rotation (0070, 0042) field; this is an enum value of 0,90,180,270

sopInstanceUID

sopInstanceUID: string

DICOM sopInstanceUID of the image being displayed

sourceImageSequence

sourceImageSequence: Array<string>

voiLUTIndex

voiLUTIndex: number

index of VOI LUT, if defined

window

window: number

Current "window" value applied in the DICOM rendering pipeline

zoom

zoom: number

Current zoom value applied in the DICOM rendering pipeline

Methods

clearImageTransformation

  • clearImageTransformation(): void
  • Synchronous method that clears the current rotation/flip transformation. This only updates the renderParams2D object locally, it does not update the state of the server until a setRenderParams is called.

    Returns void

flipHorizontal

  • flipHorizontal(): void
  • Performs a horizontal flip operation, using the current state of the objects rotate and flip fields.

    Returns void

flipVertical

  • flipVertical(): void
  • Performs a vertical flip operation, using the current state of the objects rotate and flip fields. Interal to the render parameters object, is no vertical flip field as this is accomplished internally using a 180 degree rotate followed by a flip horizontal operation

    Returns void

merge

  • Updates the existing objects fields with any non-null/defined values in the supplied rp parameter.

    Parameters

    • rp: RenderParams2D

      RenderParams2D object to be merged into this object

    Returns void

Private performRotateAndFlip

  • performRotateAndFlip(rotateAngle: ImageRotation, isFlip: boolean): void
  • Performs rotate and filp and updates the current state of the object's rotate and flip fields.

    Parameters

    Returns void

rotate90Clockwise

  • rotate90Clockwise(): void
  • Performs a single 90 degree clockwise rotate operation, updating the current state of the object's rotate and flip fields.

    Returns void

rotate90CounterClockwise

  • rotate90CounterClockwise(): void
  • Performs a single 90 degree counter clockwise rotate operation, updating the current state of the object's rotate and flip fields.

    Returns void

setBackgroundColor

  • setBackgroundColor(r: any, g?: any, b?: any): void
  • Sets the backgroundColor field.

    Parameters

    • r: any

      Red color component, 0 - 255.

    • Default value g: any = 0

      Green color component, 0 - 255.

    • Default value b: any = 0

      Blue color component, 0 - 255.

    Returns void

setImageNumber

  • setImageNumber(imageNumber: number): void
  • Parameters

    • imageNumber: number

    Returns void

setImageSize

  • setImageSize(width: number, height: number): void
  • Parameters

    • width: number

      The output image width in pixels.

    • height: number

      The output image height in pixels.

    Returns void

setInterpolation

setOffset

  • setOffset(x: number, y: number): void
  • Parameters

    • x: number
    • y: number

    Returns void

setROI

  • setROI(roi: Rect): void
  • Parameters

    Returns void

setRenderType

setSOPInstanceUID

  • setSOPInstanceUID(sopInstanceUID: string): void
  • Parameters

    • sopInstanceUID: string

    Returns void

setSourceImageSequence

  • setSourceImageSequence(sourceImageSequence: Array<string>): void
  • Parameters

    • sourceImageSequence: Array<string>

    Returns void

setVOILUTIndex

  • setVOILUTIndex(voiLUTIndex: number): void
  • Parameters

    • voiLUTIndex: number

    Returns void

setWindowLevel

  • setWindowLevel(window: number, level: number): void
  • Sets the window and level fields.

    Parameters

    • window: number

      The window value.

    • level: number

      The level value.

    Returns void

setZoom

  • setZoom(zoom: number): void
  • Parameters

    • zoom: number

    Returns void

toJSON

  • toJSON(): object
  • Constructs a JSON string with the values from this object

    Returns object

    • [k: string]: any

Private toggleFlipState

  • toggleFlipState(): void
  • Updates object's flip state.

    Returns void