aimsalgo  5.1.2
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>
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 carto::rc_ptr<carto::Volume<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 AimsSurface<3,Void> & mesh,
80  const std::map<Point3df,
81  std::pair<float,float>,
82  Point3dfCompare > &sulci2mesh,
83  const carto::rc_ptr<carto::Volume<short> > & vol);
84 
85 
86 
87  void CCOperture(const std::vector<Point3df> &cc,
88  const AimsSurface<3,Void> & mesh,
89  const Point3dfNeigh &neigh,
90  std::map<Point3df, std::pair<float,float>, Point3dfCompare >& sulci2mesh,
91  const float demin, const float dpmin);
92 
93 
94 
95  std::set<unsigned> SubMesh(const AimsSurface<3,Void> & mesh,
96  const Point3df &bbmin, const Point3df & bbmax);
97 
98  inline float max(float x,float y)
99  {
100  if (x > y)
101  return(x);
102  else
103  return(y);
104  }
105 
106  inline float min(float x,float y)
107  {
108  if (x < y)
109  return(x);
110  else
111  return(y);
112  }
113 
114  inline Point3df Point3dfMax( const Point3df & X, const Point3df &Y)
115  {
116  Point3df Z;
117  Z[0] = max(X[0],Y[0]);
118  Z[1] = max(X[1],Y[1]);
119  Z[2] = max(X[2],Y[2]);
120  return(Z);
121  }
122 
123  inline Point3df Point3dfMin( const Point3df & X, const Point3df &Y)
124  {
125  Point3df Z;
126  Z[0] = min(X[0],Y[0]);
127  Z[1] = min(X[1],Y[1]);
128  Z[2] = min(X[2],Y[2]);
129  return(Z);
130  }
131 
132  }
133 }
134 
135 
136 #endif
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)
float min(float x, float y)
Definition: thickness.h:106
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)
float max(float x, float y)
Definition: thickness.h:98
Point3df Point3dfMin(const Point3df &X, const Point3df &Y)
Definition: thickness.h:123
Point3df Point3dfMax(const Point3df &X, const Point3df &Y)
Definition: thickness.h:114
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)
void SulcusOperture(const AimsSurface< 3, Void > &mesh, std::map< Point3df, std::pair< float, float >, Point3dfCompare > &sulci2mesh, const carto::rc_ptr< carto::Volume< 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)
carto::VolumeRef< float > OpertureParameters(const AimsSurface< 3, Void > &mesh, const std::map< Point3df, std::pair< float, float >, Point3dfCompare > &sulci2mesh, const carto::rc_ptr< carto::Volume< short > > &vol)
std::set< unsigned > SubMesh(const AimsSurface< 3, Void > &mesh, const Point3df &bbmin, const Point3df &bbmax)
std::map< Point3df, Point3dfSet, Point3dfCompare > Point3dfNeigh
Definition: stlsort.h:119