MRIOtl: step-by-step tutorial

1. Unpack the directories, and start matlab

unix: gunzip CTMRedit.tar.gz images.tar.gz; tar xvf CTMRedit.tar; tar xvf images.tar; matlab;

DOS/Windows: pkunzip -d; pkunzip -d; matlab;

2.  Add the CTMRedit directory to your matlab path

>> cd CTMRedit; path(pwd, path);

This is important. CTMRedit will change the current directory, so you will not be able to count on simply running commands in the current directory. If you want to remove files from your path after you have run the demo, you can use the "rmpath" command.

3. Mex the geread_i function, so it runs faster.

>> mex geread_i.c; (If you are using matlab 5.2, you can type "mcc geread_i.m" instead; the effect is pretty much the same).

4.  Start CTMRedit, specifying the image directory as argument

The argument syntax is actually quite flexible; you can specify as much or as little of the path as you want, and CTMRedit will try to guess the rest.  If CTMRedit guesses wrong, you can usually steer it to the right place using the popup menus.

>> cd ..

>> CTMRedit images/ae/a

The image window should come up looking something like this.

CTMRedit window, with full-sized main image

5.  Zoom in on the throat region

If "Zoom On" is selected from the tools list (or checked in the Tools menu), you can use the imagesm function to zoom without aliasing:

CTMRedit window, with zoomed main image

6.  Load the Distribution Outline

Press the "Loud Otl" button to load an outline from the distributed outline file (which is located in the directory images/ae/a/otl/).

CTMRedit window, with outline loaded from the

7.  Clear the Distribution Outline

Delete all points in the displayed outline by pressing the "Delete All: Outline" button. Note that any changes to an outline (including "delete all points") do not affect the saved outline file until you save it. Don't save your empty outline right now; it's nice to leave the distribution outline where it is.

8.  Create Your Own Outline using the Add Line Tool

Choose "Add Line" from the list of editing tools.  Click to start the outline. Click again at each corner point.

CTMRedit window, in the process of adding a multiline

9.  Complete the Add Line function by Double-Clicking.

When you're done with your outline, double-click on the last point. All of the lines will be converted into points.

CTMRedit window, multiline converted to outline points

10.  Save Your Outline in a File

11.  Adjust the Intensity Threshold

If you adjust the "Threshold" slider, CTMRedit will use a red 'X' to mark every pixel at which the image intensity crosses the selected threshold.

CTMRedit window, showing threshold-crossing points

12.  Use the Magic Wand Tool to Outline a Region

Once you have chosen a threshold value that you like, choose the "Magic Wand" tool, and left click in any dark region. After some computation, CTMRedit will outline the dark region with green points.

window, region outlined using Magic Wand

13.  Delete Unnecessary Points Using the Delete Tool

CTMRedit window, outline cleaned up using Delete Points