[med-svn] [Git][med-team/sight][master] Fix i386 build and update manpages
Flavien Bridault (@fbridault-guest)
gitlab at salsa.debian.org
Thu Nov 4 15:55:10 GMT 2021
Flavien Bridault pushed to branch master at Debian Med / sight
Commits:
80d16004 by Flavien Bridault at 2021-11-03T11:36:04+01:00
Fix i386 build and update manpages
- - - - -
6 changed files:
- debian/changelog
- − debian/fwlauncher.1
- debian/libsight.manpages
- + debian/patches/fix-itk-build.patch
- debian/patches/series
- debian/fwlauncher-0.1.1 → debian/sightrun.1
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+sight (21.0.0-2) UNRELEASED; urgency=medium
+
+ * d/p/: Add patch to remove a service that does not build on i386
+ * d/.manpages: Update manual pages to match the current version
+
+ -- Flavien Bridault <fbridault at ircad.fr> Wed, 03 Nov 2021 10:50:39 +0100
+
sight (21.0.0-1) unstable; urgency=medium
[Flavien Bridault]
=====================================
debian/fwlauncher.1 deleted
=====================================
@@ -1,20 +0,0 @@
-.TH fwlauncher 1 "Novembre 28, 2016" "version 0.11.0.2" "USER COMMANDS"
-
-.SH NAME
-fwlauncher \- launch a fw4spl application
-
-.SH SYNOPSIS
-fwlauncher [FILE]
-
-.SH DESCRIPTION
-This program allows you to run applications and tutorials built
-with the open source framework called fw4spl.
-
-.SH EXAMPLES
-.IP "fwlauncher /usr/lib/x86_64-linux-gnu/fw4spl/VRRender_0-9/profile.xml"
-Start the Application \"VRRender\"
-
-.SH COPYRIGHT
-FW4SPL - Copyright (C) IRCAD, 2009-2016.
-Distributed under the terms of the GNU Lesser General Public License (LGPL)
-as published by the Free Software Foundation.
=====================================
debian/libsight.manpages
=====================================
@@ -1,2 +1 @@
-debian/fwlauncher.1
-debian/fwlauncher-0.1.1
+debian/sightrun.1
=====================================
debian/patches/fix-itk-build.patch
=====================================
@@ -0,0 +1,520 @@
+Author: Flavien Bridault <fbridault at ircad.fr>
+Description: Remove service that requires ITKFFT which is not available on i386
+--- sight.orig/libs/filter/image/CMakeLists.txt
++++ sight/libs/filter/image/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ sight_add_target( filter_image TYPE LIBRARY PCH pchServiceOmp )
+
+-find_package(ITK QUIET COMPONENTS ITKLabelMap ITKOptimizersv4 ITKTransform ITKFFT REQUIRED)
+-target_link_libraries(filter_image PUBLIC ITKLabelMap ITKOptimizersv4 ITKTransform ITKFFT)
++find_package(ITK QUIET COMPONENTS ITKLabelMap ITKOptimizersv4 ITKTransform REQUIRED)
++target_link_libraries(filter_image PUBLIC ITKLabelMap ITKOptimizersv4 ITKTransform)
+
+ if(MSVC)
+ find_package(ITK QUIET COMPONENTS ITKSmoothing ITKRegistrationMethodsv4 REQUIRED)
+--- sight.orig/libs/filter/image/MIPMatchingRegistration.hpp
++++ sight/libs/filter/image/MIPMatchingRegistration.hpp
+@@ -34,7 +34,6 @@
+
+ #include <io/itk/itk.hpp>
+
+-#include <itkFFTNormalizedCorrelationImageFilter.h>
+ #include <itkIdentityTransform.h>
+ #include <itkLinearInterpolateImageFunction.h>
+ #include <itkMaximumProjectionImageFilter.h>
+--- sight.orig/modules/filter/image/SMIPMatchingRegistration.cpp
++++ /dev/null
+@@ -1,101 +0,0 @@
+-/************************************************************************
+- *
+- * Copyright (C) 2017-2021 IRCAD France
+- * Copyright (C) 2017-2020 IHU Strasbourg
+- *
+- * This file is part of Sight.
+- *
+- * Sight is free software: you can redistribute it and/or modify it under
+- * the terms of the GNU Lesser General Public License as published by
+- * the Free Software Foundation, either version 3 of the License, or
+- * (at your option) any later version.
+- *
+- * Sight is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU Lesser General Public License for more details.
+- *
+- * You should have received a copy of the GNU Lesser General Public
+- * License along with Sight. If not, see <https://www.gnu.org/licenses/>.
+- *
+- ***********************************************************************/
+-
+-#include "SMIPMatchingRegistration.hpp"
+-
+-#include <core/tools/Dispatcher.hpp>
+-#include <core/tools/TypeKeyTypeMapping.hpp>
+-
+-#include <filter/image/MIPMatchingRegistration.hpp>
+-#include <filter/image/Resampler.hpp>
+-
+-#include <geometry/data/Matrix4.hpp>
+-
+-#include <service/macros.hpp>
+-
+-#include <functional>
+-#include <numeric>
+-
+-namespace sight::module::filter::image
+-{
+-
+-SMIPMatchingRegistration::SMIPMatchingRegistration() noexcept :
+- service::IRegisterer()
+-{
+-}
+-
+-//------------------------------------------------------------------------------
+-
+-SMIPMatchingRegistration::~SMIPMatchingRegistration() noexcept
+-{
+-}
+-
+-//------------------------------------------------------------------------------
+-
+-void SMIPMatchingRegistration::starting()
+-{
+-}
+-
+-//------------------------------------------------------------------------------
+-
+-void SMIPMatchingRegistration::stopping()
+-{
+-}
+-
+-//------------------------------------------------------------------------------
+-
+-void SMIPMatchingRegistration::configuring()
+-{
+-}
+-
+-//------------------------------------------------------------------------------
+-
+-void SMIPMatchingRegistration::updating()
+-{
+- const auto fixed = m_target.lock();
+- const auto moving = m_source.lock();
+- auto transform = m_transform.lock();
+-
+- SIGHT_ASSERT("Missing required input 'fixed'", fixed);
+- SIGHT_ASSERT("Missing required input 'moving'", moving);
+- SIGHT_ASSERT("Missing required inout 'transform'", transform);
+-
+- sight::filter::image::RegistrationDispatch::Parameters params;
+- params.fixed = fixed.get_shared();
+- params.moving = moving.get_shared();
+- params.transform = transform.get_shared();
+-
+- core::tools::Type type = moving->getType();
+- core::tools::Dispatcher<core::tools::SupportedDispatcherTypes, sight::filter::image::RegistrationDispatch>
+- ::invoke(type, params);
+-
+- transform->signal<data::Matrix4::ModifiedSignalType>(data::Matrix4::s_MODIFIED_SIG)->asyncEmit();
+-}
+-
+-//------------------------------------------------------------------------------
+-
+-void SMIPMatchingRegistration::computeRegistration(core::HiResClock::HiResClockType)
+-{
+- this->updating();
+-}
+-
+-} // namespace sight::module::filter::image
+--- sight.orig/modules/filter/image/SMIPMatchingRegistration.hpp
++++ /dev/null
+@@ -1,119 +0,0 @@
+-/************************************************************************
+- *
+- * Copyright (C) 2018-2021 IRCAD France
+- * Copyright (C) 2018-2019 IHU Strasbourg
+- *
+- * This file is part of Sight.
+- *
+- * Sight is free software: you can redistribute it and/or modify it under
+- * the terms of the GNU Lesser General Public License as published by
+- * the Free Software Foundation, either version 3 of the License, or
+- * (at your option) any later version.
+- *
+- * Sight is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU Lesser General Public License for more details.
+- *
+- * You should have received a copy of the GNU Lesser General Public
+- * License along with Sight. If not, see <https://www.gnu.org/licenses/>.
+- *
+- ***********************************************************************/
+-
+-#pragma once
+-
+-#include "modules/filter/image/config.hpp"
+-
+-#include <data/Image.hpp>
+-#include <data/Matrix4.hpp>
+-
+-#include <service/IRegisterer.hpp>
+-
+-namespace sight::module::filter::image
+-{
+-
+-/**
+- * @brief This service uses a fast registration algorithm to quickly register two images together if the transform
+- * between both is pure translation.
+- *
+- * @section Signals Signals
+- *
+- * @section Slots Slots
+- * - \b update: compute the registration
+- *
+- * @section XML XML Configuration
+- *
+- * @code{.xml}
+- <service uid="..." type="sight::module::filter::image::SFastRegistration">
+- <in key="source" uid="..." />
+- <in key="target" uid="..." />
+- <in key="transform" uid="..." />
+- </service>
+- * @endcode
+- *
+- * @subsection Input Input
+- * - \b source [sight::data::Image]: Input image that will be aligned to the target.
+- * - \b target [sight::data::Image]: Input image to which the source will be aligned.
+- *
+- * @subsection In-Out In-Out
+- * - \b transform [sight::data::Matrix4]: initial registration. The computed registration will be
+- * concatenated to the initial registration matrix.
+- */
+-class MODULE_FILTER_IMAGE_CLASS_API SMIPMatchingRegistration : public service::IRegisterer
+-{
+-public:
+-
+- SIGHT_DECLARE_SERVICE(SMIPMatchingRegistration, service::IRegisterer);
+-
+- /**
+- * @brief Constructor
+- */
+- MODULE_FILTER_IMAGE_API SMIPMatchingRegistration() noexcept;
+- /**
+- * @brief Destructor
+- */
+- MODULE_FILTER_IMAGE_API virtual ~SMIPMatchingRegistration() noexcept;
+-
+-protected:
+-
+- /**
+- * @brief Starts the service.
+- *
+- * @throw core::tools::Failed
+- */
+- MODULE_FILTER_IMAGE_API void starting() override;
+-
+- /**
+- * @brief Stops the service.
+- *
+- * @throw core::tools::Failed
+- */
+- MODULE_FILTER_IMAGE_API void stopping() override;
+-
+- /**
+- * @brief Configures the service.
+- *
+- * @throw core::tools::Failed
+- */
+- MODULE_FILTER_IMAGE_API void configuring() override;
+-
+- /**
+- * @brief Compute the registration.
+- *
+- * @throw core::tools::Failed
+- */
+- MODULE_FILTER_IMAGE_API void updating() override;
+-
+- /**
+- * @brief Compute the registration by calling the `update` slot. The timestamp parameter is discarded.
+- */
+- MODULE_FILTER_IMAGE_API void computeRegistration(core::HiResClock::HiResClockType timestamp) override;
+-
+-private:
+-
+- sight::data::ptr<sight::data::Image, sight::data::Access::in> m_source {this, "fixed"};
+- sight::data::ptr<sight::data::Image, sight::data::Access::in> m_target {this, "moving"};
+- sight::data::ptr<sight::data::Matrix4, sight::data::Access::inout> m_transform {this, "transform"};
+-};
+-
+-} // namespace sight::module::filter::image
+--- sight.orig/modules/filter/image/rc/plugin.xml
++++ sight/modules/filter/image/rc/plugin.xml
+@@ -58,12 +58,6 @@
+ </extension>
+
+ <extension implements="::sight::service::extension::Factory">
+- <type>sight::service::IRegisterer</type>
+- <service>sight::module::filter::image::SMIPMatchingRegistration</service>
+- <desc>This service uses a fast registration algorithm to quickly register two images together if the transform</desc>
+- </extension>
+-
+- <extension implements="::sight::service::extension::Factory">
+ <type>sight::service::IFilter</type>
+ <service>sight::module::filter::image::SMatrixRegressor</service>
+ <object>sight::data::Vector</object>
+--- sight.orig/libs/filter/image/test/tu/MIPMatchingRegistrationTest.cpp
++++ /dev/null
+@@ -1,196 +0,0 @@
+-/************************************************************************
+- *
+- * Copyright (C) 2017-2021 IRCAD France
+- * Copyright (C) 2017-2020 IHU Strasbourg
+- *
+- * This file is part of Sight.
+- *
+- * Sight is free software: you can redistribute it and/or modify it under
+- * the terms of the GNU Lesser General Public License as published by
+- * the Free Software Foundation, either version 3 of the License, or
+- * (at your option) any later version.
+- *
+- * Sight is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU Lesser General Public License for more details.
+- *
+- * You should have received a copy of the GNU Lesser General Public
+- * License along with Sight. If not, see <https://www.gnu.org/licenses/>.
+- *
+- ***********************************************************************/
+-
+-#include "MIPMatchingRegistrationTest.hpp"
+-
+-#include "helper.hpp"
+-
+-#include <core/tools/Dispatcher.hpp>
+-#include <core/tools/TypeKeyTypeMapping.hpp>
+-
+-#include <data/fieldHelper/MedicalImageHelpers.hpp>
+-#include <data/Matrix4.hpp>
+-
+-#include <filter/image/Metric.hpp>
+-#include <filter/image/MIPMatchingRegistration.hpp>
+-#include <filter/image/Resampler.hpp>
+-
+-#include <glm/gtc/matrix_access.hpp>
+-#include <glm/gtc/matrix_transform.hpp>
+-#include <glm/gtc/quaternion.hpp>
+-#include <glm/mat4x4.hpp>
+-
+-#include <io/itk/itk.hpp>
+-
+-#include <utestData/generator/Image.hpp>
+-
+-#include <itkImage.h>
+-#include <itkRegionOfInterestImageFilter.h>
+-#include <itkResampleImageFilter.h>
+-
+-CPPUNIT_TEST_SUITE_REGISTRATION(sight::filter::image::ut::MIPMatchingRegistrationTest);
+-
+-namespace sight::filter::image
+-{
+-
+-namespace ut
+-{
+-
+-//------------------------------------------------------------------------------
+-
+-void MIPMatchingRegistrationTest::setUp()
+-{
+-}
+-
+-//------------------------------------------------------------------------------
+-
+-void MIPMatchingRegistrationTest::tearDown()
+-{
+-}
+-
+-//------------------------------------------------------------------------------
+-
+-void MIPMatchingRegistrationTest::identityTest()
+-{
+- data::Image::csptr moving = createSphereImage< ::std::uint16_t, 3>();
+- data::Image::csptr fixed = data::Object::copy(moving);
+- data::Matrix4::sptr mat = data::Matrix4::New();
+-
+- filter::image::RegistrationDispatch::Parameters params;
+- params.fixed = fixed;
+- params.moving = moving;
+- params.transform = data::Matrix4::New();
+- core::tools::Type type = moving->getType();
+- core::tools::Dispatcher<core::tools::SupportedDispatcherTypes, RegistrationDispatch>::invoke(type, params);
+-
+- for(size_t i = 0 ; i != 3 ; ++i)
+- {
+- CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
+- "Translation value is not equal to '0' ",
+- 0.,
+- params.transform->getCoefficient(i, 3),
+- 1e-8
+- );
+- }
+-}
+-
+-//------------------------------------------------------------------------------
+-
+-void MIPMatchingRegistrationTest::translateTransformTest()
+-{
+- data::Image::csptr moving = createSphereImage< ::std::uint16_t, 3>();
+- data::Image::sptr fixed = data::Image::New();
+-
+- data::Matrix4::sptr transform = data::Matrix4::New();
+- transform->setCoefficient(0, 3, 4.);
+- transform->setCoefficient(1, 3, 12.);
+- transform->setCoefficient(2, 3, 7.);
+- sight::filter::image::Resampler::resample(moving, fixed, transform);
+-
+- std::array<double, 3> expected {{4., 12., 7.}};
+- filter::image::RegistrationDispatch::Parameters params;
+- params.fixed = fixed;
+- params.moving = moving;
+- params.transform = data::Matrix4::New();
+- core::tools::Type type = moving->getType();
+- core::tools::Dispatcher<core::tools::SupportedDispatcherTypes, RegistrationDispatch>::invoke(type, params);
+- for(size_t i = 0 ; i < 3 ; ++i)
+- {
+- CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
+- "Actual transform does not match expected results",
+- expected[i],
+- params.transform->getCoefficient(i, 3),
+- 1e-2
+- );
+- }
+-}
+-
+-//------------------------------------------------------------------------------
+-
+-void MIPMatchingRegistrationTest::translateTransformWithScalesTest()
+-{
+- using ImageType = ::itk::Image<std::uint16_t, 3>;
+-
+- // Create the moving image
+- auto movingSpacing = ImageType::SpacingType(1.);
+- movingSpacing[1] = 1.3;
+- data::Image::sptr moving = createSphereImage< ::std::uint16_t, 3>(movingSpacing);
+- data::Image::sptr fixed = data::Image::New();
+- moving->setOrigin2({107., 50., -30.});
+-
+- // Translate the image a bit
+- std::array<double, 3> vTrans {{4., 19., 7.}};
+- data::Matrix4::sptr transform = data::Matrix4::New();
+- transform->setCoefficient(0, 3, vTrans[0]);
+- transform->setCoefficient(1, 3, vTrans[1]);
+- transform->setCoefficient(2, 3, vTrans[2]);
+- sight::filter::image::Resampler::resample(moving, fixed, transform);
+- auto fixedOrigin = std::array<double, 3> {{20., 10., 35.}},
+- movingOrigin = moving->getOrigin2();
+- fixed->setOrigin2(fixedOrigin);
+- std::array<float, 3> expected {
+- {
+- float(movingOrigin[0] + vTrans[0] - fixedOrigin[0]),
+- float(movingOrigin[1] + vTrans[1] - fixedOrigin[1]),
+- float(movingOrigin[2] + vTrans[2] - fixedOrigin[2])
+- }
+- };
+-
+- auto itkFixed = io::itk::itkImageFactory<ImageType>(fixed, false);
+-
+- // Resample the image to get a different spacing
+- ImageType::SizeType newSize;
+- ImageType::SpacingType newSpacing(2.);
+- for(uint8_t i = 0 ; i != 3 ; ++i)
+- {
+- newSize[i] = static_cast<unsigned int>(movingSpacing[i] / newSpacing[i] * moving->getSize2()[i]);
+- }
+-
+- auto resample = ::itk::ResampleImageFilter<ImageType, ImageType>::New();
+- resample->SetInput(itkFixed);
+- resample->SetSize(newSize);
+- resample->SetOutputSpacing(newSpacing);
+- resample->SetOutputOrigin(itkFixed->GetOrigin());
+- resample->Update();
+- auto resampled = resample->GetOutput();
+- auto resampledF4sFixed = io::itk::dataImageFactory<ImageType>(resampled, true);
+-
+- filter::image::RegistrationDispatch::Parameters params;
+- params.fixed = resampledF4sFixed;
+- params.moving = moving;
+- params.transform = data::Matrix4::New();
+- core::tools::Type type = moving->getType();
+- core::tools::Dispatcher<core::tools::SupportedDispatcherTypes, RegistrationDispatch>::invoke(type, params);
+- for(size_t i = 0 ; i < 3 ; ++i)
+- {
+- CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
+- "Actual transform does not match expected results",
+- double(expected[i]),
+- params.transform->getCoefficient(i, 3),
+- double(movingSpacing[i])
+- );
+- }
+-}
+-
+-} // ut
+-
+-} // itkRegistrationOp
+--- sight.orig/libs/filter/image/test/tu/MIPMatchingRegistrationTest.hpp
++++ /dev/null
+@@ -1,53 +0,0 @@
+-/************************************************************************
+- *
+- * Copyright (C) 2021 IRCAD France
+- * Copyright (C) 2018 IHU Strasbourg
+- *
+- * This file is part of Sight.
+- *
+- * Sight is free software: you can redistribute it and/or modify it under
+- * the terms of the GNU Lesser General Public License as published by
+- * the Free Software Foundation, either version 3 of the License, or
+- * (at your option) any later version.
+- *
+- * Sight is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU Lesser General Public License for more details.
+- *
+- * You should have received a copy of the GNU Lesser General Public
+- * License along with Sight. If not, see <https://www.gnu.org/licenses/>.
+- *
+- ***********************************************************************/
+-
+-#pragma once
+-
+-#include <cppunit/extensions/HelperMacros.h>
+-
+-namespace sight::filter::image
+-{
+-
+-namespace ut
+-{
+-
+-class MIPMatchingRegistrationTest : public CPPUNIT_NS::TestFixture
+-{
+-CPPUNIT_TEST_SUITE(MIPMatchingRegistrationTest);
+-CPPUNIT_TEST(identityTest);
+-CPPUNIT_TEST(translateTransformTest);
+-CPPUNIT_TEST(translateTransformWithScalesTest);
+-CPPUNIT_TEST_SUITE_END();
+-
+-public:
+-
+- void setUp();
+- void tearDown();
+-
+- void identityTest();
+- void translateTransformTest();
+- void translateTransformWithScalesTest();
+-};
+-
+-} //namespace ut
+-
+-} //namespace sight::filter::image
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
skip-samples-build.patch
add_missing_includes.patch
fix-dynamic-load.patch
+fix-itk-build.patch
=====================================
debian/fwlauncher-0.1.1 → debian/sightrun.1
=====================================
@@ -1,20 +1,20 @@
-.TH fwlauncher 1 "Novembre 28, 2016" "version 0.11.0.2" "USER COMMANDS"
+.TH sightrun 1 "Novembre 3, 2021" "version 21.0.1-1" "USER COMMANDS"
.SH NAME
-fwlauncher \- launch a fw4spl application
+sightrun \- launch a Sight application
.SH SYNOPSIS
-fwlauncher [FILE]
+sightrun [FILE]
.SH DESCRIPTION
This program allows you to run applications and tutorials built
-with the open source framework called fw4spl.
+with Sight (Surgical Image Guidance and Healthcare).
.SH EXAMPLES
-.IP "fwlauncher /usr/lib/x86_64-linux-gnu/fw4spl/VRRender_0-9/profile.xml"
-Start the Application \"VRRender\"
+.IP "sightrun /usr/share/sight/SightViewer/profile.xml"
+Start the Application \"SightViewer\"
.SH COPYRIGHT
-FW4SPL - Copyright (C) IRCAD, 2009-2016.
+Sight - Copyright (C) IRCAD, 2009-2021.
Distributed under the terms of the GNU Lesser General Public License (LGPL)
as published by the Free Software Foundation.
View it on GitLab: https://salsa.debian.org/med-team/sight/-/commit/80d1600486523c55a7d7b2bb8603f346df2652ca
--
View it on GitLab: https://salsa.debian.org/med-team/sight/-/commit/80d1600486523c55a7d7b2bb8603f346df2652ca
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20211104/1a8a4e2f/attachment-0001.htm>
More information about the debian-med-commit
mailing list