1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18 #ifndef __itkBSplineResampleImageFunctionWithLUT_h
19 #define __itkBSplineResampleImageFunctionWithLUT_h
20 #include "itkBSplineInterpolateImageFunctionWithLUT.h"
24 /** \class BSplineResampleImageFunctionWithLUT
25 * \brief Resample image intensity from a BSpline coefficient image using a LUT.
27 * This class resample the image intensity at a non-integer position
28 * from the input BSpline coefficient image using a LUT.
30 * Spline order may be from 0 to 5.
32 * In ITK, BSpline coefficient can be generated using a
33 * BSplineDecompositionImageFilter. Using this image function in
34 * conjunction with ResampleImageFunction allows the reconstruction
35 * of the original image at different resolution and size.
37 * \sa BSplineInterpolateImageFunctionWithLUT
38 * \sa BSplineDecompositionImageFilter
39 * \sa ResampleImageFilter
41 * \ingroup ImageFunctions
43 template <class TImageType, class TCoordRep = float>
44 class ITK_EXPORT BSplineResampleImageFunctionWithLUT :
45 public BSplineInterpolateImageFunctionWithLUT<
46 TImageType,TCoordRep,typename TImageType::PixelType >
49 /** Standard class typedefs. */
50 typedef BSplineResampleImageFunctionWithLUT Self;
51 typedef BSplineInterpolateImageFunctionWithLUT<
52 TImageType,TCoordRep, typename TImageType::PixelType > Superclass;
53 typedef SmartPointer<Self> Pointer;
54 typedef SmartPointer<const Self> ConstPointer;
56 /** Run-time type information (and related methods). */
57 itkTypeMacro(BSplineReconstructionImageFunction,
58 BSplineInterpolateImageFunctionWithLUT);
60 /** New macro for creation of through a Smart Pointer */
63 /** Set the input image representing the BSplineCoefficients */
64 virtual void SetInputImage(const TImageType * inputData)
66 // bypass my superclass
67 this->InterpolateImageFunction<TImageType,TCoordRep>::SetInputImage(inputData);
68 this->m_Coefficients = inputData;
69 if ( this->m_Coefficients.IsNotNull() )
71 this->m_DataLength = this->m_Coefficients->GetBufferedRegion().GetSize();
73 // JV specific for BLUT ( contains the call to UpdatePrecomputedWeights() )
74 this->UpdateWeightsProperties();
79 BSplineResampleImageFunctionWithLUT() {};
80 virtual ~BSplineResampleImageFunctionWithLUT() {};
81 void PrintSelf(std::ostream& os, Indent indent) const
83 this->Superclass::PrintSelf( os, indent );
87 BSplineResampleImageFunctionWithLUT(const Self&);//purposely not implemented