Page MenuHomePhabricator

mitkPointSet interface lacks convenient last inserted element access.
Closed, ResolvedPublic

Description

Regular use-cases of the pointset are to 1) insert a new point at the end of a pointset for a certain time step (in a sense that like in an array, a new element is pushed at the end) or 2) get the highest index. A more convenient access to such elements is required in order to keep user code simple. So far, for these cases, access was achieved by refering to the pointset size, which is no proper use of the pointset e.g. if points had been inserted in a non-sequent manner. ( see bug-15264 for further detail )

Event Timeline

New remote branch pushed: bug-16382-PointSetInterfaceExtension

New remote branch pushed: bug-16382-PointSetInterfaceAdaptation

The PointSetInterfaceExtension branch is deprecated.

I am not totally happy with the interface changes. What do you think about the following:

  1. Rename GetMaxIndex and GetMaxIndexPoint to "GetMaxId" (I think we should not keep talking about "indexes")
  1. Merge the methods above and return a point iterator (which automatically contains both the id and the point) instead of relying on (0,0,0) as a "special value" in case the point set is empty. If the point set is empty, the "End() Iterator" is returned.

User norajitr has pushed new remote branch:

bug-16382-NewPointSetInterface

Tobias, what is the status of this bug?

[641dae]: Merge branch 'bug-16382-PointSetInterface-int0'

Merged commits:

2015-05-20 17:05:37 Tobias Norajitra [5773b3]
Point set interface extension.

User norajitr has pushed new remote branch:

bug-16382-PointSet-MaxId-InsertPoint-Test

[e19b63]: Merge branch 'bug-16382-PointSet-MaxId-InsertPoint-Test'

Merged commits:

2015-07-15 16:37:29 Tobias Norajitra [d9234f]
GetMaxId and InsertPoint testing cases added to mitkPointSetTestSuite.