Loading...
Searching...
No Matches
SegmenterRegionGrowingMeanMerger.h
Go to the documentation of this file.
1/* Copyright (C) 2015 National Institute For Space Research (INPE) - Brazil.
2
3 This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5 TerraLib is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 TerraLib is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with TerraLib. See COPYING. If not, write to
17 TerraLib Team at <terralib-team@terralib.org>.
18*/
19
20/*!
21 \file terralib/rp/SegmenterRegionGrowingMeanMerger.h
22 \brief Segmenter mean merger used in region growing process.
23*/
24
25#ifndef __TERRALIB_RP_INTERNAL_SEGMENTERREGIONGROWINGMEANMERGER_H
26#define __TERRALIB_RP_INTERNAL_SEGMENTERREGIONGROWINGMEANMERGER_H
27
30
31namespace te
32{
33 namespace rp
34 {
35 /*!
36 \class SegmenterRegionGrowingMeanMerger
37 \brief Mean based Segments merger
38 */
40 public SegmenterRegionGrowingMerger< rg::MeanFeatureType >
41 {
42 public:
43
44 SegmenterRegionGrowingMeanMerger( const unsigned int featuresNumber );
45
47
48 //overload
52 SegmenterRegionGrowingMergeData * const mergeDataPtr ) const;
53
54 //overload
57 SegmenterRegionGrowingMergeData const * const mergeDataPtr ) const;
58
59 //overload
61
62 //overload
63 inline unsigned int getSegmentFeaturesSize() const { return m_featuresNumber; };
64
66
67 protected :
68 unsigned int m_featuresNumber; //!< The number of features (bands).
70
71 // variables used by the method getDissimilarity
74 mutable unsigned int m_getDissimilarity_meansIdx;
75
76 // variables used by mergeFeatures
77 mutable unsigned int m_mergeFeatures_meansIdx;
78 };
79 } // end namespace rp
80} // end namespace te
81
82#endif // __TERRALIB_RP_INTERNAL_SEGMENTERREGIONGROWINGMEANMERGER_H
Segmenter merger used in region growing process.
DissimilarityTypeT getDissimilarity(SegmenterRegionGrowingSegment< rg::MeanFeatureType > const *const segment1Ptr, SegmenterRegionGrowingSegment< rg::MeanFeatureType > const *const segment2Ptr, SegmenterRegionGrowingMergeData *const mergeDataPtr) const
Returns a dimilarity index between this and the other segment.
SegmenterRegionGrowingSegment< rg::MeanFeatureType >::FeatureType m_dissimilarityNormFactor
void createMergeData(SegmenterRegionGrowingMergeData **mergeDataPtr) const
Create a new merge data instance when applicable.
unsigned int getSegmentFeaturesSize() const
Return the required segments features vector size (numer of elements).
void update(SegmenterRegionGrowingSegment< rg::MeanFeatureType > *const)
Update the internal state.
unsigned int m_featuresNumber
The number of features (bands).
SegmenterRegionGrowingMeanMerger(const unsigned int featuresNumber)
void mergeFeatures(SegmenterRegionGrowingSegment< rg::MeanFeatureType > *const segment1Ptr, SegmenterRegionGrowingSegment< rg::MeanFeatureType > const *const segment2Ptr, SegmenterRegionGrowingMergeData const *const mergeDataPtr) const
Merge specific segment features from both segments into the first segment.
SegmenterRegionGrowingSegment< rg::MeanFeatureType >::FeatureType m_getDissimilarity_dissValue
SegmenterRegionGrowingSegment< rg::MeanFeatureType >::FeatureType m_getDissimilarity_diffValue
Segmenter data used by the merger in region growing process.
Abstract class for the segments merger.
double DissimilarityTypeT
Type for dissimilarity.
TerraLib.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:139