cortical_surface  5.0.5
sulcusCorticalSnake_energy.h
Go to the documentation of this file.
1 #ifndef AIMS_CORTICAL_SNAKE_ENERGY_H
2 #define AIMS_CORTICAL_SNAKE_ENERGY_H
3 
4 
5 namespace aims
6 {
7 
9  {
10 
11  public:
12 
13  //Global variables
14  //Update when class is instanciated
15 
16  //vector list_points = liste des indices des points Pi decrivant le snake
17  std::vector<uint> list_points;
18 
19  //index du sommet changeant (DANS LA LISTE list_points!)
21 
23 
24  float alpha1, alpha2, alpha3;
25 
27 
29 
31 
32  float h_min, h_max;
33 
35 
36  float max;
37 
39 
40  std::vector<Point3df> vert;
41 
42  std::vector< AimsVector<uint,3> > poly;
43 
45 
47 
48 
49  //Constructor
50 
51  SulcusCorticalSnake_energy( std::vector<uint> _list_points, uint _index_courant, uint _n1, uint _n2, float _alpha1, float _alpha2, float _alpha3, AimsSurfaceTriangle _mesh, uint _size, float _h_min, float _h_max, TimeTexture<float> _curv, float _max, TimeTexture<float> _tex_distance ) : list_points(_list_points), index_courant(_index_courant), n1(_n1), n2(_n2), alpha1(_alpha1), alpha2(_alpha2), alpha3(_alpha3), mesh(_mesh), size(_size), h_min(_h_min), h_max(_h_max), curv(_curv), max(_max), tex_distance(_tex_distance)
52  {
53 // std::cout<<"Constructeur SulcusCorticalSnake_energy"<<std::endl;
54  size_vector=list_points.size();
55  //Mesh version AimsSurface
56  mesh_base=mesh[0];
57  vert = mesh_base.vertex();
58  poly=mesh.polygon();
59 
60  }
61 
63  {
64 // std::cout<<"Destructeur SulcusCorticalSnake_energy"<<std::endl;
65  vert.clear();
66  poly.clear();
67  list_points.clear();
68 
69  tex_distance.erase();
70  curv.erase();
71  }
72 
73  //Functions
74 
75  float total_energy();
76 // float distance_energy();
77 // float distance_Pi_to_bucket(uint index_vector);
78 // float weighted_square_distance(uint i, Point3d j, float weight);
79 // float square_distance(uint i, Point3d j);
80  float curvature_energy();
81  float elastic_energy();
82  std::vector<float> geodesic_distance(uint origin, uint i, uint j);
83  std::vector<float> MeshDistance_adapt( const Texture<float> & inittex, uint uind1, uint ind2 );
84  };
85 
86 }
87 
88 
89 
90 #endif
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
AIMSDATA_API AimsTimeSurface< 3, Void > AimsSurfaceTriangle
std::vector< AimsVector< uint, 3 > > poly
const std::vector< Point3df > & vertex() const
std::vector< float > geodesic_distance(uint origin, uint i, uint j)
SulcusCorticalSnake_energy(std::vector< uint > _list_points, uint _index_courant, uint _n1, uint _n2, float _alpha1, float _alpha2, float _alpha3, AimsSurfaceTriangle _mesh, uint _size, float _h_min, float _h_max, TimeTexture< float > _curv, float _max, TimeTexture< float > _tex_distance)
std::vector< float > MeshDistance_adapt(const Texture< float > &inittex, uint uind1, uint ind2)
void erase()
unsigned int uint