ITK
6.0.0
Insight Toolkit
|
#include <itkNthElementPixelAccessor.h>
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.
Definition at line 53 of file 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 |
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION (Self) | |
NthElementPixelAccessor () | |
NthElementPixelAccessor & | operator= (const NthElementPixelAccessor &accessor) |
bool | operator== (const Self &accessor) const |
void | Set (InternalType &output, const ExternalType &input) const |
void | SetElementNumber (unsigned int nth) |
Private Attributes | |
unsigned int | m_ElementNumber |
using itk::NthElementPixelAccessor< T, TContainer >::ExternalType = T |
that this class will exhibit
Definition at line 60 of file itkNthElementPixelAccessor.h.
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.
using itk::NthElementPixelAccessor< T, TContainer >::Self = NthElementPixelAccessor |
Standard class type aliases.
Definition at line 57 of file itkNthElementPixelAccessor.h.
|
inline |
Constructor
Definition at line 113 of file itkNthElementPixelAccessor.h.
References itk::NthElementPixelAccessor< T, TContainer >::m_ElementNumber.
|
inline |
Read access to the NthElement component
Definition at line 75 of file itkNthElementPixelAccessor.h.
References itk::NthElementPixelAccessor< T, TContainer >::m_ElementNumber.
Referenced by itk::NthElementPixelAccessor< TOutputPixelType, itk::VariableLengthVector< TPixelType > >::Get().
|
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.
itk::NthElementPixelAccessor< T, TContainer >::ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION | ( | Self | ) |
|
inline |
Assignment operator
Definition at line 106 of file itkNthElementPixelAccessor.h.
References itk::NthElementPixelAccessor< T, TContainer >::m_ElementNumber.
|
inline |
This is needed to convert a pixel accessor to a functor.
Definition at line 97 of file itkNthElementPixelAccessor.h.
References itk::NthElementPixelAccessor< T, TContainer >::m_ElementNumber.
|
inline |
Write access to the NthElement component
Definition at line 68 of file itkNthElementPixelAccessor.h.
References itk::NthElementPixelAccessor< T, TContainer >::m_ElementNumber, and itk::DefaultConvertPixelTraits< PixelType >::SetNthComponent().
Referenced by itk::NthElementPixelAccessor< TOutputPixelType, itk::VariableLengthVector< TPixelType > >::Set().
|
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.
|
private |
Definition at line 117 of file itkNthElementPixelAccessor.h.
Referenced by itk::NthElementPixelAccessor< T, TContainer >::Get(), itk::NthElementPixelAccessor< TOutputPixelType, itk::VariableLengthVector< TPixelType > >::Get(), itk::NthElementPixelAccessor< T, TContainer >::GetElementNumber(), itk::NthElementPixelAccessor< TOutputPixelType, itk::VariableLengthVector< TPixelType > >::GetElementNumber(), itk::NthElementPixelAccessor< T, TContainer >::NthElementPixelAccessor(), itk::NthElementPixelAccessor< T, TContainer >::operator=(), itk::NthElementPixelAccessor< TOutputPixelType, itk::VariableLengthVector< TPixelType > >::operator=(), itk::NthElementPixelAccessor< T, TContainer >::operator==(), itk::NthElementPixelAccessor< TOutputPixelType, itk::VariableLengthVector< TPixelType > >::operator==(), itk::NthElementPixelAccessor< T, TContainer >::Set(), itk::NthElementPixelAccessor< TOutputPixelType, itk::VariableLengthVector< TPixelType > >::Set(), itk::NthElementPixelAccessor< T, TContainer >::SetElementNumber(), and itk::NthElementPixelAccessor< TOutputPixelType, itk::VariableLengthVector< TPixelType > >::SetElementNumber().