[med-svn] r17483 - in trunk/packages/insighttoolkit/trunk/debian: . patches

Gert Wollny gert-guest at moszumanska.debian.org
Sat Jul 19 08:43:27 UTC 2014


Author: gert-guest
Date: 2014-07-19 08:43:27 +0000 (Sat, 19 Jul 2014)
New Revision: 17483

Added:
   trunk/packages/insighttoolkit/trunk/debian/patches/0002_OtsuMultipleThresholdsCalculator-accurray.patch
   trunk/packages/insighttoolkit/trunk/debian/patches/0003_VoronoiSegmentationTestTolerance.patch
Modified:
   trunk/packages/insighttoolkit/trunk/debian/changelog
   trunk/packages/insighttoolkit/trunk/debian/control.in
   trunk/packages/insighttoolkit/trunk/debian/patches/series
Log:
add Gianfranco's updates and upstream patches to fix tests that fail on i386

Modified: trunk/packages/insighttoolkit/trunk/debian/changelog
===================================================================
--- trunk/packages/insighttoolkit/trunk/debian/changelog	2014-07-19 08:32:40 UTC (rev 17482)
+++ trunk/packages/insighttoolkit/trunk/debian/changelog	2014-07-19 08:43:27 UTC (rev 17483)
@@ -1,3 +1,17 @@
+insighttoolkit4 (4.5.2-4) unstable; urgency=medium
+
+  * Team upload.
+
+  [ Gianfranco Costamagna ]
+  * control.in: bump gccxml dep to 0.9.0+git20140716-1 to ensure
+    up-to-date support for GCC 4.9.
+
+  [ Gert Wollny ]
+  * Add patch to increase OtsuThreshold computation precision
+  * Add patch to increase itkVoronoiPartitioningImageFilterTest1 tolerance
+
+ -- Gianfranco Costamagna <costamagnagianfranco at yahoo.it>  Wed, 16 Jul 2014 12:07:29 +0200
+
 insighttoolkit4 (4.5.2-3) unstable; urgency=medium
 
   * control.in: bump gccxml dep to 0.9.0+git20140610-2 to ensure

Modified: trunk/packages/insighttoolkit/trunk/debian/control.in
===================================================================
--- trunk/packages/insighttoolkit/trunk/debian/control.in	2014-07-19 08:32:40 UTC (rev 17482)
+++ trunk/packages/insighttoolkit/trunk/debian/control.in	2014-07-19 08:43:27 UTC (rev 17483)
@@ -8,7 +8,7 @@
 Build-Depends: debhelper (>= 9),
  	cmake, 
 	swig (>= 2.0), 
-	gccxml (>= 0.9.0+git20140610-2),
+	gccxml (>= 0.9.0+git20140716-1),
 	zlib1g-dev (>= 1.2.2), 
 	libpng12-dev, 
 	libtiff-dev,

Added: trunk/packages/insighttoolkit/trunk/debian/patches/0002_OtsuMultipleThresholdsCalculator-accurray.patch
===================================================================
--- trunk/packages/insighttoolkit/trunk/debian/patches/0002_OtsuMultipleThresholdsCalculator-accurray.patch	                        (rev 0)
+++ trunk/packages/insighttoolkit/trunk/debian/patches/0002_OtsuMultipleThresholdsCalculator-accurray.patch	2014-07-19 08:43:27 UTC (rev 17483)
@@ -0,0 +1,84 @@
+Description: stabelize floating point operations in OtsuMultipleThresholdsCalculator 
+Origin: upstream
+Applied-Upstream: Expected to land in v4.6 
+diff --git a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx
+index fbf7c33..6abf5d9 100644
+--- a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx
++++ b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx
+@@ -18,6 +18,7 @@
+ #ifndef __itkOtsuMultipleThresholdsCalculator_hxx
+ #define __itkOtsuMultipleThresholdsCalculator_hxx
+ 
++#include "itkMath.h"
+ #include "itkOtsuMultipleThresholdsCalculator.h"
+ 
+ namespace itk
+@@ -53,11 +54,8 @@ OtsuMultipleThresholdsCalculator< TInputHistogram >
+ {
+   typename TInputHistogram::ConstPointer histogram = this->GetInputHistogram();
+ 
+-  SizeValueType numberOfHistogramBins = histogram->Size();
+-  SizeValueType numberOfClasses = classMean.size();
+-
+-  MeanType      meanOld;
+-  FrequencyType freqOld;
++  const SizeValueType numberOfHistogramBins = histogram->Size();
++  const SizeValueType numberOfClasses = classMean.size();
+ 
+   unsigned int k;
+   int          j;
+@@ -73,8 +71,8 @@ OtsuMultipleThresholdsCalculator< TInputHistogram >
+       // threshold
+       ++thresholdIndexes[j];
+ 
+-      meanOld = classMean[j];
+-      freqOld = classFrequency[j];
++      const MeanType meanOld = classMean[j];
++      const FrequencyType freqOld = classFrequency[j];
+ 
+       classFrequency[j] += histogram->GetFrequency(thresholdIndexes[j]);
+ 
+@@ -165,7 +163,7 @@ OtsuMultipleThresholdsCalculator< TInputHistogram >
+   typename TInputHistogram::ConstIterator end = histogram->End();
+ 
+   MeanType      globalMean = NumericTraits< MeanType >::Zero;
+-  FrequencyType globalFrequency = histogram->GetTotalFrequency();
++  const FrequencyType globalFrequency = histogram->GetTotalFrequency();
+   while ( iter != end )
+     {
+     globalMean += static_cast< MeanType >( iter.GetMeasurementVector()[0] )
+@@ -235,9 +233,10 @@ OtsuMultipleThresholdsCalculator< TInputHistogram >
+   VarianceType maxVarBetween = NumericTraits< VarianceType >::Zero;
+   for ( j = 0; j < numberOfClasses; j++ )
+     {
+-    maxVarBetween += (static_cast< VarianceType >( classFrequency[j] ) / static_cast< VarianceType >( globalFrequency ))
++    maxVarBetween += (static_cast< VarianceType >( classFrequency[j] ))
+       * static_cast< VarianceType >( ( classMean[j] ) * ( classMean[j] ) );
+     }
++  maxVarBetween /= static_cast< VarianceType >( globalFrequency );
+ 
+   // Sum the relevant weights for valley emphasis
+   WeightType valleyEmphasisFactor = NumericTraits< WeightType >::Zero;
+@@ -270,9 +269,10 @@ OtsuMultipleThresholdsCalculator< TInputHistogram >
+       // Since we are looking for the argmax, the second term can be ignored because it is a constant, leading to the simpler
+       // (\sum_{k=1}^{M} \omega_k \mu_k^2), which is what is implemented here.
+       // Although this is no longer truly a "between class variance", we keep that name since it is only different by a constant.
+-      varBetween += (static_cast< VarianceType >( classFrequency[j] ) / static_cast< VarianceType >( globalFrequency ))
++      varBetween += (static_cast< VarianceType >( classFrequency[j] ))
+               * static_cast< VarianceType >( ( classMean[j] ) * ( classMean[j] ) );
+       }
++    varBetween /= static_cast< VarianceType >( globalFrequency );
+ 
+     if (m_ValleyEmphasis)
+     {
+@@ -286,7 +286,9 @@ OtsuMultipleThresholdsCalculator< TInputHistogram >
+       varBetween = varBetween * valleyEmphasisFactor;
+     }
+ 
+-    if ( varBetween > maxVarBetween )
++    const unsigned int maxUlps = 1;
++    if ( varBetween > maxVarBetween &&
++         !Math::FloatAlmostEqual( maxVarBetween, varBetween, maxUlps) )
+       {
+       maxVarBetween = varBetween;
+       maxVarThresholdIndexes = thresholdIndexes;

Added: trunk/packages/insighttoolkit/trunk/debian/patches/0003_VoronoiSegmentationTestTolerance.patch
===================================================================
--- trunk/packages/insighttoolkit/trunk/debian/patches/0003_VoronoiSegmentationTestTolerance.patch	                        (rev 0)
+++ trunk/packages/insighttoolkit/trunk/debian/patches/0003_VoronoiSegmentationTestTolerance.patch	2014-07-19 08:43:27 UTC (rev 17483)
@@ -0,0 +1,16 @@
+Description: increase test tolerance in  itkVoronoiPartitioningImageFilterTest1
+Origin: upstream
+Applied-Upstream: Expected to land in v4.6 
+
+diff --git a/Modules/Segmentation/Voronoi/test/CMakeLists.txt b/Modules/Segmentation/Voronoi/test/CMakeLists.txt
+index 2555b59..5516319 100644
+--- a/Modules/Segmentation/Voronoi/test/CMakeLists.txt
++++ b/Modules/Segmentation/Voronoi/test/CMakeLists.txt
+@@ -16,6 +16,7 @@ itk_add_test(NAME itkVoronoiDiagram2DTest
+       COMMAND ITKVoronoiTestDriver itkVoronoiDiagram2DTest ${ITK_TEST_OUTPUT_DIR}/VoronoiDiagram2DTest.vtk)
+ itk_add_test(NAME itkVoronoiPartitioningImageFilterTest1
+       COMMAND ITKVoronoiTestDriver
++    --compareNumberOfPixelsTolerance 20
+     --compare DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/VoronoiPartioningImageFilterTest1.png,:}
+               ${ITK_TEST_OUTPUT_DIR}/VoronoiPartioningImageFilterTest1.png
+     itkVoronoiPartitioningImageFilterTest DATA{${ITK_DATA_ROOT}/Input/sf4.png} ${ITK_TEST_OUTPUT_DIR}/VoronoiPartioningImageFilterTest1.png 1)

Modified: trunk/packages/insighttoolkit/trunk/debian/patches/series
===================================================================
--- trunk/packages/insighttoolkit/trunk/debian/patches/series	2014-07-19 08:32:40 UTC (rev 17482)
+++ trunk/packages/insighttoolkit/trunk/debian/patches/series	2014-07-19 08:43:27 UTC (rev 17483)
@@ -1,3 +1,5 @@
 nrrdio-linking.patch
 bsd-hdf5.patch
 0005-make-gdcm-helper-library-static.patch
+0002_OtsuMultipleThresholdsCalculator-accurray.patch
+0003_VoronoiSegmentationTestTolerance.patch




More information about the debian-med-commit mailing list