Page MenuHomePhabricator

application freezes if fiber tracking is used on image directly after reconstruction (tensor or qball)
Closed, ResolvedPublic

Description

steps to reproduce:

  • load dwi
  • use tensor reconstruction
  • use streamline tracking

-> freeze

does not happen if tensor image is loaded from disk. it seems to be a problem with the mitkImageWriteAccessor. MITK gets stuck in OrganizeWriteAccess() while trying to add tracking result to datastorage.

Event Timeline

also freezes after DTI to QBI usage!

It happens only in release mode, could not reproduce in debug.

Correction for Comment 2 : it was a coincidence, that the debug mode did work. For reproducing the bug, the ODF Widget has to be ACTIVATED before starting the DTI->QBI reconstruction.

The bug problem is:

  • The itkTensorToQballImageFilter gains access to the image through mitk::CastToItk routine which internally creates an ImageWriteAccessor to protect the image data from being altered by others or from reading incomplete data.
  • Meanwhile the ODFWidget reacts on the changes and will also gain access to the image through mitk::CastToItk

    --> this leads to a memory-lock

Solution:

  • The ODFWiget uses the cast only for accessing one single pixel. This can be solved by explicit access through an mitk::ImageReadAccessor. The Accessor especially offers the possibility to catch an special Exception in case the accessed memory block is already locked.

    --> rewrite the access to the single pixel value by using the ImageReadAccessor, catch the mitk::MemoryIsLockedException and hide the widget's elements if the memory access is locked.

Seems to work fine under windows 7 64 Bit, but for the fact that the gibbs tracking keeps a write accessor for the image

New remote branch pushed: bug-14022-Accesslock-by-odf-widget

[c87bb1]: Merge branch 'bug-14022-Accesslock-by-odf-widget'

Merged commits:

2012-12-19 17:18:11 Jan Hering [2f690b]
Fixed image accessor exception handling in ODFDetails

  • better gui adaptation to the exception
  • explicitely unregistering (itk) image pointers in GibbsTracking

2012-12-19 14:05:33 Jan Hering [df63f3]
Reworked access on data by ODFWidget

  • replaced CastToItk usage by ImageReadAccessors with exception
  • catching. The widget gets deactivated if the memory it tries to read
  • is locked ( ExceptionIfMemoryLocked )