$DEB 995 000 000 000 000
IMAGE FILES

Sphinx  processes  various  image  formats  using the DIRECT
ACCESS  READ and FREE  FORMAT  READ  functions.  The  dialog
boxes  associated  with these  functions are used to specify
the image  format, such as header  size,  record  length and
pixel  value  coding  (e.g.,  bit ,  integer  or real).

The SIMPLE FILE READ function reads basic image formats 
composed of a line and column array with byte encoded pixels.
Sphinx reads and writes both TIFF and GIF formats.
Sphinx can read and write  compressed  image  formats (*.Z)
When they are read, the files are automatically  decompressed
before being displayed. When they are saved, they are 
compressed as they are written to a file.

$END ---------------------------------------------------------------------
$DEB 990 000 000 000 000Architecture
CAUTIONARY NOTE

Sphinx  3.02 is a  pre-release  beta  version  designed  for
on-site   usage  and   evaluation.  Despite  its   extensive
testing,  this version may contain  errors that have not yet
been  detected.  If you  discover  any  errors  or have  any
suggestions/problems  with the program, we would  appreciate
your bringing them to the attention of:

  POLDER/SPHINX project Office at:  sphinx@loa.citilille.fr

 The Sphinx Image Processing & Analysis System Sphinx is the
   result of years of research and  development in satellite
   image    processing   at   the   Laboratoire    d'Optique
   Atmospherique (LOA) of the Universite de Lille, France.

   This satellite image processing  package was designed and
   developed  in  response  to the daily  research  needs of
   scientists     conducting    applied    global    climate
   investigations  using  satellite data and remote  sensing
   techniques.    LOA    scientists    apply     space-based
   observations and numerical  modeling  techniques to study
   the earth' s radiation budget and atmospheric  processes.
   They  are   specialists   in   observing   and   modeling
   interactions  of solar and  telluric  radiation  with the
   earth system under clear and cloudy conditions.

   Constructing atmospheric models has required a synergy of
   knowledge from several  disciplines,  namely climatology,
   meteorology, and remote sensing.  To test  climatological
   models, LOA scientists employ space-based  observations a
   nd  ground-truth  data.  The steady,  global  coverage of
   satellite  observations  constitutes  an  ideal  tool for
   verifying climatological models as well as for conducting
   process studies and investigating new phenomena.

Owing to the reliance on satellite  observations,  extensive
research and development at LOA has been devoted to building
Sphinx, a state-of-the-art image processing system that runs
across a spectrum  of high  performance  computer  platforms
operating  under  UNIX  and  the X  Window  System.  Today,
Sphinx serves as LOA' s day-to-day  image  processing  tool.
It has benefited  from critical  feedback  from users in the
scientific community.

The Sphinx  image  processing  system  provides:  simple and
friendly usage, fast interactive  performance,  capabilities
to combine images, vector  graphics, and text for generating
quality  reports, rapid display of  high-resolution  (1024 x
1024)  multispectral  images, interactive  generation of new
algorithms   for   converting    satellite   signals.   Easy
interfacing with externally generated software.

For  flexibility,  the menu driven  Sphinx  package is built
using a number of  reentrant  modules.  Hence,  the user can
return at  anytime  to the main menu to begin a new  process
using the results of ongoing calculations.

  The software package includes:  An interactive interpreter
 for both  algebraic  equations and images.  This allows the
 user to  manipulate  and combine  individual  data channels
 interactively.  Standard   FORTRAN  notation  is  used  for
 formula  entry and for  trigonometric and  transcendental
 functions.  An on-line 2 and 3 dimensional graphics editor.
 This provides  complete  flexibility  for modifying  vector
 graphics  and  integrating   vector  graphics  and  images.
 Multiple  output  possibilities  (e.g.,  color, gray scale,
 black  and  white)  for both  inkjet  and  laser  printers.

 Satellite  signal  simulation  in the  solar  spectrum.  An
 English/French on-line help manual.  Sphinx was selected by
 the French space agency, Centre National d'Etudes Spatiales
 (CNES),  for   analyzing  the  results  from  the  POLDER
 satellite  program.  The  Sphinx  package  is now in use at
 many  laboratories in France,  including:
 - Centre  National d'Etudes Spatiales
 - Centre des Faibles Radioactivites
 - Centre de Recherche en Physique de  l'Environnement
 - Ecole Normale Superieure
 - Institut  National de la Recherche  Agronomique
 - Laboratoire  d'Etudes  et de  Recherches en Teledetection
 Spatiale
 - Laboratoire de Glaciologie et de  Geophysique  de
 l'Environnement
 - Laboratoire  de  Meteorologie Dynamique
 - Laboratoire  d'Oceanologie  Dynamique et de  Climatologie
 - Laboratoire  de Physique  et Chimie  Marinei
 - NASA (Goddard Space Flight Center)

SPHINX ENVIRONMENT

IMAGE FILES

Sphinx  processes  various  image  formats  using the DIRECT
ACCESS  READ and FREE  FORMAT  READ  functions.
The  dialog boxes  associated  with these  functions are
used to specify the image  format, such as header  size,
record  length and pixel  value  coding  (e.g.,  bit ,
integer  or real).

The SIMPLE FILE READ function reads basic image formats 
composed of a line and column array with byte encoded pixels.
Sphinx reads and writes both TIFF and GIF formats.
Sphinx can read and write  compressed  image  formats (*.Z)
When they are read, the files are automatically  decompressed
before being displayed. When they are saved, they are 
compressed as they are written to a file.

IMAGE PLANES SPHINX DISPLAYS

8 bit  1024 x 1024  images.  However,  it can  also  process
larger  images,  displaying  them  either  partially  or  as
complete images reduced through sampling to 1024 x 1024.

Sphinx  operates  using two image  plane  groups.  The first
group of visible  planes is displayed  on the screen,  while
the  second  group of hidden  planes is stored to disk.  The
EDIT menu allows you to exchange the contents of the visible
and hidden planes.


  Each group is composed  of three 8 bit 1024 x 1024  planes
denoted as R, G, and B (Red, Green, Blue).  The DISPLAY
menu allows you to display one of the three  planes or 
to display a composite  image of all three planes ( 'true
color'  mode).  Each plane is divided into 4 quadrants
represented as A, B, C and D (from  top to  bottom  and
left to  right)  for the visible  planes and E, F, G and H for
the hidden  planes.  The various Sphinx  functions can work on
an entire plane or on the quadrants selected by the user.

COLOR

Sphinx  operates in two color  modes.  In the PLANE  mode, a
single  (R, G or B) plane is  displayed  on the  screen.  In
true color mode, Sphinx  displays the composite image of the
three planes.  Sphinx  approximates  the true color by using
3/3/ 2 bit coding.  In true color mode, however, the results
are output in 24-bit true color.  The user can obtain a good
idea of the true color  output by using the  special 24 to 8
bit  transform  function  under the Print  Menu.  Each plane
possesses  its own color  map.  The color  maps are read and
written  to files  which  may be  modified  using  the COLOR
functions.

THE SPHINX SCREEN

The IMAGE  window  takes up the largest  part of the screen,
displaying a 1024 x 1024 plane that is divided into the four
A, B, C and D quadrants.  The COLOR MAP window is located 
to the right of the IMAGE  window and shows the color  scale
in use.  Two  commands in the DISPLAY  menu, SHOW COLOR 
MAP and HIDE COLOR MAP,  displays and hides this window.
The VALUES window, a long thin strip located  beneath 
the IMAGE window, displays the pixel values in an image.
The small COORDINATE window,  located in the lower right of
the screen,  displays the pixel  coordinates  beneath the
mouse location.  The RGB window, located in the lower right
of the screen,  registers the plane  being  displayed  as
R, G or B, or R/G/B  when in true color mode.  
The small INFORMATION window, also located in the lower
right of the  screen,  displays  the  operation mode as it
awaits a  command,  such as  selecting  an image area.
You can hide the windows of the Sphinx environment by using
the  ICONIFY  Sphinx  function.  This  redisplays  the
original screen prior to launching Sphinx.  To return to the
Sphinx environment, simply click on the small icon.

USING THE MOUSE

The right mouse  button is used to display  the pop-up  main
menu and to select  image  areas.  The left mouse  button is
used  within the menus and dialog  boxes.  The middle  mouse
button, when it is present, is not utilized by Sphinx.

SPHINX MAIN MENU

The Sphinx main menu is not displayed  continuously  so that
the  IMAGE  window  is not  obstructed.  To make it  appear,
press on the right mouse  button  without  letting  go.  The
Sphinx  menu  contains   listings  that  either  access  the
submenus (indicated by arrows) or activate the corresponding
functions.

To access a  submenu,  place the mouse on the right  part of
the  desired  listing  (over  the  arrow).  This  makes  the
corresponding  submenu  appear  from which you can  select a
function.  When you  have  selected  the  desired  function,
release the mouse button.

  The main menu can be  called up from the  function  dialog
boxes by clicking  with the right  button on the Sphinx MENU
window  located  on the  lower  right  of the  screen.  This
allows you to execute another function, and after this funct
ion is  executed,  Sphinx  returns to the initial  box.  For
instance, if you are in a dialog box and you want to measure
a pixel  value,  you click on the  Sphinx  MENU  window  and
select the PIXEL VALUES function.  This mechanism allows
you to queue up to nine function requests.


THE FUNCTION DIALOG BOXES

 Most Sphinx functions begin by displaying a dialog box that
allows you to specify various  parameters  (e.g., file names
and sizes, image planes, quadrants, etc.).  If you need help
using a function  dialog,  click the left  button on the "?"
icon  located  to the  right of the title  bar.  To move the
dialog  box, place the mouse arrow on the title bar and hold
down  the left  mouse  button.  Then  move the  mouse to the
desired screen position.

You can also move the dialog box by clicking  the left mouse
button on the "X" icon located to the left of the title bar.
This will  automatically  move the  dialog  box to the right
side of the screen.  Clicking again on this icon will return
the dialog box to its initial  position.  All dialog  boxes
include an EXIT  button.  To exit a function,  click on this
button using the left mouse button.

Certain  dialogs include an EXECUTE or RUN button.  In these
boxes you can input various  options  before  executing  the
function by clicking  the button.  As mentioned  above, from
all the  dialog  boxes  you can  call up the  main  menu  by
clicking on the Sphinx MEN U window with the right button.

ON-LINE HELP

 You can access the  on-line  help by using  either the HELP
submenu or the "?"  icon in each dialog box.  From the HELP
submenu,  you can select the  desired  topic.  Using the "?"
icon in each dialog box, you directly access the description
of that  function.  The help boxes  contain a NEXT button to
advance  to the  subsequent  instruction  page,  a  PREVIOUS
button to return to the previous page, and an EXIT button to
quit the on-line help.

You must click these  buttons  using the left mouse  button.
NOTE:  when a help dialog box is displayed, the other dialog
boxes as well as the Sphinx  main menu are not  active.  You
must leave the on-line  help (by clicking the EXIT button in
the box) in order to redisplay the other Sphinx functions.

MAIN FUNCTIONS
--------------
 From the  main  menu  you can  directly  access  the  PIXEL
 VALUES,  ZOOM, REFRESH and ICONIFY  Sphinx  functions.

 The other  functions are accessed  through the submenus. 

 PIXEL VALUES  determines  the  value  of a pixel. 

 ZOOM  enlarges specific  image areas on the screen. 

 REFRESH redraws the screen and  clears the  overlay  plane.
 
 The FILE  submenu reads and  writes  image and color  table
 files as well as contour and annotation files.
 It also allows you to save a work  session  that can be
 continued at a later time.
 
 The DISPLAY submenu  controls the choice of the plane
 displayed (R, G, B or a combination of the three planes in
 true color mode).  It also  controls  the  display  of the
 COLOR  MAP window.
 
 The COLOR submenu accesses the color  manipulation
 functions.
 
 The  EDIT  submenu  accesses  the  basic  image
 manipulation  functions and the annotation  functions.
 
 The PROCESS  submenu  contains the mathematical processing
 functions,  the  external   functions,  and  the  animation
 functions.
 
 The PLOT submenu  accesses  functions to graph,
 contour, and grid.
 
 The PRINT submenu accesses the printing functions to print
 on PostScript or LaserJet printers.
 
 The SIGNAL MODELS submenu accesses the  satellite   signal
 simulation  functions.
 
 The  GEOMETRY  MODELS  accesses the geometric  manipulation
 functions,   such  as   warping, satellite  geometry and 
 orbit simulation.
 
 The HELP submenu accesses the on-line help by topic.

FILE MENU
---------
The FILE submenu reads and writes files  containing  images,
color maps,  annotations,  and contours.  It also allows you
to save a work session that can be continued later.

The SIMPLE FILE READ  function  reads  basic  image  formats
(i.e.  a line and  column  array of any size  and with  byte
encoded  pixels).

The DIRECT ACCESS READ  function  samples rows and columns
and can  therefore  read images larger than 1024 x 1024.

The FREE FORMAT READ  function  can read image
pixel values that are either  integer  (from 1 to 32 bit) or
real.  Since this menu calls up the DIRECT ACCESS READ menu,
it can also  sample  images.

To  select  the file  name for reading or writing, use the
DIRECTORY  CONTENTS  menu.
This menu lists the files and directories contained  in the
current  directory.  NOTE:  only 299 files in the  directory
are  displayed.  To  change  directories,  click on the name
with the left mouse  button.  One click on the "../"  symbol
at the top of the  entry  list  allows  you to  climb to the
directory above.  To select a file in the current directory,
click  on  its  name.  You  can  also  directly   enter  the
directory  and file names by typing  them into the Path Name
and File  Name  boxes.  In the Path  Name box  type  "./" or
$HOME, which returns you to the root or home directory.

DISPLAY MENU

The DISPLAY  submenu  controls  which image planes are
displayed (R, G, B or a combination  of the three
in true color  mode.  It also  controls  the  display of the
COLOR MAP window (i.e.,  functions SHOW COLOR SCALE and HIDE
COLOR SCALE).

The FLIP FLOP BANKS function  displays two of
the three planes alternatively.  This enables you to compare
images  contained  in the three  planes.

COLOR MENU
----------
The COLOR submenu accesses the color manipulation functions.
SAVE COLOR SCALE  attaches the color map to the image plane.

As long as this  function  is not called up,  changes in the
color map remain  temporary, and upon leaving the COLOR menu
the  previous  color map is  restored.

TRUE  COLOR  changes Sphinx into the true color mode 
(this has the same effect as the TRUE COLOR function in 
the DISPLAY menu).

STRETCH THE 8 BIT COLOR  SCALE  modifies  the color  map 
(e.g.,  contrast control, min./max. scaling, brightness,etc.)

FILL LEVELS WITH COLOR creates false color images by
modifying the color map by pixel value  intervals.

AUTO  INTENSITY  BALANCE and RGB MANUAL  
INTENSITY  BALANCE controls the pixel values of
the  planes  in true  color  mode  either  automatically
or manually.

BUILD  COLOR  SCALE   creates  a  color  map  and
displays  the  histogram  of the image  plane.


EDIT MENU
---------
 The EDIT submenu  contains  the  following  fundamental
image  manipulation  and  text  annotation  functions.

MOVE EXCHANGE ROTATE: various functions that move, exchange,
and rotate  image  areas.

IMAGE  RESIZE:  enlarges  or  reduces images.

DRAW  IMAGE  ANNOTATION:  inserts  text and  simple
graphics  (e.g., lines, boxes,  symbols) in the image.

DRAW COLOR LEGEND:  creates a color legend.

GRID DRAWING:  draws grid lines.

PAGE  SETTING:  constructs  a mosaic of smaller
images of any size  stored  on disk.

PIXEL  MASKING:  masks selected  areas of the image.

AREA FILLING:  fills an image area with a  selected  pixel
value  color.

MERGE  TEXT AND IMAGE:  merges  together  the image plane
with the  overlaid text or graphics.

 PROCESS MENU
 ------------
 The PROCESS  submenu accesses the mathematical processing
 functions, the external functions,  and  the  animation 
 functions.
 
 IMAGE  ALGEBRA: performs  basic  algebraic   functions
 on  an  image.
 
 AREA STANDARD DEVIATION:  calculates the standard deviation
 of an image    area.
 
 CONVOLUTION    PRODUCT:   calculates    the
convolution product and filtering of an image area.

FOURIER TRANSFORM:  computes Fourier transform filtering 
of an image area. 

STRUCTURE   FUNCTION:   calculates   the   structure
function of an image area.

CLUSTER  ANALYSIS:  analyzes the cellular  structure of an
image or selected area.

PRINCIPAL COMPONENTS  ANALYSIS:  analyzes the principal 
components of an image. 

PIXEL  CLASSIFICATION:  classifies  pixels  using
cluster  dynamics.

EXTERNAL  PROCESSES:  performs  external user-developed
programs.

MOSAIC   ANIMATION:   animates images.

PLOT MENU
---------
The PLOT  submenu  accesses  the following  functions
to graph,  contour,  and grid  images.

REDRAW SAVED GRAPH:  redraws the previously  saved graphics.

CLEAR SAVED GRAPH:  erases the  previously  saved  graphics.

HISTOGRAM:   plots   histograms.   

RADIAL:  plots   radials.

CONTOURING:  plots contours.  

BIDIMENTIONAL PLOT:  plots two dimensional  scatter
plots using two image planes.

3 COLOR GRAPHIC:  constructs  a  scatter  plot  around 
three  axes representing the red, green and blue
coordinates of a pixel.

CHANGE  SAVED GRAPH  NAME:  changes the file name
of a saved graphics.

IMPORT  GRAPH  FROM  FILE:  imports  an  existing
graphics file (x, y ....).

PRINT MENU
----------
The PRINT submenu contains the print commands for
PostScript or  LaserJet  printers.  The  images  and
graphics  can be printed in either color or levels of gray.
Sphinx can send print jobs to the print  spooler or store
the print  images in a file.
 


SIGNAL  MODELS  MENU
--------------------
The SIGNAL  MODELS submenu accesses the satellite signal
processing functions.

GEOMETRY  MODELS MENU
---------------------
The GEOMETRY  MODELS  submenu accesses the geometric
image  manipulation  functions  for warping,   computing
satellite  geometry  and  simulating satellite  orbits.

TESTS  MENU
-----------
The TEST  submenu accesses the various test functions 
(image overlay, etc.).

$END ---------------------------------------------------------------------
$DEB 991 000 000 000 000
USING THE MOUSE

The right mouse  button is used to display  the pop-up  main
menu and to select  image  areas.  The left mouse  button is
used  within the menus and dialog  boxes.  The middle  mouse
button, when it is present, is not utilized by Sphinx.

$END ---------------------------------------------------------------------
$DEB 992 000 000 000 000
SPHINX MAIN MENU

The Sphinx main menu is not displayed  continuously  so that
the  IMAGE  window  is not  obstructed.  To make it  appear,
press on the right mouse  button  without  letting  go.  The
Sphinx  menu  contains   listings  that  either  access  the
submenus (indicated by arrows) or activate the corresponding
functions.

To access a  submenu,  place the mouse on the right  part of
the  desired  listing  (over  the  arrow).  This  makes  the
corresponding  submenu  appear  from which you can  select a
function.  When you  have  selected  the  desired  function,
release the mouse button.

  The main menu can be  called up from the  function  dialog
boxes by clicking  with the right  button on the Sphinx MENU
window  located  on the  lower  right  of the  screen.  This
allows you to execute another function, and after this funct
ion is  executed,  Sphinx  returns to the initial  box.  For
instance, if you are in a dialog box and you want to measure
a pixel  value,  you click on the  Sphinx  MENU  window  and
select the PIXEL VALUES function.  This mechanism allows
you to queue up to nine function requests.


$END ---------------------------------------------------------------------
$DEB 993 000 000 000
THE FUNCTION DIALOG BOXES

 Most Sphinx functions begin by displaying a dialog box that
allows you to specify various  parameters  (e.g., file names
and sizes, image planes, quadrants, etc.).  If you need help
using a function  dialog,  click the left  button on the "?"
icon  located  to the  right of the title  bar.  To move the
dialog  box, place the mouse arrow on the title bar and hold
down  the left  mouse  button.  Then  move the  mouse to the
desired screen position.

You can also move the dialog box by clicking  the left mouse
button on the "X" icon located to the left of the title bar.
This will  automatically  move the  dialog  box to the right
side of the screen.  Clicking again on this icon will return
the dialog box to its initial  position.  All dialog  boxes
include an EXIT  button.  To exit a function,  click on this
button using the left mouse button.

Certain  dialogs include an EXECUTE or RUN button.  In these
boxes you can input various  options  before  executing  the
function by clicking  the button.  As mentioned  above, from
all the  dialog  boxes  you can  call up the  main  menu  by
clicking on the Sphinx MEN U window with the right button.

ON-LINE HELP
 You can access the  on-line  help by using  either the HELP
submenu or the "?"  icon in each dialog box.  From the HELP
submenu,  you can select the  desired  topic.  Using the "?"
icon in each dialog box, you directly access the description
of that  function.  The help boxes  contain a NEXT button to
advance  to the  subsequent  instruction  page,  a
PREVIOUS button to return to the previous page, and an
EXIT button to quit the on-line help.

You must click these  buttons  using the left mouse  button.
NOTE:  when a help dialog box is displayed, the other dialog
boxes as well as the Sphinx  main menu are not  active.  You
must leave the on-line  help (by clicking the EXIT button in
the box) in order to redisplay the other Sphinx functions.
$END ---------------------------------------------------------------------
$DEB 994 000 000 000
MAIN FUNCTIONS

 From the  main  menu  you can  directly  access  the  PIXEL
 VALUES,  ZOOM, REFRESH and ICONIFY  Sphinx  functions.

 The other  functions are accessed  through the submenus. 

 PIXEL VALUES  determines  the  value  of a pixel. 

 ZOOM  enlarges specific  image areas on the screen. 

 REFRESH redraws the screen and  clears the  overlay  plane.
 
 The FILE  submenu reads and  writes  image and color  table
 files as well as contour and annotation files.
 It also allows you to save a work  session  that can be
 continued at a later time.
 
 The DISPLAY submenu  controls the choice of the plane
 displayed (R, G, B or a combination of the three planes in
 true color mode).  It also  controls  the  display  of the
 COLOR  MAP window.
 
 The COLOR submenu accesses the color  manipulation
 functions.
 
 The  EDIT  submenu  accesses  the  basic  image
 manipulation  functions and the annotation  functions.
 
 The PROCESS  submenu  contains the mathematical processing
 functions,  the  external   functions,  and  the  animation
 functions.
 
 The PLOT submenu  accesses  functions to graph,
 contour, and grid.
 
 The PRINT submenu accesses the printing functions to print
 on PostScript or LaserJet printers.
 
 The SIGNAL MODELS submenu accesses the  satellite   signal
 simulation  functions.
 
 The  GEOMETRY  MODELS  accesses the geometric  manipulation
 functions,   such  as   warping, satellite  geometry and 
 orbit simulation.
 
 The HELP submenu accesses the on-line help by topic.

$END ---------------------------------------------------------------------
$DEB 901 000 000 000 000
FILE MENU

The FILE submenu reads and writes files  containing  images,
color maps,  annotations  and contours.  It also allows you
to save a work session that can be continued later.

The SIMPLE FILE READ  function  reads  basic  image  formats
(i.e.  a line and  column  array of any size  and with  byte
encoded  pixels).

The DIRECT ACCESS READ  function  samples rows and columns
and can  therefore  read images larger than 1024 x 1024.

The FREE FORMAT READ  function  can read image
pixel values that are either  integer  (from 1 to 32 bit) or
real.  Since this menu calls up the DIRECT ACCESS READ 
menu, it can also  sample  images.

To  select  the file  name for reading or writing, use the
DIRECTORY  CONTENTS  menu.
This menu lists the files and directories contained  in the
current  directory.  NOTE:  only 299 files in the  directory
are  displayed.  To  change  directories,  click on the name
with the left mouse  button.  One click on the "../"  symbol
at the top of the  entry  list  allows  you to  climb to the
directory above.  To select a file in the current directory,
click  on  its  name.  You  can  also  directly   enter  the
directory  and file names by typing  them into the Path Name
and File  Name  boxes.  In the Path  Name box  type  "./" or
$HOME, which returns you to the root or home directory.

$END ---------------------------------------------------------------------
$DEB 902 000 000 000 000
DISPLAY MENU

The DISPLAY  submenu  controls  which image planes are
displayed (R, G, B or a combination  of the three in true
color  mode.  It also  controls  the  display of the COLOR
MAP window (i.e.,  functions SHOW COLOR SCALE and
HIDE COLOR SCALE).

The FLIP FLOP BANKS function  displays two of the three
planes alternatively.  This enables you to compare
images  contained  in the three  planes.

$END ---------------------------------------------------------------------
$DEB 903 000 000 000 000
COLOR MENU

The COLOR submenu accesses the color manipulation functions.
SAVE COLOR SCALE  attaches the color map to the image plane.
As long as this  function  is not called up,  changes in the
color map remain  temporary, and upon leaving the COLOR menu
the  previous  color map is  restored.

TRUE  COLOR  changes Sphinx into the true color mode 
(this has the same effect as the TRUE COLOR function in 
the DISPLAY menu).

STRETCH THE 8 BIT COLOR  SCALE  modifies  the color  map 
(e.g.,  contrast control, min./max. scaling, brightness,etc.)

FILL LEVELS WITH COLOR creates false color images by
modifying the color map by pixel value  intervals.

AUTO  INTENSITY  BALANCE and RGB MANUAL  INTENSITY  BALANCE
controls the pixel values of the  planes  in true  color
mode  either  automatically  or manually.

BUILD  COLOR  SCALE   creates  a  color  map  and
displays  the  histogram  of the image  plane.

$END ---------------------------------------------------------------------
$DEB 904 000 000 000 000

 EDIT MENU
 
 The EDIT submenu  contains  the  following  fundamental
image  manipulation  and  text  annotation  functions.

MOVE EXCHANGE ROTATE: various functions that move, 
exchange, and rotate  image  areas.

IMAGE  RESIZE:  enlarges  or  reduces images.

DRAW  IMAGE  ANNOTATION:  inserts  text and  simple
graphics  (e.g., lines, boxes,  symbols) in the image.

DRAW COLOR LEGEND:  creates a color legend.

GRID DRAWING:  draws grid lines.

PAGE  SETTING:  constructs  a mosaic of smaller
images of any size  stored  on disk.

PIXEL  MASKING:  masks selected  areas of the image.

AREA FILLING:  fills an image area with a  selected  pixel
value  color.

MERGE  TEXT AND IMAGE:  merges  together  the image plane
with the  overlaid text or graphics.

$END ---------------------------------------------------------------------
$DEB 905 000 000 000 000
 Process Menu
 
 The PROCESS  submenu accesses the mathematical processing
 functions, the external functions,  and  the  animation 
 functions.
 
 IMAGE  ALGEBRA: performs  basic  algebraic   functions
 on  an  image.
 
 AREA STANDARD DEVIATION:  calculates the standard 
 deviation of an image    area.
 
 CONVOLUTION    PRODUCT:   calculates    the
convolution product and filtering of an image area.

FOURIER TRANSFORM:  computes Fourier transform
filtering of an image area. 

STRUCTURE   FUNCTION:   calculates   the   structure
function of an image area.

CLUSTER  ANALYSIS:  analyzes the cellular  structure of an
image or selected area.

PRINCIPAL COMPONENTS  ANALYSIS:  analyzes the principal 
components of an image. 

PIXEL  CLASSIFICATION:  classifies  pixels  using
cluster  dynamics.

EXTERNAL  PROCESSES:  performs  external user-developed
programs.

MOSAIC   ANIMATION:   animates images.

$END ---------------------------------------------------------------------
$DEB 906 000 000 000 000
 Plot Menu

The PLOT  submenu  accesses  the following  functions
to graph,  contour,  and grid  images.

REDRAW SAVED GRAPH:  redraws the previously  saved graphics.

CLEAR SAVED GRAPH:  erases the  previously  saved  graphics.

HISTOGRAM:   plots   histograms.   

RADIAL:  plots   radials.

CONTOURING:  plots contours.  

BIDIMENTIONAL PLOT:  plots two dimensional  scatter
plots using two image planes.

3 COLOR GRAPHIC:  constructs  a  scatter  plot  around 
three  axes representing the red, green and blue coordinates
of a pixel.

CHANGE  SAVED GRAPH  NAME:  changes the file name of a saved
graphics.

IMPORT  GRAPH  FROM  FILE:  imports  an  existing graphics
file (x, y ....).

$END ---------------------------------------------------------------------
$DEB 907 000 000 000 000

Print Menu

The PRINT submenu contains the print commands for PostScript
 or  LaserJet  printers.  The  images  and  graphics  can be
 printed in either color or levels of gray.  Sphinx can send
 print jobs to the print  spooler or store the print  images
 in a file.

$END ---------------------------------------------------------------------
$DEB 912 000 000 000 000
Signal  Models  Menu

The SIGNAL  MODELS submenu accesses the satellite signal
processing functions.

$END ---------------------------------------------------------------------
$DEB 913 000 000 000 000
Geometry  Models Menu

The GEOMETRY  MODELS  submenu accesses the geometric
image  manipulation  functions  for warping,   computing
satellite  geometry  and  simulating satellite  orbits.

$END ---------------------------------------------------------------------
$DEB 914 000 000 000 000
Tests  Menu

The TEST  submenu accesses the various test functions 
(image overlay, etc.).

$END ---------------------------------------------------------------------
$DEB 602 000 000 000 000Merge Text and Image
 This function merges the graphics  overlay plane with
 the image plane.  The overlay plane contains the collection
 of annotations created using DRAW IMAGE ANNOTATIONS, masks
 created  using PIXEL  MASKING, the contours  created  using
 CONTOURING,  the grids  created  using GRID DRAWING and the
 contours read by CONTOUR RESTORE.

 For images  displayed  in false  color, all the pixel values
 above 249 are assigned the value 249, and then a specialized
 scale is used for the interval 250 to 255 in order to define
 the overlay  graphics  colors.  If this color scale is lost,
 the function INSE RT GRAPHIC SCALE under the "Test"  submenu
 will  recreate it without  altering  the image.

$END ---------------------------------------------------------------------
$DEB 100 000 000 000 000Image (Read from disk)
 This function reads 8-bit images (scaling them to 512 or
 1024)  that  do not  incorporate  record  headers but file
 header.
 Images that do not meet this  specification  should be read
 using the FREE FORMAT READ or DIRECT ACCESS READ 
 functions.

 Choose the file name by filling the PATH NAME and FILE NAME
 or by  selecting in the  DIRECTORY  CONTENTS  menu and then
 clicking  once on READ FILE.
 Sphinx  analyzes the file and determines  the image size 
 (Sphinx  determines  if the file size is the  square  of
 a number  that  would  compose  the number of rows and 
 columns of an image).  If Sphinx  cannot determine the
 image size, or if the  calculated  image size is  incorrect
 (for  instance  512 x 512  for a 1024  x 256 image), 
 you can modify it by explicitly  filling in the "Nb lines" 
 and "Nb columns" boxes.  (To help determine the file size,
 the user can create an external file (".sphinx_ fmt") that
 is  stored  in the home  directory  and that  contains
 several  lines  with  common  format  dimensions  ("Nb Lines"
 "Nb columns", "header   size").
 For  instance,   create  the  file:  vi .sphinx_fmt
    288 384 0
    512 411 112  etc.

 The  VISIBLE  and MASKED  option  boxes allow you to place
 the file read into either  the  visible (A, B, C, D) or
 masked  (E, F, G, H) quadrants.
 The A, B, C, D or E, F, G, H options (according to the 
 VISIBLE or MASKED  options  selected)  indicate  the
 quadrant  into which the image is  loaded.
 The RED,  GREEN and  BLUE option  buttons  allow  you to 
 choose the plane into which the image is loaded. 
 The RGBCM option simultaneously loads the three R, G, B
 image  planes  and the color map if the  corresponding
 files are present (suffixes R, G, B and CM).
 The EXPAND  option  enlarges the image to 1024 x 1024
 by  duplicating  points.
 The UP/DOWN,  LEFT/RIGHT  options inverts and reverses
 the image placement.

 Clicking a second time on READ FILE initiates the loading of
 the image into the plane and  quadrant  specified.
 
 WARNING: the image does not appear immediately on the screen
 if it is read into a plane other than the one currently  
 displayed or into a masked quadrant.  To display  it, 
 depending  on the situation,  you must  change the displayed
 plane  (DISPLAY menu) or  transfer  the image to a  visible 
 quadrant  (EDIT menu).
 
 WARNING:  a displayed image will not appear correctly on the
 screen if the color map is not appropriately  adapted to the
 image.  If, for instance, you read an image containing pixel
 values equal to either 0 or 1 and you display the image with
 a color  map ad apted for  continuous  shades  of gray,  the
 image will display as a uniformly black image since there is
 no scaling  between the 0 or 1 values. 
 
 To display the image correctly, you must  first  modify 
 the color map using the HISTOGRAM STRETCH function.
 
 Image files produced by Fortran programs:
 The files produced by Fortran programs contain at the
 beginning  and the end of each record a 4-byte word 
 that indicates  the length.  A file  containing a n x n 
 image and written in one single  record will have a size
 equal to (( 4 + n) x (n + 4)) bytes.
 
 The Sphinx READ FILE  function  takes this  procedure  into
 account  before  reading an image file.  Sphinx  determines
 the size of the file (i.e., size_file) and reads the values
 in  the   first  4  bytes   (i.e.,   size_header).  If  the
 size_header is equal to size_file - 8, Sphinx  assumes that
 the  file   contains  an  image  whose  size  is  given  by
 size_header  and that begins at the forth byte of the file.
 To facilitate the exchange of images between  machines that
 do not  employ  the same bit order  representations  within
 words (high end bits first or last), Sphinx  analyzes the 4
 bytes  written  according to the two possible  orders.  One
 can then read, for instance, on a RS 6000 a file  produced
 on  a  DecStation.

 WARNING:  images  produced  by  Fortran programs  but 
 written in several  segments  must be read by FREE  
 FORMAT  READ to enable  Sphinx to ignore the  written
 byte  length.
$END ------------------------------------------------------
$DEB 101 000 000 000 000Image (Write to disk)
 Choose the file name by filling  in  the  PATH  NAME
 and  FILE  NAME  boxes  or by selecting  it in the
 DIRECTORY  CONTENTS.  
 The  A, B, C, D options indicate which image quadrant
 is written.  The 1024 option  allows  you to write  the
 complete  image.  If you choose the 1024  option,  the
 REDUCE  option  allows you to decrease  the  written
 image  size to 512 x 512.  The RED, GREEN and BLUE
 options tell Sphinx which plane contains the image for
 writing.
 The  COMPRESS  option box allows you to write  in
 compressed format.  
 The  "Nb  lines"  and  "Nb columns" boxes give you
 the option to write  format  sizes other  than 
 512 x 512 or 1024 x 1024.
 Click on WRITE  FILE to begin  writing.
 WARNING:  if the file  already  exists, the writing
 cannot taking place.  The dialog box, however, provides
 an OVERWRITE  FILE option, which can be activated by
 clicking  once  upon  YES and  then  upon  WRITE  FILE.
$END ---------------------------------------------------------------------
$DEB 103 000 000 000 000Color map (Restore from disk)
 This function reads a color map file and updates the 
 color maps associated with the three R, G, B image planes.

 The color map files  contain  4608 bytes or 3 color  maps 
 of 1536 bytes (one for the BLUE plane, one for the 
 GREEN plane, and one for the RED  plane).
 Each color map  consists  of 3 series of 512 bytes with
 the first  containing 256 levels of red (each one encoded
 in 2 bytes),  the  second  containing 256 levels of green,
 and the third  containing 256 levels of blue.
 The Sphinx utility directory contains the source code
 of the two utilities: print_cm.c and build_cm.c.
 Print_cm produces  an ASCII  image of a color map file,
 and  build_cm constructs  a color map file from an ASCII
 image.  The ASCII files  created by print_cm and read
 by build_cm are composed of lines  having the  format:
  p iii rrr ggg bbb,  where
	-plane (R, G, or B)
 	-table index (from 0 to 255)
 	-levels of red (from 0 to 255)
 	-levels of green (from 0 to 255)
 	-levels of blue (from 0 to 255)
$END ---------------------------------------------------------------------
$DEB 104 000 000 000 000Color map (Save to disk)

This  function  writes a color map file from the
color maps associated with the three R, G, B planes.

$END ---------------------------------------------------------------------
$DEB 106 000 000 000 000Annotations (Restore from disk)
This function loads the table  files  used by the image  
annotation  functions.
The table files allow you to use 50 different text and
50 symbol graphics.
$END ---------------------------------------------------------------------
$DEB 107 000 000 000 000Annotations (Save to disk)
This function writes to disk the table files used
by the image annotation functions.

$END ---------------------------------------------------------------------
$DEB 109 000 000 000 000Contour (Restore from disk)
 This function  reads contour files (see CONTOUR SAVE
 function).  A contour  file' s contents are  overlaid on an
 image.  The contours themselves are simply superimposed
 upon the image  without  masking it. 
 They can be erased  without erasing  the  image  by  using 
 the  REFRESH   function.
 To incorporate the contours into the image, use the 
 MERGE TEXT &  IMAGE  function  in the  EDIT  menu.  

 To create a contour  using a binary image, such as a contour
 map, you must  first read a binary  image.  Next  create a
 mask corresponding to the points of the contour map (PIXEL
 function from the EDIT menu), and then save the mask using
 CONTOUR  SAVE.
 To  create a  contour  file from  contours calculated  by
 Sphinx on an image,  use the PLOT  menu' s CONTOURING
 function  and  then  save the  contours  using CONTOUR SAVE.
$END ---------------------------------------------------------------------
$DEB 110 000 000 000 000Contour (Save to disk)
This function  writes  contour  files  from  the  contents
of  a selected  image  plane.
The plane can  contain  text  added using DRAW IMAGE 
ANNOTATIONS,  masks  created  using  PIXEL MASKING,
contours created using CONTOURING, grids produced
using GRID DRAWING and contours read using CONTOUR
RESTORE.
The saved contour files can be  superimposed  upon the
image (see CONTOUR RESTORE FUNCTION function).


$END ---------------------------------------------------------------------
$DEB 112 000 000 000 000Session  ( Restore)
  This  function  restores a previously  saved  work  session
  (cf.  function   SAVE SESSION).
$END ---------------------------------------------------------------------
$DEB 113 000 000 000 000Session  (Save)
  This   function   saves  a  work session.
  The session can be  restored  later by using the
  RESTORE  SESSION  function.  The name of the save
  file is fixed, having the root name "Save_cont...".

$END ---------------------------------------------------------------------
$DEB 115 000 000 000 000Direct Access File (Read from disk)
  This  function  allows you to select and read a 512 x 512
  or 1024 x 1024 area in an image file of any size.  
  Once the  file is  selected, click  on  READ  FILE.

  Sphinx begins by reading  the first two  integers  of the
  file to determine the image size.
  If this information is missing, two boxes  appear on the
  screen for entering the number of lines and  columns of
  the image .  The SHOW  GLOBAL  IMAGE option  displays
  an entire  512 x 512 image area in the A quadrant. 
  Before  clicking  on READ FILE, you must  first select 
  the image size, the image  plane and  quadrant  for
  display,  the starting  line, the line step, the  starting
  column, and the column step.

SELECT  can be used to define  the  starting  point.  Sphinx
takes into  consideration  the image  size and the  selected
line and column  step  samplings.  By moving  the mouse over
the  A  quadrant,  a  window  displaying  the  size  of  the
corresponding  image  area  appears.
A click on the right button   fills  the   parameter   boxes
with  the   values corresponding  to the selected  area.

$END ---------------------------------------------------------------------
$DEB 117 000 000 000 000Free Image Format (Read from disk)
This function  reads image files having various  formats,
and it allows  you to sample  the  lines and columns and
scale the image to 8 bits.  As an example, one can use this
function to read a file containing several channels.
The first step decodes the file.
The dialog box allows you to specify  the data  unit  size
(bit  or  byte)  and  the  following  file structure:
- the image  structure:  pixel length, number of lines  and
  columns,  data type  (integer  or real) 
- header offset, record length 
- record structure:  header record and trailer  record

The SWAP LOW AND HIGH  option  allows you to swap high end
and low end bits.  The HIGH BYTE option allows you to read
only the  high end  bits.  The LOW BYTE  option allows you
to read only the low end bits.

The SCALE TO 8 BITS  option  allows  you to scale  the pixel
values  over 8 bits.  For this  case, if the "MIN" and "MAX"
boxes are  empty, an  initial  reading  will find the  exact
minimum   and   maximum   values  as  well  as  the   values
representing  1% and 99% of the pixels.  The  exact  values
are  displayed  in the "MIN" and "MAX" box.  You can  modify
these  entries  directly  or by  clicking  on the 1% and 99%
values displayed  below.  A second reading decodes the image
file and  recalculates  the pixel values between the minimum
and maximum values specified.

For instance, to read a file containing a 16-bit 1250 x 1250
 image having a 4-byte  header in which each line is written
 in one 2500 byte record, you must enter the  specifications
 for a 4-byte  header and a pixel  length of 2 with 1250 
 "Nb lines" and 1250 "Nb  columns".
 This  first step  creates a /[tmp]/sphiNx_crt0 file in 
 standard image format that can be read by the  DIRECT
 ACCESS  READ  function  whose  menu is called up  
 automatically.  You can of course  select  image
 parts and sample the image by  skipping  lines and  columns
 (see information on the DIRECT ACCESS READ function).
$END ---------------------------------------------------------------------
$DEB 119 120 000 000 000TIFF Image Format (Read/Write)
 This function  reads or writes Images ( 8 or 24 bit ).  Each
 file contains the image  associated  with its LUT,  creation
 date, author name and comments in compressed or 
 uncompressed format. 

 N.B.  this   function  is  useful  to  read  images
	created by an Apple Scanner.

$END ---------------------------------------------------------------------
$DEB 122 123 000 000 000 GIF Image Format (Read/Write)
 This  function  reads or writes 8 bit  images in  compressed
 format with its LUT.

$END ---------------------------------------------------------------------
$DEB 200 300 000 000 00024 bit true color
Displays on the screen an image  obtained by  combining  the
   color  values  contained in the three R, G, B planes.  On
   machines   limited  to  8  color  planes  (256  different
   colors),  Sphinx  approximates  the true color by using a
   3/3/2 coding.

$END ---------------------------------------------------------------------
$DEB 201 202 203 000 000Show (blue bank : green bank : red bank)
   Show Blue Bank  Displays on the screen the
   image  contained in the B plane.  The image is  displayed
   using  the color map  associated  with the B plane.

   Show Green Bank Displays on the screen the image
   contained in the G plane.  The image is displayed 
   using the color map associated  with the G plane.

   Show Red Bank  Displays on the screen the image contained
   in the R plane.  The image is displayed  using the 
   color map  associated  with the R plane.

$END ---------------------------------------------------------------------
$DEB 205 206 000 000 000Scale (Show : Clear)
   A  scale  showing  the  color associated  with each  
   pixel  value is  displayed  in the COLOR  SCALE  
   window  (to the right of the IMAGE  window)
   WARNING:  when  Sphinx is in true  color  mode, the scale
   displayed has no significance.

   Hide Color Scale The scale  showing the color  associated
   with each pixel value is erased.

$END ---------------------------------------------------------------------
$DEB 208 000 000 000 000Flip-Flop banks

This  function  allows  you  to  display  two  image  planes
alternatively.  To  activate  the  function,  click  on  the
desired change.  After a brief delay, a message in the lower
right  indicates  the action to take.  Keep the right button
pressed  down and change  the flip speed by moving the mouse
up or down on the screen, with the higher  being  faster and
the lower  slower.

$END ---------------------------------------------------------------------
$DEB 314 000 000 000 000
SAVE COLOR SCALE  attaches the color table to the  image
plane.

$END ---------------------------------------------------------------------
$DEB 301 302 000 000 0008 bit (grey scale :  color scale ( sharp, smooth ))
When a plane is displayed,  Sphinx  changes into false color
mode.  An image  pixel value is an index of the red,  green,
and blue  intensities  that make up the color  displayed for
that point.
There is a maximum of 250 possible  colors (six
pixel  values  are  sav ed  for X 11,  although  the  output
results are  displayed in 256 colors).  For gray scales, the
three  RGB  planes  have  the  same  value.  For  color,  an
artificial   scale  is  created.  

$END ---------------------------------------------------------------------
$DEB 303 000 000 000 000 Other  Color  Scales  

This function allows you to select a color map from a
pre-defined selection.

$END ---------------------------------------------------------------------
$DEB 310 000 000 000 000Build Color Scale
This function modifies the color scale using a histogram and
line  graphs  of the  three  R, G, B color  components.  The
histogram  of the image plane is  displayed  in black at the
bottom of the graph, and the 3 components of the color scale
are  displayed in red , green and blue. 
The X axis  denotes the pixel  values  (0-255) and the Y axis
denotes the color intensity.
The  right  mouse b utton  draws  straight  line segments,
while  the left  button  draws  curves.  When the graph is
drawn (in black), it can be applied to a section of
the color table by clicking  "R", "G" or "B".  The result is
immediately  displayed.  The  "Gray" box  applies  the sa me
values  to the three RGB  components.  The "C" box exits the
function.  Note:  also  see  in  the  Sphinx  utilities  the
build_cm   utility  which   constructs  a  color  map  using
pre-defined  values.

$END ---------------------------------------------------------------------
$DEB 305 000 000 000 000Stretch the 8 bit color scale
Sphinx provides  the  possibility  of:
- modifying  high  values
- modifying  low values
- rotating  the scale
- inverting  the scale  upside-down
- modifying  the scale by  equalizing  a number  of  pixels
   by  class
- modifying   the  scale  by performing a histogram stretch

 To modify the high (or low)  values,  place the  cursor on the
 maximum (or minimum) and then click the right mouse  button.
 The new scale is  immediately  displayed.  By continuing  to
 press  the  right  button  and  moving  it up or down on the
 screen, you can visualize a sliding  scale.  All the points
 located beyond boundaries appear in black or white according
 to the option selected.

  You can adjust the color  intensity  of the scale  using the
  BRIGHTNESS  TUNE function.  The intensity is multiplied by
  a coefficient  dependent  upon the cursor  position on the
  screen:  lighter  toward  the top and  darker  toward  the
  bottom.  

  EQUALIZE  STRETCH  queries you to select an area.
  Sphinx  creates  a  histogram  of the  selected  area  and
  constructs  groups of pixel  classes  for which each class
  consists  of the same  number  of  pixels.  The color  map
  reflects   the  groups  of  point   classes.  After   this
  transformation  within the  selected  section,  each level
  corresponds  to the same  number of points.  A look at the
  COLOR MAP window illustrates the transformation.

  HISTOGRAM  STRETCH  queries  you to  select an area. 
  Sphinx examines the pixel values to determine  the dynamic
  range of the area  (minimum  and  maximum  pixel  values of
  the area: vmin and vmax).  The color map is  adjusted  so
  that  values from 0 to  vmin-1  are assigned to 0,  values
  from vmin to vmax are assigned  values between 0 and 255,
  and values from vmax+1 to 255 are assigned to 255.  
  The result  improves the contrast of the area selected but
  at the expense of the rest of the  image.  A look at the
  COLOR MAP  window  illustrates this transformation.

  SAVE COLOR SCALE  attaches the color table to the  image
  plane.

$END ---------------------------------------------------------------------
$DEB 306 000 000 000 000Fill  Levels  With  Color
This function   creates an  artificial color scale. Begin  by
selecting  a fill  color.  Then place the mouse in the COLOR
MAP  window.  By keeping the right  button  pressed,  Sphinx
fills in the  corresponding  pixels with the selected color.
If you make a mistake, the PREVIOUS  SCALE button reverts to
the previous table.  To help identify the pixel classes, you
can  determine  a pixel  value by placing  the cursor on the
image and pushing  the right  button.  The best  results are
achieved by starting with a scale in shades of gray and then
coloring  the value  ranges. 
SAVE COLOR SCALE  attaches the color table to the image
plane.

$END ---------------------------------------------------------------------
$DEB 308 000 000 000 000RGB intensity balance (Auto)
In the case of images displayed in true color,
the only way to modify the contrast is to change 
the pixel  values of the image.
This function  automatically  balances the three RGB
planes by performing histograms on a area selected with 
the mouse.  The result is displayed in the same area.
If the  transformation is judged  satisfactory,  then it 
can be applied to the entire image or to a given quadrant.  
SELECT allows you to select a new area.
GRAPH:  displays  the histograms  before  and  after
the  transformations.
Three parameters allow you to modify the results:
    Brightness: from 0 to 100
    %lower:  is the  percentage  of  minimum value pixels
             representing  the zero  function  value.
    %upper:  is the  percentage  of  maximum value pixels
             representing  the  highest  function  value.

$END ---------------------------------------------------------------------
$DEB 309 000 000 000 000RGB intensity balance (Manual)
For images  displayed  in true color, the only way to modify
the  contrast  is to  change  the  pixel values of the image.
Using a 384 x 384 area selected by the user,
this  function  manually  allows you to:
- select an area.
- plot the  histograms  for the three RGB  planes.
- modify the  histograms.
  For each color  place the cursor on the corresponding 
  histogram (the values are displayed at the bottom of 
  the scale) and then click to change the minimum or 
  maximum  frequencies.  The  compressed  or  stretched
  color scale is displayed in the selected area. 
- add or subtract a  constant.

As above, by  positioning  the  cursor  on the histogram  of
the  corresponding  color,  the  value of this constant  is
displayed  at the  bottom of the  scale.  The value is between
-39 and 300.  The result is  displayed  in the   window,
and  if  it  is   satisfactory,   the   same transformation
can be applied  to the entire  image or to a given quadrant.
$END ---------------------------------------------------------------------
$DEB 009 000 000 000 000The Edit Menu Move/Exchange/Rotate
This dialog box offers several functions.  To execute one of
these  functions,  first select the quadrant  and the source
plane in the FROM box.  Next  select  the  quadrant  and the
destination  plane from the TO box.  Then select the desired
function  and click on  EXECUTE.  The 512 and 1024  options
allow you to work on one of the 4 visible (A, B, C, or D) or
masked (E, F, G, or H)  quadrants  or on the entire  screen.
The  functions  CUT  AND  PASTE  PIXELS,  CLEAR  and 
COPY PIXEL AREA  work on an area that is  selected  after
you click on EXECUTE.
The other  functions  work on the entire  quadrant chosen
or on an area if editors function is chosen.
The function COPY COLOR MAP copies a color map from
one  plane  to  another.  For  this  function,   choosing  a
quadrant is not necessary.  
The function  EXPAND enlarges an area by a factor  of two.
This  enlargement  affects  the upper left part of the area
selected.
The  function  IMAGE RESIZE  of the  EDIT  menu  can be 
used if you  desire  more flexibility  when  choosing the
enlargement  factor and the area to enlarge. 
The function COMPRESS reduces the image by a factor of two.
WARNING:  don' t forget to select the FROM plane,
          otherwise  the  functions do not work.

$END ---------------------------------------------------------------------
$DEB 512 000 000 000 000Image Resize
This  function  modifies  the size of an image by a variable
factor x and y when using the image' s upper left  corner as
the origin.  Select the source quadrant and the  destination
quadrant,  as well as the source  plane and the  destination
plane,  using the FROM and TO boxes and the button  options.
Choose the origin  point and the scale  factors  using the X
and Y orig,  and X and Y factor  boxes,  respectively.  Pick
the  interpolation  method,  either the nearest pixel or the
bicubic  spline,  which gives the best  results but  demands
more  computations.  Click  on RUN.

$END ---------------------------------------------------------------------
$DEB 211 000 000 000 000Image annotation
This function  writes text or draws lines and symbols on the
image.  These text and  line  annotations  can be  modified,
masked, or rewritten at any time.  They can also be saved to
a file (see the  ANNOTATION  SAVE  function  under  the FILE
submenu).

The function MERGE ANNOTATIONS AND IMAGE allows you 
to inlay the  annotations  in the  image.  In the  case  of
an  image displayed  in false color, all the  pixels  above
249 are reduced to 249, and a special  scale is used in the
interval from 250 to 255 in order  to  define  the  overlay
graphics colors.

If this scale is lost, the function  INSERT GRAPHIC SCALE
in the submenu TEST recreates it without altering the image.
See the  function  DRAW COLOR  LEGEND  from the EDIT menu 
and the  functions  CONTOURING  and DRAW GRID  from the
PLOT menu.
$END ---------------------------------------------------------------------
$DEB 408 000 000 000 000
This function draws grids.
You can choose the quadrant, the line thickness, the origin and
the size of the selected area, and the grid step in X and Y.
The result can then be saved in a file using the 
SAVE  CONTOUR  function  from the FILES menu.

$END ---------------------------------------------------------------------
$DEB 212 000 000 000 000Draw Color  Legend
This  function  constructs  a color legend.
The DRAW RAINBOW  function  draws a rectangle containing
the color map.  To select a color, enter its RGB value or
click on SELECT  COLOR  FROM  IMAGE.  SELECT  COLOR
FROM IMAGE allows you to choose a color in the image.  After
clicking on this button,  place the mouse on the image area
and press  the right  mouse  button.  While  the  button  is
pressed,  the color of the pixel is  displayed  at the mouse
position.  When the desired  color is obtained,  release the
right button.  DRAW ICON draws a symbol (e.g., box, diamond,
circle,  triangle) of the selected color.  After clicking on
this  button,  select the point  where the symbol  should be
displayed by clicking on the right mouse button.
CLEAR LAST INSERT  undoes the last  insert.
CLEAR AREA  erases an area selected  with  the  mouse.
The  options  KEEP X and KEEP Y force the  horizontal  or
vertical  alignment of the symbols placed  by DRAW  ICON.  
NOTE:  Also  see the  function  DRAW IMAGE  ANNOTATION
            from the EDIT  menu.
$END ---------------------------------------------------------------------
$DEB 504 000 000 000 000Pixel masking
 This  function  creates a mask by  filtering pixels using
 one or several  parameters and then attaches it to the image.
 To use this function, you first create a mask and then connect
 it to the image.

 To create a mask, select the quadrant and the plane  desired
 from the CREATE box.  Next select the filter  conditions for
 the R, G, and B  planes.  For  each  plane  you  specify  an
 interval of pixel values to which the  filtering  conditions
 are  applied.  The conditions for the three  planes can be
 combined  using  AND  and  OR  options.  The  INVERS  option
 inverses the mask.  Once you' ve made your selections, click
 on CREATE.  The masked  areas are  displayed  on a screen in
 magenta.  The mask can be  modified by clicking on ERASER
 to erase the masked areas.

 To merge the mask to the image, select the destination  area
 and plane in the MERGE box, and select the value  that will
 be given to the masking  pixels.  This value is stated as a
 constant (value choice);  however, if you are in true color
 mode,  you may  state  this  value  as a  color.  Once  the
 selection is made, click on merge.  The mask created can be
 used by the IMAGE ALGEBRA  function  (under section 3.5)
 to select  specific  pixels to  modify.
$END ---------------------------------------------------------------------
$DEB 505 000 000 000 000Area Filling
 This function selects a contour or an area using the mouse and
 then merges it to the image with a desired pixel value.

 Select  the  target  quadrant  and  plane  (TO box) and then
 select the type of  background  plane:  IMAGE or VALUE.
 If you select IMAGE, the TO area will be initialized using 
 the FROM area,  which must be selected in the FROM box.
 If you select  VALUE,  the TO area will be  initialized  
 using the constant  indicated  in the box located to the right
 of the "Background  :  value"  option  button.
 Select  one of the three plot types (e.g., rectangular area,
 closed area, free contour) and then press RUN.
 You can then select the area.
 Select  the  fill  value  (in the box to the  right  of the
 "Merge  with value"  option)  and then RUN.
 
$END ---------------------------------------------------------------------
$DEB 409 000 000 000 000Page Setting
This function  menu sets up a 1024 mosaic plane of smaller
images of any size  stored on disk.  The menu is composed
of  the  4  following  areas:

File  format definitions
This top area is used to  define  various  file format
dimensions (see FREE FORMAT READ under section 3.1).
For  example,  to read a 16 bit file of size 2884 that has a
32 bit header  and  values  between  1000 and 3500,
you must enter:
Pixel  length :  2 Nb  lines:  288 Nb  columns:  384
Header  offset:  4 Scale  to 8:  1%:  1000  99%:  3500

Grid drawing
This area is used to define the mosaic grid in which the
images are placed.  For  example,  2884 images can be
arranged  in 100 cells that use an origin  point of 100, 100
(x,  y)  for  the  resulting   image.  The  images  are
separated by 10 pixels.  For these specifications, enter:
y orig:  100 x orig:  100  thickness:  10  
height:  100 width: 150 (Show grid)

Selection
This area is used to define the link  between  the image
size on disk and the  mosaic  grid size.  You may  select
either a part of the image or a line and column  sampling
of the  image.  For  example,  you can display  the center
of 2884  images by  entering:  
line: 44 line step:  2 column:  42 column step:
You may expand or reduce the selecting image to the size
of the  mosaic grid.

Read the file
This area  decodes a file and  places  the  result in a grid
cell by using the mouse.  For  example,  enter Read and
then select the  placement  with the right  mouse  button.
After placing the first image, you can select  another file in
the Directory Contents and then repeat the Read command.
$END ---------------------------------------------------------------------
$DEB 013 000 000 000 000Image Algebra
This function computes  equations written in symbolic notation.
The  operators  are standard mathematical functions.
(The calculation is done in real 32 bits).
The possible  operands are:
- images:  A, B, C, D denote the  visible 512 x 512  quadrants.
	   E, F, G, H denote the  masked  512 x 512  quadrants.
	   V  denotes  the  visible planes  1024 x 1024.
	   M denotes  the  masked  planes  1024 x 1024.
	   R, G, B  denote  the  color  planes.
	   T  denotes  the ensemble of the 3 planes.
- the variables X and Y designate the  row  number  and
   column  number  of the  image.
- the notation  [c,r]  allows  you to shift the rows and 
   columns.

Example:  AB = abs (AG - AR[1,0])  (AR is shifted by one
to the left (-1 would be to the right)

Example:  VR = sin (X) x 128 + 128 (X ranges from 0 to 1023)

WARNING: 
if the  results  are not within the values of 0 to 255,
then the image will not be  correctly  displayed.

SAVE  EQUATION adds the current  equation to the Sphinx
equation  database named  ($home).SP_ALGEBRA. 

FILE  RESULT:  creates  a binary 32-bit file named
SP_ALGEBn that contains the image in real values with 
FORTRAN  headers.

FILTER  MASK:  executes  the operation  on the  pixels 
that are not  masked  (see  Pixel Masking  for 
creating a mask).

$END ---------------------------------------------------------------------
$DEB 503 000 000 000 000Area standard deviation
This  function  plots  the  contour  of  an  area  and  then
calculates  the area, the minimum  and maximum  values,  the
average  value,  and the  standard  deviation.  To select an
area,  click on RUN.  PLOT  allows  you to plot a  histogram
(see the Graphics editor).  This function works on the three
RGB planes.
It also takes into account the values that have been 
entered  into the  PHYSICAL  VALUES  menu in the PIXEL
VALUES function to determine pixel values in physical units.

$END ---------------------------------------------------------------------
$DEB 014 000 000 000 000Convolution Product
  This  function  calculates  an image R whose  pixel  values
  are the  product  of pixel  values in a coefficient matrix C
  by the pixel values in the original image matrux I.
  The coefficient matrix C can be created using the keyboard
  (option owner), read from a file, or selected from Sphinx' s
  predefined   operators:  smoothing,   Sobel  operator,  edge
  detection (vertical, horizontal, or diagonal).

  You can specify the matrix size, the threshold above which
  results  are no longer  kept,  and the  desired  plane and
  quadrant.  To start the computation, click on CONVOLUTION.

  WARNING:  don'  t  forget  to  specify  the  FROM   plane,
  otherwise  the  function  will not  work.

  This  menu also allows you to filter an image using a vector
  of V elements contained either in a file or entered  by hand:
  I(i,j) x V(i module n) or I(i,j) x V(j module n)

 To use the filter, select the file  containing the V vector,
 and then click on FROM FILE.  For a vector line, enter 1 in
 the box "Nb  columns"; and for a vector  column, enter 1 in
 the box "Nb  lines".  Then  click on the button  FILTERING.
 Using, for  instance, a vector line [1.00,0.00] will create
 a filtered  image  that only  contains  every  other  line.
 Similarly,  a vector  column will  create a filtered  image
 that only contains  every other column.
$END ---------------------------------------------------------------------
$DEB 510 000 000 000 000Fourier  Transform
 The bidimensional  Fourier transform of an image represents
 the  spectral  components  of an  image.  If  an  image'  s
 spectral frequency varies rapidly, the transform image will
 have a large brightness amplitude.

An  artificial   image  is  constructed   using   calculated
 frequencies.  The center pixel of a transform image will be
 the average  amplitude.  From this pixel, the value of each
 pixel  is  calculated   as  the   logarithm  of  (1  +  the
 amplitude).  Its distance  (p,q) with respect to the center
 provides  the  corresponding   frequency  (p/n,  q/n).  The
 dialog box for the Fourier  transform  function  is divided
 into the following three areas.

  The top  part of the  dialog  box  calculates  a  transform.
  Select the quadrant  that will receive the result  (RESULT
  TO).  Next,  select the area size of the  source  (areas X
  and Y).  Click on RUN and  designate the source image area
  by clicking  the right  button.  The  calculation  is then
  executed  and the  result  is  displayed  in the  selected
  quadrant.
  VALUE  displays  the frequency  values. After clicking on
  VALUE,  select the points in the  destination quadrant and
  click the right button.
  STRETCH expands the amplitude scale, improving the 
  contrast.  INV  recalculates the inverse  transform  
  without  filtering.  UNDO restores the  original  image
  residing in the three planes.
  SAVE allows  you to  save  the  results  into a  database.

  The center part of the dialog  box calculates  an inverse
  transform after a frequency or amplitude filtering.  For a
  frequency  filtering,  select the "zone"  option, and then
  click on SELECT  and define the  filter  areas.  The right
  button  mouse  draws  line  segments  and the left  button
  closes   the   contour.  Click  next  on  APPLY.  (If  the
  "complement"  box is not activated, the saved  frequencies
  are the masked  frequencies.  The others are  assigned  to
  0).

The option  "zone & graph"  applies a linear or  exponential
 function  starting  from the center of the masked  area and
 diminishing toward the boarders in order to avoid a radical
 reset to 0.  After clicking on the APPLY function, if "zone
 &  graph"  is  selected,  the user  must  define  a  radial
 crossing the masked area.  A  perpendicular  to this radial
 will  separate  the  area  into two  parts.  The  dampening
 coefficients will be maximum over the crest and will lessen
 toward the boarders  parallel to the drawn  radial.  A plot
 of dampening  lines is produced  along with a box allowing
 you to apply either the linear function or the  exponential
 function   (in  this  case,  you  can   modify   the  alpha
 coefficient,  and by  clicking  on "apply" the new graph is
 plotted).
 Three  options  are  possible:
 EXIT:  stops the filtering.
 APPLY:  performs   the   filtering   with   the dampening
 coefficients selected to suppress the desired frequencies.  
 TEST:  creates  an  artificial  image  in the 0-255  range
 to  which  the  dampening   coefficients  are applied.

To  calculate  an  inverse   transform  after  an  amplitude
filtering,  select the amplitude  filtering  (i.e.,  "color"
option)  and click on Select and define the level to filter.
The right mouse button allows you to color the levels on the
color  bar which  appears  to the right of the  image.  Next
click on APPLY.

The  lower  part of the  Fourier  transform dialog  box  
performs  the  following   operations   on  the transforms
saved in the data base.
- The "Show" option displays an image file.
- The "Inver"  option  displays the inverse  transform 
               of an image  file.
- The "Save"  option writes the results to a file.
               To perform an operation,  the user must:
- select the A button and  choose the  transform
               from the selection
- select the B button and choose  another transform
               from the selection
- select one of the  following operations:
        - add:  transform   addition  
        - sub: transform  subtraction 
        - conv:  transform   convolution
        - unconv:  transform   deconvolution
        - correl:   transform correlation  
- click the "Run"  button.
$END ---------------------------------------------------------------------
$DEB 508 000 000 000 000Structure function
This function calculates the structure function FS(d) in the
order of either lines (n) or columns (m) for any rectangular
area, and then graphs the values as a function of distance d.
The user specifies the minimum and maximum boundaries.
The value of FS for the minimum  d  values  is  displayed.
In the  case  where  the boundaries  are  different,
the function  graphs a function FS(d).
$END ---------------------------------------------------------------------
$DEB 507 000 000 000 000Cluster Analysis
This function  employs a threshold technique to define and
analyze the cellular structure of an image.

To use this function, choose the input and output planes and
quadrants,  determine the threshold  (box) value below which
pixels are  considered  background  (this can easily be done
using the Fill levels with color), and select the  weighting
to be used:  1 or P V.  With the 1 weighting, all the pixels
will  have  the  same  weight  and the  barycenter  will  be
geometric;  with the PV weighting,  the pixels whose digital
values  are  high  will  have  a  heavier   weight  and  the
barycenter  will by physical.  
After clicking on RUN, Sphinx queries  the user to  select
the  analysis  area  and  then displays  the  results:
a)  on the image  plane:  
    - an artificial   image  showing  the  cells;  
    - the  number  of background  pixels for the points 
	below the threshold; 
    - the number of cells and its surface area.

b)  on the graphic plane:  
    -  the   gravity   centers   of  all  the   cells
       superimposed  on the original  image.

If the "Result File" option is selected, the file clsize.rs
is created  with:  
- the  coordinates  of the  processed  area; 
- the surface and perimeter for each cell; 
- the average value of the cellular digital  pixel values; 
- the position of the gravity center (line and column numbers);  
- an  estimate of the fractal dimension and the size 
  distribution  of the  cells.  
  
PLOT displays a series of plots:  
- the surface area of the cells as a function of their  
  perimeter in number of pixels; (in a log-log graph, a linear
  fit obtains the fractal dimension of the  distribution);  
- distribution of the cell area covered by a specific class,
  normalized by the size of the class and the surface area
  of the studied region, as a function of the average value
  of the diameter associated with the class (the units 
  obtained are in pixels -1) ; 
- the size  distribution of cells as a function of diameter
  classes.  It is obtained by counting  the number of cells
  by diameter  class and then dividing by the class size and
  by the total  surface area of the   region   
  (the  units  are  in  pixel -3)
$END ---------------------------------------------------------------------
$DEB 509 000 000 000 000Principal Components Analysis
This function analyzes an image composed of  three  spectral
ranges  in the  RGB  planes.  A  vector transformation  
constructs an artificial  image in which the new  spectral
components   are  fully   decorrelated.

The displayed results are:  
- the correlation matrix constructed using the  covariance
  matrix.  It expresses  the percent of correlation   between
  the   different   channels.  
- the eigenvalues  and the  eigenvectors of the covariance  
  matrix (for  instance,  a strong drop in the  eigenvalue
  size will increase in strong correlation  with the  base
  spectral components,  with the final result being more
  statistically significant).
  *The  first  eigenvector  will produce  the strongest 
  component and is placed in the blue plane.
  *The second vector will produce a weaker  component
  and is placed in the green plane.
  *The third  corresponds to the residual noise of weak
  amplitude and is placed in the red plane.  
- a linear  Taylor series expansion  of the final  numerical
  values into a 0-255 range and the different coefficients 
  are displayed.

These results can be saved to a SPHINX_PCAn file and 
applied to the images, where (n) is augmented  with 
each usage.
$END ---------------------------------------------------------------------
$DEB 511 000 000 000 000 Pixels  Classification
This classification method by cluster  dynamics  regroups
pixels into classes of the same spectral  components.

In 1024 mode (the  entire  image) the classification  is
completed using the three RGB planes.  In 512  mode,  the
classification   is  applied  to  selected quadrants in the
RGB planes in which various  wavelengths of the same image
have  already  been  placed.
To execute  the function, select the mode (1024 or 512),
the  classification area(s),  where  you want to  display
the  results  and the number of desired classes.

Next choose the class definition method:  
- automatic,  using a  histogram  of  values  
- by pixel, choosing the class values by clicking on a pixel
  with the left mouse button (the right button  displays the
  color sampled)  
- by  area,  choosing  the  classes  by using  the maximum
  histogram  value of an area  defined  in the  image using
  the right mouse  button 
- manually,  defining  the RGB levels  desired.

You can  display the  results in true color mode or in the
blue plane.

RUN  executes  the  calculation.
UNDO  restores  the initial  image.
P.VALUES  displays  the pixel values.
  It is identical to the PIXEL VALUES function in the main
  menu and is  placed  in the  CLASSIFICATION  in order to
  display  pixel values  without hav ing to revert to the main
  menu.  When the  calculation  is finished, a 24 bit composite
  image is displayed.
CHANGE COLORS  allows you to modify the colors of the
  classes.  After  clicking  on this  button,  Sphinx  displays
  a color table, and then for each class it displays the number
  (in the upper  left of the  screen)  and color (to the right
  of the  color  table).  You can then  select a new  color  
  any where in the image with the right  button  and  change
  the class with the left button).
  WARNING:  when you enter into this  sequence, you should
  redefine the colors for all the classes.  
  To exit  quickly from the  process,  simply click the left
  button on the color showing the different classes.
$END ---------------------------------------------------------------------
$DEB 016 000 000 000 000External Processes
This function allows Sphinx to execute independent programs.
These  programs  employ a library  delivered  with Sphinx to
accept images transferred by Sphinx and to retransfer images
to Sphinx that have been processed  externally.  The chapter
"Development  of External  Programs"  contains the necessary
information for writing and integrating external programs.

To execute a program, select the program, the image(s) to be
employed by the program, and the plane(s) and quadrant(s) to
display the image(s) computed by the external program.  Then
click on  EXECUTE.  For  programs  that  require  additional
parameters,  a dialog box  can be  used  to  transfer  the
parameters  to the  program.

The  program  is  executed  in parallel.  You can  continue
to use Sphinx while the program is being executed. The 
results are  displayed by Sphinx as soon as the program is 
finished  executing.

The PENDING JOB STATUS button displays the program status
(Waiting, Running, Ended).

WARNING:  To communicate with the external  programs, Sphinx
uses (tmp)/sphinx_data* and (tmp)/sphinx_sema* files.  These
files are  normally  deleted when  quitting  Sphinx.  If the
Sphinx application quits  unexpectedly,  some of these files
may not be deleted.

$END ---------------------------------------------------------------------
$DEB 514 000 000 000 000Mosaic Animation
This function  animates  images of size 128 x 128, 
256 x 256 or 512 x 512.

To use this function, you  need  to  arrange  within  a 
1024 x  1024  image  an ensemble of sixty four 128 x 128
sub-images,  sixteen 256 x 256 sub-images, or four 
512 x 512 sub-images.

After  loading  images  into one of the  three  RGB  planes,
select the plane  containing  the images and click on RUN or
RUN FAST (for HP stations  with the Turbo SRX card).  Sphinx
moves  successively  through  the  sub-images  to produce an
animated movie effect.

DIRECTORY CONTENTS directly loads images and color tables.
$END ---------------------------------------------------------------------
$DEB 403 000 000 000 000Histogram 
This function  calculates a histogram  of an image  area.
The menu allows you to choose in which plane to perform 
the  computation  (boxes R, G, and B).

To  select  the  processing  area(s),  fill in the  boxes "x
start",  "x end",  "y  start"  and "y end" or, more  simply,
select the  area(s)  using the mouse.  The mouse  directions
are  displayed  in a small  window in the lower right of the
screen.

The  histogram  function  takes  into  account  the values
that have been entered into the PHYSICAL  VALUES menu
in the PIXEL VALUES function to determine  pixel values.

To display the histogram  graphics, click on PLOT (see
Graphics editor) 
CLEAR BITMAP erases the area graphics on the screen.
CLEAR LAST undoes the last histogram.
$END ---------------------------------------------------------------------
$DEB 404 000 000 000 000 Cumulative histogram 
This function calculates  cumulative  histograms.
The menu allows you to choose in which plane to perform 
the  computation  (boxes R, G, and B).

To  select  the  processing  area(s),  fill in the  boxes "x
start",  "x end",  "y  start"  and "y end" or, more  simply,
select the  area(s)  using the mouse.  The mouse  directions
are  displayed  in a small  window in the lower right of the
screen.

The  histogram  function  takes  into  account  the values
that have been entered into the PHYSICAL  VALUES menu
in the PIXEL VALUES function to determine  pixel values.

To display the histogram  graphics, click on PLOT (see
Graphics editor) 
CLEAR BITMAP erases the area graphics on the screen.
CLEAR LAST undoes the last histogram.
$END ---------------------------------------------------------------------
$DEB 405 000 000 000 000 Radial (x)

This  function calculates  radial  functions  of x.
The menu allows you to choose in which plane to perform 
the  computation  (boxes R, G, and B).

To  select  the  processing  segment(s),  fill in the  boxes "x
start",  "x end",  "y  start"  and "y end" or, more  simply,
select the  segment(s)  using the mouse.  The mouse  directions
are  displayed  in a small  window in the lower right of the
screen.

The  radial  function  takes  into  account  the values
that have been entered into the PHYSICAL  VALUES menu
in the PIXEL VALUES function to determine  pixel values.

To display the radial  graphics, click on PLOT (see
Graphics editor) 
CLEAR BITMAP erases the segment graphics on the screen.
CLEAR LAST undoes the last radial.
$END ---------------------------------------------------------------------
$DEB 405 000 000 000 000 Radial (d)
 Radial f(d)
 This function  calculates radial  functions  as a function
 of the  distance  to the origin of a segment.
The menu allows you to choose in which plane to perform 
the  computation  (boxes R, G, and B).

To  select  the  processing  segment(s),  fill in the  boxes "x
start",  "x end",  "y  start"  and "y end" or, more  simply,
select the  segment(s)  using the mouse.  The mouse  directions
are  displayed  in a small  window in the lower right of the
screen.

The  radial  function  takes  into  account  the values
that have been entered into the PHYSICAL  VALUES menu
in the PIXEL VALUES function to determine  pixel values.

To display the radial  graphics, click on PLOT (see
Graphics editor) 
CLEAR BITMAP erases the segment graphics on the screen.
CLEAR LAST undoes the last radial.
$END ---------------------------------------------------------------------
$DEB 415 000 000 000 000 Free Radial
 The FREE RADIAL  function calculates  a  function  for  a
 hand-drawn   curve  as  a function of  distance to the
 origin of the curve.

The menu allows you to choose in which plane to perform 
the  computation  (boxes R, G, and B).

The right mouse  button  allows you to draw the curve.

The  free radial  function  takes  into  account  the values
that have been entered into the PHYSICAL  VALUES menu
in the PIXEL VALUES function to determine  pixel values.

To display the radial  graphics, click on PLOT (see
Graphics editor) 
CLEAR BITMAP erases the segment graphics on the screen.
$END ---------------------------------------------------------------------
$DEB 999 000 000 000 000Menu Graphics  Editor 
 The graphics  editor is called from  various  Sphinx  
 functions  by clicking  on PLOT.
 You can intervene on a graphic  presentation  to:
 - change the window  size (MOVE AND RESIZE) 
 - select the line style (e.g.,  straight line,  arrowhead,
   etc.), the symbol type  represented  by  points, one of 5
   colors,  and line thickness 
 - define the axes, such as linear or logarithmic, minimum
   and maximum,  and the  gradation  marks 
 - write the title and label  axes 
 - define a line step in the case of a scatter  plot 
 - zoom part of the graph by selecting an area with the mouse
   in  the  graph  window.

After  making modifications,  display the results by clicking
REDRAW.  At any time you can return to the  default  values
by clicking on DEFAULTS.

You can enhance a graphic  overlay by using a combination of
 lines, boxes,  symbols (30 maximum), and text (30 maximum).
 For each graphic  addition,  you can redefine the color and
 graphic  type.  To  insert a graphic  element,  you need to
 click on DRAW and then  position  the  cursor  on the image
 position  desired.  If  you  make  an  error  or  incorrect
 placing,  you can delete the  graphic by  clicking on CLEAR
 and then  replacing the cursor over the  incorrect  graphic
 text, line, box, or symbol.
 
 PRINT executes the printing of a graphic  image.
 MERGE WITH IMAGE merges the graphic with the image.(*) 
 MOVE AND RESIZE moves a graphic  window and allows you
 to modify its size  anywhere  on the image using the mouse.
 SAVE  writes the graphics to a file, and the graphic  can
 be  inserted  later by using the REDRAW  SAVED GRAPH  
 function.  
 OVERLAP  displays all the graphics one by one. 
 NEXT PLOT  allows you to  advance to the next  graph.
 FITS  accesses  a  window  that  performs  a  smoothing  or
 polynomial   approximation   for  a  displayed  graph.  The
 derived  function can be either added to the original graph
 or used to  replace  it.
 
 To zoom one part of a graph,  you must first  define the
 upper-left  corner of the zoom area with  the  right  button
 and  then  move the  mouse to the desired  lower-right corner
 before letting go of the button directly on the graph window.

  (* ) If Sphinx is in true color  mode,  then the three RGB
planes are  affected  by the  displayed  graphics.  In plane
mode (R, G or B), all the pixel values  greater than 249 are
scaled down to 249, and then a special  scale is used within
the 250 to 255 range in order to define the annotation  and
graphics  colors.  If this scale is lost, the INSERT GRAPHIC
SCALE  function  in the TESTS menu can  recreate  it without
modifying the image.
$END ---------------------------------------------------------------------
$DEB 400 000 000 000 000Redraw saved graph
  REDRAW  SAVED GRAPH  allows  you to redraw,  modify,
  or overlay  graphs  saved  using the SAVE function in the
  graphics  editor.
  After selecting a title in the "Graphic  Saved Titles"
  window, the  corresponding graphic is superimposed  over
  the previous  graphics.  The graphic  determines  the frame
  size, with the  minimum and maximum  adjusting  to each 
  new choice.

  At any time  the user can: 
  - call up the graphics editor in order to modify the graphics
    presentation (REDRAW WITH CHANGE). In this case the
    graphics are  displayed  one by one in the order they were
    selected.
  - print the results  (PRINT).
  - erase the graphics  window (CLEAR  GRAPH).
  - create an ASCII file containing the values of the graphics
    (EXTRACT  DATA).  The file created is named  SPHGRAXYn.
$END ---------------------------------------------------------------------
$DEB 401 000 000 000 000Clear saved graph

  This  function  deletes an already saved graph from a file
  by simply clicking on the graphics file title in the menu.

$END ---------------------------------------------------------------------
$DEB 407 000 000 000 000Countouring
  The CONTOURING  function  plots  isocontours of
  various values and in the five colors and then merges them
  into the image  plane.  You must select the  quadrant  for
  plotting and the contour  values; an eraser tool  (ERASER)
  allows  you  to  erase  any  errors  or  aberrations.
  
  The resulting  graphics  can be  saved in a file by using
  the SAVE  CONTOUR  function  in the FILES menu.
$END ---------------------------------------------------------------------
$DEB 410 000 000 000 000Bidimentional Plot
  The   BIDIMENTIONAL    PLOT   function    generates
  bidimentional  histograms.  You  must  select  the x and y
  plane  to  display  as well as the  area to  process.  Two
  plotting options are available: 
  - a 2D graphic  presented as  a  scatter  plot 
  -  a  3D  graphic   displaying   the frequencies on the
  Z axis 3D Color Graphic 
$END ---------------------------------------------------------------------
$DEB 411 000 000 000 0003D Graphics
  This  functions uses the image  plane to  display a  
  user-defined  area by placing  on three RGB axes the
  values of pixels in color.

  The user can modify the view angle by 30 degree intervals.
  You can also  project  the  points in white or with  their
  original   image  color.  
$END ---------------------------------------------------------------------
$DEB 412 000 000 000 000 Change  Saved  Graph  Name  
 This function changes the file name of the saved graphics 
 file, which is  implicitly  named  SPHINX_GRAPHX  in the 
 default start-up  directory.  By clicking on the  "Record"
 button the  function  verifies  the file' s status  and 
 warns the user if it  already  exists.
  
$END ---------------------------------------------------------------------
$DEB 413 000 000 000 000 Import  Graph  From File
  This function  allows you to plot graphics using  existing
  data in an ASCII file.  
  Two  options are  offered:
  "Lines ":  for line graphs 
  "Scatter":  for scatter plots

The "Lines  skipped" box allows you to skip a defined number
 of lines at the beginning of a file (implicitly zero).
 "Nb Columns" defines the number of graphics  (implicitly 1,
 and x being  the data  number).  The  data are  expected  to be
 arranged  in the  format:  x y1 y2 ...  yn.  
 "Nb  Lines" is either calculated by the program or given by 
 the user.
$END ---------------------------------------------------------------------
$DEB 600 000 000 000 000Print color image
This function sends an image file to print by a PaintJet
or  PostScript  printer.  The file is either written to
the disk file SPHINX_PJETn (n is  incremented  with  each 
usage)  or sent  to the  print spooler. 

The user  selects:
- the image  quadrant  or the area to print
- the printing (or  suppression) of the color bar
- the  number of  copies
- the  output:  PostScript  or PaintJet

$END ---------------------------------------------------------------------
$DEB 606 607 000 000 000Print a Grey Level Image
This function prints an 8 bit image in 16  shades of gray
on a laser  printer.
It calculates a standard scale, stretched between 0 and 255
in increments of 16.  In the first menu the user can reduce
or expand  the  scale in  order to  adjust  the  contrast
for printing.  Several  options  are  available:
 - high  value scaling
 - lower value scaling
 - histogram stretch by area
 - permanently saving the gray scale

High (low) values scaling is done by placing the cursor on
the new maximum  (minimum).  Then by  clicking  on the right
button  and moving  the mouse,  the new  scale is  displayed.
Keeping  the  button pressed,  you can stretch the scale.
All the pixel  values outside  the  limit  appear  as  either
black  or  white.

Histogram stretch  automatically  calculates the scale in a
rectangular  area  defined  by the user.

When the scale is adjusted  correctly,  PRINT  brings up
the print menu.  The result is always written to the file
SPHINX_GJETn  (where n is incremented with each  execution).
The user selects:  
- the quadrant or the area using the mouse 
- the printing (or suppression) of the gray scale bar 
- the number of copies 
- the  output:  PostScript  or  PaintJet
$END ---------------------------------------------------------------------
$DEB 603 000 000 000 000Scale 24 bits to 8
This function transforms a 24 bit image into an 8 bit image.
The   algorithm   regroups   pixel   classes  into  a  three
dimensional space.  The RGB components of the classes become
the color  table and the  number of the class  replaces  the
original   pixel   values.  The  result  is  arranged  and
displayed  in the  blue  plane.

$END ---------------------------------------------------------------------
$DEB 608 000 000 000 000Scale 24 bits to 8  (3/3/2)
This function  transforms an 8 bit image into a 24 bit image
using a 3/3/2 coding algorithm.  For the R and G components,
it keeps 3 bits, and for the B  component  it only  keeps 2.

$END ---------------------------------------------------------------------
$DEB 609 000 000 000 000Scale 8 Bits to 24
This  function  generates  a 24 bit  RGB
image using an 8 bit image and its  COLORMAP.  The  original
image  pixels are replaced by their  corresponding  color in
the  COLORMAP.

$END ---------------------------------------------------------------------
$DEB 008 000 000 000 000Pixel Values
A pixel' s position and value is  displayed by placing the
cursor over the pixel and clicking the right mouse button.
The values of the current plane are automatically displayed.
The  "All  channels" option   provides   the  values  of the
3  planes.

RECORD memorizes   the   positions   and  values  of  pixel  
values designated in the file SPHINX_VALn, (where n is 
incremented at each  execution).  
PHYSICAL  VALUES  opens a dialog  that allows you to select
the coefficients of a binomial equation ax + b that is  
applied to the pixel  values.  These  values are  taken  into
account  by the  graphing  functions.  
NEW COORDINATES  opens a dialog  that  allows you to change
the coordinates  x  and  y  (implicitly  between  0  and  1023).
MAGNIFY  enlarges a small area around the cursor by a factor
of 4 at each  selection in order to more  accurately  select
the  pixels.
$END ---------------------------------------------------------------------
$DEB 010 000 000 000 000Zoom
The ZOOM  function  enlarges  the image center  around the
cursor  position.  The zoomed image is placed in the A or B
quadrant  and can  itself be zoomed again.

The  effects  of ZOOM are lost as soon as you  leave the  
function.  If you want to  retain a zoomed  image,  you must
use the IMAGE  RESIZE  function in the EDIT menu or the
EXPAND  function in the MOVE  EXCHANGE  ROTATE menu.
If you want to save an image created with the ZOOM  function,
then before leaving the function you must call up the main
Sphinx menu  (clicking  with the left  button  in the Sphinx
MENU area) and copy the  zoomed  image  using  the MOVE  
EXCHANGE ROTATE  function.

MAGNIFY zooms a small image area outlined by the cursor.
The glass  window is activated  by using the right  mouse  
button.  The left  button  increases  the zoom factor.
ROAM multiplies a 1024 image by a factor of 2 or 4.
The screen  size  displays  the  geometry  of origin and the
cursor  position on the screen  determines  the zoomed  area
displayed.
RESET returns to the original  zoom factor.
$END ---------------------------------------------------------------------
$DEB 214 414 000 000 000Refresh
This function refreshes the screen and redisplays the image.
 All the graphic elements (text, lines,  contours,  symbols,
 etc.)  that have been superimposed on the image are erased,
 except  for  those  that have  been  merged  with the image
 (e.g., MERGE WITH IMAGE function).
 
$END ---------------------------------------------------------------------
$DEB 011 000 000 000 000Iconify Sphinx

 ICONIFY  Sphinx  redisplays  the  screen  as it was  before
 launching the Sphinx  program.  To return to Sphinx,  click
 on the  Sphinx  icon.
 
$END ---------------------------------------------------------------------
$DEB 900 000 000 000 000Satellite Signal Simulation
This function  calculates the satellite  signal  sensitivity
from 0.25 to 4.0  microns  in a  cloud-free  atmosphere.  It
takes into account the principal atmospheric effects, namely
molecular and aerosol  diffusion and gas absorption by water
vapor, carbon dioxide, oxygen, and ozone.
The effects of a heterogeneous  surface can be  approximated.

The  following data are required:
- the geometric viewing  conditions
- an atmospheric  model and its gas  components
- aerosol  model with  types  and  concentrations
- spectral  conditions
- surface reflectance  properties, including type and spectral
variation   

It  is   possible   to  take into account a heterogeneous
surface characterized by a circular target for which you can
specify the radiation,  the reflectance, and the reflectance
of the  surrounding  environment.
At each step you can either  define your own  conditions or
choose a model  from  the  listing  of  standard  models
(taking  as spectral  conditions,  for instance, the spectral
bands of a given satellite).

Limitations: 
- Viewing geometry:  the solar and  satellite  zenith 
  angles must be less than 60 and 50   degrees,   respectively.
- Atmospheric   model:  no limitations. 
- Aerosol  model:  the horizontal  visibility introduced must
  be   greater   than  5  km.
- Spectral conditions:  the gas  transmission  and phase
  functions are correct  between 0.25 a nd 4.0 microns,
  but the treatment of the  interaction   between   absorption
  and  scattering  is inaccurate for large absorption values.
  If a calculation of the  signal  within  the  absorption
  band is  needed,  this interaction  must be  reconsidered. 
- Surface  reflectance (spectral variation):
  Four base reflectances are supplied for a predefined spectral
  range.  The predefined  spectral domain is different depending
  on the case, and  reflectance is  considered zero  outside the
  imposed  limits.  The user must verify  these  limits.

 Geometric  conditions: 
-METEOSAT  Observations:  Provide  the Julian day, GMT
 time, the number of  columns,  the number of lines  
 (total  scale: 5000 x 2500)
-GOES EAST  Observations:  Provide  the Julian day, GMT
 time, the  number of  columns,  the  number of lines  (total
 scale:  15288 x 14568).
-GOES   WEST   Observations:  Provide the Julian day, GMT
 time, the number of  columns,  the number of lines
 (total scale:  15288 x 14568).
-AVHRR (NOAA8,  NOAA9, NOAA10, NOAA11) Observations:
 Provide the Julian day, GMT time, the number of columns
 (1-2048), the  longitude  and the time of the satellite's
 ascending node.
-HRV (SPOT)  Observations:
Provide  the  Julian  day, GMT time  and the  longitude  and
latitude  of  the  center  of  the  observation  scene.
-TM (LANDSAT)  Observations: Provide the Julian day, GMT
time and  the  longitude  and  latitude  of  the  center
of  the observation   scene.

Conventions:
Time  is  denoted  as Greenwich Mean Time (GMT):  (hh.ddd).
Sign  conventions for latitude  and  longitude  are:
north  latitude  > 0 ; south latitude < 0
east longitude > 0 ; west longitude <0

If these predefined  conventions  are not convenient,
you can define your own conventions by introducing the:
- solar zenith angle  (degrees)
- solar azimuth angle (degrees)
- satellite zenith angle (degrees)
- satellite azimuth angle (degrees)

Atmospheric  Model: 

You  can  select  one  of the  standard atmospheric
profiles (taken from the LOWTRAN program) 
 - no  gas  absorption
 - tropical 
 - midlatitude   summer
 - midlatitude  winter 
 - subarctic summer
 - subarctic  winter
 - US standard 62
If these standard  profiles are not adequate, then you can
select the concentration in absorbing gases and water vapor
(in this case, the  atmospheric  model is the US standard 62):
- uw (in g cm-2)
- uo3 (in cm-atm)
You can also define an atmospheric profile by employing
radiosondes over 34  levels. 
- altitude  (in km)
- pressure  (in mb)
- temperature (in K)
- H2O concentration  (in g m-3)
- O3 concentration  (in g m-3)

Aerosol  Model:
The user can  choose one  of the  following  standard
aerosol  models:
- no aerosols
- continental  model
- maritime model
- urban model
If these standard models are not  appropriate,  then you can
introduce  your own aerosol  model by defining  the fraction
(between  0 and 1) of each  component:
  -  volumic  % of dust -like
  -  volumic  % of  water-soluble
  -  volumic  % of oceanic 
  -  volumic % of soot 
  
Aerosol  concentration:
The user can fix the aerosol  concentration  by either
entering the meteorological  visibility  parameter in km
(the aerosol optical  thickness  is  then  calculated  using
a  standard profile)  or  by  directly   setting the aerosol
optical thickness  to the 550 nm wavelength (for this option
the visibility   is  zero).  

Data   defining   the   spectral conditions:
You can select  one of the  following  spectral bands:

METEOSAT     vis.  band 0.350 1.110
GOES EAST    vis.  band 0.490 0.900
GOES WEST    vis.  band 0.490 0.900
AVHRR NOAA8 1st band 0.500  0.740 2nd band 0.690  1.080 
AVHRR NOAA9 1st band 0.490 0.820 2nd band 0.640 1.190
AVHRR NOAA10 1st band 0.540 0.780 2nd band 0.600 1.200 
AVHRR NOAA11 1st band 0.540 0.800 2nd band 0.600 1.100 
HRV SPOT 1st band 0.460  0.710 2nd band 0.590 0.760 
         3rd band 0.740 0.950 
TM LANDSAT5  1st band 0.430 0.550 2nd band  0.500  0.650 
             3rd band  0.590  0.750 4th band 0.730  0.945 
	     5th band 1.515  1.870 7th band 1.975  2.405
MSS LANDSAT5  1st band 0.475 0.640 2nd band 0.580 0.750
              3rd band 0.655 0.855 4th band 0.785 1.100

If these conditions are not fully  appropriate,  you can
also  define your own  spectral conditions  using: 
- a unique  wavelength  in  micrometers, permitting a 
monochromatic  calculation  (the gas absorption is taken
into account) 
- the spectral boundaries (the filter function  will be 
equal to 1 over  the  entire  band)
- the spectral  boundaries  and a filter  function  defined
using 0.005 micron intervals

Surface reflectance:

You can select a homogeneous  surface, which  introduces the
 surface   reflectance,   or  you  can  define  a  composite
 structure  formed of a circular target having radiance data
 of reflectance (r c) in an environment  of  reflectance  (r
 e).  The data are:  
 - the reflectance of the target (r c) 
 - the  reflectance of the  environment 
 - the radiation of the target in km 
 
Surface  reflectance  (spectral  variation):
 The spectral  dependence of the surface  reflectance can be
 fixed  according to the following  options:  
 - a constant r value (or r c, or r e) that is independent
 of wavelength 
 - an r value (or r c, or r e) given by 0.005 micron intervals
 between  the  spectral   boundaries  (if  the  bands  of  a
 satellite  are used, refer to the  corresponding  limits) 
 - the spectral reflectance of green vegetation 
 - the spectral reflectance  of clear water 
 - the spectral  reflectance  of sand 
 - the  spectral  reflectance  of lake  water 
 
 Results presentation:

The  SPHINX_5Sn  file  contains  full  results  as well as a
comparison between the simulation  employing the
approximate equations  and a more  precise  numerical  model
(using the successive  diffusion  orders  method).  The  
comparison  is completed for the  wavelength  and the 
geometric  conditions closest to the user' s, according to 
the following  table of values:  
theta s 15, 41, 60, 75 degrees  
theta v 00, 10, 20, 30, 40  degrees  
phi v - phi s 00, 90,  180  degrees  
lambda 0.450, 0.550, 0.650, 0.850, 1.600, 2.200 microns  
visibility 50,  23, 08, 05 km 

The  wavelength  used  is the  wavelength equivalent  to the
observing  spectral  band.  The  surface reflectance  used is
the surface  reflectance  equivalent to the  surface   target
in  this  spectral  band.  A  graphic representation is 
displayed showing the incident solar angle (in red) and the 
satellite viewing angle (in magenta) over a planisphere  
background.  The vertical to the  sub-satellite point is shown
in green.
$END ---------------------------------------------------------------------
$DEB 500 000 000 000 000Solar Zenith Angle Calculation

This function  calculates the height and the solar azimuth
angle for a surface  point and at a given  instant.
The data  can be  supplied  in  either format:
day/month  or  Julian  day.  
$END ---------------------------------------------------------------------
$DEB 012 000 000 000 000 Warper  
This  function allows you to  superimpose  512 x 512 image
projections  in various  geometries. The four A, B, C, and
D quadrants  are used as:
A: the reference  image
B: the warp image
C: the zoom over  reference  image
D: the zoom over warp image

Before using the WARPER  function,  you must first place the
reference  image in the A  quadrant  and the warp image into
the B  quadrant.  The  zooms  in the C and D  quadrants  are
designed to  facilitate  entering the  landmarks  and can be
reselected  with the left button from the A and B quadrants.

To begin,  introduce  the  landmarks  by  clicking on SELECT
MATCHING  POINTS and then enter the pixel pairs by  clicking
the right mouse button on the reference  image  (quadrant A
or C) and then on the warp image.  In this sequence, you can
also click with the left button in the A or B  quadrants  or
move the zoom  area.  

If you make a mistake,  the last pixel pair entered can be
undone by clicking on DELETE LAST ENTRY.

After each  entry,  Sphinx  displays:  
-  the number of pairs entered  
-  the  development  order  of  polynomials  
-  the standard deviation of the ensemble of landmarks 

As soon as 4 landmarks have been entered, Sphinx displays
in quadrant B a preview of the  landmark  selected in A.
If the  landmarks are  chosen  judiciously,  each  successive
preview  should confirm the  process.  
You can also  determine  when you can proceed to the 
calculation phase.

To proceed to the  calculation  phase,  click on SHOW
RESULT (VIS.  BANK) or SHOW RESULT (ALL   BANKS).
Once  the calculation  has finished, the result  
(image B  transformed into  the  geometry  of  A)  
is  displayed  in  quadrant  C.  Quadrant D displays the
difference between A and C.  

If you do not  find  the  results  satisfactory,  you can
add  new landmarks  by  clicking  again on  SELECT
MATCHING  POINTS.

Note:  The development  order of a polynomial can be imposed
by  the  user.  The  coordinates  of the  landmarks  can  be
written   in   a   file.  
Note:   Although   the   algorithm interpolates  correctly,
it extrapolates  fairly poorly.  It is  therefore   desirable
to   distribute   the   landmarks judiciously  over the image.
$END ---------------------------------------------------------------------
$DEB 909 000 000 000 000Orbit Simulation

This function displays a map of the globe with lines 
graphing a satellite orbit on the surface.
The user can modify any  parameter of the  satellite 
orbitography  and redraw the new orbits.

$END ---------------------------------------------------------------------
$DEB 908 000 000 000 000 3D Image Projection

This function constructs a 3D image using a series of 512
images.

The AB quadrant or  (AB,AG,AR in true color  mode) contains
       the lower  image  projection  (e.g., land).
The BB quadrant contains the elevation of each pixel in the
       AB image  (e.g., land mo del).
The CB or  (CB,CG,CR) quadrant  contains the upper image
       projection (e.g., clouds).
The DB quadrant  contains the elevation of each pixel in the
       CB  image  (e  .g.,  cloud  altitude).  
The  BB,  CB  and DB quadrants can remain empty.
The user determines the viewing angles  for the  projection
and  selects  the  quadrant  to display  the  3D  image.
$END ---------------------------------------------------------------------


Development  of  External Programs

General Principals
External programs can be used to read a Sphinx  image,
process  the  image, and then return the results to Sphinx.
These  programs can also pass parameters  entered by the user
when  running  the  program.
Three examples of external  programs are delivered  with the
Sphinx  package.  The  source  codes  are  contained  in the
Sphinx  examples  directory.  The external  programs must be
linked with the extlib.a  library located in the Sphinx lib'
directory.  WARNING:  the  linking  must  also be done  with
FORTRAN   libraries.

Interface   Functions
To communicate  with Sphinx, three  functions are available: 

{ sphinx_get_para}(size_x,  size_y, red, green,  blue,
input_parameters,  user_message)

input  data:
char  * input_parameters;  output  data  char  *  user_message; 
int size_x, size_y, red, green, blue;

This function decodes the file (tmp)sphinx_sema* and returns
the image size  information  in lines and  columns  (size_x,
size_y ) as well as the three pointers  specifying  the red,
green or blue planes if they are  different  than zero.  The
user_message  field c orresponds to editor messages that are
provided  by  the  user  when  using  the   program.

{ sphinx_read}(input_parameters,    red_image,    green_image,
blue_image)

input data:  char * input_parameters; 

output data: unsigned char *red_image,*green_image,*blue_image;

This  function   reads  images   transmitted  by  Sphinx.

{ sphinx_write}(input_parameters,    red_image,   green_image,
blue_image)

This function  returns the externally  processed
image back to Sphinx.

FORTRAN program example for Silicon graphics  computer

program mire
character  *140  parameter, user_message
logical    red,   green,   blue
character red_ima(1024*1024)
character green_ima(1024*1024)
character blue_ima(1024*1024)
integer   colonne_nb,   raw_nb

c  Get external  parameter
call  getarg(1,  parameter)

c Get sphinx parameters
call  sphinx_get_para(colonne_nb,  raw_nb,  red,
green, blue,  parameter,  user_message)

c Read sphinx images
call sphinx_read(parameter,  red_ima, green_ima, blue_ima)

c User  main  computations  c  Send  results  to  sphinx  call
sphinx_write(parameter,  red_ima, green_ima,  blue_ima)
stop
end

FORTRAN  program  example  for  Hewlett  Packard
computer program mire (parameter)
character *140 parameter, user_message 
logical    red,   green,   blue
character red_ima(1024*1024) character green_ima(1024*1024)
character blue_ima(1024*1024)
integer colonne_nb, raw_nb

c Get sphinx parameters 
call  sphinx_get_para(colonne_nb,  raw_nb,  red,
green, blue, parameter,  user_message)
.......  identical to previous program ....

C  program  example

main(argc,  argv)
int argc;  char *argv[];
{
char  user_message[140];
int red, green,  blue, colonne_nb   raw_nb,   size;
unsigned  char   *red_ima, *green_ima,   *blue_ima;

/*  get  sphinx  parameters  */
   sphinx_get_para(&colonne_nb,   &raw_nb,   &red,   &green,
   &blue,               argv[1],               user_message,
   strlen(argv[1]),strlen(message));
   printf("  image  size: %d X %d' ,  colonne_nb,  raw_nb);
   printf("  input images red:  %d green:  %d blue:
   %d red, green, blue);
   printf(" user message:  %s user_message);
   /* memory allocations */
   size = colonne_nb * raw_nb;
   red_ima = (unsigned  char *) malloc(  size );
   green_ima =  (unsigned  char *) malloc( size );
   blue_ima = (unsigned  char *) malloc(  size );
   /* get sphinx input data */
   sphinx_read(  argv[1],  red_ima,
   green_ima, blue_ima,  strlen(argv[1]), size, size, size);
   /* User main  computation */
   /* Send results to sphinx */
   sphinx_write(   argv[1],  red_ima,  green_ima,  blue_ima,
   strlen(argv[1]), size, size, size);
 }


 Updating the wind_file_EXTS File

This file is  located  in the  Sphinx  files  directory.  It
contains the list of external  programs that are accessed by
Sphinx.  Two lines are required per program:  the first line
indicates the absolute file name of the executable file, and
the second line is a label which is displayed  under Sphinx'
s external functions menu.


Files Accessed by Sphinx

These files  reside in the Sphinx  "files"  directory.  They
 are normally under write file protection and can be neither
 modified nor deleted  (except files as described  above and
 below that are  specifically  adapted to the  environment).

 SPHINX_CAN_DIR    The   on-line    English    manual
 SPHINX_CFR_DIR  The  on-line  French  manual
 security  The authorization key
 COMPTA Sphinx utilization  statistics

 vidcolorpost The script shell for printing to a PostScript
 color printer (MUST BE ADAPTED TO THE  ENVIRONMENT)
 vidlas The script  shell for  printing  to a  LaserJet
 HP printer (MUST BE ADAPTED TO THE  ENVIRONMENT)
 vidlaspost  The script shell for  printing to a black
 and white  PostScript printer (MUST BE ADAPTED TO THE 
 ENVIRONMENT)
 vidpaint The script shell for printing to a PaintJet
 printer  (MUST BE ADAPTED TO THE ENVIRONMENT)
 wind_file_EXTS The list of external  programs 
 (MUST BE ADAPTED TO THE  ENVIRONMENT)

 The files  below are only used by the  functions  for orbit
 simulation  or  satellite  signal  processing.  They can be
 omitted if these  functions are not  utilized.
WD_MaxH The  altitudes of the globe by intervals of 1/3 of a degree
 WD_PriS The index  characterizing the surfaces of the globe
 coastfile.bin The continental contours
 5S_File The constants used for the satellite  signal modeling 
 
 The files below  are only  used by the test  functions.
 They  can be omitted   if  these   functions   are  not   utilized.
 ima_test.R.Z   Test   image 
 ima_test.G.Z    Test   image
 ima_test.B.Z Test image 
 
 Files Created by Sphinx

The location of temporary files (tmp) can be directed to any
  directory.  If you do not have enough  space in  /usr/tmp,
  you can  launch  Sphinx  using the option -U dir, with dir
  being  the  directory  name in  which  Sphinx  places  its
  temporary  files. 
  Example:  Sphinx -U /WORK/tmp A list of files or temporary 
  files produced by Sphinx follows.
  
  ($HOME/).SP_ALGEBRA  Saves the  equations  (IMAGE  ALGEBRA
  menu)
  ($HOME/).sphinx_fmt   User   specific   image description
  (tmp/)sphinx_masked Temporary file used to
  memorize the masked planes
  (tmp/)sphinx_crt0 Temporary file 
  (tmp/)sphiNx_crt0  Temporary file
  (tmp/)sphiMx_crt0 Temporary   file
  (tmp/)sphinxG_crt0    Temporary   file
  (tmp/)sphinx_data*   Temporary  files  for   communicating
  (tmp/)sphinx_sema*     with    the    external    programs
  (./)clsize.rs  CLUSTER  ANALYSIS  results
  (./)SPHINX_CLAn PIXEL CLASSIFICATION  results
  (./)SPHINX_FT Saves FOURIER function
  (./)SPHINX_GJETn  Printing of LaserJet  gray
  scale   images
  (./)SPHINX_GRAPHX   Saves   graphics
  (./)SPHINXGRAXYn     Extracted     data    from     graphs
  (./)SPHINX_LJETn   Printing  of  LaserJet   graphics
  (./)SPHINX_PCAn  PRINCIPAL COMPONENTS ANALYSIS results
  (./)SPHINX_PJETn   Printing  of  PaintJet   color   images
  (./)SPHINX_PSn    Printing    of    PostScript    graphics
  (./)SPHINX_PSCn  Printing of  PostScript  color images
  (./)SPHINX_PSGRn  Printing of PostScript gray scale images
  (./)SPHINX_VALn      PIXEL     VALUES     results
  (./)SPHINX_WARPERn   WARPER   results 
  (./)SPHGRAXYn EXTRACT    VALUES    results   in   
  REDRAW   SAVED   GRAPH
  (./)SPHINX_5Sn  SATELLITE  SIGNAL  SIMULATION  results
  (./)SP_ALGEBn IMAGE ALGEBRA real results
  (./)Save_ContV.R (.G .B) Save session files 
  (./)Save_Cont.CM  Save session files 
  (./)Save_ContM.R  (.G .B) Save  session  files
  
$END ---------------------------------------------------------------------
