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 __clitkVectorBSplineResampleImageFunctionWithLUT_h
19 #define __clitkVectorBSplineResampleImageFunctionWithLUT_h
20 #include "clitkVectorBSplineInterpolateImageFunctionWithLUT.h"
24 /** \class VectorBSplineResampleImageFunctionWithLUT
25 * \brief Resample image intensity from a VectorBSpline coefficient image using a LUT.
27 * This class resample the image intensity at a non-integer position
28 * from the input VectorBSpline coefficient image using a LUT.
30 * Spline order may be from 0 to 5.
32 * In ITK, VectorBSpline coefficient can be generated using a
33 * VectorBSplineDecompositionImageFilter. Using this image function in
34 * conjunction with ResampleImageFunction allows the reconstruction
35 * of the original image at different resolution and size.
37 * \sa VectorBSplineInterpolateImageFunctionWithLUT
38 * \sa VectorBSplineDecompositionImageFilter
39 * \sa ResampleImageFilter
41 * \ingroup ImageFunctions
43 template <class TImageType, class TCoordRep = float>
44 class ITK_EXPORT VectorBSplineResampleImageFunctionWithLUT :
45 public VectorBSplineInterpolateImageFunctionWithLUT<
46 TImageType,TCoordRep,typename TImageType::PixelType::ValueType >
49 /** Standard class typedefs. */
50 typedef VectorBSplineResampleImageFunctionWithLUT Self;
51 typedef VectorBSplineInterpolateImageFunctionWithLUT<
52 TImageType,TCoordRep, typename TImageType::PixelType::ValueType > Superclass;
53 typedef itk::SmartPointer<Self> Pointer;
54 typedef itk::SmartPointer<const Self> ConstPointer;
56 /** Run-time type information (and related methods). */
57 itkTypeMacro(VectorBSplineReconstructionImageFunction,
58 VectorBSplineInterpolateImageFunctionWithLUT);
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->itk::VectorInterpolateImageFunction<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 VectorBSplineResampleImageFunctionWithLUT() {};
80 virtual ~VectorBSplineResampleImageFunctionWithLUT() {};
81 void PrintSelf(std::ostream& os, itk::Indent indent) const
83 this->Superclass::PrintSelf( os, indent );
87 VectorBSplineResampleImageFunctionWithLUT(const Self&);//purposely not implemented