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

itkCompose3DVectorImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCompose3DVectorImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006/03/24 16:03:17 $
00007   Version:   $Revision: 1.4 $
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 __itkCompose3DVectorImageFilter_h
00018 #define __itkCompose3DVectorImageFilter_h
00019 
00020 #include "itkTernaryFunctorImageFilter.h"
00021 #include "itkVector.h"
00022 
00035 namespace itk
00036 {
00037   
00038 namespace Function {  
00039   
00040 template< class TInput >
00041 class Compose3DVector
00042 {
00043 public:
00044   typedef Vector<TInput,3> OutputType;
00045   Compose3DVector() {}
00046   ~Compose3DVector() {}
00047   bool operator!=( const Compose3DVector & ) const
00048   {
00049     return false;
00050   }
00051   bool operator==( const Compose3DVector & other ) const
00052   {
00053     return !(*this != other);
00054   }
00055   inline OutputType operator()(  const TInput & s1, 
00056                                  const TInput & s2,
00057                                  const TInput & s3)
00058   {
00059     OutputType v;
00060     v[0] = s1;
00061     v[1] = s2;
00062     v[2] = s3;
00063     return v;
00064   }
00065 }; 
00066 }
00067 
00068 template <typename TInputImage, 
00069           typename TOutputImage= 
00070           Image< Vector< ITK_TYPENAME TInputImage::PixelType,3 >,
00071                  ::itk::GetImageDimension<TInputImage>::ImageDimension > >
00072 class ITK_EXPORT Compose3DVectorImageFilter :
00073     public
00074 TernaryFunctorImageFilter<TInputImage,TInputImage,
00075                           TInputImage,TOutputImage, 
00076                           Function::Compose3DVector< ITK_TYPENAME TInputImage::PixelType >   >
00077 {
00078 public:
00080   typedef Compose3DVectorImageFilter  Self;
00081   typedef TernaryFunctorImageFilter<TInputImage,TInputImage,TInputImage,
00082                                     TOutputImage, 
00083                                     Function::Compose3DVector< 
00084     ITK_TYPENAME TInputImage::PixelType > 
00085   >  Superclass;
00086   typedef SmartPointer<Self>   Pointer;
00087   typedef SmartPointer<const Self>  ConstPointer;
00088 
00089   typedef typename Superclass::OutputImageType OutputImageType;
00090   
00092   itkNewMacro(Self);
00093 
00094 #ifdef ITK_USE_CONCEPT_CHECKING
00095 
00096   itkConceptMacro(InputHasNumericTraitsCheck,
00097     (Concept::HasNumericTraits<typename TInputImage::PixelType>));
00098 
00100 #endif
00101 
00102 protected:
00103   Compose3DVectorImageFilter() {}
00104   virtual ~Compose3DVectorImageFilter() {}
00105 
00106 private:
00107   Compose3DVectorImageFilter(const Self&); //purposely not implemented
00108   void operator=(const Self&); //purposely not implemented
00109 
00110 
00111 };
00112 
00113 } // end namespace itk
00114 
00115 
00116 #endif
00117 

Generated at Sun Sep 23 12:14:34 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000