Index of /examples/imaging/ashs

Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - [DIR] examples/ 23-Feb-2017 13:40 -

RCS ASHS Usage and Examples

Overview

Automatic Segmentation of Hippocampal Subfields (ASHS). ASHS is a software package for automatic segmentation of hippocampal subfields in magnetic resonance images. Given a pair of T1-weighted and T2-weighted images (the latter acquired using a protocol tuned for hippocampus imaging), ASHS will automatically label main subfields of the hippocampus, and some extra-hippocampal structures, using multi-atlas segmentation. The main method is described in the Yushkevich et al. 2011 Neuroimage paper (http://tinyurl.com/cffrp3p).

Download: http://www.nitrc.org/projects/ashs/
Documentation: https://sites.google.com/site/hipposubfields/
RCS Module: http://rcs.bu.edu/software/#/package/ashs/

Usage Notes

Please reference the official tutorial for a clear explanation of the steps: https://sites.google.com/site/hipposubfields/tutorial. Below is an example running on SCC.

  1. Example Setup
  2. ASHS requires two input images, an output directory, and an atlas to build from. The SCC has some atlases installed within the ashs module, we will use those by calling a variable later on.

    [cjahnke@scc4 ~]$ export TESTDIR=/projectnb/yourproject/testdir
    [cjahnke@scc4 testdir]$ cd $TESTDIR
    [cjahnke@scc4 testdir]$ tree .
     ./
     |--data/
       |--ETS_0003_T1W.nii
       |--ETS_0003_T2W.nii
     |--output/
    

  3. Running ASHS
  4. ASHS can be run in a few modes: single core, single node, and cluster mode. The SCC supports cluster mode and your work will complete fastest using the full power.
    First load the module and choose an atlas.
    [cjahnke@scc4 testdir]$ module load ashs/20170223
    [cjahnke@scc4 testdir]$ printenv | grep ATLAS
    ATLAS_UPENNPMC=/share/pkg/ashs/atlas/atlas_upennpmc-20161128
    ATLAS_UMCUTRECHT=/share/pkg/ashs/atlas/UMCUtrecht-7t-20160714
    ASHS_ATLAS=/share/pkg/ashs/atlas
    

    Run the application. You can use nohup (eg. "nohup $ASHS_ROOT/bin/ashs_main.sh {options} &" if you want to run the process in the background and capture the output in a file.

    Note the following options and change as needed:


    [cjahnke@scc4 testdir]$ $ASHS_ROOT/bin/ashs_main.sh \
     -Q \
     -q "-P yourproject" \
     -I ETS_0003 \
     -a $ATLAS_UPENNPMC \
     -g $TESTDIR/data/ETS_0003_T1W.nii \
     -f $TESTDIR/data/ETS_0003_T2W.nii \
     -w $TESTDIR/output
    

    There are 7 stages and the code will submit numerous jobs on your behalf for each stage. You can check these with qstat. For example:
    [cjahnke@scc4 testdir]$ qstat -u yourusername
    job-ID  prior   name       user       state submit/start at     queue                     slots ja-task-ID
    ----------------------------------------------------------------------------------------------------------
    6804007 0.11937 ashs_stg3_ cjahnke    r     02/23/2017 15:23:31 b@scc-bd8.scc.bu.edu       1        
    6804010 0.11937 ashs_stg3_ cjahnke    r     02/23/2017 15:23:31 q@scc-q01.scc.bu.edu       1        
    6804014 0.00000 sleep      cjahnke    hqw   02/23/2017 15:21:20                            1   
    

  5. View Results
  6. You can view results with the itk-snap application, which is installed on SCC as a module.
    Note that the results are based on the dimmensions of the spin image (T2).
    [cjahnke@scc4 testdir]$ cd $TESTDIR
    [cjahnke@scc4 testdir]$ module load ashs
    [cjahnke@scc4 testdir]$ module load itk-snap
    [cjahnke@scc4 testdir]$ itksnap \
     -g data/ETS_0003_T2W.nii \
     -s output/final/ETS_0003_left_lfseg_corr_usegray.nii.gz  \
     -l $ATLAS_UPENNPMC/snap/snaplabels.txt
    

    itk-snap_result


Examples

Examples code for building custom atlases is available under the $SCC_ASHS_EXAMPLES variable.

[cjahnke@scc4 ~]$ ls -1 $SCC_ASHS_EXAMPLES/atlas_system_test
README.txt
config
images
runme.sh



Contact Information

RCS Apps Team: help@scc.bu.edu

Document written by Charles Jahnke on 2/23/2017. Last modified on 2/23/2015.