																			PROGRAM MacFAC.c														Version 1.1: Thursday january 20 1994MacII (with co-processor) version of program FAC for processing images without headers. The source code is written in THINK C 5.0	This program is FREEWARE for the Academic Research Community.It MUST NOT BE USED (or COPIED or SOLD) by ANYONE having COMMERCIAL PURPOSES.The authors disclaim their responsability for any kind of trouble directly or indirectly induced by the use of this program.	Authors: Noel BONNET and Pierre TREBBIA, Universite de Reims, Faculte des Sciences										B.P. 347, F51062 Reims cedex FRANCE	Fax: (33) 26 05 32 50										E-Mail: pierre.trebbia@univ-reims.fr	Questions and enquiries must be sent to Pierre TREBBIA (see address & e-mail above).Version 1.1 is focused on math calculations. The user interface is very far from perfection. Therefore, those who accept to modify the overall presentation of this program in order to get full benefits of a more friendly interface (scrolling menus, radio buttons, scrolling console, windows for looking at images,...) are VERY WELCOMED: They are encouraged to go that way and to send to Pierre TREBBIA a copy of both the modified source code and the compiled application.==========================================================================The purpose of FAC is to extract orthogonal sources of information from data (images, spectra,...). See any basic statistic book for more information about multivariate statistics.MacFAC is given with a test data set in order to let you be sure that it works properly on your own computer.A file ?.RES is created as output for keeping a trace of the calculations. Open it with any text editor (TeachText for example).The file ?.XCL, created by MacFAC, is a Microsoft Excel (Registred Trade Mark) compatible file. Open it with Excel (or any other similar program) for editing a plot of the locations of the processed images in the factorial space.A file ?.LST is created as output for keeping a trace of all the files created by the program. This is also a text file.The ? in the name of these 3 files is defined by the user through a dialog. The structure of the file names is PC compatible (8 chars for name, 3 chars for extension).The text file "Dialog" is a typical console dialog. Follow exactly this dialog for testing MacFAC and verify that you get the same results as those given in the text file test.RES.list.LST is a text file, used as input in the program, giving the name (not the path, so put the program and ALL the data in the SAME folder) of the 6 test images to be processed. They are very simple 128x128 16 bits images (range : from -32767 up to +32767).  It is highly recommended to use your own favorite program for having a look on these test images (use, for example, "Image" from NIH, available at EMMPDL).3 independent images were first created. These 3 basic images have been treated in such a way that a Poisson noise has been added to them. The resulting images are i1, i2 and i3. Then the 3 basic images have been processed once again, in an independent way, leading to 3 more noisy (Poisson) images i4, i5 and i6. If you compare i1 and i4, you'll find that they are similar except for noise which is NOT uniform (Poisson statistics).The goal of MacFAC is to reveal that images 1 and 4, 2 and 5, 3 and 6 respectively belong to the same family, and that several orthogonal information sources are included in these images (1: appearance/disappearance of 2 small squared areas, 2: there is NO image with both the 2 small squares, 3: there is noise). These information sources are separated onto different axes (1, 2, 3 and others), whereas axis 0 is merely the gravity center of the 6 images (the common part of the images).Build a graph with data included in test.XCL (take the 2 first columns which are related to the two main factorial axes): you'll see that the 6 images are paired and belong to 3 different classes.Filtering the original images by keeping only axes 1 and 2 (and axis 0 for enabling a visual comparison with the original images or without axis 0 to locate in the images where information is lying) allows one to keep only the "useful" information (squared areas) and to get rid of "useless" information (noise). Compare images test_00n.RCM with image n.==========================================================================The first 3 lines of source code define the most important parameters of the whole calculations:NBIMA is the maximum number of images to be processed.NBAXE is the maximum number of factorial axes. It MUST be equal to NBIMA.NBPTS is the size of a buffer used for reading data. The higher NBPTS, the faster the program is running. But memory cannot be infinitely extended...Therefore, adjust these parameters NBIMA = NBAXE and NBPTS to your specific requirements.	(examples: 20,20,32 or 15,15,64 or 10,10,128 or 6,6,256  etc...)If you download the source code on a workstation with sufficient memory (32 Mb), you may compile the program with these parameters set to 255,255,256.
