Skip to main content

StreamingImageVolume

Streaming Image Volume Class that extends ImageVolume base class. It implements load method to load the imageIds and insert them into the volume.

Hierarchy

  • default
    • StreamingImageVolume

Index

Constructors

constructor

  • new StreamingImageVolume(imageVolumeProperties: ImageVolumeProps, streamingProperties: IStreamingVolumeProperties): default
  • Parameters

    • imageVolumeProperties: ImageVolumeProps
    • streamingProperties: IStreamingVolumeProperties

    Returns default

Properties

optionaladditionalDetails

additionalDetails?: Record<string, any>

dimensions

dimensions: Point3

direction

direction: Mat3

hasPixelSpacing

hasPixelSpacing: boolean

imageCacheOffsetMap

imageCacheOffsetMap: Map<any, any>

optionalimageData

imageData?: vtkImageData

imagesLoader

imagesLoader: IImagesLoader = ...

isPreScaled

isPreScaled: boolean

loadStatus

loadStatus: { callbacks: (...args: unknown[]) => void[]; cancelled: boolean; loaded: boolean; loading: boolean }

Type declaration

  • callbacks: (...args: unknown[]) => void[]
  • cancelled: boolean
  • loaded: boolean
  • loading: boolean

metadata

metadata: Metadata

numVoxels

numVoxels: number

origin

origin: Point3

optionalreferencedImageIds

referencedImageIds?: string[]

optionalreferencedVolumeId

referencedVolumeId?: string

optionalscaling

scaling?: { PT?: { SUVbsaFactor?: number; SUVlbmFactor?: number; suvbwToSuvbsa?: number; suvbwToSuvlbm?: number } }

Type declaration

  • optionalPT?: { SUVbsaFactor?: number; SUVlbmFactor?: number; suvbwToSuvbsa?: number; suvbwToSuvlbm?: number }
    • optionalSUVbsaFactor?: number
    • optionalSUVlbmFactor?: number
    • optionalsuvbwToSuvbsa?: number
    • optionalsuvbwToSuvlbm?: number

optionalsizeInBytes

sizeInBytes?: number

spacing

spacing: Point3

readonlyvolumeId

volumeId: string

vtkOpenGLTexture

vtkOpenGLTexture: any

Accessors

imageIds

  • get imageIds(): string[]
  • set imageIds(newImageIds: string[]): void
  • Returns string[]

  • Parameters

    • newImageIds: string[]

    Returns void

Methods

callLoadImage

  • callLoadImage(imageId: any, imageIdIndex: any, options: any): any
  • Parameters

    • imageId: any
    • imageIdIndex: any
    • options: any

    Returns any

publiccancelLoading

  • cancelLoading(): void
  • It cancels loading the images of the volume. It sets the loading status to false and filters any imageLoad request in the requestPoolManager that has the same volumeId


    Returns void

publicclearLoadCallbacks

  • clearLoadCallbacks(): void
  • Clear the load callbacks


    Returns void

convertToCornerstoneImage

  • convertToCornerstoneImage(imageId: string, imageIdIndex: number): IImageLoadObject
  • Parameters

    • imageId: string
    • imageIdIndex: number

    Returns IImageLoadObject

convertToImageSlicesAndCache

  • convertToImageSlicesAndCache(): string[]
  • Returns string[]

decache

  • decache(completelyRemove?: boolean): void | string[]
  • Parameters

    • optionalcompletelyRemove: boolean

    Returns void | string[]

destroy

  • destroy(): void
  • Returns void

publicerrorCallback

  • errorCallback(imageId: any, permanent: any, error: any): void
  • Parameters

    • imageId: any
    • permanent: any
    • error: any

    Returns void

getCornerstoneImage

  • getCornerstoneImage(imageId: string, imageIdIndex: number): IImage
  • Parameters

    • imageId: string
    • imageIdIndex: number

    Returns IImage

getCornerstoneImageLoadObject

  • getCornerstoneImageLoadObject(imageId: string, imageIdIndex: number): IImageLoadObject
  • Parameters

    • imageId: string
    • imageIdIndex: number

    Returns IImageLoadObject

getCornerstoneImages

  • getCornerstoneImages(): IImage[]
  • Returns IImage[]

getImageIdIndex

  • getImageIdIndex(imageId: string): number
  • Parameters

    • imageId: string

    Returns number

publicgetImageIdsToLoad

  • getImageIdsToLoad(): string[]
  • Returns string[]

publicgetImageLoadRequests

  • getImageLoadRequests(priority: number): default[]
  • It returns the imageLoad requests for the streaming image volume instance. It involves getting all the imageIds of the volume and creating a success callback which would update the texture (when the image has loaded) and the failure callback. Note that this method does not executes the requests but only returns the requests. It can be used for sorting requests outside of the volume loader itself e.g. loading a single slice of CT, followed by a single slice of PET (interleaved), before moving to the next slice.


    Parameters

    • priority: number

    Returns default[]

    Array of requests including imageId of the request, its imageIdIndex, options (targetBuffer and scaling parameters), and additionalDetails (volumeId)

getImageURIIndex

  • getImageURIIndex(imageURI: string): number
  • Parameters

    • imageURI: string

    Returns number

publicgetLoaderImageOptions

  • getLoaderImageOptions(imageId: string): { additionalDetails: { imageId: string; imageIdIndex: number; volumeId: string }; allowFloatRendering: any; loader: (imageId: string, options?: ImageLoaderOptions) => Promise<IImage>; preScale: { enabled: boolean; scalingParameters: ScalingParameters }; skipCreateImage: boolean; targetBuffer: { arrayBuffer: SharedArrayBuffer; columns: any; length: number; offset: number; rows: any; type: any }; transferPixelData: boolean; transferSyntaxUID: any }
  • Parameters

    • imageId: string

    Returns { additionalDetails: { imageId: string; imageIdIndex: number; volumeId: string }; allowFloatRendering: any; loader: (imageId: string, options?: ImageLoaderOptions) => Promise<IImage>; preScale: { enabled: boolean; scalingParameters: ScalingParameters }; skipCreateImage: boolean; targetBuffer: { arrayBuffer: SharedArrayBuffer; columns: any; length: number; offset: number; rows: any; type: any }; transferPixelData: boolean; transferSyntaxUID: any }

    • additionalDetails: { imageId: string; imageIdIndex: number; volumeId: string }
      • imageId: string
      • imageIdIndex: number
      • volumeId: string
    • allowFloatRendering: any
    • loader: (imageId: string, options?: ImageLoaderOptions) => Promise<IImage>
        • (imageId: string, options?: ImageLoaderOptions): Promise<IImage>
        • Parameters

          • imageId: string
          • optionaloptions: ImageLoaderOptions

          Returns Promise<IImage>

    • preScale: { enabled: boolean; scalingParameters: ScalingParameters }
      • enabled: boolean
      • scalingParameters: ScalingParameters
    • skipCreateImage: boolean
    • targetBuffer: { arrayBuffer: SharedArrayBuffer; columns: any; length: number; offset: number; rows: any; type: any }
      • arrayBuffer: SharedArrayBuffer
      • columns: any
      • length: number
      • offset: number
      • rows: any
      • type: any
    • transferPixelData: boolean
    • transferSyntaxUID: any

publicgetScalarData

  • getScalarData(): PixelDataTypedArray
  • Return the scalar data (buffer)


    Returns PixelDataTypedArray

    volume scalar data

getScalarDataArrays

  • getScalarDataArrays(): PixelDataTypedArray[]
  • Returns PixelDataTypedArray[]

getScalarDataLength

  • getScalarDataLength(): number
  • Returns number

isDynamicVolume

  • isDynamicVolume(): boolean
  • Returns boolean

publicload

  • load(callback: (...args: unknown[]) => void): void
  • It triggers a prefetch for images in the volume.


    Parameters

    • callback: (...args: unknown[]) => void

      A callback function to be called when the volume is fully loaded

    Returns void

publicloadImages

  • loadImages(imageIds: string[], listener: ImageLoadListener): Promise<boolean>
  • Retrieves images using the older getImageLoadRequests method to setup all the requests. Ensures compatibility with the custom image loaders.


    Parameters

    • imageIds: string[]
    • listener: ImageLoadListener

    Returns Promise<boolean>

modified

  • modified(): void
  • Returns void

removeFromCache

  • removeFromCache(): void
  • Returns void

publicsuccessCallback

  • successCallback(imageId: string, image: any): void
  • Parameters

    • imageId: string
    • image: any

    Returns void