Bacterial and Viral Counts with ImageJ

148 downloads 329842 Views 1MB Size Report
http://www.dnr.sc.gov/ael/notebook/imagej_counts/counts.html ... Step 9. Subtract your masks from the original image to check for missed particles (QC). Step 1.
Bacterial and Viral Counts with ImageJ

Stránka 1

Counting Bacteria and Viruses with ImageJ Step 1. Step 2. Step 3. Step 4. Step 5. Step 6.

Open your Image Convert your color image into an 8-bit greyscale image Invert the greyscale image Subtract the background Threshold the image Watershed

Steps 6a-d are one time steps Step 6a. Set the Scale to Step 6b. Set your measurements to include area Step 6c. Measure the area of several viral particles in order to determine the size range Step 6d. repeat for bacterial particles

Step 7. Analyze particles for viruses Step 8. Repeat step 7 for bacteria Step 9. Subtract your masks from the original image to check for missed particles (QC)

Step 1. Open your image in ImageJ. Note that in the image below, there is a nice very dark background, and the image is evenly illuminated all around. If your starting image is dim around the edges, too flat (low contrast), your particles are too dense (sample not dilute enough), or you have a lot of non-specific fluorescence, this is a futile exercise. It cannot be stressed enough how important a good starting image is to this endeavour. If the image you are trying to analyze is bad, your results will be faulty. A GOOD STARTING IMAGE IS ABSOLUTELY ESSENTIAL! [back to top]

2. In order to count you will need a 1-bit (black and white) image. The following steps are to convert your 8 (or 16 or 32) bit color image into a 1-bit image. Before we can have a 1 bit image we need an 8 bit greyscale. Go to image-->type-->8-bit. [back to top]

http://www.dnr.sc.gov/ael/notebook/imagej_counts/counts.html

2. 5. 2013 11:41:07

Bacterial and Viral Counts with ImageJ

Stránka 2

3. The next step is to invert your image so that dark pixels become light and vice versa. To do that go to edit->invert (Or press ctrl+shift+I). You should end up with something like this...[back to top]

4. Now we are ready to prepare our final 1-bit image that will be counted, but first we have to subtract out most of the background. These can be done in one menu. Go to image-->adjust-->brightness & contrast. When the B&C window comes up adjust the maximum value (a. in picture) so that the line ends just to the right of the peak in the histogram (b. in picture). Make sure that no particles that you want counted disappear when you are doing this then click on Apply. If your original image is too flat some of the dimmer objects will fade to nothing ness in this step. Remember how important a good starting image is. [back to top]

http://www.dnr.sc.gov/ael/notebook/imagej_counts/counts.html

2. 5. 2013 11:41:07

Bacterial and Viral Counts with ImageJ

Stránka 3

5. We are finally ready to threshold our image. This is where it gets converted from an 8-bit (256 shades of grey) to a 1-bit (just black or white) image. While still in the B&C menu click on Thresh (c. in picture) and carefully adjust the brighness slider (d. in picture) so that everything that was in the original image appears in the thresholded image. You usually want to shoot for having the line just touching the edge of the peak on the histogram. It is wise to look at some viral particles in the corners (e. in picture) and check that all the particles that were in that region in the original are present in the thresholded image. Click on Apply. Don't worry about particles that are touching, we will take care of that in the next step but try to keep it to a minimum. [back to top]

6. Now we need to take care of the particles that ended up touching one another after we thresholded the image. To do that, use the Watershed algorithm by going to Process-->Binary-->Watershed. This algorithm uses a density profile to determine if one object with a penninsula should actually be two objects. If it determines that they should, it will draw a line to seperate them. [back to top]

http://www.dnr.sc.gov/ael/notebook/imagej_counts/counts.html

2. 5. 2013 11:41:07

Bacterial and Viral Counts with ImageJ

Stránka 4

Steps 6 a-d. One Time steps. These are some thing you will need to do when you first begin to do counts with imageJ, but will be unnecessary after the first time. [back to top] 6a.The first thing you need to do is check some settings. Go to Analyze-->Set Scale and make sure that the scale is set to [back to top]

6b. Next you need to make sure you have the correct measurements set. It doesn't really matter how many things you have set to measure but you need to make sure that area is checked. Do this by going to Analyze-->Set Measurements. [back to top]

http://www.dnr.sc.gov/ael/notebook/imagej_counts/counts.html

2. 5. 2013 11:41:07

Bacterial and Viral Counts with ImageJ

Stránka 5

6c. Now we need to know the size of the different particles we wish to count. For this we are going to zoom in on an area of our image, and manually measure the are of several viruses in order to determine the appropriate size range. To do this start by switching to the zoom tool and click over an area with many viruses seeveral times until you are zoomed in nice and tight. Then switch to the freehand tool and trace the outline of a viral particle. After you have done that go to Analyze-->Measure (or press ctrl + m) and you will see the area of the particle you traced displayed. Do this several times for as many viruses as necessary to get an accurate esitmation of the size range for your viral particles. Close the results window when you are finished. You don't need to save the values if you have written down your range. [back to top]

6d. Repeat step 6c for bacterial particles. You should now have an accurate size range for both viruses and bacteria. Make sure you click somewhere in the image to deselect your last selection and close the results window without saving so that the results buffer is cleared. [back to top] Step 7. Finally we get to count some things. Zoom back out until you have your entire image on the screen. Then go to Analyze-->Analyze Particles. Set your size range to equal what you determined from step 6c or 6d (Note: my size range is intentionally off from the observed sizes, the reason for this will become apparent in step 9), make sure that you have it set to show masks, to display results, and return a summary. Click OK and watch the magic happen. [back to top]

You should end up with something that looks like this. The summary window tells you how many particles it

http://www.dnr.sc.gov/ael/notebook/imagej_counts/counts.html

2. 5. 2013 11:41:07

Bacterial and Viral Counts with ImageJ

Stránka 6

counted, as well as other useful information like the average size and the fraction of the total image occupied by your particles. The mask is a visual display of only the particles that were counted. This is useful for quality control (which we will get to later). For now, just move the mask to a corner of the screen, take note of your counted value either in a spreadsheet or a lab notebook and close the summary and results window (with or without saving, your call).

Step 8. Repeat step 7 but with the size range you determined for bacteria. [back to top] Step 9. Now for some quality control. In order to make sure we didn't miss anything, we are going to subtract our masks from the original image and check for particles we might have missed. First invert your mask with Edit->Invert (or ctrl+shift+I), then revert your original image to the saved version by going to File-->Revert (or ctrl + r). Now go to Process-->Image Calculator and subtract your mask from your original, make sure you have "Create New Window" checked. You should end up with something like this...Remember that I set my size range different from the actual observed range and I obviously missed quite a few of the larger viruses. You might have to repeat your counts a couple of times initially in order to get the size range correct, but after that you shouldn't be missing many particles. Once you get the size range for each type of particle refined, you should only have to count

Suggest Documents