Types
Index
Namespaces
Classes
Interfaces
- CPUFallbackColormap
- CPUFallbackEnabledElement
- CPUFallbackLookupTable
- CPUFallbackTransform
- CustomEventType
- ICache
- ICachedGeometry
- ICachedImage
- ICachedVolume
- ICamera
- ICanvasActor
- IContour
- IContourSet
- IDynamicImageVolume
- IEnabledElement
- IGeometry
- IGeometryLoadObject
- IImage
- IImageCalibration
- IImageData
- IImageLoadObject
- IImageVolume
- IImagesLoader
- IRegisterImageLoader
- IRenderingEngine
- IRetrieveConfiguration
- IStackInput
- IStackViewport
- IStreamingImageVolume
- IStreamingVolumeProperties
- ISurface
- IVideoViewport
- IViewport
- IViewportId
- IVolumeInput
- IVolumeLoadObject
- IVolumeViewport
- ImagePixelModule
- ImagePlaneModule
- ImageVolumeProps
- RetrieveStage
- ViewportPreset
- VolumeProps
Type Aliases
- AABB2
- AABB3
- Actor
- ActorEntry
- ActorSliceRange
- AffineMatrix
- BoundsIJK
- BoundsLPS
- CPUFallbackColormapData
- CPUFallbackColormapsData
- CPUFallbackLUT
- CPUFallbackRenderingTools
- CPUFallbackViewport
- CPUFallbackViewportDisplayedArea
- CPUIImageData
- CPUImageData
- Color
- ColorLUT
- ColormapPublic
- ColormapRegistration
- ContourData
- ContourSetData
- Cornerstone3DConfig
- DisplayArea
- FlipDirection
- IVolume
- ImageActor
- ImageLoadListener
- ImageLoaderFn
- ImageSliceData
- InternalVideoCamera
- Mat3
- Metadata
- NearbyFrames
- OrientationVectors
- PTScaling
- PixelDataTypedArray
- PixelDataTypedArrayString
- Plane
- Point2
- Point3
- Point4
- PointsXYZ
- PublicContourSetData
- PublicSurfaceData
- PublicViewportInput
- RGB
- RangeRetrieveOptions
- ReferenceCompatibleOptions
- RetrieveOptions
- Scaling
- ScalingParameters
- StackInputCallback
- StackViewportProperties
- StreamingRetrieveOptions
- SurfaceData
- TransformMatrix2D
- VOI
- VOIRange
- VideoViewportInput
- VideoViewportProperties
- ViewPresentation
- ViewPresentationSelector
- ViewReference
- ViewReferenceSpecifier
- ViewportInputOptions
- ViewportProperties
- VolumeActor
- VolumeInputCallback
- VolumeLoaderFn
- VolumeViewportProperties
Namespaces
EventTypes
CameraModifiedEvent
CameraModifiedEventDetail
CAMERA_MODIFIED Event’s data
Type declaration
camera: ICamera
Current camera properties
element: HTMLDivElement
Viewport HTML element in the DOM
previousCamera: ICamera
Previous camera properties
renderingEngineId: string
Unique ID for the renderingEngine
optionalrotation?: number
Rotation Optional
viewportId: string
Viewport Unique ID in the renderingEngine
CameraResetEvent
CameraResetEventDetail
CAMERA_RESET Event’s data
Type declaration
camera: ICamera
Camera properties
element: HTMLDivElement
Viewport HTML element in the DOM
renderingEngineId: string
Unique ID for the renderingEngine
viewportId: string
Viewport Unique ID in the renderingEngine
ColormapModifiedEvent
COLORMAP_MODIFIED Event type
ColormapModifiedEventDetail
Type declaration
colormap: ColormapPublic
The new colormap
viewportId: string
Viewport Unique ID in the renderingEngine
optionalvolumeId?: string
Unique ID for the volume in the cache
DisplayAreaModifiedEvent
DISPLAY_AREA_MODIFIED Event type
DisplayAreaModifiedEventDetail
DISPLAY_AREA_MODIFIED Event’s data
Type declaration
displayArea: DisplayArea
new display area
optionalstoreAsInitialCamera?: boolean
Whether displayArea was stored as initial view
viewportId: string
Viewport Unique ID in the renderingEngine
optionalvolumeId?: string
Unique ID for the volume in the cache
ElementDisabledEvent
ELEMENT_DISABLED Event type
ElementDisabledEventDetail
ELEMENT_DISABLED Event’s data
Type declaration
element: HTMLDivElement
Viewport HTML element in the DOM
renderingEngineId: string
Unique ID for the renderingEngine
viewportId: string
Viewport Unique ID in the renderingEngine
ElementEnabledEvent
ELEMENT_ENABLED Event type
ElementEnabledEventDetail
ELEMENT_Enabled Event’s data
Type declaration
element: HTMLDivElement
Viewport HTML element in the DOM
renderingEngineId: string
Unique ID for the renderingEngine
viewportId: string
Viewport Unique ID in the renderingEngine
ImageCacheImageAddedEvent
IMAGE_CACHE_IMAGE_ADDED Event type
ImageCacheImageAddedEventDetail
ImageCacheImageRemovedEvent
IMAGE_CACHE_IMAGE_REMOVED Event type
ImageCacheImageRemovedEventDetail
IMAGE_CACHE_IMAGE_REMOVED Event’s data
Type declaration
imageId: string
the removed image id
ImageLoadStageEventDetail
Type declaration
numberOfFailures: number
numberOfImages: number
stageDurationInMS: number
stageId: string
startDurationInMS: number
ImageLoadedEvent
IMAGE_LOADED Event type
ImageLoadedEventDetail
ImageLoadedFailedEvent
IMAGE_LOADED_FAILED Event type
ImageLoadedFailedEventDetail
IMAGE_LOADED_FAILED Event’s data
Type declaration
error: unknown
imageId: string
the imageId for the image
ImageRenderedEvent
IMAGE_RENDERED Event type
ImageRenderedEventDetail
IMAGE_RENDERED Event’s data
Type declaration
element: HTMLDivElement
Viewport HTML element in the DOM
renderingEngineId: string
Unique ID for the renderingEngine
optionalsuppressEvents?: boolean
Whether to suppress the event
viewportId: string
Viewport Unique ID in the renderingEngine
viewportStatus: ViewportStatus
Include information on whether this is a real rendering or just background
ImageSpacingCalibratedEvent
IMAGE_SPACING_CALIBRATED
ImageSpacingCalibratedEventDetail
IMAGE_SPACING_CALIBRATED Event’s data
Type declaration
calibration: IImageCalibration
calibration contains the scaling information as well as other calibration info
element: HTMLDivElement
imageData: vtkImageData
imageId: string
renderingEngineId: string
viewportId: string
worldToIndex: mat4
ImageVolumeLoadingCompletedEvent
IMAGE_VOLUME_LOADING_COMPLETED Event type This event is fired when a volume is fully loaded, means all the frames are loaded and cached.
ImageVolumeLoadingCompletedEventDetail
IMAGE_VOLUME_LOADING_COMPLETED Event’s data
Type declaration
FrameOfReferenceUID: string
FrameOfReferenceUID where the volume belongs to
volumeId: string
the loaded volume
ImageVolumeModifiedEvent
IMAGE_VOLUME_MODIFIED Event type
ImageVolumeModifiedEventDetail
IMAGE_VOLUME_MODIFIED Event’s data
Type declaration
FrameOfReferenceUID: string
FrameOfReferenceUID where the volume belongs to
framesProcessed: number
framesProcessed
imageVolume: IImageVolume
the modified volume
numberOfFrames: number
number of frames
PreStackNewImageEvent
START_NEW_IMAGE
PreStackNewImageEventDetail
PRE_STACK_NEW_IMAGE Event’s data
Type declaration
imageId: string
the image imageId
imageIdIndex: number
the index of imageId in the stack
renderingEngineId: string
unique id for the renderingEngine
viewportId: string
unique id for the viewport
StackNewImageEvent
START_NEW_IMAGE
StackNewImageEventDetail
STACK_NEW_IMAGE Event’s data
Type declaration
image: IImage
the new image set on the stack viewport
imageId: string
the image imageId
imageIdIndex: number
the index of imageId in the stack
renderingEngineId: string
unique id for the renderingEngine
viewportId: string
unique id for the viewport
StackViewportNewStackEvent
STACK_VIEWPORT_NEW_STACK
StackViewportNewStackEventDetail
The STACK_VIEWPORT_NEW_STACK event’s data, when a new stack is set on a StackViewport
Type declaration
currentImageIdIndex: number
element: HTMLDivElement
imageIds: string[]
viewportId: string
StackViewportScrollEvent
StackViewportScrollEventDetail
Stack Scroll event detail
Type declaration
direction: number
direction of the scroll
imageId: string
the new imageId in the stack that we just scroll to
newImageIdIndex: number
the new imageId index in the stack that we just scroll to
VoiModifiedEvent
VOI_MODIFIED Event type
VoiModifiedEventDetail
VOI_MODIFIED Event’s data
Type declaration
optionalVOILUTFunction?: VOILUTFunctionType
VOILUTFunction
optionalcolormap?: ColormapPublic
color map
optionalinvert?: boolean
inverted
optionalinvertStateChanged?: boolean
Indicates if the ‘invert’ state has changed from the previous state
range: VOIRange
new VOI range
viewportId: string
Viewport Unique ID in the renderingEngine
optionalvolumeId?: string
Unique ID for the volume in the cache
VolumeCacheVolumeAddedEvent
VOLUME_CACHE_VOLUME_ADDED Event type
VolumeCacheVolumeAddedEventDetail
VolumeCacheVolumeRemovedEvent
VOLUME_CACHE_VOLUME_REMOVED Event type
VolumeCacheVolumeRemovedEventDetail
VOLUME_CACHE_VOLUME_REMOVED Event’s data
Type declaration
volumeId: string
the removed volume id
VolumeLoadedEvent
VOLUME_LOADED Event type
VolumeLoadedEventDetail
VolumeLoadedFailedEvent
VOLUME_LOADED_FAILED Event type
VolumeLoadedFailedEventDetail
VOLUME_LOADED_FAILED Event’s data
Type declaration
error: unknown
volumeId: string
the volumeId for the volume
VolumeNewImageEvent
VOLUME_NEW_IMAGE
VolumeNewImageEventDetail
VOLUME_NEW_IMAGE Event’s data
Type declaration
imageIndex: number
image index
numberOfSlices: number
number of slices
renderingEngineId: string
unique id for the renderingEngine
viewportId: string
unique id for the viewport
Classes
PointsManager
PointsManager handles Point type data contained in a TypedArray representation
where all the point data is consecutive from start to end. That is, the
organization is x0,y0,z0,x1,y1,z1,...,xn,yn,zn
. This optimizes the storage
costs for large arrays of data, while still providing access to the point
data as though it were a simple array of objects.
This representation is efficient for storing large numbers of points and for transferring them amongst systems and is planned to have more methods added for generic manipulation of data.
Type parameters
- T
constructor
Type parameters
- T
Parameters
configuration: PolyDataPointConfiguration = {}
Returns default<T>
_byteSize
_dimensions
_length
array
data
growSize
publickIndex
Allow storage for an index value to indicate where this array is contained in terms of the index location.
publicsources
Sources data for this array. Just used for external access, not updated here.
publicdimensionLength
Returns number
publicdimensions
Returns number
publiclength
Returns number
publicpoints
A points object containing Float32Array instances referring to the underlying data, contained in a FloatArray32[] instance. Note - changes to the data store will directly affect the points value returned here, even if stored separately.
Returns T[]
publicforEach
Parameters
func: (value: T, index: number) => void
Returns void
publicgetPoint
Returns a Float32Array view of the given point. Changes to the data in this point will affect the underlying data.
Parameters
index: number
positive index from start, or negative from end
Returns T
Float32Array view onto the point at the given index
publicgetPointArray
Returns a
number[]
version of the given point. Changes to the array will NOT affect the underlying data.Parameters
index: number
positive index from start, or negative from end
Returns T
A new number[] instance of the given point.
publicmap
Maps the array onto another type.
Type parameters
- R
Parameters
f: (value: any, index: number) => R
Returns R[]
publicpush
Push a new point onto this arrays object
Parameters
point: T
Returns void
publicreverse
Reverse the points in place.
Returns void
publicsubselect
Select the given number of points from the array, evenly spaced at the given offset (which must be between
(-count,count)
)Parameters
count: number = 10
offset: number = 0
Returns default<T>
publictoXYZ
The XYZ representation of a points array is an object with three separate arrays, one for each of x,y and z, containing the point data, eg
x: {x0, x1, x2, ...., xn }
Will create just x,y for Point2 arrays.Returns PointsXYZ
An XYZ array
publicstaticcreate2
publicstaticcreate3
publicstaticfromXYZ
Interfaces
CPUFallbackColormap
addColor
Type declaration
Parameters
rgba: Point4
Returns void
buildLookupTable
Type declaration
Parameters
Returns void
clearColors
Type declaration
Returns void
createLookupTable
Type declaration
Returns CPUFallbackLookupTable
getColor
Type declaration
Parameters
index: number
Returns Point4
getColorRepeating
Type declaration
Parameters
index: number
Returns Point4
getColorSchemeName
Type declaration
Returns string
getId
Type declaration
Get id of colormap
Returns string
getNumberOfColors
Type declaration
Returns number
insertColor
Type declaration
Parameters
index: number
rgba: Point4
Returns void
isValidIndex
Type declaration
Parameters
index: number
Returns boolean
removeColor
Type declaration
Parameters
index: number
Returns void
setColor
Type declaration
Parameters
index: number
rgba: Point4
Returns void
setColorSchemeName
Type declaration
Parameters
name: string
Returns void
setNumberOfColors
Type declaration
Parameters
numColors: number
Returns void
CPUFallbackEnabledElement
optionalcanvas
optionalcolormap
optionalimage
optionalinvalid
optionalmetadata
Type declaration
optionaldimensions?: Point3
Last index is always 1 for CPU
optionaldirection?: Mat3
optionalimagePixelModule?: ImagePixelModule
optionalimagePlaneModule?: ImagePlaneModule
optionalorigin?: Point3
optionalspacing?: Point3
Last spacing is always EPSILON for CPU
optionalneedsRedraw
optionaloptions
Type declaration
[key string]: unknown
optionalcolormap?: CPUFallbackColormap
optionalpan
optionalrenderingTools
optionalrotation
optionalscale
optionaltransform
optionalviewport
optionalzoom
CPUFallbackLookupTable
build
Type declaration
Parameters
force: boolean
Returns void
getColor
Type declaration
Parameters
scalar: number
Returns Point4
setAlphaRange
Type declaration
Parameters
start: number
end: number
Returns void
setHueRange
Type declaration
Parameters
start: number
end: number
Returns void
setNumberOfTableValues
Type declaration
Parameters
number: number
Returns void
setRamp
Type declaration
Parameters
ramp: string
Returns void
setRange
Type declaration
Parameters
start: number
end: number
Returns void
setSaturationRange
Type declaration
Parameters
start: number
end: number
Returns void
setTableRange
Type declaration
Parameters
start: number
end: number
Returns void
setValueRange
Type declaration
Parameters
start: number
end: number
Returns void
setTableValue
Parameters
index: number
rgba: Point4
Returns any
CPUFallbackTransform
clone
Type declaration
Returns CPUFallbackTransform
getMatrix
Type declaration
Returns TransformMatrix2D
invert
Type declaration
Returns void
multiply
Type declaration
Parameters
matrix: TransformMatrix2D
Returns void
reset
Type declaration
Returns void
rotate
Type declaration
Parameters
rad: number
Returns void
scale
Type declaration
Parameters
sx: number
sy: number
Returns void
transformPoint
translate
Type declaration
Parameters
x: number
y: number
Returns void
CustomEventType
Type parameters
- T = any
readonlydetail
Returns any custom data event was created with. Typically used for synthetic events.
initCustomEvent
Parameters
typeArg: string
canBubbleArg: boolean
cancelableArg: boolean
detailArg: T
Returns void
ICache
getCacheSize
Type declaration
Get the current cache size
Returns number
getImageLoadObject
Type declaration
Retrieves the imageLoad Object from the cache
Parameters
imageId: string
Returns void | IImageLoadObject
getMaxCacheSize
Type declaration
Get the maximum cache size
Returns number
getVolumeLoadObject
Type declaration
Retrieves the volumeLoad Object from the cache
Parameters
volumeId: string
Returns void | IVolumeLoadObject
purgeCache
Type declaration
Purge cache both image and volume
Returns void
putImageLoadObject
Type declaration
Stores the imageLoad Object inside the cache
Parameters
imageId: string
imageLoadObject: IImageLoadObject
optionalupdateCache: boolean
Returns Promise<any>
putVolumeLoadObject
Type declaration
Stores the volumeLoad Object inside the cache
Parameters
volumeId: string
volumeLoadObject: IVolumeLoadObject
Returns Promise<any>
setMaxCacheSize
Type declaration
Set the maximum cache size
Parameters
maxCacheSize: number
Returns void
ICachedGeometry
optionalgeometry
geometryId
geometryLoadObject
loaded
sizeInBytes
timeStamp
ICachedImage
optionalimage
imageId
imageLoadObject
loaded
optionalsharedCacheKey
sizeInBytes
timeStamp
ICachedVolume
loaded
sizeInBytes
timeStamp
optionalvolume
volumeId
volumeLoadObject
ICamera
Camera Interface. See https://kitware.github.io/vtk-examples/site/VTKBook/03Chapter3/#35-cameras if you want to know more about the camera.
optionalclippingRange
clipping range
optionalflipHorizontal
flip Horizontal
optionalflipVertical
flip Vertical
optionalfocalPoint
Camera Focal point
optionalparallelProjection
Camera Parallel Projection flag - whether camera is using parallel projection
optionalparallelScale
Camera parallel scale - used for parallel projection zoom, smaller values zoom in
optionalposition
Camera position
optionalscale
Scale factor for the camera, it is the ratio of how much an image pixel takes up one screen pixel
optionalviewAngle
Camera view angle - 90 degrees is orthographic
optionalviewPlaneNormal
Camera viewPlaneNormal - negative of the direction the camera is pointing or directionOfProjection
optionalviewUp
Camera viewUp - the direction of viewUP in camera
ICanvasActor
getClassName
Returns string
getMapper
Returns any
getProperty
Returns any
isA
Parameters
actorType: any
Returns boolean
render
Parameters
viewport: any
context: any
Returns void
IContour
color
readonlyid
points
readonlysizeInBytes
_getSizeInBytes
Returns number
getColor
Returns Point3
getFlatPointsArray
Returns number[]
getPoints
It returns the value of the points property of the data object
Returns Point3[]
The points property of the data object.
getType
Returns ContourType
IContourSet
This class represents a set of contours in 3d space. Usually contours are grouped together in a contour set to represent a meaningful shape.
contours
readonlyframeOfReferenceUID
readonlyid
readonlysizeInBytes
_createEachContour
Parameters
data: ContourData[]
Returns void
getCentroid
Returns Point3
getColor
Returns any
getContours
This function returns the contours of the image
Returns IContour[]
The contours of the image.
getFlatPointsArray
It returns an array of all the points in the glyph
Returns Point3[]
An array of points.
getNumberOfContours
This function returns the number of contours in the current shape.
Returns number
The number of contours in the glyph.
getNumberOfPointsArray
It returns an array of the number of points in each contour.
Returns number[]
An array of numbers.
getNumberOfPointsInAContour
“This function returns the number of points in a contour.”
Parameters
contourIndex: number
The index of the contour you want to get the number of points from.
Returns number
The number of points in the contour.
getPointsInContour
It returns the points in a contour.
Parameters
contourIndex: number
The index of the contour you want to get the points from.
Returns Point3[]
An array of Point3 objects.
getSegmentIndex
Returns number
getSizeInBytes
Returns number
getTotalNumberOfPoints
It loops through each contour in the
contours
array, and adds the number of points in each contour to thenumberOfPoints
variableReturns number
The number of points in the contours.
IDynamicImageVolume
Cornerstone ImageVolume interface. Todo: we should define new IVolume class with appropriate typings for the other types of volume that don’t have images (nrrd, nifti)
optionaladditionalDetails
Property to store additional information
optionalcancelLoading
Type declaration
Returns void
optionalconvertToCornerstoneImage
Type declaration
method to convert the volume data in the volume cache, to separate images in the image cache
Parameters
imageId: string
imageIdIndex: number
Returns IImageLoadObject
optionaldecache
Type declaration
decache
Parameters
optionalcompletelyRemove: boolean
Returns void
dimensions
volume dimensions
direction
volume direction
hasPixelSpacing
whether the metadata for the pixel spacing is not undefined
optionalimageData
volume image data as vtkImageData
imageIds
imageIds of the volume (if it is built of separate imageIds)
isPreScaled
Whether preScaling has been performed on the volume
optionalloadStatus
loading status object for the volume containing loaded/loading statuses
metadata
volume metadata
numVoxels
number of voxels in the volume
origin
volume origin - set to the imagePositionPatient of the last image in the volume
optionalreferencedImageIds
volume referencedImageIds (if it is derived from set of images in the image cache)
optionalreferencedVolumeId
volume referencedVolumeId (if it is derived from another volume)
optionalscaling
volume scaling metadata
Type declaration
optionalPT?: { SUVbsaFactor?: number; SUVlbmFactor?: number; suvbwToSuvbsa?: number; suvbwToSuvlbm?: number }
optionalSUVbsaFactor?: number
optionalSUVlbmFactor?: number
optionalsuvbwToSuvbsa?: number
optionalsuvbwToSuvlbm?: number
optionalsizeInBytes
volume size in bytes
spacing
volume spacing
readonlyvolumeId
unique identifier of the volume in the cache
optionalvoxelManager
A voxel manager to manage the scalar data
vtkOpenGLTexture
openGL texture for the volume
imageCacheOffsetMap
Returns Map<string, any>
numTimePoints
Returns the number of time points
Returns number
timePointIndex
Returns the active time point index
Returns number
Set the active time point index which also updates the active scalar data
Parameters
newTimePointIndex: number
Returns void
convertToImageSlicesAndCache
Returns string[]
destroy
destroy the volume and make it unusable
Returns void
getImageIdIndex
return the index of a given imageId
Parameters
imageId: string
Returns number
getImageURIIndex
return the index of a given imageURI
Parameters
imageURI: string
Returns number
getScalarData
return the volume scalar data
Returns PixelDataTypedArray
getScalarDataArrays
return scalar data arrays (one per timepoint)
Returns PixelDataTypedArray[]
isDynamicVolume
return true if it is a 4D volume or false if it is 3D volume
Returns boolean
modified
Mark the volume as having had the pixel data changed externally which in background will re-configure the volume to use the new pixel data.
Returns void
IEnabledElement
Cornerstone Enabled Element interface
FrameOfReferenceUID
FrameOfReference the enabledElement is rendering inside
renderingEngine
Cornerstone Rendering Engine instance
renderingEngineId
Unique ID of the renderingEngine
viewport
Cornerstone Viewport instance - can be Stack or Volume, or Video Viewport as of now. For the moment, need to cast to unknown first before casting to IVideoViewport (TODO) - this will be done as part of adding annotation tools for video
viewportId
Unique ID of the viewport in the renderingEngine
IGeometry
data
id
sizeInBytes
type
IGeometryLoadObject
optionalcancelFn
Type declaration
optional cancel function for loading
Returns void
optionaldecache
Type declaration
optional decache function
Returns void
promise
promise that resolves to an ImageVolume
IImage
Cornerstone Image interface, it is used for both CPU and GPU rendering
optionalbufferView
Type declaration
buffer: ArrayBuffer
offset: number
optionalcachedLut
CPU: image cached LUT
Type declaration
optionalinvert?: boolean
optionallutArray?: Uint8ClampedArray
optionalmodalityLUT?: unknown
optionalvoiLUT?: CPUFallbackLUT
optionalwindowCenter?: number | number[]
optionalwindowWidth?: number | number[]
optionalcalibration
color
is image a color image
optionalcolormap
CPU: custom color map for image
columnPixelSpacing
column pixel spacing
columns
image number of columns
optionaldecodeTimeInMS
getCanvas
Type declaration
Returns HTMLCanvasElement
getPixelData
Type declaration
function that returns the pixelData as an array
Returns PixelDataTypedArray
height
image height
optionalimageFrame
imageId
Image Id
optionalimageQualityStatus
intercept
intercept from metadata for scaling
invert
whether image pixels are inverted in color
optionalisPreScaled
Whether the image is Pre-scaled during loading
optionalloadTimeInMS
maxPixelValue
minPixelValue
minimum pixel value of the image
optionalmodalityLUT
CPU: custom modality LUT for image
numComps
number of components in the image
optionalphotometricInterpretation
image photometric interpretation
optionalpreScale
preScale object
Type declaration
enabled: boolean
optionalscaled?: boolean
boolean flag to indicate whether the image has been scaled
optionalscalingParameters?: { modality?: string; rescaleIntercept?: number; rescaleSlope?: number; suvbw?: number }
scaling parameters
optionalmodality?: string
modality of the image
optionalrescaleIntercept?: number
rescale intercept
optionalrescaleSlope?: number
rescale slop
optionalsuvbw?: number
PT suvbw
optionalreferencedImageId
referenced imageId if this image is derived from
optionalrender
Type declaration
CPU: custom render method for the image
Parameters
enabledElement: CPUFallbackEnabledElement
invalidated: boolean
Returns unknown
rgba
is image rgb and alpha
rowPixelSpacing
row pixel spacing
rows
image number of rows
optionalscaling
image scaling metadata - including PT suv values
Type declaration
optionalPT?: { SUVbsaFactor?: number; SUVlbmFactor?: number; suvbwToSuvbsa?: number; suvbwToSuvlbm?: number }
optionalSUVbsaFactor?: number
optionalSUVlbmFactor?: number
optionalsuvbwToSuvbsa?: number
optionalsuvbwToSuvlbm?: number
optionalsharedCacheKey
sizeInBytes
image size in number of bytes
optionalsliceThickness
slice thickness
slope
slope from metadata for scaling
optionalstats
CPU: image statistics for rendering
Type declaration
optionallastGetPixelDataTime?: number
optionallastLutGenerateTime?: number
optionallastPutImageDataTime?: number
optionallastRenderTime?: number
optionallastRenderedViewport?: unknown
optionallastStoredPixelDataToCanvasImageDataTime?: number
optionalvoiLUT
CPU: custom VOI LUT for image
voiLUTFunction
voiLUTFunction from metadata
optionalvoxelManager
width
image width
windowCenter
windowCenter from metadata
windowWidth
windowWidth from metadata
IImageCalibration
IImageCalibration is an object that stores information about the type of image calibration.
optionalaspect
The calibration aspect ratio for non-square calibrations. This is the aspect ratio similar to the scale above that applies when the viewport is displaying non-square image pixels as square screen pixels.
Defaults to 1 if not specified, and is also 1 if the Viewport has squared up the image pixels so that they are displayed as a square. Not well handled currently as this needs to be incorporated into tools when doing calculations.
optionalcolumnPixelSpacing
optionalrowPixelSpacing
The pixel spacing for the image, in mm between pixel centers These are not required, and are deprecated in favour of getting the original image spacing and then applying the transforms. The values here should be identical to original spacing.
optionalscale
The scaling of measurement values relative to the base pixel spacing (1 if not specified)
optionalsequenceOfUltrasoundRegions
The DICOM defined ultrasound regions. Used for non-distance spacing units.
optionaltooltip
A tooltip which can be used to explain the calibration information
type
The type of the pixel spacing, distinguishing between various types projection (CR/DX/MG) spacing and volumetric spacing (the type is an empty string as it doesn’t get a suffix, but this distinguishes it from other types)
IImageData
IImageData of an image, which stores actual scalarData and metaData about the image. IImageData is different from vtkImageData.
optionalcalibration
dimensions
image dimensions
direction
image direction
optionalhasPixelSpacing
whether the image has pixel spacing and it is not undefined
imageData
vtkImageData object
metadata
image metadata - currently only modality
Type declaration
Modality: string
origin
image origin
optionalpreScale
preScale object
Type declaration
optionalscaled?: boolean
boolean flag to indicate whether the image has been scaled
optionalscalingParameters?: { modality?: string; rescaleIntercept?: number; rescaleSlope?: number; suvbw?: number }
scaling parameters
optionalmodality?: string
modality of the image
optionalrescaleIntercept?: number
rescale intercept
optionalrescaleSlope?: number
rescale slop
optionalsuvbw?: number
PT suvbw
scalarData
image scalarData which stores the array of pixelData
optionalscaling
image scaling for scaling pixelArray
spacing
image spacing
IImageLoadObject
ImageLoadObject interface which any imageLoader should return
optionalcancelFn
Type declaration
optional cancel function for loading
Returns void
optionaldecache
Type declaration
optional decache function
Returns void
promise
promise that resolves to an image
IImageVolume
Cornerstone ImageVolume interface. Todo: we should define new IVolume class with appropriate typings for the other types of volume that don’t have images (nrrd, nifti)
optionaladditionalDetails
Property to store additional information
optionalcancelLoading
Type declaration
Returns void
optionalconvertToCornerstoneImage
Type declaration
method to convert the volume data in the volume cache, to separate images in the image cache
Parameters
imageId: string
imageIdIndex: number
Returns IImageLoadObject
optionaldecache
Type declaration
decache
Parameters
optionalcompletelyRemove: boolean
Returns void
dimensions
volume dimensions
direction
volume direction
hasPixelSpacing
whether the metadata for the pixel spacing is not undefined
optionalimageData
volume image data as vtkImageData
imageIds
imageIds of the volume (if it is built of separate imageIds)
isPreScaled
Whether preScaling has been performed on the volume
optionalloadStatus
loading status object for the volume containing loaded/loading statuses
metadata
volume metadata
numVoxels
number of voxels in the volume
origin
volume origin - set to the imagePositionPatient of the last image in the volume
optionalreferencedImageIds
volume referencedImageIds (if it is derived from set of images in the image cache)
optionalreferencedVolumeId
volume referencedVolumeId (if it is derived from another volume)
optionalscaling
volume scaling metadata
Type declaration
optionalPT?: { SUVbsaFactor?: number; SUVlbmFactor?: number; suvbwToSuvbsa?: number; suvbwToSuvlbm?: number }
optionalSUVbsaFactor?: number
optionalSUVlbmFactor?: number
optionalsuvbwToSuvbsa?: number
optionalsuvbwToSuvlbm?: number
optionalsizeInBytes
volume size in bytes
spacing
volume spacing
readonlyvolumeId
unique identifier of the volume in the cache
optionalvoxelManager
A voxel manager to manage the scalar data
vtkOpenGLTexture
openGL texture for the volume
imageCacheOffsetMap
Returns Map<string, any>
convertToImageSlicesAndCache
Returns string[]
destroy
destroy the volume and make it unusable
Returns void
getImageIdIndex
return the index of a given imageId
Parameters
imageId: string
Returns number
getImageURIIndex
return the index of a given imageURI
Parameters
imageURI: string
Returns number
getScalarData
return the volume scalar data
Returns PixelDataTypedArray
isDynamicVolume
return true if it is a 4D volume or false if it is 3D volume
Returns boolean
modified
Mark the volume as having had the pixel data changed externally which in background will re-configure the volume to use the new pixel data.
Returns void
IImagesLoader
Provides a method to load a stack of images.
loadImages
Type declaration
Parameters
imageIds: string[]
listener: ImageLoadListener
Returns Promise<unknown>
IRegisterImageLoader
Register image loader interface
registerImageLoader
Type declaration
Parameters
scheme: string
imageLoader: ImageLoaderFn
Returns void
IRenderingEngine
hasBeenDestroyed
id
offScreenCanvasContainer
offscreenMultiRenderWindow
_debugRender
Returns void
destroy
Returns void
disableElement
Parameters
viewportId: string
Returns void
enableElement
Parameters
viewportInputEntry: PublicViewportInput
Returns void
fillCanvasWithBackgroundColor
Parameters
canvas: HTMLCanvasElement
backgroundColor: [number, number, number]
Returns void
getStackViewports
Returns default[]
getVideoViewports
Returns default[]
getViewport
Parameters
id: string
Returns IViewport
getViewports
Returns IViewport[]
getVolumeViewports
Returns default[]
render
Returns void
renderFrameOfReference
Parameters
FrameOfReferenceUID: string
Returns void
renderViewport
Parameters
viewportId: string
Returns void
renderViewports
Parameters
viewportIds: string[]
Returns void
resize
Parameters
optionalimmediate: boolean
optionalkeepCamera: boolean
Returns void
setViewports
Parameters
viewports: PublicViewportInput[]
Returns void
IRetrieveConfiguration
Defines how the retrieve configuration is handled for single and multi frame volumes. Currently, the only configuration is a list of stages specify how sets of images ids get retrieved together or separately, and what type of retrieves and which queue is used for retrieving.
The intent is to add other information on how to retrieve here in the future. This could include the specific retrieve options or could control queue strategy, prefetch etc.
optionalcreate
Type declaration
Creates an image loader, defaulting to ProgressiveRetrieveImages
Parameters
IRetrieveConfiguration: any
Returns IImagesLoader
optionalretrieveOptions
optionalstages
IStackInput
StackInput that can be used to add an image actor to a viewport. It includes
mandatory imageId
but other options such as visibility
and callback
can also be provided
optionalactorUID
optionalcallback
Callback to be called when the image is added to the viewport
imageId
imageId of the image in the cache
optionalvisibility
Visibility of the image actor - by default it is true
IStackViewport
Interface for Stack Viewport
_actors
actors rendered in the viewport
addWidget
Type declaration
Parameters
id: string
widget: any
Returns void
canvas
canvas associated to the viewport
canvasToWorld
customRenderViewportToCanvas
Type declaration
Custom rendering pipeline for the rendering for the CPU fallback
Returns { canvas: HTMLCanvasElement; element: HTMLDivElement; renderingEngineId: string; viewportId: string }
canvas: HTMLCanvasElement
element: HTMLDivElement
renderingEngineId: string
viewportId: string
defaultOptions
viewport default options including the axis, and background color
element
public DOM element associated to the viewport
getCornerstoneImage
Type declaration
Returns the raw/loaded image being shown inside the stack viewport.
Returns IImage
getCurrentImageId
Type declaration
Returns the currently rendered imageId
Returns string
getCurrentImageIdIndex
Type declaration
Returns the index of the imageId being renderer
Returns number
getDefaultProperties
Type declaration
Retrieve the viewport default properties
Parameters
optionalimageId: string
Returns StackViewportProperties
getFrameOfReferenceUID
Type declaration
Returns the frame of reference UID, if the image doesn’t have imagePlaneModule metadata, it returns undefined, otherwise, frameOfReferenceUID is returned.
Returns string
getImageIds
Type declaration
Returns the list of image Ids for the current viewport
Returns string[]
getProperties
Type declaration
Retrieve the viewport properties
Returns StackViewportProperties
getRotation
Type declaration
get the rotation either from the camera provided or the viewport if not provided
Returns number
getWidget
Type declaration
Parameters
id: string
Returns any
getWidgets
Type declaration
Returns any
hasImageId
Type declaration
Returns true if the viewport contains the imageId
Parameters
imageId: string
Returns boolean
hasImageURI
Type declaration
Returns true if the viewport contains the imageURI
Parameters
imageURI: string
Returns boolean
id
unique identifier of the viewport
isDisabled
if the viewport has been disabled
modality
options
viewport options
removeWidgets
Type declaration
Returns void
renderingEngineId
renderingEngineId the viewport belongs to
resize
Type declaration
Resizes the viewport - only used in CPU fallback for StackViewport. The GPU resizing happens inside the RenderingEngine.
Returns void
sHeight
height of the viewport on the offscreen canvas (if rendering using GPU)
sWidth
width of the viewport on the offscreen canvas (if rendering using GPU)
scaling
Scaling parameters
stackActorReInitialized
suppressEvents
Suppress events
sx
sx of the viewport on the offscreen canvas (if rendering using GPU)
sy
sy of the viewport on the offscreen canvas (if rendering using GPU)
type
viewport type, can be ORTHOGRAPHIC or STACK for now
updateRenderingPipeline
Type declaration
Returns void
viewportStatus
The rendering state of this viewport
worldToCanvas
_getCorners
Parameters
bounds: number[]
Returns number[][]
addActor
add one actor
Parameters
actorEntry: ActorEntry
Returns void
addActors
add actors to the list of actors
Parameters
actors: ActorEntry[]
Returns void
addImages
Add Image Slices actors to the viewport
Parameters
stackInputs: IStackInput[]
immediateRender: boolean
suppressEvents: boolean
Returns any
calibrateSpacing
Calibrates the image with new metadata that has been added for imageId. To calibrate a viewport, you should add your calibration data manually to calibratedPixelSpacingMetadataProvider and call viewport.calibrateSpacing for it get applied.
Parameters
imageId: string
Returns void
clearDefaultProperties
Remove the global default properties of the viewport or remove default properties for an imageId if specified
Parameters
optionalimageId: string
Returns void
getActor
returns specific actor by its uid
Parameters
actorUID: string
Returns ActorEntry
getActorByIndex
returns specific actor by array index
Parameters
index: number
Returns ActorEntry
getActorUIDByIndex
returns specific actor uid by array index
Parameters
index: number
Returns string
getActorUIDs
get actor UIDs
Returns string[]
getActors
returns all the actor entires for a viewport which is an object containing actor and its uid
Returns ActorEntry[]
getCamera
If the user has selected CPU rendering, return the CPU camera, otherwise return the default camera
Returns ICamera
getCanvas
returns the canvas
Returns HTMLCanvasElement
getDefaultActor
get the first actor
Returns ActorEntry
getDisplayArea
returns the displayArea
Returns DisplayArea
getImageData
Returns the image and its properties that is being shown inside the stack viewport. It returns, the image dimensions, image direction, image scalar data, vtkImageData object, metadata, and scaling (e.g., PET suvbw)
Returns IImageData | CPUIImageData
getImageDataMetadata
Parameters
image: IImage
Returns any
getNumberOfSlices
Gets the number of slices in the current camera orientation
Returns number
getPan
Gets the canvas pan value
Returns Point2
getReferenceId
Gets a referenced image url of some sort - could be a real image id, or could be a URL with parameters. Regardless it refers to the currently displaying image as a string value.
Parameters
optionalviewRefSpecifier: ViewReferenceSpecifier
Returns string
getRenderer
If the renderer is CPU based, throw an error. Otherwise, returns the
vtkRenderer
responsible for rendering theViewport
.Returns any
getRenderingEngine
returns the renderingEngine instance the viewport belongs to
Returns any
getViewPresentation
Gets a view presentation information specifying HOW a viewport displays something, but not what is being displayed. See getViewReference to get information on WHAT is being displayed.
This is intended to have information on how an image is presented to the user, without specifying what image s displayed. All of this information is available externally, but this method combines the parts of this that are appropriate for remember or applying to other views, without necessarily needing to know what all the atributes are. That differs from methods like getCamera which fetch exact view details that are not likely to be identical between viewports as they change sizes or apply to different images.
Note that the results of this can be used on different viewports, for example, the pan values can be applied to a volume viewport showing a CT, and a stack viewport showing an ultrasound.
The selector allows choosing which view presentation attributes to return. Some default values are available from
Viewport.CameraViewPresentation
andViewport.TransferViewPresentation
Parameters
optionalviewPresSel: ViewPresentationSelector
select which attributes to display.
Returns ViewPresentation
getViewReference
Gets a view target specifying WHAT a view is displaying, allowing for checking if a given image is displayed or could be displayed in a given viewport. See getViewPresentation for HOW a view is displayed.
Parameters
optionalviewRefSpecifier: ViewReferenceSpecifier
choose an alternate view to be specified, typically a different slice index in the same set of images.
Returns ViewReference
getZoom
returns the parallel zoom relative to the default (eg returns 1 after reset)
Returns number
isReferenceViewable
Find out if this viewport does or could show this view reference.
Parameters
viewRef: ViewReference
optionaloptions: ReferenceCompatibleOptions
allows specifying whether the view COULD display this with some modification - either navigation or displaying as volume.
Returns boolean
true if the viewport could show this view reference
removeActors
remove array of uids
Parameters
actorUIDs: string[]
Returns void
removeAllActors
remove all actors from the viewport
Returns void
render
triggers render for all actors in the viewport
Returns void
reset
reset camera and options
Parameters
immediate: boolean
Returns void
resetCamera
Centers Pan and resets the zoom for stack viewport.
Parameters
optionalresetPan: boolean
optionalresetZoom: boolean
Returns boolean
resetProperties
Reset the viewport properties to the default metadata values
Returns void
resetToDefaultProperties
Reset the viewport properties to the his default values if possible
Returns void
setActors
set and overwrite actors in a viewport
Parameters
actors: ActorEntry[]
Returns void
setCamera
Set the camera based on the provided camera object.
Parameters
cameraInterface: ICamera
Returns void
setDefaultProperties
Update the default properties of the viewport and add properties by imageId if specified setting the VOI, inverting the colors and setting the interpolation type, rotation
Parameters
ViewportProperties: StackViewportProperties
optionalimageId: string
Returns void
setDisplayArea
set displayArea for the viewport
Parameters
displayArea: DisplayArea
optionalcallResetCamera: boolean
optionalsuppressEvents: boolean
Returns any
setImageIdIndex
Loads the image based on the provided imageIdIndex. It is an Async function which returns a promise that resolves to the imageId.
Parameters
imageIdIndex: number
Returns Promise<string>
setOptions
set options for the viewport
Parameters
options: ViewportInputOptions
immediate: boolean
Returns void
setPan
Sets the canvas pan value
Parameters
pan: Point2
optionalstoreAsInitialCamera: boolean
Returns any
setProperties
Sets the properties for the viewport on the default actor. Properties include setting the VOI, inverting the colors and setting the interpolation type, rotation
Parameters
__namedParameters: StackViewportProperties
optionalsuppressEvents: boolean
Returns void
setRendered
Sets the rendered state to rendered if the render actually showed image data
Returns void
setStack
Sets the imageIds to be visualized inside the stack viewport. It accepts list of imageIds, the index of the first imageId to be viewed. It is a asynchronous function that returns a promise resolving to imageId being displayed in the stack viewport.
Parameters
imageIds: string[]
optionalcurrentImageIdIndex: number
Returns Promise<string>
setViewPresentation
Sets the presentation parameters from the specified viewPres object. Sets display area, zoom, pan, rotation, voi LUT
Parameters
viewPres: ViewPresentation
Returns any
setViewReference
Navigates this viewport to the specified viewRef. Throws an exception if that isn’t possible on this viewport. Returns immediately if viewRef isn’t defined.
Parameters
viewRef: ViewReference
Returns any
setZoom
Sets the relative zoom - set to 1 to reset it
Parameters
zoom: number
optionalstoreAsInitialCamera: boolean
Returns any
unsetColormap
It sets the colormap to the default colormap.
Returns void
IStreamingImageVolume
Cornerstone StreamingImageVolume which extends ImageVolume
optionaladditionalDetails
Property to store additional information
cancelLoading
Type declaration
Returns void
dimensions
Dimensions of the volume
direction
volume direction in world space
hasPixelSpacing
whether the metadata for the pixel spacing is not undefined
imageCacheOffsetMap
optionalimageData
volume image data
isPreScaled
Whether preScaling has been performed on the volume
optionalloadStatus
load status object for the volume
metadata
volume metadata
numVoxels
volume number of voxels
origin
volume origin, Note this is an opinionated origin for the volume
optionalreferencedImageIds
optional reference image ids if the volume is derived from a set of images in the image cache
optionalreferencedVolumeId
optional reference volume id if the volume is derived from another volume
optionalscaling
volume scaling parameters if it contains scaled data
Type declaration
optionalPT?: { SUVbsaFactor?: number; SUVlbmFactor?: number; suvbwToSuvbsa?: number; suvbwToSuvlbm?: number }
optionalSUVbsaFactor?: number
optionalSUVlbmFactor?: number
optionalsuvbwToSuvbsa?: number
optionalsuvbwToSuvlbm?: number
optionalsizeInBytes
volume size in bytes
spacing
volume spacing in 3d world space
readonlyvolumeId
Read-only unique identifier for the volume
vtkOpenGLTexture
open gl texture for the volume
publicimageIds
return the image ids for the volume if it is made of separated images
Returns string[]
updates the image ids
Parameters
newImageIds: string[]
Returns void
clearLoadCallbacks
method to load all the loading requests
Returns void
convertToCornerstoneImage
method to convert the volume data in the volume cache, to separate images in the image cache
Parameters
imageId: string
imageIdIndex: number
Returns any
publicconvertToImageSlicesAndCache
Converts all the volume images (imageIds) to cornerstoneImages and caches them. It iterates over all the imageIds and convert them until there is no enough space left inside the imageCache. Finally it will decache the Volume.
Returns string[]
decache
method to decache the volume from cache
Parameters
completelyRemove: boolean
Returns void
destroy
destroy the volume and make it unusable
Returns void
publicgetCornerstoneImage
Converts the requested imageId inside the volume to a cornerstoneImage object. It uses the typedArray set method to copy the pixelData from the correct offset in the scalarData to a new array for the image
Parameters
imageId: string
the imageId of the image to be converted
imageIdIndex: number
the index of the imageId in the imageIds array
Returns IImage
image object containing the pixel data, metadata, and other information
publicgetCornerstoneImageLoadObject
Converts the requested imageId inside the volume to a cornerstoneImage object. It uses the typedArray set method to copy the pixelData from the correct offset in the scalarData to a new array for the image
Parameters
imageId: string
the imageId of the image to be converted
imageIdIndex: number
the index of the imageId in the imageIds array
Returns IImageLoadObject
imageLoadObject containing the promise that resolves to the cornerstone image
publicgetCornerstoneImages
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.
publicgetImageIdIndex
return the index of a given imageId
Parameters
imageId: string
imageId
Returns number
imageId index
publicgetImageURIIndex
return the index of a given imageURI
Parameters
imageURI: string
Returns number
imageURI index
publicgetScalarData
Return the scalar data for 3D volumes or the active scalar data (current time point) for 4D volumes
Returns PixelDataTypedArray
publicgetScalarDataArrays
Return all scalar data objects (buffers) which will be only one for 3D volumes and one per time point for 4D volumes images of each 3D volume is stored
Returns PixelDataTypedArray[]
scalar data array
publicgetScalarDataLength
Returns number
publicisDynamicVolume
return true if it is a 4D volume or false if it is 3D volume
Returns boolean
publicmodified
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
publicremoveFromCache
Returns void
IStreamingVolumeProperties
imageIds
imageIds of the volume
loadStatus
loading status object for the volume containing loaded/loading statuses
Type declaration
cachedFrames: ImageQualityStatus[]
callbacks: () => void[]
cancelled: boolean
loaded: boolean
loading: boolean
ISurface
readonlyframeOfReferenceUID
readonlyid
readonlysizeInBytes
getColor
Returns Point3
getPoints
Returns number[]
getPolys
Returns number[]
getSizeInBytes
Returns number
setColor
Parameters
color: Point3
Returns void
setPoints
Parameters
points: number[]
Returns void
setPolys
Parameters
polys: number[]
Returns void
IVideoViewport
Interface for Stack Viewport
_actors
actors rendered in the viewport
addWidget
Type declaration
Parameters
id: string
widget: any
Returns void
canvas
canvas associated to the viewport
canvasToWorld
customRenderViewportToCanvas
Type declaration
whether the viewport has custom rendering
Returns unknown
defaultOptions
viewport default options including the axis, and background color
element
public DOM element associated to the viewport
getFrameOfReferenceUID
Type declaration
frameOfReferenceUID the viewport’s default actor is rendering
Returns string
getProperties
Type declaration
Retrieve the viewport properties
Returns VideoViewportProperties
getRotation
Type declaration
get the rotation either from the camera provided or the viewport if not provided
Returns number
getWidget
Type declaration
Parameters
id: string
Returns any
getWidgets
Type declaration
Returns any
id
unique identifier of the viewport
isDisabled
if the viewport has been disabled
options
viewport options
pause
Type declaration
Returns void
play
Type declaration
Returns void
removeWidgets
Type declaration
Returns void
renderingEngineId
renderingEngineId the viewport belongs to
resize
Type declaration
Resizes the viewport - only used in CPU fallback for StackViewport. The GPU resizing happens inside the RenderingEngine.
Returns void
sHeight
height of the viewport on the offscreen canvas (if rendering using GPU)
sWidth
width of the viewport on the offscreen canvas (if rendering using GPU)
setVideo
Type declaration
Sets the video to play. The video should have at least some metadata in the metadata provider, including:
- study/series/sop common module for UIDs
cineModule
for information on number of frames and playback rateimageUrlModule
- to get the URL for the image under therendered
attribute
Without these, other tools requiring metadata wont work, although basic playback does work if the setVideoURL is used instead.
Parameters
imageIds: string
optionalimageIdIndex: number
Returns Promise<unknown>
setVideoURL
Type declaration
Displays a raw video, without any metadata associated with it. Plays back, but does not permit tools to apply to the viewport, which requires providing additional metadata for the study.
Parameters
url: string
to display
Returns void
suppressEvents
Suppress events
sx
sx of the viewport on the offscreen canvas (if rendering using GPU)
sy
sy of the viewport on the offscreen canvas (if rendering using GPU)
type
viewport type, can be ORTHOGRAPHIC or STACK for now
updateRenderingPipeline
Type declaration
Returns void
viewportStatus
The rendering state of this viewport
worldToCanvas
_getCorners
Parameters
bounds: number[]
Returns number[][]
addActor
add one actor
Parameters
actorEntry: ActorEntry
Returns void
addActors
add actors to the list of actors
Parameters
actors: ActorEntry[]
Returns void
getActor
returns specific actor by its uid
Parameters
actorUID: string
Returns ActorEntry
getActorByIndex
returns specific actor by array index
Parameters
index: number
Returns ActorEntry
getActorUIDByIndex
returns specific actor uid by array index
Parameters
index: number
Returns string
getActorUIDs
get actor UIDs
Returns string[]
getActors
returns all the actor entires for a viewport which is an object containing actor and its uid
Returns ActorEntry[]
getCamera
returns camera object
Returns ICamera
getCanvas
returns the canvas
Returns HTMLCanvasElement
getCurrentImageId
Gets the current image id, including frame selction or frameless.
Returns string
getCurrentImageIdIndex
Gets the current slice in the current camera orientation
Returns number
getDefaultActor
get the first actor
Returns ActorEntry
getDisplayArea
returns the displayArea
Returns DisplayArea
getFrameNumber
Gets the current frame, 1 based
Returns number
getFrameRange
Returns [number, number]
getNumberOfSlices
Gets the number of slices in the current camera orientation
Returns number
getPan
Gets the canvas pan value
Returns Point2
getReferenceId
Gets a referenced image url of some sort - could be a real image id, or could be a URL with parameters. Regardless it refers to the currently displaying image as a string value.
Parameters
optionalviewRefSpecifier: ViewReferenceSpecifier
Returns string
getRenderer
returns the vtkRenderer (for GPU rendering) of the viewport
Returns void
getRenderingEngine
returns the renderingEngine instance the viewport belongs to
Returns any
getViewPresentation
Gets a view presentation information specifying HOW a viewport displays something, but not what is being displayed. See getViewReference to get information on WHAT is being displayed.
This is intended to have information on how an image is presented to the user, without specifying what image s displayed. All of this information is available externally, but this method combines the parts of this that are appropriate for remember or applying to other views, without necessarily needing to know what all the atributes are. That differs from methods like getCamera which fetch exact view details that are not likely to be identical between viewports as they change sizes or apply to different images.
Note that the results of this can be used on different viewports, for example, the pan values can be applied to a volume viewport showing a CT, and a stack viewport showing an ultrasound.
The selector allows choosing which view presentation attributes to return. Some default values are available from
Viewport.CameraViewPresentation
andViewport.TransferViewPresentation
Parameters
optionalviewPresSel: ViewPresentationSelector
select which attributes to display.
Returns ViewPresentation
getViewReference
Gets a view target specifying WHAT a view is displaying, allowing for checking if a given image is displayed or could be displayed in a given viewport. See getViewPresentation for HOW a view is displayed.
Parameters
optionalviewRefSpecifier: ViewReferenceSpecifier
choose an alternate view to be specified, typically a different slice index in the same set of images.
Returns ViewReference
getZoom
returns the parallel zoom relative to the default (eg returns 1 after reset)
Returns number
isReferenceViewable
Find out if this viewport does or could show this view reference.
Parameters
viewRef: ViewReference
optionaloptions: ReferenceCompatibleOptions
allows specifying whether the view COULD display this with some modification - either navigation or displaying as volume.
Returns boolean
true if the viewport could show this view reference
removeActors
remove array of uids
Parameters
actorUIDs: string[]
Returns void
removeAllActors
remove all actors from the viewport
Returns void
render
triggers render for all actors in the viewport
Returns void
reset
reset camera and options
Parameters
immediate: boolean
Returns void
resetCamera
Centers Pan and resets the zoom for stack viewport.
Parameters
optionalresetPan: boolean
optionalresetZoom: boolean
Returns boolean
resetProperties
Reset the viewport properties to the default values
Returns void
setActors
set and overwrite actors in a viewport
Parameters
actors: ActorEntry[]
Returns void
setCamera
sets the camera
Parameters
cameraInterface: ICamera
optionalstoreAsInitialCamera: boolean
Returns void
setDisplayArea
set displayArea for the viewport
Parameters
displayArea: DisplayArea
optionalcallResetCamera: boolean
optionalsuppressEvents: boolean
Returns any
setFrameNumber
Sets the current frame
Parameters
frameNo: number
Returns any
setFrameRange
Sets the range of frames for displaying. This is the range of frames that are shown/looped over when the video is playing. Note that ability to playback a frame range depends on the server implementing byte range requests, OR the video being easily cached in memory.
Parameters
optionalrange: [number, number]
Returns any
setOptions
set options for the viewport
Parameters
options: ViewportInputOptions
immediate: boolean
Returns void
setPan
Sets the canvas pan value
Parameters
pan: Point2
optionalstoreAsInitialCamera: boolean
Returns any
setProperties
Sets the properties for the viewport on the default actor.
Parameters
props: VideoViewportProperties
optionalsuppressEvents: boolean
Returns void
setRendered
Sets the rendered state to rendered if the render actually showed image data
Returns void
setTime
Sets the current video time, in seconds
Parameters
time: number
Returns any
setViewPresentation
Sets the presentation parameters from the specified viewPres object. Sets display area, zoom, pan, rotation, voi LUT
Parameters
viewPres: ViewPresentation
Returns any
setViewReference
Navigates this viewport to the specified viewRef. Throws an exception if that isn’t possible on this viewport. Returns immediately if viewRef isn’t defined.
Parameters
viewRef: ViewReference
Returns any
setZoom
Sets the relative zoom - set to 1 to reset it
Parameters
zoom: number
optionalstoreAsInitialCamera: boolean
Returns any
IViewport
Viewport interface for cornerstone viewports
_actors
actors rendered in the viewport
addWidget
Type declaration
Parameters
id: string
widget: any
Returns void
canvas
canvas associated to the viewport
canvasToWorld
customRenderViewportToCanvas
Type declaration
whether the viewport has custom rendering
Returns unknown
defaultOptions
viewport default options including the axis, and background color
element
public DOM element associated to the viewport
getFrameOfReferenceUID
Type declaration
frameOfReferenceUID the viewport’s default actor is rendering
Returns string
getRotation
Type declaration
get the rotation either from the camera provided or the viewport if not provided
Returns number
getWidget
Type declaration
Parameters
id: string
Returns any
getWidgets
Type declaration
Returns any
id
unique identifier of the viewport
isDisabled
if the viewport has been disabled
options
viewport options
removeWidgets
Type declaration
Returns void
renderingEngineId
renderingEngineId the viewport belongs to
sHeight
height of the viewport on the offscreen canvas (if rendering using GPU)
sWidth
width of the viewport on the offscreen canvas (if rendering using GPU)
suppressEvents
Suppress events
sx
sx of the viewport on the offscreen canvas (if rendering using GPU)
sy
sy of the viewport on the offscreen canvas (if rendering using GPU)
type
viewport type, can be ORTHOGRAPHIC or STACK for now
updateRenderingPipeline
Type declaration
Returns void
viewportStatus
The rendering state of this viewport
worldToCanvas
_getCorners
Parameters
bounds: number[]
Returns number[][]
addActor
add one actor
Parameters
actorEntry: ActorEntry
Returns void
addActors
add actors to the list of actors
Parameters
actors: ActorEntry[]
Returns void
getActor
returns specific actor by its uid
Parameters
actorUID: string
Returns ActorEntry
getActorByIndex
returns specific actor by array index
Parameters
index: number
Returns ActorEntry
getActorUIDByIndex
returns specific actor uid by array index
Parameters
index: number
Returns string
getActorUIDs
get actor UIDs
Returns string[]
getActors
returns all the actor entires for a viewport which is an object containing actor and its uid
Returns ActorEntry[]
getCamera
returns camera object
Returns ICamera
getCanvas
returns the canvas
Returns HTMLCanvasElement
getCurrentImageIdIndex
Gets the current slice in the current camera orientation
Returns number
getDefaultActor
get the first actor
Returns ActorEntry
getDisplayArea
returns the displayArea
Returns DisplayArea
getNumberOfSlices
Gets the number of slices in the current camera orientation
Returns number
getPan
Gets the canvas pan value
Returns Point2
getReferenceId
Gets a referenced image url of some sort - could be a real image id, or could be a URL with parameters. Regardless it refers to the currently displaying image as a string value.
Parameters
optionalviewRefSpecifier: ViewReferenceSpecifier
Returns string
getRenderer
returns the vtkRenderer (for GPU rendering) of the viewport
Returns void
getRenderingEngine
returns the renderingEngine instance the viewport belongs to
Returns any
getViewPresentation
Gets a view presentation information specifying HOW a viewport displays something, but not what is being displayed. See getViewReference to get information on WHAT is being displayed.
This is intended to have information on how an image is presented to the user, without specifying what image s displayed. All of this information is available externally, but this method combines the parts of this that are appropriate for remember or applying to other views, without necessarily needing to know what all the atributes are. That differs from methods like getCamera which fetch exact view details that are not likely to be identical between viewports as they change sizes or apply to different images.
Note that the results of this can be used on different viewports, for example, the pan values can be applied to a volume viewport showing a CT, and a stack viewport showing an ultrasound.
The selector allows choosing which view presentation attributes to return. Some default values are available from
Viewport.CameraViewPresentation
andViewport.TransferViewPresentation
Parameters
optionalviewPresSel: ViewPresentationSelector
select which attributes to display.
Returns ViewPresentation
getViewReference
Gets a view target specifying WHAT a view is displaying, allowing for checking if a given image is displayed or could be displayed in a given viewport. See getViewPresentation for HOW a view is displayed.
Parameters
optionalviewRefSpecifier: ViewReferenceSpecifier
choose an alternate view to be specified, typically a different slice index in the same set of images.
Returns ViewReference
getZoom
returns the parallel zoom relative to the default (eg returns 1 after reset)
Returns number
isReferenceViewable
Find out if this viewport does or could show this view reference.
Parameters
viewRef: ViewReference
optionaloptions: ReferenceCompatibleOptions
allows specifying whether the view COULD display this with some modification - either navigation or displaying as volume.
Returns boolean
true if the viewport could show this view reference
removeActors
remove array of uids
Parameters
actorUIDs: string[]
Returns void
removeAllActors
remove all actors from the viewport
Returns void
render
triggers render for all actors in the viewport
Returns void
reset
reset camera and options
Parameters
immediate: boolean
Returns void
resetCamera
Resets the camera
Parameters
optionalresetPan: boolean
optionalresetZoom: boolean
optionalresetToCenter: boolean
optionalstoreAsInitialCamera: boolean
Returns boolean
setActors
set and overwrite actors in a viewport
Parameters
actors: ActorEntry[]
Returns void
setCamera
sets the camera
Parameters
cameraInterface: ICamera
optionalstoreAsInitialCamera: boolean
Returns void
setDisplayArea
set displayArea for the viewport
Parameters
displayArea: DisplayArea
optionalcallResetCamera: boolean
optionalsuppressEvents: boolean
Returns any
setOptions
set options for the viewport
Parameters
options: ViewportInputOptions
immediate: boolean
Returns void
setPan
Sets the canvas pan value
Parameters
pan: Point2
optionalstoreAsInitialCamera: boolean
Returns any
setRendered
Sets the rendered state to rendered if the render actually showed image data
Returns void
setViewPresentation
Sets the presentation parameters from the specified viewPres object. Sets display area, zoom, pan, rotation, voi LUT
Parameters
viewPres: ViewPresentation
Returns any
setViewReference
Navigates this viewport to the specified viewRef. Throws an exception if that isn’t possible on this viewport. Returns immediately if viewRef isn’t defined.
Parameters
viewRef: ViewReference
Returns any
setZoom
Sets the relative zoom - set to 1 to reset it
Parameters
zoom: number
optionalstoreAsInitialCamera: boolean
Returns any
IViewportId
Interface to uniquely define a viewport in cornerstone. Note: viewportIds can be shared between different rendering engines, but having a renderingEngineId and a viewportId is required to uniquely define a viewport.
renderingEngineId
viewportId
IVolumeInput
VolumeInput that can be used to add a volume to a viewport. It includes
mandatory volumeId
but other options such as visibility
, blendMode
,
slabThickness
and callback
can also be provided
optionalactorUID
optionalblendMode
Blend mode of the volume - by default it is additive
optionalcallback
Callback to be called when the volume is added to the viewport
optionalslabThickness
Slab thickness of the volume - by default it is 0.05
optionalvisibility
Visibility of the volume - by default it is true
volumeId
Volume ID of the volume in the cache
IVolumeLoadObject
VolumeLoadObject interface which any volumeLoader should return
optionalcancelFn
Type declaration
optional cancel function for loading
Returns void
optionaldecache
Type declaration
optional decache function
Returns void
promise
promise that resolves to an ImageVolume
IVolumeViewport
Interface for the Volume Viewport
_actors
actors rendered in the viewport
addWidget
Type declaration
Parameters
id: string
widget: any
Returns void
canvas
canvas associated to the viewport
canvasToWorld
customRenderViewportToCanvas
Type declaration
whether the viewport has custom rendering
Returns unknown
defaultOptions
viewport default options including the axis, and background color
element
public DOM element associated to the viewport
getCurrentImageId
Type declaration
Uses viewport camera and volume actor to decide if the viewport is looking at the volume in the direction of acquisition (imageIds). If so, it uses the origin and focalPoint to find which imageId is currently being viewed.
Returns string
getCurrentImageIdIndex
Type declaration
Uses viewport camera and volume actor to decide if the viewport is looking at the volume in the direction of acquisition (imageIds). If so, it uses the origin and focalPoint to calculate the slice index.
Returns number
getDefaultProperties
Type declaration
Retrieve the viewport default properties If volumeId is given, we retrieve the default properties of a volumeId if it exists If not given,we return the global properties of the viewport default viewport properties including voi, invert, interpolation type, colormap
Parameters
optionalvolumeId: string
Returns VolumeViewportProperties
getFrameOfReferenceUID
Type declaration
Returns string
getImageIds
Type declaration
Returns the list of image Ids for the current viewport
Parameters
optionalvolumeId: string
Returns string[]
getProperties
Type declaration
Retrieve the viewport properties
Parameters
optionalvolumeId: string
Returns VolumeViewportProperties
getRotation
Type declaration
get the rotation either from the camera provided or the viewport if not provided
Returns number
getWidget
Type declaration
Parameters
id: string
Returns any
getWidgets
Type declaration
Returns any
hasImageURI
Type declaration
if the volume viewport has imageURI (no loader schema) in one of its volume actors
Parameters
imageURI: string
Returns boolean
hasVolumeId
Type declaration
Checks if the viewport has a volume actor with the given volumeId
Parameters
volumeId: string
Returns boolean
id
unique identifier of the viewport
isDisabled
if the viewport has been disabled
options
viewport options
removeWidgets
Type declaration
Returns void
renderingEngineId
renderingEngineId the viewport belongs to
sHeight
height of the viewport on the offscreen canvas (if rendering using GPU)
sWidth
width of the viewport on the offscreen canvas (if rendering using GPU)
suppressEvents
Suppress events
sx
sx of the viewport on the offscreen canvas (if rendering using GPU)
sy
sy of the viewport on the offscreen canvas (if rendering using GPU)
type
viewport type, can be ORTHOGRAPHIC or STACK for now
updateRenderingPipeline
Type declaration
Returns void
useCPURendering
viewportStatus
The rendering state of this viewport
worldToCanvas
_getCorners
Parameters
bounds: number[]
Returns number[][]
addActor
add one actor
Parameters
actorEntry: ActorEntry
Returns void
addActors
add actors to the list of actors
Parameters
actors: ActorEntry[]
Returns void
addVolumes
Creates and adds volume actors for all volumes defined in the
volumeInputArray
. For each entry, if acallback
is supplied, it will be called with the new volume actor as input.Parameters
volumeInputArray: IVolumeInput[]
optionalimmediate: boolean
optionalsuppressEvents: boolean
Returns Promise<void>
clearDefaultProperties
Remove the global default properties of the viewport or remove default properties for a volumeId if specified If volumeId is given, we remove the default properties only for this volumeId, if not the global default properties will be removed
Parameters
optionalvolumeId: string
Returns void
flip
Flip the viewport along the desired axis
Parameters
flipDirection: FlipDirection
Returns void
getActor
returns specific actor by its uid
Parameters
actorUID: string
Returns ActorEntry
getActorByIndex
returns specific actor by array index
Parameters
index: number
Returns ActorEntry
getActorUIDByIndex
returns specific actor uid by array index
Parameters
index: number
Returns string
getActorUIDs
get actor UIDs
Returns string[]
getActors
returns all the actor entires for a viewport which is an object containing actor and its uid
Returns ActorEntry[]
getBounds
getBounds gets the visible bounds of the viewport
Returns any
getCamera
returns camera object
Returns ICamera
getCanvas
returns the canvas
Returns HTMLCanvasElement
getDefaultActor
get the first actor
Returns ActorEntry
getDisplayArea
returns the displayArea
Returns DisplayArea
getImageData
Returns the image and its properties that is being shown inside the stack viewport. It returns, the image dimensions, image direction, image scalar data, vtkImageData object, metadata, and scaling (e.g., PET suvbw) Note: since the volume viewport supports fusion, to get the image data for a specific volume, use the optional volumeId argument.
Parameters
optionalvolumeId: string
Returns IImageData
getIntensityFromWorld
Given a point in world coordinates, return the intensity at that point
Parameters
point: Point3
Returns number
getNumberOfSlices
Gets the number of slices in the current camera orientation
Returns number
getPan
Gets the canvas pan value
Returns Point2
getReferenceId
Gets a referenced image url of some sort - could be a real image id, or could be a URL with parameters. Regardless it refers to the currently displaying image as a string value.
Parameters
optionalviewRefSpecifier: ViewReferenceSpecifier
Returns string
getRenderer
returns the vtkRenderer (for GPU rendering) of the viewport
Returns void
getRenderingEngine
returns the renderingEngine instance the viewport belongs to
Returns any
getSlabThickness
Gets the slab thickness option in the
Viewport
‘soptions
.Returns number
getViewPresentation
Gets a view presentation information specifying HOW a viewport displays something, but not what is being displayed. See getViewReference to get information on WHAT is being displayed.
This is intended to have information on how an image is presented to the user, without specifying what image s displayed. All of this information is available externally, but this method combines the parts of this that are appropriate for remember or applying to other views, without necessarily needing to know what all the atributes are. That differs from methods like getCamera which fetch exact view details that are not likely to be identical between viewports as they change sizes or apply to different images.
Note that the results of this can be used on different viewports, for example, the pan values can be applied to a volume viewport showing a CT, and a stack viewport showing an ultrasound.
The selector allows choosing which view presentation attributes to return. Some default values are available from
Viewport.CameraViewPresentation
andViewport.TransferViewPresentation
Parameters
optionalviewPresSel: ViewPresentationSelector
select which attributes to display.
Returns ViewPresentation
getViewReference
Gets a view target specifying WHAT a view is displaying, allowing for checking if a given image is displayed or could be displayed in a given viewport. See getViewPresentation for HOW a view is displayed.
Parameters
optionalviewRefSpecifier: ViewReferenceSpecifier
choose an alternate view to be specified, typically a different slice index in the same set of images.
Returns ViewReference
getZoom
returns the parallel zoom relative to the default (eg returns 1 after reset)
Returns number
isReferenceViewable
Find out if this viewport does or could show this view reference.
Parameters
viewRef: ViewReference
optionaloptions: ReferenceCompatibleOptions
allows specifying whether the view COULD display this with some modification - either navigation or displaying as volume.
Returns boolean
true if the viewport could show this view reference
removeActors
remove array of uids
Parameters
actorUIDs: string[]
Returns void
removeAllActors
remove all actors from the viewport
Returns void
removeVolumeActors
It removes the volume actor from the Viewport. If the volume actor is not in the viewport, it does nothing.
Parameters
actorUIDs: string[]
optionalimmediate: boolean
Returns void
render
triggers render for all actors in the viewport
Returns void
reset
reset camera and options
Parameters
immediate: boolean
Returns void
resetCamera
Reset the camera for the volume viewport
Parameters
optionalresetPan: boolean
optionalresetZoom: boolean
optionalresetToCenter: boolean
optionalresetRotation: boolean
optionalsupressEvents: boolean
Returns boolean
resetProperties
Reset the viewport properties to the default values
Parameters
volumeId: string
Returns void
resetSlabThickness
Reset the slab thickness for actors of the viewport.
Returns void
setActors
set and overwrite actors in a viewport
Parameters
actors: ActorEntry[]
Returns void
setBlendMode
Sets the blendMode for actors of the viewport.
Parameters
blendMode: BlendModes
optionalfilterActorUIDs: string[]
optionalimmediate: boolean
Returns void
setCamera
sets the camera
Parameters
cameraInterface: ICamera
optionalstoreAsInitialCamera: boolean
Returns void
setDefaultProperties
Sets the default properties for the viewport. If no volumeId is provided it applies the properties to the default volume actor (first volume)
Parameters
ViewportProperties: VolumeViewportProperties
optionalvolumeId: string
Returns void
setDisplayArea
set displayArea for the viewport
Parameters
displayArea: DisplayArea
optionalcallResetCamera: boolean
optionalsuppressEvents: boolean
Returns any
setOptions
set options for the viewport
Parameters
options: ViewportInputOptions
immediate: boolean
Returns void
setOrientation
Parameters
orientation: OrientationAxis
Returns void
setPan
Sets the canvas pan value
Parameters
pan: Point2
optionalstoreAsInitialCamera: boolean
Returns any
setProperties
Sets the properties for the viewport. If no volumeId is provided it applies the properties to the default volume actor (first volume)
Parameters
__namedParameters: VolumeViewportProperties
optionalvolumeId: string
optionalsuppressEvents: boolean
Returns void
setRendered
Sets the rendered state to rendered if the render actually showed image data
Returns void
setSlabThickness
Sets the slab thickness for actors of the viewport.
Parameters
slabThickness: number
optionalfilterActorUIDs: string[]
Returns void
setViewPresentation
Sets the presentation parameters from the specified viewPres object. Sets display area, zoom, pan, rotation, voi LUT
Parameters
viewPres: ViewPresentation
Returns any
setViewReference
Navigates this viewport to the specified viewRef. Throws an exception if that isn’t possible on this viewport. Returns immediately if viewRef isn’t defined.
Parameters
viewRef: ViewReference
Returns any
setVolumes
Creates volume actors for all volumes defined in the
volumeInputArray
. For each entry, if acallback
is supplied, it will be called with the new volume actor as input. For each entry, if ablendMode
and/orslabThickness
is defined, this will be set on the actor’sVolumeMapper
.Parameters
volumeInputArray: IVolumeInput[]
optionalimmediate: boolean
optionalsuppressEvents: boolean
Returns Promise<void>
setZoom
Sets the relative zoom - set to 1 to reset it
Parameters
zoom: number
optionalstoreAsInitialCamera: boolean
Returns any
ImagePixelModule
bitsAllocated
bitsStored
highBit
modality
photometricInterpretation
pixelRepresentation
samplesPerPixel
voiLUTFunction
windowCenter
windowWidth
ImagePlaneModule
optionalcolumnCosines
optionalcolumnPixelSpacing
columns
frameOfReferenceUID
optionalimageOrientationPatient
optionalimagePositionPatient
optionalpixelSpacing
optionalrowCosines
optionalrowPixelSpacing
rows
optionalsliceLocation
optionalsliceThickness
ImageVolumeProps
ImageVolume which is considered a special case of a Volume, which is constructed out of set of images (imageIds). Unlike Volume which can be constructed from any type of volumetric data, such as nifti or nrrd,
optionaladditionalDetails
Property to store additional information
dimensions
Dimensions of the volume (width, height, depth)
direction
Direction of the volume in world space
optionalimageData
Image data representing the volume
imageIds
imageIds of the volume (if it is built of separate imageIds)
metadata
Metadata describing the volume
origin
Origin point of the volume in world space
optionalreferencedImageIds
if the volume is created from a stack, the imageIds of the stack
optionalreferencedVolumeId
Optional ID of a referenced volume if this volume is derived from another
scalarData
Scalar data representing the volume’s intensity values
optionalscaling
Scaling parameters if the volume contains scaled data (optional)
Type declaration
optionalPT?: { SUVbsaFactor?: number; SUVlbmFactor?: number; suvbwToSuvbsa?: number; suvbwToSuvlbm?: number }
optionalSUVbsaFactor?: number
optionalSUVlbmFactor?: number
optionalsuvbwToSuvbsa?: number
optionalsuvbwToSuvlbm?: number
optionalsizeInBytes
Size of the volume data in bytes (optional)
spacing
Spacing between volume points in 3D world space
volumeId
Unique identifier for the volume
RetrieveStage
Retrieve stages are part of a retrieval of a set of image ids. Each retrieve stage defines which imageIds to include, as well as how that set should be handled. An imageID can be retrieved multiple times, done in order, one after the other, so that it is first retrieved as a lossy/low quality image, followed by higher qualities. The actual retrieve options used are abstracted out by the retrieve type, a simple string that defines what type of retrieve values are used.
See Progressive Loading in the overall docs for information on retrieval stages.
optionaldecimate
Alternately to the positions, choose imageId’s by decimating at the given interval decimate interval/offset.
id
An id for the stage for use in the stage completion events
optionalnearbyFrames
A set of frames which are nearby to replicate this frame to This allows defining how replication within the volume occurs.
optionaloffset
Use the given offset. For example, a decimate of 4 and offset of 1 will
choose from the set [0...12]
the values 1,5,9
optionalpositions
Set of positions in a list of imageID’s to select for this stage. Negative values are relative to the end, positive to the beginning, and fractional values between -1 and 1 are relative to frame count
optionalpriority
The queue priority to use
optionalrequestType
The queue request type to use.
optionalretrieveType
Use a specified retrieve type to specify the type of retrieve this stage uses. There are four standard retrieve types, but others can be defined as required. The four standard ones are:
- singleFast - for a fast/low quality single image
- singleFinal - for the final quality single image
- multipleFast - for a fast/low quality image for multiples
- multipleFinal - for a final image for multiple images
The single/multiple split is done so that the single retrieve can be a streaming type retrieve, which doesn’t work well for multiple images where an entire set of lower quality images is desireable before starting with the high quality set, but the streaming retrieve does work very well for single images.
ViewportPreset
ambient
colorTransfer
diffuse
gradientOpacity
interpolation
name
scalarOpacity
shade
specular
specularPower
VolumeProps
Properties required to instantiate a Volume object. This includes all the necessary data and metadata to define a volume in 3D/4D space.
optionaladditionalDetails
Property to store additional information
dimensions
Dimensions of the volume (width, height, depth)
direction
Direction of the volume in world space
optionalimageData
Image data representing the volume
metadata
Metadata describing the volume
origin
Origin point of the volume in world space
optionalreferencedVolumeId
Optional ID of a referenced volume if this volume is derived from another
scalarData
Scalar data representing the volume’s intensity values
optionalscaling
Scaling parameters if the volume contains scaled data (optional)
Type declaration
optionalPT?: { SUVbsaFactor?: number; SUVlbmFactor?: number; suvbwToSuvbsa?: number; suvbwToSuvlbm?: number }
optionalSUVbsaFactor?: number
optionalSUVlbmFactor?: number
optionalsuvbwToSuvbsa?: number
optionalsuvbwToSuvlbm?: number
optionalsizeInBytes
Size of the volume data in bytes (optional)
spacing
Spacing between volume points in 3D world space
volumeId
Unique identifier for the volume
Type Aliases
AABB2
Type declaration
maxX: number
maxY: number
minX: number
minY: number
AABB3
Type declaration
maxX: number
maxY: number
maxZ: number
minX: number
minY: number
minZ: number
Actor
ActorEntry
Cornerstone Actor Entry including actor uid, actual Actor, and slabThickness for the actor. ActorEntry is the object that is retrieved from viewport when calling viewport.getActor(s)
Type declaration
actor: Actor | VolumeActor | ImageActor | ICanvasActor
actual actor object
optionalclippingFilter?: any
clipping filter applied to actor surfaces
optionalreferenceId?: string
the id of the reference volume from which this actor is derived or created
optionalslabThickness?: number
slab thickness for the actor
uid: string
actor UID
ActorSliceRange
Object containing the min, max and current position in the normal direction for the actor
Type declaration
actor: VolumeActor
current: number
focalPoint: Point3
max: number
min: number
viewPlaneNormal: Point3
AffineMatrix
BoundsIJK
BoundsLPS
CPUFallbackColormapData
Type declaration
optionalcolors?: Point4[]
optionalgamma?: number
name: string
optionalnumColors?: number
optionalnumOfColors?: number
optionalsegmentedData?: unknown
CPUFallbackColormapsData
Type declaration
[key string]: CPUFallbackColormapData
CPUFallbackLUT
Type declaration
lut: number[]
CPUFallbackRenderingTools
Type declaration
optionalcolorLUT?: CPUFallbackLookupTable
optionalcolormapId?: string
optionallastRenderedImageId?: string
optionallastRenderedIsColor?: boolean
optionallastRenderedViewport?: { colormap: unknown; hflip: boolean; invert: boolean; modalityLUT: CPUFallbackLUT; rotation: number; vflip: boolean; voiLUT: CPUFallbackLUT; windowCenter: number | number[]; windowWidth: number | number[] }
colormap: unknown
hflip: boolean
invert: boolean
modalityLUT: CPUFallbackLUT
rotation: number
vflip: boolean
voiLUT: CPUFallbackLUT
windowCenter: number | number[]
windowWidth: number | number[]
optionalrenderCanvas?: HTMLCanvasElement
optionalrenderCanvasContext?: CanvasRenderingContext2D
optionalrenderCanvasData?: ImageData
CPUFallbackViewport
Type declaration
optionalcolormap?: CPUFallbackColormap
optionaldisplayedArea?: CPUFallbackViewportDisplayedArea
optionalfocalPoint?: number[]
optionalhflip?: boolean
optionalinvert?: boolean
optionalmodality?: string
optionalmodalityLUT?: CPUFallbackLUT
optionalparallelScale?: number
optionalpixelReplication?: boolean
optionalrotation?: number
optionalscale?: number
optionaltranslation?: { x: number; y: number }
x: number
y: number
optionalvflip?: boolean
optionalvoi?: { windowCenter: number; windowWidth: number }
windowCenter: number
windowWidth: number
optionalvoiLUT?: CPUFallbackLUT
CPUFallbackViewportDisplayedArea
Type declaration
brhc: { x: number; y: number }
x: number
y: number
columnPixelSpacing: number
presentationSizeMode: string
rowPixelSpacing: number
tlhc: { x: number; y: number }
x: number
y: number
CPUIImageData
Type declaration
optionalcalibration?: IImageCalibration
dimensions: Point3
direction: Mat3
optionalhasPixelSpacing?: boolean
whether the image has pixel spacing and it is not undefined
imageData: CPUImageData
metadata: { Modality: string }
Modality: string
origin: Point3
optionalpreScale?: { scaled?: boolean; scalingParameters?: { modality?: string; rescaleIntercept?: number; rescaleSlope?: number; suvbw?: number } }
preScale object
optionalscaled?: boolean
boolean flag to indicate whether the image has been scaled
optionalscalingParameters?: { modality?: string; rescaleIntercept?: number; rescaleSlope?: number; suvbw?: number }
scaling parameters
optionalmodality?: string
modality of the image
optionalrescaleIntercept?: number
rescale intercept
optionalrescaleSlope?: number
rescale slop
optionalsuvbw?: number
PT suvbw
scalarData: PixelDataTypedArray
scaling: Scaling
spacing: Point3
CPUImageData
Type declaration
optionalgetDimensions?: () => Point3
Last index is always 1
Returns Point3
optionalgetDirection?: () => Mat3
Returns Mat3
optionalgetIndexToWorld?: () => Point3
Returns Point3
optionalgetScalarData?: () => PixelDataTypedArray
Returns PixelDataTypedArray
optionalgetSpacing?: () => Point3
Last spacing is always EPSILON
Returns Point3
optionalgetWorldToIndex?: () => Point3
Returns Point3
optionalindexToWorld?: (point: Point3) => Point3
optionalworldToIndex?: (point: Point3) => Point3
Color
Four elements RGBA as 0-255
ColorLUT
Color LUT Array - Array of colors [[0,0,0,0], [200,200,200,200], ….]
ColormapPublic
Type declaration
optionalname?: string
name of the colormap
optionalopacity?: OpacityMapping[] | number
ColormapRegistration
Type declaration
ColorSpace: string
Name: string
RGBPoints: RGB[] | number[]
ContourData
Type declaration
color: Point3
points: Point3[]
segmentIndex: number
type: ContourType
ContourSetData
Type declaration
optionalcolor?: Point3
data: ContourData[]
frameOfReferenceUID: string
id: string
optionalsegmentIndex?: number
Cornerstone3DConfig
Type declaration
detectGPUConfig: GetGPUTier
When the
gpuTier
is not provided, thedetectGPUConfig
is passed as an argument to thegetGPUTier
method. Its type is theGetGPUTier
in thedetect-gpu
library. https://github.com/pmndrs/detect-gpu/blob/master/src/index.ts#L20enableCacheOptimization: boolean
This flag controls whether to enable cache optimization or not. Basically, when we have a stack viewport (image stack) and we convert it to a volume the volume will be cached as well as the stack. However, if we can optimize this by going back to the image cache and create a view at the correct offset of the bigger volume array buffer, this will save memory. This will get enabled if cornerstone3D is configured to use SharedArrayBuffer, the reason is that when we modify the image cache then the images are referring to a different buffer (SharedArrayBuffer) and some systems don’t support shared array buffers.
optionalgpuTier?: TierResult
It is used to store the device information, we use it if provided if not a network call is performed. Its type is the
TierResult
in thedetect-gpu
library. https://github.com/pmndrs/detect-gpu/blob/master/src/index.ts#L82isMobile: boolean
Whether the device is mobile or not.
rendering: { preferSizeOverAccuracy: boolean; strictZSpacingForVolumeViewport: boolean; useCPURendering: boolean; useNorm16Texture: boolean }
preferSizeOverAccuracy: boolean
strictZSpacingForVolumeViewport: boolean
flag to control whether to use fallback behavior for z-spacing calculation in volume viewports when the necessary metadata is missing. If enabled, we will fall back to using slice thickness or a default value of 1 to render the volume viewport when z-spacing cannot be calculated from images This can help improve the usability and robustness of the visualization in scenarios where the metadata is incomplete or missing, but it might be wrong assumption in certain scenarios.
useCPURendering: boolean
useNorm16Texture: boolean
DisplayArea
The display area type allows specifying or updating the image position and size based on the display area that it is shown in and based on the image size.
Two types are currently defined, the default ‘FIT’, specifies scaling
to fit the given image area. For this type, the area that is scaled to
fit is the imageArea times the image size. For example, an imageArea of
[0.5,2]
with a 512 square image will try to fit 0.5512 = 256 pixels width wise,
and 2512 = 1024 height wise.
The type ‘SCALE’ means to use a scale factor, such as 1.0, which means to make every image pixel fit one physical display pixel.
Then, the image is positioned such that the image fractional position imagePoint is located at the canvas fractional point canvasPoint. Using fractional points allows being independent of image size.
Finally, the store as initial camera allows the zoom and pan values to be set to 1 and [0,0] respectively for the initially displayed position, as well as having the reset camera reset to the specified display area.
Type declaration
optionalimageArea?: [number, number]
optionalimageCanvasPoint?: { canvasPoint?: [number, number]; imagePoint: [number, number] }
optionalcanvasPoint?: [number, number]
Pan the image such that the target imagePoint is located at the canvas point fraction of the canvas.
imagePoint: [number, number]
Use the fractional imagePoint as the target image point to position
optionalinterpolationType?: InterpolationType
optionalscale?: number
optionalstoreAsInitialCamera?: boolean
Make this display area the default and reset/navigate will reapply this
optionaltype?: SCALE | FIT
FlipDirection
Flip direction which can be horizontal or vertical.
Type declaration
optionalflipHorizontal?: boolean
optionalflipVertical?: boolean
IVolume
Backwards compatibility for IVolume
ImageActor
ImageLoadListener
Type declaration
errorCallback: (imageId: any, permanent: any, reason: any) => void
Called when an image fails to load. A failure is permanent if no more attempts will be made.
Parameters
imageId: any
permanent: any
reason: any
Returns void
optionalgetLoaderImageOptions?: (imageId: any) => Record<string, unknown>
Gets the target options for loading a given image, used by the image loader.
Parameters
imageId: any
Returns Record<string, unknown>
Loader image options to use when loading the image. Note this is often a DICOMLoaderImageOptions, but doesn’t have to be.
successCallback: (imageId: any, image: any) => void
Called when an image is loaded. May be called multiple times with increasing status values.
Parameters
imageId: any
image: any
Returns void
ImageLoaderFn
Type declaration
Any imageLoader function should implement a loading given the imageId and returns a mandatory promise which will resolve to the loaded image object. Additional
cancelFn
anddecache
can be implemented.Parameters
imageId: string
optionaloptions: Record<string, any>
Returns { cancelFn?: () => void | undefined; decache?: () => void | undefined; promise: Promise<Record<string, any>> }
optionalcancelFn?: () => void | undefined
Returns void | undefined
optionaldecache?: () => void | undefined
Returns void | undefined
promise: Promise<Record<string, any>>
Promise that resolves to the image object
ImageSliceData
Type declaration
imageIndex: number
numberOfSlices: number
InternalVideoCamera
Type declaration
optionalpanWorld?: Point2
optionalparallelScale?: number
Mat3
This represents a 3x3 matrix of numbers
Metadata
Metadata for images, More information can be found in the https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.6.3.html#table_C.7-11c
Type declaration
BitsAllocated: number
Number of bits allocated for each pixel sample. Each sample shall have the same number of bits allocated
BitsStored: number
Number of bits stored for each pixel sample
Columns: number
Number of columns in the image.
FrameOfReferenceUID: string
Uniquely identifies the Frame of Reference for a Series
HighBit: number
Most significant bit for pixel sample data
ImageOrientationPatient: number[]
The direction cosines of the first row and the first column with respect to the patient
Modality: string
Image Modality
PhotometricInterpretation: string
Specifies the intended interpretation of the pixel data
PixelRepresentation: number
Data representation of the pixel samples.
PixelSpacing: number[]
Physical distance in the patient between the center of each pixel
Rows: number
Number of rows in the image.
SamplesPerPixel: number
optionalSeriesInstanceUID?: string
SeriesInstanceUID of the volume
VOILUTFunction: string
VOILUTFunction for the image which is LINEAR or SAMPLED_SIGMOID
voiLut: VOI[]
Window Level/Center for the image
NearbyFrames
Nearby frames are used in a volume to fill the entire volume quickly without needing to have retrieved them from a remote/slow location. This gives the appearance of a complete volume extremely quickly.
Type declaration
optionalimageQualityStatus?: ImageQualityStatus
The status to set a newly filled image from
offset: number
The offset of the nearby frame to fill from the current position. For example, if the current image is index 32, and the offset is -1, then the frame at index 31 will be filled with 32’s image data.
OrientationVectors
viewUp
- An array of three floating point numbers describing a vector that represents the up direction for the view.viewPlaneNormal
- The direction of the projection
see Axial vs Sagittal vs Coronal see Rendering_Core_Camera
Type declaration
PTScaling
Type declaration
optionalsuvbsa?: number
SUV body surface area
optionalsuvbw?: number
SUV body weight
optionalsuvbwToSuvbsa?: number
suv body weight to suv body surface area
optionalsuvbwToSuvlbm?: number
suv body weight to suv lean body mass
optionalsuvlbm?: number
SUV lean body mass
PixelDataTypedArray
PixelDataTypedArrayString
Plane
Plane equation Ax+By+Cz=D, plane is defined by [A, B, C, D]
Point2
This duplicates the typing established in gl-matrix for a vec2
Point3
This duplicates the typing established in gl-matrix for a vec3
Point4
This represents a 4-vector or RGBA value.
PointsXYZ
Some algorithms use separated values
Type declaration
x: number[]
y: number[]
z: number[]
PublicContourSetData
PublicSurfaceData
Type declaration
optionalcolor?: Point3
data: SurfaceData
frameOfReferenceUID: string
id: string
PublicViewportInput
Public Interface for viewport input to get enabled/disabled or set
Type declaration
optionaldefaultOptions?: ViewportInputOptions
options for the viewport
element: HTMLDivElement
HTML element in the DOM
type: ViewportType
type of the viewport
viewportId: string
unique id for the viewport in the renderingEngine
RGB
RGB color type.
RangeRetrieveOptions
Range retrieves are used to retrieve part of an image, before the rest of the data is available. This is different from streaming, below, in that the request itself uses a byte range to retrieve part of the data, and retrieves the entire request, but part of the image data. That separates the timing for the retrieve, and is essential for fast retrieve for multiple images.
Often the total size of the range is unknown due to cors issues, if so, the decodeLevel will need to be set manually here.
ReferenceCompatibleOptions
It is often important to decide if a given view can display a specific view reference. For example, annotations need to know if they are shown on a view. Some operations need to know if the view COULD show the given object if certain changes were made to the view. This object allows specifying what changes are permitted in order to determine if the view could show the image.
Type declaration
optionalasVolume?: boolean
For a stack viewport, return true if this viewport could show the given view if it were converted into a volume viewport. Has no affect on volume viewports.
optionalimageURI?: string
Use this imageURI for testing - may or may not be the current one. Should be a straight contains URI for the set of imageIds in any of the volumes or set of image ids. This is an optimization setting only that makes the test faster, and does not need to be provided.
optionalwithNavigation?: boolean
Test whether the view could be shown if the viewport were navigated. That is, test is just changing the slice position and zoom/pan would allow showing the view.
optionalwithOrientation?: boolean
For volume viewports, return true if this viewport could show the given view if the orientation was changed.
RetrieveOptions
Retrieve options are Base, Range or Streaming RetrieveOptions.
Scaling
Type declaration
optionalPT?: PTScaling
ScalingParameters
Type declaration
modality: string
modality
rescaleIntercept: number
b in m*p+b which specifies the offset of the transformation
rescaleSlope: number
m in m*p+b which specifies the linear transformation from stored pixels to memory value
optionalsuvbsa?: number
SUV body surface area
optionalsuvbw?: number
SUV body weight
optionalsuvlbm?: number
SUV lean body mass
StackInputCallback
Type declaration
Stack input callback type, used to perform operations on the image data after it has been loaded.
Parameters
params: { imageActor: ImageActor; imageId: string }
Returns unknown
StackViewportProperties
Stack Viewport Properties
StreamingRetrieveOptions
Streaming retrieve is done when a request is decoded as it arrives. That is, if you receive the first 73k as the first part of the request, then that will attempt to be decoded.
SurfaceData
Type declaration
points: number[]
polys: number[]
TransformMatrix2D
used for CPU rendering
VOI
Type declaration
windowCenter: number
Window Center for display
windowWidth: number
Window Width for display
VOIRange
Type declaration
lower: number
lower value for display
upper: number
upper value for display
VideoViewportInput
Type declaration
canvas: HTMLCanvasElement
defaultOptions: any
element: HTMLDivElement
id: string
renderingEngineId: string
sHeight: number
sWidth: number
sx: number
sy: number
type: ViewportType
VideoViewportProperties
Stack Viewport Properties
ViewPresentation
A view presentation stores information about how the view is presented to the user, such as rotation, the displayed area, pan/zoom etc. This is represented as values which are independent of the view type or size as much as possible, by normalizing the values to the type of view presented. This allows remember or synchronizing values in a much wider variety of places than using the raw/underlying view data such as camera position.
Type declaration
optionaldisplayArea?: DisplayArea
The display area being shown. This is more consistent than applying a set of boundary areas.
optionalpan?: Point2
The pan value is how far the pan has moved relative to the fit to canvas or relative to the display area initial position/sizing. true is the default units, which is relative to the initial canvas setting, in zoom relative units.
optionalrotation?: number
The rotation of the view - this is related to cameraViewUp, but is relative to the viewNormal and the default viewUp for that viewNormal.
optionalslabThickness?: number
The slice thickness - in frames(true/default) it will be 1 for a frame distance of 1 pixel thickness, while for mm will be in mm distance.
optionalzoom?: number
The zoom value is a zoom factor relative either to fit to canvas or relative to the display area. The default true units are relative to the initial camera scale to fit is used to get units relative to the scale to fit camera.
ViewPresentationSelector
A view presentation selector allows choosing what view attributes should be returned by a call to getViewPresentation. This allows a shared selection object to be used to specify which presentation attributes are to be used.
For example, a synchronizer might choose to use a presentation selector so that multiple viewports could specify to synchronizer, say slabThickness and windowLevel across one set, while a different synchronizer would choose to apply zoom and pan. Then, a resize operation might choose to synchronize display area, zoom and pan, but not window level or slab thickness. A store/remember state of viewport might choose to synchronize everything Individual tools might choose to use synchronization of the specific attribute which they are modifying (such as rotation) for history undo/redo, but use the same re-apply function to undo the remembered history.
It is certainly possible to implement each of these with their own selectors which call the particular get/set functions, but that makes it more work to share particular sets for different uses.
Type declaration
optionaldisplayArea?: boolean
optionalpaletteLut?: boolean
optionalpan?: boolean
optionalrotation?: boolean
optionalslabThickness?: boolean
optionalwindowLevel?: boolean
optionalzoom?: boolean
ViewReference
A view reference references the image/location of an image. Typical use cases include remembering the current position of a viewport to allow returning to it later, as well as determining whether specific views should show annotations or other overlay information.
Type declaration
FrameOfReferenceUID: string
The FrameOfReferenceUID
optionalbounds?: BoundsLPS
The bounds that are shown. Allows specifying whether a view includes particular bounds or not. This will be in world coordinates.
optionalcameraFocalPoint?: Point3
The focal point of the camera in world space. The focal point is used for to define the stack positioning, but not the zoom/pan (which is defined by the view presentation object.)
Single point objects (probe etc) should use the probe point as the camera focal point as that allows omitting the view plane normal and showing the probe in any orientation.
optionalreferencedImageId?: string
An optional property used to specify the particular image that this view includes. For volumes, that will specify which image is closest to the requested point(s) in some fashion, or will be undefined when the reference applies to any volume with the same frame of reference.
The naming of this particular attribute matches the DICOM SR naming for the referenced image, as well as historical naming in CS3D.
optionalsliceIndex?: number | [number, number]
The slice index or range for this view.
<b>NOTE</b>The slice index is relative to the volume or stack of images. You cannot apply a slice index from one volume to another as they do NOT apply. The referencedImageId should belong to the volume you are trying to apply to, the viewPlane normal should be identical, and then you can apply the sliceIndex.For stack viewports, the referencedImageId should occur at the given slice index.
<b>Note 2</b>slice indices don’t necessarily indicate anything positionally within the stack of images - subsequent slice indexes can be at opposite ends or can be co-incident but separate types of images.optionalviewPlaneNormal?: Point3
The normal for the current view. This defines the plane used to show the 2d annotation. This should be omitted if the annotation is a point to allows for single-point annotations.
optionalviewUp?: Point3
The view up - this is only used for resetting orientation
optionalvolumeId?: string
VolumeId that the referencedImageId was chosen from
ViewReferenceSpecifier
Specifies what view to get a reference for. This set of options allows a Viewport to return a reference for an image not currently in view, such as for a different slice, or containing a given set of points.
Type declaration
optionalforFrameOfReference?: boolean
Specifies to get a view reference that refers to the generic frame of reference rather than to a specific volume or stack. Thus, the view reference would be compatible with any view showing the same frame of reference UID.
optionalpoints?: Point3[]
Set of points to get a reference for, in world space
optionalsliceIndex?: number | [number, number]
The slice index within the current viewport camera to get a reference for. Note that slice indexes are dependent on the particular view being shown and cannot be shared across different view types such as stacks and volumes, or two viewports showing different orientations or slab thicknesses.
optionalvolumeId?: string
The volumeId to reference
ViewportInputOptions
This type defines the shape of viewport input options, so we can throw when it is incorrect.
Type declaration
optionalbackground?: RGB
background color
optionaldisplayArea?: DisplayArea
displayArea of interest
optionalorientation?: OrientationAxis | OrientationVectors
orientation of the viewport which can be either an Enum for axis Enums.OrientationAxis.[AXIAL|SAGITTAL|CORONAL|DEFAULT] or an object with viewPlaneNormal and viewUp
optionalparallelProjection?: boolean
parallel projection settings, Note that this will only be used for VOLUME_3D viewport. You can’t modify the parallel projection of a stack viewport or volume viewport using viewport input options.
optionalsuppressEvents?: boolean
whether the events should be suppressed and not fired
ViewportProperties
Shared Viewport Properties between Stack and Volume Viewports
Type declaration
optionalVOILUTFunction?: VOILUTFunctionType
VOILUTFunction type which is LINEAR or SAMPLED_SIGMOID
optionalcolormap?: ColormapPublic
Colormap applied to the viewport
optionalinterpolationType?: InterpolationType
interpolation type
optionalinvert?: boolean
invert flag - whether the image is inverted
optionalrotation?: number
Rotation of the camera
optionalvoiRange?: VOIRange
voi range (upper, lower) for the viewport
VolumeActor
VolumeInputCallback
Type declaration
Volume input callback type, used to perform operations on the volume data after it has been loaded.
Parameters
params: { volumeActor: VolumeActor; volumeId: string }
Returns unknown
VolumeLoaderFn
Type declaration
Any volumeLoader function should implement a loading given the volumeId and returns a mandatory promise which will resolve to the loaded volume object. Additional
cancelFn
anddecache
can be implemented.Parameters
volumeId: string
optionaloptions: Record<string, any>
Returns { cancelFn?: () => void | undefined; decache?: () => void | undefined; promise: Promise<Record<string, any>> }
optionalcancelFn?: () => void | undefined
cancel function
Returns void | undefined
optionaldecache?: () => void | undefined
decache function
Returns void | undefined
promise: Promise<Record<string, any>>
promise that resolves to the volume object
VolumeViewportProperties
Stack Viewport Properties
CameraModified Event type