Interpolation

From Center for Cognitive Neuroscience
Jump to navigation Jump to search

Interpolation

Creating Interpolation Files

In Matlab, interpolation files are created by an algorithm that generates slices in between the segmentation images. To open Matlab in Terminal you must be logged into hoffman. Once you are logged on, you will run these commands in Terminal:

1. qrsh -l i,h_rt=5:00:00,h_data=4G
  • The "5:00:00" indicates that Matlab will run for 5 hours.
2. module load matlab/7.14
3. matlab

To create a new interpolation project, you will run these following commands in Matlab:

1. addpath(genpath('/u/home/FMRI/apps/unfolding/current/'));
  • Note: The warning message can be ignored.
2. cd /u/project/sbook/data/AD/subjects/AD_1XXXX/20######/analysis/structural/unfold
  • X's denote the subject number and # indicates scan date. Running this command will take you to the subject's unfold directory.
3. NLF_WhiteMatterCsfInterpolate
  • IMPORTANT: This command will automatically generate the interpolation file for the LEFT side of the subject's segmentation image. Reminder that this orientation is radiological, meaning when you are looking at segmentation images that run posterior to anterior it will be the RIGHT side. To generate the interpolation for the radiological RIGHT side use the command: NLF_WhiteMatterCsfInterpolate('right')

Once the command has been run, a window with the subject's segmented slices will appear. Scroll through by clicking on the left and right arrows to confirm if the orientation matches with your segmentation file in MrGray.

After confirming, click the "Select ROI (Only one anatomical side)" button and draw a box around the correct side of the segmentation image (if NLF_WhiteMatterCsfInterpolate you will draw around and select what you see on the RIGHT side). When drawing, make sure there is a considerable amount of empty space around the segmented region while the edges of box do NOT touch the edge of the blue window. Do NOT overlap with the unselected segmented region. After drawing, double click on the selected region.

Another window with the interpolation slices will appear. You can scroll by clicking on the left and right arrows to go through the slices and click the up and down arrows to alter the threshold of how much CSF or White Matter is filled. Select the "Write mrGray File and Render 3D" button. A final window of a segmented 3D region in gray and white will appear.

Instructions

The goal of interpolation is to create the smoothest transitions of segmented gray matter by editing the 6 new slices between each segmentation image created by the algorithm in Matlab. The segmentation images are all the edited slices with numbers divisible by 7. They should serve as "goal posts" to smoothly transition one segmentation image to the next.

There are several things to keep in mind:

1. There should be no significant "jumps" of white matter or CSF between each slice.
2. Because the segmentation images were used as templates to generate the interpolation slices, do not edit the segmentation slices.
3. Towards the anterior slices, there is a dark region at the top hippocampal head known as the fimbria, that can be mistaken for white matter. Be careful not to pixelate over possible hippocampal gray matter that is located above this dark region.
4. Be aware of having one voxel projecting from the rest of the white matter or CSF. The smoothest transitions also include uniform movement between slices.

Once interpolation has been completed, the center point for both the left and right side can be found by going to the middle slice and placing the position crossbars on the center of the gray matter between the tip of the CSF of the collateral sulcus and white matter. Input the values for X, Y, Z into the spreadsheet for the subject.

To create gray matter for the finished interpolation subject:

1. Open the menu and select Classification > Gray Layers
2. In the window that appears uncheck Gray contention and click OK
3. Go to the menu again and select Classification > Grow Gray Matter
4. Close the window after it is complete

To save gray matter, hold Control on the keyboard and click on the gray matter. This will select the green gray matter, changing its color to blue. Go to the menu and select File > Save selected gray.