22 #include <itkVectorImage.h>
24 struct MyObscurePixelType
27 static const size_t Length = 2;
36 MITK_INFO <<
"ptype = mitk::MakePixelType<int, int, 5>();";
38 <<
"itkPtype = mitk::MakePixelType<ItkImageType>();\n with itk::Image<itk::FixedArray< int, 5>, 3> ItkImageType";
41 typedef itk::Image<itk::FixedArray<int, 5>, 3> ItkImageType;
65 "ptype2( ptype)- GetComponentType()");
71 "ptype2( ptype)-GetBitsPerComponent()");
79 "ptype2 = ptype- GetComponentType()");
85 "ptype2 = ptype- GetBitsPerComponent()");
101 typedef itk::Image<MyObscurePixelType> MyObscureImageType;
102 mitk::PixelType obscurePixelType = mitk::MakePixelType<MyObscureImageType>();
105 "PixelTypeId is 'UNKNOWN' ");
107 "Lenght was set correctly");
110 "ValueType corresponds.");
113 mitk::PixelType vectorPixelType = mitk::MakePixelType<VectorImageType>(78);
116 typedef itk::Image<itk::Vector<short, 7>> FixedVectorImageType;
117 mitk::PixelType fixedVectorPixelType = mitk::MakePixelType<FixedVectorImageType>();
126 typeid(
itk::Image<itk::FixedArray<short, 2>, 3>),
141 typeid(
itk::Image<itk::FixedArray<short, 2>, 3>),
itk::Image< unsigned char, 3 > ImageType
std::string GetPixelTypeAsString() const
Returns a string containing the ITK pixel type name.
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
itk::ImageIOBase::IOPixelType GetPixelType() const
vcl_size_t GetBitsPerComponent() const
Get the number of bits per components.
itk::Image< TPixelType, VDimension > ImageType
vcl_size_t GetBpe() const
Get the number of bits per element (of an element)
int mitkPixelTypeTest(int, char *[])
#define MITK_TEST_CONDITION(COND, MSG)
ValueType
Type of the value held by a Value object.
int GetComponentType() const
Get the component type (the scalar (!) type). Each element may contain m_NumberOfComponents (more tha...
vcl_size_t GetNumberOfComponents() const
Get the number of components of which each element consists.
Class for defining the data type of pixels.