recon_surf.align_seg¶
- recon_surf.align_seg.align_flipped(seg, mid_slice=None)[source]¶
Register selected cortical labels with left-right flipped (make upright).
- Parameters:
- seg
sitk.Image Segmentation Image. Should be aparc+aseg (DKT or not).
- mid_slice
Optional[float] Where the mid slice will be in upright space. Defaults to (width-1)/2.
- seg
- Returns:
TsqrtRAS2RAS transformation matrix for registration.
- recon_surf.align_seg.align_seg_centroids(seg_mov, seg_dst, label_ids=None, affine=False)[source]¶
Align the segmentations based on label centroids (rigid is default).
- Parameters:
- Returns:
TAligned centroids RAS2RAS transform.
- recon_surf.align_seg.get_seg_centroids(seg_mov, seg_dst, label_ids=None)[source]¶
Extract the centroids of the segmentation labels for mov and dst in RAS coords.
- Parameters:
- seg_mov
sitk.Image Source segmentation image.
- seg_dst
sitk.Image Target segmentation image.
- label_ids
Optional[npt.NDArray[int]] List of label ids to extract (Default value = []).
- seg_mov
- Returns:
centroids_movList of centroids of source segmentation.
centroids_dstList of centroids of target segmentation.