[med-svn] [SCM] mia branch, master, updated. upstream/2.0.8-71-g67bbbd6

2013-03-06 Thread Gert Wollny
The following commit has been merged in the master branch:
commit fff29df7fa59ab9eb148dbd825b12785f9986d3e
Author: Gert Wollny gw.foss...@gmail.com
Date:   Fri Mar 1 15:34:13 2013 +0100

add patch to correct tests that fail on i386 for floating point accuracy 
problems

diff --git a/debian/patches/05_relax_floating_point_test_comparisons.patch 
b/debian/patches/05_relax_floating_point_test_comparisons.patch
new file mode 100644
index 000..1f462db
--- /dev/null
+++ b/debian/patches/05_relax_floating_point_test_comparisons.patch
@@ -0,0 +1,144 @@
+Description: This patch relaxes floating point comparisons in tests 
+ This patch changes some tests to better compare valus that should be zero.
+ Since floating point operations are normally not completely accurate, 
+ some tests that would otherwise fail on i386 are not passing. 
+ .
+ mia (2.0.8-1~ubuntu1) precise; urgency=low
+ .
+   * backport to Ubuntu precise
+Author: Gert Wollny gw.foss...@gmail.com
+
+Origin: upstream
+Forwarded: not-needed
+Last-Update: 2013-03-01
+
+--- mia-2.0.8.orig/mia/2d/test_segframe.cc
 mia-2.0.8/mia/2d/test_segframe.cc
+@@ -258,9 +258,9 @@ BOOST_FIXTURE_TEST_CASE(test_frame_get_m
+ BOOST_FIXTURE_TEST_CASE(test_frame_get_mask_different, FrameTestRead)
+ {
+ 
+-  CSegPoint2D center(7.5,7.5); 
++  CSegPoint2D center(7.6,7.59); 
+   float r = 4; 
+-  CSegPoint2D d1(1.0,0); 
++  CSegPoint2D d1(1.0, 0.0); 
+   CSegPoint2D d2(0.0,-1.0); 
+   CSegPoint2D d3(-1.0,0.0); 
+   CSegStar star(center, r, d1, d2, d3); 
+@@ -310,15 +310,15 @@ BOOST_FIXTURE_TEST_CASE(test_frame_get_m
+ /*x  */   
+   /*8*/   0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0,
+   
+-  /*9*/   0, 4, 4, 4, 4, 4, 0, 0, 2, 1, 1, 1, 1, 0, 0, 0,
++  /*9*/   0, 4, 4, 4, 4, 4, 0, 0, 2, 2, 1, 1, 1, 0, 0, 0,
+   
+-  /*10*/  0, 0, 4, 4, 4, 4, 3, 3, 2, 2, 2, 1, 0, 0, 0, 0,
++  /*10*/  0, 0, 4, 4, 4, 4, 3, 3, 2, 2, 2, 1, 1, 0, 0, 0,
+   
+   /*11*/  0, 0, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 0, 0, 0, 0,
+   
+   /*12*/  0, 0, 0, 4, 3, 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0,
+   
+-  /*13*/  0, 0, 0, 0, 0, 3, 3, 3, 2, 0, 0, 0, 0, 0, 0, 0,
++  /*13*/  0, 0, 0, 0, 0, 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0,
+   
+   /*14*/  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+   
+--- mia-2.0.8.orig/mia/2d/test_rigidregister.cc
 mia-2.0.8/mia/2d/test_rigidregister.cc
+@@ -243,7 +243,7 @@ BOOST_AUTO_TEST_CASE( test_rigidreg_affi
+ 
+ BOOST_FIXTURE_TEST_CASE( test_rigidreg_rigid_gd, RigidRegisterFixture )
+ {
+-  auto tr_creator = 
C2DTransformCreatorHandler::instance().produce(rigid:imgboundary=repeat);
++  auto tr_creator = 
C2DTransformCreatorHandler::instance().produce(rigid:imgboundary=zero);
+   auto transformation = tr_creator-create(size); 
+   auto params = transformation-get_parameters(); 
+   params[0] = 1.0;
+--- mia-2.0.8.orig/mia/2d/SegFrame.cc
 mia-2.0.8/mia/2d/SegFrame.cc
+@@ -267,7 +267,8 @@ C2DUBImage CSegFrame::get_section_masks(
+   for (size_t y = 0; y  result.get_size().y; ++y)  {
+   for (size_t x = 0; x  result.get_size().x; ++x, ++i)  {
+   if (*i) {
+-  const C2DFVector ray_b(x - 
m_star.m_center.x, y - m_star.m_center.y); 
++  const C2DFVector 
ray_b(static_castfloat(x) - m_star.m_center.x, 
++ 
static_castfloat(y) - m_star.m_center.y); 
+   double a = scale * angle(ray_a, ray_b);
+   if (a = n_sections) 
+   a -= n_sections; 
+--- mia-2.0.8.orig/mia/2d/transform/test_vectorfield.cc
 mia-2.0.8/mia/2d/transform/test_vectorfield.cc
+@@ -94,17 +94,25 @@ BOOST_FIXTURE_TEST_CASE(test_gridtransfo
+   C2DFMatrix dv =  field.derivative_at(x, y);
+   if ( x  0  x  size.x- 1) {
+   BOOST_CHECK_CLOSE(dv.x.x, 1.0f - dfx_x(x, y), 
1);
+-  BOOST_CHECK_CLOSE(dv.x.y, -dfy_x(x, y), 1);
++  float test_value = -dfy_x(x, y); 
++  if (fabs(test_value)  1e-10) 
++  BOOST_CHECK_SMALL(dv.x.y,1e-10f);
++  else 
++  BOOST_CHECK_CLOSE(dv.x.y, test_value, 
0.1);
+   }else {
+-  BOOST_CHECK_EQUAL(dv.x.x, 1.0f);
+-  BOOST_CHECK_EQUAL(dv.x.y, 0);
++  BOOST_CHECK_CLOSE(dv.x.x, 1.0f, 0.1);
++  

[med-svn] [SCM] mia branch, master, updated. upstream/2.0.8-71-g67bbbd6

2013-03-06 Thread Gert Wollny
The following commit has been merged in the master branch:
commit d205281607d612fb54508e680ffb27c273be7044
Author: Gert Wollny gw.foss...@gmail.com
Date:   Fri Mar 1 15:35:16 2013 +0100

add patch to correct tests that fail on i386 for floating point accuracy 
problems

diff --git a/mia/2d/SegFrame.cc b/mia/2d/SegFrame.cc
index e1ed3e2..c5899b7 100644
--- a/mia/2d/SegFrame.cc
+++ b/mia/2d/SegFrame.cc
@@ -267,7 +267,8 @@ C2DUBImage CSegFrame::get_section_masks(size_t n_sections) 
const
for (size_t y = 0; y  result.get_size().y; ++y)  {
for (size_t x = 0; x  result.get_size().x; ++x, ++i)  {
if (*i) {
-   const C2DFVector ray_b(x - 
m_star.m_center.x, y - m_star.m_center.y); 
+   const C2DFVector 
ray_b(static_castfloat(x) - m_star.m_center.x, 
+  
static_castfloat(y) - m_star.m_center.y); 
double a = scale * angle(ray_a, ray_b);
if (a = n_sections) 
a -= n_sections; 
diff --git a/mia/2d/cost/test_lsd.cc b/mia/2d/cost/test_lsd.cc
index 56e04cf..b490f5c 100644
--- a/mia/2d/cost/test_lsd.cc
+++ b/mia/2d/cost/test_lsd.cc
@@ -46,14 +46,14 @@ BOOST_FIXTURE_TEST_CASE( test_LSD_2D_self, LSDFixture )
cost.set_reference(*src);

double cost_value = cost.value(*src);
-   BOOST_CHECK_CLOSE(cost_value, 0.0, 0.1);
+   BOOST_CHECK_SMALL(cost_value, 1e-10);
 
C2DFVectorfield force(C2DBounds(8,8));
 
BOOST_CHECK_CLOSE(cost.evaluate_force(*src, force), 0.0, 0.1);
 
-   BOOST_CHECK_EQUAL(force(1,1).x, 0.0f);
-   BOOST_CHECK_EQUAL(force(1,1).y, 0.0f);
+   BOOST_CHECK_SMALL(force(1,1).x, 1e-10f);
+   BOOST_CHECK_SMALL(force(1,1).y, 1e-10f);

 }
 
@@ -71,8 +71,17 @@ BOOST_FIXTURE_TEST_CASE( test_LSD_2D, LSDFixture )
 
 
for (auto iforce = force.begin(), ig = grad.begin(); ig != grad.end(); 
++ig, ++iforce) {
-   BOOST_CHECK_CLOSE(iforce-x, ig-x, 0.1f);
-   BOOST_CHECK_CLOSE(iforce-y, ig-y, 0.1f);
+   if (ig-x == 0.0) 
+   BOOST_CHECK_SMALL(iforce-x, 1e-10f); 
+   else 
+   BOOST_CHECK_CLOSE(iforce-x, ig-x, 0.1f);
+
+   if (ig-y == 0.0) 
+   BOOST_CHECK_SMALL(iforce-y, 1e-10f); 
+   else 
+   BOOST_CHECK_CLOSE(iforce-y, ig-y, 0.1f);
+   
+
}; 
 }
 
diff --git a/mia/2d/test_rigidregister.cc b/mia/2d/test_rigidregister.cc
index 3ab527d..509e50d 100644
--- a/mia/2d/test_rigidregister.cc
+++ b/mia/2d/test_rigidregister.cc
@@ -243,7 +243,7 @@ BOOST_AUTO_TEST_CASE( test_rigidreg_affine_cost_gradient ) 
//, RigidRegisterFixt
 
 BOOST_FIXTURE_TEST_CASE( test_rigidreg_rigid_gd, RigidRegisterFixture )
 {
-   auto tr_creator = 
C2DTransformCreatorHandler::instance().produce(rigid:imgboundary=repeat);
+   auto tr_creator = 
C2DTransformCreatorHandler::instance().produce(rigid:imgboundary=zero);
auto transformation = tr_creator-create(size); 
auto params = transformation-get_parameters(); 
params[0] = 1.0;
diff --git a/mia/2d/test_segframe.cc b/mia/2d/test_segframe.cc
index d3f9c3a..8dbb538 100644
--- a/mia/2d/test_segframe.cc
+++ b/mia/2d/test_segframe.cc
@@ -258,9 +258,9 @@ BOOST_FIXTURE_TEST_CASE(test_frame_get_mask, FrameTestRead)
 BOOST_FIXTURE_TEST_CASE(test_frame_get_mask_different, FrameTestRead)
 {
 
-   CSegPoint2D center(7.5,7.5); 
+   CSegPoint2D center(7.6,7.59); 
float r = 4; 
-   CSegPoint2D d1(1.0,0); 
+   CSegPoint2D d1(1.0, 0.0); 
CSegPoint2D d2(0.0,-1.0); 
CSegPoint2D d3(-1.0,0.0); 
CSegStar star(center, r, d1, d2, d3); 
@@ -310,15 +310,15 @@ BOOST_FIXTURE_TEST_CASE(test_frame_get_mask_different, 
FrameTestRead)
 /*x  */   
/*8*/   0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0,

-   /*9*/   0, 4, 4, 4, 4, 4, 0, 0, 2, 1, 1, 1, 1, 0, 0, 0,
+   /*9*/   0, 4, 4, 4, 4, 4, 0, 0, 2, 2, 1, 1, 1, 0, 0, 0,

-   /*10*/  0, 0, 4, 4, 4, 4, 3, 3, 2, 2, 2, 1, 0, 0, 0, 0,
+   /*10*/  0, 0, 4, 4, 4, 4, 3, 3, 2, 2, 2, 1, 1, 0, 0, 0,

/*11*/  0, 0, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 0, 0, 0, 0,

/*12*/  0, 0, 0, 4, 3, 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0,

-   /*13*/  0, 0, 0, 0, 0, 3, 3, 3, 2, 0, 0, 0, 0, 0, 0, 0,
+   /*13*/  0, 0, 0, 0, 0, 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0,

/*14*/  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

diff --git a/mia/2d/transform/test_vectorfield.cc 

[med-svn] [SCM] mia branch, master, updated. upstream/2.0.8-71-g67bbbd6

2013-03-06 Thread Gert Wollny
The following commit has been merged in the master branch:
commit 39bc89829d67d21789679eeeafe724ce1814aed7
Author: Gert Wollny gw.foss...@gmail.com
Date:   Mon Mar 4 17:02:34 2013 +0100

add patch to correct pkg-config include path

diff --git a/debian/changelog b/debian/changelog
index fa03dc2..12947ed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+mia (2.0.8-2) UNRELEASED; urgency=low
+
+  * correct tests on i386
+  * correct pkg-config provided include path
+
+ -- Gert Wollny gw.foss...@gmail.com  Mon, 04 Mar 2013 17:01:25 +0100
+
 mia (2.0.8-1) unstable; urgency=low
 
   * Initial release (Closes: #694437)
diff --git a/debian/patches/06_correct_pkgconfig_include_path.patch 
b/debian/patches/06_correct_pkgconfig_include_path.patch
new file mode 100644
index 000..0d2d91c
--- /dev/null
+++ b/debian/patches/06_correct_pkgconfig_include_path.patch
@@ -0,0 +1,10 @@
+diff --git a/miacore.pc.cmake b/miacore.pc.cmake
+index 7b66318..feefd63 100644
+--- a/miacore.pc.cmake
 b/miacore.pc.cmake
+@@ -14,4 +14,4 @@ Version: @PACKAGE_VERSION@
+ Conflicts:
+ Requires: @PKG_CONFIG_DEPS@ 
+ Libs: -lmiacore-@VERSION@ @MIA_DEPEND_LIBRARIES@ 
-L${prefix}/@LIBRARY_INSTALL_PATH@
+-Cflags: -I${prefix}/@INCLUDE_INSTALL_PATH@ 
-I${prefix}/@LIB_INCLUDE_INSTALL_PATH@
++Cflags: -I${prefix}/@INCLUDE_INSTALL_PATH@ -I@LIB_INCLUDE_INSTALL_PATH@
diff --git a/debian/patches/series b/debian/patches/series
index cef166b..acc1723 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 03_fix_test_close_to_zero.patch
 04_silence_ambiguous_function_warning.patch
 05_relax_floating_point_test_comparisons.patch
+06_correct_pkgconfig_include_path.patch
diff --git a/miacore.pc.cmake b/miacore.pc.cmake
index 7b66318..feefd63 100644
--- a/miacore.pc.cmake
+++ b/miacore.pc.cmake
@@ -14,4 +14,4 @@ Version: @PACKAGE_VERSION@
 Conflicts:
 Requires: @PKG_CONFIG_DEPS@ 
 Libs: -lmiacore-@VERSION@ @MIA_DEPEND_LIBRARIES@ 
-L${prefix}/@LIBRARY_INSTALL_PATH@
-Cflags: -I${prefix}/@INCLUDE_INSTALL_PATH@ 
-I${prefix}/@LIB_INCLUDE_INSTALL_PATH@
+Cflags: -I${prefix}/@INCLUDE_INSTALL_PATH@ -I@LIB_INCLUDE_INSTALL_PATH@

-- 
Packaging of mia in Debian

___
debian-med-commit mailing list
debian-med-commit@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit


[med-svn] [SCM] mia branch, master, updated. upstream/2.0.8-71-g67bbbd6

2013-03-06 Thread Gert Wollny
The following commit has been merged in the master branch:
commit 2532957bef2ed8721df5495e17db77b2bfb5f29b
Author: Gert Wollny gw.foss...@gmail.com
Date:   Tue Mar 5 11:58:49 2013 +0100

Add description to the patch

diff --git a/debian/patches/06_correct_pkgconfig_include_path.patch 
b/debian/patches/06_correct_pkgconfig_include_path.patch
index 0d2d91c..1e1eae7 100644
--- a/debian/patches/06_correct_pkgconfig_include_path.patch
+++ b/debian/patches/06_correct_pkgconfig_include_path.patch
@@ -1,3 +1,16 @@
+Description: Correct the pkg-config file for proper include path specification
+ This patch corrects an error in the include path specification of the 
pkg-config 
+ files required by software using MIA. 
+ .
+ mia (2.0.8-2) precise; urgency=low
+ .
+   * backport to Ubuntu precise
+Author: Gert Wollny gw.foss...@gmail.com
+
+Origin: upstream
+Forwarded: not-needed
+Last-Update: 2013-03-04
+
 diff --git a/miacore.pc.cmake b/miacore.pc.cmake
 index 7b66318..feefd63 100644
 --- a/miacore.pc.cmake

-- 
Packaging of mia in Debian

___
debian-med-commit mailing list
debian-med-commit@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit


[med-svn] [SCM] mia branch, master, updated. upstream/2.0.8-71-g67bbbd6

2013-03-06 Thread Gert Wollny
The following commit has been merged in the master branch:
commit b41e4f15bd096e31ca9044913207422c7de16776
Author: Gert Wollny gw.foss...@gmail.com
Date:   Tue Mar 5 12:00:19 2013 +0100

correct patches to include the debian comments

diff --git a/debian/patches/05_relax_floating_point_test_comparisons.patch 
b/debian/patches/05_relax_floating_point_test_comparisons.patch
index 1f462db..08f7bed 100644
--- a/debian/patches/05_relax_floating_point_test_comparisons.patch
+++ b/debian/patches/05_relax_floating_point_test_comparisons.patch
@@ -3,7 +3,7 @@ Description: This patch relaxes floating point comparisons in 
tests
  Since floating point operations are normally not completely accurate, 
  some tests that would otherwise fail on i386 are not passing. 
  .
- mia (2.0.8-1~ubuntu1) precise; urgency=low
+ mia (2.0.8-2) UNRELEASE; urgency=low
  .
* backport to Ubuntu precise
 Author: Gert Wollny gw.foss...@gmail.com
diff --git a/debian/patches/06_correct_pkgconfig_include_path.patch 
b/debian/patches/06_correct_pkgconfig_include_path.patch
index 1e1eae7..e874978 100644
--- a/debian/patches/06_correct_pkgconfig_include_path.patch
+++ b/debian/patches/06_correct_pkgconfig_include_path.patch
@@ -2,7 +2,7 @@ Description: Correct the pkg-config file for proper include 
path specification
  This patch corrects an error in the include path specification of the 
pkg-config 
  files required by software using MIA. 
  .
- mia (2.0.8-2) precise; urgency=low
+ mia (2.0.8-2) UNRELEASE; urgency=low
  .
* backport to Ubuntu precise
 Author: Gert Wollny gw.foss...@gmail.com

-- 
Packaging of mia in Debian

___
debian-med-commit mailing list
debian-med-commit@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit