TePDIEMClas Class Reference
[Classification algorithms.]

#include <TePDIEMClas.hpp>

Inheritance diagram for TePDIEMClas:

TePDIAlgorithm

Detailed Description

EM classification algorithm.
Author:
Thales Sehn Korting <tkorting@dpi.inpe.br>

Emiliano F. Castejon <castejon@dpi.inpe.br>

Note:
The required parameters are:
Parameters:
input_rasters (TePDITypes::TePDIRasterVectorType) - Input rasters
bands (vector<int>) - Input bands from each raster.
classes_to_find (int) - The number of classes to find.
output_raster (TePDITypes::TePDIRasterPtrType) - Output raster.
Note:
The optional parameters are:
Parameters:
sx (int) - Sampling Rate X (default: 1).
sy (int) - Sampling Rate Y (default: 1).
max_iterations (int) - The maximum number of iterations (default: 3).
epsilon (double) - stop criteria (default: 15).
shift_threshold (double) - minimum distance between clusters means (default: 40).
input_means (TeMatrix) - initial Matrix of means for each cluster [bands x clusters]
Examples:

TePDIClassification_test.cpp.

Definition at line 59 of file TePDIEMClas.hpp.


Public Types

typedef const
TeSharedPtr
< TePDIEMClas
const_pointer
 Type definition for a const algorithm instance pointer.
typedef TeSharedPtr
< TePDIEMClas
pointer
 Type definition for an algorithm instance pointer.

Public Member Functions

bool Apply (const TePDIParameters &params)
bool Apply ()
bool CheckParameters (const TePDIParameters &parameters) const
 Checks if the supplied parameters fits the requirements of each PDI strategy.
const TePDIParametersGetParameters () const
bool Reset (const TePDIParameters &params)
 TePDIEMClas ()
 Default constructor.
void ToggleProgInt (bool enabled)
 ~TePDIEMClas ()
 Default Destructor.

Static Public Member Functions

static TePDIAlgorithmDefaultObject (const TePDIParameters &params)

Protected Member Functions

bool CheckInternalParameters () const
bool IncProgInt ()
void ResetState (const TePDIParameters &)
bool RunImplementation ()
 Runs the algorithm implementation.
void StartProgInt (const std::string &message, unsigned int steps)
void StopProgInt ()
bool UpdateProgInt (unsigned int step)

Protected Attributes

TePDIParameters params_
TePDIPIManager pi_manager_
bool progress_enabled_

Private Attributes

double EPSILON
 Stop Condition.
long H
int M
 Total Classes to find.
int MAX_ITERATIONS
 Limit of iterations.
int N
 Total Instances and Total Attributes.
double SHIFT_THRESHOLD
 Threshold for shift.
int SX
 Sampling Rate, in X and Y directions.
int SY
int TOTAL_ATTRIBUTES
long W
 Width, Height of image.

Member Typedef Documentation

typedef const TeSharedPtr< TePDIEMClas > TePDIEMClas::const_pointer

Reimplemented from TePDIAlgorithm.

Definition at line 100 of file TePDIEMClas.hpp.

typedef TeSharedPtr< TePDIEMClas > TePDIEMClas::pointer

Reimplemented from TePDIAlgorithm.

Definition at line 99 of file TePDIEMClas.hpp.


Constructor & Destructor Documentation

TePDIEMClas::TePDIEMClas (  ) 

Parameters:
factoryName Factory name.

Definition at line 18 of file TePDIEMClas.cpp.

00019 {
00020 };

TePDIEMClas::~TePDIEMClas (  ) 

Definition at line 22 of file TePDIEMClas.cpp.

00023 {
00024 };


Member Function Documentation

bool TePDIAlgorithm::Apply ( const TePDIParameters params  )  [inherited]

Applies the algorithm following the state defined by the supplied parameters.

Parameters:
params The new supplied parameters.
Returns:
true if OK. false on error.

Definition at line 66 of file TePDIAlgorithm.cpp.

References TePDIAlgorithm::CheckParameters(), TePDIParameters::Clear(), TeException::message(), TePDIAlgorithm::params_, TePDIAlgorithm::ResetState(), TePDIAlgorithm::RunImplementation(), TEAGN_LOG_AND_RETURN, and TEAGN_TRUE_OR_RETURN.

00067 {
00068   TEAGN_TRUE_OR_RETURN( CheckParameters( params ),
00069     "Invalid parameters" )
00070     
00071   ResetState( params );
00072 
00073   /* This line must come after the ResetState line, because some algorithms
00074      checks the difference between the current internal parameters and the
00075      new supplied parameters */
00076   params_.Clear();
00077   params_ = params;
00078   
00079   #ifdef NDEBUG
00080     try
00081     {
00082       return RunImplementation();
00083     }
00084     catch( const TeException& exc )
00085     {
00086       TEAGN_LOG_AND_RETURN( "Exception raised from algorithm - " +
00087         exc.message() );
00088     }
00089     catch(...)
00090     {
00091       TEAGN_LOG_AND_RETURN( "Unhandled exception raised from algorithm" );
00092     }
00093   #else
00094     return RunImplementation();
00095   #endif    
00096 }

bool TePDIAlgorithm::Apply (  )  [inherited]

Applies the algorithm following the current state and internal stored parameters.

Returns:
true if OK. false on error.
Examples:
TePDIArithmetic_test.cpp, TePDIBDFilter_test.cpp, TePDIClassification_test.cpp, TePDIColorTransform_test.cpp, TePDIContrast_test.cpp, TePDICorrelationMatching_test.cpp, TePDIDecorrelationEnhancement_test.cpp, TePDIFFT_test.cpp, TePDIFusion_test.cpp, TePDIHants_test.cpp, TePDILinearFilter_test.cpp, TePDIMIMatching_test.cpp, TePDIMixModel_test.cpp, TePDIMMIOMatching_test.cpp, TePDIMorfFilter_test.cpp, TePDIMosaic_test.cpp, TePDIParallelSegmenter_test.cpp, TePDIPrincipalComponents_test.cpp, TePDIRadarFilters_test.cpp, TePDIRaster2Vector_test.cpp, TePDIRegister_test.cpp, TePDISegmentation_test.cpp, TePDISensorSimulator_test.cpp, TePDISimplex_test.cpp, and TePDIWavelets_test.cpp.

Definition at line 34 of file TePDIAlgorithm.cpp.

References TePDIAlgorithm::CheckInternalParameters(), TeException::message(), TePDIAlgorithm::RunImplementation(), TePDIAlgorithm::StopProgInt(), TEAGN_LOG_AND_RETURN, and TEAGN_LOGERR.

Referenced by Avg3x3_test(), Avg7x7_test(), Baatz_Strategy_test(), BatchGeoMosaic_test1(), BatchGeoMosaic_test2(), buildData(), Dilation_1_iteration_test(), Dilation_2_iterations_test(), Dilation_3_iterations_test(), Dilation_4_iterations_test(), Dilation_with_dummy_test(), DummyMask_RGB_test(), EMClassification_test(), Erosion_1_iteration_test(), Erosion_2_iterations_test(), Erosion_3_iterations_test(), Erosion_4_iterations_test(), Erosion_with_dummy_test(), TePDIParaSegRegGrowStrategy::execute(), TePDIParaSegBaatzStrategy::execute(), Frost_test(), Gamma_test(), GarguetFusion_test(), GeoMosaic_test1(), GeoMosaic_test2(), GeoMosaic_test3(), GeoMosaic_test4(), halfsampledImageTest(), halfsampledImageTest2(), halfsampledRotadedImageTest(), halfsampledRotadedImageWithDownsampleTest(), HRCxCCDTest(), IHSFusion_test(), IsosegClassification_test(), KMeansClassification_test(), KuanAdaptative_test(), KuanFixed_test(), LeeAdaptative_test(), LeeFixed_test(), main(), Mallat_GetPyramid_and_RecomposePyramid_test(), Mallat_low_low_swap_test(), Median_1_iteration_test(), Median_2_iterations_test(), Median_3_iterations_test(), Median_4_iterations_test(), Median_with_dummy_test(), Mode_1_iteration_test(), Mode_2_iteration_test(), Mode_3_iteration_test(), NDHigh_test(), pca_test(), PrincoMixModel_test(), Raster2Vector_test(), RegionGrowing_Strategy_pattern1_test(), RegionGrowing_Strategy_test(), Register_test1(), RGB2IHS_IHS2RGB_image_test(), RGB2IHS_IHS2RGB_numeric_test(), Roberts_test(), TePDIWiSpeRFusion::RunImplementation(), TePDIWaveletAtrousFusion::RunImplementation(), TePDIVenturaFusion::RunImplementation(), TePDISensorSimulator::RunImplementation(), TePDIRegGrowSeg::RunImplementation(), TePDIPrincipalComponentsFusion::RunImplementation(), TePDIPCAWaveletFusion::RunImplementation(), TePDIIHSWaveletFusion::RunImplementation(), TePDIIHSFusion::RunImplementation(), TePDIGeneralizedIHSFusion::RunImplementation(), TePDIGarguetFusion::RunImplementation(), TePDIDecorrelationEnhancement::RunImplementation(), TePDIBatchGeoMosaic::RunImplementation(), TePDIBaatz::RunImplementation(), S_test(), sameImageAndBoxesTest(), sameImageAndBoxesWithMaskTest(), sameImageDifBoxesTest(), sameImageGreenXBlueTest(), sameImageGreenXRedTest(), sameImageTest(), sameImageTest2(), sameImageTestWithMultiThread(), sameInvertedImageTest(), Sobel_test(), TePDIArithmetic_operator_test1(), TePDIArithmetic_precedence_test(), TePDIArithmetic_real_number_test(), TePDIBaatz_test(), TePDIContrastHistEqualizer_test(), TePDIContrastLinear_plus_histo_test(), TePDIContrastLog_test(), TePDIContrastLog_with_use_dummy_test(), TePDIContrastMinMax_autolevels_test(), TePDIContrastMinMax_no_input_image_test(), TePDIContrastNegative_test(), TePDIContrastSimpleSlicer_test(), TePDIContrastSquare_test(), TePDIContrastSquareRoot_test(), TePDIContrastStat_test(), TePDIDecorrelationEnhancement_test(), TePDIFFT_test(), TePDIGeneralizedIHSFusion_test(), TePDIHants_test(), TePDIIHSWaveletFusion_test(), TePDIPCAWaveletFusion_test(), TePDIPrincipalComponentsFusion_test(), TePDIRegGrowSeg_test(), TePDISAMClassifier_test(), TePDISensorSimulator_test(), TePDIWaveletAtrous_test(), TePDIWaveletAtrousFusion_test(), TePDIWiSpeRFusion_test(), TPMosaic_test1(), TPMosaic_test2(), and VenturaFusion_test().

00035 {
00036   bool return_value = false;
00037   
00038   if( CheckInternalParameters() ) {
00039     #ifdef NDEBUG
00040       try
00041       {
00042         return_value = RunImplementation();
00043       }
00044       catch( const TeException& exc )
00045       {
00046         TEAGN_LOGERR( "Exception raised from algorithm - " +
00047           exc.message() );
00048       }
00049       catch(...)
00050       {
00051         TEAGN_LOGERR( "Unhandled exception raised from algorithm" );
00052       }
00053     #else
00054       return_value = RunImplementation();
00055     #endif
00056     
00057     StopProgInt();
00058   } else {
00059     TEAGN_LOG_AND_RETURN( "Invalid supplied parameters" );
00060   }
00061   
00062   return return_value;
00063 }

bool TePDIAlgorithm::CheckInternalParameters (  )  const [protected, inherited]

Checks if current internal parameters fits the requirements of each PDI algorithm implementation.

Note:
Error log messages must be generated. No exceptions generated.
Returns:
true if the internal parameters are OK. false if not.

Definition at line 105 of file TePDIAlgorithm.cpp.

References TePDIAlgorithm::CheckParameters(), and TePDIAlgorithm::params_.

Referenced by TePDIAlgorithm::Apply().

00106 {
00107   return CheckParameters( params_ );
00108 }

bool TePDIEMClas::CheckParameters ( const TePDIParameters parameters  )  const [virtual]

Error log messages must be generated. No exceptions generated.

Parameters:
parameters The parameters to be checked.
Returns:
true if the parameters are OK. false if not.

Implements TePDIAlgorithm.

Definition at line 26 of file TePDIEMClas.cpp.

References TePDIParameters::GetParameter(), TeSharedPtr< T >::isActive(), M, Te2String(), TEAGN_TRUE_OR_RETURN, and TeRasterParams::TeNotReady.

00027 {
00028   // Checking input_rasters
00029   TePDITypes::TePDIRasterVectorType input_rasters;
00030   TEAGN_TRUE_OR_RETURN(parameters.GetParameter("input_rasters", input_rasters), 
00031     "Missing parameter: input_rasters");
00032   TEAGN_TRUE_OR_RETURN(input_rasters.size() > 0, 
00033     "Invalid input rasters number");
00034 
00035   vector<int> bands;
00036   TEAGN_TRUE_OR_RETURN(parameters.GetParameter("bands", bands), "Missing parameter: bands");
00037   TEAGN_TRUE_OR_RETURN(bands.size() == input_rasters.size(), Te2String(input_rasters.size()) + " Invalid parameter: bands number " + Te2String(bands.size()));
00038 
00039   for(unsigned int input_rasters_index = 0 ; input_rasters_index < input_rasters.size(); input_rasters_index++)
00040   {
00041     TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index].isActive(), "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " inactive");
00042     TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " not ready");
00043     TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().nlines_ == input_rasters[0]->params().nlines_, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " with imcompatible number of lines");
00044     TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().ncols_ == input_rasters[0]->params().ncols_, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " with imcompatible number of columns");
00045   }
00046 
00047   int M;
00048   TEAGN_TRUE_OR_RETURN(parameters.GetParameter("classes_to_find", M), "Missing parameter: classes_to_find");
00049   double e;
00050   TEAGN_TRUE_OR_RETURN(parameters.GetParameter("epsilon", e), "Missing parameter: epsilon");
00051   TEAGN_TRUE_OR_RETURN(e > 0, "Parameter epsilon must be > 0");
00052   double s;
00053   TEAGN_TRUE_OR_RETURN(parameters.GetParameter("shift_threshold", s), "Missing parameter: shift_threshold");
00054   TEAGN_TRUE_OR_RETURN(e > 0, "Parameter shift_threshold must be > 0");
00055 
00056   // Checking output_raster
00057   TePDITypes::TePDIRasterPtrType output_raster;
00058   TEAGN_TRUE_OR_RETURN(parameters.GetParameter("output_raster", output_raster), "Missing parameter: output_raster");
00059   TEAGN_TRUE_OR_RETURN(output_raster.isActive(), "Invalid parameter: output_raster inactive");
00060   TEAGN_TRUE_OR_RETURN(output_raster->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: output_raster not ready");
00061   return true;
00062 }

TePDIAlgorithm * TePDIAlgorithm::DefaultObject ( const TePDIParameters params  )  [static, inherited]

Returns a default object.

Returns:
A default object.

Definition at line 119 of file TePDIAlgorithm.cpp.

References TEAGN_LOG_AND_THROW.

00120 {
00121   TEAGN_LOG_AND_THROW( "Trying to create an invalid algorithm instance" );
00122   
00123   TePDIParameters dummy_params = params;
00124 
00125   return 0;
00126 }

const TePDIParameters & TePDIAlgorithm::GetParameters (  )  const [inherited]

Returns a reference to the current internal parameters.

Returns:
A reference to the current internal parameters.

Definition at line 99 of file TePDIAlgorithm.cpp.

References TePDIAlgorithm::params_.

00100 {
00101   return params_;
00102 }

bool TePDIAlgorithm::IncProgInt (  )  [protected, inherited]

Increments the the current progress by one step.

Returns:
true if the interface was canceled, false otherwise.
Deprecated:
DEPRECATED - This method will be removed in the future (each algorithm must check the variable TePDIAlgorithm::progress_enabled_ and instantiate its own TePDIPIManager when necessary).

Definition at line 155 of file TePDIAlgorithm.cpp.

References TePDIPIManager::Increment(), and TePDIAlgorithm::pi_manager_.

Referenced by TePDIContrast::GetHistEqualizerLut(), and TePDIRegister::RunImplementation().

00156 {
00157   return pi_manager_.Increment();
00158 }

bool TePDIAlgorithm::Reset ( const TePDIParameters params  )  [inherited]

Reset the internal state with new supplied parameters.

Parameters:
params The new supplied parameters.
Returns:
true if parameters OK, false on error.
Examples:
TePDIBDFilter_test.cpp, TePDIClassification_test.cpp, TePDIColorTransform_test.cpp, TePDIContrast_test.cpp, TePDICorrelationMatching_test.cpp, TePDIDecorrelationEnhancement_test.cpp, TePDIFFT_test.cpp, TePDIFusion_test.cpp, TePDIHants_test.cpp, TePDIHaralick_test.cpp, TePDILinearFilter_test.cpp, TePDIMIMatching_test.cpp, TePDIMixModel_test.cpp, TePDIMMIOMatching_test.cpp, TePDIMorfFilter_test.cpp, TePDIOFMatching_test.cpp, TePDIPrincipalComponents_test.cpp, TePDIRadarFilters_test.cpp, TePDIRaster2Vector_test.cpp, TePDIRegister_test.cpp, TePDISegmentation_test.cpp, TePDISensorSimulator_test.cpp, TePDISimplex_test.cpp, TePDIStatistic_test.cpp, and TePDIWavelets_test.cpp.

Definition at line 16 of file TePDIAlgorithm.cpp.

References TePDIAlgorithm::CheckParameters(), TePDIParameters::Clear(), TePDIAlgorithm::params_, TePDIAlgorithm::ResetState(), and TEAGN_LOG_AND_RETURN.

Referenced by TePDIMallatWavelets::AllocateTopLevel(), Avg3x3_test(), Avg7x7_test(), TePDIFusionIndexes::bias_index(), TePDISensorSimulatorFactory::build(), TePDIRegisterFactory::build(), TePDIRegGrowSegFactory::build(), TePDIRaster2VectorFactory::build(), TePDIRadarLeeFilterFactory::build(), TePDIRadarKuanFilterFactory::build(), TePDIRadarFrostFilterFactory::build(), TePDIPrincipalComponentsFactory::build(), TePDIMorfFilterFactory::build(), TePDIMixModelFactory::build(), TePDILinearFilterFactory::build(), TePDIKMeansClasFactory::build(), TePDIIsosegClasFactory::build(), TePDIEMClasFactory::build(), TePDIContrastFactory::build(), TePDIColorTransformFactory::build(), TePDIBDFilterFactory::build(), TePDIArithmeticFactory::build(), buildData(), TePDIFusionIndexes::correlation_coefficient_index(), TePDIMallatWavelets::Decompose(), Dilation_1_iteration_test(), Dilation_2_iterations_test(), Dilation_3_iterations_test(), Dilation_4_iterations_test(), Dilation_with_dummy_test(), DummyMask_RGB_test(), EMClassification_test(), TePDIFusionIndexes::ergas_index(), Erosion_1_iteration_test(), Erosion_2_iterations_test(), Erosion_3_iterations_test(), Erosion_4_iterations_test(), Erosion_with_dummy_test(), TePDIFusionIndexes::fit_histogram(), Frost_test(), Gamma_test(), GarguetFusion_test(), halfsampledImageTest(), halfsampledImageTest2(), halfsampledRotadedImageTest(), halfsampledRotadedImageWithDownsampleTest(), HRCxCCDTest(), IHSFusion_test(), IsosegClassification_test(), KMeansClassification_test(), KuanAdaptative_test(), KuanFixed_test(), LeeAdaptative_test(), LeeFixed_test(), main(), Mallat_GetPyramid_and_RecomposePyramid_test(), Mallat_low_low_swap_test(), Median_1_iteration_test(), Median_2_iterations_test(), Median_3_iterations_test(), Median_4_iterations_test(), Median_with_dummy_test(), Mode_1_iteration_test(), Mode_2_iteration_test(), Mode_3_iteration_test(), NDHigh_test(), numeric_test_with_polygonset(), numeric_with_histograms_test(), pca_test(), PrincoMixModel_test(), Raster2Vector_test(), Register_test1(), RGB2IHS_IHS2RGB_image_test(), RGB2IHS_IHS2RGB_numeric_test(), Roberts_test(), TePDIWiSpeRFusion::RunImplementation(), TePDIWaveletAtrousFusion::RunImplementation(), TePDIVenturaFusion::RunImplementation(), TePDISensorSimulator::RunImplementation(), TePDIRegGrowSeg::RunImplementation(), TePDIPrincipalComponentsFusion::RunImplementation(), TePDIPCAWaveletFusion::RunImplementation(), TePDIIHSWaveletFusion::RunImplementation(), TePDIIHSFusion::RunImplementation(), TePDIGeneralizedIHSFusion::RunImplementation(), TePDIGarguetFusion::RunImplementation(), TePDIDecorrelationEnhancement::RunImplementation(), TePDIBaatz::RunImplementation(), TePDIPrincipalComponents::RunImplementation_direct(), S_test(), sameImageAndBoxesTest(), sameImageAndBoxesWithMaskTest(), sameImageDifBoxesTest(), sameImageGreenXBlueTest(), sameImageGreenXRedTest(), sameImageTest(), sameImageTest2(), sameImageTestWithMultiThread(), sameInvertedImageTest(), Sobel_test(), TePDIFusionIndexes::standard_deviation_diff_index(), TePDIFusionIndexes::structural_similarity_index(), TePDIBaatz_test(), TePDIContrastHistEqualizer_test(), TePDIContrastLinear_plus_histo_test(), TePDIContrastLog_test(), TePDIContrastLog_with_use_dummy_test(), TePDIContrastMinMax_autolevels_test(), TePDIContrastMinMax_no_input_image_test(), TePDIContrastNegative_test(), TePDIContrastSimpleSlicer_test(), TePDIContrastSquare_test(), TePDIContrastSquareRoot_test(), TePDIContrastStat_test(), TePDIDecorrelationEnhancement_test(), TePDIFFT_test(), TePDIHants_test(), TePDIPrincipalComponentsFusion_test(), TePDIRegGrowSeg_test(), TePDISAMClassifier_test(), TePDISensorSimulator_test(), TePDIFusionIndexes::uiqi_index(), TePDIFusionIndexes::variance_difference_index(), and VenturaFusion_test().

00017 {
00018   if( CheckParameters( params ) ) {
00019     ResetState( params );
00020 
00021     /* This line must come after the ResetState line, because some algorithms
00022        checks the difference between the current internal parameters and the
00023        new supplied parameters */
00024     params_.Clear();
00025     params_ = params;
00026 
00027     return true;
00028   } else {
00029     TEAGN_LOG_AND_RETURN( "Invalid supplied parameters" );
00030   }
00031 }

void TePDIEMClas::ResetState ( const TePDIParameters  )  [protected, virtual]

Reset the internal state to the initial state.

Parameters:
params The new parameters referent at initial state.

Implements TePDIAlgorithm.

Definition at line 13 of file TePDIEMClas.cpp.

00014 {
00015 
00016 }

bool TePDIEMClas::RunImplementation (  )  [protected, virtual]

Returns:
true if OK. false on errors.

Implements TePDIAlgorithm.

Definition at line 64 of file TePDIEMClas.cpp.

References TeRasterParams::boxResolution(), TePDIParameters::CheckParameter(), EPSILON, TePDIParameters::GetParameter(), H, TePDIPIManager::Increment(), TeSharedPtr< T >::init(), TeMatrix::Init(), TeRasterParams::lutb_, TeRasterParams::lutg_, TeRasterParams::lutr_, M, MAX_ITERATIONS, N, TeRasterParams::nBands(), TePDIAlgorithm::params_, TePDIAlgorithm::progress_enabled_, TeRasterParams::projection(), TeRasterParams::setDataType(), TeRasterParams::setPhotometric(), SHIFT_THRESHOLD, SX, SY, TEAGN_TRUE_OR_RETURN, TeRasterParams::TePallete, TeRasterParams::TeReadyToWrite, TeUNSIGNEDCHAR, TePDIPIManager::Toggle(), TOTAL_ATTRIBUTES, TeMatrix::Transpose(), and W.

00065 {
00066   // Setting the parameters
00067   TePDITypes::TePDIRasterVectorType input_rasters;
00068   params_.GetParameter("input_rasters", input_rasters);
00069 
00070   vector<int> bands;
00071   params_.GetParameter("bands", bands);
00072 
00073   W = input_rasters[0]->params().ncols_;
00074   H = input_rasters[0]->params().nlines_;
00075   N = 0;
00076   TOTAL_ATTRIBUTES = bands.size();
00077   params_.GetParameter("classes_to_find", M);
00078   
00079   if( params_.CheckParameter< int >( "sx" ) )
00080     params_.GetParameter("sx", SX);
00081   else
00082     SX = 1;
00083     
00084   if( params_.CheckParameter< int >( "sy" ) )
00085     params_.GetParameter("sy", SY);
00086   else
00087     SY = 1;
00088     
00089   if( params_.CheckParameter< int >( "max_iterations" ) )
00090     params_.GetParameter("max_iterations", MAX_ITERATIONS);
00091   else
00092     MAX_ITERATIONS = 3;
00093     
00094   if( params_.CheckParameter< double >( "epsilon" ) )
00095     params_.GetParameter("epsilon", EPSILON);
00096   else
00097     EPSILON = 15.0;
00098     
00099   if( params_.CheckParameter< double >( "shift_threshold" ) )
00100     params_.GetParameter("shift_threshold", SHIFT_THRESHOLD);
00101   else
00102     SHIFT_THRESHOLD = 40.0;
00103 
00104   bool no_means = true;
00105   TeSharedPtr<TeMatrix> input_means;
00106   if( params_.CheckParameter< TeSharedPtr<TeMatrix> >( "input_means" ) ) {
00107     params_.GetParameter("input_means", input_means);
00108     no_means = false;
00109   }
00110 
00111   for (int i = 0; i < W; i+=SX)
00112     for (int j = 0; j < H; j+=SY)
00113       N++;
00114   double  START_COVAR = 1000.0,
00115       *variations = (double *) malloc(M * sizeof(double));
00116 
00117   // Start the algorithm
00118   vector<TeMatrix>  covars, // covariance matrix
00119             old_covars, // to prevent problems in inverse function
00120             means, // mean vectors
00121             old_means, // to compare difference during the E-M process
00122             X, // image points
00123             original_X; // original image points (hole set)
00124   vector<double>  P; // Probability for each cluster
00125   double **P_C_x = (double **) malloc(M * sizeof(double)), // Probability a posteriori
00126       **original_P_C_x = (double **) malloc(M * sizeof(double));
00127 
00128   // Initializing data...
00129   for (int i = 0; i < M; i++)
00130   {
00131     P_C_x[i] = (double *) malloc(N * sizeof(double));
00132     original_P_C_x[i] = (double *) malloc(W * H * sizeof(double));
00133     for (int j = 0; j < N; j++)
00134       P_C_x[i][j] = 0.0;
00135     for (int j = 0; j < W * H; j++)
00136       original_P_C_x[i][j] = 0.0;
00137   }
00138   // initialize covariances, means and P
00139   TeMatrix tmp_covar;
00140   tmp_covar.Init(TOTAL_ATTRIBUTES, START_COVAR);
00141   TeMatrix tmp_mean;
00142 
00143   unsigned seed = (unsigned)time(0);
00144   srand(seed);
00145   for (int j = 0; j < M; j++)
00146   {
00147     double *random_means = (double *)malloc(TOTAL_ATTRIBUTES * sizeof(double));
00148     if (no_means)
00149     {
00150       for (int r = 0; r < TOTAL_ATTRIBUTES; r++)
00151         random_means[r] = rand() % 255;
00152     }
00153     else
00154     {
00155       for (int r = 0; r < TOTAL_ATTRIBUTES; r++)
00156         random_means[r] = input_means->operator()(r, j);
00157     }
00158 
00159     tmp_mean.Init(TOTAL_ATTRIBUTES, 1, random_means);
00160     means.push_back(tmp_mean);
00161     old_means.push_back(tmp_mean);
00162     covars.push_back(tmp_covar);
00163     old_covars.push_back(tmp_covar);
00164     P.push_back((double) 1 / M);
00165         free(random_means);
00166   }
00167 
00168   // Generates the attributes vector
00169   TeMatrix tmp_X;
00170 
00171   double *tmp = (double*) malloc(TOTAL_ATTRIBUTES * sizeof(double));
00172   for (int i = 0; i < W; i += SX)
00173     for (int j = 0; j < H; j += SY)
00174     {
00175       for (int b = 0; b < TOTAL_ATTRIBUTES; b++)
00176         input_rasters[b]->getElement(i, j, tmp[b], bands[b]);
00177       tmp_X.Init(TOTAL_ATTRIBUTES, 1, tmp);
00178       X.push_back(tmp_X);
00179     }
00180 
00181   TePDIPIManager p("Generating Attributes Vector", W, progress_enabled_);
00182   // Store the hole set of pixels
00183   for (int i = 0; i < W; i++)
00184   {
00185     for (int j = 0; j < H; j++)
00186     {
00187       for (int b = 0; b < TOTAL_ATTRIBUTES; b++)
00188         input_rasters[b]->getElement(i, j, tmp[b], bands[b]);
00189 
00190       tmp_X.Init(TOTAL_ATTRIBUTES, 1, tmp);
00191       original_X.push_back(tmp_X);
00192     }
00193     p.Increment();
00194   }
00195   p.Toggle(false);
00196   free(tmp);
00197 
00198   // Start to estimate the data
00199   int num_iterations = 0;
00200   bool stop_condition = false;
00201   TeMatrix  tmp_matrix,
00202         tmp_inv,
00203         tmp_trans,
00204         tmp_prod;
00205 
00206   TePDIPIManager p2("Estimating data", MAX_ITERATIONS, progress_enabled_);
00207   while (stop_condition == false)
00208   {
00209     // Calculate P_C_x
00210     for (int j = 0; j < M; j++)
00211     {
00212       for (int k = 0; k < N; k++)
00213       {
00214         double denom = 0.0;
00215         for (int k1 = 0; k1 < M; k1++)
00216         {
00217           tmp_matrix = X[k] - means[k1];
00218           if (!covars[k1].Inverse(tmp_inv))
00219           {
00220             covars[k1].Init(TOTAL_ATTRIBUTES, START_COVAR);
00221             covars[k1].Inverse(tmp_inv);
00222           }
00223           tmp_matrix.Transpose(tmp_trans);
00224           tmp_prod.Init();
00225           tmp_prod = tmp_trans * tmp_inv * tmp_matrix;
00226 
00227           denom += pow(covars[k1].Determinant(), -0.5) * exp(-0.5 * tmp_prod(0, 0)) * P[k1];
00228         }
00229 
00230         tmp_matrix = X[k] - means[j];
00231 
00232 
00233         if (!covars[j].Inverse(tmp_inv))
00234         {
00235           covars[j].Init(TOTAL_ATTRIBUTES, START_COVAR);
00236           covars[j].Inverse(tmp_inv);
00237         }
00238 
00239         tmp_matrix.Transpose(tmp_trans);
00240         tmp_prod = tmp_trans * tmp_inv * tmp_matrix;
00241 
00242         P_C_x[j][k] = pow(covars[j].Determinant(), -0.5) * exp(-0.5 * tmp_prod(0,0)) * P[j] / denom;
00243       }
00244     }
00245 
00246     // Update means, covariances and Probabilities
00247     for (int j = 0; j < M; j++)
00248     {
00249       double tmp_denom = 0.0;
00250       TeMatrix  tmp_num_mean,
00251             tmp_num_covar,
00252             tmp_sub;
00253       tmp_num_mean.Init(TOTAL_ATTRIBUTES, 1, 0.0);
00254       tmp_num_covar.Init(TOTAL_ATTRIBUTES, 0.0);
00255 
00256       for (int k = 1; k < N; k++)
00257       {
00258         // sum for mean numerator
00259         tmp_num_mean = tmp_num_mean + P_C_x[j][k] * X[k];
00260         // sum for both denominators
00261         tmp_denom += P_C_x[j][k];
00262         // sum for covar numerator
00263         tmp_matrix = X[k] - means[j];
00264         tmp_matrix.Transpose(tmp_trans);
00265         tmp_prod = tmp_matrix * tmp_trans;
00266         tmp_num_covar = tmp_num_covar + P_C_x[j][k] * tmp_prod;
00267       }
00268 
00269       means[j] =  (1 / tmp_denom) * tmp_num_mean;
00270       covars[j] = (1 / tmp_denom) * tmp_num_covar;
00271       P[j] = tmp_denom / N;
00272 
00273       tmp_sub = means[j] - old_means[j];
00274       tmp_sub.Transpose(tmp_trans);
00275       tmp_prod = tmp_trans * tmp_sub;
00276       variations[j] = sqrt(tmp_prod(0, 0));
00277     }
00278 
00279     TeMatrix  tmp_sub,
00280           shift;
00281 
00282     shift.Init(TOTAL_ATTRIBUTES, 1);
00283     for (int a = 0; a < TOTAL_ATTRIBUTES; a++)
00284       shift(a, 0) = rand() % 255;
00285     for (int j = 0; j < M; j++)
00286       for (int j1 = (j + 1); j1 < M; j1++)
00287       {
00288         tmp_sub = means[j] - means[j1];
00289         tmp_sub.Transpose(tmp_trans);
00290         tmp_prod = tmp_trans * tmp_sub;
00291         if (sqrt(tmp_prod(0, 0)) < SHIFT_THRESHOLD)
00292         {
00293           for (int a = 0; a < TOTAL_ATTRIBUTES; a++)
00294             shift(a, 0) = rand() % 255;
00295 
00296           means[j1] = shift;
00297           covars[j1] = tmp_covar;
00298         }
00299       }
00300 
00301     double variation = 0.0;
00302     for (int j = 0; j < M; j++)
00303       if (variations[j] > variation)
00304         variation = variations[j];
00305 
00306     old_means = means;
00307     old_covars = covars;
00308     if (++num_iterations >= MAX_ITERATIONS)
00309       stop_condition = true;
00310         p2.Increment();
00311     if (variation < EPSILON)
00312       stop_condition = true;
00313   }
00314   p2.Toggle(false);
00315   free(variations);
00316 
00317   // Classifying input image
00318   TePDIPIManager p3("Classifying input image", M, progress_enabled_);
00319   double *class_covars_determinant = (double *) malloc(M * sizeof(double));
00320   vector<TeMatrix> class_covars_inverse;
00321   for (int j = 0; j < M; j++)
00322   {
00323     class_covars_determinant[j] = covars[j].Determinant();
00324     covars[j].Inverse(tmp_inv);
00325     class_covars_inverse.push_back(tmp_inv);
00326   }
00327   for (int j = 0; j < M; j++)
00328   {
00329     for (int k = 0; k < H * W; k++)
00330     {
00331       double denom = 0.0;
00332 
00333       for (int k1 = 0; k1 < M; k1++)
00334       {
00335         tmp_matrix = original_X[k] - means[k1];
00336         tmp_matrix.Transpose(tmp_trans);
00337         tmp_prod = tmp_trans * class_covars_inverse[k1] * tmp_matrix;
00338 
00339         denom += pow(class_covars_determinant[k1], -0.5) * exp(-0.5 * tmp_prod(0, 0)) * P[k1];
00340       }
00341 
00342       tmp_matrix = original_X[k] - means[j];
00343       tmp_matrix.Transpose(tmp_trans);
00344       tmp_prod = tmp_trans * class_covars_inverse[j] * tmp_matrix;
00345 
00346       original_P_C_x[j][k] = pow(class_covars_determinant[j], -0.5) * exp(-0.5 * tmp_prod(0,0)) * P[j] / denom;
00347     }
00348     p3.Increment();
00349   }
00350   p3.Toggle(false);
00351   free(class_covars_determinant);
00352 
00353   // Setting the output raster 
00354   TePDITypes::TePDIRasterPtrType output_raster;
00355   params_.GetParameter("output_raster", output_raster);
00356 
00357   TeRasterParams output_raster_params = output_raster->params();
00358   output_raster_params.setDataType( TeUNSIGNEDCHAR );
00359   output_raster_params.nBands( 1 );
00360   if( input_rasters[0]->projection() != 0 ) 
00361     output_raster_params.projection( input_rasters[0]->projection() );
00362 
00363   output_raster_params.boxResolution( input_rasters[0]->params().box().x1(), 
00364     input_rasters[0]->params().box().y1(), input_rasters[0]->params().box().x2(), 
00365     input_rasters[0]->params().box().y2(), input_rasters[0]->params().resx_, 
00366     input_rasters[0]->params().resy_ ); 
00367 
00368   // Lut
00369   output_raster_params.setPhotometric( TeRasterParams::TePallete );
00370   output_raster_params.lutr_.clear();
00371   output_raster_params.lutg_.clear();
00372   output_raster_params.lutb_.clear();
00373 
00374   vector<unsigned short> colors_R, colors_G, colors_B;
00375   colors_R.push_back(0); colors_G.push_back(0); colors_B.push_back(255);
00376   colors_R.push_back(0); colors_G.push_back(255); colors_B.push_back(0);
00377   colors_R.push_back(255); colors_G.push_back(0); colors_B.push_back(0);
00378   colors_R.push_back(0); colors_G.push_back(255); colors_B.push_back(255);
00379   colors_R.push_back(255); colors_G.push_back(0); colors_B.push_back(255);
00380   colors_R.push_back(255); colors_G.push_back(255); colors_B.push_back(0);
00381   colors_R.push_back(255); colors_G.push_back(255); colors_B.push_back(255);
00382   colors_R.push_back(0); colors_G.push_back(0); colors_B.push_back(0);
00383   colors_R.push_back(200); colors_G.push_back(0); colors_B.push_back(0);
00384   colors_R.push_back(0); colors_G.push_back(200); colors_B.push_back(0);
00385   colors_R.push_back(0); colors_G.push_back(0); colors_B.push_back(200);
00386   colors_R.push_back(0); colors_G.push_back(200); colors_B.push_back(200);
00387   colors_R.push_back(200); colors_G.push_back(200); colors_B.push_back(0);
00388   colors_R.push_back(200); colors_G.push_back(0); colors_G.push_back(200);
00389   colors_R.push_back(184); colors_G.push_back(115); colors_B.push_back(51);
00390   colors_R.push_back(217); colors_G.push_back(135); colors_B.push_back(25);
00391   colors_R.push_back(133); colors_G.push_back(99); colors_B.push_back(99);
00392   colors_R.push_back(217); colors_G.push_back(217); colors_B.push_back(25);
00393   colors_R.push_back(207); colors_G.push_back(181); colors_B.push_back(59);
00394   colors_R.push_back(205); colors_G.push_back(127); colors_B.push_back(50);
00395   colors_R.push_back(230); colors_G.push_back(232); colors_B.push_back(250);
00396   
00397   unsigned color_index = 0;
00398   for( int lut_index = 0 ; lut_index < M ; ++lut_index ) 
00399   {
00400     color_index = ( (unsigned) lut_index < colors_R.size() ? lut_index : 0 );
00401     output_raster_params.lutr_.push_back( (unsigned short) colors_R[color_index] );
00402     output_raster_params.lutg_.push_back( (unsigned short) colors_G[color_index] );
00403     output_raster_params.lutb_.push_back( (unsigned short) colors_B[color_index] );
00404   }
00405 
00406   TEAGN_TRUE_OR_RETURN( output_raster->init( output_raster_params ), "Output raster reset error" );
00407   output_raster->params().status_ = TeRasterParams::TeReadyToWrite;
00408 
00409   TePDIPIManager p4("Generating output image", H * W, progress_enabled_);
00410   int k = 0;
00411   for (int c = 0; c < W; c++)
00412     for (int l = 0; l < H; l++)
00413     {
00414       int  max = 0;
00415       
00416       for (int j = 0; j < M; j++)
00417         if (original_P_C_x[j][k] > original_P_C_x[max][k])
00418           max = j;
00419       output_raster->setElement(c, l, max);
00420       k++;
00421       p4.Increment();
00422     }
00423   p4.Toggle(false);
00424   free(original_P_C_x);
00425   free(P_C_x);
00426 
00427   return true;
00428 }

void TePDIAlgorithm::StartProgInt ( const std::string message,
unsigned int  steps 
) [protected, inherited]

Start the progress interface.

Parameters:
message Progress window message.
steps Progress window total steps.
Deprecated:
DEPRECATED - This method will be removed in the future (each algorithm must check the variable TePDIAlgorithm::progress_enabled_ and instantiate its own TePDIPIManager when necessary).

Definition at line 139 of file TePDIAlgorithm.cpp.

References TePDIAlgorithm::pi_manager_, TePDIAlgorithm::progress_enabled_, TePDIPIManager::Reset(), and TePDIPIManager::Toggle().

Referenced by TePDIContrast::FullRangeLutRemapLevels(), TePDIContrast::GetHistEqualizerLut(), TePDIContrast::GetLinearLut(), TePDIContrast::GetLogLut(), TePDIContrast::GetNegativeLut(), TePDIContrast::GetSimpleSlicerLut(), TePDIContrast::GetSquareLut(), TePDIContrast::GetSquareRootLut(), TePDILevelRemap::RemapLevels(), TePDIContrast::RemapLevels(), TePDIRadarLeeFilter::RunAdaptImplementation(), TePDIRadarKuanFilter::RunAdaptImplementation(), TePDIMorfFilter::RunDilation(), TePDIMorfFilter::RunErosion(), TePDIRadarLeeFilter::RunFixedImplementation(), TePDIRadarKuanFilter::RunFixedImplementation(), TePDIRadarGammaFilter::RunFixedImplementation(), TePDIColorTransform::RunIhs2Rgb(), TePDIRegister::RunImplementation(), TePDIRaster2Vector::RunImplementation(), TePDIRadarFrostFilter::RunImplementation(), TePDIMorfFilter::RunMedian(), TePDIMorfFilter::RunMode(), TePDIBDFilter::RunRoberts(), and TePDIBDFilter::RunSobel().

00141 {
00142   if( progress_enabled_ ) {
00143     pi_manager_.Reset( message, steps );
00144     pi_manager_.Toggle( true );
00145   }
00146 }

void TePDIAlgorithm::StopProgInt (  )  [protected, inherited]

Stop the progress interface.

Deprecated:
DEPRECATED - This method will be removed in the future (each algorithm must check the variable TePDIAlgorithm::progress_enabled_ and instantiate its own TePDIPIManager when necessary).

Definition at line 161 of file TePDIAlgorithm.cpp.

References TePDIAlgorithm::pi_manager_, and TePDIPIManager::Toggle().

Referenced by TePDIAlgorithm::Apply(), TePDIContrast::FullRangeLutRemapLevels(), TePDIContrast::GetHistEqualizerLut(), TePDILevelRemap::RemapLevels(), TePDIContrast::RemapLevels(), and TePDIRegister::RunImplementation().

00162 {
00163   pi_manager_.Toggle( false );
00164 }

void TePDIAlgorithm::ToggleProgInt ( bool  enabled  )  [inherited]

Enable / Disable the progress interface.

Parameters:
enabled Flag to enable ( true ) or disable ( false ).
Examples:
TePDICorrelationMatching_test.cpp, TePDIMIMatching_test.cpp, and TePDIOFMatching_test.cpp.

Definition at line 129 of file TePDIAlgorithm.cpp.

References TePDIAlgorithm::pi_manager_, TePDIAlgorithm::progress_enabled_, and TePDIPIManager::Toggle().

Referenced by TePDIFusionIndexes::bias_index(), TePDIFusionIndexes::correlation_coefficient_index(), TePDIFusionIndexes::ergas_index(), TePDIFusionIndexes::fit_histogram(), halfsampledImageTest(), halfsampledImageTest2(), halfsampledRotadedImageTest(), halfsampledRotadedImageWithDownsampleTest(), TePDIWiSpeRFusion::RunImplementation(), TePDIWaveletAtrousFusion::RunImplementation(), TePDIVenturaFusion::RunImplementation(), TePDIPrincipalComponentsFusion::RunImplementation(), TePDIPCAWaveletFusion::RunImplementation(), TePDIIHSWaveletFusion::RunImplementation(), TePDIIHSFusion::RunImplementation(), TePDIGarguetFusion::RunImplementation(), TePDIDecorrelationEnhancement::RunImplementation(), TePDIPrincipalComponents::RunImplementation_direct(), sameImageAndBoxesTest(), sameImageDifBoxesTest(), sameImageGreenXBlueTest(), sameImageGreenXRedTest(), sameImageTest(), sameImageTest2(), sameImageTestWithMultiThread(), sameInvertedImageTest(), TePDIFusionIndexes::standard_deviation_diff_index(), TePDIFusionIndexes::structural_similarity_index(), TePDIParaSegBaatzStrategy::TePDIParaSegBaatzStrategy(), TePDIParaSegRegGrowStrategy::TePDIParaSegRegGrowStrategy(), TePDIFusionIndexes::uiqi_index(), and TePDIFusionIndexes::variance_difference_index().

00130 {
00131   progress_enabled_ = enabled;
00132   
00133   if( ! enabled ) {
00134     pi_manager_.Toggle( false );
00135   }
00136 }

bool TePDIAlgorithm::UpdateProgInt ( unsigned int  step  )  [protected, inherited]

Update the current progress interface to the current step.

Parameters:
step Current step.
Returns:
true if the interface was canceled, false otherwise.
Deprecated:
DEPRECATED - This method will be removed in the future (each algorithm must check the variable TePDIAlgorithm::progress_enabled_ and instantiate its own TePDIPIManager when necessary).

Definition at line 149 of file TePDIAlgorithm.cpp.

References TePDIAlgorithm::pi_manager_, and TePDIPIManager::Update().

Referenced by TePDIContrast::FullRangeLutRemapLevels(), TePDIContrast::GetLinearLut(), TePDIContrast::GetLogLut(), TePDIContrast::GetNegativeLut(), TePDIContrast::GetSimpleSlicerLut(), TePDIContrast::GetSquareLut(), TePDIContrast::GetSquareRootLut(), TePDILevelRemap::RemapLevels(), TePDIContrast::RemapLevels(), TePDIRadarLeeFilter::RunAdaptImplementation(), TePDIRadarKuanFilter::RunAdaptImplementation(), TePDIMorfFilter::RunDilation(), TePDIMorfFilter::RunErosion(), TePDIRadarLeeFilter::RunFixedImplementation(), TePDIRadarKuanFilter::RunFixedImplementation(), TePDIRadarGammaFilter::RunFixedImplementation(), TePDIColorTransform::RunIhs2Rgb(), TePDIRaster2Vector::RunImplementation(), TePDIRadarFrostFilter::RunImplementation(), TePDIMorfFilter::RunMedian(), TePDIMorfFilter::RunMode(), TePDIBDFilter::RunRoberts(), and TePDIBDFilter::RunSobel().

00150 {
00151   return pi_manager_.Update( step );
00152 }


Field Documentation

double TePDIEMClas::EPSILON [private]

Definition at line 90 of file TePDIEMClas.hpp.

Referenced by RunImplementation().

long TePDIEMClas::H [private]

Definition at line 65 of file TePDIEMClas.hpp.

Referenced by RunImplementation().

int TePDIEMClas::M [private]

Definition at line 75 of file TePDIEMClas.hpp.

Referenced by CheckParameters(), and RunImplementation().

int TePDIEMClas::MAX_ITERATIONS [private]

Definition at line 85 of file TePDIEMClas.hpp.

Referenced by RunImplementation().

int TePDIEMClas::N [private]

Definition at line 70 of file TePDIEMClas.hpp.

Referenced by RunImplementation().

TePDIParameters TePDIAlgorithm::params_ [mutable, protected, inherited]

Internal parameters reference

Definition at line 119 of file TePDIAlgorithm.hpp.

Referenced by TePDIAlgorithm::Apply(), TePDIAlgorithm::CheckInternalParameters(), TePDIHants::CheckParameters(), TePDIContrast::getBaseLut(), TePDIContrast::getHistogram(), TePDIAlgorithm::GetParameters(), TePDIContrast::GetStatLut(), TePDIAlgorithm::Reset(), TePDIStatistic::ResetState(), TePDIRegGrowSeg::ResetState(), TePDIContrast::ResetState(), TePDIRadarLeeFilter::RunAdaptImplementation(), TePDIRadarKuanFilter::RunAdaptImplementation(), TePDIMorfFilter::RunDilation(), TePDIMorfFilter::RunErosion(), TePDIRadarLeeFilter::RunFixedImplementation(), TePDIRadarKuanFilter::RunFixedImplementation(), TePDIRadarGammaFilter::RunFixedImplementation(), TePDIWiSpeRFusion::RunImplementation(), TePDIWaveletAtrousFusion::RunImplementation(), TePDIWaveletAtrous::RunImplementation(), TePDIVenturaFusion::RunImplementation(), TePDITPMosaic::RunImplementation(), TePDISimplex::RunImplementation(), TePDISensorSimulator::RunImplementation(), TePDISAMClassifier::RunImplementation(), TePDIRegister::RunImplementation(), TePDIRegGrowSeg::RunImplementation(), TePDIRaster2Vector::RunImplementation(), TePDIRadarLeeFilter::RunImplementation(), TePDIRadarKuanFilter::RunImplementation(), TePDIRadarGammaFilter::RunImplementation(), TePDIRadarFrostFilter::RunImplementation(), TePDIPrincipalComponentsFusion::RunImplementation(), TePDIPrincipalComponents::RunImplementation(), TePDIPCAWaveletFusion::RunImplementation(), TePDIParallelSegmenter::RunImplementation(), TePDIOFMatching::RunImplementation(), TePDIMorfFilter::RunImplementation(), TePDIMMIOMatching::RunImplementation(), TePDIMixModel::RunImplementation(), TePDIMIMatching::RunImplementation(), TePDIMallatWavelets::RunImplementation(), TePDILinearFilter::RunImplementation(), TePDIKMeansClas::RunImplementation(), TePDIIsosegClas::RunImplementation(), TePDIIHSWaveletFusion::RunImplementation(), TePDIIHSFusion::RunImplementation(), TePDIHants::RunImplementation(), TePDIGeoMosaic::RunImplementation(), TePDIGeneralizedIHSFusion::RunImplementation(), TePDIGarguetFusion::RunImplementation(), TePDIFusionIndexes::RunImplementation(), TePDIFFT::RunImplementation(), RunImplementation(), TePDIDecorrelationEnhancement::RunImplementation(), TePDICorrelationMatching::RunImplementation(), TePDIContrast::RunImplementation(), TePDIColorTransform::RunImplementation(), TePDIBDFilter::RunImplementation(), TePDIBatchGeoMosaic::RunImplementation(), TePDIBaatz::RunImplementation(), TePDIArithmetic::RunImplementation(), TePDIWaveletAtrous::RunImplementation_decompose(), TePDIPrincipalComponents::RunImplementation_direct(), TePDIPrincipalComponents::RunImplementation_inverse(), TePDIWaveletAtrous::RunImplementation_recompose(), TePDIMorfFilter::RunMedian(), TePDIMorfFilter::RunMode(), TePDIBDFilter::RunRoberts(), and TePDIBDFilter::RunSobel().

TePDIPIManager TePDIAlgorithm::pi_manager_ [protected, inherited]

The internal progress interface.

Deprecated:
DEPRECATED - This object will be removed in the future (each algorithm must check the variable TePDIAlgorithm::progress_enabled_ and instantiate its own TePDIPIManager when necessary).

Definition at line 134 of file TePDIAlgorithm.hpp.

Referenced by TePDIAlgorithm::IncProgInt(), TePDIAlgorithm::StartProgInt(), TePDIAlgorithm::StopProgInt(), TePDIAlgorithm::ToggleProgInt(), and TePDIAlgorithm::UpdateProgInt().

bool TePDIAlgorithm::progress_enabled_ [protected, inherited]

A flag to indicate when the algorithm should initiate a progress interface.

Definition at line 125 of file TePDIAlgorithm.hpp.

Referenced by TePDIFusionIndexes::bias_index(), TePDITPMosaic::calcStats(), TePDIGeoMosaic::calcStats(), TePDIKMeansClas::classifyPixels(), TePDIFusionIndexes::correlation_coefficient_index(), TePDIFusionIndexes::ergas_index(), TePDIFusionIndexes::fit_histogram(), TePDIKMeansClas::GenerateClassificationParameters(), TePDIMallatWavelets::GenerateLevel(), TePDIStatistic::getHistogram(), TePDIStatistic::getJointHistogram(), TePDIKMeansClas::kmeans(), TePDIMMIOMatching::matchFeatures(), TePDIFusionIndexes::raster_mean(), TePDIFusionIndexes::rasters_difference(), TePDIMallatWavelets::Recompose(), TePDIWiSpeRFusion::RunImplementation(), TePDIWaveletAtrousFusion::RunImplementation(), TePDIVenturaFusion::RunImplementation(), TePDITPMosaic::RunImplementation(), TePDISensorSimulator::RunImplementation(), TePDISAMClassifier::RunImplementation(), TePDIRegGrowSeg::RunImplementation(), TePDIPrincipalComponentsFusion::RunImplementation(), TePDIPCAWaveletFusion::RunImplementation(), TePDIParallelSegmenter::RunImplementation(), TePDIOFMatching::RunImplementation(), TePDIMMIOMatching::RunImplementation(), TePDIMIMatching::RunImplementation(), TePDILinearFilter::RunImplementation(), TePDIIHSWaveletFusion::RunImplementation(), TePDIIHSFusion::RunImplementation(), TePDIGeoMosaic::RunImplementation(), TePDIGeneralizedIHSFusion::RunImplementation(), TePDIGarguetFusion::RunImplementation(), RunImplementation(), TePDIDecorrelationEnhancement::RunImplementation(), TePDICorrelationMatching::RunImplementation(), TePDIBaatz::RunImplementation(), TePDIArithmetic::RunImplementation(), TePDIWaveletAtrous::RunImplementation_decompose(), TePDIPrincipalComponents::RunImplementation_direct(), TePDIPrincipalComponents::RunImplementation_inverse(), TePDIWaveletAtrous::RunImplementation_recompose(), TePDIColorTransform::RunRgb2Ihs(), TePDIFusionIndexes::sergas_index(), TePDIFusionIndexes::spatial_correlation_coefficient_index(), TePDIFusionIndexes::standard_deviation_diff_index(), TePDIAlgorithm::StartProgInt(), TePDIFusionIndexes::structural_similarity_index(), TePDIAlgorithm::TePDIAlgorithm(), TePDIAlgorithm::ToggleProgInt(), TePDIFusionIndexes::uiqi_index(), and TePDIFusionIndexes::variance_difference_index().

double TePDIEMClas::SHIFT_THRESHOLD [private]

Definition at line 95 of file TePDIEMClas.hpp.

Referenced by RunImplementation().

int TePDIEMClas::SX [private]

Definition at line 80 of file TePDIEMClas.hpp.

Referenced by RunImplementation().

int TePDIEMClas::SY [private]

Definition at line 80 of file TePDIEMClas.hpp.

Referenced by RunImplementation().

int TePDIEMClas::TOTAL_ATTRIBUTES [private]

Definition at line 70 of file TePDIEMClas.hpp.

Referenced by RunImplementation().

long TePDIEMClas::W [private]

Definition at line 65 of file TePDIEMClas.hpp.

Referenced by RunImplementation().


The documentation for this class was generated from the following files:
Generated on Sun Jul 29 04:07:42 2012 for TerraLib - Development Source by  doxygen 1.5.3