Public Member Functions | |
ImageBase (ImageType type) | |
virtual | ~ImageBase () |
virtual void | Write (const char *fileName) |
int | GetHeight () |
int | GetWidth () |
Image * | GetImaqImage () |
Public Member Functions inherited from ErrorBase | |
virtual Error & | GetError () |
Retrieve the current error. Get the current error information associated with this sensor. | |
virtual const Error & | GetError () const |
virtual void | SetErrnoError (const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const |
Set error information associated with a C library call that set an error to the "errno" global variable. More... | |
virtual void | SetImaqError (int success, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const |
Set the current error information associated from the nivision Imaq API. More... | |
virtual void | SetError (Error::Code code, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const |
Set the current error information associated with this sensor. More... | |
virtual void | SetWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const |
Set the current error information associated with this sensor. More... | |
virtual void | CloneError (ErrorBase *rhs) const |
virtual void | ClearError () const |
Clear the current error information associated with this sensor. | |
virtual bool | StatusIsFatal () const |
Check if the current error code represents a fatal error. More... | |
Protected Attributes | |
Image * | m_imaqImage |
Protected Attributes inherited from ErrorBase | |
Error | m_error |
Additional Inherited Members | |
Static Public Member Functions inherited from ErrorBase | |
static void | SetGlobalError (Error::Code code, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) |
static void | SetGlobalWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) |
static Error & | GetGlobalError () |
Protected Member Functions inherited from ErrorBase | |
ErrorBase () | |
Initialize the instance status to 0 for now. | |
Static Protected Attributes inherited from ErrorBase | |
static SEM_ID | _globalErrorMutex = semMCreate(SEM_Q_PRIORITY | SEM_DELETE_SAFE | SEM_INVERSION_SAFE) |
static Error | _globalError |
Definition at line 16 of file ImageBase.h.
ImageBase::ImageBase | ( | ImageType | type | ) |
Create a new instance of an ImageBase. Imagebase is the base of all the other image classes. The constructor creates any type of image and stores the pointer to it in the class.
type | The type of image to create |
Definition at line 19 of file ImageBase.cpp.
|
virtual |
Frees memory associated with an ImageBase. Destructor frees the imaq image allocated with the class.
Definition at line 28 of file ImageBase.cpp.
int ImageBase::GetHeight | ( | ) |
Gets the height of an image.
Definition at line 50 of file ImageBase.cpp.
Image * ImageBase::GetImaqImage | ( | ) |
Access the internal IMAQ Image data structure.
Definition at line 73 of file ImageBase.cpp.
int ImageBase::GetWidth | ( | ) |
Gets the width of an image.
Definition at line 61 of file ImageBase.cpp.
|
virtual |
Writes an image to a file with the given filename. Write the image to a file in the flash on the cRIO.
fileName | The name of the file to write |
Reimplemented in BinaryImage.
Definition at line 39 of file ImageBase.cpp.