Home - miac-research/psmd GitHub Wiki
Caution
Please note that PSMD is not a medical device and for research use only. Any clinical use (e.g. for diagnosis, prognosis or monitoring) is prohibited by law (see e.g. medical device regulation in the EU).
This page always refers to the latest version of PSMD. For an older version, run PSMD with the option -h
to get usage information for your version.
Make sure to also check the Frequently Asked Questions.
The recommended method for running PSMD is by using pre-built container images. This approach ensures optimal reproducibility of results. You will need container software, such as Apptainer, which is commonly used in scientific computing environments like HPC clusters. Other options, such as Docker and Podman, will also work.
First, pull the pre-built image from the container repository. The commands below pull the current version. To pull a specific version, substitute latest
with the desired version tag, e.g. 1.9.0
.
# Using Apptainer:
apptainer build psmd.sif docker://ghcr.io/miac-research/psmd:latest
# Using Docker:
docker pull ghcr.io/miac-research/psmd:latest
docker tag ghcr.io/miac-research/psmd:latest psmd:latest
Note
You can ascertain how this image was built from public sources by reviewing the corresponding Dockerfile in this repository. You can also build the image yourself using the Dockerfile if you prefer.
Although not recommended, you can also run the PSMD script using your local FSL installation (version 6.0.1 and newer).
- DTI data with at least 20 diffusion directions and a b-value between 700 and 1200 is required. An isotropic resolution around 2 mm is usually best, but other geometries might also work.
- The use of unprocessed data (in Nifti format) is recommended. The script will perform all pre-processing.
- As an alternative, already processed fractional anisotropy (FA) and mean diffusivity (MD) can be used as input. However, this is not recommended, since correct pre-processing of data (especially brain extraction) is crucial. Therefore, we recommend to let the script handle pre-processing.
- DTI data should undergo quick visual inspection to exclude large artefacts. No further human intervention is required in subsequent steps.
The following commands show usage with Apptainer. Make sure to bind the path with your data into the container with the -B
command. In the examples below, both the container image (psmd.sif
file) and the data is in the current working directory $(pwd)
.
With Docker, use the docker run --rm
command and mount your data directory e.g. to the container folder /data
using the option -v
, e.g. -v $(pwd):/data
.
apptainer run -B $(pwd) psmd.sif -d <DWI_data> -b <bvals> -r <bvecs> -s <skeleton_mask>
Mandatory arguments:
-d <DWI_data>: Unprocessed DWI data in Nifti format
-b <bvals>: Text file containing b-values (in FSL format)
-r <bvecs>: Text file containing diffusion vectors (in FSL format)
-s <skeleton_mask>: Skeleton mask file, e.g. the mask provided with the PSMD tool
apptainer run -B $(pwd) psmd.sif -p <PP_DWI_data> -b <bvals> -r <bvecs> -s <skeleton_mask>
Mandatory arguments:
-p <PP_DWI_data>: Pre-processed DWI data in Nifti format
-b <bvals>: Text file containing b-values (in FSL format)
-r <bvecs>: Text file containing diffusion vectors (in FSL format)
-s <skeleton_mask>: Skeleton mask file, e.g. the mask provided with the PSMD tool
apptainer run -B $(pwd) psmd.sif -f FA_image -m MD_image -s skeleton_mask_file
Mandatory arguments:
-f <FA_image>: The fractional anisotropy image, brain extracted, Nifti format
-m <MD_image>: The mean diffusivity image, brain extracted, Nifti format
-s <skeleton_mask>: Skeleton mask file, e.g. the mask provided with the PSMD tool
-e <bvalue>: Enhanced masking of CSF and hyperintense voxels (e.g. certain artefacts). Please specify of the diffusion shell to use (usually 1000) (requires unprocessed or pre-processed DWI data)
-l <lesion_mask>: Supply custom lesion mask in order to exclude a region from analysis
-o: Output mean skeletonized mean diffusivity (MSMD) instead of PSMD
-g: Output PSMD (or MSMD) separately for each hemisphere, comma-separated (left,right)
-c: Clear temporary psmdtemp folder from previous run (if present)
-q: Quiet, no messages are displayed, only result (suitable for writing result into file)
-v: Verbose. very detailed status and error messages are displayed.
-t: Troubleshooting, temporary files (folder psmdtemp) will not be deleted
Use apptainer run psmd.sif -h
for usage information on the command line.
The script and accompanying data are provided under the revised BSD (3-clause) license (for details see license file in the download package). The use of the script and/or data needs to be acknowledged through proper citation (see below).
For the PSMD pipeline, cite the main PSMD paper:
Baykara E, Gesierich B, Adam R, Tuladhar AM, Biesbroek JM, Koek HL, Ropele S, Jouvent E, Alzheimer's Disease Neuroimaging Initiative (ADNI), Chabriat H, Ertl-Wagner B, Ewers M, Schmidt R, de Leeuw FE, Biessels GJ, Dichgans M, Duering M. A novel imaging marker for small vessel disease based on skeletonization of white matter tracts and diffusion histograms. Annals of Neurology 2016 80(4):581-92 DOI:10.1002/ana.24758
For FSL-TBSS: Follow the guidelines provided at the TBSS page!
Important
The terms of the FSL license apply. However, please note that the PSMD tool is neither part of nor affiliated with FSL.