Medical Imaging Interaction Toolkit
2021.10.00
Medical Imaging Interaction Toolkit
|
Class for defining the data type of pixels. More...
#include <mitkPixelType.h>
Public Types | |
typedef itk::ImageIOBase::IOPixelType | ItkIOPixelType |
typedef itk::ImageIOBase::IOComponentType | ItkIOComponentType |
Public Member Functions | |
PixelType (const mitk::PixelType &aPixelType) | |
PixelType & | operator= (const PixelType &other) |
itk::ImageIOBase::IOPixelType | GetPixelType () const |
int | GetComponentType () const |
Get the component type (the scalar (!) type). Each element may contain m_NumberOfComponents (more than one) of these scalars. More... | |
std::string | GetPixelTypeAsString () const |
Returns a string containing the ITK pixel type name. More... | |
std::string | GetComponentTypeAsString () const |
Returns a string containing the name of the component. More... | |
std::string | GetTypeAsString () const |
Returns a string representing the pixel type and pixel components. More... | |
vcl_size_t | GetSize () const |
Get size of the PixelType in bytes. More... | |
vcl_size_t | GetBpe () const |
Get the number of bits per element (of an element) More... | |
vcl_size_t | GetNumberOfComponents () const |
Get the number of components of which each element consists. More... | |
vcl_size_t | GetBitsPerComponent () const |
Get the number of bits per components. More... | |
bool | operator== (const PixelType &rhs) const |
bool | operator!= (const PixelType &rhs) const |
~PixelType () | |
Friends | |
PixelType | MakePixelType (const itk::ImageIOBase *imageIO) |
Create a MITK pixel type based on a itk::ImageIOBase object. More... | |
template<typename ComponentT , typename PixelT > | |
PixelType | MakePixelType (std::vcl_size_t numOfComponents) |
A template method for creating a pixel type. More... | |
template<typename ItkImageType > | |
PixelType | MakePixelType () |
A template method for creating a pixel type. More... | |
template<typename ItkImageType > | |
PixelType | MakePixelType (vcl_size_t) |
Class for defining the data type of pixels.
To obtain additional type information not provided by this class itk::ImageIOBase can be used by passing the return value of PixelType::GetItkTypeId() to itk::ImageIOBase::SetPixelTypeInfo and using the itk::ImageIOBase methods GetComponentType, GetComponentTypeAsString, GetPixelType, GetPixelTypeAsString.
Definition at line 51 of file mitkPixelType.h.
typedef itk::ImageIOBase::IOComponentType mitk::PixelType::ItkIOComponentType |
Definition at line 55 of file mitkPixelType.h.
typedef itk::ImageIOBase::IOPixelType mitk::PixelType::ItkIOPixelType |
Definition at line 54 of file mitkPixelType.h.
mitk::PixelType::PixelType | ( | const mitk::PixelType & | aPixelType | ) |
mitk::PixelType::~PixelType | ( | ) |
vcl_size_t mitk::PixelType::GetBitsPerComponent | ( | ) | const |
Get the number of bits per components.
vcl_size_t mitk::PixelType::GetBpe | ( | ) | const |
Get the number of bits per element (of an element)
A vector of double with three components will return 8*sizeof(double)*3.
int mitk::PixelType::GetComponentType | ( | ) | const |
Get the component type (the scalar (!) type). Each element may contain m_NumberOfComponents (more than one) of these scalars.
Referenced by mitk::ImageGenerator::GenerateRandomImage().
std::string mitk::PixelType::GetComponentTypeAsString | ( | ) | const |
Returns a string containing the name of the component.
vcl_size_t mitk::PixelType::GetNumberOfComponents | ( | ) | const |
Get the number of components of which each element consists.
Each pixel can consist of multiple components, e.g. RGB.
Referenced by mitk::ImagePixelAccessor< TPixel, VDimension >::CheckData(), and mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetConsecutivePixelsAsVector().
itk::ImageIOBase::IOPixelType mitk::PixelType::GetPixelType | ( | ) | const |
std::string mitk::PixelType::GetPixelTypeAsString | ( | ) | const |
Returns a string containing the ITK pixel type name.
vcl_size_t mitk::PixelType::GetSize | ( | ) | const |
std::string mitk::PixelType::GetTypeAsString | ( | ) | const |
Returns a string representing the pixel type and pixel components.
bool mitk::PixelType::operator!= | ( | const PixelType & | rhs | ) | const |
bool mitk::PixelType::operator== | ( | const PixelType & | rhs | ) | const |
|
friend |
Create a MITK pixel type based on a itk::ImageIOBase object.
Definition at line 277 of file mitkPixelType.h.
|
friend |
A template method for creating a pixel type.
A template method for creating a MITK pixel type from an ITK image pixel type and dimension.
numOfComponents | The number of components for the pixel type TPixelType |
numOfComponents | The number of components for the pixel type of the ITK image |
Definition at line 171 of file mitkPixelType.h.
|
friend |
A template method for creating a pixel type.
For images where the number of components of the pixel type is determined at runtime (e.g. pixel types like itk::VariableLengthVector<short>) the MakePixelType(std::size_t) function must be used.
Definition at line 187 of file mitkPixelType.h.
|
friend |