Class AcquireIMAQ_

java.lang.Object
  |
  +--AcquireIMAQ_
All Implemented Interfaces:
ij.plugin.PlugIn

public class AcquireIMAQ_
extends java.lang.Object
implements ij.plugin.PlugIn

Combination of Java and Native Windows C code to capture an image with a Hamamatsu Orca 12-bit camera and a National Instruments Image Acquisition board. This plugin could serve as an example of how ImageJ can communicate with C code through JNI, allowing ImageJ to capture images when there is no Java programming library or Twain driver available for a frame grabber.

Author:
Jeffrey Kuhn, The University of Texas at Austin, jkuhn@ccwf.cc.utexas.edu

Field Summary
(package private) static double dExposure
          Length of camera exposure to use.
(package private) static int iHeight
          Height of image to acquire.
(package private) static int iImageNumber
          A unique number is tagged onto the end of the name of each newly acquired image.
(package private) static int iWidth
          Width of image to acquire.
(package private) static java.lang.String strName
          Name to give the newly acquired image
 
Constructor Summary
AcquireIMAQ_()
           
 
Method Summary
(package private) static void ()
          Called when the plugin is loaded to load the C++ library
(package private)  boolean Acquire(int iWidth, int iHeight, short[] aPixels, double[] dParams)
          Java interface to C++ function which grabs images.
 void run(java.lang.String arg)
          Begin acquiring an image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

iWidth

static int iWidth
Width of image to acquire. The maximum size for this camera is 1024. Note that "static" is used to insure that the last number is remembered every time the plugin is called.

iHeight

static int iHeight
Height of image to acquire. The maximum size for this camera is 1024. Note that "static" is used to insure that the last number is remembered every time the plugin is called.

strName

static java.lang.String strName
Name to give the newly acquired image

iImageNumber

static int iImageNumber
A unique number is tagged onto the end of the name of each newly acquired image.

dExposure

static double dExposure
Length of camera exposure to use. (see @see Acquire for an explanation).
Constructor Detail

AcquireIMAQ_

public AcquireIMAQ_()
Method Detail

static void ()
Called when the plugin is loaded to load the C++ library

Acquire

boolean Acquire(int iWidth,
                int iHeight,
                short[] aPixels,
                double[] dParams)
Java interface to C++ function which grabs images.
Parameters:
iWidth - Width of the image to capture
iHeight - Height of the image to capture
aPixels - Array of short value in which to place the pixel values
dParam - Array of image capture parameters passed to and from the C++ Acquire function. The following is a list of parameters:

dParam[0] - Default camera exposure. The value of exposure determines how bright the image is:

for Partial frame exposure, 0 < exposure < 1.0

for Full frame exposure, exposure = 1.0

for Multiple frame exposre, exposure = an integer > 1

Returns:
true if frame capture was successfull, false if a probem occurred or the user canceled the operation.

run

public void run(java.lang.String arg)
Begin acquiring an image.
Specified by:
run in interface ij.plugin.PlugIn