Pathology 218
Computational analysis of biological images 

Spring 2009


Lectures: Tuesdays 1:00-3:00pm Room L201 (Lane Building)
TA Office Hours (for coding help) Fridays 3:30pm-5:00pm M327 on the 3rd floor of Alway.

Table of Contents

Announcements
Class Topics
Lecture Notes and Assignments
General Course Information
Course Resources


Announcements 

May27

Office hours will be moved back 1 hour this Friday to 3:30-5PM in M327.

May 21

Guidelines for presentations:

15 minutes for presentation followed by 5-10 minutes of discussion. A suggested starting point: describe the overall project including:
-The background Biology
-Images (and how they were obtained)
-The goal of the image processing
Be sure to address the analysis methods you used.
Please be sure to show your raw images, intermediate figures if you think they would be helpful, and describe your results.

Your choice as to whether you want to use presentation software ( powerpoint, acrobat or keynote) or just introduce the question (as above) and describe the approach and results.... send us whatever you use for your presentation along with your code.

May 20:

Office hours have moved back to Fridays, 2:30-4:00PM in M327.
The schedule for presentations is as follows:
As a reminder, we have presentations in the 2 upcoming weeks:

May 26th
Matt
Carolina, Sandhya
Feng-Chiao
Elizabeth
Erik M

June 2
Erik L., Michael
Sonia
Johanna, Yin Loon
David, Drew, Kat, Lena
Weibin, Huibin

May 5:

The notes have been posted for today's lecture. These also include the schedule for the meetings for the project that have been set up. They will be held in L332. Please bring your ideas for a project and sample image(s).
In addition, these notes include details on the format of the written proposal, due Thursday, 5/14 at 10PM.

May 1:

Lecture notes from 4/28 are now online, along with the homework due at 11:54AM Pacific Daylight Time on Friday 5/8.

April 23:

Tuesday's lecture notes and homework 4 are now posted, it is due Thursday, April 30th at 10PM. Accompanying images are posted as well. Remember to find an image that intersts you where you can count something. Please be sure to send in your assignment 3 due TODAY at 5PM .

April 16:

We have posted the notes and assignment for last Tuesday. There is an image you will need to download as well (you will find it where the lecture is). The assignment won't be due until 5PM Pacific Daylight Time on Thursday 4/23.

In addition to the homework this week, please spend some time thinking of an image, either from your work or something published online, where it would be interesting to count some type of object such as animals, cells (in the figure from Tuesdays class for example), molecules, bands in a gel, etc.

April 14:

TA office hours have been moved to Fridays, 2:30-4:00PM in M327. Please find corrections ot the problem set 2 in the updated version. The code is shown below for problems 7 and 8

7.  Now retrace what we did in class, first we want the maximum and
minimum values for the red channel
int RMax=0;
int RMin=255;
int RCurrent=0;
for ( int y = 0; y < HEIGHT; y++ ) {
    for ( int x = 0; x < WIDTH; x++ ) {
        RCurrent=input1_raster.getSample(x,y,RED_BAND);
            if (RCurrent> RMax) {RMax=RCurrent;}
            if (RCurrent< RMin) {RMin=RCurrent;}
    }
}

8.  Then we want to normalize the sample based on these values
for ( int y = 0; y < HEIGHT; y++ ) {
    for ( int x = 0; x < WIDTH; x++ ) {
        RCurrent=input1_raster.getSample(x,y,RED_BAND);
        if (RMax>RMin) {RCurrent=((RCurrent-RMin)*255)/(RMax-RMin);}
        output1_raster.setSample(x,y,RED_BAND,RCurrent);
        }
}
April 7:

TA office hours will be kept on Fridays, and help will be available Tuesday after class as well. Please email Sarah with any concerns.
Lecture notes and homework 2 have been posted. In addition, under resources some Java references have been added.
A helpful way to keep track of brackets when coding is to indent your code based on what level you are looking at. For example, the block under an if statement should be indented more than the if statement itself. By having a bracket on its own line you can simply line up the brackets. For example:

if (statement you want)
{
    perform some operations of statements...
    for (some loop I want to execute)
    {
        nested operations to perform
    }
}
April 5:

Please download the updated homework with corrections ot the code in question 7.The code should read:
output1_raster.setSample(x,y,RED_BAND, 255 - input1_raster.getSample(x,y,RED_BAND));
output1_raster.setSample(x,y,GREEN_BAND, 255 - input1_raster.getSample(x,y,GREEN_BAND));
output1_raster.setSample(x,y,BLUE_BAND, 255 - input1_raster.getSample(x,y,BLUE_BAND));

April 2:

1) TA office hour locations have been set in the small half of the genetics library, which is room M327 on the 3rd floor of Alway, 2:30-4:00 on Fridays.
2) We are requiring Java as the programming language for the course. Molbench will be a great resource, as well as the java.sun.com website. I will be available Fridays for help as well!

April 1:

We have added updated version of Molbench under resources in addition to a Linux version. Please follow the directions carefully when installing the software on the Mac, as it contains a package to allow you to use .tif files.

March 31:

Please send an email to Sarah if you are auditing the class to receive regular announcements.

Homeworks 

Sarah is available for coding help on Fridays, 2:30pm-4:00m M327 on the 3rd floor of Alway.
Please send questions via email to Sarah
Date
Lecture
Assignment Due
Sample Solutions
March 31, 2009 Lecture 1 UPDATED due at 5PM Pacific Daylight Time on Wednesday 4/8 P1 Sample Solutions
March 31, 2009 Lecture 2 UPDATED due at 5PM Pacific Daylight Time on Wednesday 4/15 P2 Sample Solutions
April 16, 2009 Lecture 3
Image
due at 5PM Pacific Daylight Time on Thursday 4/23
April 23, 2009 Lecture 4
Image 1
Image of cells
Image of worm muscle
due at 10PM Pacific Daylight Time on Thursday 4/30
May 1, 2009 Lecture 5 due at 11:54 AM Pacific Daylight Time on Friday 5/8
May 5, 2009 Lecture 6 Written proposals are due at 10 PM Pacific Daylight Time on Thursday 5/14

Tentative List of Topics 

1. Pictures as Biological Data
2. The ecstasy and the agony: revelations and artefacts from biological images
3. A model system: Introduction to human visual processing
4. Principals of scientific image composition
5. A little bit about microscopes: Materials in optics
6. A little bit more about microscopes:Illumination
7. A little bit more about microscopes: Lenses
8. A little bit more about microscopes: Mirrors, Polarizers and Prisms
9. Survey of some-light based imaging techniques
10. Nature and Spectral decomposition of a light beam
11. The essence of an image: 2D patterns of light spectra
12. Physical methods for measuring light intensity
13. Dynamic responsiveness of measurement devices
14. Measurement of colored light and the electronic compound eye
15. Computer hardware I: Conceptual Computers
16. Computer hardware II: CPU, Memory, Mass Storage
17. Computer hardware III: Graphic Output and input
18. Computer software I: Data Structures
19. Computer software II: Algorithms and Programming Language
20. Computer software III: Operating Systems
21. Computer software IV: Database and Project Management
22. Digital rendering of image information.
23. Color Space
24. Data loss and data retention in electronic image formats
25. Rich file formats- Image data structures
26. Transferring data from camera to file: Analog and Digital streams
27. Displaying image files for human observation:
28. Uncertainty and error in digital image conversion
29. Algorithms for image manipulation
30. Constraints and guidelines for image-intensive project management
31. Simple image transformations: Normalization,Smoothing and Sharpening, Color Space manipulations
32. Optimal image resolution and depth
33. Multiple image operations: Overlay, addition, subtraction
34. Multiple image operation: 3D model formation
35. Multiple image operation: Deconvolution
36. Multiple image operation: 4D model formation
37. Object recognition and boundary drawing
38. Object operations: Size, Intensity, and Shape
39. Assessing variation and errors in digital microscopy measurements
40. The holy grail of significance: interpreting quantitative image data
41. The digital horizon: new optical and computational methods in biology
42. Beyond the digital horizon: unsolved problems and unrecognized opportunities.

General Course Information

Instructor:

Andrew Fire:
afire@stanford.edu
Tel:723-2885
Teaching Assistant:

Sarah Aerni
saerni@stanford.edu
Office Hours: (for coding help) Friday 3:30pm-5:00pm M327 on the 3rd floor of Alway

Course Goal:

Introduce students to the use of physical and computational tools to acquire, process, interpret, and archive biological images. Emphasis on digital microscopy as a tool and example.

Class Dates:

March 31, April 7,14,21,28; May 5,12,19,26 June 2

Lectures:

Informal introduction to concepts in this area, participatory discussion of critical analysis, and examples of applications.

Assignments:

Varying formats: Problem sets including coding of image manipulation routines. This is not a dedicated programming course, but students will learn to write and modify image analysis routines using the Java programming language.

Prerequisites:

Basic biomedical science background, no programming background is assumed. Optional introductory reading and review exercises will be provided for students with less extensive computation/microscopy experience.

Course Enrollment:

Limited enrollment-- Please email instructor if you are interested in -- -- enrolling.

Course Resources

Java Help Online

Great online Java quick reference guide:
http://www.digilife.be/quickreferences/QRC/JAVA%20Quick%20Reference.pdf

The overall site has a nice list of quick references:
http://www.digilife.be/quickreferences/quickrefs.htm

MolBench:

Updated Molbench (1.6):
Mac Version
1. Download file and unzip - You will get a folder called Molbench
2. Move this folder to your applications folder
3. Move the jai_imageio.jar file into the folder /Library/Java/Extensions/
This folder is found by going to the top level (Hard drive) of the Mac system
4. Make sure that the name of the folder enclosing the Molbench application is "Molbench"
Windows Version
Please install as before. You will need to get a version of Java. These are available on the Sun website
Linux
This may take a bit more work. You will need to install SUN JDK. Here are some instructions for that (untested)... for Ubuntu Linux http://www.cyberciti.biz/faq/howto-ubuntu-linux-install-configure-jdk-jre/
Old versions:
Windows Version
Mac Version
Please contact Sarah with any problems

Questions? Contact: saerni@stanford.edu