Posted by
Wayne Rasband-2 on
URL: http://imagej.273.s1.nabble.com/creating-a-multipoint-selection-problem-tp5022326p5022331.html
> On Jul 17, 2019, at 5:27 AM, Jeremy Adler <
[hidden email]> wrote:
>
> The makeSelection(type,xcoord,ycoord) command fails to create a multipoint selection.
> The code below is happy to create a segment line(type 6) but changing the type to a 10 (point) fails.
>
> However an earlier version of ImageJ 1.51k - allows the creation of type10 multipoint selection.
This regression is fixed in the latest ImageJ daily build (1.52q24), or work around it by using
makeSelection("point", xArray, yArray);
When using the “point” type you can add size, color and type properties, for example:
newImage("New", "RGB ramp", 100, 100, 1);
run("Set... ", "zoom=400");
xpoints = newArray(10,20,30,40,50,60);
ypoints = newArray(40,90,120,7,55,56);
makeSelection("point small yellow hybrid",xpoints,ypoints);
rename("small yellow hybrid"); wait(2000);
makeSelection("point large yellow hybrid",xpoints,ypoints);
rename("large yellow hybrid"); wait(2000);
makeSelection("point extra large yellow hybrid",xpoints,ypoints);
rename("extra large yellow hybrid"); wait(2000);
makeSelection("point large red cross",xpoints,ypoints);
rename("large red cross"); wait(2000);
makeSelection("point extra large red cross",xpoints,ypoints);
rename("extra large red cross"); wait(2000);
makeSelection("point extra large white circle",xpoints,ypoints);
rename("extra large white circle"); wait(2000);
makeSelection("point extra large cyan dot label",xpoints,ypoints);
rename("extra large cyan dot label");
-wayne
> roiManager("reset");
> xArray=newArray(10,20,30,40,50,60);
> yArray=newArray(40,90,120,7,55,56);
> makeSelection(6, xArray, yArray);//segmented line
> roiManager("Add");
>
> makeSelection(10, xArray, yArray);//point
> roiManager("Add");
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html