00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkCosImageFilter_h
00018
#define __itkCosImageFilter_h
00019
00020
#include "itkUnaryFunctorImageFilter.h"
00021
#include "vnl/vnl_math.h"
00022
00023
namespace itk
00024 {
00025
00044
namespace Functor {
00045
00046
template<
class TInput,
class TOutput>
00047 class Cos
00048 {
00049
public:
00050 Cos() {};
00051 ~Cos() {};
00052 inline TOutput
operator()(
const TInput & A )
00053 {
00054
return static_cast<TOutput>(cos( static_cast<double>(A)) );
00055 }
00056 };
00057
00058 }
00059
template <
class TInputImage,
class TOutputImage>
00060 class ITK_EXPORT CosImageFilter :
00061
public
00062
UnaryFunctorImageFilter<TInputImage,TOutputImage,
00063 Functor::Cos<
00064 typename TInputImage::PixelType,
00065 typename TOutputImage::PixelType> >
00066 {
00067
public:
00069 typedef CosImageFilter
Self;
00070
typedef UnaryFunctorImageFilter<TInputImage,TOutputImage,
00071
Functor::Cos<
typename TInputImage::PixelType,
00072 typename TOutputImage::PixelType> >
Superclass;
00073 typedef SmartPointer<Self> Pointer;
00074 typedef SmartPointer<const Self> ConstPointer;
00075
00077
itkNewMacro(
Self);
00078
00079
protected:
00080 CosImageFilter() {}
00081 virtual ~CosImageFilter() {}
00082
00083
private:
00084 CosImageFilter(
const Self&);
00085
void operator=(
const Self&);
00086
00087 };
00088
00089 }
00090
00091
00092
#endif