Constructor
new VRView(element)
Create a volume rendering scene
Parameters:
Name | Type | Description |
---|---|---|
element |
HTMLElement | the target html element to render the scene |
Classes
Members
blurOnInteraction :bool
Toggle blurring on interaction (Increase performance)
Type:
- bool
cropWidget :bool
Crop widget on / off
Type:
- bool
edgeEnhancement
Toggle edge enhancement
lut :String
Set colormap and opacity function
lutName - as in presets list
Type:
- String
presetsList :Array
Presets
Type:
- Array
rangeLUT :Array
Set range to apply lut !!! WIP
Type:
- Array
rescaleLUT :bool
Flag to set lut rescaling on opacity range
Type:
- bool
resolution :Number
raysDistance
Type:
- Number
widgetElement :HTMLelement
PGwidgetElement (set null to hide)
Type:
- HTMLelement
wwwl :Array
wwwl
Type:
- Array
Methods
_initCropWidget()
Setup crop widget
_initPicker()
initPicker
addSurface()
Add surfaces to be rendered
Parameters:
Type | Description |
---|---|
Object | {buffer: bufferarray, color: [r,g,b], label: string} |
destroy()
Destroy webgl content and release listeners
getLutList() → {Array}
Get vtk LUTs list
Returns:
- Lut list as array of strings
- Type
- Array
resetMeasurementState(measurementState)
Reset measurement state to default
Parameters:
Name | Type | Description |
---|---|---|
measurementState |
* |
resetView()
Reset view
resize()
on resize callback
setImage(image)
Set the image to be rendered
Parameters:
Name | Type | Description |
---|---|---|
image |
ArrayBuffer | The image content data as buffer array |
setSurfaceVisibility(label, toggle)
Toggle surface visibility on/off
Parameters:
Name | Type | Description |
---|---|---|
label |
String | The string that identifies the surface |
toggle |
Boolean |
setTool(toolName, options, measurementState)
Set active tool
("Length/Angle", {mouseButtonMask:1}, measurementState)
Parameters:
Name | Type | Description |
---|---|---|
toolName |
* | |
options |
* | |
measurementState |
* |
updateSurface(label, buffer)
Update surface buffer
TODO maybe there is a more efficient way
Parameters:
Name | Type | Description |
---|---|---|
label |
String | The string that identifies the surface |
buffer |
ArrayBuffer |