ITK  4.8.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 >
40  public InterpolateImageFunction< TInputImage, TCoordRep >
41 {
42 public:
48 
50  itkStaticConstMacro(InputImageDimension, unsigned int,
51  TInputImage::ImageDimension);
52 
58 
64 
66 
67  typedef typename TInputImage::SizeType SizeType;
68 
70 
73 
75 
78 
80  itkNewMacro(Self);
81 
83  typedef typename Superclass::OutputType OutputType;
84 
87 
89  typedef typename Superclass::RealType RealType;
90 
92  itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
93 
95  typedef typename Superclass::PointType PointType;
96 
98  typedef typename Superclass::IndexType IndexType;
99 
102 
113  virtual OutputType Evaluate(const PointType & point) const ITK_OVERRIDE;
114 
127  const ContinuousIndexType & index) const ITK_OVERRIDE;
128 
130  itkSetObjectMacro(Transform, TransformType);
131 
133  itkGetModifiableObjectMacro(Transform, TransformType);
134 
136  itkSetObjectMacro(Interpolator, InterpolatorType);
137 
139  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
140 
142  itkSetMacro(FocalPoint, InputPointType);
143 
145  itkGetConstMacro(FocalPoint, InputPointType);
146 
148  itkSetMacro(Threshold, double);
149 
151  itkGetConstMacro(Threshold, double);
152 
156  inline bool IsInsideBuffer(const PointType &) const ITK_OVERRIDE
157  {
158  return true;
159  }
160 
161  bool IsInsideBuffer(const ContinuousIndexType &) const ITK_OVERRIDE
162  {
163  return true;
164  }
165 
166  bool IsInsideBuffer(const IndexType &) const ITK_OVERRIDE
167  {
168  return true;
169  }
170 
171 protected:
172 
175 
178 
180  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
181 
184 
187 
189  double m_Threshold;
190 
193 
194 private:
195  RayCastInterpolateImageFunction(const Self &); //purposely not implemented
196  void operator=(const Self &); //purposely not implemented
197 };
198 } // namespace itk
199 
200 #ifndef ITK_MANUAL_INSTANTIATION
201 #include "itkRayCastInterpolateImageFunction.hxx"
202 #endif
203 
204 #endif
InterpolateImageFunction< TInputImage, TCoordRep > InterpolatorType
Light weight base class for most itk classes.
virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override
InterpolatorPointer m_Interpolator
Pointer to the interpolator.
static const unsigned int ImageDimension
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
virtual OutputType Evaluate(const PointType &point) const override
Interpolate the image at a point position.
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
InterpolateImageFunction< TInputImage, TCoordRep > Superclass
InputPointType m_FocalPoint
The focal point or position of the ray source.
Class to hold and manage different parameter types used during optimization.
Superclass::InputImageType InputImageType
double m_Threshold
The threshold above which voxels along the ray path are integrated.
bool IsInsideBuffer(const PointType &) const override
Superclass::ContinuousIndexType ContinuousIndexType
Base class for all image interpolaters.
Projective interpolation of an image at specified positions.
RayCastInterpolateImageFunction()
Constructor.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
bool IsInsideBuffer(const ContinuousIndexType &) const override
void PrintSelf(std::ostream &os, Indent indent) const override
Print the object.
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:51
TransformPointer m_Transform
Transformation used to calculate the new focal point position.
bool IsInsideBuffer(const IndexType &) const override
NumericTraits< typename TInputImage::PixelType >::RealType RealType