AutoSeg 2.0 Documentation

Clement Vachet ()

Neuro Image Research and Analysis Laboratories

UNC Chapel Hill – April1st, 2011


30

Table of Contents

Introduction 4

1 Tutorial 4

1.1 Computation 4

1.1.1 Set the process data directory 4

1.1.2 Set data information 4

1.1.3 Set output data directory 4

1.1.4 Set the dataset 5

1.1.5 Computation option 6

1.1.6 Compute automatic segmentation 7

1.2 Parameters 7

1.2.1 Set the atlases 7

1.2.2 Set tissue atlas description 8

1.2.3 Set the structures to be segmented 8

1.2.4 Set advanced parameters 9

1.3 Regional histogram option 10

1.4 Menu options 12

1.5 Exit 13

1.6 AutoSeg outputs 13

1.6.1 Quality control: MRML Scene 13

1.6.2 Skull-stripped intensity rescaled image 13

1.6.3 Regions of interest 13

1.6.4 Volume analysis files 13

1.6.5 Regional histogram option: MRML Scenes 14

2 FAQ 15

2.1 How to improve the rigid registration step? 15

3 Automatic segmentation method 15

3.1 Atlas creation 15

3.1.1 Unbiased average image creation 16

3.1.2 Subcortical structures creation 16

3.2 AutoSeg pipeline 16

3.2.1 Bias field correction 16

3.2.2 Rigid registration to a common coordinate image 16

3.2.3 Tissue segmentation 17

3.2.4 Skull-stripping 18

3.2.5 Loop 18

3.2.6 Intensity rescaling 18

3.2.7 Atlas to case registration 19

3.2.8 Applying the transformations 19

4 Outputs location 20

4.1 Processing data directory 20

4.1.1 Files 20

4.1.2 AutoSeg_Volume 20

4.1.3 AutoSeg_MRML 20

4.2 Data directory 20

4.2.1 AutoSeg 20

4.2.2 AutoSeg/BiasFieldCorrected 21

4.2.3 AutoSeg/atlasIso 21

4.2.4 AutoSeg/ems{_N} 21

4.2.5 AutoSeg/Stripped 22

4.2.6 AutoSeg/WarpROI 22

4.2.7 AutoSeg/MRMLScene 24

5 Screenshots 25

6 Credits 29

Introduction

AutoSeg is a tool allowing the segmentation of probabilistic sub-cortical structures and label maps, such as generic ROI maps and parcellation maps. The approach is a fully automatic segmentation via a deformable registration of an unbiased diffeomorphic atlas with probabilistic spatial priors.

This software executes a BatchMake script and runs several tools as threads, with the possibility to process datasets locally or on a distributed environment using Condor.

1Tutorial

This tutorial explains how to use AutoSeg through the FLTK graphic user interface.

1.1Computation

This directory will contain BatchMake scripts, eventually quality control images and volume analysis files.

1.1.1Set the process data directory

Type (T1-weighted, T2-weighted, PD) and orientation of the source images need to be set.


1.1.2Set data information

Type (T1-weighted, T2-weighted, PD) of the source images need to be set.


1.1.3Set output data directory

Under each data directory, a directory (named 'AutoSeg' by default) will be created to store the output files. One can change the name of this directory, if several studies are performed on the same dataset (e.g by playing with parameter settings).


1.1.4Set the dataset

Dataset with several formats can be processed: GIPL format, meta format (.mhd), NRRD format, analyze format (.img).... As AutoSeg runs several programs which work best with NRRD images, output images will be saved in NRRD.

A browser displays data that are about to be processed, the user being able to delete selected lines ('Remove' button) or to clear entirely the browser. If the user works with multi-modal images, the browser will then display data separated by interactively resizable columns.


The data selection can be done automatically and/or manually:

Automatic data selection

One can edit the data automatically by setting a general data directory and a filter indicating what files are about to be processed (e.g T1/*T1.nrrd). Starting from the data directory, the tool will find recursively all files that match the first given expression, corresponding to the T1-weighted images. The other expressions, in order to find the T2-weighted and/or PD images, are expressions relative to the path of the T1-weighted images (e.g ../T2/*T2.nrrd). Clicking on the 'Refresh filelist' button will display the dataset in the browser.


Manual data selection

The user has also the possibility to add data manually by clicking on the 'Add' button. A pop up window will then appear, in which data location need to be set.


1.1.5Computation option

3 options can be selected:

Compute volume analysis: this option allows the user to start a volume analysis of the computed subcortical structures and/or label maps.

Compute cortical thickness: this option will computed voxel-based regional cortical thickness measurements. If a parcellation map is provided, a lobar analysis will be performed.

-  Recompute all: this option will recompute the segmentation for the whole dataset, deleting previous results.

-  Use condor: this option allows the user to compute the dataset in a distributed environment via Condor, using several computational resources. BatchMake converts its script to a condor script ready to be sent to the Condor manager.


1.1.6Compute automatic segmentation

Pressing the 'Compute AutoSeg' button runs a BatchMake script to process the dataset, which can eventually be stopped by pressing the 'Stop' button.

AutoSeg will check whether or not a study has already been performed in this directory (by considering the existence of the 'AutoSeg_Parameters.txt' file). One can process the dataset with the current parameter settings (if new subjects have been added) or cancel the execution. If one wants to perform a new study on the same dataset, by using different parameter settings, best would be to consider a new AutoSeg processing directory. Output files (parameter settings, volume analysis) would then be accurate.

When the automatic segmentation process starts, a pop up window appears, displaying the status of the current segmentation pipeline. This pop up window can be displayed ('Show process status') or hidden to the convenience of the user.


1.2Parameters

Several parameters need to be set before starting the computation. A default parameter file is loaded when AutoSeg starts. However, these parameters can be set manually, in order to select the structures to be segmented, or eventually use a different atlas.

1.2.1Set the atlases

Set the common coordinate image

The source images will be rigidly registered to this atlas and thus will be in the same reference coordinate space. The type of the common coordinate image has to be set.

The common coordinate image should have the same type than the region of interest atlas.

Set the tissue segmentation atlas directory

During the pipeline, a tissue segmentation step will be applied in order to get 3 labels from the brain: White Matter, Grey Matter, CSF. Depending on the source images, this segmentation will be a one-channel (using T1 image), two-channel (T1&T2 or T1&PD), or three-channel (T1&T2&PD). The type of the tissue segmentation image has to be set, the image should be called 'template.nrrd'.

Set the ROI atlas file

Set the T1-weighted ROI atlas, where the atlas probabilistic subcortical structures and label maps have been segmented.

1.2.2Set tissue atlas description

Setting the tissue atlas description, either sharp or fuzzy, will set well-suited default parameters (concerning the warping for the tissue segmentation step), in order to improve the segmentation accuracy:

-  Sharp tissue atlas: B-Spline warping enabled by default for ABC

-  Fuzzy tissue atlas: B-Spline warping disabled by default for ABC

1.2.3Set the structures to be segmented

Parcellation maps

The user can compute brain parcellations.


Probabilistic subcortical structures

Twelve subcortical structures can be set or selected (left and righ): amygdala, caudate, hippocampust, pallidus, putamen.

Generic ROI maps

One can also add ROI maps:


1.2.4Set advanced parameters

Rigid Registration

By default, a rigid registration, which can be disabled, is performed to the input images, which includes re-griding. The grid template is by default the region of interest atlas. The grid template is only a template image to set size and spacing of the outputs images.


Using the default region of interest atlas, these parameters are:

-  size: 170x205x170

-  spacing: 0.9375*0.9375*0.9375

Depending on the input images, the user can directly set the grid template information, which is needed if the inputs images are larger (considering the spacing) than the region of interest atlas. Otherwise, the brain may be cut in the output images. It is also advised to use an isotropic spacing.

Tissue segmentation and warping parameters

These parameters may eventually be modified, but a non-expert user doesn't need to change them.

The first set of parameters is related to the tissue segmentation step. Depending on the tissue atlas description, different well-suited parameters will be used to improve the segmentation accuracy. One can use ABC, which performs a fluid registration.

The second set of parameters is related to the deformable registration step.

-  Skull-stripping

One can add the option 'delete vessels' if necessary. T1 images with high intensities which correspond to vessels, may affect the atlas warping. Such voxels will be replaced by a gaussian smoothed values (size 2).

-  Intensity rescaling

Intensity rescaling needs to be performed prior to the atlas warping. One can use histogram quantile matching (default) or tissue mean matching.

1.3Regional histogram option

The regional histogram option allows a histogram analysis by providing auxiliary datasets, such as DTI images.

To use this option, the user first has to select the type of the source images, in the second AutoSeg tab. These images have been processed in the main computation, so it can be a T1, T2 or a PD image and an atlas space, bias corrected or skull stripped-image (the T2 and PD skull-stripped images do not exist yet, so the user have to add them to the stripped directory if he wants to use it)


Then, the type of the transformation (rigid,affine or bspline) need to be selected. Only first auxiliary images are registered to source images


After that, the auxiliary data information has to be set. The user can use different types of auxiliary images (FA, MD, B0). He has to precise it by selecting the corresponding check button and writing the type in the text zone at the right of the check button. Thus, directories will be created for each type of auxiliary images with as a name the text in the text zones.



Next, the user needs to set the dataset. The data selection works as in the first tab. For the automatic auxiliary data selection, the user set the filters relative to the source images, files must be located in the data directory. Source images are automatically obtained from the data selection in the computation tab.

Finally, the user can set several parameters in the advanced parameters tab. The first one is quantiles (values by default are 1,5,33,50,66,95,99) and the second one is the point spacing, used only with a bspline registration (the default value is 10 mm).


1.4Menu options

AutoSeg contains two default parameters files:

. AutoSeg_DefaultSharpAtlasParameters.txt: default parameter file for sharp tissue atlas

. AutoSeg_DefaultFuzzyAtlasParameters.txt: default parameter file for fuzzy tissue atlas

When AutoSeg starts, it loads the 'AutoSeg_DefaultSharpAtlasParameters.txt' file.

The menu helps to deal with parameter files and default ones. The available options are:

. Load Computation file: Load a computation file. In order to re-process a study, one can directly load this file instead of setting again all the computation information.

. Load Parameter file: Load a parameter file. In order to re-process a study, one can directly load this file instead of setting again all the parameters information.

. Save Computation file: Save a computation file

. Save Parameter file: Save a parameter file

. Use default sharp atlas parameters: Use default sharp atlas parameters as current parameters

. Use default fuzzy atlas parameters: Use default fuzzy atlas parameters as current parameters

. Set default sharp atlas parameters: Save current parameters as default sharp atlas parameters

. Set default fuzzy atlas parameters: Save current parameters as default fuzzy atlas parameters

. Reset default sharp atlas parameters: Reset default sharp atlas parameters

. Reset default fuzzy atlas parameters: Reset default fuzzy atlas parameters

1.5Exit

If one wants to exit the tool while the process is still running, one has the possibility to stop the current process or to quit AutoSeg without stopping the pipeline, thus continuing the automatic segmentation in the background.


1.6AutoSeg outputs

1.6.1Quality control: MRML Scene

Quality control is provided via 3D Slicer MRML Scenes. A MRML scene is created per subject, containing a snapshot for each step of the pipeline. Upon completion of the pipeline, clicking on the 'Show MRML Scene' button generates a pop up window giving the choice of starting Slicer3 and automatically loading the MRML Scene of the first case. This allows the user to quickly check the quality of the segmentation pipeline, and see immediately if there has been a problem on one or several cases during the process.

1.6.2Skull-stripped intensity rescaled image

For each data, a skull-stripped intensity rescaled image is computed. This is the image the atlas is registered to. Using other tools, such as itkSNAP (http://www.itksnap.org), one can display this image.

1.6.3Regions of interest

If several subcortical structures have been selected, a file gathering all the ROIs is computed. Not only this file but also label maps, such as parcellation maps and generic ROI maps can be overlayed to the skull-stripped intensity rescaled image to check the accuracy of the automatic segmentation.

1.6.4Volume analysis files

If the 'Compute volume' option is selected the tool computes a volume analysis. A subdirectory 'AutoSeg_Volume' with related result files is created in the Process Data directory.