ITK  5.2.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  * 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:
59 
65 
67  itkNewMacro(Self);
68 
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
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  void
141  PrintSelf(std::ostream & os, Indent indent) const override;
142 
143 private:
145  static const unsigned int m_Neighbors;
146 };
147 } // end namespace itk
148 
149 #ifndef ITK_MANUAL_INSTANTIATION
150 # include "itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.hxx"
151 #endif
152 
153 #endif
itk::VectorInterpolateImageFunction::IndexType
typename Superclass::IndexType IndexType
Definition: itkVectorInterpolateImageFunction.h:80
itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction::IsInsideBuffer
bool IsInsideBuffer(const IndexType &) const override
Definition: itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h:99
itk::VectorInterpolateImageFunction::PointType
typename Superclass::PointType PointType
Definition: itkVectorInterpolateImageFunction.h:77
itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction::IndexValueType
typename Superclass::IndexValueType IndexValueType
Definition: itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h:88
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
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::VectorInterpolateImageFunction::PixelType
typename InputImageType::PixelType PixelType
Definition: itkVectorInterpolateImageFunction.h:72
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::VectorInterpolateImageFunction::ContinuousIndexType
typename Superclass::ContinuousIndexType ContinuousIndexType
Definition: itkVectorInterpolateImageFunction.h:83
itk::VectorInterpolateImageFunction::InputImageType
typename Superclass::InputImageType InputImageType
Definition: itkVectorInterpolateImageFunction.h:71
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::VectorInterpolateImageFunction::OutputType
typename Superclass::OutputType OutputType
Definition: itkVectorInterpolateImageFunction.h:86
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::VectorInterpolateImageFunction::RealType
typename NumericTraits< ValueType >::RealType RealType
Definition: itkVectorInterpolateImageFunction.h:74
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::IndexValueType
signed long IndexValueType
Definition: itkIntTypes.h:90
itk::VectorInterpolateImageFunction::ValueType
typename PixelType::ValueType ValueType
Definition: itkVectorInterpolateImageFunction.h:73
itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction::m_Neighbors
static const unsigned int m_Neighbors
Definition: itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h:145