fw4spl
fwVtkIO/include/fwVtkIO/SeriesDBReader.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-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_SERIESDBREADER_HPP__
8 #define __FWVTKIO_SERIESDBREADER_HPP__
9 
10 #include "fwVtkIO/config.hpp"
11 
12 #include <fwData/location/MultiFiles.hpp>
13 
14 #include <fwDataIO/reader/GenericObjectReader.hpp>
15 
16 #include <fwMedData/Series.hpp>
17 #include <fwMedData/SeriesDB.hpp>
18 
19 #include <boost/filesystem/path.hpp>
20 
21 namespace fwJobs
22 {
23 class Observer;
24 }
25 
26 namespace fwVtkIO
27 {
28 
34 class SeriesDBReader : public ::fwDataIO::reader::GenericObjectReader< ::fwMedData::SeriesDB >,
35  public ::fwData::location::enableMultiFiles< ::fwDataIO::reader::IObjectReader >
36 {
37 
38 public:
39 
41  SeriesDB >),
42  (()),
43  ::fwDataIO::reader::factory::New< SeriesDBReader >
44  );
46 
49 
51  FWVTKIO_API ~SeriesDBReader();
52 
54  FWVTKIO_API void read() override;
55 
57  FWVTKIO_API std::string extension() override;
58 
59  //------------------------------------------------------------------------------
60 
61  void setLazyMode(bool lazyMode)
62  {
63  m_lazyMode = lazyMode;
64  }
65 
67  FWVTKIO_API SPTR(::fwJobs::IJob) getJob() const override;
68 
69 private:
70 
72  SPTR(::fwJobs::Observer) m_job;
73 
74  bool m_lazyMode;
75 };
76 
77 } // namespace fwVtkIO
78 
79 #endif // __FWVTKIO_SERIESDBREADER_HPP__
#define SPTR(_cls_)
This class is an interface for class managing job.
Definition: IJob.hpp:28
Namespace containing medical data.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
generic class for all object readers.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
#define fwCoreAllowSharedFromThis()
Generate getSptr and getConstSptr methods.
This class is derived by reader/writer.
Definition: MultiFiles.hpp:58
This namespace fwJobs provides jobs management.