CXR Planimetric Total Lung Capacity


 

What follows is the only documentation for this program.   It is being offered as FREEWARE Shareware and if you find it useful please contribute $50.00 to the author ().  

The program has a solitary purpose and this documentation will discuss that purpose, briefly review the medical literature to date and explain the operation.   Of note, the program has never been tested in a clinical setting.   No randomized trials have been performed with it, although the methodology is based upon randomized clinical trials.   I offer no guarantees as to it's accuracy.

I was contacted by a public health group in India a few years back and they were cataloging CXR's with my program.   I advised them of the need for a prospective study...

The first task is installing the program after acquiring it.   Simply un-zip the file to a chosen directory preserving the sub directory structure.   You should see a sub directory "Help" in which this file you are now reading is contained with it's graphics.   Therefore you can review this help file any time with a web browser such as Netscape.   Finally you must download the Visual Basic 4.0 (16 bit) Runtime programs which are linked to from the bottom of this page.

 

Purpose and Preconditions
 

This program is designed to facilitate the derivation of Total Lung Capacity from a Chest X-ray.   This is not an abstruse application as many techniques have been described for this purpose.   The original methodology is described and facilitated in my earlier DOS program CXRTLC.COM.   In general, CXR derived Total Lung Capacity has been found as accurate (if not more in certain disease states) than Helium/Nitrogen Dilution Techniques and Body Plethysmography.   A recent study using State of the Art Medical Planimetry Hardware and Software found this technique inaccurate and recommended against clinical application, but the vast medical literature to date has been favorable.

As you might guess, State of the Art Medical Planimetry Hardware and Software are costly.   I therefore endeavored to find an inexpensive means of obtaining the same results.   With the evolution of cheap digital cameras an easy device for inputting a Chest Radiograph became obvious.   This program presupposes that a Standard Chest X-Ray (PA & Lateral) is photographed.   Standard CXR implies that it was taken at 6 feet and developed on a 14x17 inch film.   These facts standardize aspect ratios and allow my translation of pixels to cm.   Furthermore a CXR in maximal inspiration should be obtained.   The camera must be positioned level with the mid portion of the chest film and with no imposed angulation.   Also make sure you photograph the actual borders of the film on your view box.   This can be done by taping the upper border to the view screen.   When you execute the program your first project (after loading your images) is to identify the borders of the film and crop them.   This establishes the 14x17 inch film exactly equal to the picture window size.   The program preserves aspect ratios as well (despite some distortion).

Program Operation
 
 The program starts by requesting the Lateral CXR Film first, and the PA Film next.   Make sure that the graphic files reside in the same directory as the program or else it will crash.   Also I recommend using bmp format or gif format as sometimes it doesn't recognize jpg's.   [The reason for this is that the 16 bit graphic libraries I am using are fairly out of date.   One company no longer supports their product and I have not upgraded to the other set of 32 bit controls due to laziness.]   I may try to fiddle with these bugs if there is any interest in the program.

Once you have loaded the appropriate films into the program a screen such as this should be present:

You will note that the lateral CXR is in the right window while the PA film is on the left.   You can see the film borders and some of the view box and room.   These extraneous parts must be cropped out.   Therefore the first choice is to click Selct.   If you click the CXR at any time (unless first clicking Selct) the program presumes you have begun outlining the lungs (see below).   In this event you will have to start over.

When the Selct button is clicked it activates the Select and Crop Mechanism.   For example, if you position the pointer at the upper left film border, hold the left mouse button down and drag it to the lower right border, a rubber band like rectangle will Select the new borders.   Then Click the Crop bottom and the new borders will fill the window.


 

The PA film (on the first image) might seems a bit too dark to see the lower film borders well.    The buttons below the images serve a few functions to remedy this.    The Shrp button controls Sharpness of the image, Cont controls Contrast, and Brght controls Brightness.   A scroll bar appears above these three bottoms when clicked.   Movement to the right will increase (e.g. increase brightness) while to the left will decrease these features.    Edge performs Edge Enhancement, Invert reverses the image to a Photo Negative while Embs Embosses it.   Undo will reverse any changes you've made to the image including Cropping!     Do not click Calculate Right until you have completed tracing or outlining the right lung.   By convention when I refer to the  right lung I mean the patient's right lung, that it is the one on the left side of the heart!

The following images are what the screen will look like after you cropped both the PA and LAT CXR's.   The buttons I alluded to above can make it easier to identify the borders of the film and the interface of the lung with the ribs and vasculature.   I particularly like the Invert View.


 
 

Now you are prepared to outline the borders of the lungs.   The simplest and a highly reproducible equation for calculating TLC from a CXR uses the Areas (Square cm) of the Right, Left and Lateral Lung views.   If you click the left mouse button on the PA CXR, the pointer will change to a Cross hair (+).  Make sure you make your first click on the right lung at the most apical area ( 1 ) and click along the right chest border ( 2-4) into the right Costophrenic angle ( 5 ) then click around (6 -10) and return to 1.   You may click as many points as you like in between each number as long as you follow the same path.   After Tracing the right lung you must Click [Calculate Right].   When prompted perform the same action on the left lung (Yellow Numbers 1-10).   Trace around the heart border on the left even if you can see behind it.   Then Click [Calculate Left].   At this point the Left window will convert to the outlines you performed (see below).   Make sure that they conform to the images outlined.   On the lateral view, again start at the most apical area where lung (Black @ 1) is seen, and outline the anterior chest (retrosternal) area.   Ignore the heart.   Trace along the diaphragm.   If two leaves of the diaphragm are visible trace midway between them.   The posterior line should be over the vertebral bodies.   Click [Calculate Lateral].   The lateral outline should now appear on the right.   Make sure it conforms as well (see below).   Don't worry if the apices don't meet perfectly or if there is a protruding line, the program takes care of that.


 


 
 

Finally you are prompted to Click [Calculate TLC) to derive the final results.   While you watch, the outlines are filled.   This is an additional safeguard because as the area is being filled, it is being calculated.   Therefore as long as we controlled our pixel to cm conversion (above) there should be no problem.   If the final tracings don't look something like these:

you might want to try again.   The final results pop up as so:
 
 


 

There are certainly any number of ways that this program can be improved and expanded.   I presently have no incentive to do so.   I am not at present performing clinical trials.   If anyone is interested in evaluating this program in a controlled fashion, perhaps comparing it to Conventional Computerized Planimetry, Helium / Nitrogen Dilution and Body Plethysmography in normal subjects and those with diseases (obstructive and restrictive processes), I would likely be available to assist.

 
Warren S. Goff, D.O.,P.A., FCCP
6555 99th Way N.  20A
St. Petersburg, FL 33708
warrengoff@warrengoff.com
http://www.warrengoff.com

You will need the Visual Basic 4.0 16 bit Runtime Files
They are available at the link below.   If this link is
broken, you may use any web search utility to find
these files.   They are available at www.microsoft.com
as well.   I can email them to you as a final resort.
You only need to install them once to run VB 4.0
16 bit programs.