An adaptive optics ophthalmoscope image cone identifier and analyzer.
This program uses a match filter based algorithm to mark the presence of cones and determine the cone density of the image. There are two parts to using the software- the setup, and running the software.
While on average the algorithm finds ~95% of cells in confocal adaptive optics images, an external observer will still need to review these images in order to find cones that the program may have missed, and to correct cones that may have been incorrectly marked.
The software relies on two types of input:
- A scaling file (LUT.csv)
- Images to count! (in .tif format)
Both of these should be placed in the “etc” folder within the base folder.
The scaling file (LUT.csv) consists of three columns: An “ID” column, which should always be the first two underscore-delimited words in the image file, an “axial length” column, which contains the axial length of the associated ID in mm, and a “pixels per degree” column, which contains the pixels per degree scale of the associated ID. Each row of LUT.csv contains a separate ID, axial length, and scale. Feel free to add as many subject IDs to the list as you have, but remember, the software only allows you to put in 1 row of scaling values per ID. Also, LUT.csv MUST be a comma-delimited file. If you don’t know what that means, just make sure to save LUT.csv as a “.csv” and not a “.xlsx” or “.xls” in Excel.
An example of a GOOD image filename: RC_0009_pictures_of_stuff.tif
An example of a BAD image filename: RC_0009pictures_of_stuff.tif
An example of a BAD image filename: pictures_of_stuff_ RC_0009.tif
An example of a BAD image filename: RC0009pictures_of_stuff.tif
An example table row for LUT.csv:
ID | Axial Length | Pixels per degree |
---|---|---|
RC_0009 | 24 | 600 |
An example LUT.csv is provided for you within the “etc” folder.
Open cone_counting.m within MATLAB, and run it.
The images within the etc folder will be displayed in a random order.
For each image:
- Left click on the image to mark a cell.
- Right click on the image to remove a cell.
- Move the red slider bars on the histogram window to adjust the brightness and contrast of the image.
- Press 'L' to switch the image between log and linear contrast.
- Use the (+/-) keys to zoom in and out.
- Press Tilde ( ~ ) to remove ALL found cones
There is a progress bar provided that will show how many images remain.
Once the software has completed, the coordinate areas will be cropped based on the input values from line 25 of cone_counting, and basic analyses (Density, NND, etc) will be run on the coordinate files, and output to the coordinate_analysis folder.
The coordinate analysis folder will contain:
- Cone_Counting_Batch_Random_density_info.csv
- This file contains a summary of all files run in the software. It also contains the density as calculated over the entire image.
- coordinate_analysis_coordstats_XXum_box.csv
- XX will be the micron sizes that are in the “sizes” vector on line 26 of cone_counting.m -This file contains the filename, number of cells, density within the filename’s micron region, mean NND, cropped region in microns, mean Voronoi area, number of “bounded” Voronoi cells, and the total “bounded” Voronoi area.
- The coordinates of each file run through the software
- Each coordinate file contains all coordinates found using the software.