X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FitkBSplineInterpolateImageFunctionWithLUT.h;h=7fd7ab81e0686efcb26a4035d487958eaebaed22;hb=4d169a2b4d862ed8bb9155b358776ffe08154c76;hp=1656bef26ca63212c288332ed904bd3ccdb29ace;hpb=0b7c9b1e1215634b02cbd38d4e4ba101d6111ba8;p=clitk.git diff --git a/itk/itkBSplineInterpolateImageFunctionWithLUT.h b/itk/itkBSplineInterpolateImageFunctionWithLUT.h index 1656bef..7fd7ab8 100644 --- a/itk/itkBSplineInterpolateImageFunctionWithLUT.h +++ b/itk/itkBSplineInterpolateImageFunctionWithLUT.h @@ -1,9 +1,9 @@ /*========================================================================= Program: vv http://www.creatis.insa-lyon.fr/rio/vv - Authors belong to: + Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.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 @@ -14,29 +14,11 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #ifndef ITKBSPLINEINTERPOLATEIMAGEFUNCTIONWITHLUT_H #define ITKBSPLINEINTERPOLATEIMAGEFUNCTIONWITHLUT_H -/* ========================================================================= - - @file itkBSplineInterpolateImageFunctionWithLUT.h - @author David Sarrut - - Copyright (c) - * CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). - All rights reserved. See Doc/License.txt or - http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. - * Léon Bérard cancer center, 28 rue Laënnec, 69373 Lyon cedex 08, France - * http://www.creatis.insa-lyon.fr/rio - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -========================================================================= */ #include "itkBSplineWeightsCalculator.h" -//#include "clitkTimer.h" #include namespace itk { @@ -65,7 +47,7 @@ namespace itk { 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); @@ -78,8 +60,14 @@ namespace itk { /** Set the input image. This must be set by the user. */ virtual void SetInputImage(const TImageType * inputData); - //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 + { + return this->EvaluateAtContinuousIndex( index ); + } /** Evaluate the function at a ContinuousIndex position. Overwritten for taking LUT into account */ @@ -89,15 +77,6 @@ namespace itk { 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: BSplineInterpolateImageFunctionWithLUT(); ~BSplineInterpolateImageFunctionWithLUT(){;} @@ -112,14 +91,6 @@ namespace itk { /** 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 @@ -130,15 +101,6 @@ namespace itk { 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 itkBSplineInterpolateImageFunctionWithLUT } // end namespace