aimsalgo  5.0.5
Neuroimaging image processing
thickness.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 #ifndef AIMS_DISTANCEMAP_THICKNESS_H
36 #define AIMS_DISTANCEMAP_THICKNESS_H
37 
38 #include <aims/mesh/texture.h>
39 #include <aims/mesh/surface.h>
40 #include <aims/data/data.h>
43 #include <set>
44 #include <list>
45 #include <map>
46 
47 class Graph;
48 namespace aims
49 {
50  namespace meshdistance
51  {
52  void SulcusOperture( const AimsSurface<3,Void> & mesh,
53  std::map<Point3df, std::pair<float,float>,
54  Point3dfCompare > &sulci2mesh,
55  const AimsData <short> & surface_vol,
56  const float demin, const float dpmin,
57  const unsigned MINCC,
58  const std::map <short,std::string> & trans,
59  const std::set<std::string> & labels);
60 
62  const std::pair<Point3df,
63  Point3df> & bipoint,
64  Point3df & n_sulci, float & dmn,
65  float & dmp,
66  float demin, float dpmin,
67  const AimsSurface<3,Void> & mesh);
68 
70  const std::pair<Point3df,Point3df>
71  & bipoint,
72  Point3df & n0,
73  float demin, float dpmin,
74  float & dmn, float & dmp,
75  const AimsSurface<3,Void> & mesh );
76 
77 
79  const std::map<Point3df,
80  std::pair<float,float>,
81  Point3dfCompare > &sulci2mesh,
82  const AimsData<short> & vol);
83 
84 
85 
86  void CCOperture(const std::vector<Point3df> &cc,
87  const AimsSurface<3,Void> & mesh,
88  const Point3dfNeigh &neigh,
89  std::map<Point3df, std::pair<float,float>, Point3dfCompare >& sulci2mesh,
90  const float demin, const float dpmin);
91 
92 
93 
94  std::set<unsigned> SubMesh(const AimsSurface<3,Void> & mesh,
95  const Point3df &bbmin, const Point3df & bbmax);
96 
97  inline float max(float x,float y)
98  {
99  if (x > y)
100  return(x);
101  else
102  return(y);
103  }
104 
105  inline float min(float x,float y)
106  {
107  if (x < y)
108  return(x);
109  else
110  return(y);
111  }
112 
113  inline Point3df Point3dfMax( const Point3df & X, const Point3df &Y)
114  {
115  Point3df Z;
116  Z[0] = max(X[0],Y[0]);
117  Z[1] = max(X[1],Y[1]);
118  Z[2] = max(X[2],Y[2]);
119  return(Z);
120  }
121 
122  inline Point3df Point3dfMin( const Point3df & X, const Point3df &Y)
123  {
124  Point3df Z;
125  Z[0] = min(X[0],Y[0]);
126  Z[1] = min(X[1],Y[1]);
127  Z[2] = min(X[2],Y[2]);
128  return(Z);
129  }
130 
131  }
132 }
133 
134 
135 #endif
float min(float x, float y)
Definition: thickness.h:105
void SulcusOperture(const AimsSurface< 3, Void > &mesh, std::map< Point3df, std::pair< float, float >, Point3dfCompare > &sulci2mesh, const AimsData< short > &surface_vol, const float demin, const float dpmin, const unsigned MINCC, const std::map< short, std::string > &trans, const std::set< std::string > &labels)
float max(float x, float y)
Definition: thickness.h:97
AimsData< float > OpertureParameters(const AimsSurface< 3, Void > &mesh, const std::map< Point3df, std::pair< float, float >, Point3dfCompare > &sulci2mesh, const AimsData< short > &vol)
Point3df Point3dfMax(const Point3df &X, const Point3df &Y)
Definition: thickness.h:113
void CCOperture(const std::vector< Point3df > &cc, const AimsSurface< 3, Void > &mesh, const Point3dfNeigh &neigh, std::map< Point3df, std::pair< float, float >, Point3dfCompare > &sulci2mesh, const float demin, const float dpmin)
void ClosestMeshTrianglesFromSulcusVoxel(const Point3df &pt, const std::pair< Point3df, Point3df > &bipoint, Point3df &n_sulci, float &dmn, float &dmp, float demin, float dpmin, const AimsSurface< 3, Void > &mesh)
std::map< Point3df, Point3dfSet, Point3dfCompare > Point3dfNeigh
Definition: stlsort.h:120
Point3df Point3dfMin(const Point3df &X, const Point3df &Y)
Definition: thickness.h:122
std::set< unsigned > SubMesh(const AimsSurface< 3, Void > &mesh, const Point3df &bbmin, const Point3df &bbmax)
void ClosestMeshNodesFromSulcusVoxel(const Point3df &pt, const std::pair< Point3df, Point3df > &bipoint, Point3df &n0, float demin, float dpmin, float &dmn, float &dmp, const AimsSurface< 3, Void > &mesh)