Class BlendedRenderEngineContext3D

subclass of RenderEngineContext3D which consists of an array of RenderEngineContext3D, as well as the blendType and the blendAmount for fusing of the two render engines.

Hierarchy

Index

Constructors

constructor

Properties

Private blendAmount1

blendAmount1: number = 1

Private blendAmount2

blendAmount2: number = 1

Private blendPecentSwipe

blendPecentSwipe: number = 0.5

Private blendType

blendType: BlendType = Fovia.BlendType.additive

Private blendedRenderEngineID

blendedRenderEngineID: number

Protected cachedRenderParams

cachedRenderParams: any = null

Protected imageReadyCallback

imageReadyCallback: Function

Private renderEngineIDList

renderEngineIDList: Array<number> = []

Private renderEngineList

renderEngineList: Array<RenderEngineContext3D> = []

Methods

applyVolumetricShadowMap

  • applyVolumetricShadowMap(shadowMap: ShadowMapContext, callbackFunc?: any): any
  • description

    update volumetric shadow map

    Parameters

    • shadowMap: ShadowMapContext

      ShadowMapContext to be updated

    • Optional callbackFunc: any

      call bsck method to be called on both success and failure case

    Returns any

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

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

getCachedRenderParams

  • getCachedRenderParams(): any

getPolygonLighting

  • getPolygonLighting(callbackFunc?: any): any
  • Gets the lighting characterists for rendering of the polygons.

    Parameters

    • Optional callbackFunc: any

    Returns any

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

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

    callbackFunc(err: ReturnCode , data)

getRenderEngine

  • Return the child render engine associated with this object

    Parameters

    • Default value renderEngineIndex: any = null

      The index of blended render engine for this operaton

    Returns RenderEngineContext3D

getRenderEngineID

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

    Parameters

    • Default value renderEngineIndex: any = null

      The index of blended render engine for this operaton

    Returns number

getRenderParams

  • getRenderParams(renderEngineIndex: number, callbackFunc?: any): any

getSeriesDataContext

getTransferFunction

  • getTransferFunction(renderEngineIndex: any, index1: any, callbackFunc?: any): any
  • Gets one of the transfer functions associated with this engine.

    Parameters

    • renderEngineIndex: any

      The index of blended render engine for this operaton

    • index1: any

      A 0-based number representing which transfer function to get.

    • Optional callbackFunc: any

    Returns any

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

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

    callbackFunc(err: ReturnCode , renderRenderParams : RenderRangeParams )

getVolumeDataContext

imageReceived

  • imageReceived(data: any): void

loadTransferFunctionFromFile

  • loadTransferFunctionFromFile(renderEngineIndex: any, xmlFilename: any, callbackFunc?: any): any
  • Loads a transfer function XML file and applies the contents to the engine.

    Parameters

    • renderEngineIndex: any

      The index of blended render engine for this operaton

    • xmlFilename: any

      The file name of a transfer function XML file to load and apply.

    • Optional callbackFunc: any

    Returns any

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

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

    callbackFunc(err: ReturnCode )

projectPoint

  • projectPoint(renderEngineIndex: any, vectorList: any, callbackFunc?: any): any
  • Projects the specific array of vectors into the scene and returns a correpsonding array of points.

    Parameters

    • renderEngineIndex: any

      The index of blended render engine for this operaton

    • vectorList: any
    • Optional callbackFunc: any

    Returns any

    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(callbackFunc?: any): any

render

renderFinal

saveRenderedImageToFile

  • saveRenderedImageToFile(filename: string, isFinal?: boolean, callbackFunc?: any): any
  • Renders an image and saves it to disk.

    Parameters

    • filename: string

      Name of the file to save to disk.

    • Default value isFinal: boolean = true

      Set to true to render a final quality image (defualt), or false for interactive quality image.

    • Optional callbackFunc: any

    Returns any

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

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

    callbackFunc(err: ReturnCode )

saveTransferFunctionToFile

  • saveTransferFunctionToFile(renderEngineIndex: any, xmlFilename: any, callbackFunc?: any): any
  • Saves the current set of transfer functions to an XML file.

    Parameters

    • renderEngineIndex: any

      The index of blended render engine for this operaton

    • xmlFilename: any

      The file name of a transfer function XML file to save to.

    • Optional callbackFunc: any

    Returns any

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

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

    callbackFunc(err: ReturnCode )

setBlendTypeAndAmount

  • setBlendTypeAndAmount(blendType: BlendType, blendAmount1: number, blendAmount2: number, blendPecentSwipe: number, callbackFunc?: any): any
  • Specifies the blendType and amount for how to render the two render engines together

    Parameters

    • blendType: BlendType

      additive, horizontal swipe, or vertical swipe

    • blendAmount1: number
    • blendAmount2: number
    • blendPecentSwipe: number
    • Optional callbackFunc: any

      optional callback invoked once the server has completed this call

    Returns any

setCurvedMPRPath

  • setCurvedMPRPath(renderEngineIndex: any, arrProjPlanes: any, cMPRType: any, callbackFunc?: any): any
  • Sets the curved MPR path to use. Essentially, the X vector (m11,m21,m31) in the projection plane describes the direction for the linear slice to take at every interpolated point on the curve. The offset (m14,m24,m34) in the projection plane describes where each point is. From this description, the points you specify are interpolated via Catmull-Rom spline interpolation. The spacing between interpolated points is dictated by the image size.

    Parameters

    • renderEngineIndex: any

      The index of blended render engine for this operaton

    • arrProjPlanes: any

      An arry of transformation matrices designating the position and direction vector for each control point.

    • cMPRType: any

      A value designating which vector to align the points against.

    • Optional callbackFunc: any

    Returns any

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

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

    callbackFunc(err: ReturnCode )

setDisablePolygonOcclusion

  • setDisablePolygonOcclusion(enableGPU: boolean, bAutoOffset?: boolean, offsetDist?: number, callbackFunc?: any): any
  • Enables OpenGL GPU based rendering of polygon objects. All polygon objects will be rendered by OpenGL on the system GPU for this engine. The polygon objects are rendered into a seperate buffer that is overlayed on top of the HDVR image. OpenGL based polygon rendering is potentially much faster than the HDVR polygon engine, and supports layered object translucency. However, because the polygon objects are rendered into a seperate buffer and then overlayed on the HDVR image, they will always appear on top of the HDVR image. If volume occluded polygon objects are desired, the HDVR polygon engine must be used.

    When this function is used to disable or enable OpenGL rendering it will reset the render engine's polygon state. This means that any PolygonContext objects that have been applied to the engine will be cleared, and FastPolygon rendering will be disabled. One must call setPolygonContexts and setFastPolygonEnable, as approptiate, to re-apply the polygon state.

    For polygon objects to be visible the HDVR camera must be positioned so that the objects are in view. The HDVR camera position as represented in the RenderParams.transform variable may be different than the actual camera position if the front clipping plane is disabled (this is the default setting). This offsetting may be automated by using the bAutoOffset and offsetDistance paramaters. This auto offset feature is necessary if rendering in slab mode.

    OpenGL polygon rendering is only available when the rendering server is running on a GPU enabled Microsoft Windows system.

    Parameters

    • enableGPU: boolean

      Set to true to enable OpenGL GPU polygon rendering. Set to false to enable HDVR CPU polygon rendering.

    • Default value bAutoOffset: boolean = true

      True to enable auto camera offset feature for OpenGL frustrum. False to disable.

    • Default value offsetDist: number = 1000

      Offset distance for auto offset feature.

    • Optional callbackFunc: any

    Returns any

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

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

    callbackFunc(err: ReturnCode , renderParams : RenderParams3D )

setFastPolygonEnable

  • setFastPolygonEnable(renderEngineIndex: any, fastPolygonEnable: any, callbackFunc?: any): any
  • Sets the engine to use fast polygons mode. In this mode changes to PolygonContext objects are rendered more quickly. However, no changes to the render engine state other than polygon transformations are permitted while in this mode. This means that no changes to the position, orientation, or any other RenderParams3D fields are permitted.

    Parameters

    • renderEngineIndex: any

      The index of blended render engine for this operaton

    • fastPolygonEnable: any

      Set to true to turn fast polygon mode on, set to false to turn off.

    • Optional callbackFunc: any

    Returns any

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

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

    callbackFunc(err: ReturnCode , renderParams : RenderParams3D )

setPolygonContexts

  • setPolygonContexts(renderEngineIndex: any, polygonContextList: any, intermediateRender?: any, callbackFunc?: any): any
  • Sets an array of PolygonContext objects to be assoicated with the render engine. Once added to the engine, a new frame is rendered that includes the added polygon objects.

    Parameters

    • renderEngineIndex: any

      The index of blended render engine for this operaton

    • polygonContextList: any

      An array of PolygonContext objects to be assoicated with the render engine.

    • Default value intermediateRender: any = true

      If true an interactive quality image is automaticly generated. If false no image is generated.

    • Optional callbackFunc: any

    Returns any

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

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

    callbackFunc(err: ReturnCode , void)

setPolygonLighting

  • setPolygonLighting(ambience: number, brightness: number, reflection: number, shininess: number, callbackFunc?: any): any
  • Sets the lighting characterists for rendering of the polygons.

    Parameters

    • ambience: number
    • brightness: number
    • reflection: number
    • shininess: number
    • Optional callbackFunc: any

    Returns any

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

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

    callbackFunc(err: ReturnCode , void)

setRenderParams

  • setRenderParams(rp: RenderParams3D, callbackFunc?: any): any
  • setRenderParams(rp: Array<RenderParams3D>, callbackFunc?: any): any
  • setRenderParams(renderEngineIndex: number, rp: RenderParams3D, callbackFunc?: any): any
  • Sets the rendering parameter to be used with the render engine.

    Parameters

    • rp: RenderParams3D

      A RenderParams3D object containing the values that are to be applied to the rendering engine.

    • Optional callbackFunc: any

    Returns any

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

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

    callbackFunc(err: ReturnCode )

    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(); });

  • Parameters

    Returns any

  • Parameters

    • renderEngineIndex: number
    • rp: RenderParams3D
    • Optional callbackFunc: any

    Returns any

setTransferFunction

  • setTransferFunction(renderEngineIndex: any, index: any, renderRanges: any, callbackFunc?: any): any
  • Sets the transfer function on this rendering engine.

    Parameters

    • renderEngineIndex: any

      The index of blended render engine for this operaton

    • index: any

      0-based number for transfer function to set.

    • renderRanges: any

      An array of render ranges to set.

    • Optional callbackFunc: any

    Returns any

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

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

    callbackFunc(err: ReturnCode )

shootRay

  • shootRay(renderEngineIndex: any, pointList: any, callbackFunc?: any): any
  • Shoots ray into the screen from an array of points, and returns a correpsonding array of RayStopInfo objects.

    Parameters

    • renderEngineIndex: any

      The index of blended render engine for this operaton

    • pointList: any

      Array of Vectors to project into the scene.

    • Optional callbackFunc: any

    Returns any

    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> )