aimsdata  5.1.2
Neuroimaging data handling
channelR.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  * Data reader class
36  */
37 #ifndef AIMSDATA_IO_CHANNELR_H
38 #define AIMSDATA_IO_CHANNELR_H
39 
40 #include <aims/io/process.h>
44 #include <aims/utility/channel.h>
45 #include <string>
46 
47 
48 namespace {
49 
50  template<class OUTP>
51  class InternalConverter : public aims::Process
52  {
53  public:
54  InternalConverter( uint8_t c, int b, int frm, OUTP & d )
55  : Process(), channel(c), border( b ), frame( frm ), data( d ) {}
56  virtual ~InternalConverter() {}
57 
58  uint8_t channel;
59  int border;
60  int frame;
61  OUTP & data;
62  };
63 
64 }
65 
66 namespace aims
67 {
69  template<class OUTP>
71  {
72  public:
73  ChannelReader( const std::string & f );
74  virtual ~ChannelReader();
75 
76  virtual void read( OUTP & data,
77  uint8_t channel = 4,
78  int border = 0,
79  const std::string* format = 0,
80  int frame = -1 );
82  const std::map<std::string, std::set<std::string> > & );
83 
84  private:
85  std::string _filename;
86  std::map<std::string, std::set<std::string> > _allowedTypes;
87  };
88 
89 }
90 
91 #endif
Reads a carto::VolumeRef, with conversion if needed.
Definition: channelR.h:71
void setAllowedInputDataTypes(const std::map< std::string, std::set< std::string > > &)
virtual ~ChannelReader()
virtual void read(OUTP &data, uint8_t channel=4, int border=0, const std::string *format=0, int frame=-1)
ChannelReader(const std::string &f)
Link mechanism between the Finder and a process operating on arbitrary data types.
Definition: process.h:200
The class for EcatSino data write operation.
Definition: borderfiller.h:13