Integration tests for the Fit Ellipsoid command.


Case 1
=======================================================================
Too few point ROIs cancel the plugin
=======================================================================
Steps
-----------------------------------------------------------------------
 1. Open "bat-cochlea-volume.tif" (File>Open Samples>Bat Cochlea Volume).
 2. Open ROI Manager (Analyze>Tools>RoiManager).
 3. Select the Point ROI tool.
 4. Draw a Point ROI on the image.
    - Press "Add" on the ROI Manager window.
	- Repeat eight(8) times.
 5. Run Fit Ellipsoid (Plugins>BoneJ>Fit Ellipsoid).

Expected result
-----------------------------------------------------------------------
An error dialog about too few points opens, and the plugin stops.

Completed: November 12th 2017 Richard Domander
-----------------------------------------------------------------------


Case 2
=======================================================================
Plugin ignores other types of ROIs
=======================================================================
Prerequisites
-----------------------------------------------------------------------
Case 1 has been completed.

Steps
-----------------------------------------------------------------------
 1. Select the Rectangular ROI tool.
 2. Draw a Rectangular ROI on the image.
 3. Press "Add" on the ROI Manager window.
 4. Run Fit Ellipsoid (Plugins>BoneJ>Fit Ellipsoid).
 
Expected result
-----------------------------------------------------------------------
An error dialog about too few points opens, and the plugin stops.

Completed: November 12th 2017 Richard Domander
-----------------------------------------------------------------------


Case 3
=======================================================================
Plugin ignores ROIs active on all slices
=======================================================================
Prerequisites
-----------------------------------------------------------------------
Case 1 has been completed.

Steps
-----------------------------------------------------------------------
 1. Draw a ninth Point ROI.
 2. Press "Add" on the ROI Manager window.
 3. Select the newest ROI from the ROI Manager.
 4. Click the "Properties" button.
 5. Set "Position" to "0".
 6. Run Fit Ellipsoid (Plugins>BoneJ>Fit Ellipsoid).
 
Expected result
-----------------------------------------------------------------------
An error dialog about too few points opens, and the plugin stops.

Completed: November 12th 2017 Richard Domander
-----------------------------------------------------------------------


Case 4
=======================================================================
User sees an error dialog if fitting fails
=======================================================================
Steps
-----------------------------------------------------------------------
 1. Open "bat-cochlea-volume.tif" (File>Open Samples>Bat Cochlea Volume).
 2. Open ROI Manager (Analyze>Tools>RoiManager).
 3. Select the Point ROI tool.
 4. Draw a Point ROIs on the image.
    - Draw at least nine in a tight cluster on a single slice.
	- Press "Add" on the ROI Manager window after each point.
 5. Run Fit Ellipsoid (Plugins>BoneJ>Fit Ellipsoid)

Expected result
-----------------------------------------------------------------------
An error dialog about failed fitting opens, and the plugin stops.

Completed: November 12th 2017 Richard Domander
-----------------------------------------------------------------------


Case 5
=======================================================================
Fitting results
=======================================================================
Steps
-----------------------------------------------------------------------
 1. Open "bat-cochlea-volume.tif" (File>Open Samples>Bat Cochlea Volume).
 2. Select the Point ROI tool.
 3. Draw a Point ROIs on the image.
    - Draw lots of points in a roughly spherical cluster on 
	  different slices.
	- Press T-key after each point to add it to the ROI Manager
 5. Run Fit Ellipsoid (Plugins>BoneJ>Fit Ellipsoid)

Notes
-----------------------------------------------------------------------
If fitting fails, empty manager, and try drawing the points again.

Expected result
-----------------------------------------------------------------------
User sees the BoneJ results table with the radii and centroid 
coordinates of an ellipsoid.

Completed: August 3 2018 Richard Domander
-----------------------------------------------------------------------


Case 6
=======================================================================
Calibration affects ellipsoid properties
=======================================================================
Prerequisites
-----------------------------------------------------------------------
Points have been drawn, and Case 5 has been completed.

Steps
-----------------------------------------------------------------------
 1. Set scale (Analyze>Set Scale)
 2. Set options
    - "Distance in pixels" to "1"
    - "Known distance" to "0.50"
    - "Pixel aspect ratio" to "1.0"
    - "Unit of length" to "mm"
 3. Run Fit Ellipsoid (Plugins>BoneJ>Fit Ellipsoid)
 

Expected result
-----------------------------------------------------------------------
Results are half from Case 5.

Completed: November 12th 2017 Richard Domander
-----------------------------------------------------------------------


Case 7
=======================================================================
Verify that the progress bar is seen
=======================================================================
Steps
-----------------------------------------------------------------------
1. Open "bat-cochlea-volume.tif" (File>Open Samples>Bat Cochlea Volume)
2. Select the Point ROI tool.
3. Draw a Point ROIs on the image.
    - Draw lots of points in a roughly spherical cluster on
	  different slices.
    - Press T-key after each point to add it to the ROI Manager
4. Run Fit Ellipsoid (Plugins>BoneJ>Fit Ellipsoid)

Notes
-----------------------------------------------------------------------
If fitting fails, empty manager, and try drawing the points again.

Expected result
-----------------------------------------------------------------------
The progress bar advances in the lower right-hand corner of the ImageJ
main window (moves very fast).

Completed September 10th 2018 Richard Domander
-----------------------------------------------------------------------