Posted by
Herbie on
Nov 13, 2019; 5:57pm
URL: http://imagej.273.s1.nabble.com/expected-in-line-20-but-all-parentheses-are-there-in-the-code-Pls-help-tp5022674p5022675.html
Good day,
the following works for me:
title+=" (red)";
run("Set Measurements...", "area mean standard min limit
redirect=[title] decimal=3");
run("Analyze Particles...", "pixel show=Outlines display clear summarize");
selectWindow(title);
close();
selectWindow(title+ "-1");
close();
(Please watch for line breaks introduced by the mailer.)
This is not a good idea:
setAutoThreshold("Default dark");
setThreshold(51, 254);
First you use an automatic threshold scheme (Default), then you set the
threshold to fixed values.
Fixed thresholds should be avoided because they don't generalize to
similar images. If you are not happy with the automatic
"Default"-scheme, try one of the other automatic schemes.
Regards
Herbie
:::::::::::::::::::::::::::::::::::
Am 13.11.19 um 18:30 schrieb nhasan:
> run("Open...");
> title=getTitle()
> selectWindow(title);
> run("Split Channels");
> selectWindow(title+" (blue)");
> close();
> selectWindow(title+" (green)");
> close();
> selectWindow(title+" (red)");
> run("16-bit");
> run("Duplicate..."," ");
> selectWindow(title+" (red)-1");
> setAutoThreshold("Default dark");
> //run("Threshold...");
> setThreshold(51, 254);
> //setThreshold(51, 254);
> setOption("BlackBackground", true);
> run("Convert to Mask");
> run("Watershed");
> //line below giving ")" expected error
> run("Set Measurements...", "area mean standard min limit redirect=[title+ "
> (red)"] decimal=3");
> run("Analyze Particles...", "pixel show=Outlines display clear summarize");
> selectWindow(title+ " (red)");
> close();
> selectWindow(title+ " (red)-1");
> close();
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html