fw4spl
SInrSeriesDBReader.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2018.
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 #pragma once
8 
9 #include "ioITK/config.hpp"
10 
11 #include <fwCore/macros.hpp>
12 
13 #include <fwIO/IReader.hpp>
14 
15 #include <boost/filesystem/path.hpp>
16 
17 #include <string>
18 
19 namespace fwData
20 {
21 class Image;
22 }
23 
24 namespace fwMedData
25 {
26 class Series;
27 }
28 
29 namespace ioITK
30 {
31 
52 class IOITK_CLASS_API SInrSeriesDBReader : public ::fwIO::IReader
53 {
54 
55 public:
57 
58  IOITK_API SInrSeriesDBReader() noexcept;
59 
60  IOITK_API virtual ~SInrSeriesDBReader() noexcept;
61 
62 protected:
63 
65  virtual void starting() override
66  {
67  }
68 
70  virtual void stopping() override
71  {
72  }
73 
75  virtual void configuring() override;
76 
78  IOITK_API virtual void updating() override;
79 
85  IOITK_API virtual void configureWithIHM() override;
86 
88  IOITK_API ::fwIO::IOPathType getIOPathType() const override;
89 
90 private:
91 
93  void initSeries(SPTR(::fwMedData::Series) series, const std::string& instanceUID);
94 
96  bool createImage( const ::boost::filesystem::path inrFile, SPTR(::fwData::Image) image );
97 };
98 
99 } // namespace ioITK
#define SPTR(_cls_)
Namespace containing medical data.
This file defines fwCore base macros.
Reader service API. It manages extension points definition and extension configuration.
Definition: IReader.hpp:34
Reads inr files and pushes them into SeriesDB.
virtual void stopping() override
Does nothing.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
Contains the representation of the data objects used in the framework.
This class defines an image.
The namespace ioITK contains services for reader, writer and helper for itk image.