fw4spl
vtkGdcmIO/include/vtkGdcmIO/SeriesDBReader.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_SERIESDBREADER_HPP__
8 #define __VTKGDCMIO_SERIESDBREADER_HPP__
9 
10 #include "vtkGdcmIO/config.hpp"
11 
12 #include <fwData/location/Folder.hpp>
13 #include <fwData/location/MultiFiles.hpp>
14 
15 #include <fwDataIO/reader/GenericObjectReader.hpp>
16 
17 namespace fwMedData
18 {
19 class SeriesDB;
20 }
21 namespace fwJobs
22 {
23 class Observer;
24 }
25 
26 namespace vtkGdcmIO
27 {
28 
33 class SeriesDBReader : public ::fwDataIO::reader::GenericObjectReader< ::fwMedData::SeriesDB >,
34  public ::fwData::location::enableFolder< ::fwDataIO::reader::IObjectReader >,
35  public ::fwData::location::enableMultiFiles< ::fwDataIO::reader::IObjectReader >
36 {
37 
38 public:
39 
42  (()),
43  ::fwDataIO::reader::factory::New< SeriesDBReader >
44  );
46 
48 
49  VTKGDCMIO_API ~SeriesDBReader();
50 
54  VTKGDCMIO_API void read() override;
55 
57  VTKGDCMIO_API SPTR(::fwJobs::IJob) getJob() const override;
58 
59 private:
60 
68  SPTR( ::fwMedData::SeriesDB ) createSeriesDB( const ::boost::filesystem::path &dicomDir );
69 
76  void addSeries( const SPTR( ::fwMedData::SeriesDB )& seriesDB, const std::vector< std::string >& filenames);
77 
79  SPTR(::fwJobs::Observer) m_job;
80 
81 };
82 
83 } // namespace vtkGdcmIO
84 
85 #endif /*__VTKGDCMIO_SERIESDBREADER_HPP__*/
#define SPTR(_cls_)
This class is an interface for class managing job.
Definition: IJob.hpp:28
Namespace containing medical data.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
STL namespace.
vtkmGdcm reader/writer lib
Definition: GdcmHelper.hpp:15
Reads DICOM data from a directory path in order to create a SeriesDB object.
generic class for all object readers.
#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 class is derived by reader/writer.
Definition: MultiFiles.hpp:58
This namespace fwJobs provides jobs management.