Login  Register

Re: Batch mode

Posted by Hélio Miot on Jul 06, 2008; 9:59pm
URL: http://imagej.273.s1.nabble.com/Re-Batch-mode-tp3695658.html

Hi all,
I´m trying to measure roughness characteristics
from series preprocessed of images in a folder.
I´m using the plugin "Roughness calculation", but can´t do
batch process for all the images in a specified directory.

I´ve tried the macro:

macro "Batch Ro Measure" {
    dir = getDirectory("Choose a Directory ");
    list = getFileList(dir);
        setBatchMode(true);
    print("#,","Rq,","Ra,","Rsk,","Rku,");
    for (i=0; i<list.length; i++) {
        path = dir+list[i];
        showProgress(i, list.length);
        if (!endsWith(path,"/")) open(path);
        if (nImages>=1) {
            run("Roughness calculation");
            close();
            Rq= getResult("Rq",0);
            Ra= getResult("Ra",0);
            Rsk= getResult("Rsk",0);
            Rku= getResult("Rku  ",0);
            print(list[i],",",Rq,",",Ra,",",Rsk,",",Rku);
        }
    }
}

But It doesn´t work.

Can you help me?

Hélio A. Miot
Professor Assistente Doutor
Departamento de Dermatologia, S/N
Faculdade de Medicina da UNESP
Campus Universitário de Rubião Jr.
18618-000  -  Botucatu - SP - Brasil