cURL Client Interface
We provide a C library, based on cURL, that very closely mirrors the OMEIS server HTTP interface. This library composes and parses GET and POST requests allowing clients to easily interact with OMEIS.
The library is provided with the default OME distribution in the sudo configure --with-MATLAB --with-MATLAB-user=tmacur1
This library doesn't yet mirror all OMEIS methods. We use Additional Client Library FunctionsThe client library contains several auxiliary functions that lack corresponding OMEIS methods. These functions are described in this section.
The very first function one must call to use the library is omeis* is = openConnectionOMEIS("http://localhost/cgi-bin/omeis", "0000");
The char* sha1 = pixelsSHA1 (is, ID);
C functions describe data according to native types such as pixHeader* ph = malloc(sizeof(pixHeader));
CtoOMEISDatatype ("unsigned char", ph);
For comparision look at the OMEIS MATLAB MEX untility M-file MATLABtoOMEISDatatype.m.
void* pixels = getPixels (is, 135);
int** int_pixels = (int**) OMEIStoCArray (pixels, ph, "int");
For example source code illustrating how to use this library see src/C/omeis-http/main.c. Document Actions |
