Options
All
  • Public
Menu

Class RenderEngineContext

RenderEngineContext is backed by a native renering engine and is typically associated with a Fovia.UI.HTMLViewport . This objectis typically created by a ServerContext.loadDICOMDir or a ServerContext.loadCustomData .

Hierarchy

  • RenderEngineContext

Index

Constructors

constructor

  • Constructor for the RenderEngineContext

    Parameters

    • renderEngineID: number

      Unique render engine ID that corresponds to the native rendering engine.

    Returns RenderEngineContext

Properties

Private renderEngineGroupListener

renderEngineGroupListener: RenderEngineGroup

Private renderEngineID

renderEngineID: number

Methods

Private addLinkedGroupListener

  • Parameters

    Returns void

getRenderEngineID

  • getRenderEngineID(): number
  • Return the render engine ID associated with this object

    Returns number

getRenderParams

  • getRenderParams(callback?: any): Promise<Object>
  • Parameters

    • Optional callback: any

    Returns Promise<Object>

projectPoint

  • projectPoint(vectorList: Array<Vector>, callback?: any): Promise<Object>
  • Projects the specific array of vectors into the scene and returns a correpsonding array of points

    params

    Array of Vectors to project into the scene

    Parameters

    • vectorList: Array<Vector>
    • Optional callback: any

    Returns Promise<Object>

    This is an asynchronous method that returns a Promise as follows:

    Promise .then(pointList : Array< Point >) .catch (err: ReturnCode )

    callbackFunc(err: ReturnCode , pointList Point : Array< Point> )

releaseSessionResources

  • releaseSessionResources(): void
  • Returns void

render

  • Invokes the native intermediate render() method.

    Returns ReturnCode

    This is a synchronous method and returns ReturnCode.ok on success.

renderFinal

  • Invokes the native renderFinal() method. It is important that a render() be done before a renderFinal() after the rendeirng state has changed, such as from a setRenderParamters().

    Returns ReturnCode

    This is a synchronous method and returns ReturnCode.ok on success.

saveRenderedImageToFile

  • saveRenderedImageToFile(filename: string, isFinal?: boolean, callbackFunc?: any): Promise<Object>
  • Parameters

    • filename: string
    • Default value isFinal: boolean = true
    • Optional callbackFunc: any

    Returns Promise<Object>

Private setCurvedMPRPath

  • setCurvedMPRPath(numProjPlanes: number, arrProjPlanes: Matrix[], cMPRType: CurvedMPRType, callback?: any): Promise<Object>
  • Parameters

    Returns Promise<Object>

setFastPolygonEnable

  • setFastPolygonEnable(fastPolygonEnble: boolean, callbackFunc?: any): Promise<Object>
  • Parameters

    • fastPolygonEnble: boolean
    • Optional callbackFunc: any

    Returns Promise<Object>

Private setFramesPerPhase

  • setFramesPerPhase(frame: number): void
  • Parameters

    • frame: number

    Returns void

Private setPhase

  • setPhase(phase: number): void
  • Parameters

    • phase: number

    Returns void

setPolygonContexts

  • setPolygonContexts(polygonContextList: Array<PolygonContext>, callback?: any): Promise<Object>
  • Parameters

    Returns Promise<Object>

setRenderParams

  • setRenderParams(rp: RenderParams, callback?: any): Promise<Object>
  • Sets the rendering paramters to this rendering engine

    Parameters

    Returns Promise<Object>

    This is an asynchronous method that returns a Promise as follows:

    Promise .then(void) .catch (err: ReturnCode )

    callbackFunc(err: ReturnCode , void)

    While this does not provide a return value, it is sometimes useful to wait for it to complete as in:

    renderEngineContext.setRenderParams(renderParams).then(function() { renderEngineContext.render(); renderFinal(); });

setRenderParamsXML

  • setRenderParamsXML(xmlPresetName: String, callback?: any): Promise<Object>
  • Sets the rendering paramters using the supplied XML file to this rendering engine

    Parameters

    • xmlPresetName: String

      path and filename of the XML file to load. This will be relative to the FoviaWebSDK.EXE directory, or can be an absolute path

    • Optional callback: any

    Returns Promise<Object>

    This is an asynchronous method that returns a Promise as follows:

    Promise .then(void) .catch (err: ReturnCode )

    callbackFunc(err: ReturnCode , void)

    While this does not provide a return value, it is sometimes useful to wait for it to complete as in:

    renderEngineContext.setRenderParamsXML(renderParams).then(function() { renderEngineContext.render(); renderFinal(); });

setTransferFunction

  • setTransferFunction(index: number, renderRanges: RenderRangeParams[], callback?: any): Promise<Object>
  • sets the transfer function on this rendering engine

    Parameters

    • index: number

      0-based number for transfer function to set

    • renderRanges: RenderRangeParams[]

      array of render ranges

    • Optional callback: any

    Returns Promise<Object>

    This is an asynchronous method that returns a Promise as follows:

    Promise .then() .catch (err: ReturnCode )

    callbackFunc(err: ReturnCode )

setTransferFunctionFromRP

  • setTransferFunctionFromRP(index: number, rp: RenderParams, callback: any): Promise<Object>
  • Parameters

    Returns Promise<Object>

shootRay

  • shootRay(pointList: Array<Point>, callback?: any): Promise<Object>
  • Shoots ray into the screen from an array of points, and returns a correpsonding array of RayStopInfo

    params

    Array of Vectors to project into the scene

    Parameters

    • pointList: Array<Point>
    • Optional callback: any

    Returns Promise<Object>

    This is an asynchronous method that returns a Promise as follows:

    Promise .then(rayStopInfoList : Array< RayStopInfo>) .catch (err: ReturnCode )

    callbackFunc(err: ReturnCode , rayStopInfoList : Array< RayStopInfo> )

Static createDefaultRenderParams

  • createDefaultRenderParams(viewportwidth: number, viewportheight: number, renderEngineType: any, orientation: any, wlData: WindowLevelData): RenderParams
  • Example for creating a complete rendering parameters structure programatically

    Parameters

    • viewportwidth: number
    • viewportheight: number
    • renderEngineType: any
    • orientation: any
    • wlData: WindowLevelData

    Returns RenderParams

Generated using TypeDoc