Functions | |
Boolean_t | TecUtilImageRGBBitmapCreate (BitDumpRegion_e Region) |
Call this function to initialize the export state if you are exporting using the RGB functions. | |
Boolean_t | TecUtilImageIndexedBitmapCreate (BitDumpRegion_e Region, short *RedColorTable_Array, short *GreenColorTable_Array, short *BlueColorTable_Array) |
Call this function to initialize the export state if you are exporting using the index functions. | |
void | TecUtilImageBitmapDestroy (void) |
Destroy the bitmap buffer. | |
Boolean_t | TecUtilImageGetDimensions (short *Width, short *Height) |
Gets the image dimensions. | |
Boolean_t | TecUtilImageRGBGetScanLine (short ScanLine, short *Red_Array, short *Green_Array, short *Blue_Array) |
Gets the RGB values of a scan line. | |
Boolean_t | TecUtilImageIndexedGetScanLine (short ScanLine, short *RGBIndex_Array) |
Gets the color table indices for a scan line. | |
void | TecUtilImageGetColorTable (Byte_t *Red_Array, Byte_t *Green_Array, Byte_t *Blue_Array) |
Get the color table, that is, the palette, of a color-reduced image. | |
Boolean_t | TecUtilImageBitmapCreateX (ArgList_pa ArgList) |
Create a true color or color-reduced bitmap of a specified width. |
Boolean_t TecUtilImageBitmapCreateX | ( | ArgList_pa | ArgList | ) |
Create a true color or color-reduced bitmap of a specified width.
ArgList | Set of Arglist entries. This is built using calls to TecUtilArgListAppendXXXX functions. Arglist Values SV_CONVERTTO256COLORS
SV_IMAGEWIDTH
SV_EXPORTREGION
|
INTEGER*4 FUNCTION TecUtilImageBitmapCreateX(ArgListPtr) POINTER (ArgListPtr, ArgList)
Python Syntax:
Results = TecUtil.ImageBitmapCreateX(ArgList)
Input:
ArgList dictionary
Output:
Results[0] ReturnVal boolean
ArgList_pa ArgList;
TecUtilLockStart(AddOnID); ArgList = TecUtilArgListAlloc(); TecUtilArgListAppendInt(ArgList,SV_CONVERTTO256COLORS,FALSE); // Create a true color image. TecUtilArgListAppendInt(ArgList,SV_IMAGEWIDTH,1000); // The image will be rendered with a width of 1000 pixels. TecUtilArgListAppendInt(ArgList,SV_EXPORTREGION,(LgIndex_t)ExportRegion_WorkArea); TecUtilImageBitmapCreateX(ArgList); // Export the image. TecUtilArgListDealloc(&ArgList); TecUtilLockFinish(AddOnID);
void TecUtilImageBitmapDestroy | ( | void | ) |
Fortran Syntax:
SUBROUTINE TecUtilImageBitmapDestroy()
Python Syntax:
Results = TecUtil.ImageBitmapDestroy() Output: Results[0] ReturnVal NONE
Get the color table, that is, the palette, of a color-reduced image.
You must call either TecUtilImageIndexedBitmapCreate() or TecUtilImageBitmapCreateX() before calling this function. The caller of this function must allocate three arrays of at least 256 bytes and pass them to this function.
Red_Array | Pointer to 256-byte array which will receive the red values of the color table. Must not be NULL | |
Green_Array | Pointer to 256-byte array which will receive the green values of the color table. Must not be NULL | |
Blue_Array | Pointer to 256-byte array which will receive the blue values of the color table. Must not be NULL. |
SUBROUTINE TecUtilImageGetColorTable( & Red_Array, & Green_Array, & Blue_Array) INTEGER*4 Red_Array INTEGER*4 Green_Array INTEGER*4 Blue_Array
Python Syntax:
Results = TecUtil.ImageGetColorTable() Output: Results[0] Red_Array Results[1] Green_Array Results[2] Blue_Array
{ Byte_t Red[256]; Byte_t Green[256]; Byte_t Blue[256]; TecUtilLockStart(AddOnID); TecUtilImageBitmapCreateX(NULL); // Will create a 256-color image. TecUtilImageGetColorTable(Red,Green,Blue); // Export the image. TecUtilImageBitmapDestroy(); TecUtilLockFinish(AddOnID); }
Boolean_t TecUtilImageGetDimensions | ( | short * | Width, | |
short * | Height | |||
) |
You must call TecUtilImageRGBBitmapCreate() before using this function.
Width | Receives the width of the image in pixels. May be NULL. | |
Height | Receives the height of the image in scan lines. May be NULL |
Height Pointer must be a valid address or NULL.
INTEGER*4 FUNCTION TecUtilImageGetDimensions( & Width, & Height) INTEGER*4 Width INTEGER*4 Height
Python Syntax:
Results = TecUtil.ImageGetDimensions() Output: Results[0] ReturnVal boolean Results[1] Width int Results[2] Height int
Create an indexed bitmap and get the dimensions.
{ short Width,Height; short ColorTable[256]; // Must be at least 256 TecUtilLockStart(AddOnID); if (TecUtilImageIndexedBitmapCreate(BitDumpRegion_CurrentFrame, ColorTable)) { TecUtilImageGetDimensions(&Width,&Height); // Dimensions are now in the Width and Height variables TecUtilImageBitmapDestroy(); // Through with the bitmap } TecUtilLockFinish(AddOnID); }
Boolean_t TecUtilImageIndexedBitmapCreate | ( | BitDumpRegion_e | Region, | |
short * | RedColorTable_Array, | |||
short * | GreenColorTable_Array, | |||
short * | BlueColorTable_Array | |||
) |
Call this function to initialize the export state if you are exporting using the index functions.
Must be called before calling TecUtilImageIndexedGetScanLine() and TecUtilImageGetDimensions().
Region | Region to export. Must be a valid region | |
RedColorTable_Array | Receives the color table Red component. Caller must allocate this array and they must have 256 elements. You can also pass NULL for this arrays, using TecUtilImageGetColorTable() to get the color table. Note that in Version 9.0 or higher, the indices are guaranteed to be less than 256 | |
GreenColorTable_Array | Receives the color table Green component. | |
BlueColorTable_Array | Receives the color table Blue component. |
IMPLICATION(GreenColorTableArray != NULL,VALID_REF(GreenColorTableArray)) Pointer must be a valid address or NULL.
IMPLICATION(BlueColorTableArray != NULL,VALID_REF(BlueColorTableArray)) Pointer must be a valid address or NULL.
INTEGER*4 FUNCTION TecUtilImageIndexedBitmapCreate( & Region, & RedColorTable_Array, & GreenColorTable_Array, & BlueColorTable_Array) INTEGER*4 Region INTEGER*4 RedColorTable_Array INTEGER*4 GreenColorTable_Array INTEGER*4 BlueColorTable_Array
Python Syntax:
Results = TecUtil.ImageIndexedBitmapCreate(Region) Input: Region BitDumpRegion_e (defined in TecVals.py) Output: Results[0] ReturnVal boolean Results[1] RedColorTable_Array int Results[2] GreenColorTable_Array int Results[3] BlueColorTable_Array int
Create an indexed bitmap.
{ short RedColorTable[256]; short BlueColorTable[256]; short GreenColorTable[256]; TecUtilLockStart(AddOnID); if (TecUtilImageIndexedBitmapCreate(BitDumpRegion_CurrentFrame, RedColorTable, GreenColorTable, BlueColorTable)) { // Bitmap has been created TecUtilImageBitmapDestroy(); // When you're finished with it } TecUtilLockFinish(AddOnID); }
Boolean_t TecUtilImageIndexedGetScanLine | ( | short | ScanLine, | |
short * | RGBIndex_Array | |||
) |
Gets the color table indices for a scan line.
The calling application must allocate/free the RGBIndex array and ensure that it has enough space.
ScanLine | One-based scan line to get the RGB values from. Must be between one and the height of the image | |
RGBIndex_Array | Array which receives the indicies. These values can be indexed into the color table returned by TecUtilImageIndexedBitmapCreate(). |
INTEGER*4 FUNCTION TecUtilImageIndexedGetScanLine( & ScanLine, & RGBIndex_Array) INTEGER*4 ScanLine INTEGER*4 RGBIndex_Array
Python Syntax:
Results = TecUtil.ImageIndexedGetScanLine(ScanLine) Input: ScanLine int Output: Results[0] ReturnVal boolean Results[1] RGBIndex_Array int
Get the color table indices for the first scan line line.
{ short Width,Height; short *RGBIndex = NULL; short ColorTableR[256]; // Must be at least 256 short ColorTableG[256]; short ColorTableB[256]; TecUtilLockStart(AddOnID); if (TecUtilImageIndexedBitmapCreate(BitDumpRegion_CurrentFrame, ColorTableR) ColorTableG) ColorTableB) { TecUtilImageGetDimensions(&Width,&Height); RGBIndex = (short*) malloc(Width * sizeof(short)); TecUtilImageIndexedGetScanLine(1, // scan lines are 1-based RGBIndex); TecUtilImageBitmapDestroy(); } TecUtilLockFinish(AddOnID); }
Boolean_t TecUtilImageRGBBitmapCreate | ( | BitDumpRegion_e | Region | ) |
Call this function to initialize the export state if you are exporting using the RGB functions.
Must be called before calling TecUtilImageRGBGetScanLine() and TecUtilImageGetDimensions().
Region | Region to export. Must be a valid region |
INTEGER*4 FUNCTION TecUtilImageRGBBitmapCreate(Region) INTEGER*4 Region
Python Syntax:
Results = TecUtil.ImageRGBBitmapCreate(Region) Input: Region BitDumpRegion_e (defined in TecVals.py) Output: Results[0] ReturnVal boolean
Create an RGB (24-bit) bitmap.
{ TecUtilLockStart(AddOnID); if (TecUtilImageRGBBitmapCreate(BitDumpRegion_CurrentFrame)) { // Do the export TecUtilImageBitmapDestroy(); } TecUtilLockFinish(AddOnID); }
See the Example for TecUtilImageRGBBitmapCreate().
Boolean_t TecUtilImageRGBGetScanLine | ( | short | ScanLine, | |
short * | Red_Array, | |||
short * | Green_Array, | |||
short * | Blue_Array | |||
) |
Gets the RGB values of a scan line.
The calling application must allocate/free the arrays and ensure that they have enough space.
ScanLine | One-based scan line to get the RGB values from. Must be between one and the height of the image | |
Red_Array | Array which receives the RED components. Caller must allocate this array. May not be NULL. | |
Green_Array | Array which receives the GREEN components. Caller must allocate this array. May not be NULL | |
Blue_Array | Array which receives the BLUE components. Caller must allocate this array. May not be NULL |
VALID_REF(GreenArray) Pointer must be a valid address and non-NULL.
VALID_REF(BlueArray) Pointer must be a valid address and non-NULL.
INTEGER*4 FUNCTION TecUtilImageRGBGetScanLine( & ScanLine, & Red_Array, & Green_Array, & Blue_Array) INTEGER*4 ScanLine INTEGER*4 Red_Array INTEGER*4 Green_Array INTEGER*4 Blue_Array
Python Syntax:
Results = TecUtil.ImageRGBGetScanLine(ScanLine) Input: ScanLine int Output: Results[0] ReturnVal boolean Results[1] Red_Array int Results[2] Green_Array int Results[3] Blue_Array int
Get the first scan line.
{ // 24-bit color short *Red; short *Green; short *Blue; short Width,Height; TecUtilLockStart(AddOnID); if (TecUtilImageRGBBitmapCreate(BitDumpRegion_CurrentFrame)) { TecUtilImageGetDimensions(&Width,&Height); Red = (short*) malloc(Width * sizeof(short)); Green = (short*) malloc(Width * sizeof(short)); Blue = (short*) malloc(Width * sizeof(short)); TecUtilImageRGBGetScanLine(1,Red,Green,Blue); TecUtilImageBitmapDestroy(); } TecUtilLockFinish(AddOnID); }