// Macros for integrated intensity changing over time // Michael Cammer, May 2014; Sept 2015 /* The background is measured by a ring outside the region of interest. Only pixels greater than this intensity are measured. When the background is measured, there is an option to include standard deviations of the measurement. In an earlier version, this was set at 2. In this version, it is set at zero. If you want to modify this, change "var stdevfactor = 0;" */ var plot1Name = "actin"; // e.g. Alexa 488 var plot2Name = "other"; // e.g. Alexa 647 // The following correspond to the channel number in the hyperstack var plot1 = 2; // channel 2 var plot2 = 3 // channel 3 var maxPlotLength = 120; // a number bigger than the largest possible cell size var singleProfile = newArray(maxPlotLength); var plot1output = newArray(maxPlotLength); var plot2output = newArray(maxPlotLength); var tab = "\t"; var meanCell = -1; // returned by function caclulateIntegratedDensity(counts, min) var area = -1; // number of pixels considered cell by function caclulateIntegratedDensity(counts, min) var stdevfactor = 0; // how many standard deviations to add to bg measurement //============================================================ // This macro requires a multichannel multi time series in a hyperstack. // To work properly, there need to be channels > 1, slices = 1, and frames > 1. // Frames is the time dimension. To use on Z instead, the user would have to swap frames for slices. //============================================================ macro "multichannel Integrated intensity through time" { Stack.getDimensions(width, height, channels, slices, frames); // next two lines may be changed for different #s of channels and different proteins to be measured channelstomeasure = newArray(plot1, plot2); // channels to measure channelsnames = newArray (plot1Name, plot2Name); // names of channels to measure -- can be changed as constant run("Set Measurements...", " mean standard redirect=None decimal=3"); output = newArray(frames+1); // top row is roi # for (t=1; t<=output.length; t++) output[t-1] = ""; for(roi=0; roi min) area = area + counts[i]; } // for i meanCell = intden / area; // this was added later so it is a global variable instead of a return return intden; }