Averaged PSF Image Generator

5/12/2010 3:25 PM You can subscribe to this wiki article using an RSS feed reader.
  

Overview

Point Spread Function (PSF) is the key factor determining resolution of a microscope. It blurs a true object under the microscope so that prevents us to investigate the object more accurately.

With a given optical configuration, a final image from the microscope can be improved by image processing, especially deconvolution process. Deconvolution of an image requires a PSF to perform the process. Either theoretical or experimental PSF is necessary for the deconvolution process.

A deconvolution algorithm utilizing an experimental PSF often produce better outcome over that utilizing a theoretical PSF because the theoretical PSF often fail to express actual PSF for a given specimen. On the other hand, the experimental PSF prepared right before or after image acquisition with the same acquisition parameters can closely represent the actual PSF for the acquired image from the same microscope.

To obtain better deconvolution result, a “good” experimental PSF is necessary. The good PSF means that it has the same image acquisition parameters to the image to be processed by the deconvolution. It is not too difficult to match the PSF parameters such pixel size and z step with those of the image. Also a proper level of Signal-to-Noise Ratio (SNR) is required for the deconvolution algorithm to produce a good result. However, since an individual fluorescent bead image tends to be noisy due to weak signal from a small bead (less than 200 micron in diameter), extracting appropriate PSF parameters from the individual fluorescent bead image can be problematic.

One way to alleviate this problem is generation of an averaged PSF image from more than several individual fluorescent bead images. An averaged PSF image can be generated from several z stack images containing fluorescent beads. The averaged PSF has higher SNR than those individual PSF images.

The software described in this manual generates an averaged PSF image of number of individual fluorescent bead images from several images containing many fluorescent beads with diameter close to the diffraction limit of light. The averaged PSF image is used as experimental PSF for deconvolution and/or performance indicator for the microscope produced the fluorescent beads images.


Theory

The center of mass for an individual bead image is calculated for alignment purpose. Once the center of mass is located, translate the bead image to the center of mass. Calculate the average intensity for all translated individual bead images.

The center of mass R of a system of particles is defined as the average of their positions, ri, weighted by their masses, mi. For a fluorescent image, intensity of each pixel is considered as mass. Thus, the intensity value must be remained as gray scale.

The center of mass of an image with one individual bead image located close to the actual center of mass can be calculated by the following equation.


 

Things Done So Far

  1. Generation of an averaged PSF image from multiple image files containing fluorescent bead images.
  2. Support TIF, OIF, and PICT file formats utilizing LOCI Bio-Formats library.
  3. Inclusion or exclusion of user selected bead images from calculation of averaged PSF image.

Requirement

  1. Windows OS (XP and Vista)
  2. LOCI Bio-formats library (loci_tools.jar)

Installation

Installation of Averaged PSF Image Generator

<For administrator>

 

  1. Mount \\firstsun.ucsd.edu\tera5
  2. Open PSF_Average folder
  3. Run avgPSF_pkg.exe
  4. Follow the instruction to install necessary files to run MATLAB Compiler Runtime
  5. After installation, delete all files except avgPSF.exe.
  6. Download (LOCI Bio-Formats library for MATLAB: http://www.loci.wisc.edu/ome/formats-matlab.html) or copy loci_tools.jar into  a secure folder (e.g. C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v710\toolbox)
  7. Open classpath.txt under C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v710\toolbox\local.
  8. Add $matlabroot/toolbox/loci_tools.jar if the location of loci_tools.jar is C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v710\toolbox.

 

 


Running the program

  1. Mount \\firstsun.ucsd.edu\tera5
  2. Open PSF_Average folder
  3. Run avgPSF.exe file
When the program is successfully loaded, the following window will show up on the screen (Figure 1).



Figure 1. The main window of Averaged PSF Image Generation.



A brief procedure to obtain an averaged PSF image is following.

  1. Make a list of several images of fluorescent beads utilizing “Add” button.
  2. Click “Identify Samples” button to locate beads for all listed files.
  3. Click “Get PSF Image” button to generate an averaged PSF image.


 

Make a list of images

 Click “Add” button, then an open dialog box will appear. Select one or more image files to be processed. To select multiple files hold “Ctrl” key while you click on an image filename. Once the selection is done, click “Open” button on the open dialog box. Then the selected image files will be listed on the program main window (Figure 2). The “Identify Samples” button will be activated at this time. 

You can see each image by clicking on the filename. It is also possible to see each slice in one image file. Normalization option is useful to see very week signal from the beads.


Figure 2. List of images to be used for identification of individual bead image and generation of the averaged PSF image. "Get PSF Image" button is deactivated until all list files are through identification process. 


Identify Individual Bead

You can identify beads in each image by clicking “Identify Samples”. If you want to do it for all images in the list at once, check the “Identify Samples for All Files” option (Figure 3). To activate “Get PSF Image” button, it is necessary to perform bead identification for all images in the list.

The final dimension for PSF image is the pixel dimension of resulting averaged PSF image from the selected individual bead images. This dimension affects on automatic selection of individual bead images during identification process. If two beads located at each other less than twice distance of the final dimension in pixel, the two beads will be marked by gray squares. The beads with gray squares are not considered to calculate the averaged PSF image. Beads located at less than half distance from any edge of the original image will be also excluded. It is also possible to manually change the selection by checking or unchecking the check box with the bead number on the right side of the original image with square markers.



Figure 3. The identified individual bead marked by cross on the bead and square around the cross. The yellow squares are selected beads for averaging process.

Generate an Averaged PSF Image

Generation of an averaged PSF image is performed by clicking “Get PSF Image” button. There are several parameters affecting the resulting averaged PSF image: a) threshold level, b) core span, and c) cutting slope (Figure 4).

Threshold level is an important factor affecting the calculation of the center of mass. If the threshold level is set too low, noise affects to calculate the center of mass. If it is set too high, distribution of effective pixels that are used for the calculation might be skewed due to exclusion of some effective pixels from the calculation. Based on some simulation experiments regarding the effect of the threshold level on the accuracy of calculation of the center of mass, default value is set to 20 % of the maximum value of the current maximum intensity.

Without “Use Whole Slices” option (Figure 4), the program tries to detect top and bottom slices utilizing core span and cutting slope parameters. Core span defines the area from the approximate center of an individual bead image to collect intensity values through z slices. Cutting slope is used for locating top and bottom slices from the collect intensity value. Since the intensity values near the center of the z stack is expected to be much brighter than the other slices, the program calculates 1st derivatives of the intensity values of the core areas. Then use the cutting slope value as a threshold value to locate the top and bottom slices.

When you check “Use Whole Slices” option (Figure 4), core span and cutting slope will be deactivated. In this case the program assumes that the number of stacks in the listed images is the same.



Figure 4. A bead image appears in the averaged PSF image section after generation of an averaged PSF image. This figure shows the 9th slice out of 17 slices of the averaged PSF image.