////////////////////////////////////////////////////////////////////////////////////////// // Plugin "ReadPlate" // This macro measures the color channels (RGB) of an image of a multi-well plate // of up to 96 wells. // Original version written 12-16-2015; latest version finished 04-15-2016 // // // Jose Maria Delfino // Department of Biological Chemistry // School of Pharmacy & Biochemistry // University of Buenos Aires // Junin 956, C1113AAD Buenos Aires, Argentina. // E-mail: delfino@qb.ffyb.uba.ar // Phone: 54 11 4962 5506, 54 11 4964 8289/8290/8291, extension 116 ////////////////////////////////////////////////////////////////////////////////////////// // // INSTALLATION: // ImageJ is a high-quality public domain software very useful for image processing. // Download the software from the imagej.nih.gov site. // You should have ImageJ installed in your machine in the first place. // This plugin is a script written in ImageJ macro language (.ijm file). // After opening ImageJ, install this plugin by doing Plugins > Install… and choosing // Readplate from the appropriate directory. // The plugin readplate should now appear listed under the Plugins menu, and is ready to // be launched by clicking Plugins > readplate. // ////////////////////////////////////////////////////////////////////////////////////////// // // Example image: http://imagej.nih.gov/ij/macros/images/5.jpg // ////////////////////////////////////////////////////////////////////////////////////////// // Clearing table with results and removing overlay run("Clear Results"); run("Remove Overlay"); ////////////////////////////////////////////////////////////////////////////////////////// message = "STEP-BY-STEP INSTRUCTIONS FOR USE:\n" +" \n" +"Before starting, please set the following parameters for measurements:\n" +" (Analyze > Set Measurements). These should read as follows:\n" +" Area / Standard deviation / Min & max gray value/ Mean gray value/ Modal gray value/\n" +" Add to overlay / Redirect to None / Decimal places (0-9): 3\n" +" \n" +"1.- Take a color photograph of the plate centered in DE/67.\n" +" Align borders parallel to the edges of the photograph.\n" +" Export image as a .jpg file.\n" +"2.- Open the .jpg image from within the ImageJ software installed in your computer.\n" +"3.- Manually measure the x,y coordinates of wells A1 and H12.\n" +"4a.- Run the plugin Readplate (by doing Plugins > Readplate).\n" +"4b.- Select the color channel (Red, Green, Blue, Gray) for measurements.\n" +"4c.- Choose the parameters for the grid of circles most appropriate for measurements.\n" +" Please note that each circle need not be too large, because enough color\n" +" information is contained in the number of pixels covering a relatively small area.\n" +" The final grid should show big circles well centered on the wells and small circles\n" +" surrounding each well. The latter serve to correct for differences in local light intensity.\n" +"4d.- Check the fit of the final grid onto the plate image.\n" +" Proceed to do measurements if it looks OK. A table with the results will appear next.\n" +" This includes parameters of the distribution of light intensity within the area of each circle:\n" +" Position number and Label for each well, Area, Mean, StdDev, Mode, Min, Max, uncorrected and\n" +" corrected Absorbance values.\n" +" (Note: Absorbance is calculated as -log(Mean/255), where the value 255 represents\n" +" the maximal transmitted light intensity)\n" +"5.- By default, results are exported as an Excel spreadsheet file (.xls).\n" +" \n" +" Relevant literature reference:\n" +" 'Broadly Available Imaging Devices Enable High Quality Low-Cost Photometry'\n" +" Dionysios C. Christodouleas, Alex Nemiroski, Ashok A. Kumar & George M. Whitesides\n" +" Anal Chem. 2015, 87:9170-8.\n" +" \n" +" April 2016\n" +" Jose Maria Delfino, Department of Biological Chemistry, School of Pharmacy & Biochemistry,\n" +" University of Buenos Aires, 1113 Buenos Aires, Argentina.\n" +" delfino@qb.ffyb.uba.ar\n" +" \n" showMessage ("Readplate", message); ////////////////////////////////////////////////////////////////////////////////////////// // Opening a color photograph of the plate in the first place requires("1.35b"); if (bitDepth!=24) exit("This macro requires an RGB image"); ////////////////////////////////////////////////////////////////////////////////////////// // Choice of color for intensity measurements color=newArray("Green", "Blue", "Red", "Gray"); Dialog.create("Measurements"); Dialog.addChoice("Channel:", color); Dialog.show(); color = Dialog.getChoice(); if (color== "Red") setRGBWeights(1, 0, 0); else if (color== "Green") setRGBWeights(0, 1, 0); else if (color== "Blue") setRGBWeights(0, 0, 1); else setRGBWeights(1/3, 1/3, 1/3); ////////////////////////////////////////////////////////////////////////////////////////// // Setting default grid parameter values nc=12; nr=8; xo=168; yo=480; xf=3088; yf=2280; csize=40; ////////////////////////////////////////////////////////////////////////////////////////// // Refining grid parameter values do { run("Remove Overlay"); ////////////////////////////////////////////////////////////////////////////////////////// // Entering grid parameter values Dialog.create("Grid Parameters"); Dialog.addNumber("Number of Columns (max 12):", nc); Dialog.addNumber("Number of Rows (max 8):", nr); Dialog.addNumber("Center of well A1: X origin (in pixels, left equals zero):", xo); Dialog.addNumber("Center of well A1: Y origin (in pixels, up equals zero):", yo); Dialog.addNumber("Center of well H12: X end (in pixels):", xf); Dialog.addNumber("Center of well H12: Y end (in pixels):", yf); Dialog.addNumber("Circle Size (Diameter in pixels):", csize); Dialog.show(); ////////////////////////////////////////////////////////////////////////////////////////// // Checking grid parameter values nc=Dialog.getNumber(); if (nc > 12) exit ("The number of columns should be less than or equal to 12"); if (nc < 1) exit ("The number of columns should be at least 1"); nr=Dialog.getNumber(); if (nr > 8) exit ("The number of rows should be less than or equal to 8"); if (nr < 1) exit ("The number of rows should be at least 1"); xo=Dialog.getNumber(); if (xo < 0) exit ("The X origin cannot be negative"); yo=Dialog.getNumber(); if (yo < 0) exit ("The Y origin cannot be negative"); xf=Dialog.getNumber(); if (xf < xo) exit ("The X end cannot be lower than the X origin"); yf=Dialog.getNumber(); if (yf < yo) exit ("The Y end cannot be lower than the Y origin"); csize=Dialog.getNumber(); if (csize < 1) exit ("The Diameter should be at least one pixel"); csepx=(xf - xo)/11; csepy=(yf - yo)/7; ////////////////////////////////////////////////////////////////////////////////////////// // Building the grid for (i=0; i