Skip to content

Quantities of interest

compute_ccc(x, y, bias=True, use_pearson=False)

Compute the concordance correlation coefficient between two arrays x and y.

Parameters:

Name Type Description Default
x ndarray

First vector.

required
y ndarray

Second vector.

required
bias bool

Bias correction. Defaults to True.

True
use_pearson bool

Use Pearson correlation coefficient. Defaults to False.

False

Returns:

Name Type Description
float float

The concordance correlation coefficient.

compute_dice(y_true, y_pred)

Compute the Dice coefficient between y_true and y_pred.

Parameters:

Name Type Description Default
y_true ndarray

Ground truth mask.

required
y_pred ndarray

Predicted mask.

required

Returns:

Name Type Description
float float

The computed Dice coefficient.

compute_voxel_ccc(x_img, y_img, roi_img, bias=True, use_pearson=False)

Compute the voxel-wise concordance correlation coefficient between two NIfTI files.

Parameters:

Name Type Description Default
x_img Image3D

x image.

required
y_img Image3D

y image.

required
roi_img Image3D

ROI image.

required
bias bool

Bias correction. Defaults to True.

True
use_pearson bool

Use Pearson correlation coefficient. Defaults to False.

False

Returns:

Name Type Description
float float

Voxel-wise concordance correlation coefficient.

compute_voxel_dice(x_img, y_img, threshold=0.5)

Compute voxel-wise Dice coefficient between two NIfTI files.

Parameters:

Name Type Description Default
x_img Image3D

x image.

required
y_img Image3D

y image.

required
threshold float

Value to threshold on. Defaults to 0.5.

0.5

Returns:

Name Type Description
float float

Dice coefficient.

compute_voxel_ttc(x_img, carrying_capacity)

Compute voxel-wise total tumor cellularity (TTC) from a NIfTI file.

Parameters:

Name Type Description Default
x_img Image3D

Image3D object.

required
carrying_capacity float

Carrying capacity.

required

Returns:

Name Type Description
float float

Total tumor cellularity.

compute_voxel_ttv(x_img, threshold=0.5)

Compute voxel-wise total tumor volume (TTV) from a NIfTI file.

Parameters:

Name Type Description Default
x_img Image3D

Image3D object.

required
threshold float

Threshold for tumor detection. Defaults to 0.5.

0.5

Returns:

Name Type Description
float float

Total tumor volume.