-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
59 lines (51 loc) · 2.22 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html lang="en">
<head>
<title>DICOM Processing</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<script>
function showTab(tabId) {
var tabs = document.getElementsByClassName("tab-content");
for (var i = 0; i < tabs.length; i++) {
tabs[i].style.display = "none";
}
document.getElementById(tabId).style.display = "block";
}
function showProcessingMessage() {
document.getElementById("processing-message").style.display = "block";
}
</script>
</head>
<body>
<!-- Sidebar -->
<div class="sidebar">
<button onclick="showTab('upload-tab')">Upload DICOM</button>
<button onclick="showTab('results-tab')">Results</button>
</div>
<!-- Main Content -->
<div class="content">
<!-- Upload Tab -->
<div id="upload-tab" class="tab-content active">
<h2>Upload a DICOM File</h2>
<form action="/" method="post" enctype="multipart/form-data" onsubmit="showProcessingMessage()">
<input type="file" name="file" accept=".dcm" required>
<input type="submit" value="Upload & Process">
</form>
<p id="processing-message" style="display: none; color: yellow;">Processing DICOM... Please wait.</p>
</div>
<!-- Results Tab (Hidden Until Processed) -->
<div id="results-tab" class="tab-content" style="display: {{ 'block' if lesion_count is not none else 'none' }};">
<h2>Lesion Detection Results</h2>
{% if lesion_count is not none %}
<p><strong>Patient Name:</strong> {{ patient }}</p>
<p><strong>Modality:</strong> {{ modality }}</p>
<p><strong>Study Date:</strong> {{ study_date }}</p>
<p><strong>Lesions Found:</strong> {{ lesion_count }}</p>
<img src="{{ url_for('static', filename='processed_image.png') }}" alt="Processed DICOM">
{% else %}
<p>No results available. Upload a DICOM file first.</p>
{% endif %}
</div>
</div>
</body>
</html>