fw4spl
VtiImageWriter.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_VTIIMAGEWRITER_HPP__
8 #define __FWVTKIO_VTIIMAGEWRITER_HPP__
9 
10 #include "fwVtkIO/config.hpp"
11 
12 #include <fwData/Image.hpp>
13 #include <fwData/location/SingleFile.hpp>
14 
15 #include <fwDataIO/writer/GenericObjectWriter.hpp>
16 
17 #include <boost/filesystem/path.hpp>
18 
19 namespace fwJobs
20 {
21 class Observer;
22 }
23 
24 namespace fwVtkIO
25 {
26 
32 class VtiImageWriter : public ::fwDataIO::writer::GenericObjectWriter< ::fwData::Image >,
33  public ::fwData::location::enableSingleFile< ::fwDataIO::writer::IObjectWriter >
34 {
35 
36 public:
37 
40  (()),
41  ::fwDataIO::writer::factory::New< VtiImageWriter >
42  );
44 
47 
49  FWVTKIO_API ~VtiImageWriter();
50 
52  FWVTKIO_API void write() override;
53 
55  FWVTKIO_API std::string extension() override;
56 
58  FWVTKIO_API SPTR(::fwJobs::IJob) getJob() const override;
59 
60 private:
61 
63  SPTR(::fwJobs::Observer) m_job;
64 };
65 
66 } // namespace fwVtkIO
67 
68 #endif // __FWVTKIO_VTIIMAGEWRITER_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.
#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.
generic class for all object writers.