Making cross-sectional area measurements
A. Open NIH Image from the Apple menu (if it is not already open).
B. Go to the File menu and open the binary stack that you want to analyze. Each image window should have a black background and a white segmented structure. If not, go to the special menu and select invert.
C. Select "project from the Stacks menu and set the parameters as follows. Then click on OK.
You will now have a single window with the projection window angle of view matching that of the segmented volume.
D. When appropriately modified (see below), this projection will serve as a map for the cross-sectional area measurements.
E. Now activate the binaried segmented stack by clicking on it; Go to the Special menu and select "invert" so that the segmented structure is black and the background white.
F Make the "projection" window the same size as the binaried segmented window from which it was produced.
1. Click on the binaried segmented window to activate it
2. Determine the height and width of the segmented window (choose "get info" from the File menu or hit apple key and i key. Write down the height and width measurements from the displayed box. e.g. 214 x 189 pixels).
3. Click on the "projection" window to activate it.
4. Click on the rectangular selection tool.
5. Select an area that has the same dimensions as the binaried window (determined in step 2.
Put the arrow pointer in the extreme upper left corner of the projection window and while pressing the mouse button enlarge the selection box until it has the same dimensions as the previously determined height and width measurements in step 2. The dimensions of the selected area will appear in the "Status Window" in the lower left corner of the screen. Release the mouse button so that the selected area remains outlined.
G. Center the selection so that the right and left margins are the same.
1. Click and hold down the mouse button within the selected area, then drag the selected area all the way to the right. Notice that the status window will show an x dimension of 0 when you first click and hold down the mouse button and when the selection reaches the extreme right it will show how far the selection was moved. (usually about 60 pixels).
2. Again click and hold down the mouse button within the selected area, and drag the area to the left by an amount that is half of that determined above (i.e, about 30 pixels). The selection area is now centered.
H. Now make a new projection window with the same dimensions as the segmented window.
1. From the edit window copy the selected centered area in the projection window.
2. Create a new window with the same dimensions as the selected area and binaried segmented window.
a. Select "new" from the file menu.
b. Enter the height and width in pixels, as previously determined and click on OK.
c. Paste the selection into the new window
d. Save the new window as "project". This is the name the NIH image macro will look for.
e. It is also useful to save the new window as by another name in case the project window accidentally get destroyed.
I. As an optional step you can check the alignment of any binaried segmented window with the projection window.(this allows you to see where a specific segmented slices fits into the projection). Use the small window displays.
1 Step through the segmented stack to find a window you want to superimpose on the projection window.
2 From the edit window choose "select all" and then copy the selection.
3 Click in the projection window to activate it
4 Paste the selected image into the projection window (this will completely obscure it).
5 Choose "paste control" from the Window Menu and then click on add or subtract. The slices will now be displayed within the projection.
6 After you see what you want, go to the edit window and "undo paste" to restore the projection window to its original form. Also go to the Window Menu and click on "hide paste control".
J. Load in the 3D macros for image analysis
From the "special" menu select Load Macros. Click on 3D analysis or 3D analysis alias and Open. You won't see anything to indicate that the 3D program is open but it wont work if its not open. You can go to NIH image on the hard disk and open NIH image to find and open 3D Macros. In this case the text will be displayed and you have to go to the special menu and select "Load Macros from Window". This is what you have to do if you want to change window size or some other Macro parameter.
K. Making the program work
1. In the following steps it is best to have the projection window full size (click on the little box in the upper right hand corner of the window);
2. The binaried segmented window should be small and positioned in the lower right in front of the projection window. This window must have a white background and black profiles. If not, select invert from the Special Menu.
3. Scan through the segmented binaried stack to find a starting place; it is best to start where the slices of the spiral are elongated rather than cross-sectional profiles.
4. From the NIH image tool box choose the angle tool. This is the last tool of the left hand column. Click and drag according to the following diagram.
After the release at point C, look at the status box and note the angle (it should be near 90 degrees. This is the angle at which the computer will slice the segmented slices in the binary window.
5. Select the starting point in the binaried segmented slice window.
Do this by clicking on the "straight line" tool in the tool box; this is the 5th tool down in the right column. Then click once in the selected part of the binary window where you want the analysis to begin. This will leave a dot at the start point (as shown above). Now hit the S Key to start and you will have two prompts.
The first wants to know the angle at which the first cut is to be made - type in the angle you previously measured, i.e. ca 90 degrees.
The second is defaulted at 90 degrees and all you need to do is click on OK.
6. Hit the Move (M) key and observe that a small "slice" window appears in the upper left corner of the screen. When you hit the M key the macro tells the computer to move a set number of pixels (normally set at 5) down the center of the volume being examined (the number of pixels can be reduced or increased by hitting the Y or R keys). As a new location is reached, the volume is sliced in the plane you told it to in step 5 above and the slicing is displayed in the little window. Then the computer finds the smallest cross-sectional area and you see this section being made in a second slice window that replaces the first. The size of the window can be adjusted by changing the size in the macro called "start", change line 7. This is normally set at 40 but should be increased to 80 or 100 when in the large part of the basal turn. The smaller the window the faster the slice.
To modify the macro find the 3D analysis folder, open it and find the next to last macro called "start". Then change line 7 to the window size desired. Line 6 (step size) can also be changed here.
When first starting, hit the M key a number of times and you should see that each time the key is hit, the position of the center of the cross sectional area is indicated by a dot in the project window. If you hit the A (area) key the cross-sectional value will be stored. Continue to hit M and A to record values along the spiral. At each point where a CSA value was accepted, there will be a dot on the project window.
Any time you want to reverse the direction of your moves hit the T (travel) key. Sometimes the direction will reverse itself in the middle of a series of measurements; thus, watch the cursor in the projection window to see that it moves correctly
Each time a movement is made you should watch the cross-sectional area window in the upper left of the screen. The first window should be larger than the second; if the second window is elongated the section is not a true cross section and the data should not be saved.
L. Saving the cross-sectional area measurements
1. After a series of area measurements has been accepted you may want to go to a new point and start another series of measurements.
To save the values you have stored in the area template go to the "windows menu" and click on "areas".
Then select "save as" from the file menu and give the file an appropriate name, generally something like GP 12314 areas 1
2. Other measurements made on the same prep can be saved as GP 12314 areas 2 etc. Adding the date to the name is sometimes useful because eventually may end up with other area measurements and this is a quick way to identify the ones that belong in the same set. Also, it provides a name that is easy to search for with FIND.
Note - area measurements must be made for the entire structure if you are going to use the data to plot distance or percent distance.
M. Making area measurements in spaces that have tight turns
This may be a problem when working with the apex of the cochlea and especially when measuring the scala media in a hydropic cochlea or the combined scala media and scala vestibuli. Try the following:
1. Reduce the travel distance with the Y or R key to help negotiate tight turns.
2. Start the measurements from several different locations.
3. As a last resort, use another scala from the same cochlea as a map for the problem area. If for example, you know that the measurements go well for the scala media, not for the combined SV+SM you can do the following:
Save your problem volume to the name "other".
Open the volume you will use as a map volume and start the slicer in the area where you were having trouble.
After a couple of moves select "alternate stacks" from the special menu. Now each time you press M the Map Volume is sliced first to calculate the correct slicing angle for a cross-section and then it uses these angles to slice the problem volume. (Note- the size of the slicing window is automatically increased to compensate for a larger cross-sectional area.
Putting the saved data into a spreadsheet so that it can be graphed.
A. Put the saved data files for one structure into one spread sheet. These files were saved as tab-delimited tables so they should open into an EXCEL spreadsheet .
1. Open the application EXCEL.
2. Open (you may need to "Import" rather than open) all text files that contain the saved data. Click on each one, or click and drag down just to the left of the icons while holding down the shift key to select the text files; then click to open all at once.
3. Import the worksheet called "OLD" from the MISC MRI STUFF FOLDER.
This means go to the file menu and click on "import". Then find "OLD" click on the OPEN button.
4. Select the entire contents from each text file and paste them into the "OLD" spread sheet. It does not matter which order they are pasted in.
If you know which entry represent the most basal data point row, note its number; you will need this information below.
5. Close all the text files but don't save any changes since these are the only back-up you have in case of an error.
6. You can save your work at this point but if you do, open a new worksheet and then copy and paste the data. Save it as "combined" area data" and then close it but keep the "old" worksheet open to sort the data.
B. Sort the coordinates from base to apex.
This process will involve using three spread sheets:
"OLD" - This is the spreadsheet into which you will first paste all the area data.
"NEW" - You will Paste the most basal area data into the first row of this spread sheet and then use the SORT macro to import the data in the OLD sheet into its proper numerical order.
1. Open the file called "NEW" from the MISC MRI folder in the Current MRI folder. This is the spread sheet into which the area data in OLD will be sorted; it will appear as follows:
A2 will say "Begin paste here"
G1 will say 0.00
2. Activate the OLD spreadsheet and find the data point row that represents the most basal measurement. Select and cut this row from the spreadsheet and then Paste it into the NEW spread sheet at the point indicated ("begin paste here").
Note: If you don't know the most basal data point row go to "Graphing Coordinates" in the NIH Image procedure to determine the x and y coordinates.
You can also look at the projection image to get an idea of what the most basal point must be from the X, Y or Z coordinate.
3. There should be no gaps in the OLD data sheet so you now need to close up any gaps; there will likely be one where you cut out the most basal area data..
Note: the number of data point rows that were pasted after the initial most basal data point row; you will use this number in the sorting procedure.
4. Now open the Macro called SORT from the MISC MRI STUFF folder.
a. In the text of the SORT Macro find the entry named "=FOR(Counter",1,167) and change the 167 to correspond to the number of data point rows in the OLD spreadsheet. This is done as follows:
Click on the entry in the Sort Macro and then alter the number in the formula at the top of the window. After making the entry hit the Enter Key on the far lower right of the numeric key board.
=FOR("Counter",1,167) Alter this entry
b. Press at the same time the OPTION +APPLE +A keys to start the SORT macro running. The NEW spreadsheet should now grow while the OLD shrinks. When finished the NEW spread sheet will contain all of the entries in their proper order.
c. Close the OLD spreadsheet but don't save any changes.
C. Place the sorted coordinates into a spreadsheet that will do all the calculations of distance so that graphs can be made.
1. Open the file called Area Template from the MISC MRI Folder. This spread sheet contains all of the formulas for distance calculations but the data must be copied into it in a particular way. It will have 20 rows and columns labeled A-G; The columns are labeled as follows:
A = X coor
B = Y coor
C = Z coor
D = distance
E = length
F = % distance
G = area sq. mm.
2. Select and copy the X,Y and Z coordinates in the first three columns of the NEW spreadsheet and paste them into the first three columns of the area template. Paste into line 2
3. Next select and copy the last two columns of the NEW spreadsheet and paste them into the Area Template in columns H and I beginning in row 2.
4. The spreadsheet formulas in columns D and G are now correct for only the first 20 rows. To make them correct for all entries you need to separately highlight cell D20 and then drag down to select all of the cells in the column (pull down on little box at lower right of selection window. Make sure all data points are included for length calculations. Now select "fill down" from the edit menu.
Repeat the same fill down procedure for column E20.
5. In the area template you now need to update the basis of the percentage distance calculations to the proper cell reference.
a. Note the row number of the last cell in column E
Now click on the first cell in column F, then go to the F column formula and change the divisor to equal the row number of the last cell in the G column.
I think this is the # 20.
b. Click on F20 and then Fill to the last cell in the F column. Thus, each row now has the same formula
6. Save the data
Choose "Save as" from the file menu to save the Area Template to an appropriate name, i.e. GP 12314 ST area data. If you simple use SAVE you will destroy your template.
7. Close, but don't save any changes to the spreadsheets OLD, NEW and SORT.
Graphing the data.
A. Transfer the data to Cricket Graph and then use the scatter plot menu to make a graph.
1. Open the area data created in the above steps and select and copy all the data points but not the column headings.
2. Open Cricket graph from the apple menu and paste the data into the work sheet.
3. Save the data as XS area worksheet with an appropriate name, i.e. ST WS 12345 .
4. Plot the data with scatter plot
Graphing Coordinates in NIH Image.
Coordinates can be graphed in 3D using NIH Image. This is useful for determining the x and y coordinates of the most basal measurement or for creating superimposed pictures of the volume rendition and the data points.
A. Open the EXCEL document that has the area data and select and copy the first three columns (x, y and z).
B. Select NEW from the File menu to create a new spreadsheet. Copy and paste the area template data into this spread sheet.
C. Select "Save as" from the File Menu. This will show an "Options" box and within this select "text". Save this to an appropriate Folder, i.e. GP 12314
D. Start NIH Image from the Apple menu. Open the saved projection of the cochlea, i.e. GP 12314 ST Projection.
1. Determine the Width and Height of the projection window. See step F 2
2. Go to the Special menu and select "Plot XYZ; it will then prompt you to enter the appropriate height and width measurements.
3. Now go to the spread sheet and you should see a nice 3D plot of the data points. By putting the cursor on any point you can determine the X and Y value of the point.