Dear good people,
I am trying to scriptify few processing steps. So in an image have several object segmented and labeled, then I measure properties of them. From that result table, I calculate the labels that meets certain measurement value for example “Perimeter”.
Now I need to generate new picture keeping only those labels.
Fiji- morpholibj - label Images-label edition does similar things as a window comes to give labels need to keep.
In macro recorder I see the command as
run("Select Label(s)", "label(s)=[1300, 1500, 1600]");
So in my macro scripting I am trying to add array str instead of
[1300, 1500, 1600] as
str2 = "label(s)=["+str+ "]"; //str is the array as comma separated string arr = [1300, 1500, 1600] // run("Select Label(s)", str2);
but it does not work, giving array there also don’t work.
Can you suggest how can I add this in my script?