NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkThinPlateSplineScatteredDataPointSetToImageFilter.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef __itkThinPlateSplineScatteredDataPointSetToImageFilter_h
16 #define __itkThinPlateSplineScatteredDataPointSetToImageFilter_h
17 
18 #include <itkPointSetToImageFilter.h>
19 #include <itkThinPlateR2LogRSplineKernelTransform.h>
20 
21 #include <itkVectorContainer.h>
22 
23 #include <vnl/vnl_matrix.h>
24 
25 namespace itk
26 {
33 template< typename TInputPointSet, typename TOutputImage >
35  public PointSetToImageFilter< TInputPointSet, TOutputImage >
36 {
37 public:
39  typedef PointSetToImageFilter<TInputPointSet, TOutputImage> Superclass;
40  typedef SmartPointer<Self> Pointer;
41  typedef SmartPointer<const Self> ConstPointer;
42 
44  itkNewMacro( Self );
45 
47  itkStaticConstMacro( ImageDimension, unsigned int, TOutputImage::ImageDimension );
48 
49  typedef TInputPointSet LandmarkPointSetType;
50 
51 
53  typedef TOutputImage OutputImageType;
54  typedef typename OutputImageType::Pointer OutputImagePointer;
56 
60 
61  typedef typename OutputImageType::SpacingType SpacingType;
62  typedef typename OutputImageType::PointType OriginPointType;
63  typedef typename OutputImageType::DirectionType DirectionType;
64 
65  typedef typename LandmarkPointSetType::PointType LandmarkPointType;
66  typedef typename LandmarkPointSetType::PointDataContainer PointDataContainerType;
67 
68  typedef typename LandmarkPointSetType::CoordRepType CoordRepType;
69 
71  typedef ThinPlateR2LogRSplineKernelTransform< CoordRepType, itkGetStaticConstMacro(ImageDimension) > KernelTransformType;
72  typedef typename KernelTransformType::Pointer KernelTransformPointerType;
73  typedef typename KernelTransformType::PointsContainer LandmarkContainer;
74 
75  typedef typename LandmarkContainer::ConstPointer LandmarkContainerPointer;
76 
77 
81  itkSetObjectMacro(KernelTransform, KernelTransformType);
82  itkGetModifiableObjectMacro(KernelTransform, KernelTransformType);
83 
84  itkSetMacro(Invert, bool);
85  itkGetMacro(Invert, bool);
86 
87  itkSetMacro(SplineHeightDimension, unsigned int);
88  itkGetMacro(SplineHeightDimension, unsigned int);
89 
90  itkSetMacro(Stiffness, double);
91  itkGetMacro(Stiffness, double);
92 
94  ModifiedTimeType GetMTime(void) const;
95 
96 
97 protected:
100 
101  void PrintSelf(std::ostream & os, Indent indent) const;
102 
106  void GenerateData();
107 
109 
110 private:
111 
112  //purposely not implemented
114  void operator=( const Self & );
115 
116  KernelTransformPointerType m_KernelTransform; // Coordinate transform to use
117 
119  bool m_Invert;
120 
122  unsigned int m_SplineHeightDimension;
123 
125  double m_Stiffness;
126 
127 };
128 } // end namespace itk
129 
130 #ifndef ITK_MANUAL_INSTANTIATION
131 #include "itkThinPlateSplineScatteredDataPointSetToImageFilter.txx"
132 #endif
133 
134 #endif
virtual ~ThinPlateSplineScatteredDataPointSetToImageFilter()
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:99
ThinPlateSplineScatteredDataPointSetToImageFilter Self
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:38
OutputImageType::PixelType OutputPixelType
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:57
ImageType::SizeType SizeType
Definition: niftkMakeLapUSProbeBasicModel.cxx:31
SmartPointer< const Self > ConstPointer
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:41
OutputImageType::DirectionType DirectionType
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:63
OutputImageType::RegionType OutputImageRegionType
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:55
itkGetModifiableObjectMacro(KernelTransform, KernelTransformType)
Definition: niftkITKAffineResampleImage.cxx:74
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
OutputImageType::Pointer OutputImagePointer
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:54
LandmarkContainer::ConstPointer LandmarkContainerPointer
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:75
PointSetToImageFilter< TInputPointSet, TOutputImage > Superclass
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:39
OutputImageType::IndexType OutputIndexType
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:59
LandmarkPointSetType::CoordRepType CoordRepType
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:68
LandmarkPointSetType::PointType LandmarkPointType
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:65
itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension)
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
void PrintSelf(std::ostream &os, Indent indent) const
ImageType::RegionType RegionType
Definition: niftkMakeLapUSProbeBasicModel.cxx:30
ThinPlateR2LogRSplineKernelTransform< CoordRepType, itkGetStaticConstMacro(ImageDimension) > KernelTransformType
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:71
LandmarkPointSetType::PointDataContainer PointDataContainerType
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:66
SmartPointer< Self > Pointer
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:40
OutputImageType::SizeType OutputSizeType
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:58
KernelTransformType::Pointer KernelTransformPointerType
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:72
KernelTransformType::PointsContainer LandmarkContainer
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:73
OutputImageType::SpacingType SpacingType
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:61
OutputImageType::PointType OriginPointType
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:62
Image filter which provides a thin plate spline mask approximation to a set of landmarks.
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:34
TInputPointSet LandmarkPointSetType
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:49
TOutputImage OutputImageType
Definition: itkThinPlateSplineScatteredDataPointSetToImageFilter.h:53