Author: Bob Dougherty Installation: Download (Ellipse_Roi.class, and EllipseRoi.class) or Ellipse_Roi.java to the plugins folder. (Windows users right-click to download.) Description: This plugin makes an elliptical ROI by dragging the cursor first along one axis (preferably the major axis), and then using adjustment handles to set the width. The orientation and dimensions can be fine tuned with the adjustment handles. This capability was requested by Mark Hayworth. Thanks to Gary Chinga and Gabriel Landini for useful suggestions.
The plugin uses the blank spot in the toolbar between the text and zoom tools. Click on that spot to select the Ellipse ROI tool.
To enable measurement of ellipse parameters, select "Fit Ellipse" in Analyze->Set Measurements.....  The ellipse parameters displayed in the status bar may differ from the Measurement Results due to differnces in the calculation techniques and in the definitions of the axes.
Ellipse measurement is very confusing if the Pixel Aspect Ratio (in Analyze -> Set Scale...) is not 1.  The problem is that the orthognal axes of the ellipse on the screen are not, in general, orthogonal when the image is scaled to real dimensions.  The scaled ellipse has different orthogonal axes.  It is believed that the information shown in the status line is correctly scaled (as of Version 6), but the appearance of the ellipse on the screen is likely to be misleading.  It is recommended that images be scaled to have unity Pixel Aspect Ratio before measuring ellipse parameters.
Effect of changing Pixel Aspect Ratio Limitations and Details:
This is a PluginFilter. It only works on the image that was in front when the plugin was run.
The tool in the toolbar (between the text and zoom tools, as noted) looks blank.
Ellipse ROI can keep running while you use the hand, zoom, and some other tools.  Click on the blank tool to return to Ellipse ROI.
Ellipse ROI stops if another selection tool, like the Rectangle, is chosen.
If Ellipse ROI has stopped, you will need to rerun the plugin to use it again. It is not good to rerun Ellipse ROI while it (or Circle ROI) is already running. This can create multiple threads which slow down the system and provide confusing results.
To find out what Ellipse ROI is doing, move the mouse over the blank tool. You will see ellipse parameters if Ellipse ROI is running and selected, "Ellipse (limited to ...)" if Ellipse ROI is running but not selected, and "Unassigned" if Ellipse ROI is not running.
An ad hoc method is used associate the major and minor axes with the A and B axes. For Pixel Aspect Ratios that are very far from unity, unexpected axis-swapping is possible. This is much less likey if the first axis, A, is the major axis.
Versions: 0: 7/14/2002 Beta release.
1: 7/14/2002 The thread stops when the image is closed.
2: 2/28/2004 Removed little black squares from the ellipse.
3: 2/28/2004 Added ellipse measurements to the status bar.
4: 2/29/2004 Shut down if another selection tool is chosen.
5: 3/1/2004 Withdrawn.
6: 3/1/2004 Corrected scaling for Pixel Aspect Ratio not equal to 1.
Threads are used to orchestrate the work. This is effective, but it would be more efficient to use events. A future version may use events.
Detect and avoid conflicts between multiple Ellipse Roi objects or between Ellipse Roi and Circle Roi (Java 2 getListeners) Make the operations fully event-driven. Improve the algorithm that maps the major and minor axes to the A and B axes. License:
Copyright (c) 2002, 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.