ITK
6.0.0
Insight Toolkit
|
#include <itkDefaultConvertPixelTraits.h>
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 41 of file itkDefaultConvertPixelTraits.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) |
using itk::DefaultConvertPixelTraits< PixelType >::ComponentType = typename PixelType::ComponentType |
Determine the pixel data type.
Definition at line 45 of file itkDefaultConvertPixelTraits.h.
|
inlinestatic |
Return the nth component of the pixel.
Definition at line 62 of file itkDefaultConvertPixelTraits.h.
Referenced by itk::GradientRecursiveGaussianImageFilter< TInputImage, TOutputImage >::TransformOutputPixel().
|
inlinestatic |
Return the number of components per pixel.
Definition at line 49 of file itkDefaultConvertPixelTraits.h.
|
inlinestatic |
Definition at line 55 of file itkDefaultConvertPixelTraits.h.
|
inlinestatic |
Return a single scalar value from this pixel.
Definition at line 76 of file itkDefaultConvertPixelTraits.h.
|
inlinestatic |
Set the nth component of the pixel.
Definition at line 69 of file itkDefaultConvertPixelTraits.h.
Referenced by itk::NthElementPixelAccessor< T, TContainer >::Set(), and itk::GradientRecursiveGaussianImageFilter< TInputImage, TOutputImage >::TransformOutputPixel().