cedalion.dot.tissue_properties

Tissue properties for light transport simulation.

Functions

get_tissue_properties(segmentation_masks, ...)

Assemble a tissue-property array for Monte Carlo light transport simulation.

Classes

TissueType(value)

Canonical tissue-type labels used to look up optical properties.

class cedalion.dot.tissue_properties.TissueType(value)[source]

Bases: Enum

Canonical tissue-type labels used to look up optical properties.

SKIN = 1[source]
SKULL = 2[source]
DM = 3[source]
CSF = 4[source]
GM = 5[source]
WM = 6[source]
OTHER = 7[source]
cedalion.dot.tissue_properties.get_tissue_properties(
segmentation_masks: DataArray,
wavelengths: list,
) ndarray[source]

Assemble a tissue-property array for Monte Carlo light transport simulation.

For each tissue type present in segmentation_masks the absorption, scattering, anisotropy, and refraction coefficients are looked up from the module-level dictionaries and stored in the output array. Index 0 is reserved for the background (vacuum).

Parameters:
  • segmentation_masks – xr.DataArray with dimension "segmentation_type" whose integer values encode tissue identity.

  • wavelengths – List of wavelengths for which properties are required. Currently the properties are wavelength-independent (FIXME).

Returns:

NumPy array of shape (n_tissues + 1, 4, n_wavelengths) where axis 1 encodes [absorption, scattering, anisotropy, refraction].

Raises:

ValueError – If a segmentation type string is not in TISSUE_LABELS.