//------setscale_Mattenstrasse_070218.txt------- //-----works with ImageJ 1.51n----- //-----written by Pascal Lorentz------ //-----Version: 1.8 macro "Quick Set Scale Action Tool" { Dialog.create("Quick Set Scale Mattenstrasse"); // Write the name of the equipments you want to quickly set scale in the array below //Dialog.addChoice("Microscope:", newArray("Pixel Default", "Leica DMi1 Cell Culture Taylor 1.OG", "Leica DMI 4000 1.OG", "Nikon Diaphot 300 1.OG", "Zeiss Mic Elevator 2.OG","Leica DMIL Cell Culture CHR 2.OG", "Leica DMIRBE 1.OG", "Leica Video Mic Primo 3.OG OLD", "Leica Video Mic Dmi8 3.OG", "Zeiss Video Mic Joerg 1.OG", "Zeiss Axioskop2 Zeller 1.OG", "Nikon Eclipse E600 Hollaender 4.OG", "Zeiss Axio Observer Taylor 1.OG", "Nikon Stereo SMZ1500 Finke 3.OG", "Leica Stereo MZ16FA Zeller 1.OG")); Dialog.addChoice("Microscope:", newArray("Pixel Default", "Leica DMi1 Cell Culture Taylor 1.OG", "Leica DMIL Cell Culture Aceto EG", "Leica DMI 4000 1.OG", "Zeiss Mic Elevator 2.OG","Leica DMIL Cell Culture CHR 2.OG", "Leica Video Mic Primo 3.OG OLD", "Leica Video Mic Dmi8 3.OG", "Zeiss Axio Imager Scanning Microscope 3.OG", "Operetta HCS 3.OG", "Zeiss Axioskop2 Zeller 1.OG", "Nikon Eclipse E600 Hollaender 4.OG", "Zeiss Axio Observer Taylor 1.OG", "Nikon Stereo SMZ1500 Finke 3.OG", "Leica Stereo MZ16FA Zeller 1.OG")); Dialog.show(); equip = Dialog.getChoice(); // ------------------ Options for Pixel Default ------------------------------- if (equip=="Pixel Default") { run("Set Scale...", "distance=0 known=0 pixel=0 unit=0 global"); } // ------------------- End of Pixel Default ---------------------------------- // ----------------- Options for Leica DMi1 Cell Culture Taylor 1.OG ------------------------- if (equip=="Leica DMi1 Cell Culture Taylor 1.OG") { Dialog.create("Leica DMi1 Cell Culture Taylor 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage("ATTENTION: \nvalid for images acquired with 2592x1944 pixels"); Dialog.addChoice("Objective used:", newArray("5x", "10x", "20x", "40x")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="5x") { run("Set Scale...", "distance=2350 known=2000 pixel=1 unit=um global"); } if (scale=="10x") { run("Set Scale...", "distance=2361 known=1000 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=2365 known=500 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=1897 known=200 pixel=1 unit=um global"); } } // -------------------------- End of Leica DMi1 Cell Culture Taylor 1.OG ------------------------------- // ----------------- Options for Leica DMIL Cell Culture Aceto EG ------------------------- if (equip=="Leica DMIL Cell Culture Aceto EG") { Dialog.create("Leica DMIL Cell Culture Aceto EG"); // Write the magnifications available for your equipment Dialog.addMessage("ATTENTION: \nvalid for images acquired with 3648x2736 pixels"); Dialog.addChoice("Objective used:", newArray("5x", "10x", "20x")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="5x") { run("Set Scale...", "distance=2386 known=2000 pixel=1 unit=um global"); } if (scale=="10x") { run("Set Scale...", "distance=2364 known=1000 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=3322 known=700 pixel=1 unit=um global"); } } // -------------------------- End of Leica DMIL Cell Culture Aceto EG ------------------------------- // ------------------------- Options for Leica DMI 4000 1.OG -------------------------------------- if (equip=="Leica DMI 4000 1.OG") //1 { Dialog.create("Cameratype "); Dialog.addMessage("Which camera did you use?"); Dialog.addChoice("Cameratype:", newArray("DFC9000 GT (NEW Fluorescence Cam)", "DFC 345 FX (OLD Black and White Fluorescence Cam)", "DFC 450C (Color Cam)")); Dialog.show(); cameratype = Dialog.getChoice(); // -------------------DFC9000 GT (NEW Fluorescence Cam)----------------------------------- if (cameratype =="DFC9000 GT (NEW Fluorescence Cam)") { Dialog.create("Image size"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("5x", "10x", "20x", "40x", "40x oil", "63x oil")); Dialog.addChoice("Binning used:", newArray("none", "2x2", "3x3", "4x4", "8x8")); Dialog.show(); scale = Dialog.getChoice(); binning = Dialog.getChoice(); if (binning=="none") { bin = 1; } if (binning=="2x2") { bin = 2; } if (binning=="3x3") { bin = 3; } if (binning=="4x4") { bin = 4; } if (binning=="8x8") { bin = 8; } // Input distance values for each magnification if (scale=="5x") { calcknownvalue = 2000*bin; run("Set Scale...", "distance=1528 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="10x") { calcknownvalue = 1000*bin; run("Set Scale...", "distance=1512 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="20x") { calcknownvalue = 600*bin; run("Set Scale...", "distance=1834 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="40x") { calcknownvalue = 300*bin; run("Set Scale...", "distance=1834 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="40x oil") { calcknownvalue = 300*bin; run("Set Scale...", "distance=1850 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="63x oil") { calcknownvalue = 200*bin; run("Set Scale...", "distance=1924 known="+calcknownvalue+" pixel=1 unit=um global"); } } // -------------------- End DFC9000 GT (NEW Fluorescence Cam) ------------------------------- //----------------------------------- DFC 345 FX (Black and White Fluorescence Cam) --------------------------------- if (cameratype =="DFC 345 FX (OLD Black and White Fluorescence Cam)") //2 { Dialog.create("Image size"); Dialog.addMessage("Choose your image size (pixel x pixel)"); Dialog.addChoice("Image size:", newArray("1600x1200", "800x600", "532x400", "400x300")); Dialog.show(); imagesize = Dialog.getChoice(); if (imagesize =="1600x1200") //3 { Dialog.create("Leica DMI 4000 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("5x", "10x", "20x", "40x", "40x oil", "63x oil")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="5x") { run("Set Scale...", "distance=794.674 known=1000 pixel=1 unit=um global"); } if (scale=="10x") { run("Set Scale...", "distance=1497 known=950 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=1433.3 known=450 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=1274 known=200 pixel=1 unit=um global"); } if (scale=="40x oil") { run("Set Scale...", "distance=1283 known=200 pixel=1 unit=um global"); } if (scale=="63x oil") { run("Set Scale...", "distance=998 known=100 pixel=1 unit=um global"); } //3 } if (imagesize =="800x600") //3 { Dialog.create("Leica DMI 4000 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("5x", "10x", "20x", "40x", "40x oil", "63x oil")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="5x") { run("Set Scale...", "distance=397.4 known=1000 pixel=1 unit=um global"); } if (scale=="10x") { run("Set Scale...", "distance=748.5 known=950 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=716.7 known=450 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=637 known=200 pixel=1 unit=um global"); } if (scale=="40x oil") { run("Set Scale...", "distance=641.5 known=200 pixel=1 unit=um global"); } if (scale=="63x oil") { run("Set Scale...", "distance=499 known=100 pixel=1 unit=um global"); } //3 } if (imagesize =="532x400") //3 { Dialog.create("Leica DMI 4000 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("5x", "10x", "20x", "40x", "40x oil", "63x oil")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="5x") { run("Set Scale...", "distance=264.9 known=1000 pixel=1 unit=um global"); } if (scale=="10x") { run("Set Scale...", "distance=499 known=950 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=477.8 known=450 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=424.7 known=200 pixel=1 unit=um global"); } if (scale=="40x oil") { run("Set Scale...", "distance=427.7 known=200 pixel=1 unit=um global"); } if (scale=="63x oil") { run("Set Scale...", "distance=332.7 known=100 pixel=1 unit=um global"); } //3 } if (imagesize =="400x300") //3 { Dialog.create("Leica DMI 4000 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("5x", "10x", "20x", "40x", "40x oil", "63x oil")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="5x") { run("Set Scale...", "distance=198.7 known=1000 pixel=1 unit=um global"); } if (scale=="10x") { run("Set Scale...", "distance=374.3 known=950 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=358.3 known=450 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=318.5 known=200 pixel=1 unit=um global"); } if (scale=="40x oil") { run("Set Scale...", "distance=320.8 known=200 pixel=1 unit=um global"); } if (scale=="63x oil") { run("Set Scale...", "distance=249.5 known=100 pixel=1 unit=um global"); } //3 } //2 } //----------------------------------- DFC 345 FX (Black and White Fluorescence Cam) --------------------------------- //----------------------------------- DFC 450C (Color Cam) --------------------------------------------- if (cameratype =="DFC 450C (Color Cam)") //2 { Dialog.create("Image size"); Dialog.addMessage("Choose your image size (pixel x pixel)"); Dialog.addChoice("Image size:", newArray("2560x1920", "1280x960", "640x480")); Dialog.show(); imagesize = Dialog.getChoice(); if (imagesize =="2560x1920") //3 { Dialog.create("Leica DMI 4000 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("5x", "10x", "20x", "40x", "40x oil", "63x oil")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="5x") { run("Set Scale...", "distance=1029.3 known=1000 pixel=1 unit=um global"); } if (scale=="10x") { run("Set Scale...", "distance=2037.3 known=1000 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=2265.4 known=550 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=2308 known=280 pixel=1 unit=um global"); } if (scale=="40x oil") { run("Set Scale...", "distance=2328 known=280 pixel=1 unit=um global"); } if (scale=="63x oil") { run("Set Scale...", "distance=2328 known=180 pixel=1 unit=um global"); } //3 } if (imagesize =="1280x960") //3 { Dialog.create("Leica DMI 4000 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("5x", "10x", "20x", "40x", "40x oil", "63x oil")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="5x") { run("Set Scale...", "distance=514.7 known=1000 pixel=1 unit=um global"); } if (scale=="10x") { run("Set Scale...", "distance=1018.7 known=1000 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=1132.7 known=550 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=1154 known=280 pixel=1 unit=um global"); } if (scale=="40x oil") { run("Set Scale...", "distance=1164 known=280 pixel=1 unit=um global"); } if (scale=="63x oil") { run("Set Scale...", "distance=1164 known=180 pixel=1 unit=um global"); } //3 } if (imagesize =="640x480") //3 { Dialog.create("Leica DMI 4000 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("5x", "10x", "20x", "40x", "40x oil", "63x oil")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="5x") { run("Set Scale...", "distance=257.3 known=1000 pixel=1 unit=um global"); } if (scale=="10x") { run("Set Scale...", "distance=509.3 known=1000 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=566.4 known=550 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=577 known=280 pixel=1 unit=um global"); } if (scale=="40x oil") { run("Set Scale...", "distance=582 known=280 pixel=1 unit=um global"); } if (scale=="63x oil") { run("Set Scale...", "distance=582 known=180 pixel=1 unit=um global"); } //3 } //2 } //----------------------------------- DFC 450C (Color Cam) --------------------------------------------- //1 } // ------------------------- End of Leica DMI 4000 1.OG ---------------------------------------- // ------------------------- Options for Nikon Diaphot 300 1.OG -------------------------------------- if (equip=="Nikon Diaphot 300 1.OG") { Dialog.create("Nikon Diaphot 300 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("10x", "16x", "20x", "40x", "100x")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="10x") { run("Set Scale...", "distance=45 known=50 pixel=1 unit=um global"); } if (scale=="16x") { run("Set Scale...", "distance=72 known=50 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=90 known=50 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=180 known=50 pixel=1 unit=um global"); } if (scale=="100x") { run("Set Scale...", "distance=445 known=50 pixel=1 unit=um global"); } } // ------------------------- End of Nikon Diaphot 300 1.OG ---------------------------------------- // ----------------------- Options for Zeiss Mic Elevator 2.OG ------------------------------------ if (equip=="Zeiss Mic Elevator 2.OG") { Dialog.create("Zeiss Mic Elevator 2.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("2.5x", "4x", "5x", "10x", "20x", "40x")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="2.5x") { run("Set Scale...", "distance=982.667 known=4 pixel=1 unit=mm global"); } if (scale=="4x") { run("Set Scale...", "distance=378 known=1000 pixel=1 unit=um global"); } if (scale=="5x") { run("Set Scale...", "distance=936.667 known=2 pixel=1 unit=mm global"); } if (scale=="10x") { run("Set Scale...", "distance=47 known=50 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=96 known=50 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=187 known=50 pixel=1 unit=um global"); } } // --------------------------- End of Zeiss Mic Elevator 2.OG ------------------------------------- // --------------------------- Options for Leica DMIL Cell Culture CHR 2.OG ------------------------------- if (equip=="Leica DMIL Cell Culture CHR 2.OG") { Dialog.create("Image size"); Dialog.addMessage("Choose your image size (pixel x pixel)"); Dialog.addChoice("Image size:", newArray("1024x768", "2048x1536")); Dialog.show(); imagesize = Dialog.getChoice(); if (imagesize =="1024x768") { Dialog.create("Leica DMIL Cell Culture CHR 2.OG"); // Write the magnifications available for your equipment Dialog.addMessage("ATTENTION: \nOnly for images with a size of 1024x768 pixels"); Dialog.addChoice("Objective used:", newArray("4x", "5x", "10x", "20x", "40x")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="4x") { run("Set Scale...", "distance=871.3 known=2 pixel=1 unit=mm global"); } if (scale=="5x") { run("Set Scale...", "distance=548 known=1 pixel=1 unit=mm global"); } if (scale=="10x") { run("Set Scale...", "distance=545.15 known=500 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=885.75 known=400 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=869 known=200 pixel=1 unit=um global"); } } if (imagesize =="2048x1536") { Dialog.create("Leica DMIL Cell Culture CHR 2.OG"); // Write the magnifications available for your equipment Dialog.addMessage("ATTENTION: \nOnly for images with a size of 2048x1536 pixels"); Dialog.addChoice("Objective used:", newArray("4x", "5x", "10x", "20x", "40x")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="4x") { run("Set Scale...", "distance=1742.6 known=2 pixel=1 unit=mm global"); } if (scale=="5x") { run("Set Scale...", "distance=1096 known=1 pixel=1 unit=mm global"); } if (scale=="10x") { run("Set Scale...", "distance=1090.3 known=500 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=1771.5 known=400 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=1738 known=200 pixel=1 unit=um global"); } } } // ------------------------ End of Leica DMIL Cell Culture CHR 2.OG ------------------------------- // -----------------------Options for Leica DMIRBE 1.OG ------------------------------------------ if (equip=="Leica DMIRBE 1.OG") { Dialog.create("Leica DMIRBE 1.OG"); // Write the scanlens available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Type of lens used:", newArray("scanlens", "1.5x lens")); // Write the magnifications available for your equipment Dialog.addChoice("Objective used:", newArray("5x", "10x", "20x", "40x", "63x", "100x")); Dialog.show(); lens = Dialog.getChoice(); scale = Dialog.getChoice(); // Input distance values for each magnification if (lens=="scanlens"){ if (scale=="5x"){ //showMessage("5x scanlens"); run("Set Scale...", "distance=683 known=1000 pixel=1 unit=um global"); } if (scale=="10x") { //showMessage("10x scanlens"); run("Set Scale...", "distance=1384.5 known=1000 pixel=1 unit=um global"); } if (scale=="20x") { //showMessage("20x scanlens"); run("Set Scale...", "distance=1911.5 known=700 pixel=1 unit=um global"); } if (scale=="40x") { //showMessage("40x scanlens"); run("Set Scale...", "distance=1642 known=300 pixel=1 unit=um global"); } if (scale=="63x") { //showMessage("63x scanlens"); run("Set Scale...", "distance=1721.3 known=200 pixel=1 unit=um global"); } if (scale=="100x") { //showMessage("100x scanlens"); run("Set Scale...", "distance=1354.7 known=100 pixel=1 unit=um global"); } } if (lens=="1.5x lens"){ if (scale=="5x") { //showMessage("5x 1.5xlens"); run("Set Scale...", "distance=1026 known=1000 pixel=1 unit=um global"); } if (scale=="10x") { //showMessage("10x 1.5xlens"); run("Set Scale...", "distance=1974.7 known=950 pixel=1 unit=um global"); } if (scale=="20x") { //showMessage("20x 1.5xlens"); run("Set Scale...", "distance=1843.5 known=450 pixel=1 unit=um global"); } if (scale=="40x") { //showMessage("40x 1.5xlens"); run("Set Scale...", "distance=1643.5 known=200 pixel=1 unit=um global"); } if (scale=="63x") { //showMessage("63x 1.5xlens"); run("Set Scale...", "distance=1288.5 known=100 pixel=1 unit=um global"); } if (scale=="100x") { //showMessage("100x 1.5xlens"); run("Set Scale...", "distance=1832 known=90 pixel=1 unit=um global"); } } } // ----------------------End of Leica DMIRBE 1.OG ----------------------------------------- // ------------------- Options for Leica Video Mic Primo 3.OG OLD----------------------------------- if (equip=="Leica Video Mic Primo 3.OG OLD") { Dialog.create("Leica Video Mic Primo 3.OG OLD"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("10x", "20x", "20x binning 2", "40x", "100x")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="10x") { run("Set Scale...", "distance=77.375 known=50 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=155.666666 known=50 pixel=1 unit=um global"); } if (scale=="20x binning 2") { run("Set Scale...", "distance=77.83333333 known=50 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=311 known=50 pixel=1 unit=um global"); } if (scale=="100x") { run("Set Scale...", "distance=783 known=50 pixel=1 unit=um global"); } } // -------------------- End of Leica Video Mic Primo 3.OG OLD ------------------------------- // ------------------- Options for Leica Video Mic DMi8 3.OG----------------------------------- if (equip=="Leica Video Mic Dmi8 3.OG") { Dialog.create("Leica Video Mic Dmi8 3.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("10x", "20x", "40x", "63x", "63x oil", "100x oil")); Dialog.addChoice("Binning used:", newArray("none", "2x2", "4x4")); Dialog.show(); scale = Dialog.getChoice(); binning = Dialog.getChoice(); if (binning=="none") { bin = 1; } if (binning=="2x2") { bin = 2; } if (binning=="4x4") { bin = 4; } // Input distance values for each magnification if (scale=="10x") { calcknownvalue = 1000*bin; run("Set Scale...", "distance=1546 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="20x") { calcknownvalue = 450*bin; run("Set Scale...", "distance=1388 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="40x") { calcknownvalue = 300*bin; run("Set Scale...", "distance=1848 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="63x") { calcknownvalue = 150*bin; run("Set Scale...", "distance=1453 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="63x oil") { calcknownvalue = 150*bin; run("Set Scale...", "distance=1453 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="100x oil") { calcknownvalue = 100*bin; run("Set Scale...", "distance=1553 known="+calcknownvalue+" pixel=1 unit=um global"); } } // -------------------- End of Leica Video Mic Dmi8 3.OG ------------------------------- // ----------------------- Options for Operetta HCS 3.OG ------------------------------------ if (equip=="Operetta HCS 3.OG") { Dialog.create("Operetta HCS 3.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("2x", "10x", "20x", "40x", "60x")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="2x") { run("Set Scale...", "distance=141 known=700 pixel=1 unit=mm global"); } if (scale=="10x") { run("Set Scale...", "distance=702 known=700 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=1195 known=600 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=1201 known=300 pixel=1 unit=um global"); } if (scale=="60x") { run("Set Scale...", "distance=1204 known=200 pixel=1 unit=um global"); } } // --------------------------- End of Operetta HCS 3.OG ------------------------------------- // ------------------- Options for Zeiss Video Mic Joerg 1.OG ------------------------- if (equip=="Zeiss Video Mic Joerg 1.OG") //1 { Dialog.create("Cameratype "); Dialog.addMessage("Which camera did you use?"); Dialog.addChoice("Cameratype:", newArray("CoolSnap EZ (Black and White Fluorescence Cam)", "ProgResC5 (Color Cam)", "Old Princeton Camera")); Dialog.show(); cameratype = Dialog.getChoice(); //----------------------------------- CoolSnap EZ --------------------------------- if (cameratype =="CoolSnap EZ (Black and White Fluorescence Cam)") //2 { Dialog.create("Image size"); Dialog.addMessage("Choose your image size (pixel x pixel)"); Dialog.addChoice("Image size:", newArray("348x260", "696x520", "1392x1040")); Dialog.show(); imagesize = Dialog.getChoice(); if (imagesize =="348x260") //3 { Dialog.create("Zeiss Video Mic Joerg 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("10x Plan Neofluar 0.3 Ph1", "20x Plan Neofluar 0.5 Ph2", "40x Plan Neofluar 0.75", "40x Plan Neofluar 1.3", "63x Plan Apochromat 1.4 Ph3", "100x Plan Neofluar 1.3")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="10x Plan Neofluar 0.3 Ph1") { run("Set Scale...", "distance=333.0 known=850 pixel=1 unit=um global"); } if (scale=="20x Plan Neofluar 0.5 Ph2") { run("Set Scale...", "distance=315.0 known=400 pixel=1 unit=um global"); } if (scale=="40x Plan Neofluar 0.75") { run("Set Scale...", "distance=318.5 known=200 pixel=1 unit=um global"); } if (scale=="40x Plan Neofluar 1.3") { run("Set Scale...", "distance=312.0 known=200 pixel=1 unit=um global"); } if (scale=="63x Plan Apochromat 1.4 Ph3") { run("Set Scale...", "distance=302.8 known=120 pixel=1 unit=um global"); } if (scale=="100x Plan Neofluar 1.3") { run("Set Scale...", "distance=316.5 known=80 pixel=1 unit=um global"); } //3 } if (imagesize =="696x520") //3 { Dialog.create("Zeiss Video Mic Joerg 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("10x Plan Neofluar 0.3 Ph1", "20x Plan Neofluar 0.5 Ph2", "40x Plan Neofluar 0.75", "40x Plan Neofluar 1.3", "63x Plan Apochromat 1.4 Ph3", "100x Plan Neofluar 1.3")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="10x Plan Neofluar 0.3 Ph1") { run("Set Scale...", "distance=666.5 known=850 pixel=1 unit=um global"); } if (scale=="20x Plan Neofluar 0.5 Ph2") { run("Set Scale...", "distance=630.0 known=400 pixel=1 unit=um global"); } if (scale=="40x Plan Neofluar 0.75") { run("Set Scale...", "distance=637.5 known=200 pixel=1 unit=um global"); } if (scale=="40x Plan Neofluar 1.3") { run("Set Scale...", "distance=623.5 known=200 pixel=1 unit=um global"); } if (scale=="63x Plan Apochromat 1.4 Ph3") { run("Set Scale...", "distance=606.0 known=120 pixel=1 unit=um global"); } if (scale=="100x Plan Neofluar 1.3") { run("Set Scale...", "distance=633.3 known=80 pixel=1 unit=um global"); } //3 } if (imagesize =="1392x1040") //3 { Dialog.create("Zeiss Video Mic Joerg 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("10x Plan Neofluar 0.3 Ph1", "20x Plan Neofluar 0.5 Ph2", "40x Plan Neofluar 0.75", "40x Plan Neofluar 1.3", "63x Plan Apochromat 1.4 Ph3", "100x Plan Neofluar 1.3")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="10x Plan Neofluar 0.3 Ph1") { run("Set Scale...", "distance=1334.0 known=850 pixel=1 unit=um global"); } if (scale=="20x Plan Neofluar 0.5 Ph2") { run("Set Scale...", "distance=1261.0 known=400 pixel=1 unit=um global"); } if (scale=="40x Plan Neofluar 0.75") { run("Set Scale...", "distance=1274.0 known=200 pixel=1 unit=um global"); } if (scale=="40x Plan Neofluar 1.3") { run("Set Scale...", "distance=1247.0 known=200 pixel=1 unit=um global"); } if (scale=="63x Plan Apochromat 1.4 Ph3") { run("Set Scale...", "distance=1211.0 known=120 pixel=1 unit=um global"); } if (scale=="100x Plan Neofluar 1.3") { run("Set Scale...", "distance=1267.0 known=80 pixel=1 unit=um global"); } //3 } //2 } //----------------------------------- End of CoolSnap EZ --------------------------------- //----------------------------------- ProgResC5 --------------------------------------------- if (cameratype =="ProgResC5 (Color Cam)") //2 { Dialog.create("Image size"); Dialog.addMessage("Choose your image size (pixel x pixel)"); Dialog.addChoice("Image size:", newArray("646x488 VGA", "1290x972 VGA", "2580x1944 VGA")); Dialog.show(); imagesize = Dialog.getChoice(); if (imagesize =="646x488 VGA") //3 { Dialog.create("Zeiss Video Mic Joerg 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("10x Plan Neofluar 0.3 Ph1", "20x Plan Neofluar 0.5 Ph2", "40x Plan Neofluar 0.75", "63x Plan Apochromat 1.4 Ph3", "100x Plan Neofluar 1.3")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="10x Plan Neofluar 0.3 Ph1") { run("Set Scale...", "distance=468.7 known=1000 pixel=1 unit=um global"); } if (scale=="20x Plan Neofluar 0.5 Ph2") { run("Set Scale...", "distance=566.0 known=600 pixel=1 unit=um global"); } if (scale=="40x Plan Neofluar 0.75") { run("Set Scale...", "distance=572.2 known=300 pixel=1 unit=um global"); } if (scale=="63x Plan Apochromat 1.4 Ph3") { run("Set Scale...", "distance=604.0 known=200 pixel=1 unit=um global"); } if (scale=="100x Plan Neofluar 1.3") { run("Set Scale...", "distance=614.0 known=130 pixel=1 unit=um global"); } //3 } if (imagesize =="1290x972 VGA") //3 { Dialog.create("Zeiss Video Mic Joerg 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("10x Plan Neofluar 0.3 Ph1", "20x Plan Neofluar 0.5 Ph2", "40x Plan Neofluar 0.75", "63x Plan Apochromat 1.4 Ph3", "100x Plan Neofluar 1.3")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="10x Plan Neofluar 0.3 Ph1") { run("Set Scale...", "distance=938.0 known=1000 pixel=1 unit=um global"); } if (scale=="20x Plan Neofluar 0.5 Ph2") { run("Set Scale...", "distance=1132.0 known=600 pixel=1 unit=um global"); } if (scale=="40x Plan Neofluar 0.75") { run("Set Scale...", "distance=1145.0 known=300 pixel=1 unit=um global"); } if (scale=="63x Plan Apochromat 1.4 Ph3") { run("Set Scale...", "distance=1208.0 known=200 pixel=1 unit=um global"); } if (scale=="100x Plan Neofluar 1.3") { run("Set Scale...", "distance=1229.0 known=130 pixel=1 unit=um global"); } //3 } if (imagesize =="2580x1944 VGA") //3 { Dialog.create("Zeiss Video Mic Joerg 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("10x Plan Neofluar 0.3 Ph1", "20x Plan Neofluar 0.5 Ph2", "40x Plan Neofluar 0.75", "63x Plan Apochromat 1.4 Ph3", "100x Plan Neofluar 1.3")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="10x Plan Neofluar 0.3 Ph1") { run("Set Scale...", "distance=1876.0 known=1000 pixel=1 unit=um global"); } if (scale=="20x Plan Neofluar 0.5 Ph2") { run("Set Scale...", "distance=2262.0 known=600 pixel=1 unit=um global"); } if (scale=="40x Plan Neofluar 0.75") { run("Set Scale...", "distance=2290.0 known=300 pixel=1 unit=um global"); } if (scale=="63x Plan Apochromat 1.4 Ph3") { run("Set Scale...", "distance=2416.0 known=200 pixel=1 unit=um global"); } if (scale=="100x Plan Neofluar 1.3") { run("Set Scale...", "distance=2460.1 known=130 pixel=1 unit=um global"); } //3 } //2 } //----------------------------------- End of ProgResC5 --------------------------------------------- //----------------------------------- Old Princeton Camera ---------------------------------------- if (cameratype =="Old Princeton Camera") //2 { Dialog.create("Image size"); Dialog.addMessage("Choose your image size (pixel x pixel)"); Dialog.addChoice("Image size:", newArray("768x512")); Dialog.show(); imagesize = Dialog.getChoice(); if (imagesize =="768x512") //3 { Dialog.create("Zeiss Video Mic Joerg 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("10x", "20x", "40x", "63x", "100x")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="10x") { run("Set Scale...", "distance=56.3333333 known=50 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=113 known=50 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=227.6666666 known=50 pixel=1 unit=um global"); } if (scale=="63x") { run("Set Scale...", "distance=361.3333333 known=50 pixel=1 unit=um global"); } if (scale=="100x") { run("Set Scale...", "distance=566 known=50 pixel=1 unit=um global"); } //3 } //2 } //-----------------------------------End of Old Princeton Camera -------------------------------- //1 } // ------------------- End of Zeiss Video Mic Joerg 1.OG ---------------------- // ----------------- Options for Zeiss Axioskop2 Zeller 1.OG ------------------------- if (equip=="Zeiss Axioskop2 Zeller 1.OG") { Dialog.create("Zeiss Axioskop2 Zeller 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("4x", "10x", "20x", "40x", "63x")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="4x") { run("Set Scale...", "distance=3519.3 known=3000 pixel=1 unit=um global"); } if (scale=="10x") { run("Set Scale...", "distance=2924.3 known=1000 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=2990 known=500 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=2922.3 known=250 pixel=1 unit=um global"); } if (scale=="63x") { run("Set Scale...", "distance=2760 known=150 pixel=1 unit=um global"); } } // -------------------------- End of Zeiss Axioskop2 Zeller 1.OG ------------------------------- // ----------------- Options for Nikon Eclipse E600 Hollaender 4.OG ------------------------- if (equip=="Nikon Eclipse E600 Hollaender 4.OG") { Dialog.create("Nikon Eclipse E600 Hollaender 4.OG"); // Write the magnifications available for your equipment Dialog.addMessage("ATTENTION: \nvalid for images acquired with Quick 1280x1024 pixels"); Dialog.addChoice("Objective used:", newArray("4x", "10x", "20x", "40x", "60x")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="4x") { run("Set Scale...", "distance=436 known=1000 pixel=1 unit=um global"); } if (scale=="10x") { run("Set Scale...", "distance=1094 known=1000 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=1096 known=500 pixel=1 unit=um global"); } if (scale=="40x") { run("Set Scale...", "distance=1093 known=250 pixel=1 unit=um global"); } if (scale=="60x") { run("Set Scale...", "distance=995 known=150 pixel=1 unit=um global"); } } // -------------------------- End of Nikon Eclipse E600 Hollaender 4.OG ------------------------------- // ----------------- Options for Zeiss Axio Observer Taylor 1.OG ------------------------- if (equip=="Zeiss Axio Observer Taylor 1.OG") { Dialog.create("Zeiss Axio Observer Taylor 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage("ATTENTION: \nvalid for images acquired with 1388x1040 pixels"); Dialog.addChoice("Objective used:", newArray("10x", "20x", "63x")); Dialog.show(); scale = Dialog.getChoice(); // Input distance values for each magnification if (scale=="10x") { run("Set Scale...", "distance=1276 known=800 pixel=1 unit=um global"); } if (scale=="20x") { run("Set Scale...", "distance=1282 known=400 pixel=1 unit=um global"); } if (scale=="63x") { run("Set Scale...", "distance=1049 known=100 pixel=1 unit=um global"); } } // -------------------------- End of Zeiss Axio Observer Taylor 1.OG ------------------------------- // ----------------- Options for Nikon Stereo SMZ1500 Finke 3.OG ------------------------- if (equip=="Nikon Stereo SMZ1500 Finke 3.OG") { Dialog.create("Nikon Stereo SMZ1500 Finke 3.OG"); // Write the magnifications available for your equipment Dialog.addMessage("ATTENTION: \nvalid for images acquired with 1280x960 pixels"); Dialog.addChoice("Objective used:", newArray("0.5x")); Dialog.addString("Zoom factor used:", 0.75 ); Dialog.show(); scale = Dialog.getChoice(); zoom = Dialog.getString(); // Input distance values for each magnification if (scale=="0.5x") { calcknownvalue = 20/zoom; run("Set Scale...", "distance=790 known="+calcknownvalue+" pixel=1 unit=mm global"); } } // -------------------------- End of Nikon Stereo SMZ1500 Finke 3.OG ------------------------------- // ----------------- Options for Leica Stereo MZ16FA Zeller 1.OG ------------------------- if (equip=="Leica Stereo MZ16FA Zeller 1.OG") { Dialog.create("Leica Stereo MZ16FA Zeller 1.OG"); // Write the magnifications available for your equipment Dialog.addMessage("ATTENTION: \nvalid for images acquired with 1392x1040 pixels"); //Dialog.addChoice("Objective used:", newArray("1.0x")); Dialog.addString("Zoom factor used:", 10 ); Dialog.show(); //scale = Dialog.getChoice(); zoom = Dialog.getString(); // Input distance values for each magnification //if (scale=="0.5x") { calcknownvalue = 104/zoom; run("Set Scale...", "distance=1261 known="+calcknownvalue+" pixel=1 unit=mm global"); //} } // -------------------------- End of Leica Stereo MZ16FA Zeller 1.OG ------------------------------- // ------------------- Options for Zeiss Axio Imager Scanning Microscope 3.OG ----------------------------------- if (equip=="Zeiss Axio Imager Scanning Microscope 3.OG") { Dialog.create("Cameratype "); Dialog.addMessage("Which camera did you use?"); Dialog.addChoice("Cameratype:", newArray("AxioCam ICc5 (Color Cam)", "AxioCam 506 mono (Black and White Fluorescence Cam)")); Dialog.show(); cameratype = Dialog.getChoice(); // ------------------------- AxioCam ICc5 (Color Cam) --------------------- if (cameratype =="AxioCam ICc5 (Color Cam)") { Dialog.create("Zeiss Axio Imager Scanning Microscope 3.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("5x", "10x", "20x", "40x")); Dialog.addChoice("Binning used:", newArray("none")); Dialog.show(); scale = Dialog.getChoice(); binning = Dialog.getChoice(); if (binning=="none") { bin = 1; } // Input distance values for each magnification if (scale=="5x") { calcknownvalue = 2000*bin; run("Set Scale...", "distance=1868 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="10x") { calcknownvalue = 1000*bin; run("Set Scale...", "distance=1866 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="20x") { calcknownvalue = 500*bin; run("Set Scale...", "distance=1874 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="40x") { calcknownvalue = 200*bin; run("Set Scale...", "distance=1484 known="+calcknownvalue+" pixel=1 unit=um global"); } } // ------------------------- End of AxioCam ICc5 (Color Cam) --------------------- // -------------------------- AxioCam 506 mono (Black and White Fluorescence Cam) --------------------- if (cameratype =="AxioCam 506 mono (Black and White Fluorescence Cam)") { Dialog.create("Zeiss Axio Imager Scanning Microscope 3.OG"); // Write the magnifications available for your equipment Dialog.addMessage(" "); Dialog.addChoice("Objective used:", newArray("5x", "10x", "20x", "40x")); Dialog.addChoice("Binning used:", newArray("none", "2x2", "3x3", "4x4", "5x5")); Dialog.show(); scale = Dialog.getChoice(); binning = Dialog.getChoice(); if (binning=="none") { bin = 1; } if (binning=="2x2") { bin = 2; } if (binning=="3x3") { bin = 3; } if (binning=="4x4") { bin = 4; } if (binning=="5x5") { bin = 5; } // Input distance values for each magnification if (scale=="5x") { calcknownvalue = 1000*bin; run("Set Scale...", "distance=1132 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="10x") { calcknownvalue = 900*bin; run("Set Scale...", "distance=2030 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="20x") { calcknownvalue = 450*bin; run("Set Scale...", "distance=2030 known="+calcknownvalue+" pixel=1 unit=um global"); } if (scale=="40x") { calcknownvalue = 200*bin; run("Set Scale...", "distance=1791 known="+calcknownvalue+" pixel=1 unit=um global"); } } // -------------------- End of AxioCam 506 mono (Black and White Fluorescence Cam) ------------------------------- } // -------------------- End of Zeiss Axio Imager Scanning Microscope 3.OG ------------------------------- }