October 14, 2009

Pending.

It is obvious that updates of this site have ceased to post periodically. The reason due to such set back was becasue we were unable to obtain the adequet resources required for such an ambitious study. This site will still be alive and maybe upated in the months to come, but in the most part, this project is pending till our undergrad year until we have availibilty to such resources and come in contact with higher education faculty that might be willing to aid in any way. The time window to enter for ISEF has passed, and therefrore this project is now merely the result of my lesiure time and however much iof it I have to devote. After January 1st 2010, there will be less stress and more potential to contribute into this project more by my half. Till then, enjoy and surfe the blog if you are a new visiter and thank you for all your interest.

August 13, 2009

Update.

Our primary method to executing our fractal approach to identifying irregular growth was originally centered around a biological model consisting of carcinogenic rats displaying tumor growth. What we hoped to concern ourselves was the growth patterns over time to analyze how the medical image shifts and alters as tissue conforms and grows around neoplasm. Since we cannot obtain housing or specific CT scanners that slice to those minute dimensions, we now shift our focus on already collected medical image databases. We are on the hunt for any DICOM images of any organism with clear evident tumor growth on or without treatment. Specifically, images containing the following are ideal:

    • We must obtain a minimum of 3 or more scans of any particular organism/ study –human patients undergoing chemotherapy would do.
    • All scans of a particular study must be taken in relatively the same even time interval.
    • All scans of any particular study must all be the same type. (CT, MRI, or PET)
    • The organism must show in at least one of the scans: documented neoplasm growth, specifically in a particular organ. (specifically which organ is not important)
    • We must obtain at least 10 studies of any organisms.

As long as there is consistency in the scans of the particular study, we can use the DICOM’s to our benefit. Note, solely X-Ray images would not be applicable because we need a 3D representation of the tissue to account for the pattern in space. (for example the vascular system).

On another note, the school year has successfully kicked off to an initial busy start. As you may have noticed, there have not been many recent postings and updates. The reason behind such ‘lack of activity’ has been partly due to all  four of our slightly busier schedules and party because we are still in the process of physically obtaining the DICOM files. The most recent activity has been in the Oncology aspect. I got Osirix, a DICOM viewer to operate on my Macintosh and have been familiarizing myself with the program with sample DICOM’s provided by Osirix’s main webpage. The program looks promising.

July 12, 2009

A Desperate Need for Resources.

Two friends of mine, Shibani Kansara and David Chi, along with myself -Mayank Tahilramani, have collaborated this year to create a team project and plan on entering it under the Medical Health category of Intel’s international science convention. This project is centered around a computer ‘program’ that we are currently devising that is a predictor model on cancerous tumor growth in live tissue. The whole project is divided into two sections: Medical Aspect (the application of our theory) and the Mathematical/Programming aspect (the theory itself). The theory/main idea(s) as of May- June 2009 is/are listed below, but please note, this is a rough outlined version of what we are proposing.

As you read the description and our thought process at much more depth at the About page, you may realize that obtaining such ambitious goals requires a variety of resources that mainly research institutions hold to their disposal or public commercial medical institutions like hospitals and veterinary clinics, but the concern is not the availability of such resources, for they are daily used commercially to diagnose illnesses. Rather, the mere obtaining of permission with guidance to those resources is what we would appreciate. In specific, a CT scanner is in of desperate need to accomplish our goals and obtaining the medical images we need. We plan on centering our experimentation on mice or rats and analyze the growth of tumors induced, most likely in the lung with the use of specific carcinogen, under the supervision of a research institution. Since it is on a group of rats and we need progression of cancer development in tissue to verify the program’s effectiveness, monthly scans of 3 or more groups of rats is required. Sadly, at the moment we have reached a point in the process of initiating this project that we no longer are able to continue progress until we have reached a consensus on which resources we have to our utility, until then can we determine which route to pursue in collecting the biological data we need, adequately and appropriately for the mathematical model we intend on creating. We have personal equipment and software that will analyze raw data and manipulate medical images (the medical standard DICOM archives) but, understandably, not the capability to collect the raw images like those taken by CT scanners. For this reason we ask you for aid and donation in any form, most preferably permission and access to monthly scans of designated rats, that may help us to our goals and achieve a better understanding. Your donations and aid will be very appreciated and recognized; we intend to proudly display the people do helped make this project possible by recognizing them on our on our backboard display at International Science and Engineering Fair and any other applicable places to increase publicity of great corporations willing to help independent research.

We are located in Atlanta, Georgia sub-urban region, and are hopeful that someone out there is motivated, intrigued, and generous enough to meet our needs and grant us permission to taking monthly CT’s of our rats.


Please, for further clarification and in depth analysis on this student project, visit the about page located at the top of this page and other the sister sites located on the ‘Blogroll’ to the side of this page. To contact any of us individually, please email us for our phone numbers and we will be more than happy to respond. If you would like to meet us in person, that would be wonderful as well.

My contact information by email is Devataa@gmail.com. I am looking forward to interacting with anyone and discussing more about our project. Thank you for your interest and time to consider this idea of ours.

July 12, 2009

What This Project Is About – As of July, 2009.

Application Of Fractal Geometric Sequencing And Projection To Identify Cancerous Tumors.


A proposal by: Mayank Tahilramani, Shibani Kansara, David Chi, and Sorabh Gupta.


It is our hypothesis that we can take a raising branch of mathematics by the name of fractal geometry and apply it to the medical field to conjure an alternative method, potentially efficient and more beneficial, to detect cancerous tumors in living tissue. We are proposing a method that exploits the special relationship between scale and magnification with the patterns associated with fractals and in particular the so-called “fractal” dimension. First an introduction to Fractals is required:

Fractal patterns are ubiquitous in nature, from the mountains, to the coast of Britain, to the veins in a leaf to the veins of our blood. They are images that have self repeating irregular patterns that are consistent at integer magnification, or totally chaotic — then comparing of fractal dimension comes into play. A famous fractal image by the name of Mandelbrot set reveals the self repeating pattern of a big circle yielding to a small and smaller in all radial directions, which if magnified look the same pattern at almost any magnification. This self similarity plays a vital role in determining the area in space a figure takes up and its transition between what classifies a figure in Euclidean geometry in the 1st, 2nd, or 3rd dimension. This is the key concept of fractals, and can be found also in a: blood veins at local areas, b: lungs as the trachea branches into the bronchioles into the alveolar ducts and into the alveoli, and c: even in the brain as folds repeatedly display the intermediary of dimension. The fractal dimension may be our unit of measure at this point for our data collection and other correlation coefficients that will display the difference between the variable group and control group (model verses actual scans). More information on what exactly the fractal dimension is as follows:

The Fractal Dimension.

One informal definition of geometric dimension could be: any theoretical void divided by 3  hypothetical vectors in space perpendicular to each other in respective planes. The vectors are present to quantify the relative distance between theoretical locations (coordinates) in space in terms of 6 directions: Up, Down, Left, Right, Back, and Forward. The distance is measured in unit lengths. The relationship with any unit length in space that is being discussed in the following  examples is of self similar objects, fractals.

Take for example a mere square, 4 perpendicular. intersecting lines, is also considered a fractal in the sense no matter into how many boxes it is divide it up into, the general shape is of that a square. Examine a square with the following dimensions: 4 units x 4 units. It takes four 2 unit x 2 unit to fill it up. Each 2 unit x 2 unit box’s side length is of 1/2 the original box’s. It takes sixteen boxes of the side length 1 unit x 1 unit to fill the original 4 unit by 4 unit square. This leads to a particular relationship…

(Number of boxes) = (The magnification needed*)^(D)

Where D is the Dimension.

For example,

4 = 2^D      *When the total of 4 boxes were needed to cover the Big Square, the small boxes were 1/2 the size in area, so each side length of the small box needed to be magnified 2x.

16 = 4^D    *When a total of 16 boxes were needed to cover the big square, the small boxes were 1/16 the size in area, so each side length needed to be magnified 4x.

General formula for Dimension reduces to:    Log N(r) / Log (r) = D
Where N(r) = total Number of shapes present.
(r) = The inverse size ratio of the sub-shapes.

When we solve for D in each case, we get 2, an expected value due to its presence in the 2nd Dimension under Euclidean geometry’s perspective. As the iteration goes on, one can see the relationship in the general formula, as the size of the squares that fills up the big square reduces each time by half (length, but 1/4 by area) the constant exponent D remains the same: 2. But in what situations does the D value becomes a non integer? What does the shape look like when D is between 1-2 or 2-3? This general rule can be used for all self similar shapes, even ones that reduce in area over iterations due to the “algorithm”– pattern — that is being iterated, for example Sierpinski’s Triangle, and even shapes in what we call 3D, instead of squares in the box,  just count how many sub-cubes that make up the cube. Let us examine Sierpinski’s Triangle as an example where the dimension falls between two integers.

This fractal shape is formed by one original triangle side’s midpoints connected to create 4 sub-triangles within. The same division is done to the three triangles inside (minus the middle triangle). The figures below describe the iteration by images. In the images, the black triangles are representing empty space, because the pattern only accounts for the peripheral triangles’ area. But as one can see, easily, as iterations increases the area compared to the original triangle decreases substantially, approaching zero, with each iteration (simply measure the black spaces verses the white spaces), but the perimeter of the shape increases dramatically approaching infinity — A definition by Mandlebrot of a Fractal. Mathematically, for the 2nd triangle in the sequence, lets use the same concept we used above to calculate the fractal dimension of this irregular shape.  There are a total of 3 triangles present in each iteration of a particular triangle, and each triangle’s side length is 1/2 it’s original triangle’s length (so it has to be multiplied by 2)…. hence we get:

3 = 2^D

Log 3 = Log 2^D

Log 3 = D Log 2

Log 3 / Log 2 = D = 1.585

This value makes a lot of sense because we expect a value between 1 and 2, a line (perimeter) of a 2D shape, hence between the 1st and 2nd dimension. This is Sierpinski Triangle’s fractal dimension.

The same concept of relative size and the the number of shapes present in the pattern can be applied to almost any irregular pattern via ‘box counting’

Box counting is one method to determine the fractal dimension of 2D and 3D images. It was also the method mentioned in “Fractals and Cancer,” an entry indexed in our database. This method uses the same concept as by the definition determined by the relationship between the intervals “r” on the length verses the total number of shapes “N(r)”. The concept centers around how many boxes of a particular size cover the irregular shape. Same idea:  Log (number of boxes covering the shape) / Log (size of the box) = Fractal Dimension. This box counting method is an approximation of it’s fractal dimension, because when a grid of boxes is overlaid a line or shape, there is a margin of error, where the two do not over lap. This means to get a better approximation of the fractal dimension we need to get many box dimensions from different –proportionately different boxes–or smaller and smaller boxes (means a larger number of boxes covering the shape) for higher overlapping accuracy. To analyze this simple phenomenon Take for example the ‘Box fractal’.

In this shape, the initiator is a 2D box shape subdivided into a checkered pattern (similar to the 3D cube submitted in the other site). In the one initial box, there are 5 sub boxes, each with 1/3 the side length of the original box. The fractal dimension hence is Log 5 / Log 3 = 1.46. To apply the box counting method, we will cover the pattern over a grid where boxes overlap the shape at various magnifications by various size (large to small).  The first generator (A 5 square checkered pattern), is covered by 5 squares from the grid each with 1/3 the side length (Log 5 / Log 3). In the next magnification, 25 grid boxes cover the pattern, but here the grid boxes are with 1/9 the side length of the original box (Log 25 / Log 9). With another magnification One can see 125 boxes covered when the grid box side lengths are 1/27 of the original box. This example is a simple accurate, simple one because the shape we are measuring is itself a box derivative.

The patterns we aim to analyze are going to be 3D patterns derived form CT scans of the lungs. These patterns are going to be transformed in to matrices and then rendered on a cartesian coordinate plane to determine it’s box dimension. The next section deals with the rendering of the images into the cartesian coordinate plane and for systematic analysis of its box dimension with the aid of MATLAB and Grapher utility for Mac OSX.

Determining the Fractal Dimension.

The second most difficult aspect is determining the fractal dimension to match the medical image. One possibility of how to tackle this is to analyze the anatomical scans and retrieve an outline of the blood vessels and/or veins and/or bronchi that we are focusing on. With that we can retrieve points — or coordinates so to speak—form each of the 2D CT scans.  Using “Exploring the Geometry of Nature - Computer Modeling of Chaos, Fractals Cellular Automata and Neural Networks” as a reference for where the following idea of projecting the coordinates originated form, the book proposed a very unique method of approaching the graphical aspect of fractals via programming. It  suggests creating a matrix, a large matrix with which coordinates can be derived form the 0′s and 1’s it produces:

Consider the matrix [M]:

This is a 8 x 3 matrix which contains 6 locations that are assigned a value of 1.

[ 0 1 0 0 1 0 0 0
0 0 0 0 1 0 0 1
0 0 0 1 0 0 1 0 ]

The rule is where the 1’s are located in the matrix, is the coordinate in a coordinate plane in respect to the location of the value 1 in the matrix. For example the above matrix produced coordinates of the following values:  (1,2) (there is a 1 value located at the 1st row and a 1 value in the 2nd column in the matrix.),  (1,5), (2,5), (2,8), (3,4), and (3,7). These coordinates can then be graphed as per that rule.

Say at magnification 1x, of the pattern, the collected values equal 1 unit on the coordinate plane and which ever  pixel accounts for the pattern or the back bone of the pattern has a (X,Y) value assigned to it. I collect all these values/ coordinates and then insert a “1″ on the matrix of the corresponding size to the coordinate plane. For example:

There is a quadratic line (say a hypothetical fractal image) of  y=x^2+3
x:[0,5] ; y:[0,7]
There lie points on (0,3), (1,4), (2,7).
The matrix of these points would be:


[ 0 0 1 0 0 0 0
0 0 0 1 0 0 0
0 0 0 0 0 0 1 ]

What was done to make this matrix was that the coordinates were directly mapped onto the matrix, so point (1,4) would represent a 1 value on the 1st row, 4th column on the matrix. This is a relatively low resolution image we are observing, a 5 x 7 pixel image of a line that seems to follow a y=x^2+3 curve.  Imagine an image that is in HD equivalent resolution, say 1920 x 1600  pixels, the matrix corresponding to such an image could potentially have have 3,072,000 values.

The CT scanner scans in each interval of slice thickness. After each thickness, a image is produced. Because of the curvature of the human back, and the positioning of the patient, no 2D image is identical at the same thickness location on the body form two different scans. Therefore the Z axis has to be accounted for. the organ takes up volume, and the volume doe not change unless there is tissue growth (hinting cancer) or by tissue decay. With enhancing the image to portray the parts of the lungs we desire to see through contrast and image enhancements, we can render a matrix for each image. Which ever pixel accounts for the pattern in the image is a 1 value on the matrix. After all images have be converted into matrices, the matrix then can be stacked up rendering a 3D representation of the image. With this, each 1 would basically account for a sub- cube, and the total size of the 3D matrix would be the parent cube form which the box dimension can be determined.

Df = Log N(r) / Log r

Where here N(r) = # of cubes present to make the pattern from the CT scans
and r = inverse size ratio of the sub-cubes

To obtain an accurate fractal dimension via box counting, more magnifications must be accounted for.  The image must be zoomed in and out of to determine with the change in cube ratios stays consistent with the number of cubes that compose the pattern. Then a log to log plot can be plotted to establish the mean fractal dimention. Since there is no such concept on a matrix that a number lies at (1.5, 2.5) a value located in-between row 1 and 2 and in-between column 2 and 3, to resolve this issue the matrix can be multiplied by an integer. For example, the above matrix is representing a coordinate system plotted coordinates where each value on the coordinate plane represents a 4×4 pixel box of the image. To magnify the image, one would find intermediate values like 2.5, but they cannot be displayed by a matrix so half the value of what x and y represent; make 2.5 essentially equal to 5, so every .5 unit on the coordinate plane is converted into 1, and that 1 unit is equivalent to 1 pixel. In this situation, the matrix above is represented as follows (essentially a 4x bigger matrix):

[ 0 0 0 0 0 0 0 0 1  1  1  1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1  1  1  1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1  1  1  1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1  1  1  1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1  1  1  1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1  1  1  1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1  1  1  1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1  1  1  1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1  1  1  1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1  1  1  1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1  1  1  1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1  1  1  1 ]

This is a 28×12 matrix, a magnified version (4x) of the matrix above (4×3)

If one were to graph this matrix just as purposed above, one would find, essentially, a thicker line, a more accurate line. Because, now we can state that if a coordinate exits in between two of the points such as (1, 5.25) which indeed lies in the path of y=x^2+3, the point will be represented in 1 values at the 1st through 4th rows and columns 17th through 21st rendering the matrix to look like:

[ 0  0  0  0  0  0  0  0 1  1  1  1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0  0  0  0  0  0  0  0 1  1  1  1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0  0  0  0  0  0  0  0 1  1  1  1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0  0  0  0  0  0  0  0 1  1  1  1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0  0  0  0  0  0  0  0 0  0  0  0 1 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0
0  0  0  0  0  0  0  0 0  0  0  0 1 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0
0  0  0  0  0  0  0  0 0  0  0  0 1 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0
0  0  0  0  0  0  0  0 0  0  0  0 1 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0
0  0  0  0  0  0  0  0 0  0  0  0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
0  0  0  0  0  0  0  0 0  0  0  0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
0  0  0  0  0  0  0  0 0  0  0  0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
0  0  0  0  0  0  0  0 0  0  0  0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1]

Once the image is resized, it will produce different sized matricies, most likly similar in pattern however just liek the above 28 x 12 matrix has 1’s in the same region the 4×3 matrix had. Note in the above matrix, there is a distance of one row, 1/4 of the distance form the two set of 1’s, this is accounting for the .25 phase shift from the 5.25 Y coordinate. This works great, because in this method, width is accounted for. If a vein is decreasing in width, that can be represented by taking up less space in the matrix, some points may even overlap, creating a line segment when graphed. To graph these values and functions, we will be utilizing MATLAB.

1) The matrices from the image files are being produced in text files to be read into MATLAB. In order for MATLAB to interpret data from a text file, functions that MATLAB relies on for file I/O will be utilized.

(2) The next step will be to begin manipulating the matrix. In order to account for different levels of magnification, there will be a code that iterates through the matrix to remove rows and columns – every other row and column for consistency. As the matrix gets resized into a smaller matrix, it’ll represent lower levels of magnification. For higher magnifications, the matrix code will be iterated to duplicate every other row and column for higher magnifications.

(3) There will also be a count variable that keeps track of the number of 1’s (the “white” in the grayscale representation) for the original matrix as well as the resized matrices. Note: the count will be able to differentiate between various levels of the matrix depending on how far along the Z-axis it is. Since we’re working on a 3 dimensional scale, this minor detail is very important.

(4) Another task is to keep track of X, Y, and Z values which are represented by the index at which a 1 occurs within the matrix. The best way is to build another matrix that keeps track of this information where the row number will represent the point along the X-axis and the index from the imported matrix and stored in a new matrix- the “coordinate matrix”- and will represent the Y-axis. There will also be another column at the end of the matrix so that the final value will represent the Z-axis, but only after the coordinate matrix is already filled. In order to get around mis matched dimentions created with 0‘s representing coordinates that do not contain a 1 value, there will be a matrix of zeros that is the same size as the imported matrix from (1) and filled in. This way, any leftover zeros will just end up becoming a point along the X-axis and not interfere with the data we want.

(5) The final procedure is to export all the new matrices created into a text file with a consistent nomenclature. For this step, it is just more: File I/O.

The Fractal Dimension in Biology.

Therefore, now with what the basic premise of how fractals can be a measurement of how irregular the pattern is determined by its fractal dimension, and the proposed method on determining the fractal value from medical images is established; its applicability to our investigation is as follows. If a suspicious organ overlay such by a CT scan, is presented, a fractal log to log plot can be conjured by computing software that is currently underdevelopment by Sorabh Gupta and David Chi and then evaluated mathematically by Mayank Tahilramani. What the fractal modeling software will show us is the basic outline of what is already seen by the naked eye on the contrasted image, but also mathematically the volume in terms of intermediate dimension it is occupying. By desegregating the pattern of the lungs by exposing the bronchi pattern through manipulation of DICOM images from the CT scan (Osirix open source software), we aim to analyze the control group’s fractal dimension– change in, if any– over the progression of scans verse the variable groups’ change in fractal dimension as the lungs develop with and without cancer in the time period alloted. What we hope to find and specifically identify is A: Initial change in organ pattern determined by its fractal dimension change rate during the initial stages of cancer development– locations adjacent to the tumor (via quantitative data collection). If we find a trend that hints a consistent type of change in fractal dimension is observed with the initial stages of cancer attack on the lungs, we can then further investigate methods to exploit this correlation to detect cancer at an earlier stage. B: Location of the tumor growth within the lungs by sampling the lung CT images into quadrants and locating the tumors within those quadrants. To conjure the quadrants, the medical image will be sub divided into cubes with which the matrices will be made from, and then analyzed. Ex: Pleural efficiency due to tumor growth on the pleural membrane is found in quadrant 2A– 2A being the quadrant’s label. C: the influence tumors have on adjacent tissue by submissive conformation of the tissue that makes the change in organ patterns. This project is process to lay a foundation a step away from Euclid geometry to diagnose tumors and towards a fractal model that provides guidance in detecting irregularities backed with statistics.

We are considering CT scans of living mammals to obtain the medical images, specifically lab mice or rats, ideal for initial runs to validate the theory’s success. Our options are still open to human research based on accumulated database of such scans at the local hospital if the hospital is willing to donate with patient consent to the field of oncology — especially to the branch of research we are planning to conduct. Human CT scan evaluations are most likely going to be our initial testing grounds of the computer program, because in human CT’s the diagnosis has already been made to what kind of cancer, location of cancer, and size of tumors. With animals, we have much more control over biological aspect, and it can show us over time that with cancer’s presence the fractal dimension maybe used to diagnose initial stages much superior than some current methods.