|
Bugzilla – Bug 827 |
Fiji and macro never really ended |
Last modified: 2015-04-06 16:10:31 CDT |
| ⚠ |
NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug. The Fiji project now uses GitHub Issues for issue tracking. Please file all new issues there. |
|
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
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("...");