cortical_surface  5.0.5
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 
12 };
13 
14 namespace 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 ( );
28  int getMaximumNode( Texture<float> &tex );
29 
30  void getAimsMesh ( AimsSurface<3, Void> &mesh );
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 ) ;
35  void getNodesFromBlob( surf::Blob * blob);
36 
37  Point3df getBlobBarycenterOnASphere( );
38  Point3df getBlobBarycenter( );
39  Point3df getBlobBarycenterFromMesh( );
40  Point3df getBlobBarycenterOnAPlane( );
41 
42  Blob(){}
43  ~Blob(){}
44  };
45  class ScaleSpaceBlob;
46 
47  class GreyLevelBlob: public Blob {
48  public :
49  float scale;
50  //int label;
52 
53  void getAimsEllipsoid ( void );
54  void getAimsEllipsoidAtMaxNode ( Texture<float> &tex ) ;
55  void moveMeshToSphericalAtlas ( 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);
70  ssb_parent = glb->ssb_parent;
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;
95  coordinates = ssb->coordinates;
97  t = ssb->t;
98  tmin = ssb->tmin;
99  tmax = ssb->tmax;
100  blobs = ssb->blobs;
101  topBlobs = ssb->topBlobs;
102  bottomBlobs = ssb->bottomBlobs;
103  mesh = ssb->mesh;
104  }
105  std::pair<Point2df, Point2df> get2DBoundingBox ( );
106  };
107 
108  class Clique {
109  public :
112  float similarity;
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 
123  class Bifurcation {
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 
ScaleSpaceBlob(ScaleSpaceBlob *ssb)
Definition: blobs.h:90
void getAimsSphereAtMaxNode(Texture< float > &tex, float radius=0.1)
Definition: blobs.h:11
float t
Definition: blobs.h:21
std::set< float > scales
Definition: blobs.h:82
std::set< ScaleSpaceBlob * > bottomBlobs
Definition: blobs.h:126
std::set< ScaleSpaceBlob * > topBlobs
Definition: blobs.h:86
std::set< int > nodes
Definition: blobs.h:19
std::string subject
Definition: blobs.h:20
void getAimsMesh(AimsSurface< 3, Void > &mesh)
Point3df getBlobBarycenterFromMesh()
float distance
Definition: blobs.h:113
std::set< GreyLevelBlob * > blobs
Definition: blobs.h:85
void moveMeshToSphericalAtlas(float radius)
void moveMeshToPlaneAtlas(float height)
Point3df getBlobBarycenterOnASphere()
Bifurcation(std::set< ScaleSpaceBlob *> &s1, std::set< ScaleSpaceBlob *> &s2, std::string _type)
Definition: blobs.h:128
Definition: blobs.h:11
std::pair< Point2df, Point2df > get2DBoundingBox()
ScaleSpaceBlob * ssb2
Definition: blobs.h:111
Definition: blobs.h:14
Blob()
Definition: blobs.h:42
Point3df getBlobBarycenter()
std::string type
Definition: blobs.h:127
ScaleSpaceBlob * ssb1
Definition: blobs.h:110
int getMaximumNode(Texture< float > &tex)
Point3df getBlobBarycenterOnAPlane()
std::map< int, std::vector< float > > coordinates
Definition: blobs.h:23
void getAimsEllipsoid(float abscissa, float height, float depth, float area)
float similarity
Definition: blobs.h:112
std::map< int, std::vector< float > > raw_coordinates
Definition: blobs.h:24
Clique(ScaleSpaceBlob *s1, ScaleSpaceBlob *s2, float _distance, float _similarity)
Definition: blobs.h:114
surf::ScaleSpaceBlob * ssb_parent
Definition: blobs.h:51
typesRepresentation
Definition: blobs.h:10
Definition: blobs.h:11
int index
Definition: blobs.h:18
std::set< ScaleSpaceBlob * > topBlobs
Definition: blobs.h:125
~Blob()
Definition: blobs.h:43
GreyLevelBlob(GreyLevelBlob *glb)
Definition: blobs.h:62
void getNodesFromBlob(surf::Blob *blob)
AimsSurface< 3, Void > mesh
Definition: blobs.h:25
std::set< ScaleSpaceBlob * > bottomBlobs
Definition: blobs.h:86