Page MenuHomePhabricator

Consecutive calls of Image::GetVolumeData() lead to undefined vtkImageData
Closed, InvalidPublic

Description

We received garbage from the method GetVtkImageData in ImageDataItem, which is returned by Image::GetVolumeData. The first call always worked well. However, in contrast to calling Image::GetSliceData, Image::GetVolumeData returned a broken ImageDataItem after at least two calls.

Event Timeline

This bug has a high severity and was not fixed within the 2013-06 release. Setting target milestone to next release.

This bug is now part of the Bugsquashing SCRUM program.

A simple test of investigating consecutive calls is not sufficient to reproduce the behavior. The actual problem can however be easily regarded in the QmitkSlicesInterpolator.cpp in Line 539:

If the code line
"reslice->SetInputSlice(slice->GetSliceData()->GetVtkImageData(slice));"

is replaced with
"reslice->SetInputSlice(slice->GetVolumeData()->GetVtkImageData(slice));

the 2D slice interpolation will become garbage.

This occurs when clicking "Apply" for a 2-dimensional slice interpolation in the segmentation plugin.

It works if you put
"slice->GetVolumeData()->ConstructVtkImageData(slice);"
in front of the problematic code line.

Therefore, the actual problem seems to be that ConstructVtkImageData isn't called after changing the image content. It would be best to fix this bug together with T13526.

in QmitkSlicesInterpolator, it works for me if I just set:

overwrite->SetInputSlice(slice->GetVtkImageData());

New remote branch pushed: bug-15325-ExtendImageDataItemTest

Current release is finished. Reseting target milestone...

We couldn't reproduce the behavior with the test provided in branch bug-15325-ExtendImageDataItemTest. Since the actual problem doesn't occur anymore in the QmitkSlicesInterpolator, we assume there was a problem with image initalisation/deallocation when an interpolated slice was confirmed.

kislinsk changed the task status from Invalid to Spite.Jun 27 2018, 1:31 PM
kislinsk added a project: Bulk Edit.
kislinsk changed the task status from Spite to Invalid.Jun 27 2018, 1:36 PM
kislinsk removed a project: Bulk Edit.