Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkNeighborhoodInnerProduct_h
00018 #define __itkNeighborhoodInnerProduct_h
00019
00020 #include "itkNeighborhoodIterator.h"
00021 #include "itkNeighborhood.h"
00022 #include "itkConstSliceIterator.h"
00023 #include "itkImageBoundaryCondition.h"
00024
00025 namespace itk {
00026
00042 template<class TImage, class TOperator=ITK_TYPENAME TImage::PixelType, class TComputation=TOperator>
00043 class ITK_EXPORT NeighborhoodInnerProduct
00044 {
00045 public:
00047 typedef NeighborhoodInnerProduct Self;
00048
00050 typedef typename TImage::PixelType ImagePixelType;
00051 typedef TOperator OperatorPixelType;
00052 typedef TComputation OutputPixelType;
00053
00055 itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension);
00056
00058 typedef Neighborhood<OperatorPixelType,
00059 itkGetStaticConstMacro(ImageDimension)> OperatorType;
00060
00061 typedef Neighborhood<ImagePixelType,
00062 itkGetStaticConstMacro(ImageDimension)> NeighborhoodType;
00063
00065 OutputPixelType operator()(const std::slice &s,
00066 const ConstNeighborhoodIterator<TImage> &it,
00067 const OperatorType &op) const;
00068 OutputPixelType operator()(const ConstNeighborhoodIterator<TImage> &it,
00069 const OperatorType &op) const
00070 {
00071 return this->operator()(std::slice(0, it.Size(), 1), it, op);
00072 }
00074
00075
00076 OutputPixelType operator()(const std::slice &s,
00077 const NeighborhoodType &N,
00078 const OperatorType &op) const;
00079
00080 OutputPixelType operator()(const NeighborhoodType &N,
00081 const OperatorType &op) const
00082 {
00083 return this->operator()(std::slice(0, N.Size(), 1), N, op);
00084 }
00085
00086 };
00087
00088 }
00089
00090
00091 #define ITK_TEMPLATE_NeighborhoodInnerProduct(_, EXPORT, x, y) namespace itk { \
00092 _(3(class EXPORT NeighborhoodInnerProduct< ITK_TEMPLATE_3 x >)) \
00093 namespace Templates { typedef NeighborhoodInnerProduct< ITK_TEMPLATE_3 x > \
00094 NeighborhoodInnerProduct##y; } \
00095 }
00096
00097 #if ITK_TEMPLATE_EXPLICIT
00098 # include "Templates/itkNeighborhoodInnerProduct+-.h"
00099 #endif
00100
00101 #if ITK_TEMPLATE_TXX
00102 # include "itkNeighborhoodInnerProduct.txx"
00103 #endif
00104
00105
00106
00107
00108
00109
00110
00111 #endif
00112