go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAdvancedRayCastInterpolateImageFunction.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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/*=========================================================================
19
20Program: Insight Segmentation & Registration Toolkit
21Module: $RCSfile: itkAdvancedRayCastInterpolateImageFunction.h,v $
22Language: C++
23Date: $Date: 2009-04-23 03:53:36 $
24Version: $Revision: 1.17 $
25
26Copyright (c) Insight Software Consortium. All rights reserved.
27See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
28
29This software is distributed WITHOUT ANY WARRANTY; without even
30the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
31PURPOSE. See the above copyright notices for more information.
32
33=========================================================================*/
34#ifndef itkAdvancedRayCastInterpolateImageFunction_h
35#define itkAdvancedRayCastInterpolateImageFunction_h
36
37#include "itkInterpolateImageFunction.h"
38#include "itkTransform.h"
39#include "itkVector.h"
40
41namespace itk
42{
43
55template <class TInputImage, class TCoordRep = double>
57 : public InterpolateImageFunction<TInputImage, TCoordRep>
58{
59public:
61
64 using Superclass = InterpolateImageFunction<TInputImage, TCoordRep>;
65 using Pointer = SmartPointer<Self>;
66 using ConstPointer = SmartPointer<const Self>;
67
69 itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
70
75 using TransformType = Transform<TCoordRep, InputImageDimension, InputImageDimension>;
76
77 using TransformPointer = typename TransformType::Pointer;
78 using InputPointType = typename TransformType::InputPointType;
79 using OutputPointType = typename TransformType::OutputPointType;
80 using TransformParametersType = typename TransformType::ParametersType;
81 using TransformJacobianType = typename TransformType::JacobianType;
82
83 using PixelType = typename Superclass::InputPixelType;
84
85 using SizeType = typename TInputImage::SizeType;
86
87 using DirectionType = Vector<TCoordRep, InputImageDimension>;
88
90 using InterpolatorType = InterpolateImageFunction<TInputImage, TCoordRep>;
91
92 using InterpolatorPointer = typename InterpolatorType::Pointer;
93
95 itkTypeMacro(AdvancedRayCastInterpolateImageFunction, InterpolateImageFunction);
96
98 itkNewMacro(Self);
99
101 using typename Superclass::OutputType;
102
104 using typename Superclass::InputImageType;
105
107 using typename Superclass::RealType;
108
110 itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
111
113 using typename Superclass::PointType;
114
116 using typename Superclass::IndexType;
117
119 using typename Superclass::ContinuousIndexType;
120
131 OutputType
132 Evaluate(const PointType & point) const override;
133
145 OutputType
146 EvaluateAtContinuousIndex(const ContinuousIndexType & index) const override;
147
149 itkSetObjectMacro(Transform, TransformType);
152
154 itkSetObjectMacro(Interpolator, InterpolatorType);
157
159 itkSetMacro(FocalPoint, InputPointType);
161 itkGetConstMacro(FocalPoint, InputPointType);
162
164 itkSetMacro(Threshold, double);
166 itkGetConstMacro(Threshold, double);
167
171 bool
172 IsInsideBuffer(const PointType &) const override
173 {
174 return true;
175 }
176
177
178 bool
179 IsInsideBuffer(const ContinuousIndexType &) const override
180 {
181 return true;
182 }
183
184
185 bool
186 IsInsideBuffer(const IndexType &) const override
187 {
188 return true;
189 }
190
191
192protected:
195
198
200 void
201 PrintSelf(std::ostream & os, Indent indent) const override;
202
205
207 InputPointType m_FocalPoint{};
208
210 double m_Threshold{ 0.0 };
211
214
215private:
217 GetRadius() const override
218 {
219 const InputImageType * const input = this->GetInputImage();
220 if (!input)
221 {
222 itkExceptionMacro("Input image required!");
223 }
224 return input->GetLargestPossibleRegion().GetSize();
225 }
226};
227
228} // namespace itk
229
230#ifndef ITK_MANUAL_INSTANTIATION
231# include "itkAdvancedRayCastInterpolateImageFunction.hxx"
232#endif
233
234#endif
Projective interpolation of an image at specified positions.
InterpolatorPointer m_Interpolator
Pointer to the interpolator.
ITK_DISALLOW_COPY_AND_MOVE(AdvancedRayCastInterpolateImageFunction)
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override
OutputType Evaluate(const PointType &point) const override
Interpolate the image at a point position.
Transform< TCoordRep, InputImageDimension, InputImageDimension > TransformType
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
bool IsInsideBuffer(const ContinuousIndexType &) const override
void PrintSelf(std::ostream &os, Indent indent) const override
Print the object.
~AdvancedRayCastInterpolateImageFunction() override=default
Destructor.
itkGetModifiableObjectMacro(Interpolator, InterpolatorType)
itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension)
InterpolateImageFunction< TInputImage, TCoordRep > Superclass
TransformPointer m_Transform
Transformation used to calculate the new focal point position.
AdvancedRayCastInterpolateImageFunction()=default
Constructor.
itkGetModifiableObjectMacro(Transform, TransformType)
InterpolateImageFunction< TInputImage, TCoordRep > InterpolatorType


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo