ITK  4.4.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< class TInputImage, class TCoordRep = double >
40  public InterpolateImageFunction< TInputImage, TCoordRep >
41 {
42 public:
48 
50  itkStaticConstMacro(InputImageDimension, unsigned int,
51  TInputImage::ImageDimension);
52 
58 
64 
65  typedef typename Superclass::InputPixelType PixelType;
66 
67  typedef typename TInputImage::SizeType SizeType;
68 
70 
73 
75 
78 
80  itkNewMacro(Self);
81 
83  typedef typename Superclass::OutputType OutputType;
84 
86  typedef typename Superclass::InputImageType InputImageType;
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 
101  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
102 
113  virtual OutputType Evaluate(const PointType & point) const;
114 
126  virtual OutputType EvaluateAtContinuousIndex(
127  const ContinuousIndexType & index) const;
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
157  {
158  return true;
159  }
160 
161  bool IsInsideBuffer(const ContinuousIndexType &) const
162  {
163  return true;
164  }
165 
166  bool IsInsideBuffer(const IndexType &) const
167  {
168  return true;
169  }
170 
171 protected:
172 
175 
178 
180  void PrintSelf(std::ostream & os, Indent indent) const;
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
205