.
This commit is contained in:
@@ -44,11 +44,9 @@ This series is not associated with any cases.
|
||||
|
||||
{% for finding in series.findings.all %}
|
||||
<div>
|
||||
{% for f in finding.findings.all %}
|
||||
{{f.name}}
|
||||
{% endfor %}
|
||||
{{finding.description}}<br />
|
||||
{{finding.annotation_json}}<br />
|
||||
<button class="view-finding-button" data-json={{finding.annotation_json}}>Click to view</button>
|
||||
Findings: {{finding.findings.all|join:", "}}
|
||||
Description: {{finding.description}}<br />
|
||||
<a href="{% url 'atlas:delete_finding' pk=finding.pk %}">Delete finding</a>
|
||||
</div>
|
||||
|
||||
@@ -72,6 +70,18 @@ This series is not associated with any cases.
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
$(".view-finding-button").each((n, el) => {
|
||||
$(el).click((e) => {
|
||||
dicom_element = document.getElementById("single-dicom-viewer");
|
||||
json = JSON.parse(e.currentTarget.dataset.json);
|
||||
cornerstoneTools.globalImageIdSpecificToolStateManager.restoreToolState(json);
|
||||
cornerstone.reset(dicom_element);
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('submit', '#series_finding_form', function (e) {
|
||||
|
||||
Reference in New Issue
Block a user