Cognex.VisionPro.ImageFileThe exception that is thrown when the image provider does not support multiple images.The exception that is thrown when the specified image file's extension does not correspond to any of the registered image file providers.Class that defines the state flags for the ICogImageFileProvider interface. Each static field in this class defines a single bit flag. These flags may appear in the EventArgs of a Changed event fired by any class implementing ICogImageFileProvider.This bit will be set in the EventArgs of a Changed event every time the value returned by Count may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by FileName may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by OpenMode may have changed.Object supporting access to image files.The supports generic access to image files using any of the registered image file providers.If you know the image file format ahead of time or if you need specific image file functionality, you can use the appropriate image file provider interface, rather than .The instance to copy from.Constructs a new instance of this class as a deep copy of the given instance.Constructs a new instance of this class.n/aConstructs a new instance of this class using com pointer.This bit will be set in the EventArgs of a Changed event every time the value returned by Count may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by FileName may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by OpenMode may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by Provider may have changed.Returns an that contains the file extensions of the supported image file types.File extensions of image file types that are supported.
Imports Cognex.VisionPro.ImageFile
' Determine how many image file types are supportedDim FileTypes as CogStringCollection
Dim FileTypes As New CogStringCollection
FileTypes = imagefile.SupportedFileTypes
MessageBox.Show("Number of supported file types: " + FileTypes.Count)
using Cognex.VisionPro.ImageFile;
// Determine how many image file types are supportedDim FileTypes as CogStringCollection
CogStringCollection FileTypes=new CogStringCollection();
FileTypes = imagefile.SupportedFileTypes;
MessageBox.Show("Number of supported file types: " + FileTypes.Count);
The image file provider for the current open file or 0 if there is no file open.Returns the image file provider for the currently open file or NULL if no file is open. You can use the to query for a specific interface of an underlying image file provider. For example, a client control may use this property to display TIFF-specific property pages.
Imports Cognex.VisionPro.ImageFile
' Get file provider
Dim objImageFileProvider As Object
objImageFileProvider = imagefile.Provider
using Cognex.VisionPro.ImageFile;
// Get file provider
object objImageFileProvider;
objImageFileProvider = imagefile.Provider;
A string suitable for displaying in a CommonDialog Control.A string that contains the filter text used by the Filter property of a CommonDialog control to select various types of image files.
Imports Cognex.VisionPro.ImageFile
' Use the FilterText property
objCommonDialog.Filter = ImageFile.FilterText
using Cognex.VisionPro.ImageFile;
// Use the FilterText property
objCommonDialog.Filter = ImageFile.FilterText;
Mode in which the file was opened.Mode in which the file was opened, or if no file is open. This is a read only property.
Imports Cognex.Visionpro.ImageFile
If imagefile.OpenMode = CogImageFileModeConstants.Write Then
MessageBox.Show("File Is Open in Write Mode")
End If
using Cognex.Visionpro.ImageFile;
if (imagefile.OpenMode == CogImageFileModeConstants.Write)
{
MessageBox.Show ("File Is Open in Write Mode");
}
Name of the last opened file. If no file is open, is NULL.NULLName of last opened file.
Imports Cognex.Visionpro.ImageFile
' Get the name of the last opened file and display it
Dim strFileName As String
strFileName = imagefile.FileName
MessageBox.Show("Last file opened was:" + strFileName)
using Cognex.Visionpro.ImageFile;
// Get the name of the last opened file and display it
string strFileName;
strFileName = imagefile.FileName;
MessageBox.Show("Last file opened was:" + strFileName);
The index of the item to get or set.Gets or sets the item at the specified index. In C#, this property is the indexer for the collection.
Imports Cognex.VisionPro.ImageFile
' Get an image from fileDim ImageFile as New CogImageFile
Dim Image As CogImage8Grey
imagefile.Open("c:\image.bmp", CogImageFileModeConstants.Read)
Image = imagefile.Item(0)
imagefile.Close()
Gets an object that can be used to synchronize access to this collection.Gets a value indicating whether access to this collection is synchronized (thread-safe).Gets the number of items contained in this collection.
Imports Cognex.VisionPro.ImageFile
' Find the count of images in an image fileDim ImageFile as New CogImageFile
imagefile.Open("c:\image.cdb", CogImageFileModeConstants.Read)
Dim ImageCount As Integer
ImageCount = ImageFile.Count
using Cognex.VisionPro.ImageFile;
// Find the count of images in an image fileDim ImageFile as New CogImageFile
imagefile.Open("c:\\image.cdb", CogImageFileModeConstants.Read);
int ImageCount;
ImageCount = imagefile.Count;
If nonzero, indicates that the raising of the Changed event has been suspended. This value is incremented when SuspendChangedEvent is called and decremented when ResumeAndRaiseChangedEvent is called.If true, the serializable state of this object has changed since the last time it was serialized.Should be set to true when called from your public Dispose() method, thus disposing of all managed and unmanaged resources. It should be set to false when called from your Finalizer, thus disposing of only unmanaged resources.Releases all resources used by this class instance. Only derived classes that implement Dispose should call this method; Other clients who wish to explicitly release resources should call IDisposable.Dispose. Do not attempt to access an object after it has been disposed.Returns a deep copy of this class instance. Derived classes that implement Clone should override this method; other clients who wish to clone this instance should call ICloneable.Clone. See also CogSerializer.DeepCopyObjectTemporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.Re-enables raising of the Changed event after SuspendChangedEvent has been called. Also raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.The array into which to copy.The index from which to start copying.Copies the contents of this collection to an array.The name of the image file to open.A value that indicates that mode in which to open the image file.Opens an image file using the image file provider that corresponds to the file's extension. If more than one image file provider supports the extension, the one selected is undefined.If you do not specify an file open mode, defaults to Read .-1EmptycogFA_Misc
The property is changed.
Open an image file. is not a value.An error occurred while opening the specified file.A supplied image file extension was not recognized.
Imports Cognex.VisionPro.ImageFile
' Append an image to a file
Dim ImageFile1 As New CogImageFile
ImageFile1.Open("c:\image.bmp", CogImageFileModeConstants.Read)
using Cognex.VisionPro.ImageFile;
// Append an image to a file
CogImageFile ImageFile1= new CogImageFile();
ImageFile1.Open("c:\\image.bmp", CogImageFileModeConstants.Read);
Close an open image file.Closes the open image file and sets the property to "". If an image file is not currently open, calling has no effect.-1EmptycogFA_Misc
The property is changed.
Imports Cognex.VisionPro.ImageFile
' Append an image to a file
Dim ImageFile1 As New CogImageFile
Dim Image As CogImage8Grey
ImageFile1.Open("c:\image.bmp", CogImageFileModeConstants.Read)
Image = ImageFile1(0)
using Cognex.VisionPro.ImageFile;
// Append an image to a file
CogImageFile ImageFile1= new CogImageFile();
CogImage8Grey Image;
ImageFile1.Open("c:\\image.bmp", CogImageFileModeConstants.Read);
Image =(CogImage8Grey) ImageFile1[0];
ImageFile1.Close();
The to append to file. is NULL.No file is open.The image file is not opened in a mode that permits writing.The image provider does not support multiple images.Append image to end of file.
The new image count is provided in .
The following state flag may be affected:
Appends an image to the end of an image file.
Imports Cognex.VisionPro.ImageFile
' Append an image to a file
Dim ImageFile1 As New CogImageFile
Dim Image As CogImage8Grey
ImageFile1.Open("c:\image.bmp", CogImageFileModeConstants.Read)
Image = ImageFile1(0)
ImageFile1.Close()
Dim ImageFile2 As New CogImageFile
ImageFile2.Open("c:\image_copy.bmp", CogImageFileModeConstants.Write)
ImageFile2.Append(Image)
ImageFile2.Close()
using Cognex.VisionPro.ImageFile;
// Append an image to a file
CogImageFile ImageFile1= new CogImageFile();
CogImage8Grey Image;
ImageFile1.Open("c:\\image.bmp", CogImageFileModeConstants.Read);
Image =(CogImage8Grey) ImageFile1[0];
ImageFile1.Close();
CogImageFile ImageFile2 =new CogImageFile();
ImageFile2.Open("c:\\image_copy.bmp", CogImageFileModeConstants.Write);
ImageFile2.Append(Image);
ImageFile2.Close();
The image indices to delete.No file is open.The file is not open for writing.Delete the specified images from the current open file.Delete the specified images from the current open file. You specify the images to delete by supplying
a dynamic array containing the indices of the images to delete.
The disk space occupied by the deleted images is reclaimed.
The number of images in the file has changed.
The following state flag may be affected:
The index of the image to delete.Delete the specified image from the current open file.No file is open.The file is not open for writing.Delete the specified image from the current open file. This function is equivalent to
, except that you supply a single image index as an Integer.
The number of images in the file has changed.
The following state flag may be affected:
Occurs when one or more parts of the object's state may have changed.Object supporting access to .bmp files.Interface that supports access to bitmap (.bmp) image files.24-bit color bitmap files are opened in color. Bitmap files of any other day are converted to grey-scale first.The instance to copy from.Constructs a new instance of this class as a deep copy of the given instance.Constructs a new instance of this class.n/aConstructs a new instance of this class using com pointer.This bit will be set in the EventArgs of a Changed event every time the value returned by XPelsPerMeter may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by YPelsPerMeter may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by Count may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by FileName may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by OpenMode may have changed.
The property is changed.
The following state flag may be affected:
The biYPelsPerMeter field of the bitmap header of the last image read or the next image to be written.The biYPelsPerMeter field of the bitmap header of the last image read or the next image to be written. This property defaults to zero because many applications that write bitmaps set the biYPelsPerMeter field to zero.0The biXPelsPerMeter field of the bitmap header of the last image read or the next image to be written. This property defaults to zero because many applications that write bitmaps set the biXPelsPerMeter field to zero.0
The property is changed.
The following state flag may be affected:
The biXPelsPerMeter field of the bitmap header of the last image read or the next image to be written.If nonzero, indicates that the raising of the Changed event has been suspended. This value is incremented when SuspendChangedEvent is called and decremented when ResumeAndRaiseChangedEvent is called.If true, the serializable state of this object has changed since the last time it was serialized.Description of this file type to be used in a Common File Dialog.Text string with a description of this file type. Can be used in a control.A string that contains a semicolon separated list of file types that this image file provider can read or write. The following example string specifies file types for a Cognex Image Database provider: "idb;cdb".Semicolon separated list of file types that this provider can read or write.Mode in which the file was opened (or cogImageFile_Closed if no file open).Mode in which the file was opened, or if no file is open. This is a read only property.Name of the last opened file.NULLName of last opened file.The index of the item to get or set.Gets or sets the item at the specified index. In C#, this property is the indexer for the collection.Gets an object that can be used to synchronize access to this collection.Gets a value indicating whether access to this collection is synchronized (thread-safe).Gets the number of items contained in this collection.Should be set to true when called from your public Dispose() method, thus disposing of all managed and unmanaged resources. It should be set to false when called from your Finalizer, thus disposing of only unmanaged resources.Releases all resources used by this class instance. Only derived classes that implement Dispose should call this method; Other clients who wish to explicitly release resources should call IDisposable.Dispose. Do not attempt to access an object after it has been disposed.The array into which to copy.The index from which to start copying.Copies the contents of this collection to an array.The name of the file to open.A
value indicating the mode in which to open the image file. is not a value.An error occurred while opening the specified file.Opens an image file using the image file provider that corresponds to the file's extension. If more than one image file provider supports the extension, the one selected is undefined.Read.-1EmptycogFA_Misc
The state has changed.
Open an image file using the given mode.-1EmptycogFA_Misc
The state has changed.
Closes the open image file and sets the property to "". If an image file is not currently open, calling has no effect.Close an open image file.The to append to file.Appends an image to the end of an image file.
The new image count is provided in .
The following state flag may be affected:
is NULL.No image file is open.The image file is not opened in a mode that permits writing.Append image to end of an open file.The image indices to delete.No file is open.The file is not open for writing.
The number of images in the file has changed.
The following state flag may be affected:
Delete the specified images from the current open file. You specify the images to delete by supplying
a dynamic array containing the indices of the images to delete.
The storage space occupied by the deleted images is reclaimed.
Delete the specified images from the current open file.Returns a deep copy of this class instance. Derived classes that implement Clone should override this method; other clients who wish to clone this instance should call ICloneable.Clone. See also CogSerializer.DeepCopyObjectTemporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.Re-enables raising of the Changed event after SuspendChangedEvent has been called. Also raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.Occurs when one or more parts of the object's state may have changed.Object supporting access to .cdb /.idb files.Interface that supports access to Cognex image database (.cdb, .idb) files.
When you save an image to a Cognex image file (.IDB) or Cognex image database (.CDB) using this tool, the
tool saves the image, the selected space name of the image, and the coordinate space tree associated with the image.
When you load an image from an .IDB or .CDB file, the selected space and the coordinate space tree are both restored
as well.
The instance to copy from.Constructs a new instance of this class as a deep copy of the given instance.Constructs a new instance of this class.n/aConstructs a new instance of this class using com pointer.This bit will be set in the EventArgs of a Changed event every time the value returned by Count may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by FileName may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by OpenMode may have changed.If nonzero, indicates that the raising of the Changed event has been suspended. This value is incremented when SuspendChangedEvent is called and decremented when ResumeAndRaiseChangedEvent is called.If true, the serializable state of this object has changed since the last time it was serialized.Description of this file type to be used in a Common File Dialog.Text string with a description of this file type. Can be used in a control.Semicolon separated list of file types that this provider can read or write.A string that contains a semicolon separated list of file types that this image file provider can read or write. The following example string specifies file types for a Cognex Image Database provider: "idb;cdb".Mode in which the file was opened (or cogImageFile_Closed if no file open).Mode in which the file was opened, or if no file is open. This is a read only property.Name of the last opened file.NULLName of last opened file.The index of the item to get or set.Gets or sets the item at the specified index. In C#, this property is the indexer for the collection.Gets an object that can be used to synchronize access to this collection.Gets a value indicating whether access to this collection is synchronized (thread-safe).Gets the number of items contained in this collection.Should be set to true when called from your public Dispose() method, thus disposing of all managed and unmanaged resources. It should be set to false when called from your Finalizer, thus disposing of only unmanaged resources.Releases all resources used by this class instance. Only derived classes that implement Dispose should call this method; Other clients who wish to explicitly release resources should call IDisposable.Dispose. Do not attempt to access an object after it has been disposed.The array into which to copy.The index from which to start copying.Copies the contents of this collection to an array.The name of the file to open.A
value indicating the mode in which to open the image file.-1EmptycogFA_Misc
The state has changed.
is not a value.An error occurred while opening the specified file.Open an image file using the given mode.Opens an image file using the image file provider that corresponds to the file's extension. If more than one image file provider supports the extension, the one selected is undefined.Read.-1EmptycogFA_Misc
The state has changed.
Close an open image file.Closes the open image file and sets the property to "". If an image file is not currently open, calling has no effect.The to append to file.Appends an image to the end of an image file.Append image to end of an open file.
The new image count is provided in .
The following state flag may be affected:
is NULL.No image file is open.The image file is not opened in a mode that permits writing.The image indices to delete.No file is open.The file is not open for writing.Delete the specified images from the current open file.Delete the specified images from the current open file. You specify the images to delete by supplying
a dynamic array containing the indices of the images to delete.
The storage space occupied by the deleted images is reclaimed.
The number of images in the file has changed.
The following state flag may be affected:
Returns a deep copy of this class instance. Derived classes that implement Clone should override this method; other clients who wish to clone this instance should call ICloneable.Clone. See also CogSerializer.DeepCopyObjectTemporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.Re-enables raising of the Changed event after SuspendChangedEvent has been called. Also raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.The index for the image comment to retrieve.The value supplied for is out of rangeThe image comment.Reads the comment at the given image collection index.Read the comment at the given index.The to append to file.A comment that describes the image. is NULL.No File is openThe image file is not opened in a mode that permits writing.Append image and comment to end of file.Appends an image and comment to the end of an image database file. This function also
appends the selected space of the image and the coordinate space tree associated with the image.
The new image count is provided in .
The following state flag may be affected:
Occurs when one or more parts of the object's state may have changed.Object supporting access to .jpg files.The instance to copy from.Constructs a new instance of this class as a deep copy of the given instance.Constructs a new instance of this class.n/aConstructs a new instance of this class using com pointer.This bit will be set in the EventArgs of a Changed event every time the value returned by Quality may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by Count may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by FileName may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by OpenMode may have changed.Quality to use for writing JPEG files in the range 0-100. Default value is 100.If nonzero, indicates that the raising of the Changed event has been suspended. This value is incremented when SuspendChangedEvent is called and decremented when ResumeAndRaiseChangedEvent is called.If true, the serializable state of this object has changed since the last time it was serialized.Text string with a description of this file type. Can be used in a control.Description of this file type to be used in a Common File Dialog.Semicolon separated list of file types that this provider can read or write.A string that contains a semicolon separated list of file types that this image file provider can read or write. The following example string specifies file types for a Cognex Image Database provider: "idb;cdb".Mode in which the file was opened, or if no file is open. This is a read only property.Mode in which the file was opened (or cogImageFile_Closed if no file open).Name of the last opened file.NULLName of last opened file.The index of the item to get or set.Gets or sets the item at the specified index. In C#, this property is the indexer for the collection.Gets an object that can be used to synchronize access to this collection.Gets a value indicating whether access to this collection is synchronized (thread-safe).Gets the number of items contained in this collection.Should be set to true when called from your public Dispose() method, thus disposing of all managed and unmanaged resources. It should be set to false when called from your Finalizer, thus disposing of only unmanaged resources.Releases all resources used by this class instance. Only derived classes that implement Dispose should call this method; Other clients who wish to explicitly release resources should call IDisposable.Dispose. Do not attempt to access an object after it has been disposed.The array into which to copy.The index from which to start copying.Copies the contents of this collection to an array.The name of the file to open.A
value indicating the mode in which to open the image file. is not a value.An error occurred while opening the specified file.Open an image file using the given mode.-1EmptycogFA_Misc
The state has changed.
Opens an image file using the image file provider that corresponds to the file's extension. If more than one image file provider supports the extension, the one selected is undefined.Read.Close an open image file.-1EmptycogFA_Misc
The state has changed.
Closes the open image file and sets the property to "". If an image file is not currently open, calling has no effect.The to append to file.
The new image count is provided in .
The following state flag may be affected:
Append image to end of an open file. is NULL.No image file is open.The image file is not opened in a mode that permits writing.Appends an image to the end of an image file.The image indices to delete.Delete the specified images from the current open file.Delete the specified images from the current open file. You specify the images to delete by supplying
a dynamic array containing the indices of the images to delete.
The storage space occupied by the deleted images is reclaimed.
No file is open.The file is not open for writing.
The number of images in the file has changed.
The following state flag may be affected:
Returns a deep copy of this class instance. Derived classes that implement Clone should override this method; other clients who wish to clone this instance should call ICloneable.Clone. See also CogSerializer.DeepCopyObjectTemporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.Re-enables raising of the Changed event after SuspendChangedEvent has been called. Also raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.Occurs when one or more parts of the object's state may have changed.Object supporting access to .png files.The instance to copy from.Constructs a new instance of this class as a deep copy of the given instance.Constructs a new instance of this class.n/aConstructs a new instance of this class using com pointer.This bit will be set in the EventArgs of a Changed event every time the value returned by Count may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by FileName may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by OpenMode may have changed.If nonzero, indicates that the raising of the Changed event has been suspended. This value is incremented when SuspendChangedEvent is called and decremented when ResumeAndRaiseChangedEvent is called.If true, the serializable state of this object has changed since the last time it was serialized.Text string with a description of this file type. Can be used in a control.Description of this file type to be used in a Common File Dialog.Semicolon separated list of file types that this provider can read or write.A string that contains a semicolon separated list of file types that this image file provider can read or write. The following example string specifies file types for a Cognex Image Database provider: "idb;cdb".Mode in which the file was opened (or cogImageFile_Closed if no file open).Mode in which the file was opened, or if no file is open. This is a read only property.Name of last opened file.Name of the last opened file.NULLThe index of the item to get or set.Gets or sets the item at the specified index. In C#, this property is the indexer for the collection.Gets an object that can be used to synchronize access to this collection.Gets a value indicating whether access to this collection is synchronized (thread-safe).Gets the number of items contained in this collection.Should be set to true when called from your public Dispose() method, thus disposing of all managed and unmanaged resources. It should be set to false when called from your Finalizer, thus disposing of only unmanaged resources.Releases all resources used by this class instance. Only derived classes that implement Dispose should call this method; Other clients who wish to explicitly release resources should call IDisposable.Dispose. Do not attempt to access an object after it has been disposed.The array into which to copy.The index from which to start copying.Copies the contents of this collection to an array.The name of the file to open.A
value indicating the mode in which to open the image file.Opens an image file using the image file provider that corresponds to the file's extension. If more than one image file provider supports the extension, the one selected is undefined.Read.-1EmptycogFA_Misc
The state has changed.
Open an image file using the given mode. is not a value.An error occurred while opening the specified file.-1EmptycogFA_Misc
The state has changed.
Close an open image file.Closes the open image file and sets the property to "". If an image file is not currently open, calling has no effect.The to append to file. is NULL.No image file is open.The image file is not opened in a mode that permits writing.Append image to end of an open file.Appends an image to the end of an image file.
The new image count is provided in .
The following state flag may be affected:
The image indices to delete.No file is open.The file is not open for writing.
The number of images in the file has changed.
The following state flag may be affected:
Delete the specified images from the current open file. You specify the images to delete by supplying
a dynamic array containing the indices of the images to delete.
The storage space occupied by the deleted images is reclaimed.
Delete the specified images from the current open file.Returns a deep copy of this class instance. Derived classes that implement Clone should override this method; other clients who wish to clone this instance should call ICloneable.Clone. See also CogSerializer.DeepCopyObjectTemporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.Re-enables raising of the Changed event after SuspendChangedEvent has been called. Also raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.Occurs when one or more parts of the object's state may have changed.Object supporting access to .tif files.Interface that supports access to Tagged Image File Format (.tif) files.24-bit color TIFF files are opened in color; each plane of the color image must be an 8-bit image.The instance to copy from.Constructs a new instance of this class as a deep copy of the given instance.Constructs a new instance of this class.n/aConstructs a new instance of this class using com pointer.This bit will be set in the EventArgs of a Changed event every time the value returned by Count may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by FileName may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by OpenMode may have changed.If nonzero, indicates that the raising of the Changed event has been suspended. This value is incremented when SuspendChangedEvent is called and decremented when ResumeAndRaiseChangedEvent is called.If true, the serializable state of this object has changed since the last time it was serialized.Text string with a description of this file type. Can be used in a control.Description of this file type to be used in a Common File Dialog.A string that contains a semicolon separated list of file types that this image file provider can read or write. The following example string specifies file types for a Cognex Image Database provider: "idb;cdb".Semicolon separated list of file types that this provider can read or write.Mode in which the file was opened, or if no file is open. This is a read only property.Mode in which the file was opened (or cogImageFile_Closed if no file open).Name of last opened file.Name of the last opened file.NULLThe index of the item to get or set.Gets or sets the item at the specified index. In C#, this property is the indexer for the collection.Gets an object that can be used to synchronize access to this collection.Gets a value indicating whether access to this collection is synchronized (thread-safe).Gets the number of items contained in this collection.Should be set to true when called from your public Dispose() method, thus disposing of all managed and unmanaged resources. It should be set to false when called from your Finalizer, thus disposing of only unmanaged resources.Releases all resources used by this class instance. Only derived classes that implement Dispose should call this method; Other clients who wish to explicitly release resources should call IDisposable.Dispose. Do not attempt to access an object after it has been disposed.The array into which to copy.The index from which to start copying.Copies the contents of this collection to an array.The name of the file to open.A
value indicating the mode in which to open the image file.Opens an image file using the image file provider that corresponds to the file's extension. If more than one image file provider supports the extension, the one selected is undefined.Read.Open an image file using the given mode. is not a value.An error occurred while opening the specified file.-1EmptycogFA_Misc
The state has changed.
Closes the open image file and sets the property to "". If an image file is not currently open, calling has no effect.-1EmptycogFA_Misc
The state has changed.
Close an open image file.The to append to file.
The new image count is provided in .
The following state flag may be affected:
is NULL.No image file is open.The image file is not opened in a mode that permits writing.Append image to end of an open file.Appends an image to the end of an image file.The image indices to delete.No file is open.The file is not open for writing.
The number of images in the file has changed.
The following state flag may be affected:
Delete the specified images from the current open file.Delete the specified images from the current open file. You specify the images to delete by supplying
a dynamic array containing the indices of the images to delete.
The storage space occupied by the deleted images is reclaimed.
Returns a deep copy of this class instance. Derived classes that implement Clone should override this method; other clients who wish to clone this instance should call ICloneable.Clone. See also CogSerializer.DeepCopyObjectTemporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.Re-enables raising of the Changed event after SuspendChangedEvent has been called. Also raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.The index position of the image.The image tag for which to retrieve data.Reads the data associated with the specified image tag. If the TIFF count field for this tag is greater than one and the tag does not contain ASCII information,
returns an array containing the tag data.
returns an empty variant if the tag does not exist.Read the data associated with the specified tag.The index specified for is out of range.The data associated with the specified image tag, or an empty variant if the tag does not exist.Occurs when one or more parts of the object's state may have changed.Interface for the image file tool, which is used to record to and play back images from an image file.The image file tool.The instance to copy from.Constructs a new instance of this class as a deep copy of the given instance.Constructs a new instance of this class.n/aConstructs a new instance of this class using com pointer.This bit will be set in the EventArgs of a Changed event every time the value returned by LastRunRecordEnable may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by LastRunRecordDiagEnable may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by CurrentRecordEnable may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by Operator may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by CurrentImageIndex may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by NextImageIndex may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by ImageIndexIncrement may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by OutputImage may have changed.This bit will be set in the EventArgs of a Changed event every time the value returned by InputImage may have changed.Input image. This property may be set to enable recording.0Returns or sets the input image, which is used to enable image recording. In record mode, the input image is appended to the currently open image file.
Fires when the value of this property changes.
The following state flag may be affected:
In read (playback) mode, when the tool is run the output image is set to the current image in the open image. Each invocation of updates .Output image. This is updated by each invocation of Run.
Fires when the value of this property changes.
The following state flag may be affected:
1Number of images to increment after invocation of . Used when scrolling through an open image file.Number of images to increment after invocation of Run.
Fires when the value of this property changes.
The following state flag may be affected:
Next image index.0Next image index. When the Operator opens a new image file, the property is set to zero if the file is opened for reading or writing; or set to NumImages if the file is opened for update. is reset to the default any time the operator is changed.-1Current image index within the currently open image file. If a new file is opened for reading (playback mode) or writing (record mode), is set to -1. If the file is opened for update, is set to NumImages - 1.Current image index.Returns or sets the operator for this tool.If a new operator has an open mode of read or close, sets to -1 and to 0. If the new operator has an open mode of write or update, sets to NumImages - 1 and to NumImages.Operator of the tool.
Fires when the value of this property changes.
The following state flags may be affected:
Enable creation of records by bitwise ORing the appropriate CurrentRecordConstants.Enable creation of records by bitwise ORing the appropriate CurrentRecordConstants.
Fires when the value of this property changes.
The following state flag may be affected:
Enable creation of records by bitwise ORing the appropriate LastRunRecordDiagConstants. These are diagnostic records that may cause the Tool to have a longer execution time.Enable creation of records by bitwise ORing the appropriate LastRunRecordDiagConstants. These are diagnostic records that may cause the Tool to have a longer execution time.
Fires when the value of this property changes.
The following state flag may be affected:
Enable creation of records by bitwise ORing the appropriate LastRunRecordConstants.Enable creation of records by bitwise ORing the appropriate LastRunRecordConstants.
Fires when the value of this property changes.
The following state flag may be affected:
Gets general information about the last call to Run.Gets or sets the name of the tool.Returns a deep copy of this class instance. Derived classes that implement Clone should override this method; other clients who wish to clone this instance should call ICloneable.Clone. See also CogSerializer.DeepCopyObject.
Fires before the tool runs.
Fires when the tool runs. If the run was successful, results are generated;
if the run was not successful, no results are generated and the previous results are cleared.
Use after returns or in a
event handler
to determine whether a run was successful or unsuccessful.
The following state flags may be affected:
Fires after the tool runs.
Runs the tool using the current parameter settings.Performs the tool's primary function. In read (playback) mode, the tool sets the to the current image in the open image file. In write (record) mode, the tool appends the to the current open image file.n/aReleases all resources used by this class instance. Only derived classes that implement Dispose should call this method; Other clients who wish to explicitly release resources should call IDisposable.Dispose. Do not attempt to access an object after it has been disposed.Implements methods and properties used by objects that support access to specific image file formats.Interface implemented by all objects that support a specific image file format.Text string with a description of this file type. Can be used in a control.Description of this file type to be used in a Common File Dialog.Semicolon separated list of file types that this provider can read or write.A string that contains a semicolon separated list of file types that this image file provider can read or write. The following example string specifies file types for a Cognex Image Database provider: "idb;cdb".Mode in which the file was opened (or cogImageFile_Closed if no file open).Mode in which the file was opened, or if no file is open. This is a read only property.Name of last opened file.Name of the last opened file.NULLThe name of the file to open.A
value indicating the mode in which to open the image file. is not a value.An error occurred while opening the specified file.-1EmptycogFA_Misc
The state has changed.
Opens an image file using the image file provider that corresponds to the file's extension. If more than one image file provider supports the extension, the one selected is undefined.Read.Open an image file using the given mode.Close an open image file.-1EmptycogFA_Misc
The state has changed.
Closes the open image file and sets the property to "". If an image file is not currently open, calling has no effect.The to append to file.Appends an image to the end of an image file.Append image to end of an open file.
The new image count is provided in .
The following state flag may be affected:
is NULL.No image file is open.The image file is not opened in a mode that permits writing.The image indices to delete.Delete the specified images from the current open file.No file is open.The file is not open for writing.Delete the specified images from the current open file. You specify the images to delete by supplying
a dynamic array containing the indices of the images to delete.
The storage space occupied by the deleted images is reclaimed.
The number of images in the file has changed.
The following state flag may be affected:
Enumeration of file open modes.An enumeration of image file open modes.Creates a new image file for reading and writing.Mode for creating a new file for reading and writing.Mode for opening an existing file for reading.Opens an existing image file for reading.Opens an existing image file for reading and writing.Mode for opening an existing file for reading and writing.Mode returned when no image file is open. It is not valid to open a file in this mode.Mode returned when no file is open - no valid to open in this mode.Enumeration of Non-Diagnostic data that can be provided in the Tool's LastRunRecord.
Use these constants with
to specify the
tool records that the
CogImageFile Tool
generates when you call
.
Enumeration of Diagnostic data that can be returned by the Tool's CreateLastRunRecord function.
Use these constants with
to specify the
diagnostic
tool records that the
CogImageFile Tool
generates when you call
.
Enumeration of data that can be provided in the Tool's CurrentRecord.
Use these constants with
to specify the
tool records that the
CogImageFile Tool
generates when you call
.
Occurs when one or more parts of the object's state may have changed.Occurs when one or more parts of the object's state may have changed.Occurs when one or more parts of the object's state may have changed.Occurs when one or more parts of the object's state may have changed.Occurs when one or more parts of the object's state may have changed.Occurs when one or more parts of the object's state may have changed.