ITK  5.4.0
Insight Toolkit
itkExtrapolateImageFunction.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 itkExtrapolateImageFunction_h
19#define itkExtrapolateImageFunction_h
20
21#include "itkImageFunction.h"
22
23namespace itk
24{
43template <typename TInputImage, typename TCoordRep = float>
45 : public ImageFunction<TInputImage, typename NumericTraits<typename TInputImage::PixelType>::RealType, TCoordRep>
46{
47public:
48 ITK_DISALLOW_COPY_AND_MOVE(ExtrapolateImageFunction);
49
52 using Superclass =
56
58 itkOverrideGetNameOfClassMacro(ExtrapolateImageFunction);
59
61 using typename Superclass::OutputType;
62
64 using typename Superclass::InputImageType;
65
67 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
68
70 using typename Superclass::PointType;
71
73 using typename Superclass::IndexType;
74
77
80
87 Evaluate(const PointType & point) const override
88 {
89 const ContinuousIndexType index =
90 this->GetInputImage()->template TransformPhysicalPointToContinuousIndex<TCoordRep>(point);
91 return (this->EvaluateAtContinuousIndex(index));
92 }
101 EvaluateAtContinuousIndex(const ContinuousIndexType & index) const override = 0;
102
109 EvaluateAtIndex(const IndexType & index) const override = 0;
110
111protected:
113 ~ExtrapolateImageFunction() override = default;
114};
115} // end namespace itk
116
117#endif
Base class for all image extrapolaters.
OutputType Evaluate(const PointType &point) const override
typename NumericTraits< typename TInputImage::PixelType >::RealType RealType
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override=0
OutputType EvaluateAtIndex(const IndexType &index) const override=0
~ExtrapolateImageFunction() override=default
static constexpr unsigned int ImageDimension
Evaluates a function of an image at specified position.
TInputImage InputImageType
static constexpr unsigned int ImageDimension
ContinuousIndex< TCoordRep, Self::ImageDimension > ContinuousIndexType
Point< TCoordRep, Self::ImageDimension > PointType
typename InputImageType::IndexType IndexType
Light weight base class for most itk classes.
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:54
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents