| 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/image_processing/TePDIEspecData.hpp
Go to the documentation of this file.

    00001 /*
    00002 TerraLib - a library for developing GIS applications.
    00003 Copyright  2001, 2002, 2003 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
    00017 purpose. The library provided hereunder is on an "as is" basis, and the
    00018 authors have no obligation to provide maintenance, support, updates,
    00019 enhancements, or modifications.
    00020 In no event shall INPE be held liable to any party
    00021 for direct, indirect, special, incidental, or consequential damages arising
    00022 out of the use of this library and its documentation.
    00023 */
    00024
    00025 #ifndef TEPDIESPECDATA_HPP
    00026   #define TEPDIESPECDATA_HPP
    00027
    00028 #include "TePDIDefines.hpp"
    00029 #include <vector>
    00030 #include "../kernel/TeMatrix.h"
    00031
    00038 class PDI_DLL TePDIEspecData
    00039 {
    00040   private:
    00041     int nban;               // Number of bands
    00042     long npix;              // Number of pixels = area
    00043     std::vector<double> sum;            // Sum of pixels values
    00044     //double* sum3;           // sum**3
    00045     //double* sum4;           // sum**4
    00046     std::vector<double> sumbij;         // sum of the produt of pixel values
    00047                 // between bands i and j
    00048     //double* median;         // median value
    00049
    00050   public:
    00051     // constructor
    00052     TePDIEspecData();
    00053     // destructor
    00054     ~TePDIEspecData();
    00055
    00056     // initializer
    00057     bool Init(int nband);
    00058     // add a pixel
    00059     void Add(double *pixel);
    00060     // returns the covariance at i, j
    00061     float Covar(int i, int j)const;
    00062     // returns the covariance matrix
    00063     TeMatrix Covariance()const;
    00064     // returns the mean at band i
    00065     float Mean(int i)const;
    00066 };
    00067
    00068 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines