fsqc.fsqcMain¶
This module provides the main functionality of the fsqc package.
- fsqc.fsqcMain.get_help(print_help=True, return_help=False)[source]¶
A function to return a help message.
- Parameters:
- Returns:
- fsqc.fsqcMain.get_version()[source]¶
A function to get the version of the ‘fsqc’ package.
- Returns:
str
The version of the ‘fsqc’ package if installed; otherwise, “unknown”.
Notes
This function uses the ‘importlib.metadata’ module to retrieve the package version. If the package is not installed, it returns “unknown”.
- fsqc.fsqcMain.run_fsqc(subjects_dir, output_dir, argsDict=None, subjects=None, subjects_file=None, shape=False, screenshots=False, screenshots_html=False, screenshots_base='default', screenshots_overlay='default', screenshots_surf='default', screenshots_views='default', screenshots_layout='default', screenshots_orientation='radiological', surfaces=False, surfaces_html=False, surfaces_views=None, skullstrip=False, skullstrip_html=False, fornix=False, fornix_html=False, hypothalamus=False, hypothalamus_html=False, hippocampus=False, hippocampus_html=False, hippocampus_label=None, outlier=False, outlier_table=None, fastsurfer=False, no_group=False, group_only=False, exit_on_error=False, skip_existing=False, logfile=None)[source]¶
Run the fsqc submodules.
This is the main function to run the fsqc submodules.
- Parameters:
- subjects_dir
str
Subjects directory.
- output_dir
str
Output directory.
- argsDict
dict
, default:None
Dictionary of input arguments.
- subjects
list
of
str
, default:None
List of subjects to process. If None, all valid cases in the input directory will be processed. Cannot be used with
subjects_file
.- subjects_file
str
, default:None
A text file that contains a list of subjects to be processed. Cannot be used with
subjects
.- shape
bool
, default:False
Conduct shape analysis using brainprint.
- screenshots
bool
, default:False
Create screenshots of MR image with optional overlays.
- screenshots_html
bool
, default:False
Create screenshots and html summary page.
- screenshots_base
str
, default: “default” Filename for base image for screenshots.
- screenshots_overlay
str
, default: “default” Filename for overlay image for screenshots.
- screenshots_surf(
list
of
)str
, default: “default” List of filenames of surface files to include in screenshots.
- screenshots_views(
list
of
)str
, default: “default” List of parameters to set the views of the screenshots. Example: [‘x=0’, ‘x=-10’, ‘x=10’, ‘y=20’, ‘z=0’].
- screenshots_layout
str
orlist
of
int
, default: “default” Layout describing rows and columns of the screenshots. Example: [1, 4] (one row, four columns).
- screenshots_orientation
str
, default: “radiological” Orientation of screenshots. Either “radiological” or “neurological”.
- surfaces
bool
, default:False
Create screenshots of pial and inflated surfaces.
- surfaces_html
bool
, default:False
Create screenshots of pial and inflated surfaces and html summary page.
- surfaces_views
list
of
str
, default: [“left”, “right”, “superior”, “inferior”] List of parameters to set the views of the surface plots.
- skullstrip
bool
, default:False
Create screeenshot of MR image and skullstrip overlay.
- skullstrip_html
bool
, default:False
Create screeenshot of MR image and skullstrip overlay, and create html summary page.
- fornix
bool
, default:False
Create screenshot of MR imge and corpus callosum overlay to identify fornix oversegmentation.
- fornix_html
bool
, default:False
Create screenshot of MR imge and corpus callosum overlay with html summary page.
- hypothalamus
bool
, default:False
Create screenhots of hypothalamic segmentation. Requires running FreeSurfer’s hypothalamus add-on module.
- hypothalamus_html
bool
, default:False
Create screenhots of hypothalamic segmentation with html summary page. Requires running FreeSurfer’s hypothalamus add-on module.
- hippocampus
bool
, default:False
Create screenhots of hippocampal segmentation. Requires running FreeSurfer’s hippocampus add-on module.
- hippocampus_html
bool
, default:False
Create screenhots of hippocampal segmentation with html summary page. Requires running FreeSurfer’s hippocampus add-on module.
- hippocampus_label
str
, default:None
Label used for the hippocampal segmentations. Example: “T1.v21”. The full filename would be [lr]h.hippoAmygLabels-<LABEL>.FSvoxelSpace.mgz.
- outlier
bool
, default:False
Conduct outlier analysis.
- outlier_table
str
, default:None
Specify custom norms table for outlier analysis.
- fastsurfer
bool
, default:False
Use FastSurfer instead of FreeSurfer input.
- no_group
bool
, default:False
Run script in subject-level mode. will compute individual files and statistics, but not create group-level summaries.
- group_only
bool
, default:False
Run script in group mode. will create group-level summaries from existing inputs.
- exit_on_error
bool
, default:False
Exit on error. If False, a warning is thrown and the analysis continues.
- skip_existing
bool
, default:False
Skip processing for a given case if output already exists, even with possibly different parameters or settings.
- logfile
str
, default:None
Specify a custom location for the logfile. Default location is the output directory.
- subjects_dir
- Returns:
dict
A dictionary of input arguments and processing directives.