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