/* */ // Install the BIOP Library call("BIOP_LibInstaller.installLibrary", "BIOP"+File.separator+"BIOPLib.ijm"); // Name ActionBar bar_name = "BIOP LISH Tools"; bar_file = replace(bar_name, " ", "_")+".ijm"; bar_jar = replace(bar_name, " ", "_")+".jar"; runFrom = "jar:file:BIOP/"+bar_jar+"!/"+bar_file; ////////////////////////////////////////////////////////////////////////////////////////////// // The line below is for debugging. Place this VSI file in the ActionBar folder within Plugins ////////////////////////////////////////////////////////////////////////////////////////////// runFrom = "/plugins/ActionBar/"+bar_file; if(isOpen(bar_name)) { run("Close AB", bar_name); } run("Action Bar",runFrom); exit(); //Start of ActionBar function toolName() { return "BIOP LISH Tools Settings"; } function sep() { return File.separator; } function setupDialog() { names = newArray("Other Channels", "Bead Detection", "Beads Channel", "Beads Z Downsample Factor", "Beads DoG Sigma", "Beads DoG Threshold", "Beads Lower Distance Thr", "Beads Upper Distance Thr", "Beads Set Min And Max", "Beads Min Intensity", "Beads Max Intensity", "Sample Detection", "Sample Z Downsample Factor", "Sample DoG Sigma", "Sample DoG Threshold", "Sample Upper Distance Thr", "Sample Set Min And Max", "Sample Min Intensity", "Sample Max Intensity", "Registration Parameters", "RANSAC Error", "Descriptor Significance", "Regularization Lambda", "ICP Max Distance", "ICP Max Iterations"); types = newArray("n", "m", "n", "n", "n", "n", "n", "n", "c", "n", "n", "m", "n", "n", "n", "n", "c", "n", "n", "m", "n", "n", "n", "n", "n"); defaults = newArray(488, "", 561, 2, 1.6, 0.0080, 10, 30, false, 0, 65550, "", 2, 3.0, 0.0020, 50, false, 0, 65550, "", 5, 3, 0.1, 4, 150); promptParameters(names, types, defaults); } function deconParameters() { names = newArray("Compute On", "CUDA Directory", "CUDA Library", "GPU Number", "Block Size", "X Block Size", "Y Block Size", "Z Block Size", "Type Of Iteration", "Acceleration", "Number of Iterations", "Tikhonov Parameter", "X PSF Size", "Y PSF Size", "Z PSF Size"); types = newArray("l", "s", "s", "n", "l", "n", "n", "n", "s", "l", "n", "n", "n", "n", "n", "n"); defaults = newArray("CPU (Java),GPU (Nvidia CUDA via JNA)", "C:/Fiji", "FourierConvolutionCUDALib.dll", "1", "specify maximal blocksize manually,in 256x256x256 blocks,in 512x512x512 blocks,Entire image at once", "512", "512", "512", "Efficient Bayesian - Optimization I (fast, precise)", "1 (balanced),minimal number of overlapping views,average number of overlapping views", 10, 0.0006, 19, 19, 25); promptParameters(names, types, defaults); } function define(file_id) { run("Bio-Formats Macro Extensions"); main_path = substring(file_id,0,lastIndexOf(file_id,sep())+1); main_file = substring(file_id,lastIndexOf(file_id,sep())+1, lastIndexOf(file_id,".")); xml_file = main_file+".xml"; Ext.setId(file_id); // Get metadata Ext.getSeriesCount(count); Ext.setSeries(0); Ext.getSizeC(sizeC); // Angles angle_list = ""; angles = ""; for(i=0; i.*")) { start_ignore= !start_ignore; i++; } if(!start_ignore) { res += str[i] +"\n"; } else { print(str[i]); } } print("Done"); File.saveString(res, hdf5_xml); print("XML file Resaved and Eventual "+tag_name+" Tags Removed"); } /* * function fuseDeconvolve(xml_file, bead_channel, other_channels, bb_name, iterations ) { // some defaults to decide whether they are worth making into editable variables type_of_iteration = "Efficient Bayesian - Optimization I (fast, precise)"; osem_acceleration ="1 (balanced)"; tikhonov_parameter = 0.006; other_channels = split(getData("Other Channels"), ", "); channel_string = "detections_to_extract_psf_for_channel_"+bead_channel+"=["+"channel "+bead_channel+" thinned-out]"; for(i=0; i