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 
20 Program: Insight Segmentation & Registration Toolkit
21 Module: $RCSfile: itkAdvancedRayCastInterpolateImageFunction.h,v $
22 Language: C++
23 Date: $Date: 2009-04-23 03:53:36 $
24 Version: $Revision: 1.17 $
25 
26 Copyright (c) Insight Software Consortium. All rights reserved.
27 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
28 
29 This software is distributed WITHOUT ANY WARRANTY; without even
30 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
31 PURPOSE. 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 
41 namespace itk
42 {
43 
55 template< class TInputImage, class TCoordRep = double >
57  public InterpolateImageFunction< TInputImage, TCoordRep >
58 {
59 public:
60 
63  typedef InterpolateImageFunction< TInputImage, TCoordRep > Superclass;
64  typedef SmartPointer< Self > Pointer;
65  typedef SmartPointer< const Self > ConstPointer;
66 
68  itkStaticConstMacro( InputImageDimension, unsigned int,
69  TInputImage::ImageDimension );
70 
75  typedef Transform< TCoordRep, InputImageDimension, InputImageDimension > TransformType;
76 
77  typedef typename TransformType::Pointer TransformPointer;
78  typedef typename TransformType::InputPointType InputPointType;
79  typedef typename TransformType::OutputPointType OutputPointType;
80  typedef typename TransformType::ParametersType TransformParametersType;
81  typedef typename TransformType::JacobianType TransformJacobianType;
82 
83  typedef typename Superclass::InputPixelType PixelType;
84 
85  typedef typename TInputImage::SizeType SizeType;
86 
87  typedef Vector< TCoordRep, InputImageDimension > DirectionType;
88 
90  typedef InterpolateImageFunction< TInputImage, TCoordRep > InterpolatorType;
91 
92  typedef typename InterpolatorType::Pointer InterpolatorPointer;
93 
95  itkTypeMacro( AdvancedRayCastInterpolateImageFunction, InterpolateImageFunction );
96 
98  itkNewMacro( Self );
99 
101  typedef typename Superclass::OutputType OutputType;
102 
104  typedef typename Superclass::InputImageType InputImageType;
105 
107  typedef typename Superclass::RealType RealType;
108 
110  itkStaticConstMacro( ImageDimension, unsigned int, Superclass::ImageDimension );
111 
113  typedef typename Superclass::PointType PointType;
114 
116  typedef typename Superclass::IndexType IndexType;
117 
119  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
120 
131  OutputType Evaluate( const PointType & point ) const override;
132 
145  const ContinuousIndexType & index ) const override;
146 
148  itkSetObjectMacro( Transform, TransformType );
151 
153  itkSetObjectMacro( Interpolator, InterpolatorType );
156 
158  itkSetMacro( FocalPoint, InputPointType );
160  itkGetConstMacro( FocalPoint, InputPointType );
161 
163  itkSetMacro( Threshold, double );
165  itkGetConstMacro( Threshold, double );
166 
170  inline bool IsInsideBuffer( const PointType & ) const override
171  {
172  return true;
173  }
174 
175 
176  bool IsInsideBuffer( const ContinuousIndexType & ) const override
177  {
178  return true;
179  }
180 
181 
182  bool IsInsideBuffer( const IndexType & ) const override
183  {
184  return true;
185  }
186 
187 
188 protected:
189 
192 
195 
197  void PrintSelf( std::ostream & os, Indent indent ) const override;
198 
201 
204 
206  double m_Threshold;
207 
210 
211 private:
212 
213  AdvancedRayCastInterpolateImageFunction( const Self & ); // purposely not implemented
214  void operator=( const Self & ); // purposely not implemented
215 
216  SizeType GetRadius() const override
217  {
218  const InputImageType* const input = this->GetInputImage();
219  if (!input)
220  {
221  itkExceptionMacro("Input image required!");
222  }
223  return input->GetLargestPossibleRegion().GetSize();
224  }
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.
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override
OutputType Evaluate(const PointType &point) const override
Interpolate the image at a point position.
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
bool IsInsideBuffer(const ContinuousIndexType &) const override
void PrintSelf(std::ostream &os, Indent indent) const override
Print the object.
itkGetModifiableObjectMacro(Interpolator, InterpolatorType)
itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension)
double m_Threshold
The threshold above which voxels along the ray path are integrated.
TransformPointer m_Transform
Transformation used to calculate the new focal point position.
Transform< TCoordRep, InputImageDimension, InputImageDimension > TransformType
InputPointType m_FocalPoint
The focal point or position of the ray source.
InterpolateImageFunction< TInputImage, TCoordRep > Superclass
itkGetModifiableObjectMacro(Transform, TransformType)
InterpolateImageFunction< TInputImage, TCoordRep > InterpolatorType


Generated on 1641078589 for elastix by doxygen 1.9.1 elastix logo