FastSurferCNN.quick_qc¶
- FastSurferCNN.quick_qc.check_volume(asegdkt_segfile, voxvol, thres=0.7)[source]¶
Check if total volume is bigger or smaller than threshold.
- Parameters:
- asegdkt_segfile
np.ndarray
The segmentation file.
- voxvol
float
The volume of a voxel.
- thres
float
, default=0.7 The threshold for the total volume (Default value = 0.70).
- asegdkt_segfile
- Returns:
bool
Whether or not total volume is bigger or smaller than threshold.
- FastSurferCNN.quick_qc.get_region_bg_intersection_mask(seg_array, region_labels={'Left-Lateral-Ventricle': 4, 'Left-choroid-plexus': 31, 'Right-Lateral-Ventricle': 43, 'Right-choroid-plexus': 63}, bg_label=0)[source]¶
Return a mask of the intersection between the voxels of a given region and background voxels.
This is obtained by dilating the region by 1 voxel and computing the intersection with the background mask.
The region can be defined by passing in the region_labels dict.
- Parameters:
- seg_array
numpy.ndarray
Segmentation array.
- region_labels
dict
, default=<dict VENT_LABELS> Dictionary whose values correspond to the desired region’s labels (see Note).
- bg_label
int
,default
as
in
<BG_LABEL> Label id of the background.
- seg_array
- Returns:
- bg_intersect
numpy.ndarray
Region and background intersection mask array.
- bg_intersect
Notes
VENT_LABELS is a dictionary containing labels for four regions related to the ventricles: “Left-Lateral-Ventricle”, “Right-Lateral-Ventricle”, “Left-choroid-plexus”, “Right-choroid-plexus” along with their corresponding integer label values (see also FreeSurferColorLUT.txt).
- FastSurferCNN.quick_qc.get_ventricle_bg_intersection_volume(seg_array, voxvol)[source]¶
Return a volume estimate for the intersection of ventricle voxels with background voxels.
- Parameters:
- seg_array
numpy.ndarray
Segmentation array.
- voxvol
float
Voxel volume.
- seg_array
- Returns:
- intersection_volume
float
Estimated volume of voxels in ventricle and background intersection.
- intersection_volume