io.convert_ROI_table_to_indices

io.convert_ROI_table_to_indices(ROI, pxl_sizes_zyx, cols_xyz_pos=['x_micrometer', 'y_micrometer', 'z_micrometer'], cols_xyz_len=['len_x_micrometer', 'len_y_micrometer', 'len_z_micrometer'])

Convert physical units in region-of-interest tables (ROI) to indices based on the given scale level.

Parameters

Name Type Description Default
ROI Name of the region of interest required
pxl_sizes_zyx Physical size of the zyx pixels in units given defined in multiscales (usually um) required
cols_xyz_pos Name of columns identifying the xyz positions ['x_micrometer', 'y_micrometer', 'z_micrometer']
cols_xyz_len Name of columns identifying the physical dimensions in xyz ['len_x_micrometer', 'len_y_micrometer', 'len_z_micrometer']

Returns

Type Description
dict[str, int] A dictionary with FOV names as keys and a list of starting and end pixel indices as [s_z, e_z, s_y, e_y, s_x, e_x].

Examples

>>> ROI_table = ad.read_zarr("plate.zarr/C/3/0/tables/FOV_ROI_table/")
>>> operetta_compose.io.convert_ROI_table_to_indices(ROI_table, [1.0, 1.195, 1.195])

Note:

Modified from https://github.com/fractal-analytics-platform/fractal-tasks-core/blob/main/fractal_tasks_core/roi/v1.py