Orfeo Toolbox  4.0
itkVectorMeanImageFunction.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 __itkVectorMeanImageFunction_h
19 #define __itkVectorMeanImageFunction_h
20 
21 #include "itkImageFunction.h"
22 #include "itkNumericTraits.h"
23 
24 namespace itk
25 {
44 template< typename TInputImage, typename TCoordRep = float >
46  public ImageFunction< TInputImage,
47  typename NumericTraits< typename TInputImage::PixelType >::RealType,
48  TCoordRep >
49 {
50 public:
53  typedef ImageFunction< TInputImage,
55  TCoordRep > Superclass;
56 
59 
62 
64  itkNewMacro(Self);
65 
67  typedef TInputImage InputImageType;
68 
71 
73  typedef typename Superclass::IndexType IndexType;
74 
77 
79  typedef typename Superclass::PointType PointType;
80 
82  itkStaticConstMacro(ImageDimension, unsigned int,
83  InputImageType::ImageDimension);
84 
87 
89  virtual RealType EvaluateAtIndex(const IndexType & index) const;
90 
92  virtual RealType Evaluate(const PointType & point) const
93  {
94  IndexType index;
95 
96  this->ConvertPointToNearestIndex(point, index);
97  return this->EvaluateAtIndex(index);
98  }
99 
101  const ContinuousIndexType & cindex) const
102  {
103  IndexType index;
104 
105  this->ConvertContinuousIndexToNearestIndex(cindex, index);
106  return this->EvaluateAtIndex(index);
107  }
108 
111  itkSetMacro(NeighborhoodRadius, unsigned int);
112  itkGetConstReferenceMacro(NeighborhoodRadius, unsigned int);
113 
114 protected:
117  void PrintSelf(std::ostream & os, Indent indent) const;
118 
119 private:
120  VectorMeanImageFunction(const Self &); //purposely not implemented
121  void operator=(const Self &); //purposely not implemented
122 
123  unsigned int m_NeighborhoodRadius;
124 };
125 } // end namespace itk
126 
127 #ifndef ITK_MANUAL_INSTANTIATION
129 #endif
130 
131 #endif

Generated at Sat Mar 8 2014 15:42:31 for Orfeo Toolbox with doxygen 1.8.3.1