Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Lucas SCHMIDT
sight
Commits
4edb5f16
Commit
4edb5f16
authored
Jul 13, 2017
by
Robin Chavignat
Browse files
feat(io*): use the windowTitle attribute in all readers and writers
Also run a Sheldon pass
parent
6ddb6f01
Changes
60
Hide whitespace changes
Inline
Side-by-side
Bundles/LeafIO/ioAtoms/src/ioAtoms/SReader.cpp
View file @
4edb5f16
...
...
@@ -427,7 +427,7 @@ void SReader::configureWithIHM()
static
::
boost
::
filesystem
::
path
_sDefaultPath
;
::
fwGui
::
dialog
::
LocationDialog
dialogFile
;
dialogFile
.
setTitle
(
"Enter file name"
);
dialogFile
.
setTitle
(
m_windowTitle
.
empty
()
?
"Enter file name"
:
m_windowTitle
);
dialogFile
.
setDefaultLocation
(
::
fwData
::
location
::
Folder
::
New
(
_sDefaultPath
)
);
dialogFile
.
setType
(
::
fwGui
::
dialog
::
ILocationDialog
::
SINGLE_FILE
);
dialogFile
.
setOption
(
::
fwGui
::
dialog
::
ILocationDialog
::
READ
);
...
...
Bundles/LeafIO/ioAtoms/src/ioAtoms/SWriter.cpp
View file @
4edb5f16
...
...
@@ -10,8 +10,8 @@
#include
<fwAtomConversion/convert.hpp>
#include
<fwAtomsBoostIO/Writer.hpp>
#include
<fwAtomsBoostIO/types.hpp>
#include
<fwAtomsBoostIO/Writer.hpp>
#include
<fwAtomsPatch/PatchingManager.hpp>
#include
<fwAtomsPatch/VersionsGraph.hpp>
...
...
@@ -411,7 +411,7 @@ void SWriter::configureWithIHM()
if
(
!
m_useAtomsPatcher
||
versionSelection
()
)
{
::
fwGui
::
dialog
::
LocationDialog
dialogFile
;
dialogFile
.
setTitle
(
"Enter file name"
);
dialogFile
.
setTitle
(
m_windowTitle
.
empty
()
?
"Enter file name"
:
m_windowTitle
);
dialogFile
.
setDefaultLocation
(
::
fwData
::
location
::
Folder
::
New
(
_sDefaultPath
)
);
dialogFile
.
setOption
(
::
fwGui
::
dialog
::
ILocationDialog
::
WRITE
);
dialogFile
.
setType
(
::
fwGui
::
dialog
::
LocationDialog
::
SINGLE_FILE
);
...
...
Bundles/LeafIO/ioData/include/ioData/MeshReaderService.hpp
View file @
4edb5f16
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
5
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
...
...
@@ -7,18 +7,16 @@
#ifndef __IODATA_MESHREADERSERVICE_HPP__
#define __IODATA_MESHREADERSERVICE_HPP__
#include
"ioData/config.hpp"
#include
<io/IReader.hpp>
#include
<boost/filesystem/path.hpp>
#include
"ioData/config
.hpp
"
#include
<boost/filesystem/path
.hpp
>
namespace
ioData
{
/**
* @brief Mesh reader service.
* @class MeshReaderService
*
* @date 2009.
*
* Service reading a trian file into a fwData::Mesh object.
* @li This service has no specified start and stop method.
...
...
@@ -33,12 +31,11 @@ class IODATA_CLASS_API MeshReaderService : public ::io::IReader
public:
fwCoreServiceClassDefinitionsMacro
(
(
MeshReaderService
)(
::
io
::
IReader
)
);
fwCoreServiceClassDefinitionsMacro
(
(
MeshReaderService
)(
::
io
::
IReader
)
);
/// Super class of reader services
typedef
::
io
::
IReader
SuperClass
;
/** @name Specified reader service methods ( override from ::io::IReader )
* @{
*/
...
...
@@ -84,6 +81,10 @@ protected:
{
}
/**
* @brief Configuring method : calls implementation from `io::IReader`
*/
IODATA_API
virtual
void
configuring
()
throw
(
::
fwTools
::
Failed
);
/**
* @brief Updating method. This method is called by update() from base service ( ::fwServices::IService )
...
...
@@ -102,7 +103,7 @@ protected:
*
* @param[out] _sstream output stream
*/
IODATA_API
virtual
void
info
(
std
::
ostream
&
_sstream
);
IODATA_API
virtual
void
info
(
std
::
ostream
&
_sstream
);
/// @}
};
...
...
Bundles/LeafIO/ioData/include/ioData/MeshWriterService.hpp
View file @
4edb5f16
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
5
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
...
...
@@ -7,18 +7,16 @@
#ifndef __IODATA_MESHWRITERSERVICE_HPP__
#define __IODATA_MESHWRITERSERVICE_HPP__
#include
"ioData/config.hpp"
#include
<io/IWriter.hpp>
#include
<boost/filesystem/path.hpp>
#include
"ioData/config
.hpp
"
#include
<boost/filesystem/path
.hpp
>
namespace
ioData
{
/**
* @brief Mesh writer service.
* @class MeshWriterService
*
* @date 2011.
*
* Service writing a mesh object.
* @li This service has no specified start and stop method.
...
...
@@ -31,10 +29,9 @@ namespace ioData
class
IODATA_CLASS_API
MeshWriterService
:
public
::
io
::
IWriter
{
public:
fwCoreServiceClassDefinitionsMacro
(
(
MeshWriterService
)(
::
io
::
IWriter
)
);
fwCoreServiceClassDefinitionsMacro
(
(
MeshWriterService
)(
::
io
::
IWriter
)
);
/// Super class of writer services
typedef
::
io
::
IWriter
SuperClass
;
...
...
@@ -94,6 +91,11 @@ protected:
{
}
/**
* @brief Configuring method : calls implementation from `io::IWriter`
*/
IODATA_API
virtual
void
configuring
()
throw
(
::
fwTools
::
Failed
);
/**
* @brief Updating method. This method is called by update() from base service ( ::fwServices::IService )
*
...
...
@@ -111,7 +113,7 @@ protected:
*
* @param[out] _sstream output stream
*/
IODATA_API
virtual
void
info
(
std
::
ostream
&
_sstream
);
IODATA_API
virtual
void
info
(
std
::
ostream
&
_sstream
);
/// @}
};
...
...
Bundles/LeafIO/ioData/include/ioData/SAttachmentSeriesReader.hpp
View file @
4edb5f16
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
6
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
...
...
@@ -35,7 +35,7 @@ class IODATA_CLASS_API SAttachmentSeriesReader : public ::io::IReader
public:
fwCoreServiceClassDefinitionsMacro
(
(
SAttachmentSeriesReader
)(
::
io
::
IReader
)
);
fwCoreServiceClassDefinitionsMacro
(
(
SAttachmentSeriesReader
)(
::
io
::
IReader
)
);
/// Super class of reader services
typedef
::
io
::
IReader
SuperClass
;
...
...
@@ -85,6 +85,10 @@ protected:
{
}
/**
* @brief Configuring method : calls implementation from `io::IReader`
*/
IODATA_API
virtual
void
configuring
()
throw
(
::
fwTools
::
Failed
);
/**
* @brief Updating method. This method is called by update() from base service ( ::fwServices::IService )
...
...
Bundles/LeafIO/ioData/include/ioData/TransformationMatrix3DReaderService.hpp
View file @
4edb5f16
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
5
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
...
...
@@ -7,19 +7,16 @@
#ifndef __IODATA_TRANSFORMATIONMATRIX3DREADERSERVICE_HPP__
#define __IODATA_TRANSFORMATIONMATRIX3DREADERSERVICE_HPP__
#include
<boost/filesystem/path
.hpp
>
#include
"ioData/config
.hpp
"
#include
<io/IReader.hpp>
#include
"ioData/config
.hpp
"
#include
<boost/filesystem/path
.hpp
>
namespace
ioData
{
/**
* @brief Transformation matrix 3D reader service.
* @class TransformationMatrix3DReaderService
*
* @date 2009.
*
* Service reading a TransformationMatrix3D object.
* @li Use setConfiguration(cfg) and configure() methods to configure the matrix filename.
...
...
@@ -28,13 +25,14 @@ namespace ioData
* @li Use stop() to stop service before to destroy it.
*
* Service registered details : \n
* fwServicesRegisterMacro( ::io::IReader , ::ioData::TransformationMatrix3DReaderService , ::fwData::TransformationMatrix3D )
* fwServicesRegisterMacro( ::io::IReader , ::ioData::TransformationMatrix3DReaderService ,
*::fwData::TransformationMatrix3D )
*/
class
IODATA_CLASS_API
TransformationMatrix3DReaderService
:
public
::
io
::
IReader
{
public:
fwCoreServiceClassDefinitionsMacro
(
(
TransformationMatrix3DReaderService
)(
::
io
::
IReader
)
);
fwCoreServiceClassDefinitionsMacro
(
(
TransformationMatrix3DReaderService
)(
::
io
::
IReader
)
);
/// Super class of reader services
typedef
::
io
::
IReader
SuperClass
;
...
...
@@ -80,6 +78,11 @@ protected:
*/
IODATA_API
virtual
void
stopping
(
)
throw
(
::
fwTools
::
Failed
);
/**
* @brief Configuring method : calls implementation from `io::IReader`
*/
IODATA_API
virtual
void
configuring
()
throw
(
::
fwTools
::
Failed
);
/**
* @brief Updating method. This method is called by update() from base service ( ::fwServices::IService )
*
...
...
@@ -97,7 +100,7 @@ protected:
*
* @param[out] _sstream output stream
*/
IODATA_API
virtual
void
info
(
std
::
ostream
&
_sstream
);
IODATA_API
virtual
void
info
(
std
::
ostream
&
_sstream
);
/// @}
};
...
...
Bundles/LeafIO/ioData/include/ioData/TransformationMatrix3DWriterService.hpp
View file @
4edb5f16
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
5
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
...
...
@@ -7,19 +7,16 @@
#ifndef __IODATA_TRANSFORMATIONMATRIX3DWRITERSERVICE_HPP__
#define __IODATA_TRANSFORMATIONMATRIX3DWRITERSERVICE_HPP__
#include
<boost/filesystem/path
.hpp
>
#include
"ioData/config
.hpp
"
#include
<io/IWriter.hpp>
#include
"ioData/config
.hpp
"
#include
<boost/filesystem/path
.hpp
>
namespace
ioData
{
/**
* @brief Transformation matrix 3D writer service.
* @class TransformationMatrix3DWriterService
*
* @date 2009.
*
* Service writing a TransformationMatrix3D object
* @li Use setConfiguration(cfg) and configure() methods to configure the matrix filename.
...
...
@@ -28,19 +25,19 @@ namespace ioData
* @li Use stop() to stop service before to destroy it.
*
* Service registered details : \n
* fwServicesRegisterMacro( ::io::IWriter , ::ioData::TransformationMatrix3DWriterService , ::fwData::TransformationMatrix3D )
* fwServicesRegisterMacro( ::io::IWriter , ::ioData::TransformationMatrix3DWriterService ,
*::fwData::TransformationMatrix3D )
*/
class
IODATA_CLASS_API
TransformationMatrix3DWriterService
:
public
::
io
::
IWriter
{
public:
fwCoreServiceClassDefinitionsMacro
(
(
TransformationMatrix3DWriterService
)(
::
io
::
IWriter
)
);
fwCoreServiceClassDefinitionsMacro
(
(
TransformationMatrix3DWriterService
)(
::
io
::
IWriter
)
);
/// Super class of writer services
typedef
::
io
::
IWriter
SuperClass
;
/** @name Specified writer service methods ( override from ::io::IWriter )
* @{
*/
...
...
@@ -82,6 +79,11 @@ protected:
*/
IODATA_API
virtual
void
stopping
(
)
throw
(
::
fwTools
::
Failed
);
/**
* @brief Configuring method : calls implementation from `io::IWriter`
*/
IODATA_API
virtual
void
configuring
()
throw
(
::
fwTools
::
Failed
);
/**
* @brief Updating method. This method is called by update() from base service ( ::fwServices::IService )
*
...
...
@@ -99,7 +101,7 @@ protected:
*
* @param[out] _sstream output stream
*/
IODATA_API
virtual
void
info
(
std
::
ostream
&
_sstream
);
IODATA_API
virtual
void
info
(
std
::
ostream
&
_sstream
);
/// @}
};
...
...
Bundles/LeafIO/ioData/src/ioData/MeshReaderService.cpp
View file @
4edb5f16
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
6
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
#include
"ioData/MeshReaderService.hpp"
#include
<io/IReader.hpp>
#include
<fwCom/Signal.hpp>
#include
<fwCom/Signal.hxx>
#include
<fwCom/Signals.hpp>
...
...
@@ -25,10 +23,12 @@
#include
<fwServices/macros.hpp>
#include
<io/IReader.hpp>
#include
<boost/filesystem/operations.hpp>
#include
<iostream>
#include
<fstream>
#include
<iostream>
fwServicesRegisterMacro
(
::
io
::
IReader
,
::
ioData
::
MeshReaderService
,
::
fwData
::
Mesh
);
...
...
@@ -37,7 +37,7 @@ namespace ioData
//-----------------------------------------------------------------------------
void
MeshReaderService
::
info
(
std
::
ostream
&
_sstream
)
void
MeshReaderService
::
info
(
std
::
ostream
&
_sstream
)
{
this
->
SuperClass
::
info
(
_sstream
);
_sstream
<<
std
::
endl
<<
"Trian file reader"
;
...
...
@@ -61,15 +61,22 @@ std::vector< std::string > MeshReaderService::getSupportedExtensions()
//------------------------------------------------------------------------------
void
MeshReaderService
::
configuring
()
throw
(
::
fwTools
::
Failed
)
{
::
io
::
IReader
::
configuring
();
}
//------------------------------------------------------------------------------
void
MeshReaderService
::
configureWithIHM
()
{
SLM_TRACE_FUNC
();
static
::
boost
::
filesystem
::
path
_sDefaultPath
;
::
fwGui
::
dialog
::
LocationDialog
dialogFile
;
dialogFile
.
setTitle
(
"Choose a trian file"
);
dialogFile
.
setTitle
(
m_windowTitle
.
empty
()
?
"Choose a trian file"
:
m_windowTitle
);
dialogFile
.
setDefaultLocation
(
::
fwData
::
location
::
Folder
::
New
(
_sDefaultPath
)
);
dialogFile
.
addFilter
(
"Trian file"
,
"*.trian"
);
dialogFile
.
addFilter
(
"Trian file"
,
"*.trian"
);
dialogFile
.
setOption
(
::
fwGui
::
dialog
::
ILocationDialog
::
READ
);
::
fwData
::
location
::
SingleFile
::
sptr
result
;
...
...
@@ -113,7 +120,7 @@ void MeshReaderService::updating() throw(::fwTools::Failed)
sig
->
asyncEmit
();
}
}
catch
(
const
std
::
exception
&
e
)
catch
(
const
std
::
exception
&
e
)
{
std
::
stringstream
ss
;
ss
<<
"Warning during loading : "
<<
e
.
what
();
...
...
Bundles/LeafIO/ioData/src/ioData/MeshWriterService.cpp
View file @
4edb5f16
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
6
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
#include
<boost/filesystem/operations.hpp>
#include
<fwServices/macros.hpp>
#include
"ioData/MeshWriterService.hpp"
#include
<fwData/Mesh.hpp>
#include
<fwData/location/Folder.hpp>
#include
<fwData/location/SingleFile.hpp>
#include
<fwData/Mesh.hpp>
#include
<fwDataIO/writer/MeshWriter.hpp>
#include
<fwGui/dialog/LocationDialog.hpp>
#include
<fwGui/dialog/MessageDialog.hpp>
#include
<fw
DataIO/writer/MeshWriter
.hpp>
#include
<fw
Services/macros
.hpp>
#include
"ioData/MeshWriterService
.hpp
"
#include
<boost/filesystem/operations
.hpp
>
fwServicesRegisterMacro
(
::
io
::
IWriter
,
::
ioData
::
MeshWriterService
,
::
fwData
::
Mesh
);
...
...
@@ -30,7 +30,7 @@ MeshWriterService::MeshWriterService()
//-----------------------------------------------------------------------------
void
MeshWriterService
::
info
(
std
::
ostream
&
_sstream
)
void
MeshWriterService
::
info
(
std
::
ostream
&
_sstream
)
{
this
->
SuperClass
::
info
(
_sstream
);
_sstream
<<
std
::
endl
<<
" Mesh writer"
;
...
...
@@ -60,15 +60,22 @@ MeshWriterService::~MeshWriterService() throw()
//------------------------------------------------------------------------------
void
MeshWriterService
::
configuring
()
throw
(
::
fwTools
::
Failed
)
{
::
io
::
IWriter
::
configuring
();
}
//------------------------------------------------------------------------------
void
MeshWriterService
::
configureWithIHM
()
{
SLM_TRACE_FUNC
();
static
::
boost
::
filesystem
::
path
_sDefaultPath
(
""
);
::
fwGui
::
dialog
::
LocationDialog
dialogFile
;
dialogFile
.
setTitle
(
"Choose a TrianMesh file"
);
dialogFile
.
setTitle
(
m_windowTitle
.
empty
()
?
"Choose a TrianMesh file"
:
m_windowTitle
);
dialogFile
.
setDefaultLocation
(
::
fwData
::
location
::
Folder
::
New
(
_sDefaultPath
)
);
dialogFile
.
addFilter
(
"TrianMesh"
,
"*.trian"
);
dialogFile
.
addFilter
(
"TrianMesh"
,
"*.trian"
);
dialogFile
.
setOption
(
::
fwGui
::
dialog
::
ILocationDialog
::
WRITE
);
::
fwData
::
location
::
SingleFile
::
sptr
result
;
...
...
@@ -104,7 +111,7 @@ void MeshWriterService::updating() throw(::fwTools::Failed)
{
writer
->
write
();
}
catch
(
const
std
::
exception
&
e
)
catch
(
const
std
::
exception
&
e
)
{
std
::
stringstream
ss
;
ss
<<
"Warning during writing Mesh : "
<<
e
.
what
();
...
...
Bundles/LeafIO/ioData/src/ioData/SAttachmentSeriesReader.cpp
View file @
4edb5f16
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
6
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
...
...
@@ -22,8 +22,8 @@
#include
<fwServices/macros.hpp>
#include
<fwTools/UUID.hpp>
#include
<fwTools/dateAndTime.hpp>
#include
<fwTools/UUID.hpp>
#include
<io/IReader.hpp>
...
...
@@ -35,6 +35,8 @@ fwServicesRegisterMacro( ::io::IReader, ::ioData::SAttachmentSeriesReader, ::fwM
namespace
ioData
{
//------------------------------------------------------------------------------
std
::
string
getMediaType
(
const
::
boost
::
filesystem
::
path
&
media
)
{
std
::
string
mediaType
;
...
...
@@ -61,6 +63,8 @@ std::string getMediaType(const ::boost::filesystem::path& media)
return
mediaType
;
}
//------------------------------------------------------------------------------
void
initSeries
(
::
fwMedData
::
Series
::
sptr
series
,
const
std
::
string
&
instanceUID
)
{
const
std
::
string
unknown
=
"unknown"
;
...
...
@@ -120,14 +124,21 @@ std::vector< std::string > SAttachmentSeriesReader::getSupportedExtensions()
//------------------------------------------------------------------------------
void
SAttachmentSeriesReader
::
configuring
()
throw
(
::
fwTools
::
Failed
)
{
::
io
::
IReader
::
configuring
();
}
//------------------------------------------------------------------------------
void
SAttachmentSeriesReader
::
configureWithIHM
()
{
static
::
boost
::
filesystem
::
path
_sDefaultPath
(
""
);
::
fwGui
::
dialog
::
LocationDialog
dialogFile
;
dialogFile
.
setTitle
(
"Choose a attachment file"
);
dialogFile
.
setTitle
(
m_windowTitle
.
empty
()
?
"Choose a attachment file"
:
m_windowTitle
);
dialogFile
.
setDefaultLocation
(
::
fwData
::
location
::
Folder
::
New
(
_sDefaultPath
)
);
dialogFile
.
addFilter
(
"Attachment file"
,
"*.*"
);
dialogFile
.
addFilter
(
"Attachment file"
,
"*.*"
);
dialogFile
.
setOption
(
::
fwGui
::
dialog
::
ILocationDialog
::
READ
);
::
fwData
::
location
::
SingleFile
::
sptr
result
;
...
...
Bundles/LeafIO/ioData/src/ioData/TransformationMatrix3DReaderService.cpp
View file @
4edb5f16
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
6
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
#include
<fstream>
#include
<iostream>
#include
<boost/filesystem/operations.hpp>
#include
<fwDataIO/reader/TransformationMatrix3DReader.hpp>
#include
<io/IReader.hpp>
#include
"ioData/TransformationMatrix3DReaderService.hpp"
#include
<fw
Services/macros
.hpp>
#include
<fw
Core/base
.hpp>
#include
<fwData/TransformationMatrix3D.hpp>
#include
<fwData/location/Folder.hpp>
#include
<fwData/location/SingleFile.hpp>
#include
<fwData/TransformationMatrix3D.hpp>
#include
<fwDataIO/reader/TransformationMatrix3DReader.hpp>
#include
<fwGui/dialog/LocationDialog.hpp>
#include
<fw
Core/base
.hpp>
#include
<fw
Services/macros
.hpp>
#include
<io/IReader.hpp>
#include
"ioData/TransformationMatrix3DReaderService.hpp"
#include
<boost/filesystem/operations.hpp>
#include
<fstream>
#include
<iostream>
namespace
ioData
{
...
...
@@ -41,7 +42,7 @@ fwServicesRegisterMacro( ::io::IReader, ::ioData::TransformationMatrix3DReaderSe
//-----------------------------------------------------------------------------
void
TransformationMatrix3DReaderService
::
info
(
std
::
ostream
&
_sstream
)
void
TransformationMatrix3DReaderService
::
info
(
std
::
ostream
&
_sstream
)
{
this
->
SuperClass
::
info
(
_sstream
);
_sstream
<<
std
::
endl
<<
" TransformationMatrix3D object reader"
;
...
...
@@ -65,15 +66,22 @@ void TransformationMatrix3DReaderService::starting( ) throw(::fwTools::Failed)
//-----------------------------------------------------------------------------
void
TransformationMatrix3DReaderService
::
configuring
()
throw
(
::
fwTools
::
Failed
)
{
::
io
::
IReader
::
configuring
();
}
//------------------------------------------------------------------------------
void
TransformationMatrix3DReaderService
::
configureWithIHM
()
{
SLM_TRACE_FUNC
();
static
::
boost
::
filesystem
::
path
_sDefaultPath
;
::
fwGui
::
dialog
::
LocationDialog
dialogFile
;
dialogFile
.
setTitle
(
"Choose a file to load a transformation matrix"
);
dialogFile
.
setTitle
(
m_windowTitle
.
empty
()
?
"Choose a file to load a transformation matrix"
:
m_windowTitle
);
dialogFile
.
setDefaultLocation
(
::
fwData
::
location
::
Folder
::
New
(
_sDefaultPath
)
);
dialogFile
.
addFilter
(
"TRF files"
,
"*.trf"
);
dialogFile
.
addFilter
(
"TRF files"
,
"*.trf"
);
dialogFile
.
setOption
(
::
fwGui
::
dialog
::
ILocationDialog
::
READ
);
::
fwData
::
location
::
SingleFile
::
sptr
result
;
...
...
Bundles/LeafIO/ioData/src/ioData/TransformationMatrix3DWriterService.cpp
View file @
4edb5f16
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
6
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
#include
"ioData/TransformationMatrix3DWriterService.hpp"
#include
<fwCom/Signal.hpp>
#include
<fwCom/Signal.hxx>
#include
<fwCore/base.hpp>