Changes to enhance-mri.scroll.pub

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

MRI Enhancement Suite

+

Advanced image quality enhancement for medical imaging

+
+
+
+
+
+
+

Drop NII File Here

+

or

+
+
+
+
+
+
+

Enhancement Model

+
+
+

Super Resolution

+

4x resolution enhancement

+
+
+

Denoising

+

Advanced noise reduction

+
+
+

Contrast Enhancement

+

Improved tissue contrast

+
+
+
+
+
+

Preview

+
+
+

Original

+
+
+
+

Enhanced

+
+
+
+
+
+
+
+

Built for medical imaging professionals

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://enhance-mri.scroll.pub
+ metaTags
+ title MRI Enhancement Suite
+ description Advanced MRI image quality enhancement web application
+ keywords mri, image enhancement, medical imaging, ai models
+ editButton /edit.html
+ title MRI Enhancement Suite
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "msg_01HhcZqtmPBwyRNQ2nP8ixa5",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "I'll create a sleek webapp for MRI image enhancement. For the domain, I suggest:\n\n---domain---\nenhance-mri.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://enhance-mri.scroll.pub\nmetaTags\n title MRI Enhancement Suite\n description Advanced MRI image quality enhancement web application\n keywords mri, image enhancement, medical imaging, ai models\neditButton /edit.html\ntitle MRI Enhancement Suite\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n
\n

MRI Enhancement Suite

\n

Advanced image quality enhancement for medical imaging

\n
\n\n
\n
\n
\n \"\"\n

Drop NII File Here

\n

or

\n \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
\n

Built for medical imaging professionals

\n
\n\n---style.css---\n:root {\n --primary-color: #2a6bf2;\n --secondary-color: #1a1b4b;\n --accent-color: #4cd7f6;\n --background: #f8fafc;\n --text-color: #1a1b4b;\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 line-height: 1.6;\n color: var(--text-color);\n background: var(--background);\n}\n\nheader {\n background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));\n color: white;\n padding: 2rem;\n text-align: center;\n box-shadow: 0 4px 6px rgba(0,0,0,0.1);\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: 2rem auto;\n padding: 0 1rem;\n}\n\n.drop-zone {\n border: 3px dashed var(--primary-color);\n border-radius: 1rem;\n padding: 3rem;\n text-align: center;\n background: white;\n transition: all 0.3s ease;\n cursor: pointer;\n}\n\n.drop-zone:hover {\n background: rgba(42,107,242,0.05);\n}\n\n.upload-icon {\n width: 64px;\n height: 64px;\n margin-bottom: 1rem;\n}\n\n.upload-btn {\n background: var(--primary-color);\n color: white;\n border: none;\n padding: 0.8rem 2rem;\n border-radius: 2rem;\n font-size: 1.1rem;\n cursor: pointer;\n transition: transform 0.2s ease;\n}\n\n.upload-btn:hover {\n transform: scale(1.05);\n}\n\n.model-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 1.5rem;\n margin-top: 2rem;\n}\n\n.model-card {\n background: white;\n padding: 1.5rem;\n border-radius: 1rem;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n cursor: pointer;\n transition: all 0.3s ease;\n}\n\n.model-card:hover {\n transform: translateY(-4px);\n box-shadow: 0 4px 8px rgba(0,0,0,0.2);\n}\n\n.model-card.selected {\n border: 2px solid var(--primary-color);\n}\n\n.preview-section {\n margin-top: 3rem;\n}\n\n.preview-container {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2rem;\n margin-top: 1rem;\n}\n\ncanvas {\n width: 100%;\n height: auto;\n border-radius: 0.5rem;\n background: white;\n}\n\nfooter {\n text-align: center;\n padding: 2rem;\n background: var(--secondary-color);\n color: white;\n margin-top: 4rem;\n}\n\n@media (max-width: 768px) {\n .preview-container {\n grid-template-columns: 1fr;\n }\n \n h1 {\n font-size: 2rem;\n }\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const dropZone = document.getElementById('dropZone');\n const fileInput = document.getElementById('fileInput');\n const modelCards = document.querySelectorAll('.model-card');\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(--accent-color)';\n });\n\n dropZone.addEventListener('dragleave', () => {\n dropZone.style.borderColor = 'var(--primary-color)';\n });\n\n dropZone.addEventListener('drop', (e) => {\n e.preventDefault();\n dropZone.style.borderColor = 'var(--primary-color)';\n handleFile(e.dataTransfer.files[0]);\n });\n\n fileInput.addEventListener('change', (e) => {\n handleFile(e.target.files[0]);\n });\n\n // Model selection\n modelCards.forEach(card => {\n card.addEventListener('click', () => {\n modelCards.forEach(c => c.classList.remove('selected'));\n card.classList.add('selected');\n selectedModel = card.dataset.model;\n \n if (fileInput.files.length > 0) {\n processImage(fileInput.files[0], selectedModel);\n }\n });\n });\n\n function handleFile(file) {\n if (!file) return;\n \n if (!file.name.endsWith('.nii') && !file.name.endsWith('.nii.gz')) {\n alert('Please upload a valid NII file');\n return;\n }\n\n document.querySelector('.preview-section').hidden = false;\n \n if (selectedModel) {\n processImage(file, selectedModel);\n }\n }\n\n function processImage(file, model) {\n // This is a demo placeholder for image processing\n // In a real implementation, this would send the file to a backend server\n console.log(`Processing ${file.name} with model: ${model}`);\n \n // Simulate processing delay\n setTimeout(() => {\n const originalCanvas = document.getElementById('originalCanvas');\n const enhancedCanvas = document.getElementById('enhancedCanvas');\n \n // Demo visualization (replace with actual image processing)\n drawDemoImage(originalCanvas, 'original');\n drawDemoImage(enhancedCanvas, 'enhanced');\n }, 1000);\n }\n\n function drawDemoImage(canvas, type) {\n const ctx = canvas.getContext('2d');\n canvas.width = 400;\n canvas.height = 400;\n \n ctx.fillStyle = type === 'original' ? '#eee' : '#ddf';\n ctx.fillRect(0, 0, 400, 400);\n \n ctx.fillStyle = '#333';\n ctx.font = '20px sans-serif';\n ctx.textAlign = 'center';\n ctx.fillText(`${type} Image Preview`, 200, 200);\n }\n});\n\n---end---\n\nThis implementation provides a beautiful, responsive interface for uploading and enhancing MRI images. Key features include:\n\n1. Drag-and-drop file upload with visual feedback\n2. Three enhancement model options with attractive hover effects\n3. Side-by-side preview section\n4. Smooth animations and transitions\n5. Professional color scheme\n6. Mobile-responsive design\n7. Accessible semantic HTML\n8. Clean, modular JavaScript\n\nThe design uses a modern, medical-themed color palette with a gradient header and subtle shadows for depth. The interface is intuitive and provides visual feedback for all user interactions.\n\nNote: This is a frontend demo - in a real implementation, you'd need to add backend integration for actual image processing."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 306,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2556
+ }
+ }
readme.scroll
Changed around line 1
+ # enhance-mri.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 modelCards = document.querySelectorAll('.model-card');
+ let selectedModel = null;
+
+ // File upload handling
+ dropZone.addEventListener('click', () => fileInput.click());
+
+ dropZone.addEventListener('dragover', (e) => {
+ e.preventDefault();
+ dropZone.style.borderColor = 'var(--accent-color)';
+ });
+
+ dropZone.addEventListener('dragleave', () => {
+ dropZone.style.borderColor = 'var(--primary-color)';
+ });
+
+ dropZone.addEventListener('drop', (e) => {
+ e.preventDefault();
+ dropZone.style.borderColor = 'var(--primary-color)';
+ handleFile(e.dataTransfer.files[0]);
+ });
+
+ fileInput.addEventListener('change', (e) => {
+ handleFile(e.target.files[0]);
+ });
+
+ // Model selection
+ modelCards.forEach(card => {
+ card.addEventListener('click', () => {
+ modelCards.forEach(c => c.classList.remove('selected'));
+ card.classList.add('selected');
+ selectedModel = card.dataset.model;
+
+ if (fileInput.files.length > 0) {
+ processImage(fileInput.files[0], selectedModel);
+ }
+ });
+ });
+
+ function handleFile(file) {
+ if (!file) return;
+
+ if (!file.name.endsWith('.nii') && !file.name.endsWith('.nii.gz')) {
+ alert('Please upload a valid NII file');
+ return;
+ }
+
+ document.querySelector('.preview-section').hidden = false;
+
+ if (selectedModel) {
+ processImage(file, selectedModel);
+ }
+ }
+
+ function processImage(file, model) {
+ // This is a demo placeholder for image processing
+ // In a real implementation, this would send the file to a backend server
+ console.log(`Processing ${file.name} with model: ${model}`);
+
+ // Simulate processing delay
+ setTimeout(() => {
+ const originalCanvas = document.getElementById('originalCanvas');
+ const enhancedCanvas = document.getElementById('enhancedCanvas');
+
+ // Demo visualization (replace with actual image processing)
+ drawDemoImage(originalCanvas, 'original');
+ drawDemoImage(enhancedCanvas, 'enhanced');
+ }, 1000);
+ }
+
+ function drawDemoImage(canvas, type) {
+ const ctx = canvas.getContext('2d');
+ canvas.width = 400;
+ canvas.height = 400;
+
+ ctx.fillStyle = type === 'original' ? '#eee' : '#ddf';
+ ctx.fillRect(0, 0, 400, 400);
+
+ ctx.fillStyle = '#333';
+ ctx.font = '20px sans-serif';
+ ctx.textAlign = 'center';
+ ctx.fillText(`${type} Image Preview`, 200, 200);
+ }
+ });
style.css
Changed around line 1
+ :root {
+ --primary-color: #2a6bf2;
+ --secondary-color: #1a1b4b;
+ --accent-color: #4cd7f6;
+ --background: #f8fafc;
+ --text-color: #1a1b4b;
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: system-ui, -apple-system, sans-serif;
+ line-height: 1.6;
+ color: var(--text-color);
+ background: var(--background);
+ }
+
+ header {
+ background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
+ color: white;
+ padding: 2rem;
+ text-align: center;
+ box-shadow: 0 4px 6px rgba(0,0,0,0.1);
+ }
+
+ h1 {
+ font-size: 2.5rem;
+ margin-bottom: 0.5rem;
+ }
+
+ .tagline {
+ font-size: 1.2rem;
+ opacity: 0.9;
+ }
+
+ main {
+ max-width: 1200px;
+ margin: 2rem auto;
+ padding: 0 1rem;
+ }
+
+ .drop-zone {
+ border: 3px dashed var(--primary-color);
+ border-radius: 1rem;
+ padding: 3rem;
+ text-align: center;
+ background: white;
+ transition: all 0.3s ease;
+ cursor: pointer;
+ }
+
+ .drop-zone:hover {
+ background: rgba(42,107,242,0.05);
+ }
+
+ .upload-icon {
+ width: 64px;
+ height: 64px;
+ margin-bottom: 1rem;
+ }
+
+ .upload-btn {
+ background: var(--primary-color);
+ color: white;
+ border: none;
+ padding: 0.8rem 2rem;
+ border-radius: 2rem;
+ font-size: 1.1rem;
+ cursor: pointer;
+ transition: transform 0.2s ease;
+ }
+
+ .upload-btn:hover {
+ transform: scale(1.05);
+ }
+
+ .model-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
+ gap: 1.5rem;
+ margin-top: 2rem;
+ }
+
+ .model-card {
+ background: white;
+ padding: 1.5rem;
+ border-radius: 1rem;
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+ cursor: pointer;
+ transition: all 0.3s ease;
+ }
+
+ .model-card:hover {
+ transform: translateY(-4px);
+ box-shadow: 0 4px 8px rgba(0,0,0,0.2);
+ }
+
+ .model-card.selected {
+ border: 2px solid var(--primary-color);
+ }
+
+ .preview-section {
+ margin-top: 3rem;
+ }
+
+ .preview-container {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 2rem;
+ margin-top: 1rem;
+ }
+
+ canvas {
+ width: 100%;
+ height: auto;
+ border-radius: 0.5rem;
+ background: white;
+ }
+
+ footer {
+ text-align: center;
+ padding: 2rem;
+ background: var(--secondary-color);
+ color: white;
+ margin-top: 4rem;
+ }
+
+ @media (max-width: 768px) {
+ .preview-container {
+ grid-template-columns: 1fr;
+ }
+
+ h1 {
+ font-size: 2rem;
+ }
+ }