Author: Bob Dougherty (firstname.lastname@example.org) Installation: Download Curvature_.java or Curvature_.class and place it in the Plugins folder. Description: ImageJ plugin to compute the curvature or the radius of curvature of the edges or the centerlines of particles in a binary image or stack.
The 8-bit image should have 0 values outside the particles and 255 inside, as from Process/Binary/Convert To Mask.
The dialog allows the choice of Graphical Output: "Edges", "Centerline", "Both", or "None" and Tabular Output: "Edges", "Centerline", or "None". A third choice allows signed values or absolute values for the output curvature or radius. The fourth choice selects between plotting the radius of curvature or its reciprocal, the curvature.
If graphical output is selected, then the plugin creates a new 32-bit image to show the curvature and/or the radius of curvature. The initial grey scale is set to be symmetrical around 0 for signed values or to run from 0 to a maximim in the unsigned (absolute value) case. An appropriate Lookup Table is chosen in each case so that the value 0 is shown in black, indicating that a curve is not represented at that point. The final dialog element "Initial display range for radius of curvature, re. pixel width", determines the maximum value of the scale. Use "Analyze/Tools/Calibration Bar..." to show the scale and "Image/Adjust/Brightness/Contrast..." to adjust the maximum after the fact. Be careful to maintain the symmetry to keep the value 0 black. If curvature is selected, then the values shown in the plots are multiplied by 1000 to make them larger.
The centerline processing is intended for objects that are longer than they are wide. The centerline should end up along the center of the object. The position of the centerline is somewhat similar to the line that results from "Process/Binary/Skeletonize". For an object with smooth edges, the centerline from this plugin will probably be smoother than the skeleton. For an object with jagged edges, the skeleton will be smoother because this plugin tries to follow the edges.
It is possbile to run this plugin on a skeletonized image. If the skeleton has a single line, then the best results will be obtained by choosing "Centerline" for "Graphical output". If the skeleton has branches, then the "Centerline" calculation will get lost because centerline of a branched skeleton is not defined in a way that the plugin understands. In this case, it is better to choose "Edges" for "Graphical output" and "no, show absolute values" for "Allow negative values". What will happen in this case is that the left and right edges of the skeleton lines will be drawn, these will be very close together, and they will be nearly the same color. Choosing "yes, show signed quantities" for "Allow negative values" would create a contest between the two sides of the line because the curvature has the opposite sign. In any case, the curvature of a branched skeleton may not be meaningful.
In the case of objects that are generally round, the centerline follows an unpredictable path and the centerline curvature is not meaningful.
Version 0: 7/03/2020
Version 1: 7/04/2020 Changed color LUT from "Phase" to "GreenBlue", fixing a bug on at least one installation.
Version 2: 7/04/2020 Improved accuracy. Black background.
Version 3: 7/04/2020 Smoother resuls.
Version 4: 7/10/2020 Completely revised for better accuracy. Added Results Table output.
Version 5: 7/10/2020 Better accuracy.
Version 6: 7/12/2020 Another complete revision. Respects inflection points.
Version 7: 7/13/2020 Fixes Array out of bounds bug that occurred with particles on the image edge.
Version 8: 7/13/2020 Quality improvements: ignore line ROIS, slight smoothing of results.
Version 9: 8/5/2020 Outputs center of curvature. Centerline option. Improved speed. Option for absolute value.
Version 10: 8/6/2020 Several detail tweaks. Option for plotting curvature as well as radius of curvature.
The pixel aspect ratio must be 1. If not, a warning is issued and the pixel width is used.
Copyright (C) 2020 by OptiNav, Inc. email@example.com
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ImageJ: ImageJ can be freely downloaded from the ImageJ web site.