aimsalgo
5.0.5
Neuroimaging image processing
meshBlob.h
Go to the documentation of this file.
1
2
/* This software and supporting documentation are distributed by
3
* Institut Federatif de Recherche 49
4
* CEA/NeuroSpin, Batiment 145,
5
* 91191 Gif-sur-Yvette cedex
6
* France
7
*
8
* This software is governed by the CeCILL-B license under
9
* French law and abiding by the rules of distribution of free software.
10
* You can use, modify and/or redistribute the software under the
11
* terms of the CeCILL-B license as circulated by CEA, CNRS
12
* and INRIA at the following URL "http://www.cecill.info".
13
*
14
* As a counterpart to the access to the source code and rights to copy,
15
* modify and redistribute granted by the license, users are provided only
16
* with a limited warranty and the software's author, the holder of the
17
* economic rights, and the successive licensors have only limited
18
* liability.
19
*
20
* In this respect, the user's attention is drawn to the risks associated
21
* with loading, using, modifying and/or developing or reproducing the
22
* software by the user in light of its specific status of free software,
23
* that may mean that it is complicated to manipulate, and that also
24
* therefore means that it is reserved for developers and experienced
25
* professionals having in-depth computer knowledge. Users are therefore
26
* encouraged to load and test the software's suitability as regards their
27
* requirements in conditions enabling the security of their systems and/or
28
* data to be ensured and, more generally, to use and operate it in the
29
* same conditions as regards security.
30
*
31
* The fact that you are presently reading this means that you have had
32
* knowledge of the CeCILL-B license and that you accept its terms.
33
*/
34
35
36
#ifndef AIMS_SCALESPACE_MESHBLOB_H
37
#define AIMS_SCALESPACE_MESHBLOB_H
38
39
#include <
aims/config/aimsalgo_config.h
>
40
#include <
aims/mesh/texture.h
>
41
#include <
aims/mesh/surface.h
>
42
#include <list>
43
#include <vector>
44
#include <
aims/mesh/curv.h
>
45
#include <
aims/scalespace/meshDiffuse.h
>
46
#include <
graph/graph/graph.h
>
47
#include <
graph/graph/graph.h
>
48
#include <
cartobase/smart/rcptr.h
>
49
50
51
class
Graph
;
52
53
54
namespace
aims
55
{
56
57
class
AIMSALGO_API
ScaleSpace
58
{
59
public
:
60
enum
MeshShape
61
{
62
Surface
,
63
Tore
64
};
65
66
enum
BlobSaddleType
67
{
68
Junction
,
// blob to blob
69
Bottom
70
};
71
72
enum
MeshGrowingMode
73
{
74
Translate
,
75
Scale
,
76
PushNormal
77
};
78
79
struct
BlobDescriptor
80
{
81
unsigned
minimum
;
82
unsigned
maximum
;
83
BlobSaddleType
saddle
;
84
unsigned
neighbour
;
85
};
86
87
enum
MergeCode
88
{
89
OK = 0,
90
PbUp = 1,
91
PbDown = 2,
92
PbBoth = 3
93
};
94
95
Texture<int>
meshBlobExtract(
const
AimsSurface<3,Void>
& mesh,
96
const
Texture<float>
& inittex,
97
std::map<int, BlobDescriptor> & limits );
98
99
int
blobToGraph(
Graph
& g,
const
Texture<int>
& blobs ,
100
const
AimsSurfaceTriangle
& mesh,
const
AimsSurfaceTriangle
& infl_mesh,
101
const
Texture<float>
& values,
float
scale,
102
std::map<int, BlobDescriptor> & limits,
int
startindex );
103
104
void
cleanGraphScale(
Graph
& g,
float
scale);
105
106
MergeCode
mergeGraphs(
Graph
& g,
Graph
& h );
107
108
void
createSubMeshes(
Graph
& g,
const
AimsSurface<3,Void>
& mesh,
109
float
depl = 0,
float
depl0 = 0,
110
MeshShape
ms = Surface,
MeshGrowingMode
gm = Scale,
111
bool
compressedMeshes =
true
);
112
113
void
grayLevel2PrimalSketch(
Graph
& glevel,
Graph
& psketch );
114
115
116
std::multimap<float, unsigned> sortGLB(std::string key,
117
const
std::map<unsigned, Vertex *> & nodes,
118
const
std::map<
unsigned
, std::set<Vertex *> > & scblobs);
119
120
121
void
GLBVertexToSSBVertex(
Graph
& psketch,
122
const
std::multimap<float, unsigned> & ordering,
123
const
std::map<unsigned, Vertex *> & nodes,
124
const
std::map<
unsigned
, std::set<Vertex *> > & scblobs);
125
126
void
GLBEdgeToSSBEdge(
Graph
& glevel,
Graph
& psketch,
127
const
std::map<Vertex *, unsigned> & labels,
128
const
std::map<unsigned, Vertex *> & nodes);
129
130
void
setGraphLabelAndName(
const
std::multimap<float, unsigned> & ordering,
131
const
std::map<unsigned, Vertex *> & nodes,
132
const
std::map<
unsigned
, std::set<Vertex *> > & scblobs);
133
134
float
getRepresentativeScale(
const
std::set<Vertex *> & SSB);
135
136
137
carto::rc_ptr<AimsSurfaceTriangle>
getRepresentativeBlobMesh(
float
scale0,
const
std::set<Vertex *> & SSB);
138
139
int
adaptiveScaleSpace(
Graph
& psketch,
140
const
AimsSurfaceTriangle
& mesh,
141
const
AimsSurfaceTriangle
& infl_mesh,
142
const
Texture1d
& inittex,
143
std::map<
float
,
Texture<int>
> & tex_blobs,
144
std::map<
float
,
Texture<float>
> & tex_curv,
145
int
index,
float
tbegin,
float
tend,
146
float
dt,
float
dts,
float
dtmin,
147
const
float
HMAX,
bool
logFlag,
148
const
std::map<
unsigned
,
149
std::set< std::pair<unsigned,float> > >
150
& weightLapl);
151
152
AimsSurfaceTriangle
surface2Tore(
const
AimsSurfaceTriangle
& );
153
};
154
155
}
156
157
#endif
158
159
aims::ScaleSpace::Scale
Definition:
meshBlob.h:75
aims::ScaleSpace::MeshShape
MeshShape
Definition:
meshBlob.h:60
aims::ScaleSpace::BlobDescriptor::minimum
unsigned minimum
Definition:
meshBlob.h:81
Graph
AimsSurfaceTriangle
AIMSDATA_API AimsTimeSurface< 3, Void > AimsSurfaceTriangle
meshDiffuse.h
aims::ScaleSpace::Translate
Definition:
meshBlob.h:74
aims::ScaleSpace::MeshGrowingMode
MeshGrowingMode
Definition:
meshBlob.h:72
Texture
curv.h
aims::ScaleSpace::BlobSaddleType
BlobSaddleType
Definition:
meshBlob.h:66
aims
texture.h
aims::ScaleSpace::BlobDescriptor
Definition:
meshBlob.h:79
rcptr.h
aimsalgo_config.h
aims::ScaleSpace::Surface
Definition:
meshBlob.h:62
aims::ScaleSpace::MergeCode
MergeCode
Definition:
meshBlob.h:87
carto::rc_ptr< AimsSurfaceTriangle >
graph.h
surface.h
AimsSurface
aims::ScaleSpace::Junction
Definition:
meshBlob.h:68
aims::ScaleSpace::BlobDescriptor::saddle
BlobSaddleType saddle
Definition:
meshBlob.h:83
aims::ScaleSpace::BlobDescriptor::neighbour
unsigned neighbour
Definition:
meshBlob.h:84
Texture1d
AIMSDATA_API TimeTexture< float > Texture1d
AIMSALGO_API
#define AIMSALGO_API
Definition:
aimsalgo_config.h:47
aims::ScaleSpace::BlobDescriptor::maximum
unsigned maximum
Definition:
meshBlob.h:82
aims
scalespace
meshBlob.h
Generated by
1.8.13