Fourier Analysis of Outlines

A quick guide by Rod Page.

This guide assumes that you have the programs tipsDig by F. J. Rohlf, and EFAWin by Mike Isaev (both at the SUNY Stony Brooks Morphometrics server). You will also need to simple utilities I wrote to convert files from TPS to EFAWin format, and to extract the fourier coefficients for analysis by Minitab. The programs are TPSTOEFA (executable and source) and TOMINI (executable and source). An additional program (TOWMF)(executable and source) extracts the outlines and produces Windows Metafiles for inclusion in reports.

Step 1: Getting outlines using tpsDig

Use the program TPSDIG to extract outlines from each image. To do this choose Outline mode by clicking on this button


Then click on the outline image (try to start at the same point on each image). To save the outline right click with the mouse and choose Save as XY coords from the popup menu.


Then choose Save data as from the File menu. Save file as a TPS file, and save all these files in the same directory.

Step 2: Converting outlines to EFAW format

You should now have a directory full of TPS files. Run the program TPS to convert these files into a single file called TPSTOEFA.DTA (make sure this program is in the same directory as your TPS files). This file is in the format required by EFAW. The program also creates the file TPSTOEFA.TXT, which lists the name of each file it processed. This can be used to indentify the data later on.

Step 3. Doing the fourier analysis

Run the EFAW program. Choose Open from the File menu, and choose the file TPSTOEFA.DTA. You should see the outlines loaded, together with fourier outlines. Click on the arrow boxes to change the number of coefficients computed. When you're happy with the fit, click on the Report button.


Enter the file name for your report. EFAW displays a dialog listing the options available. Make sure you click the options shown below.


Step 4. Analysing the results in Minitab

You now need to extract the results from EFAW into a file that Minitab can read. Run the program TOMINI (make sure this program is in the same directory as your output file). The program will ask you for the name of the EFAW report file (e.g., NEW.OUT). Type in the name and press enter. The program should read the file and create a new file called TOMINI.TXT. This is a text file where each row corresponds to an image analysed in Step 1. You can open this file in MiniTab by going to the File | Open worksheet command and choosing files of type Text (*.txt;/*.dat). Once Mintab has read the file you can analyse your data. You can identify the images by pasting the names of the images from the file TPSTOEFA.TXT into the MiniTab worksheet. To do this type the command
NTOA C1 C1
in Mintab's session window. This changes the first column from numeric to alphabetical data. Then paste the text from TPSTOEFA.TXT into this column.

Step 5. Getting pictures of the reproduced outlines

To get pictures of the reproduced outlines you need to repeat step 3 above, but check the Reproduce outline box. The resulting output file now contains coordinates describing the outlines. To convert these to pictures run the program TOWMF. The program will ask you for the name of the EFAW report file (e.g., NEW.OUT). Type in the name and press enter. The program should read the file and a Windows Metafile (*.wmf) file for each outline. This file can be imported into a graphics program or Word processor.

Hints for importing the wmf files

CorelDRAW! 3.0Use the File|Import command to read the WMF file, then Transform|Clear Transformations to restore original scaling (otherwise CorelDRAW! scales the WMF to fit a square).

(End)