[med-svn] [Git][med-team/relion][debian-contrib/master] 31 commits: Separate non-cuda/cuda packages

Andreas Beckmann (@anbe) gitlab at salsa.debian.org
Tue Sep 27 12:36:37 BST 2022



Andreas Beckmann pushed to branch debian-contrib/master at Debian Med / relion


Commits:
ccd7eec7 by Roland Fehrenbacher at 2020-10-01T11:21:07+02:00
Separate non-cuda/cuda packages

cuda packages will now be built from the branch debian-contrib/master

- - - - -
5bf0c035 by Andreas Tille at 2020-10-07T15:48:21+02:00
routine-update: Drop useless get-orig-source target

- - - - -
b68df2c6 by Andreas Tille at 2020-10-07T15:48:21+02:00
routine-update: Remove trailing whitespace in debian/changelog

- - - - -
6a6b796d by Andreas Tille at 2020-10-07T15:48:21+02:00
routine-update: Add salsa-ci file

- - - - -
cf2a8ef4 by Andreas Tille at 2020-10-07T15:48:21+02:00
routine-update: Rules-Requires-Root: no

- - - - -
773da895 by Andreas Tille at 2020-10-07T15:48:22+02:00
Trim trailing whitespace.

Changes-By: lintian-brush
Fixes: lintian: trailing-whitespace
See-also: https://lintian.debian.org/tags/trailing-whitespace.html

- - - - -
24f04b4c by Andreas Tille at 2020-10-07T15:48:41+02:00
Set upstream metadata fields: Bug-Database, Bug-Submit, Repository, Repository-Browse.

Changes-By: lintian-brush
Fixes: lintian: upstream-metadata-missing-bug-tracking
See-also: https://lintian.debian.org/tags/upstream-metadata-missing-bug-tracking.html
Fixes: lintian: upstream-metadata-missing-repository
See-also: https://lintian.debian.org/tags/upstream-metadata-missing-repository.html

- - - - -
eb299c93 by Andreas Tille at 2020-10-07T16:03:04+02:00
Build-Depends: fluid

- - - - -
1ad57bce by Andreas Tille at 2020-10-07T16:22:53+02:00
Upload to unstable

- - - - -
dd8a645d by Andreas Tille at 2021-10-19T09:15:38+02:00
Fix watchfile to detect new versions on github

- - - - -
6b67e20f by Andreas Tille at 2021-10-19T09:15:41+02:00
routine-update: New upstream version

- - - - -
0ffc8a50 by Andreas Tille at 2021-10-19T09:15:50+02:00
Update upstream source from tag 'upstream/3.1.3'

Update to upstream version '3.1.3'
with Debian dir 55ffbad5f6d2424114e72ae1cd2fa11a793da60f
- - - - -
1a1dd1d8 by Andreas Tille at 2021-10-19T09:15:51+02:00
routine-update: Standards-Version: 4.6.0

- - - - -
55e3a943 by Andreas Tille at 2021-10-19T09:15:59+02:00
Update renamed lintian tag names in lintian overrides.

Changes-By: lintian-brush
Fixes: lintian: renamed-tag
See-also: https://lintian.debian.org/tags/renamed-tag.html

- - - - -
5719019d by Andreas Tille at 2021-10-19T09:27:02+02:00
routine-update: Ready to upload to unstable

- - - - -
adf20d47 by Andreas Tille at 2021-10-19T09:31:32+02:00
Mark autopkgtest superficial

- - - - -
bb13c186 by Andreas Tille at 2021-10-20T09:02:48+02:00
Enable uscan to create a sensible download name

- - - - -
4a976b0a by Andreas Beckmann at 2022-09-23T11:47:48+02:00
drop backup file from git

- - - - -
e6a91129 by Andreas Beckmann at 2022-09-23T15:50:03+02:00
cherry-pick fixes related to cub

- - - - -
44fa3ca8 by Andreas Beckmann at 2022-09-23T18:57:55+02:00
relion_maingui is gone

- - - - -
9edfb28e by Andreas Beckmann at 2022-09-23T19:02:03+02:00
simplify the configure/build/install overrides

- - - - -
d4978531 by Andreas Beckmann at 2022-09-23T19:32:29+02:00
fix paths in copyright file

- - - - -
7575eb73 by Andreas Beckmann at 2022-09-23T23:03:02+02:00
restore the relion (3.1.0-2) changelog entry

- - - - -
5ee542db by Andreas Beckmann at 2022-09-23T23:05:50+02:00
simplify lintian overrides

- - - - -
b88a7386 by Andreas Beckmann at 2022-09-23T23:10:47+02:00
drop superfluous ldconfig triggers

there are no more shared libraries

- - - - -
5984c176 by Andreas Beckmann at 2022-09-23T23:34:54+02:00
fix missing hardening flags

- - - - -
aebfe6d1 by Andreas Beckmann at 2022-09-24T10:42:34+02:00
test relion-cuda

- - - - -
25012c3e by Andreas Beckmann at 2022-09-26T22:22:15+02:00
disable dbgsym packages on ci builds

to avoid failures due to excessively large artifacts

- - - - -
123a900d by Andreas Beckmann at 2022-09-27T00:12:40+02:00
Merge branch 'debian/master' into debian-contrib/master

- - - - -
8dc43585 by Andreas Beckmann at 2022-09-27T01:02:34+02:00
build using cuda-gcc

- - - - -
d4d2aa0a by Andreas Beckmann at 2022-09-27T01:02:57+02:00
ci: disable i386 build

- - - - -


15 changed files:

- debian/changelog
- debian/control
- debian/copyright
- + debian/patches/0001-Repair-wrong-comment-sign-pointed-out-by-Alexey-Roma.patch
- + debian/patches/series
- debian/relion-cuda.lintian-overrides
- − debian/relion-cuda.triggers
- debian/relion-gui-cuda.lintian-overrides
- − debian/relion-gui-cuda.triggers
- debian/rules
- + debian/salsa-ci.yml
- debian/tests/control
- debian/upstream/metadata
- debian/watch
- − src/jaz/Gaussian_pyramid.h.bak


Changes:

=====================================
debian/changelog
=====================================
@@ -1,10 +1,46 @@
-relion-cuda (3.1.3-1) unstable; urgency=medium
+relion-cuda (3.1.3-1) UNRELEASED; urgency=medium
 
   * Team upload.
   * New upstream version.
+  * Build using cuda-gcc.
 
  -- Sascha Steinbiss <satta at debian.org>  Sat, 19 Feb 2022 14:14:20 +0100
 
+relion (3.1.3-2) UNRELEASED; urgency=medium
+
+  [ Andreas Tille ]
+  * Enable uscan to create a sensible download name
+
+  [ Andreas Beckmann ]
+  * Cherry-pick upstream fixes related to cub.  (Closes: #995224)
+  * Simplify debian/rules.
+  * Fix missing hardening flags.
+
+ -- Andreas Tille <tille at debian.org>  Wed, 20 Oct 2021 09:02:12 +0200
+
+relion (3.1.3-1) unstable; urgency=medium
+
+  * Fix watchfile to detect new versions on github
+  * New upstream version
+  * Standards-Version: 4.6.0 (routine-update)
+  * Update renamed lintian tag names in lintian overrides.
+  * Mark autopkgtest superficial
+
+ -- Andreas Tille <tille at debian.org>  Tue, 19 Oct 2021 09:16:04 +0200
+
+relion (3.1.0-4) unstable; urgency=medium
+
+  * Drop useless get-orig-source target (routine-update)
+  * Remove trailing whitespace in debian/changelog (routine-update)
+  * Add salsa-ci file (routine-update)
+  * Rules-Requires-Root: no (routine-update)
+  * Trim trailing whitespace.
+  * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
+    Repository-Browse.
+  * Build-Depends: fluid
+
+ -- Andreas Tille <tille at debian.org>  Wed, 07 Oct 2020 16:03:12 +0200
+
 relion-cuda (3.1.0-2) unstable; urgency=medium
 
   * Team upload.
@@ -20,3 +56,100 @@ relion-cuda (3.1.0-1) unstable; urgency=medium
   * Initial upload of this cuda enabled relion version
 
  -- Roland Fehrenbacher <rfehren at debian.org>  Thu, 01 Oct 2020 10:37:37 +0200
+
+relion (3.1.0-3) unstable; urgency=medium
+
+  * relion-cuda and relion-gui-cuda are now built by src:relion-cuda/contrib.
+
+ -- Roland Fehrenbacher <rfehren at debian.org>  Thu, 01 Oct 2020 10:37:37 +0200
+
+relion (3.1.0-2) unstable; urgency=medium
+
+  * New upstream version 3.1.0
+  * Update to Standards-Version: 4.5.0
+  * Rename available binary packages, since MPI support is now default.
+    The MPI enabled binaries carry a suffix _mpi, serial versions are still
+    available.
+  * Dropped librelion* packages. No shared libraries are created by relion
+    anymore.
+  * Add versions with CUDA/GPU support (these are in the Debian contrib
+    archive area). They are named relion-cuda and relion-gui-cuda.
+  * Moved to dep14 layout to work directly with the upstream git repo (see
+    README.source in the source archive).
+  * Added a simple autopkgtest
+
+ -- Roland Fehrenbacher <rfehren at debian.org>  Tue, 29 Sep 2020 19:01:31 +0000
+
+relion (1.4+dfsg-4) unstable; urgency=medium
+
+  * Team upload.
+  * Add watch file (and delete README.source that explains why there is no
+    watch file)
+  * New upstream version
+  * debhelper 11
+  * Point Vcs fields to salsa.debian.org
+  * Standards-Version: 4.1.4
+  * Restrict architectures to amd64 and i386
+    Closes: #897239
+
+ -- Andreas Tille <tille at debian.org>  Thu, 14 Jun 2018 14:10:42 +0200
+
+relion (1.4+dfsg-3) unstable; urgency=medium
+
+  * Team upload
+  * d/control: Enable all archs, Closes: #873865
+  * d/control: Update standards to 4.1.1 (no changes)
+
+ -- Gert Wollny <gewo at debian.org>  Thu, 07 Dec 2017 10:27:59 +0100
+
+relion (1.4+dfsg-2) unstable; urgency=medium
+
+  [ Gert Wollny ]
+  * Team upload.
+  * d/p/0005: Correct compilation with gcc-6, Closes: #811641
+  * d/p/0006: Correctly copy only 4 byte, corresponding to the
+    target array size
+  * d/control: Update standards version to 3.9.8
+
+  [ Andreas Tille ]
+  * hardening=+bindnow
+
+ -- Gert Wollny <gw.fossdev at gmail.com>  Wed, 29 Jun 2016 13:32:34 +0000
+
+relion (1.4+dfsg-1) unstable; urgency=medium
+
+  [ Roland Fehrenbacher ]
+  * New upstream version 1.4
+  * Bug fix: "file conflicts between librelion{+mpi}{+gui}-1.3-1{v5}
+    packages", thanks to Ralf Treinen (Closes: #797825).
+
+  [ Andreas Tille ]
+  * Enable building architecture independant files separately
+    Closes: #806103
+
+ -- Roland Fehrenbacher <rf at q-leap.de>  Tue, 08 Dec 2015 19:04:50 +0100
+
+relion (1.3+dfsg-3) unstable; urgency=medium
+
+  [ Andreas Tille ]
+  * Rename library packages for g++5 ABI transition.
+    (Thanks for the patch to Iain Lane <iain at orangesquash.org.uk>)
+    Closes: #791267
+
+  [ Roland Fehrenbacher ]
+  * Fix permissions of d/lib*.install files (needed for dh-exec)
+
+ -- Roland Fehrenbacher <rf at q-leap.de>  Mon, 24 Aug 2015 16:08:36 +0000
+
+relion (1.3+dfsg-2) unstable; urgency=medium
+
+  * Drop build-dep on openmpi-gcc
+    Closes: #766821
+
+ -- Andreas Tille <tille at debian.org>  Sun, 26 Oct 2014 07:40:11 +0100
+
+relion (1.3+dfsg-1) unstable; urgency=low
+
+  * Initial upload (Closes: #766324)
+
+ -- Roland Fehrenbacher <rf at q-leap.de>  Thu, 23 Oct 2014 11:52:48 +0000


=====================================
debian/control
=====================================
@@ -9,15 +9,15 @@ Build-Depends: cmake,
                libfltk1.3-dev,
                libopenmpi-dev,
                libtiff-dev,
-               nvidia-cuda-toolkit,
+               nvidia-cuda-toolkit-gcc,
                fluid
-Standards-Version: 4.5.0
+Standards-Version: 4.6.0
 Vcs-Browser: https://salsa.debian.org/med-team/relion
 Vcs-Git: https://salsa.debian.org/med-team/relion.git
 Homepage: https://www2.mrc-lmb.cam.ac.uk/relion/index.php/Main_Page
+Rules-Requires-Root: no
 
 Package: relion-cuda
-Section: contrib/science
 Architecture: amd64 i386
 Depends: openmpi-gcc | openmpi-bin,
          ${misc:Depends},


=====================================
debian/copyright
=====================================
@@ -48,16 +48,16 @@ Files: src/acc/cuda/cub/agent/*
  src/acc/cuda/cub/thread/*
  src/acc/cuda/cub/util*
  src/acc/cuda/cub/warp/*
- src/gpu-utils/cub/agent/*
- src/gpu-utils/cub/block/*
- src/gpu-utils/cub/cub.cuh
- src/gpu-utils/cub/device/*
- src/gpu-utils/cub/grid/*
- src/gpu-utils/cub/host/mutex.cuh
- src/gpu-utils/cub/iterator/*
- src/gpu-utils/cub/thread/*
- src/gpu-utils/cub/util*
- src/gpu-utils/cub/warp/*
+ src/gpu_utils/cub/agent/*
+ src/gpu_utils/cub/block/*
+ src/gpu_utils/cub/cub.cuh
+ src/gpu_utils/cub/device/*
+ src/gpu_utils/cub/grid/*
+ src/gpu_utils/cub/host/mutex.cuh
+ src/gpu_utils/cub/iterator/*
+ src/gpu_utils/cub/thread/*
+ src/gpu_utils/cub/util*
+ src/gpu_utils/cub/warp/*
 Copyright: 2011, Duane Merrill.
   2011-2016, NVIDIA CORPORATION.
   2011-2017, NVIDIA CORPORATION.


=====================================
debian/patches/0001-Repair-wrong-comment-sign-pointed-out-by-Alexey-Roma.patch
=====================================
@@ -0,0 +1,25 @@
+From 554e0ed993e5ac8a3fee4be7c5cf64a62216a8c7 Mon Sep 17 00:00:00 2001
+From: Takanori Nakane <nakane.t at gmail.com>
+Date: Tue, 9 Nov 2021 14:52:30 +0000
+Subject: [PATCH] Repair wrong comment sign (pointed out by Alexey Romanenko)
+
+---
+ src/acc/cuda/cuda_utils_cub.cuh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/acc/cuda/cuda_utils_cub.cuh b/src/acc/cuda/cuda_utils_cub.cuh
+index 3e32fb86..cf6ede21 100644
+--- a/src/acc/cuda/cuda_utils_cub.cuh
++++ b/src/acc/cuda/cuda_utils_cub.cuh
+@@ -13,7 +13,7 @@
+ 	#undef CubLog
+ #endif
+ 
+-#define CUB_NS_QUALIFIER ::cub # for compatibility with CUDA 11.5
++#define CUB_NS_QUALIFIER ::cub // for compatibility with CUDA 11.5
+ #include "src/acc/cuda/cub/device/device_radix_sort.cuh"
+ #include "src/acc/cuda/cub/device/device_reduce.cuh"
+ #include "src/acc/cuda/cub/device/device_scan.cuh"
+-- 
+2.20.1
+


=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+0001-Repair-wrong-comment-sign-pointed-out-by-Alexey-Roma.patch


=====================================
debian/relion-cuda.lintian-overrides
=====================================
@@ -1 +1 @@
-relion-cuda: binary-without-manpage
+no-manual-page


=====================================
debian/relion-cuda.triggers deleted
=====================================
@@ -1 +0,0 @@
-activate-noawait ldconfig


=====================================
debian/relion-gui-cuda.lintian-overrides
=====================================
@@ -1 +1 @@
-relion-gui-cuda: binary-without-manpage
+no-manual-page


=====================================
debian/relion-gui-cuda.triggers deleted
=====================================
@@ -1 +0,0 @@
-activate-noawait ldconfig


=====================================
debian/rules
=====================================
@@ -20,6 +20,9 @@ else
     MPICXX := mpicxx.openmpi
 endif
 
+CFLAGS		+= $(CPPFLAGS)
+CXXFLAGS	+= $(CPPFLAGS)
+
 CONFIGURE_COMMON := cmake -DCMAKE_INSTALL_PREFIX=/usr \
   -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON "-GUnix Makefiles" \
   -DCMAKE_VERBOSE_MAKEFILE=ON \
@@ -30,30 +33,21 @@ CONFIGURE_COMMON := cmake -DCMAKE_INSTALL_PREFIX=/usr \
 	dh $@
 
 override_dh_auto_configure:
-
-override_dh_auto_build:
 	mkdir $(CURDIR)/build
 	cd $(CURDIR)/build; \
-	$(CONFIGURE_COMMON) -DGUI=ON -DCUDA=ON $(CURDIR); \
-	make $(MAKE_-J); DESTDIR=$(CURDIR)/debian/tmp/cli make install
+	$(CONFIGURE_COMMON) -DCUDA_HOST_COMPILER=/usr/bin/cuda-gcc -DGUI=ON -DCUDA=ON $(CURDIR)
+
+override_dh_auto_build:
+	$(MAKE) $(MAKE_-J) -C build
+
+override_dh_auto_install:
+	$(MAKE) -C build install DESTDIR=$(CURDIR)/debian/tmp/cli
 	mkdir -p $(CURDIR)/debian/tmp/gui/usr/bin
 	rm $(CURDIR)/debian/tmp/cli/usr/bin/*.csh # Useless ...
-	for prog in relion relion_display relion_maingui relion_manualpick; do \
+	set -e; for prog in relion relion_display relion_manualpick; do \
 	  mv $(CURDIR)/debian/tmp/cli/usr/bin/$$prog \
 	    $(CURDIR)/debian/tmp/gui/usr/bin; done
 
-override_dh_prep:
-	# We don't want debian/tmp to be removed again ...
-	dh_prep -X debian/tmp
-
-override_dh_auto_install:
-
-override_dh_install-arch:
-	dh_install -a
-
 override_dh_clean:
 	dh_clean
-	-rm -rf build*
-
-get-orig-source:
-	uscan --download-current-version --force-download --rename
+	-rm -rf build


=====================================
debian/salsa-ci.yml
=====================================
@@ -0,0 +1,8 @@
+---
+include:
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
+
+variables:
+  DEB_BUILD_OPTIONS: "noautodbgsym"
+  SALSA_CI_DISABLE_BUILD_PACKAGE_I386: 1


=====================================
debian/tests/control
=====================================
@@ -1,2 +1,3 @@
 Test-Command: /usr/bin/relion_refine
-Depends: relion
+Depends: relion-cuda
+Restrictions: superficial


=====================================
debian/upstream/metadata
=====================================
@@ -1,3 +1,5 @@
+Bug-Database: https://github.com/3dem/relion/issues
+Bug-Submit: https://github.com/3dem/relion/issues/new
 Reference:
  Author: Sjors H. W. Scheres
  Title: >
@@ -18,3 +20,5 @@ Registry:
    Entry: NA
  - Name: SciCrunch
    Entry: NA
+Repository: https://github.com/3dem/relion.git
+Repository-Browse: https://github.com/3dem/relion


=====================================
debian/watch
=====================================
@@ -1,3 +1,4 @@
 version=4
 
-https://github.com/3dem/relion/releases .*/archive/(\d[\d.]+)@ARCHIVE_EXT@
+opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%@PACKAGE at -$1.tar.gz%" \
+  https://github.com/3dem/relion/releases .*/(\d[\d.]+)@ARCHIVE_EXT@


=====================================
src/jaz/Gaussian_pyramid.h.bak deleted
=====================================
@@ -1,263 +0,0 @@
-/***************************************************************************
- *
- * Author: "Jasenko Zivanov"
- * MRC Laboratory of Molecular Biology
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * This complete copyright notice must be included in any revised version of the
- * source code. Additional authorship citations may be added, but existing
- * author citations must be preserved.
- ***************************************************************************/
-
-#ifndef GAUSSIAN_PYRAMID_H
-#define GAUSSIAN_PYRAMID_H
-
-#include <src/image.h>
-#include <src/jaz/filter_helper.h>
-#include <src/jaz/resampling_helper.h>
-#include <src/jaz/vtk_helper.h>
-#include <src/jaz/image_op.h>
-#include <vector>
-
-template <typename T>
-class GaussianPyramid
-{
-    public:
-
-        GaussianPyramid(const Image<T>& img, double sigma = 1.0, double cutoff = 2.5,
-                        int maxLev = -1, int initial = 3);
-
-            double sigma, cutoff;
-            int initial;
-            std::vector<Image<T>> levels;
-            std::vector<double> scales;
-
-        T value(double x, double y, double s);
-
-        std::vector<Image<T>> getUpsampled();
-        Image<T> getUpsampledLevel(int i);
-        Image<T> getInterpolated(double sig);
-
-        static void test(const Image<T>& img);
-        static void interpolationTest(const Image<T>& img);
-
-};
-
-template <typename T>
-GaussianPyramid<T>::GaussianPyramid(const Image<T>& img, double sigma, double cutoff, int maxLev, int initial)
-:   sigma(sigma), cutoff(cutoff), initial(initial), levels(0), scales(0)
-{
-    int w0 = img.data.xdim;
-    int h0 = img.data.ydim;
-
-    int w = w0;
-    int h = h0;
-
-    Image<T> curr = img;
-    double currScale = 1.0;
-    double currL0Var = 0.0;
-    double wLast = w;
-
-    if (PI * sigma < cutoff)
-    {
-        REPORT_ERROR("GaussianPyramid::GaussianPyramid: unable to shrink image levels - cutoff too large.\n");
-    }
-
-    levels.push_back(curr);
-    scales.push_back(currScale);
-
-    double dScale = PI * sigma / cutoff;
-    int i = 0;
-
-    for (int j = 0; j < initial; j++)
-    {
-        const double sig = (j+1)*sigma/(double)(initial+1);
-
-        Image<T> filt;
-        FilterHelper::separableGaussianXY(levels[0], filt, sig, 3*sigma, true);
-
-        levels.push_back(filt);
-        scales.push_back(1.0);
-    }
-
-    if (maxLev < 0) maxLev = floor(log((double)w0)/log(dScale));
-
-    while (i < maxLev)
-    {
-        double tgtSigma_l0 = sigma * pow(dScale, i);
-
-        double dSigma = sqrt(tgtSigma_l0 * tgtSigma_l0 - currL0Var) / currScale;
-        currL0Var += currScale * currScale * dSigma * dSigma;
-
-        int wNext = (int)(w / currScale + 0.5);
-        double dScaleAct = wLast / wNext;
-        wLast = wNext;
-
-        currScale *= dScaleAct;
-
-        Image<T> filt, next;
-        FilterHelper::separableGaussianXY(curr, filt, dSigma, 3*dSigma, true);
-        ResamplingHelper::subsample2D_cubic(filt, dScaleAct, next);
-
-        levels.push_back(next);
-        scales.push_back(currScale);
-        curr = next;
-
-        i++;
-    }
-}
-
-template<typename T>
-std::vector<Image<T>> GaussianPyramid<T>::getUpsampled()
-{
-    std::vector<Image<T>> out(levels.size());
-
-    out[0] = levels[0];
-
-    for (int i = 1; i < levels.size(); i++)
-    {
-        ResamplingHelper::upsample2D_cubic(levels[i], scales[i], out[i], true);
-    }
-
-    return out;
-}
-
-template<typename T>
-Image<T> GaussianPyramid<T>::getUpsampledLevel(int i)
-{
-    Image<T> out;
-    ResamplingHelper::upsample2D_cubic(levels[i], scales[i], out, true);
-    return out;
-}
-
-template<typename T>
-Image<T> GaussianPyramid<T>::getInterpolated(double sig)
-{
-    Image<T> out(levels[0].data.xdim, levels[0].data.ydim);
-
-    if (sig <= 0) return levels[0];
-    else if (sig < sigma)
-    {
-        // s = j*sigma/(double)(initial+1)
-        // <=>
-        // j = (initial+1)*s/sigma
-
-        double l = (initial+1)*sig/sigma;
-        int l0 = (int)l;
-        double f = l - l0;
-
-        Image<T> img0 = levels[l0];
-        Image<T> img1 = levels[l0+1];
-
-        ImageOp::linearCombination(img0, img1, 1.0 - f, f, out);
-    }
-    else
-    {
-        double lambda = PI * sigma / cutoff;
-        double l = log(sig/sigma) / log(lambda) + 1.0 + initial;
-
-        int l0 = (int)l;
-        double f = l - l0;
-
-        if (l0 >= levels.size()-1) return levels[levels.size()-1];
-
-
-        Image<T> img0 = getUpsampledLevel(l0);
-        Image<T> img1 = getUpsampledLevel(l0+1);
-
-        ImageOp::linearCombination(img0, img1, 1.0 - f, f, out);
-    }
-
-    return out;
-}
-
-template <typename T>
-void GaussianPyramid<T>::test(const Image<T>& img)
-{
-    int lev = 4;
-    int mp = 20;
-    double k = 2.5;
-    double sg = 1.0;
-
-    GaussianPyramid<T> gp(img, 1.0, 2.5, lev);
-
-    std::vector<Image<T>> test(lev*mp), baseline(lev*mp);
-
-    double lambda = PI*sg/k;
-
-    for (int i = 0; i < lev; i++)
-    for (int j = 0; j < mp; j++)
-    {
-        double t = (mp*i + j)/(double)(mp);
-        double sig = t < 1.0? sg * t : sg * pow(lambda,t-1);
-
-        test[mp*i + j] = gp.getInterpolated(sig);
-        FilterHelper::separableGaussianXY(img, baseline[mp*i + j], sig, 3*sig, true);
-    }
-
-    VtkHelper::write(test, "debug/pyr_interpolated.vtk");
-    VtkHelper::write(baseline, "debug/pyr_baseline.vtk");
-}
-
-
-template<typename T>
-void GaussianPyramid<T>::interpolationTest(const Image<T> &img)
-{
-    const double ds = 0.25;
-
-    for (double s0 = 0.0; s0 < 2.0; s0 += ds)
-    {
-        double s1 = s0 + ds;
-
-        Image<T> img0, img1, imgP, imgT;
-
-        FilterHelper::separableGaussianXY(img, img0, s0, 6, true);
-        FilterHelper::separableGaussianXY(img, img1, s1, 6, true);
-
-        imgT.data.resize(img.data);
-
-        std::stringstream stss0;
-        stss0 << s0;
-        std::stringstream stss1;
-        stss1 << s1;
-
-        std::ofstream ofs("debug/interp_"+stss0.str()+"-"+stss1.str()+".dat");
-
-        for (double p = s0; p <= s1; p += ds/50.0)
-        {
-            FilterHelper::separableGaussianXY(img, imgP, p, 6, true);
-
-            double c_min = 1e20;
-            double t_opt = 0.0;
-
-            for (double t = 0.0; t < 1.0; t += 0.005)
-            {
-                ImageOp::linearCombination(img0, img1, 1.0 - t, t, imgT);
-
-                double c = FilterHelper::L2distance(imgT, imgP);
-
-                if (c < c_min)
-                {
-                    c_min = c;
-                    t_opt = t;
-                }
-            }
-
-            ofs << p << " " << s0 + t_opt*(s1 - s0) << "\n";
-            std::cout << p << " between " << s0 << " and " << s1 << ": t = " << t_opt << "\n";
-        }
-
-        std::cout << "\n";
-    }
-}
-
-#endif



View it on GitLab: https://salsa.debian.org/med-team/relion/-/compare/a7d875a7df3627c91a2669de40588644eabd4f8e...d4d2aa0ad052754a1609bc5342cf0bb61ad31b50

-- 
View it on GitLab: https://salsa.debian.org/med-team/relion/-/compare/a7d875a7df3627c91a2669de40588644eabd4f8e...d4d2aa0ad052754a1609bc5342cf0bb61ad31b50
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/20220927/64e6ba7b/attachment-0001.htm>


More information about the debian-med-commit mailing list