Page MenuHomePhabricator

Change PlanarFigure::PolyLineElement to Point2D
Closed, ResolvedPublic

Description

PlanarFigure::PolyLineElement is currently implemented as struct consisting of an index and a point. I guess it was once implemented this way to make handling of PolyLines easier which is a list of PolyLineElements.

However, handling PolyLines as lists is very inconvenient especially when accessing neighboring points. Hence, I will change PolyLine to a vector of PolyLineElements.

As a result we do not need to keep index information for each PolyLineElement which reduces a PolyLineElement to a Point2D. I will declare the Point and Index members as well as the current constructor of PolyLineElement as deprecated for release 2014-06 and provide Point2D conversion operators. This allows a smooth transition to finally replace the PolyLineElement struct by a Point2D typedef in release 2014-09.

Event Timeline

User kislinsk has pushed new remote branch:

bug-17739-ChangePlanarFigurePolyLineToVectorOfPoint2Ds

[5c7660]: Merge branch 'bug-17739-ChangePlanarFigurePolyLineToVectorOfPoint2Ds'

Merged commits:

2014-04-21 17:52:59 Stefan Kislinskiy [841020]
Changed PlanarFigure::PolyLine from list to vector.

To fix any warnings that originate from this change, see the following two recipes:

✗ this->AppendPointToHelperPolyLine(0, PolyLineElement(polyLinePoint, index));
✓ this->AppendPointToHelperPolyLine(0, polyLinePoint);

✗ point2D = it->Point;
✓ point2D = *it;

[d5566e]: Merge branch 'bug-17739-Fix1'

Merged commits:

2014-04-21 18:31:06 Stefan Kislinskiy [0edc69]
COMP: Fixed Windows linker errors and deprecated warnings.

[4db378]: Merge branch 'bug-17739-Fix2'

Merged commits:

2014-04-21 21:22:25 Stefan Kislinskiy [99290f]
COMP: Explicitly implemented copy constructor and assignment operator to PolyLineElement.

[beee18]: Merge branch 'bug-17739-Fix3'

Merged commits:

2014-04-22 04:19:24 Stefan Kislinskiy [4f2bc0]
COMP: Try to disable deprecated warnings for MitkPlanarFigure module.

Yes, as far as I remember this bug is fixed. However, after the next release I want to remove/adapt the stuff I declared as deprecated in order to activate the "warnings as errors" flag of the PlanarFigur module again. I'd like to keep this bug open until then just to have it visible on my TODO list.

Updating target milestone to upcoming release

Set target milestone to AfterNextRelease since there wasn't an official release which declared the old stuff deprecated.

User kislinsk has pushed new remote branch:

bug-17739-RemoveDeprecatedPlanarFigureStuff

[7c4501]: Merge branch 'bug-17739-RemoveDeprecatedPlanarFigureStuff'

Merged commits:

2014-12-03 14:51:34 Stefan Kislinskiy [ef795f]
Removed deprecated functionalities from PlanarFigure module.

User kislinsk has pushed new remote branch:

bug-17739-Fix10

[dacbc9]: Merge branch 'bug-17739-Fix10'

Merged commits:

2014-12-03 16:23:42 Stefan Kislinskiy [6f7a66]
COMP: Added const to incorrectly overloaded Equals method.

User kislinsk has pushed new remote branch:

bug-17739-Fix11

[f30d12]: Merge branch 'bug-17739-Fix11'

Merged commits:

2014-12-03 16:30:45 Stefan Kislinskiy [4c7c2e]
COMP: Made PlanarArrow::Equals() const-correct.

User kislinsk has pushed new remote branch:

bug-17739-Fix12

[11e0fc]: Merge branch 'bug-17739-Fix12'

Merged commits:

2014-12-03 16:37:43 Stefan Kislinskiy [6c1c8f]
COMP: Added another missing const.

User kislinsk has pushed new remote branch:

bug-17739-Fix13

[90d6e5]: Merge branch 'bug-17739-Fix13'

Merged commits:

2014-12-03 17:31:49 Stefan Kislinskiy [c91f6e]
COMP: Migrated geometry changes of planar figures into diffusion plugins.