WPOCT Software Developer's Kit (SDK)
SDK For using Wasatch Photonics OCT Spectrometers
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
IWPOCTCamera Class Referenceabstract

#include <IWPOCTCamera.h>

Inheritance diagram for IWPOCTCamera:
Inheritance graph
[legend]
Collaboration diagram for IWPOCTCamera:
Collaboration graph
[legend]

Public Types

enum  ErrorCode {
  NoError = 0 , InitializeLibraryError = 1 , ShutdownLibraryError = 2 , UpdateCameraListError = 3 ,
  GetCameraInfoError = 4 , OpenCameraError = 5 , CloseCameraError = 6 , MemoryAllocationError = 7 ,
  ProcessingError = 8 , ReadParameterError = 9 , SetParameterError = 10 , StartAcquiringError = 11 ,
  StopAcquiringError = 12 , GetBufferError = 13 , BufferCompletedWithZeros = 14 , AbortGetBufferError = 15 ,
  RequeueBufferError = 16 , FlushBufferError = 17 , TimeoutError = 18 , CameraFileError = 19 ,
  DongleNotFound = 20 , NumErrors = 21 , DLLExpired = 22 , NoError = 0 ,
  InitializeLibraryError = 1 , ShutdownLibraryError = 2 , UpdateCameraListError = 3 , GetCameraInfoError = 4 ,
  OpenCameraError = 5 , CloseCameraError = 6 , MemoryAllocationError = 7 , ProcessingError = 8 ,
  ReadParameterError = 9 , SetParameterError = 10 , StartAcquiringError = 11 , StopAcquiringError = 12 ,
  GetBufferError = 13 , BufferCompletedWithZeros = 14 , AbortGetBufferError = 15 , RequeueBufferError = 16 ,
  FlushBufferError = 17 , TimeoutError = 18 , CameraFileError = 19 , DongleNotFound = 20 ,
  NumErrors = 21 , DLLExpired = 22
}
 The following are error codes that are used within the camera. More...
 
enum  CameraType {
  NoCamera = 0 , USB3 = 1 , CameraLink = 2 , NI1433 = 3 ,
  NumCameras = 4 , NoCamera = 0 , USB3 = 1 , CameraLink = 2 ,
  NI1433 = 3 , NumCameras = 4
}
 The following are the camera types that are used in GetOCTCamera and GetCameraType. More...
 
enum  CurrentStates {
  Idle = 0 , LibraryInitialized = 1 , CameraOpened = 2 , ParametersSet = 4 ,
  CameraAcquiring = 8 , Idle = 0 , LibraryInitialized = 1 , CameraOpened = 2 ,
  ParametersSet = 4 , CameraAcquiring = 8
}
 Current states of the camera (more than one can be active) The following are status codes that are used within the camera. More...
 
enum class  ErrorCode {
  NoError = 0 , InitializeLibraryError = 1 , ShutdownLibraryError = 2 , UpdateCameraListError = 3 ,
  GetCameraInfoError = 4 , OpenCameraError = 5 , CloseCameraError = 6 , MemoryAllocationError = 7 ,
  ProcessingError = 8 , ReadParameterError = 9 , SetParameterError = 10 , StartAcquiringError = 11 ,
  StopAcquiringError = 12 , GetBufferError = 13 , BufferCompletedWithZeros = 14 , AbortGetBufferError = 15 ,
  RequeueBufferError = 16 , FlushBufferError = 17 , TimeoutError = 18 , CameraFileError = 19 ,
  DongleNotFound = 20 , NumErrors = 21 , DLLExpired = 22 , NoError = 0 ,
  InitializeLibraryError = 1 , ShutdownLibraryError = 2 , UpdateCameraListError = 3 , GetCameraInfoError = 4 ,
  OpenCameraError = 5 , CloseCameraError = 6 , MemoryAllocationError = 7 , ProcessingError = 8 ,
  ReadParameterError = 9 , SetParameterError = 10 , StartAcquiringError = 11 , StopAcquiringError = 12 ,
  GetBufferError = 13 , BufferCompletedWithZeros = 14 , AbortGetBufferError = 15 , RequeueBufferError = 16 ,
  FlushBufferError = 17 , TimeoutError = 18 , CameraFileError = 19 , DongleNotFound = 20 ,
  NumErrors = 21 , DLLExpired = 22
}
 
enum class  CameraType {
  NoCamera = 0 , USB3 = 1 , CameraLink = 2 , NI1433 = 3 ,
  NumCameras = 4 , NoCamera = 0 , USB3 = 1 , CameraLink = 2 ,
  NI1433 = 3 , NumCameras = 4
}
 
enum class  CurrentStates {
  Idle = 0 , LibraryInitialized = 1 , CameraOpened = 2 , ParametersSet = 4 ,
  CameraAcquiring = 8 , Idle = 0 , LibraryInitialized = 1 , CameraOpened = 2 ,
  ParametersSet = 4 , CameraAcquiring = 8
}
 

Public Member Functions

virtual bool IsInitialized () const =0
 Is the camera library initialized?
 
virtual bool IsOpened () const =0
 Is the camera opened?
 
virtual bool AreParametersSet () const =0
 Are camera parameters set?
 
virtual bool IsAcquiring () const =0
 Is the camera currently acquiring?
 
virtual int GetScanWidth () const =0
 Get the width of a scan (e.g. 2048)
 
virtual int GetScanHeight () const =0
 Get the height of a scan.
 
virtual bool GetScanWidthAndHeight (int *width, int *height) const =0
 Get the width and height of a scan. More...
 
virtual int GetCameraWidth () const =0
 Get the width of the camera in pixels. More...
 
virtual int GetNumCameras () const =0
 Get the number of cameras in system.
 
virtual const char * GetCameraID (int index)=0
 Get the camera ID string. More...
 
virtual int GetNumBuffers () const =0
 Get the number of image buffers.
 
virtual int GetLinesLost () const =0
 Get the number of lines lost in the last frame. More...
 
virtual int GetTriggersMissed () const =0
 Gets the triggers missed because it occurred before scanning for the current trigger finished. More...
 
virtual float GetLinePeriod () const =0
 Gets the time between the start of line scans in microseconds. More...
 
virtual float GetExposureTime () const =0
 Gets the time of the camera in microseconds. More...
 
virtual int GetTriggerMode () const =0
 Get the trigger mode (internal, external with auto exposure, or external with specified exposure). More...
 
virtual int GetCameraType () const =0
 Gets the camera type of the camera object, either CameraLink or e2v OctoPlus USB3 (National Instruments 1433 is not yet implemented).
 
virtual int GetNumBitsInPixel () const =0
 Gets the number of bits used in a pixel (typically 10, 12, or 16). More...
 
virtual int GetNumBytesInPixel () const =0
 Get the size of a padded pixel in bytes (typically 2).
 
virtual int GetAcquisitionTimeout () const =0
 Gets the acquisition timeout in milliseconds. More...
 
virtual int GetResourceIndex () const =0
 Gets the current resource index of the frame grabber (0 or 1). More...
 
virtual const char * GetCameraFileName () const =0
 Gets the name of the camera configuration file (CCF) file being used. More...
 
virtual bool SetScanHeight (int value)=0
 Sets the scan height size but the camera is not changed until SetParameters is called. More...
 
virtual bool SetNumBuffers (int value)=0
 Sets the number of buffers available to the camera for acquisition, but the camera is not changed until SetParameters is called. More...
 
virtual bool SetLinePeriod (float value)=0
 Sets the period between lines in microseconds. More...
 
virtual bool SetExposureTime (float value)=0
 Sets the exposure time in microseconds. More...
 
virtual bool SetTriggerMode (int value)=0
 Sets the trigger mode of the camera. More...
 
virtual bool SetCameraFileName (const char *name)=0
 Sets the name of the camera configuration (CCF) file. More...
 
virtual bool SetAcquisitionTimeout (int value)=0
 Sets the acquisition timeout in milliseconds. More...
 
virtual bool SetResourceIndex (int value)=0
 Sets the active resource index if the frame grabber supports it. More...
 
virtual bool InitializeLibrary ()=0
 Opens the camera library. More...
 
virtual bool ShutDownLibrary ()=0
 Shuts down the camera library. More...
 
virtual bool Open (const char *id)=0
 Opens the camera specified by the id. More...
 
virtual bool Open (int id)=0
 Opens the camera specified by the id. More...
 
virtual bool Close ()=0
 Closes the camera opened with the Open command. More...
 
virtual bool ReadParameter (unsigned int address, unsigned int *value) const =0
 Reads a parameter or register from the camera and returns the value in the value argument. More...
 
virtual bool WriteParameter (unsigned int address, unsigned int value)=0
 Writes a parameter or register to the camera with the value supplied. More...
 
virtual bool SetParameters ()=0
 Sets the height of the camera buffers and the number of buffers based on values entered with SetScanHeight and SetNumBuffers. More...
 
virtual bool SetParameters (int height, int numBuffers)=0
 Sets the height of the camera buffers and the number of buffers that the camera can use. More...
 
virtual bool StartAcquiring ()=0
 Starts the camera acquiring frames of data. More...
 
virtual bool StopAcquiring (bool flushBuffers)=0
 Stops the camera data acquisition. More...
 
virtual bool ResetDevice ()=0
 Resets the camera or frame grabber. More...
 
virtual bool GetBuffer (void **buffer)=0
 Gets a camera buffer and returns a void pointer to the buffer. More...
 
virtual bool GetBuffer2 (unsigned short **buffer)=0
 Gets a camera buffer and returns the pointer to the buffer. More...
 
virtual bool GetBufferCopy (unsigned short *buffer)=0
 Gets a camera buffer and copies it into the buffer supplied. More...
 
virtual bool GetBufferAndIndex (void **buffer, int **index, unsigned long *frameNumber)=0
 Gets a camera buffer and returns a void pointer to the buffer. More...
 
virtual bool GetBufferAndIndex2 (unsigned short **buffer, int **index, unsigned long *frameNumber)=0
 Gets a camera buffer and returns a void pointer to the buffer. More...
 
virtual bool AbortGetBuffer ()=0
 Cancel the GetBuffer call. More...
 
virtual bool RequeueBuffer ()=0
 Requeues the most recent camera buffer obtained so it can be used again. More...
 
virtual bool RequeueBuffer (int *bufferHandle)=0
 Requeues the camera buffer pointed to by the bufferHandle so it can be used again. More...
 
virtual bool FlushBuffers ()=0
 Flushes all camera buffers so they can be used by the camera for acquisition. More...
 
virtual bool AcquireFramesWriteToDisk (const char *baseFilePath, int numFrames, bool keepMemoryAllocated)=0
 Acquire consecutive image acquisitions to memory. More...
 
virtual bool AcquireWriteFramesToMemory (unsigned short **data, int numFrames)=0
 Write consecutive image acquisitions to memory supplied by the application. More...
 
virtual bool AcquireWriteFramesToMemory (unsigned short *data, int numFrames)=0
 Write consecutive image acquisitions to memory supplied by this DLL. More...
 
virtual IWPOCTCamera::ErrorCode GetLastError () const =0
 Gets the result of the most current operation.
 
virtual IWPOCTCamera::CurrentStates GetCurrentState () const =0
 Gets the current status of the camera. More...
 
virtual void Dispose ()
 
virtual bool IsInitialized ()
 
virtual bool IsOpened ()
 
virtual bool AreParametersSet ()
 
virtual bool IsAcquiring ()
 
virtual int GetScanWidth ()
 
virtual int GetScanHeight ()
 
virtual bool GetScanWidthAndHeight (ref int width, ref int height)
 
virtual int GetCameraWidth ()
 
virtual int GetNumCameras ()
 
virtual string GetCameraID (int index)
 
virtual int GetNumBuffers ()
 
virtual int GetLinesLost ()
 
virtual int GetTriggersMissed ()
 
virtual float GetLinePeriod ()
 
virtual float GetExposureTime ()
 
virtual int GetTriggerMode ()
 
virtual int GetCameraType ()
 
virtual int GetNumBitsInPixel ()
 
virtual int GetNumBytesInPixel ()
 
virtual int GetAcquisitionTimeout ()
 
virtual int GetResourceIndex ()
 
virtual string GetCameraFileName ()
 
virtual bool SetScanHeight (int value)
 
virtual bool SetNumBuffers (int value)
 
virtual bool SetLinePeriod (float value)
 
virtual bool SetExposureTime (float value)
 
virtual bool SetTriggerMode (int value)
 
virtual bool SetCameraFileName (string name)
 
virtual bool SetAcquisitionTimeout (int value)
 
virtual bool SetResourceIndex (int value)
 
virtual bool InitializeLibrary ()
 
virtual bool ShutDownLibrary ()
 
virtual bool Open (string id)
 
virtual bool Open (int id)
 
virtual bool Close ()
 
virtual bool ReadParameter (uint address, ref uint value)
 
virtual bool WriteParameter (uint address, uint value)
 
virtual bool SetParameters ()
 
virtual bool SetParameters (int height, int numBuffers)
 
virtual bool StartAcquiring ()
 
virtual bool StopAcquiring (bool flushBuffers)
 
virtual bool GetBuffer (ref global::System.IntPtr buffer)
 
virtual bool GetBuffer2 (ref global::System.IntPtr buffer)
 
unsafe bool GetBufferCopy (ushort[] buffer)
 
virtual bool GetBufferAndIndex (ref global::System.IntPtr buffer, ref global::System.IntPtr index, ref ulong frameNumber)
 
virtual bool GetBufferAndIndex2 (ref global::System.IntPtr buffer, ref global::System.IntPtr index, ref ulong frameNumber)
 
virtual bool AbortGetBuffer ()
 
virtual bool RequeueBuffer ()
 
virtual bool RequeueBuffer (ref int bufferHandle)
 
virtual bool FlushBuffers ()
 
virtual bool ResetDevice ()
 
virtual bool AcquireFramesWriteToDisk (string baseFilePath, int numFrames, bool keepMemoryAllocated)
 
unsafe bool AcquireWriteFramesToMemory (ref global::System.IntPtr data, int numFrames)
 
unsafe bool AcquireWriteFramesToMemory (ushort[] data, int numFrames)
 
virtual IWPOCTCamera.ErrorCode GetLastError ()
 
virtual IWPOCTCamera.CurrentStates GetCurrentState ()
 

Static Public Member Functions

static IWPOCTCamera GetOCTCamera (IWPOCTCamera.CameraType cameraType)
 
static IWPOCTCamera.ErrorCode GetLastAttemptError ()
 
static bool DestroyOCTCamera (IWPOCTCamera camera)
 
static bool DestroyOCTCamera ()
 

Protected Attributes

bool swigCMemOwn
 

Detailed Description

Order of Operations (Single-threaded)
Initialize Library
  Get Num Cameras
  Get Camera ID
  Open Camera
    Set Parameters
    Start Acquiring
      Get Buffer <--------.
      Use buffer          |
      Requeue Buffer      |
             |            |
             '------------'
    Stop Acquiring
  Close Camera
Shutdown Library
Order of Operations (Multi-threaded)
Initialize Library
  Get Num Cameras
  Get Camera ID
  Open Camera
    Set Parameters
    Start Acquiring
      Get Buffer and Index <---------.  
      Use buffer                     |
      Requeue Buffer(bufferHandle)   |
             |                       |
             '-----------------------'
    Stop Acquiring
  Close Camera
Shutdown Library
Get Commands

The Get commands return some piece of information about the camera object that called it. With few exceptions, the object’s state does not change when calling one of these commands. Some of the calls are geared toward certain cameras.

Set Commands

The Set commands change the state of the camera object that the command acts on. These commands are used to set the number of buffers, the scan height, etc. Certain calls only work on certain cameras.

Series Capture Commands

The series capture commands capture consecutive frames to memory, and then optionally store the frames on disk. This allows for very high speed acquisitions, but is limited by the amount of physical memory. The memory used can be supplied by the application or the WPOCT Acquisition DLL. Any writing to disk occurs after all the acquisition is complete. The camera should not already be acquiring data when any of these commands are invoked.

Status Commands

The status APIs returns the current status of the camera. They can be used to check that the camera is working properly.

Member Enumeration Documentation

◆ CameraType

The following are the camera types that are used in GetOCTCamera and GetCameraType.

Note that the National Instruments card is not yet implemented.

◆ CurrentStates [1/2]

Current states of the camera (more than one can be active) The following are status codes that are used within the camera.

They are part of the CurrentStates enum, which can be employed by the application. One or more codes will be returned when calling GetCurrentStatus() (OR'd together).

Enumerator
Idle 

Idle means the library is not initialized.

◆ CurrentStates [2/2]

Enumerator
Idle 

Idle means the library is not initialized.

◆ ErrorCode

The following are error codes that are used within the camera.

They are part of the ErrorCodes enum, which can be employed by the user. One code will be returned when calling GetLastError().

Member Function Documentation

◆ AbortGetBuffer()

virtual bool IWPOCTCamera::AbortGetBuffer ( )
pure virtual

Cancel the GetBuffer call.

Returns
true on success

Implemented in USB3Camera, and CameraLinkCamera.

◆ AcquireFramesWriteToDisk()

virtual bool IWPOCTCamera::AcquireFramesWriteToDisk ( const char *  baseFilePath,
int  numFrames,
bool  keepMemoryAllocated 
)
pure virtual

Acquire consecutive image acquisitions to memory.

When finished, write the frames to disk.

Parameters
baseFilePath[in]pointer to a the path and base name of the files that are to be written.
numFrames[in]the number of camera buffers to be written.
keepMemoryAllocated[in]a flag that determines if the memory allocated for the acquisitions will be kept after the files are written. Set to true if several of these captures are to be scheduled.
Returns
true on success

Implemented in WPCamera.

◆ AcquireWriteFramesToMemory() [1/2]

virtual bool IWPOCTCamera::AcquireWriteFramesToMemory ( unsigned short **  data,
int  numFrames 
)
pure virtual

Write consecutive image acquisitions to memory supplied by the application.

Parameters
data[in]pointer which will point to the start of the data after the acquisitions have finished.
numFrames[in]the number of camera buffers to be written.
keepMemoryAllocated[in]a flag that determines if the memory allocated for the acquisitions will be kept after the files are written. Set to true if several of these captures are to be scheduled.
Returns
true on success

Implemented in WPCamera.

◆ AcquireWriteFramesToMemory() [2/2]

virtual bool IWPOCTCamera::AcquireWriteFramesToMemory ( unsigned short *  data,
int  numFrames 
)
pure virtual

Write consecutive image acquisitions to memory supplied by this DLL.

Parameters
data[out]pointer to a pointer which will point to the start of the data after the acquisitions have finished.
numFrames[in]the number of camera buffers to be written.
Returns
true on success

Implemented in WPCamera.

◆ Close()

virtual bool IWPOCTCamera::Close ( )
pure virtual

Closes the camera opened with the Open command.

This call should be made after the StopAcquiring API is called.

Returns
true if successful

Implemented in USB3Camera, and CameraLinkCamera.

◆ FlushBuffers()

virtual bool IWPOCTCamera::FlushBuffers ( )
pure virtual

Flushes all camera buffers so they can be used by the camera for acquisition.

This call is only needed by USB cameras when acquiring is stopped. Alternatively, the flushBuffer flag can be set to true in StopAcquiring to get the same effect.

Often called after StopAcquiring is called.

Returns
true on success

Implemented in USB3Camera, and CameraLinkCamera.

◆ GetAcquisitionTimeout()

virtual int IWPOCTCamera::GetAcquisitionTimeout ( ) const
pure virtual

Gets the acquisition timeout in milliseconds.

A value of 0 or less is infinite timeout.

Implemented in WPCamera.

◆ GetBuffer()

virtual bool IWPOCTCamera::GetBuffer ( void **  buffer)
pure virtual

Gets a camera buffer and returns a void pointer to the buffer.

This call will wait until a buffer is filled before returning. If the timeout period is reached before the buffer is filled, the call returns with a false return value.

Parameters
buffer[out]pointer to a void pointer that holds the location of the start of the camera buffer.
Returns
true on success

Implemented in USB3Camera, and CameraLinkCamera.

◆ GetBuffer2()

virtual bool IWPOCTCamera::GetBuffer2 ( unsigned short **  buffer)
pure virtual

Gets a camera buffer and returns the pointer to the buffer.

This call will wait until a buffer is filled before returning. If the timeout period is reached before the buffer is filled, the call returns with a false return value.

Parameters
buffer[out]pointer to an unsigned short pointer that holds the location of the start of the camera buffer.
Note
Use this if the app is single-threaded.
Returns
true on success

Implemented in USB3Camera, and CameraLinkCamera.

◆ GetBufferAndIndex()

virtual bool IWPOCTCamera::GetBufferAndIndex ( void **  buffer,
int **  index,
unsigned long *  frameNumber 
)
pure virtual

Gets a camera buffer and returns a void pointer to the buffer.

The index associated with the buffer is also returned. This index is used with USB cameras to requeue the buffer specified. The frameNumber is a number that counts up as successive frames are returned. It can be used to assure the frames are put in the correct order. GetBufferAndIndex will wait until a buffer is filled before returning. If the timeout period is reached before the buffer is filled, the call returns with a false return value.

The frame number allows correct reassembling of frames as it counts up from 0.

Note
Use this when multi-threading.
Parameters
buffer[out]pointer to a void pointer that holds the location of the start of the camera buffer.
index[out]pointer to an int pointer that holds the index of the camera buffer.
frameNumber[out]pointer to the frame number returned. This value counts up from zero when acquistion is started.
Returns
true on success

Implemented in USB3Camera, and CameraLinkCamera.

◆ GetBufferAndIndex2()

virtual bool IWPOCTCamera::GetBufferAndIndex2 ( unsigned short **  buffer,
int **  index,
unsigned long *  frameNumber 
)
pure virtual

Gets a camera buffer and returns a void pointer to the buffer.

The index associated with the buffer is also returned. This index is used with USB cameras to requeue the buffer specified. The frameNumber is a number that counts up as successive frames are returned. It can be used to assure the frames are put in the correct order. GetBufferAndIndex will wait until a buffer is filled before returning. If the timeout period is reached before the buffer is filled, the call returns with a false return value.

Parameters
buffer[out]pointer to an unsigned short pointer that holds the location of the start of the camera buffer.
index[out]pointer to an int pointer that holds the index of the camera buffer.
frameNumber[out]pointer to the frame number returned. This value counts up from zero when acquisition is started.
Returns
true on success

Implemented in USB3Camera, and CameraLinkCamera.

◆ GetBufferCopy()

virtual bool IWPOCTCamera::GetBufferCopy ( unsigned short *  buffer)
pure virtual

Gets a camera buffer and copies it into the buffer supplied.

This call will wait until a buffer is filled before returning. If the timeout period is reached before the buffer is filled, the call returns with a false return value. Note that the RequeueBuffer API does not need to be called after calling this API.

Parameters
buffer[out]void pointer to a buffer that will have the camera buffer data copied to it.
Returns
true on success

Implemented in USB3Camera, and CameraLinkCamera.

◆ GetCameraFileName()

virtual const char* IWPOCTCamera::GetCameraFileName ( ) const
pure virtual

Gets the name of the camera configuration file (CCF) file being used.


This file is only used by CameraLink frame grabbers.

Implemented in WPCamera.

◆ GetCameraID()

virtual const char* IWPOCTCamera::GetCameraID ( int  index)
pure virtual

Get the camera ID string.

Parameters
index[in]the camera or frame grabber index to get the name of.
Since the indices are zero-based, this number should be less than the value obtained with GetNumCameras().
Returns
an array of characters that represents the name of the camera or frame grabber

Implemented in USB3Camera, and CameraLinkCamera.

◆ GetCameraWidth()

virtual int IWPOCTCamera::GetCameraWidth ( ) const
pure virtual

Get the width of the camera in pixels.


See also
GetScanWidth()

Implemented in USB3Camera, and CameraLinkCamera.

◆ GetCurrentState()

virtual IWPOCTCamera::CurrentStates IWPOCTCamera::GetCurrentState ( ) const
pure virtual

Gets the current status of the camera.

Note
More than one can be active at the same time.

Implemented in WPCamera.

◆ GetExposureTime()

virtual float IWPOCTCamera::GetExposureTime ( ) const
pure virtual

Gets the time of the camera in microseconds.


Note
This call is only valid for USB3 cameras

Implemented in USB3Camera, and CameraLinkCamera.

◆ GetLinePeriod()

virtual float IWPOCTCamera::GetLinePeriod ( ) const
pure virtual

Gets the time between the start of line scans in microseconds.


Note
This call is only valid for USB3 cameras using internal triggering.
Returns
line period in microseconds

Implemented in USB3Camera, and CameraLinkCamera.

◆ GetLinesLost()

virtual int IWPOCTCamera::GetLinesLost ( ) const
pure virtual

Get the number of lines lost in the last frame.

Note
This call is only valid for USB3 cameras

Implemented in WPCamera.

◆ GetNumBitsInPixel()

virtual int IWPOCTCamera::GetNumBitsInPixel ( ) const
pure virtual

Gets the number of bits used in a pixel (typically 10, 12, or 16).

To get the actual number of bits per pixel, this API should be called after the camera starts acquiring.

Implemented in USB3Camera, and CameraLinkCamera.

◆ GetResourceIndex()

virtual int IWPOCTCamera::GetResourceIndex ( ) const
pure virtual

Gets the current resource index of the frame grabber (0 or 1).

This is used by frame grabbers that support more than one camera, such as the MX4. For other cards and for USB cameras, this call returns 0.

Implemented in WPCamera.

◆ GetScanWidthAndHeight()

virtual bool IWPOCTCamera::GetScanWidthAndHeight ( int *  width,
int *  height 
) const
pure virtual

Get the width and height of a scan.

Parameters
width[out]pointer to output bucket
height[out]pointer to output bucket
Returns
true if both params set.

Implemented in WPCamera.

◆ GetTriggerMode()

virtual int IWPOCTCamera::GetTriggerMode ( ) const
pure virtual

Get the trigger mode (internal, external with auto exposure, or external with specified exposure).

For USB cameras, this a value between 0 and 7.

Note
This call is only valid for USB3 cameras

Implemented in USB3Camera, and CameraLinkCamera.

◆ GetTriggersMissed()

virtual int IWPOCTCamera::GetTriggersMissed ( ) const
pure virtual

Gets the triggers missed because it occurred before scanning for the current trigger finished.


Note
This call is only valid for USB3 cameras

Implemented in WPCamera.

◆ InitializeLibrary()

virtual bool IWPOCTCamera::InitializeLibrary ( )
pure virtual

Opens the camera library.

This is the first step that must be taken to acquire camera line scan data.

Returns
true if successful

Implemented in USB3Camera, and CameraLinkCamera.

◆ Open() [1/2]

virtual bool IWPOCTCamera::Open ( const char *  id)
pure virtual

Opens the camera specified by the id.

The camera id is obtained by a call to GetCameraID.

Parameters
id[in]array of characters that contains the name of the camera or frame grabber (uses the camera's S/N or server name)
Returns
true if successful

Implemented in USB3Camera, and CameraLinkCamera.

◆ Open() [2/2]

virtual bool IWPOCTCamera::Open ( int  id)
pure virtual

Opens the camera specified by the id.

The camera id can only be zero in single camera setups. It can be 0 or 1 in dual camera setups.

Note
This call is only valid for USB cameras.
Parameters
id[in]int with a value of 0 or 1.
Returns
true if successful

Implemented in USB3Camera, and CameraLinkCamera.

◆ ReadParameter()

virtual bool IWPOCTCamera::ReadParameter ( unsigned int  address,
unsigned int *  value 
) const
pure virtual

Reads a parameter or register from the camera and returns the value in the value argument.


Note
This call is only valid for USB cameras.
Parameters
address[in]the location where the parameter is stored.
value[out]pointer to int that contains the value of the register once the call returns.
See also
manual "UMA_OCTOPLUS-USB3_Mono_RevB5.pdf" for more information.
Returns
true if successful

Implemented in USB3Camera, and CameraLinkCamera.

◆ RequeueBuffer() [1/2]

virtual bool IWPOCTCamera::RequeueBuffer ( )
pure virtual

Requeues the most recent camera buffer obtained so it can be used again.

This call is used for USB cameras where only a single thread is used to acquire camera data. CameraLink frame grabbers do not need to call this API. Used with GetBuffer().

Returns
true on success

Implemented in USB3Camera, and CameraLinkCamera.

◆ RequeueBuffer() [2/2]

virtual bool IWPOCTCamera::RequeueBuffer ( int *  bufferHandle)
pure virtual

Requeues the camera buffer pointed to by the bufferHandle so it can be used again.

This call is used for USB cameras where multi-threading is used to acquire camera data. CameraLink frame grabbers do not need to call this API. Used with GetBufferAndIndex().

Parameters
bufferHandle[in]the buffer handle obtained in the GetBufferAndIndex call.
Returns
true on success

Implemented in USB3Camera, and CameraLinkCamera.

◆ ResetDevice()

virtual bool IWPOCTCamera::ResetDevice ( )
pure virtual

Resets the camera or frame grabber.

Returns
true on success

Implemented in USB3Camera, and CameraLinkCamera.

◆ SetAcquisitionTimeout()

virtual bool IWPOCTCamera::SetAcquisitionTimeout ( int  value)
pure virtual

Sets the acquisition timeout in milliseconds.

The default timeout is 2000 milliseconds. A value of 0 or less signifies no timeout.

Parameters
value[in]the timeout value in milliseconds.
Returns
true if successful

Implemented in WPCamera.

◆ SetCameraFileName()

virtual bool IWPOCTCamera::SetCameraFileName ( const char *  name)
pure virtual

Sets the name of the camera configuration (CCF) file.

This is only used by CameraLink frame grabbers to set the camera width and scan height, along with many other camera parameters.

Parameters
name[in]the fully qualified name of the camera file.
Returns
true if successful

Implemented in WPCamera, and CameraLinkCamera.

◆ SetExposureTime()

virtual bool IWPOCTCamera::SetExposureTime ( float  value)
pure virtual

Sets the exposure time in microseconds.


Note
This call is only valid for USB3 cameras.
Parameters
value[in]the exposure time in microseconds.
Returns
true if successful

Implemented in USB3Camera, and CameraLinkCamera.

◆ SetLinePeriod()

virtual bool IWPOCTCamera::SetLinePeriod ( float  value)
pure virtual

Sets the period between lines in microseconds.


Note
This call is only valid for USB3 cameras where internal triggering is used, which is not common.
Parameters
value[in]the time between line triggers in microseconds
Returns
true if successful

Implemented in USB3Camera, and CameraLinkCamera.

◆ SetNumBuffers()

virtual bool IWPOCTCamera::SetNumBuffers ( int  value)
pure virtual

Sets the number of buffers available to the camera for acquisition, but the camera is not changed until SetParameters is called.

You should assume the memory used is in RAM, not on the camera or frame grabber (although some buffers may reside on the camera or frame buffer).

Parameters
value[in]the number of buffers (typical values between 10 and 100)
Returns
true if successful

Implemented in WPCamera.

◆ SetParameters() [1/2]

virtual bool IWPOCTCamera::SetParameters ( )
pure virtual

Sets the height of the camera buffers and the number of buffers based on values entered with SetScanHeight and SetNumBuffers.

Returns
true if successful

Implemented in USB3Camera, and CameraLinkCamera.

◆ SetParameters() [2/2]

virtual bool IWPOCTCamera::SetParameters ( int  height,
int  numBuffers 
)
pure virtual

Sets the height of the camera buffers and the number of buffers that the camera can use.


Parameters
height[in]the height (number of line scans) of a camera buffer.
numBuffers[in]the number of buffers available to the camera.
Minimum value could be 2 but in reality should be between 10 and
  1. While buffers are being processed by the application they are unavailable to the camera, so the number of buffers must be large enough to ensure the camera does not run out of buffers.
Returns
true if successful

Implemented in USB3Camera, and CameraLinkCamera.

◆ SetResourceIndex()

virtual bool IWPOCTCamera::SetResourceIndex ( int  value)
pure virtual

Sets the active resource index if the frame grabber supports it.

The Xtium-CL_MX4 card supports two cameras.

Parameters
value[in]the resource index, 0 or 1
Returns
true if successful

Implemented in WPCamera.

◆ SetScanHeight()

virtual bool IWPOCTCamera::SetScanHeight ( int  value)
pure virtual

Sets the scan height size but the camera is not changed until SetParameters is called.

Parameters
value[in]scan height (should be a value between 2 and 65535)
Returns
true if successful

Implemented in WPCamera, and USB3Camera.

◆ SetTriggerMode()

virtual bool IWPOCTCamera::SetTriggerMode ( int  value)
pure virtual

Sets the trigger mode of the camera.


Note
This call is only valid for USB3 cameras.
See also
manual "UMA_OCTOPLUS-USB3_Mono_RevB5.pdf" for more information.
Parameters
value[in]the trigger mode, a value between 0 and 7.
Returns
true if successful

Implemented in USB3Camera, and CameraLinkCamera.

◆ ShutDownLibrary()

virtual bool IWPOCTCamera::ShutDownLibrary ( )
pure virtual

Shuts down the camera library.

This should be the last step before deleting the camera object.

Returns
true if successful

Implemented in USB3Camera, and CameraLinkCamera.

◆ StartAcquiring()

virtual bool IWPOCTCamera::StartAcquiring ( )
pure virtual

Starts the camera acquiring frames of data.

Returns
true if successful

Implemented in USB3Camera, and CameraLinkCamera.

◆ StopAcquiring()

virtual bool IWPOCTCamera::StopAcquiring ( bool  flushBuffers)
pure virtual

Stops the camera data acquisition.

Parameters
flushBuffers[in]flag on whether to flush buffers after acquiring has stopped. This flag is only used by OctoPlus USB3 cameras.

Implemented in USB3Camera, and CameraLinkCamera.

◆ WriteParameter()

virtual bool IWPOCTCamera::WriteParameter ( unsigned int  address,
unsigned int  value 
)
pure virtual

Writes a parameter or register to the camera with the value supplied.


Note
This call is only valid for USB cameras.
Parameters
address[in]the location where the parameter is stored.
value[in]int that contains the value of the register to be written.
See also
manual "UMA_OCTOPLUS-USB3_Mono_RevB5.pdf" for more information.
Returns
true if successful

Implemented in USB3Camera, and CameraLinkCamera.


The documentation for this class was generated from the following files: