aimsdata  5.1.2
Neuroimaging data handling
bundleRegroup.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_BUNDLEREGROUP_H
37 #define AIMS_FIBERS_BUNDLEREGROUP_H
38 
39 
40 #include <aims/fibers/bundles.h>
41 
42 
43  //---------------//
44  // BundleRegroup //
45 //---------------//
46 
47 namespace aims
48 {
49 
50 typedef std::vector< aims::FiberPoint > Fiber;
51 typedef std::vector< Fiber > Fibers;
52 typedef std::vector< Fibers > BundlesSet;
53 
54 
56 {
57 public:
58 
62  BundleRegroup( const std::string &groupsFileName,
63  std::vector< std::string > &excludednames );
64  BundleRegroup( const std::string &groupsFileName = std::string() );
65  virtual ~BundleRegroup();
66  void setStream( std::istream & );
67 
68 protected:
69 
70 
71  virtual void bundleStarted( const aims::BundleProducer &,
72  const aims::BundleInfo & );
73  virtual void bundleTerminated( const aims::BundleProducer &,
74  const aims::BundleInfo & );
75  virtual void fiberStarted( const aims::BundleProducer &,
76  const aims::BundleInfo &,
77  const aims::FiberInfo & );
78  virtual void fiberTerminated( const aims::BundleProducer &,
79  const aims::BundleInfo &,
80  const aims::FiberInfo & );
81  virtual void newFiberPoint( const aims::BundleProducer &,
82  const aims::BundleInfo &,
83  const aims::FiberInfo &,
84  const aims::FiberPoint & );
85  virtual void noMoreBundle( const aims::BundleProducer & );
86 
87 private:
88 
89  Fiber _fiber;
90  Fibers _fibers;
91  BundlesSet _bundlesSet;
92  std::vector<std::string> _bundles_name;
93  std::string _file_name;
94  std::ifstream _file_internal;
95  std::istream *_file;
96  std::vector< std::string > &_excludednames;
97  std::vector< std::string > vect;
98 };
99 
100 } // namespace aims
101 
102 #endif // ifndef AIMS_FIBERS_BUNDLEREGROUP_H
Serial processing of bundles.
Definition: bundles.h:163
Serial processing of bundles.
Definition: bundles.h:196
BundleRegroup(const std::string &groupsFileName=std::string())
BundleRegroup(const std::string &groupsFileName, std::vector< std::string > &excludednames)
If no groupsFileName or stream is specified, use bundles names to regroup.
virtual void fiberTerminated(const aims::BundleProducer &, const aims::BundleInfo &, const aims::FiberInfo &)
virtual void fiberStarted(const aims::BundleProducer &, const aims::BundleInfo &, const aims::FiberInfo &)
virtual void bundleTerminated(const aims::BundleProducer &, const aims::BundleInfo &)
virtual void noMoreBundle(const aims::BundleProducer &)
void setStream(std::istream &)
virtual ~BundleRegroup()
virtual void bundleStarted(const aims::BundleProducer &, const aims::BundleInfo &)
virtual void newFiberPoint(const aims::BundleProducer &, const aims::BundleInfo &, const aims::FiberInfo &, const aims::FiberPoint &)
The class for EcatSino data write operation.
Definition: borderfiller.h:13
std::vector< Fiber > Fibers
Definition: bundleRegroup.h:51
std::vector< aims::FiberPoint > Fiber
Definition: bundleRegroup.h:50
std::vector< Fibers > BundlesSet
Definition: bundleRegroup.h:52