mitk::PixelType has multiple private members to store the pixel type...
const std::type_info* m_TypeId;
const std::type_info* m_ItkTypeId;
the problem is, that the method
bool mitk::PixelType::operator==(const std::type_info& typeId) const
{
if (GetItkTypeId() == NULL) return false; return (*GetItkTypeId() == typeId);
}
compares the internal type of ITkTypyId instead of m_TypeId. This leads to unexpected behaviour, if ITKTypeId is not set.
Propositions:
either a ITKTypeid, which matches the m_TypeId is generated when constructing the the object, or the type id should only be saved AND compared in the m_TypeId member. The operator== method should be adapted accordingly.