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

#include <itkNthElementPixelAccessor.h>

Public Types

using ExternalType = T
 
using InternalType = TContainer
 
using Self = NthElementPixelAccessor
 

Public Member Functions

ExternalType Get (const InternalType &input) const
 
unsigned int GetElementNumber () 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
 

Detailed Description

template<typename T, typename 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 53 of file itkNthElementPixelAccessor.h.

Member Typedef Documentation

◆ ExternalType

template<typename T , typename TContainer >
using itk::NthElementPixelAccessor< T, TContainer >::ExternalType = T

that this class will exhibit

Definition at line 60 of file itkNthElementPixelAccessor.h.

◆ InternalType

template<typename T , typename TContainer >
using itk::NthElementPixelAccessor< T, TContainer >::InternalType = TContainer

Internal type alias. It defines the internal real representation of data

Definition at line 64 of file itkNthElementPixelAccessor.h.

◆ Self

template<typename T , typename TContainer >
using itk::NthElementPixelAccessor< T, TContainer >::Self = NthElementPixelAccessor

Standard class type aliases.

Definition at line 57 of file itkNthElementPixelAccessor.h.

Constructor & Destructor Documentation

◆ NthElementPixelAccessor()

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

Member Function Documentation

◆ Get()

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

◆ GetElementNumber()

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

Get the element number to access in the container

Definition at line 82 of file itkNthElementPixelAccessor.h.

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

◆ operator!=()

template<typename T , typename 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 97 of file itkNthElementPixelAccessor.h.

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

◆ operator=()

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

Assignment operator

Definition at line 104 of file itkNthElementPixelAccessor.h.

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

◆ Set()

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

◆ SetElementNumber()

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

Set the element number to access in the container

Definition at line 89 of file itkNthElementPixelAccessor.h.

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

Member Data Documentation

◆ m_ElementNumber

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

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