vrpn 07.35
Virtual Reality Peripheral Network
|
Helper function to convert data for a sub-region of one channel of. More...
#include <vrpn_Imager.h>
Public Member Functions | |
vrpn_Imager_Region (void) | |
vrpn_uint32 | getNumVals () const |
Returns the number of values in the region. | |
bool | read_unscaled_pixel (vrpn_uint16 c, vrpn_uint16 r, vrpn_uint8 &val, vrpn_uint16 d=0) const |
Reads pixel from the region with no scale and offset applied to the value. Not the most efficient way to read the pixels out – use the block read routines. | |
bool | read_unscaled_pixel (vrpn_uint16 c, vrpn_uint16 r, vrpn_uint16 &val, vrpn_uint16 d=0) const |
Reads pixel from the region with no scale and offset applied to the value. Not. | |
bool | read_unscaled_pixel (vrpn_uint16 c, vrpn_uint16 r, vrpn_float32 &val, vrpn_uint16 d=0) const |
Reads pixel from the region with no scale and offset applied to the value. Not. | |
bool | decode_unscaled_region_using_base_pointer (vrpn_uint8 *data, vrpn_uint32 colStride, vrpn_uint32 rowStride, vrpn_uint32 depthStride=0, vrpn_uint16 nRows=0, bool invert_rows=false, unsigned repeat=1) const |
As efficiently as possible, pull the values out of the VRPN buffer and put them into the array whose pointer is passed in, transcoding as needed to convert it into the type of the pointer passed in. | |
bool | decode_unscaled_region_using_base_pointer (vrpn_uint16 *data, vrpn_uint32 colStride, vrpn_uint32 rowStride, vrpn_uint32 depthStride=0, vrpn_uint16 nRows=0, bool invert_rows=false, unsigned repeat=1) const |
bool | decode_unscaled_region_using_base_pointer (vrpn_float32 *data, vrpn_uint32 colStride, vrpn_uint32 rowStride, vrpn_uint32 depthStride=0, vrpn_uint16 nRows=0, bool invert_rows=false, unsigned repeat=1) const |
vrpn_uint16 | get_val_type (void) const |
Public Attributes | |
vrpn_int16 | d_chanIndex |
vrpn_uint16 | d_rMin |
vrpn_uint16 | d_rMax |
vrpn_uint16 | d_cMin |
vrpn_uint16 | d_cMax |
vrpn_uint16 | d_dMin |
vrpn_uint16 | d_dMax |
Protected Attributes | |
const void * | d_valBuf |
vrpn_uint16 | d_valType |
bool | d_valid |
Friends | |
class VRPN_API | vrpn_Imager_Remote |
void VRPN_CALLBACK | java_vrpn_handle_region_change (void *userdata, const vrpn_IMAGERREGIONCB info) |
Helper function to convert data for a sub-region of one channel of.
Definition at line 442 of file vrpn_Imager.h.
|
inline |
Definition at line 449 of file vrpn_Imager.h.
References vrpn_IMAGER_VALTYPE_UNKNOWN.
bool vrpn_Imager_Region::decode_unscaled_region_using_base_pointer | ( | vrpn_float32 * | data, |
vrpn_uint32 | colStride, | ||
vrpn_uint32 | rowStride, | ||
vrpn_uint32 | depthStride = 0 , |
||
vrpn_uint16 | nRows = 0 , |
||
bool | invert_rows = false , |
||
unsigned | repeat = 1 |
||
) | const |
bool vrpn_Imager_Region::decode_unscaled_region_using_base_pointer | ( | vrpn_uint16 * | data, |
vrpn_uint32 | colStride, | ||
vrpn_uint32 | rowStride, | ||
vrpn_uint32 | depthStride = 0 , |
||
vrpn_uint16 | nRows = 0 , |
||
bool | invert_rows = false , |
||
unsigned | repeat = 1 |
||
) | const |
Definition at line 1610 of file vrpn_Imager.C.
References d_cMax, d_cMin, d_dMax, d_dMin, d_rMax, d_rMin, d_valBuf, d_valType, vrpn_IMAGER_VALTYPE_UINT12IN16, vrpn_IMAGER_VALTYPE_UINT16, and vrpn_IMAGER_VALTYPE_UINT8.
bool vrpn_Imager_Region::decode_unscaled_region_using_base_pointer | ( | vrpn_uint8 * | data, |
vrpn_uint32 | colStride, | ||
vrpn_uint32 | rowStride, | ||
vrpn_uint32 | depthStride = 0 , |
||
vrpn_uint16 | nRows = 0 , |
||
bool | invert_rows = false , |
||
unsigned | repeat = 1 |
||
) | const |
As efficiently as possible, pull the values out of the VRPN buffer and put them into the array whose pointer is passed in, transcoding as needed to convert it into the type of the pointer passed in.
data: Points at the (0,0) element of the 2D array that is to hold the image. It is assumed that the data values should be copied exactly, and that offset and scale should be applied at the reading end by the user if they want to get them back into absolute units. repeat: How many times to copy each element (for example, this will be 3 if we are copying an unsigned 8-bit value from the network into the Red, Green, and Blue entries of a color map. colStride, rowStride: Number of elements (size of data type) to skip along a column and row. This tells how far to jump ahead when writing the next element in the row (must be larger or the same as the repeat) and how make elements to skip to get to the beginning of the next column. For example, copying a uint from the network into the Red, Green, and Blue elements of an RGBA texture would have repeat=3, colStride=4, and rowStride=4*(number of columns). numRows, invert_rows: numRows needs to equal the number of rows in the entire image if invert_rows is true; it is not used otherwise. invert_rows inverts the image in y as it is copying it into the user's buffer.
Definition at line 1441 of file vrpn_Imager.C.
References d_cMax, d_cMin, d_dMax, d_dMin, d_rMax, d_rMin, d_valBuf, d_valType, vrpn_IMAGER_VALTYPE_FLOAT32, vrpn_IMAGER_VALTYPE_UINT16, and vrpn_IMAGER_VALTYPE_UINT8.
|
inline |
Definition at line 611 of file vrpn_Imager.h.
|
inline |
Returns the number of values in the region.
Definition at line 459 of file vrpn_Imager.h.
|
inline |
Reads pixel from the region with no scale and offset applied to the value. Not.
Definition at line 552 of file vrpn_Imager.h.
References vrpn_IMAGER_VALTYPE_FLOAT32.
|
inline |
Reads pixel from the region with no scale and offset applied to the value. Not.
Definition at line 509 of file vrpn_Imager.h.
References vrpn_IMAGER_VALTYPE_UINT12IN16, and vrpn_IMAGER_VALTYPE_UINT16.
|
inline |
Reads pixel from the region with no scale and offset applied to the value. Not the most efficient way to read the pixels out – use the block read routines.
Definition at line 473 of file vrpn_Imager.h.
References vrpn_IMAGER_VALTYPE_UINT8.
|
friend |
|
friend |
Definition at line 443 of file vrpn_Imager.h.
vrpn_int16 vrpn_Imager_Region::d_chanIndex |
Definition at line 613 of file vrpn_Imager.h.
Referenced by vrpn_Imager_Remote::handle_region_message().
vrpn_uint16 vrpn_Imager_Region::d_cMax |
Definition at line 615 of file vrpn_Imager.h.
Referenced by decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), and vrpn_Imager_Remote::handle_region_message().
vrpn_uint16 vrpn_Imager_Region::d_cMin |
Definition at line 615 of file vrpn_Imager.h.
Referenced by decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), and vrpn_Imager_Remote::handle_region_message().
vrpn_uint16 vrpn_Imager_Region::d_dMax |
Definition at line 616 of file vrpn_Imager.h.
Referenced by decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), and vrpn_Imager_Remote::handle_region_message().
vrpn_uint16 vrpn_Imager_Region::d_dMin |
Definition at line 616 of file vrpn_Imager.h.
Referenced by decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), and vrpn_Imager_Remote::handle_region_message().
vrpn_uint16 vrpn_Imager_Region::d_rMax |
Definition at line 614 of file vrpn_Imager.h.
Referenced by decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), and vrpn_Imager_Remote::handle_region_message().
vrpn_uint16 vrpn_Imager_Region::d_rMin |
Definition at line 614 of file vrpn_Imager.h.
Referenced by decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), and vrpn_Imager_Remote::handle_region_message().
|
protected |
Definition at line 619 of file vrpn_Imager.h.
Referenced by decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), and vrpn_Imager_Remote::handle_region_message().
|
protected |
Definition at line 621 of file vrpn_Imager.h.
Referenced by vrpn_Imager_Remote::handle_region_message().
|
protected |
Definition at line 620 of file vrpn_Imager.h.
Referenced by decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), decode_unscaled_region_using_base_pointer(), and vrpn_Imager_Remote::handle_region_message().