Skip to content

Fix optional colony imports and 3-D rendering - #66

Draft
georgeoshardo wants to merge 3 commits into
mainfrom
fix/legacy-colony-3d
Draft

Fix optional colony imports and 3-D rendering#66
georgeoshardo wants to merge 3 commits into
mainfrom
fix/legacy-colony-3d

Conversation

@georgeoshardo

Copy link
Copy Markdown
Owner

What changed

  • defer Ray and CellModeller imports until their dependent methods are called, with feature-specific errors
  • write 2-D float renders as scaled 16-bit PNGs and use unique output indices
  • load simple fluorescence scenes from the fluorescence directory
  • compose instance masks by assignment so overlaps do not create synthetic labels and one-pixel cells remain labeled
  • use independent x/y offsets for rectangular scenes
  • return and crop the actual 3-D colony volume, including mixed-depth cells
  • default and validate 3-D PSF working distance, and reject 3-D kernels at the 2-D convolution boundary
  • preserve the z axis during colony rendering and normalize the completed volume globally

Why

The retained legacy colony paths failed to import unless Ray and CellModeller were installed, and several rendering branches could overwrite samples, lose labels or crop boundaries, return blank data, or mishandle 3-D shapes and normalization. Ray and CellModeller remain optional; this PR does not add heavyweight integration tests or dependencies.

Validation

  • pixi run pytest -q tests/test_colony_optional_dependencies.py tests/test_colony_rendering.py tests/test_psf_3d.py tests/test_renderer_mask_export.py tests/test_colony_overlap.py — 19 passed
  • pixi run pytest -q — 79 passed, with the existing GPU-backend fallback warning

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