The following items are included:
imago_c.h – C header fileimago_c.{dll,so,dylib} – dynamic library appropriate for your platform (supported Windows, Linux and Mac OS X, 32-bit and 64-bit)imago_c.{lib,a} – static library appropriate for your platformThe function headers in imago_c.h file are the following:
/* All functions return 0 on error, and a nonzero value on success */
/* Imago library acts as a state machine.
* You can use multiple Imago instances simultaneously, using the
* 'session ID-s' (see below), or you can use just the default instance.
*/
/* Get the last error message.
* This can be called if some other function returned zero value.
*/
CEXPORT const char *imagoGetLastError();
/* Allocate an instance. All instances are independent, that is,
* they have separate images, configurations settings, resulting
* molfiles, and error messages.
* If you do not allocate an instance, the default instance will be used.
*/
CEXPORT qword imagoAllocSessionId();
/* Set the ID of the instance you are working with from current thread */
CEXPORT void imagoSetSessionId( qword id );
/* Release a previously allocated instance */
CEXPORT void imagoReleaseSessionId( qword id );
/* Set one of predefined configuration sets.
* The given number must be nonnegative and less than the number of
* available configuration sets. By default, the number is 0.
*/
CEXPORT int imagoSetConfigNumber( const int number );
/* Get the number of available predefined configuration sets. */
CEXPORT int imagoGetConfigsCount();
/* Choose filter to process image before recognition.
* name can be "sharp" or "blur".
* By default, filter from current config will be used.
*/
CEXPORT int imagoSetFilter( const char *name );
/* Manually choose binarization level for image.
* level can be between 0 and 255.
* If the pixel color is less than the given level, it is considered black.
* Otherwise, white. By default, the level from the current configuration set
* will be used.
*/
CEXPORT int imagoSetBinarizationLevel( const int level );
/* PNG image loading functions. */
CEXPORT int imagoLoadPngImageFromBuffer( const char *buf, const int buf_size );
CEXPORT int imagoLoadPngImageFromFile( const char *FileName );
/* Set the callback function for log printing.
* By default, log is printed to the standard output.
*/
CEXPORT int imagoSetLogPrinter( void (*printer)( const char *str ) );
/* Disable log printing (set quiet mode). */
CEXPORT int imagoDisableLog();
/* Attach some arbitrary data to the current Imago instance. */
CEXPORT int imagoSetSessionSpecificData( void *data );
CEXPORT int imagoGetSessionSpecificData( void **data );
/* Main recognition routine.
* Image must be loaded previously. */
CEXPORT int imagoRecognize();
/* Molfile (.mol) output functions. */
CEXPORT int imagoSaveMolToBuffer( char **buf, int *buf_size );
CEXPORT int imagoSaveMolToFile( const char *FileName );