Page MenuHomePhabricator

When loading or clicking a DTI I get "Invalid ImageAccessor: PixelTypes of Image and ImageAccessor are not equal"
Closed, ResolvedPublic

Description

When loading or clicking a DTI I get "Invalid ImageAccessor: PixelTypes of Image and ImageAccessor are not equal"
, crossbars are gone, no image navigation possible, and occasionally MitkWorkbench crashes

[4.366] [BlueBerry] BlueBerry Workbench ready

QObject::connect: invalid null parameter
** ERROR: nifti_convert_nhdr2nim: bad dim[0]

[7.630] Trying to load dti as nrrd ...

#7.707# ERROR: An error occurred: MITK Exception:

Description: Invalid ImageAccessor: PixelTypes of Image and ImageAccessor are not equal

Filename: ~/MITK/Modules/Core/include/mitkImagePixelAccessor.h

Line: 93
#7.985# ERROR: The error was ignored by the user. The program may be in a corrupt state and don't behave like expected!

  image->GetPixelType(): N4mitk9PixelTypeE
  mitk::MakePixelType< itk::Image<TPixel, VDimension> >(): N4mitk9PixelTypeE
  mitk::MakePixelType< itk::VectorImage<TPixel, VDimension> >(image->GetPixelType().GetNumberOfComponents()): N4mitk9PixelTypeE

Revisions and Commits

Event Timeline

This comment was removed by hettich.
This comment was removed by hettich.
hettich added a revision: Restricted Differential Revision.Feb 13 2017, 2:47 PM

29:[4.105] Trying to load dti as nrrd ...
30:|> mitk::PixelType::operator==
31:|m_BytesPerComponent = 4, 4
32:|m_NumberOfComponents = 6, 1
33:|m_PixelTypeName = ,
34:|m_ComponentTypeName = float, float
35:|m_PixelType = 9, 1
36:|m_ComponentType = 9, 9
37:|PixelTypeOper==() false! ||
38:|> mitk::PixelType::operator==
39:|m_BytesPerComponent = 4, 4
40:|m_NumberOfComponents = 6, 6
41:|m_PixelTypeName = ,
42:|m_ComponentTypeName = float, float
43:|m_PixelType = 9, 5
44:|m_ComponentType = 9, 9
45:|PixelTypeOper==() false! ||
46:#4.344# ERROR: An error occurred: MITK Exception:
47:
48:Description: Invalid ImageAccessor: PixelTypes of Image and ImageAccessor are not equal image->GetPixelType(): N4mitk9PixelTypeE
49:
50: m_ImageDataItem->GetDimension(): 3 , VDimension: 3 , TPixel: f , NumberOfComponents: 6
51:
52:
53:Filename: /home/mhettich/MITK/Modules/Core/include/mitkImagePixelAccessor.h
54:
55:Line: 87

According to https://itk.org/Doxygen/html/classitk_1_1ImageIOBase.html ( enum IOPixelType ),
PixelType 9 is DIFFUSIONTENSOR3D, while PixelType 5 is VECTOR.

Maybe from QmitkImageNavigatorView::UpdateStatusBar() Line 263 ?

Hmm, the exception "ERROR: Unhandled excaption caught in ExecuteAction(): /home/mhettich/MITK/Modules/Core/include/mitkImagePixelAccessor.h:89: Invalid ImageAccessor: PixelTypes of Image and ImageAccessor are not equal." now only happens on clicking on the image in the StdMultiWidget, NOT when navigating via the ImageNavigationView

There where 2 UpdateStatusBar() functions m)

In hindsight, operator== didn't fail at all and remains unchanged, besides some cosmetics to debug messages.

The two UpdateStatusBar() functions didn't cover the diffusion tensor pixel types.

Awaiting code review by O1.