File size: 30,465 Bytes
390cffd | 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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pathology Analyzer - Agilisium Co-Lab</title>
<link rel="stylesheet" href="styles.css?v=2">
<link rel="stylesheet" href="analyzer.css?v=2">
</head>
<body>
<!-- Required Banner -->
<div class="info-banner" role="region" aria-label="Upload notice">
<div class="banner-content">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="2"/>
<line x1="12" y1="8" x2="12" y2="12" stroke="currentColor" stroke-width="2"/>
<line x1="12" y1="16" x2="12.01" y2="16" stroke="currentColor" stroke-width="2"/>
</svg>
<span>Upload de-identified images only</span>
</div>
</div>
<nav class="navbar site-nav nav--solid">
<div class="nav-container">
<div class="nav-logo">
<a href="index.html" class="logo-link">
<img src="newlogo.webp" alt="Agilisium Co-Lab" class="logo-icon">
<div class="logo-text">
<h1>Agilisium</h1>
<p class="subtitle">Co-Lab</p>
</div>
</a>
</div>
<div class="nav-links">
<a href="index.html" class="nav-link">Home</a>
<a href="analyzer.html" class="nav-link active" aria-current="page">Analyzer</a>
<a href="challenges.html" class="nav-link">Challenges</a>
</div>
<div class="nav-actions">
<button class="btn btn-outline">Log in</button>
</div>
</div>
</nav>
<main class="analyzer-main">
<!-- Hero Section -->
<div class="analyzer-hero">
<div class="container">
<div class="hero-content">
<h1 class="hero-title">AI-Powered Pathology Analysis</h1>
<p class="hero-subtitle">Upload your pathology images for instant cancer detection and treatment response prediction</p>
<!-- 3-Step Process Strip -->
<div class="process-strip">
<div class="process-step">
<div class="step-icon">📁</div>
<div class="step-text">
<div class="step-title">Upload</div>
<div class="step-desc">Choose your image</div>
</div>
</div>
<div class="process-arrow">→</div>
<div class="process-step">
<div class="step-icon">🔬</div>
<div class="step-text">
<div class="step-title">Analyze</div>
<div class="step-desc">AI processes image</div>
</div>
</div>
<div class="process-arrow">→</div>
<div class="process-step">
<div class="step-icon">🎯</div>
<div class="step-text">
<div class="step-title">Results</div>
<div class="step-desc">Get insights & trials</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<!-- Upload Interface -->
<div class="upload-section" id="uploadSection">
<div class="upload-zone" id="uploadZone" tabindex="0" role="button" aria-label="Upload pathology images">
<div class="upload-content">
<div class="upload-icon">
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.89 22 5.99 22H18C19.1 22 20 21.1 20 20V8L14 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M14 2V8H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M16 13H8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M16 17H8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M10 9H8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
<h2 class="upload-title">Drop your pathology images here</h2>
<p class="upload-subtitle">or click to browse multiple files</p>
<div class="upload-formats">
<span class="format-tag">PNG</span>
<span class="format-tag">JPEG</span>
<span class="format-tag">WSI</span>
</div>
<div class="upload-note">PNG/JPEG/WSI • Please de-identify before upload</div>
<button class="browse-button" id="browseButton" type="button" aria-label="Browse files">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M21 15V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V15" stroke="currentColor" stroke-width="2"/>
<polyline points="7,10 12,15 17,10" stroke="currentColor" stroke-width="2"/>
<line x1="12" y1="15" x2="12" y2="3" stroke="currentColor" stroke-width="2"/>
</svg>
Browse Files
</button>
</div>
<input type="file" id="fileInput" accept=".jpg,.jpeg,.png,.tiff" multiple aria-label="Select pathology image files">
</div>
<div class="file-preview" id="filePreview" style="display: none;">
<div class="preview-header">
<h3 class="preview-title">Selected Images</h3>
<div class="file-count" id="fileCount"></div>
</div>
<div class="preview-list" id="previewList">
<!-- Individual file previews will be added here -->
</div>
<div class="preview-actions">
<button class="btn btn-outline" id="addMoreFiles">
<span class="btn-icon">+</span>
Add More Images
</button>
<button class="btn btn-danger" id="clearAllFiles">
<span class="btn-icon">×</span>
Clear All
</button>
</div>
</div>
<button class="btn btn-primary analyze-btn" id="analyzeBtn" disabled>
<span class="btn-icon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9 12L11 14L15 10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="currentColor" stroke-width="2"/>
</svg>
</span>
<span class="btn-text">Analyze Images</span>
</button>
</div>
<!-- Loading State -->
<div class="loading-section" id="loadingSection" style="display: none;">
<div class="loading-content">
<div class="loading-header">
<div class="loading-spinner">
<div class="spinner-ring"></div>
</div>
<h2 class="loading-title">Analyzing your pathology images...</h2>
<p class="loading-subtitle">This may take a few moments while our AI processes the images</p>
</div>
<!-- Progress Bar -->
<div class="progress-container">
<div class="progress-bar">
<div class="progress-fill" id="progressFill"></div>
</div>
<div class="progress-text" id="progressText">Starting analysis...</div>
</div>
<!-- Progress Steps -->
<div class="progress-steps">
<div class="progress-step" id="step1">
<div class="step-indicator">
<div class="step-circle"></div>
</div>
<div class="step-content">
<div class="step-title">Image Preprocessing</div>
<div class="step-desc">Optimizing image quality and format</div>
</div>
</div>
<div class="progress-step" id="step2">
<div class="step-indicator">
<div class="step-circle"></div>
</div>
<div class="step-content">
<div class="step-title">Feature Extraction</div>
<div class="step-desc">Identifying cellular patterns and structures</div>
</div>
</div>
<div class="progress-step" id="step3">
<div class="step-indicator">
<div class="step-circle"></div>
</div>
<div class="step-content">
<div class="step-title">AI Classification</div>
<div class="step-desc">Analyzing cancer indicators and biomarkers</div>
</div>
</div>
<div class="progress-step" id="step4">
<div class="step-indicator">
<div class="step-circle"></div>
</div>
<div class="step-content">
<div class="step-title">Trial Matching</div>
<div class="step-desc">Finding relevant clinical trials</div>
</div>
</div>
</div>
</div>
</div>
<!-- Results Layout -->
<div class="results-section" id="resultsSection" style="display: none;">
<div class="results-header">
<div class="header-content">
<h1 class="results-title">Analysis Complete</h1>
<p class="results-subtitle">Your pathology image has been successfully analyzed</p>
</div>
<div class="action-buttons">
<button class="btn btn-primary" id="saveCase">
<span class="btn-icon">💾</span>
<span class="btn-text">Save Case</span>
</button>
<button class="btn btn-outline" id="createChallenge">
<span class="btn-icon">🎯</span>
<span class="btn-text">Create Challenge</span>
</button>
<button class="btn btn-outline" id="exportTrials">
<span class="btn-icon">📊</span>
<span class="btn-text">Export Trials</span>
</button>
<button class="btn btn-outline" id="analyzeAnother">
<span class="btn-icon">🔄</span>
<span class="btn-text">Analyze Another</span>
</button>
</div>
</div>
<div class="results-grid">
<!-- Left Panel - Image Viewer -->
<div class="image-panel">
<div class="image-card">
<div class="image-header">
<h3 class="image-title">Pathology Images</h3>
<div class="image-selector" id="imageSelector" style="display: none;">
<select id="imageSelect" class="image-select">
<!-- Options will be populated dynamically -->
</select>
</div>
<div class="image-actions">
<button class="image-action" id="zoomIn" title="Zoom In">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none">
<circle cx="11" cy="11" r="8" stroke="currentColor" stroke-width="2"/>
<path d="M21 21L16.65 16.65" stroke="currentColor" stroke-width="2"/>
<line x1="11" y1="8" x2="11" y2="14" stroke="currentColor" stroke-width="2"/>
<line x1="8" y1="11" x2="14" y2="11" stroke="currentColor" stroke-width="2"/>
</svg>
</button>
<button class="image-action" id="zoomOut" title="Zoom Out">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none">
<circle cx="11" cy="11" r="8" stroke="currentColor" stroke-width="2"/>
<path d="M21 21L16.65 16.65" stroke="currentColor" stroke-width="2"/>
<line x1="8" y1="11" x2="14" y2="11" stroke="currentColor" stroke-width="2"/>
</svg>
</button>
<button class="image-action" id="fitScreen" title="Fit to Screen">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none">
<path d="M8 3H5C3.9 3 3 3.9 3 5V8M21 8V5C21 3.9 20.1 3 19 3H16M16 21H19C20.1 21 21 20.1 21 19V16M3 16V19C3 20.1 3.9 21 5 21H8" stroke="currentColor" stroke-width="2"/>
</svg>
</button>
<button class="image-action" id="downloadOverlay" title="Download Heatmap">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none">
<path d="M21 15V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V15" stroke="currentColor" stroke-width="2"/>
<polyline points="7,10 12,15 17,10" stroke="currentColor" stroke-width="2"/>
<line x1="12" y1="15" x2="12" y2="3" stroke="currentColor" stroke-width="2"/>
</svg>
</button>
</div>
</div>
<div class="image-container">
<img id="analyzedImage" alt="Analyzed pathology image" />
<canvas id="heatmapOverlay"></canvas>
</div>
<div class="image-info">
<div class="info-item">
<span class="info-label">Filename:</span>
<span class="info-value" id="imageFileName">sample_breast_wsi.jpg</span>
</div>
<div class="info-item">
<span class="info-label">Resolution:</span>
<span class="info-value" id="imageResolution">2048×2048</span>
</div>
<div class="info-item">
<span class="info-label">Analyzed:</span>
<span class="info-value" id="analyzedTime">2 minutes ago</span>
</div>
</div>
</div>
<div class="heatmap-controls">
<div class="control-card">
<div class="control-header">
<h4 class="control-title">Heatmap Overlay</h4>
<label class="toggle-switch">
<input type="checkbox" id="heatmapToggle" checked>
<span class="toggle-slider"></span>
</label>
</div>
<div class="control-content">
<div class="slider-group">
<label for="opacitySlider" class="slider-label">Opacity</label>
<div class="slider-container">
<input type="range" id="opacitySlider" min="0" max="100" value="70" aria-label="Heatmap opacity">
<span class="slider-value" id="opacityValue">70%</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Right Panel - Results -->
<div class="results-panel">
<!-- Diagnosis Card -->
<div class="result-card diagnosis-card">
<div class="card-header">
<h3 class="card-title">Diagnosis</h3>
<div class="card-badge" id="diagnosisBadge">Cancer Detected</div>
</div>
<div class="card-content">
<div class="diagnosis-summary">
<div class="diagnosis-item">
<span class="item-label">Cancer Present:</span>
<span class="item-value positive" id="cancerStatus">Yes</span>
</div>
<div class="diagnosis-item">
<span class="item-label">Confidence:</span>
<span class="item-value confidence" id="confidenceValue">94.2%</span>
</div>
</div>
<div class="diagnosis-explanation" id="diagnosisExplanation">
Analysis indicates invasive ductal carcinoma with well-defined tumor boundaries. High cellular density and irregular nuclear morphology support malignant classification.
</div>
</div>
</div>
<!-- Chemo Response Card -->
<div class="result-card chemo-card">
<div class="card-header">
<h3 class="card-title">Treatment Response</h3>
<div class="card-badge positive" id="chemoBadge">Likely Responsive</div>
</div>
<div class="card-content">
<div class="chemo-summary">
<div class="chemo-item">
<span class="item-label">Chemotherapy Response:</span>
<span class="item-value likely" id="chemoResponse">Likely Responsive</span>
</div>
</div>
<div class="chemo-explanation" id="chemoExplanation">
Tumor characteristics suggest good response to standard chemotherapy protocols. High proliferation markers and hormone receptor status indicate favorable treatment outcomes.
</div>
</div>
</div>
<!-- Risk Assessment Card -->
<div class="result-card risk-card">
<div class="card-header">
<h3 class="card-title">Risk Assessment</h3>
<div class="card-badge high-risk" id="riskBadge">HIGH RISK</div>
</div>
<div class="card-content">
<div class="risk-summary">
<div class="risk-score">
<div class="score-circle">
<span class="score-value" id="riskScore">87</span>
<span class="score-label">/100</span>
</div>
<div class="score-details">
<div class="score-category" id="riskCategory">HIGH RISK</div>
<div class="score-description">Advanced stage with aggressive characteristics</div>
</div>
</div>
</div>
</div>
</div>
<!-- Clinical Trials Card -->
<div class="result-card trials-card">
<div class="card-header">
<h3 class="card-title">Matched Clinical Trials</h3>
<div class="card-badge">3 trials found</div>
</div>
<div class="card-content">
<div class="trial-filters">
<div class="filter-group">
<span class="filter-label">Phase:</span>
<div class="filter-chips">
<button class="filter-chip active" data-phase="all">All</button>
<button class="filter-chip" data-phase="1">Phase I</button>
<button class="filter-chip" data-phase="2">Phase II</button>
<button class="filter-chip" data-phase="3">Phase III</button>
</div>
</div>
<div class="filter-group">
<span class="filter-label">Status:</span>
<div class="filter-chips">
<button class="filter-chip active" data-status="all">All</button>
<button class="filter-chip" data-status="recruiting">Recruiting</button>
<button class="filter-chip" data-status="active">Active</button>
</div>
</div>
<div class="filter-group">
<span class="filter-label">Distance:</span>
<div class="filter-chips">
<button class="filter-chip active" data-distance="all">All</button>
<button class="filter-chip" data-distance="lt50">< 50 km</button>
<button class="filter-chip" data-distance="lt200">< 200 km</button>
<button class="filter-chip" data-distance="remote">Remote</button>
</div>
</div>
<div class="filter-group">
<span class="filter-label">Biomarkers:</span>
<div class="filter-chips">
<button class="filter-chip active" data-biomarker="all">All</button>
<button class="filter-chip" data-biomarker="her2">HER2+</button>
<button class="filter-chip" data-biomarker="erpr">ER/PR+</button>
<button class="filter-chip" data-biomarker="tnbc">TNBC</button>
</div>
</div>
</div>
<div class="trials-list" id="trialsList">
<!-- Trials will be populated by JavaScript -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- Footer Disclaimer -->
<footer class="disclaimer-footer" role="contentinfo">
<div class="container">
<p>Research/Education only — not a medical device</p>
</div>
</footer>
<!-- Create Challenge Modal -->
<div class="modal" id="createChallengeModal" role="dialog" aria-labelledby="challengeModalTitle" aria-hidden="true">
<div class="modal-content">
<div class="modal-header">
<h2 id="challengeModalTitle">Create New Challenge</h2>
<button class="modal-close" id="closeChallengeModal" aria-label="Close modal">×</button>
</div>
<div class="modal-body">
<form id="challengeForm">
<div class="form-group">
<label for="challengeTitle">Challenge Title</label>
<input type="text" id="challengeTitle" required placeholder="e.g., Breast Cancer Classification Challenge">
</div>
<div class="form-group">
<label for="challengeDescription">Description</label>
<textarea id="challengeDescription" required placeholder="Describe the challenge objectives and requirements..."></textarea>
</div>
<div class="form-group">
<label for="challengeDifficulty">Difficulty Level</label>
<select id="challengeDifficulty" required>
<option value="Beginner">Beginner</option>
<option value="Intermediate">Intermediate</option>
<option value="Advanced">Advanced</option>
<option value="Expert">Expert</option>
</select>
</div>
<div class="form-actions">
<button type="button" class="btn btn-secondary" id="cancelChallenge">Cancel</button>
<button type="submit" class="btn btn-primary">Create Challenge</button>
</div>
</form>
</div>
</div>
</div>
<!-- Success Toast -->
<div class="toast" id="toast" role="alert" aria-live="polite"></div>
<!-- Login Modal -->
<div id="loginModal" class="modal" style="display: none;">
<div class="modal-content">
<div class="modal-header">
<h2>Sign In Required</h2>
<button class="modal-close" id="modalClose" aria-label="Close modal">×</button>
</div>
<div class="modal-body">
<p>Please sign in to access this feature.</p>
<div class="modal-actions">
<a href="login.html" class="btn btn-primary">Sign In</a>
<button class="btn btn-secondary" id="demoLoginBtn">Login as Demo</button>
</div>
</div>
</div>
</div>
<script src="auth.js"></script>
<script src="script.js"></script>
<script src="analyzer.js"></script>
<script src="auth-ui.js"></script>
<script src="chatbot-helper.js"></script>
</body>
</html> |