Another class for loading an image file that loads into the critical buffer m_frame inherited from class ImageAcquisition.
More...
#include <FileAcquisition.h>
|
| FileAcquisition (void) |
|
| ~FileAcquisition (void) |
|
bool | CaptureFrame () |
| image is already in m_frame, so there's nothing to do More...
|
|
bool | Close () |
|
bool | Init (int width, int height, const char *filename) |
| Initializes the buffers inherited from class ImageAcquisition with 2 bytes per pixel. More...
|
|
bool | Open () |
|
void | SetFile (const CString filePathName) |
|
| FileAcquisition (void) |
|
| ~FileAcquisition (void) |
|
bool | CaptureFrame () |
| image is already in m_frame, so there's nothing to do More...
|
|
bool | Close () |
|
bool | Init (int width, int height, const char *filename) |
|
bool | Open () |
|
void | SetFile (const CString filePathName) |
|
| ImageAcquisition (void) |
|
virtual | ~ImageAcquisition (void) |
|
void | GetFrame (void *buf) |
|
virtual bool | Init (int width, int height, int bytesPerPixel=4) |
| may be overridden, but be sure to call parent function also More...
|
|
unsigned int | BytesPerFrame () |
|
unsigned int | PixelsPerFrame () |
|
int | GetHeight () |
|
CString & | GetInfo () |
|
int | GetWidth () |
|
void | SetHeight (int height) |
|
void | SetWidth (int width) |
|
| ImageAcquisition (void) |
|
virtual | ~ImageAcquisition (void) |
|
void | GetFrame (void *buf) |
|
virtual bool | Init (int width, int height, int bytesPerPixel=4) |
| may be overridden, but be sure to call parent function also More...
|
|
unsigned int | BytesPerFrame () |
|
unsigned int | PixelsPerFrame () |
|
int | GetHeight () |
|
CString & | GetInfo () |
|
int | GetWidth () |
|
void | SetHeight (int height) |
|
void | SetWidth (int width) |
|
|
static UINT __cdecl | ThreadProc (LPVOID param) |
|
static UINT __cdecl | ThreadProc (LPVOID param) |
|
int | m_source_ID |
| The source ID for acquire_image() that indicates what type of device is in use. More...
|
|
int | m_device_ID |
| [Used Epiphan only]: indicates from which of the two sources to capture More...
|
|
std::string | m_ini_file |
| The fully-qualified name (including full path) of an Imatest INI file. More...
|
|
Another class for loading an image file that loads into the critical buffer m_frame inherited from class ImageAcquisition.
FileAcquisition::FileAcquisition |
( |
void |
| ) |
|
unsigned int m_numPixels
number of pixels in a frame
Definition: ImageAcquisition.h:56
void * m_buf
buffer to capture into
Definition: ImageAcquisition.h:58
CString m_filename
fully-qualified image file name
Definition: FileAcquisition.h:41
FileAcquisition::~FileAcquisition |
( |
void |
| ) |
|
FileAcquisition::FileAcquisition |
( |
void |
| ) |
|
FileAcquisition::~FileAcquisition |
( |
void |
| ) |
|
bool FileAcquisition::CaptureFrame |
( |
| ) |
|
|
inlinevirtual |
image is already in m_frame, so there's nothing to do
Implements ImageAcquisition.
bool FileAcquisition::CaptureFrame |
( |
| ) |
|
|
inlinevirtual |
image is already in m_frame, so there's nothing to do
Implements ImageAcquisition.
bool FileAcquisition::Close |
( |
| ) |
|
|
virtual |
bool FileAcquisition::Close |
( |
| ) |
|
|
virtual |
bool FileAcquisition::Init |
( |
int |
width, |
|
|
int |
height, |
|
|
const char * |
filename |
|
) |
| |
bool FileAcquisition::Init |
( |
int |
width, |
|
|
int |
height, |
|
|
const char * |
filename |
|
) |
| |
Initializes the buffers inherited from class ImageAcquisition with 2 bytes per pixel.
- Returns
- Returns TRUE if allocation is successful.
References ImageAcquisition::Init().
Referenced by COperatorConsoleApp::InitBlemishAcq(), and COperatorConsoleApp::InitSFRplusAcq().
virtual bool Init(int width, int height, int bytesPerPixel=4)
may be overridden, but be sure to call parent function also
Definition: ImageAcquisition.cpp:43
width
Definition: calculation_checks.m:1
height
Definition: calculation_checks.m:2
CString m_filename
fully-qualified image file name
Definition: FileAcquisition.h:41
bool FileAcquisition::LoadFile |
( |
| ) |
|
|
protected |
bool FileAcquisition::LoadFile |
( |
| ) |
|
|
protected |
Loads an image file through a filestream and then copies into m_buf.
Optionally, m_buf can be copied into the critical buffer, m_frame.
- Returns
- Returns TRUE if the file is loaded into m_buf, FALSE otherwise.
73 ifstream::pos_type size;
76 if (!filestream.is_open())
82 filestream.seekg(0, ios::end);
83 size = filestream.tellg();
84 filestream.seekg(0, ios::beg);
93 else if (
m_buf == NULL)
95 m_logMsg.Format(
"%s: m_buf is NULL", __FUNCTION__);
102 filestream.read((
char *)
m_buf, size);
104 m_logMsg.Format(
"%s: Read in %d bytes", __FUNCTION__, (
long)size);
CriticalBuf m_frame
shared memory to hold copy of current frame
Definition: ImageAcquisition.h:52
void Set(void *buf)
Definition: CriticalBuf.cpp:74
unsigned int m_numBytes
number of bytes in a frame
Definition: ImageAcquisition.h:55
void * m_buf
buffer to capture into
Definition: ImageAcquisition.h:58
CString m_logMsg
error or information message
Definition: ImageAcquisition.h:57
CString m_filename
fully-qualified image file name
Definition: FileAcquisition.h:41
bool FileAcquisition::Open |
( |
| ) |
|
|
virtual |
bool FileAcquisition::Open |
( |
| ) |
|
|
virtual |
void FileAcquisition::SetFile |
( |
const CString |
filePathName | ) |
|
|
inline |
References m_filename.
CString m_filename
fully-qualified image file name
Definition: FileAcquisition.h:41
void FileAcquisition::SetFile |
( |
const CString |
filePathName | ) |
|
|
inline |
References m_filename.
CString m_filename
fully-qualified image file name
Definition: FileAcquisition.h:41
CString FileAcquisition::m_filename |
|
protected |
fully-qualified image file name
Referenced by SetFile().
The documentation for this class was generated from the following files: