Starting in 1.2 ShapeLogic contains both an automatic color and gray scale particle counter and a particle analyzer working without manual user intervention. The goal is to be able to recognize different cells on a relatively uniform background and be able to extract a lot of geometric information.
See Cell Categorizer for images types that can be handled by the current particle analyzer, and for future plans.
ShapeLogic 1.3 introduced 2 new modes for the particle analyzer: one where you set the foreground color of the particles and one where you set the background color. They will always find a particle image and will not fail, unlike the automatic particle analyzer.
ShapeLogic 1.5 introduced neural network machine learning.
ShapeLogic 1.6 introduced categorizer setup file so you could define rules and neural network without doing any Java programming.
Test on example particle image embryos.jpg
Under ImageJ Plugins ShapeLogic menu click "Particle Counter", "Color Particle Analyzer" or "RGB Color Particle Analyzer".
Select input parameters in dialog
The parameters
Max distance: Distance between color in same color bucket
Min pixels: Minimum number of pixels in particle
Max pixels: Maximum number of pixels in particle
Iterations: K-mean iterations for color hypothesis
CountOnly: Only count particles, do not trace edge, vectorize, annotate and match
ToMask: Turns the image into a black and white mask, with black particles
DisplayInternalInfo: Print out polygon, points and their annotations
UseNeuralNetwork: Use neural network for classification
ShowFileDialog: If this is checked the user will be prompted with a file dialog to select categorizer setup file
CategorizerSetupFile: File path to the from categorizer setup file containing neural network, rules or column selection list
These are the default values and the name of the parameters in Java.
_iterations = 2; // K-mean iterations for color hypothesis _maxDistance = 50; // Distance between color in same color bucket _minPixelsInArea = 5; // Minimum number of pixels in particle _maxPixelsInArea = 10000; // Maximum number of pixels in particle
Check ToMask check box in order to better see what particles were found and to post process it with other tools. The built in particle analyzer in ImageJ contains functionality that is not available here e.g.
Here is the result of running outline and add numbers
The numbering scheme used in ImageJ particle analyzer is the same as the one used in ShapeLogic. Start from top left corner.
A summary result is shown in a dialog, with the following information:
A report of each particle's properties is sent to an ImageJ result table, which can be exported to Excel. Reports are different for the particle counter and analyzer.
The particle counter finds and prints basic geometric properties of the particles
The particle analyzer traces the edge of each particle. It finds and prints more advanced geometric properties of the particles. These are the default properties to be printed:
For color images it will also write out average R, G and B channels.
The particle analyzer finds many more geometric properties that are not shown on the above example, you can set what you want to print in a categorizer setup file.
This the particle analyzer can also select and categorize particles based on all of the above properties. In order to categorize particles the user should define geometric rules for each particle type.
ShapeLogic 1.7 will come with predefined rules to categorize certain cells.
If you want more detailed information mark check box DisplayInternalInfo.
ShapeLogic 1.3 introduces 2 new color modes for the particle analyzer.
You find them under the menu item: RGB Color Particle Analyzer.
One will set the background color the other sets the foreground color.
This is useful for
Here is an example
CDC image 10157 legionella pneumophila
The setting in the dialog was to find the purple bacteria.
This is useful for
The particle counter algorithm in ShapeLogic 1.6 is relatively simple. It is setup to be expanded to handle more advanced algorithms. Here is the flow.
This description has been moved to programming page.
Starting in ShapeLogic 1.6 you can load the neural network from external text files. This is described on the categorizer setup page.
ShapeLogic has an example file: shapelogic/src/test/resources/data/neuralnetwork/default_particle_nn.txt with this content:
========== FEATURES aspect ========== RESULTS tall flat ========== WEIGHTS 1. -1. -1. 1.
It will produce the same effect as the default color particle analyzer neural network. Except for the categories not being capitalized.
If you have trained a neural network or made rules to recognize a certain type of particles you are encourage to upload text files to http://code.google.com/p/shapelogicapps/ so other users can benefit from them.