photon_mosaic.rules.preprocessing#
Snakemake rule for preprocessing image data.
This module provides a function to run preprocessing on image data by directly importing preprocessing modules based on step names.
Functions
|
Run preprocessing on image data. |
- photon_mosaic.rules.preprocessing.run_preprocessing(output_path, config, dataset_folder=None, ses_idx=0, tiff_name=None)[source]#
Run preprocessing on image data.
- Parameters:
output_path (str) – Path to save the preprocessed image.
config (dict) – Configuration dictionary containing preprocessing step.
dataset_folder (str, optional) – Path to the dataset folder. This is needed for some preprocessing steps that require access to the dataset folder.
ses_idx (int, optional) – Session index to process. Default is 0.
tiff_name (str, optional) – Name of the TIFF file to process. Required for ‘noop’ and ‘contrast’ preprocessing steps.
- Returns:
The function saves the preprocessed data to the output path and returns nothing.
- Return type:
None
- Raises:
ValueError – If a preprocessing step cannot be found or imported.