If you want something quick, try converting to a mask, dilate (binary
operation), then back to an ROI. e.g. in IJ macro language -
run("Create Mask");
run("Dilate");
run("Create Selection");
Graeme
On 14/11/2012 12:36, Mohamed Tleis wrote:
> Dear members,
>
> i am trying to enlarge a roi through a java program; but couldn't get
> that to work. The last result I came up with is the following code:
>
> private Roi enlargeRoi(Roi roi)
> {
> Roi largerRoi;
> imp.show();
> imp.setRoi(roi);
>
> IJ.run(imp, "Enlarge...", "enlarge = 1");
>
> // how can I get the new Roi?
> largerRoi = imp.getRoi(); // not working;
> imp.hide();
>
> return largerRoi;
> }
>
> Thank you in advance,
>
> Best Regards,
> M. Tleis
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
---------------------------
Dr. Graeme Ball
Department of Biochemistry
University of Oxford
South Parks Road
Oxford OX1 3QU
Phone +44-1865-613-359
---------------------------
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html