aimsdata 6.0.0
Neuroimaging data handling
bundlesSlicer.h
Go to the documentation of this file.
1/* Copyright (c) 1995-2017 CEA
2 *
3 * This software and supporting documentation were developed by
4 * CEA/DSV/SHFJ
5 * 4 place du General Leclerc
6 * 91401 Orsay cedex
7 * France
8 *
9 * This software is governed by the CeCILL license version 2 under
10 * French law and abiding by the rules of distribution of free software.
11 * You can use, modify and/or redistribute the software under the
12 * terms of the CeCILL license version 2 as circulated by CEA, CNRS
13 * and INRIA at the following URL "http://www.cecill.info".
14 *
15 * As a counterpart to the access to the source code and rights to copy,
16 * modify and redistribute granted by the license, users are provided only
17 * with a limited warranty and the software's author, the holder of the
18 * economic rights, and the successive licensors have only limited
19 * liability.
20 *
21 * In this respect, the user's attention is drawn to the risks associated
22 * with loading, using, modifying and/or developing or reproducing the
23 * software by the user in light of its specific status of free software,
24 * that may mean that it is complicated to manipulate, and that also
25 * therefore means that it is reserved for developers and experienced
26 * professionals having in-depth computer knowledge. Users are therefore
27 * encouraged to load and test the software's suitability as regards their
28 * requirements in conditions enabling the security of their systems and/or
29 * data to be ensured and, more generally, to use and operate it in the
30 * same conditions as regards security.
31 *
32 * The fact that you are presently reading this means that you have had
33 * knowledge of the CeCILL license version 2 and that you accept its terms.
34 */
35
36#ifndef AIMS_FIBERS_BUNDLESSLICER_H
37#define AIMS_FIBERS_BUNDLESSLICER_H
38
39
40#include <aims/fibers/bundles.h>
41
42
43namespace aims
44{
45
46class BundlesSlicer;
47
48
49 //-------------------------//
50 // BundlesSlicerListener //
51//-------------------------//
52
54{
55public:
56
57 virtual ~BundlesSlicerListener();
58 virtual void startBundleSlicing( BundlesSlicer &slicer,
59 const aims::BundleInfo &bundle );
60 virtual void newBundleSlice( BundlesSlicer &slicer,
61 const aims::BundleInfo &bundle, float time,
62 const std::vector< aims::FiberPoint > &points );
64 const aims::BundleInfo &bundle );
65 virtual void noMoreBundleSlice( BundlesSlicer &slicer );
66};
67
68
69 //-----------------//
70 // BundlesSlicer //
71//-----------------//
72
74{
75public:
76
77 virtual ~BundlesSlicer();
79
80
81protected:
82
83 virtual void startBundleSlicing( const aims::BundleInfo &bundle );
85 float time,
86 const std::vector< aims::FiberPoint > &points );
87 virtual void terminateBundleSlicing( const aims::BundleInfo &bundle );
89
90private:
91
92 typedef std::vector< BundlesSlicerListener * > BundlesSlicerListenerList;
93 BundlesSlicerListenerList _bundlesSlicerListeners;
94};
95
96
97
98 //-----------------------//
99 // SimpleBundlesSlicer //
100//-----------------------//
101
103{
104public:
105 SimpleBundlesSlicer( size_t numberOfSlice );
106
107protected:
110 const aims::BundleInfo & );
112 const aims::FiberInfo & );
114 const aims::FiberInfo & );
116 const aims::FiberInfo &, const aims::FiberPoint & );
118
119private:
120 size_t _numberOfSlice;
121 std::vector< std::vector< aims::FiberPoint > > _points;
122 aims::Polyline _currentCurve;
123};
124
125
126 //----------------------//
127 // BundleSlicesToMesh //
128//----------------------//
129
131{
132public:
136
137 inline const TimeMesh_t &getMesh() const { return _timeMesh; }
138
139protected:
141 const aims::BundleInfo &bundle );
143 const aims::BundleInfo &bundle, float time,
144 const std::vector< aims::FiberPoint > &points );
146 const aims::BundleInfo &bundle );
148
149private:
150 TimeMesh_t _timeMesh;
151};
152
153
154
155
156 //-------------------------//
157 // BundlesSlicerListener //
158//-------------------------//
159
160//-----------------------------------------------------------------------------
162
163
164 //-----------------//
165 // BundlesSlicer //
166//-----------------//
167
168
169//-----------------------------------------------------------------------------
171 listener )
172{
173 _bundlesSlicerListeners.push_back( &listener );
174}
175
176
177
178} // namespace aims
179
180#endif // ifndef AIMS_FIBERS_BUNDLESSLICER_H
The template class to manage a mesh.
Definition surface.h:69
The template class to manage a mesh with time if needed.
Definition surface.h:317
Serial processing of bundles.
Definition bundles.h:162
Serial processing of bundles.
Definition bundles.h:195
AimsTimeSurface< 2, Void > TimeMesh_t
void startBundleSlicing(BundlesSlicer &slicer, const aims::BundleInfo &bundle)
AimsSurface< 2, Void > Mesh_t
void newBundleSlice(BundlesSlicer &slicer, const aims::BundleInfo &bundle, float time, const std::vector< aims::FiberPoint > &points)
void noMoreBundleSlice(BundlesSlicer &slicer)
void terminateBundleSlicing(BundlesSlicer &slicer, const aims::BundleInfo &bundle)
AimsVector< uint32_t, 2 > Polygon_t
const TimeMesh_t & getMesh() const
virtual void startBundleSlicing(BundlesSlicer &slicer, const aims::BundleInfo &bundle)
virtual void newBundleSlice(BundlesSlicer &slicer, const aims::BundleInfo &bundle, float time, const std::vector< aims::FiberPoint > &points)
virtual void noMoreBundleSlice(BundlesSlicer &slicer)
virtual void terminateBundleSlicing(BundlesSlicer &slicer, const aims::BundleInfo &bundle)
void stopBundleSliceProduction()
void produceBundleSlice(const aims::BundleInfo &bundle, float time, const std::vector< aims::FiberPoint > &points)
void addBundlesSlicerListener(BundlesSlicerListener &)
virtual ~BundlesSlicer()
virtual void startBundleSlicing(const aims::BundleInfo &bundle)
virtual void terminateBundleSlicing(const aims::BundleInfo &bundle)
void bundleStarted(const aims::BundleProducer &, const aims::BundleInfo &)
void fiberStarted(const aims::BundleProducer &, const aims::BundleInfo &, const aims::FiberInfo &)
void newFiberPoint(const aims::BundleProducer &, const aims::BundleInfo &, const aims::FiberInfo &, const aims::FiberPoint &)
void fiberTerminated(const aims::BundleProducer &, const aims::BundleInfo &, const aims::FiberInfo &)
void bundleTerminated(const aims::BundleProducer &, const aims::BundleInfo &)
void noMoreBundle(const aims::BundleProducer &)
SimpleBundlesSlicer(size_t numberOfSlice)
The class for EcatSino data write operation.
aims::Polyline::Point_t FiberPoint
Definition bundles.h:88