00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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 bool operator!=( const Compose3DCovariantVector & ) const
00048 {
00049 return false;
00050 }
00051 bool operator==( const Compose3DCovariantVector & 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< 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<TInputImage,TInputImage,TInputImage,
00082 TOutputImage,
00083 Function::Compose3DCovariantVector<
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
00095 itkTypeMacro(Compose3DCovariantVectorImageFilter,
00096 TernaryFunctorImageFilter);
00097
00098 #ifdef ITK_USE_CONCEPT_CHECKING
00099
00100 itkConceptMacro(InputHasNumericTraitsCheck,
00101 (Concept::HasNumericTraits<typename TInputImage::PixelType>));
00102
00104 #endif
00105
00106 protected:
00107 Compose3DCovariantVectorImageFilter() {}
00108 virtual ~Compose3DCovariantVectorImageFilter() {}
00109
00110 private:
00111 Compose3DCovariantVectorImageFilter(const Self&);
00112 void operator=(const Self&);
00113
00114
00115 };
00116
00117 }
00118
00119
00120 #endif
00121