var milled; var left; var scale; macro "Show Dialog... [b]" { //import image sequence //run("Image Sequence...", "number=999 starting=1 increment=1 scale=100 file=tif"); //Set scale and milling status automagically //This macro is for use with 50x images //At either 1024 or 2048 resolution //and 1.7448 or 0.8745 microns per pixel //the reason that the pixel sizes aren't exactly 2* is that the SEM was recalibrated between runs. res = getHeight(); if (res==1024) scale = 1.7448; else if (res==2048) scale = 0.8745; //failsafe value else scale = 1; if (res == 1024) milled = "p"; else if (res == 2048) milled = "m"; else milled = "u"; //need to have a line selection for line width to work makeLine(512,512,612,512); if (res==1024) run("Line Width...", "line=25"); else if (res==2048) run("Line Width...", "line=50"); else run("Line Width...", "line=1"); //Make a dialog box Dialog.create("Specimen Information"); Dialog.addCheckbox("Lateral to left (uncheck if to right)", true); Dialog.addNumber("Scale", scale, 4, 6, "µm / pixel"); Dialog.show(); left = Dialog.getCheckbox(); scale = Dialog.getNumber(); setVoxelSize(scale, scale, 1, "micron"); //set logical values if (left==true) left = 1; else left = 0; } macro "Calcified Cartilage [t]" { requires("1.34h"); var bmmd; var fraction; //get the pixel information from inside the ROI getRawStatistics(count, mean, min, max, std, histogram); row = nResults; //get the number of image fields in the stack from ImageJ fields = nSlices(); //use this line if dealing with a stacked series of images name=getMetadata(); //use this line if dealing with single images // name = getTitle(); // The following section gets useful information from the filename horse = substring(name, 0, 2); setResult("Horse ID", row, horse); leg = substring(name, 2, 3); setResult("Leg", row, leg); section = substring(name, 3, 4); setResult("Slice", row, section); ni = getSliceNumber(); //use these lines to manually control the threshold lower=1; upper=255; for (k=0; k