Skip to content

Commit

Permalink
Added Manual, next try
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Serrano committed Jun 24, 2014
1 parent 465b2e0 commit ba1fec8
Show file tree
Hide file tree
Showing 327 changed files with 50,415 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dropbox
@@ -0,0 +1 @@
524581344
10 changes: 10 additions & 0 deletions .gitignore
@@ -0,0 +1,10 @@
*.nii
*.nii.gz
*.ps
gibsconnect*.mat
*.gipl
*.png
*.mat
fibers
*.json
*.woff
1 change: 1 addition & 0 deletions Lead_manual/Acquiring and Setting Atlases.md
@@ -0,0 +1 @@
## Acquiring and Setting Atlases
3 changes: 3 additions & 0 deletions Lead_manual/Creating the 3D Scene.md
@@ -0,0 +1,3 @@
## Creating the 3D Scene

lower line svae button: for exporting HD figures
25 changes: 25 additions & 0 deletions Lead_manual/Formatting the Image File Names.md
@@ -0,0 +1,25 @@
## Renaming the Image Files

_Lead-DBS_ can process different image views. However, the image files must have a specific name format for them to be recognized.

**MR imaging** files within each folder must have the following format:
- Pre-operative images:
- `pre_tra.nii` for transversal images
- `pre_cor.nii` for coronal images
- `pre_sag.nii` for sagittal images
- `*.nii`for fiber tracking images

- Post-operative images:
- `tra.nii` for transversal images
- `cor.nii` for coronal images
- `sag.nii` for sagittal images

**CT imaging** files within each folder must have the following format:

- Pre-operative images:
- `pre.nii`
- Post-operative images:
- `fusion.nii`

The user can download the program [MRIcron](http://www.mccauslandcenter.sc.edu/mricro/mricron/) to view the different image files and help in correct naming.

12 changes: 12 additions & 0 deletions Lead_manual/Installation.md
@@ -0,0 +1,12 @@
## Installation

_Lead-DBS_ is a toolbox that depends on [MATLAB](http://www.mathworks.de/products/matlab/) ([The Mathworks](http://www.mathworks.com/)), thus requiring no installation onto the operating system.

However, there are some required steps prior to using the toolbox:

1. After downloading the folder containing _Lead-DBS_, the user must set a path in MATLAB for the toolbox folder (for help on setting a path in MATLAB, go to **Section 1.1**).
2. The user must download and incorporate atlases into the _Lead-DBS_ directory (for more details on this step, refer to **Section 1.2**).
3. The user must have _SPM_ available in the MATLAB directory.

Once the path is set and the atlases are installed, the user can run _Lead-DBS_ by entering the command `lead` into the MATLAB Command Window.

30 changes: 30 additions & 0 deletions Lead_manual/Lead-DBS Main Window and Loading Images.md
@@ -0,0 +1,30 @@
## Lead-DBS Main Window and Loading Images
The main window of Lead-DBS is divided into 5 sections:
- Selection of patient directory and imaging technique
- Normalization
- Reconstruction
- Manual correction
- Visualization

The button `Run` in the bottom right runs **ALL** processes that are checked within the main window.

**Notice**: If the user wants to run a specific process(es), he must tend that only the desired checkboxes are selected!

![Lead-DBS Main Window]()

#### 1. Selecting the file directory

By clicking on `Choose Patient Directory` on the top, the user can browse and select the location of the image folder.

For _Lead-DBS_ to analyze the images, it needs at least the following views:
- for MR images, a post-operative transversal view
- for CT images, a post-operative transversal view

The user may also have more views available, in which case the process of electrode localization can be made easier.

**IMPORTANT:**
Images must be in the `*.nii` file format and must have a **_specific naming format_**. For details on how to format the file names, please refer to **Section 2.1**.

#### 2. Selecting the imaging technique

After the image directory has been chosen, the user must select the imaging technology in the dropdown menu on the top right of the window. `MR` imaging is the default setting.
26 changes: 26 additions & 0 deletions Lead_manual/Normalization of Images.md
@@ -0,0 +1,26 @@
## Normalizing the Images

_Lead-DBS_ allows the user to automatically normalize the patient images into MNI space.

In this process, post-operative images are first coregistered with each other. These are then coregistered with the pre-operative images, in case they are available. Finally, all coregistrations are normalized into the MNI space.

_Lead-DBS_ has the following normalization protocols:
- _Schönecker 2009 linear threestep (Post-OP only):_
This protocol...
- _Schönecker 2009 linear threestep (include Pre-OP):_
This protocol...
- _Witt 2013 nonlinear:_
This protocol...
- _Fuse CT with pre-operative MRI:_
This protocol...

The user can select the protocol to run depending on the image files that are available for processing.


After loading the patient directory and choosing the imaging technique (see **Section 2**), check the option `[] Normalize` and press `Run`. During this process, the user will be asked to evaluate the coregistrations. Details on this step can be found in **Section 3.1**.


_Lead-DBS_ gives the user the option of also normalizing fiber tracking images into MNI space, when available. For processing of these images, the option `[] Normalize Fibers` must be checked.

The option `[] Check` lets the user look at the different views of the normalized images at the end of the process.

10 changes: 10 additions & 0 deletions Lead_manual/README.md
@@ -0,0 +1,10 @@
# Welcome to Lead-DBS

_Lead-DBS_ is a toolbox based in **MATLAB** that allows the user to **localize** and **visualize** in a 3D model electrodes in patients treated with **_deep brain stimulation_**.

##### Key Features
- Linear and nonlinear normalization of MRI and CT images to MNI space
- Reconstruction of the electrode trajectories when targeting the basal ganglia and the subgenual cingulate area (Brodmann area 25, or Cg25)
- Manual correction of the electrode localization
- Creation of a 3D model of the electrodes in their target areas
- Calculation of the Volume of Activated Tissue and visualization of the fiber and brain area connectivity
44 changes: 44 additions & 0 deletions Lead_manual/Reconstruction of Electrode Trajectory.md
@@ -0,0 +1,44 @@
## Reconstructing the Electrode Trajectory

Once normalized volumes are found within the chosen patient folder, the images are ready to be used for reconstruction of the electrode trajectories and manual correction, if needed.

#### Reconstructing Electrode Lead Trajectories
For the reconstruction step to take place, the user must check the box `[] Reconstruct`, choose the preferred parameters for obtaining the images, and press `Run`.

**IMPORTANT:**
Always pay attention to the checkboxes. Remember that _Lead-DBS_ runs all processes that are checked!

#### Reconstruction Parameters

To perform a reconstruction as precise as possible, _Lead-DBS_ uses the different planes to pinpoint the artifacts caused by the electrodes and calculates thereafter its trajectories through space. The user can also choose to reconstruct one or both hemispheres.

Several options are available to help in this process:

##### 1. Entry point for electrodes
The parameter `Entry point for electrodes` presents the user with following options:
```
- STN, GPi, or ViM
- Cg25
- Manual
```

An **automatic ** reconstruction will be performed if any of the first two options are chosen. The option `STN, GPi, or ViM` targets electrodes that have been implanted in patients with movement disorders. The option `Cg25`targets those in patients with depression.

The option `Manual` will require the user to pinpoint the entry points of the artifacts within the images. **Section 4.2** describes the details for this step.

##### 2. Axis

The parameter `Axis` determines the image planes that _Lead-DBS_ will use to locate the electrode. The following options are available:
```
- Use transversal image only
- Use transversal but smooth
- Use average of coronal and transversal, smoothed
```

##### 3. Mask window size
The default option is an **auto** window size. This has proven to give good results in the reconstruction.

However, numeric values (best results obtained from **5** to **15**) can be entered to fix the size of the mask. A smaller mask will avoid nearby structures that could interfere in the reconstruction step.



16 changes: 16 additions & 0 deletions Lead_manual/SUMMARY.md
@@ -0,0 +1,16 @@
# Summary

* [Installation](Installation.md)
* [Setting a Path for Lead-DBS in MATLAB](Setting a Path for _Lead-DBS_ in MATLAB.md)
* [Acquiring and Setting Atlases](Acquiring and Setting Atlases.md)
* [Lead-DBS Main Window and Loading Images](Lead-DBS Main Window and Loading Images.md)
* [Renaming the Image Files](Formatting the Image File Names.md)
* [Normalizing the Images](Normalization of Images.md)
* [Checking the Coregistrations and Normalizations](/checking_the_coregistration.md)
* [Reconstructing the Electrode Trajectory](Reconstruction of Electrode Trajectory.md)
* [Automatic Selection of Entry Points](/automatic_reconstruction.md)
* [Manual Selection of Entry Points](/manual_reconstruction.md)
* [Manual Correction of Electrode Localization](manual_correction_of_electrode_localization/README.md)
* [Writing 2D Images](writing_2d_images/README.md)
* [Creating the 3D Scene](Creating the 3D Scene.md)

9 changes: 9 additions & 0 deletions Lead_manual/Setting a Path for _Lead-DBS_ in MATLAB.md
@@ -0,0 +1,9 @@
## Setting a Path for _Lead-DBS_ in MATLAB
To add _Lead-DBS_ to the MATLAB directories, do the following:
1. Go to the `File` tab.
2. Click on `Set Path...`.
3. In the new window click on `Add with subfolders...`.
4. Browse to the location of the _Lead-DBS_ folder and select it.
5. Finally click on `Save`and `Close`.

The _Lead-DBS_ folder should now appear in the MATLAB directory.

0 comments on commit ba1fec8

Please sign in to comment.