Add get_full_url method to SeriesImageBase and update DICOM template to use it
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
{% extends "atlas/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id="single-dicom-viewer" class="dicom-viewer" data-images=["{{ image.image.url }}"] data-annotations=''>
|
||||
<div id="single-dicom-viewer" class="dicom-viewer" data-images=["{{ image.get_full_url }}"] data-annotations=''>
|
||||
</div>
|
||||
{{image.get_dicom_info|safe}}
|
||||
<div>
|
||||
<a href="{{ image.image.url }}" download>Download DICOM Image</a>
|
||||
<a href="{{ image.get_full_url }}" download>Download DICOM Image</a>
|
||||
{{image.get_full_url}}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -326,6 +326,9 @@ class SeriesImageBase(models.Model):
|
||||
except pydicom.errors.InvalidDicomError:
|
||||
return {}
|
||||
|
||||
def get_full_url(self):
|
||||
return f"{REMOTE_URL}{self.image.url}"
|
||||
|
||||
def get_series(self):
|
||||
return self.series
|
||||
|
||||
|
||||
Reference in New Issue
Block a user