18 #ifndef itkNthElementPixelAccessor_h 19 #define itkNthElementPixelAccessor_h 51 template<
typename T,
typename TContainer >
66 inline void Set(InternalType & output,
const ExternalType & input)
const 70 inline ExternalType
Get(
const InternalType & input)
const 107 template<
typename TOutputPixelType,
typename TPixelType >
126 inline void Set(ActualPixelType &output,
const ExternalType & input)
const 131 inline void Set(InternalType &output,
const ExternalType & input,
132 const unsigned long offset)
const 136 ActualPixelType v = Superclass::Get( output, offset );
138 return Set( v, input );
141 inline ExternalType
Get(
const ActualPixelType & input)
const 151 return Get( Superclass::Get(input, offset) );
166 Superclass::SetVectorLength( l );
175 Superclass::SetVectorLength( length );
189 this->SetVectorLength( accessor.GetVectorLength() );
DefaultVectorPixelAccessor< TPixelType > Superclass
void Set(InternalType &output, const ExternalType &input) const
unsigned int GetElementNumber(void) const
unsigned int GetElementNumber(void) const
static void SetNthComponent(int c, PixelType &pixel, const ComponentType &v)
void SetVectorLength(VectorLengthType l)
VectorLengthType GetVectorLength() const
NthElementPixelAccessor & operator=(const NthElementPixelAccessor &accessor)
NthElementPixelAccessor Self
VectorLengthType m_ElementNumber
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
bool operator!=(const Self &accessor) const
NthElementPixelAccessor()
NthElementPixelAccessor & operator=(const NthElementPixelAccessor &accessor)
void SetElementNumber(unsigned int nth)
unsigned long SizeValueType
unsigned int VectorLengthType
static ComponentType GetNthComponent(int c, const PixelType &pixel)
Give access to partial aspects of a type.
Represents an array whose length can be defined at run-time.
NthElementPixelAccessor(unsigned int length=1)
ExternalType Get(const InternalType &input) const
TOutputPixelType ExternalType
bool operator!=(const Self &accessor) const
ExternalType Get(const ActualPixelType &input) const
void SetElementNumber(unsigned int nth)
VariableLengthVector< TPixelType > ActualPixelType
void Set(InternalType &output, const ExternalType &input, const unsigned long offset) const
void Set(ActualPixelType &output, const ExternalType &input) const
Give access to the N-th of a Container type.
unsigned int m_ElementNumber
NthElementPixelAccessor Self
ExternalType Get(const InternalType &input, const SizeValueType offset) const