X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FclitkVectorBSplineInterpolateImageFunctionWithLUT.h;h=5bcbd8aff4f961d60c65bfbc8aed0b46cb5e6327;hb=595624eb4297e747630105d45017de69733caef2;hp=9c6b033c4912f178d6902a1e202f143fd5673ec7;hpb=0083c3fb2c66812489631c7551709d121de51625;p=clitk.git diff --git a/itk/clitkVectorBSplineInterpolateImageFunctionWithLUT.h b/itk/clitkVectorBSplineInterpolateImageFunctionWithLUT.h index 9c6b033..5bcbd8a 100644 --- a/itk/clitkVectorBSplineInterpolateImageFunctionWithLUT.h +++ b/itk/clitkVectorBSplineInterpolateImageFunctionWithLUT.h @@ -1,3 +1,20 @@ +/*========================================================================= + Program: vv http://www.creatis.insa-lyon.fr/rio/vv + + Authors belong to: + - University of LYON http://www.universite-lyon.fr/ + - Léon Bérard cancer center http://www.centreleonberard.fr + - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the copyright notices for more information. + + It is distributed under dual licence + + - BSD See included LICENSE.txt file + - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +===========================================================================**/ #ifndef __clitkVectorBSplineInterpolateImageFunctionWithLUT_h #define __clitkVectorBSplineInterpolateImageFunctionWithLUT_h /* ========================================================================= @@ -19,7 +36,6 @@ ========================================================================= */ #include "itkBSplineWeightsCalculator.h" -//#include "clitkTimer.h" #include "clitkVectorBSplineInterpolateImageFunction.h" namespace clitk { @@ -52,7 +68,7 @@ namespace clitk { itkNewMacro(Self); /** Setting LUT sampling (one parameters by dimension or a single - one for all dim); Default is 10 (for each dim) **/ + one for all dim); Default is 20 (for each dim) **/ void SetLUTSamplingFactor(const int& s); void SetLUTSamplingFactors(const SizeType& s); @@ -68,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; @@ -77,15 +102,6 @@ namespace clitk { various order, dimension, sampling ... **/ static void ComputeBlendingWeights(int dim, int order, int sampling, TCoefficientType * weights); - /** Timer giving computation time for coefficients computation **/ - // const clitk::Timer & GetCoefTimer() const { return mCoefficientTimer; } - - /** Get estimated error **/ - - double GetIntrinsicError() const { return *mIntrinsecError; } - long GetNumberOfError() const { return *mNumberOfError; } - double GetIntrinsicErrorMax() const { return *mIntrinsecErrorMax; } - protected: VectorBSplineInterpolateImageFunctionWithLUT(); ~VectorBSplineInterpolateImageFunctionWithLUT(){;} @@ -100,14 +116,6 @@ namespace clitk { /** Sampling factors for LUT weights **/ SizeType mSamplingFactors; bool mWeightsAreUpToDate; - //SpacingType mOutputSpacing; - - double * mIntrinsecError; - double * mIntrinsecErrorMax; - long * mNumberOfError; - - //JV add iscoeff, and splineorders - // bool mInputIsCoef; SizeType mSplineOrders; // Filter to compute weights @@ -118,15 +126,6 @@ namespace clitk { void UpdateWeightsProperties(); IndexType GetSampleIndexOfPixelPosition(const ContinuousIndexType & x, IndexType & EvaluateIndex) const; - // Timing options - // clitk::Timer mCoefficientTimer; - // clitk::Timer mLUTTimer; - bool mTimerEnabled; - - //JV threadsafety: everything on the stack - //std::vector mCorrectedSupportOffset; - //std::vector mCorrectedSupportIndex; - TCoefficientType * coef; }; // end class clitkVectorBSplineInterpolateImageFunctionWithLUT } // end namespace