00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkSinImageAdaptor_h
00018
#define __itkSinImageAdaptor_h
00019
00020
#include <itkImageAdaptor.h>
00021
#include "vnl/vnl_math.h"
00022
00023
namespace itk
00024 {
00025
00026
namespace Accessor {
00037
template <
class TInternalType,
class TExternalType >
00038 class ITK_EXPORT SinPixelAccessor
00039 {
00040
public:
00043 typedef TExternalType
ExternalType;
00044
00047 typedef TInternalType
InternalType;
00048
00049 static inline void Set(TInternalType & output,
const TExternalType & input)
00050 {output = (TInternalType)sin((
double)input);}
00051
00052 static inline TExternalType Get(
const TInternalType & input )
00053 {
return (TExternalType)sin((
double)input);}
00054 };
00055
00056 }
00057
00066
template <
class TImage,
class TOutputPixelType>
00067 class ITK_EXPORT SinImageAdaptor :
public
00068
ImageAdaptor<TImage,
00069 Accessor::SinPixelAccessor<
00070 typename TImage::PixelType,
00071 TOutputPixelType> >
00072 {
00073
public:
00075 typedef SinImageAdaptor
Self;
00076
typedef ImageAdaptor<TImage,
Accessor::SinPixelAccessor<
00077
typename TImage::PixelType,
00078 TOutputPixelType> >
Superclass;
00079 typedef SmartPointer<Self> Pointer;
00080 typedef SmartPointer<const Self> ConstPointer;
00081
00083
itkNewMacro(
Self);
00084
00086
itkTypeMacro( SinImageAdaptor,
ImageAdaptor );
00087
00088
protected:
00089 SinImageAdaptor() {}
00090 virtual ~SinImageAdaptor() {}
00091
00092
private:
00093 SinImageAdaptor(
const Self&);
00094
void operator=(
const Self&);
00095
00096 };
00097
00098 }
00099
00100
#endif