cortical_surface 6.0.0
corticalReferential.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2000-2004 CEA
3 *
4 * This software and supporting documentation were developed by
5 * CEA/DSV/SHFJ
6 * 4 place du General Leclerc
7 * 91401 Orsay cedex
8 * France
9 */
10
11
12/**************** BRAND NEW DEV VERSION YEAH!!!!****************/
13
14
15#ifndef AIMS_CORTICALREFERENTIAL_H
16#define AIMS_CORTICALREFERENTIAL_H
17
18
19#include <aims/mesh/texture.h>
20#include <aims/io/reader.h>
21#include <aims/io/writer.h>
22
26
27namespace aims
28{
29
31 {
32
33 public:
34
37 std::map<unsigned, std::set< std::pair<unsigned,float> > > weightLapl;
38 //Liste de voisinage
39 std::vector<std::set<uint> > neigh;
40 //Surface vector
41 std::vector<Point3df> vert;
42
43 //Poles Index and size (=vertex numbers)
45 std::pair<int,int> poles_points;
46
47 //Parametres pour l'execution
48 std::string adr;
49 std::string adr_par;
50 std::string adr_mer;
51 std::string adr_call;
52 std::string adr_poles;
53
54 //Condition d'arret des iterations (difference avec la moy du laplacien 1000 iter. avant
55 float criterium;
56
57 //Reglage du pas pour le calcul iteratif
58 float _dt;
59
60 //Si on doit faire les cotes du sillon central inverses
62
63 //Ce que l'on effectue
65
66 //Reglage du terme d'attache aux donn�s
67 float _Beta;
68
69 //Type d'attache aux données
71
72 //Adresse des outputs
73 std::string adr_lat;
74 std::string adr_lon;
75
76 //Textures de contraintes
77
85
89
90 std::vector<unsigned> forb_list;
91
92 // indique si on a deja trouve les poles
94
95 // indique si on doit parametriser l'insula ou non
97
98 //A voir pour le reste
101 float diametre;
102
103 //Constructor
105 CorticalReferential ( std::string & adr_param,
106 std::string & adr_parallele,
107 std::string & adr_meridien,
108 std::string & adr_calleux,
109 std::string & _adr_poles,
110 float criter,
111 float dt,
112 int c,
113 int choice,
114 float Beta,
115 int tBeta,
116 std::string & adrlat,
117 std::string & adrlon,
118 bool _doInsulaParam = true ) :
119 adr(adr_param),
120 adr_par(adr_parallele),
121 adr_mer(adr_meridien),
122 adr_call(adr_calleux),
123 adr_poles(_adr_poles),
124 criterium(criter),
125 _dt(dt),
126 context(c),
127 choice_process(choice),
128 _Beta(Beta),
129 typeBeta(tBeta),
130 adr_lat(adrlat),
131 adr_lon(adrlon),
132 doInsulaParameterization(_doInsulaParam)
133 {
134
135 std::cout << "constructeur" << std::endl;
136 std::cout << "mesh adress : " << adr << std::endl;
137 std::cout << "adr_par : " << adr_par << std::endl;
138 std::cout << "adr_mer : " << adr_mer << std::endl;
139 std::cout << "adr_call : " << adr_call << std::endl;
140 std::cout << "adr_poles : " << adr_poles << std::endl;
141 std::cout << "_dt : "<< _dt << std::endl;
142 std::cout << "criterium : " << criterium << std::endl;
143 std::cout << "context : " << context << std::endl;
144 std::cout << "choice : " << choice_process << std::endl;
145 std::cout << "Beta : " << _Beta << std::endl;
146
147 //Opening brain mesh
148 Reader < AimsSurfaceTriangle > r(adr);
149 r.read( mesh );
150 std::cout << "reader mesh ok" << std::endl;
151
152 //Mesh version AimsSurface
153 mesh_base = mesh[0];
154 std::cout << "mesh_base ok" << std::endl;
155 //Surface vector
156 vert = mesh_base.vertex();
157 std::cout << "vert ok!" << std::endl;
158
159 //Computing neighbourhood
161
162 std::cout << "neigh ok" << std::endl;
164
165 std::cout << "weightlaplacian ok" << std::endl;
166 size = vert.size();
167 std::cout << "size :" << size << std::endl;
168
169 //LECTURE DES POLES (A INTEGRER PAR LA SUITE AUX CONTRAINTES)
170
171 Reader < TimeTexture<float> > lp1 ( adr_call );
172 lp1.read( pole_call );
173
174 Reader < TimeTexture<float> > lp2 ( adr_poles );
175 lp2.read( poles );
176
177 poles_found = false;
178 std::cout << "Constructeur fini!!" << std::endl;
179 }
180
181
182 //Main methods
183 void process();
187
188
189 //Diffusion methods
195 Texture<float> AimsMeshLaplacian_meridian ( const Texture<float> &smooth, TimeTexture<float> &source, const std::map<unsigned, std::set< std::pair<unsigned,float> > > &lapl, TimeTexture<float> & side);
196
197 };
198
199
200
201}
202
203#endif
204
205
std::vector< std::set< uint > > neigh
TimeTexture< float > diffusionLongitudeRelax(TimeTexture< float > &tex, TimeTexture< float > &side)
TimeTexture< float > diffusionLatitude(TimeTexture< float > &)
TimeTexture< float > distance_poles
TimeTexture< float > constraint_long_cleaned
TimeTexture< float > diffusionLongitude(TimeTexture< float > &tex, TimeTexture< float > &side, TimeTexture< float > &poleSave, int ind)
std::vector< Point3df > vert
CorticalReferential(std::string &adr_param, std::string &adr_parallele, std::string &adr_meridien, std::string &adr_calleux, std::string &_adr_poles, float criter, float dt, int c, int choice, float Beta, int tBeta, std::string &adrlat, std::string &adrlon, bool _doInsulaParam=true)
AimsSurface< 3, Void > mesh_base
TimeTexture< float > pole_call
std::map< unsigned, std::set< std::pair< unsigned, float > > > weightLapl
TimeTexture< float > constraint_long
TimeTexture< float > diff_meridian_origine
TimeTexture< float > constraint_lat_cleaned
TimeTexture< float > diffusionLatitudeRelax(TimeTexture< float > &tex)
TimeTexture< float > constraint_lat_read
std::pair< int, int > poles_points
std::vector< unsigned > forb_list
TimeTexture< float > constraint_long_read
TimeTexture< short > cercle_polaire
Texture< float > AimsMeshLaplacian_meridian(const Texture< float > &smooth, TimeTexture< float > &source, const std::map< unsigned, std::set< std::pair< unsigned, float > > > &lapl, TimeTexture< float > &side)
TimeTexture< float > constraint_lat
TimeTexture< float > pole_insula
virtual bool read(T &obj, int border=0, const std::string *format=0, int frame=-1)
static std::vector< std::set< uint > > surfaceNeighbours(const AimsSurface< D, T > &surf)
std::map< unsigned, std::set< std::pair< unsigned, float > > > AimsMeshWeightFiniteElementLaplacian(const AimsSurface< 3, Void > &mesh, const float Wmax)
AIMSDATA_API AimsTimeSurface< 3, Void > AimsSurfaceTriangle