sample_image#

Workflow for sampling cell ids from an image.

Working location structure:

(name)
├── images
│   └── (name)_(key).(extension)
├── plots
│   └── plots.SAMPLE
│       └── (name)_(key)_C(channel)_R(resolution).SAMPLE.png
└── samples
    └── samples.RAW
        └── (name)_(key)_C(channel)_R(resolution).RAW.csv

Input images to be sampled are loaded from images. Resulting image sample(s) are placed into samples.RAW and corresponding contact sheet(s) are placed into plots.SAMPLE.

Flows

run_flow

Main sample image flow.

run_flow(context: ContextConfig, series: SeriesConfig, parameters: ParametersConfig) None[source]#

Main sample image flow.

Configs

ContextConfig

Context configuration for sample image flow.

ParametersConfig

Parameter configuration for sample image flow.

SeriesConfig

Series configuration for sample image flow.

class ContextConfig[source]#

Context configuration for sample image flow.

working_location: str#

Location for input and output files (local path or S3 bucket).

class ParametersConfig[source]#

Parameter configuration for sample image flow.

key: str#

Image key to sample.

channels: list[int]#

Image channels to sample.

grid: str = 'rect'#

Type of sampling grid (rect = rectangular, hex = hexagonal).

coordinate_type: str | None = None#

Coordinate scaling type (None = unscaled, absolute = in um, step = by step size).

resolution: float = 1.0#

Distance between samples in um.

scale_xy: float = 0.108333#

Resolution scaling in x/y in um/pixel.

scale_z: float = 0.29#

Resolution scaling in z in um/pixel.

extension: str = '.ome.tiff'#

Image extension.

contact_sheet: bool = True#

True to save contact sheet of processed samples, False otherwise.

class SeriesConfig[source]#

Series configuration for sample image flow.

name: str#

Name of the simulation series.