fsqc.outlierDetection¶
This module provides a function to evaluate potential outliers in the aseg.stats, aparc.stats, and hypothalamic and hippocampal values (if present).
- fsqc.outlierDetection.outlierDetection(subjects, subjects_dir, output_dir, outlierDict, min_no_subjects=10, hypothalamus=False, hippocampus=False, hippocampus_label=None, fastsurfer=False)[source]¶
Evaluate outliers in aseg.stats, [lr]h.aparc, and optional hypothalamic/hippocampal values.
- Parameters:
- subjects
list
List of subject IDs.
- subjects_dir
str
Path to the FreeSurfer subjects directory.
- output_dir
str
Path to the output directory for saving results.
- outlierDict
dict
Dictionary containing outlier thresholds for different measures.
- min_no_subjects
int
,optional
Minimum number of subjects required for analysis.
- hypothalamus
bool
,optional
Flag to include hypothalamic values in the analysis.
- hippocampus
bool
,optional
Flag to include hippocampal values in the analysis.
- hippocampus_label
str
orNone
,optional
Label to identify the hippocampus (e.g., “Hippocampus”).
- fastsurfer
bool
,optional
Flag to use FastSurfer instead of FreeSurfer output files.
- subjects
- Returns:
tuple
A tuple containing three dictionaries:
outlierSampleNonparNum
outlierSampleParamNum
outlierNormsNum
- fsqc.outlierDetection.outlierTable()[source]¶
Provide upper and lower bounds for volumes of several brain structures.
- Returns:
dict
A dictionary containing upper and lower bounds for several brain structures.
- fsqc.outlierDetection.readAparcStats(path_aparc_stats, hemi)[source]¶
Read FreeSurfer aparc.stats files.
- Parameters:
- Returns:
tuple
A tuple containing three dictionaries:
Header information for the aparc.stats file.
Detailed measures for different anatomical regions.
Thickness values for each region.