]> Creatis software - clitk.git/commitdiff
BLUT transform in threaded mode
authorRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Wed, 16 Nov 2011 14:47:36 +0000 (15:47 +0100)
committerRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Wed, 16 Nov 2011 14:47:36 +0000 (15:47 +0100)
- Guarantees that the treaded version of the class will be invoked
+ obs: this change has no effect on the current version (of clitkBLUTDIR) yet, it's just for consistenty with similar changes made in clitkResampleImage

itk/clitkVectorBSplineDecompositionImageFilter.txx
itk/clitkVectorBSplineInterpolateImageFunctionWithLUT.h
itk/clitkVectorBSplineInterpolateImageFunctionWithLUT.txx

index 6161d22a8ff9e83390cc5bb4cd1a2b17c170062a..d64829ba09ac6c3cc87ac5eda11449ecfccd7484 100644 (file)
@@ -18,6 +18,7 @@
 #ifndef _clitkVectorBSplineDecompositionImageFilter_txx
 #define _clitkVectorBSplineDecompositionImageFilter_txx
 #include "clitkVectorBSplineDecompositionImageFilter.h"
+#include "clitkDD.h"
 #include "itkImageRegionConstIteratorWithIndex.h"
 #include "itkImageRegionIterator.h"
 #include "itkProgressReporter.h"
index 2b6d54d1776f686d130d39c7b43d5fc5027cfb1c..5bcbd8aff4f961d60c65bfbc8aed0b46cb5e6327 100644 (file)
@@ -84,6 +84,15 @@ namespace clitk {
     //void SetOutputSpacing(const SpacingType & s);
     //void SetInputImageIsCoefficient(bool inputIsCoef) { mInputIsCoef = inputIsCoef; }
 
+    /** Evaluate the function at a ContinuousIndex position.
+  Overwritten for taking LUT into account (RP: multi-threading-compatible version, 
+  the threadID is actually ignored) */  
+    virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType & index, unsigned int /* threadID */ ) const
+    {
+      std::cout << "EvaluateAtContinuousIndex" << std::endl;
+      return this->EvaluateAtContinuousIndex( index );
+    }
+
     /** Evaluate the function at a ContinuousIndex position.
        Overwritten for taking LUT into account */  
     virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType & index ) const;
index 8ea6e0ab09041fa78dec8878c96d74c762c5942f..4c66a2cb85fe0beb2210a25d641caeca364b2dc7 100644 (file)
@@ -245,7 +245,6 @@ typename VectorBSplineInterpolateImageFunctionWithLUT<TImageType,TCoordRep,TCoef
 VectorBSplineInterpolateImageFunctionWithLUT<TImageType,TCoordRep,TCoefficientType>::
 EvaluateAtContinuousIndex(const ContinuousIndexType & x) const
 {
-
     // JV Compute BSpline weights if not up to date! Problem const: pass image as last
     //  if (!mWeightsAreUpToDate) UpdatePrecomputedWeights();
   // For shorter coding