Information for installing:

Cornean: Cornea Topography Analysis System, ver. 1.1
(c) J. S. Marron and N. Locantore, 1998
Department of Statistics, University of North Carolina

This is intended for MATLAB 5, Windows 95 (or NT)

1.  Copy the Cornean Folder (and subfolders) from this disk
  into the Matlab folder.  (see 

2.  Copy the file startup.m into the \matlab\toolbox\local
  folder.  It may be good to first take the existing file
  "startup.m", and rename it something like "startup.old".

3.  Start matlab (Cornean should automatically start).

4.  This installation should automatically copy some test 
  data sets (especially in the ".mat" Matlab form of Zernike
  feature vectors).  In particular all of the default
  examples should be there, e.g.:

  a.  Feature vectors are present for each member of the 
    list file "prkpreop.lst" (allowing easy demo of the
    population analyses).

  b.  Feature vectors are present for easy demo of the
    "morphing memo" in the Difference Analysis Menu.

5.  To work with a single new image:

  a.  Copy the .xla, .zla, .tla (or the .xlb, .zlb,.tlb) 
    files either to the directory:
              \matlab\cornean\indata
    or to some subdirectory (which is then set in the
    Change Parameter Menu).

  b.  Type the file prefix into the window in the individual
    analysis menu.

6.  To work with a collection of new images:

  a.  Copy the data files as in 5a above.

  b.  With a file editor, create a "list file" (a file where
    each line is the file prefix for one image).  Note: this
    MUST have the suffix ".lst".  If no subdirectories for
    the indata and zfm files are being used, this must be
    in the directory:
                 \matlab\cornean\zfm
    When a subdirectory is being used (as set in the Change
    parameter menu), then the .lst file must be in the
    corresponding subdirectory of
                 \matlab\cornean\zfm

7.  To work with several data sets, that need to be kept
  separate, create subdirectories, WITH THE SAME NAME, of
  both the 
                 \matlab\cornean\indata
  and the 
                 \matlab\cornean\zfm
  directories.  Then from the main menu, go to the parameter
  change menu, and type the name of the desired subdirectory
  (be sure to add a "\" or "/" at the end) in the "Subdir."
  field.  If a single subdirectory is used most often, this 
  can be set as a default be editing the file CORNEAN.M.


Anticipated Possible Problems and Solutions:

I.  Problem:  things might take longer than you want to 
  wait in a demo.  Solution:  Use ctrl-C to kill anything
  that is currently running.  Here are some possible 
  guidelines about times (although this varies A LOT
  depending on hardware, and also Matlab version):

  a.  Decomposition of plot of single image:   a few seconds
  b.  Difference movie:  5-10 minutes.
  c.  A PCA type analysis:  5-10 minutes
  d.  Listwise decomposition:   quite a few minutes
  e.  Plot of images in a list:   quite a few minutes
  f.  PCA Movie:  40-90 minutes.



II.  Error messages about file reads:

  a.  Most common problem is a file is not in the expected
    directory.  This can be quickly checked by using the 
    "dir" buttons.  Info about where Cornean is looking for
    files is available using the "help" buttons.


III.  The Matlab window shows an "OUT OF MEMORY" message.
  Problem: this machine doesn't have enough memory.  Quick
  and dirty solutions: reset the value of NMAX, by issuing 
  the MATLAB command(at the prompt line >>):
           >> NMAX = 6     
  (maybe 8 could work too).


IV.  Error messages of the form:    ???  Undefined function of variable '...'
  This means matlab can't find something it is looking for.
  Possible causes include:
  a.  The CORNEAN directory structure is not correct.  Subdirectories
    of the /matlab/cornean should include:
          indata        (this is where Keratron data files are stored)
          outputs       (this is where results come out, such as .ps files)
          zfm           (this is where Cornean stores feature matrices)
  b.  The file cocolor1.dat is not in the subdirectory indata


V.  There are a number of other problems that might occur.
  Most of these can be fixed by editing the file CORNEAN.M.
  The first place to look when there are problems, is at the
  setting of the variable:
                   ienviron
  A large number of other variables are set in blocks, 
  depending on the value of this.



