aimsalgo 6.0.0
Neuroimaging image processing
foldgraphattributes.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_FOLDGRAPHATTRIBUTES
36#define AIMS_FOLDGRAPH_FOLDGRAPHATTRIBUTES
37
38#include <cartodata/volume/volume.h>
39#include <aims/mesh/mesher.h>
40
41class Graph;
42
43namespace aims
44{
46 template <typename T> class BucketMap;
47
50 {
51 public:
55 Graph & graph,
57 talairachAffineTransformation3d = 0,
58 int16_t inside = 0, int16_t outside = 11,
59 bool withmeshes = true,
60 const std::vector<int> & graphversion
61 = std::vector<int>() );
63 void cleanup();
65 void doAll();
66
67 void makeMeshes();
74
95 float getDepthfactor() const;
103 std::vector<int> graphVersion() const;
104 void thickness( const BucketMap<float> & midinterfaceDistances,
105 const carto::VolumeRef<int16_t> voronoi );
107 const carto::VolumeRef<int16_t> voronoi );
113 void setMaxThreads( int mt );
114 int maxThreads() const { return _maxthreads; }
115 Mesher & mesher() { return _mesher; }
116
117 private:
120
121 void prepareNativeDepthMap();
122 void prepareNormalizedDepthMap(
124 void prepareDilatedDepthMap(
126 void prepareGradientX();
127 void prepareGradientY();
128 void prepareGradientZ();
129 void prepareBrainGradientX();
130 void prepareBrainGradientY();
131 void prepareBrainGradientZ();
132
134 Graph & _graph;
135 int16_t _inside;
136 int16_t _outside;
137 const AffineTransformation3d *_motion;
142 carto::VolumeRef<float> _braindepthmap;
144 carto::VolumeRef<float> _braindepthmap_gradX;
146 carto::VolumeRef<float> _braindepthmap_gradY;
148 carto::VolumeRef<float> _braindepthmap_gradZ;
150 carto::VolumeRef<float> _dilated_depthmap;
152 carto::VolumeRef<float> _dilated_depthmap_gradX;
154 carto::VolumeRef<float> _dilated_depthmap_gradY;
156 carto::VolumeRef<float> _dilated_depthmap_gradZ;
157 bool _domeshes;
158 std::vector<int> _graphversion;
159 int _maxthreads;
160 Mesher _mesher;
161 };
162
163}
164
165#endif
166
167
const carto::VolumeRef< int16_t > & getNDepth() const
carto::VolumeRef< float > & getDilatedDepthGradX()
void cleanup()
frees the depth map
const carto::VolumeRef< float > & getDilatedDepth() const
carto::VolumeRef< int16_t > & getNDepth()
FoldGraphAttributes(const carto::rc_ptr< carto::Volume< int16_t > > &skel, Graph &graph, const AffineTransformation3d *talairachAffineTransformation3d=0, int16_t inside=0, int16_t outside=11, bool withmeshes=true, const std::vector< int > &graphversion=std::vector< int >())
skel is the skeleton image of the hemisphere, It must be allocated with a border of at least 1 voxel ...
const carto::VolumeRef< float > & getBrainDepthGradX() const
carto::VolumeRef< float > & getDilatedDepth()
carto::VolumeRef< float > & getBrainDepth()
std::vector< int > graphVersion() const
returns a vector value of 2 or more numbers from the target graph version, or the current cartograph ...
const carto::VolumeRef< float > & getBrainDepthGradZ() const
const carto::VolumeRef< float > & getBrainDepthGradY() const
const carto::VolumeRef< int16_t > & getDepth() const
void setMaxThreads(int mt)
Sets the maxumum number of threads used in multithreaded-enabled parts.
carto::VolumeRef< float > & getBrainDepthGradX()
const carto::VolumeRef< float > & getDilatedDepthGradZ() const
float getDepthfactor() const
carto::VolumeRef< float > & getBrainDepthGradY()
void thickness(const BucketMap< float > &midinterfaceDistances, const carto::VolumeRef< int16_t > voronoi)
const carto::VolumeRef< float > & getDilatedDepthGradX() const
carto::VolumeRef< float > & getBrainDepthGradZ()
void doAll()
creates all attributes (global + all nodes/relations types)
carto::VolumeRef< float > & getDilatedDepthGradY()
carto::VolumeRef< int16_t > rebuildCorticalRelations()
outputs the voronoi in brain hull from hull junctions
const carto::VolumeRef< float > & getDilatedDepthGradY() const
void greyAndCSFVolumes(const carto::VolumeRef< int16_t > gw, const carto::VolumeRef< int16_t > voronoi)
const carto::VolumeRef< float > & getBrainDepth() const
carto::VolumeRef< int16_t > & getDepth()
carto::VolumeRef< float > & getDilatedDepthGradZ()