| 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/TePDIKMeansClas.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 TEPDIKMEANSCLAS_HPP
    00026   #define TEPDIKMEANSCLAS_HPP
    00027
    00028 #include "TePDIAlgorithm.hpp"
    00029
    00030 #include "TePDIRegion.hpp"
    00031 #include "TePDICluster.hpp"
    00032
    00033 #include <string>
    00034 #include <set>
    00035
    00058 class PDI_DLL TePDIKMeansClas : public TePDIAlgorithm
    00059 {
    00060   private :
    00061
    00065   bool GenerateClassificationParameters();
    00066
    00070   void classifySamples();
    00071
    00075   bool split();
    00076
    00080   bool kmeans();
    00081
    00091   bool classifyPixels( int l1, int l2, int c1, int c2);
    00092
    00096     int n_Class;
    00097
    00101     int class_count;
    00102
    00106     int n_Bands;
    00107
    00111     int n_Iter;
    00112
    00116     int f_Samp;
    00117
    00121     int initial_line;
    00122
    00126     int end_line;
    00127
    00131     int initial_column;
    00132
    00136     int end_column;
    00137
    00141   vector<int> bands;
    00142
    00146     vector<TePDICluster*> clusters;
    00147
    00151   vector<double> tuple;
    00152
    00156   TePDITypes::TePDIRasterPtrType input_raster;
    00157
    00161   TePDITypes::TePDIRasterPtrType output_raster;
    00162
    00163   public :
    00164
    00165     typedef TeSharedPtr< TePDIKMeansClas > pointer;
    00166     typedef const TeSharedPtr< TePDIKMeansClas > const_pointer;
    00167
    00173     TePDIKMeansClas();
    00174
    00178     ~TePDIKMeansClas();
    00179
    00189     bool CheckParameters(const TePDIParameters& parameters) const;
    00190
    00191   protected :
    00192
    00198   void ResetState( const TePDIParameters& );
    00199
    00205   bool RunImplementation();
    00206 };
    00207
    00208 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines