Can you see the Hot Spots?

Team: 43


Area of Science: Medicine - Radiology

Interim: Problem Definition:
A bone scan is a body scan similar to an X-ray that uses radioactive tracers. Bone scans have many purposes including the identification of problems such as infections and trauma to the bone, cancerous areas, and areas of bone breakdown or growth. More problems identified by bone scans include Arthritis, Paget's disease, Osteomyelitis, rickets, Fibrous dysplasia, and Avascular necrosis. Bone scans are quicker than X-rays in the identification of these problems, usually producing results days to months earlier.
To obtain a bone scan, a radioactive tracer is injected into a vein in the arm. The tracer then enters the bones. When scanned, these tracers appear to have different brightness levels. Dark areas or "cold spots" are areas where radioactive tracer did not enter in the bone. Dark spots may suggest some types of cancer. Bright patches or "Hot Spots" suggest possible fractures, infections, or even tumors.

Radioactive tracers and substances are made of Radionuclides. Radionuclides are instable forms of nuclear elements that continuously decay until they reach stable configuration. In nuclear medicine, the gamma energy emitted by the Radioactive tracers is used for imaging. Though the Radioactive tracers give off over 200 times more radiation than standard X-rays, the Radionuclides are safely disposed of by the body through urine secretion. By using a gamma scintillation camera, emitted gamma rays can be captured and displayed as an image. Injecting Radioactive tracers into a person and then capturing the gamma rays emitted by the body creates a bone scan.

Though bone scan technology is improving rapidly with the advent of gigapixel resolution scans and safer Radioactive tracers, the analysis of bone scans is not. The analysis of bone scans requires extensive research by Radiologists. Diagnosis of bone scans is often prone to human error and human inability. Analysis equipment may also "create" Hot Spots and Cold Spots due to display and contrast factors.

In a meeting with Radiologist Dr. Ghei, Dr. Ghei stated that it "would be great if there was a way the white spots could be quantified." A quantification of the brightness values, or, as stated "a percentage of how white the area is", would provide Radiologists with solid data with which to compare/contrast the brightness values of certain areas in a bone scan.

It is thus Team Tree's purpose to devise a program that will quantify bone scan data and create an easily accessible program that would provide Radiologists with the tools required to minimize human error and human inability in the analysis and diagnosis of a bone scan.

Problem Solution:


Devise a program that scans a bone scan, pixel by pixel, for Hot Spot areas. This eliminates the need for Radiologists to ever have to search a bone scan for Hot Spots.
Each pixel of the bone scan will be given a numerical value to indicate brightness.

Thus, when comparing Hot Spots, Radiologists will be able to compare solid numerical values of specific Hot Spot datum, eliminating the estimation required to find the brighter of two or more Hot Spots.

Using a computer to scan a bone scan will result in the creation of solid numerical pixel-brightness data of every pixel in 720 1-megapixel scans, along with analysis and filtering, in 1 hour.

Users will be able to define brightness value ranges that are to be marked by the program as Hot Spots. This threshold will increase/decrease proportionally to any brightness/contrast changes of the image made by the Radiologist, thus eliminating faux Hot Spots.


Program will be written in Java and exported as a Windows executable.

Program will contain two parts, as follows:

In the automated part of the program, the program will scan every pixel of a bone scan and define the RGB values of each pixel. It will then compare these RGB values to a user defined threshold and then mark each pixel as a Hot Spot or not, hopefully using an image overlay. An alternate solution to automated search would be the creation of a contrast filter that when contrast is increased, threshold values also increase proportionally.

In the manual part of the program, users will be able to find specific values of pixel color data with their cursors. Pixels over a user-defined threshold will output with a notification tag.
Pixel data will be displayed with information including x,y coordinates, RGB values of that pixel (1-255, 255 being the brightest) and a percentage value of how bright the pixel is compared to black (white = 100%, black = 0%)

Algorithms Used

Hshieh-Silva Automated Pixel Scan Algorithm

Sample Code:
int x = 0; //x coordinates of image
int y = 0;// y coordinates of image
int pixel = pixels[y * w + x]; //defines pixels
int base = 0; //integer created for loop

f.drawImage(img1,0,0,1022,765,null); //draws the image, nonessential to algorithm

while (base<764) { //begins a loop
if (x<1022){ //begins a nested loop

if (r>75){ //nonessential to algorithm
f.setColor (; //nonessential to algorithm
f.drawLine(x, y, x, y);} //nonessential to algorithm
x= x+1; // moves to next x pixel
pixel= pixels[y * w + x]; //redefines pixels
r = model.getRed (pixel); nonessential to algorithm

else {
y=y+1; //when all x pixels in a row are scanned, move to next row
x=0; //move back to initial pixel
base=base+1; //moves towards termination of loop

Hshieh-Silva Edge Scan Algorithm

Given 9 pixels, 1,2,3,4,5,6,7,8,9 arranged in a 3 x3 square; 5 being centre pixel.
Define R = User defined threshold value for edge
Scan RGB values of all pixels, if RGB of 1,2,3,4,6,7,8,9 + R> 5, label as edge.
Reset Edge as "5"
Repeat algorithm, until pixel scan is out of bounds.

Progress to Date:
Our program is functioning, scanning, and analysing in 5 different incarnations. 1. The program provides a manual scan that finds the value of the pixel of a bone scan under the mouse cursor. Along with displaying the pixel brightness, the manual scan also displays whether or not the pixel is on or off a Hot Spot, the severity of the Hot Spot, whether or not the pixel is on the edge of the Hot Spot, coordinates of the Hot Spot, and brightness percentile value of the selected pixel. 2. The program provides a pixel by pixel scan of the image, displaying the data displayed in incarnation 1 for all pixels. 3. The program "seeks and destroys", scanning for all pixels with RGBs over a user-defined threshold and then highlighting them with the colour red. 4. The program "seeks and destroys", this time scanning the entire document as in incarnations 2 and 3. Then using a self-devised edge-detection filter, aptly named the Hshieh-Silva Edge Scan Algorithm, the program finds the edges of the Hot Spots and "circles" them, creating easily viewable "halos" around problem areas. And naturally, the highlight threshold values, are user-definable. Hot Spots of varying intensity are circled with different colors. 5. The program does a complete pixel by pixel scan and then colors each pixel a color according to its RGB level, allowing radiologists to easily discern the levels of Hot Spot intensity. Color level assignment is also user controllable.

Expected Results:
With our program up and running, it is very plausible that our program will drastically simplify Bone Scan analysis procedure. Since our program is small and takes up very few system resources, it can be installed on virtually any Java compatible system. This brings about possibilities such as scanning and analyzing bone scans using the basic cell phone. With the program also being very quick, it is feasible to digitize, scan, analyze, and diagnose entire medical databases in only a few hours. Given the mechanization of human processes, we are also removing chances of human error.

Future Developments:
With the basic framework of our program done, it is now possible for our group to go beyond the boundaries of abstract.
1. We will combine all incarnations of our program and integrate them into a single, GUI based program. This will lower the learning curve needed to efficiently operate the program.
2. We will add tablet support. Allowing doctors to circle, highlight, rotate, zoom in, zoom out, brighten, etc. directly onto the Bone Scan.
3. We will use our pixel scan algorithm to generate 3D Bone Scans of the patient, literally adding a new dimension to Bone Scan analysis.
4. We will add Nintendo DS support. Absurd as it sounds, the gaming device is ideal for the Bone Scan process. Given two media bays, and two screens (one a touch screen), and 3D capabilities, the inexpensive gaming device adds portability and efficiency to our program. Radiologists could load the program cartridge into one bay, and then access Bone Scans (on the same or a separate cartridge) on the other bay. Touch screen will allow doctors to to have the functions of a tablet. The second screen will be reserved to display program output, other bone scans, and/or 3D representations simultaneously with the touch screen.

Team Members: Julia Silva, Alan Hshieh, Daniel Parrott, Jerry Yeh

Team Members:

  Julia Silva
  daniel parrott
  alan hshieh
  Jerry Yeh

Sponsoring Teacher: Gregory Marez