superdsm.pipeline
- class superdsm.pipeline.LoadInput
Bases:
StageLoads the input image into the pipeline.
The loaded image
g_rawis made available as an input to the subsequent pipeline stages. However, ifconfig['histological'] == True(i.e. the hyperparameterhistologicalis set to True), theng_rawis converted to a brightness-inverse intensity image, and the original image is provided asg_rgbto the stages of the pipeline.In addition,
g_rawis normalized so that the intensities range from 0 to 1.- g_raw = None
- process(input_id, pipeline, config, status=None)
Processes the input fields of this stage of the pipeline.
This method implements a stage of the pipeline with the provided inputs and configuration parameters. It then returns the outputs produced by the stage.
- Parameters:
pipeline – The pipeline object that this stage is a part of.
config – The hyperparameters to be used for this stage.
status – A status object to report the progress of the computations.
**inputs – The fields of the pipeline read by this stage. Each key-value pair represents an input field and the corresponding value.
- Returns:
A dictionary containing the outputs of this stage. Each key-value pair in the dictionary represents an output field and the corresponding value.
- Raises:
NotImplementedError – If the method is not implemented by the subclass.
- class superdsm.pipeline.Pipeline(*args, **kwargs)
Bases:
Pipeline- configure(base_config, input_id, *args, img=None, **kwargs)
Automatically adopts hyperparameters by applying linear adoptation rules.
The hyperparameters are configured by the
create_config_entry()function, and the arguments (rules) are determined by callingstage.configure()for each stage.- Parameters:
base_config – The base hyperparameters to be used (not modified).
input_id – The identifier of the input data to adopt the hyperparameters for.
*args – Sequential arguments passed to
stage.configure().**kwargs – Keyword arguments passed to
stage.configure().
- Returns:
The adopted hyperparameters.
- process_image(g_raw, base_config, *args, **kwargs)