Posted by
Krs5 on
Nov 17, 2014; 10:43pm
URL: http://imagej.273.s1.nabble.com/Draw-random-dots-only-within-a-ROI-tp5010470p5010501.html
Dear Davide,
OK, see if the code below does what you want
dotSize = 25;
Roi.getBounds(x,y,w,h);
for (i=0; i<25; i++) {
x1 = (random()*w-dotSize/2)+x;
y1 = (random()*h-dotSize/2)+y;
makeOval(x1, y1, dotSize, dotSize);
run("Fill");
}
run("Select None");
Best wishes
Kees
________________________________________
From: ImageJ Interest Group [
[hidden email]] on behalf of Zeta [
[hidden email]]
Sent: 17 November 2014 22:35
To:
[hidden email]
Subject: Re: Draw random dots only within a ROI
Kees,
it doesn't really matter, since the dot will be only a reference. The
easiest things would work. :)
Davide
2014-11-18 11:31 GMT+13:00 Straatman, Kees (Dr.) [via ImageJ] <
[hidden email]>:
--
*Davide Zazzaro*
Research PhD student
Department of Marine Science
University of Auckland
Auckland 1010
New Zealand
Tel: +64 27 8756181
--
View this message in context:
http://imagej.1557.x6.nabble.com/Draw-random-dots-only-within-a-ROI-tp5010470p5010500.htmlSent from the ImageJ mailing list archive at Nabble.com.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html