bioimageflow-common-tools

bioimageflow-common-tools is the small glue package for workflows that need sources, table loading, table joins, filtering, column selection, table export, simple channel extraction, label overlap checks, connected component labeling, or visual mosaics. It should stay lightweight and process orchestration-oriented; domain-heavy segmentation, restoration, spot, tracking, and large-format IO tools belong in their specialized packages.

Install-time libraries for the public tools are BioImageFlow, pandas, imageio, NumPy, and Pillow. ConnectedComponents uses SimpleITK and tifffile from its isolated EnvironmentSpec runtime rather than requiring them in the main process. The package is intended for users who need to assemble or inspect workflows without installing deep-learning dependencies.

Public Tools

  • Files: create a source table from an explicit file list or a directory scan.

  • TableFromCsv: load CSV or TSV metadata as a source table.

  • Generate: create a source table from literal values.

  • InnerJoin: merge upstream rows on their index.

  • CrossJoin: create all row combinations.

  • JoinOnColumn: join tables on a named column.

  • Concat: append rows from multiple tables.

  • Collect: collect ancestor columns into one table.

  • FilterTableRows: filter rows by a simple predicate.

  • SelectColumns: keep and optionally rename columns.

  • WriteTable: persist an upstream table to CSV or TSV.

  • ExtractChannel: write one channel from a channel-first image.

  • ConnectedComponents: label foreground components in a binary image.

  • LabelOverlaps: count pixel overlaps between label images.

  • Mosaic: build a grid image from workflow rows.

Demo Workflow

Tests and Demo Data

Package tests live in tests/ and can be run with:

uv run pytest packages/bioimageflow-common-tools/tests

Current fixtures are generated in temporary directories. The local tests/data/ folder is reserved for tiny tables or images when exact expected outputs are easier to review as files.

Detailed Pages