BitFlow.NET
Source code documentation of the BitFlow .NET interface.
|
Abstract base class of the Buffer Interface acquisition library. More...
Public Member Functions | |
void | Open (uint boardNumber) |
Opens a board for access. This method must be called before any other method. The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2. More... | |
void | Open (uint boardNumber, OpenOptions Options) |
Opens a board for access with the given Options The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2. More... | |
void | Open (uint boardNumber, string camFileName) |
Opens a board for access and loads the given camera file, bypassing the camera file displayed in SysReg. The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2. More... | |
void | Open (uint boardNumber, string camFileName, OpenOptions Options) |
Opens a board for access and loads the given camera file, bypassing the camera file displayed in SysReg. The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2. More... | |
void | OpenSWConnector (uint Switch, uint Connector) |
Opens a board with the given switch value and connector number for access. This function must return successfully before any other BI functions are called. More... | |
void | OpenSWConnector (uint Switch, uint Connector, OpenOptions Options) |
Opens a board with the given switch value and connector number for access. This function must return successfully before any other BI functions are called. More... | |
void | Close () |
Closes the board and frees all associated resources. More... | |
IntPtr | GetBoardHandle () |
Returns the board handle. More... | |
uint | GetBoardInfo (InquireParams brdInqVariable) |
Returns information about the board. More... | |
bool | IsBoardOpen () |
Returns if the board is open or not. More... | |
uint | GetBoardNumber () |
Returns the board number of the opened board. Only valid if opened by board number. More... | |
uint | GetBoardSwitch () |
Returns the board switch of the opened board. Only valid if opened by switch and connector. More... | |
uint | GetBoardConnector () |
Returns the board connector of the opened board. Only valid if opened by switch and connector. More... | |
void | GetBoardSWConnector (out uint Switch, out uint Connector) |
Returns the board switch and connector of the opened board. Only valid if opened by switch and connector. More... | |
uint | GetMajorVersion () |
Returns the major version of the BufferAcquisition library. More... | |
uint | GetMinorVersion () |
Returns the minor version of the BufferAcquisition library. More... | |
uint | EnumerateCameraModes (out String[] modes, out String[] descriptions) |
Retrieve a list of modes supported by the current camera file, returning the number of modes determined. R64 and older board models to not support multi-mode camera files, and no modes will be returned for that case. More... | |
void | Setup (uint numberOfBuffers) |
Sets up the board for sequence or circular acquisition by allocating buffer memory and setting registers on the board based on the attached camera file at the time Setup is called. More... | |
void | Setup (uint numberOfBuffers, uint alignment) |
Sets up the board for sequence or circular acquisition by allocating buffer memory and setting registers on the board based on the attached camera file at the time Setup is called. When allocating the buffer memory, each buffer will be aligned by the specified alignment boundary, specified by the alignment parameter. More... | |
void | Setup (List< byte[]> bufferPtrList, uint numberOfBuffers) |
Sets up the board for sequence or circular acquisition with buffer memory allocated by the user. The user passes in a list of byte arrays into the method. The method sets registers on the board based on the attached camera file at the time Setup is called. More... | |
void | Setup (List< IntPtr > bufferPtrList, uint numberOfBuffers) |
Sets up the board for sequence or circular acquisition with buffer memory allocated by the user. The user then passes in a list of buffer pointers into the method. The method sets registers on the board based on the attached camera file at the time Setup is called. More... | |
void | Cleanup () |
Shuts down current acquisition as needed, kills all internal threads, and releases all resources allocated by Setup. The Setup method should be called before this method, if Cleanup is called before Setup, Cleanup returns immediately, without doing anything. Cleanup also gets called from the desctructor so when the sequence or circular object is destroyed and cleanup has not been called, as soon as the garbage collector cleans up the object, the Setup resources will be freed. More... | |
bool | IsBoardSetup () |
Gets a value indicating the setup or not setup status of the acquisition engine on the board. If the acquisition engine on the board is setup, the Setup method has been called and the board is ready to acquire images. More... | |
void | SetSetupOptions (SetupOptions options) |
Sets the setup options for the acquisition engine on the board. This method should be called before the Setup method is called. If this method is not called before the Setup method, the default option will be used. Once the setup option is set, the board will continue to use that option until it is changed, or a new sequence or circular object is instantiated. When a sequence or circular object is instantiated, the setup option is set to Default. Options may be ORed together. For instance, More... | |
void | SetAcqFrameSize (uint xSize, uint ySize) |
Sets the size of the acuqired frame. The behaviour of this function depends somewhat on the camera configuration file being used. With some configurations it is not possible to modify the frame size. With others it is only possible to modify the image height. With most cameras it is possible to modify both the width and height. It is not possible to modify the acquisition size to be bigger than the sensor. However, with line scan cameras it is possible to set ySize to almost any number because on these cameras the frame height is arbitrary. This function must be called before acquisition has been setup using one of the setup methods. More... | |
void | SetAcqROI (uint XOffset, uint YOffset, uint xSize, uint ySize) |
Set the Region Of Interest (ROI) of the acquired frame. The behaviour of this function depends somewhat on the camera configuration file being used. With some configurations it is not possible to modify the frame size. With others it is only possible to modify the image height. With most cameras it is possible to modify both the width and height. It is not possible to modify the acquisition size to be bigger than the sensor. However, with line scan cameras it is possible to set ySize to almost any number because on these cameras the frame height is arbitrary. Similar restrictions apply to the XOffset as do the xSize . This function must be called before acquisition has been setup using one of the setup methods. More... | |
void | SetGPOut (uint GP0ut, uint Val) |
Sets the level of a General Purpose Output More... | |
uint | GetGPIn (uint GPIn) |
Gets the level of a General Purpose Input More... | |
SetupOptions | GetSetupOptions () |
Gets a value indicating the setup options state. The returned value can be an ORed value of several options. More... | |
void | StartAcquisition (AcqControlOptions options) |
Starts acquisition from the acquisition engine on the board. The board will begin acquiring images from the attached camera. More... | |
void | StopAcquisition (AcqControlOptions options) |
Instructs the acquisition engine to stop acquiring images after the current image being acquired is done. More... | |
void | AbortAcquisition (AcqControlOptions options) |
Instructs the acquisition engine to abort acquisition of images immediately, and does not wait for the current frame to be acquired. More... | |
void | PauseAcquisition (AcqControlOptions options) |
Tells the acquisition engine to pause acqusition after the current frame has been acquired. When ResumeAcquisition is called, acquisition of images will continue where the pause left off. After a pause is called, only calls to StopAcquisition, AbortAcquisition or ResumeAcquisition are valid. A call to StartAcquisition or another call to PauseAcquisition will throw a InvalidOperationException exception. More... | |
void | ResumeAcquisition (AcqControlOptions options) |
Resumes acquisition after a pause. If acquisition was paused on buffer number eight, when resume is called, acquisition will begin in buffer nine. ResumeAcquisition can only be called after a pause, in all other cases the System.InvalidOperationException will be thrown. More... | |
void | SetTimeout (uint timeoutValue) |
Sets the timeout value for operations within the Buffer interface. These operations include, but are not limited to, waiting for frames, waiting for acquisition to start or abort, and waiting for active regions within a frame. If this method is not called the timeout value used will come from the attached camera file. For this timeout value to be active you have to call this method after Setup. More... | |
virtual SeqDoneReturns | WaitForSequenceDone (uint timeout) |
virtual void | SetSeqSettings (uint startFrame, uint numberOfFrames) |
virtual uint | GetCurrentFrameAcquired () |
virtual BufferInfo | GetBufferInfo (uint bufferNumber) |
virtual void | ClearBufferInfo () |
IntPtr | GetBufferPointer (uint bufferNumber) |
Gets a pointer to the buffer specified by the bufferNumber parameter. The pointer returned by this method is a pointer to unmanaged memory allocated by the wrapped buffer interface. More... | |
byte[] | GetBufferData (uint bufferNumber) |
Gets the image data from the buffer specified by the bufferNumber parameter. The byte array that is returned from this method is a copy of the unmanaged memory buffer that has been marshaled into managed memory. So, if the data in the returned byte array is modified, the modification only exists in managed memory. The underlying unmanaged memory will not be modified. If a call to this method was made for each buffer allocated into seperate locations and the Cleanup and/or Close methods were called, the byte array returned by this method will still be valid. More... | |
Bitmap | GetBufferBitmap (uint bufferNumber) |
Gets a bitmap from the buffer specified by the bufferNumber parameter. Unlike the GetBufferData method, the Bitmap returned from this method is created from the unmanaged memory allocated by the underlying wrapped code. What this means is this method can not be called after calling Cleanup and/or Close. When Cleanup is called the underlying unmanaged memory is de-allocated and the Bitmap can no longer be created. Any modifications to the Bitmap also modifiy the underlying unmanaged memory. More... | |
uint | GetNumberOfBuffers () |
Gets the number of buffers that have been allocated for buffered acquisition. This number is passed into the buffer interface from the Setup method. If this method is called before Setup, the number of buffers returned will be zero. More... | |
void | ClearBuffers () |
Clears the buffers's contents by writing zeros to all buffers. Setup must be called before calling this method. More... | |
virtual void | SetOverwriteMethod (OverwriteMethod overwriteMethod) |
virtual uint | GetBufferQueueSize () |
virtual uint | SetBufferStatus (uint bufferNumber, BufferStatus status) |
virtual CirBufferStatus | GetBufferStatus (uint bufferNumber) |
WaitFrameDoneReturns | WaitForFrameDone (uint timeout) |
WaitFrameDoneReturns | WaitForNextFrame (uint timeout) |
WaitFrameDoneReturns | WaitForFrameDone (uint timeout, ref BufferInfo bufInfo) |
WaitFrameDoneReturns | WaitForNextFrame (uint timeout, out BufferInfo bufInfo) |
This method will wait until an image has been completly acquired into memory, and the return. The method will return immediately if an image has already been acquired into memory. More... | |
bool | GetAcqStartFlag () |
Gets the status of the the start acquisition command flag. More... | |
bool | GetAcqStopFlag () |
Gets the status of the the stop acquisition command flag. More... | |
bool | GetAcqAbortFlag () |
Gets the status of the the abort acquisition command flag. More... | |
bool | GetAcqPauseFlag () |
Gets the status of the the pause acquisition command flag. More... | |
uint | GetNumberOfFramesAcquired () |
Gets the number of frames that have been captured the moment the method is called. More... | |
uint | GetNumberOfFramesOverwritten () |
Gets the number of frames that have been overwritten by another frame. This is different from overwriting frames in the ignore mode for circular acquisition. These are frames that are overwritten because the internal worker thread has been held off long enough so that in sequence capture, the internal stop is issued beyond the last buffer in the sequence or in circular acquisition, the number of buffers on internal queue is greater than the number of buffers that have been allocated. More... | |
uint | WaitForError () |
Waits for an error to occur. Idealy, this method should be called in a seperate thread, where it will efficiently wait for an error to occur. If an error occurs, this method will return and appropriate action can be taken. For more information on the error that occured see the GetErrorCode method. More... | |
uint | GetErrorCode () |
Gets any error codes from the error stack. A zero is returned when no errors are on the error stack. The method can be called multiple times until zero is returned to remove all errors from the error stack. The error code returned from this method can then be used as a parameter for the GetErrorText and ShowErrorDialog methods. More... | |
string | GetErrorText (uint errorCode) |
Gets a description of the error that is passed in through the the errorCode parameter. See the GetErrorCode method on retrieving the error code from the error stack. More... | |
uint | ShowErrorDialog (uint errorCode) |
Displays a dialog with a description of the error of the error code passed in by the errorCode parameter. See the GetErrorCode method on retrieving the error code from the error stack. More... | |
void | SetTriggerMode (TriggerModes triggerMode, TriggerPolarity triggerPolarity) |
Sets the trigger mode for the acquisition engine. More... | |
TriggerModes | GetTriggerMode () |
Gets the trigger mode being used by the board. More... | |
TriggerPolarity | GetTriggerPolarity () |
Gets the trigger polarity being used by the board. More... | |
void | IssueSoftwareTrigger () |
Issues a software trigger to the board. More... | |
void | SetExposureControl (double ExposurePeriod, double LineFramePeriod, NTGTrigModes TriggerMode, TriggerPolarity AssertionPolarity, NTGOutputSignal OutputSignal) |
Programs the New Timing Generator (NTG), used to create waveforms to control the line/frame rate and exposure time of cameras. More... | |
void | GetExposureControl (out double ExposurePeriod, out double LineFramePeriod, out NTGTrigModes TriggerMode, out TriggerPolarity AssertionPolarity, out NTGOutputSignal OutputSignal) |
Retrieve the current configuration of the New Timing Generator (NTG), which is used to create waveforms to control the line/frame rate and exposure time of cameras. More... | |
void | SetWriteBufferOptions (WriteOptions options) |
Sets the different write options when writing images to disk. The write options must be set before calling the WriteBuffer and WriteBuffers methods. If this method is not called before calling the WriteBuffer and WriteBuffers methods, the WriteOptions.Default option will be used. Once the write option is set, it will remain at that value until it is set to something else. All options can be or'ed together. For instance, the following is setting options for packing 32-bit RGB to 24-bit, swapping RGB to BGR, flipping the image and overwriting existing files. More... | |
void | WriteBuffer (String fileName, uint bufferNumber) |
Writes one buffer to a file on disk in the BMP, TIFF or RAW file format. More... | |
void | WriteBuffers (String fileName, uint startBufferNumber, uint numBuffers) |
Writes multiple buffers to a file on disk in the BMP, TIFF, RAW or AVI file formats. More... | |
void | ReadImageFiles (String FileName, uint startBufferNumber, uint numBuffers) |
Reads image files from disk into memory, that were saved with the WriteBuffer and WriteBuffers methods. More... | |
void | LoadCameraFile (string cameraFileName) |
Loads the specified camera file bypassing the camera file displayed in SysReg. After loading the camera file, Setup should be called and the new camera file will be used. This method can not be called if the board is already setup with another camera file. The UnloadCamFile method can be used to free resources used by this method. More... | |
void | UnloadCameraFile () |
Unloads and frees resources associated with the LoadCamFile method. More... | |
uint | CXPReadReg (uint address) |
Read the value of a single CoaXPress register. More... | |
uint | CXPReadReg (uint link, uint address) |
Read the value of a single CoaXPress register. More... | |
void | CXPWriteReg (uint address, uint value) |
Write the value of a single CoaXPress register. More... | |
void | CXPWriteReg (uint link, uint address, uint value) |
Write the value of a single CoaXPress register. More... | |
byte[] | CXPReadData (uint address, uint bytes) |
Read the values from a sequence of CoaXPress registers, and return them as an array. More... | |
byte[] | CXPReadData (uint link, uint address, uint bytes) |
Read the values from a sequence of CoaXPress registers, and return them as an array. More... | |
void | CXPWriteData (uint address, byte[] data) |
Write data to a sequence of CoaXPress registers. More... | |
void | CXPWriteData (uint link, uint address, byte[] data) |
Write data to a sequence of CoaXPress registers. More... | |
String | BFRegName (uint RegId) |
Use this function to iteratively retrieve the string name of every frame grabber register available on the currently open board. The name and ID pairing used by this function is the same used by BFRegId, and valid values of RegId may be used with BFRegPeek and BFRegPoke functions, as well. The ID value will be static for any given release of the BitFlow SDK, but may change with even a minor release. More... | |
uint | BFRegId (String RegName) |
Return the ID of the named frame grabber register. The ID is used in conjunction with the BFRegPeek and BFRegPoke methods. The ID of any given register may change betwee releases, but the RegName will always remain the same. The ID returned by this function can be converted back into the register name, RegName using the BFRegName function. The ID value will be static for any given release of the BitFlow SDK, but may change with even a minor release. More... | |
uint | BFRegPeek (uint RegId) |
Peek (read) the value of the frame grabber register with ID RegId . Retrieve the ID of a named register using BFRegId. More... | |
void | BFRegPoke (uint RegId, uint Value) |
Poke (write) Value to the frame grabber register with ID RegId . Retrieve the ID of a named register using BFRegId. More... | |
Properties | |
static uint | BoardCount [get] |
Return the number of BitFlow board installed on this system. More... | |
BoardProperties | Properties [get] |
Retrieve a BufferedAcquisition::BoardProperties handle for this BufferAcqisition object. More... | |
String[] | CameraModes [get] |
Alternative accessor of the board modes. More... | |
String | CameraMode [get, set] |
Get or set the current camera mode's name. R64 and older board models do not support camera modes. More... | |
Abstract base class of the Buffer Interface acquisition library.
void BufferAcquisition.BufferedAcquisition.AbortAcquisition | ( | AcqControlOptions | options | ) |
Instructs the acquisition engine to abort acquisition of images immediately, and does not wait for the current frame to be acquired.
options | The options parameter can be one of the following:
|
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.TimeoutException | Thrown when a timeout occurs while waiting for acquisition to abort when using the Wait option. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
uint BufferAcquisition.BufferedAcquisition.BFRegId | ( | String | RegName | ) |
Return the ID of the named frame grabber register. The ID is used in conjunction with the BFRegPeek and BFRegPoke methods. The ID of any given register may change betwee releases, but the RegName will always remain the same. The ID returned by this function can be converted back into the register name, RegName using the BFRegName function. The ID value will be static for any given release of the BitFlow SDK, but may change with even a minor release.
RegName | The name of the desired frame grabber register. This value is case sensitive. |
System.ApplicationException | Thrown if no register is available with the given RegName . |
System.InvalidOperationException | Thrown if no board has been opened with the Open function. |
String BufferAcquisition.BufferedAcquisition.BFRegName | ( | uint | RegId | ) |
Use this function to iteratively retrieve the string name of every frame grabber register available on the currently open board. The name and ID pairing used by this function is the same used by BFRegId, and valid values of RegId may be used with BFRegPeek and BFRegPoke functions, as well. The ID value will be static for any given release of the BitFlow SDK, but may change with even a minor release.
Iterate continuously from zero to retrieve the name of every BitFlow register available on the open board.
RegId | The ID of the frame grabber register who's name is to be returned. |
System.ApplicationException | Thrown if the specified register ID exceeds the number of registers known to the BitFlow SDK. |
System.InvalidOperationException | Thrown if no board has been opened with the Open function. |
uint BufferAcquisition.BufferedAcquisition.BFRegPeek | ( | uint | RegId | ) |
Peek (read) the value of the frame grabber register with ID RegId . Retrieve the ID of a named register using BFRegId.
RegId | The ID of the frame grabber register to peek. |
System.InvalidOperationException | Thrown if no board has been opened with the Open function. |
void BufferAcquisition.BufferedAcquisition.BFRegPoke | ( | uint | RegId, |
uint | Value | ||
) |
Poke (write) Value to the frame grabber register with ID RegId . Retrieve the ID of a named register using BFRegId.
RegId | The ID of the frame grabber register to poke. |
Value | The value to be written to the frame grabber register specified by RegId . |
System.ApplicationException | Thrown if the specified RegId is not available on the current frame grabber. |
System.InvalidOperationException | Thrown if no board has been opened with the Open function. |
void BufferAcquisition.BufferedAcquisition.Cleanup | ( | ) |
Shuts down current acquisition as needed, kills all internal threads, and releases all resources allocated by Setup. The Setup method should be called before this method, if Cleanup is called before Setup, Cleanup returns immediately, without doing anything. Cleanup also gets called from the desctructor so when the sequence or circular object is destroyed and cleanup has not been called, as soon as the garbage collector cleans up the object, the Setup resources will be freed.
System.ApplicationException | Thrown if an internal error occurs while freeing resources. For more information on the exception, check the message property. |
|
virtual |
Reimplemented in BufferAcquisition.SequenceAcquisition.
void BufferAcquisition.BufferedAcquisition.ClearBuffers | ( | ) |
Clears the buffers's contents by writing zeros to all buffers. Setup must be called before calling this method.
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
void BufferAcquisition.BufferedAcquisition.Close | ( | ) |
Closes the board and frees all associated resources.
byte [] BufferAcquisition.BufferedAcquisition.CXPReadData | ( | uint | address, |
uint | bytes | ||
) |
Read the values from a sequence of CoaXPress registers, and return them as an array.
address | The byte address of the first register to be read. |
bytes | The number of bytes to be read from the register space. |
System.InvalidOperationException | Thrown when the board is not open, and this method is called. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
byte [] BufferAcquisition.BufferedAcquisition.CXPReadData | ( | uint | link, |
uint | address, | ||
uint | bytes | ||
) |
Read the values from a sequence of CoaXPress registers, and return them as an array.
link | The camera link to read from. |
address | The byte address of the first register to be read. |
bytes | The number of bytes to be read from the register space. |
System.InvalidOperationException | Thrown when the board is not open, and this method is called. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
uint BufferAcquisition.BufferedAcquisition.CXPReadReg | ( | uint | address | ) |
Read the value of a single CoaXPress register.
address | The byte address of the register to be read. |
System.InvalidOperationException | Thrown when the board is not open, and this method is called. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
uint BufferAcquisition.BufferedAcquisition.CXPReadReg | ( | uint | link, |
uint | address | ||
) |
Read the value of a single CoaXPress register.
link | The camera link to read from. |
address | The byte address of the register to be read. |
System.InvalidOperationException | Thrown when the board is not open, and this method is called. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
void BufferAcquisition.BufferedAcquisition.CXPWriteData | ( | uint | address, |
byte[] | data | ||
) |
Write data to a sequence of CoaXPress registers.
address | The byte address of the first register to be written. |
data | A byte array of data to be written to the register space. |
System.InvalidOperationException | Thrown when the board is not open, and this method is called. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
void BufferAcquisition.BufferedAcquisition.CXPWriteData | ( | uint | link, |
uint | address, | ||
byte[] | data | ||
) |
Write data to a sequence of CoaXPress registers.
link | The camera link to write on. |
address | The byte address of the first register to be written. |
data | A byte array of data to be written to the register space. |
System.InvalidOperationException | Thrown when the board is not open, and this method is called. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
void BufferAcquisition.BufferedAcquisition.CXPWriteReg | ( | uint | address, |
uint | value | ||
) |
Write the value of a single CoaXPress register.
address | The byte address of the register to be read. |
value | The value to write to the specified register. |
System.InvalidOperationException | Thrown when the board is not open, and this method is called. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
void BufferAcquisition.BufferedAcquisition.CXPWriteReg | ( | uint | link, |
uint | address, | ||
uint | value | ||
) |
Write the value of a single CoaXPress register.
link | The camera link to write on. |
address | The byte address of the register to be read. |
value | The value to write to the specified register. |
System.InvalidOperationException | Thrown when the board is not open, and this method is called. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
uint BufferAcquisition.BufferedAcquisition.EnumerateCameraModes | ( | out String[] | modes, |
out String[] | descriptions | ||
) |
Retrieve a list of modes supported by the current camera file, returning the number of modes determined. R64 and older board models to not support multi-mode camera files, and no modes will be returned for that case.
modes | Return parameter for the available modes. |
descriptions | Return parameter for descriptions of the available modes. |
ApplicationException | Thrown if the board isn't configured. |
bool BufferAcquisition.BufferedAcquisition.GetAcqAbortFlag | ( | ) |
Gets the status of the the abort acquisition command flag.
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
bool BufferAcquisition.BufferedAcquisition.GetAcqPauseFlag | ( | ) |
Gets the status of the the pause acquisition command flag.
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
bool BufferAcquisition.BufferedAcquisition.GetAcqStartFlag | ( | ) |
Gets the status of the the start acquisition command flag.
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
bool BufferAcquisition.BufferedAcquisition.GetAcqStopFlag | ( | ) |
Gets the status of the the stop acquisition command flag.
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
uint BufferAcquisition.BufferedAcquisition.GetBoardConnector | ( | ) |
Returns the board connector of the opened board. Only valid if opened by switch and connector.
IntPtr BufferAcquisition.BufferedAcquisition.GetBoardHandle | ( | ) |
Returns the board handle.
System.InvalidOperationException | Thrown when a method is called before the board is open. |
uint BufferAcquisition.BufferedAcquisition.GetBoardInfo | ( | InquireParams | brdInqVariable | ) |
Returns information about the board.
brdInqVariable | The parameter to find the value of. Can be one of the following:
|
System.ArgumentException | Thrown when the parameter specified by BrdInqVariable is not valid for that model board. |
System.InvalidOperationException | Thrown when a method is called before the board is open. |
uint BufferAcquisition.BufferedAcquisition.GetBoardNumber | ( | ) |
Returns the board number of the opened board. Only valid if opened by board number.
void BufferAcquisition.BufferedAcquisition.GetBoardSWConnector | ( | out uint | Switch, |
out uint | Connector | ||
) |
Returns the board switch and connector of the opened board. Only valid if opened by switch and connector.
Switch | The board switch value for the board opened. |
Connector | The board connector of the board opened. |
uint BufferAcquisition.BufferedAcquisition.GetBoardSwitch | ( | ) |
Returns the board switch of the opened board. Only valid if opened by switch and connector.
Bitmap BufferAcquisition.BufferedAcquisition.GetBufferBitmap | ( | uint | bufferNumber | ) |
Gets a bitmap from the buffer specified by the bufferNumber parameter. Unlike the GetBufferData method, the Bitmap returned from this method is created from the unmanaged memory allocated by the underlying wrapped code. What this means is this method can not be called after calling Cleanup and/or Close. When Cleanup is called the underlying unmanaged memory is de-allocated and the Bitmap can no longer be created. Any modifications to the Bitmap also modifiy the underlying unmanaged memory.
The Bitmap supports 8, 24 and 32-bit images out of the box. For 10, 12, 14 and 16-bit images an 8-bit Bitmap will be created with the most significant 8-bits used to make up the Bitmap. For 3x10 and 3x12 color images a 48-bit Bitmap will be created with the upper most bits not being used set to zero.
bufferNumber | The buffer number to create the bitmap from. |
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.ArgumentOutOfRangeException | Thrown when a bufferNumber is passed in that is larger than the number of buffers that have been allocated. |
System.NotSupportedException | Thrown when an image bit depth is being used, that is not supported by the Bitmap class. An example would be a 64-bit image. |
byte [] BufferAcquisition.BufferedAcquisition.GetBufferData | ( | uint | bufferNumber | ) |
Gets the image data from the buffer specified by the bufferNumber parameter. The byte array that is returned from this method is a copy of the unmanaged memory buffer that has been marshaled into managed memory. So, if the data in the returned byte array is modified, the modification only exists in managed memory. The underlying unmanaged memory will not be modified. If a call to this method was made for each buffer allocated into seperate locations and the Cleanup and/or Close methods were called, the byte array returned by this method will still be valid.
bufferNumber | The buffer number to get the data from. |
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.ArgumentOutOfRangeException | Thrown when a bufferNumber is passed in that is larger than the number of buffers that have been allocated. |
|
virtual |
Reimplemented in BufferAcquisition.SequenceAcquisition.
IntPtr BufferAcquisition.BufferedAcquisition.GetBufferPointer | ( | uint | bufferNumber | ) |
Gets a pointer to the buffer specified by the bufferNumber parameter. The pointer returned by this method is a pointer to unmanaged memory allocated by the wrapped buffer interface.
bufferNumber | The buffer number to get a pointer to. |
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.ArgumentOutOfRangeException | Thrown when a bufferNumber is passed in that is larger than the number of buffers that have been allocated. |
|
virtual |
Reimplemented in BufferAcquisition.CircularAcquisition.
|
virtual |
Reimplemented in BufferAcquisition.CircularAcquisition.
|
virtual |
Reimplemented in BufferAcquisition.SequenceAcquisition.
uint BufferAcquisition.BufferedAcquisition.GetErrorCode | ( | ) |
Gets any error codes from the error stack. A zero is returned when no errors are on the error stack. The method can be called multiple times until zero is returned to remove all errors from the error stack. The error code returned from this method can then be used as a parameter for the GetErrorText and ShowErrorDialog methods.
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.ApplicationException | Thrown when an internal error occurs. For more information check the message property. |
string BufferAcquisition.BufferedAcquisition.GetErrorText | ( | uint | errorCode | ) |
Gets a description of the error that is passed in through the the errorCode parameter. See the GetErrorCode method on retrieving the error code from the error stack.
errorCode | The error code to get the description of. |
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.ApplicationException | Thrown when an internal error occurs. For more information check the message property. |
System.ArgumentOutOfRangeException | Thrown when the errorCode parameter that is passed into the method cannot be found or is not in the range of known error codes. |
void BufferAcquisition.BufferedAcquisition.GetExposureControl | ( | out double | ExposurePeriod, |
out double | LineFramePeriod, | ||
out NTGTrigModes | TriggerMode, | ||
out TriggerPolarity | AssertionPolarity, | ||
out NTGOutputSignal | OutputSignal | ||
) |
Retrieve the current configuration of the New Timing Generator (NTG), which is used to create waveforms to control the line/frame rate and exposure time of cameras.
ExposurePeriod | The exposure period of image capture, in milliseconds. |
LineFramePeriod | The line or frame period of image capture, in milliseconds. |
TriggerMode | The triggering mode of the NTG. |
AssertionPolarity | Determines the assertion level of the NTG waveform output, high or low. |
OutputSignal | The outputs that the NTG waveform triggers. This value is a flag. |
uint BufferAcquisition.BufferedAcquisition.GetGPIn | ( | uint | GPIn | ) |
Gets the level of a General Purpose Input
GPIn | The GPIN signal to get the level of |
System.ApplicationException | Thrown if the if the GPIn parameter is not known |
uint BufferAcquisition.BufferedAcquisition.GetMajorVersion | ( | ) |
Returns the major version of the BufferAcquisition library.
uint BufferAcquisition.BufferedAcquisition.GetMinorVersion | ( | ) |
Returns the minor version of the BufferAcquisition library.
uint BufferAcquisition.BufferedAcquisition.GetNumberOfBuffers | ( | ) |
uint BufferAcquisition.BufferedAcquisition.GetNumberOfFramesAcquired | ( | ) |
Gets the number of frames that have been captured the moment the method is called.
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
uint BufferAcquisition.BufferedAcquisition.GetNumberOfFramesOverwritten | ( | ) |
Gets the number of frames that have been overwritten by another frame. This is different from overwriting frames in the ignore mode for circular acquisition. These are frames that are overwritten because the internal worker thread has been held off long enough so that in sequence capture, the internal stop is issued beyond the last buffer in the sequence or in circular acquisition, the number of buffers on internal queue is greater than the number of buffers that have been allocated.
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
SetupOptions BufferAcquisition.BufferedAcquisition.GetSetupOptions | ( | ) |
Gets a value indicating the setup options state. The returned value can be an ORed value of several options.
TriggerModes BufferAcquisition.BufferedAcquisition.GetTriggerMode | ( | ) |
Gets the trigger mode being used by the board.
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.ApplicationException | Thrown when an internal error occurs. For more information check the message property. |
TriggerPolarity BufferAcquisition.BufferedAcquisition.GetTriggerPolarity | ( | ) |
Gets the trigger polarity being used by the board.
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.ApplicationException | Thrown when an internal error occurs. For more information check the message property. |
bool BufferAcquisition.BufferedAcquisition.IsBoardOpen | ( | ) |
Returns if the board is open or not.
bool BufferAcquisition.BufferedAcquisition.IsBoardSetup | ( | ) |
Gets a value indicating the setup or not setup status of the acquisition engine on the board. If the acquisition engine on the board is setup, the Setup method has been called and the board is ready to acquire images.
void BufferAcquisition.BufferedAcquisition.IssueSoftwareTrigger | ( | ) |
Issues a software trigger to the board.
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.ApplicationException | Thrown when an internal error occurs. For more information check the message property. |
void BufferAcquisition.BufferedAcquisition.LoadCameraFile | ( | string | cameraFileName | ) |
Loads the specified camera file bypassing the camera file displayed in SysReg. After loading the camera file, Setup should be called and the new camera file will be used. This method can not be called if the board is already setup with another camera file. The UnloadCamFile method can be used to free resources used by this method.
cameraFileName | The name of the camera file with no path. The Camera Configuration path will be searched for the camera file. |
System.InvalidOperationException | Thrown when the board is already setup with another camera file. Please call Cleanup and then call this method again. |
System.ApplicationException | Thrown when the camera file could not be loaded. Verify that the camera file exists in the Camera Configuration path. (Usually the Config folder under the SDK root directory.) |
void BufferAcquisition.BufferedAcquisition.Open | ( | uint | boardNumber | ) |
Opens a board for access. This method must be called before any other method. The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2.
boardNumber | Specifies the board number to open. |
System.InvalidOperationException | Thrown if there is an attempt to open the board twice. |
System.ArgumentException | Thrown when a boardNumber can not be found in the system. |
System.ApplicationException | Thrown when the board can not be successfully opened. |
void BufferAcquisition.BufferedAcquisition.Open | ( | uint | boardNumber, |
OpenOptions | Options | ||
) |
Opens a board for access with the given Options The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2.
boardNumber | Specifies the board number to open. |
Options | Options for use in opening the board. |
System.InvalidOperationException | Thrown if there is an attempt to open the board twice. |
System.ArgumentException | Thrown when a boardNumber can not be found in the system. |
System.ApplicationException | Thrown when the board can not be successfully opened. |
void BufferAcquisition.BufferedAcquisition.Open | ( | uint | boardNumber, |
string | camFileName | ||
) |
Opens a board for access and loads the given camera file, bypassing the camera file displayed in SysReg. The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2.
boardNumber | Specifies the board number to open. |
camFileName | The camera file to attach to the board. If only the name of the camera file is given, with the extention, the camera configuration path is searched for the camera file. By default the camera configuration path is the Config folder in the SDK installation. If the full path is given, then that is where the camera file will be retrieved from. |
System.InvalidOperationException | Thrown if there is an attempt to open the board twice. |
System.ArgumentException | Thrown when a boardNumber can not be found in the system. |
System.ApplicationException | Thrown when the board can not be successfully opened. |
void BufferAcquisition.BufferedAcquisition.Open | ( | uint | boardNumber, |
string | camFileName, | ||
OpenOptions | Options | ||
) |
Opens a board for access and loads the given camera file, bypassing the camera file displayed in SysReg. The board number refers to all model bitflow boards. If an R64, Karbon and Neon are installed in the system in that order, the R64 is board 0, the Karbon is number 1, and Neon is number 2.
boardNumber | Specifies the board number to open. |
camFileName | The camera file to attach to the board. If only the name of the camera file is given, with the extention, the camera configuration path is searched for the camera file. By default the camera configuration path is the Config folder in the SDK installation. If the full path is given, then that is where the camera file will be retrieved from. |
Options | Options for use in opening the board. |
System.InvalidOperationException | Thrown if there is an attempt to open the board twice. |
System.ArgumentException | Thrown when a boardNumber can not be found in the system. |
System.ApplicationException | Thrown when the board can not be successfully opened. |
void BufferAcquisition.BufferedAcquisition.OpenSWConnector | ( | uint | Switch, |
uint | Connector | ||
) |
Opens a board with the given switch value and connector number for access. This function must return successfully before any other BI functions are called.
Switch | Specifies the switch setting of the board that you wish to open. The swith is a small mechanical switch that is mounted on the upper edge of the board. See that hardware reference manual for more details on location. The acceptable values are 0 to 3. |
Connector | Specifies the connector number of the board that you wish to open. This parameter is only for use for boards that have more than one Virtual Frame Grabber (VFG). For boards with only one VFG, this value must be 1. Connector numbers start with 1, as per the hardware manual. For example, the Neon-CLQ has connectors CL1, CL2, CL3 and CL4. Therefore, to open CL2, this parameter must be set to two. |
System.InvalidOperationException | Thrown if there is an attempt to open the board twice. |
System.ArgumentException | Thrown when a Switch of Connector can not be found in the system. |
System.ApplicationException | Thrown when the board can not be successfully opened. |
void BufferAcquisition.BufferedAcquisition.OpenSWConnector | ( | uint | Switch, |
uint | Connector, | ||
OpenOptions | Options | ||
) |
Opens a board with the given switch value and connector number for access. This function must return successfully before any other BI functions are called.
Switch | Specifies the switch setting of the board that you wish to open. The swith is a small mechanical switch that is mounted on the upper edge of the board. See that hardware reference manual for more details on location. The acceptable values are 0 to 3. |
Connector | Specifies the connector number of the board that you wish to open. This parameter is only for use for boards that have more than one Virtual Frame Grabber (VFG). For boards with only one VFG, this value must be 1. Connector numbers start with 1, as per the hardware manual. For example, the Neon-CLQ has connectors CL1, CL2, CL3 and CL4. Therefore, to open CL2, this parameter must be set to two. |
Options | Options for use in opening the board. |
System.InvalidOperationException | Thrown if there is an attempt to open the board twice. |
System.ArgumentException | Thrown when a Switch of Connector can not be found in the system. |
System.ApplicationException | Thrown when the board can not be successfully opened. |
void BufferAcquisition.BufferedAcquisition.PauseAcquisition | ( | AcqControlOptions | options | ) |
Tells the acquisition engine to pause acqusition after the current frame has been acquired. When ResumeAcquisition is called, acquisition of images will continue where the pause left off. After a pause is called, only calls to StopAcquisition, AbortAcquisition or ResumeAcquisition are valid. A call to StartAcquisition or another call to PauseAcquisition will throw a InvalidOperationException exception.
options | The options parameter can be one of the following:
|
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. Will also be thrown if a stop, abort or another pause is called while acquisition is paused. |
System.TimeoutException | Thrown when a timeout occurs while waiting for acquisition to pause when using the Wait option. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
void BufferAcquisition.BufferedAcquisition.ReadImageFiles | ( | String | FileName, |
uint | startBufferNumber, | ||
uint | numBuffers | ||
) |
Reads image files from disk into memory, that were saved with the WriteBuffer and WriteBuffers methods.
FileName | The file name of the first image file to read into memory. For multiple files, the XXXX portion of the file name will be incremented. The file name should include the full path along with the file extension. |
startBufferNumber | The first buffer that the files on disk will be read into. If startBufferNumber is greater than one, images will continue to be read into subsequent internal buffers. In order for multiple images to be read, they must have the format "prefixXXXX.ext", where XXXX is a sequential number series. |
numBuffers | The number of buffers to be read into. |
System.ArgumentException | Thrown when trying to read a raw image file into memory. |
System.OutOfMemoryException | Thrown when there is not enough memory available to read in an image. |
System.ArgumentException | Thrown if the file extension is something other than bmp, tif or avi. Also will be thrown if the numBuffers or a combination of numBuffers and startBufferNumber exceed the number of buffers allocated with Setup. |
System.IO.IOException | Thrown if the file name passed into the method could not be found, or is invalid. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
void BufferAcquisition.BufferedAcquisition.ResumeAcquisition | ( | AcqControlOptions | options | ) |
Resumes acquisition after a pause. If acquisition was paused on buffer number eight, when resume is called, acquisition will begin in buffer nine. ResumeAcquisition can only be called after a pause, in all other cases the System.InvalidOperationException will be thrown.
options | The options parameter can be one of the following:
|
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. Will also be thrown if a resume is call at anytime other than after a pause. |
System.TimeoutException | Thrown when a timeout occurs while waiting for acquisition to resume when using the Wait option. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
void BufferAcquisition.BufferedAcquisition.SetAcqFrameSize | ( | uint | xSize, |
uint | ySize | ||
) |
Sets the size of the acuqired frame. The behaviour of this function depends somewhat on the camera configuration file being used. With some configurations it is not possible to modify the frame size. With others it is only possible to modify the image height. With most cameras it is possible to modify both the width and height. It is not possible to modify the acquisition size to be bigger than the sensor. However, with line scan cameras it is possible to set ySize to almost any number because on these cameras the frame height is arbitrary. This function must be called before acquisition has been setup using one of the setup methods.
xSize | The width of the acquired frame in pixels |
ySize | The hieght of the acquired frame in lines |
System.ApplicationException | Thrown if the acquisition frame size cannot be modified |
void BufferAcquisition.BufferedAcquisition.SetAcqROI | ( | uint | XOffset, |
uint | YOffset, | ||
uint | xSize, | ||
uint | ySize | ||
) |
Set the Region Of Interest (ROI) of the acquired frame. The behaviour of this function depends somewhat on the camera configuration file being used. With some configurations it is not possible to modify the frame size. With others it is only possible to modify the image height. With most cameras it is possible to modify both the width and height. It is not possible to modify the acquisition size to be bigger than the sensor. However, with line scan cameras it is possible to set ySize to almost any number because on these cameras the frame height is arbitrary. Similar restrictions apply to the XOffset as do the xSize . This function must be called before acquisition has been setup using one of the setup methods.
XOffset | The pixel offset from the left edge of the image. |
YOffset | The pixel offset from the top of the image. |
xSize | The width of the acquired frame in pixels |
ySize | The hieght of the acquired frame in lines |
System.ApplicationException | Thrown if the acquisition frame size cannot be modified. |
|
virtual |
Reimplemented in BufferAcquisition.CircularAcquisition.
void BufferAcquisition.BufferedAcquisition.SetExposureControl | ( | double | ExposurePeriod, |
double | LineFramePeriod, | ||
NTGTrigModes | TriggerMode, | ||
TriggerPolarity | AssertionPolarity, | ||
NTGOutputSignal | OutputSignal | ||
) |
Programs the New Timing Generator (NTG), used to create waveforms to control the line/frame rate and exposure time of cameras.
ExposurePeriod | The exposure period of image capture, in milliseconds. |
LineFramePeriod | The line or frame period of image capture, in milliseconds. |
TriggerMode | The triggering mode of the NTG. |
AssertionPolarity | Determines the assertion level of the NTG waveform output, high or low. |
OutputSignal | The outputs that the NTG waveform triggers. This value is a flag. |
void BufferAcquisition.BufferedAcquisition.SetGPOut | ( | uint | GP0ut, |
uint | Val | ||
) |
Sets the level of a General Purpose Output
GP0ut | The GPOUT signal to change (0 to 6) |
Val | The value to set the output (0 or 1) |
System.ApplicationException | Thrown if the if the GPOUT can not be set or if the GPOut parameter is not known |
|
virtual |
Reimplemented in BufferAcquisition.CircularAcquisition.
|
virtual |
Reimplemented in BufferAcquisition.SequenceAcquisition.
void BufferAcquisition.BufferedAcquisition.SetSetupOptions | ( | SetupOptions | options | ) |
Sets the setup options for the acquisition engine on the board. This method should be called before the Setup method is called. If this method is not called before the Setup method, the default option will be used. Once the setup option is set, the board will continue to use that option until it is changed, or a new sequence or circular object is instantiated. When a sequence or circular object is instantiated, the setup option is set to Default. Options may be ORed together. For instance,
SetSetupOptions(SetupOptions.InvertOddFrames | SetupOptions.InvertEvenFrames)
will set the options for inverting the odd and even frames, all frames.
options |
|
void BufferAcquisition.BufferedAcquisition.SetTimeout | ( | uint | timeoutValue | ) |
Sets the timeout value for operations within the Buffer interface. These operations include, but are not limited to, waiting for frames, waiting for acquisition to start or abort, and waiting for active regions within a frame. If this method is not called the timeout value used will come from the attached camera file. For this timeout value to be active you have to call this method after Setup.
timeoutValue | The value to set the timeout value too. |
System.InvalidOperationException | Thrown when the board is not open, and this method is called. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
void BufferAcquisition.BufferedAcquisition.SetTriggerMode | ( | TriggerModes | triggerMode, |
TriggerPolarity | triggerPolarity | ||
) |
Sets the trigger mode for the acquisition engine.
triggerMode | The trigger mode to setup for acquisition. The trigger mode can be one of the following:
|
triggerPolarity | Determines the polarity of the when the trigger should occur, on a rising or falling egde. The trigger polarity can be one of the following:
|
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.ApplicationException | Thrown when an internal error occurs. For more information check the message property. |
void BufferAcquisition.BufferedAcquisition.Setup | ( | List< byte[]> | bufferPtrList, |
uint | numberOfBuffers | ||
) |
Sets up the board for sequence or circular acquisition with buffer memory allocated by the user. The user passes in a list of byte arrays into the method. The method sets registers on the board based on the attached camera file at the time Setup is called.
bufferPtrList | A list of byte arrays to hold the acquired image data. The byte arrays are allocated by the user and passed into the method. The board then acquires image data into those buffers. |
numberOfBuffers | The number of buffers allocated by the user. |
System.InvalidOperationException | Thrown if the board is not open or if the board is already setup. |
System.OutOfMemoryException | Thrown when there is not enough available memory for buffer allocation and/or other memory resources. |
System.ArgumentException | Thrown if the bufferPtrArray pointer is null. |
System.ApplicationException | Thrown when an internal error occurs while trying to setup the board for acquisitioin. For more information check the message property. |
void BufferAcquisition.BufferedAcquisition.Setup | ( | List< IntPtr > | bufferPtrList, |
uint | numberOfBuffers | ||
) |
Sets up the board for sequence or circular acquisition with buffer memory allocated by the user. The user then passes in a list of buffer pointers into the method. The method sets registers on the board based on the attached camera file at the time Setup is called.
bufferPtrList | A list of pointers that point to each of the buffers allocated by the user. |
numberOfBuffers | The number of buffers allocated by the user. |
System.InvalidOperationException | Thrown if the board is not open or if the board is already setup. |
System.OutOfMemoryException | Thrown when there is not enough available memory for buffer allocation and/or other memory resources. |
System.ArgumentException | Thrown if the bufferPtrArray is zero or if the numberOfBuffers is larger than the number of pointers in the list. |
System.ApplicationException | Thrown when an internal error occurs while trying to setup the board for acquisitioin. For more information check the message property. |
void BufferAcquisition.BufferedAcquisition.Setup | ( | uint | numberOfBuffers | ) |
Sets up the board for sequence or circular acquisition by allocating buffer memory and setting registers on the board based on the attached camera file at the time Setup is called.
numberOfBuffers | The number of buffers to allocate for sequence or circular acquisition. |
System.InvalidOperationException | Thrown if the board is not open or if the board is already setup. The board must be open before calling the setup method. Setup can only be called one, subsequent calls to setup will throw the System.InvalidOperationException exception. In the case where the board is already setup, Cleanup should be called before another call to Setup. |
System.OutOfMemoryException | Thrown when there is not enough available memory for buffer allocation and/or other memory resources. |
System.ArgumentException | Thrown if the number of buffers passed into the method is less than two. |
System.ApplicationException | Thrown when an internal error occurs while trying to setup the board for acquisitioin. For more information check the message property. |
void BufferAcquisition.BufferedAcquisition.Setup | ( | uint | numberOfBuffers, |
uint | alignment | ||
) |
Sets up the board for sequence or circular acquisition by allocating buffer memory and setting registers on the board based on the attached camera file at the time Setup is called. When allocating the buffer memory, each buffer will be aligned by the specified alignment boundary, specified by the alignment parameter.
numberOfBuffers | The number of buffers to allocate for sequence or circular acquisition. |
alignment | Allocation will be on this specified alignment boundary. The alignment value must be an integer power of 2. |
System.InvalidOperationException | Thrown if the board is not open or if the board is already setup. |
System.OutOfMemoryException | Thrown when there is not enough available memory for buffer allocation and/or other memory resources. |
System.ArgumentException | Thrown if the number of buffers passed into the method is less than two or if the Alignment parameter is not a power of 2. |
System.ApplicationException | Thrown when an internal error occurs while trying to setup the board for acquisitioin. For more information check the message property. |
void BufferAcquisition.BufferedAcquisition.SetWriteBufferOptions | ( | WriteOptions | options | ) |
Sets the different write options when writing images to disk. The write options must be set before calling the WriteBuffer and WriteBuffers methods. If this method is not called before calling the WriteBuffer and WriteBuffers methods, the WriteOptions.Default option will be used. Once the write option is set, it will remain at that value until it is set to something else. All options can be or'ed together. For instance, the following is setting options for packing 32-bit RGB to 24-bit, swapping RGB to BGR, flipping the image and overwriting existing files.
SetWriteBufferOptions(WriteOptions.Pack32To24Bit | WriteOptions.SwapRGB | WriteOptions.BottomUp | WriteOptions.OverwriteFile);
options | The write options can be one of the following:
|
uint BufferAcquisition.BufferedAcquisition.ShowErrorDialog | ( | uint | errorCode | ) |
Displays a dialog with a description of the error of the error code passed in by the errorCode parameter. See the GetErrorCode method on retrieving the error code from the error stack.
errorCode | The error code to get a description of and display on the dialog. |
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.ArgumentOutOfRangeException | Thrown when the errorCode parameter that is passed into the method cannot be found or is not in the range of known error codes. |
void BufferAcquisition.BufferedAcquisition.StartAcquisition | ( | AcqControlOptions | options | ) |
Starts acquisition from the acquisition engine on the board. The board will begin acquiring images from the attached camera.
options | The options parameter can be one of the following:
|
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method, and will also be thrown if acquisition has already been started. |
System.TimeoutException | Thrown when a timeout occurs while waiting for acquisition to begin when using the Wait option. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
void BufferAcquisition.BufferedAcquisition.StopAcquisition | ( | AcqControlOptions | options | ) |
Instructs the acquisition engine to stop acquiring images after the current image being acquired is done.
options | The options parameter can be one of the following:
|
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.TimeoutException | Thrown when a timeout occurs while waiting for acquisition to finish when using the Wait option. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
void BufferAcquisition.BufferedAcquisition.UnloadCameraFile | ( | ) |
Unloads and frees resources associated with the LoadCamFile method.
uint BufferAcquisition.BufferedAcquisition.WaitForError | ( | ) |
Waits for an error to occur. Idealy, this method should be called in a seperate thread, where it will efficiently wait for an error to occur. If an error occurs, this method will return and appropriate action can be taken. For more information on the error that occured see the GetErrorCode method.
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.ApplicationException | Thrown when an internal error occurs. For more information check the message property. |
WaitFrameDoneReturns BufferAcquisition.BufferedAcquisition.WaitForFrameDone | ( | uint | timeout | ) |
This method will wait until an image has been completly acquired into memory, and the return. The method will return immediately if an image has already been acquired into memory.
WaitForFrameDone(uint) and WaitForNextFrame(uint) behave identically. Prefer WaitForNextFrame(uint) for new code.
timeout | The number of milliseconds to wait for a frame to be acquired. |
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.TimeoutException | Thrown when a frame is not acquired within the time specified by the timeout parameter. |
System.ApplicationException | Thrown when an internal error occurs. For more information check the message property. |
WaitFrameDoneReturns BufferAcquisition.BufferedAcquisition.WaitForFrameDone | ( | uint | timeout, |
ref BufferInfo | bufInfo | ||
) |
This method has been deprecated, and should be replaced by WaitForNextFrame(uint, out BufferInfo), for correct "out" reference usage.
This method will wait until an image has been completly acquired into memory, and the return. The method will return immediately if an image has already been acquired into memory.
timeout | The number of milliseconds to wait for a frame to be acquired. |
bufInfo | On return of WaitFrameDoneReturns.FrameAcquired, instantiated with a new BufferInfo handle. Otherwise, set to null. The BufferInfo class contains the following information about the image acquired:
|
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.TimeoutException | Thrown when a frame is not acquired within the time specified by the timeout parameter. |
System.ApplicationException | Thrown when an internal error occurs. For more information check the message property. |
WaitFrameDoneReturns BufferAcquisition.BufferedAcquisition.WaitForNextFrame | ( | uint | timeout | ) |
This method will wait until an image has been completly acquired into memory, and the return. The method will return immediately if an image has already been acquired into memory.
WaitForFrameDone(uint) and WaitForNextFrame(uint) behave identically. Prefer WaitForNextFrame(uint) for new code.
timeout | The number of milliseconds to wait for a frame to be acquired. |
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.TimeoutException | Thrown when a frame is not acquired within the time specified by the timeout parameter. |
System.ApplicationException | Thrown when an internal error occurs. For more information check the message property. |
WaitFrameDoneReturns BufferAcquisition.BufferedAcquisition.WaitForNextFrame | ( | uint | timeout, |
out BufferInfo | bufInfo | ||
) |
This method will wait until an image has been completly acquired into memory, and the return. The method will return immediately if an image has already been acquired into memory.
timeout | The number of milliseconds to wait for a frame to be acquired. |
bufInfo | On return of WaitFrameDoneReturns.FrameAcquired, instantiated with a new BufferInfo handle. Otherwise, set to null. The BufferInfo class contains the following information about the image acquired:
|
System.InvalidOperationException | Thrown if the board is not open and/or not setup before calling this method. |
System.TimeoutException | Thrown when a frame is not acquired within the time specified by the timeout parameter. |
System.ApplicationException | Thrown when an internal error occurs. For more information check the message property. |
|
virtual |
Reimplemented in BufferAcquisition.SequenceAcquisition.
void BufferAcquisition.BufferedAcquisition.WriteBuffer | ( | String | fileName, |
uint | bufferNumber | ||
) |
Writes one buffer to a file on disk in the BMP, TIFF or RAW file format.
fileName | The file name to be saved to disk. The file name should be the full path along with the the file extension. |
bufferNumber | The number of the buffer to be written to disk. |
System.ArgumentOutOfRangeException | Thrown if the |
bufferNumber
parameter is an invalid buffer number.
System.OutOfMemoryException | Thrown when there is not enough memory available for writing the image to disk. |
System.ArgumentException | Thrown when the |
fileName
parameter is not a valid file type(BMP, Tiff, Raw). Can also be thrown if the write options are not valid for the image. For instance, if the swap RGB option is used on a 8-bit image.
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
System.IO.IOExcption | Thrown when the file already exists and the WriteOptions.OverwriteFile is not being used. |
void BufferAcquisition.BufferedAcquisition.WriteBuffers | ( | String | fileName, |
uint | startBufferNumber, | ||
uint | numBuffers | ||
) |
Writes multiple buffers to a file on disk in the BMP, TIFF, RAW or AVI file formats.
fileName | The file name to be saved to disk. The file name should be the full path along with the the file extension. |
startBufferNumber | The first buffer to write to disk. |
numBuffers | The number of buffers to be written to disk. |
System.ArgumentOutOfRangeException | Thrown if the any of the parameters are invalid, or a combination of parameters is invalid. For instance, if 10 buffers are allocated and the start buffer is 5, and then number of buffers is 6. |
System.OutOfMemoryException | Thrown when there is not enough memory available for writing the image to disk. |
System.ArgumentException | Thrown when the fileName parameter is not a valid file type(BMP, Tiff, Raw). Can also be thrown if the write options are not valid for the image. For instance, if the swap RGB option is used on a 8-bit image. |
System.ApplicationException | Thrown when an internal error occurs. For more information on the exception, check the Message property. |
System.IO.IOExcption | Thrown when the file already exists and the WriteOptions.OverwriteFile is not being used. |
|
staticget |
Return the number of BitFlow board installed on this system.
System.ApplicationException | Thrown if the board count cannot be determined. |
|
getset |
Get or set the current camera mode's name. R64 and older board models do not support camera modes.
|
get |
Alternative accessor of the board modes.
|
get |
Retrieve a BufferedAcquisition::BoardProperties handle for this BufferAcqisition object.