Rotation: drag to rotate
Length and angle: click 2x or 3x
Code Example
const element = document.getElementById('viewer-2')
const widgetContainer = document.getElementById("widget");
// init state
let state = {p1:new Array(2), p2: new Array(2), p3: new Array(2), label:''}
const image = diglettk.buildVtkVolume(header, data);
// run vr
vr = new diglettk.VRView(element);
// set an image
vr.setImage(image);
// set widget element to control opacity
vr.widgetElement = widgetContainer;
// set a LUT
let lutList = vr.getLutList();
vr.lut = lutList[13];
vr.rescaleLUT = true;
vr.wwwl = [500, 1000];
// set a tool
vr.setTool("Rotation", {}, state);
function updateTool(toolName){
vr.resetMeasurementState(state);
vr.setTool(toolName, {}, state)
}