Page MenuHomePhabricator | MITK

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

Details

Differential Revisions
Restricted Differential Revision

Event Timeline

hettich created this task.Feb 10 2017, 5:45 PM
hettich updated the task description. (Show Details)
This comment was removed by hettich.
This comment was removed by hettich.
hettich claimed this task.Feb 10 2017, 8:07 PM
hettich triaged this task as Normal priority.Feb 13 2017, 1:14 PM
hettich added a revision: Restricted Differential Revision.Feb 13 2017, 2:47 PM
This comment was removed by hettich.
hettich added a comment.EditedFeb 17 2017, 5:45 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)

hettich added a comment.EditedMar 1 2017, 6:56 PM

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.

hettich closed this task as Resolved.Mar 8 2017, 5:10 PM

Awaiting code review by O1.

hettich updated the task description. (Show Details)Mar 8 2017, 5:11 PM