1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| macro"Plot Intensity" {
h=getHeight();
w=getWidth();
j=0;
run("Clear Results");
do {
makeLine(j,0,j,h, 1);
profile=getProfile();
n = nSlices;
for (slice=1; slice<=n; slice++) {
showProgress(slice, n);
setSlice(slice);
sliceLabel = toString(slice);
sliceData = split(getMetadata("Label"),"\n");
if (sliceData.length>0) {
line0 = sliceData[0];
if (lengthOf(sliceLabel) > 0)
sliceLabel = sliceLabel+ " ("+ line0 + ")";
}
for (i=0; i<profile.length; i++)
setResult(sliceLabel+j, i, profile[i]);
}
j=j+1;
}
while (j<=w);
updateResults;
print("Finni"); |
Partager