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

itkMultiplyImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMultiplyImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/01/15 19:36:08 $
00007   Version:   $Revision: 1.17 $
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 __itkMultiplyImageFilter_h
00018 #define __itkMultiplyImageFilter_h
00019 
00020 #include "itkBinaryFunctorImageFilter.h"
00021 
00022 namespace itk
00023 {
00024   
00034 namespace Function {  
00035 
00036   template< class TInput1, class TInput2, class TOutput>
00037   class Mult
00038   {
00039   public:
00040     Mult() {}
00041     ~Mult() {}
00042     inline TOutput operator()( const TInput1 & A, const TInput2 & B)
00043       { return (TOutput)(A * B); }
00044   }; 
00045 }
00046 
00047 template <class TInputImage1, class TInputImage2, class TOutputImage>
00048 class ITK_EXPORT MultiplyImageFilter :
00049     public
00050     BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage, 
00051     Function::Mult< 
00052               typename TInputImage1::PixelType, 
00053               typename TInputImage2::PixelType,
00054               typename TOutputImage::PixelType>   >
00055 {
00056 public:
00058   typedef MultiplyImageFilter  Self;
00059   typedef BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage, 
00060               Function::Mult< 
00061               typename TInputImage1::PixelType, 
00062               typename TInputImage2::PixelType,
00063               typename TOutputImage::PixelType>   
00064                 > Superclass;
00065   typedef SmartPointer<Self>   Pointer;
00066   typedef SmartPointer<const Self>  ConstPointer;
00067 
00069   itkNewMacro(Self);
00070   
00071 protected:
00072   MultiplyImageFilter() {}
00073   virtual ~MultiplyImageFilter() {}
00074 
00075 private:
00076   MultiplyImageFilter(const Self&); //purposely not implemented
00077   void operator=(const Self&); //purposely not implemented
00078 
00079 };
00080 
00081 } // end namespace itk
00082 
00083 
00084 #endif

Generated at Fri May 21 01:15:05 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000