ITK  5.4.0
Insight Toolkit
itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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  * https://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:
59 
65 
67  itkNewMacro(Self);
68 
71 
73  using typename Superclass::InputImageType;
74  using typename Superclass::PixelType;
75  using typename Superclass::ValueType;
76  using typename Superclass::RealType;
77 
78  using typename Superclass::PointType;
79 
81  // static constexpr unsigned int Dimension = // Superclass::Dimension;
82 
84  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
85 
87  using typename Superclass::IndexType;
88  using typename Superclass::IndexValueType;
89 
91  using typename Superclass::ContinuousIndexType;
92 
94  using typename Superclass::OutputType;
95 
98  bool
99  IsInsideBuffer(const IndexType &) const override
100  {
101  return true;
102  }
103 
106  bool
107  IsInsideBuffer(const PointType &) const override
108  {
109  return true;
110  }
111 
114  bool
115  IsInsideBuffer(const ContinuousIndexType &) const override
116  {
117  return true;
118  }
119 
125  OutputType
126  EvaluateAtContinuousIndex(const ContinuousIndexType & index) const override;
127 
133  OutputType
134  EvaluateAtIndex(const IndexType & index) const override;
135 
136 protected:
139 
140 private:
142  static const unsigned int m_Neighbors;
143 };
144 } // end namespace itk
145 
146 #ifndef ITK_MANUAL_INSTANTIATION
147 # include "itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.hxx"
148 #endif
149 
150 #endif
itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction::IsInsideBuffer
bool IsInsideBuffer(const IndexType &) const override
Definition: itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h:99
itk::ImageFunction< TInputImage, NumericTraits< TInputImage::PixelType >::RealType, TCoordRep >::IndexType
typename InputImageType::IndexType IndexType
Definition: itkImageFunction.h:90
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::SmartPointer< Self >
itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction::IsInsideBuffer
bool IsInsideBuffer(const ContinuousIndexType &) const override
Definition: itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h:115
itk::VectorInterpolateImageFunction
Base class for all vector image interpolators.
Definition: itkVectorInterpolateImageFunction.h:47
itk::IndexValueType
long IndexValueType
Definition: itkIntTypes.h:90
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itkVectorInterpolateImageFunction.h
itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction::IsInsideBuffer
bool IsInsideBuffer(const PointType &) const override
Definition: itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h:107
itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction
Linearly interpolate or NN extrapolate a vector image at specified positions.
Definition: itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h:54
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ContinuousIndex< TCoordRep, Self::ImageDimension >
itk::Point
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:53
itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction::m_Neighbors
static const unsigned int m_Neighbors
Definition: itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h:142