aimsdata  5.1.2
Neuroimaging data handling
tex2graph.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  * Texture class
36  */
37 #ifndef AIMS_MESH_TEX2GRAPH_H
38 #define AIMS_MESH_TEX2GRAPH_H
39 
40 #include <aims/mesh/surface.h>
41 #include <aims/mesh/texture.h>
42 
43 class Graph;
44 
45 
46 namespace aims
47 {
48 
49  template <class T>
50  class Tex2Graph
51  {
52  public:
54  virtual ~Tex2Graph();
55 
57  //void makeGraph( Graph & g, const AimsSurfaceTriangle & mesh,
58  // const Texture<short> & tex, float epsilon = 0.01 );
59 
60  /*
61  void makeGraph( Graph & g, const AimsSurfaceTriangle & mesh,
62  const Texture<std::set<short> > & tex,
63  const std::map <short,std::string> & label2name);
64  */
65  std::map<T,int> label2index;
66 
67  void fillLabel2index(const Texture<T> &);
68  int getIndex(const T & label);
69 
71  void makeGraph( Graph & g, const AimsSurfaceTriangle & mesh,
72  const Texture<T> & tex, float epsilon = 0.01);
73 
74  void makeGraph( Graph & g, const AimsSurfaceTriangle & mesh,
75  const Texture<T> & tex,
76  const std::map<T,std::string> & lab2name, float epsilon = 0.01);
77 
78 
79  };
80 
81 }
82 
83 
84 #endif
85 
virtual ~Tex2Graph()
int getIndex(const T &label)
Definition: tex2graph_d.h:56
void makeGraph(Graph &g, const AimsSurfaceTriangle &mesh, const Texture< T > &tex, float epsilon=0.01)
Fills graph g from texture of labels tex on the mesh mesh.
Definition: tex2graph_d.h:244
std::map< T, int > label2index
Fills graph g from texture of labels tex on the mesh mesh.
Definition: tex2graph.h:65
void fillLabel2index(const Texture< T > &)
Definition: tex2graph_d.h:51
The class for EcatSino data write operation.
Definition: borderfiller.h:13
AIMSDATA_API AimsTimeSurface< 3, Void > AimsSurfaceTriangle
Definition: surface.h:581