Skip to content

Cellularity estimation

ADC_to_cellularity(ADC, roi_enhance, roi_nonenhance=None)

Converts an ADC map to a cellularity map using region of interest (ROI) masks.

This function calculates the cellularity for enhancing and non-enhancing regions based on the apparent diffusion coefficient (ADC) values. Cellularity for non-enhancing regions is set to a fixed literature-based constant.

Parameters:

Name Type Description Default
ADC Image3D

The measured apparent diffusion coefficient (ADC) map.

required
roi_enhance Image3D

Binary mask for enhancing regions (e.g., tumors).

required
roi_nonenhance Image3D

Binary mask for non-enhancing regions.

None

Returns:

Name Type Description
Image3D T

The computed cellularity map, normalized between 0 and 1.

Raises:

Type Description
AssertionError

If input images have mismatched shape or spacing.

compute_carrying_capacity(brain_mask, cell_size_mm=1e-06, packing_fraction=0.75)

Computes the physical carrying capacity (maximum number of cells) for a voxel.

The carrying capacity is calculated based on the voxel volume, a packing fraction, and the average size of a cell.

Parameters:

Name Type Description Default
brain_mask Image3D

Binary mask of the brain region.

required
cell_size_mm float

Average cell size in mm³. Default is 1e-6 mm³.

1e-06
packing_fraction float

Fraction of voxel space occupied by cells. Default is 0.75.

0.75

Returns:

Name Type Description
float float

The carrying capacity for a single voxel (cells per voxel).

Raises:

Type Description
ValueError

If the unit of the brain mask spacing is invalid.