Override the current viewport layout with a DICOM 3D Multi-planar reconstruction (MPR) layout. It provides sagittal, coronal, and axial views with interactive 2D spatial planes. 2D view control hints:
- Pan on the image: hold left click and move mouse
- Zoom in/out the image: hold CTRL or SHIFT key and move mouse
- Adjust windowing: hold W key and move mouse
This extension require the following extension installed:
- SDK3DVerse_ThreeJS_Ext
Methods
getViewportConfig()
Returns the current configuration of the viewports
(async) installExtension(options)
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options | Object | Default: {viewportConfig: []} | ||
viewportConfig | Array.<Object> | <optional> | defaultViewportConfig | An object defining the viewport config where the viewport is identified by the viewportConfig.name property. See upper example for defaultViewportConfig. |
viewportConfig.name | String | The viewport config name to alter ('axial', 'sagittal', 'coronal', 'volume') | ||
viewportConfig.defaultTransform | Object | local_transform component | ||
viewportConfig.defaultCameraValues | Object | camera component | ||
viewportConfig.defaultPerspectiveLensValues | Object | Only for viewport.id = 2. Set perspective_lens component values: | ||
viewportConfig.disableThreeJSMeshes | Boolean | See SDK3DVerse_MPR_Ext#toggleThreeJsExtensionRendering | ||
viewportConfig.disableViewportDomOverlay | Boolean | See SDK3DVerse_MPR_Ext#toggleViewportDomOverlayRendering |
defaultViewportConfig: [
{
name : 'axial',
id : 1,
defaultTransform : {
position : [ 0.0, 0.0, 0.0 ],
eulerOrientation: [ 90, 0, 0 ],
scale : [ 1.0, 1.0, 1.0 ]
},
defaultCameraValues : {
renderGraphRef: MPR_RENDER_GRAPH
},
disableThreeJSMeshes : true,
disableViewportDomOverlay: false
},
{
name : 'volume',
id : 2,
defaultTransform : {
position : [ 0.0, 0.0, 5.0 ],
orientation: [ 0.0, 0.0, 0.0, 1.0 ],
scale : [ 1.0, 1.0, 1.0 ]
},
defaultCameraValues : this.sdk.utils.clone(this.cameraAPI.defaultCameraTemplate.camera),
defaultPerspectiveLensValues: {
fovy : 60,
nearPlane: 0.01,
farPlane : 0
},
disableThreeJSMeshes : false,
disableViewportDomOverlay: false
},
{
name : 'sagittal',
id : 3,
defaultTransform : {
position : [ 0.0, 0.0, 0.0 ],
eulerOrientation: [ 0, 90, 0 ],
scale : [ 1.0, 1.0, 1.0 ]
},
defaultCameraValues : {
renderGraphRef: MPR_RENDER_GRAPH
},
defaultControllerType: 2,
isOrthographic : true,
// Non sdk props (used by others extensions)
disableThreeJSMeshes : true,
disableViewportDomOverlay: false
},
{
name : 'coronal',
id : 4,
defaultTransform : {
position : [ 0.0, 0.0, 0.0 ],
eulerOrientation: [ 0, 0, 0 ],
scale : [ 1.0, 1.0, 1.0 ]
},
defaultCameraValues : {
renderGraphRef: MPR_RENDER_GRAPH
},
disableThreeJSMeshes : true,
disableViewportDomOverlay: false
}
]
toggleThreeJsExtensionRendering(viewportNamesopt, draw)
Toggle the rendering of the ThreeJS extension per viewport e.g the display of:
- the measures shapes (SDK3DVerse_Measures_Ext)
- the orthographic cutting planes (SDK3DVerse_MPR_Ext)
- the sprites (SDK3DVerse_Sprites_Ext)
- the splines (SDK3DVerse_SplineDisplay_Ext)
- the geometry gizmos of the geometry cutters (SDK3DVerse_GeometryGizmos_Ext)
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
viewportNames | Array.<String> | <optional> | ['volume'] | The names of the viewports to affect. |
draw | Boolean | Default: toggle current draw value. |
(async) toggleViewport(requestedViewport)
Set to fullscreen or minify a viewport.
Name | Type | Description |
---|---|---|
requestedViewport | Viewport | The requested viewport |
toggleViewportDomOverlayRendering(viewportNamesopt, draw)
Toggle the rendering of the ViewportDomOverlay extension per viewport e.g:
- the display of the measures text labels (SDK3DVerse_Measures_Ext)
- the display of the regular labels (SDK3DVerse_Label_Ext)
- enable/disable the handlers to interact with the splines (SDK3DVerse_SplineDisplay_Ext
- enable/disable the handlers to interact with the gizmos of the geometry cutters (SDK3DVerse_GeometryGizmos_Ext)
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
viewportNames | Array.<String> | <optional> | ['volume'] | The names of the viewports to affect. |
draw | Boolean | Default: toggle current draw value. |