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 __clitkVectorBSplineResampleImageFunction_h
19 #define __clitkVectorBSplineResampleImageFunction_h
20 #include "clitkVectorBSplineInterpolateImageFunction.h"
24 /** \class VectorBSplineResampleImageFunction
25 * \brief Resample image intensity from a VectorBSpline coefficient image.
27 * This class resample the image intensity at a non-integer position
28 * from the input VectorBSpline coefficient image.
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 VectorBSplineInterpolateImageFunction
38 * \sa VectorBSplineDecompositionImageFilter
39 * \sa VectorResampleImageFilter
41 * \ingroup ImageFunctions
43 template <class TImageType, class TCoordRep = float>
44 class ITK_EXPORT VectorBSplineResampleImageFunction :
45 public VectorBSplineInterpolateImageFunction<
46 TImageType,TCoordRep, typename TImageType::PixelType::ValueType >
49 /** Standard class typedefs. */
50 typedef VectorBSplineResampleImageFunction Self;
51 typedef VectorBSplineInterpolateImageFunction<TImageType,TCoordRep, typename TImageType::PixelType::ValueType > Superclass;
52 typedef itk::SmartPointer<Self> Pointer;
53 typedef itk::SmartPointer<const Self> ConstPointer;
55 /** Run-time type information (and related methods). */
56 itkTypeMacro(VectorBSplineResampleImageFunction,
57 VectorBSplineInterpolateImageFunction);
59 /** New macro for creation of through a Smart Pointer */
62 /** Set the input image representing the BSplineCoefficients */
63 virtual void SetInputImage(const TImageType * inputData)
65 // bypass my superclass
66 this->itk::VectorInterpolateImageFunction<TImageType,TCoordRep>::SetInputImage(inputData);
67 this->m_Coefficients = inputData;
68 if ( this->m_Coefficients.IsNotNull() )
70 this->m_DataLength = this->m_Coefficients->GetBufferedRegion().GetSize();
75 VectorBSplineResampleImageFunction() {};
76 virtual ~VectorBSplineResampleImageFunction() {};
79 VectorBSplineResampleImageFunction(const Self&);//purposely not implemented