With the help of Philippe and a colleague I was able to write the appropriate macro.
Thanks to all
There she is :
dir = getDirectory("Indiquer le répertoire des images");
dir2 = getDirectory("Indiquer le répertoire de destination pour les images assemblées");
setBatchMode(true);
list = getFileList(dir);
for (i=0; i<list.length; i++) {
indexf02 = lastIndexOf(list[i], "f02d0.C01");
if (indexf02 != -1) {
// Fichier "GRE047503_170529070001_B02f02d0.C01"
DebutNomfich = substring(list[i], 0, 23); // Début du nom du fichier : GRE047503_170529070001_
Puits = substring(list[i], 23, 26); // Puits
// Ouverture des images l'une après l'autre dans le bon ordre
final = newArray("f02d0.C01","f03d0.C01","f04d0.C01","f11d0.C01","f01d0.C01","f00d0.C01","f05d0.C01","f10d0.C01","f08d0.C01","f07d0.C01","f06d0.C01","f09d0.C01");
for (j = 0; j<12; j++) {
path = dir+DebutNomfich + Puits + final[j];
open(path); // Ouverture du fichier
run("Flip Vertically"); // Retournement de l'image
}
run("Images to Stack", "name=StackName title=[] use"); // Images to Stack
Stack_ID = getImageID(); // Récupère le numéro ID du stack
run("Make Montage...", "columns=4 rows=3 scale=0.50"); // Make Montage de 4x3 images
//run("Brightness/Contrast...");
run("Enhance Contrast", "saturated=0.35");
saveAs("Tiff", dir2+DebutNomfich+Puits+"d0");
close(); // Fermeture du montage
selectImage(Stack_ID); // Sélection du stack
close();
} // End "if"
} // End "for"
print("C'est fini.");
_______________________________________
Patricia OBEÏD
Animateur Informatique Biomics
CEA Grenoble
DRF / BIG / BGE U1038/ Biomics / Bât 4020
17 rue des Martyrs
38054 GRENOBLE Cedex 9
Email :
[hidden email]
Tél : (+33)4 38 78 47 12
Fax : (+33)4 38 78 59 17
http://www.cea.fr/drf/big/bge/biomicshttps://twitter.com/BiomicsLab-----Message d'origine-----
De : ImageJ Interest Group [mailto:
[hidden email]] De la part de OBEID Patricia 154904
Envoyé : mardi 25 juillet 2017 15:24
À :
[hidden email]
Objet : [PROVENANCE INTERNET] Make montage from Acquisition by snail
Hello,
I wish to reconstitute the visual of a microplate well by making a montage. I have 12 images whose field numbers are f00, f01, ..., f11.
My problem is that the acquisition system acquires images "in snail".
The matrix is:
F02 / f03 / f04 / f11
F01 / f00 / f05 / f 10
F08 / f07 / f06 / f09
So I do not know how to write the macro that would allow me to reconstitute the original visual.
Any help will be welcome.
Patricia
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html