Skip to content

Conversation

@PaulHax
Copy link
Collaborator

@PaulHax PaulHax commented Nov 29, 2025

Adds support for sparse state file manifests - JSON state files that reference external data via URIs instead of embedding everything in a zip archive. Also includes bug fixes for labelmaps with different direction matrices and tool interaction improvements.

Features

  • Hovering mouse over tool interiors shows tooltip: For rectangle and polygons tools, mouse in the middle shows label and metadata
  • Standalone JSON state files: Load *.volview.json manifests that reference remote datasets
  • Remote segment group URIs: Segment groups can now reference external files in state manifests

Bug Fixes

  • Labelmap direction matrix mismatch: Fixed paint tool and slice rendering when segment group has different orientation than parent image
  • Tool hover labels: Show tooltips while placing ruler, rectangle, and polygon tools
  • Polygon/rectangle fills: Prevent segment group overlay from blocking tool fill picking
  • URL params: Don't split URLs containing commas in query strings
  • Scalar probe: Use world coordinates to sample images with different orientations

Refactoring

  • Renamed labelMaps to segmentGroups in state file schema (v6.2.0)

Base automatically changed from deps to main November 30, 2025 17:30
Skip selecting tools when ruler, rectangle, or polygon tool is active.
This prevents bugs when clicking on existing tools while placing new ones.
@netlify
Copy link

netlify bot commented Nov 30, 2025

Deploy Preview for volview-dev ready!

Name Link
🔨 Latest commit 0cc85d6
🔍 Latest deploy log https://app.netlify.com/projects/volview-dev/deploys/6930a39a3aa6ee00081a88ad
😎 Deploy Preview https://deploy-preview-827--volview-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Enable loading state files with minimal manifest.json containing just
dataSources and optional tools. Made most manifest fields optional so
Python tooling can generate session files without specifying layouts,
views, or other defaults. Views now auto-assign the first loaded dataset
when viewByID is not provided.
…tion

- Show error messages when data sources fail to load during state restoration
- Support multiple volumes from a single data source (e.g., DICOM folders)
- Use getURLBasename for consistent name extraction with URL params flow
Integrate state file restoration into the main importDataSources pipeline
for better parallel streaming support. Uses 3-phase restoration:
- Phase 1: Set up view layout immediately (without data bindings)
- Phase 2: Bind views incrementally as each data leaf completes
- Phase 3: Restore tools, segments, and layers after all data loaded

Key changes:
- Remove duplicate resolvingHandlers chain from restoreStateFile
- Add StateFileContext to track restoration progress across pipeline
- Add stateFileLeaf metadata to data sources for tracking
- Add deserializeLayout() and bindViewsToData() to view store
- Handle URI fallback when archives can't be deserialized directly
… test

- Move writeManifestToZip and openVolViewPage to shared utils.ts
- Add browser.reloadSession() between tests to avoid stale element issues
- Use waitForDisplayed instead of waitUntil polling loop
- Fix remote-manifest test to not use openVolViewPage for failure case
Replace complex rebuildDataSources() with simpler resolveToLeafSources()
that walks the serialized DAG to find importable leaf sources (URIs or
files) without reconstructing the full runtime DataSource tree.
Replace StateFileContext callbacks with StateFileSetupResult type.
State file restoration now collects results and completes at end of
import instead of tracking pending counts with callbacks.
DICOM SEG images don't pre-allocate vtkImageData like regular DICOM,
so getVtkImageData() could return empty data causing volume renderer
to crash on null scalar texture.
State files can now be loaded as plain JSON files, not just zipped.
This enables simpler workflows when data is referenced via URIs.
Paint strokes now convert world coordinates to index space using the
labelmap's worldToIndex matrix instead of the parent image's. This fixes
painting at wrong locations when segment groups have different direction
matrices than their parent image.
Add coordinate transformation utilities and fix tools to use
labelmap's own coordinate system instead of assuming it matches
the parent image. Fixes paint, polygon rasterization, slice
rendering, and scalar probe when segment groups have different
direction matrices than the base image.
Verifies paint tool works correctly on coronal view when the segment
group has a different direction matrix than the parent image (e.g.,
TotalSegmenter output). Also refactors shared manifest to configTestUtils.
- Rename LabelMap schema to SegmentGroup
- Rename labelMaps field to segmentGroups in ManifestSchema
- Add migrate610To620 migration for backwards compatibility
- Update MANIFEST_VERSION to 6.2.0
- Delete unused 3.0.0 test fixture
- Add session-state-lifecycle.e2e.ts testing 5.0.1 manifest migration
- Verify rectangle, polygon, and labelmap->segmentGroup migration
- Test label strokeWidth persistence through save/load cycle
- Use minimal DICOM fixture for faster test execution
- Remove old session-zip.e2e.ts (was excluded from test suite)
@PaulHax PaulHax changed the title feat(tools): hover over tool fill shows tooltip Hover over tool fill shows tooltips and Sparse state file Dec 3, 2025
@PaulHax PaulHax added this pull request to the merge queue Dec 3, 2025
Merged via the queue into main with commit edb49dd Dec 3, 2025
7 checks passed
@PaulHax PaulHax deleted the tooltips branch December 3, 2025 21:09
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