fw4spl
fwVtkIO/include/fwVtkIO/ImageWriter.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_IMAGEWRITER_HPP__
8 #define __FWVTKIO_IMAGEWRITER_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 #include <vtkActor.h>
20 
21 namespace fwJobs
22 {
23 class Observer;
24 }
25 
26 namespace fwVtkIO
27 {
28 
34 class ImageWriter : public ::fwDataIO::writer::GenericObjectWriter< ::fwData::Image >,
35  public ::fwData::location::enableSingleFile< ::fwDataIO::writer::IObjectWriter >
36 {
37 
38 public:
39 
41  (()),
42  ::fwDataIO::writer::factory::New< ImageWriter >
43  );
45 
48 
50  FWVTKIO_API ~ImageWriter();
51 
53  FWVTKIO_API void write() override;
54 
56  FWVTKIO_API std::string extension() override;
57 
59  FWVTKIO_API SPTR(::fwJobs::IJob) getJob() const override;
60 
61 private:
62 
64  SPTR(::fwJobs::Observer) m_job;
65 
66 };
67 
68 } // namespace fwVtkIO
69 
70 #endif // __FWVTKIO_IMAGEWRITER_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.