Release Notes
2.1.1_8.1.0 [2026-01-13]
Maintenance:
- Updated
flywheel/freesurfer-recon-allimage tag from2.1.0_8.1.0to2.1.1_8.1.0
2.1.0_8.1.0 [2025-12-16]
Enhancements:
- Added HPC support by relocating
SUBJECTS_DIRandFS_LICENSEto/flywheel/v0/work, ensuring read-write access for both Flywheel analysis engines and HPC systems. - Refactored postprocessing retry logic so each step is retried independently, allowing subsequent steps to run even if an earlier step fails.
- Added
retry_step()helper function to encapsulate per-step retry behavior with up toMAX_RETRIESattempts onRuntimeError. - Updated
srf2objutility to accept an output file argument directly instead of requiring shell redirection, removing the need forshell=Trueindo_gear_convert_surfaces.
Fixes:
- Fixed
do_gear_convert_surfacesto invokesrf2objwithshell=Falseand pass the output file path as an argument, resolving a potential shell injection risk. - Fixed
gear_environ.jsonto be written to and read from/flywheel/v0/gear_environ.jsoninstead of/tmp/gear_environ.json. - Fixed
SUBJECTS_DIRandFS_LICENSEconstants to respect environment variables set at runtime, falling back to/flywheel/v0/workpaths. - Fixed default CPU count to use half of available CPUs (
os.cpu_count() // 2) to prevent out-of-memory errors during parallelrecon-allexecution.
Maintenance:
- Updated
urllib3minimum version from>=2.5.0to>=2.6.0. - Updated
PYTHONPATHin manifest environment to include the full Python version path (/venv/lib/python3.12/site-packages). - Added
UV_PYTHON_DOWNLOADS,UV_PYTHON,PYTHONDONTWRITEBYTECODE,UV_LINK_MODE, andUV_COMPILE_BYTECODEenvironment variables tomanifest.json. - Updated
FREESURFER_VERSIONenvironment variable in manifest from7.4.1to8.1.0. - Also remove
yqfrom/opt/bininDockerfilecleanup step. - Updated test suite to reflect per-step retry refactor and new CPU count behavior.
Documentation:
- Updated Flywheel license guide URLs across
docs/details.md,docs/faqs.md,docs/overview.md, anddocs/usages.md. - Updated
docs/usages.mdSDK installation link to point to the currentapi-docs.flywheel.ioreference. - Added FAQ entry explaining
SUBJECTS_DIRandFS_LICENSEare hard-coded to/flywheel/v0/workfor permissions compatibility. - Added FAQ entry with workarounds for OOM /
bad allocerrors caused bysynthsegmemory usage. - Updated runtime estimate in
docs/faqs.mdfrom 4–6 hours to 3–4 hours with clarifying notes on standard analysis engine specs. - Added HPC Support section to
docs/overview.mdexplaining the rationale for fixedSUBJECTS_DIRandFS_LICENSElocations.
2.0.3_8.1.0 [2025-10-23]
Enhancements:
- Upgraded
FreeSurferfrom7.2.0to8.1.0 - Added
recon_all.txtandpost_processing.txtlog files to capture command output - Added
stdbufline-buffering to all FreeSurfer commands for real-time log streaming viaprepare_command_with_stdbuf() - Added
global-expert-optionsfile to forcemris_fix_topology -threads 1for improved stability - Added
--no-annotflag tosurfregcalls to avoid medial wall artifacts - Added cleanup of existing
surfregoutput files before re-running surface registration to support idempotent re-runs - Added
EXEC_ALWAYS_PRINT_REenvironment variable to filter and display relevant FreeSurfer log lines in real time - Added
fw_gear_freesurfer_recon_all/constants.pymodule with shared constants (THROTTLE_SECONDS,MAX_RETRIES) and utilities - Added
fw_gear_freesurfer_recon_all/utils.pymodule withwrite_log_section_header()andtext_file_to_csv_file()utilities - Replaced
segmentHA_T1.sh,segmentBS.sh,segmentThalamicNuclei.shwithsegment_subregionssubcommand for FreeSurfer8.1.0compatibility - Updated output filenames for hippocampal, brainstem, and thalamic segmentations to match FreeSurfer
8.1.0naming conventions - Added
patch/surfregscript patched for FreeSurfer8.1.0
Fixes:
- Fixed
execute_recon_all_commandretry logic to correctly attemptMAX_RETRIEStimes instead of hardcoded2 - Fixed bare
exceptclause incheck_for_previous_runto catch specific exceptions (zipfile.BadZipFile,KeyError,IndexError) - Fixed
get_input_fileto useexist_ok=Truewhen creatingdicomsdirectory - Fixed
mock_unzip_archivetest helper signature to match the actualunzip_archivecall signature
Maintenance:
- Migrated from
flywheel-gear-toolkittofw-gear==0.3.2library - Migrated from
poetrytouv/hatchlingfor dependency management - Migrated
Dockerfilebase fromfreesurfer/freesurfer:7.2.0(CentOS) toflywheel/python:3.12-debianwith FreeSurfer installed fromflywheel/freesurfer:0.3.0_8.1.0 - Upgraded
pythonfrom3.8to3.12 - Replaced
miniconda/condaPython environment withuvvirtual environment (/venv) - Added multi-stage
Dockerfilebuild (base,build,dev, final) - Refactored
main.pyintopreprocessing.py,postprocessing.py, andutils.pymodules - Moved
set_core_count()andparse_config()logic toparser.py - Removed
gear-log-levelconfig option; logging level now managed byfw-gear - Updated
manifest.jsoncommand from/root/miniconda3/bin/python3 run.pytopython run.py - Added
requirements-dev.txtand updated.dockerignoreto include it - Added
flywheel-sdk==20.3.0,numpy>=1.23.0,<2,jinja2==3.1.6,requests>=2.32.4,urllib3>=2.5.0as explicit dependencies - Updated CI to use
PYVER: "3.12", larger runner, and6htimeout - Refactored and expanded test suite to cover new module structure,
parse_config,get_and_sanitize_subject_id,zip_and_cleanup_outputs,format_execution_results,write_log_section_header, andprepare_command_with_stdbuf - Removed
test_make_file_name_safe.pyandtest_parser.py(replaced bytest_parse_config.py)
Documentation:
- Fixed trailing whitespace throughout
CONTRIBUTING.md,docs/details.md,docs/faqs.md,docs/overview.md, anddocs/usages.md - Improved hyperlink text phrasing across documentation pages
Breaking Changes:
- Removed
gear-log-levelconfiguration option - Post-processing segmentation output filenames changed to match FreeSurfer
8.1.0conventions (e.g.,brainstemSsLabels.volumes.csvreplacesbrainstemSsVolumes.v2.csv,ThalamicNuclei.volumes.csvreplacesThalamicNuclei.v12.T1.volumes.csv)
2.0.2_7.2.0 [2024-11-15]
Fixes:
- Changed default value of
parallelconfig option fromtruetofalse
Documentation:
- Updated Flywheel FreeSurfer license guide URLs across
details.md,faqs.md,overview.md, andusages.md - Clarified
paralleloption description to reflect updated default offalse
2.0.1_7.2.0 [2024-09-13]
Fixes:
- Fixed command config construction in
main.pyto explicitly includedebug,parallel,reconall_options, andopenmpparameters, avoiding apodmanissue caused by passing-cas an option.
Maintenance:
- Updated
Dockerfileto refreshCentOS-Base.repofrom an Aliyun mirror and runyumcache update to fix broken package repository. - Added
hadolintlinter ignore directives and fixedENVsyntax to use key=value format inDockerfile. - Used
--no-cache-dirflag withpip installinDockerfile. - Updated CI configuration to use
flywheel-io/tools/etc/qa-cipipeline and added medium runner override fortest:gear. - Updated
pre-commithooks to addhadolint,jsonlint,linkcheck,markdownlint,ruff_format, andpytest; removeddocker_buildandgenerate_docshooks. - Fixed variable shadowing in test mocks by using unique names (
mock_zipfile1,mock_zipfile2,mock_zipfile3). - Updated
exc.type == SystemExittoexc.type is SystemExitin tests.
Documentation:
- Reformatted
docs/details.md,docs/faqs.md,docs/index.md,docs/overview.md, anddocs/usages.mdto fix trailing whitespace, line lengths, and markdown linting issues. - Updated usage example code blocks to use
pythonsyntax highlighting. - Converted section headings in
docs/usages.mdfrom###to##. - Removed custom
docs/overrides/partials/footer.htmltemplate. - Added empty
docs/changelog.mdfile.
2.0.0_7.2.0 [2024-04-11]
Enhancements:
- Added
text_file_to_csv_file()helper to convert space-separated text files to CSV using the standardcsvmodule, replacing shell-basedtrcommands. - Added output of hypothalamic subunits CSV file to the gear output directory via
shutil.copy.
Fixes:
- Removed metadata writing from postprocessing functions (
do_gear_hippocampal_subfields,do_gear_brainstem_structures,do_gear_thalamic_nuclei,do_gear_convert_stats), eliminating a dependency onpandasfor metadata population. - Fixed
do_gear_hypothalamic_subunitsto accept and passmri_dirparameter required for locating output files.
Maintenance:
- Replaced
pandasimport inmain.pywith standard librarycsvandshutilmodules. - Pinned
flywheel-gear-toolkitto0.6.18. - Added
mkdocsand related documentation dependencies to the dev dependency group inpyproject.toml. - Updated CI configuration to use
ci/large-default.ymland enabledPUBLISH_PAGES. - Updated pre-commit hook to use
generate_docsinstead ofpytest. - Added
.gitignorewith standard Python, macOS, and editor exclusions. - Updated test suite for postprocessing functions to use
pytest-mockand improved assertion coverage. - Added tests for the new
text_file_to_csv_file()function with pivot, no-pivot, and dry-run scenarios. - Added test asset files for
text_file_to_csv_filetests.
Documentation:
- Replaced the detailed inline
README.mdwith a concise overview linking to the hostedmkdocsdocumentation site. - Added full
mkdocsdocumentation site includingindex.md,overview.md,details.md,usages.md,faqs.md, and supporting assets. - Added
mkdocs.ymlconfiguration with Material theme and standard plugins. - Updated
manifest.jsonsource URL to point to the new GitLab repository location.
1.2.3_7.2.0 [2024-03-27]
Enhancements:
- Added FreeSurfer
7.2.0gear implementing fullrecon-allcortical reconstruction pipeline - Added support for multiple T1w anatomical inputs (
t1w_anatomical_2throught1w_anatomical_5) averaged together for motion correction - Added T2w/FLAIR anatomical input support to improve pial surface reconstruction
- Added optional hippocampal subfield segmentation with CSV output
- Added optional brainstem structure segmentation with CSV output
- Added optional thalamic nuclei parcellation with CSV output
- Added optional hypothalamic subunit segmentation
- Added optional high-resolution segmentation via
gtmseg - Added surface registration to
fsaverage_symtemplate viaxhemiregandsurfreg - Added conversion of FreeSurfer surface files to OBJ format for Flywheel platform visualization
- Added conversion of FreeSurfer volume files from MGZ to NIfTI format
- Added conversion of FreeSurfer stats files to CSV format
- Added post-processing-only mode for re-running post-processing on existing
recon-alloutput archives - Added
gear-dry-runmode for testing without executingrecon-all - Added FreeSurfer license support via file input, config key, or project metadata
- Added analysis metadata export for subcortical volumes, cortical parcellations, and optional segmentation outputs
Maintenance:
- Added
Dockerfilebased onfreesurfer/freesurfer:7.2.0withminiconda3python3.8.5environment - Added patched
recon-allscript fixing known race condition and parallel processing bugs introduced in FreeSurfer7.1.1 - Added
flywheel-gear-toolkit^0.6andflywheel-sdk^16.8.0dependencies - Added
pandas1.5.1dependency for stats file processing - Added CI/CD configuration via
.gitlab-ci.yml - Added
pre-commithooks includinggearcheck,ruff, andpytest - Added merge request template with release notes and testing checklist
Documentation:
- Added
README.mdwith full gear documentation including inputs, configuration options, outputs, and usage examples - Added
CONTRIBUTING.mdwith development setup and release workflow instructions - Added
FAQ.mdfor common questions and errors