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: 2002/09/11 19:57:13 $
00007   Version:   $Revision: 1.6 $
00008 
00009   Copyright (c) 2002 Insight 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 "itkSmartNeighborhoodIterator.h"
00022 #include "itkNeighborhood.h"
00023 #include "itkConstSliceIterator.h"
00024 #include "itkImageBoundaryCondition.h"
00025 
00026 namespace itk {
00027   
00042 template<class TImage, class TOperator=ITK_TYPENAME TImage::PixelType, class TComputation=TOperator>
00043 class 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   
00062   OutputPixelType operator()(const ConstNeighborhoodIterator<TImage> &it,
00063                        const OperatorType &op) const;
00064   OutputPixelType operator()(const std::slice &s,
00065                        const ConstNeighborhoodIterator<TImage> &it,
00066                        const OperatorType &op) const;
00067   };
00068 
00069 template<class TImage, class TOperator=ITK_TYPENAME TImage::PixelType, class TComputation=TOperator>
00070 class SmartNeighborhoodInnerProduct
00071 {
00072 public:
00074   typedef SmartNeighborhoodInnerProduct Self;
00075 
00077   typedef typename TImage::PixelType ImagePixelType;
00078   typedef TOperator OperatorPixelType;
00079   typedef TComputation OutputPixelType;
00080   
00082   itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension);
00083 
00085   typedef Neighborhood<OperatorPixelType,
00086                       itkGetStaticConstMacro(ImageDimension)> OperatorType;
00087 
00089   OutputPixelType operator()(const std::slice &s,
00090                        const ConstSmartNeighborhoodIterator<TImage> &it,
00091                        const OperatorType &op) const;
00092   OutputPixelType operator()(const ConstSmartNeighborhoodIterator<TImage> &it,
00093                        const OperatorType &op) const
00094     {
00095       return this->operator()(std::slice(0, it.Size(), 1), it, op);
00096     }
00097   };
00098   
00099   
00100   
00101 } // end namespace itk
00102   
00103 #ifndef ITK_MANUAL_INSTANTIATION
00104 #include "itkNeighborhoodInnerProduct.txx"
00105 #endif
00106 
00107 #endif

Generated at Wed Mar 12 01:13:08 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000