Login  Register

Re: About thresholding

Posted by Krs5 on Apr 29, 2013; 8:16am
URL: http://imagej.273.s1.nabble.com/About-thresholding-tp5002837p5002842.html

Dear Yuan Chen,

Alternatively, you could try the macro code below.

       
        title1 = getTitle;
        getDimensions(width, height, channels, slices, frames);
        run("Duplicate...", "title=[duplicate] duplicate range=1-"+slices);
        run("Threshold...");
        title = "Message";
                msg="Set threshold then click \"OK\"";
                waitForUser(title, msg);
        run("Convert to Mask");
        setBatchMode(true);
        run("Analyze Particles...", "size=1-Infinity circularity=0.00-1.00 show=Nothing add stack");
        for (i=0;i<roiManager("count");i++){
                selectWindow(title1);
                roiManager("Select", i);
                run("Copy");
                selectWindow("duplicate");
                roiManager("Select", i);
                run("Paste");
        }
        run("Select None");
        roiManager("Show None");
        setBatchMode("exit and show");

Best wishes

Kees


Dr Ir K.R. Straatman
Senior Experimental Officer
Centre for Core Biotechnology Services
University of Leicester
http://www.le.ac.uk/biochem/microscopy/home.html



-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Yuan Chen
Sent: 28 April 2013 20:08
To: [hidden email]
Subject: About thresholding

Dear all friends

I am now trying to threshold my 16 bits tiff image sequence by grayscale value. This was done by using imageJ ' threshold' command.  But this seems can only allow you to save images as binary. Say pixel that about GV 24340 will be 1 , the rest of them will be 0.

Is there any way to threshold images, but still save them as the 16 bits images ( with the graycalue ranged 0 -65525) :)

Best wishes

Yuan Chen

University of Sheffield

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html