How to define Region of Interest in an image with mouse

Discussion in 'Java' started by news.rcn.com, Mar 23, 2006.

  1. news.rcn.com

    news.rcn.com Guest

    I need to find a way to allow a user to trace an arbitrary region of a
    displayed image with a mouse and capture the outlined area as a 'region of
    interest' (ROI) I've looked at the Java Advanced Imaging classes and they
    seem to have what I need to manage the data.

    But is is not clear how to handle the UI part where the user defines the
    ROI. I would appreciate any pointers, code snippets, etc on how to
    accomplish this. Is there a Java class that will handle the acquisition?

    Thanks in advance.
    jim cant
     
    news.rcn.com, Mar 23, 2006
    #1
    1. Advertising

  2. news.rcn.com

    Oliver Wong Guest

    "news.rcn.com" <> wrote in message
    news:...
    >I need to find a way to allow a user to trace an arbitrary region of a
    >displayed image with a mouse and capture the outlined area as a 'region of
    >interest' (ROI) I've looked at the Java Advanced Imaging classes and they
    >seem to have what I need to manage the data.
    >
    > But is is not clear how to handle the UI part where the user defines the
    > ROI. I would appreciate any pointers, code snippets, etc on how to
    > accomplish this. Is there a Java class that will handle the acquisition?


    Is the user to click on the vertex of every polygon defining the ROI, or
    is the user to click and hold down the button to continuously draw the edge
    of the shape?

    In either cases, you basically need to think of the Polygon class as a
    List of Points, and the solution should fall into place. (I wonder why
    java.awt.Polygon doesn't implement List<Point> actually).

    - Oliver
     
    Oliver Wong, Mar 23, 2006
    #2
    1. Advertising

  3. news.rcn.com

    Roedy Green Guest

    On Thu, 23 Mar 2006 15:07:46 -0500, "news.rcn.com"
    <> wrote, quoted or indirectly quoted someone who
    said :

    >But is is not clear how to handle the UI part where the user defines the
    >ROI. I would appreciate any pointers, code snippets, etc on how to
    >accomplish this. Is there a Java class that will handle the acquisition?


    paint the image on a Canvas on JPanel. Then capture mouse move events
    You then have the problem of cleaning that up into a polygon. Perhaps
    you draw a line as you go making a node at each click and removing the
    last one at each right click.

    Java In A Nutshell in the Introduction to AWT does a little drawing
    program. I'm not sure if it still there in the latest edition.

    see http://mindprod.com/jgloss/who.html under Flanagan
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Mar 23, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. localhost

    Fade Image Region with GDI+ ?

    localhost, Dec 23, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    794
    Steven Cheng[MSFT]
    Dec 24, 2003
  2. news.skynet.be
    Replies:
    0
    Views:
    440
    news.skynet.be
    May 24, 2004
  3. SAL

    #Region #End Region issue

    SAL, Aug 29, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    359
    Alexey Smirnov
    Aug 29, 2008
  4. Thommes
    Replies:
    2
    Views:
    101
    Octo Mancer
    Mar 10, 2005
  5. Replies:
    3
    Views:
    106
Loading...

Share This Page