Page MenuHomePhabricator

PointContainer and PointDataContainer get asynchron when mitk::PointSet::SetPoint() or mitk::PointSet::InsertPoint() are called
Closed, ResolvedPublic

Description

When using the mitk::PointSet with mitk::Operations, both internal data structures PointContainer and PointDataContainer are filled together. If the points are set directly with SetPoint() or InsertPoint(), only the PointContainer data structure is filled, PointDataContainer is not updated. The PointSetVtkMapper3D even contains workaround code for this case.
A better solution would be to update PointDataContainer in these methods too. The current methods should set a standard value for PointData. Additionally, there sould be polymorphic methods that have an additional parameter for the content of the PointDataContainer.

Event Timeline

added the suggested changes in revision #18341

Unit test should be adapted accordingly

new testcases for mitkPointSetTest.cpp

I extended the mitkPointSetTest.cpp to test if PointContainer and
PointDataContainer get asynchronous on the various insert/set/move/swap/remove
methods in PointSet.

The test found a bug in the OpMove operation that needs to be fixed.

[SVN revision 20897]
FIX (#2311): extend unit test to test if PointContainer and PointDataContainer remain in sync after insert/remove operations. Fix ExecuteOperation for OpMOVE that had caused the containers to become asynchronous

test is passed on dartclients, closing bug now.

With the last commit, PointData is now re-initialized to default in every OpMOVE event. It should however be left unmodified if already existent, and only be re-initialized to default if non-existent.

Reopening bug.

[SVN revision 21052]
FIX (#2311): Initialize PointData in OpMOVE only when non-existent

Interaction working again as before. Closing bug.