_SelectColor, Heart_Analyze_New, Int_ConvertData, Int_GetAppSystemColor, Int_RescaleHist, Int_SetFocus, IsClipboardOK, Region_Set_Rotation, Sql_Connect, Sql_Disconnect, Sql_DisconnectAll, Sql_Query
Description
Heart_Analyze_New( intHA_Width
, intHA_Height
, intHA_Fps
, intHA_UseQualityMode
, intHA_OnScreen
);
This function can capture an image line by line. The result indicates the progress of an action that is being captured.
Parameters
Description
Int_ConvertData( char *IntDestC
, char *Int_Sour
, dwordnum
, inttype
);
This function converts data of different types to speed up the macros.
Parameters
Return Values
//Int_ConvertData example - this example measures time of data conversion. dword dwrd[100000],t1,t2,ta,tb,tc,td,cnst; double dbl[100000]; word wrd[100000]; byte byt[100000]; char buf[1000],st1[256],st2[256],st3[256],st4[256],caption[256]; cnst=100000; SetCommandText("Working..."); strcpy(caption, " LIM API Example - Int_ConvertData\tConverting byte -to-> double. "); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); t1 = Get_Time(); Int_ConvertData(dbl,byt,cnst,BYTE_TO_DOUBLE); t2 = Get_Time(); ta = t2 - t1; strcpy(caption, " LIM API Example - Int_ConvertData\tConverting dword -to-> double. "); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); t1 = Get_Time(); Int_ConvertData(dbl,dwrd,cnst,DWORD_TO_DOUBLE); t2 = Get_Time(); tb = t2 - t1; strcpy(caption, " LIM API Example - Int_ConvertData\tConverting word -to-> double. "); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); t1 = Get_Time(); Int_ConvertData(dbl,wrd,cnst,WORD_TO_DOUBLE); t2 = Get_Time(); tc = t2 - t1; strcpy(caption, " LIM API Example - Int_ConvertData\tConverting double -to-> dword. "); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); t1 = Get_Time(); Int_ConvertData(dwrd,dbl,cnst,DOUBLE_TO_DWORD); t2 = Get_Time(); td = t2 - t1; strcpy(caption, " LIM API Example - Int_ConvertData\tEnd of conversion. "); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); sprintf(st1," Byte to double(%i items): %i [ms]\n","cnst,ta"); sprintf(st2," Dword to double(%i items): %i [ms]\n","cnst,tb"); sprintf(st3," Word to double(%i items): %i [ms]\n","cnst,tc"); sprintf(st4," Double to dword(%i items): %i [ms]\n","cnst,td"); sprintf(buf,"%s%s%s%s","st1,st2,st3,st4");
See Also
Int_CloseTextWindow
Description
Int_GetAppSystemColor(
int Int_Index
);
This function returns a color based on its (Windows API) index. System colors are overwritten inside the application for the purposes of switching between dark and light schemes.
Description
Int_RescaleHist( double *Int_InX
, double *Int_InY
, intInt_DimIn
, double *Int_OutX
, double *Int_OutY
, intInt_DimOut
, doubleInt_Smooth
);
This function rescales the histogram data using the spline interpolation.
Parameters
//Int_RescaleHist example - horizontal spline by 5 points. int xs,ys,width,height; int xi[5],yi[5]; int i,j,dimOut; double x[5],y[5]; double outx[50],outy[50],min,dist; dword keys[1],key; char caption[256]; dimOut = 20; keys[0] = VK_LBUTTON; Get_Size(SIZE_PICWND,&xs,&ys,&width,&height); SetCommandText("Working..."); strcpy(caption,"API Example - Int_RescaleHist function."); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); Wait(2); strcpy(caption," application API Example - Int_RescaleHist function.\tDefine 5 points on the screen for horizontal interpolation. "); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); for(i=0;i<5;i=i+1) { key = 0; while(key != keys[0]) key = Int_GetEvents(&keys,1); Int_GetMousePos(xi,yi); Int_DrawMarker(xi[0],yi[0],MARKER_TO_SCREEN,1,MARKER_SMALL,RGB_RED,1); x[i] = xi[0]; y[i] = height - yi[0]; } for(i=0;i<4;i=i+1) { for(j=i;j<5;j=j+1) { if(x[i]>x[j]) { min = x[j]; x[j] = x[i]; x[i] = min; min = y[j]; y[j] = y[i]; y[i] = min; } if(x[i]==x[j]) x[j] = x[j] + 1; } } dist = x[4] - x[0]; dist = dist / (dimOut-1); outx[0] = x[0]; for(i=1;i<dimOut;i=i+1) { outx[i] = outx[i-1] + dist; if(outx[i]>x[4]) outx[i]=x[4]; } strcpy(caption," application API Example - Int_RescaleHist function.\tComputing interpolation. "); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); if(!Int_RescaleHist(x,y,5,outx,outy,dimOut,1)) WaitText(0,"Bad parametres!"); for(i=0;i<dimOut;i=i+1) { xi[0] = outx[i]; yi[0] = height - outy[i]; Int_DrawMarker(xi[0],yi[0],MARKER_TO_SCREEN,1,MARKER_SMALL,RGB_BLUE,1); } Int_CloseTextWindow();
Description
Int_SetFocus(
int wnd
);
This function sets the input focus to a given window. All subsequent keyboard messages are directed to this window. The window, if any, that previously had the input focus loses it.
Parameters
wnd
Window to receive focus.
Sets the focus to the main window. | |
Sets the focus to the window, which was created by the Int_CreateWindow function with the same constant. | |
Sets the focus to the window, which was created by the Int_CreateWindow function with the same constant. | |
Sets the focus to the window, which was created by the Int_CreateWindow function with the same constant. | |
Sets the focus to the window, which was created by the Int_CreateWindow function with the same constant. | |
Sets the focus to the window, which was created by the Int_ListCreateWindow function. | |
Sets the focus to the window, which was created by the Int_CreateTextWindow function. | |
Sets the focus to the window, which was created by the Int_GSCreateWindow function. | |
Sets the focus to the window, which was created by the Int_Query function. | |
Sets the focus to the other windows. |
Return Values
//Int_SetFocus example - swapping of overlapped windows. int xs,ys,width,height; int i,j,pw,ph; char b1[1000],b2[1000],b3[1000],b4[1000],caption[256]; dword key,keys[10]; keys[0] = VK_END; keys[1] = VK_F1; keys[2] = VK_F2; keys[3] = VK_F3; keys[4] = VK_F4; Enable_Interrupt_InScript(1); SetCommandText("Working..."); strcpy(caption,"API Example - Int_SetFocus function."); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); Wait(2); strcpy(b1,"You are currently running\nAPI Example"); strcpy(b2,"Example values:\nResults of the measurement No.1 :\n200.51\t400.03\t126.09"); strcpy(b3,"Example values:\nA : 10\nB : 15\nC : 1001\nD : 1200"); strcpy(b4,"Example text:\n1.)Type of segmentation\n2.)Type of filtering\n3.)Type of measurements"); Get_Size(SIZE_MAINWND,&xs,&ys,&width,&height); pw=width/3; ph=height/4; Int_CreateWindow(WND_1,"First window.",1,0,0,pw,ph,b1,0,1,0.00000,0,0,1,"Arial,BI,14"); Int_CreateWindow(WND_2,"Second window.",1,0,0,pw,ph,b2,0,1,0.00000,0,0,1,"Arial,B,10"); Int_CreateWindow(WND_3,"Third window.",1,0,0,pw,ph,b3,0,1,0.00000,0,0,1,"Arial,B,10"); Int_CreateWindow(WND_4,"Fourth window.",1,0,0,pw,ph,b4,0,1,0.00000,0,0,1,"Arial,B,10"); Int_PostMessage(VK_F1,0); while(key!=keys[0]) { key=Int_GetEvents(keys,5); if(key==keys[1]) { strcpy(caption," First window\tTo change window press F2,F3,F4. To exit press END. "); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); Int_SetFocus(WND_1); Int_SetFocus(WINDOW_MAIN); } if(key==keys[2]) { strcpy(caption," Second window\tTo change window press F1,F3,F4. To exit press END. "); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); Int_SetFocus(WND_2); Int_SetFocus(WINDOW_MAIN); } if(key==keys[3]) { strcpy(caption," Third window\tTo change window press F1,F2,F4. To exit press END. "); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); Int_SetFocus(WND_3); Int_SetFocus(WINDOW_MAIN); } if(key==keys[4]) { strcpy(caption," Fourth window\tTo change window press F1,F2,F3. To exit press END. "); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); Int_SetFocus(WND_4); Int_SetFocus(WINDOW_MAIN); } } for(i=1;i<5;i=i+1) { Int_SetFocus(i); Int_PostMessage(VK_ALT|VK_F4,0); } Int_CloseTextWindow();
Note
Constants 10 - 30 are intended for later system development.
Description
IsClipboardOK();
This function checks, if the clipboard contains bitmap data.
Description
Region_Set_Rotation(
int Mode
);
This function enables/disables rotation during interactive region pasting.
See Also
Region_Cut, _Region_Copy, Region_Paste, Region_Copy, Region_Info, _Region_Settings, _Region_Cut
Description
dword Sql_Connect( char *ConnectionString
, char *Sql_User
, char *Password
);
This function connects to SQL database.
Parameters
int connection, recNum, i, recLen, delimiter; char columns[1000]; char values[2000]; char buf[2000]; char bufW[2000]; char* record; recLen = 100; delimiter = 124; // '|' connection = Sql_Connect("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\database.mdb;", "", ""); recNum = Sql_Query(connection, "select * from table1", columns, 1000, values, 10, recLen, delimiter); sprintf(bufW, "%s\n", "columns"); WideCharToMultiByte(buf, bufW); WriteFile("c:\data.txt", buf, strlen(bufW)); for (i = 0; i < recNum; i = i + 1) { record = values+(i*recLen); sprintf(bufW, "%s\n", "record"); WideCharToMultiByte(buf, bufW); WriteFile("c:\~tmp.txt", buf, strlen(bufW)); AppendFile("c:\data.txt", "c:\~tmp.txt"); } DeleteFile("c:\~tmp.txt"); Sql_Disconnect(connection);
See Also
Sql_Query, Sql_Disconnect, Sql_DisconnectAll
Description
Sql_Disconnect(
dword ConnectionHandle
);
This function disconnects the database connection specified by the ConnectionHandle.
See Also
Sql_Connect, Sql_Query, Sql_DisconnectAll
Description
Sql_DisconnectAll();
This function closes all open database connections.
See Also
Sql_Connect, Sql_Query, Sql_Disconnect
Description
int Sql_Query( dwordConnectionHandle
, char *Query
, char *ColumnNames
, intColumnNamesSizes
, char *Values
, intRecordCount
, intRecordSize
, intSeparator
);
This function sends a query to a database.
Parameters
Return Values
Note
See example in Sql_Connect
See Also
Sql_Connect, Sql_Disconnect, Sql_DisconnectAll