eroded_wm_segmentation#
- petpal.preproc.segmentation_tools.eroded_wm_segmentation(input_segmentation_path: str, out_segmentation_path: str | None, eroded_wm_region_mapping: int = 1) ants.ANTsImage#
Generates eroded white matter region on a segmentation image and merges it into the image, saving result as a new segmentation image.
Requires FreeSurfer segmentation with original label mappings.
- Parameters:
input_segmentation_path (str) – Path to input freesurfer segmentation, such as aparc+aseg or wmparc.
out_segmentation_path (str) – Path to output segmentation image with replaced values in eroded whited matter region.
eroded_wm_region_mapping (int) – Segmentation mapping for the eroded white matter region in the output image. Default “1”.
- Returns:
seg_img (ants.ANTsImage) –
- Input segmentation image with values in eroded white matter
replaced with eroded_wm_region_mapping.
See also
vat_wm_ref_region()- function that generates theeroded white matter region.