cortical_surface 6.0.0
blobs.h
Go to the documentation of this file.
1#ifndef SURF_BLOBS_H
2#define SURF_BLOBS_H
3#include <aims/mesh/surface.h>
4#include <aims/mesh/texture.h>
6
7
8
9
13
14namespace surf {
15
16 class Blob {
17 public:
18 int index;
19 std::set<int> nodes;
20 std::string subject;
21 float t;
22
23 std::map<int, std::vector<float> > coordinates;
24 std::map<int, std::vector<float> > raw_coordinates;
26
27 std::pair<Point2df, Point2df> get2DBoundingBox ( );
29
31 void getAimsSphereAtMaxNode ( Texture<float> &tex, float radius = 0.1 );
32 void getAimsEllipsoid ( float abscissa, float height, float depth, float area );
33 void moveMeshToSphericalAtlas ( float radius ) ;
34 void moveMeshToPlaneAtlas ( float height ) ;
36
38 Point3df getBlobBarycenter( );
41
42 Blob(){}
44 };
45 class ScaleSpaceBlob;
46
47 class GreyLevelBlob: public Blob {
48 public :
49 float scale;
50 //int label;
52
53 void getAimsEllipsoid ( void );
56 void moveMeshToPlaneAtlas ( void ) ;
57
58 std::pair<Point2df, Point2df> get2DBoundingBox ( );
59
63 index = glb->index;
64 //label = glb->label;
65 nodes = std::set<int>(glb->nodes);
66 subject = glb->subject;
67 nodes = std::set<int>(glb->nodes);
68 coordinates = std::map<int, std::vector<float> >(glb->coordinates);
69 raw_coordinates = std::map<int, std::vector<float> >(glb->raw_coordinates);
71 mesh = glb->mesh;
72 t = glb->t;
73 scale = glb->scale;
74 }
75
76 };
77
78 class ScaleSpaceBlob: public Blob {
79 public :
80 float t;
81 int label;
82 std::set<float> scales;
83 float tmin;
84 float tmax;
85 std::set<GreyLevelBlob *> blobs;
86 std::set<ScaleSpaceBlob *> topBlobs, bottomBlobs;
87
91 index = ssb->index;
92 label = ssb->label;
93 subject = ssb->subject;
94 nodes = ssb->nodes;
97 t = ssb->t;
98 tmin = ssb->tmin;
99 tmax = ssb->tmax;
100 blobs = ssb->blobs;
101 topBlobs = ssb->topBlobs;
103 mesh = ssb->mesh;
104 }
105 std::pair<Point2df, Point2df> get2DBoundingBox ( );
106 };
107
108 class Clique {
109 public :
113 float distance;
114 Clique ( ScaleSpaceBlob *s1, ScaleSpaceBlob *s2, float _distance, float _similarity ) {
115 ssb1 = s1;
116 ssb2 = s2;
117 distance = _distance;
118 similarity = _similarity;
119 }
120
121 };
122
124 public :
125 std::set<ScaleSpaceBlob *> topBlobs;
126 std::set<ScaleSpaceBlob *> bottomBlobs;
127 std::string type;
128 Bifurcation ( std::set<ScaleSpaceBlob *> &s1, std::set< ScaleSpaceBlob *> &s2, std::string _type){topBlobs = std::set<ScaleSpaceBlob *>(s1); bottomBlobs = std::set<ScaleSpaceBlob *>(s2); type = _type;}
129
130 };
131
132
133}
134
135//##############################################################################
136
137
138
139
140#endif
141
typesRepresentation
Definition blobs.h:10
@ FLAT
Definition blobs.h:11
@ NODES_BARYCENTERS
Definition blobs.h:11
@ SPHERE
Definition blobs.h:11
@ RAW
Definition blobs.h:11
std::set< ScaleSpaceBlob * > bottomBlobs
Definition blobs.h:126
std::string type
Definition blobs.h:127
std::set< ScaleSpaceBlob * > topBlobs
Definition blobs.h:125
Bifurcation(std::set< ScaleSpaceBlob * > &s1, std::set< ScaleSpaceBlob * > &s2, std::string _type)
Definition blobs.h:128
void getNodesFromBlob(surf::Blob *blob)
void moveMeshToPlaneAtlas(float height)
void getAimsSphereAtMaxNode(Texture< float > &tex, float radius=0.1)
Point3df getBlobBarycenterOnAPlane()
~Blob()
Definition blobs.h:43
void moveMeshToSphericalAtlas(float radius)
int index
Definition blobs.h:18
std::set< int > nodes
Definition blobs.h:19
std::pair< Point2df, Point2df > get2DBoundingBox()
std::map< int, std::vector< float > > raw_coordinates
Definition blobs.h:24
void getAimsEllipsoid(float abscissa, float height, float depth, float area)
std::string subject
Definition blobs.h:20
void getAimsMesh(AimsSurface< 3, Void > &mesh)
Point3df getBlobBarycenter()
float t
Definition blobs.h:21
Point3df getBlobBarycenterOnASphere()
std::map< int, std::vector< float > > coordinates
Definition blobs.h:23
AimsSurface< 3, Void > mesh
Definition blobs.h:25
int getMaximumNode(Texture< float > &tex)
Point3df getBlobBarycenterFromMesh()
Clique(ScaleSpaceBlob *s1, ScaleSpaceBlob *s2, float _distance, float _similarity)
Definition blobs.h:114
ScaleSpaceBlob * ssb1
Definition blobs.h:110
float distance
Definition blobs.h:113
float similarity
Definition blobs.h:112
ScaleSpaceBlob * ssb2
Definition blobs.h:111
GreyLevelBlob(GreyLevelBlob *glb)
Definition blobs.h:62
std::pair< Point2df, Point2df > get2DBoundingBox()
void moveMeshToSphericalAtlas(void)
void getAimsEllipsoid(void)
void moveMeshToPlaneAtlas(void)
surf::ScaleSpaceBlob * ssb_parent
Definition blobs.h:51
void getAimsEllipsoidAtMaxNode(Texture< float > &tex)
std::set< GreyLevelBlob * > blobs
Definition blobs.h:85
std::set< ScaleSpaceBlob * > topBlobs
Definition blobs.h:86
std::set< ScaleSpaceBlob * > bottomBlobs
Definition blobs.h:86
std::set< float > scales
Definition blobs.h:82
ScaleSpaceBlob(ScaleSpaceBlob *ssb)
Definition blobs.h:90
std::pair< Point2df, Point2df > get2DBoundingBox()
Definition blobs.h:14