Problem with redirect measurement

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Dan
Reply | Threaded
Open this post in threaded view
|

Problem with redirect measurement

Dan
I'm relatively new to imageJ and writing scripts but here's the macro I set up (below). It may be poorly done, like i said, I'm new to this.

I want to to redirect my analysis from my DAPI MASK (ch1) to the red image (ch0) but I want to use the commands I have set up in the macro. I can redirect the way I want when I manually do everything and when I have a script which specifically uses the name of the image I want to redirect to (for example 1.zvi ch0 rather than list3[k]+"  Ch0") but when I try to get my script to do it i get error messages. I have tried using a a command like red = list3[k]+"  Ch0" and then adding red in to the redirect target but that didn't work either.

Can this be done?

Thanks to anyone that helps out.

Dan


My Macro.

dir1 = getDirectory("Choose directory");

list = getFileList(dir1);
setBatchMode(true);
for (i=0; i<list.length; i++) {

        dir2 = dir1+list[i];
        list2 = getFileList(dir2);
       
        for (j=0; j<list2.length; j++) {

                dir3 = dir2+list2[j];
                list3 = getFileList(dir3);
       
                for (k=0; k<list3.length; k++) {

                        print (dir3+list3[k]);
                        filename = split(list3[k],".zvi");

// I think it now sees all my images

open(dir3+list3[k]);


//when I open my zvi files I get 2 images, red channel is ch0 and ch1 is dapi

        selectWindow(list3[k]+"  Ch0");
                run("8-bit");
        selectWindow(list3[k]+"  Ch1");
                run("8-bit");
                setAutoThreshold("Default");
                //run("Threshold...");
                setThreshold(0, 60);
                run("Convert to Mask");
                run("Make Binary");
                run("Watershed");
                run("Convert to Mask");

//everything else seems to be working but it wont preform "redirect=[list3[k]+"  Ch0"]"

                run("Set Measurements...", "area mean min display add redirect=[list3[k]+"  Ch0"] decimal=3");

                run("Analyze Particles...", "size=100-Infinity circularity=0.00-1.00 show=Outlines display clear summarize");
                saveAs("Results", dir3+filename[0]+" results");
Reply | Threaded
Open this post in threaded view
|

Problem with Analyze Line Graph

Krs5
I seem to have hit a problem when using Analyse Line Graph. When I have selected my graph and run Tools > Analyze Line Graph no new plot appears and Windows Task Manager shows ImageJ using a lot of CPU till ImageJ runs out of memory. I run 1.47g on Windows 7, 64bit.

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

Re: Problem with Analyze Line Graph

Rasband, Wayne (NIH/NIMH) [E]
On Dec 9, 2012, at 7:38 AM, Straatman, Kees R. (Dr.) wrote:

> I seem to have hit a problem when using Analyse Line Graph. When I have selected my graph and run Tools > Analyze Line Graph no new plot appears and Windows Task Manager shows ImageJ using a lot of CPU till ImageJ runs out of memory. I run 1.47g on Windows 7, 64bit.

This bug is fixed in the ImageJ 1.47h daily build, or you can work around the bug by thresholding the image prior to using Analyze > Tools > Analyze Line Graph.

-wayne

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