Image Analysis in Fiji

From Microbial Ecology and Evolution Lab Wiki
Jump to navigation Jump to search

Saving Time Series and a Time-lapse Move

1. File>Import>Image Sequence... 2. Import image sequence as a virtual stack. 3. File>Save As...>AVI to save as a movie file that is readable across devices. Here you have lots of options. Consider the frame rate that you would like (this depends on the number of images you have). Typically I compress so that 1 second represents 1 hr of real time. This would be 60fps if you took one image every minute, and 30fps if you took 1 image every 2 min. This may take a while to save. 4. Other options are available if you want a smaller video file, including making sure you are saving 8bit versus 16 or RGB images. You can also create a substack of, for example, every 10th frame and save that as an AVI.

Time Series Image Analysis

1. Import your image sequence into Fiji using a virtual stack. 2. Convert to 8-bit grayscale by using Image>Type>8-bit. This might take a while using a virtual stack. 3. Once all images have been converted to 8-bit, run the Stack Difference command, which will subtract pixels in one frame from the pixels in the previous frame. Analyze>Multi Kymograph>Stack Difference. You can start with a frame difference of 1 and adjust if interested. This should bring up a new window of mostly dark pixels (adjust so that it is visible with the brightness and contrast settings). You can save this as an AVI as well if you choose. 4. Open the Time Series Analyzer plug-in (needs to be downloaded and installed if this is your first analysis) and draw a rectangular ROI around the entire frame or region you are interested in. You can make multiple ROIs as well. Press 't' to add your ROI to the ROI manager, then highlight it and "Get Average" on the Time Series Analyzer window. This should bring up a plot of the average pixel intensity across your ROI over time. Check different areas, compare mutants to WT, etc. Evidence of pulsing tends to look like sharp peaks with a period of ~45-60 min that occur after fruiting bodies have formed.

You may need to experiment with smoothing techniques or the Walking average function to smooth some of the noise first.

Analysis of Fruiting Bodies in Brightfield Images, uses Analyze Particles function of FIJI.

1. Open your image in FIJI either by dragging it into the FIJI window or using the File>Open command. Under Analyze>Set Scale, remove scale and check 'global' to keep the units in pixels and not dpi.

2. Convert to 8-bit image by Image>Type>8-bit

3. In order to use the Analyze Particles feature, you need a binary image (black and white only, not grayscale). To achieve this, we want to set a threshold where we include fruiting bodies but not any of the agar background. Click the window with your image and Image>Adjust>Threshold. Depending on your settings and what your image looks like, you may need to de-select the "dark background" option so that the fruiting bodies are red but none of the background. Click apply.

4. Using the circle tool, highlight one of the smallest aggregates that you would consider a fruiting body, and press 'M' to measure. Under area it will tell you how many square pixels are in that fruiting body. Use this value to set your minimum particle size.

5. Using the square tool, make a box that encompasses as many fruitng bodies as possible while not including any edges. If you are analyzing multiple images, you may want to ensure that this box size is appropriate for all images. Press 't' to bring up the ROI (region of interest) window. Using the 'specify' tab, you can specify a box of length and width in pixels so it is an even number, and RECORD THIS IN YOUR NOTEBOOK. You will want to use the same ROI size for all images.

6. Image>Duplicate should bring up a crop of your original image that only shows the region in your ROI. Now use the Analyze>Analyze Particles feature to automatically count your fruiting bodies and collect summary data. For minimum size, use your area of the smallest fruiting body that you measured in step 4 to make sure that you aren't counting smaller 'particles'. You can run that as is, or check different options if needed. Sometimes you can ask it to fill the holes, you could have it show outlines to make sure that it's counting every fruiting body, etc. But the table that results from running analyze particles should contain fruiting body counts as well as area statistics. Definitely do some quality control to verify that your settings are accurate.