Re: [micro-manager-general] ImageFlipper vs Core Image Processor ImageFlipX and ImageFlipY
Status: Beta
Brought to you by:
nicost
|
From: Chris W. <cwe...@ms...> - 2015-07-30 16:42:20
|
Hi Jonas,
On Thu, Jul 30, 2015 at 1:16 AM, Jonas Camillus Jeppesen <jo...@sd...>
wrote:
> I am looking to flip my live view aroundthe X or Y axis (or both) to
> have the live view agree with the eye pieces and stage movement.
>
> The two solutions I know of is: 1) The ImageFlipper plugin, and 2) the
> Core Image Processor ImageFlipX / ImageFlipY.
>
> Both have advantages and disadvantages: 1) Does everything you ever
> wanted, but you have to manually open the plugin window to apply the
> transformations upon restarts of MM, 2) limited capabilities compared to
> ImageFlipper, but can be auto applied upon startup.
>
> Why haven't the two been merged into one solution incorporating the best
> of both?
>
The short, pithy answer is: "because nobody has wanted to invest the time".
The longer answer is: this is a trickier problem than is immediately
apparent. The general problem is that we have multiple different
"coordinate systems" in a microscope. There's the coordinates the stage
use, the coordinates of the eyepiece (if you have one), the coordinates of
the camera, and potentially other image planes in the optical path (for
example, the coordinates of an SLM or other patterned illumination system).
A "complete" solution requires having well-defined ways to transform
between one or another coordinate system, and this is quite difficult. The
current image transposition systems we have are patch jobs intended to meet
common basic requirements while we wait for the combination of time and
inspiration required to implement a complete solution.
Along those lines, this script will set up the Image Flipper plugin, and
you can configure it to be run when you start µManager (via the Tools menu
-> Options dialog -> Startup Script field). I hope this satisfies your
current needs.
// Ensure we can load the flipper plugin
import java.io.File;
addClassPath(new File(System.getProperty("user.dir") +
"/mmplugins/On-The-Fly_Processors/ImageFlipper.jar").getPath());
import org.micromanager.newimageflipper.NewImageFlippingProcessor;
processor = new NewImageFlippingProcessor();
// Set the camera device this processor should operate on
processor.setCamera("Camera");
// Set the rotation; can be R0, R90, R180, R270
processor.setRotation(NewImageFlippingProcessor.Rotation.R90);
// Set the mirroring; either on (true) or off (false)
processor.setIsMirrored(true);
// Enable the processor for future images
gui.addImageProcessor(processor);
-Chris
|