apply defined color threshold to several images

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

apply defined color threshold to several images

TerryF
Hello all,

I am working on area quantification of some fluorescent cells. I have my
picture in greyscale, tiff format.
My issue is that for each picture I have to do the color threshold
adjustment with a defined value to then measure the area of above or below
the threshold. Is there a manner to apply in a single action a defined
threshold to all the open images, or to do a macro that will do all the
actions in one?

I am not familiar with the macro design yet...

Thank you,
Terry



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: apply defined color threshold to several images

TerryF
After having read on macros and batch processing, this is my resolution :
I can put all my files in the same folder, and run the "batch measure"
adding te set treshold into it:

macro "Batch Measure" {
    dir = getDirectory("Choose a Directory ");
    list = getFileList(dir);
    if (getVersion>="1.40e")
        setOption("display labels", true);
    setBatchMode(true);
    for (i=0; i<list.length; i++) {
        path = dir+list[i];
        showProgress(i, list.length);
        if (!endsWith(path,&quot;/&quot;)) open(path);
        if (nImages>=1) {*setThreshold(25, 255)*;
            run("Measure");
            close();
        }
    }
}

no small victories in science.



--
Sent from: http://imagej.1557.x6.nabble.com/

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