00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkTernaryAddImageFilter_h
00018
#define __itkTernaryAddImageFilter_h
00019
00020
#include "itkTernaryFunctorImageFilter.h"
00021
00022
namespace itk
00023 {
00024
00034
namespace Function {
00035
00036
template<
class TInput1,
class TInput2,
class TInput3,
class TOutput>
00037 class Add3
00038 {
00039
public:
00040 Add3() {}
00041 ~Add3() {}
00042 inline TOutput
operator()(
const TInput1 & A,
00043
const TInput2 & B,
00044
const TInput3 & C)
00045 {
return (TOutput)(A + B + C); }
00046 };
00047 }
00048
00049
template <
class TInputImage1,
class TInputImage2,
00050
class TInputImage3,
class TOutputImage>
00051 class ITK_EXPORT TernaryAddImageFilter :
00052
public
00053
TernaryFunctorImageFilter<TInputImage1,TInputImage2,
00054 TInputImage3,TOutputImage,
00055 Function::Add3< typename TInputImage1::PixelType,
00056 typename TInputImage2::PixelType,
00057 typename TInputImage3::PixelType,
00058 typename TOutputImage::PixelType> >
00059 {
00060
public:
00062 typedef TernaryAddImageFilter
Self;
00063
typedef TernaryFunctorImageFilter<TInputImage1,TInputImage2,
00064 TInputImage3,TOutputImage,
00065
Function::Add3<
typename TInputImage1::PixelType,
00066
typename TInputImage2::PixelType,
00067
typename TInputImage3::PixelType,
00068 typename TOutputImage::PixelType> >
Superclass;
00069 typedef SmartPointer<Self> Pointer;
00070 typedef SmartPointer<const Self> ConstPointer;
00071
00073
itkNewMacro(
Self);
00074
00075
protected:
00076 TernaryAddImageFilter() {}
00077 virtual ~TernaryAddImageFilter() {}
00078
00079
private:
00080 TernaryAddImageFilter(
const Self&);
00081
void operator=(
const Self&);
00082
00083 };
00084
00085 }
00086
00087
00088
#endif