00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkVectorNeighborhoodInnerProduct_h
00018 #define __itkVectorNeighborhoodInnerProduct_h
00019
00020 #include "itkNeighborhoodIterator.h"
00021 #include "itkSmartNeighborhoodIterator.h"
00022 #include "itkVector.h"
00023 #include "itkNeighborhood.h"
00024 #include "itkConstSliceIterator.h"
00025 #include "itkImageBoundaryCondition.h"
00026
00027 namespace itk {
00028
00043 template<class TImage>
00044 class VectorNeighborhoodInnerProduct
00045 {
00046 public:
00048 typedef VectorNeighborhoodInnerProduct Self;
00049
00051 typedef typename TImage::PixelType PixelType;
00052 typedef typename PixelType::ValueType ScalarValueType;
00053
00055 itkStaticConstMacro(VectorDimension, unsigned int,
00056 PixelType::VectorDimension);
00057 itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension);
00058
00060 typedef Neighborhood<ScalarValueType,
00061 itkGetStaticConstMacro(ImageDimension)> OperatorType;
00062
00064 PixelType operator()(const ConstNeighborhoodIterator<TImage> &it,
00065 const OperatorType &op) const;
00066
00068 PixelType operator()(const std::slice &s,
00069 const ConstNeighborhoodIterator<TImage> &it,
00070 const OperatorType &op) const;
00071 };
00072
00073 template<class TImage>
00074 class SmartVectorNeighborhoodInnerProduct
00075 {
00076 public:
00078 typedef SmartVectorNeighborhoodInnerProduct Self;
00079
00081 typedef typename TImage::PixelType PixelType;
00082 typedef typename PixelType::ValueType ScalarValueType;
00083
00085 itkStaticConstMacro(VectorDimension, unsigned int,
00086 PixelType::VectorDimension);
00087 itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension);
00088
00090 typedef Neighborhood<ScalarValueType,
00091 itkGetStaticConstMacro(ImageDimension)> OperatorType;
00092
00094 PixelType operator()(const std::slice &s,
00095 const ConstSmartNeighborhoodIterator<TImage> &it,
00096 const OperatorType &op) const;
00097
00099 PixelType operator()(const ConstSmartNeighborhoodIterator<TImage> &it,
00100 const OperatorType &op) const
00101 {
00102 return this->operator()(std::slice(0, it.Size(), 1), it, op);
00103 }
00104 };
00105
00106 }
00107
00108 #ifndef ITK_MANUAL_INSTANTIATION
00109 #include "itkVectorNeighborhoodInnerProduct.txx"
00110 #endif
00111
00112 #endif