write_image_strategy
A strategy writing whole images directly.
WriteImage #
Bases: WriteStrategy
A strategy for writing image predictions (i.e. un-tiled predictions).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
write_func | WriteFunc | Function used to save predictions. | required |
write_extension | str | Extension added to prediction file paths. | required |
write_func_kwargs | dict of {str: Any} | Extra kwargs to pass to | required |
Attributes:
| Name | Type | Description |
|---|---|---|
write_func | WriteFunc | Function used to save predictions. |
write_extension | str | Extension added to prediction file paths. |
write_func_kwargs | dict of {str: Any} | Extra kwargs to pass to |
Source code in src/careamics/lightning/dataset_ng/callbacks/prediction_writer/write_image_strategy.py
__init__(write_func, write_extension, write_func_kwargs) #
A strategy for writing image predictions (i.e. un-tiled predictions).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
write_func | WriteFunc | Function used to save predictions. | required |
write_extension | str | Extension added to prediction file paths. | required |
write_func_kwargs | dict of {str: Any} | Extra kwargs to pass to | required |
Source code in src/careamics/lightning/dataset_ng/callbacks/prediction_writer/write_image_strategy.py
write_batch(dirpath, predictions) #
Save full images.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dirpath | Path | Path to directory to save predictions to. | required |
predictions | list[ImageRegionData] | Decollated predictions. | required |