ITK  4.9.0
Insight Segmentation and Registration 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,
45  typename NumericTraits< typename TInputImage::PixelType >::RealType, TCoordRep >
46 {
47 public:
50  typedef ImageFunction< TInputImage,
52  TCoordRep > Superclass;
55 
58 
60  typedef typename Superclass::OutputType OutputType;
61 
64 
66  itkStaticConstMacro(ImageDimension, unsigned int,
68 
70  typedef typename Superclass::PointType PointType;
71 
73  typedef typename Superclass::IndexType IndexType;
74 
77 
80 
86  virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE
87  {
88  ContinuousIndexType index;
89 
90  this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point, index);
91  return ( this->EvaluateAtContinuousIndex(index) );
92  }
93 
100  const ContinuousIndexType & index) const ITK_OVERRIDE = 0;
101 
107  virtual OutputType EvaluateAtIndex(
108  const IndexType & index) const ITK_OVERRIDE = 0;
109 
110 protected:
113  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE
114  { Superclass::PrintSelf(os, indent); }
115 
116 private:
117  ExtrapolateImageFunction(const Self &) ITK_DELETE_FUNCTION;
118  void operator=(const Self &) ITK_DELETE_FUNCTION;
119 };
120 } // end namespace itk
121 
122 #endif
ImageFunction< TInputImage, typename NumericTraits< typename TInputImage::PixelType >::RealType, TCoordRep > Superclass
Point< TCoordRep, itkGetStaticConstMacro(ImageDimension) > PointType
SmartPointer< const Self > ConstPointer
void PrintSelf(std::ostream &os, Indent indent) const override
Superclass::ContinuousIndexType ContinuousIndexType
virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override=0
virtual OutputType Evaluate(const PointType &point) const override
static const unsigned int ImageDimension
void PrintSelf(std::ostream &os, Indent indent) const override
virtual OutputType EvaluateAtIndex(const IndexType &index) const override=0
InputImageType::IndexType IndexType
Superclass::InputImageType InputImageType
TInputImage InputImageType
ContinuousIndex< TCoordRep, itkGetStaticConstMacro(ImageDimension) > ContinuousIndexType
NumericTraits< typename TInputImage::PixelType >::RealType RealType
Base class for all image extrapolaters.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
static const unsigned int ImageDimension
Evaluates a function of an image at specified position.