User`s guide
Specifying the Format of the Image Data
5-7
names specified in the example in “Specifying Device and Format Information” on page
3-8.
int MyDeviceAdaptor::getMaxHeight() const{
if(strcmp(_formatName,"RS170"){
return 480;
} else {
return 576;
}
int MyDeviceAdaptor::getMaxWidth() const {
if(strcmp(_formatName,"RS170"){
return 640;
} else {
return 768;
}
}
int MyDeviceAdaptor::getNumberOfBands() const {
return 1;
}
Specifying Frame Type
In addition to the image frame dimensions, you must provide the engine with
information about the byte layout of the image data. Byte layout includes the number
of bits used to represent pixel values, whether the data is signed or unsigned, the
endianness of the data, and whether the device sends the bottom row first.
To specify this information, you must select one of the FRAMETYPE enumerations defined
by the adaptor kit. The adaptor kit defines enumerations for many different frame types
to represent the wide variety of formats supported by devices. For example, if your device
is a monochrome (black and white) device that returns 8-bit data, you might choose the
MONO8 frame type. If your device is a color device that returns 24-bit data, you might
choose the RGB24 frame type. The following table summarizes the frame types that are
available. To choose a specific format, view the list in the Image Acquisition Toolbox
Adaptor Kit API Reference documentation or open the AdaptorFrameTypes.h file.
Format Frame Types
Monochrome 8-, 10-, 12-, and 16-bit formats; both little-endian and big-endian;
in regular and flip formats. (In flip formats, the device delivers
the bottom line first.)