Problem with Oval ROI
Posted by ganeshjothikumar on Aug 01, 2007; 7:18pm
URL: http://imagej.273.s1.nabble.com/Problem-with-Oval-ROI-tp3698737.html
Hi all
I have an image over which I have to draw circles with certain center points and certain radius. I am using Oval ROI to dothis in a plugin. The code is something like this
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());
ip.fill(ip.getMask());
imp.updateAndDraw();
Actually the oval gets drawn but not with center 10,10. It is drawn as though teh oval was drawn starting from 10,10 anddragging across. So if I want to draw a circle with center as 10,10 and radius as 100 hw can I do with Oval ROI or is there any other approach. Also I need to fill the circle with some colour. And I ned to detect the circle in the future also.. I should be able to select the circle and drag it.
Please help me in this...
Thanks
ganesh
---------------------------------
Building a website is a piece of cake.
Yahoo! Small Business gives you all the tools to get online.