fw4spl
InrImageReaderService.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 namespace fwData
18 {
19 class Image;
20 }
21 
22 namespace ioITK
23 {
41 class IOITK_CLASS_API InrImageReaderService : public ::fwIO::IReader
42 {
43 
44 public:
46 
47  IOITK_API InrImageReaderService() noexcept;
48 
49  IOITK_API virtual ~InrImageReaderService() noexcept;
50 
51 protected:
52 
54  virtual void starting() override
55  {
56  }
57 
59  virtual void stopping() override
60  {
61  }
62 
64  IOITK_API virtual void configuring() override;
65 
67  IOITK_API virtual void updating() override;
68 
70  IOITK_API void info(std::ostream& _sstream ) override;
71 
73  IOITK_API virtual void configureWithIHM() override;
74 
76  IOITK_API ::fwIO::IOPathType getIOPathType() const override;
77 
78 private:
79 
80  void notificationOfDBUpdate();
81 
82  bool createImage( const ::boost::filesystem::path& inrFileDir, const SPTR(::fwData::Image)& _pImg );
83 };
84 
85 } // namespace ioITK
#define SPTR(_cls_)
This file defines fwCore base macros.
Reader for .inr.gz image.
Reader service API. It manages extension points definition and extension configuration.
Definition: IReader.hpp:34
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
virtual void stopping() override
Override.
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.