cyto_dl.image.io.bioio_loader module#
- class cyto_dl.image.io.bioio_loader.BioIOImageLoaderd(path_key: str = 'path', scene_key: str = 'scene', resolution_key: str = 'resolution', kwargs_keys: ~typing.List[str] = ['dimension_order_out', 'C', 'T'], out_key: str = 'raw', allow_missing_keys=False, dtype: ~numpy.dtype = <class 'numpy.float16'>, dask_load: bool = True, include_meta_in_filename: bool = False)[source]#
Bases:
Transform
Enumerates scenes and timepoints for dictionary with format.
{path_key: path, channel_key: channel, scene_key: scene, timepoint_key: timepoint}. Differs from monai_bio_reader in that reading kwargs are passed in the dictionary, instead of fixed at initialization. The filepath will be saved in the dictionary as ‘filename_or_obj’ (with or without metadata depending on include_meta_in_filename).
- Parameters:
path_key (str = “path”) – Key for the path to the image
scene_key (str = “scene”) – Key for the scene number
kwargs_keys (List = [“dimension_order_out”, “C”, “T”]) – Keys for the kwargs to pass to BioImage.get_image_dask_data. Values in the csv can be comma separated list.
out_key (str = “raw”) – Key for the output image
allow_missing_keys (bool = False) – Whether to allow missing keys in the data dictionary
dtype (np.dtype = np.float16) – Data type to cast the image to
dask_load (bool = True) – Whether to use dask to load images. If False, full images are loaded into memory before extracting specified scenes/timepoints.
include_meta_in_filename (bool = False) – Whether to include metadata in the filename. Useful when loading multi-dimensional images with different kwargs.