// Single-ZOLA_to_TS.js script by Christophe Leterrier // Calls F-ZOLA_to_TS.js to convert a ZOLA localization file to ThunderSTORM // 06/01/2018 importClass(Packages.ij.io.OpenDialog) importClass(Packages.java.io.File) importClass(Packages.ij.IJ); importClass(Packages.ij.gui.GenericDialog); xFac_def = 1.0369; // dilatation in X to compensate cylindrical lens (measured on microscope) var od = new OpenDialog("Choose a ZOLA txt file", ""); var directory = od.getDirectory(); var name = od.getFileName(); var path = directory + name; IJ.log("\nZOLA to TS input file path:" + path); var gd = new GenericDialog("ZOLA to TS: options"); gd.addNumericField("Cylindrical lens correction factor", xFac_def, 4, 6, "(1=no correction)"); gd.showDialog(); var xFac = gd.getNextNumber(); if (gd.wasOKed()) { var plugDir = IJ.getDirectory("plugins"); plugDir = plugDir + "NeuroCyto Lab" + File.separator + "ChriSTORM" + File.separator + "Routines" + File.separator; var PtTJS = "F-ZOLA_to_TS.js"; var PtTPath = plugDir + PtTJS; IJ.log("ZOLA to TS path:" + plugDir + PtTJS); load(PtTPath); ZolaTS(path, directory, xFac); IJ.log("ZOLA to TS end"); }