aimsalgo  5.1.2
Neuroimaging image processing
foldoversegmentation.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_FOLDGRAPH_FOLDOVERSEGMENTATION_H
36 #define AIMS_FOLDGRAPH_FOLDOVERSEGMENTATION_H
37 
38 #include <aims/vector/vector.h>
39 #include <aims/bucket/bucketMap.h>
41 class Graph;
42 class Vertex;
43 
44 
45 namespace aims
46 {
47 
49  {
50  public:
53 
58  findSplitLine( Vertex* v, const Point3d & pos );
63  findSplitLine( Vertex* v, const std::list<Point3d> & pos );
68  findSplitLine( Vertex* v, const std::list<Point3df> & pos );
69 
70  Vertex * splitVertex( Vertex* v, const Point3d & pos,
71  size_t minsize = 50 );
75  Vertex * splitVertex( Vertex* v, const std::list<Point3d> & pos,
76  size_t minsize = 50 );
80  Vertex * splitVertex( Vertex* v, const std::list<Point3df> & pos,
81  size_t minsize = 50 );
85  carto::rc_ptr< BucketMap<Void> > splitline,
86  size_t minsize = 50 );
88  const Vertex* v1, const Vertex* v2 );
92  int subdivizeVertex( Vertex* v, float piecelength = 20,
93  size_t minsize = 50,
94  std::set<Vertex *> *newvertices = 0 );
96  int subdivizeGraph( float piecelength = 20, size_t minsize = 50,
97  std::set<Vertex *> *newvertices = 0 );
98 
104  carto::rc_ptr<BucketMap<Void> > bucket, const std::list<Point3d> & pos );
111  static bool splitSimpleSurface(
113  carto::rc_ptr<BucketMap<Void> > splitline,
115  carto::rc_ptr<BucketMap<Void> > & ss2 );
116 
120  template <typename T>
121  static BucketMap<T> *dilateBucket( const BucketMap<T> & in );
122 
128  void mergeVertices( Vertex *v1, Vertex *v2 );
129 
130 
131  private:
132  Graph *_graph;
133  };
134 
135 }
136 
137 #endif
138 
carto::rc_ptr< BucketMap< Void > > findSplitLine(Vertex *v, const Point3d &pos)
split along a path defined by a single point.
Vertex * splitVertex(Vertex *v, const std::list< Point3df > &pos, size_t minsize=50)
split along a path defined by a series of points (dotted line).
static carto::rc_ptr< BucketMap< Void > > splitLineOnBucket(carto::rc_ptr< BucketMap< Void > > bucket, const std::list< Point3d > &pos)
Trace a split line along a path defined by a series of points (dotted line) on a bucket.
Vertex * splitVertex(Vertex *v, const Point3d &pos, size_t minsize=50)
carto::rc_ptr< BucketMap< Void > > findSplitLine(Vertex *v, const std::list< Point3df > &pos)
split along a path defined by a series of points (dotted line).
int subdivizeVertex(Vertex *v, float piecelength=20, size_t minsize=50, std::set< Vertex * > *newvertices=0)
Splits a vertex into pieces of more or less piecesize voxels.
int subdivizeGraph(float piecelength=20, size_t minsize=50, std::set< Vertex * > *newvertices=0)
same as subdivizeVertex but on all vertices of the graph
void printSplitInSkeleton(carto::rc_ptr< carto::Volume< int16_t > > skel, const Vertex *v1, const Vertex *v2)
Vertex * splitVertex(Vertex *v, const std::list< Point3d > &pos, size_t minsize=50)
split along a path defined by a series of points (dotted line).
static BucketMap< T > * dilateBucket(const BucketMap< T > &in)
Dilate a bucket 1 voxel thicker to allow using the Fastmarching algorith on it (used for Voronoi)
Vertex * splitVertex(Vertex *v, carto::rc_ptr< BucketMap< Void > > splitline, size_t minsize=50)
split along a path defined by a continuous line separating the simple surface into disconnected compo...
static bool splitSimpleSurface(carto::rc_ptr< BucketMap< Void > > bucket, carto::rc_ptr< BucketMap< Void > > splitline, carto::rc_ptr< BucketMap< Void > > &ss1, carto::rc_ptr< BucketMap< Void > > &ss2)
split simple surface along a line path.
void mergeVertices(Vertex *v1, Vertex *v2)
merge vertices into v1.
carto::rc_ptr< BucketMap< Void > > findSplitLine(Vertex *v, const std::list< Point3d > &pos)
split along a path defined by a series of points (dotted line).