ivadomed / ms-challenge-2021

MS segmentation challenge
MIT License
12 stars 0 forks source link

Adding Lesion Segmentation Toolbox (LST) as Baseline #33

Open uzaymacar opened 3 years ago

uzaymacar commented 3 years ago

LST seems like an open-source toolbox, notably used as a baseline in this paper (also mentioned in our Slack channel). Would be great to add it here as well!

jcohenadad commented 3 years ago

I quickly glanced at the paper but did not find a link to LST? 🤷‍♂️

charleygros commented 3 years ago

I quickly glanced at the paper but did not find a link to LST? 🤷‍♂️

Here

uzaymacar commented 3 years ago

I took a stab at this, but I am stuck and will move onto other stuff as this is low-priority (and also because it's probably my 2nd or 3rd time using MATLAB). Below are the steps I took in case someone wants to look at this 🧐:

  1. Install requirements in a new directory:
    • wget https://www.fil.ion.ucl.ac.uk/spm/download/restricted/eldorado/spm12.zip
    • wget http://www.fil.ion.ucl.ac.uk/spm/download/spm12_updates/spm12_updates_r7771.zip
    • wget https://www.applied-statistics.de/LST_3.0.0.zip
  2. Compile as shown here. In particular, take a look at "mex: command not found" error section as this happened to me in joplin.
  3. Open MATLAB via matlab.
    • Run addpath spm12. spm12 must have been unzipped in step 2.
    • Run addpath LST. LST must have been unzipped in step 2.
  4. Here is the rest of the example MATLAB script which tries to run LST on sub-013:

    ses01_fpath = '/home/GRAMES.POLYMTL.CA/<USERNAME>/duke/projects/ivadomed/tmp_ms_challenge_2021_preprocessed/sub-013/anat/sub-013_FLAIR.nii.gz';
    ses02_fpath = '/home/GRAMES.POLYMTL.CA/<USERNAME>/duke/projects/ivadomed/tmp_ms_challenge_2021_preprocessed/sub-013/anat/sub-013_T1w.nii.gz';
    ses01_uncomp_fpath = gunzip(ses01_fpath, 'uncomp');
    ses02_uncomp_fpath = gunzip(ses02_fpath, 'uncomp');
    ps_LST_long({ses01_uncomp_fpath, ses02_uncomp_fpath});

    where ps_LST_long() is the name of the MATLAB function which performs longitudinal segmentation given two timepoints. Also note that uncompressed (.nii) images are required, as opposed to compressed (.nii.gz). Finally, don't forget to change the filepaths.

The error I got in the script is: Dot indexing is not supported for variables of this type.