ABSS Software

Introduction

Segmentation of brain structures from Magnetic Resonance Images (MRI) is essential in many medical image analysis applications. Manual segmentation by an expert is usually accurate but is impractical for large datasets due to time constraints. Therefore, a method that learns from expert segmentation and generates accurate results in a reasonable time would be attractive for research and clinical applications. Many methods have been developed to approach this goal. In this regard, we developed a method to segment the brain structures such as putamen, caudate, thalamus, pallidum, hippocampus, amygdala, and VDC [1]. A software has been developed to evaluate the performance of the method in performing the segmentation process. ABSS contains five toolboxes:

1- Brain Extraction Methods: BET and ROBEX.

2-Image Warping and finding the best orientation.

3- Affine Registration.

4- Image Segmentation.

5- Learning.

Installation

There are two versions of the software for 32 bit and 64 bit systems. It highly recommend to use 64 bit version due to memory shortage problems in 32 bit systems. Pay attention that the software can only be installed in a folder whose path does not contain blank spaces, e.g The software can be installed in the folder “c:\program_files\abss” but not in “c:\program files\abss.” Microsoft Visual C++ 2010 SP1 Redistributable Package x64 (vcredist_x64.exe in software folder) must be installed before the installation of the software. please send me your comments and feedback to (zavata.afnan@gmail.com).

The ABSS can be downloaded from the link below:64-Bit Version: 

dropbox : ABSS_03_06_2014_v4.rar

Software Guide

This software is designed to be very user-friendly. The software consists of five toolboxes: Brain Extraction Tools, Image Warping, Affine Registration, segmentation, and Learning. Running a segmentation process would be started by clicking a single button. But there are some points about the orientation of the input images which should be considered during the processes. ABSS tries to find the best orientation to match to its atlas (MNI152). If this procedure fails, the orientation should be done manually using the tool included in the software!

Main Page

The main page of the software is shown in Fig. 2. It consists of some parts for importing the images, for selecting the training datasets, properties of segmentation, output window, project manager window, and viewing tools. Performing a successful segmentation process consists of multiple stages. If only one image is being segmented, it suffices to import the image. But if the segmentation of many images is desired, a new project should be created first. At first, I want to show a sample segmentation process with a given image in the main folder of the software.

Fig. 2

Hello World Example

From ‘project manager’ click on Open Medical Image. Fig. 3 is appears for selecting an image. Select HFH_001.hdr image from ‘software\sample_image’ folder in the main folder of ABSS software. Many items are created under ‘Project’ window as shown in Fig. 4. By right clicking on the image path under images item and clicking on show image (Fig. 4), the image is shown in the view window as can be seen in Fig. 5. You can browse through the image by the means of View tools section. By clicking on Segmentation button in the Training datasets section, the segmentation process will be started. After running the stages which are shown in the ‘Output View’, you can view the segmented image by clicking on show image on the image under simages item or you can overlay the segmented image on the registered image by clicking on Overlap on segmented button under simage item as shown in Fig. 6.

CAUTION: Correct orientation of the input image is very important for performing a successful segmentation process. ABSS automatically finds the best orientation. I have also designed a toolbox by which you can re-orientate your image manually. In some rare situations, the automatic orientation process fails and manual orientation must be performed.

Fig. 3

Fig. 4

Fig. 5

Fig. 6

Importing the images

The input image format for a segmentation process should be analyze 7.5. Two types of projects can be defined in ABSS. The first one is opening a single image and the second one is opening multiple images for simultaneous processing.

Importing a single image

By clicking on Open Medical Image button and selecting an image (as shown in Fig. 3), ABSS creates a project folder in the image folder which contains the following folders:

After each processing type, an image will be created in the given folder.

Importing multiple images

By clicking on Create New Project button, ABSS asks the user to select a folder to create a project. You can create a new folder and then select it for your new project. ABSS creates the aforementioned set of folders in the path you selected. By right clicking on project window, and selecting Add, ABSS asks the user to select a folder which contains the files with analyze format. ABSS then copies the images to the images folder of the project.

Viewing image

ABSS provides a simple viewer which does not consider Origin and Spacing of the image in viewing mode. The purpose of this viewer is viewing the output segmentation results and overlay them to the MNI152 template.

To view an image, right click on the image file name in the project window and then select Show Image (Fig. 7.). The image will be shown in the view window. Please do not close the ABSS First Page. If it is closed, the program will crash! Some tools have been included for browsing the images (see Fig. 8).

Fig. 7

Fig. 8

Boundary view and Transparency will be enabled after segmentation processing in overlaying image mode.

Brain Extraction Tools (BET)

ABSS uses two softwares for brain extraction tools. The first one is BET method (http://www.fmrib.ox.ac.uk/analysis/research/bet/) and the second is ROBEX method (http://www.nitrc.org/projects/robex/). For performing only a BET method, do the following:

1- Select your desired method from BET algorithm combo box from Segmentation Properties section as show in Fig. 9.

2- Click on Just BET check box.

3- If you select BET method, just click on Segmentation button in Training datasets section.

4- If you select ROBEX method, ROBEX requires that the images have the same orientation as its atlas available at (‘Software\ROBEX\ref_vols\atlas.hdr’). Fortunately, ABSS finds the best orientation, if you select automatic from orient search in Segmentation properties. If you already know the converted orientation angles, select manual from orient Search in Segmentation Properties and set the rotation parameters from the options windows. This will be discussed in the next sections. Click on Segmentation button in Training datasets section to starting the process.

Affine Registration

An implemented method has been developed for affine registration using the ITK library. Affine registration method registers the input images to MNI template available at (\software\MNI152_T1_1mm_brain.nii). For a successful registration process, the image should have the same orientation as MNI template. As described in BET section, if you select automatic from orient search, ABSS finds the best orientation. Then click on Just Registration to perform a registration with BET or not BET algorithm by selecting the BET algorithm.

Segmentation

To perform a segmentation:

1- Select Training datasets from training datasets section. There are two training datasets (IBSR, HFH).

2- Click on Segmentation button.

3- The segmentation process will be shown in the output window.

Training datasets

ABSS utilizes training datasets to perform its segmentation process. There are three training datasets:\

1- IBSR (http://www.cma.mgh.harvard.edu/ibsr/): by the use of IBSR datasets, 7 structures: putamen, caudate, pallidum, hippocampus, amygdala, thalamus, and VDC are extracted for right and left sides of the brain.

2- Henry Ford Hospital (HFH) (http://www.nitrc.org/projects/hippseg_2011): by the use of HFH datasets, right and left Hippocampus structures are extracted. These datasets contain 50 subjects, 40 of whom are patients with temporal lobe epilepsy and 10 are nonepileptic subjects.

Segmentation results

After the segmentation is completed, you will be able to see the segmented image in ABSS by clicking on show image on the image under simages item or you can overlay the segmented image on the registered image by clicking on Overlap on segmented button under simage item.

Orientation Problem

Many software consider that the input has same orientation to their atlas and users should perform the orientation manually. Some of them such as FSL and FreeSurfer do not have this limitation and find the best orientation. Finding the best orientation is a time consuming process. ABSS automatically finds the best orientation in 20-40 seconds depending on input image dimensions.

Depending on input image, amount of noise, type of disease, etc, the best orientation may be incorrectly identified in rare situations. It these cases, ABSS has a special tool which you can use to set the correct orientation manually. On the other hand, if you have datasets whose orientations you already know and do not want to use automatic searching, it is good to set the orientation manually.

Please follow this instruction to use warping tool box:

1- Set the rotation angles (yaw, roll, pitch) as shown in Fig. 9.

2- Select Just Registration from segmentation levels.

3- Select manual from orient search. If automatic is selected for orient search, Rotation Parameters will be disabled.

4- Click on segmentation button.

Fig. 9

.After the process is complete, you can check that the registered result overlays correctly on MNI template (\software\MNI152_T1_1mm_brain.nii) or not using MRICron (www.mccauslandcenter.sc.edu/mricro/mricron/) or other software.

The desired rotation angles for some datasets are:

· IBSR : Axis 1 Rotation angle : 90, Axis 2 Rotation angle : 0, Axis 3 Rotation angle : 180

· HFH : Axis 1 Rotation angle : 0, Axis 2 Rotation angle : 0, Axis 3 Rotation angle : 180

· OASIS : Axis 1 Rotation angle : 270, Axis 2 Rotation angle : 0, Axis 3 Rotation angle : 90 

Training an arbitary dataset

ABSS provides a special toobox to train an arbitary dataset by the use of MATLAB software. MATLAB version 2013b should be installed for the best performance. It should be detected by ABSS software. learning tab contains a toolbox to perform a training project (Fig. 10). 

Fig. 10

Firstly, a project should be created and MRI images and their segmented images should be imported to ABSS. The MRI images can be imported as before (Fig. 8). To import the segmented images, right click on the image path under images item and clickon Import segmented images (Fig. 5). segmented image contains the segmented structures with specific label numbers. For example, 51 and 12 are assigned to right putamen and left putamen, respectively. After that, there are two steps as follows:

Fig. 11

Fig. 12

MATLAB execution

before clicking on Training data button. ABSS should find MATLAB directory. By clicking on Find matlab botton, ABSS prompts you to find the matlab.exe. If ABSS can find the matlab correctly. MATLAB will launch and ABSS will ask you to confirm the MATLAB execution. 

Hello World to Training Project

Please follow these instructions to construct a training datasets:

1) Create a new project by clicking on Create New Project button. create a folder to build the project there (for example, d:\ibsr_train_project\).

2) By right clicking on project window, and selecting Add, ABSS asks the user to select a folder which contains the files with analyze format. Here $SOFTWARE_FOLDER\sample_image\training\img folder is selected. It contains two images of IBSR datasets. 

3) By right clicking on project window and clicking on Import segmented images button. ABSS asks the user to select a folder which contains the segmented files with analyze file format. Here $SOFTWARE_FOLDER\sample_image\training\seg folder. It contains the labels of images (Fig. 13).

Fig. 13

4)  By clicking on Registration button on Learning tab, the registration processes will be executed.

5) Make sure that the matlab path is detected by ABSS correctly by clicking on Find Matlab button.

5) Open '$SOFTWARE_FOLDER\training_config.txt' file and change the NAME field to IBSR1 (NAME=IBSR1). Please do not change other fields. This config file contains 7 structures. Please save the file before continuing (Fig. 14). 

Fig. 14

6) Click on Training data button and check read from a config file checkbox. Click on Ok button to start the training process (Fig. 15).

Fig. 15

7) After finishing the process, Please restart ABSS.

8) 'IBSR1' option has now been added in BET algorithm in the segmentation properties.

Note 1: a successful building training datasets depends on the number of training images, number of epochs.

Note 2: Orientation Search is set by automatic as default. It is recommended to run the warping toolbox (Orientation Problem) to find the orientations. Then select manual in Orientation Search and import the orientation manually.

Note 3: If you select automatic for Orientation Search but ABSS is not able to find the best orientation, the process will be terminated.  

Note 4: ABSS train 10 networks, So be patient!!!

References

[1] Jabarouti Moghaddam, M., Soltanian-Zadeh, H. 2009. Automatic Segmentation of Brain Structures Using Geometric Moment Invariants and Artificial Neural Networks. In: Information processing in medical imaging, Lectures Notes in Computer Science, Vol. 5636, pp. 326-337.