Page MenuHomePhabricator

Crash on loading an old scene file
Closed, ResolvedPublic

Description

We have a report, that scene files that have been saved using MITK Diffusion 2014 can not be loaded on the current MITK version (2016.06). I can reproduce this with provided test data, where the file can be unzipped and the images loaded separately, but not as .mitk scene.

Call stack is:

vtkCommonCore-7.0d.dll!vtkDataArray::SafeDownCast(vtkObjectBase * o) Line 49	C++
vtkCommonDataModel-7.0d.dll!vtkDataSetAttributes::GetAttribute(int attributeType) Line 1260	C++
vtkCommonDataModel-7.0d.dll!vtkDataSetAttributes::GetScalars() Line 966	C++
vtkCommonDataModel-7.0d.dll!vtkImageData::GetScalarPointer(int * coordinate) Line 1366	C++
vtkCommonDataModel-7.0d.dll!vtkImageData::GetScalarPointerForExtent(int * extent) Line 1361	C++
vtkCommonDataModel-7.0d.dll!vtkImageIterator<short>::Initialize(vtkImageData * id, int * ext) Line 35	C++
vtkCommonDataModel-7.0d.dll!vtkImageIterator<short>::vtkImageIterator<short>(vtkImageData * id, int * ext) Line 62	C++
MitkCore.dll!vtkApplyLookupTableOnRGBA<short>(vtkMitkLevelWindowFilter * self, vtkImageData * inData, vtkImageData * outData, int * outExt, double * clippingBounds, short * __formal) Line 163	C++
MitkCore.dll!vtkMitkLevelWindowFilter::ThreadedExecute(vtkImageData * inData, vtkImageData * outData, int * extent, int __formal) Line 509	C++
vtkCommonExecutionModel-7.0d.dll!vtkThreadedImageAlgorithm::ThreadedRequestData(vtkInformation * __formal, vtkInformationVector * * __formal, vtkInformationVector * __formal, vtkImageData * * * inData, vtkImageData * * outData, int * extent, int threadId) Line 320	C++
vtkCommonExecutionModel-7.0d.dll!vtkThreadedImageAlgorithmThreadedExecute(void * arg) Line 212	C++

Event Timeline

If I add the following property to the corresponding property file within the scene it loads fine for me:

<property key="Image.Displayed Component" type="IntProperty">
    <int value="0" />
</property>

This property is only added for multi-component images, hence it is only a problem in old scene files containing those (which for us is mostly .dwi files).

If this property is missing it leads to issues in the mitkImageVtkMapper2D when the VectorComponentExtractor is not used.

A suggested solution is to use the

void mitk::SceneReaderV1::ClearNodePropertyListWithExceptions(DataNode& node, PropertyList& propertyList)

to not delete the "Image.Displayed Component" if present.

kalali added a project: Restricted Project.Sep 14 2016, 10:44 AM
floca moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Oct 19 2016, 10:42 AM