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

itkCompose3DCovariantVectorImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCompose3DCovariantVectorImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-01 14:36:10 $
00007   Version:   $Revision: 1.8 $
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 __itkCompose3DCovariantVectorImageFilter_h
00018 #define __itkCompose3DCovariantVectorImageFilter_h
00019 
00020 #include "itkTernaryFunctorImageFilter.h"
00021 #include "itkCovariantVector.h"
00022 
00023 namespace itk
00024 {
00025   
00026 namespace Function {  
00027   
00028 template< class TInput >
00029 class Compose3DCovariantVector
00030 {
00031 public:
00032   typedef CovariantVector<TInput,3> OutputType;
00033   Compose3DCovariantVector() {}
00034   ~Compose3DCovariantVector() {}
00035   bool operator!=( const Compose3DCovariantVector & ) const
00036     {
00037     return false;
00038     }
00039   bool operator==( const Compose3DCovariantVector & other ) const
00040     {
00041     return !(*this != other);
00042     }
00043   inline OutputType operator()(  const TInput & s1, 
00044                                  const TInput & s2,
00045                                  const TInput & s3) const
00046     {
00047     OutputType v;
00048     v[0] = s1;
00049     v[1] = s2;
00050     v[2] = s3;
00051     return v;
00052     }
00053 }; 
00054 }
00055 
00068 template <typename TInputImage, 
00069           typename TOutputImage= 
00070           Image< CovariantVector< ITK_TYPENAME TInputImage::PixelType,3 >,
00071                  ::itk::GetImageDimension<TInputImage>::ImageDimension > >
00072 class ITK_EXPORT Compose3DCovariantVectorImageFilter :
00073     public
00074 TernaryFunctorImageFilter<TInputImage,TInputImage,
00075                           TInputImage,TOutputImage, 
00076                           Function::Compose3DCovariantVector< ITK_TYPENAME TInputImage::PixelType >   >
00077 {
00078 public:
00080   typedef Compose3DCovariantVectorImageFilter  Self;
00081   typedef TernaryFunctorImageFilter<
00082     TInputImage,TInputImage,TInputImage,
00083     TOutputImage, 
00084     Function::Compose3DCovariantVector< 
00085       ITK_TYPENAME TInputImage::PixelType > >
00086                                                Superclass;
00087   typedef SmartPointer<Self>                   Pointer;
00088   typedef SmartPointer<const Self>             ConstPointer;
00089 
00090   typedef typename Superclass::OutputImageType OutputImageType;
00091   
00093   itkNewMacro(Self);
00094 
00096   itkTypeMacro(Compose3DCovariantVectorImageFilter, 
00097                TernaryFunctorImageFilter);
00098 
00099 #ifdef ITK_USE_CONCEPT_CHECKING
00100 
00101   itkConceptMacro(InputHasNumericTraitsCheck,
00102     (Concept::HasNumericTraits<typename TInputImage::PixelType>));
00103 
00105 #endif
00106 
00107 protected:
00108   Compose3DCovariantVectorImageFilter() {}
00109   virtual ~Compose3DCovariantVectorImageFilter() {}
00110 
00111 private:
00112   Compose3DCovariantVectorImageFilter(const Self&); //purposely not implemented
00113   void operator=(const Self&); //purposely not implemented
00114 
00115 
00116 };
00117 
00118 } // end namespace itk
00119 
00120 
00121 #endif
00122 

Generated at Tue Sep 15 02:35:54 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000