TransformationMatrix3DReaderService.hpp 3.28 KB
Newer Older
1
/* ***** BEGIN LICENSE BLOCK *****
2
 * FW4SPL - Copyright (C) IRCAD, 2009-2017.
Nicolas Philipps's avatar
Nicolas Philipps committed
3
4
 * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
 * published by the Free Software Foundation.
5
6
 * ****** END LICENSE BLOCK ****** */

julien.waechter's avatar
julien.waechter committed
7
8
#ifndef __IODATA_TRANSFORMATIONMATRIX3DREADERSERVICE_HPP__
#define __IODATA_TRANSFORMATIONMATRIX3DREADERSERVICE_HPP__
9

10
#include "ioData/config.hpp"
11
12
13

#include <io/IReader.hpp>

14
#include <boost/filesystem/path.hpp>
15
16
17
18

namespace ioData
{
/**
Nicolas Philipps's avatar
Nicolas Philipps committed
19
 * @brief   Transformation matrix 3D reader service.
20
21
22
23
24
25
26
27
 *
 * Service reading a TransformationMatrix3D object.
 * @li Use setConfiguration(cfg) and configure() methods to configure the matrix filename.
 * @li Use start() to initialize the service.
 * @li Use update() to read the transformation matrix.
 * @li Use stop() to stop service before to destroy it.
 *
 * Service registered details : \n
28
29
 * fwServicesRegisterMacro( ::io::IReader , ::ioData::TransformationMatrix3DReaderService ,
 *::fwData::TransformationMatrix3D )
30
31
32
33
34
 */
class IODATA_CLASS_API TransformationMatrix3DReaderService : public ::io::IReader
{

public:
35
    fwCoreServiceClassDefinitionsMacro( (TransformationMatrix3DReaderService)(::io::IReader) );
36
37

    /// Super class of reader services
julien.waechter's avatar
julien.waechter committed
38
    typedef ::io::IReader SuperClass;
Nicolas Philipps's avatar
Nicolas Philipps committed
39
40
41
42
43
44
45
46
47
48
49

    /** @name Specified reader service methods ( override from ::io::IReader )
     * @{
     */

    /**
     * @brief Configure the image path.
     *
     * This method is used to find
     * the file path  using a file selector.
     */
50
    IODATA_API virtual void configureWithIHM();
Nicolas Philipps's avatar
Nicolas Philipps committed
51
52
53
54

    /**
     * @brief   returns  (filename) extension
     */
julien.waechter's avatar
julien.waechter committed
55
    IODATA_API virtual std::vector< std::string > getSupportedExtensions();
Nicolas Philipps's avatar
Nicolas Philipps committed
56
    /// @}
57

58
59
60
    /// Return path type managed by the service, here FILE
    IODATA_API virtual ::io::IOPathType getIOPathType() const;

61
62
protected:

63
64
    /** @name Service methods ( override from ::fwServices::IService )
     * @{
Nicolas Philipps's avatar
Nicolas Philipps committed
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
     */

    /**
     * @brief Starting method. This method is called by start() from base service ( ::fwServices::IService )
     *
     * This method is used to initialize the service. The starting method is empty for this service.
     */
    IODATA_API virtual void starting( ) throw(::fwTools::Failed);

    /**
     * @brief Stopping method. This method is called by stop() from base service ( ::fwServices::IService )
     *
     * The stopping method is empty for this service.
     */
    IODATA_API virtual void stopping( ) throw(::fwTools::Failed);

81
82
83
84
85
    /**
     * @brief Configuring method : calls implementation from `io::IReader`
     */
    IODATA_API virtual void configuring() throw(::fwTools::Failed);

Nicolas Philipps's avatar
Nicolas Philipps committed
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
    /**
     * @brief Updating method. This method is called by update() from base service ( ::fwServices::IService )
     *
     * This method is used to update the service.
     * The transformation matrix is read with the reader ::fwDataIO::reader::TransformationMatrix3DReader.
     * Notify reading.
     */
    IODATA_API void updating() throw(::fwTools::Failed);

    /**
     * @brief Info method.
     *
     * This method is used to give
     * informations about the service.
     *
     * @param[out] _sstream output stream
     */
103
    IODATA_API virtual void info(std::ostream& _sstream );
Nicolas Philipps's avatar
Nicolas Philipps committed
104
    /// @}
105
106
107
108
109

};

} // namespace ioData

julien.waechter's avatar
julien.waechter committed
110
#endif // __IODATA_TRANSFORMATIONMATRIX3DREADERSERVICE_HPP__