Welcome to our github page!
This page is under construction. Please use under your own discretion.
PALS is a scalable and user-friendly toolbox designed to facilitate standardized analysis and ensure quality in stroke research using T1-weighted MRIs. The PALS toolbox offers four moduels integrated into a single pipeline, including (1) reorientation to radiological convention, (2) lesion correction for healthy white matter voxels, (3) lesion load calculation, and (4) visual quality control.
- Linux or Mac OS
- Python 2.7
- pip
- FSL
- If using a version of FSL older than 5.0.10, separate installion of FSLeyes is necessary.
- FreeSurfer
For first-time users, PALS might ask for the directory path to FSL binaries.
Clone this github repository:
git clone https://github.com/npnl/PALS.git
Install python-tk
sudo apt-get install python-tk
Install python dependencies
cd PALS
pip install -r requirements.txt
Open up your terminal and navigate to the directory containing PALS source code.
cd /PATH/TO/PALS
python2.7 run_pals.py
This will open up the PALS GUI.
To use PALS, the user must first use a method of their choice to generate initial lesion masks for their dataset.
Required:
PALS requires the user to provide an Input Directory with separate Subject Directories containing:
- Subject's T1-weighted anatomical image file (nifti)
- Subject's lesion mask file (nifti)
Optional:
- Subject's skull-stripped brain file (nifti)
- Subject's white matter segmentation file (nifti)
- Subject's FreeSurfer T1 file (T1.mgz)
- Subject's FreeSurfer cortical/subcortical parcellation file (aparc+aseg.mgz)
PALS output files and directories will vary depending on the options selected (e.g., QC_BrainExtractions for the brain extraction step.)
QC Directories
A new quality control directory will be created for each intermediary step taken. Each QC directory will contain screenshots for each subject, and a single HTML page for easy visual quality inspection.
Subject Directories
A separate directory will be created for each subject, each of which will contain a Intermediate_Files subdirectory.
-
Intermediate_Files will store all outputs from intermediary processing steps. Intermediate_Files will also contain a subdirectory called Original_Files.
-
Original_Files will contain a copy of all input files for that subject.
outputs from reorient module:
subjX_T1_rad_reorient.nii.gz - subject's original T1 brain file in radiological convention
subjX_lesion1_rad_reorient.nii.gz - subject's original lesion mask in radiological convention
outputs from lesion correction module:
subjX_WMAdjusted_lesion1.nii.gz - subject's corrected lesion mask with white matter voxels removed
outputs from lesion load module:
subjX_Reg_Brain_MNI.152.nii.gz - subject's brain registered to MNI space
subjX_Reg_Brain_custom.152.nii.gz - subject's brain registered to user-input template space
subjX_T12FS.nii.gz - subject's brain registered to FreeSurfer space
subjX_lesion1_MNI152_bin.nii.gz - subject's first lesion mask registered to MNI space
subjX_lesion1_custom_bin.nii.gz - subject's first lesion mask registered to user-input template space
subjX_lesion1_FS_bin.nii.gz - subject's first lesion mask registered to FreeSurfer space
subjX_roi_name_lesion1_overlap.nii.gz - subject's lesion-ROI overlap file (one for each ROI)
Databases: For the lesion correction and lesion load calculation modules, separate CSV files will be created, containing information for all subjects about number of voxels removed and amount of lesion-roi overlap, respectively.
The best way to keep track of bugs or failures is to open a New Issue on the Github system. You can also contact the author via email: kaoriito at usc dot edu.
This project is licensed under the GNU General Public License - see the LICENSE.md file for details