ITK  6.0.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 
23 namespace itk
24 {
43 template <typename TInputImage, typename TCoordRep = float>
45  : public ImageFunction<TInputImage, typename NumericTraits<typename TInputImage::PixelType>::RealType, TCoordRep>
46 {
47 public:
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 
76  using typename Superclass::ContinuousIndexType;
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  }
100  OutputType
101  EvaluateAtContinuousIndex(const ContinuousIndexType & index) const override = 0;
102 
108  OutputType
109  EvaluateAtIndex(const IndexType & index) const override = 0;
110 
111 protected:
112  ExtrapolateImageFunction() = default;
113  ~ExtrapolateImageFunction() override = default;
114 };
115 } // end namespace itk
116 
117 #endif
itk::ExtrapolateImageFunction
Base class for all image extrapolaters.
Definition: itkExtrapolateImageFunction.h:44
itkImageFunction.h
itk::ImageFunction::OutputType
TOutput OutputType
Definition: itkImageFunction.h:84
itk::ImageFunction::InputImageType
TInputImage InputImageType
Definition: itkImageFunction.h:75
itk::ExtrapolateImageFunction::EvaluateAtIndex
OutputType EvaluateAtIndex(const IndexType &index) const override=0
itk::ExtrapolateImageFunction::ExtrapolateImageFunction
ExtrapolateImageFunction()=default
itk::ExtrapolateImageFunction::~ExtrapolateImageFunction
~ExtrapolateImageFunction() override=default
itk::ImageFunction::IndexType
typename InputImageType::IndexType IndexType
Definition: itkImageFunction.h:90
itk::ExtrapolateImageFunction::ImageDimension
static constexpr unsigned int ImageDimension
Definition: itkExtrapolateImageFunction.h:67
itk::SmartPointer< Self >
itk::FunctionBase< Point< TCoordRep, TInputImage::ImageDimension >, NumericTraits< TInputImage::PixelType >::RealType >::OutputType
NumericTraits< TInputImage::PixelType >::RealType OutputType
Definition: itkFunctionBase.h:62
itk::ImageFunction::PointType
Point< TCoordRep, Self::ImageDimension > PointType
Definition: itkImageFunction.h:97
itk::ImageFunction
Evaluates a function of an image at specified position.
Definition: itkImageFunction.h:55
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::point
*par Constraints *The filter requires an 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
itk::ExtrapolateImageFunction::RealType
typename NumericTraits< typename TInputImage::PixelType >::RealType RealType
Definition: itkExtrapolateImageFunction.h:79
itk::ImageFunction::ImageDimension
static constexpr unsigned int ImageDimension
Definition: itkImageFunction.h:61
itk::ImageFunction::ContinuousIndexType
ContinuousIndex< TCoordRep, Self::ImageDimension > ContinuousIndexType
Definition: itkImageFunction.h:94
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::ContinuousIndex< TCoordRep, Self::ImageDimension >
itk::ExtrapolateImageFunction::Evaluate
OutputType Evaluate(const PointType &point) const override
Definition: itkExtrapolateImageFunction.h:87
itk::Point
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:53
itk::NumericTraits::RealType
double RealType
Definition: itkNumericTraits.h:86
itk::ExtrapolateImageFunction::EvaluateAtContinuousIndex
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override=0
itk::ImageFunction< TInputImage, NumericTraits< TInputImage::PixelType >::RealType, TCoordRep >::GetInputImage
const InputImageType * GetInputImage() const
Definition: itkImageFunction.h:108