Image Component Library (ICL)
TwoLevelRegionStructure.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLMarkers/src/ICLMarkers/TwoLevelRegionStructure.h **
10 ** Module : ICLMarkers **
11 ** Authors: Christof Elbrechter **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 
31 #pragma once
32 
33 #include <ICLUtils/CompatMacros.h>
34 #include <ICLUtils/BasicTypes.h>
35 #include <ICLUtils/Exception.h>
36 
38 
39 #include <vector>
40 #include <string>
41 
42 namespace icl{
43  namespace markers{
45 
67 
69  std::vector<int> children;
70 
72  std::string code;
73 
75 
94  TwoLevelRegionStructure(const std::string &code) ;
95 
97  virtual bool match(const cv::ImageRegion &r) const;
98 
100  inline bool operator==(const TwoLevelRegionStructure &s) const { return code == s.code; }
101  };
102 
103  } // namespace markers
104 }
105 
106 
ICLUtils_API MatchResult match(const std::string &text, const std::string &regex, int numSubMatches=0)
Applies a regular expression match on given text and regex pattern (internally using regex....
undocument this line if you encounter any issues!
Definition: Any.h:37
Ipp8u icl8u
8Bit unsigned integer type for the ICL
Definition: BasicTypes.h:64
region structure interface class
Definition: RegionStructure.h:49
std::string code
the original code (used for comparison)
Definition: TwoLevelRegionStructure.h:72
bool operator==(const TwoLevelRegionStructure &s) const
comparison operator (compares the code-strings)
Definition: TwoLevelRegionStructure.h:100
ImageRegion Structure providing region feature information.
Definition: ImageRegion.h:99
std::vector< int > children
sub-regions subregion-counts
Definition: TwoLevelRegionStructure.h:69
icl8u color
root region color
Definition: TwoLevelRegionStructure.h:66
Defines a common two level RegionStructure.
Definition: TwoLevelRegionStructure.h:64
#define ICLMarkers_API
Definition: CompatMacros.h:180