[ImageJ-bugs] [Bug 827] Fiji and macro never really ended

bugzilla at fiji.sc bugzilla at fiji.sc
Mon Jul 28 09:38:12 CDT 2014


http://fiji.sc/bugzilla/show_bug.cgi?id=827

--- Comment #6 from Quentin <quentinlerouzic at hotmail.fr> ---
My entire project uses two macro. The first was running perfectly smoothly and
continuously. The second was blocking and now execute perfectly.

MACRO 1:

dossierOut_2 = getDirectory("Dossier pour les images avec les segmentations");
//Dossier enregistrement de la segmentations

setBatchMode(true);
x=1

        //chemin d'access
        path = "C:\\Users\\Quentin\\Desktop\\Images Zeiss + macros\\dossier 1_
stock image\\J2 1Fe 3x3 20x R1P2.zvi";
                for (i=50; i>=5; i-=5)
                {
                    for (j=200; j>=0; j-=10)
                    {
                        for (k=200; k>=0; k-=10)
                        {    
                        //importation des fichiers ZIV, séparation des tuilles
                        run("Bio-Formats Importer", 
                        "open=path autoscale color_mode=Default view=Hyperstack
stack_order=XYCZT series_2");
                        NOMx=getTitle();

                        //duplicat
                        run("Duplicate...", "title="+NOMx+"_"+i+" duplicate
range=1-7");
                        NOMx_1= getTitle();

                        //stack focuser (EFI)
                        run("Stack Focuser ", "enter="+i);

                        //run("Brightness/Contrast...");            
                        setMinAndMax(j, 4095);
                        run("8-bit");


                        //treshold pour la segmentation
                        setAutoThreshold("Yen dark");
                        setThreshold(k, 4095);
                        run("Convert to Mask");

                        saveAs("Tiff",
dossierOut_2+NOMx_1+"_"+i+"_"+j+"_"+k+".tif");
                        close();
                        close();
                        close();

                        //Fenetre_mémoire
                        print("traitement ",x,"sur 4410  ",IJ.freeMemory());
                        x=x+1;

                        }            

                    }
                }

        print("...");
        print("traitement accompli");
        print("...");

................................................................................
................................................................................

MACRO 2:

dossierIn = getDirectory("Images"); //Dossier dans lequel les photos sont
dossierOut = getDirectory("Excel"); //Dossier dans lequel les données sont
enregistrées
fichiers = getFileList(dossierIn);
setBatchMode(true);

    for (Z=0; Z<fichiers.length; Z++)
    {

        open(dossierIn+fichiers[Z]);
        run("Analyze Particles...", "size=40-Infinity display exclude");

            if (isOpen("Results")) 
            { 
               selectWindow("Results");
               saveAs("Results", dossierOut+fichiers[Z]+"_Results.txt");
               run("Clear Results");
               run("Close"); 
              }

              if (isOpen("ROI Manager")) 
            { 
               selectWindow("ROI Manager");
               run("Close"); 
              }

        close();
        //Fenetre_d'avancement
        print(Z+1 +"/"+fichiers.length+"     "+IJ.freeMemory());
    }
        print("...");
        print("traitement accompli");
        print("...");

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20140728/21d6ddb3/attachment.html>


More information about the Imagej-bugs mailing list