ITK  5.1.0
Insight Toolkit
itkExtrapolateImageFunction.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 itkExtrapolateImageFunction_h
19 #define itkExtrapolateImageFunction_h
20 
21 #include "itkImageFunction.h"
22 
23 namespace itk
24 {
42 template <typename TInputImage, typename TCoordRep = float>
44  : public ImageFunction<TInputImage, typename NumericTraits<typename TInputImage::PixelType>::RealType, TCoordRep>
45 {
46 public:
47  ITK_DISALLOW_COPY_AND_ASSIGN(ExtrapolateImageFunction);
48 
51  using Superclass =
55 
58 
61 
64 
66  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
67 
69  using PointType = typename Superclass::PointType;
70 
72  using IndexType = typename Superclass::IndexType;
73 
76 
79 
86  Evaluate(const PointType & point) const override
87  {
88  ContinuousIndexType index;
89 
90  this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point, index);
91  return (this->EvaluateAtContinuousIndex(index));
92  }
93 
100  EvaluateAtContinuousIndex(const ContinuousIndexType & index) const override = 0;
101 
107  OutputType
108  EvaluateAtIndex(const IndexType & index) const override = 0;
109 
110 protected:
111  ExtrapolateImageFunction() = default;
112  ~ExtrapolateImageFunction() override = default;
113  void
114  PrintSelf(std::ostream & os, Indent indent) const override
115  {
116  Superclass::PrintSelf(os, indent);
117  }
118 };
119 } // end namespace itk
120 
121 #endif
itk::ExtrapolateImageFunction
Base class for all image extrapolaters.
Definition: itkExtrapolateImageFunction.h:43
itkImageFunction.h
itk::ExtrapolateImageFunction::PointType
typename Superclass::PointType PointType
Definition: itkExtrapolateImageFunction.h:69
itk::ImageFunction::OutputType
TOutput OutputType
Definition: itkImageFunction.h:83
itk::ImageFunction::InputImageType
TInputImage InputImageType
Definition: itkImageFunction.h:74
itk::ExtrapolateImageFunction::EvaluateAtIndex
OutputType EvaluateAtIndex(const IndexType &index) const override=0
itk::ExtrapolateImageFunction::IndexType
typename Superclass::IndexType IndexType
Definition: itkExtrapolateImageFunction.h:72
itk::ExtrapolateImageFunction::ExtrapolateImageFunction
ExtrapolateImageFunction()=default
itk::ExtrapolateImageFunction::~ExtrapolateImageFunction
~ExtrapolateImageFunction() override=default
itk::ImageFunction::IndexType
typename InputImageType::IndexType IndexType
Definition: itkImageFunction.h:89
itk::ExtrapolateImageFunction::ImageDimension
static constexpr unsigned int ImageDimension
Definition: itkExtrapolateImageFunction.h:66
itk::ExtrapolateImageFunction::InputImageType
typename Superclass::InputImageType InputImageType
Definition: itkExtrapolateImageFunction.h:63
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ImageFunction::PointType
Point< TCoordRep, Self::ImageDimension > PointType
Definition: itkImageFunction.h:96
itk::ExtrapolateImageFunction::OutputType
typename Superclass::OutputType OutputType
Definition: itkExtrapolateImageFunction.h:60
itk::ImageFunction
Evaluates a function of an image at specified position.
Definition: itkImageFunction.h:54
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::ExtrapolateImageFunction::RealType
typename NumericTraits< typename TInputImage::PixelType >::RealType RealType
Definition: itkExtrapolateImageFunction.h:78
itk::ImageFunction::ImageDimension
static constexpr unsigned int ImageDimension
Definition: itkImageFunction.h:60
itk::ImageFunction::ContinuousIndexType
ContinuousIndex< TCoordRep, Self::ImageDimension > ContinuousIndexType
Definition: itkImageFunction.h:93
itk::ExtrapolateImageFunction::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
Definition: itkExtrapolateImageFunction.h:114
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::ExtrapolateImageFunction::Evaluate
OutputType Evaluate(const PointType &point) const override
Definition: itkExtrapolateImageFunction.h:86
itk::NumericTraits::RealType
double RealType
Definition: itkNumericTraits.h:84
itk::ExtrapolateImageFunction::EvaluateAtContinuousIndex
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override=0
itk::ExtrapolateImageFunction::ContinuousIndexType
typename Superclass::ContinuousIndexType ContinuousIndexType
Definition: itkExtrapolateImageFunction.h:75
itk::ImageFunction< TInputImage, NumericTraits< TInputImage::PixelType >::RealType, TCoordRep >::GetInputImage
const InputImageType * GetInputImage() const
Definition: itkImageFunction.h:107
itk::ImageFunction::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override