Orfeo Toolbox  3.16
itkVectorMeanImageFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkVectorMeanImageFunction.h,v $
5  Language: C++
6  Date: $Date: 2009-03-03 15:11:41 $
7  Version: $Revision: 1.5 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkVectorMeanImageFunction_h
18 #define __itkVectorMeanImageFunction_h
19 
20 #include "itkImageFunction.h"
21 #include "itkNumericTraits.h"
22 
23 namespace itk
24 {
25 
43 template <class TInputImage, class TCoordRep = float >
45  public ImageFunction< TInputImage,
46  FixedArray<
47  ITK_TYPENAME NumericTraits<typename TInputImage::PixelType::ValueType>::RealType,
48  ::itk::GetVectorDimension<typename TInputImage::PixelType>::VectorDimension >,
49  TCoordRep >
50 {
51 public:
54  typedef ImageFunction<TInputImage,
55  FixedArray<
56  ITK_TYPENAME NumericTraits<typename TInputImage::PixelType::ValueType>::RealType,
58  TCoordRep > Superclass;
61 
64 
66  itkNewMacro(Self);
67 
69  typedef TInputImage InputImageType;
70 
72  typedef typename Superclass::OutputType OutputType;
73 
75  typedef typename Superclass::IndexType IndexType;
76 
78  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
79 
81  typedef typename Superclass::PointType PointType;
82 
84  itkStaticConstMacro(ImageDimension, unsigned int,
85  InputImageType::ImageDimension);
86 
88  typedef FixedArray<
89  typename NumericTraits<typename InputImageType::PixelType::ValueType>::RealType,
92 
94  virtual RealType EvaluateAtIndex( const IndexType& index ) const;
95 
97  virtual RealType Evaluate( const PointType& point ) const
98  {
99  IndexType index;
100  this->ConvertPointToNearestIndex( point, index );
101  return this->EvaluateAtIndex( index );
102  }
103  virtual RealType EvaluateAtContinuousIndex(
104  const ContinuousIndexType& cindex ) const
105  {
106  IndexType index;
107  this->ConvertContinuousIndexToNearestIndex( cindex, index );
108  return this->EvaluateAtIndex( index );
109  }
110 
113  itkSetMacro( NeighborhoodRadius, unsigned int );
114  itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int );
115 
116 protected:
119  void PrintSelf(std::ostream& os, Indent indent) const;
120 
121 private:
122  VectorMeanImageFunction( const Self& ); //purposely not implemented
123  void operator=( const Self& ); //purposely not implemented
124 
125  unsigned int m_NeighborhoodRadius;
126 
127 };
128 
129 } // end namespace itk
130 
131 // Define instantiation macro for this template.
132 #define ITK_TEMPLATE_VectorMeanImageFunction(_, EXPORT, x, y) namespace itk { \
133  _(2(class EXPORT VectorMeanImageFunction< ITK_TEMPLATE_2 x >)) \
134  namespace Templates { typedef VectorMeanImageFunction< ITK_TEMPLATE_2 x > \
135  VectorMeanImageFunction##y; } \
136  }
137 
138 #if ITK_TEMPLATE_EXPLICIT
139 # include "Templates/itkVectorMeanImageFunction+-.h"
140 #endif
141 
142 #if ITK_TEMPLATE_TXX
144 #endif
145 
146 #endif

Generated at Sun Feb 3 2013 00:12:31 for Orfeo Toolbox with doxygen 1.8.1.1