fw4spl
ImageSeriesWriter.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 __VTKGDCMIO_IMAGESERIESWRITER_HPP__
8 #define __VTKGDCMIO_IMAGESERIESWRITER_HPP__
9 
10 #include "vtkGdcmIO/config.hpp"
11 
12 #include <fwData/location/Folder.hpp>
13 
14 #include <fwDataIO/writer/GenericObjectWriter.hpp>
15 
16 namespace fwJobs
17 {
18 class Observer;
19 }
20 
21 namespace fwMedData
22 {
23 class ImageSeries;
24 }
25 
26 namespace vtkGdcmIO
27 {
28 
29 enum class CompressionTypes
30 {
31  RAW = 0, //default
32  JPEG,
33  JPEG2000,
34  JPEGLS,
35  RLE
36 };
37 
41 class ImageSeriesWriter : public ::fwDataIO::writer::GenericObjectWriter< ::fwMedData::ImageSeries >,
42  public ::fwData::location::enableFolder< ::fwDataIO::writer::IObjectWriter >
43 {
44 
45 public:
46 
48  ImageSeries>),
49  (()),
50  ::fwDataIO::writer::factory::New< ImageSeriesWriter >
51  )
53 
55  VTKGDCMIO_API ImageSeriesWriter(::fwDataIO::writer::IObjectWriter::Key key);
56 
58  VTKGDCMIO_API void write() override;
59 
61  VTKGDCMIO_API std::string extension() override;
62 
64  VTKGDCMIO_API SPTR(::fwJobs::IJob) getJob() const override;
65 
67  CompressionTypes getCompressionTypes() const
68  {
69  return m_compressionTypes;
70  }
71 
73  void setCompressionTypes(CompressionTypes type)
74  {
75  m_compressionTypes = type;
76  }
77 private:
78 
80  SPTR(::fwJobs::Observer) m_job;
81  CompressionTypes m_compressionTypes;
82 };
83 
84 } // namespace vtkGdcmIO
85 
86 #endif // __VTKGDCMIO_IMAGESERIESWRITER_HPP__
#define SPTR(_cls_)
Namespace containing medical data.
This namespace fwDataIO contains reader and writer for several framework&#39;s data.
STL namespace.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
vtkmGdcm reader/writer lib
Definition: GdcmHelper.hpp:15
Write an ImageSeries in DICOM format.
void setCompressionTypes(CompressionTypes type)
Set DICOM compression type.
#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: Folder.hpp:80
This namespace fwJobs provides jobs management.
generic class for all object writers.
This class manages a job.
Definition: Observer.hpp:22