ITK  5.0.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< typename TInputImage, typename TCoordRep = float >
55  public VectorInterpolateImageFunction< TInputImage, TCoordRep >
56 {
57 public:
58 
64 
66  itkNewMacro(Self);
67 
71 
73  using InputImageType = typename Superclass::InputImageType;
74  using PixelType = typename Superclass::PixelType;
75  using ValueType = typename Superclass::ValueType;
76  using RealType = typename Superclass::RealType;
77 
78  using PointType = typename Superclass::PointType;
79 
81  //static constexpr unsigned int Dimension = // Superclass::Dimension;
82 
84  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
85 
87  using IndexType = typename Superclass::IndexType;
89 
91  using ContinuousIndexType = typename Superclass::ContinuousIndexType;
92 
94  using OutputType = typename Superclass::OutputType;
95 
98  bool IsInsideBuffer(const IndexType &) const override
99  {
100  return true;
101  }
102 
105  bool IsInsideBuffer(const PointType &) const override
106  {
107  return true;
108  }
109 
112  bool IsInsideBuffer(const ContinuousIndexType &) const override
113  {
114  return true;
115  }
116 
122  OutputType EvaluateAtContinuousIndex(
123  const ContinuousIndexType & index) const override;
124 
130  OutputType EvaluateAtIndex(const IndexType & index) const override;
131 
132 protected:
135 
136  void PrintSelf(std::ostream & os, Indent indent) const override;
137 
138 private:
140  void operator=(const Self &) = delete;
141 
143  static const unsigned int m_Neighbors;
144 };
145 } // end namespace itk
146 
147 #ifndef ITK_MANUAL_INSTANTIATION
148 #include "itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.hxx"
149 #endif
150 
151 #endif
Light weight base class for most itk classes.
typename NumericTraits< ValueType >::RealType RealType
typename InputImageType::PixelType PixelType
signed long IndexValueType
Definition: itkIntTypes.h:90
typename Superclass::InputImageType InputImageType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for all vector image interpolaters.
typename Superclass::ContinuousIndexType ContinuousIndexType