Class: StreamingImageVolume
Streaming Image Volume Class that extends ImageVolume base class. It implements load method to load the imageIds and insert them into the volume.
Extends
default
Constructors
new StreamingImageVolume()
new StreamingImageVolume(
imageVolumeProperties
,streamingProperties
):StreamingImageVolume
Parameters
• imageVolumeProperties: ImageVolumeProps
• streamingProperties: IStreamingVolumeProperties
Returns
Overrides
BaseStreamingImageVolume.constructor
Defined in
packages/core/src/cache/classes/StreamingImageVolume.ts:14
Properties
additionalDetails?
optional
additionalDetails:Record
<string
,unknown
>
Property to store additional information
Inherited from
BaseStreamingImageVolume.additionalDetails
Defined in
packages/core/src/cache/classes/ImageVolume.ts:78
autoRenderOnLoad
protected
autoRenderOnLoad:boolean
=true
Inherited from
BaseStreamingImageVolume.autoRenderOnLoad
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:36
cachedFrames
protected
cachedFrames:any
[] =[]
Inherited from
BaseStreamingImageVolume.cachedFrames
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:37
cornerstoneImageMetaData
protected
cornerstoneImageMetaData:any
=null
Inherited from
BaseStreamingImageVolume.cornerstoneImageMetaData
Defined in
packages/core/src/cache/classes/ImageVolume.ts:34
dataType?
optional
dataType:PixelDataTypedArrayString
Inherited from
BaseStreamingImageVolume.dataType
Defined in
packages/core/src/cache/classes/ImageVolume.ts:85
dimensions
dimensions:
Point3
Dimensions of the volume
Inherited from
BaseStreamingImageVolume.dimensions
Defined in
packages/core/src/cache/classes/ImageVolume.ts:42
direction
direction:
Mat3
volume direction in world space
Inherited from
BaseStreamingImageVolume.direction
Defined in
packages/core/src/cache/classes/ImageVolume.ts:44
hasPixelSpacing
hasPixelSpacing:
boolean
whether the metadata for the pixel spacing is not undefined
Inherited from
BaseStreamingImageVolume.hasPixelSpacing
Defined in
packages/core/src/cache/classes/ImageVolume.ts:76
imageData?
optional
imageData:vtkImageData
volume image data
Inherited from
BaseStreamingImageVolume.imageData
Defined in
packages/core/src/cache/classes/ImageVolume.ts:66
imagesLoader
imagesLoader:
IImagesLoader
Inherited from
BaseStreamingImageVolume.imagesLoader
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:47
isPreScaled
isPreScaled:
boolean
=false
Inherited from
BaseStreamingImageVolume.isPreScaled
Defined in
packages/core/src/cache/classes/ImageVolume.ts:39
loadStatus
loadStatus:
object
load status object for the volume
callbacks
callbacks: (...
args
) =>void
[]
cancelled
cancelled:
boolean
loaded
loaded:
boolean
loading
loading:
boolean
Inherited from
BaseStreamingImageVolume.loadStatus
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:41
metadata
metadata:
Metadata
volume metadata
Inherited from
BaseStreamingImageVolume.metadata
Defined in
packages/core/src/cache/classes/ImageVolume.ts:46
numFrames
protected
numFrames:number
volume scalar data 3D or 4D
Inherited from
BaseStreamingImageVolume.numFrames
Defined in
packages/core/src/cache/classes/ImageVolume.ts:32
numTimePoints?
optional
numTimePoints:number
Inherited from
BaseStreamingImageVolume.numTimePoints
Defined in
packages/core/src/cache/classes/ImageVolume.ts:87
numVoxels
numVoxels:
number
volume number of voxels
Inherited from
BaseStreamingImageVolume.numVoxels
Defined in
packages/core/src/cache/classes/ImageVolume.ts:64
origin
origin:
Point3
volume origin, Note this is an opinionated origin for the volume
Inherited from
BaseStreamingImageVolume.origin
Defined in
packages/core/src/cache/classes/ImageVolume.ts:48
referencedImageIds?
optional
referencedImageIds:string
[]
optional reference image ids if the volume is derived from a set of images in the image cache
Inherited from
BaseStreamingImageVolume.referencedImageIds
Defined in
packages/core/src/cache/classes/ImageVolume.ts:74
referencedVolumeId?
optional
referencedVolumeId:string
optional reference volume id if the volume is derived from another volume
Inherited from
BaseStreamingImageVolume.referencedVolumeId
Defined in
packages/core/src/cache/classes/ImageVolume.ts:72
reRenderFraction
protected
reRenderFraction:number
=2
Inherited from
BaseStreamingImageVolume.reRenderFraction
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:39
reRenderTarget
protected
reRenderTarget:number
=0
Inherited from
BaseStreamingImageVolume.reRenderTarget
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:38
scaling?
optional
scaling:object
volume scaling parameters if it contains scaled data
PT?
optional
PT:object
PT.SUVbsaFactor?
optional
SUVbsaFactor:number
PT.suvbwToSuvbsa?
optional
suvbwToSuvbsa:number
PT.suvbwToSuvlbm?
optional
suvbwToSuvlbm:number
PT.SUVlbmFactor?
optional
SUVlbmFactor:number
Inherited from
BaseStreamingImageVolume.scaling
Defined in
packages/core/src/cache/classes/ImageVolume.ts:51
spacing
spacing:
Point3
volume spacing in 3d world space
Inherited from
BaseStreamingImageVolume.spacing
Defined in
packages/core/src/cache/classes/ImageVolume.ts:62
totalNumFrames
protected
totalNumFrames:number
Inherited from
BaseStreamingImageVolume.totalNumFrames
Defined in
packages/core/src/cache/classes/ImageVolume.ts:33
volumeId
readonly
volumeId:string
Read-only unique identifier for the volume
Inherited from
BaseStreamingImageVolume.volumeId
Defined in
packages/core/src/cache/classes/ImageVolume.ts:37
voxelManager?
optional
voxelManager:IVoxelManager
<number
> |IVoxelManager
<RGB
>
The new volume model which solely relies on the separate image data and do not cache the volume data at all
Inherited from
BaseStreamingImageVolume.voxelManager
Defined in
packages/core/src/cache/classes/ImageVolume.ts:84
vtkOpenGLTexture
vtkOpenGLTexture:
vtkStreamingOpenGLTexture
open gl texture for the volume
Inherited from
BaseStreamingImageVolume.vtkOpenGLTexture
Defined in
packages/core/src/cache/classes/ImageVolume.ts:68
Accessors
imageIds
get
imageIds():string
[]
return the image ids for the volume if it is made of separated images
set
imageIds(newImageIds
):void
updates the image ids
Parameters
• newImageIds: string
[]
Returns
string
[]
Inherited from
BaseStreamingImageVolume.imageIds
Defined in
packages/core/src/cache/classes/ImageVolume.ts:184
sizeInBytes
get
sizeInBytes():number
Returns
number
Inherited from
BaseStreamingImageVolume.sizeInBytes
Defined in
packages/core/src/cache/classes/ImageVolume.ts:179
Methods
callLoadImage()
callLoadImage(
imageId
,imageIdIndex
,options
):any
Parameters
• imageId: any
• imageIdIndex: any
• options: any
Returns
any
Inherited from
BaseStreamingImageVolume.callLoadImage
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:412
callLoadStatusCallback()
protected
callLoadStatusCallback(evt
):void
Parameters
• evt: any
Returns
void
Inherited from
BaseStreamingImageVolume.callLoadStatusCallback
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:110
cancelLoading()
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
Inherited from
BaseStreamingImageVolume.cancelLoading
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:77
checkTimePointCompletion()
protected
checkTimePointCompletion(imageIdIndex
):void
Parameters
• imageIdIndex: number
Returns
void
Inherited from
BaseStreamingImageVolume.checkTimePointCompletion
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:592
clearLoadCallbacks()
clearLoadCallbacks():
void
Clear the load callbacks
Returns
void
Inherited from
BaseStreamingImageVolume.clearLoadCallbacks
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:106
destroy()
destroy():
void
destroy the volume and make it unusable
Returns
void
Inherited from
BaseStreamingImageVolume.destroy
Defined in
packages/core/src/cache/classes/ImageVolume.ts:242
errorCallback()
errorCallback(
imageId
,permanent
,error
):void
Parameters
• imageId: any
• permanent: any
• error: any
Returns
void
Inherited from
BaseStreamingImageVolume.errorCallback
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:228
getCornerstoneImages()
getCornerstoneImages():
IImage
[]
Returns an array of all the volume's images as Cornerstone images. It iterates over all the imageIds and converts them to Cornerstone images.
Returns
IImage
[]
An array of Cornerstone images.
Inherited from
BaseStreamingImageVolume.getCornerstoneImages
Defined in
packages/core/src/cache/classes/ImageVolume.ts:308
getImageIdByIndex()
getImageIdByIndex(
imageIdIndex
):string
Parameters
• imageIdIndex: number
Returns
string
Inherited from
BaseStreamingImageVolume.getImageIdByIndex
Defined in
packages/core/src/cache/classes/ImageVolume.ts:222
getImageIdIndex()
getImageIdIndex(
imageId
):number
return the index of a given imageId
Parameters
• imageId: string
imageId
Returns
number
imageId index
Inherited from
BaseStreamingImageVolume.getImageIdIndex
Defined in
packages/core/src/cache/classes/ImageVolume.ts:218
getImageIdsRequests()
protected
getImageIdsRequests(imageIds
,priorityDefault
):object
[]
Parameters
• imageIds: string
[]
• priorityDefault: number
Returns
object
[]
Inherited from
BaseStreamingImageVolume.getImageIdsRequests
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:449
getImageIdsToLoad()
getImageIdsToLoad():
string
[]
Returns
string
[]
Overrides
BaseStreamingImageVolume.getImageIdsToLoad
Defined in
packages/core/src/cache/classes/StreamingImageVolume.ts:51
getImageLoadRequests()
getImageLoadRequests(
priority
):ImageLoadRequests
[]
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
Array of requests including imageId of the request, its imageIdIndex, options (targetBuffer and scaling parameters), and additionalDetails (volumeId)
Overrides
BaseStreamingImageVolume.getImageLoadRequests
Defined in
packages/core/src/cache/classes/StreamingImageVolume.ts:45
getImageURIIndex()
getImageURIIndex(
imageURI
):number
return the index of a given imageURI
Parameters
• imageURI: string
Returns
number
imageURI index
Inherited from
BaseStreamingImageVolume.getImageURIIndex
Defined in
packages/core/src/cache/classes/ImageVolume.ts:231
getLoaderImageOptions()
getLoaderImageOptions(
imageId
):object
Parameters
• imageId: string
Returns
object
additionalDetails
additionalDetails:
object
additionalDetails.imageId
imageId:
string
additionalDetails.imageIdIndex
imageIdIndex:
number
additionalDetails.volumeId
volumeId:
string
allowFloatRendering
allowFloatRendering:
boolean
preScale
preScale:
object
preScale.enabled
enabled:
boolean
preScale.scalingParameters
scalingParameters:
ScalingParameters
requestType
requestType:
RequestType
=requestTypeDefault
targetBuffer
targetBuffer:
object
targetBuffer.columns
columns:
any
targetBuffer.rows
rows:
any
targetBuffer.type
transferPixelData
transferPixelData:
boolean
=true
transferSyntaxUID
transferSyntaxUID:
any
Inherited from
BaseStreamingImageVolume.getLoaderImageOptions
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:319
getScalarData()
getScalarData():
PixelDataTypedArray
Return the scalar data (buffer)
Returns
volume scalar data
Defined in
packages/core/src/cache/classes/StreamingImageVolume.ts:29
getScalarDataLength()
getScalarDataLength():
number
Returns
number
Inherited from
BaseStreamingImageVolume.getScalarDataLength
Defined in
packages/core/src/cache/classes/ImageVolume.ts:276
imageIdIndexToFrameIndex()
protected
imageIdIndexToFrameIndex(imageIdIndex
):number
Converts imageIdIndex into frameIndex which will be the same for 3D volumes but different for 4D volumes. The indices are 0 based.
Parameters
• imageIdIndex: number
Returns
number
Inherited from
BaseStreamingImageVolume.imageIdIndexToFrameIndex
Defined in
packages/core/src/cache/classes/ImageVolume.ts:298
invalidate()
invalidate():
void
Returns
void
Inherited from
BaseStreamingImageVolume.invalidate
Defined in
packages/core/src/cache/classes/ImageVolume.ts:252
invalidateVolume()
protected
invalidateVolume(immediate
):void
Parameters
• immediate: boolean
Returns
void
Inherited from
BaseStreamingImageVolume.invalidateVolume
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:57
isDynamicVolume()
isDynamicVolume():
boolean
return true if it is a 4D volume or false if it is 3D volume
Returns
boolean
Inherited from
BaseStreamingImageVolume.isDynamicVolume
Defined in
packages/core/src/cache/classes/ImageVolume.ts:209
load()
load(
callback
):void
It triggers a prefetch for images in the volume.
Parameters
• callback
A callback function to be called when the volume is fully loaded
Returns
void
Inherited from
BaseStreamingImageVolume.load
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:272
loadImages()
loadImages():
Promise
<boolean
>
Retrieves images using the older getImageLoadRequests method to setup all the requests. Ensures compatibility with the custom image loaders.
Returns
Promise
<boolean
>
Inherited from
BaseStreamingImageVolume.loadImages
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:514
modified()
modified():
void
Updates the internals of the volume to reflect the changes in the underlying scalar data. This should be called when the scalar data is modified externally
Returns
void
Inherited from
BaseStreamingImageVolume.modified
Defined in
packages/core/src/cache/classes/ImageVolume.ts:265
removeFromCache()
removeFromCache():
void
Returns
void
Inherited from
BaseStreamingImageVolume.removeFromCache
Defined in
packages/core/src/cache/classes/ImageVolume.ts:272
successCallback()
successCallback(
imageId
,image
):void
Parameters
• imageId: string
• image: any
Returns
void
Inherited from
BaseStreamingImageVolume.successCallback
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:201
updateTextureAndTriggerEvents()
protected
updateTextureAndTriggerEvents(imageIdIndex
,imageId
,imageQualityStatus
):void
Parameters
• imageIdIndex: any
• imageId: any
• imageQualityStatus: ImageQualityStatus
= ImageQualityStatus.FULL_RESOLUTION
Returns
void
Inherited from
BaseStreamingImageVolume.updateTextureAndTriggerEvents
Defined in
packages/core/src/cache/classes/BaseStreamingImageVolume.ts:140