Class: VolumeImageViewer

viewer.VolumeImageViewer(options)

Interactive viewer for DICOM VL Whole Slide Microscopy Image instances with Image Type VOLUME.

Constructor

new VolumeImageViewer(options)

Create a viewer instance for displaying VOLUME images.
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
metadata Array.<metadata.VLWholeSlideMicroscopyImage> Metadata of DICOM VL Whole Slide Microscopy Image instances that should be diplayed.
client Object <optional>
A DICOMwebClient instance for search for and retrieve data from an origin server over HTTP
clientMapping Object <optional>
Mapping of SOP Class UIDs to DICOMwebClient instances to search for and retrieve data from different origin servers, depending on the type of DICOM object. Using a mapping can be usedful, for example, if images, image annotations, or image analysis results are stored in different archives.
preload number <optional>
0 Number of resolution levels that should be preloaded
controls Array.<string> <optional>
[] Names of viewer control elements that should be included in the viewport
debug boolean <optional>
false Whether debug features should be turned on (e.g., display of tile boundaries)
tilesCacheSize number <optional>
1000 Number of tiles that should be cached to avoid repeated retrieval for the DICOMweb server
primaryColor Array.<number> <optional>
[0, 126, 163] Primary color of the application
highlightColor Array.<number> <optional>
[140, 184, 198] Color that should be used to highlight things that get selected by the user
Source:

Members

areROIsVisible

Whether annotated regions of interest are currently visible.
Source:

boundingBox :Array.<Array.<number>>

Bounding box that contains the images.
Type:
  • Array.<Array.<number>>
Source:

frameOfReferenceUID :string

Frame of Reference UID.
Type:
  • string
Source:

isDragPanInteractionActive :boolean

Whether drag pan interaction is active.
Type:
  • boolean
Source:

isDragZoomInteractionActive :boolean

Whether drag zoom interaction is active.
Type:
  • boolean
Source:

isDrawInteractionActive :boolean

Whether draw interaction is active
Type:
  • boolean
Source:

isModifyInteractionActive :boolean

Whether modify interaction is active.
Type:
  • boolean
Source:

isSelectInteractionActive :boolean

Whether select interaction is active.
Type:
  • boolean
Source:

isTranslateInteractionActive :boolean

Whether translate interaction is active.
Type:
  • boolean
Source:

numberOfROIs

Number of annotated regions of interest.
Source:

numLevels :number

Number of zoom levels.
Type:
  • number
Source:

physicalOffset :Array.<number>

Physical offset of images. Offset along the X and Y axes of the slide coordinate system in millimeter unit.
Type:
  • Array.<number>
Source:

physicalSize :Array.<number>

Physical size of images. Length along the X and Y axes of the slide coordinate system in millimeter unit.
Type:
  • Array.<number>
Source:

size :Array.<number>

Size of the viewport.
Type:
  • Array.<number>
Source:

Methods

activateDragPanInteraction(options)

Activate drag pan interaction.
Parameters:
Name Type Description
options Object Options.
Source:

activateDragZoomInteraction(options)

Activate drag zoom interaction.
Parameters:
Name Type Description
options Object Options.
Source:

activateDrawInteraction(options)

Activate the draw interaction for graphic annotation of regions of interest.
Parameters:
Name Type Attributes Description
options Object Drawing options
Properties
Name Type Attributes Description
geometryType string Name of the geometry type (point, circle, box, polygon, freehandpolygon, line, freehandline)
maxPoints number <optional>
Maximum number of points for "line" geometry
minPoints number <optional>
Mininum number of points for "line" geometry
styleOptions Object <optional>
Style options
styleOptions.stroke Object <optional>
Style options for the contour of the geometry
Properties
Name Type Description
color Array.<number> RGBA color of the contour
width number Width of the contour
styleOptions.fill Object <optional>
Style options for the body of the geometry
Properties
Name Type Description
color Array.<number> RGBA color of the body
Source:

activateModifyInteraction(options)

Activate modify interaction.
Parameters:
Name Type Description
options Object Modification options.
Source:

activateOpticalPath(opticalPathIdentifier)

Activate an optical path.
Parameters:
Name Type Description
opticalPathIdentifier string Optical Path Identifier
Source:

activateSelectInteraction(options)

Activate select interaction.
Parameters:
Name Type Description
options Object selection options.
Source:

activateSnapInteraction(options)

Activate snap interaction.
Parameters:
Name Type Description
options Object Snap options.
Source:

activateTranslateInteraction(options)

Activate translate interaction.
Parameters:
Name Type Description
options Object Translation options.
Source:

addAnnotationGroups(metadata)

Add annotation groups.
Parameters:
Name Type Description
metadata metadata.MicroscopyBulkSimpleAnnotations Metadata of a DICOM Microscopy Simple Bulk Annotations instance
Source:

addParameterMappings(metadata)

Add parameter mappings.
Parameters:
Name Type Description
metadata Array.<metadata.ParametricMap> Metadata of one or more DICOM Parametric Map instances
Source:

addROI(roi, styleOptionsopt)

Add a regions of interest.
Parameters:
Name Type Attributes Description
roi roi.ROI Regions of interest
styleOptions Object <optional>
Style options
Properties
Name Type Attributes Description
stroke Object <optional>
Style options for the contour of the geometry
Properties
Name Type Description
color Array.<number> RGBA color of the contour
width number Width of the contour
fill Object <optional>
Style options for the body of the geometry
Properties
Name Type Description
color Array.<number> RGBA color of the body
Source:

addROIEvaluation(uid, item)

Add a qualitative evaluation to a region of interest.
Parameters:
Name Type Description
uid string Unique identifier of the region of interest
item Object CODE content item representing a qualitative evaluation
Source:

addROIMeasurement(uid, item)

Add a measurement to a region of interest.
Parameters:
Name Type Description
uid string Unique identifier of the region of interest
item Object NUM content item representing a measurement
Source:

addSegments(metadata)

Add segments.
Parameters:
Name Type Description
metadata Array.<metadata.Segmentation> Metadata of one or more DICOM Segmentation instances
Source:

addViewportOverlay(options)

Add a new viewport overlay.
Parameters:
Name Type Description
options Object Overlay options
Properties
Name Type Attributes Default Description
element Object The custom overlay HTML element
coordinates Array.<number> Offset of the overlay along the X and Y axes of the slide coordinate system
coordinates bool <optional>
false Whether the viewer should automatically navigate to the element such that it is in focus and fully visible
className string <optional>
Class to style the overlay container
Source:

cleanup()

Clean up. Release allocated memory and clear the viewport.
Source:

deactivateDragPanInteraction()

Deactivate drag pan interaction.
Source:

deactivateDragZoomInteraction()

Deactivate drag zoom interaction.
Source:

deactivateDrawInteraction()

Deactivate draw interaction.
Source:

deactivateModifyInteraction()

Deactivate modify interaction.
Source:

deactivateOpticalPath(opticalPathIdentifier)

Deactivate an optical path.
Parameters:
Name Type Description
opticalPathIdentifier string Optical Path Identifier
Source:

deactivateSelectInteraction()

Deactivate select interaction.
Source:

deactivateSnapInteraction()

Deactivate snap interaction.
Source:

deactivateTranslateInteraction() → {void}

Deactivate translate interaction.
Source:
Returns:
Type
void

getAllAnnotationGroups() → {Array.<annotation.AnnotationGroup>}

Get all annotation groups.
Source:
Returns:
Type
Array.<annotation.AnnotationGroup>

getAllOpticalPaths() → {Array.<opticalPath.OpticalPath>}

Get all optical paths.
Source:
Returns:
Type
Array.<opticalPath.OpticalPath>

getAllParameterMappings() → {Array.<mapping.ParameterMapping>}

Get all parameter mappings.
Source:
Returns:
Type
Array.<mapping.ParameterMapping>

getAllROIs() → {Array.<roi.ROI>}

Get all annotated regions of interest.
Source:
Returns:
Array of regions of interest.
Type
Array.<roi.ROI>

getAllSegments() → {Array.<segment.Segment>}

Get all segments.
Source:
Returns:
Type
Array.<segment.Segment>

getAnnotationGroupDefaultStyle(annotationGroupUID) → {Object}

Get default style of an annotation group.
Parameters:
Name Type Description
annotationGroupUID string Unique identifier of an annotation group
Source:
Returns:
- Default style settings
Type
Object

getAnnotationGroupMetadata(annotationGroupUID) → {metadata.MicroscopyBulkSimpleAnnotations}

Get annotation group metadata.
Parameters:
Name Type Description
annotationGroupUID string Unique identifier of an annotation group
Source:
Returns:
- Metadata of DICOM Microscopy Bulk Simple Annotations instance
Type
metadata.MicroscopyBulkSimpleAnnotations

getAnnotationGroupStyle(annotationGroupUID) → {Object}

Get style of an annotation group.
Parameters:
Name Type Description
annotationGroupUID string Unique identifier of an annotation group
Source:
Returns:
- Style settings
Type
Object

getOpticalPathDefaultStyle(opticalPathIdentifier) → {Object}

Get the default style of an optical path.
Parameters:
Name Type Description
opticalPathIdentifier string Optical Path Identifier
Source:
Returns:
Default style of optical path
Type
Object

getOpticalPathMetadata(opticalPathIdentifier) → {Array.<metadata.VLWholeSlideMicroscopyImage>}

Get image metadata for an optical path.
Parameters:
Name Type Description
opticalPathIdentifier string Optical Path Identifier
Source:
Returns:
Slide microscopy image metadata
Type
Array.<metadata.VLWholeSlideMicroscopyImage>

getOpticalPathStyle(opticalPathIdentifier) → {Object}

Get the style of an optical path.
Parameters:
Name Type Description
opticalPathIdentifier string Optical Path Identifier
Source:
Returns:
Style of optical path
Type
Object

getParameterMappingDefaultStyle(mappingUID) → {Object}

Get the default style of a parameter mapping.
Parameters:
Name Type Description
mappingUID string Unique tracking identifier of mapping
Source:
Returns:
Default style Options
Type
Object

getParameterMappingMetadata(mappingUID) → {Array.<metadata.ParametricMap>}

Get image metadata for a parameter mapping.
Parameters:
Name Type Description
mappingUID string Unique tracking identifier of mapping
Source:
Returns:
Metadata of DICOM Parametric Map instances
Type
Array.<metadata.ParametricMap>

getParameterMappingStyle(mappingUID) → {Object}

Get the style of a parameter mapping.
Parameters:
Name Type Description
mappingUID string Unique tracking identifier of mapping
Source:
Returns:
Style Options
Type
Object

getPixelSpacing(options) → {Array.<number>}

Get the pixel spacing at a given zoom level.
Parameters:
Name Type Description
options Object Options.
Properties
Name Type Description
level number Zoom level.
Source:
Returns:
Spacing between the centers of two neighboring pixels
Type
Array.<number>

getROI(uid) → {roi.ROI}

Get an individual annotated region of interest.
Parameters:
Name Type Description
uid string Unique identifier of the region of interest
Source:
Returns:
Region of interest.
Type
roi.ROI

getROIStyle(uid) → {Object}

Get the style of a region of interest.
Parameters:
Name Type Description
uid string Unique identifier of the regions of interest
Source:
Returns:
- Style settings
Type
Object

getSegmentDefaultStyle(segmentUID) → {Object}

Get the default style of a segment.
Parameters:
Name Type Description
segmentUID string Unique tracking identifier of segment
Source:
Returns:
Default style settings
Type
Object

getSegmentMetadata(segmentUID) → {Array.<metadata.Segmentation>}

Get image metadata for a segment.
Parameters:
Name Type Description
segmentUID string Unique tracking identifier of segment
Source:
Returns:
Metadata of DICOM Segmentation instances
Type
Array.<metadata.Segmentation>

getSegmentStyle(segmentUID) → {Object}

Get the style of a segment.
Parameters:
Name Type Description
segmentUID string Unique tracking identifier of segment
Source:
Returns:
Style settings
Type
Object

hideAnnotationGroup(annotationGroupUID)

Hide an annotation group.
Parameters:
Name Type Description
annotationGroupUID string Unique identifier of an annotation group
Source:

hideOpticalPath(opticalPathIdentifier)

Hide an optical path.
Parameters:
Name Type Description
opticalPathIdentifier string Optical Path Identifier
Source:

hideParameterMapping(mappingUID)

Hide a parameter mapping.
Parameters:
Name Type Description
mappingUID string Unique tracking identifier of a mapping
Source:

hideROIs()

Hide annotated regions of interest.
Source:

hideSegment(segmentUID)

Hide a segment.
Parameters:
Name Type Description
segmentUID string Unique tracking identifier of a segment
Source:

isAnnotationGroupVisible(annotationGroupUID)

Is annotation group visible.
Parameters:
Name Type Description
annotationGroupUID string Unique identifier of an annotation group
Source:

isOpticalPathActive(opticalPathIdentifier) → {boolean}

Determine whether an optical path is active.
Parameters:
Name Type Description
opticalPathIdentifier string Optical Path Identifier
Source:
Returns:
active
Type
boolean

isOpticalPathColorable(opticalPathIdentifier) → {boolean}

Determine whether an optical path is colorable.
Parameters:
Name Type Description
opticalPathIdentifier string Optical Path Identifier
Source:
Returns:
yes/no answer
Type
boolean

isOpticalPathMonochromatic(opticalPathIdentifier) → {boolean}

Determine whether an optical path is monochromatic.
Parameters:
Name Type Description
opticalPathIdentifier string Optical Path Identifier
Source:
Returns:
yes/no answer
Type
boolean

isOpticalPathVisible(opticalPathIdentifier) → {boolean}

Determine if an optical path is visible.
Parameters:
Name Type Description
opticalPathIdentifier string Optical Path Identifier
Source:
Returns:
Type
boolean

isParameterMappingVisible(mappingUID) → {boolean}

Determine if parameter mapping is visible.
Parameters:
Name Type Description
mappingUID string Unique tracking identifier of a mapping
Source:
Returns:
Type
boolean

isSegmentVisible(segmentUID) → {boolean}

Determine if segment is visible.
Parameters:
Name Type Description
segmentUID string Unique tracking identifier of a segment
Source:
Returns:
Type
boolean
Navigate the view to a spatial position or resolution level.
Parameters:
Name Type Description
options Object Options.
Properties
Name Type Description
level number Zoom level.
position Array.<number> X, Y coordinates in slide coordinate system.
Source:

popROI() → {roi.ROI}

Pop the most recently annotated regions of interest.
Source:
Returns:
Regions of interest.
Type
roi.ROI

removeAllAnnotationGroups()

Remove all annotation groups.
Source:

removeAllParameterMappings()

Remove all parameter mappings.
Source:

removeAllROIs()

Remove all annotated regions of interest.
Source:

removeAllSegments()

Remove all segments.
Source:

removeAnnotationGroup(annotationGroupUID)

Remove an annotation group.
Parameters:
Name Type Description
annotationGroupUID string Unique identifier of an annotation group
Source:

removeParameterMapping(mappingUID)

Remove a parameter mapping.
Parameters:
Name Type Description
mappingUID string Unique tracking identifier of a mapping
Source:

removeROI(uid)

Remove an individual regions of interest.
Parameters:
Name Type Description
uid string Unique identifier of the region of interest
Source:

removeSegment(segmentUID)

Remove a segment.
Parameters:
Name Type Description
segmentUID string Unique tracking identifier of a segment
Source:

removeViewportOverlay(options)

Remove an existing viewport overlay.
Parameters:
Name Type Description
options Object Overlay options
Properties
Name Type Description
element Object The custom overlay HTML element
Source:

render(options)

Render the images in the specified viewport container.
Parameters:
Name Type Description
options Object Rendering options.
Properties
Name Type Description
container string | HTMLElement HTML Element in which the viewer should be injected.
Source:

resize() → {void}

Resize the viewer to fit the viewport.
Source:
Returns:
Type
void

setAnnotationGroupStyle(annotationGroupUID, styleOptions)

Set style of an annotation group.
Parameters:
Name Type Description
annotationGroupUID string Unique identifier of an annotation group
styleOptions Object Style options
Properties
Name Type Attributes Description
opacity number <optional>
Opacity
color Array.<number> <optional>
RGB color triplet
measurement Object <optional>
Selected measurement for pseudo-coloring of annotations using measurement values
Source:

setOpticalPathStyle(opticalPathIdentifier, styleOptions)

Set the style of an optical path. The style determine how grayscale stored values of a MONOCHROME2 image will be transformed into pseudo-color display values. Grayscale stored values are first transformed into normalized grayscale display values, which are subsequently transformed into pseudo-color values in RGB color space. The input to the first transformation are grayscale stored values in the range defined by parameter "limitValues", which specify a window for optimizing display value intensity and contrast. The resulting normalized grayscale display values are then used as input to the second transformation, which maps them to pseudo-color values ranging from black color (R=0, G=0, B=0) to the color defined by parameter "color" using linear interpolation. Alternatively, a palette color lookup table can be provided to perform more sophisticated pseudo-coloring.
Parameters:
Name Type Description
opticalPathIdentifier string Optical Path Identifier
styleOptions Object
Properties
Name Type Attributes Description
color Array.<number> <optional>
RGB color triplet
paletteColorLookupTable Array.<number> <optional>
palette color lookup table
opacity number <optional>
Opacity
limitValues Array.<number> <optional>
Upper and lower windowing limits
Source:

setParameterMappingStyle(mappingUID, styleOptions)

Set the style of a parameter mapping.
Parameters:
Name Type Description
mappingUID string Unique tracking identifier of mapping
styleOptions Object
Properties
Name Type Attributes Description
opacity number <optional>
Opacity
limitValues Array.<number> <optional>
Upper and lower windowing
Source:

setROIStyle(uid, styleOptions)

Set the style of a region of interest.
Parameters:
Name Type Description
uid string Unique identifier of the regions of interest
styleOptions Object Style options
Properties
Name Type Attributes Description
stroke Object <optional>
Style options for the contour of the geometry
Properties
Name Type Description
color Array.<number> RGBA color of the contour
width number Width of the contour
fill Object <optional>
Style options for the body of the geometry
Properties
Name Type Description
color Array.<number> RGBA color of the body
Source:

setSegmentStyle(segmentUID, styleOptions)

Set the style of a segment.
Parameters:
Name Type Description
segmentUID string Unique tracking identifier of segment
styleOptions Object Style options
Properties
Name Type Attributes Description
opacity number <optional>
Opacity
Source:

showAnnotationGroup(annotationGroupUID, styleOptions)

Show an annotation group.
Parameters:
Name Type Description
annotationGroupUID string Unique identifier of an annotation group
styleOptions Object
Properties
Name Type Attributes Description
opacity number <optional>
Opacity
color Array.<number> <optional>
RGB color triplet
measurement Object <optional>
Selected measurement
Source:

showOpticalPath(opticalPathIdentifier, styleOptionsopt)

Show an optical path.
Parameters:
Name Type Attributes Description
opticalPathIdentifier string Optical Path Identifier
styleOptions Object <optional>
Properties
Name Type Attributes Description
color Array.<number> <optional>
RGB color triplet
paletteColorLookupTable Array.<number> <optional>
palette color lookup table
opacity number <optional>
Opacity
limitValues Array.<number> <optional>
Upper and lower windowing limits
Source:

showParameterMapping(mappingUID, styleOptionsopt)

Show a parameter mapping.
Parameters:
Name Type Attributes Description
mappingUID string Unique tracking identifier of a mapping
styleOptions Object <optional>
Properties
Name Type Attributes Description
opacity number <optional>
Opacity
limitValues Array.<number> <optional>
Upper and lower windowing
Source:

showROIs()

Show annotated regions of interest.
Source:

showSegment(segmentUID, styleOptionsopt)

Show a segment.
Parameters:
Name Type Attributes Description
segmentUID string Unique tracking identifier of a segment
styleOptions Object <optional>
Properties
Name Type Attributes Description
opacity number <optional>
Opacity
Source:

toggleOverviewMap() → {void}

Toggle overview map.
Source:
Returns:
Type
void

updateROI(roi)

Update properties of a region of interest.
Parameters:
Name Type Description
roi Object ROI to be updated
Properties
Name Type Description
uid string Unique identifier of the region of interest
properties Object ROI properties
Properties
Name Type Attributes Description
measurements Object <optional>
ROI measurements
evaluations Object <optional>
ROI evaluations
label Object <optional>
ROI label
marker Object <optional>
ROI marker
Source: