commit d3ad81216624f33ef9c29c03f8c07c28f611e216
Author: root <root@hub.scroll.pub> Date: 2025-01-13 18:01:36 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..6fca18f --- /dev/null +++ b/body.html @@ -0,0 +1,38 @@ +<header class="header"> + <h1>MR Image Quality Enhancement</h1> + <p>Upload your NII images and enhance quality with advanced AI models.</p> +</header> + +<main class="main-content"> + <section class="upload-section"> + <h2>Upload Images</h2> + <form id="uploadForm"> + <label for="t1w">T1-weighted Image (Good Quality)</label> + <input type="file" id="t1w" name="t1w" accept=".nii" required> + + <label for="t2w">T2-weighted Image (Motion Corrupted)</label> + <input type="file" id="t2w" name="t2w" accept=".nii" required> + + <button type="submit" class="upload-btn">Upload & Process</button> + </form> + </section> + + <section class="model-section"> + <h2>Select Model</h2> + <select id="modelSelect"> + <option value="motion_correction">Motion Correction (T2w)</option> + <!-- Future options will be added here --> + </select> + </section> + + <section class="output-section"> + <h2>Output</h2> + <div id="outputImage" class="output-image"> + <p>Your enhanced image will appear here.</p> + </div> + </section> +</main> + +<footer class="footer"> + <p>MR Image Quality Enhancement Demo</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..88b078e --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://mrenhance.scroll.pub +metaTags +editButton /edit.html +title MR Image Quality Enhancement Demo +style.css +body.html +script.js \ No newline at end of file diff --git a/prompt.json b/prompt.json new file mode 100644 index 0000000..2cb8e66 --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "ecafc03b-8b9e-4d57-a3b3-d5169bbd6f62", + "object": "chat.completion", + "created": 1736791269, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\nmrenhance.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://mrenhance.scroll.pub\nmetaTags\neditButton /edit.html\ntitle MR Image Quality Enhancement Demo\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header class=\"header\">\n <h1>MR Image Quality Enhancement</h1>\n <p>Upload your NII images and enhance quality with advanced AI models.</p>\n</header>\n\n<main class=\"main-content\">\n <section class=\"upload-section\">\n <h2>Upload Images</h2>\n <form id=\"uploadForm\">\n <label for=\"t1w\">T1-weighted Image (Good Quality)</label>\n <input type=\"file\" id=\"t1w\" name=\"t1w\" accept=\".nii\" required>\n \n <label for=\"t2w\">T2-weighted Image (Motion Corrupted)</label>\n <input type=\"file\" id=\"t2w\" name=\"t2w\" accept=\".nii\" required>\n \n <button type=\"submit\" class=\"upload-btn\">Upload & Process</button>\n </form>\n </section>\n\n <section class=\"model-section\">\n <h2>Select Model</h2>\n <select id=\"modelSelect\">\n <option value=\"motion_correction\">Motion Correction (T2w)</option>\n <!-- Future options will be added here -->\n </select>\n </section>\n\n <section class=\"output-section\">\n <h2>Output</h2>\n <div id=\"outputImage\" class=\"output-image\">\n <p>Your enhanced image will appear here.</p>\n </div>\n </section>\n</main>\n\n<footer class=\"footer\">\n <p>MR Image Quality Enhancement Demo</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4a90e2;\n --secondary-color: #333;\n --background-color: #f5f5f5;\n --text-color: #333;\n --border-radius: 8px;\n --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n}\n\nbody {\n font-family: 'Arial', sans-serif;\n margin: 0;\n padding: 0;\n background-color: var(--background-color);\n color: var(--text-color);\n line-height: 1.6;\n}\n\n.header {\n background-color: var(--primary-color);\n color: white;\n padding: 2rem;\n text-align: center;\n border-bottom: 4px solid darken(var(--primary-color), 10%);\n}\n\n.header h1 {\n margin: 0;\n font-size: 2.5rem;\n}\n\n.header p {\n margin: 0.5rem 0 0;\n font-size: 1.2rem;\n}\n\n.main-content {\n padding: 2rem;\n max-width: 800px;\n margin: 0 auto;\n}\n\n.upload-section, .model-section, .output-section {\n background: white;\n padding: 1.5rem;\n margin-bottom: 2rem;\n border-radius: var(--border-radius);\n box-shadow: var(--box-shadow);\n}\n\nh2 {\n color: var(--primary-color);\n margin-bottom: 1rem;\n}\n\nlabel {\n display: block;\n margin-bottom: 0.5rem;\n font-weight: bold;\n}\n\ninput[type=\"file\"], select {\n width: 100%;\n padding: 0.5rem;\n margin-bottom: 1rem;\n border: 1px solid #ccc;\n border-radius: var(--border-radius);\n}\n\n.upload-btn {\n background-color: var(--primary-color);\n color: white;\n padding: 0.75rem 1.5rem;\n border: none;\n border-radius: var(--border-radius);\n cursor: pointer;\n font-size: 1rem;\n transition: background-color 0.3s ease;\n}\n\n.upload-btn:hover {\n background-color: darken(var(--primary-color), 10%);\n}\n\n.output-image {\n text-align: center;\n padding: 2rem;\n background: #e9ecef;\n border-radius: var(--border-radius);\n}\n\n.footer {\n text-align: center;\n padding: 1rem;\n background-color: var(--secondary-color);\n color: white;\n margin-top: 2rem;\n}\n\n@media (max-width: 768px) {\n .header h1 {\n font-size: 2rem;\n }\n\n .header p {\n font-size: 1rem;\n }\n\n .main-content {\n padding: 1rem;\n }\n\n .upload-btn {\n width: 100%;\n }\n}\n---script.js---\ndocument.getElementById('uploadForm').addEventListener('submit', function(event) {\n event.preventDefault();\n \n const t1wFile = document.getElementById('t1w').files[0];\n const t2wFile = document.getElementById('t2w').files[0];\n const model = document.getElementById('modelSelect').value;\n\n if (t1wFile && t2wFile) {\n // Simulate processing\n setTimeout(() => {\n const outputImage = document.getElementById('outputImage');\n outputImage.innerHTML = '<p>Processing complete! Here is your enhanced image.</p>';\n // In a real scenario, you would display the processed image here\n }, 2000);\n } else {\n alert('Please upload both T1w and T2w images.');\n }\n});\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 344, + "completion_tokens": 1216, + "total_tokens": 1560, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 344 + }, + "system_fingerprint": "fp_3a5770e1b4" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..74fe6e3 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,3 @@ +# mrenhance2.scroll.pub + +website generated by DeepSeek from prompt: I want to create a webapp demo for mr image quality enhancement for my pitchdeck. I want to be able to upload nii image and select what model to use. 
Specifically, right now it only has one available usage that is upload a good quality T1w image, and the T2w image (motion corrupted). And it outputs the motion corrected T2w image.

But in the future, it can synthesize T2w contrast just from T1w image, super resolution T1w image \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..acca277 --- /dev/null +++ b/script.js @@ -0,0 +1,18 @@ +document.getElementById('uploadForm').addEventListener('submit', function(event) { + event.preventDefault(); + + const t1wFile = document.getElementById('t1w').files[0]; + const t2wFile = document.getElementById('t2w').files[0]; + const model = document.getElementById('modelSelect').value; + + if (t1wFile && t2wFile) { + // Simulate processing + setTimeout(() => { + const outputImage = document.getElementById('outputImage'); + outputImage.innerHTML = '<p>Processing complete! Here is your enhanced image.</p>'; + // In a real scenario, you would display the processed image here + }, 2000); + } else { + alert('Please upload both T1w and T2w images.'); + } +}); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..e59c3a9 --- /dev/null +++ b/style.css @@ -0,0 +1,116 @@ +:root { + --primary-color: #4a90e2; + --secondary-color: #333; + --background-color: #f5f5f5; + --text-color: #333; + --border-radius: 8px; + --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +body { + font-family: 'Arial', sans-serif; + margin: 0; + padding: 0; + background-color: var(--background-color); + color: var(--text-color); + line-height: 1.6; +} + +.header { + background-color: var(--primary-color); + color: white; + padding: 2rem; + text-align: center; + border-bottom: 4px solid darken(var(--primary-color), 10%); +} + +.header h1 { + margin: 0; + font-size: 2.5rem; +} + +.header p { + margin: 0.5rem 0 0; + font-size: 1.2rem; +} + +.main-content { + padding: 2rem; + max-width: 800px; + margin: 0 auto; +} + +.upload-section, .model-section, .output-section { + background: white; + padding: 1.5rem; + margin-bottom: 2rem; + border-radius: var(--border-radius); + box-shadow: var(--box-shadow); +} + +h2 { + color: var(--primary-color); + margin-bottom: 1rem; +} + +label { + display: block; + margin-bottom: 0.5rem; + font-weight: bold; +} + +input[type="file"], select { + width: 100%; + padding: 0.5rem; + margin-bottom: 1rem; + border: 1px solid #ccc; + border-radius: var(--border-radius); +} + +.upload-btn { + background-color: var(--primary-color); + color: white; + padding: 0.75rem 1.5rem; + border: none; + border-radius: var(--border-radius); + cursor: pointer; + font-size: 1rem; + transition: background-color 0.3s ease; +} + +.upload-btn:hover { + background-color: darken(var(--primary-color), 10%); +} + +.output-image { + text-align: center; + padding: 2rem; + background: #e9ecef; + border-radius: var(--border-radius); +} + +.footer { + text-align: center; + padding: 1rem; + background-color: var(--secondary-color); + color: white; + margin-top: 2rem; +} + +@media (max-width: 768px) { + .header h1 { + font-size: 2rem; + } + + .header p { + font-size: 1rem; + } + + .main-content { + padding: 1rem; + } + + .upload-btn { + width: 100%; + } +} \ No newline at end of file