fw4spl
ImageGetter.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2016.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWDATATOOLS_HELPER_IMAGEGETTER_HPP__
8 #define __FWDATATOOLS_HELPER_IMAGEGETTER_HPP__
9 
10 #include "fwDataTools/config.hpp"
11 
12 #include <fwData/Image.hpp>
13 
14 namespace fwDataTools
15 {
16 namespace helper
17 {
18 
23 class FWDATATOOLS_CLASS_API ImageGetter
24 {
25 
26 public:
27  typedef ::fwData::Image::SizeType SizeType;
28  typedef ::fwData::Image::IndexType IndexType;
29  typedef ::fwData::Image::BufferType BufferType;
30  typedef ::fwData::Image::BufferIndexType BufferIndexType;
31 
33  FWDATATOOLS_API ImageGetter( ::fwData::Image::csptr image );
34 
36  FWDATATOOLS_API virtual ~ImageGetter();
37 
39  FWDATATOOLS_API void* getBuffer() const;
40 
44  FWDATATOOLS_API void* getPixelBuffer( SizeType::value_type x, SizeType::value_type y,
45  SizeType::value_type z ) const;
46 
47  FWDATATOOLS_API void* getPixelBuffer( IndexType index ) const;
48 
49  FWDATATOOLS_API const std::string getPixelAsString(SizeType::value_type x,
50  SizeType::value_type y,
51  SizeType::value_type z ) const;
52  // @}
53 
54 private:
55 
56  ::fwData::Image::csptr m_image;
57 
59 };
60 
61 } // helper
62 } // fwDataTools
63 
64 #endif // __FWDATATOOLS_HELPER_IMAGEGETTER_HPP__
65 
The namespace fwDataTools contains classes which provide helpers to manipulate fwData::Object. *.
base class for BufferObject Lock
Defines an helper to modify an fwData::Image by adding few medical fields and create in parallel the ...
Definition: ImageGetter.hpp:23