.
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
<div>{{ series.modality}}, {{ series.examination }}, {{ series.plane }}, {{ series.contrast }}</div>
|
<div>{{ series.modality}}, {{ series.examination }}, {{ series.plane }}, {{ series.contrast }}</div>
|
||||||
|
|
||||||
{% if series.case %}
|
{% if series.case %}
|
||||||
Associated case:
|
Associated case:
|
||||||
{% for case in series.case.all %}
|
{% for case in series.case.all %}
|
||||||
<a href="{% url 'atlas:case_detail' pk=case.pk %}">{{case}}</a>
|
<a href="{% url 'atlas:case_detail' pk=case.pk %}">{{case}}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
This series is not associated with any cases.
|
This series is not associated with any cases.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div id="single-dicom-viewer" class="dicom-viewer" data-images="{{ series.get_image_url_array }}" data-annotations=''>
|
<div id="single-dicom-viewer" class="dicom-viewer" data-images="{{ series.get_image_url_array }}" data-annotations=''>
|
||||||
@@ -30,8 +30,8 @@ This series is not associated with any cases.
|
|||||||
title="orders dicom by uploaded filename">Order by uploaded filename</a>
|
title="orders dicom by uploaded filename">Order by uploaded filename</a>
|
||||||
</div>
|
</div>
|
||||||
{% for image in series.images.all %}
|
{% for image in series.images.all %}
|
||||||
{{image.image.url}}, pos: {{image.position}}, {{image.upload_filename}} [{{image.image.size|filesizeformat}}]<br />
|
{{image.image.url}}, pos: {{image.position}}, {{image.upload_filename}} [{{image.image.size|filesizeformat}}]<br />
|
||||||
{% comment %} {{image.get_dicom_info|safe}}<br /> {% endcomment %}
|
{% comment %} {{image.get_dicom_info|safe}}<br /> {% endcomment %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
@@ -43,12 +43,12 @@ This series is not associated with any cases.
|
|||||||
<summary>Findings</summary>
|
<summary>Findings</summary>
|
||||||
|
|
||||||
{% for finding in series.findings.all %}
|
{% for finding in series.findings.all %}
|
||||||
<div>
|
<div>
|
||||||
<button class="view-finding-button" data-annotationjson={{finding.annotation_json}} data-viewportjson={{finding.viewport_json}}>Click to view</button>
|
<button class="view-finding-button" data-annotationjson={{finding.annotation_json}} data-viewportjson={{finding.viewport_json}}>Click to view</button>
|
||||||
Findings: {{finding.findings.all|join:", "}}<br />
|
Findings: {{finding.findings.all|join:", "}}<br />
|
||||||
Description: {{finding.description}}<br />
|
Description: {{finding.description}}<br />
|
||||||
<a href="{% url 'atlas:delete_finding' pk=finding.pk %}">Delete finding</a>
|
<a href="{% url 'atlas:delete_finding' pk=finding.pk %}">Delete finding</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</details>
|
</details>
|
||||||
@@ -73,13 +73,13 @@ This series is not associated with any cases.
|
|||||||
|
|
||||||
$(".view-finding-button").each((n, el) => {
|
$(".view-finding-button").each((n, el) => {
|
||||||
$(el).click((e) => {
|
$(el).click((e) => {
|
||||||
dicom_element = $(".single-dicom-viewer").get(0);
|
dicom_element = $(".single-dicom-viewer").get(0);
|
||||||
annotationjson = JSON.parse(e.currentTarget.dataset.annotationjson);
|
annotationjson = JSON.parse(e.currentTarget.dataset.annotationjson);
|
||||||
viewport = JSON.parse(e.currentTarget.dataset.viewportjson)
|
viewport = JSON.parse(e.currentTarget.dataset.viewportjson)
|
||||||
//cornerstoneTools.globalImageIdSpecificToolStateManager.restoreToolState(json);
|
//cornerstoneTools.globalImageIdSpecificToolStateManager.restoreToolState(json);
|
||||||
cornerstone.getEnabledElement(dicom_element).restoreToolState(annotationjson)
|
cornerstone.getEnabledElement(dicom_element).restoreToolState(annotationjson)
|
||||||
cornerstone.getEnabledElement(dicom_element).viewport = viewport
|
cornerstone.getEnabledElement(dicom_element).viewport = viewport
|
||||||
cornerstone.resize(dicom_element);
|
cornerstone.resize(dicom_element);
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -89,7 +89,7 @@ This series is not associated with any cases.
|
|||||||
|
|
||||||
$(document).on('submit', '#series_finding_form', function (e) {
|
$(document).on('submit', '#series_finding_form', function (e) {
|
||||||
dicom_element = $(".single-dicom-viewer").get(0);
|
dicom_element = $(".single-dicom-viewer").get(0);
|
||||||
c = cornerstone.getEnabledElement(dicom_element);
|
c = cornerstone.getEnabledElement(dicom_element);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
@@ -104,14 +104,14 @@ c = cornerstone.getEnabledElement(dicom_element);
|
|||||||
action: 'post'
|
action: 'post'
|
||||||
},
|
},
|
||||||
success: function (json) {
|
success: function (json) {
|
||||||
$("#finding-form").empty()
|
$("#finding-form").empty();
|
||||||
toastr.info('Finding added.')
|
toastr.info('Finding added.');
|
||||||
},
|
},
|
||||||
error: function (xhr, errmsg, err) {
|
error: function (xhr, errmsg, err) {
|
||||||
console.log(xhr.status + ": " + xhr
|
console.log(xhr.status + ": " + xhr
|
||||||
.responseText); // provide a bit more info about the error to the console
|
.responseText); // provide a bit more info about the error to the console
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user