aimsalgo  5.0.5
Neuroimaging image processing
meshparcellation.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 
35 
36 #ifndef AIMS_DISTANCEMAP_MESHPARCELLATION_H
37 #define AIMS_DISTANCEMAP_MESHPARCELLATION_H
38 
39 #include <aims/mesh/texture.h>
40 #include <aims/mesh/surface.h>
41 #include <aims/data/data.h>
44 #include <set>
45 #include <map>
46 
47 class Graph;
48 namespace aims
49 {
50  namespace meshdistance
51  {
52 
53 
56  template <class T>
59  const Texture<T> & inittex,
60  const std::set<T> & setBack,
61  const std::set<T> & setFor);
62 
64  template <class T>
67  const Texture<T> & inittex,
68  const std::set<T> & setBack,
69  const std::set<T> & setFor,
70  const std::set<std::set<T> > & labelAllowed);
71  template <class T>
72  Texture<T>
74  const Texture<T> & seed,
75  const Texture<T> & skiz,
76  const T & Back,
77  const T & For );
78 
80  template <class T>
81  Texture<short> border2Texture( const Texture<std::set<T> > &tex,
82  const AimsSurface<3,Void> & mesh,
83  const std::set<T> & setBack,
84  const std::set<T> & setFor);
85 
86 
88  MeshVoronoi2Set( const AimsSurface<3,Void> & mesh,
89  const Texture<std::set<short> > & inittex,
90  const Texture<short> & sulcitex,
91  bool connexity);
92 
93 
94 
95  /* Convert a voronoi diagram whose label are multidimensional
96  To a texture of short (for the visualisation) */
97  template<class T, class U>
98  Texture<short> Voronoi2toTexture(const Texture<std::set<T> > & vor,
99  const AimsSurface<3,Void> & mesh,
100  const std::set<T> & setBack,
101  const std::set<T> & setFor);
102 
103 
105 
107  template<class T>
108  std::map<T,float> SurfaceParcel(const Texture<T> & tex,
109  const AimsSurface<3,Void> & mesh);
110 
112  template<class T>
113  std::map<T,float> VolumeParcel(const AimsData<T> & vol);
114 
115 
116 
117 
118  std::set<std::pair<short,short> >
119  ModelGraph2Boundaries( const Graph & g,
120  const std::map<std::string,short> & traduction );
121 
122  std::set<std::set<short> >
123  gyrusHierarchy2setBoundaries(const std::map<std::string,short> &trans,
124  const Graph & g);
125 
126  //std::set<std::set<short> > GyrusModel2SetOfSetOfSulci(const char *model,
127  //const std::map<std::string,short> &trans );
128 
129  std::set<std::set<short> >
130  GyrusModel2SetOfSetOfSulci(const std::map<std::string,
131  std::set<std::string> >
132  &gyriAndSulci,
133  const std::map<std::string,
134  short> &trans );
135  std::set<std::string>
136  GyrusModel2SetOfSulci(const char *model,
137  const std::set<std::string> &existingName );
138 
139  std::set<std::string>
140  GyrusModel2SetOfSulci(const std::map<std::string, std::set<std::string> >
141  &gyriAndSulci,
142  const std::set<std::string> &existingName );
143 
144  std::map<std::string, std::set<std::string> >
145  GyrusModel2GyriAndSulci( const std::string & model );
146 
148  extern const short MESHDISTANCE_FORBIDDEN;
149  extern const short MESHDISTANCE_UNREACHED;
150 
151  }
152 }
153 
154 
155 #endif
Texture< short > Voronoi2toTexture(const Texture< std::set< T > > &vor, const AimsSurface< 3, Void > &mesh, const std::set< T > &setBack, const std::set< T > &setFor)
const short MESHDISTANCE_FORBIDDEN
global variable...
Definition: meshvoronoi.h:85
Texture< std::set< T > > MeshBorderVoronoi(const AimsSurface< 3, Void > &mesh, const Texture< T > &inittex, const std::set< T > &setBack, const std::set< T > &setFor)
Extract the boundarie of a voronoi diagram i.e.
Texture< std::set< T > > gyrusSeedDefinition(const AimsSurface< 3, Void > &mesh, const Texture< T > &inittex, const std::set< T > &setBack, const std::set< T > &setFor, const std::set< std::set< T > > &labelAllowed)
Define the gyrus seed from the SKIZ.
AIMSDATA_API AimsTimeSurface< 3, Void > AimsSurfaceTriangle
std::map< std::string, std::set< std::string > > GyrusModel2GyriAndSulci(const std::string &model)
std::map< T, float > VolumeParcel(const AimsData< T > &vol)
Give the surface of labelled parcels defined from volume.
std::set< std::string > GyrusModel2SetOfSulci(const char *model, const std::set< std::string > &existingName)
Texture< short > border2Texture(const Texture< std::set< T > > &tex, const AimsSurface< 3, Void > &mesh, const std::set< T > &setBack, const std::set< T > &setFor)
Convert a multidimensional boundary map to a texture of short.
std::set< std::pair< short, short > > ModelGraph2Boundaries(const Graph &g, const std::map< std::string, short > &traduction)
std::map< T, float > SurfaceParcel(const Texture< T > &tex, const AimsSurface< 3, Void > &mesh)
Give the surface of labelled parcels defined from textures.
Texture< T > gyrusSeedDilationInSKIZ(const AimsSurface< 3, Void > &mesh, const Texture< T > &seed, const Texture< T > &skiz, const T &Back, const T &For)
AimsSurfaceTriangle MakePlaneMesh(unsigned n, Point3df Xi, Point3df Xf)
std::set< std::set< short > > GyrusModel2SetOfSetOfSulci(const std::map< std::string, std::set< std::string > > &gyriAndSulci, const std::map< std::string, short > &trans)
std::set< std::set< short > > gyrusHierarchy2setBoundaries(const std::map< std::string, short > &trans, const Graph &g)
const short MESHDISTANCE_UNREACHED
Definition: meshvoronoi.h:86
Texture< std::set< short > > MeshVoronoi2Set(const AimsSurface< 3, Void > &mesh, const Texture< std::set< short > > &inittex, const Texture< short > &sulcitex, bool connexity)