Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkNeighborhoodInnerProduct.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkNeighborhoodInnerProduct.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/02/07 13:58:41 $
00007   Version:   $Revision: 1.13 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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 } // end namespace itk
00089   
00090 // Define instantiation macro for this template.
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 #ifndef ITK_MANUAL_INSTANTIATION
00107 #include "itkNeighborhoodInnerProduct.txx"
00108 #endif
00109 */
00110 
00111 #endif
00112 

Generated at Tue Jul 29 21:29:59 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000