NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkMinimumInterpolateImageFunction.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 __itkMinimumInterpolateImageFunction_h
16 #define __itkMinimumInterpolateImageFunction_h
17 
18 #include "itkInterpolateImageFunction.h"
19 #include "itkTransform.h"
20 
21 namespace itk
22 {
29 template< class TInputImage, class TCoordRep = double >
31  public InterpolateImageFunction< TInputImage, TCoordRep >
32 {
33 public:
36  typedef InterpolateImageFunction< TInputImage, TCoordRep > Superclass;
37  typedef SmartPointer< Self > Pointer;
38  typedef SmartPointer< const Self > ConstPointer;
39 
41  itkTypeMacro(MinimumInterpolateImageFunction, InterpolateImageFunction);
42 
44  itkNewMacro(Self);
45 
47  typedef typename Superclass::OutputType OutputType;
48 
50  typedef typename Superclass::InputImageType InputImageType;
51 
54 
56  typedef typename Superclass::RealType RealType;
57 
59  itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
60 
62  typedef typename Superclass::IndexType IndexType;
63 
65  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
66 
68  typedef typename Superclass::PointType PointType;
69 
70 
72  virtual RealType EvaluateAtIndex(const IndexType & index) const;
73 
75  virtual RealType Evaluate(const PointType & point) const
76  {
77  IndexType index;
78 
79  this->ConvertPointToNearestIndex(point, index);
80  return this->EvaluateAtIndex(index);
81  }
82 
83  virtual RealType EvaluateAtContinuousIndex(
84  const ContinuousIndexType & cindex) const
85  {
86  IndexType index;
87 
88  this->ConvertContinuousIndexToNearestIndex(cindex, index);
89  return this->EvaluateAtIndex(index);
90  }
91 
94  itkSetMacro(NeighborhoodRadius, unsigned int);
95  itkGetConstReferenceMacro(NeighborhoodRadius, unsigned int);
96 
97 protected:
98 
101 
104 
106  void PrintSelf(std::ostream & os, Indent indent) const;
107 
108 private:
109  MinimumInterpolateImageFunction(const Self &); //purposely not implemented
110  void operator=(const Self &); //purposely not implemented
111 
112  unsigned int m_NeighborhoodRadius;
113 
114 };
115 } // namespace itk
116 
117 #ifndef ITK_MANUAL_INSTANTIATION
118 #include "itkMinimumInterpolateImageFunction.txx"
119 #endif
120 
121 #endif
virtual RealType EvaluateAtContinuousIndex(const ContinuousIndexType &cindex) const
Definition: itkMinimumInterpolateImageFunction.h:83
virtual RealType Evaluate(const PointType &point) const
Definition: itkMinimumInterpolateImageFunction.h:75
Minimum interpolation of an image at specified positions.
Definition: itkMinimumInterpolateImageFunction.h:30
InterpolateImageFunction< TInputImage, TCoordRep > Superclass
Definition: itkMinimumInterpolateImageFunction.h:36
Superclass::ContinuousIndexType ContinuousIndexType
Definition: itkMinimumInterpolateImageFunction.h:65
Definition: niftkITKAffineResampleImage.cxx:74
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
Superclass::InputImageType InputImageType
Definition: itkMinimumInterpolateImageFunction.h:50
SmartPointer< Self > Pointer
Definition: itkMinimumInterpolateImageFunction.h:37
Superclass::InputPixelType InputPixelType
Definition: itkMinimumInterpolateImageFunction.h:53
float InputPixelType
Definition: niftkCTEPrepareVolumes.cxx:33
Superclass::PointType PointType
Definition: itkMinimumInterpolateImageFunction.h:68
Superclass::IndexType IndexType
Definition: itkMinimumInterpolateImageFunction.h:62
GLuint index
Definition: glew.h:1798
MinimumInterpolateImageFunction Self
Definition: itkMinimumInterpolateImageFunction.h:35
SmartPointer< const Self > ConstPointer
Definition: itkMinimumInterpolateImageFunction.h:38
Superclass::OutputType OutputType
Definition: itkMinimumInterpolateImageFunction.h:44
Superclass::RealType RealType
Definition: itkMinimumInterpolateImageFunction.h:56