WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
ImageBase Class Reference
Inheritance diagram for ImageBase:
ErrorBase ColorImage MonoImage HSLImage RGBImage BinaryImage

Public Member Functions

 ImageBase (ImageType type)
 Create a new instance of an ImageBase. More...
 
virtual ~ImageBase ()
 Frees memory associated with an ImageBase. More...
 
virtual void Write (const char *fileName)
 Writes an image to a file with the given filename. More...
 
int GetHeight ()
 Gets the height of an image. More...
 
int GetWidth ()
 Gets the width of an image. More...
 
Image * GetImaqImage ()
 Access the internal IMAQ Image data structure. More...
 
- Public Member Functions inherited from ErrorBase
 ErrorBase (const ErrorBase &)=delete
 
ErrorBaseoperator= (const ErrorBase &)=delete
 
virtual ErrorGetError ()
 Retrieve the current error. More...
 
virtual const ErrorGetError () const
 
virtual void SetErrnoError (llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef 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, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) const
 Set the current error information associated from the nivision Imaq API. More...
 
virtual void SetError (Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) const
 Set the current error information associated with this sensor. More...
 
virtual void SetWPIError (llvm::StringRef errorMessage, Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) const
 Set the current error information associated with this sensor. More...
 
virtual void CloneError (const 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, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber)
 
static void SetGlobalWPIError (llvm::StringRef errorMessage, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber)
 
static ErrorGetGlobalError ()
 Retrieve the current global error.
 
- Static Protected Attributes inherited from ErrorBase
static priority_mutex _globalErrorMutex
 
static Error _globalError
 

Constructor & Destructor Documentation

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.

Parameters
typeThe type of image to create
ImageBase::~ImageBase ( )
virtual

Frees memory associated with an ImageBase.

Destructor frees the imaq image allocated with the class.

Member Function Documentation

int ImageBase::GetHeight ( )

Gets the height of an image.

Returns
The height of the image in pixels.
Image * ImageBase::GetImaqImage ( )

Access the internal IMAQ Image data structure.

Returns
A pointer to the internal IMAQ Image data structure.
int ImageBase::GetWidth ( )

Gets the width of an image.

Returns
The width of the image in pixels.
void ImageBase::Write ( const char *  fileName)
virtual

Writes an image to a file with the given filename.

Write the image to a file in the flash on the cRIO.

Parameters
fileNameThe name of the file to write

Reimplemented in BinaryImage.


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