Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Drawing polygon ROI using mouse with re-sizable handles for vertices

Drawing polygon ROI using mouse with re-sizable handles for vertices

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 481 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • MarKSM Offline
    MarKSM Offline
    MarKS
    wrote on last edited by
    #1

    I have a project where i need to extract ROI based on polygons. I tried QGraphicsPathItem along with QPainterPath but couldn't achieve the one like shown below in the picture.

    Annotation 2020-05-08 095730.jpg

    Background:

    I already have subclassed QGraphicsItem which i use to paint my bounding boxes and ellipses based on LMB+Drag and they work fine. I already have my custom re-sizable handles also implemented for my QGraphicsItem

    I want to create this polygon ROI exactly as:

    Action1: Clicking first time creates a starting point
    Action2: Selecting another point shows line from the starting point and creates a re-sizable handle at the point
    .
    .
    ActionN: Clicking on starting point again should close the subpath.

    I am not sure how to get this working on my scene. Any ideas or pointers to demo code?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Maybe QGraphicsPathItem can be a starting point.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved