Profiling: Added simple 'profiling' to acquisition

Added simple 'profiling' to acquisition process.

It just keeps track of a bunch of separate System.nanoTime()s and prints
them when it's done.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>

Slightly reformatted profiler output

I moved the percent-time above each child timer, and added a percent sign
after it.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Added LayoutUtils.form and made use of it

Greatly simplifies certain types of UI creation.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Reduced maximum long-wait time to 50 ms

I'm not sure if it'll make much of a difference; ultimately, catching
these may mean nothing.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Finished implementing pixel size calibration

It can now create the calibrations it calculates. Also cleaned up a few
parts of it.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Various fixes in autocalibrator

Temporary fix to default pixel size (set to .652). (Pixel size should
really be removed from the SPIMCalibrator interface and its implementors;
this is now the responsibility of PixelSizeCalibrator.)

Made tweaks frame appear alongside main window.

Set bead scanning to use proper motor steps.

Made laser stay on for the entire scan.

Probably other things I'm forgetting.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Fix applyCalibratedRotation in SPIMAcquisition

It was still on the 0..100 scale for the twister; we've moved to degrees
now. I also made the rotation more sensitive; this was mostly to test the
calibration.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Added snapImage to SPIMSetup

A simple utility function that flashes the laser if autoShutter is off and
calls the camera's snapImage, returning that result.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Updated Cobolt class to match latest MM code

Alexis' changes to the Cobolt DAL consist of turning the device into a
shutter, renaming the Power property to PowerSetpoint, and changing the
scale from W to mW. I've revised the Cobolt class to reflect these
differences. (The class is presently identical in function to the Coherent
Cube class, but these should not be folded into each other; future
functionality enhancements may make separate files worthwhile.)

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Improved auto-calibration

The auto-calibration can now work off highest-intensity and weighted
average rather than requiring a gaussian fit -- this is helpful in cases
where the beads aren't significant enough to detect conventionally (i.e.
using off-frequencies to stop them from showing up too brightly in
reconstructed data).

Improved some things in the iterative sphere fitter; it works alright
around a 90-degree sweep of beads, but as with the hypersphere fitter, it
works best with a full circle.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Bugfix on stage position importing

Only affected the sliders tab (which may be deprecated soon anyway); the
spinner number model had changed to Doubles instead of Integers, but the
cast was still to Integer.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Removed pixel size component from SPIMCalibrator

The SPIMCalibrator interface is now solely for determining the axis of
rotation. Before long it will likely be de-interfaced in favor of solely
the autocalibrator.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Further improvements to SPIMAutoCalibrator

Removed the min_sigma option for Z (it didn't work very well before, and
isn't possible/sensible with the new X/Y options). Also cleaned up bits
here and there, and added a circle representing the fit to the 3D view if
the axis has been determined.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Modified build scripts to accommodate Jenkins

Jenkins can't run openspim.sh, but still needs to get 3rdpartypublic, the
JDK, and Fiji... I moved those fetch bits into prepare-for-build.sh which
is invoked from build.sh; for most users, there won't be much difference,
since openspim.sh calls build.sh anyway.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Revamped live controls

The live-window mouse controls are now a separate class. This lets me add
some useful functionality and also fixes a bug where, after dragging in
the live window, then moving the stage via the sliders, the stages would
move to their pre-drag positions.

The new controls, however, do not automatically hook -- there is now a
checkbox on the bottom of the first tab to enable them, though they will
warn about the presence of MM's live window hooks. Rotation via the mouse
will not be available until the checkbox is manually clicked.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Long-wait improvements

I was foolishly making use of time(NULL) instead of clock() for
long-waits. As a result, the duration of waiting depended strongly on how
close to a second-barrier your computer clock was.

I've switched the waits to clock(), which should be more precise (time is
in seconds, clock is system-dependent but often in millis). I also made
their messages debug-only (and provided more information in them).

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Fixed copy/pasted error message to be accurate

When the MMCore or MMStudio failed to build, build.sh would say it was the
device adapters failing. Corrected this.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Added warning when PicardStage was built in debug.

If a debug mode PicardStage DLL is being run, a message box will appear
(hopefully) at some point after loading, informing the user that it
shouldn't ever be uploaded to the OpenSPIM update site.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Tightened up stage handle control in DAL

Particularly in the X/Y stage, there were some inconsistent approaches to
initializing and shutting down stage handles -- I've moved these into
their own member functions. Also added a quick 'not null' check on the
normal stage/twister in case of reinitialization.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Upgrade to Apache Ant 1.9.2

See the similarly-titled commit in 3rdpartypublic.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Update build system to MM's new model

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>