Skip to content

Epic: Spatial visualization for fNIRS and intracranial EEG #537

Open

Description

@nemarAdmin

Goal

Add a scientifically faithful spatial workbench for fNIRS and intracranial EEG, linked to NEMAR's existing signal viewer. Support fNIRS source-detector layouts, depth-electrode contacts and surface grids/strips without inventing missing anatomy or geometry. Build our own integrated interface, using prior platforms as references rather than copying their assets.

Phases

  1. Establish spatial metadata contracts, coordinate provenance and real-data coverage.
  2. Render fNIRS sources, detectors and channels linked to signals.
  3. Render depth electrodes and surface grids/strips linked to iEEG channels.
  4. Add optional, authorized anatomy and verified coordinate transforms.
  5. Deliver linked interaction, accessibility and performance gates.
  6. Validate representative datasets and publish concise usage documentation.

Each phase is an independently tested and reviewed PR into an epic branch based on staging. Follow AGENTS.md, the viewer architecture and the epic-dev workflow; plan each phase before coding. The final epic merge and production release remain separate decisions.

Invariants

  • Reuse NEMAR's existing viewer, metadata and stable data-plane routes. New backend fields require an explicit backend issue, not frontend fabrication.
  • Coordinates need documented units, coordinate system, origin, provenance and transformations. Missing or ambiguous geometry shows a clear unavailable state, never a guessed brain placement.
  • Distinguish template from subject anatomy and measured contacts from projections. No clinical interpretation or implied localization accuracy.
  • Multiple fNIRS wavelengths may share a source-detector pair; bipolar iEEG channels reference two contacts. Channel-to-geometry mappings must preserve these distinctions.
  • Anatomy is optional and must be authorized for use. No patient-identifying assets or unsupported access expansion.
  • Light and dark themes, keyboard operation, no-WebGL/error recovery, bounded loading and recording changes are acceptance gates.
  • Test with real, authorized source data and traceable coordinate fixtures under repository rules. Synthetic illustrative layouts are not scientific validation.

Dependencies and related work

Check existing viewer work #256 and #261 before implementation; coordinate with eegdash/eegdash-viewer and eegdash/electrodes rather than duplicating their public interfaces. First phase establishes exact ownership and files from current source. Backend spatial requirements are linked before implementation.

Phase issue tracker

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions