ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkRayCastInterpolateImageFunction.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 itkRayCastInterpolateImageFunction_h
19 #define itkRayCastInterpolateImageFunction_h
20 
22 #include "itkTransform.h"
23 
24 namespace itk
25 {
38 template< typename TInputImage, typename TCoordRep = double >
39 class ITK_TEMPLATE_EXPORT RayCastInterpolateImageFunction:
40  public InterpolateImageFunction< TInputImage, TCoordRep >
41 {
42 public:
43  ITK_DISALLOW_COPY_AND_ASSIGN(RayCastInterpolateImageFunction);
44 
50 
52  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
53 
59 
65 
66  using PixelType = typename Superclass::InputPixelType;
67 
68  using SizeType = typename TInputImage::SizeType;
69 
71 
74 
76 
79 
81  itkNewMacro(Self);
82 
84  using OutputType = typename Superclass::OutputType;
85 
87  using InputImageType = typename Superclass::InputImageType;
88 
90  using RealType = typename Superclass::RealType;
91 
93  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
94 
96  using PointType = typename Superclass::PointType;
97 
99  using IndexType = typename Superclass::IndexType;
100 
102  using ContinuousIndexType = typename Superclass::ContinuousIndexType;
103 
114  OutputType Evaluate(const PointType & point) const override;
115 
127  OutputType EvaluateAtContinuousIndex(
128  const ContinuousIndexType & index) const override;
129 
133  itkSetObjectMacro(Transform, TransformType);
134  itkGetModifiableObjectMacro(Transform, TransformType);
136 
138  itkSetObjectMacro(Interpolator, InterpolatorType);
139 
141  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
142 
144  itkSetMacro(FocalPoint, InputPointType);
145  itkGetConstMacro(FocalPoint, InputPointType);
147 
149  itkSetMacro(Threshold, double);
150  itkGetConstMacro(Threshold, double);
152 
156  bool IsInsideBuffer(const PointType &) const override
157  {
158  return true;
159  }
160 
161  bool IsInsideBuffer(const ContinuousIndexType &) const override
162  {
163  return true;
164  }
165 
166  bool IsInsideBuffer(const IndexType &) const override
167  {
168  return true;
169  }
170 
171 protected:
173  ~RayCastInterpolateImageFunction() override = default;
174 
175  void PrintSelf(std::ostream & os, Indent indent) const override;
176 
179  double m_Threshold;
181 };
182 } // namespace itk
183 
184 #ifndef ITK_MANUAL_INSTANTIATION
185 #include "itkRayCastInterpolateImageFunction.hxx"
186 #endif
187 
188 #endif
typename Superclass::ParametersType ParametersType
Definition: itkTransform.h:119
Light weight base class for most itk classes.
typename Superclass::ContinuousIndexType ContinuousIndexType
typename Superclass::OutputType OutputType
typename TransformType::InputPointType InputPointType
typename TransformType::JacobianType TransformJacobianType
typename NumericTraits< typename TInputImage::PixelType >::RealType RealType
typename Superclass::IndexType IndexType
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:83
Array2D class representing a 2D array with size defined at construction time.
Definition: itkArray2D.h:45
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
bool IsInsideBuffer(const PointType &) const override
Base class for all image interpolaters.
Projective interpolation of an image at specified positions.
typename Superclass::PointType PointType
typename Superclass::InputImageType InputImageType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename TransformType::ParametersType TransformParametersType
bool IsInsideBuffer(const ContinuousIndexType &) const override
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:52
typename InterpolatorType::Pointer InterpolatorPointer
typename TransformType::OutputPointType OutputPointType
bool IsInsideBuffer(const IndexType &) const override