fw4spl
fwItkIO/include/fwItkIO/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 __FWITKIO_IMAGEWRITER_HPP__
8 #define __FWITKIO_IMAGEWRITER_HPP__
9 
10 #include "fwItkIO/config.hpp"
11 
12 #include <fwData/Image.hpp>
13 #include <fwData/location/SingleFile.hpp>
14 
15 #include <fwDataIO/writer/GenericObjectWriter.hpp>
16 
17 #include <fwTools/ProgressAdviser.hpp>
18 
19 namespace fwItkIO
20 {
21 
22 class ImageWriter : public ::fwDataIO::writer::GenericObjectWriter< ::fwData::Image >,
23  public ::fwData::location::enableSingleFile< ::fwDataIO::writer::IObjectWriter >,
25 {
26 
27 public:
28 
30  (()),
31  ::fwDataIO::writer::factory::New< ImageWriter >
32  );
34 
36 
37  FWITKIO_API ~ImageWriter();
38 
39  FWITKIO_API void write() override;
40 
41  FWITKIO_API std::string extension() override;
42 };
43 
44 } // namespace fwItkIO
45 
46 #endif // __FWITKIO_IMAGEWRITER_HPP__
FWITKIO_API std::string extension() override
Return the default filename extension can be dynamic.
Subclasses Inherited from ProgressAdviser can notify progression This class is used as base class to ...
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
FWITKIO_API void write() override
Defines an writer interface.
#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
The namespace fwItkIO contains reader, writer and helper for itk image.
#define fwCoreAllowSharedFromThis()
Generate getSptr and getConstSptr methods.
generic class for all object writers.