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
00092
00093
00094 }
00095
00096 #ifndef ITK_MANUAL_INSTANTIATION
00097 #include "itkNeighborhoodInnerProduct.txx"
00098 #endif
00099
00100 #endif
00101