Mapping the Human Body

Using GIS in research and treatment of melanoma.

by , / October 31, 1997 0
Geographic information systems (GIS) have a wide range of applicability even outside the traditional mapping, spatial-analysis and data-storage uses. This article discusses an application of ArcView, a desktop GIS package, in the research and treatment of melanoma. With the exception of epidemiology, the field of medicine is not one to which GIS has often been applied. However, aspects of the field lend themselves extremely well to spatial analysis and therefore to the use of spatial tools.


Cutaneous lymphoscintigraphy is the nuclear-medicine technique that allows the pattern of lymphatic drainage to be recorded from any part of the skin. This is achieved by injection of the radiopharmaceutical Technetium-99m-antimony sulfide colloid (99mTc-Sb2S3) around the excision biopsy site or primary lesion. Dynamic images of the tracer moving through the lymphatic channels are recorded using a digital gamma camera and are computer enhanced to ensure that even the faintest channels are detected.

Once the channels have been defined, their course can be marked on the skin of the patient, if the surgeon plans to excise these channels. In most patients, however, these are not removed surgically and treatment involves wide local excision of the primary excision biopsy site followed by lymph node dissection, if the risk of nodal metastases is high.

In addition to the channels, interval nodes (nodes along the channel but not in the lymph node fields) and sentinel nodes (the nodes to which the lesion directly drains) are also detected and their location marked on the skin. The depth of the sentinel nodes beneath the skin surface is measured on the scan.

This technique allows draining node fields to be accurately sampled for the presence of metastases with the minimum of surgery. It also ensures that all relevant material is removed, even if the path taken through the system or the draining node fields themselves are different from those predicted by traditional methods.

The results of this technique, which was performed on over 1400 patients, were recorded in a spreadsheet and then transferred onto schematic maps of the body using ArcView. The images were used to examine some of the commonly held perceptions about the node fields to which lesions on various parts of the body drain.


Traditional medical concepts of lymph node drainage paths date back to 1843 when Sappey injected cadavers with mercury to trace the paths taken through the lymphatic system from various points on the body (Sappey 1843 cited in Uren, "Lymposcintigraphy in High Risk Melanoma of the Trunk: Predicting Draining Node Groups, Defining Lymphatic Channels and Locating the Sentinel Nodes," Journal of Nuclear Medicine, Vol. 34, 1993). Lymphoscintigraphy has shown these concepts to be incorrect in a large proportion of patients.

Mapping the primary lesions and their draining node fields allows the researcher to quantify and analyze the divergence of paths actually taken from those predicted to diverge. Plots of all primary lesions draining to a particular node field can be used to establish the general pattern of distribution. With the addition of color, it can be shown that the lines traditionally used to delineate watershed boundaries in the lymphatic system are incorrect.


Melanoma depends almost exclusively on surgical treatment. After a biopsy has revealed malignant melanoma, a wide local excision of the area surrounding the primary lesion site is performed. Because the thickness of the melanoma is the most important prognostic factor, the margins for this excision increase with the thickness of the original melanoma.

The thicker the melanoma, the worse the prognosis and the more likely the presence of metastases in the draining node fields. In patients with intermediate thickness melanoma (between 1 mm and 4 mm), about 30 percent will have micrometastases in the draining lymph nodes. Elective lymph-node dissection in this group of patients would thus involve unnecessary surgery in about 70 percent of the patients.

By accurately locating the sentinel lymph nodes, lymphoscintigraphy allows each relevant node field to be sampled with minimal surgery. If the sentinel lymph node is normal, then the node field is normal and no further nodal surgery is required. If the sentinel node is positive for metastases, then a radical node dissection is performed in that node field.

Once the location of the sentinel nodes has been determined, it is necessary to communicate this information to the surgeon and record it for use in research. The application described elsewhere in this article satisfies both of these requirements.

Using Arcview

An application was developed that allows the physician carrying out the lymphoscintigraphy to record the details of the patient and the results of the investigation. The location of the primary lesion is recorded as a map number and x and y coordinates on that map.

The draining node fields are recorded as codes showing the depth and number of sentinel nodes. For example, 1.5la2 indicates that the left axilla field contains two sentinel nodes at a depth of 1.5 cm. The name and sex of the patient as well as the number of draining channels and the maximum separation between the channels are also recorded. There is provision for noting details of surgery performed immediately or as follow up.

The primary storage of the data is currently in a Filemaker Pro V3 database file. This communicates with ArcView via DDE (in Windows) or Appletalk (on the final target system) and passes a DBF file of the data for display in a report. The script processes the data and prints out a report based on it. This report can be sent to the surgeon and is also stored on the patient's file.

Working With Scripts

Several scripts were developed to produce the reports. The fact that these could be developed on a PC and seamlessly ported for use on a Macintosh highlighted the excellent cross-platform capabilities of ArcView. Much of the inspiration for the code came from Amir H. Razavi (ArcView Devoloper's Guide, OnWord Press, 1995), although it must be said that neither his book nor the ArcView online help are particularly well organized and both leave a great deal to be desired in the area of indexing and cross referencing.

The main script for the application is a list containing the data to be displayed. In particular, they contain the map number, x and y coordinates, node field codes, comments and patient details. The map number is used to retrieve the appropriate image from a list and the image added to a view. The site of the primary lesion is then marked.

Next, the node-field codes are parsed into a list and each element passed to the node-field definition script for display. A dictionary containing a count of the number of times each node field is referenced is established for use by the node-field definition script.

The layout production script follows, and finally the layout is printed and the view and layout removed from the project. If the layout cannot be printed, it is renamed (and not removed) to allow subsequent manual printing. The script returns the name of the layout as an indication to the calling program of the process's success.

Node-Field Definition

The node-field definition script highlights the node-field area on the schematic diagram and labels it with the code, indicating the number of nodes and their depth below the surface. Since nodes exist at different depths and each of the depths is treated as a separate call to this script, the dictionary defined in the main script is used to ensure that the highlight shape is only drawn once and that text is not overwritten. The location and dimension for node-field highlights are stored in the node-field locations table.

A layout object is created in the main script and passed to the layout production script for population and formatting. First, the page properties are established. This revealed what appeared to be a bug. The units of measure for the layout could not be reset from the default inches.

The title and patient details are placed at the top of the page using the auxiliary DrawText script. The borders are placed on the layout using the auxiliary DrawBox script. Finally, the view is placed within the border and sized so that it is at the largest scale possible.

Auxiliary Scripts, Tables and Images

Two auxiliary scripts were developed. The first, Drawtext, instructs the program to place, or pass, a graphics object, a location and the text that is to be placed on the graphics layer. Optionally, it can be passed point size, text angle, font name and font style. If the optional arguments are not passed, defaults are used. The second script, DrawBox, is passed a graphics object and a rectangle object with the location and dimensions of the box.

Wherever possible, tables are used to store information for the application. Avenue's table handling capabilities are limited, but as the tables are not large, performance is not a major concern. The principal table is the node-field locations table, which stores the location and dimension of the highlight box to be drawn for any given node field on any given map.

There are six images stored as part of the application. These are the schematic diagrams for the posterior and anterior torso, posterior and anterior lower limbs and left and right lateral head. When the report is produced, the appropriate image is placed on the view as a theme.

Complementary Apps

Inter-Application Communication (IAC) relies on the ability of ArcView to accept information from another application either through DDE (on the Windows platform) or AppleTalk. This is an excellent example of the use of complementary applications running under an operating system and shows how data can be shared between tools allowing developers to choose the appropriate tools for the job, rather than simply the monolithic application that meets most of the criteria.

In addition to IAC, the other feature of ArcView, Filemaker Pro and Excel (and several other applications), which makes development easier, is the ability to develop on one platform (in this case Windows) and to implement the solution on another (in this case the Macintosh). The ArcView code needs no modification and the Excel code only requires small changes to make the IAC calls appropriate to the operating system.

Geocoding Melanoma Data

Over 1400 patients have undergone lymphoscintigraphy in this study. In each case, the draining node fields and the number and location of the sentinel nodes and any interval nodes were recorded in a Filemaker Pro database file. The challenge inherent in using a GIS to map the data was that the locations were descriptive. Only a small sketch of the location had been recorded, and the images produced by the lymphoscintigraphy did not have any common reference points marked to allow normalization and automatic geocoding of locations.

Six schematic diagrams representing the surface of the body were drawn and a grid marked on them. Each case was manually reviewed and a map number, and x and y coordinates were recorded for each primary lesion site. These coordinates were then randomized within the level of precision of the grid used to avoid clustering at grid points.

The schematic diagrams of the body were scanned as TIFF files. These images were geocoded using the ARC/INFO commands REGISTER and RECTIFY. The maximum RMS error in the registration process was 0.38mm, less than 10 percent of the grid size. This was considered to be sufficient for the purposes of this study.

Future Directions

This application has potential for far greater automation and data storage, perhaps using ArcView itself. Adopting the ArcView approach would facilitate the data entry process in that the physician could geocode the data, not onto a hard-copy sketch with subsequent transfer, but with a single click of the mouse on the appropriate image. The other data-entry components could also be more user friendly than they currently are.

Further research into the spatial distribution of melanoma in the study group is also possible. Examination of the channels taken through the lymphatic system may reveal some correlation between it and one or more of the independent variables recorded.

Integration of the images obtained from the digital gamma camera with the application is also a long-term goal. If some reasonable common reference points could be introduced to the lymphoscintigraphic images, a registration and rectification process could produce a normalized representation with far more detail than is currently stored in the system. Techniques such as neural-net pattern recognition could also be used to classify channels and nodes.

For more information, contact Andrew Coates BE, School of Civil Engineering, University of New South Wales, Sydney, Australia.; Dr. Roger F. Uren FRACP DDU, Nuclear Medicine and Diagnostic Ultrasound, Missenden Medical Centre.