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