Drag & Drop OvalRoi

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Drag & Drop OvalRoi

ganeshjothikumar
Hi All
   
  Can somebody help me on a plugin to drag an already existing Oval ROI on an image from the current location to someother location using the mouse..
 
Curent code I have to dram a OvalRoi on the image is as follows...
   
   RoiManager roi_mgr = new RoiManager();
 ImagePlus imp = WindowManager.getCurrentImage();
 ip = imp.getProcessor();
 Roi roi = new OvalRoi(10,10,100,100);
 ip.setColor(new Color(13,14,23));
 ip.setMask(roi.getMask());
 ip.setRoi(roi.getBoundingRect());
 imp.setRoi(roi);
 roi_mgr.runCommand("Add");
 ip.fill(ip.getMask());
 imp.updateAndDraw();
   
  I tried something in the mouse dragged method. But as not sucessful. It would be of gr8 help if somebody can help me
   
  Thanks in advance
ganesh

       
---------------------------------
Choose the right car based on your needs.  Check out Yahoo! Autos new Car Finder tool.