fw4spl
JpgImageWriter.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_JPGIMAGEWRITER_HPP__
8 #define __FWITKIO_JPGIMAGEWRITER_HPP__
9 
10 #include "fwItkIO/config.hpp"
11 
12 #include <fwData/Image.hpp>
13 #include <fwData/location/Folder.hpp>
14 
15 #include <fwDataIO/writer/GenericObjectWriter.hpp>
16 
17 #include <fwTools/ProgressAdviser.hpp>
18 
19 #include <boost/filesystem/path.hpp>
20 
21 namespace fwItkIO
22 {
23 
24 class JpgImageWriter : public ::fwDataIO::writer::GenericObjectWriter< ::fwData::Image >,
25  public ::fwData::location::enableFolder< ::fwDataIO::writer::IObjectWriter >,
27 {
28 
29 public:
30 
32  (()),
33  ::fwDataIO::writer::factory::New< JpgImageWriter >
34  );
36 
38 
39  FWITKIO_API ~JpgImageWriter();
40 
41  FWITKIO_API void write() override;
42 
43  FWITKIO_API std::string extension() override;
44 };
45 
46 } // namespace fwItkIO
47 
48 #endif // __FWITKIO_JPGIMAGEWRITER_HPP__
FWITKIO_API void write() override
Defines an writer interface.
Subclasses Inherited from ProgressAdviser can notify progression This class is used as base class to ...
FWITKIO_API std::string extension() override
Return the default filename extension can be dynamic.
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.
The namespace fwItkIO contains reader, writer and helper for itk image.
#define fwCoreAllowSharedFromThis()
Generate getSptr and getConstSptr methods.
This class is derived by reader/writer.
Definition: Folder.hpp:80
generic class for all object writers.