MEASURING THE AIR CONTENT OF THE LUNG



Table of Contents

1. Loading Images
2. Convert the pixel values from Hounsfield units to percent air content and filter the unwanted values.
3. Isolate the lungs and airway from the remainder of the image.
4. Analyze the images.

(Note that the instructions for Region of Interest are for analyzing in the axial plane only. For sagittal and/or coronal analysis see appendix 1.)


Starting VIDA

To start VIDA, type "vida_start" on line prompt.


Loading Scan

If the image data is not on the computer disk, the user will need to transfer the data to disk before they may load it. For more explicit instructions, please see the Tape Utilities section.


Visualizing the Airways: Display Colors and Contrast

To enhance the ability to view the lung structures, you may wish to change the display colors. We suggest you select the "Heat" from the Color Scales menu. For more explicit instructions, please see the Color Scales section.


LOAD DATA FROM DISK TO SHARED MEMORY

The data that was loaded to the diskspace now needs to be loaded into Shared Memory so the other VIDA programs may be used. On the VIDA main panel select LOAD IMAGE DATA. This opens the LoadAnalyze Format (LAF) panel. Next, select the directory and then left click on the file to be loaded. Now activate the Load Image button. This will load the file (which we will call the pre-AIM file) into shared memory. For more explicit instructions, please see the Loading Image Data section.


SAMPLE THE DATA to determine CT air and CT fluid.

While still in the LoadAnalyze Format (LAF) panel select the Histogram/Sample entry under the View button. Pick a slice that shows a clear view of the descending aorta.(If the scan does not include the descending aorta then use a sample from the aorta. Use the slider bar to select slices needed in the LAF:Sample panel. Then use the Properties panel to adjust the scale min and scale max to view the heart instead of the lungs (increase both the min and the max values). Place the arrow on the top right corner of the aorta and while holding the left button down, draw a rectangle that stays within the borders of the aorta. Look on the screen where it says MEAN and record this number. Do this several times. Also sample the airway, (a good place is two slices above the carina) in this way. Close the window. For more explicit instructions, please see the LAF: Sample Panel section and/or Properties section.


CONVERT THE DATA TO AIR CONTENT (AIM)

Next step is run a program on the data so that the voxels with mostly air content will remain and the blood/tissue values will be diminished. Under the the VIDA main panel place the mouse cursor and hold the right mouse button down on the Image Manipulation and select the Algebraic Image Manipulation entry. This opens the AIM window. Type in the following equation in the middle canvas area:
B =(1 - (A-CTair) / (CTfluid-CTair)* 100.0);
If ((B < 1) || (B > 99))
OUT = 0;
ELSE
OUT = B;
Where CTair = the CT value of air, sampled in step 5 above, CT fluid = the CT value of fluid, sampled above, and A is the input value which the computer uses. ( The equation should look similiar to this one.)

Now left-click on the build button. A memo at the bottom left of the window will tell you when it is imported into the AIM program. Next, left-click on the file button and the select files window appears. Left-click on A (input file) and SHM (shared memory). Then left-click on the file to be processed in the AIM select file left canvas where the file names appear. Next left-click on the Apply button. The input file has been selected.

To select the ouput file left-click on the OUT button, then left-click on the Disk button, and then on the 16BIT button. Left-click on the directory line and type in the directory for the output file to be written to remembering to hit the enter key. Left-click on the file line and type in the file name for the output file (the post AIM file) to be written to remembering to hit the enter key. Next left-click on the Apply button. The output file has been selected. Close the AIM:Select files window.

In the AIM window, select the filter button. A memo at the bottom left of the window will tell you what is happening and when it is finished. When it is finished then close the window.


DELETE THE PRE AIM FILE FROM SHARED MEMORY

Go back to the VIDA main panel and select the Memory Manager button and open the panel. Choose the pre AIM file. Next, left-click on the delete button which brings up a window with the confirmation question. Answer the question and then close the Memory Manager window.


LOAD THE POST AIM FILE to SHARED MEMORY

Load the post AIM file so the new file can be used the file in 2-D Segmentation module. On the VIDA main panel select LOAD IMAGE DATA. Select the post AIM file. Now left-click on the Properties button to bring up the properties window. Change the following options:
At the bottom left of the window left-click in the box just below 16 to 8 BIT so that a check mark appears in the box.

At Scale Max, delete the number shown (32767) type 255, and press enter. You must press enter to reset the number.

At Scale Min, delete the number shown (-32767) and type 0, and press enter.
Close the Options window.

Under the View button select the Header Info... item. This brings up the LAF: Header Info window. Make sure that the X, Y, and Z pixel sizes are correct (That they are the same as the original pre-aim file values.). If they are correct close the window and left-click on the Load Image button. When the images are loaded, close the window and go to REMOVING THE LUNG... section.

If the pixel sizes are incorrect, close the Options and LAF window, and go to CORRECTING INCORRECT... section.


CORRECTING INCORRECT PIXEL VALUES

Check the pixel values shown in Head Info (under the view button on the LAF panel ) to make sure they match the pre-AIM file. If the pixel values are incorrect, it's usually because the header file (the file that tell the computer how the CT was set up when the images were obtained), got messed up somewhere. Fortunately, it's easy to fix.

On the VIDA main panel right-click and hold FILE MANIPULATION button to bring up the menu. Select the Create Analyze Header item. Select the line next to file and type the name of the post AIM file. Numbers should appear in the spaces seen in the windows; they may be nonsense. If no numbers appear, recheck the file name and try again. (Sometimes AIM will add spaces to the file name so do a directory listing on the computer's system to check this out.) Under IMAGE SIZE left-click on the line next to X(mm) and delete the number shown, then type in the correct pixel dimension.(This can be obtained from the Imatron Header File Information sheet by dividing the Field of View(FOV) by the matrix size and multiplying by 10 [to convert to mm] For more information.). Press enter. Repeat this for the Y and Z values. Left-click on the CREATE HEADER button . Confirm the new header, then close the window. Repeat the LOAD THE POST... directions.


REMOVING THE LUNG FROM THE REST OF THE IMAGE -- 2-D SEGMENTATION

Next step is run a program on the data so that just the lung fields remain and the rest of the data is disposed of so the measurements will be accurate. Under the the VIDA main panel place the mouse cursor and hold the right mouse button down on the Image Manipulation and select the 2-D Segmentation entry. This opens the 2-D Seg window. When the window opens, check that the post Aim file name is at the bottom left of the window. If it is the wrong file then delete everything from MEMORY MANAGER and try reloading the file.

Place the mouse cursor on the Properties button and select Window/Level entry. In this window locate the 8 COLOR MAX: line and delete 255 and type in 100. Press enter and close the window. The data image should change color scale appearance in the 2D seg main canvas.

Place the mouse cursor on the Properties button and select Tool Kit entry. In the top part of the 2DS: Tool Kit window left-click on the auto button and the inside button. In the middle section of the 2DS: Tool Kit window left-click on the Fill-2D object entry. The Input button should be selected beneath Fill On: area. In the Comparison: area the Less Than option should be selected. On the Value line delete 50 and type 30 and press the enter key on the keyboard.

Place the arrow on the CT image anywhere between the lung fields and the skin (the orange line at the perimeter of the image.) On the early cuts, the lungs may not be present so just put the arrow within the chest. Click the left button once. The computer will fill the chest with a red image, then delete all the pixels which are red and replace them with black. If this worked correctly then left-click on the + button at the top of the window. The next slice will appear. Repeat this fill and delete process for all the slices. If at any point a fill or delete did not work properly, click the Undo button at the top of the screen to back up one step.

Now move the cursor back to the 2DS: Tool Kit window and in the middle section titled Object left-click on Freehand option. Also, click on the Outside button in the top section labeled Paint modes. Then place the mouse cursor in the 2D Segment main canvas and while holding down the left mouse button and draw a circle which includes just the lungs and airway. (See example.) Release the left button and everything outside of this circle will be deleted. You should be left with just the lungs and airway on the image. (See example.) In the early slices, where there is no lung, just place a dot on the image to delete everything. The airway is only kept on images that also have lung.

When all the images have been processed with this then left-click on the File button. This will bring up the 2DS: Select Volume panel. In the 2DS:Select Volume window left-click on the Output button. On the line next to File: type the name of the post -2-D segmentation file(so it can be saved). Do not press enter. Left-click on the SAVE TO FILE button. Confirm SAVE TO DISK option. Close the 2-D Seg window.


DELETE POST AIM FILE FROM SHARED MEMORY

Same as in Delete the Pre AIM... (above), except use the post AIM file name.


LOAD THE POST 2-D SEG FILE.

Same as Load the Post AIM... (above), except that you don't have to change any options. Remember to check the header information for correct pixel dimensions.


ANALYZE THE IMAGE - REGION OF INTEREST (ROI)

Now its time to find the air content using the Region of Interest programs. Under the the VIDA main panel place the mouse cursor and hold the right mouse button down on the Analysis and select the Region of Interest (ROI) entry. This opens the ROI module. Place the mouse cursor on the Property button on the main Region of Interest panel and push the right mouse button down and click on the push pin at the top left of the Properties menu window to "pin" it in place. Left-click on the Magnification entry. This opens the ROI:Magnification window. On the line next to %x: delete the value and type in 40. Press enter. Close the ROI:Magnification window.

On the Properties menu window left-click on Window/Level entry. This brings up the ROI:Window/Level panel. On the line next to 8 bit max: delete 255 and type in 100 remembering to hit return afterwards. Close the ROI:Window/Level window. Close the Properites menu window.

On the ROI main panel left-click on the File button to bring up the ROI:Select Volume/Sequence window. Using the slider bar in the Sequence window, determine which are the first and last slices that have images present. Record these. Then display the largest image of the set.

In the ROI:Region Properties window left-click on rectangle option under the Create section. Move the mouse cursor back to the ROI main canvas. Place the arrow to the top right of the lung image and drag it to the bottom left while holding the left mouse button down. Release the button. This will draw a region of interest around the lung. Make sure that the entire lung is included in the region at the same time making the rectangle as small as possible.

In the ROI:Edit/List Regions window (top left of screen) place the mouse cursor on the objects button in the bottom left of the window. Press down and hold the right mouse button and secure the "push pin". Left-click on the copy entry. Next, place the mouse cursor on the paste entry and hold it down and select the range option. Move the mouse cursor into the ROI:Apply Range window and next to paste through: section left-click on the slice button. Next to the Start: line delete the number there and type in the number of the first slice which has an image of the lung. Press enter on the keyboard. Next to the End: line delete the number there and type in the number of the last slice which has an image of the lung minus one (n-1). Press enter on the keyboard. Left-click on the Paste button. Now the rectangle will appear on all the slices with the lung image present.

Now move to the ROI:Stats window. Left-click on the Properties button (at the bottom right of the window). This bring up the ROI stats properties window. In the ROI stats properties window select Units button. On the min: line delete the number there and type 10 and then press enter. On the max: line delete the number there and type 99 and then press enter. Now, click on the Apply button.

Move the mouse cursor back to the ROI:Stats window.Under the statistics box of the ROI:Stats window click on the following items: slice number, mean intensity and area . ( You will have to scroll down to see the area choice.) Then click on the Get Stats button. VIDA will now calculate the area and the mean intensity for each slice in the rectangle and display it in the top half of the ROI:Stats window

Move the mouse cursor to the File button and depress the right mouse button down and hold. Choose the SAVE AS option. This will bring up the computer systems text editor. Type in the post ROI file name and press enter. This will save the ROI statistics to a text file. Close ROI. Close VIDA by returning to the VIDA main panel and left-click on the Quit button. Then select the Yes button for closing down VIDA.







Appendix 1

Appendix 2






VIDA Tutorial Sections Relevant to the Airway Measurement Application Tutorial

You may find it helpful to review the relevant VIDA tutorial sections.
Tape Utilities
Loading Image Data
LAF:Properties
Color Scales
AIM
AIM: Select Files
Shared Memory
Make Analyze Header
2-D Segmentation
2-D Seg: Tool Kit
2-D Seg: Select/Volume
Region Of Interest (ROI)
ROI: Region Properties
ROI: Magnification
ROI: Window/Level Panel
ROI: Edit/List Regions
ROI: Stats





©1994-99 Division of Physiologic Imaging, Dept. of Radiology, Univ. of Iowa


Air Content | Tutorials | DPI Homepage | VIDA | NLM | Contact Us | Search


Last modified: Fri Jun 4 13:23:52 CDT