Index

DKDatastoreQBIC

Purpose:

This class is a specific version of dkDatastore. Its purpose is to implement the Query By Image Content (QBIC) datastore. Image search (QBIC) provides image indexing and search mechanisms for earlier Content Manager. However, it does not store any images. QBIC indexes image parts of documents and processes search requests using the index. The results of an image query submitted to QBIC are item IDs, which are keys to retrieve the actual image from the Content Manager datastore.

The execute and evaluate functions of DKDatastoreQBIC take image query strings expressed in QBIC image query language. The DKImageQuery object accepts queries in the syntax.

Class summary:

    class DKDatastoreQBIC: public dkDatastore
    {
        ...
        ...
        DKDatastoreQBIC();
        virtual ~DKDatastoreQBIC();
 
        virtual void connect (const char* datastore_name,
                              const char* user_name,
                              const char* authentication,
                              const char* connect_string = "");
        virtual void createDatabase(const char* database_name);
        virtual void deleteDatabase(const char* database_name);
        virtual void createCatalog(const char* database_name,
                                   const char* catalog_name);
        virtual void deleteCatalog(const char* database_name,
                                   const char* catalog_name);
        virtual void openCatalog(const char* database_name,
                                 const char* catalog_name);
        virtual void closeCatalog();
        virtual void addColorFeature();
        virtual void addDrawFeature();
        virtual void addColorHistogramFeature();
        virtual void addTextureFeature();
        virtual void addFeature(unsigned long featureSelection, DKBoolean bReCatalog);
        virtual void removeColorFeature();
        virtual void removeDrawFeature();
        virtual void removeColorHistogramFeature();
        virtual void removeTextureFeature();
        virtual void processImages(DKImageRecordQBIC* imageList, long count);
        virtual void queueImages(DKImageRecordQBIC* imageList, long count);
        virtual void processImageQueue();
        virtual void reCatalogImages(unsigned long featureSelectionList);
        virtual DKAny listDatabases();
        virtual DKAny listCatalogs();
        virtual DKAny listCatalogs(const char* database_name);
        virtual DKAny listFeatures();
        virtual DKAny listColorImages();
        virtual DKAny listHistogramImages();
        virtual DKAny listDrawImages();
        virtual DKAny listTextureImages();
        virtual DKString databaseName();
        virtual DKString catalogName();
        virtual DKAny listServers();
        virtual DKString getLibServerName();
 
    };

Members:

Constructors and destructor
        DKDatastoreQBIC();
        virtual ~DKDatastoreQBIC();

Member functions

connect
Provides the connection to the datastore; authentication is the password. The user_name and authentication are for the image search server and datastore_name is the name of the image search server.

The connect_string is not required; it is reserved for future use.

    virtual void connect (const char* datastore_name,
                          const char* user_name,
                          const char* authentication,
                          const char* connect_string = "");

createDatabase
Creates an image search database in the image search server. A database is a directory to store multiple catalogs.
    virtual void createDatabase(const char* database_name); 

deleteDatabase
Deletes an image search database from the image search server. All catalogs in the database will be removed.
    virtual void deleteDatabase(const char* database_name);  

createCatalog
Creates an image search catalog in the current database.
    virtual void createCatalog(const char* database_name, 
                               const char* catalog_name);            

deleteCatalog
Deletes an image search catalog from the current database.
    virtual void deleteCatalog(const char* database_name, 
                               const char* catalog_name);	        	

openCatalog
Opens the specified image search catalog. The current catalog will be closed.
    virtual void openCatalog(const char* database_name, 
                             const char* catalog_name);		

closeCatalog
Closes the current catalog.
    virtual void closeCatalog();		

addColorFeature
Adds the QbColorFeatureClass feature to the current catalog.
    virtual void addColorFeature();

addDrawFeature
Adds the QbDrawFeatureClass feature to the current catalog.
    virtual void addDrawFeature();

addColorHistogramFeature
Adds the QbColorHistogramFeatureClass feature to the current catalog.
    virtual void addColorHistogramFeature();

addTextureFeature
Adds the QbTextureFeatureClass feature to the current catalog.
    virtual void addTextureFeature();

addFeature

Adds the specified feature to the current catalog. When bReCatalog is set to TRUE, the image search server will re-analyze the new feature for the existing images. A feature can be specified in the following constants:

    QbColor or QbColorFeatureClass 
    QbColorHistogram or QbColorHistogramFeatureClass 
    QbDraw or QbDrawFeatureClass 
    QbTexture or QbTextureFeatureClass

    virtual void addFeature(unsigned long featureSelection, 
                                     DKBoolean bReCatalog);

removeColorFeature
Removes the QbColorFeatureClass feature from the current catalog.
    virtual void removeColorFeature();

removeDrawFeature
Removes the QbDrawFeatureClass feature from the current catalog.
    virtual void removeDrawFeature();

removeColorHistogramFeature
Removes the QbColorHistogramFeatureClass feature from the current catalog.
    virtual void removeColorHistogramFeature();

removeTextureFeature
Removes the QbTextureFeatureClass feature from the current catalog.
    virtual void removeTextureFeature();

processImages
Processes a list of images for the current catalog. Each image in the list is identified by item ID, part number, and representation type. Based on the transaction type, an image can be either cataloged ("A") or uncataloged ("D"). This is an on-line processing. A DKImageRecordQBIC object can be constructed via one of the two constructors. Five set functions are provided for assigning or updating data members. Five get functions are also provided for retrieving data members.
    class DKImageRecordQBIC
    {
        public:
        DKImageRecordQBIC(const char* dlItemID,
                          const char* dlPartNo,
                          const char* dlRepType,
                          const char* indexItemID,
                          const char* transaction);
        DKImageRecordQBIC();
                    
        void setDlItemID(const char* dlItemID);
        void setDlPartNo(const char* dlPartNo);
        void setDlRepType(const char* dlRepType);
        void setIndexItemID(const char* indexItemID);
        void setTransaction(const char* transaction);
 
        DKString getDlItemID();
        DKString getDlPartNo();
        DKString getDlRepType();
        DKString getIndexItemID();
        DKString getTransaction();
    };

An array of DKImageRecordQBIC objects and the count of objects in that array must be passed to this function. Initialize indexItemID to zero.

    virtual void processImages(DKImageRecordQBIC* 
                               imageList, long count);

queueImages
Puts a list of images into the image queue for later processing. Each image in the list is identified by item ID, part number, and representation type. Based on the transaction type, an image can be either cataloged ("A") or uncataloged ("D"). This is not an on-line processing. The image queue will be awakened by processImageQueue. A DKImageRecordQBIC object can be constructed via one of the two constructors. Five set functions are provided for assigning or updating data members. Five get functions are also provided for retrieving data members.

    class DKImageRecordQBIC
    {
        public:
        DKImageRecordQBIC(const char* dlItemID,
                          const char* dlPartNo,
                          const char* dlRepType,
                          const char* indexItemID,
                          const char* transaction);
        DKImageRecordQBIC();
                    
        void setDlItemID(const char* dlItemID);
        void setDlPartNo(const char* dlPartNo);
        void setDlRepType(const char* dlRepType);
        void setIndexItemID(const char* indexItemID);
        void setTransaction(const char* transaction);
 
        DKString getDlItemID();
        DKString getDlPartNo();
        DKString getDlRepType();
        DKString getIndexItemID();
        DKString getTransaction();
    };
 

An array of DKImageRecordQBIC objects and the count of objects in that array must be passed to this function. Initialize indexItemID to zero.

    virtual void queueImages(DKImageRecordQBIC* 
                             imageList, long count);		

processImageQueue
Processes and wakes up the image queue and starts the process of cataloging and uncataloging.
    virtual void processImageQueue();

reCatalogImages
Recatalogs the images and reanalyzes the specified features for all the images in the current catalog. The feature selection consists of one or more of the following constants:
    QbColor or QbColorFeatureClass 
    QbColorHistogram or QbColorHistogramFeatureClass 
    QbDraw or QbDrawFeatureClass 
    QbTexture or QbTextureFeatureClass 

For example, reCatalogImages(QbColor | QbDraw) will re-analyze QbColorFeatureClass and QbTextureFeatureClass features for all the images in the current catalog.

    virtual void reCatalogImages(unsigned long featureSelectionList);

listDatabases
Lists all databases in the image search server. The return value is a sequential collection containing DKIndexQBIC objects, describing the database.
		class DKIndexQBIC
		{
		 public:
  		   DKString string();
		}

It is necessary to extract the object from DKAny to cast it to DKSequentialCollection, then iterate over it to get DKIndexQBIC objects.

    virtual DKAny listDatabases();

listCatalogs
Lists all catalogs in the current database. The return value is a sequential collection containing DKIndexQBIC objects, describing the catalog.
		class DKIndexQBIC
		{
		 public:
  		   DKString string();
		}

It is necessary to extract the object from DKAny to cast it to DKSequentialCollection, then iterate over it to get DKIndexQBIC objects.

		virtual DKAny listCatalogs();

listCatalogs with 1 parameter
Lists all catalogs in the specified database. The return value is a sequential collection containing DKIndexQBIC objects, describing the catalog.
		class DKIndexQBIC
		{
		 public:
  		   DKString string();
		}

It is necessary to extract the object from DKAny to cast it to DKSequentialCollection, then iterate over it to get DKSequentialCollection objects.

    virtual DKAny listCatalogs(const char* database_name);

listFeatures
Lists all features in the current catalog.

The return value is a sequential collection containing DKIndexQBIC objects, describing the feature.

		class DKIndexQBIC
		{
		  public:
  		    DKString string();
		}

It is necessary to extract the object from DKAny to cast it to DKSequentialCollection, then iterate over it to get DKIndexQBIC objects.

		virtual DKAny listFeatures();

listColorImages
Lists all images cataloged in the QbColorFeatureClass feature of the current catalog.

The return value is a sequential collection containing DKImageInfoQBIC objects, describing the image.

    class DKImageInfoQBIC
    {
      public:
        DKString dlItemID();
        DKString dlPartNo();
        DKString dlRepType();
    }

It is necessary to extract the object from DKAny to cast it to DKSequentialCollection, then iterate over it to get DKImageInfoQBIC objects.

		virtual DKAny listColorImages();

listHistogramImages
Lists all images cataloged in the QbColorHistogramFeatureClass feature of the current catalog.

The return value is a sequential collection containing DKImageInfoQBIC objects, describing the image.

    class DKImageInfoQBIC
    {
      public:
        DKString dlItemID();
        DKString dlPartNo();
        DKString dlRepType();
    }

It is necessary to extract the object from DKAny to cast it to DKSequentialCollection, then iterate over it to get DKImageInfoQBIC objects.

    virtual DKAny listHistogramImages();

listDrawImages
Lists all images cataloged in the QbDrawFeatureClass feature of the current catalog.

The return value is a sequential collection containing DKImageInfoQBIC objects, describing the image.

    class DKImageInfoQBIC
    {
      public:
        DKString dlItemID();
        DKString dlPartNo();
        DKString dlRepType();
    }

It is necessary to extract the object from DKAny to cast it to DKSequentialCollection, then iterate over it to get DKImageInfoQBIC objects.

		virtual DKAny listDrawImages();

listTextureImages
Lists all images cataloged in the QbTextureFeatureClass feature of the current catalog.

The return value is a sequential collection containing DKImageInfoQBIC objects, describing the image.

    class DKImageInfoQBIC
    {
      public:
        DKString dlItemID();
        DKString dlPartNo();
        DKString dlRepType();
		}

It is necessary to extract the object from DKAny to cast it to DKSequentialCollection, then iterate over it to get DKImageInfoQBIC objects.

		virtual DKAny listTextureImages();

databaseName
Returns the current image search database name.
		virtual DKString databaseName();

catalogName
Returns the current image search catalog name.
		virtual DKString catalogName();

listServers
Returns a list of valid servers to connect to.

The return value is a sequential collection containing DKServerInfoQBIC objects, describing the server.

    class DKServerInfoQBIC
		{
      public:
        DKString serverName();
        DKString hostName();
        DKString portNumber(); 
		}

It is necessary to extract the object from DKAny and cast it to DKSequentialCollection, then iterate over it to get DKServerInfoQBIC objects.

		virtual DKAny listServers();

getLibServerName
Returns the name of the library server that the image search server is connecting to.
    virtual DKString getLibServerName();

(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.