Humboldt-Universität zu Berlin - Faculty of Mathematics and Natural Sciences - Strukturforschung / Elektronenmikroskopie

computeGx.txt

number width,height
number scaleX,scaleY
string unitString

Image img := getfrontimage()
img.getSize(width,height)
img.getScale(scaleX,scaleY)
img.getUnitString(unitString)

Image Gx = CreateFloatImage("Gx",width,height)
Gx = -1*offset(img,1,1) +1*offset(img,-1,1) \
-2*offset(img,1,0) +2*offset(img,-1,0) \
-1*offset(img,1,-1)+1*offset(img,-1,-1)

Gx.setScale(scaleX,scaleY)
Gx.setUnitString(unitString)

showimage(Gx)