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: 2003/12/12 16:07:48 $
00007   Version:   $Revision: 1.1 $
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 
00035 namespace itk
00036 {
00037   
00038 namespace Function {  
00039   
00040 template< class TInput >
00041 class Compose3DCovariantVector
00042 {
00043 public:
00044   typedef CovariantVector<TInput,3> OutputType;
00045   Compose3DCovariantVector() {}
00046   ~Compose3DCovariantVector() {}
00047   inline OutputType operator()(  const TInput & s1, 
00048                                  const TInput & s2,
00049                                  const TInput & s3)
00050   {
00051     OutputType v;
00052     v[0] = s1;
00053     v[1] = s2;
00054     v[2] = s3;
00055     return v;
00056   }
00057   bool operator != (const Compose3DCovariantVector&) const
00058   {
00059     return false;
00060   }
00061 }; 
00062 }
00063 
00064 template <typename TInputImage, 
00065           typename TOutputImage= 
00066           Image< CovariantVector< ITK_TYPENAME TInputImage::PixelType,3 >,
00067                  ::itk::GetImageDimension<TInputImage>::ImageDimension > >
00068 class ITK_EXPORT Compose3DCovariantVectorImageFilter :
00069     public
00070 TernaryFunctorImageFilter<TInputImage,TInputImage,
00071                           TInputImage,TOutputImage, 
00072                           Function::Compose3DCovariantVector< ITK_TYPENAME TInputImage::PixelType >   >
00073 {
00074 public:
00076   typedef Compose3DCovariantVectorImageFilter  Self;
00077   typedef TernaryFunctorImageFilter<TInputImage,TInputImage,TInputImage,
00078                                     TOutputImage, 
00079                                     Function::Compose3DCovariantVector< 
00080     ITK_TYPENAME TInputImage::PixelType > 
00081   >  Superclass;
00082   typedef SmartPointer<Self>   Pointer;
00083   typedef SmartPointer<const Self>  ConstPointer;
00084 
00085   typedef typename Superclass::OutputImageType OutputImageType;
00086   
00088   itkNewMacro(Self);
00089   
00090 protected:
00091   Compose3DCovariantVectorImageFilter() {}
00092   virtual ~Compose3DCovariantVectorImageFilter() {}
00093 
00094 private:
00095   Compose3DCovariantVectorImageFilter(const Self&); //purposely not implemented
00096   void operator=(const Self&); //purposely not implemented
00097 
00098 
00099 };
00100 
00101 } // end namespace itk
00102 
00103 
00104 #endif

Generated at Wed May 24 22:57:40 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000