You are on page 1of 1

//ImageJ macro for reading a stream file from FEI Nova Nanolab 200 system

//Kevin Lim
//Oct 2014
stream = File.openAsString("");
lines = split(stream, "\n");
//check stream file for consistency
points = lines.length - 3;
count = parseInt(lines[2]);
if (points != count) {
exit("Error: number of points in stream file ("+points+") is not consist
ent with the expected count ("+count+") -- some points may be missing");
}
//maximum dose
Dmax = getNumber("What was the maximum dose (dwell time) used?", 10);
autoUpdate("false");
newImage("Untitled", "8-bit black", 4096, 4096, 1);
//read stream file into an image
for (n=0;n<count;n++) {
words = split(lines[3+n], "\t");
p = parseInt(words[0])/Dmax * 255;
x = parseInt(words[1]);
y = parseInt(words[2]);
putPixel(x, y, p);
}
autoUpdate("true");
updateDisplay();
waitForUser("Displayed stream file as an image");

You might also like