Page MenuHomePhabricator

Uninitialized variable in mitkManualSegmentationToSurfaceFilter
Closed, ResolvedPublic

Description

The gaussian smoothing returns in some cases in which the segmentation is only few pixels in size just an empty image. To check this the image data are checked for scalar values other than zero. In case there are some, the smoothed image is passed, else the unsmoothed image is passed.
In the current implementation the scalars are checked by casting the data to an mitkImage which just gets initialized. In release mode the data pointer of this image remains uninitialized, causing an unexpected behavior of the filter.
The checking of the data can be performed on the vtkImage data, the mitkImage can be suspended.
I make the necessary changes in this bug and check the requirements to adapt the unit test.

Event Timeline

New remote branch pushed: bug-15392-RemoveUninitializedVariable

[d523a1]: Merge branch 'bug-15392-RemoveUninitializedVariable'

Merged commits:

2013-06-17 10:09:25 Sven Mersmann [b0ce99]
Extended one comment and make it a debug info.


2013-06-17 09:53:25 Sven Mersmann [f4c53a]
Changed the method to obtain scalar value max from smoothed image since the variable was unintialized what led to unexpected behavior.

The fix is merged and works. Bug resolved.