| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeDecoderJPEG.h
Go to the documentation of this file.

    00001 /************************************************************************************
    00002 TerraLib - a library for developing GIS applications.
    00003 Copyright © 2001-2004 INPE and Tecgraf/PUC-Rio.
    00004
    00005 This code is part of the TerraLib library.
    00006 This library is free software; you can redistribute it and/or
    00007 modify it under the terms of the GNU Lesser General Public
    00008 License as published by the Free Software Foundation; either
    00009 version 2.1 of the License, or (at your option) any later version.
    00010
    00011 You should have received a copy of the GNU Lesser General Public
    00012 License along with this library.
    00013
    00014 The authors reassure the license terms regarding the warranties.
    00015 They specifically disclaim any warranties, including, but not limited to,
    00016 the implied warranties of merchantability and fitness for a particular purpose.
    00017 The library provided hereunder is on an "as is" basis, and the authors have no
    00018 obligation to provide maintenance, support, updates, enhancements, or modifications.
    00019 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
    00020 indirect, special, incidental, or consequential damages arising out of the use
    00021 of this library and its documentation.
    00022 *************************************************************************************/
    00026 #ifndef  __TERRALIB_INTERNAL_DECODERJPEG_H
    00027 #define  __TERRALIB_INTERNAL_DECODERJPEG_H
    00028
    00029 #include "TeDecoder.h"
    00030
    00032 /*
    00033            This implementation compress/decompress the entire JPEG image in memory and
    00034            access its pixels acessed directly. \par
    00035            The default file extensions associated to this decoder are ".jpg" and ".jpeg".
    00036 */
    00037 class TL_DLL TeDecoderJPEG: public TeDecoder
    00038 {
    00039 public:
    00041            TeDecoderJPEG();
    00042
    00044            TeDecoderJPEG(const TeRasterParams& par);
    00045
    00047            ~TeDecoderJPEG();
    00048
    00050            void init();
    00051
    00053            bool clear();
    00054
    00056            bool setElement(int col,int lin, double val, int band=0);
    00057
    00059            bool getElement(int col,int lin, double &val,int band=0);
    00060
    00062
    00065   void setQualityFactor( unsigned int qualityFactor );
    00066
    00067 private:
    00068            bool isModified_;
    00069            long size_;
    00070            unsigned char* myData_;
    00071   unsigned int qualityFactor_;
    00072 };
    00073
    00075 class TL_DLL TeDecoderJPEGFactory : public TeDecoderFactory
    00076 {
    00077 public:
    00078
    00080            TeDecoderJPEGFactory(const string& name);
    00081
    00083            TeDecoder* build (const TeRasterParams& arg)
    00084            {  return new TeDecoderJPEG(arg); }
    00085 };
    00086
    00087 #endif
    00088

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines