/* * Cell_Adhesion_Assay * Authors: Pau Carrillo-Barberà * Department of Cellular & Functional Biology * University of Valencia (Valencia, Spain) */ macro "Cell_Adhesion" { //choose a macro mode and a directory #@ String (label=" ", value="High Throughput Analysis
Cell Adhesion Assay
", visibility=MESSAGE, persist=false) heading #@ String(label="Select mode:", choices={"Analysis", "Pre-Analysis (parameter tweaking)"}, persist=true, style="radioButtonVertical") mode #@ File(label="Select directory:", persist=true, style="directory") dir #@ String (label="Load pre-established
parameter dataset:", choices={"No", "Yes"}, persist=true, style="radioButtonHorizontal") importPD #@ String (label="Save ROIs:", choices={"No", "Yes"}, value="Yes", persist=true, style="radioButtonHorizontal") saveROIs #@ String (label=" ", value="", visibility=MESSAGE, persist=false) logo #@ String (label=" ", value="Neuromolecular Biology Lab
ERI BIOTECMED, Universitat de València (Valencia, Spain)
", visibility=MESSAGE, persist=false) message // open pre-established parameter dataset if (importPD=="Yes") { pdPath=File.openDialog("Select a parameter dataset file"); parametersString=File.openAsString(pdPath); parameterRows=split(parametersString, "\n"); parameters=newArray(parameterRows.length); for(i=0; i", prominence, 0, 2, "pixels"); Dialog.addSlider("Threshold", 0.01, 1.00, thresholdTracker); Dialog.addNumber("Min object size", minSize, 0, 2, "pixels"); Dialog.setInsets(0, 170, 0); Dialog.show() projectName=Dialog.getString(); counterstainingChannel=Dialog.getChoice(); trackerChannel=Dialog.getChoice(); maximumRadius=Dialog.getNumber(); thresholdCounterstain=Dialog.getNumber(); prominence=Dialog.getNumber(); thresholdTracker=Dialog.getNumber(); minSize=Dialog.getNumber(); // check the parameter selection if(counterstainingChannel==trackerChannel) { beep(); exit("Counterstaining ["+counterstainingChannel+"] and Tracker ["+trackerChannel+"] channels can not be the same") } // create a parameter dataset file title1 = "Parameter dataset"; title2 = "["+title1+"]"; f = title2; run("Table...", "name="+title2+" width=500 height=500"); print(f, "Project\t" + projectName); print(f, "Counterstaining channel\t" + counterstainingChannel); print(f, "Tracker channel\t" + trackerChannel); print(f, "Maximum (radius)\t" + maximumRadius); print(f, "Threshold (counterstain)\t" + thresholdCounterstain); print(f, "Prominence >\t" + prominence); print(f, "Threshold (tracker)\t" + thresholdTracker); print(f, "Min object size\t" +minSize); // save as txt saveAs("txt", dir+File.separator+projectName); selectWindow(title1); run("Close"); // create an array containing the well codes for (i=0; i1) { getDimensions(widthTracker, heightTracker, channelsTracker, slicesTracker, framesTracker); newImage("Seeds", "8-bit white", widthTracker, heightTracker, 1); for (k=0; k1) { getDimensions(widthTracker, heightTracker, channelsTracker, slicesTracker, framesTracker); newImage("Seeds", "8-bit white", widthTracker, heightTracker, 1); for (k=0; k