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" %}
|
{% extends "atlas/base.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% 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>
|
</div>
|
||||||
{{image.get_dicom_info|safe}}
|
{{image.get_dicom_info|safe}}
|
||||||
<div>
|
<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>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -326,6 +326,9 @@ class SeriesImageBase(models.Model):
|
|||||||
except pydicom.errors.InvalidDicomError:
|
except pydicom.errors.InvalidDicomError:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
def get_full_url(self):
|
||||||
|
return f"{REMOTE_URL}{self.image.url}"
|
||||||
|
|
||||||
def get_series(self):
|
def get_series(self):
|
||||||
return self.series
|
return self.series
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user