fw4spl
SplineReaderService.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 "ioData/config.hpp"
10 
11 #include <fwData/Spline.hpp>
12 #include <fwData/TransformationMatrix3D.hpp>
13 
14 #include <fwIO/IReader.hpp>
15 
16 #include <boost/filesystem/path.hpp>
17 
18 namespace ioData
19 {
33 class IODATA_CLASS_API SplineReaderService : public ::fwIO::IReader
34 {
35 
36 public:
39  typedef ::fwIO::IReader SuperClass;
43  IODATA_API SplineReaderService();
44 
48  IODATA_API ~SplineReaderService() noexcept;
49 
59  virtual void configureWithIHM() override
60  {
61  }
62 
66  IODATA_API virtual std::vector< std::string > getSupportedExtensions() override;
67 
69 
70 protected:
71 
81  virtual void starting() override
82  {
83  FW_DEPRECATED_MSG("This service is deprecated. Use a ::fwData::PointList instead of a Spline.", "18.0");
84  }
85 
91  virtual void stopping() override
92  {
93  }
94 
110  IODATA_API virtual void configuring( ) override;
111 
118  IODATA_API void updating() override;
119 
128  IODATA_API virtual void info(std::ostream& _sstream ) override;
130 
131 private:
138  std::shared_ptr< ::fwData::TransformationMatrix3D > loadObjectTransformationMatrix3D(std::string m_file);
139 
143  std::shared_ptr< ::fwData::TransformationMatrix3D> objectMatrix;
147  bool isTransfo;
148  typedef std::vector< ::fwData::Spline::point > Points;
149  Points m_points;
150  double m_radius;
151  int m_nbSides;
152  int m_idSpline;
153 };
154 
155 }
virtual void starting() override
Starting method : default does nothing.
::fwIO::IReader SuperClass
Super class of reader services.
#define FW_DEPRECATED_MSG(message, version)
Use this macro when deprecating a function to warn the developer.
Definition: spyLog.hpp:360
virtual void stopping() override
Stopping method : default does nothing.
Reader service API. It manages extension points definition and extension configuration.
Definition: IReader.hpp:34
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
The namespace ioData contains reader and writer services for basic fwData::Object which doesn&#39;t need ...