Reworked async output handler

It now queues stack begin/end events, to ensure they don't happen out of
order with the slice writes, and to save us the problem of (very
synchronously) emptying the queue in between each view.

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

In effort to debug the asynchronous writing (or at least gain some insight
into its present state), I added a monitor which graphs the size of the
event/slice queue over time and mentions when it is writing things (sort
of).

So far, I have learned that it writes things pretty quickly. The highest
queue count I saw so far was 5 (out of 228), and this was while I had
another program scouring the hard drive in the background. Prime95 doesn't
even seem to faze it. I may make an effort to slow down or otherwise delay
the writing -- it is still using time which might be best spent during
acquisition (or perhaps not? Perhaps the time it is borrowing all comes
from waits and sleeps on the acquisition thread. It warrants investigation.)

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
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>
Merge branch 'openspim' into async-fix
Improved async monitor implementation

The monitoring process is now a runnable, instantiated by the wrapper (and
not the writer thread). The writing variable is also controlled in the
wrapper (so it doesn't flicker so much).

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Converted abstract base devices into generics

So that the plugin still plays nice if people try to use unexpected
hardware, I've added rudimentary support for most typical MM devices. X/Y
stages will be supported through the GenericXYStage class, but the other
types will be supported through their base classes - Stage, Laser, Camera,
etc.

These classes generally don't have any fancy features -- if the laser
doesn't have a Power property, the power can't be changed. Likewise for
stages and Velocity. Some guesses are given here and there.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Fixed line endings in SPIMSetup

I have no idea how those got entered as DOS/Windows line endings --
Eclipse is configured to create new files as UNIX...

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
More ProgAcq support for the new device manager

snapImage is done through setup.getCamera, laser on/off is done through
setup.getLaser, etc.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Some more fixes for new device manager

Some of the more obscure uses of the core interfaces are hard to spot.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Merge branch 'async-fix' into openspim
Remove anti-drift options

Those stuck around quite a bit longer than they needed to. The interface
is still in place, on the off-chance we find we need a new mode (perhaps
full-3D phase correlation, if the calculation can be made viable).

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Added acquisition options dialog

The more obscure/less used options will be relegated to a dialog
accessible by a button on the acquisition tab. This lets me clean up the
UI by removing lesser-used options from the main window, and also put in
options for debugging that won't bother the users. For example, there is
now a checkbox under that dialog which enables/disables the async output
monitor; most users may not care what the async is presently doing, but if
it's being problematic for someone, they can check on it that way. I
intend to add acquisition profiling to this dialog as well.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Stopped wild deletion of destination directories

Before, the plugin would delete any and all files it could under the
destination directory. In hindsight, this might've caused enormous grief
to someone unprepared, as the message gave no indication this would occur.

To remedy this, I added a warning to the message, and filtered the files
by filename -- the plugin will delete all .ome.tiff in the destination
directory, but nothing else. This may need revision if another output
handler is ever made, unlikely though it may be.

Signed-off-by: Luke Stuyvenberg <stuyvenberg@wisc.edu>
Merge branch 'profiling' into openspim & fix

Conflicts:
	plugins/SPIMAcquisition/src/main/java/spim/progacq/ProgrammaticAcquisitor.java

This commit also implements the new UI options and acq params.