//* Michael Cammer cammer@aecom.yu.edu //* 16 Aug 2004 //* //* A very simple way to create masks and to see most of the raw data at the same time //* is to trace directly on the raw data. But to do this, you must guarrantee that none of //* the pixels in the images will be the same as in the mask. //* This macro compresses the three brightest pixel values of 8 bit grayscale images //* into one pixel value, the third possible brightest. The darkest three values are compressed //* into the third darkest value. //* Why do this at both ends? To avoid problems of MacIntosh vs. PC byte orders. //* After running this macro, you may now trace using the fill, cut or clear commands. //* Just make sure that the tracings are pure black or pure white. //* In numbers, make sure that the tracings equal zero or 255. //* //* Step 1: Optional: //* Adjust the brightness contrast the way you like it. Use the Apply button //* in the brightness/contrast window. //* Step 2: Run this macro. macro "Prepare for tracing in white or black [q]" { n = nSlices(); run("8-bit"); for (a=1; a<=n; a++){ run("Set Slice...", "slice="+a); changeValues(253,255,253); changeValues(0,2,2); } // for a run("Colors...", "foreground=white background=white selection=cyan"); exit('Save the timelapse with a new file name and have fun tracing!'); } // end Prepare for tracing in white or black