From: Romulo Pinho Date: Wed, 16 Nov 2011 14:47:36 +0000 (+0100) Subject: BLUT transform in threaded mode X-Git-Tag: v1.3.0~168 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=704b754d106f8654e084e13c66a38ef4ddab8b08;p=clitk.git BLUT transform in threaded mode - 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 --- diff --git a/itk/clitkVectorBSplineDecompositionImageFilter.txx b/itk/clitkVectorBSplineDecompositionImageFilter.txx index 6161d22..d64829b 100644 --- a/itk/clitkVectorBSplineDecompositionImageFilter.txx +++ b/itk/clitkVectorBSplineDecompositionImageFilter.txx @@ -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" diff --git a/itk/clitkVectorBSplineInterpolateImageFunctionWithLUT.h b/itk/clitkVectorBSplineInterpolateImageFunctionWithLUT.h index 2b6d54d..5bcbd8a 100644 --- a/itk/clitkVectorBSplineInterpolateImageFunctionWithLUT.h +++ b/itk/clitkVectorBSplineInterpolateImageFunctionWithLUT.h @@ -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; diff --git a/itk/clitkVectorBSplineInterpolateImageFunctionWithLUT.txx b/itk/clitkVectorBSplineInterpolateImageFunctionWithLUT.txx index 8ea6e0a..4c66a2c 100644 --- a/itk/clitkVectorBSplineInterpolateImageFunctionWithLUT.txx +++ b/itk/clitkVectorBSplineInterpolateImageFunctionWithLUT.txx @@ -245,7 +245,6 @@ typename VectorBSplineInterpolateImageFunctionWithLUT:: 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