Author: Bob Dougherty (firstname.lastname@example.org) Installation: Download ( Measure_Roi.class or Measure_Roi.java into the Plugins folder. Description: ImageJ plugin to measure the length and width of an ROI. For this plugin, the length is defined as the greatest distance between any two points on the perimeter (Feret's diameter), and the width is largest separation between points measured perpendicular to the axis defining the length. The width is the dimension that would be measured with a pair of calipers with the jaws oriented parallel to the length axis. The capability was requested by José María Gómez Durán for measuring leaves. Usage: Create an ROI that outlines the object to be measured and run Measure_Roi. The results appear in the Results window. Anaylze Particles: For a version of this that works like "Analyze Particles," download (Measure_Roi_PA.class and MeasureRoiAnalyzer.class) or Measure_Roi_PA.java to the plugins folder. This is intended to process several "particles" in an image (or a stack) automatically. The image must be converted to 8-bit and thresholded before running Measure_Roi_PA.
Additional properties like Area can be measured by selecting them in Analyze->Set Measurements... before running Measure Roi PA. After changing the measurement options, it may be necessary to close the Results window to cause the columns to be updated.
Curved Particles: The latest version, Measure_Roi_Curve.java (Measure_Roi_Curve.class and MeasureCurveAnalyzer.class) works like Measure Roi PA but attempts to measure curved objects. For each particle, it first finds the points with the largest separation. These are designated as the end points. Next, it computes two curves that connect the end points along the left and right sides of the object. These curves are parameterized by arc length. The left and right side curves are averaged for each arc length to create a centerline curve. The arc length of the centerline curve is reported as the length of the object. This length will, in general, be greater than the length reported by Measure ROI PA because the curve connects the same two points, but does not have to be a straight line. Finally, the width is determined finding the centerline point with the largest estimated width. The estimated width for a centerline point is the straight line distance between two (opposite) edge points where the average arc length for the two edge points equals the arc length of the centerline point. The difference between the arc lengths of the edge points is scanned, keeping the average constant, to minimize distance between the points. The resulting mimimum distance is taken as the width corresponding to that centerline point, and the largest width, over all of the centerline points is reported as the width of the object.
A more elegant and accurate approach would be to establish an orthogonal, curvilinear, grid for the object, perhaps by conformal mapping. This is left as a possible future impro vement.
Versions: 0: 6/9/2004
1: 6/9/2004 Use specific formulas for different types of ROIs to get exact answers.
6/9/2004 Added Particle Analysis version: Measure_Roi_PA per suggestion from José María Gómez Durán
2 6/10/2004 Fixed a bug (in both codes) that made the perpendicular result depend on orientaion.
2.1 6/11 (version applies only to Measure Roi PA) Measure_Roi_Analyzer renamed MeasureRoiAnalyzer
6/27/2004 Added Measure Roi Curve to handle curved leaves.
2/26/2007 Updated Measure Roi PA and Measure Roi Curve to work with the new version of Particle Analyzer in ImageJ
Copyright (c) 2005, OptiNav, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of OptiNav, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ImageJ: ImageJ can be freely downloaded from the ImageJ web site.