Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

Looking to display the series description in the bottom left corner of the viewer

Open sinanmb opened this issue 6 years ago • 2 comments

Hi,

In the study view, I noticed the series description is displayed in the left panel, right under each thumbnail. I would like to also display it in the bottom left corner of the main viewer view, but have not been successful. Does anyone know how to do it?

I edited the screenshot to add the series description in red, where I would like for it to appear.

Best, Sinan

sinanmb avatar Mar 04 '20 18:03 sinanmb

The data in the bottom left panel is displayed by an HTML element with the class name "bottom-left overlay-element". To access the element and add a row, you can do the following. Here I added the probe x, y position and Hounsfield unit:

const bottom_left_overlay = window.document.getElementsByClassName("bottom-left overlay-element")[0];
var divX = document.createElement("div");
divX.setAttribute("id", "cursor_data_div");
 //divX.style.backgroundColor = "#FF0000";
global.pX = document.createElement("p");
global.pX.setAttribute("id", "cursor_data_p");
global.pX.style.color = "#a1d9fd";
divX.appendChild(global.pX);
bottom_left_overlay.appendChild(divX);
global.dragProbeIsEnabled = true;
//console.log('update info');
global.pX.innerHTML = 'Cursor: x: ' + x + ' y: ' + y + ' HU: ' + global.image_HU_LCR + '<br> Slope: ' + global.image_slope + ' Intercept: ' + global.image_intercept;

mtm12 avatar Mar 05 '20 12:03 mtm12

Thank you, that's very helpful!

sinanmb avatar Mar 06 '20 00:03 sinanmb