This site will be updated frequently. The package was last updated January 8, 2009
PSICIC (Projected System of Internal Coordinates from Interpolated Contours) is a modular set of MATLAB functions designed to find smooth cell borders from phase contrast microscope images and establish an internal coordinate system for each individual cell. This allows precise measurement of cell shape and subcellular localization of proteins, as well as facilitating comparisons between cells of various shapes. It is described in the article PSICIC: Noise and Asymmetry in Bacterial Division Revealed by Computational Image Analysis at Sub-Pixel Resolution in PLoS Computational Biology.
PSICIC is not stand-alone software: the functions require MATLAB to run, and some require the Image Processing Toolbox. MATLAB is a widely used commercial platform for scientific computing. Many universities have site licences for MATLAB and its toolboxes; check with your institution for availability and installation instructions. MATLAB is well-documented, and there are many tutorials online to help you get started.
PSICIC has been developed and tested on MATLAB version R2007b, although both older and newer versions are likely to work as well. The software is freely modifiable and extendable, and we encourage you to do so! Please let us know how you extend PSICIC.
More helper functions, including functions for 2D intensity analysis and tracking cells over time, will be added as documentation is written up.
Download and installation
To use PSICIC you must download the set of functions and then tell MATLAB where to find them.
- Download the basic set of PSICIC functions in the psicic.zip file. Last updated January 8, 2009.
- Create a folder anywhere on your hard drive and extract the psicic.zip file to that directory.
- In MATLAB, go to the "File" menu and choose the "Set Path..." option.
- Choose "Add with Subfolders..." and select the folder where you extracted the psicic.zip file. Be sure to choose "Add with Subfolders" and not "Add Folder..." otherwise certain functions may not work correctly.
- Press the "Save" button in the lower left corner of the "Set Path" window, and then press the "Close" button. If you don't press the "Save" button, MATLAB will not know where to find the PSICIC functions.
- To see if your installation worked, type which psicic at the MATLAB prompt. If PSICIC has been installed correctly, you should see the directory in which you place the psicic.zipfiles. If, instead, you see 'psicic' not found. then something has not worked correctly. Check the "Set Path..." window again and make sure the folder you added is on the list, as well as several subdirectories.
Using PSICIC
The CLOAD function is the heart of PSICIC: it takes an image of cells, finds the cell borders, and generates the internal coordinate system for each cell. Other functions can then be applied to analyze data using these images, such as the INTENSITY function, which calculates a linear intensity profile for the cells. CLOAD has many possible arguments and options; for a full rundown, type help cload at the MATLAB prompt.
The PSICIC command is a GUI wrapper for the CLOAD command. When you type psicic at the MATLAB prompt, a dialog appears asking you to choose an image file. CLOAD expects the image file to be either a monochrome TIF with phase data, or a color TIF with phase data in the green channel and, optionally, any fluorescence data in the red and/or blue channels. The GUI that then appears allows you to change the various options for CLOAD, and then hitting the "Run CLOAD" button in the lower right corner runs the CLOAD function on the displayed image and shows the result in the window. It also creates a variable called data in the workspace containing the results of the analysis. IMPORTANT NOTE: any existing variable named data will be overwritten. Make sure to rename any existing data variable before pressing the "Run CLOAD" button!
The PSICIC GUI also contains several useful functions, such as the ability to interactively click on cells to remove them from the analysis (right click to exit Interactive Cell Delete), the ability to show or hide the midline of the cell, the ability to display a histogram of the image to aid in choosing the correct contour level, and the ability to display a range of contour values to help pick the correct contour level.
Once an image has been analyzed, the data will exist as a variable in the MATLAB workspace; if the GUI has been used, it will be called data. Typing data at the command prompt should display several pieces of data: the name of the image file analyzed, the dimensions of that file, and the number of cells PSICIC found. You can also view the parameters used to analyze the image by typing data.parameters. To see the data for an individual cell, type data.cells(n), where n is the number of the cell you wish to view data for. The various fields are:
- border: a matrix containing the set of points making up the original outline of the cell.
- area: the area of the cell, in pixels
- perimeter: the perimeter of the cell, in pixels
- center: the coordinates of the center of the cell
- top: a matrix containing the set of points that define one half of the cell border
- bot: a matrix containing the set of points that define the other half of the cell border
- mid: a matrix containing the set of points that define the midline of the cell
- internalx: a vector containing the cumulative length along the midline of the cell, which can be used as the x coordinate of the internal coordinate system.
- midlength: the length of the midline of the cell, in pixels
- thickness: a vector containing the width of the cell at each point along the midline
More fields can be added by the use of the various helper functions.
The INTENSITY function calculates a one-dimensional intensity profile for the cell by summing the intensity values along each width line. For more information, type help intensity. Typing the command data = intensity(data) will add intensity data to the existing data variable (alternatively, typing idata = intensity(data) will leave the original data variable intact, and create a new variable idata containing the intensity information). After running the intensity function, typing data.cells will show several new data fields, each with the prefix int_:
- int_profile: a vector containing the sum of the intensities along each width-line
- int_mid:a vector containing the intensities along the midline, without any summation along the width of the cell. Noisier, but also more sensitive in some situations
- int_max: the maximum of int_profile
- int_min: the minimum of int_profile
- int_pos: the index where the maximum occurs
- int_xpos: the internal x-coordinate where the maximum occurs
- int_npos: the percentage of the cell length where the maximum occurs
(Note that int_xpos is simply equal to internalx(int_pos) and int_npos is equal to int_xpos/midlength.)
Displaying information
PSICIC includes a few commands to help visualize your data. First, display you image using one of MATLAB's built-in plotting commands: imshow(data.SourceImage). You can also show just the phase channel of a multichannel image with the command imshow(data.SourceImage(:,:,1)). Next, type cplot(data) to show the PSICIC outlines of your cells overlaid on the image. CPLOT has several options, which are explained in the help file (type help cplot for more information). An example which would show cell outlines in blue, midlines in dotted red, and width lines in green is:
imshow(data.SourceImage);
cplot(data);
cplot(data,'g','cross');
cplot(data,'r:','mid');
Cells can be numbered on an image using the CELLNUM command. Once the image is displayed (either with or without outlines), type cellnum(data) to add labels. The color of the labels is yellow by default, but can be changed by adding a color string as a second argument (i.e. cellnum(data,'w') for white; see the documentation for the MATLAB PLOT command for all available color strings.)
Numbering cells on the image allows identification of specific cells of interest for further analysis. Possible avenues for analysis are unlimited; as a simple example, to view the intensity profile for cell number 12, type the command figure, plot(data.cells(12).internalx, data.cells(12).int_profile) at the MATLAB prompt.