Skip to content

'Simplify shape' converts a polyline to a (closed) polygon #2053

@petebankhead

Description

@petebankhead

Bug report

Describe the bug

Objects → Annotations → Simplify shape... does not correctly handle lines. It always connects the endpoints to form an area ROI, which can also result in the ROI being empty (and then removed).

To Reproduce

Steps to reproduce the behavior:

  1. Open an image
  2. Draw an annotation with the 'polyline' tool
  3. Run Objects → Annotations → Simplify shape...
  4. Run the simplification - the polyline has become closed

Expected behavior

The endpoints of the polyline should be unchanged and unconnected. Only points falling between the endpoints should be removed.

Desktop (please complete the following information):

  • OS: All
  • QuPath Version: v0.6.0 (and probably earlier)

Additional context

For a (poly)line with only 2 endpoints, Simplify shape... entirely removes the ROI... which is also a (related) bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions