ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction_h
19 #define __itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction_h
20 
22 
23 namespace itk
24 {
53 template< class TInputImage, class TCoordRep = float >
55  public VectorInterpolateImageFunction< TInputImage, TCoordRep >
56 {
57 public:
58 
64 
66  itkNewMacro(Self);
67 
71 
73  typedef typename Superclass::InputImageType InputImageType;
74  typedef typename Superclass::PixelType PixelType;
75  typedef typename Superclass::ValueType ValueType;
76  typedef typename Superclass::RealType RealType;
77 
78  typedef typename Superclass::PointType PointType;
79 
81  //itkStaticConstMacro(Dimension, unsigned int,
82  // Superclass::Dimension);
83 
85  itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
86 
88  typedef typename Superclass::IndexType IndexType;
90 
92  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
93 
95  typedef typename Superclass::OutputType OutputType;
96 
99  virtual bool IsInsideBuffer(const IndexType &) const
100  {
101  return true;
102  }
103 
106  virtual bool IsInsideBuffer(const PointType &) const
107  {
108  return true;
109  }
110 
113  virtual bool IsInsideBuffer(const ContinuousIndexType &) const
114  {
115  return true;
116  }
117 
123  virtual OutputType EvaluateAtContinuousIndex(
124  const ContinuousIndexType & index) const;
125 
131  virtual OutputType EvaluateAtIndex(const IndexType & index) const;
132 
133 protected:
136 
137  virtual void PrintSelf(std::ostream & os, Indent indent) const;
138 
139 private:
141  // not
142  // implemented
143  void operator=(const Self &); //purposely
144  // not
145  // implemented
146 
148  static const unsigned int m_Neighbors;
149 };
150 } // end namespace itk
151 
152 #ifndef ITK_MANUAL_INSTANTIATION
153 #include "itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.hxx"
154 #endif
155 
156 #endif
157