This script reads elec2atlas.mat files from subject folders and creates a single TSV file with AAL localization results.
uvinstalled- Python
3.12.7 - A dataset directory containing folders named like
sub-01,sub-02, and so on - Inside each subject folder, an
anat/elec2atlas.matfile
Run these commands from the parent project directory:
uv venv --python 3.12.7 .venv
.\.venv\Scripts\Activate.ps1
uv pip install -r requirements.txtIf you are already using an existing .venv, just activate it and install the requirements if needed.
Edit input_path.json and replace path_to_dataset with the path to your dataset root.
Example:
{
"input_path": "D:\\your\\dataset\\folder"
}The dataset root should contain the sub-* folders.
From inside this ConvertLabelling_mat2mia directory:
python main.pyThe script creates this file in the dataset root:
All_Subjects_AAL_localization.tsv
- Subjects without
anat/elec2atlas.matare skipped with a warning. - If a subject cannot be processed, the script prints an error and continues with the next one.