macro "Microscopes Scales [F12]" { // ********************************************************** // FILE HEADER // ********************************************************** // MADE WITH THE HELP OF MACROBLOCKS // NAME OF THE MACRO: SCALE SETTING // DATE OF LAST MODIFICATION: 30/1/2015 // AUTHOR: Fabrice DUPRAT // EMAIL: 1.47 // SHORT DESCRIPTION: Setting ImageJ scale for images from various IPMC microscope // INPUT: Ask which microscope and objective were used // OUTPUT: Set the correct scale globally for all images // ********************************************************** // INITIALISATION // ********************************************************** //--------------------------------------------------------------------------------------------- // !!!!! LIST OF OBJECTIVES AND SCALES TO BE MODIFIED ACCORDING TO YOU NEEDS !!!!!!!!!! //--------------------------------------------------------------------------------------------- // Array with the list of microscopes my_microscope = newArray("AxioObserver Calcium R-1","AxioObserver Calcium R+2", "DMD108 Histologie R+1", "Axiovert 200M Videomicroscope R-1", "Axioplan2 Epifluorescence R-1", "Olympus 2 photons"); // Arrays with the objective list of each microscope microscope0_objective = newArray("Plan x20", "Fluar x20", "Fluar x40"); microscope1_objective = newArray("Plan x10 Optovar x1", "Plan x10 Optovar x1.25", "Plan x10 Optovar x1.6", "Fluar x10 Optovar x1", "Fluar x10 Optovar x1.25", "Fluar x10 Optovar x1.6", "Fluar x20 Optovar x1", "Fluar x20 Optovar x1.25", "Fluar x20 Optovar x1.6", "Fluar x40 Optovar x1", "Fluar x40 Optovar x1.25", "Fluar x40 Optovar x1.6"); microscope2_objective = newArray("Macro", "x4", "x10", "x20", "x40", "x63"); microscope3_objective = newArray("NeoFluar 10x", "NeoFluar 40x", "PlanApo 10x"); microscope4_objective = newArray("Fluar 10x", "NeoFluar 10x", "NeoFluar 25x", "NeoFluar 40x", "NeoFluar 63x"); microscope5_objective = newArray("PlanFI x20", "PlanFL x40"); // Arrays with the coresponding list of scale factor (pixels for 1000 µm) for each objetive microscope0_scale= newArray(1294,1295,2578); microscope1_scale= newArray(643,782,1000,643,782,1000,1286,1557,2000,2568,3113,3983); microscope2_scale= newArray(96,630,1579,3180,6353,10013); microscope3_scale= newArray(1616,6352,1591); microscope4_scale= newArray(1548,1548,4106,6141,9692); microscope5_scale= newArray(3120,6190); //--------------------------------------------------------------------------------------------- // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //--------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------- // Dialog to choose the used microscope // Prepare the dialog window Dialog.create("Choose your microscope"); // Name of dialog window Dialog.addMessage("IMPORTANT, AT LEAST ONE IMAGE MUST ALREADY BE OPEN"); Dialog.addChoice("Used microscope : ", my_microscope, "") // Multiple text choice // Display the dialog window Dialog.show(); my_microscope_choice = Dialog.getChoice(); // Get the microscope choice (string value) // Get the index of the microscope choice (0 based numeric value) for (i=0; i