twocan.IFProcessor
- class twocan.IFProcessor(binarize=True, binarization_threshold=0.1, sigma=1)[source]
Bases:
objectPreprocessing pipeline for Immunofluorescence (IF) images.
This class provides a standardized preprocessing pipeline for IF images including channel summation, normalization, Gaussian blurring, and optional binarization. The processor can be configured with trial parameters from Optuna optimization.
- Parameters:
- configure(trial_params)[source]
Configure processor parameters from Optuna trial parameters.
This method updates the processor parameters based on values suggested by an Optuna trial. It looks for specific parameter names in the trial params dictionary and updates the corresponding attributes.
- Parameters:
trial_params (dict) – Dictionary of trial parameters from Optuna optimization. Expected keys: ‘IF_binarization_threshold’, ‘IF_gaussian_sigma’, ‘binarize_images’.
- Returns:
self – Returns self for method chaining.
- Return type: