All sources and documentation are provided in a compressed tar file named triton.tar.Z. First the file triton.tar.Z must be uncompressed; use the following commands:
tar -xvf triton.tar
The previous command rebuild all necessary directories. Once you have uncompress the files, you should find the following items in the current directory:
TRiton: a Motif resource file to configure parts of the graphic interface ( see "Configuring Triton").
triton: a shell script used to run the program ( see "Configuring Triton").
c/ : a directory containing the C routines and a local makefile to build their object modules.
fort/ :a directory containing the Fortran 77 routines and a local makefile to build their object modules.
anytopgm: a shell script using Pbmplus routines to convert many image file formats to PGM file format.
samples/ : a directory containing sample images to begin with.
help/ : this directory contains PostScript and HTML versions of this documentation.
Compiling and linking Triton:
First, edit the file Makefile and set the compilation variables as suggested in the makrfile. Some examples for different machines are suggested as comments in this makefile.
IMPORTANT: the means to call Fortran functions from C is machine dependent: on some computers you must add an underscore (_) at the end of Fortran function names in the C calling programs. If this is the case, edit the file Makefile in the directory "Triton" and modify the definition of the variable CDEFINE as explained at the beginning of this file Makefile.
To build the executable file triton_bin, move to the directory Triton and execute the following command:
Once the compilation and link operations have been successfully performed, the executable file triton_bin has been created, and is located in the current directory.
Configuration of Triton:
This is last step of the installation. Triton may be used by several users. The unique copy of the binary executable file triton_bin and the shell script named "anytopgm" ( the script file for conversions) must be accessible for each user.
The file TRiton ( containing the resources to configure the Motif interface) should have unique copy in a directory readable by any user; you will have to give in the script file "triton" the location of this resource file.
On the contrary, each user must have its own copy of the shell script "triton". This file must be manually modified: edit the script file triton and set the environment variables according to the recommandations provided as comments. Here is the listing of the script triton:
#!/bin/sh # Triton software needs the definition of the following environment # variables: # PBMPATH is the path to the pbmplus routines on your machine. # These routines are used in Triton to read and write images # in convenient file format ( such as TIFF, GIF, PNM...). # If pbmplus is not installed on your machine, triton will # still run but with LMCP, raw and PGM file formats only. PBMPATH= if [ a$PBMPATH != a ] && [ -d $PBMPATH ]; then PATH=$PATH:PBMPATH export PATH fi # LOGFILE is the name (and the path) of the Triton logfile, # which keep a trace of each operation and error during a # Triton session. This variable should be set by each user # in its copy of this script. For instance, one may use the # PWD environment variable representing the current directory. LOGFILE="$PWD/triton.log" export LOGFILE # HELP_BROWSER is the name of your HTML text browser to # display help files while running Triton. If you don't have # such a browser, Triton will still run correctly but you won't have # in line help. # This variable may be set by each user in its copy of this script. HELP_BROWSER="netscape " export HELP_BROWSER # HELP_FILE contains the location and name of the HTML # file notice.html provided in Triton package. # This variable should be set by the "installer". It should # be a in directory readable by any user. HELP_FILE="/home/quartz_u2/pilard/public_html/Triton/index.html" export HELP_FILE # XAPPLRESDIR is the path to the Triton Motif resources file, named TRiton in # any case. A user wanting its own TRiton resources file must set # the variable XAPPLRESDIR to the correct path for TRiton. XAPPLRESDIR="/home/quartz_u2/pilard/Triton/" export XAPPLRESDIR PBMPLUS_EXIST="true" pnmfile << EOF > /dev/null 2>&1 P2 100 100 255 EOF if [ $? != 0 ] ; then echo "============================================" echo "= PbmPlus is not installed on this machine.=" echo "= Hence you can use only LMCP, PGM =" echo "= raw image file formats. =" echo "============================================" PBMPLUS_EXIST="false" fi export PBMPLUS_EXIST # triton_bin is the binary executable file for Triton # This command should be set by the "installer". /home/quartz_u2/pilard/bin/triton_bin $*
If any assistance is required, please contact the authors.
I. Using Triton
II. Example of treatment using Triton