July 6, 2009...10:30 pm

Programming Aspect’s Plan of Action.

Jump to Comments

Last weekend I was at a family friend’s wedding where I befriended a GeorgiaTech student by the name of Sorabh Gupta, who showed much interested in the project, and seemed to be equally beneficial to the programming aspect as far as manipulation of matrices in Matlab goes. Subsequently I invited him to a meeting David and I had planned for this Monday July 6, 2009. What we discussed this meeting was the current plan of action to manipulate the medical images and how to go about producing raw data and making use of it. We all figured, after we can make a sample, beta program (initially void of a GUI interface) we can better convince institutions of our potential and hence obtain the medical images that we will need.

A general outline of what we discussed as follows– specifics and details can be found in the appropriate sister sites as they updated via upcoming posts.
Steps:

  1. After obtaining CT images and organizing them  via Osarix Imaging Software, David is going to export them into Matrices by samples sections of the organ
    1. Sample sections of the organ: Since cancer/ abnormal tissue growth presents itself randomly in the organs, there would be higher number of  ’false positives’ if we considered the organ all together (or maybe not depending on the resolution verses the organ size, still up for debate) therefore as of now we plan to subdivide the CT images into quadrants for accurate analysis. Each quadrant will be lettered (A, B, C, etc.), and  observed for fractal dimension change.
    2. The matrix production must be:
      1. Automated and accurately labeled in the syntax :  ”[Rat ID #]-[Variable Group Letter]-[CT scan Image #]-[Sample Letter]-[Image Number]” Ex: 1-C-1-A-2  –> First Rat of the control group’s first medical CT image from the organ’s 1st quadrant, second image in the sequence.
      2. Matrices must be square (each sample section on the CT must be a perfect square)
      3. The images then must be contrasted in pure Black of White color
      4. Each value of 1 = white; Each value of 0= black
      5. The matrix must be formated in a .txt of .dat file in the syntax [ 1 2 3 4 ; 5 6 7 8] for Matlab importation.
  2. Once the square appropriate syntax matrices are produced, Sorabh must: (I am in the process of making a data table in Excel so it might make documentation easier for both you guys.)
    1. Resize each matrix from the image sequence from each sample from each rat 3 times for 3 magnifications: 1/4 the original size, 1/2 the original size, and actual size of the matrix (proportions and resizing ratios are still up for debate.)
    2. For each matrix, the number of 1’s present in each sample section for the organ of each specific rat must be calculated and document according to appropriate magnification and dimension of matrix in a data sheet.
    3. For the matrix in actual size(no rescaling), X, Y, and Z values for the cartesian coordinate system must be listed in a text file (or see if Matlab can plot them. Note: I have a  higher comfort level with Grapher Utility for Mac due to it’s kind GUI). note, the Z value is obtained from the matrix file #, we are literally stacking up the matrices to produce a 3D image of the organ (For our visual presentation of the organ’s growth). Note there is a 90˚ phase shift due to where the origin is located in the matrix coordinate system and cartesian coordinate system, either account for it when producing the text file or rotate the image after it has been plotted.

I am assuming the hardest part of these two aspects must be  the automation of all these hundreds of matrices. All in all, the number of images we take form the CT of the rat’s organ will be multiplied by the number of sample regions we decide to observe and then multiplied by 3 for each images’ number of (3) magnifications. This makes for MANY matrices and critical organization skill. For now We should practice making this program on the .Gif image of the MRI image of the human cranium I found from Wikipedia.

4 Comments

  • I’ve got good news! You don’t need to format the matrix like [ 1 2 3 4 ; 5 6 7 8], MATLAB is fine with either:

    txt file
    1,2,3,4
    5,6,7,8

    OR

    txt file
    1 2 3 4
    5 6 7 8

    either of those MATLAB will read it like this:
    [1 2 3 4
    5 6 7 8]

    I’d recommend the latter since it’s a little easier to implement and if you put a comma after the 4 and/or 8 in the former then MATLAB will add another column of zeros

    -Sorabh G.

  • Sorabh, I found a ‘plugin’ for MATLAB that might do the fractal dimension calculations for us, hence eliminating the need to find out “how many 1’s” there are in the matrix. If you can get the coordinates and plot them in MATLAB itself and the ‘box count’ plugin will obtain the fractal dimension through the plot, then it makes life MUCH easier. Here is the link:

    http://www.mathworks.com/matlabcentral/fx_files/13063/1/content/boxcount/html/demo.html


Leave a Reply