com.bruxton.sidx
Class ImageGeometry

java.lang.Object
  extended by com.bruxton.sidx.ImageGeometry

public class ImageGeometry
extends java.lang.Object

Responsible for controlling the sensor dimension parameters. Each instance of Camera can own one instance of the class. The user of SIDX should not create the object. It should be obtained by using getImageGeometry function of Camera object.


Method Summary
 void clearROI()
          Reset the ROI selection to the full frame.
 int getPixelDepth()
          Obtain the number of bits output per pixel of image data.
 int getX()
          Obtain the sensor serial length in pixels.
 int getY()
          Obtain the sensor parallel length in pixels.
 boolean isBinningXAvailable(int binning_x)
          Inquire if a X binning setting can be applied on the camera.
 boolean isBinningYAvailable(int binning_y)
          Inquire if a Y binning setting can be applied on the camera.
 void setBinning(int binning_x, int binning_y)
          Set the binning settings.
 void setROI(int x1, int y1, int x2, int y2)
          Set a new ROI.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getX

public int getX()
         throws Exception
Obtain the sensor serial length in pixels. For Spectral Instruments camera, it is the serial register length.

Returns:
the sensor serial length in pixels.
Throws:
Exception

getY

public int getY()
         throws Exception
Obtain the sensor parallel length in pixels. For Spectral Instruments camera, it is the parallel register length.

Returns:
the sensor parallel length in pixels.
Throws:
Exception

getPixelDepth

public int getPixelDepth()
                  throws Exception
Obtain the number of bits output per pixel of image data. Although this number might varies, each pixel of image data will always be returned in an unsigned 16-bit word. This value indicates the number of valid bits within that word.

Returns:
the number of bits output per pixel of image data.
Throws:
Exception

clearROI

public void clearROI()
              throws Exception
Reset the ROI selection to the full frame. For Spectral Instruments camera, the function resets the ROI selection to the serial and parallel register size which may be set as half of the CCD dimension for the multiple ports readout. When working with Spectral Instruments camera, it is recommended that you always specify the ROI using setROI function.

Throws:
Exception

isBinningXAvailable

public boolean isBinningXAvailable(int binning_x)
                            throws Exception
Inquire if a X binning setting can be applied on the camera.

Parameters:
binning_x - the X binning setting that you wish to apply.
Returns:
true if the X binning setting can be applied. Otherwise false.
Throws:
Exception

isBinningYAvailable

public boolean isBinningYAvailable(int binning_y)
                            throws Exception
Inquire if a Y binning setting can be applied on the camera.

Parameters:
binning_y - the Y binning setting that you wish to apply.
Returns:
true if the Y binning setting can be applied. Otherwise false.
Throws:
Exception

setBinning

public void setBinning(int binning_x,
                       int binning_y)
                throws Exception
Set the binning settings.

Parameters:
binning_x - the binning factor for the frame in the x direction.
binning_y - the binning factor for the frame in the y direction.
Throws:
Exception

setROI

public void setROI(int x1,
                   int y1,
                   int x2,
                   int y2)
            throws Exception
Set a new ROI. If the camera can handle multiple ROIs, use the function to specify additional ROIs. If the camera cannot handle multiple ROIs, the function will replace the existing ROI with the new ROI. The ROI dimension is the dimension before binning.

Parameters:
x1 - the x coordinate of the top-left corner of an ROI, starting from 0.
y1 - the y coordinate of the top-left corner of an ROI, starting from 0.
x2 - the x coordinate of the button-right corner of an ROI, starting from 0.
y2 - the y coordinate of the button-right corner of an ROI, starting from 0.
Throws:
Exception