Posted by
Jerome Mutterer-3 on
Mar 17, 2011; 7:09pm
URL: http://imagej.273.s1.nabble.com/Bring-up-threshold-menu-tp3685355p3685359.html
>
> How I can get a "threshold" image automaticly. I running...
Chen,
run("Threshold..."); is optionnal, it will just open the threshold tool
window. You don't need that if you want an automated thresholding.
setThreshold(255, 255); this will retain only pixels with value 255 in your
threshold.
If you want an automatically computed threshold, you could try:
setAutoThreshold(method);
'method' should be one of the available methods described at :
http://imagej.nih.gov/ij/docs/guide/userguide-25.html#toc-Subsubsection-25.2.4and
http://pacific.mpi-cbg.de/wiki/index.php/Auto_ThresholdsaveAs("Jpeg", dir2+list[i]);
it looks that you only pasted part of the faulty macro. This makes it
difficult to guess why it doesn't behave as expected.
Sincerely,
Jerome.
On Thu, Mar 17, 2011 at 5:04 PM, Yanpei Chen <
[hidden email]> wrote:
> How I can get a "threshold" image automaticly. I running
> run("8-bit");
> run("Threshold...");
> setThreshold(255, 255);
> run("Convert to Mask");
> saveAs("Jpeg", dir2+list[i]);
> close();
> but I still get the image
> Title: 00002.jpg
> Width: 738 pixels
> Height: 495 pixels
> Pixel size: 1x1 pixel
> ID: -2
> Coordinate origin: 0,0
> Bits per pixel: 8 (grayscale LUT)
> Display range: 0-255
> No Threshold
> Uncalibrated
> Path: K:\R1\00002.jpg
> No Selection
>
>
>
> Thank you very much!
>
>
> 2011/3/17 Himanish Ghosh <
[hidden email]>
>
> > Hello
> >
> > Jerome,
> >
> >
> > Thank you very much, it worked just right.
> >
> > I tried all sorts of combinations before i sent the email.
> >
> > cheers
> >
> >
> >
> > On Thu, Mar 17, 2011 at 3:09 PM, Jerome Mutterer <
> >
[hidden email]> wrote:
> >
> > > Himanish, you could use:
> > >
> > > run("Threshold...");
> > > waitForUser("Adjsut Threshold and click OK to continue");
> > >
> > > Sincerely,
> > > Jerome
> > >
> > > On Thu, Mar 17, 2011 at 2:29 PM, Himanish Ghosh <
>
[hidden email]
> > > >wrote:
> > >
> > > > Hello All,
> > > >
> > > > From my macro I would like to call the threshold image menu and show
> > it
> > > > and
> > > > wait for the user to adjust parameters in the threshold dialog and
> then
> > > > resume the macro.
> > > >
> > > > How can this be done
> > > >
> > > > thank you
> > > >
> > >
> >
> >
> >
> > --
> > Himanish Ghosh
> >
> >
http://www.jaxtr.com/himanishghosh> > the journey has begun
> >
>
>
>
> --
> Chen Yanpei, phD
> MssMat
> Ecole Centrale Paris
> Grande voie des vignes
> 92295 Châtenay Malabry
> Paris, France
>