Verified Commit 4b5a24d9 authored by Flavien BRIDAULT-LOUCHEZ's avatar Flavien BRIDAULT-LOUCHEZ
Browse files

refactor(build): pass Tuto05Mesher and fix many stuff

parent d1211622
Pipeline #155210 failed with stages
......@@ -32,7 +32,7 @@ set( REQUIREMENTS
scene2D
ctrlCamp
ctrlTF
opImageFilter
module_filter_image
ioPacs
uiMedDataQt
ctrlSelection
......
......@@ -478,7 +478,7 @@
<addSelection service="::sight::modules::io::atoms::SWriter" />
</service>
<service uid="imageExtruderSrv" type="::opImageFilter::SImageExtruder" autoConnect="yes" worker="EXTRUSION_THREAD" >
<service uid="imageExtruderSrv" type="::sight::modules::filter::image::SImageExtruder" autoConnect="yes" worker="EXTRUSION_THREAD" >
<in key="meshes" uid="${extrudedModelSeries}" />
<in key="image" uid="${image}" />
<inout key="extrudedImage" uid="extrudedImage" />
......
......@@ -35,9 +35,9 @@ set( REQUIREMENTS
2DVisualizationActivity
# Services
opImageFilter
module_filter_image
ctrlCamp
opVTKMesh
module_filter_mesh
uiMedDataQt
ctrlSelection
......
......@@ -52,7 +52,7 @@
<!-- ************************************* Action ************************************ -->
<service uid="thresholdAct" type="::opImageFilter::SThreshold" >
<service uid="thresholdAct" type="::sight::modules::filter::image::SThreshold" >
<in key="source" uid="${imageSeries}" />
<out key="target" uid="imageSeriesMask" />
<config>
......
......@@ -98,7 +98,7 @@
<!-- ************************************* Action ************************************ -->
<service uid="mesherAct" type="::opVTKMesh::SVTKMesher" >
<service uid="mesherAct" type="::sight::modules::filter::mesh::SVTKMesher" >
<in key="imageSeries" uid="${imageSeries}" />
<out key="modelSeries" uid="modelSeries" />
<config>
......
......@@ -50,7 +50,7 @@ namespace sight::services
// - readerService will be automatically started and updated
// - mesherService will be automatically started but not updated
auto readerService = m_appMgr->addService("::modules::ui::base::editor::SIOSelector", true, true);
auto mesherService = m_appMgr->addService("::opVTKMesh::SVTKMesher", true, false);
auto mesherService = m_appMgr->addService("::modules::filter::mesh::SVTKMesher", true, false);
// configure the services ...
......@@ -104,7 +104,7 @@ namespace sight::services
if (this->checkInputs())
{
auto mesher = this->addService("::opVTKMesh::SVTKMesher", true, true);
auto mesher = this->addService("::modules::filter::mesh::SVTKMesher", true, true);
mesher->setObjectId("imageSeries", this->getInputID(s_IMAGE_ID));
mesher->setObjectId("modelSeries", this->getInputID(s_MODEL_ID));
......
......@@ -44,7 +44,7 @@ namespace layoutManager
{
//-----------------------------------------------------------------------------
const IFrameLayoutManager::RegistryKeyType IFrameLayoutManager::REGISTRY_KEY = "::ui::base::FrameLayoutManager";
const IFrameLayoutManager::RegistryKeyType IFrameLayoutManager::REGISTRY_KEY = "::sight::ui::base::FrameLayoutManager";
const std::string IFrameLayoutManager::SOFTWARE_UI = "SOFTWARE_UI";
const std::string IFrameLayoutManager::FRAME_STATE_UI = "FRAME_STATE_UI";
......
......@@ -33,7 +33,7 @@ namespace sight::ui::base
namespace layoutManager
{
const IMenuBarLayoutManager::RegistryKeyType IMenuBarLayoutManager::REGISTRY_KEY = "::ui::base::MenuBarLayoutManager";
const IMenuBarLayoutManager::RegistryKeyType IMenuBarLayoutManager::REGISTRY_KEY = "::sight::ui::base::MenuBarLayoutManager";
//-----------------------------------------------------------------------------
......
......@@ -29,7 +29,7 @@ namespace sight::ui::base
namespace layoutManager
{
const IMenuLayoutManager::RegistryKeyType IMenuLayoutManager::REGISTRY_KEY = "::ui::base::MenuLayoutManager";
const IMenuLayoutManager::RegistryKeyType IMenuLayoutManager::REGISTRY_KEY = "::sight::ui::base::MenuLayoutManager";
//-----------------------------------------------------------------------------
......
......@@ -31,7 +31,7 @@ namespace sight::ui::base
namespace layoutManager
{
const IToolBarLayoutManager::RegistryKeyType IToolBarLayoutManager::REGISTRY_KEY = "::ui::base::ToolBarLayoutManager";
const IToolBarLayoutManager::RegistryKeyType IToolBarLayoutManager::REGISTRY_KEY = "::sight::ui::base::ToolBarLayoutManager";
//-----------------------------------------------------------------------------
......
......@@ -37,7 +37,7 @@ namespace layoutManager
{
//-----------------------------------------------------------------------------
const LineLayoutManagerBase::RegistryKeyType LineLayoutManagerBase::REGISTRY_KEY = "::ui::base::LineLayoutManager";
const LineLayoutManagerBase::RegistryKeyType LineLayoutManagerBase::REGISTRY_KEY = "::sight::ui::base::LineLayoutManager";
//-----------------------------------------------------------------------------
......
......@@ -31,7 +31,7 @@ namespace layoutManager
{
//-----------------------------------------------------------------------------
const TabLayoutManagerBase::RegistryKeyType TabLayoutManagerBase::REGISTRY_KEY = "::ui::base::TabLayoutManager";
const TabLayoutManagerBase::RegistryKeyType TabLayoutManagerBase::REGISTRY_KEY = "::sight::ui::base::TabLayoutManager";
//-----------------------------------------------------------------------------
......
......@@ -38,7 +38,7 @@ namespace layoutManager
//-----------------------------------------------------------------------------
const ToolboxLayoutManagerBase::RegistryKeyType ToolboxLayoutManagerBase::REGISTRY_KEY =
"::ui::base::ToolboxLayoutManager";
"::sight::ui::base::ToolboxLayoutManager";
//-----------------------------------------------------------------------------
......
......@@ -260,4 +260,4 @@ void CardinalLayoutManager::destroyLayout()
//-----------------------------------------------------------------------------
} // namespace sight::ui::base
} // namespace sight::ui::qt
......@@ -23,9 +23,9 @@
#pragma once
/**
* @brief The namespace opImageFilter contains several operators on image.
* @brief The namespace sight::modules::filter::image contains several operators on image.
*/
namespace opImageFilter
namespace sight::modules::filter::image
{
}
......@@ -20,16 +20,16 @@
*
***********************************************************************/
#include "opVTKMesh/Plugin.hpp"
#include "modules/filter/image/Plugin.hpp"
#include <core/runtime/utils/GenericExecutableFactoryRegistrar.hpp>
namespace opVTKMesh
namespace sight::modules::filter::image
{
//-----------------------------------------------------------------------------
static core::runtime::utils::GenericExecutableFactoryRegistrar<Plugin> registrar("::opVTKMesh::Plugin");
static core::runtime::utils::GenericExecutableFactoryRegistrar<Plugin> registrar("::modules::filter::image::Plugin");
//-----------------------------------------------------------------------------
......@@ -51,4 +51,4 @@ void Plugin::stop() noexcept
//-----------------------------------------------------------------------------
} // namespace opVTKMesh
} // namespace sight::modules::filter::image
......@@ -24,7 +24,7 @@
#include <core/runtime/Plugin.hpp>
namespace opImageFilter
namespace sight::modules::filter::image
{
/**
......@@ -46,4 +46,4 @@ struct Plugin : public core::runtime::Plugin
};
} // namespace opImageFilter
} // namespace sight::modules::filter::image
set( NAME opImageFilter )
set( NAME module_filter_image )
set( VERSION 0.1 )
set( TYPE MODULE )
set( DEPENDENCIES
......
......@@ -20,7 +20,7 @@
*
***********************************************************************/
#include "opImageFilter/SFlip.hpp"
#include "modules/filter/image/SFlip.hpp"
#include <core/com/Signal.hxx>
#include <core/com/Slots.hxx>
......@@ -30,7 +30,7 @@
#include <imageFilterOp/Flipper.hpp>
namespace opImageFilter
namespace sight::modules::filter::image
{
static const services::IService::KeyType s_IMAGE_IN = "source";
......@@ -138,4 +138,4 @@ services::IService::KeyConnectionsMap SFlip::getAutoConnections() const
return connections;
}
} // namespace opImageFilter
} // namespace sight::modules::filter::image
......@@ -22,14 +22,14 @@
#pragma once
#include "opImageFilter/config.hpp"
#include "modules/filter/image/config.hpp"
#include <core/com/Signal.hpp>
#include <core/com/Slots.hpp>
#include <services/IOperator.hpp>
namespace opImageFilter
namespace sight::modules::filter::image
{
/**
......@@ -43,7 +43,7 @@ namespace opImageFilter
* @section XML XML Configuration
*
* @code{.xml}
<service type="::opImageFilter::SFlip">
<service type="::modules::filter::image::SFlip">
<in key="source" uid="..." autoConnect="yes" />
<out key="target" uid="..." />
</service>
......@@ -53,35 +53,35 @@ namespace opImageFilter
* @subsection Output Output:
* - \b target [data::Image]: New flipped image.
*/
class OPIMAGEFILTER_CLASS_API SFlip : public services::IOperator
class MODULE_FILTER_IMAGE_CLASS_API SFlip : public services::IOperator
{
public:
fwCoreServiceMacro(SFlip, services::IOperator)
OPIMAGEFILTER_API static const core::com::Slots::SlotKeyType s_FLIP_AXISX_SLOT;
OPIMAGEFILTER_API static const core::com::Slots::SlotKeyType s_FLIP_AXISY_SLOT;
OPIMAGEFILTER_API static const core::com::Slots::SlotKeyType s_FLIP_AXISZ_SLOT;
MODULE_FILTER_IMAGE_API static const core::com::Slots::SlotKeyType s_FLIP_AXISX_SLOT;
MODULE_FILTER_IMAGE_API static const core::com::Slots::SlotKeyType s_FLIP_AXISY_SLOT;
MODULE_FILTER_IMAGE_API static const core::com::Slots::SlotKeyType s_FLIP_AXISZ_SLOT;
/// Constructor, does nothing.
OPIMAGEFILTER_API SFlip();
MODULE_FILTER_IMAGE_API SFlip();
/// Destructor, does nothing.
OPIMAGEFILTER_API ~SFlip();
MODULE_FILTER_IMAGE_API ~SFlip();
protected:
/// Configures the service.
OPIMAGEFILTER_API virtual void configuring() override;
MODULE_FILTER_IMAGE_API virtual void configuring() override;
/// Does nothing.
OPIMAGEFILTER_API virtual void starting() override;
MODULE_FILTER_IMAGE_API virtual void starting() override;
/// Does nothing.
OPIMAGEFILTER_API virtual void stopping() override;
MODULE_FILTER_IMAGE_API virtual void stopping() override;
/// Apply the flip operator.
OPIMAGEFILTER_API virtual void updating() override;
MODULE_FILTER_IMAGE_API virtual void updating() override;
/**
* @brief Signal-slot auto-connection proposals
......@@ -89,7 +89,7 @@ protected:
* Connect Image::s_MODIFIED_SIG to this::s_UPDATE_SLOT
* Connect Image::s_BUFFER_MODIFIED_SIG to this::s_UPDATE_SLOT
*/
OPIMAGEFILTER_API virtual KeyConnectionsMap getAutoConnections() const override;
MODULE_FILTER_IMAGE_API virtual KeyConnectionsMap getAutoConnections() const override;
private:
......@@ -104,4 +104,4 @@ private:
std::array<bool, 3> m_flipAxes {{false, false, false}};
};
} // namespace opImageFilter
} // namespace sight::modules::filter::image
......@@ -20,7 +20,7 @@
*
***********************************************************************/
#include "opImageFilter/SImageExtruder.hpp"
#include "modules/filter/image/SImageExtruder.hpp"
#include <core/com/Slots.hxx>
......@@ -30,7 +30,7 @@
#include <imageFilterOp/ImageExtruder.hpp>
namespace opImageFilter
namespace sight::modules::filter::image
{
static const std::string s_MESHES_INPUT = "meshes";
......@@ -151,4 +151,4 @@ void SImageExtruder::extrudeMesh(const data::Mesh::csptr _mesh, const data::Imag
m_sigComputed->asyncEmit();
}
} // namespace opImageFilter.
} // namespace sight::modules::filter::image.
......@@ -22,14 +22,14 @@
#pragma once
#include "opImageFilter/config.hpp"
#include "modules/filter/image/config.hpp"
#include <data/Mesh.hpp>
#include <data/ModelSeries.hpp>
#include <services/IOperator.hpp>
namespace opImageFilter
namespace sight::modules::filter::image
{
/**
......@@ -49,7 +49,7 @@ namespace opImageFilter
*
* @section XML XML Configuration
* @code{.xml}
<service uid="..." type="::opImageFilter::SImageExtruder">
<service uid="..." type="::modules::filter::image::SImageExtruder">
<in key="meshes" uid="..." />
<in key="image" uid="..." />
<inout key="extrudedImage" uid="..." />
......@@ -63,7 +63,7 @@ namespace opImageFilter
* @subsection In-Out In-Out
* - \b extrudedImage [data::Image]: extruded image.
*/
class OPIMAGEFILTER_CLASS_API SImageExtruder final : public services::IOperator
class MODULE_FILTER_IMAGE_CLASS_API SImageExtruder final : public services::IOperator
{
public:
......@@ -71,10 +71,10 @@ public:
fwCoreServiceMacro(SImageExtruder, services::IOperator)
/// Initializes the slot.
OPIMAGEFILTER_API SImageExtruder();
MODULE_FILTER_IMAGE_API SImageExtruder();
/// Destroys the service.
OPIMAGEFILTER_API ~SImageExtruder();
MODULE_FILTER_IMAGE_API ~SImageExtruder();
private:
......@@ -110,4 +110,4 @@ private:
};
} // namespace opImageFilter.
} // namespace sight::modules::filter::image.
......@@ -20,7 +20,7 @@
*
***********************************************************************/
#include "opImageFilter/SThreshold.hpp"
#include "modules/filter/image/SThreshold.hpp"
#include <core/com/Signal.hpp>
#include <core/com/Signal.hxx>
......@@ -33,7 +33,7 @@
#include <services/macros.hpp>
namespace opImageFilter
namespace sight::modules::filter::image
{
//-----------------------------------------------------------------------------
......@@ -196,4 +196,4 @@ void SThreshold::updating()
//-----------------------------------------------------------------------------
} // namespace opImageFilter
} // namespace sight::modules::filter::image
......@@ -22,11 +22,11 @@
#pragma once
#include "opImageFilter/config.hpp"
#include "modules/filter/image/config.hpp"
#include <services/IOperator.hpp>
namespace opImageFilter
namespace sight::modules::filter::image
{
/**
......@@ -37,7 +37,7 @@ namespace opImageFilter
* @section XML XML Configuration
*
* @code{.xml}
<service type="::opImageFilter::SThreshold">
<service type="::modules::filter::image::SThreshold">
<in key="source" uid="..." />
<out key="target" uid="..." />
<config>
......@@ -57,28 +57,28 @@ namespace opImageFilter
* (Pixels with value lower than this value will be set to 0,
* otherwise it will be set to the maximum value of the pixel type of the image.).
*/
class OPIMAGEFILTER_CLASS_API SThreshold : public services::IOperator
class MODULE_FILTER_IMAGE_CLASS_API SThreshold : public services::IOperator
{
public:
fwCoreServiceMacro(SThreshold, services::IOperator)
OPIMAGEFILTER_API SThreshold() noexcept;
MODULE_FILTER_IMAGE_API SThreshold() noexcept;
OPIMAGEFILTER_API virtual ~SThreshold() noexcept override;
MODULE_FILTER_IMAGE_API virtual ~SThreshold() noexcept override;
protected:
OPIMAGEFILTER_API void starting() override;
MODULE_FILTER_IMAGE_API void starting() override;
OPIMAGEFILTER_API void stopping() override;
MODULE_FILTER_IMAGE_API void stopping() override;
/// Configure the service.
OPIMAGEFILTER_API void configuring() override;
MODULE_FILTER_IMAGE_API void configuring() override;
/// Apply the threshold.
OPIMAGEFILTER_API void updating() override;
MODULE_FILTER_IMAGE_API void updating() override;
private:
......@@ -86,4 +86,4 @@ private:
double m_threshold;
};
} // namespace opImageFilter
} // namespace sight::modules::filter::image
fwLoadProperties()
find_package(VTK QUIET COMPONENTS vtkInteractionWidgets REQUIRED)
find_package(VTK QUIET COMPONENTS vtkFiltersCore REQUIRED)
if(VCPKG_TARGET_TRIPLET)
# VTK9
target_link_libraries(${FWPROJECT_NAME} PRIVATE
VTK::InteractionWidgets
VTK::vtkFiltersCore
)
else()
include(${VTK_USE_FILE})
target_link_libraries(${FWPROJECT_NAME} PRIVATE
vtkInteractionWidgets
vtkFiltersCore
)
endif()
......@@ -23,17 +23,17 @@
#pragma once
/**
* @brief The namespace opVTKMesh contains an implementation of a VTK mesher.
* @brief The namespace sight::modules::filter::mesh contains an implementation of a VTK mesher.
*/
namespace opVTKMesh
namespace sight::modules::filter::mesh
{
/**
* @brief The namespace opVTKMesh::action contains operator to create mesh with VTK .
* @brief The namespace sight::modules::filter::mesh::action contains operator to create mesh with VTK .
*/
namespace action
{
} // namespace action
} // namespace opVTKMesh
} // namespace sight::modules::filter::mesh
......@@ -20,16 +20,16 @@
*
***********************************************************************/
#include "opImageFilter/Plugin.hpp"
#include "modules/filter/mesh/Plugin.hpp"
#include <core/runtime/utils/GenericExecutableFactoryRegistrar.hpp>
namespace opImageFilter
namespace sight::modules::filter::mesh
{
//-----------------------------------------------------------------------------
static core::runtime::utils::GenericExecutableFactoryRegistrar<Plugin> registrar("::opImageFilter::Plugin");
static core::runtime::utils::GenericExecutableFactoryRegistrar<Plugin> registrar("::sight::modules::filter::mesh::Plugin");
//-----------------------------------------------------------------------------
......@@ -51,4 +51,4 @@ void Plugin::stop() noexcept
//-----------------------------------------------------------------------------
} // namespace opImageFilter
} // namespace sight::modules::filter::mesh
......@@ -24,7 +24,7 @@
#include <core/runtime/Plugin.hpp>
namespace opVTKMesh
namespace sight::modules::filter::mesh
{
/**
......@@ -46,4 +46,4 @@ struct Plugin : public core::runtime::Plugin
};
} // namespace opVTKMesh
} // namespace sight::modules::filter::mesh
set( NAME opVTKMesh )
set( NAME module_filter_mesh )
set( VERSION 0.1 )
set( TYPE MODULE )
set( DEPENDENCIES
......@@ -7,6 +7,7 @@ set( DEPENDENCIES
ui_base
services
io_vtk
geometry_data
core
)
set( REQUIREMENTS )
......@@ -20,7 +20,7 @@
*
***********************************************************************/
#include "opVTKMesh/SVTKMesher.hpp"
#include "modules/filter/mesh/SVTKMesher.hpp"
#include <core/com/Signal.hpp>
#include <core/com/Signal.hxx>
......@@ -44,12 +44,12 @@
#include <vtkSmartPointer.h>
#include <vtkWindowedSincPolyDataFilter.h>