GUI user guide¶
The package-installed hemispec-gui command launches the standard HemiSpec bilateral workflow. Start it from the same Python environment that contains HemiSpec and PyTorch.
Launch¶
Install the current GUI from a Git LFS source checkout of main:
git lfs install
git clone https://github.com/mqqq333/HemiSpec.git
cd HemiSpec
git lfs pull
python -m pip install -e ".[gui,model,classifier]"
git rev-parse HEAD
hemispec-gui
Record the printed commit hash with the analysis. The PyPI project is not public, and this guide does not use the archived v0.1.0 wheel. Older versions remain available on the GitHub Releases page.
Before opening the GUI¶
Prepare one DGN-ready GM map per subject. Raw T1-weighted images must first pass through the documented FSL preprocessing workflow:
Window layout¶
The window has a configuration panel on the left and a run area on the right. Below a window width of 1060 px the same blocks stack into one scrolling column. The language switch and the theme menu are in the header.
Configuration panel¶
01 Input GM maps¶
Select a directory or enter a glob such as:
The number of matching files appears next to the section title.
02 Output folder¶
Choose a new, empty output directory for each run. Final maps are written under voxel_maps/; tables and optional validation outputs use their own subdirectories. Open opens the folder.
03 Optional analysis¶
- Export ROI table — enable it only when an atlas and compatible label table are available. Switching it on reveals the ROI atlas NIfTI and Label table fields. The atlas must share the input-map grid and affine. A custom atlas is valid for ROI-only export. The released classifier instead requires its compatible Glasser 1.5 mm atlas, with labels
1..180on the left and1001..1180on the right. - Hemisphere-classifier validation requires the compatible Glasser ROI features and a local classifier bundle from the Git LFS checkout; switching it on also switches on ROI table export. Current classifier cache download is incomplete; see Data and models.
- Test–retest reliability (TRT) requires at least two subjects with two scans each. The GUI uses its encapsulated default pattern, such as
sub-MSC001_run-01_GM_masked.nii.gzandsub-MSC001_run-02_GM_masked.nii.gz; use the CLI when filenames such assub-001_run-01_GM_masked.nii.gzrequire explicit regex/session flags. - Keep intermediate files preserves reconstructions and direction-specific maps for debugging, plus
intermediate/combined_maps/for later standalone validation. Direction-specific maps use a different suffix contract.
The line at the bottom of the panel names the primary output and, after a completed run, the folder that holds the final maps.
Run area¶
Environment¶
Confirm that the DGN models and PyTorch are ready. The atlas and classifier items are optional unless their corresponding options are enabled. An item that is partial or missing shows a status word and a detail line; use Refresh after changing the environment.
Run¶
Run starts the workflow and Stop requests a stop, which takes effect between major workflow stages. The status line shows the current stage, percent complete, and elapsed time. The flow diagram follows the five stages — L→R and R→L, then Merge, ROI, and Summary — and marks each one as pending, running, done, skipped, or failed.
Log and Equivalent CLI¶
The Log tab streams the workflow output; Copy log, Open output, and Clear Log act on it. The Equivalent CLI tab shows the command that matches the current settings, with a Copy button. Starting a run switches back to the Log tab.
Reproducibility¶
Copy the command from the Equivalent CLI tab into the study record together with the HemiSpec commit/version, preprocessing script version, model bundle, atlas version, and enabled optional validation steps.
ANS/RNS and the cross-hemispheric DGN framework originate from Wang et al. (2024); see Citation.