Model from MRI#

By building a model from segmented MRI, the general simulation pipeline stays the same (see here). What changes is:

  1. The volume mesh is created from a 3D image and not from surfaces (mdt.Tetrahedra.from_image()).

  2. Skin and muscle surfaces used to generate electrodes and muscle fibers are extracted from volume mesh (mdt.Tetrahedra.skin, mdt.Tetrahedra.muscles).

Labels#

The MRI segmentation should be represented as a NumPy array of integers with a shape of (A, B, C) that contains voxels whose values represent labelled tissues.

In each image one label should be used to identify skin, one for fat, several labels to identify bones and different muscles. One or more labels can be given to identify markers. Label 0 is reserved for void space (air).

User should provide information on which label in the image corresponds to which tissue type (see mdt.Image for details).

It’s often hard to segment skin layer from the MRI. In our current implementation, the skin layer is automatically generated as a boundary of the region of interest (bone , muscle and fat tissues) with a user defined thickness (2mm by default). Note, that even if there are no image voxels labeled as skin, the skin label should be provided by the user in a label dictionary when creating mdt.Image - this value will be used to the automatically generated skin.

Voxel size#

On top of the 3D image itself, the voxel sizes of the original MRI should be provides to create an mdt.Image object. When the axial size of the voxels is larger than the cross-sectional ones (which is usually the case with MRI), the image is automatically interpolated between slices to have a smoother geometry of the resulting volume mesh.

Extracted surfaces#

Because surfaces of muscles and skin are not provided directly by user, they are automatically extracted from a volume mesh. The attributes mdt.Tetrahedra.skin and mdt.Tetrahedra.muscles return mdt.Surface objects that can be used to generate electrodes and muscle fibers. Each surface now has the attribute mdt.Surface.image_label that allow user to identify muscles that they want to work with.

../_images/model_from_mri.png