fft_li.py

This scripts loads one or more images and shows their Fourier Transforms on the screen. A viewer is opened for each loaded image. The Fourier Transform honors the origin of the reference system, which is assumed to be at the center of the image.

Usage:

 giplt view_ft.py <image1> [<image2> <image3> .... ] 



import sys
import ost.img.alg
if len(sys.argv)<2:
  images=io.LoadImageList(['square.png','circle.png'])  
else:
  images=io.LoadImageList(sys.argv[1:])
viewers=[]
i=1
main_area=gui.GostyApp.Instance().perspective.main_area
for im in images:
   im.CenterSpatialOrigin()
   im.ApplyIP(img.alg.DFT()) 
   v=gui.CreateDataViewer(im)
   viewers.append(v)
   main_area.AddWidget('Image' + str(i), v)
   i+=1

Generated on Fri Jul 2 14:22:57 2010 for OpenStructure by  doxygen 1.5.8