recon_surf.long_compat_segmentHA

exception recon_surf.long_compat_segmentHA.FastSurferCompatError[source]

Custom exception for FastSurfer compatibility issues

recon_surf.long_compat_segmentHA.check_freesurfer(check_version=True)[source]

Check if FreeSurfer is properly installed and version is supported

recon_surf.long_compat_segmentHA.get_supported_freesurfer_version()[source]

Get FreeSurfer version from FreeSurfer from recon-surf.sh.

recon_surf.long_compat_segmentHA.get_voxel_size(image_file)[source]

Get voxel size from aseg file using nibabel.

recon_surf.long_compat_segmentHA.main(subjects_dir, subject, fs_license, threads=1, ignore_fs_version=False)[source]

Takes a longitudinally processed subject and creates files missing for other longitudinal processing like the hippocampal subfields stream of FreeSurfer.

Parameters:
subjects_dirPath

The subjects_dir with one subject per subdir.

subjectstr

The subject id.

fs_licensePath

The path to FreeSurfer license file.

threadsint, default=1

The number of threads to use.

ignore_fs_versionbool, default=False

Ignore FreeSurfer version if True.

recon_surf.long_compat_segmentHA.make_parser()[source]

Parse command line arguments

recon_surf.long_compat_segmentHA.run(command, *args, **kwargs)[source]

Run the FreeSurfer command command.

Create soft link or copy file if linking fails

recon_surf.long_compat_segmentHA.validate_existing_file(value)[source]

Validate that the input is an existing file path

recon_surf.long_compat_segmentHA.validate_existing_subjects_dir(value)[source]

Validate that the input is an existing directory path

recon_surf.long_compat_segmentHA.validate_inputs(subject_dir)[source]

Validate all input arguments and environment