CorpusCallosum.paint_cc_into_pred¶
- CorpusCallosum.paint_cc_into_pred.argument_parse()[source]¶
Create a command line interface and return command line options.
- CorpusCallosum.paint_cc_into_pred.correct_wm_ventricles(aseg_cc, fornix_mask, voxel_size, close_gap_size_mm=3.0)[source]¶
Fill small gaps between corpus callosum, ventricles, and background.
This function performs two gap-filling operations: 1. Fills WM and background gaps between CC and ventricles with ventricle labels 2. Fills WM gaps between CC and background with background label
Note: Fornix and non-CC-connected WM component removal are intentionally not implemented in this function as they have been removed from the processing pipeline.
- Parameters:
- aseg_cc
npt.NDArray[np.int_] Aseg segmentation with CC already painted in.
- fornix_mask
npt.NDArray[np.bool_] Mask of the fornix. Not currently used (kept for interface compatibility).
- voxel_size
tuple[float,float,float] Voxel size of the aseg image in mm.
- close_gap_size_mm
float, default=3.0 Maximum size of the gap to fill in millimeters.
- aseg_cc
- Returns:
npt.NDArray[np.int_]Corrected segmentation map with filled gaps.
- CorpusCallosum.paint_cc_into_pred.paint_in_cc(pred, aseg_cc)[source]¶
Paint corpus callosum segmentation into aseg+dkt segmentation map.
- Parameters:
- pred
npt.NDArray[np.int_] Deep-learning segmentation map.
- aseg_cc
npt.NDArray[np.int_] Aseg segmentation with CC.
- pred
- Returns:
npt.NDArray[np.int_]Segmentation map with added CC.
Notes
This function modifies the original array and does not create a copy. The CC labels (251-255) from aseg_cc are copied into pred.