Skip to content

Compose

Source

A class chaining transforms together.

Compose

A class chaining transforms together.

Parameters:

Name Type Description Default
transform_list list[TransformConfig]

A list of dictionaries where each dictionary contains the name of a transform and its parameters.

required

Attributes:

Name Type Description
_callable_transforms Callable

A callable that applies the transforms to the input data.

transform_with_additional_arrays(patch, target=None, **additional_arrays)

Apply the transforms to the input data, including additional arrays.

Parameters:

Name Type Description Default
patch ndarray

The input data.

required
target Optional[ndarray]

Target data, by default None.

None
**additional_arrays NDArray

Additional arrays that will be transformed identically to patch and target.

{}

Returns:

Type Description
NDArray

The transformed patch.

NDArray | None

The transformed target.

dict of {str, NDArray}

Transformed additional arrays. Keys correspond to the keyword argument names.

get_all_transforms()

Return all the transforms accepted by CAREamics.

Returns:

Type Description
dict

A dictionary with all the transforms accepted by CAREamics, where the keys are the transform names and the values are the transform classes.