libpniio
image_channel_info.hpp
Go to the documentation of this file.
1 //
2 // (c) Copyright 2011 DESY, Eugen Wintersberger <eugen.wintersberger@desy.de>
3 //
4 // This file is part of libpniio.
5 //
6 // libpniio is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // libpniio is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with libpniio. If not, see <http://www.gnu.org/licenses/>.
18 // ===========================================================================
19 //
20 // Created on: Apr 23, 2012
21 // Author: Eugen Wintersberger <eugen.wintersberger@desy.de>
22 //
23 //
24 
25 #pragma once
26 
27 #include <pni/core/types.hpp>
28 
29 namespace pni{
30 namespace io{
31 
40  {
41  private:
42  pni::core::type_id_t _tid;
43  size_t _bits;
44  public:
45  //-----------------------------------------------------------------
48  _tid(pni::core::type_id_t::NONE),
49  _bits(0)
50  {}
51 
52  //-----------------------------------------------------------------
59  image_channel_info(const pni::core::type_id_t &id,size_t bits):
60  _tid(id),
61  _bits(bits)
62  {}
63 
64  //-----------------------------------------------------------------
71  pni::core::type_id_t type_id() const { return _tid; }
72 
73  //-----------------------------------------------------------------
80  size_t bits() const { return _bits; }
81 
82  };
83 
84 //end of namespace
85 }
86 }
pni::core::type_id_t type_id() const
get type ID
Definition: image_channel_info.hpp:71
image channel information class
Definition: image_channel_info.hpp:39
pni::core::type_id_t _tid
ID of the datatype used for this channel.
Definition: image_channel_info.hpp:42
Definition: cbf_reader.hpp:41
image_channel_info(const pni::core::type_id_t &id, size_t bits)
standard constructor
Definition: image_channel_info.hpp:59
size_t _bits
number of bits per channel
Definition: image_channel_info.hpp:43
image_channel_info()
default constructor
Definition: image_channel_info.hpp:47
size_t bits() const
get bits
Definition: image_channel_info.hpp:80