.
This commit is contained in:
@@ -159,7 +159,8 @@ window.addEventListener('loadDicomViewer', function (e) {
|
||||
|
||||
window.loadDicomViewerEvent = new Event('loadDicomViewerUrls');
|
||||
window.addEventListener('loadDicomViewerUrls', function (e) {
|
||||
loadDicomViewer(e.detail);
|
||||
|
||||
loadDicomViewer(e.detail.images, e.detail.annotations);
|
||||
}, false);
|
||||
|
||||
function loadDicomViewer(images_to_load, annotations_to_load) {
|
||||
|
||||
+4
-1
@@ -349,13 +349,16 @@ class Rapid(models.Model):
|
||||
|
||||
# Loop through rapidimage associations
|
||||
images = []
|
||||
#annotations = []
|
||||
feedback_images = []
|
||||
for i in self.images.all():
|
||||
#annotations.append(i.image_annotations)
|
||||
if i.feedback_image == True:
|
||||
if based:
|
||||
feedback_images.append(image_as_base64(i.image))
|
||||
else:
|
||||
feedback_images.append("{}/{}".format(settings.REMOTE_URL, i.image.url))
|
||||
feedback_images.append("{}/{}".format(settings.REMOTE_URL, i.image.url))
|
||||
else:
|
||||
if based:
|
||||
images.append(image_as_base64(i.image))
|
||||
@@ -367,7 +370,7 @@ class Rapid(models.Model):
|
||||
json = {
|
||||
"images": images,
|
||||
#"feedback_image": [],
|
||||
#"annotations": [str(q.image_annotations)],
|
||||
"annotations": self.get_image_annotations(),
|
||||
"type": "rapid",
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
console.log(data);
|
||||
|
||||
let event = new CustomEvent('loadDicomViewerUrls', {
|
||||
"detail": data.images
|
||||
"detail": {"images" : data.images, "annotations" : data.annotations}
|
||||
});
|
||||
|
||||
window.dispatchEvent(event);
|
||||
|
||||
@@ -159,7 +159,8 @@ window.addEventListener('loadDicomViewer', function (e) {
|
||||
|
||||
window.loadDicomViewerEvent = new Event('loadDicomViewerUrls');
|
||||
window.addEventListener('loadDicomViewerUrls', function (e) {
|
||||
loadDicomViewer(e.detail);
|
||||
|
||||
loadDicomViewer(e.detail.images, e.detail.annotations);
|
||||
}, false);
|
||||
|
||||
function loadDicomViewer(images_to_load, annotations_to_load) {
|
||||
|
||||
Reference in New Issue
Block a user