Invertibility Module#
Module: pyradise.process.invertibility
General#
The invertibility module provides functionality to playback the Filter s of a
processing pipeline, if they are invertible. The given feature is helpful if the processing modified the spatial
properties of the input data that need to be restored (e.g. registration of the input data to an atlas before
DL-model inference).
Class Overview#
The following classes are provided by the invertibility module:
Class |
Description |
|---|---|
Parameterization class for the |
|
Filter to playback the filter operations applied to a |
Details#
- class PlaybackTransformTapeFilterParams(modalities=None, organ_annotator_combinations=None)[source]#
Bases:
FilterParamsA filter parameter class for the
PlaybackTransformTapeFilterclass.- Parameters:
modalities (Optional[Tuple[Union[str, Modality], ...]]) – A tuple of modalities for which the transform tape should be played back. If None, the transform tape will be played back for all modalities (default: None).
organ_annotator_combinations (Optional[Tuple[Union[Tuple[str, str], OrganRaterCombination], ...]]) – A tuple of organ-annotator combinations for which the transform tape should be played back. If None, the transform tape will be played back for all organ-annotator combinations (default: None).
- class PlaybackTransformTapeFilter(warning_on_non_invertible=False)[source]#
Bases:
FilterA filter class for playing back the transform tape of specific or all
Imageinstances of the providedSubjectinstance.This filter is helpful for restoring the spatial properties of the loaded data such that the output data of the processing pipeline has identical spatial properties as the input data.
- static is_invertible()[source]#
Return False because the filter is not invertible.
- Returns:
False.
- Return type:
bool
- execute(subject, params=None)[source]#
Execute the filter on the provided
Subjectinstance.- Parameters:
params (Optional[FilterParams]) – The filter parameters.
- Returns:
The
Subjectinstance with played back images.- Return type:
- execute_inverse(subject, transform_info, target_image=None)[source]#
Return the provided
Subjectinstance without any processing becauseTransformTapeplayback is not invertible.- Parameters:
transform_info (TransformInfo) – The
TransformInfoinstance.target_image (Optional[Union[SegmentationImage, IntensityImage]]) – The target image to which the inverse transformation should be applied. If None, the inverse transformation is applied to all images (default: None).
- Returns:
The provided
Subjectinstance.- Return type: