00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkNthElementImageAdaptor_h
00018
#define __itkNthElementImageAdaptor_h
00019
00020
#include <itkImageAdaptor.h>
00021
#include <itkNthElementPixelAccessor.h>
00022
00023
namespace itk
00024 {
00025
00037
template <
class TImage,
class TOutputPixelType>
00038 class ITK_EXPORT NthElementImageAdaptor :
public
00039
ImageAdaptor<TImage,
00040 NthElementPixelAccessor<
00041 TOutputPixelType,
00042 typename TImage::PixelType> >
00043 {
00044
public:
00046 typedef NthElementImageAdaptor
Self;
00047
typedef ImageAdaptor<TImage,NthElementImageAdaptor<
00048 TOutputPixelType,
00049 typename TImage::PixelType > >
Superclass;
00050 typedef SmartPointer<Self> Pointer;
00051 typedef SmartPointer<const Self> ConstPointer;
00052
00054
itkTypeMacro( NthElementImageAdaptor,
ImageAdaptor );
00055
00057
itkNewMacro(
Self);
00058
00060 void SelectNthElement(
unsigned int nth )
00061 { this->GetPixelAccessor().SetElementNumber( nth );
00062 this->Modified(); }
00063
00064
protected:
00065 NthElementImageAdaptor() {}
00066 virtual ~NthElementImageAdaptor() {}
00067
00068
private:
00069 NthElementImageAdaptor(
const Self&);
00070
void operator=(
const Self&);
00071 };
00072
00073
00074 }
00075
00076
#endif