00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkCompose2DVectorImageFilter_h
00018
#define __itkCompose2DVectorImageFilter_h
00019
00020
#include "itkBinaryFunctorImageFilter.h"
00021
#include "itkVector.h"
00022
00034
namespace itk
00035 {
00036
00037
namespace Function {
00038
00039
template<
class TInput >
00040 class Compose2DVector
00041 {
00042
public:
00043 typedef Vector<TInput,2> OutputType;
00044 Compose2DVector() {}
00045 ~Compose2DVector() {}
00046 inline OutputType operator()(
const TInput & s1,
00047
const TInput & s2 )
00048 {
00049
OutputType v;
00050 v[0] = s1;
00051 v[1] = s2;
00052
return v;
00053 }
00054 bool operator != (
const Compose2DVector&)
const
00055
{
00056
return false;
00057 }
00058 };
00059 }
00060
00061
template <
typename TInputImage,
00062
typename TOutputImage=
00063 Image< Vector< ITK_TYPENAME TInputImage::PixelType,2 >,
00064 ::itk::GetImageDimension<TInputImage>::ImageDimension > >
00065 class ITK_EXPORT Compose2DVectorImageFilter :
00066
public
00067
BinaryFunctorImageFilter<TInputImage,TInputImage,
00068 TOutputImage,
00069 Function::Compose2DVector< ITK_TYPENAME TInputImage::PixelType > >
00070 {
00071
public:
00073 typedef Compose2DVectorImageFilter
Self;
00074
typedef BinaryFunctorImageFilter<TInputImage,TInputImage,
00075 TOutputImage,
00076
Function::Compose2DVector<
00077
ITK_TYPENAME TInputImage::PixelType >
00078 >
Superclass;
00079 typedef SmartPointer<Self> Pointer;
00080 typedef SmartPointer<const Self> ConstPointer;
00081
00082 typedef typename Superclass::OutputImageType
OutputImageType;
00083
00085
itkNewMacro(
Self);
00086
00087
protected:
00088 Compose2DVectorImageFilter() {}
00089 virtual ~Compose2DVectorImageFilter() {}
00090
00091
private:
00092 Compose2DVectorImageFilter(
const Self&);
00093
void operator=(
const Self&);
00094
00095
00096 };
00097
00098 }
00099
00100
00101
#endif