Skip to content

feat: apply process_pixel conversion in segmenter and capture threshold value#3

Open
babo989 wants to merge 8 commits intomainfrom
feature/process-pixel-display
Open

feat: apply process_pixel conversion in segmenter and capture threshold value#3
babo989 wants to merge 8 commits intomainfrom
feature/process-pixel-display

Conversation

@babo989
Copy link
Collaborator

@babo989 babo989 commented Mar 19, 2026

Summary

  • Streaming TSV reader now detects whether the segmenter has already applied process_pixel conversion (via process_pixel_applied flag)
  • For legacy TSV files (segmented before the process_pixel fix), the reader converts measurements on-the-fly:
    • Linear columns (equivalent_diameter, width, height, major, minor, perim.) × process_pixel
    • Area columns (area) × process_pixel²
  • Chart nodes receive pre-converted data — zero changes needed downstream
  • Sets process_pixel_applied = 'dashboard' to mark conversion source

Dependencies

How it works

Legacy TSV (no flag)  →  reader converts px→µm  →  charts show µm
New TSV (flag set)    →  reader passes through   →  charts show µm
No process_pixel      →  reader passes through   →  charts show px (as before)

babo989 and others added 8 commits March 18, 2026 21:47
- Acq_ID supports leading zeros (text input + smart increment) (#903)
- Sample_ID as string + save confirmation snackbar (#889-893)
- Show project/sample/operator/gear in acquisition page (#894)
- Add flowcell size (µm) to magnification button labels (#901)
- Compose fully-qualified project_sample_acq IDs in update_config (#882)
- Space-to-underscore sanitization in IDs
- Gallery + Explorer URL path sanitization for legacy TSVs
- Replace direct deleteItem with confirmDelete + dialog
- Show acquisition and sample ID in confirmation prompt
- Warning that deletion cannot be undone
- set object_datetime also persists lat/lon if present
- set object_latlon also persists date/time if present
The start acquisition function read acq_nb_frame and acq_interframe_volume
from Node-RED globals, but the globals were written by a parallel message
path. When the user changed form values and clicked Start, the read happened
before the write, causing the acquisition to use stale values.

Fix: start acquisition now reads from msg.payload first (carried with the
command), falling back to globals for backwards compatibility.

handleAcqStatusChange explicitly passes acq values in the start message.
Replace full-file TSV loading with streaming columnar reader that extracts
only the 24 columns used by charts. Memory usage drops from ~500MB to ~9MB
for 56K-row datasets.

Chart node improvements:
- Scatter plots (heatmap, colorspace, aspect, greenness, complexity, texture)
  use reservoir sampling capped at 10K points
- Histograms (ESD, solidity) pass all values for accurate binning
- Gallery and explorer pre-sort by area descending and cap at 5K rows
- Timeline preserves full temporal resolution
…orer

The columnar streaming reader only extracts listed columns. The blur metric
was missing, causing Sort by Sharpest to have no effect in the gallery and
explorer views.
Streaming reader detects legacy TSVs (no process_pixel_applied flag) and
converts linear measurements by px and area measurements by px² before
passing to chart nodes. Companion to PlanktoScope segmenter PR.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@babo989 babo989 changed the title feat: backward-compat process_pixel conversion for legacy TSV data feat: apply process_pixel conversion in segmenter and capture threshold value Mar 19, 2026
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