TePDIRegGrowSeg Class Reference
[Segmentation algorithms.]

#include <TePDIRegGrowSeg.hpp>

Inheritance diagram for TePDIRegGrowSeg:

TePDIAlgorithm

Detailed Description

This is the class models an image segmentation process.
Author:
Nicolas Despres <nicolasdespres@wanadoo.fr>
Note:
The segmentation is performed through a region growing approach described in: S. A. Bins, L. M. G. Fonseca, G. J. Erthal e F. M. Ii, "Satellite Imagery segmentation: a region growing approach", VIII Simp�sio Brasileiro de Sensoriamento Remoto, Salvador, BA, 14-19 abril 1996.

The general required parameters :

Parameters:
input_image (TePDITypes::TePDIRasterPtrType),
euc_treshold (double) - euclidian distance treshold value.
area_min (int) - cell pixel size min value.
Note:
The following parameters are optional and will be used if present.
Parameters:
restriction_image (TePDITypes::TePDIRasterPtrType) - Restriction (mask) image ( restriction image pixels with value zero will not be inside any segments generated from the input_image, they will be ignored ).
output_polsets ( TePDITypes::TePDIPolSetMapPtrType ) - The user supplied output polygon sets map where the generated polygons will be stored (each polygon set contains polygons related to the same pixel value).
output_image (TePDITypes::TePDIRasterPtrType), pointer to a Labelled image containing the final segmentation. Each pixel contains the cell id number to which it belongs. This image must have TeUNSIGNEDLONG data type.
Examples:

TePDIClassification_test.cpp, and TePDISegmentation_test.cpp.

Definition at line 576 of file TePDIRegGrowSeg.hpp.


Public Types

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

Public Member Functions

bool Apply (const TePDIParameters &params)
bool Apply ()
bool CheckParameters (const TePDIParameters &parameters) const
const TePDIParametersGetParameters () const
bool Reset (const TePDIParameters &params)
 TePDIRegGrowSeg ()
void ToggleProgInt (bool enabled)
 ~TePDIRegGrowSeg ()

Static Public Member Functions

static TePDIAlgorithmDefaultObject (const TePDIParameters &params)

Protected Member Functions

void Adjust ()
bool CheckInternalParameters () const
bool IncProgInt ()
bool InitWindow ()
TePDIRGSCellMergeCells (TePDIRGSCell *c1, TePDIRGSCell *c2)
bool MergeMutuallyClosestCells ()
bool MergeSimilarCells ()
bool MergeSmallCells (long area, int linmax)
void ResetState (const TePDIParameters &params)
bool Resort ()
bool RunImplementation ()
void StartProgInt (const std::string &message, unsigned int steps)
void StopProgInt ()
bool UpdateProgInt (unsigned int step)

Protected Attributes

int Areamin_
CellStack cellStack
long CurrentWindow_
double Difsim_
int fcol_
int flin_
int icol_
int ilin_
TePDITypes::TePDIRasterPtrType Imageexc_
TePDITypes::TePDIRasterPtrType Imagein_
TePDITypes::TePDIRasterPtrType Imagelab_
TePDIRGSCellListListCell_
int Nban_
int Ncol_
int Nlin_
long NWindow_
long OnLimbo_
TePDIParameters params_
TePDIPIManager pi_manager_
bool progress_enabled_
int sizecol_
int sizelin_
unsigned longtuple_
TePDIRGSCell ** WindowCell_
long WindowColumns_
long WindowLines_
long WindowOffset_

Member Typedef Documentation

const TeSharedPtr< TePDIAlgorithm > TePDIAlgorithm::const_pointer [inherited]

Reimplemented in TePDIBufferedFilter, TePDIEMClas, TePDIFusionIndexes, TePDIGeneralizedIHSFusion, TePDIIsosegClas, TePDIKMeansClas, TePDILevelRemap, TePDILinearFilter, TePDIRadarFilter, TePDIRadarFrostFilter, TePDIRadarGammaFilter, TePDIRadarKuanFilter, TePDIRadarLeeFilter, TePDIRaster2Vector, TePDISensorSimulator, and TePDIStatistic.

Definition at line 52 of file TePDIAlgorithm.hpp.

TeSharedPtr< TePDIAlgorithm > TePDIAlgorithm::pointer [inherited]

Reimplemented in TePDIBufferedFilter, TePDIEMClas, TePDIFusionIndexes, TePDIGeneralizedIHSFusion, TePDIIsosegClas, TePDIKMeansClas, TePDILevelRemap, TePDILinearFilter, TePDIRadarFilter, TePDIRadarFrostFilter, TePDIRadarGammaFilter, TePDIRadarKuanFilter, TePDIRadarLeeFilter, TePDIRaster2Vector, TePDISensorSimulator, and TePDIStatistic.

Definition at line 47 of file TePDIAlgorithm.hpp.


Constructor & Destructor Documentation

TePDIRegGrowSeg::TePDIRegGrowSeg (  ) 

Default Constructor.

Definition at line 7 of file TePDIRegGrowSeg.cpp.

References Areamin_, CurrentWindow_, Difsim_, ListCell_, Nban_, Ncol_, Nlin_, NULL, OnLimbo_, tuple_, WindowCell_, WindowColumns_, WindowLines_, and WindowOffset_.

00008 {
00009         ListCell_      = NULL;
00010         WindowCell_    = NULL;
00011         tuple_         = NULL;
00012         OnLimbo_       = 0;
00013         CurrentWindow_ = 0;
00014         WindowOffset_  = 1;
00015         WindowLines_   = 0;
00016         WindowColumns_ = 0;
00017         Nlin_          = 0;
00018         Ncol_          = 0;
00019         Nban_          = 0;
00020         Areamin_       = 0;
00021         Difsim_       = (float)0;
00022 }

TePDIRegGrowSeg::~TePDIRegGrowSeg (  ) 

Default Destructor

Definition at line 25 of file TePDIRegGrowSeg.cpp.

References Areamin_, CurrentWindow_, Difsim_, Imageexc_, Imagein_, Imagelab_, ListCell_, Nban_, Ncol_, Nlin_, NULL, NWindow_, TeSharedPtr< T >::reset(), tuple_, WindowCell_, WindowColumns_, WindowLines_, and WindowOffset_.

00026 {
00027         Imagein_.reset();
00028         Imagelab_.reset();
00029         Imageexc_.reset();
00030 
00031         if( WindowCell_ != NULL ) {delete []WindowCell_; WindowCell_=NULL;}
00032         if( tuple_      != NULL ) {delete []tuple_; tuple_=NULL;}
00033         NWindow_       = 0;
00034         WindowLines_   = 0;
00035         WindowColumns_ = 0;
00036         CurrentWindow_ = 0;
00037         WindowOffset_  = 1;
00038         Nlin_       = 0;
00039         Ncol_       = 0;
00040         Nban_       = 0;
00041         Areamin_    = 0;
00042         Difsim_     = (float)0;
00043         if( ListCell_  != NULL )
00044         {
00045                 TePDIRGSCellList::iterator it;
00046                 for (it=ListCell_->begin(); it!=ListCell_->end(); it++)
00047                         delete (*it).second;
00048                 ListCell_->clear();
00049                 delete ListCell_;
00050                 ListCell_ = NULL;
00051         }
00052 }


Member Function Documentation

void TePDIRegGrowSeg::Adjust (  )  [protected]

Remove dead cells from list of cells.

Definition at line 633 of file TePDIRegGrowSeg.cpp.

References TePDIRGSCell::AdjustNeighborhood(), cellStack, TePDIRGSCell::Dead(), ListCell_, NULL, and CellStack::Push().

Referenced by InitWindow(), MergeMutuallyClosestCells(), MergeSimilarCells(), MergeSmallCells(), and RunImplementation().

00634 {
00635         TePDIRGSCell    *c;
00636         TePDIRGSCellList::iterator itt;
00637                 TePDIRGSCellList::iterator it=ListCell_->begin();
00638         while (it!=ListCell_->end()) {
00639             itt=it;
00640                         c=(*itt).second;
00641                         it++;
00642             if ( c == NULL ) {
00643                 ListCell_->erase(itt);
00644             } else if( c->Dead() ) {
00645                 ListCell_->erase(itt);
00646                 cellStack.Push(c);
00647             } else {
00648                 c->AdjustNeighborhood();
00649             }
00650         }
00651 }

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(), 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 TePDIRegGrowSeg::CheckParameters ( const TePDIParameters parameters  )  const [virtual]

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

Note:
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 79 of file TePDIRegGrowSeg.cpp.

References TePDIParameters::CheckParameter(), TePDIParameters::GetParameter(), TeSharedPtr< T >::isActive(), TEAGN_LOGERR, TEAGN_TRUE_OR_RETURN, TeRasterParams::TeNotReady, TeRasterParams::TeReadyToWrite, and TeUNSIGNEDLONG.

00080 {
00081   /* Checking for general required parameters */
00082 
00083   //parameter input_image
00084   TePDITypes::TePDIRasterPtrType inRaster;
00085   if( ! parameters.GetParameter( "input_image", inRaster ) ) {
00086 
00087     TEAGN_LOGERR( "Missing parameter: input_image" );
00088     return false;
00089   }
00090   if( ! inRaster.isActive() ) {
00091 
00092     TEAGN_LOGERR( "Invalid parameter: input_image inactive" );
00093     return false;
00094   }
00095   if( inRaster->params().status_ == TeRasterParams::TeNotReady ) {
00096 
00097     TEAGN_LOGERR( "Invalid parameter: input_image not ready" );
00098     return false;
00099   }
00100   TEAGN_TRUE_OR_RETURN( ( ! inRaster->params().useDummy_ ),
00101     "input_image must not contain dummy values" );
00102 
00103   //parameter output_image
00104   if( parameters.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
00105     "output_image" ) ) {
00106     
00107     TePDITypes::TePDIRasterPtrType outRaster;
00108     if( ! parameters.GetParameter( "output_image", outRaster ) ) {
00109   
00110       TEAGN_LOGERR( "Missing parameter: output_image" );
00111       return false;
00112     }
00113     if( ! outRaster.isActive() ) {
00114   
00115       TEAGN_LOGERR( "Invalid parameter: output_image inactive" );
00116       return false;
00117     }
00118     if( outRaster->params().status_ != TeRasterParams::TeReadyToWrite ) {
00119   
00120       TEAGN_LOGERR( "Invalid parameter: output_image not ready" );
00121       return false;
00122     }
00123     TEAGN_TRUE_OR_RETURN( 
00124       ( outRaster->params().dataType_[0] == TeUNSIGNEDLONG ),
00125       "Invalid parameter: output_image pixel type must be TeUNSIGNEDLONG" );
00126   }
00127   
00128   //parameter restriction_image
00129   TePDITypes::TePDIRasterPtrType restrictionRaster;
00130   if( parameters.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
00131     "restriction_image" ) ) {
00132 
00133     if( ! parameters.GetParameter( "restriction_image", restrictionRaster ) ) {
00134 
00135       TEAGN_LOGERR( "Missing parameter: restriction_image" );
00136       return false;
00137     }
00138     if( ! restrictionRaster.isActive() ) {
00139 
00140       TEAGN_LOGERR( "Invalid parameter: restriction_image inactive" );
00141       return false;
00142     }
00143     if( restrictionRaster->params().status_ == TeRasterParams::TeNotReady ) {
00144 
00145       TEAGN_LOGERR( "Invalid parameter: restriction_image not ready" );
00146       return false;
00147     }
00148     TEAGN_TRUE_OR_RETURN( ( ! restrictionRaster->params().useDummy_ ),
00149       "input_image must not contain dummy values" );    
00150   }
00151 
00152   if( ! parameters.CheckParameter< double >( "euc_treshold" ) ) {
00153 
00154       TEAGN_LOGERR( "Missing parameter: euc_treshold" );
00155       return false;
00156   }
00157 
00158   if( ! parameters.CheckParameter< int >( "area_min" ) ) {
00159 
00160         TEAGN_LOGERR( "Missing parameter: area_min" );
00161     return false;
00162   }
00163   
00164   if( parameters.CheckParameter< TePDITypes::TePDIPolSetMapPtrType >( 
00165     "output_polsets" ) ) {
00166             
00167     TePDITypes::TePDIPolSetMapPtrType output_polsets;
00168     parameters.GetParameter( "output_polsets", output_polsets );
00169             
00170     TEAGN_TRUE_OR_RETURN( output_polsets.isActive(),
00171       "Invalid parameter output_polsets : Inactive polygon set pointer" );   
00172   }   
00173 
00174   return true;
00175 }

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 TePDIRegGrowSeg::InitWindow (  )  [protected]

Initializes a window over a image

Returns:
true if OK. false on error.

Definition at line 306 of file TePDIRegGrowSeg.cpp.

References TePDIRGSCell::AddNeighbor(), Adjust(), Areamin_, cellStack, CurrentWindow_, TePDIRGSCell::Distance(), fcol_, flin_, icol_, TePDIRGSCell::Id(), ilin_, Imageexc_, TePDIRGSCell::Init(), TePDIRGSCell::InsertNeighbor(), TeSharedPtr< T >::isActive(), TePDIRGSCell::Kill(), TePDIRGSCell::LineMax(), ListCell_, MergeSmallCells(), Nban_, Ncol_, Nlin_, NULL, OnLimbo_, CellStack::Pop(), sizecol_, sizelin_, TAMJAN, tuple_, WindowCell_, WindowColumns_, and WindowOffset_.

Referenced by RunImplementation().

00307 {
00308         int             lin, col;
00309         long    ind;
00310         unsigned long   idcell,
00311                         idwindow,
00312                         cellid;
00313         float   dist;
00314         TePDIRGSCell *c = 0;
00315         TePDIRGSCell *cell = 0;
00316         TePDIRGSCell *cwindow = 0;
00317 
00318         ilin_ = (int)( ( CurrentWindow_ / WindowColumns_ ) * TAMJAN );
00319         icol_ = (int)( ( CurrentWindow_ % WindowColumns_ ) * TAMJAN );
00320         flin_ = ilin_ + TAMJAN - 1;
00321         if( flin_ >= Nlin_ ) flin_ = Nlin_ - 1;
00322         fcol_ = icol_ + TAMJAN - 1;
00323         if( fcol_ >= Ncol_ ) fcol_ = Ncol_ - 1;
00324         sizelin_   = flin_ - ilin_ + 1;
00325         sizecol_   = fcol_ - icol_ + 1;
00326         int     proLimbo = 6*TAMJAN;
00327 
00328 
00329 //CTX Drop cells that are farther than proLimbo from current window base line
00330         if (icol_ < TAMJAN && ilin_ > proLimbo)
00331         {
00332                 short   flag=0;
00333                 MergeSmallCells( Areamin_ , ilin_ - proLimbo);
00334 
00335                 TePDIRGSCellList::iterator it;
00336                 for (it=ListCell_->begin(); it!=ListCell_->end() ; ++it) {
00337                         c=(*it).second;
00338 
00339                         if( c == NULL ) continue;
00340                         if ((ilin_ - c->LineMax()) > proLimbo)
00341                         {
00342                                 flag = 1;
00343                                 c->Kill();
00344                                 OnLimbo_++;
00345                         }
00346                 }
00347                 if (flag)
00348                         Adjust();
00349         }
00350 
00351         // Constructs the array of regions belonging to this window
00352         idcell = (unsigned long)WindowOffset_;
00353         double val;
00354 
00355         for( lin = ilin_; lin <= flin_; lin++ ) {
00356                 for( col = icol_; col <= fcol_; col++ ) {
00357 
00358                         if( Imageexc_.isActive() ){
00359                                 (*Imageexc_).getElement(col, lin ,val,0);
00360                                 if( val == 0 ){
00361                                         (*Imagelab_).setElement(col,lin,0L);
00362                                         WindowCell_[idcell-WindowOffset_] = NULL;
00363                                         idcell++;
00364                                         continue;
00365                                 }
00366                         }
00367 
00368                         if (!((*Imagelab_).setElement(col,lin,(double) idcell,0))){
00369                                                          return false;
00370                         }
00371 
00372                         double d;
00373                         (*Imagelab_).getElement(col, lin,d,0);
00374                         for( int ban = 0; ban < Nban_; ban++ ) {
00375                                 (*Imagein_).getElement(col,lin ,val,ban);
00376                                 tuple_[ban] = (unsigned long)val;
00377                         }
00378 
00379 //FAMI1095 (it's really not necessary to free memory)
00380 //if(WindowCell_[idcell-WindowOffset_]) {delete WindowCell_[idcell-WindowOffset_]; WindowCell_[idcell-WindowOffset_]=NULL;}
00381                         //WindowCell_[idcell-WindowOffset_] = new TePDIRGSCell( tuple_, idcell, lin, col, Nban_ );
00382                         WindowCell_[idcell-WindowOffset_] = cellStack.Pop();
00383 
00384                         WindowCell_[idcell-WindowOffset_]->Init( tuple_, idcell, lin, col, Nban_ );
00385                         if( WindowCell_[idcell-WindowOffset_] == NULL )
00386                         {
00387                                 for( unsigned int i = 0; i < idcell-WindowOffset_; i++ )
00388                                         delete WindowCell_[i];
00389                         }
00390                         idcell++;
00391                 }
00392         }
00393 
00394 
00395         // Take the neighborhood of regions lying inside the window
00396         for( lin = ilin_; lin <= flin_; lin++ )
00397         {
00398                 for( col = icol_; col <= fcol_; col++ )
00399                 {
00400                         ind = (lin - ilin_) * sizecol_ + ( col - icol_ );
00401                         c = WindowCell_[ind];
00402                         if( c == NULL )
00403                                 continue;
00404                         if( col < fcol_ && WindowCell_[ind+1] != NULL )
00405                         {
00406                                 dist = WindowCell_[ind]->Distance( WindowCell_[ind+1] );
00407                                 WindowCell_[ind]->InsertNeighbor(WindowCell_[ind+1], dist );
00408                                 WindowCell_[ind+1]->InsertNeighbor(WindowCell_[ind], dist );
00409                         }
00410                         if( lin < flin_ && WindowCell_[ind+sizecol_] != NULL )
00411                         {
00412                                 dist = WindowCell_[ind]->Distance( WindowCell_[ind+sizecol_] );
00413                                 WindowCell_[ind]->InsertNeighbor(WindowCell_[ind+sizecol_], dist );
00414                                 WindowCell_[ind+sizecol_]->InsertNeighbor(WindowCell_[ind], dist );
00415                         }
00416                 }
00417         }
00418 
00419         // Atualiza Cells de fronteira a esquerda
00420         double tmp;
00421         if( icol_ > 0 )
00422         {
00423                 cellid = 0L;
00424                 for( lin = ilin_; lin <= flin_; lin++ )
00425                 {
00426                         (*Imagelab_).getElement(icol_-1,lin,tmp,0);
00427                         idcell = (unsigned long)tmp;
00428                         (*Imagelab_).getElement(icol_,lin,tmp,0);
00429                         idwindow = (unsigned long)tmp;
00430                         if( idcell == 0L || idwindow == 0L )
00431                                 continue;
00432                         if( cellid != idcell ){
00433                                 TePDIRGSCellList::iterator it;
00434                                 if ( (it = ListCell_->find( idcell ) ) == ListCell_->end() ) {
00435                                     //Fatal error : we didn t found the id in the list
00436                                                                         return false;
00437                                 }
00438                                 cell = (*it).second;
00439                                 cellid = cell->Id();
00440                         }
00441                         cwindow = WindowCell_[ (lin-ilin_) * sizecol_ ];
00442                         dist = cell->Distance( cwindow );
00443                         cell->AddNeighbor( cwindow, dist );
00444                         cwindow->AddNeighbor( cell, dist );
00445                 }
00446         }
00447 
00448         // Atualiza Cells de fronteira acima
00449         if( ilin_ > 0 )
00450         {
00451                 cellid = 0L;
00452                 for( col = icol_; col <= fcol_; col++ )
00453                 {
00454                         (*Imagelab_).getElement(col,ilin_-1,tmp,0);
00455                         idcell = (unsigned long)tmp;
00456                         (*Imagelab_).getElement(col,ilin_,tmp,0);
00457                         idwindow = (unsigned long)tmp;
00458                         if( idcell == 0L || idwindow == 0L )
00459                                 continue;
00460                         if( cellid != idcell )
00461                         {
00462                                 TePDIRGSCellList::iterator it;
00463                                 if ( (it = ListCell_->find( idcell ) ) == ListCell_->end() ) {
00464                                                                         return false;
00465                                 }
00466                                 cell = (*it).second;
00467                                 cellid = cell->Id();
00468                         }
00469                         cwindow = WindowCell_[ col - icol_ ];
00470                         dist = cell->Distance( cwindow );
00471                         cell->AddNeighbor( cwindow, dist );
00472                         cwindow->AddNeighbor( cell, dist );
00473                 }
00474         }
00475 
00476         // Add Regions in WindowCell_ in the list ListCell_;
00477         for( ind = 0; ind < sizelin_ * sizecol_; ind++ ){
00478                 if( WindowCell_[ ind ] != NULL )
00479                         ListCell_->insert(make_pair(WindowCell_[ ind ]->Id(), WindowCell_[ ind ]));
00480         }                                               //stCell[WindowCell_[ ind ]->Id()]=WindowCell_[ ind ];
00481 
00482 
00483         WindowOffset_ += ((long)sizelin_ * sizecol_ );
00484         return true;
00485 
00486 }

TePDIRGSCell * TePDIRegGrowSeg::MergeCells ( TePDIRGSCell c1,
TePDIRGSCell c2 
) [protected]

Merges two cells

Parameters:
c1 pointer to a cell to be merged
c2 pointer to a cell to be merged
Returns:
pointer to cell resulting from merging..

Definition at line 654 of file TePDIRegGrowSeg.cpp.

References TePDIRGSCell::Area(), TePDIRGSCell::BoundingRectangle(), TePDIRGSCell::Id(), TePDIRGSCell::Merge(), and NULL.

Referenced by MergeMutuallyClosestCells(), MergeSimilarCells(), and MergeSmallCells().

00655 {
00656         double val;
00657         int     lmin, lmax, cmin, cmax;
00658         TePDIRGSCell    *cret = NULL;
00659 
00660         if( c1 == NULL || c2 == NULL ) return NULL;
00661         if( c1 == c2 ) return NULL;
00662 
00663         if( c1->Area() >= c2->Area() )
00664         {
00665                 if( c1->Merge( c2 ) == 0 ) return NULL;
00666                 c2->BoundingRectangle( lmin, cmin, lmax, cmax );
00667                 for( int lin = lmin; lin <= lmax; lin++ ) {
00668                         for( unsigned int col = cmin; col <= (unsigned int)cmax; col++ ) {
00669                                 (*Imagelab_).getElement(col,lin,val,0);
00670                                 if( (unsigned long)val == (unsigned long)c2->Id() ) (*Imagelab_).setElement(col,lin,(unsigned long)c1->Id(), 0);
00671                         }
00672                 }
00673                 cret = c1;
00674         }
00675         else
00676         {
00677                 if( c2->Merge( c1 ) == 0 ) return NULL;
00678                 c1->BoundingRectangle( lmin, cmin, lmax, cmax );
00679                 for( int lin = lmin; lin <= lmax; lin++ ) {
00680                         for( int col = cmin; col <= cmax; col++ ) {
00681                                 (*Imagelab_).getElement(col,lin,val,0);
00682                                 if( (unsigned long)val == (unsigned long)c1->Id() )
00683                                         (*Imagelab_).setElement(col,lin,(unsigned long)c2->Id(),0);
00684                         }
00685                 }
00686                 cret = c2;
00687         }
00688 
00689         return cret;
00690 }

bool TePDIRegGrowSeg::MergeMutuallyClosestCells (  )  [protected]

Merges all pairs of neighbouring cells with euclidian distance bellow a threshold. The pair of cells say, c1 and c2 must satisfy the criteria: 1 - c1 = closestneighbour( c2 ) or c2 = closestneighbour( c1 ). 2 - dist( c1, c2) < threshold >

Returns:
true if OK. false on error.

Definition at line 489 of file TePDIRegGrowSeg.cpp.

References Adjust(), TePDIRGSCell::ClosestNeighbor(), TePDIRGSCell::Dead(), Difsim_, ListCell_, MergeCells(), and NULL.

Referenced by RunImplementation().

00489                                            {
00490         float   dist;
00491         float   diff;
00492         char    status;
00493         TePDIRGSCell    *c,
00494                 *cgo,
00495                 *cback;
00496 
00497         for( int step = 1; step <= (int)Difsim_ ; step++ )
00498         {
00499            diff = (float)step * step;
00500            do {
00501                 status  = 0;
00502                 TePDIRGSCellList::iterator it;
00503                 for (it=ListCell_->begin(); it!=ListCell_->end() ; ++it) {
00504                         c=(*it).second;
00505 
00506                         while( !c->Dead() )
00507                         {
00508                                 if( ( cgo = c->ClosestNeighbor(dist) ) == NULL ) break;
00509 
00510                                 cback = cgo->ClosestNeighbor(dist);
00511                                 if( c == cback ) {
00512                                         if( dist <= diff  ) {
00513                                                 c = MergeCells( c, cgo );
00514                                                 status = 1;
00515                                         }else
00516                                                 break;
00517                                 }else
00518                                         break;
00519                         }
00520                 }
00521 //              Adjust();
00522            }while( status );
00523         }
00524         Adjust();
00525 
00526         return true;
00527 }

bool TePDIRegGrowSeg::MergeSimilarCells (  )  [protected]

Merges all pairs of neighbouring cells with euclidian distance bellow a threshold. The pair of cells say, c1 and c2 must satisfy the criteria: 1 - c1 = closestneighbour( c2 ) or c2 = closestneighbour( c1 ). 2 - dist( c1, c2) < threshold >

Returns:
true if OK. false on error.

Definition at line 530 of file TePDIRegGrowSeg.cpp.

References Adjust(), TePDIRGSCell::ClosestNeighbor(), TePDIRGSCell::Dead(), Difsim_, ListCell_, MergeCells(), and NULL.

00531 {
00532         float   d1;
00533         float   diff;
00534         char    status;
00535         TePDIRGSCell    *c,
00536                 *cgo;
00537 
00538         for( int step = 1; step <= (int)Difsim_ ; step++ )
00539         {
00540            diff = (float)step * step;
00541            do {
00542                 status  = 0;
00543 
00544                 TePDIRGSCellList::iterator it;
00545                 for (it=ListCell_->begin(); it!=ListCell_->end() ; ++it) {
00546                         c=(*it).second;
00547 
00548                         while( !c->Dead() )
00549                         {
00550                                 if( ( cgo = c->ClosestNeighbor(d1) ) == NULL ) break;
00551                                 if( d1 <= diff )
00552                                 {
00553                                         c = MergeCells( c, cgo );
00554                                         status = 1;
00555                                 }
00556                                 else    break;
00557                         }
00558                 }
00559                 Adjust();
00560            }while( status );
00561         }
00562         return true;
00563 }

bool TePDIRegGrowSeg::MergeSmallCells ( long  area,
int  linmax 
) [protected]

Eliminates all cells with area smaller than argument area. The cells with area smaller than argument area are merged with its nearest neighbour cell.

Parameters:
area size in pixels which defines de area treshold for merging.
linmax lin max of the image to consider
Returns:
true if OK. false on error.

Definition at line 566 of file TePDIRegGrowSeg.cpp.

References Adjust(), TePDIRGSCell::Area(), Areamin_, TePDIRGSCell::ClosestNeighbor(), TePDIRGSCell::Dead(), Difsim_, TePDIRGSCell::LineMax(), ListCell_, MergeCells(), and NULL.

Referenced by InitWindow(), and RunImplementation().

00567 {
00568         char    status;
00569         TePDIRGSCell    *c,
00570                 *cgo,
00571                 *cback;
00572         float   dist;
00573         float   diff;
00574         int step;
00575 
00576         if( area > Areamin_ )area = Areamin_;
00577 
00578 // Elimina regioes pequenas atraves do merging com a regiao vizinha mais proxima
00579         for( step = 1; step <= 6; step++ )
00580         {
00581            diff = (float)(Difsim_ + step * 2);
00582            diff = diff * diff;
00583            do {         status  = 0;
00584 
00585                 TePDIRGSCellList::iterator it;
00586                 for (it=ListCell_->begin(); it!=ListCell_->end() ; ++it) {
00587                         c=(*it).second;
00588 
00589                         if( c->Dead() || c->Area() > area || c->LineMax() > linmax)
00590                                 continue;
00591                         if( ( cgo = c->ClosestNeighbor(dist) ) == NULL )
00592                                 break;
00593                         cback = cgo->ClosestNeighbor(dist);
00594                         if( c != cback ) continue;
00595                         if( dist <= diff || step > 5 )
00596                         {
00597                                 c = MergeCells( c, cgo );
00598                                 status = 1;
00599                         }
00600                 }
00601 //CTX           Adjust();
00602            }while( status );
00603         }
00604         Adjust();
00605 
00606         for( step = 1; step <= 6; step++ )
00607         {
00608            diff = (float)(Difsim_ + step * 2);
00609            diff = diff * diff;
00610            do {         status  = 0;
00611                 TePDIRGSCellList::iterator it;
00612                 for (it=ListCell_->begin(); it!=ListCell_->end() ; ++it) {
00613                         c=(*it).second;
00614 
00615                         if( c->Dead() || c->Area() > area || c->LineMax() > linmax)
00616                                 continue;
00617                         if( ( cgo = c->ClosestNeighbor(dist) ) == NULL ) break;
00618                         if( dist <= diff || step > 5 )
00619                         {
00620                                 c = MergeCells( c, cgo );
00621                                 status = 1;
00622                         }
00623                 }
00624 //              Adjust();
00625            }while( status );
00626         }
00627         Adjust();
00628 
00629         return true;
00630 }

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(), 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 TePDIRegGrowSeg::ResetState ( const TePDIParameters params  )  [protected, virtual]

Reset the internal state to the initial state.

Parameters:
params The new parameters referente at initial state.

Implements TePDIAlgorithm.

Definition at line 55 of file TePDIRegGrowSeg.cpp.

References Imageexc_, Imagein_, Imagelab_, ListCell_, NULL, TePDIAlgorithm::params_, TeSharedPtr< T >::reset(), tuple_, and WindowCell_.

00056 {
00057   if( params != params_ ) {
00058     Imagein_.reset();
00059     Imagelab_.reset();
00060     Imageexc_.reset();
00061     
00062     if( WindowCell_ != NULL ) {delete []WindowCell_; WindowCell_=NULL;}
00063         
00064     if( tuple_ != NULL ) {delete []tuple_; tuple_=NULL;}
00065             
00066     if( ListCell_  != NULL )
00067     {
00068             TePDIRGSCellList::iterator it;
00069             for (it=ListCell_->begin(); it!=ListCell_->end(); it++)
00070                     delete (*it).second;
00071             ListCell_->clear();
00072             delete ListCell_;
00073             ListCell_ = NULL;
00074     }    
00075   }
00076 }

bool TePDIRegGrowSeg::Resort (  )  [protected]

Updates ImageLab by writing the cell id number for every pixel belonging to the cell.

Returns:
true if OK. false on error.

Definition at line 694 of file TePDIRegGrowSeg.cpp.

References cellStack, CellStack::Clear(), ListCell_, Ncol_, Nlin_, and NULL.

Referenced by RunImplementation().

00695 {
00696 // Evaluate total number of cells
00697 
00698         //long size = OnLimbo_ + ListCell_->size();
00699 
00700 // Allocate array for resorting image
00701         map<long, long> m_map;
00702         long    newid,
00703                         oldid = 0L,
00704                         index=1,
00705                         nindex = 0L;
00706         double val;
00707 
00708         for( int lin = 0; lin < Nlin_; lin++ )
00709         {
00710                 for( int col = 0; col < Ncol_ ; col++ )
00711                 {
00712 
00713                         (*Imagelab_).getElement(col,lin,val,0);
00714                         newid=(long)val;
00715                         if( newid == 0L ) // 0L means excluded area for region growing....
00716                                 continue;
00717                         if( newid != oldid || oldid == 0L )
00718                         {
00719 
00720                                 if ( m_map.find(newid) == m_map.end() )
00721                                 {
00722                                         nindex++;
00723                                         index = nindex;
00724                                         m_map[newid] = index;
00725                                 }
00726                                 else index = m_map[newid];              // AND & LEO 10/00
00727                                 oldid = newid;
00728                         }
00729                         (*Imagelab_).setElement(col,lin,index,0);
00730                 }
00731         }
00732 
00733 
00734 // Free all memory
00735         ListCell_->clear();
00736         delete ListCell_;
00737         ListCell_ = NULL;
00738         cellStack.Clear();
00739 
00740         m_map.clear();
00741         return true;
00742 }

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

Runs the current algorithm implementation.

Returns:
true if OK. false on error.

Implements TePDIAlgorithm.

Definition at line 178 of file TePDIRegGrowSeg.cpp.

References Adjust(), TePDIAlgorithm::Apply(), Areamin_, TeRasterParams::boxResolution(), TePDIParameters::CheckParameter(), CurrentWindow_, Difsim_, TePDIParameters::GetParameter(), Imageexc_, Imagein_, Imagelab_, TeSharedPtr< T >::init(), InitWindow(), ListCell_, TeProjectionFactory::make(), MergeMutuallyClosestCells(), MergeSmallCells(), TeSharedPtr< T >::nakedPointer(), Nban_, TeRasterParams::nBands(), Ncol_, Nlin_, NULL, NWindow_, TePDIAlgorithm::params_, TePDIAlgorithm::progress_enabled_, TeRasterParams::projection(), TePDIAlgorithm::Reset(), Resort(), TeRasterParams::setDataType(), TePDIParameters::SetParameter(), TAMJAN, TEAGN_FALSE_OR_RETURN, TEAGN_TRUE_OR_RETURN, TePDIUtils::TeAllocRAMRaster(), TePDIUtils::TePDIUtilsAutoMemPol, TeUNSIGNEDLONG, tuple_, TePDIPIManager::Update(), WindowCell_, WindowColumns_, WindowLines_, and WindowOffset_.

00179 {
00180         params_.GetParameter( "input_image", Imagein_ ) ;
00181         params_.GetParameter( "area_min", Areamin_ ) ;
00182         params_.GetParameter( "euc_treshold", Difsim_ ) ;
00183 
00184         if( params_.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
00185           "restriction_image" ) ) {
00186 
00187           params_.GetParameter( "restriction_image", Imageexc_ );
00188         }
00189 
00190         Nban_ = (int)Imagein_->params().nBands();
00191 
00192         if( params_.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
00193           "output_image" ) ) {
00194 
00195           params_.GetParameter( "output_image", Imagelab_ );
00196             
00197           TeRasterParams Imagelab_params = Imagelab_->params();
00198   
00199           Imagelab_params.nBands( 1 );
00200           if( Imagein_->projection() != 0 ) {
00201             TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
00202               Imagein_->projection()->params() ) );          
00203             Imagelab_params.projection( proj.nakedPointer() );
00204           }
00205           Imagelab_params.boxResolution( Imagein_->params().box().x1(), 
00206             Imagein_->params().box().y1(), Imagein_->params().box().x2(), 
00207             Imagein_->params().box().y2(), Imagein_->params().resx_, 
00208             Imagein_->params().resy_ );  
00209 
00210           TEAGN_TRUE_OR_RETURN( Imagelab_->init( Imagelab_params ),
00211             "Output raster reset error" );            
00212         } else {
00213           TeRasterParams Imagelab_params = Imagein_->params();
00214           Imagelab_params.nBands( 1 );
00215           Imagelab_params.setDataType( TeUNSIGNEDLONG, -1 );
00216           
00217           TEAGN_TRUE_OR_RETURN( 
00218             TePDIUtils::TeAllocRAMRaster( Imagelab_, Imagelab_params,
00219             TePDIUtils::TePDIUtilsAutoMemPol ),
00220             "Internal raster allocation error");
00221         }
00222 
00223         Nlin_ = Imagelab_->params().nlines_;
00224         Ncol_ = Imagelab_->params().ncols_;
00225 
00226         // Initialize colection of regions
00227         ListCell_ = new TePDIRGSCellList;
00228         TEAGN_TRUE_OR_RETURN( ( ListCell_ != NULL ),
00229           "Unable to create the cells list" )
00230 
00231         // Initialize the array of regions of window
00232 
00233         WindowCell_ = new TePDIRGSCell*[TAMJAN*TAMJAN];
00234         TEAGN_TRUE_OR_RETURN( ( WindowCell_ != NULL ),
00235           "Unable to create TePDIRGSCell instance" )
00236                 
00237 
00238         // Set initial values
00239 
00240         tuple_ = new unsigned long[Nban_] ;
00241 
00242 
00243         WindowLines_ = ( Nlin_ % TAMJAN ) ? ( Nlin_ / TAMJAN + 1 ) : ( Nlin_ / TAMJAN );
00244         WindowColumns_ = ( Ncol_ % TAMJAN ) ? ( Ncol_ / TAMJAN + 1 ) : ( Ncol_ / TAMJAN );
00245         NWindow_    = WindowLines_ * WindowColumns_;
00246 
00247         // Start Region Growing
00248         short canceled = 0;
00249         WindowOffset_ = 1L;
00250 
00251 
00252         int step = 0;
00253         TePDIPIManager progress( "Region Growing...", NWindow_,
00254           progress_enabled_ );
00255 
00256         for( CurrentWindow_ = 0; CurrentWindow_ < NWindow_; CurrentWindow_++ )
00257         {
00258                 TEAGN_TRUE_OR_RETURN( InitWindow(),
00259                   "Unable to init window" )
00260                   
00261                 Adjust();
00262                 
00263                 TEAGN_TRUE_OR_RETURN( MergeMutuallyClosestCells(),
00264                   "Unable to merge cells" )
00265                                         
00266                 TEAGN_TRUE_OR_RETURN( MergeSmallCells( 5 , Nlin_),
00267                   "Unable to merge small cells" )
00268                                         
00269                 TEAGN_FALSE_OR_RETURN( progress.Update( step ),
00270                   "Canceled by the user" );
00271 
00272                 ++step;
00273         }
00274 
00275 
00276         if (!canceled)
00277         {
00278                 if( MergeSmallCells( Areamin_ , Nlin_) == 0 )
00279                                 canceled=1;
00280                 if( Resort() == 0 )
00281                                 canceled=1;
00282         }
00283         
00284         if (!canceled) {
00285           if( params_.CheckParameter< TePDITypes::TePDIPolSetMapPtrType >( 
00286             "output_polsets" ) ) {
00287             
00288             TePDIRaster2Vector vectorizer;
00289             
00290             TePDIParameters vectorizer_params = params_;
00291             vectorizer_params.SetParameter( "rotulated_image", Imagelab_ );
00292             vectorizer_params.SetParameter( "channel", (unsigned int)0 );
00293             
00294             TEAGN_TRUE_OR_RETURN( vectorizer.Reset( vectorizer_params ),
00295               "Unable to set vectorize parameters" );
00296             TEAGN_TRUE_OR_RETURN( vectorizer.Apply(),
00297               "Unable to create output polygon set" );
00298           }          
00299         }
00300 
00301         return !canceled;
00302 }

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

int TePDIRegGrowSeg::Areamin_ [protected]

Minimum area allowed to the final cells.

Definition at line 640 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow(), MergeSmallCells(), RunImplementation(), TePDIRegGrowSeg(), and ~TePDIRegGrowSeg().

CellStack TePDIRegGrowSeg::cellStack [protected]

Cell stack

Definition at line 673 of file TePDIRegGrowSeg.hpp.

Referenced by Adjust(), InitWindow(), and Resort().

long TePDIRegGrowSeg::CurrentWindow_ [protected]

Current subimage.

Definition at line 634 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow(), RunImplementation(), TePDIRegGrowSeg(), and ~TePDIRegGrowSeg().

double TePDIRegGrowSeg::Difsim_ [protected]

Minimum euclidian distance between final cells.

Definition at line 643 of file TePDIRegGrowSeg.hpp.

Referenced by MergeMutuallyClosestCells(), MergeSimilarCells(), MergeSmallCells(), RunImplementation(), TePDIRegGrowSeg(), and ~TePDIRegGrowSeg().

int TePDIRegGrowSeg::fcol_ [protected]

auxiliar variables

Definition at line 664 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow().

int TePDIRegGrowSeg::flin_ [protected]

auxiliar variables

Definition at line 658 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow().

int TePDIRegGrowSeg::icol_ [protected]

auxiliar variables

Definition at line 661 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow().

int TePDIRegGrowSeg::ilin_ [protected]

auxiliar variables

Definition at line 655 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow().

TePDITypes::TePDIRasterPtrType TePDIRegGrowSeg::Imageexc_ [protected]

Pointer to the image containing restrictions

Definition at line 610 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow(), ResetState(), RunImplementation(), and ~TePDIRegGrowSeg().

TePDITypes::TePDIRasterPtrType TePDIRegGrowSeg::Imagein_ [protected]

Array of pointer to images (input images).

Definition at line 604 of file TePDIRegGrowSeg.hpp.

Referenced by ResetState(), RunImplementation(), and ~TePDIRegGrowSeg().

TePDITypes::TePDIRasterPtrType TePDIRegGrowSeg::Imagelab_ [protected]

Pointer to the output image.

Definition at line 607 of file TePDIRegGrowSeg.hpp.

Referenced by ResetState(), RunImplementation(), and ~TePDIRegGrowSeg().

TePDIRGSCellList* TePDIRegGrowSeg::ListCell_ [protected]

Pointer to the list of cells.

Definition at line 613 of file TePDIRegGrowSeg.hpp.

Referenced by Adjust(), InitWindow(), MergeMutuallyClosestCells(), MergeSimilarCells(), MergeSmallCells(), ResetState(), Resort(), RunImplementation(), TePDIRegGrowSeg(), and ~TePDIRegGrowSeg().

int TePDIRegGrowSeg::Nban_ [protected]

Number of bands in Imagein

Definition at line 652 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow(), RunImplementation(), TePDIRegGrowSeg(), and ~TePDIRegGrowSeg().

int TePDIRegGrowSeg::Ncol_ [protected]

Number of colums in Imagelab.

Definition at line 649 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow(), Resort(), RunImplementation(), TePDIRegGrowSeg(), and ~TePDIRegGrowSeg().

int TePDIRegGrowSeg::Nlin_ [protected]

Number of lines in Imagelab.

Definition at line 646 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow(), Resort(), RunImplementation(), TePDIRegGrowSeg(), and ~TePDIRegGrowSeg().

long TePDIRegGrowSeg::NWindow_ [protected]

Number of subimages in the image.

Definition at line 625 of file TePDIRegGrowSeg.hpp.

Referenced by RunImplementation(), and ~TePDIRegGrowSeg().

long TePDIRegGrowSeg::OnLimbo_ [protected]

Number of cells which have been removed from ListCell due to distance criteria

Definition at line 619 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow(), and TePDIRegGrowSeg().

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(), 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(), 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(), TePDIEMClas::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(), 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(), TePDIEMClas::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().

int TePDIRegGrowSeg::sizecol_ [protected]

auxiliar variables

Definition at line 670 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow().

int TePDIRegGrowSeg::sizelin_ [protected]

auxiliar variables

Definition at line 667 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow().

unsigned long* TePDIRegGrowSeg::tuple_ [protected]

tuple of pixel (auxiliar).

Definition at line 622 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow(), ResetState(), RunImplementation(), TePDIRegGrowSeg(), and ~TePDIRegGrowSeg().

TePDIRGSCell** TePDIRegGrowSeg::WindowCell_ [protected]

Array of cells for a subimage.

Definition at line 616 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow(), ResetState(), RunImplementation(), TePDIRegGrowSeg(), and ~TePDIRegGrowSeg().

long TePDIRegGrowSeg::WindowColumns_ [protected]

Number of subimages along the columns of image

Definition at line 631 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow(), RunImplementation(), TePDIRegGrowSeg(), and ~TePDIRegGrowSeg().

long TePDIRegGrowSeg::WindowLines_ [protected]

Number of subimages along the lines of image

Definition at line 628 of file TePDIRegGrowSeg.hpp.

Referenced by RunImplementation(), TePDIRegGrowSeg(), and ~TePDIRegGrowSeg().

long TePDIRegGrowSeg::WindowOffset_ [protected]

Id number of the first cell in the subimage.

Definition at line 637 of file TePDIRegGrowSeg.hpp.

Referenced by InitWindow(), RunImplementation(), TePDIRegGrowSeg(), and ~TePDIRegGrowSeg().


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