Page MenuHomePhabricator

Wrong usage of vtkSmartPointer in mitk::ImageStatisticsCalculator
Closed, ResolvedPublic

Description

Please see T14455. After cleaning most issues there, we still have a place in ImageStatisticsCalculator, which uses VTK Smart Pointers wrongly. Probably worth fixing.

Event Timeline

New remote branch pushed: bug-14483-WrongVtkSmartPointerUsageImageStatisticsCalculator

[57996d]: Merge branch 'bug-14483-WrongVtkSmartPointerUsageImageStatisticsCalcul

Merged commits:

2013-09-24 09:55:12 Michael Brehler [d68bd5]
Corrected SmartPointer usage

[dcfd5c]: Merge branch 'bug-14483-WrongVtkSmartPointerUsageImageStatisticsCalcul

Merged commits:

2013-10-01 16:46:52 Michael Brehler [a01144]
COMP: Revert SmartPointerUsage because of test

Current release is finished. Reseting target milestone...

The test fail coming along with the proper smart point use goes back to the coupling of the vtkExporter's output bulk data to the internal image mask member of the ImageStatisticsCalculator via itkImporter. That is, after the exporter's deallocation through correct smart pointer reference counting, the member data is being allocated as well by the vtkExporter. The issue has been solved using a persistent image duplicate for the mask member.

User norajitr has pushed new remote branch:

bug-14483-ImageStatisticsCalculatorVtkSmartPointerIssue

(In reply to Tobias Norajitra from comment #5)

the member data is being allocated as well by the vtkExporter.

is being deallocated.

[6bab0e]: Merge branch 'bug-14483-ImageStatisticsCalculatorVtkSmartPointerIssue'

Merged commits:

2014-02-12 16:23:37 Tobias Norajitra [c4989e]
Image mask member is assigned an image duplicate instead of the importer's output.