.
This commit is contained in:
+16
-16
@@ -310,7 +310,7 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
|
||||
</div>`));
|
||||
|
||||
let single_dicom_viewer = main_element.find(".single-dicom-viewer").get(0);
|
||||
console.log(single_dicom_viewer);
|
||||
//console.log(single_dicom_viewer);
|
||||
|
||||
$(".canvas-panel").append($(`<div id='dicom-log-panel'>
|
||||
<span id="dicom-log-close" class="close-button"><a href="#">close</a></span>
|
||||
@@ -417,8 +417,8 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
|
||||
|
||||
$("#dicom-window-panel button").each((n, el) => {
|
||||
$(el).click((e) => {
|
||||
console.log(e);
|
||||
console.log(e.target);
|
||||
//console.log(e);
|
||||
//console.log(e.target);
|
||||
let button_id = e.target.id;
|
||||
let [ww, wc] = window_presets[button_id];
|
||||
|
||||
@@ -497,7 +497,7 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
|
||||
images = [images];
|
||||
}
|
||||
|
||||
console.log("Images", images)
|
||||
//console.log("Images", images)
|
||||
|
||||
//let annotations = [];
|
||||
//if (annotations_to_load) {
|
||||
@@ -510,7 +510,7 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
|
||||
if (!Array.isArray(annotations)) {
|
||||
annotations = [annotations];
|
||||
}
|
||||
console.log("annon", annotations);
|
||||
//console.log("annon", annotations);
|
||||
|
||||
|
||||
function loadAnnotation(imageId, annotation) {
|
||||
@@ -529,7 +529,7 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
|
||||
}
|
||||
|
||||
async function load(images, annotations) {
|
||||
console.log("LOAD", images);
|
||||
//console.log("LOAD", images);
|
||||
let imageIds = [];
|
||||
for (let i = 0; i < images.length; i++) {
|
||||
let data_url = images[i];
|
||||
@@ -642,7 +642,7 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
|
||||
|
||||
let img;
|
||||
|
||||
console.log("load thumb", image_url);
|
||||
//console.log("load thumb", image_url);
|
||||
|
||||
if (image_url.startsWith("data")) {
|
||||
// based (image) data url, just load the image directly
|
||||
@@ -707,8 +707,8 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
|
||||
|
||||
function loadCornerstoneMainImage(element, image, stack, db, load_as_stack) {
|
||||
//dumpDataSet(image.data)
|
||||
console.log("loadCornerstoneMainImage")
|
||||
console.log("load as stack:", load_as_stack)
|
||||
//console.log("loadCornerstoneMainImage")
|
||||
//console.log("load as stack:", load_as_stack)
|
||||
// It is probably silly to do this each time we load a question
|
||||
const PanTool = cornerstoneTools.PanTool;
|
||||
const ZoomTool = cornerstoneTools.ZoomTool;
|
||||
@@ -723,7 +723,7 @@ function loadCornerstoneMainImage(element, image, stack, db, load_as_stack) {
|
||||
const RectangleRoiTool = cornerstoneTools.RectangleRoiTool;
|
||||
const LengthTool = cornerstoneTools.LengthTool;
|
||||
|
||||
console.log("enable element", element);
|
||||
//console.log("enable element", element);
|
||||
cornerstone.enable(element);
|
||||
|
||||
cornerstone.displayImage(element, image);
|
||||
@@ -799,7 +799,7 @@ function loadCornerstoneMainImage(element, image, stack, db, load_as_stack) {
|
||||
$("#primary-mouse-binding .mouse-binding-select[data-button=4]").val("Zoom");
|
||||
//cornerstoneTools.setToolActive("Pan", { mouseButtonMask: 1 });
|
||||
|
||||
console.log(load_as_stack);
|
||||
//console.log(load_as_stack);
|
||||
if (load_as_stack) {
|
||||
cornerstoneTools.setToolActiveForElement(element, "StackScrollMouseWheel", {
|
||||
mouseButtonMask: 3
|
||||
@@ -940,7 +940,7 @@ function onImageRendered(e) {
|
||||
}
|
||||
|
||||
function stopEvent(evt) {
|
||||
console.log("stop", evt)
|
||||
//console.log("stop", evt)
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
}
|
||||
@@ -1000,7 +1000,7 @@ function changeMouseBinding(e, db) {
|
||||
}
|
||||
|
||||
export function selectThumb(new_index) {
|
||||
console.log("select thumb new index", new_index);
|
||||
//console.log("select thumb new index", new_index);
|
||||
// There must be a better way to do this...
|
||||
let dicom_element = document.getElementsByClassName("single-dicom-viewer")[0];
|
||||
if (dicom_element == null) {
|
||||
@@ -1011,10 +1011,10 @@ export function selectThumb(new_index) {
|
||||
// c.toolStateManager.toolState.stack.data[0].currentImageIdIndex;
|
||||
c.toolStateManager.toolState.stack.data[0].currentImageIdIndex = new_index;
|
||||
let id = c.toolStateManager.toolState.stack.data[0].imageIds[new_index];
|
||||
console.log("select thumb id", id);
|
||||
console.log("select thumb el", dicom_element);
|
||||
////console.log("select thumb id", id);
|
||||
//console.log("select thumb el", dicom_element);
|
||||
cornerstone.loadImage(id).then(b => {
|
||||
console.log("b", b);
|
||||
//console.log("b", b);
|
||||
cornerstone.displayImage(dicom_element, b);
|
||||
});
|
||||
//c = cornerstone.getEnabledElement(dicom_element)
|
||||
|
||||
Reference in New Issue
Block a user