Medical Imaging Interaction Toolkit
2016.11.0
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 numberOfComponents) |
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 55 of file mitkPixelType.h.
typedef itk::ImageIOBase::IOComponentType mitk::PixelType::ItkIOComponentType |
Definition at line 59 of file mitkPixelType.h.
typedef itk::ImageIOBase::IOPixelType mitk::PixelType::ItkIOPixelType |
Definition at line 58 of file mitkPixelType.h.
mitk::PixelType::PixelType | ( | const mitk::PixelType & | aPixelType | ) |
mitk::PixelType::~PixelType | ( | ) |
Definition at line 87 of file mitkPixelType.cpp.
vcl_size_t mitk::PixelType::GetBitsPerComponent | ( | ) | const |
Get the number of bits per components.
Definition at line 82 of file mitkPixelType.cpp.
Referenced by mitkPixelTypeTest(), and mitk::Image::PrintSelf().
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.
Definition at line 72 of file mitkPixelType.cpp.
Referenced by QmitkSlicesInterpolator::AcceptAllInterpolations(), AccessPixel(), mitk::TestDCMLoading::DumpImageInformation(), mitk::TestDICOMLoading::DumpImageInformation(), mitkPixelTypeTest(), and mitk::LevelWindow::SetAuto().
int mitk::PixelType::GetComponentType | ( | ) | const |
Get the component type (the scalar (!) type). Each element may contain m_NumberOfComponents (more than one) of these scalars.
Definition at line 47 of file mitkPixelType.cpp.
Referenced by Assert_ItkVectorImageImportAndCast_ReturnsTrue(), mitk::SimpleImageHistogram::ComputeFromBaseData(), mitk::PythonService::CopyToPythonAsCvImage(), mitk::PythonService::CopyToPythonAsSimpleItkImage(), mitk::TestDCMLoading::DumpImageInformation(), mitk::TestDICOMLoading::DumpImageInformation(), mitk::ImageStatisticsCalculator::ExtractImageAndMask(), mitk::ImageToIGTLMessageFilter::GenerateData(), mitk::MultiComponentImageDataComparisonFilter::GenerateData(), mitk::ImageVtkMapper2D::GenerateDataForRenderer(), mitk::ImageGenerator::GenerateRandomImage(), mitk::MaskImageFilter::InternalComputeMask(), mitk::RGBToRGBACastImageFilter::IsRGBImage(), mitkPixelTypeTest(), QmitkSlicesInterpolator::OnAccept3DInterpolationClicked(), mitk::LevelWindow::SetAuto(), mitk::ItkImageIO::Write(), mitk::LabelSetImageIO::Write(), and mitk::ImageWriter::WriteByITK().
std::string mitk::PixelType::GetComponentTypeAsString | ( | ) | const |
Returns a string containing the name of the component.
Definition at line 57 of file mitkPixelType.cpp.
Referenced by mitk::Image::PrintSelf().
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.
Definition at line 77 of file mitkPixelType.cpp.
Referenced by mitk::ImagePixelAccessor< TPixel, VDimension >::CheckData(), mitk::NodePredicateDimension::CheckNode(), mitk::MultiComponentImageDataComparisonFilter::CompareMultiComponentImage(), QmitkDataManagerView::ComponentActionChanged(), mitk::BoundingObjectCutter::ComputeData(), mitk::ImageStatisticsHolder::ComputeImageStatistics(), mitk::PythonService::CopyToPythonAsCvImage(), mitk::PythonService::CopyToPythonAsSimpleItkImage(), mitk::ImageToIGTLMessageFilter::GenerateData(), mitk::CompareImageDataFilter::GenerateData(), mitk::ImageVtkMapper2D::GenerateDataForRenderer(), mitk::DoseImageVtkMapper2D::GenerateDataForRenderer(), mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetConsecutivePixelsAsVector(), mitk::Image::GetPixelValueByIndex(), mitk::DiffusionPropertyHelper::IsDiffusionWeightedImage(), mitkPixelTypeTest(), mitk::Image::PrintSelf(), mitk::ImageVtkMapper2D::SetDefaultProperties(), mitk::DoseImageVtkMapper2D::SetDefaultProperties(), mitk::ItkImageIO::Write(), mitk::LabelSetImageIO::Write(), and mitk::ImageWriter::WriteByITK().
itk::ImageIOBase::IOPixelType mitk::PixelType::GetPixelType | ( | ) | const |
Definition at line 42 of file mitkPixelType.cpp.
Referenced by Assert_ItkVectorImageImportAndCast_ReturnsTrue(), mitk::ImageStatisticsHolder::ComputeImageStatistics(), mitk::PythonService::CopyToPythonAsSimpleItkImage(), mitk::AutoCropImageFilter::GetOutputPixelType(), mitk::OclImageToImageFilter::GetOutputType(), mitk::MaskImageFilter::InternalComputeMask(), mitk::RGBToRGBACastImageFilter::IsRGBImage(), mitkPixelTypeTest(), mitk::LevelWindow::SetAuto(), mitk::ImageVtkMapper2D::SetDefaultProperties(), mitk::ItkImageIO::Write(), mitk::LabelSetImageIO::Write(), and mitk::ImageWriter::WriteByITK().
std::string mitk::PixelType::GetPixelTypeAsString | ( | ) | const |
Returns a string containing the ITK pixel type name.
Definition at line 52 of file mitkPixelType.cpp.
Referenced by mitk::ImageDescriptor::AddNewChannel(), mitk::CollectionWriter::ExportCollectionToFolder(), mitkPixelTypeTest(), mitk::Image::PrintSelf(), mitk::CollectionWriter::SaveCollection(), and mitk::DoseImageVtkMapper2D::SetDefaultProperties().
vcl_size_t mitk::PixelType::GetSize | ( | ) | const |
Get size of the PixelType in bytes.
A RGBA PixelType of floats will return 4 * sizeof(float)
Definition at line 67 of file mitkPixelType.cpp.
Referenced by mitk::PythonService::CopyCvImageFromPython(), mitk::ImageToIGTLMessageFilter::GenerateData(), mitk::ContourModelSetToImageFilter::InitializeOutputEmpty(), and mitk::Image::PrintSelf().
std::string mitk::PixelType::GetTypeAsString | ( | ) | const |
Returns a string representing the pixel type and pixel components.
Definition at line 62 of file mitkPixelType.cpp.
Referenced by mitk::Equal().
bool mitk::PixelType::operator!= | ( | const PixelType & | rhs | ) | const |
Definition at line 127 of file mitkPixelType.cpp.
References mitk::operator==().
mitk::PixelType & mitk::PixelType::operator= | ( | const PixelType & | other | ) |
Definition at line 30 of file mitkPixelType.cpp.
bool mitk::PixelType::operator== | ( | const PixelType & | rhs | ) | const |
Definition at line 106 of file mitkPixelType.cpp.
References MITK_DEBUG.
|
friend |
Create a MITK pixel type based on a itk::ImageIOBase object.
Definition at line 281 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 175 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 191 of file mitkPixelType.h.
|
friend |