openlifu.seg.skinseg¶
Tools to get a skin surface from an MRI.
Example workflow, starting from
an MRI volume vol_array, as a numpy array
an associated 4x4 affine transform, as a numpy array
a desired spherical coordinate system origin location inside the volume (e.g. the sonication target)
foreground_mask_array = compute_foreground_mask(vol_array) foreground_mask_vtk_image = vtk_img_from_array_and_affine(foreground_mask_array, affine) skin_mesh = create_closed_surface_from_labelmap(foreground_mask_vtk_image) skin_interpolator = spherical_interpolator_from_mesh(skin_mesh, origin)
Functions
|
Get a 4x4 affine matrix out of a vtkImageData, a partial reverse to vtk_img_from_array_and_affine |
|
Apply an affine transform to a vtkPolyData. |
|
Given a 3D image array, return a boolean mask representing the "foreground." |
|
Create a surface mesh vtkPolyData from a binary labelmap vtkImageData. |
|
Create a spherical interpolator from a vtkPolyData. |
Given a boolean image array (or any integer numpy array), return a mask of the largest connected component. |
|
|
Convert a numpy (array, affine) pair into a vtkImageData. |