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

itkTernaryMagnitudeSquaredImageFilter.h

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

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