aimsalgo 6.0.0
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 <cartodata/volume/volume.h>
44#include <set>
45#include <map>
46
47class Graph;
48namespace aims
49{
50 namespace meshdistance
51 {
52
53
56 template <class T>
57 Texture<std::set<T> >
58 MeshBorderVoronoi( const AimsSurface<3,Void> & mesh,
59 const Texture<T> & inittex,
60 const std::set<T> & setBack,
61 const std::set<T> & setFor);
62
64 template <class T>
65 Texture<std::set<T> >
66 gyrusSeedDefinition( const AimsSurface<3,Void> & mesh,
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>
73 gyrusSeedDilationInSKIZ( const AimsSurface<3,Void> & mesh,
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
87 Texture<std::set<short> >
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(
114 const carto::rc_ptr<carto::Volume<T> > & vol);
115
116
117
118
119 std::set<std::pair<short,short> >
121 const std::map<std::string,short> & traduction );
122
123 std::set<std::set<short> >
124 gyrusHierarchy2setBoundaries(const std::map<std::string,short> &trans,
125 const Graph & g);
126
127 //std::set<std::set<short> > GyrusModel2SetOfSetOfSulci(const char *model,
128 //const std::map<std::string,short> &trans );
129
130 std::set<std::set<short> >
131 GyrusModel2SetOfSetOfSulci(const std::map<std::string,
132 std::set<std::string> >
133 &gyriAndSulci,
134 const std::map<std::string,
135 short> &trans );
136 std::set<std::string>
137 GyrusModel2SetOfSulci(const char *model,
138 const std::set<std::string> &existingName );
139
140 std::set<std::string>
141 GyrusModel2SetOfSulci(const std::map<std::string, std::set<std::string> >
142 &gyriAndSulci,
143 const std::set<std::string> &existingName );
144
145 std::map<std::string, std::set<std::string> >
146 GyrusModel2GyriAndSulci( const std::string & model );
147
149 extern const short MESHDISTANCE_FORBIDDEN;
150 extern const short MESHDISTANCE_UNREACHED;
151
152 }
153}
154
155
156#endif
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< short > > MeshVoronoi2Set(const AimsSurface< 3, Void > &mesh, const Texture< std::set< short > > &inittex, const Texture< short > &sulcitex, bool connexity)
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.
const short MESHDISTANCE_UNREACHED
Definition meshvoronoi.h:85
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::pair< short, short > > ModelGraph2Boundaries(const Graph &g, const std::map< std::string, short > &traduction)
std::set< std::set< short > > gyrusHierarchy2setBoundaries(const std::map< std::string, short > &trans, const Graph &g)
std::map< T, float > VolumeParcel(const carto::rc_ptr< carto::Volume< T > > &vol)
Give the surface of labelled parcels defined from volume.
AimsSurfaceTriangle MakePlaneMesh(unsigned n, Point3df Xi, Point3df Xf)
std::map< std::string, std::set< std::string > > GyrusModel2GyriAndSulci(const std::string &model)
Texture< short > Voronoi2toTexture(const Texture< std::set< T > > &vor, const AimsSurface< 3, Void > &mesh, const std::set< T > &setBack, const std::set< T > &setFor)
std::set< std::string > GyrusModel2SetOfSulci(const char *model, const std::set< std::string > &existingName)
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.
Texture< T > gyrusSeedDilationInSKIZ(const AimsSurface< 3, Void > &mesh, const Texture< T > &seed, const Texture< T > &skiz, const T &Back, const T &For)
const short MESHDISTANCE_FORBIDDEN
global variable...
Definition meshvoronoi.h:84
std::map< T, float > SurfaceParcel(const Texture< T > &tex, const AimsSurface< 3, Void > &mesh)
Give the surface of labelled parcels defined from textures.
AIMSDATA_API AimsTimeSurface< 3, Void > AimsSurfaceTriangle
AimsVector< float, 3 > Point3df