CSC400 IS Kelly Dwan--Log
This is the main page for Kelly Dwan's Independent Study (CSC400).
Dept. of Computer Science
Dominique Thiebaut, David Bickar advisors
The goal of this IS is to generate software tools to merge brain scans of human patients into a 3D brain visualizer, MRIcron used by Prof. David Bickar in his research.
The idea is to take images of brain scans, extract their geometry information (size, location in the brain, angles of orientation, etc.), and then from that information generate data files of 3D shapes that can be superimposed in a 3D brain visualizer.
Below is a rough list of steps for Kelly for approaching this problem.
- Learn how to use PyQt, especially the ability to import images (JPG very likely) in a window, and use the mouse to click on areas to determine their locations, shape, etc. See this tutorial for starting with PyQt
- Install MRIcon
- Play with MRIcon (will need interaction with D. Bickar)
- Dig into MRIcon's documentation/source code to understand
- how it works,
- what file format it supports,
- how it imports data files (something that D. Bickar knows how to do)
- Obtain brain scan images from David Bickar and start looking at how to visualize them with PyQt.
TO DO for next week
- Start a Wiki page that will be the report of the full IS. The link to the page is 3D Visualization of 2D Brain Scans
- Modify GUI and make it import a JPG file. Use a scan if possible, although not necessarily needed.
- Form will ask user to click on
- 4 points first: left, right, top and bottom of the brain.
- 2 more points: left and right side of scale (10 mm).
- 1 point which will become a circle whose radius is 1/2 of 10 mm (obtained from previous 2 points)
- Form will save coordinates of these points in a text file, in XML. Here's an example of format:
<xml> <left>23, 34</left> <right>930, 44</rigth> <top>100, 10</top> <bottom>700, 550</bottom> <circle> <center>330</center> <radius>34</radius> </circle> </xml>
- Install MRICRON on laptop
- Explore U. Michigan's database site for brain scans (https://www.msu.edu/~brains/) and locate some of the scans presented by David Bickar on 2/9/09.
- Prepare the paperwork for the collaboration event.
Good image of scan imported in PyQt MainWindow.
- For next week, figure out a way to draw points on the main window. This program may have some good information.
- Figured out a way to get (x,y) printed in textEdit
- For next week, please work on these action items:
- Programming: User specifies the name of the scan he/she wants to load up. name of jpg file is kept in variable.
- User clicks 8 points on scan, and resulting x,y are recorded in a text file.
- First 4 points are on top, right, bottom and left boundaries of brain
- next 2 are for the scale
- last 2 are for defining a disk with a center and a radius
- After 8th point clicked, the information is written to a text file
nameOfScan.jpg x1 y1 x2 y2 x3 y3 x3 y3 x4 y4 x5 y5 x6 y6 x7 y7 x8 y8
- Work by hand: figure out a way to add a disk/cylinder of known center and radius in the MIRCron 3D-model, in a plane corresponding to the same plane as where the scan comes from.
To do for next week:
- Schedule a meeting with David Bickar. This is a very busy time for him, so he may not have time this week, or next. If this is the case, explore MRIcron on your own. Try to figure out how to:
- create a disk or very thin cylinder in a vertical plane of the 3D model of the brain
- save this blob shape to file, using MRIcron's save function
- deconstruct the saved file to understand its format
- Start generating an algorithm for creating blob files artificially, so that they can be imported in MRICron. For example, see if you could edit by hand a file and a make it create a cube at some predefined location. By the way, if creating cubes is easier than creating cylinders, let's use cubes. Whatever makes it easy to generate volumes.
- Start writing the wiki page for the project. Its main sections should be:
- Description of the project
- Tools: what is being used: designer, pyQt4, MRICron
- what database is used to get the scans
- Directions for using the software
- Directions for creating the .py file from the ui file
- Directions for how to create the file with the coordinates of the points selected by the user
- The format of the text file containing the coordinates.
To do for next week:
- Explore some more the Nifti python library, to see if it is usable for our purpose.
- See if VOI or ROI files can be generated by some Python module available on the Web.
- I will contact Chris Rorden (firstname.lastname@example.org) about the VOI format
- If we cannot go anywhere with Nifti and VOI file, it is possible that the way to go is ROI --> VOI --> MRICron...
The next meeting will be the Monday after the break...
To do to wrap up (4/27/09)
- Update Wikipage
- Add screen captures
- The Python code
- Explanation of the format of the data files for MRIcron
- Step by step description of how to use the tool
- List of features of the Python tool
- List of lacking features and how to best implement them
- Tutorial on PyQt
- MRIcron 3D visualizer