This commit is contained in:
Ross
2021-08-20 12:28:19 +01:00
parent eb11f0c7de
commit eb2efa8f44
4 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -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
View File
@@ -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);
+2 -1
View File
@@ -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) {