Options
All
  • Public
Menu

Class ServerContext

ServerContext is a static class will initialize the HDVR rendering server, load data, and access server resources.

Hierarchy

  • ServerContext

Index

Methods

Static Private create4DRenderEngine

  • create4DRenderEngine(voiIDs: Array<number>, octreeIDs: Array<number>, callbackFunc?: any): Promise<Object>
  • Parameters

    • voiIDs: Array<number>
    • octreeIDs: Array<number>
    • Optional callbackFunc: any

    Returns Promise<Object>

Static createOctree

  • createOctree(volID: any, smooth?: SmoothParameter, callbackFunc?: any): Promise<Object>
  • Create an octree for the dataset. The octree create function requires a volume ID and optionally smoothing parameter and callback

    Parameters

    • volID: any

      identifier for volume data to create octree

    • Optional smooth: SmoothParameter

      optionally specify the smoothing value of the type Fovia.SmoothParameter. The supported smoothing for octree values are Fovia.SmoothParameter.none, Fovia.SmoothParameter.trilinear and Fovia.SmoothParameter.tricubic

    • Optional callbackFunc: any

    Returns Promise<Object>

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

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

    callbackFunc(err: ReturnCode , octreeContext : OctreeContext )

Static createPolygonContext

  • createPolygonContext(callbackFunc?: any): Promise<Object>
  • Parameters

    • Optional callbackFunc: any

    Returns Promise<Object>

Static createPolygonContextFromFile

  • createPolygonContextFromFile(filename: String, smoothMode?: PolygonSmoothMode, centerAtOrigin?: boolean, fileType?: PolygonFileType, callbackFunc?: any): Promise<Object>
  • Parameters

    • filename: String
    • Default value smoothMode: PolygonSmoothMode = PolygonSmoothMode.none
    • Default value centerAtOrigin: boolean = false
    • Default value fileType: PolygonFileType = PolygonFileType.unspecified
    • Optional callbackFunc: any

    Returns Promise<Object>

Static createPolygonContextFromFileWithTexture

  • createPolygonContextFromFileWithTexture(filename: String, textureMapFilename: String, centerAtOrigin?: boolean, fileType?: PolygonFileType, callbackFunc?: any): Promise<Object>
  • Parameters

    • filename: String
    • textureMapFilename: String
    • Default value centerAtOrigin: boolean = false
    • Default value fileType: PolygonFileType = PolygonFileType.unspecified
    • Optional callbackFunc: any

    Returns Promise<Object>

Static createPolygonContextFromVolume

  • createPolygonContextFromVolume(volumeDataContext: VolumeDataContext, octreeContext: OctreeContext, computeGradients: boolean, isUpperLimit: boolean, threshold: number, tfMask: number, callbackFunc?: any): Promise<Object>
  • Parameters

    • volumeDataContext: VolumeDataContext
    • octreeContext: OctreeContext
    • computeGradients: boolean
    • isUpperLimit: boolean
    • threshold: number
    • tfMask: number
    • Optional callbackFunc: any

    Returns Promise<Object>

Static createRenderEngine

  • createRenderEngine(volID: number, octreeID: number, renderEngineType: RenderType, imagereadycallback?: any, callbackFunc?: any): Promise<Object>
  • Create a Rendering Engine using the specified volume ID

    Parameters

    • volID: number

      volmume ID used to create the render engine

    • octreeID: number

      octree ID used to create the render engine (may be null)

    • renderEngineType: RenderType

      renderType for this engine

    • Optional imagereadycallback: any

      optional callback invokved when images are generated

    • Optional callbackFunc: any

    Returns Promise<Object>

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

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

    callbackFunc(err: ReturnCode , renderEngineContext : RenderEngineContext )

Static createVolumeSegmentationContext

  • createVolumeSegmentationContext(octree: any, callbackFunc?: any): Promise<Object>
  • Parameters

    • octree: any
    • Optional callbackFunc: any

    Returns Promise<Object>

Static Private getCustomVolumeDataInfo

  • getCustomVolumeDataInfo(volID: number, callbackFunc?: any): Promise<Object>
  • Parameters

    • volID: number
    • Optional callbackFunc: any

    Returns Promise<Object>

Static getPresetList

  • getPresetList(directoryPath: string, callbackFunc?: any): Promise<Object>
  • Retrieve a list of presets from the remote server.

    Parameters

    • directoryPath: string
    • Optional callbackFunc: any

    Returns Promise<Object>

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

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

    callbackFunc(err: ReturnCode , listOfPresets: Array )

Static getWorkstationData

  • getWorkstationData(directoryPath: string, callbackFunc?: any): Promise<Object>
  • Parameters

    • directoryPath: string
    • Optional callbackFunc: any

    Returns Promise<Object>

Static loadCustomData

  • loadCustomData(id: number, parameter: string, buildOctree?: boolean, callbackFunc?: any): Promise<Object>
  • Load a dataset using the custom data loader. The custom data loader requires an identifier and parameter list.

    Parameters

    • id: number

      identifier indicates the method of the custom loader

    • parameter: string

      parameter list for the specific method

    • Default value buildOctree: boolean = true
    • Optional callbackFunc: any

    Returns Promise<Object>

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

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

    callbackFunc(err: ReturnCode , volumeDataInfo : VolumeDataContext )

Static loadDICOMDir

  • loadDICOMDir(directoryPath: string, buildOctree?: boolean, callbackFunc?: any): Promise<Object>
  • Load the specific DICOM dataset based on the supplied path. This directory should include a single dataset.

    Parameters

    • directoryPath: string
    • Default value buildOctree: boolean = true
    • Optional callbackFunc: any

    Returns Promise<Object>

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

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

    callbackFunc(err: ReturnCode , volumeDataInfo : VolumeDataContext )

Static Private loadDICOMFilesFromList

  • loadDICOMFilesFromList(): void
  • Returns void

Static Private loadRawDir

  • loadRawDir(): void
  • Returns void

Static Private loadRawFiles

  • loadRawFiles(): void
  • Returns void

Static setJPEGQuality

  • setJPEGQuality(interactive: number, final: number): void
  • Specifies the JPEG quality setting used by the server for creation of all images. This is a global setting for the HDVR rendering server.

    Parameters

    • interactive: number

      JPEG interative quality, 20 - lowest quality, 100 - best quality

    • final: number

      JPEG final quality, 20 - lowest quality, 100 - best quality

    Returns void

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

Static setRenderingQuality

  • Specifies the default rendering quality setting used by the server. This is a combination of the Quality setting the desired FPS This is a global setting for the HDVR rendering server.

    Parameters

    • quality: RenderQuality

      controls the rendering quality

    • fps: number

      specifies a hint to the engine for desired frames per second. Specify zero (0) to render at fastest possible framerate

    Returns void

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

Static setSessionTimeout

  • setSessionTimeout(timeout: number): void
  • Specifies the default session timeout used by the server for this application (or user session).

    Parameters

    • timeout: number

      default timeout in seconds, must be 0 (no timeout) or greater

    Returns void

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

Generated using TypeDoc