DLBaseImage.h

Go to the documentation of this file.
00001 #ifndef DLBASEIMAGE_H
00002 #define DLBASEIMAGE_H
00003 
00004 #include "DLImage.h"
00005 #include <vector>
00006 
00007 using namespace std;
00008 
00027 class DLBaseImage
00028 {
00029 
00030    public:
00031 
00036    string getImageName();
00037 
00044    string getExtension();
00045 
00051    bool dlSupportImageExt(string ext);
00052 
00063    virtual bool dlSupportImageFile(const char* filename) = 0;
00064 
00076    virtual bool dlSupportImageBuffer(const void* pMemLoc, int size) = 0;
00077 
00086    virtual void dlSaveImage(const char* filename, const DLImage& image)= 0;
00087 
00097    virtual void* dlSaveImageToMem(int& nSize, const DLImage& dlimage)= 0;
00098 
00106    virtual DLImage dlLoadImage(const char* filename) = 0;
00107 
00116    virtual DLImage dlLoadImage(const void* pMemLoc, int nSize) = 0;
00117 
00125    static void Tokenize(const string& str,
00126                         vector<string>& tokens, const string& delimiters = " ");
00127 
00138    virtual int dlGetTotalPages(void* pMemLoc, int nSize)=0;
00139 
00148    virtual int dlGetTotalPages(const char* filename)= 0;
00149 
00157    virtual DLImage dlLoadImageAtPage(const char* filename, int pageNumber) = 0;
00158 
00167    virtual DLImage dlLoadImageAtPage(const void* pMemLoc, int nSize, int pageNumber) = 0;
00168 
00174    void dlSetRegistrationPriority(int priority){regPriority = priority;}
00175 
00181    int dlGetRegistrationPriority() const {return regPriority;}
00185    virtual ~DLBaseImage(void);
00186    protected:
00188    //* dlSetImageData function is used to set the private image data 
00189    //* in DLImage.  All child objects must call this function to 
00190    //* set the image data.
00191    //*
00192    //* \param image DLimage object to set the data to
00193    //* \param imageData byte data to set in DLImage
00194    //**/
00195    //void dlSetImageData(DLImage& image, DL_BYTE * imageData);
00196 
00205    DLBaseImage(string imageName, string exts, int regPriorityLevel = 5 );
00206 
00207    private:
00209    string name;   
00211    string extensions;
00217    int regPriority;
00218 
00219 };
00220 
00221 
00222 #endif //DLBASEIMAGE_H

DOCLIB is being developed under contract by a collaboration between:
The Laboratory for Language and Media Processing
Unviersity of Maryland, College Park
and
Booz | Allen | Hamilton

All Rights Reserved, 2003-2007