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

itkTernaryFunctorImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkTernaryFunctorImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/03/25 19:06:18 $
00007   Version:   $Revision: 1.28 $
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 __itkTernaryFunctorImageFilter_h
00018 #define __itkTernaryFunctorImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImageRegionIteratorWithIndex.h"
00022 
00023 namespace itk
00024 {
00025   
00035 template <class TInputImage1, class TInputImage2, 
00036           class TInputImage3, class TOutputImage, class TFunction    >
00037 class ITK_EXPORT TernaryFunctorImageFilter :
00038     public ImageToImageFilter<TInputImage1,TOutputImage> 
00039 {
00040 public:
00042   typedef TernaryFunctorImageFilter  Self;
00043   typedef ImageToImageFilter<TInputImage1,TOutputImage>   Superclass;
00044   typedef SmartPointer<Self>        Pointer;
00045   typedef SmartPointer<const Self>  ConstPointer;
00046 
00048   itkNewMacro(Self);
00049 
00051   itkTypeMacro(TernaryFunctorImageFilter, ImageToImageFilter);
00052 
00054   typedef TFunction   FunctorType;
00055   typedef TInputImage1 Input1ImageType;
00056   typedef typename Input1ImageType::ConstPointer Input1ImagePointer;
00057   typedef typename Input1ImageType::RegionType Input1ImageRegionType; 
00058   typedef typename Input1ImageType::PixelType Input1ImagePixelType; 
00059   typedef TInputImage2 Input2ImageType;
00060   typedef typename Input2ImageType::ConstPointer Input2ImagePointer;
00061   typedef typename Input2ImageType::RegionType Input2ImageRegionType; 
00062   typedef typename Input2ImageType::PixelType Input2ImagePixelType; 
00063   typedef TInputImage2 Input3ImageType;
00064   typedef typename Input3ImageType::ConstPointer Input3ImagePointer;
00065   typedef typename Input3ImageType::RegionType Input3ImageRegionType; 
00066   typedef typename Input3ImageType::PixelType Input3ImagePixelType; 
00067   typedef TOutputImage OutputImageType;
00068   typedef typename OutputImageType::Pointer OutputImagePointer;
00069   typedef typename OutputImageType::RegionType OutputImageRegionType;
00070   typedef typename OutputImageType::PixelType OutputImagePixelType;
00071 
00073    void SetInput1( const TInputImage1 *image1);
00074 
00076   void SetInput2( const TInputImage2 *image2);
00077 
00079   void SetInput3( const TInputImage3 *image3);
00080 
00085   FunctorType& GetFunctor(void) { return m_Functor; };
00086 
00093   void SetFunctor(const FunctorType& functor)
00094     {
00095     if ( m_Functor != functor )
00096       {
00097       m_Functor = functor;
00098       this->Modified();
00099       }
00100     }
00101 
00102 protected:
00103   TernaryFunctorImageFilter();
00104   virtual ~TernaryFunctorImageFilter() {};
00105 
00116   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00117                             int threadId );
00118 
00119 private:
00120   TernaryFunctorImageFilter(const Self&); //purposely not implemented
00121   void operator=(const Self&); //purposely not implemented
00122 
00123   FunctorType m_Functor;
00124 };
00125 
00126 } // end namespace itk
00127 
00128 #ifndef ITK_MANUAL_INSTANTIATION
00129 #include "itkTernaryFunctorImageFilter.txx"
00130 #endif
00131 
00132 #endif

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