Skip to content

binding

binding

DCE binding adapter for the shared fitting infrastructure.

BoundDCEModel wraps a BasePerfusionModel together with time and AIF arrays, producing a FittableModel that the shared fitter can use without knowing about DCE-specific context.

BoundDCEModel

BoundDCEModel(model, t, aif, fixed=None)

Bases: BaseBoundModel

DCE model with time and AIF bound.

Wraps a BasePerfusionModel so the fitter only sees predict_array_batch(free_params) -> output.

PARAMETER DESCRIPTION
model

DCE pharmacokinetic model.

TYPE: BasePerfusionModel

t

Time points in seconds.

TYPE: NDArray

aif

Arterial input function concentration.

TYPE: NDArray

fixed

Parameters to fix at constant values during fitting.

TYPE: dict[str, float] | None DEFAULT: None

ensure_device

ensure_device(xp)

Transfer time and AIF arrays to the target device.

predict_array_batch

predict_array_batch(free_params_batch, xp)

Predict tissue concentration for a batch of voxels.

PARAMETER DESCRIPTION
free_params_batch

Free parameter values, shape (n_free, n_voxels).

TYPE: NDArray

xp

Array module.

TYPE: module

RETURNS DESCRIPTION
NDArray

Predicted concentrations, shape (n_time, n_voxels).

get_initial_guess_batch

get_initial_guess_batch(observed_batch, xp)

Get initial parameter guesses for a batch of voxels.

Delegates to the DCE model's get_initial_guess_batch and filters out fixed parameters.

PARAMETER DESCRIPTION
observed_batch

Observed data, shape (n_time, n_voxels).

TYPE: NDArray

xp

Array module.

TYPE: module

RETURNS DESCRIPTION
NDArray

Initial guesses, shape (n_free, n_voxels).

compute_jacobian_batch

compute_jacobian_batch(params_batch, predicted, xp)

DCE uses numerical Jacobian (convolution models).