ITK  5.2.0
Insight Toolkit
Public Types | Static Public Member Functions | List of all members
itk::MeshConvertPixelTraits< PixelType > Class Template Reference

#include <itkMeshConvertPixelTraits.h>

Public Types

using ComponentType = typename PixelType::ComponentType
 

Static Public Member Functions

static ComponentType GetNthComponent (int c, const PixelType &pixel)
 
static unsigned int GetNumberOfComponents ()
 
static unsigned int GetNumberOfComponents (const PixelType &)
 
static void SetNthComponent (int c, PixelType &pixel, const ComponentType &v)
 
static ComponentType GetScalarValue (const PixelType &pixel)
 

Detailed Description

template<typename PixelType>
class itk::MeshConvertPixelTraits< PixelType >

Traits class used to by ConvertPixels to convert blocks of pixels.

TOutputPixelType is the destination type. The input type is inferred by the templated static function Convert.

This implementation, does a simple assignment operator, so if you are going from from a higher bit representation to a lower bit one (int to char), you may want to specialize and add some sort of transfer function.

Definition at line 46 of file itkMeshConvertPixelTraits.h.

Member Typedef Documentation

◆ ComponentType

template<typename PixelType >
using itk::MeshConvertPixelTraits< PixelType >::ComponentType = typename PixelType::ComponentType

Determine the pixel data type.

Definition at line 51 of file itkMeshConvertPixelTraits.h.

Member Function Documentation

◆ GetNthComponent()

template<typename PixelType >
static ComponentType itk::MeshConvertPixelTraits< PixelType >::GetNthComponent ( int  c,
const PixelType &  pixel 
)
inlinestatic

Return the nth component of the pixel.

Definition at line 68 of file itkMeshConvertPixelTraits.h.

◆ GetNumberOfComponents() [1/2]

template<typename PixelType >
static unsigned int itk::MeshConvertPixelTraits< PixelType >::GetNumberOfComponents ( )
inlinestatic

Return the number of components per pixel.

Definition at line 55 of file itkMeshConvertPixelTraits.h.

◆ GetNumberOfComponents() [2/2]

template<typename PixelType >
static unsigned int itk::MeshConvertPixelTraits< PixelType >::GetNumberOfComponents ( const PixelType &  )
inlinestatic

Definition at line 61 of file itkMeshConvertPixelTraits.h.

◆ GetScalarValue()

template<typename PixelType >
static ComponentType itk::MeshConvertPixelTraits< PixelType >::GetScalarValue ( const PixelType &  pixel)
inlinestatic

Return a single scalar value from this pixel.

Definition at line 82 of file itkMeshConvertPixelTraits.h.

◆ SetNthComponent()

template<typename PixelType >
static void itk::MeshConvertPixelTraits< PixelType >::SetNthComponent ( int  c,
PixelType &  pixel,
const ComponentType v 
)
inlinestatic

Set the nth component of the pixel.

Definition at line 75 of file itkMeshConvertPixelTraits.h.


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