ITK  4.4.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Private Attributes | List of all members
itk::NthElementPixelAccessor< T, TContainer > Class Template Reference

#include <itkNthElementPixelAccessor.h>

Detailed Description

template<class T, class TContainer>
class itk::NthElementPixelAccessor< T, TContainer >

Give access to the N-th of a Container type.

This class is intended to be used as parameter of an ImageAdaptor to make a Container appears as being of scalar type T, showing only the N-th component.

This class is templated over the container type. Any container type that provides a method: operator[]( unsigned int ) can be used here, for example: itkPoint, itkVector, itkVectorContainer, and std::vector.

For performance, no bound checking is performed during access to the n-th element.

See Also
ImageAdaptor
PixelAccessor

Definition at line 52 of file itkNthElementPixelAccessor.h.

Public Types

typedef T ExternalType
 
typedef TContainer InternalType
 
typedef NthElementPixelAccessor Self
 

Public Member Functions

ExternalType Get (const InternalType &input) const
 
unsigned int GetElementNumber (void) const
 
 NthElementPixelAccessor ()
 
bool operator!= (const Self &accessor) const
 
NthElementPixelAccessoroperator= (const NthElementPixelAccessor &accessor)
 
void Set (InternalType &output, const ExternalType &input) const
 
void SetElementNumber (unsigned int nth)
 

Private Attributes

unsigned int m_ElementNumber
 

Member Typedef Documentation

template<class T , class TContainer >
typedef T itk::NthElementPixelAccessor< T, TContainer >::ExternalType

that this class will exhibit

Definition at line 59 of file itkNthElementPixelAccessor.h.

template<class T , class TContainer >
typedef TContainer itk::NthElementPixelAccessor< T, TContainer >::InternalType

Internal typedef. It defines the internal real representation of data

Definition at line 63 of file itkNthElementPixelAccessor.h.

template<class T , class TContainer >
typedef NthElementPixelAccessor itk::NthElementPixelAccessor< T, TContainer >::Self

Standard class typedefs.

Definition at line 56 of file itkNthElementPixelAccessor.h.

Constructor & Destructor Documentation

template<class T , class TContainer >
itk::NthElementPixelAccessor< T, TContainer >::NthElementPixelAccessor ( )
inline

Constructor

Definition at line 96 of file itkNthElementPixelAccessor.h.

Member Function Documentation

template<class T , class TContainer >
ExternalType itk::NthElementPixelAccessor< T, TContainer >::Get ( const InternalType input) const
inline

Read access to the NthElement component

Definition at line 70 of file itkNthElementPixelAccessor.h.

References itk::DefaultConvertPixelTraits< PixelType >::GetNthComponent().

template<class T , class TContainer >
unsigned int itk::NthElementPixelAccessor< T, TContainer >::GetElementNumber ( void  ) const
inline

Get the element number to access in the container

Definition at line 74 of file itkNthElementPixelAccessor.h.

template<class T , class TContainer >
bool itk::NthElementPixelAccessor< T, TContainer >::operator!= ( const Self accessor) const
inline

operator!=. This is needed to convert a pixel accessor to a functor.

See Also
AdaptImageFilter

Definition at line 83 of file itkNthElementPixelAccessor.h.

References itk::NthElementPixelAccessor< T, TContainer >::m_ElementNumber.

template<class T , class TContainer >
NthElementPixelAccessor& itk::NthElementPixelAccessor< T, TContainer >::operator= ( const NthElementPixelAccessor< T, TContainer > &  accessor)
inline

Assignment operator

Definition at line 89 of file itkNthElementPixelAccessor.h.

References itk::NthElementPixelAccessor< T, TContainer >::m_ElementNumber.

template<class T , class TContainer >
void itk::NthElementPixelAccessor< T, TContainer >::Set ( InternalType output,
const ExternalType input 
) const
inline

Write access to the NthElement component

Definition at line 66 of file itkNthElementPixelAccessor.h.

References itk::DefaultConvertPixelTraits< PixelType >::SetNthComponent().

template<class T , class TContainer >
void itk::NthElementPixelAccessor< T, TContainer >::SetElementNumber ( unsigned int  nth)
inline

Set the element number to access in the container

Definition at line 78 of file itkNthElementPixelAccessor.h.

Member Data Documentation

template<class T , class TContainer >
unsigned int itk::NthElementPixelAccessor< T, TContainer >::m_ElementNumber
private

The documentation for this class was generated from the following file: