A.I.M.S


component.h
Go to the documentation of this file.
1 /* This software and supporting documentation are distributed by
2  * Institut Federatif de Recherche 49
3  * CEA/NeuroSpin, Batiment 145,
4  * 91191 Gif-sur-Yvette cedex
5  * France
6  *
7  * This software is governed by the CeCILL-B license under
8  * French law and abiding by the rules of distribution of free software.
9  * You can use, modify and/or redistribute the software under the
10  * terms of the CeCILL-B license as circulated by CEA, CNRS
11  * and INRIA at the following URL "http://www.cecill.info".
12  *
13  * As a counterpart to the access to the source code and rights to copy,
14  * modify and redistribute granted by the license, users are provided only
15  * with a limited warranty and the software's author, the holder of the
16  * economic rights, and the successive licensors have only limited
17  * liability.
18  *
19  * In this respect, the user's attention is drawn to the risks associated
20  * with loading, using, modifying and/or developing or reproducing the
21  * software by the user in light of its specific status of free software,
22  * that may mean that it is complicated to manipulate, and that also
23  * therefore means that it is reserved for developers and experienced
24  * professionals having in-depth computer knowledge. Users are therefore
25  * encouraged to load and test the software's suitability as regards their
26  * requirements in conditions enabling the security of their systems and/or
27  * data to be ensured and, more generally, to use and operate it in the
28  * same conditions as regards security.
29  *
30  * The fact that you are presently reading this means that you have had
31  * knowledge of the CeCILL-B license and that you accept its terms.
32  */
33 
34 #ifndef AIMS_CONNECTIVITY_COMPONENT_H
35 #define AIMS_CONNECTIVITY_COMPONENT_H
36 
37 
40 
41 template <typename T> class AimsBucket;
42 class Void;
43 template <typename T> class AimsData;
44 
45 namespace aims
46 {
47 
48  template <typename T> class BucketMap;
49 
50  template <typename T, typename O>
52 
53  private :
55  };
56 
57  // Specialization
58  template <typename T, typename O>
60 
61  public :
62  static void filterInFrame( const AimsData<T>& cc,
63  AimsData<O>& out,
64  std::map<O, size_t>& valids,
65  int t,
66  bool verbose = true );
67 
68  static void connectedInFrame( const AimsData<T>& data,
69  AimsData<O>& out,
70  Connectivity::Type connectivity,
71  std::multimap<size_t, O>& compSizes,
72  int t,
73  const T & backgrnd = 0, bool bin = true,
74  bool verbose = true );
75 
76  static void connected( const AimsData<T>& data,
77  AimsData<O>& out,
78  aims::Connectivity::Type connectivity,
79  std::map<O, size_t>& valids,
80  const T & backgrnd = 0, bool bin = true,
81  size_t minSize = 0, size_t numMax = 0,
82  bool verbose = true );
83 
84 
85  static void connected( const AimsData<T>& data,
86  AimsData<O>& out,
87  aims::Connectivity::Type connectivity,
88  const T & backgrnd = 0, bool bin = true,
89  size_t minSize = 0, size_t numMax = 0,
90  bool verbose = true );
91 
92  private:
94  };
95 
96  template<typename T, typename O>
97  inline
99  AimsData<O>& out,
100  aims::Connectivity::Type connectivity,
101  const T & backgrnd, bool bin,
102  size_t minSize, size_t numMax,
103  bool verbose )
104  {
105  std::map<O, size_t> valids;
107  out,
108  connectivity,
109  valids,
110  backgrnd, bin, minSize,
111  numMax, verbose);
112  }
113 
114  template<typename T>
115  inline
117  aims::Connectivity::Type connectivity,
118  std::map<T, size_t>& valids,
119  const T & backgrnd = 0, bool bin = true,
120  size_t minSize = 0, size_t numMax = 0,
121  bool verbose = true )
122  {
124  data,
125  connectivity,
126  valids,
127  backgrnd, bin, minSize,
128  numMax, verbose);
129  }
130 
131  template<typename T>
132  inline
134  aims::Connectivity::Type connectivity,
135  const T & backgrnd = 0, bool bin = true,
136  size_t minSize = 0, size_t numMax = 0,
137  bool verbose = true )
138  {
139  std::map<T, size_t> valids;
140 
142  data,
143  connectivity,
144  valids,
145  backgrnd, bin, minSize,
146  numMax, verbose);
147  }
148 
149  template<typename T>
150  void AimsConnectedComponent( BucketMap<T>& data,
151  aims::Connectivity::Type connectivity,
152  const T & backgrnd = 0, bool bin = true,
153  size_t minSize = 0, size_t numMax = 0,
154  bool verbose = true );
155 
156  template <typename T>
157  void AimsConnectedComponent( AimsBucket<Void>& component,
158  const AimsData<T>& data,
159  aims::Connectivity::Type connectivity,
160  const T & backgrnd = 0, bool bin = true,
161  size_t minsize = 0, size_t maxcomp = 0,
162  bool verbose = true );
163 
164  template <typename T>
165  void AimsConnectedComponent( AimsBucket<Void>& component,
166  const BucketMap<T>& data,
167  Connectivity::Type connectivity,
168  const T & backgrnd = 0, bool bin = true,
169  size_t minsize = 0, size_t maxcomp = 0,
170  bool verbose = true );
171 
172  template <typename T>
174  const AimsData<T>& data,
175  aims::Connectivity::Type connectivity,
176  const T & backgrnd = 0, bool bin = true,
177  size_t minsize = 0, size_t maxcomp = 0,
178  bool verbose = true );
179 
180 }
181 
182 #endif
Type
The different kinds of connectivity.
Definition: connectivity.h:51
int verbose
AimsData< int16_t > AimsLabeledConnectedComponent(AimsBucket< Void > &component, const AimsData< T > &data, aims::Connectivity::Type connectivity, const T &backgrnd=0, bool bin=true, size_t minsize=0, size_t maxcomp=0, bool verbose=true)
Definition: component_d.h:498
The bucket base class to manage packages of points associated to their value during time...
Definition: bucket.h:48
void AimsConnectedComponent(AimsData< T > &data, aims::Connectivity::Type connectivity, std::map< T, size_t > &valids, const T &backgrnd=0, bool bin=true, size_t minSize=0, size_t numMax=0, bool verbose=true)
Definition: component.h:116