| 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/TePDIRegion.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 TEPDIREGION_HPP
    00026   #define TEPDIREGION_HPP
    00027
    00028 #include <vector>
    00029 #include <iostream>
    00030 #include "../kernel/TeMatrix.h"
    00031 #include "TePDIStatistic.hpp"
    00032 #include "TePDIEspecData.hpp"
    00033 #include "../kernel/TeAgnostic.h"
    00034
    00035 using namespace std;
    00036
    00043 class PDI_DLL TePDIRegion
    00044 {
    00045   private:
    00049     long id;
    00050
    00054     long npix;
    00055
    00059     int region_class;
    00060
    00064     int nbands;
    00065
    00069     vector<double> mean;
    00070
    00074     TeMatrix covariance;
    00075
    00076   public:
    00082     TePDIRegion(long id_region)
    00083     { SetId(id_region); nbands = npix = region_class = 0; }
    00084
    00088     ~TePDIRegion();
    00089
    00098     bool Init(int n, long a, vector<double> m, TeMatrix c);
    00099
    00105     void SetId(long id_region)
    00106     { id = id_region; }
    00107
    00111     long GetId()
    00112     { return id; }
    00113
    00117     int GetNban()
    00118     { return nbands; }
    00119
    00125     void SetClass(int clas)
    00126     { region_class = clas; }
    00127
    00131     int GetClass()
    00132     { return region_class; }
    00133
    00139     double Mean(int ind);
    00140
    00144     vector<double> GetMean();
    00145
    00149     double Covar(int i, int j);
    00150
    00154     TeMatrix GetCovar()
    00155     { return covariance; }
    00156
    00162     void SetArea(long a)
    00163     { npix = a; }
    00164
    00168     long GetArea()
    00169     { return npix; }
    00170 };
    00171
    00172 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines