Commit 843e8111 authored by Genial-O's avatar Genial-O
Browse files

misc: merge release 20.3.0

parents 6404a108 e42ab1e9
GNU GENERAL PUBLIC LICENSE
Sight is: Copyright (C) 2009-2020 IRCAD France
Copyright (C) 2012-2020 IHU Strasbourg
Contact: sds.ircad@ircad.fr
You may use, distribute and copy Sight under the terms of
GNU Lesser General Public License version 3. That license references
the General Public License version 3, that is displayed below. Other
portions of Sight may be licensed directly under this license.
-------------------------------------------------------------------------
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
......
GNU LESSER GENERAL PUBLIC LICENSE
Sight is: Copyright (C) 2009-2020 IRCAD France
Copyright (C) 2012-2020 IHU Strasbourg
Contact: sds.ircad@ircad.fr
You may use, distribute and copy Sight under the terms of
GNU Lesser General Public License version 3, which is displayed below.
This license makes reference to the version 3 of the GNU General
Public License, which you can find in the COPYING file.
-------------------------------------------------------------------------
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
......
......@@ -8,13 +8,13 @@ set( REQUIREMENTS
preferences # Start the module, load file location or window preferences
visuOgre # Start the module, allow to use fwRenderOgre
material # Start the module, load Ogre's materials
guiQt # Start the module, allow dark theme
patchMedicalData # Patch old atoms data
visuOgreQt # Enable Ogre to render things in Qt window.
# Objects declaration
dataReg
fwData
fwMedData
servicesReg # fwServices
......
......@@ -14,6 +14,7 @@
<param name="BOX_WIDGET_RESET_RECEIVER_CHANNEL" />
<param name="SHAPE_EXTRUDER_ENABLE_TOOL_RECEIVER_CHANNEL" />
<param name="SHAPE_EXTRUDER_TOOL_DISABLED_SENDER_CHANNEL" />
<param name="SHAPE_EXTRUDER_REVERT_RECEIVER_CHANNEL" />
<param name="AXIS_VISIBILITY_RECEIVER_CHANNEL" />
<param name="PICKER_SENDER_CHANNEL" />
<param name="modelSeries" />
......@@ -40,6 +41,8 @@
<value>#2E3034</value>
</object>
<object uid="snapshot" type="::fwData::Image" />
<!-- Camera matrix -->
<object uid="globalCamera" type="::fwData::TransformationMatrix3D" />
<!-- ******************************* UI declaration *********************************** -->
......@@ -153,6 +156,14 @@
</registry>
</service>
<service uid="notifierSrv" type="::guiQt::SNotifier" >
<parent uid="mainview"/>
<message>Default message</message>
<maxNotifications>3</maxNotifications>
<position>BOTTOM_LEFT</position>
<duration>3000</duration>
</service>
<!-- ******************************* Begin Generic Scene ******************************* -->
<service uid="genericSceneSrv" type="::fwRenderOgre::SRender" >
......@@ -160,6 +171,7 @@
<background topColor="#36393E" bottomColor="#36393E" />
<layer id="defaultLayer" order="1" transparency="DepthPeeling" numPeels="4" />
<adaptor uid="globalCameraAdp" />
<adaptor uid="trackballInteractorAdp" />
<adaptor uid="pickerInteractorAdp" />
<adaptor uid="modeSeriesAdp" />
......@@ -224,15 +236,27 @@
<adaptor uid="frontalNegatoResizeViewportAdp" />
<adaptor uid="frontalPickerInteractorAdp" />
<adaptor uid="frontalLandmarksAdp" />
<layer id="orientationMarkerLayer" order="8" >
<viewport hOffset="0" vOffset="0" width="0.2" height="0.2" hAlign="right" vAlign="bottom"/>
</layer>
<adaptor uid="orientationMarkerAdp" />
</scene>
</service>
<!-- Camera for the 3D layer -->
<service uid="globalCameraAdp" type="::visuOgreAdaptor::SCamera" >
<inout key="transform" uid="globalCamera" />
<config layer="defaultLayer" />
</service>
<service uid="trackballInteractorAdp" type="::visuOgreAdaptor::STrackballCamera">
<config layer="defaultLayer" priority="0" />
</service>
<service uid="pickerInteractorAdp" type="::visuOgreAdaptor::SPicker">
<config layer="defaultLayer" queryMask="0x40000000" />
<config layer="defaultLayer" queryMask="0x40000000" priority="1" />
</service>
<service uid="modeSeriesAdp" type="::visuOgreAdaptor::SModelSeries" autoConnect="yes" >
......@@ -255,17 +279,17 @@
<service uid="3DNegatoAdp" type="::visuOgreAdaptor::SNegato3D" >
<inout key="image" uid="${image}" autoConnect="yes" />
<inout key="tf" uid="${volumeTF}" />
<config layer="defaultLayer" queryFlags="0x40000000" interactive="true" />
<config layer="defaultLayer" queryFlags="0x40000000" interactive="true" priority="2" />
</service>
<service uid="landmarksAdp" type="::visuOgreAdaptor::SLandmarks" autoConnect="yes" >
<in key="landmarks" uid="${landmarks}" />
<config layer="defaultLayer" />
<inout key="landmarks" uid="${landmarks}" />
<config layer="defaultLayer" priority="4" />
</service>
<service uid="multiDistancesAdp" type="::visuOgreAdaptor::SImageMultiDistances" autoConnect="yes" >
<inout key="image" uid="${image}" />
<config layer="defaultLayer" fontSize="32" radius="4.5" queryFlags="0x40000000" />
<config layer="defaultLayer" fontSize="32" radius="4.5" queryFlags="0x40000000" priority="3" />
</service>
<service uid="axisAdp" type="::visuOgreAdaptor::SAxis" >
......@@ -291,8 +315,12 @@
<config layer="defaultLayer" flip="true" />
</service>
<!-- Axial -->
<service uid="orientationMarkerAdp" type="::visuOgreAdaptor::SOrientationMarker" autoConnect="yes">
<in key="matrix" uid="globalCamera" />
<config layer="orientationMarkerLayer" />
</service>
<!-- Axial -->
<service uid="axialBackgroundAdp" type="::visuOgreAdaptor::SVideo" autoConnect="yes" >
<in key="image" uid="background" />
<config layer="axialBackgroundNegatoLayer" />
......@@ -333,9 +361,9 @@
</service>
<service uid="axialLandmarksAdp" type="::visuOgreAdaptor::SLandmarks" autoConnect="yes" >
<in key="landmarks" uid="${landmarks}" />
<inout key="landmarks" uid="${landmarks}" />
<in key="image" uid="${image}" />
<config layer="axialNegatoLayer" label="false" orientation="axial" />
<config layer="axialNegatoLayer" label="false" orientation="axial" priority="4" />
</service>
<!-- Sagittal -->
......@@ -380,9 +408,9 @@
</service>
<service uid="sagittalLandmarksAdp" type="::visuOgreAdaptor::SLandmarks" autoConnect="yes" >
<in key="landmarks" uid="${landmarks}" />
<inout key="landmarks" uid="${landmarks}" />
<in key="image" uid="${image}" />
<config layer="sagittalNegatoLayer" label="false" orientation="sagittal" />
<config layer="sagittalNegatoLayer" label="false" orientation="sagittal" priority="4" />
</service>
<!-- Frontal -->
......@@ -427,9 +455,9 @@
</service>
<service uid="frontalLandmarksAdp" type="::visuOgreAdaptor::SLandmarks" autoConnect="yes" >
<in key="landmarks" uid="${landmarks}" />
<inout key="landmarks" uid="${landmarks}" />
<in key="image" uid="${image}" />
<config layer="frontalNegatoLayer" label="false" orientation="frontal" />
<config layer="frontalNegatoLayer" label="false" orientation="frontal" priority="4" />
</service>
<!-- ************************************* Services ************************************ -->
......@@ -567,6 +595,10 @@
<signal>shapeExtruderAdp/toolDisabled</signal>
</connect>
<connect channel="${SHAPE_EXTRUDER_REVERT_RECEIVER_CHANNEL}" >
<slot>shapeExtruderAdp/deleteLastMesh</slot>
</connect>
<connect channel="${AXIS_VISIBILITY_RECEIVER_CHANNEL}" >
<slot>axisAdp/updateVisibility</slot>
</connect>
......@@ -608,6 +640,16 @@
<slot>pickedVoxelTextAdp/setText</slot>
</connect>
<connect>
<signal>shapeExtruderAdp/infoNotified</signal>
<slot>notifierSrv/popInfo</slot>
</connect>
<connect>
<signal>shapeExtruderAdp/failureNotified</signal>
<slot>notifierSrv/popFailure</slot>
</connect>
<!-- ******************************* Start/Stop services ***************************************** -->
<start uid="mainView" />
......@@ -615,7 +657,9 @@
<start uid="backgroundReaderSrv" />
<start uid="imageWriterSrv" />
<start uid="imageExtruderSrv" />
<start uid="notifierSrv" />
<start uid="globalCameraAdp" />
<start uid="trackballInteractorAdp" />
<start uid="pickerInteractorAdp" />
<start uid="modeSeriesAdp" />
......@@ -629,6 +673,8 @@
<start uid="shapeExtruderAdp" />
<start uid="resizeViewportAdp" />
<start uid="snapshotAdp" />
<start uid="orientationMarkerAdp" />
<start uid="axialBackgroundAdp" />
<start uid="axialBackgroundResizeViewportAdp" />
<start uid="axialCompositorAdp" />
......
......@@ -375,14 +375,28 @@
<mode>copyOnUpdate</mode>
</service>
<service uid="negatoStoperSrv" type="::gui::action::SStarter" >
<service uid="resetLocalSrv" type="::ctrlCamp::SCopy" >
<in key="source" uid="previewImageReset" />
<inout key="target" uid="localImage" />
<mode>copyOnUpdate</mode>
</service>
<service uid="previewNegatoStopperSrv" type="::gui::action::SStarter" >
<stop uid="pNegatoAdp" />
</service>
<service uid="negatoStarterSrv" type="::gui::action::SStarter" >
<service uid="previewNegatoStarterSrv" type="::gui::action::SStarter" >
<start uid="pNegatoAdp" />
</service>
<service uid="localNegatoStopperSrv" type="::gui::action::SStarter" >
<stop uid="lNegatoAdp" />
</service>
<service uid="localNegatoStarterSrv" type="::gui::action::SStarter" >
<start uid="lNegatoAdp" />
</service>
<service uid="medicalImageSrv" type="::ctrlSelection::MedicalImageSrv" autoConnect="yes" >
<inout key="image" uid="localImage" />
</service>
......@@ -421,10 +435,10 @@
<service uid="previewSelectorSrv" type="::uiMedDataQt::editor::SSelector" autoConnect="yes" >
<inout key="seriesDB" uid="${previewSeriesDB}" />
<inout key="selection" uid="previewSelections" />
<selectionMode>extended</selectionMode>
<icons>
<icon series="::fwMedData::DicomSeries" icon="flatIcon-0.1/icons/GreenMedicine.svg" />
</icons>
<config selectionMode="extended" allowedRemove="false" />
</service>
<service uid="extractPreviewSrv" type="::ctrlCamp::SCopy" >
......@@ -452,10 +466,12 @@
<service uid="localSelectorSrv" type="::uiMedDataQt::editor::SSelector" autoConnect="yes" >
<inout key="seriesDB" uid="${localSeriesDB}" />
<inout key="selection" uid="localSelections" />
<selectionMode>extended</selectionMode>
<icons>
<icon series="::fwMedData::ImageSeries" icon="flatIcon-0.1/icons/Volume.svg" />
</icons>
<config selectionMode="extended"
removeStudyIcon="flatIcon-0.1/icons/RedCross.svg"
removeSerieIcon="flatIcon-0.1/icons/RemoveMedecine.svg" />
</service>
<service uid="extractLocalSrv" type="::ctrlCamp::SCopy" >
......@@ -505,29 +521,42 @@
<connect>
<signal>previewSelections/addedObjects</signal>
<slot>negatoStoperSrv/update</slot>
<signal>previewSelections/removedObjects</signal>
<slot>previewNegatoStopperSrv/update</slot>
<slot>hideAdvancedQueryEditorSrv/update</slot>
<slot>hidePACSConfigurationSrv/update</slot>
</connect>
<connect>
<signal>negatoStoperSrv/updated</signal>
<signal>previewNegatoStopperSrv/updated</signal>
<slot>resetPreviewSrv/update</slot>
</connect>
<connect>
<signal>resetPreviewSrv/updated</signal>
<slot>negatoStarterSrv/update</slot>
<slot>previewNegatoStarterSrv/update</slot>
<slot>extractPreviewSrv/update</slot>
</connect>
<connect>
<signal>localSelections/addedObjects</signal>
<slot>extractLocalSrv/update</slot>
<signal>localSelections/removedObjects</signal>
<slot>localNegatoStopperSrv/update</slot>
<slot>hideAdvancedQueryEditorSrv/update</slot>
<slot>hidePACSConfigurationSrv/update</slot>
</connect>
<connect>
<signal>localNegatoStopperSrv/updated</signal>
<slot>resetLocalSrv/update</slot>
</connect>
<connect>
<signal>resetLocalSrv/updated</signal>
<slot>localNegatoStarterSrv/update</slot>
<slot>extractLocalSrv/update</slot>
</connect>
<connect>
<signal>extractLocalSrv/updated</signal>
<slot>exportImageAct/setExecutable</slot>
......@@ -612,8 +641,11 @@
<start uid="leftNotifierSrv" />
<start uid="rightNotifierSrv" />
<start uid="resetPreviewSrv" />
<start uid="negatoStoperSrv" />
<start uid="negatoStarterSrv" />
<start uid="resetLocalSrv" />
<start uid="previewNegatoStopperSrv" />
<start uid="previewNegatoStarterSrv" />
<start uid="localNegatoStopperSrv" />
<start uid="localNegatoStarterSrv" />
<start uid="medicalImageSrv" />
<start uid="extractPreviewSrv" />
<start uid="extractLocalSrv" />
......
......@@ -4,7 +4,6 @@
<requirement id="preferences" />
<requirement id="visuOgre" />
<requirement id="material" />
<requirement id="guiQt" />
<requirement id="servicesReg" />
<requirement id="scene2D" />
......@@ -248,6 +247,7 @@
<menuItem name="Show/hide cropping box" icon="flatIcon-0.1/icons/CroppingBox.svg" style="check" />
<menuItem name="Reset cropping box" icon="flatIcon-0.1/icons/ResetCroppingBox.svg" />
<menuItem name="Shape extruder" icon="flatIcon-0.1/icons/Extrude.svg" style="check" />
<menuItem name="Revert shape extruder" icon="flatIcon-0.1/icons/ExtrudeRevert.svg" />
<separator/>
<menuItem name="Add distance" icon="flatIcon-0.1/icons/AddDistance.svg" />
<menuItem name="Remove distance" icon="flatIcon-0.1/icons/RemoveDistance.svg" />
......@@ -268,6 +268,7 @@
<menuItem sid="boxWidgetVisibilityAct" start="yes" />
<menuItem sid="boxWidgetResetAct" start="yes" />
<menuItem sid="shapeExtruderAct" start="yes" />
<menuItem sid="shapeExtruderRevertAct" start="yes" />
<menuItem sid="addDistanceAct" start="yes" />
<menuItem sid="removeDistanceAct" start="yes" />
<menuItem sid="hideDistanceAct" start="yes" />
......@@ -413,6 +414,10 @@
<state executable="true" />
</service>
<service uid="shapeExtruderRevertAct" type="::gui::action::SSignal" >
<state executable="true" />
</service>
<service uid="axisVisibilityAct" type="::gui::action::SSignal" />
<!-- Manage distance -->
......@@ -426,7 +431,7 @@
<state executable="false" />
</service>
<service uid="hideDistanceAct" type="::uiMeasurement::action::ShowDistance" autoConnect="yes" >
<service uid="hideDistanceAct" type="::uiMeasurement::action::SShowDistance" autoConnect="yes" >
<inout key="image" uid="image" />
<state executable="false" />
</service>
......@@ -448,6 +453,7 @@
<parameter replace="BOX_WIDGET_RESET_RECEIVER_CHANNEL" by="BOX_WIDGET_RESET_SENDER_CHANNEL" />
<parameter replace="SHAPE_EXTRUDER_ENABLE_TOOL_RECEIVER_CHANNEL" by="SHAPE_EXTRUDER_ENABLE_TOOL_SENDER_CHANNEL" />
<parameter replace="SHAPE_EXTRUDER_TOOL_DISABLED_SENDER_CHANNEL" by="SHAPE_EXTRUDER_TOOL_DISABLED_RECEIVER_CHANNEL" />
<parameter replace="SHAPE_EXTRUDER_REVERT_RECEIVER_CHANNEL" by="SHAPE_EXTRUDER_REVERT_SENDER_CHANNEL" />
<parameter replace="AXIS_VISIBILITY_RECEIVER_CHANNEL" by="AXIS_VISIBILITY_SENDER_CHANNEL" />
<parameter replace="PICKER_SENDER_CHANNEL" by="PICKER_RECEIVER_CHANNEL" />
<inout key="modelSeries" uid="modelSeries" />
......@@ -509,11 +515,10 @@
<param type="int" name="AO shell radius" key="satShellRadius" defaultValue="4" min="1" max="10" reset="false" depends="ambientOcclusion" />
<param type="double" name="Color bleeding factor" key="colorBleedingFactor" defaultValue="1.0" min="0.1" max="10.0" reset="false" depends="colorBleeding" />
</parameters>
<config sendAtStart="false" />
</service>
<!-- Parameters for landmarks -->
<service uid="landmarksParameterSrv" type="::uiMeasurementQt::editor::SLandmarks" >
<service uid="landmarksParameterSrv" type="::uiMeasurementQt::editor::SLandmarks" autoConnect="yes" >
<inout key="landmarks" uid="landmarks" />
<advanced>yes</advanced>
</service>
......@@ -565,6 +570,10 @@
<slot>shapeExtruderAct/deactivate</slot>
</connect>
<connect channel="SHAPE_EXTRUDER_REVERT_SENDER_CHANNEL" >
<signal>shapeExtruderRevertAct/triggered</signal>
</connect>
<connect channel="AXIS_VISIBILITY_SENDER_CHANNEL" >
<signal>axisVisibilityAct/triggered</signal>
</connect>
......@@ -574,6 +583,12 @@
<slot>negato3DVisibilityAct/setIsActive</slot>
</connect>
<connect>
<signal>seriesDB/modified</signal>
<slot>extractImageSrv/update</slot>
<slot>extractMeshSrv/update</slot>
</connect>
<connect>
<signal>seriesDB/addedSeries</signal>
<slot>extractImageSrv/update</slot>
......
......@@ -44,6 +44,7 @@ set( REQUIREMENTS
style
patchMedicalData
arPatchMedicalData
filterUnknownSeries
......
......@@ -2,6 +2,7 @@
<requirement id="servicesReg" />
<requirement id="patchMedicalData" />
<requirement id="arPatchMedicalData" />
<requirement id="filterUnknownSeries" />
<requirement id="activities" />
<requirement id="preferences" />
......
/************************************************************************
*
* Copyright (C) 2014-2020 IRCAD France
* Copyright (C) 2014-2020 IHU Strasbourg
* Copyright (C) 2009-2020 IRCAD France
* Copyright (C) 2012-2020 IHU Strasbourg
*
* This file is part of Sight.
*
......@@ -22,55 +22,53 @@
#pragma once
#include "fwRenderOgre/config.hpp"
#include <fwRenderOgre/interactor/IMovementInteractor.hpp>
#include "fwAtomConversion/AtomVisitor.hpp"
#include "fwAtomConversion/config.hpp"
#include "fwAtomConversion/mapper/Base.hpp"
namespace fwRenderOgre
namespace fwAtoms
{
class Object;
}
namespace fwData
{
class Object;
}
namespace interactor
namespace fwAtomConversion
{
namespace mapper
{
/**
* @brief Fixed camera implementation. The mouse movements callbacks do nothing
* @brief Specific mapper used to convert a ::fwData::Mesh
*
* @deprecated will be removed in sight 21.0.
* The attribute ::fwData::Mesh::m_attributes ( of type ::fwData::Mesh::Attributes ) is
* represented in fwAtoms as a UINT Numeric value.
*/
class FWRENDEROGRE_CLASS_API FixedStyleInteractor : public ::fwRenderOgre::interactor::IMovementInteractor
class FWATOMCONVERSION_CLASS_API Mesh : public Base
{
public:
/// Constructor
[[deprecated("will be removed in sight 21.0")]]
FWRENDEROGRE_API FixedStyleInteractor();
/// Behaviour on mouseMoveEvent
FWRENDEROGRE_API virtual void mouseMoveEvent(MouseButton, int, int, int, int) override;
/// Behaviour on a wheelEvent
FWRENDEROGRE_API virtual void wheelEvent(int, int, int) override;
/// Behaviour on button release.
FWRENDEROGRE_API virtual void buttonReleaseEvent(MouseButton, int, int) override;
/// Behaviour on button press.
FWRENDEROGRE_API virtual void buttonPressEvent(MouseButton, int, int) override;
/// Called when the window is resized
FWRENDEROGRE_API virtual void resizeEvent(int, int) override;
/// Called when a key is press
FWRENDEROGRE_API virtual void keyPressEvent(int) override;
/// Called when a key is release
FWRENDEROGRE_API virtual void keyReleaseEvent(int) override;
/// Called when the focus is win
FWRENDEROGRE_API virtual void focusInEvent() override;
/// Called when the focus is lost
FWRENDEROGRE_API virtual void focusOutEvent() override;
/**
* @brief Convert a ::fwData::Object to a ::fwAtoms::Object.
* @param object data to convert. It must be a ::fwData::Mesh.
* @param cache cache to register the data already converted, used when a data is referenced multiple times.
*/
FWATOMCONVERSION_API virtual SPTR(::fwAtoms::Object) convert( SPTR(::fwData::Object) object,
DataVisitor::AtomCacheType& cache );
/**
* @brief Convert a ::fwAtoms::Object to a ::fwData::Object (which represent a ::fwData::Mesh).
* @param atom atom to convert
* @param cache cache to register the atoms already converted, used when an atom is referenced multiple times.
* @param uuidPolicy AtomVisitor policy
*/
FWATOMCONVERSION_API virtual SPTR(::fwData::Object) convert( SPTR(::fwAtoms::Object) atom,
AtomVisitor::DataCacheType& cache,
const AtomVisitor::IReadPolicy& uuidPolicy
);
};
......
/************************************************************************
*
* Copyright (C) 2014-2020 IRCAD France
* Copyright (C) 2014-2020 IHU Strasbourg
* Copyright (C) 2009-2020 IRCAD France
* Copyright (C) 2012-2020 IHU Strasbourg
*
* This file is part of Sight.
*
......@@ -20,63 +20,71 @@
*
***********************************************************************/
#include "fwRenderOgre/interactor/IPickerInteractor.hpp"
#include "fwAtomConversion/mapper/Mesh.hpp"
#include <fwRenderOgre/Utils.hpp>
#include "fwAtomConversion/convert.hpp"
#include "fwAtomConversion/exception/ConversionNotManaged.hpp"
#include "fwAtomConversion/mapper/registry/macros.hpp"
#include <fwCom/Signal.hxx>
#include <fwAtoms/Numeric.hpp>
#include <fwAtoms/Numeric.hxx>
namespace fwRenderOgre
{
#include <fwData/Mesh.hpp>
#include <fwTools/UUID.hpp>
namespace interactor
namespace fwAtomConversion
{
namespace mapper
{
const ::fwCom::Signals::SignalKeyType fwRenderOgre::interactor::IPickerInteractor::s_PICKED_SIG = "picked";
//-----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
fwAtomConversionRegisterMacro( ::fwAtomConversion::mapper::Mesh, ::fwData::Mesh);
IPickerInteractor::IPickerInteractor()
//-----------------------------------------------------------------------------
::fwAtoms::Object::sptr Mesh::convert( ::fwData::Object::sptr object,
DataVisitor::AtomCacheType& cache )
{
m_ogreRoot = ::fwRenderOgre::Utils::getOgreRoot();
m_picker = new ::fwRenderOgre::picker::IPicker();
const camp::Class& metaclass = ::camp::classByName( object->getClassname() );