fw4spl
BitmapImageReader.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2017.
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 __FWVTKIO_BITMAPIMAGEREADER_HPP__
8 #define __FWVTKIO_BITMAPIMAGEREADER_HPP__
9 
10 #include "fwVtkIO/config.hpp"
11 
12 #include <fwData/Image.hpp>
13 #include <fwData/location/SingleFile.hpp>
14 
15 #include <fwDataIO/reader/GenericObjectReader.hpp>
16 
17 #include <vector>
18 
19 namespace fwJobs
20 {
21 class Observer;
22 class IJob;
23 }
24 
25 namespace fwVtkIO
26 {
27 
34  public ::fwData::location::enableSingleFile< ::fwDataIO::reader::IObjectReader >
35 {
36 
37 public:
38 
41  (()),
42  ::fwDataIO::reader::factory::New< BitmapImageReader >
43  );
44 
46 
49 
51  FWVTKIO_API ~BitmapImageReader();
52 
54  FWVTKIO_API void read() override;
55 
57  FWVTKIO_API std::string extension() override;
58 
60  FWVTKIO_API SPTR(::fwJobs::IJob) getJob() const override;
61 
63  FWVTKIO_API static void getAvailableExtensions(std::vector<std::string>& ext);
64 
65 private:
66 
68  SPTR(::fwJobs::Observer) m_job;
69 
71  std::string m_availableExtensions;
72 };
73 
74 } // namespace fwVtkIO
75 
76 #endif // __FWVTKIO_BITMAPIMAGEREADER_HPP__
#define SPTR(_cls_)
This class is an interface for class managing job.
Definition: IJob.hpp:28
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
STL namespace.
generic class for all object readers.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
This class is derived by reader/writer.
Definition: SingleFile.hpp:70
#define fwCoreAllowSharedFromThis()
Generate getSptr and getConstSptr methods.
This namespace fwJobs provides jobs management.