Skip to content

Comments

feat: glob-based overlay discovery via OVERLAY_PATTERN#28

Open
PABannier wants to merge 1 commit intomainfrom
feat/glob-overlay-discovery
Open

feat: glob-based overlay discovery via OVERLAY_PATTERN#28
PABannier wants to merge 1 commit intomainfrom
feat/glob-overlay-discovery

Conversation

@PABannier
Copy link
Owner

Summary

  • Add OVERLAY_PATTERN env var to discover overlay files across arbitrary nested directory structures using glob patterns
  • At startup, the server scans matching paths and builds a HashMap<String, PathBuf> index (slide ID → overlay file path)
  • Strips known slide extensions (.svs, .ndpi, etc.) from parent directory names so overlay IDs match slide IDs
  • When OVERLAY_PATTERN is unset, existing OVERLAY_DIR behavior is preserved unchanged

Usage

docker run -p 8080:8080 \
  -v ~/slides:/slides \
  -v /data/cell_masks:/overlays \
  -e OVERLAY_PATTERN="/overlays/**/*/cell_masks.bin" \
  pathcollab:latest

Test plan

  • cargo check compiles
  • cargo test — all 65 tests pass (28 unit + 37 integration)
  • Manual: Docker image built and tested with real cell masks directory

🤖 Generated with Claude Code

Allow overlays to live in arbitrary nested directory structures (e.g.
cell_masks/<cohort>/<slide>.svs/cell_masks.bin) by specifying a glob
pattern. The server scans at startup, builds a slide_id → path index,
and strips known slide extensions (.svs, .ndpi, etc.) so overlay IDs
match slide IDs. When OVERLAY_PATTERN is unset, existing OVERLAY_DIR
behavior is preserved unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant