Commit 91f28dbd authored by Flavien BRIDAULT-LOUCHEZ's avatar Flavien BRIDAULT-LOUCHEZ
Browse files

merge(dev): release 11.0.8

parents 80b76b19 dda55aff
set( NAME imageConfig )
set( VERSION 0.1 )
set( TYPE BUNDLE )
set( DEPENDENCIES )
set( REQUIREMENTS
dataReg
servicesReg
gui
guiQt
ctrlSelection
uiImageQt
)
<extension implements="::fwServices::registry::AppConfig2">
<id>ImageManager</id>
<parameters>
<param name="WID_PARENT" />
<param name="GENERIC_UID" />
<param name="IMAGE_UID" /><!-- Image to manage -->
<param name="TF_IMAGE" /><!-- Composite containing the selected TransferFunction -->
<param name="TF_KEY" default="SelectedTF"/><!-- Key of the TransferFunction in the composite 'TF_IMAGE' -->
</parameters>
<config>
<object uid="${IMAGE_UID}" type="::fwData::Image" src="ref" />
<object uid="${TF_IMAGE}" type="::fwData::Composite" src="ref" />
<service uid="imageManagerView" type="::gui::view::SDefaultView">
<gui>
<layout type="::fwGui::LineLayoutManager">
<orientation value="vertical" />
<view proportion="0" />
<view proportion="0" />
<spacer />
</layout>
</gui>
<registry>
<parent wid="${WID_PARENT}" />
<view sid="windowLevelImage" start="yes" />
<view sid="sliderView" start="yes" />
</registry>
</service>
<service uid="sliderView" type="::gui::view::SDefaultView">
<gui>
<layout type="::fwGui::LineLayoutManager">
<orientation value="horizontal" />
<view proportion="1" />
</layout>
</gui>
<registry>
<view sid="selectorSliderNegatoImage" start="yes" />
</registry>
</service>
<!-- Service to add field used to properly display and manage image: Slice index, TransferFunction, ... -->
<service uid="medicalImageConverterImage" type="::ctrlSelection::MedicalImageSrv">
<inout key="image" uid="${IMAGE_UID}" />
</service>
<!-- Editor to manage slice index and image orientation (axial, frontal, sagittal) -->
<service uid="selectorSliderNegatoImage" type="::uiImage::SliceIndexPositionEditor" autoConnect="yes">
<inout key="image" uid="${IMAGE_UID}" />
<sliceIndex>axial</sliceIndex>
</service>
<!-- Editor to manage image windowing -->
<service uid="windowLevelImage" type="::uiImage::WindowLevel" autoConnect="yes">
<inout key="image" uid="${IMAGE_UID}" />
<inout key="TFSelections" uid="${TF_IMAGE}" />
<config selectedTFKey="${TF_KEY}" />
</service>
<start uid="imageManagerView" />
<start uid="medicalImageConverterImage" />
</config>
</extension>
<plugin id="imageConfig" version="@DASH_VERSION@" >
<xi:include href="configurations/ImageManager.xml" xmlns:xi="http://www.w3.org/2003/XInclude" />
</plugin>
......@@ -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);
......
......@@ -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);
......
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-2015.
* FW4SPL - Copyright (C) IRCAD, 2009-2017.
* 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 );
/// @}
};
......
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-2015.
* FW4SPL - Copyright (C) IRCAD, 2009-2017.
* 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 );
/// @}
};
......
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-2016.
* FW4SPL - Copyright (C) IRCAD, 2009-2017.
* 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 )
......
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-2015.
* FW4SPL - Copyright (C) IRCAD, 2009-2017.
* 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 );
/// @}
};
......
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-2015.
* FW4SPL - Copyright (C) IRCAD, 2009-2017.
* 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 );
/// @}
};
......
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-2016.
* FW4SPL - Copyright (C) IRCAD, 2009-2017.
* 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();
......
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-2016.
* FW4SPL - Copyright (C) IRCAD, 2009-2017.
* 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 <fwDataIO/writer/MeshWriter.hpp>
#include <fwServices/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();
......
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-2016.
* FW4SPL - Copyright (C) IRCAD, 2009-2017.
* 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