Changes to enhance-mri1.scroll.pub

root
root
8 days ago
Initial commit
body.html
Changed around line 1
+
+

MRI Enhancement Studio

+

Advanced AI-powered medical image enhancement

+
+
+
+
+
+ ⬆️
+

Drag & drop your NII file here
or click to browse

+
+
+
+
+
+

Enhancement Model

+
+
+

Super Resolution

+

4x resolution enhancement

+
+
+

Denoising

+

Advanced noise reduction

+
+
+

Contrast Enhancement

+

Improved tissue contrast

+
+
+
+
+
+
+
+

Original

+
+
+
+

Enhanced

+
+
+
+
+
+
+
+
+

Built with care for medical professionals

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://enhance-mri.scroll.pub
+ metaTags
+ description Advanced MRI Image Enhancement Demo - Upload and enhance your medical imaging data
+ keywords MRI enhancement, image quality, medical imaging, AI models
+ editButton /edit.html
+ title MRI Enhancement Studio
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "msg_01AvzRb5VLaYhsLNXmszdVLW",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "Here's a website implementation for your MR image enhancement demo:\n\n---domain---\nenhance-mri.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://enhance-mri.scroll.pub\nmetaTags\n description Advanced MRI Image Enhancement Demo - Upload and enhance your medical imaging data\n keywords MRI enhancement, image quality, medical imaging, AI models\neditButton /edit.html\ntitle MRI Enhancement Studio\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n
\n

MRI Enhancement Studio

\n

Advanced AI-powered medical image enhancement

\n
\n\n
\n
\n
\n ⬆️\n

Drag & drop your NII file here
or click to browse

\n \n
\n
\n\n
\n

Enhancement Model

\n
\n
\n

Super Resolution

\n

4x resolution enhancement

\n
\n
\n

Denoising

\n

Advanced noise reduction

\n
\n
\n

Contrast Enhancement

\n

Improved tissue contrast

\n
\n
\n
\n\n
\n
\n
\n

Original

\n
\n
\n
\n

Enhanced

\n
\n
\n
\n \n
\n
\n\n
\n

Built with care for medical professionals

\n
\n\n---style.css---\n:root {\n --primary: #2a6bb8;\n --secondary: #1d4d8a;\n --bg: #f5f7fa;\n --text: #2c3e50;\n --radius: 12px;\n --shadow: 0 4px 6px rgba(0,0,0,0.1);\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: system-ui, -apple-system, sans-serif;\n background: var(--bg);\n color: var(--text);\n line-height: 1.6;\n}\n\nheader {\n text-align: center;\n padding: 3rem 1rem;\n background: linear-gradient(135deg, var(--primary), var(--secondary));\n color: white;\n}\n\nh1 {\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n}\n\n.tagline {\n font-size: 1.2rem;\n opacity: 0.9;\n}\n\nmain {\n max-width: 1200px;\n margin: 0 auto;\n padding: 2rem;\n}\n\n.drop-zone {\n border: 3px dashed #ccd;\n border-radius: var(--radius);\n padding: 3rem;\n text-align: center;\n cursor: pointer;\n transition: all 0.3s ease;\n background: white;\n}\n\n.drop-zone:hover {\n border-color: var(--primary);\n background: #f8f9ff;\n}\n\n.icon {\n font-size: 3rem;\n margin-bottom: 1rem;\n}\n\n.model-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 1.5rem;\n margin: 2rem 0;\n}\n\n.model-card {\n background: white;\n padding: 1.5rem;\n border-radius: var(--radius);\n box-shadow: var(--shadow);\n cursor: pointer;\n transition: transform 0.2s ease;\n}\n\n.model-card:hover {\n transform: translateY(-3px);\n}\n\n.preview-container {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 2rem;\n margin: 2rem 0;\n}\n\n.preview {\n background: white;\n padding: 1rem;\n border-radius: var(--radius);\n box-shadow: var(--shadow);\n}\n\n.image-preview {\n width: 100%;\n height: 300px;\n background: #f0f2f5;\n border-radius: calc(var(--radius) - 4px);\n margin-top: 1rem;\n}\n\n.process-btn {\n background: var(--primary);\n color: white;\n border: none;\n padding: 1rem 2rem;\n border-radius: var(--radius);\n font-size: 1.1rem;\n cursor: pointer;\n width: 100%;\n max-width: 300px;\n margin: 2rem auto;\n display: block;\n transition: background 0.3s ease;\n}\n\n.process-btn:disabled {\n background: #ccc;\n cursor: not-allowed;\n}\n\nfooter {\n text-align: center;\n padding: 2rem;\n background: white;\n margin-top: 3rem;\n}\n\n@media (max-width: 768px) {\n h1 {\n font-size: 2rem;\n }\n \n main {\n padding: 1rem;\n }\n \n .model-grid {\n grid-template-columns: 1fr;\n }\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const dropZone = document.getElementById('dropZone');\n const fileInput = document.getElementById('fileInput');\n const processBtn = document.getElementById('processBtn');\n const modelCards = document.querySelectorAll('.model-card');\n \n let selectedFile = null;\n let selectedModel = null;\n\n // File upload handling\n dropZone.addEventListener('click', () => fileInput.click());\n \n dropZone.addEventListener('dragover', (e) => {\n e.preventDefault();\n dropZone.style.borderColor = var(--primary);\n });\n \n dropZone.addEventListener('dragleave', () => {\n dropZone.style.borderColor = '#ccd';\n });\n \n dropZone.addEventListener('drop', (e) => {\n e.preventDefault();\n const file = e.dataTransfer.files[0];\n handleFile(file);\n });\n \n fileInput.addEventListener('change', (e) => {\n const file = e.target.files[0];\n handleFile(file);\n });\n\n // Model selection\n modelCards.forEach(card => {\n card.addEventListener('click', () => {\n modelCards.forEach(c => c.style.border = 'none');\n card.style.border = `2px solid var(--primary)`;\n selectedModel = card.dataset.model;\n updateProcessButton();\n });\n });\n\n function handleFile(file) {\n if (file && (file.name.endsWith('.nii') || file.name.endsWith('.nii.gz'))) {\n selectedFile = file;\n dropZone.innerHTML = `

Selected: ${file.name}

`;\n updateProcessButton();\n } else {\n alert('Please upload a valid NII file');\n }\n }\n\n function updateProcessButton() {\n processBtn.disabled = !(selectedFile && selectedModel);\n }\n\n processBtn.addEventListener('click', () => {\n // Here you would implement the actual processing logic\n alert(`Processing ${selectedFile.name} with ${selectedModel} model`);\n });\n});\n\n---end---\n\nThis implementation creates a professional and modern web application for MRI image enhancement. Key features include:\n\n1. Drag & drop file upload with NII file validation\n2. Visual model selection cards\n3. Preview areas for original and enhanced images\n4. Responsive design that works on all devices\n5. Modern gradient header and clean UI\n6. Accessible semantic HTML structure\n7. Interactive hover and click effects\n8. Professional animations and transitions\n9. Clear visual feedback for user actions\n\nThe design uses a medical-professional color scheme with blues and clean whites, maintaining a professional appearance while being visually appealing. The layout is intuitive and guides users through the process of uploading and enhancing their images."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 306,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2312
+ }
+ }
readme.scroll
Changed around line 1
+ # enhance-mri1.scroll.pub
+
+ website generated by Claude 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.
script.js
Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ const dropZone = document.getElementById('dropZone');
+ const fileInput = document.getElementById('fileInput');
+ const processBtn = document.getElementById('processBtn');
+ const modelCards = document.querySelectorAll('.model-card');
+
+ let selectedFile = null;
+ let selectedModel = null;
+
+ // File upload handling
+ dropZone.addEventListener('click', () => fileInput.click());
+
+ dropZone.addEventListener('dragover', (e) => {
+ e.preventDefault();
+ dropZone.style.borderColor = var(--primary);
+ });
+
+ dropZone.addEventListener('dragleave', () => {
+ dropZone.style.borderColor = '#ccd';
+ });
+
+ dropZone.addEventListener('drop', (e) => {
+ e.preventDefault();
+ const file = e.dataTransfer.files[0];
+ handleFile(file);
+ });
+
+ fileInput.addEventListener('change', (e) => {
+ const file = e.target.files[0];
+ handleFile(file);
+ });
+
+ // Model selection
+ modelCards.forEach(card => {
+ card.addEventListener('click', () => {
+ modelCards.forEach(c => c.style.border = 'none');
+ card.style.border = `2px solid var(--primary)`;
+ selectedModel = card.dataset.model;
+ updateProcessButton();
+ });
+ });
+
+ function handleFile(file) {
+ if (file && (file.name.endsWith('.nii') || file.name.endsWith('.nii.gz'))) {
+ selectedFile = file;
+ dropZone.innerHTML = `

Selected: ${file.name}

`;
+ updateProcessButton();
+ } else {
+ alert('Please upload a valid NII file');
+ }
+ }
+
+ function updateProcessButton() {
+ processBtn.disabled = !(selectedFile && selectedModel);
+ }
+
+ processBtn.addEventListener('click', () => {
+ // Here you would implement the actual processing logic
+ alert(`Processing ${selectedFile.name} with ${selectedModel} model`);
+ });
+ });
style.css
Changed around line 1
+ :root {
+ --primary: #2a6bb8;
+ --secondary: #1d4d8a;
+ --bg: #f5f7fa;
+ --text: #2c3e50;
+ --radius: 12px;
+ --shadow: 0 4px 6px rgba(0,0,0,0.1);
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: system-ui, -apple-system, sans-serif;
+ background: var(--bg);
+ color: var(--text);
+ line-height: 1.6;
+ }
+
+ header {
+ text-align: center;
+ padding: 3rem 1rem;
+ background: linear-gradient(135deg, var(--primary), var(--secondary));
+ color: white;
+ }
+
+ h1 {
+ font-size: 2.5rem;
+ margin-bottom: 0.5rem;
+ }
+
+ .tagline {
+ font-size: 1.2rem;
+ opacity: 0.9;
+ }
+
+ main {
+ max-width: 1200px;
+ margin: 0 auto;
+ padding: 2rem;
+ }
+
+ .drop-zone {
+ border: 3px dashed #ccd;
+ border-radius: var(--radius);
+ padding: 3rem;
+ text-align: center;
+ cursor: pointer;
+ transition: all 0.3s ease;
+ background: white;
+ }
+
+ .drop-zone:hover {
+ border-color: var(--primary);
+ background: #f8f9ff;
+ }
+
+ .icon {
+ font-size: 3rem;
+ margin-bottom: 1rem;
+ }
+
+ .model-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
+ gap: 1.5rem;
+ margin: 2rem 0;
+ }
+
+ .model-card {
+ background: white;
+ padding: 1.5rem;
+ border-radius: var(--radius);
+ box-shadow: var(--shadow);
+ cursor: pointer;
+ transition: transform 0.2s ease;
+ }
+
+ .model-card:hover {
+ transform: translateY(-3px);
+ }
+
+ .preview-container {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
+ gap: 2rem;
+ margin: 2rem 0;
+ }
+
+ .preview {
+ background: white;
+ padding: 1rem;
+ border-radius: var(--radius);
+ box-shadow: var(--shadow);
+ }
+
+ .image-preview {
+ width: 100%;
+ height: 300px;
+ background: #f0f2f5;
+ border-radius: calc(var(--radius) - 4px);
+ margin-top: 1rem;
+ }
+
+ .process-btn {
+ background: var(--primary);
+ color: white;
+ border: none;
+ padding: 1rem 2rem;
+ border-radius: var(--radius);
+ font-size: 1.1rem;
+ cursor: pointer;
+ width: 100%;
+ max-width: 300px;
+ margin: 2rem auto;
+ display: block;
+ transition: background 0.3s ease;
+ }
+
+ .process-btn:disabled {
+ background: #ccc;
+ cursor: not-allowed;
+ }
+
+ footer {
+ text-align: center;
+ padding: 2rem;
+ background: white;
+ margin-top: 3rem;
+ }
+
+ @media (max-width: 768px) {
+ h1 {
+ font-size: 2rem;
+ }
+
+ main {
+ padding: 1rem;
+ }
+
+ .model-grid {
+ grid-template-columns: 1fr;
+ }
+ }