Shifting image for grain boundary analysis

Dear all,

I would like to extract the vertical and horizontal components of my grain boundaries (see image attached). In the textbook of Heilbronner and Barrett this is described by AND-adding a copy of the grain boundary map onto itself and shifting the copy 2 pixels. But i don´t know how to shift the copy to get only the vertical or horizontal grain boundary components left. Can anybody help?

D2-2-gb.tif (1.4 MB)

Hi @mkemperl,

You can perform the shift by copying, pasting, and moving two pixels (down or righ) with the arrow keys, then deselecting.

Alternatively, use the comand Translate... (but beware of the black borders).

Here’s a short script performing the operations that you describe:

run("Duplicate...", "title=[horizontal-"+title+"]");
run("Translate...", "x=2 y=0 interpolation=None");
imageCalculator("AND", "horizontal-"+title, title);

run("Duplicate...", "title=[vertical-"+title+"]");
run("Translate...", "x=0 y=2 interpolation=None");
imageCalculator("AND", "vertical-"+title, title);