Page MenuHomePhabricator

SetDataNode on SinglePointDataInteractor clears data in node
Open, LowPublic

Description

When calling SinglePointDataInteractor::SetDataNode(node) with a data node in which already a point is stored, that point is cleared which, in my opinion, is incorrect behavior.
The error occurred on MITK version 2018-04 but looking at the latest development version of SinglePointDataInteractor the faulty line of code is still in there.

Proposal for correction:

In mitkSinglePointDataInteractor.cpp:

remove the line points->Clear(); in the else clause (line 103 in 2018-4 version).

Event Timeline

kislinsk added a subscriber: kislinsk.
NOTE: The SinglePointDataInteractor is not used anymore in our code base. It was once used for the AdaptiveRegionGrowingTool.

The class seems to have more issues. For example, it overrides SetMaxPoints() with an empty method but calls it with 1 in the constructor.