//22.08.14 1:27 macro "Re-calculate Areas_2"{ ojInitColumn("Area"); ojHideResults(); setBatchMode(true); for (img = 1; img <= ojNImages(); img++){ ojShowImage(img); setSlice(nSlices);//work-around setSlice(1);//work-around slc = 0; pxSize = ojGetVoxelSize(img, "x"); for (obj = ojFirstObject(img); obj <= ojLastObject(img); obj++){ ojShowObject(obj); showProgress(-obj/ojNObjects()); thisSlc = getSliceNumber; if (thisSlc != slc){ thr = ojResult("Thr", obj); setThreshold(0, thr); slc = thisSlc; showStatus(getTitle + " slc= " + slc); } x = ojResult("startX", obj); y = ojResult("startY", obj); doWand(x, y); getRawStatistics(area); area = area * pxSize * pxSize; ojSetResult("Area", obj, area); } close; } ojShowResults(); showMessage("" + ojNObjects() + " Areas were recalculated"); }