r6: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 28 Apr 2000 14:14:16 +0000 (14:14 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 28 Apr 2000 14:14:16 +0000 (14:14 +0000)
13 files changed:
include/Makefile.am
include/ascii.h
include/cio.h
include/ct.h
include/ezplot.h
include/getargs.h [deleted file]
include/ir.h
include/keyboard.h
include/kmath.h
include/kstddef.h
include/pol.h
include/sdf.h
include/sgp.h

index 60b9d3273609d53d310542e6a59af641f98a29ef..d821d3ac1984aa557dc04fe1dc809ff27fe3b289 100644 (file)
@@ -1 +1 @@
-noinst_HEADERS=ascii.h cio.h ct.h ezplot.h getargs.h ir.h keyboard.h kmath.h kstddef.h pol.h sdf.h sgp.h
+noinst_HEADERS=ascii.h cio.h ct.h ezplot.h ir.h keyboard.h kmath.h kstddef.h pol.h sdf.h sgp.h
index 44c6b5570d042b1bee836d1601c1d09099b96c95..f74fe1cea1eddb0f16528e291a98c1e0482c4b2c 100644 (file)
@@ -1,58 +1,81 @@
-/******************************************************************************\r
- *\r
- * FILE IDENTIFICATION\r
- *\r
- *     File Name:      ASCII.H\r
- *     Author:         Kevin Rosenberg\r
- *     Purpose:        Header file with definitions for ASCII characrers\r
- *      Date Started:  Jan 84\r
- *\r
- * DESCRIPTION\r
- *     Header file contains values for ASCII characters\r
- *\r
- * MODIFICATION LOG\r
- *\r
- *****************************************************************************/\r
-\r
-#ifndef ASCII_H\r
-#define ASCII_H\r
-\r
-#define BACKSPACE  8\r
-#define LF     0x0A\r
-#define CR     0x0D\r
-#define BELL   0x07\r
-\r
-#define SQUOTE    '\''\r
-#define DQUOTE    '\"'\r
-#define BSLASH    '\\'\r
-#define BACKSLASH '\\'\r
-#define SHARP     '#'\r
-#define SLASH     '/'\r
-#define ASTERICK  '*'\r
-#define COLON    ':'\r
-#define LBRACE    '{'\r
-#define RBRACE    '}'\r
-#define LPAREN   '('\r
-#define RPAREN    ')'\r
-#define LBRACK   '['\r
-#define RBRACK   ']'\r
-#define LANBRACK  '<'\r
-#define RANBRACK  '>'\r
-#define SEMICOL   ';'\r
-#define UNDERLIN  '_'\r
-#define COMMA    ','\r
-#define CARET    '^'\r
-#define TILDE    '~'\r
-#define ATSIGN   '@'\r
-#define AMPERSAND  '&'\r
-#define EXCLAM   '!'\r
-#define DOLLAR   '$'\r
-#define PERCENT   '%'\r
-#define PLUS     '+'\r
-#define HYPHEN   '-'\r
-#define EQUALS   '='\r
-#define QUESTION  '?'\r
-#define PERIOD   '.'\r
-#define VERTBAR   '|'\r
-\r
-#endif /* #ifndef ASCII_H */\r
+/*****************************************************************************
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: ascii.h,v 1.2 2000/04/28 14:14:16 kevin Exp $
+**  $Log: ascii.h,v $
+**  Revision 1.2  2000/04/28 14:14:16  kevin
+**  *** empty log message ***
+**
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
+/******************************************************************************
+ *
+ * FILE IDENTIFICATION
+ *
+ *     File Name:      ASCII.H
+ *     Author:         Kevin Rosenberg
+ *     Purpose:        Header file with definitions for ASCII characrers
+ *      Date Started:  Jan 84
+ *
+ * DESCRIPTION
+ *     Header file contains values for ASCII characters
+ *
+ * MODIFICATION LOG
+ *
+ *****************************************************************************/
+
+#ifndef ASCII_H
+#define ASCII_H
+
+#define BACKSPACE  8
+#define LF     0x0A
+#define CR     0x0D
+#define BELL   0x07
+
+#define SQUOTE    '\''
+#define DQUOTE    '\"'
+#define BSLASH    '\\'
+#define BACKSLASH '\\'
+#define SHARP     '#'
+#define SLASH     '/'
+#define ASTERICK  '*'
+#define COLON    ':'
+#define LBRACE    '{'
+#define RBRACE    '}'
+#define LPAREN   '('
+#define RPAREN    ')'
+#define LBRACK   '['
+#define RBRACK   ']'
+#define LANBRACK  '<'
+#define RANBRACK  '>'
+#define SEMICOL   ';'
+#define UNDERLIN  '_'
+#define COMMA    ','
+#define CARET    '^'
+#define TILDE    '~'
+#define ATSIGN   '@'
+#define AMPERSAND  '&'
+#define EXCLAM   '!'
+#define DOLLAR   '$'
+#define PERCENT   '%'
+#define PLUS     '+'
+#define HYPHEN   '-'
+#define EQUALS   '='
+#define QUESTION  '?'
+#define PERIOD   '.'
+#define VERTBAR   '|'
+
+#endif /* #ifndef ASCII_H */
index afc0444d02e02a7699514db2503e559376fa742a..9229fc034430c51de7c7db9a584100aef512c223 100644 (file)
@@ -1,3 +1,26 @@
+/*****************************************************************************
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: cio.h,v 1.3 2000/04/28 14:14:16 kevin Exp $
+**  $Log: cio.h,v $
+**  Revision 1.3  2000/04/28 14:14:16  kevin
+**  *** empty log message ***
+**
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
 #ifndef __CIO_H
 #define __CIO_H
 
index 0ad813e2f5f189982d7d3b53ca98e8077f3080f7..e7f29e9f63f19a801bd74e8cbd0b7d2ab72f69dd 100644 (file)
@@ -1,75 +1,92 @@
-/*---------------------------------------------------------------------*/\r
-/*                 HEADER FILE FOR TOMOGRAPY SYSTEM                   */\r
-/*---------------------------------------------------------------------*/\r
-\r
-#ifndef CT_H\r
-#define CT_H\r
-\r
-#ifdef HAVE_CONFIG_H\r
-#include <config.h>\r
-#endif\r
-#ifdef HAVE_PNG\r
-#include "png.h"\r
-#endif\r
-#ifdef HAVE_STDIO_H\r
-#include <stdio.h>\r
-#endif\r
-#ifdef HAVE_STRING_H\r
-#include <string.h>\r
-#endif\r
-#ifdef HAVE_STDDEF_H\r
-#include <stddef.h>\r
-#endif\r
-#include <stdlib.h>\r
-#ifdef HAVE_STDARG_H\r
-#include <stdarg.h>\r
-#endif\r
-#ifdef  HAVE_SYS_TYPES_H\r
-#include <sys/types.h>\r
-#endif\r
-#ifdef HAVE_SYS_STAT_H\r
-#include <sys/stat.h>\r
-#endif\r
-#ifdef HAVE_CTYPE_H\r
-#include <ctype.h>\r
-#endif\r
-#ifdef HAVE_MATH_H\r
-#include <math.h>\r
-#endif\r
-#ifdef HAVE_SYS_FCNTL_H\r
-#include <sys/fcntl.h>\r
-#endif\r
-#ifdef HAVE_FCNTL_H\r
-#include <fcntl.h>\r
-#endif\r
-#if defined(HAVE_GETOPT_H) || defined(HAVE_GETOPT_LONG)\r
-#include <getopt.h>\r
-#endif\r
-#ifdef HAVE_UNISTD_H\r
-#include <unistd.h>\r
-#endif\r
-#ifdef HAVE_SETJMP_H\r
-#include <setjmp.h>\r
-#endif\r
-\r
-#ifdef MPI_CT\r
-#include "mpi.h"\r
-#endif\r
-\r
-#include "kstddef.h"\r
-#include "kmath.h"\r
-#include "sgp.h"\r
-#include "sdf.h"\r
-#include "ir.h"\r
-#include "getargs.h"\r
-#include "keyboard.h"\r
-#include "cio.h"\r
-#include "ezplot.h"\r
-\r
-#ifndef basename\r
-extern char *basename (__const char *__filename);\r
-#endif\r
-\r
-\r
-#endif\r
-\r
+/*****************************************************************************
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: ct.h,v 1.2 2000/04/28 14:14:16 kevin Exp $
+**  $Log: ct.h,v $
+**  Revision 1.2  2000/04/28 14:14:16  kevin
+**  *** empty log message ***
+**
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
+/*---------------------------------------------------------------------*/
+/*                 HEADER FILE FOR TOMOGRAPY SYSTEM                   */
+/*---------------------------------------------------------------------*/
+
+#ifndef CT_H
+#define CT_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_PNG
+#include "png.h"
+#endif
+#ifdef HAVE_STDIO_H
+#include <stdio.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+#include <stdlib.h>
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+#ifdef  HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+#ifdef HAVE_SYS_FCNTL_H
+#include <sys/fcntl.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#if defined(HAVE_GETOPT_H) || defined(HAVE_GETOPT_LONG)
+#include <getopt.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SETJMP_H
+#include <setjmp.h>
+#endif
+
+#ifdef MPI_CT
+#include "mpi.h"
+#endif
+
+#include "kstddef.h"
+#include "kmath.h"
+#include "sgp.h"
+#include "sdf.h"
+#include "ir.h"
+#include "keyboard.h"
+#include "cio.h"
+#include "ezplot.h"
+
+#endif
+
index c5838c0a5bec1b765cc79d0e55e2d1e1527c82fe..26a4c34c09ae15e4bdfb94633c6df8233c2c4d76 100644 (file)
@@ -1,3 +1,26 @@
+/*****************************************************************************
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: ezplot.h,v 1.2 2000/04/28 14:14:16 kevin Exp $
+**  $Log: ezplot.h,v $
+**  Revision 1.2  2000/04/28 14:14:16  kevin
+**  *** empty log message ***
+**
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
 /*----------------------------------------------------------------------*/
 /*                             EZPLOT                                  */
 /*                                                                     */
diff --git a/include/getargs.h b/include/getargs.h
deleted file mode 100644 (file)
index dd5d8a9..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*      getargs.h       Typedefs and defines for getargs\r
- */\r
-\r
-\r
-#ifndef GETARGS_H\r
-#define GETARGS_H\r
-\r
-#define INTEGER         0\r
-#define BOOLEAN         1\r
-#define CHARACTER       2\r
-#define STRING          3\r
-#define PROC            4\r
-\r
-\r
-typedef struct\r
-{\r
-        unsigned        arg  :  7 ;     /* Command line switch          */\r
-        unsigned        type :  4 ;     /* variable type                */\r
-        int             *variable ;     /* pointer to variable          */\r
-        char            *errmsg   ;     /* pointer to error message     */\r
-}\r
-    ARG;\r
-\r
-#endif /* GETARGS_H */\r
-\r
index 407b02b541a8447a70b85c6601b52609a476c4cd..3493e75ac90769500fdc2e448fa2622b64a78643 100644 (file)
@@ -1,3 +1,30 @@
+/*****************************************************************************
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: ir.h,v 1.2 2000/04/28 14:14:16 kevin Exp $
+**  $Log: ir.h,v $
+**  Revision 1.2  2000/04/28 14:14:16  kevin
+**  *** empty log message ***
+**
+**  Revision 1.1.1.1  2000/04/28 13:02:43  kevin
+**  Initial CVS import for first public release
+**
+**
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
 /* FILE IDENTIFICATION
  *
  *     Name:         ir.h          Header File for Image Reconstruction System
index 8f867a9858106f6796d33ce177606d54a4edffa2..ed40b822e27f3ace23901061a6d19f6554c60420 100644 (file)
-/******************************************************************************\r
- *\r
- * FILE IDENTIFICATION\r
- *\r
- *     File Name:      KEYBOARD.H\r
- *     Author:         Kevin Rosenberg\r
- *     Purpose:        Header file for IBM-PC keyboard definitions\r
- *     Date Started:   Jan 85\r
- *\r
- * DESCRIPTION\r
- *\r
- * MODIFICATION LOG\r
- *\r
- *****************************************************************************/\r
-\r
-#ifndef KEYBOARD_H\r
-#define KEYBOARD_H\r
-\r
-#define KEY_BKSP        8\r
-#define KEY_TAB                 9\r
-#define KEY_RETURN     13\r
-#define KEY_ESCAPE     27\r
-\r
-#define KEY_HOME       0x4700\r
-#define KEY_UP         0x4800\r
-#define KEY_PGUP       0x4900\r
-#define KEY_LEFT       0x4B00\r
-#define KEY_CENTER     0x4C00          /* center of numeric keypad = 5 */\r
-#define KEY_RIGHT      0x4D00\r
-#define KEY_END                0x4F00\r
-#define KEY_DOWN       0x5000\r
-#define KEY_PGDOWN     0x5100\r
-\r
-#define KEY_F1         0x3B00\r
-#define KEY_F2         0x3C00\r
-#define KEY_F3         0x3D00\r
-#define KEY_F4         0x3E00\r
-#define KEY_F5         0x3F00\r
-#define KEY_F6         0x4000\r
-#define KEY_F7         0x4100\r
-#define KEY_F8         0x4200\r
-#define KEY_F9         0x4300\r
-#define KEY_F10                0x4400\r
-\r
-#define KEY_SHIFTF1    0x5400\r
-#define KEY_SHIFTF2    0x5500\r
-#define KEY_SHIFTF3    0x5600\r
-#define KEY_SHIFTF4    0x5700\r
-#define KEY_SHIFTF5    0x5800\r
-#define KEY_SHIFTF6    0x5900\r
-#define KEY_SHIFTF7    0x5A00\r
-#define KEY_SHIFTF8    0x5B00\r
-#define KEY_SHIFTF9    0x5C00\r
-#define KEY_SHIFTF10   0x5D00\r
-\r
-#define KEY_CTRLF1     0x5E00\r
-#define KEY_CTRLF2     0x5F00\r
-#define KEY_CTRLF3     0x6000\r
-#define KEY_CTRLF4     0x6100\r
-#define KEY_CTRLF5     0x6200\r
-#define KEY_CTRLF6     0x6300\r
-#define KEY_CTRLF7     0x6400\r
-#define KEY_CTRLF8     0x6500\r
-#define KEY_CTRLF9     0x6600\r
-#define KEY_CTRLF10    0x6700\r
-\r
-#define KEY_ALTF1      0x6800\r
-#define KEY_ALTF2      0x6900\r
-#define KEY_ALTF3      0x6A00\r
-#define KEY_ALTF4      0x6B00\r
-#define KEY_ALTF5      0x6C00\r
-#define KEY_ALTF6      0x6D00\r
-#define KEY_ALTF7      0x6E00\r
-#define KEY_ALTF8      0x6F00\r
-#define KEY_ALTF9      0x7000\r
-#define KEY_ALTF10     0x7100\r
-\r
-\r
-#endif /* #ifndef KEYBOARD_H */\r
+/*****************************************************************************
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: keyboard.h,v 1.2 2000/04/28 14:14:16 kevin Exp $
+**  $Log: keyboard.h,v $
+**  Revision 1.2  2000/04/28 14:14:16  kevin
+**  *** empty log message ***
+**
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
+/******************************************************************************
+ *
+ * FILE IDENTIFICATION
+ *
+ *     File Name:      KEYBOARD.H
+ *     Author:         Kevin Rosenberg
+ *     Purpose:        Header file for IBM-PC keyboard definitions
+ *     Date Started:   Jan 85
+ *
+ * DESCRIPTION
+ *
+ * MODIFICATION LOG
+ *
+ *****************************************************************************/
+
+#ifndef KEYBOARD_H
+#define KEYBOARD_H
+
+#define KEY_BKSP        8
+#define KEY_TAB                 9
+#define KEY_RETURN     13
+#define KEY_ESCAPE     27
+
+#define KEY_HOME       0x4700
+#define KEY_UP         0x4800
+#define KEY_PGUP       0x4900
+#define KEY_LEFT       0x4B00
+#define KEY_CENTER     0x4C00          /* center of numeric keypad = 5 */
+#define KEY_RIGHT      0x4D00
+#define KEY_END                0x4F00
+#define KEY_DOWN       0x5000
+#define KEY_PGDOWN     0x5100
+
+#define KEY_F1         0x3B00
+#define KEY_F2         0x3C00
+#define KEY_F3         0x3D00
+#define KEY_F4         0x3E00
+#define KEY_F5         0x3F00
+#define KEY_F6         0x4000
+#define KEY_F7         0x4100
+#define KEY_F8         0x4200
+#define KEY_F9         0x4300
+#define KEY_F10                0x4400
+
+#define KEY_SHIFTF1    0x5400
+#define KEY_SHIFTF2    0x5500
+#define KEY_SHIFTF3    0x5600
+#define KEY_SHIFTF4    0x5700
+#define KEY_SHIFTF5    0x5800
+#define KEY_SHIFTF6    0x5900
+#define KEY_SHIFTF7    0x5A00
+#define KEY_SHIFTF8    0x5B00
+#define KEY_SHIFTF9    0x5C00
+#define KEY_SHIFTF10   0x5D00
+
+#define KEY_CTRLF1     0x5E00
+#define KEY_CTRLF2     0x5F00
+#define KEY_CTRLF3     0x6000
+#define KEY_CTRLF4     0x6100
+#define KEY_CTRLF5     0x6200
+#define KEY_CTRLF6     0x6300
+#define KEY_CTRLF7     0x6400
+#define KEY_CTRLF8     0x6500
+#define KEY_CTRLF9     0x6600
+#define KEY_CTRLF10    0x6700
+
+#define KEY_ALTF1      0x6800
+#define KEY_ALTF2      0x6900
+#define KEY_ALTF3      0x6A00
+#define KEY_ALTF4      0x6B00
+#define KEY_ALTF5      0x6C00
+#define KEY_ALTF6      0x6D00
+#define KEY_ALTF7      0x6E00
+#define KEY_ALTF8      0x6F00
+#define KEY_ALTF9      0x7000
+#define KEY_ALTF10     0x7100
+
+
+#endif /* #ifndef KEYBOARD_H */
index a95c3c3c760e144f2155d5ad89d445647ff3aeec..b7cc5feb99a670c751a61a84df56e337af17da53 100644 (file)
@@ -1,3 +1,26 @@
+/*****************************************************************************
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: kmath.h,v 1.3 2000/04/28 14:14:16 kevin Exp $
+**  $Log: kmath.h,v $
+**  Revision 1.3  2000/04/28 14:14:16  kevin
+**  *** empty log message ***
+**
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
 /******************************************************************************
  *
  * FILE IDENTIFICATION
index 0d052f0ea2f1acdfd024dc2c239675c426e64d06..edb65093df35f013156dd4d0f53ea76d5d9edf83 100644 (file)
@@ -1,3 +1,26 @@
+/*****************************************************************************
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: kstddef.h,v 1.2 2000/04/28 14:14:16 kevin Exp $
+**  $Log: kstddef.h,v $
+**  Revision 1.2  2000/04/28 14:14:16  kevin
+**  *** empty log message ***
+**
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
 /******************************************************************************
  *
  * FILE IDENTIFICATION
@@ -21,7 +44,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdarg.h>
-#include "getargs.h"
 
 #undef SHELL
 
index 42afdad9a78824af3a0139628ff5e4e2154d44a7..b7a484b9135406e3c07320b2fc30339d5eee8b66 100644 (file)
@@ -1,3 +1,26 @@
+/*****************************************************************************
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: pol.h,v 1.2 2000/04/28 14:14:16 kevin Exp $
+**  $Log: pol.h,v $
+**  Revision 1.2  2000/04/28 14:14:16  kevin
+**  *** empty log message ***
+**
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
 #ifndef __H_POL
 #define __H_POL
 
index e22efe3ea718e213de2526463483e95531e39d5d..be1c7932d857ce503191f84be8988ef4023d051e 100644 (file)
-/* FILE IDENTIFICATION\r
- *\r
- *     Name:         sdf.h         Header file for Standard Data FIle system\r
- *     Programmer:   Kevin Rosenberg\r
- *     Date Started:  9-18-84\r
- *     Last Change:  12-24-84\r
- */\r
-\r
-#ifndef __H_SDF\r
-#define __H_SDF\r
-\r
-#include "kmath.h"\r
-\r
-\r
-/*----------------*/\r
-/* SYSTEM ALIASES */\r
-/*----------------*/\r
-\r
-#define SDF_VERSION  2\r
-#define SDF_ID_STR   "SDF"\r
-\r
-/*------------------*/\r
-/* DEFINITION BLOCK */\r
-/*------------------*/\r
-\r
-/* fixed system constants */\r
-\r
-#define BLK_SIZE   256         /* Size of a header block */\r
-#define NUM_DIRBLK   1         /* number of directory blocks */\r
-\r
-/* block types */\r
-\r
-#define BT_EMPTY       0       /* Not being used */\r
-#define BT_DIRECTORY   1       /* First blocks in file */\r
-#define BT_LABEL       2       /* Label block */\r
-\r
-/* label types */\r
-\r
-#define LT_EMPTY         0     /* label record is available for use */\r
-#define LT_TITLE         1     /* descriptive label given by user */\r
-#define LT_HISTORY       2     /* history label generated by application */\r
-                               /* program */\r
-#define LT_NOTE                  3     /* A note created with a label editor */\r
-\r
-/* codes for open_sdf and create_sdf */\r
-\r
-#define SDF_RDONLY  0\r
-#define SDF_WRONLY  1\r
-#define SDF_RDWR    2\r
-\r
-/* function return codes */\r
-\r
-#define SDF_ERROR  ERROR\r
-#define SDF_2D_ERROR SDF_ERROR\r
-#define SDF_OK    OK\r
-\r
-/* types of sdf file, this area is EXPANDABLE */\r
-\r
-#define SDF_FTYPE_2D   10      /* Two-dimensional data file */\r
-\r
-\r
-/* BLOCK IDENTIFICATION\r
- *\r
- *   Name: Directory Header Block\r
- *   Size: Multiple of BLK_SIZE\r
- *\r
- * DESCRIPTION\r
- *    This is the first block of a sdf file.  It contains information on the \r
- *    size of the users' data plus the number and type of header blocks.\r
- */\r
-\r
-struct dir_blk_st {\r
-    int block_type;            /* required at the beginning of every block */\r
-                               /* to identify type of block */\r
-\r
-    char id_str[4];            /* identification string == SDF_ID_STR */\r
-    int sdf_version;           /* which version of sdf system == SDF_VERSION */\r
-\r
-    int blk_size;              /* size of a header block in bytes */\r
-\r
-    int df_type;               /* type of data file, used as identification */\r
-                               /* by application programs */\r
-\r
-    unsigned int num_dirblk;   /* number of directory header blocks */\r
-                               /* currently, only 1 block long */\r
-     \r
-/* label directory */\r
-\r
-     unsigned int start_label; /* starting position of label header blocks */\r
-     unsigned int num_label;   /* number of label header blocks */\r
-\r
-/* data header info */\r
-\r
-    unsigned int start_dhead;  /* block number of the start of the users' */\r
-                               /* data header blocks */\r
-    unsigned int num_dhead;    /* number of data header blocks */\r
-    unsigned int dhead_len;    /* length of data header in bytes */\r
-\r
-/* data record info */\r
-\r
-    unsigned int start_drec;   /* block number of start of data records */\r
-    unsigned int num_drec;     /* number of of user data records */\r
-    unsigned int drec_size;    /* size of users' record */\r
-    int num_dval;              /* number of values in each data record */\r
-    int dval_size;             /* size of data value in bytes */\r
-                               /* NOTE:  drec_size = dval_size * num_dval */\r
-};\r
-\r
-\r
-/* BLOCK IDENTIFICATION\r
- *\r
- *    Name:  Label block\r
- *    Size:  BLK_SIZE\r
- *\r
- * DESCRIPTION                              \r
- *        This block contains both user and history labels.  Labels are alpha-\r
- *     numeric.  History labels include time & date stamp plus calculation time.  \r
- */\r
-\r
-#define LABEL_LEN        159    /* size of alphanumeric label */\r
-#define LABELS_PER_BLOCK  1\r
-                               /* number of labels in each block */\r
-\r
-struct label_blk_st {\r
-    int block_type;            /* required at the beginning of every block */\r
-    int label_type;            /* type of label */\r
-    char label_str[LABEL_LEN+1];/* alpha numeric label */\r
-\r
-/* history label time stamping */\r
-\r
-    TIMEDATE timedate;         /* time and date of operation */\r
-    float calc_time;           /* calculation time in seconds */\r
-};\r
-\r
-\r
-/* BLOCK IDENTIFICATION\r
- *\r
- *     Name:  Data Header Block\r
- *     Size:  Variable, but always integer multiple of BLK_SIZE\r
- *\r
- * DESCRIPTION\r
- *       This block hold information entirely specific to the data in the sdf \r
- *     file, such as the user coordinates of the extent of an image, or the\r
- *     the rotation increment of raysum data.  When an application program\r
- *     reads or writes the data header, it passes the size in bytes of the\r
- *     data header to be read or written.  If the length of a data header\r
- *     being read doesn't match the length of the data header in the file,\r
- *     the header is still read, but a WARNING message is given.\r
- */\r
-\r
-\r
-\r
-/* STRUCTURE IDENTIFICATION\r
- *\r
- *     Name:  Data File Structure       Contains all information on open files\r
- *\r
- * DESCRIPTION\r
- *        This structure is generated by open_file() and create_file(), it is\r
- *     passed to all subroutines of the sdf system.\r
- */\r
-\r
-struct sdfile_st {\r
-    bool open;                 /* if file is open or not */\r
-    int  mode;                 /* read-write mode */\r
-    int  fd;                   /* file descriptor gotten from C library */\r
-    bool error;                        /* TRUE if error occurred, all further */\r
-                               /* procesing is stopped */\r
-    bool error_report;         /* Error reporting flag */\r
-\r
-    unsigned int blk_size;     /* size of a header block */\r
-    unsigned int num_dirblk;   /* number of directory header blocks */\r
-    char fname[MAXFULLNAME+1]; /* operating system filename */\r
-\r
-    int df_type;               /* identification type of data file */\r
-\r
-/* variables that are used when writing to a file, they define what parts\r
- * of the file have been written\r
- */\r
-\r
-    struct wrt {\r
-       unsigned dir : 1;       /* 1 if directory header has been written */\r
-       unsigned label : 1;     /* 1 if labels have been written */\r
-       unsigned dhead : 1;     /* 1 if data header has been written */\r
-       unsigned drec : 1;      /* 1 when data records have been written */\r
-    } written;\r
-\r
-/* Directory information to have about the file */\r
-\r
-    unsigned int start_label;  /* starting position of labels */\r
-    unsigned int num_label;    /* number of labels in file */\r
-\r
-    unsigned int dhead_len;    /* length of data header in bytes */\r
-\r
-    unsigned int num_drec;     /* number of data records */\r
-    unsigned int drec_size;    /* size of data records in bytes */\r
-    int num_dval;              /* number of values in each data record */\r
-    int dval_size;             /* size of data value in bytes */\r
-                               /* NOTE:  drec_size = dval_size * num_dval */\r
-\r
-/* ffset pointers into sdf file */\r
-\r
-    long int pos_dhead;                /* starting position of data header */\r
-    long int pos_drec;         /* starting position of users' data */\r
-};\r
-\r
-\r
-union sdf_blk_un {\r
-    char buf[BLK_SIZE];\r
-    struct dir_blk_st   dir;\r
-    struct label_blk_st lab;\r
-};\r
-\r
-typedef struct dir_blk_st      DIR_BLK;\r
-typedef struct label_blk_st    LABEL_BLK;\r
-typedef struct sdfile_st       SDFILE;\r
-typedef union  sdf_blk_un      SDF_BLK;\r
-\r
-\r
-/*----------------------------------------------------------------------*/\r
-/*             2-Dimensional Standard Data File Header                 */\r
-/*----------------------------------------------------------------------*/\r
-\r
-\r
-/* STRUCTURE IDENTIFICATION\r
- *\r
- *     Name:  sdf_2d_dhead_st          Data header for 2d data files\r
- *\r
- * DESCRIPTION\r
- *\r
- *         This structure holds the data that is stored in an image sdf file's\r
- *     data header.  It contains all data needed to use 2d data records\r
- */\r
-\r
-struct sdf_2d_dhead_st {\r
-       int file_type;          /* type of data making up this file */\r
-                               /* currenty, DFT_2D_IMAGE or DFT_2D_RAYSUM */\r
-       int nx;                 /* number of rows */\r
-       int ny;                 /* number of columns in row */\r
-       int val_type;           /* type of pixel value, eg, DT_FLOAT */\r
-       int val_size;           /* size of pixel value in bytes */\r
-\r
-       bool axis_ext_kwn;      /* TRUE if picture extent is known */\r
-                               /* stored in xmin,xmax,ymin,ymax */\r
-       double xmin, ymin;      /* position of lower left corner of picture */\r
-       double xmax, ymax;      /* position of upper right corner of picture */\r
-\r
-       bool axis_incr_kwn;     /* TRUE if increments are known */\r
-       double xinc, yinc;\r
-\r
-       bool val_ext_kwn;       /* TRUE if pixel extent is known */\r
-       double dvalmin, dvalmax;/* min & max data value for FLOAT & DOUBLE */\r
-       long lvalmin, lvalmax;  /* data extent for INT & LONG */\r
-};\r
-\r
-\r
-/* STRUCTURE IDENTIFICATION\r
- *\r
- *     Name:  sdf_2d_st                        Information about an sdf image\r
- *\r
- * DESCRIPTION\r
- *\r
- *         This structure holds all the information need to access an sdf\r
- *     image.\r
- */\r
-\r
-struct sdf_2d_st {\r
-  struct sdf_2d_dhead_st dhead;        /* image information that is stored in data header */\r
-  SDFILE *dfp;                 /* pointer to image's standard data file */\r
-  MTX *mtx;                    /* data values */\r
-  int memory_only; /* TRUE if sdf_2d file is stored in memory only */\r
-};\r
-\r
-typedef struct sdf_2d_dhead_st  SDF_2D_DHEAD;\r
-typedef struct sdf_2d_st        SDF_2D;\r
-\r
-/* types of 2d data files */\r
-\r
-#define SDF_2D_IMAGE   100             /* data file type is an image */\r
-#define SDF_2D_RAYSUM  101             /* raysum data file type */\r
-\r
-\r
-/* sdf.c */\r
-SDFILE *sdf_open(const char *filename, const int mode);\r
-SDFILE *sdf_create(const char *filename, const int mode, const unsigned int num_drec, const unsigned int num_dval, const int dval_size, const int df_type);\r
-int sdf_read_label(LABEL_BLK *lrec, const int nlab, SDFILE *dfp);\r
-int sdf_write_label(LABEL_BLK *lrec, const int nlab, SDFILE *dfp);\r
-int sdf_add_label(const int ltype, const char *lstr, const double calc_time, SDFILE *dfp);\r
-int sdf_add_empty_label(SDFILE *dfp);\r
-int sdf_copy_labels(SDFILE *dfp_to, SDFILE *dfp_from);\r
-int sdf_read_dhead(void *dh_buf, const unsigned int dhead_len, SDFILE *dfp);\r
-int sdf_write_dhead(const void *dh_buf, const unsigned int dhead_len, SDFILE *dfp);\r
-int sdf_read_drec(void *drec, const int start_rec, const int num_rec, SDFILE *dfp);\r
-int sdf_write_drec(const void *drec, const int start_rec, const int num_rec, SDFILE *dfp);\r
-int sdf_read_dval(void *dval, const int rec, const int start_val, const int num_val, SDFILE *dfp);\r
-int sdf_write_dval(const void *dval, const int rec, const int start_val, const int num_val, SDFILE *dfp);\r
-int sdf_close(SDFILE *dfp);\r
-void sdf_error_report(SDFILE *dfp, const int flag);\r
-void sdf_error(const SDFILE *dfp, const char *str, ...);\r
-bool sdf_check_dfp(const SDFILE *dfp, const int mode, const char *name);\r
-void *sdf_alloc_blk(const int n, SDFILE *dfp, const char *name);\r
-int sdf_free_blk(void *hb, SDFILE *dfp, const char *name);\r
-/* sdf_2d.c */\r
-SDF_2D *sdf_2d_open(const char *fname, const int mode);\r
-SDF_2D *sdf_2d_create(const char *fname, const int mode, const int nx, const int ny, const int val_type, const int df_type);\r
-int sdf_2d_save(SDF_2D *imp);\r
-int sdf_2d_restore(SDF_2D *imp);\r
-int sdf_2d_alloc_mtx(SDF_2D *imp);\r
-int sdf_2d_free_mtx(SDF_2D *sdf_2d);\r
-int sdf_2d_read_row(char *row_buf, const unsigned int row, SDF_2D *imp);\r
-int sdf_2d_write_row(const char *row_buf, const unsigned int row, SDF_2D *imp);\r
-int sdf_2d_read_col(char *col_buf, const unsigned int col, SDF_2D *imp);\r
-int sdf_2d_write_col(const char *col_buf, const unsigned int col, SDF_2D *imp);\r
-int sdf_2d_close(SDF_2D *imp);\r
-char *sdf_2d_alloc_row(const int nrow, SDF_2D *imp);\r
-char *sdf_2d_alloc_col(const int ncol, SDF_2D *imp);\r
-void sdf_2d_error(const SDF_2D *imp, const char *str, ...);\r
-\r
-#endif\r
+/*****************************************************************************
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: sdf.h,v 1.2 2000/04/28 14:14:16 kevin Exp $
+**  $Log: sdf.h,v $
+**  Revision 1.2  2000/04/28 14:14:16  kevin
+**  *** empty log message ***
+**
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
+/* FILE IDENTIFICATION
+ *
+ *     Name:         sdf.h         Header file for Standard Data FIle system
+ *     Programmer:   Kevin Rosenberg
+ *     Date Started:  9-18-84
+ *     Last Change:  12-24-84
+ */
+
+#ifndef __H_SDF
+#define __H_SDF
+
+#include "kmath.h"
+
+
+/*----------------*/
+/* SYSTEM ALIASES */
+/*----------------*/
+
+#define SDF_VERSION  2
+#define SDF_ID_STR   "SDF"
+
+/*------------------*/
+/* DEFINITION BLOCK */
+/*------------------*/
+
+/* fixed system constants */
+
+#define BLK_SIZE   256         /* Size of a header block */
+#define NUM_DIRBLK   1         /* number of directory blocks */
+
+/* block types */
+
+#define BT_EMPTY       0       /* Not being used */
+#define BT_DIRECTORY   1       /* First blocks in file */
+#define BT_LABEL       2       /* Label block */
+
+/* label types */
+
+#define LT_EMPTY         0     /* label record is available for use */
+#define LT_TITLE         1     /* descriptive label given by user */
+#define LT_HISTORY       2     /* history label generated by application */
+                               /* program */
+#define LT_NOTE                  3     /* A note created with a label editor */
+
+/* codes for open_sdf and create_sdf */
+
+#define SDF_RDONLY  0
+#define SDF_WRONLY  1
+#define SDF_RDWR    2
+
+/* function return codes */
+
+#define SDF_ERROR  ERROR
+#define SDF_2D_ERROR SDF_ERROR
+#define SDF_OK    OK
+
+/* types of sdf file, this area is EXPANDABLE */
+
+#define SDF_FTYPE_2D   10      /* Two-dimensional data file */
+
+
+/* BLOCK IDENTIFICATION
+ *
+ *   Name: Directory Header Block
+ *   Size: Multiple of BLK_SIZE
+ *
+ * DESCRIPTION
+ *    This is the first block of a sdf file.  It contains information on the 
+ *    size of the users' data plus the number and type of header blocks.
+ */
+
+struct dir_blk_st {
+    int block_type;            /* required at the beginning of every block */
+                               /* to identify type of block */
+
+    char id_str[4];            /* identification string == SDF_ID_STR */
+    int sdf_version;           /* which version of sdf system == SDF_VERSION */
+
+    int blk_size;              /* size of a header block in bytes */
+
+    int df_type;               /* type of data file, used as identification */
+                               /* by application programs */
+
+    unsigned int num_dirblk;   /* number of directory header blocks */
+                               /* currently, only 1 block long */
+     
+/* label directory */
+
+     unsigned int start_label; /* starting position of label header blocks */
+     unsigned int num_label;   /* number of label header blocks */
+
+/* data header info */
+
+    unsigned int start_dhead;  /* block number of the start of the users' */
+                               /* data header blocks */
+    unsigned int num_dhead;    /* number of data header blocks */
+    unsigned int dhead_len;    /* length of data header in bytes */
+
+/* data record info */
+
+    unsigned int start_drec;   /* block number of start of data records */
+    unsigned int num_drec;     /* number of of user data records */
+    unsigned int drec_size;    /* size of users' record */
+    int num_dval;              /* number of values in each data record */
+    int dval_size;             /* size of data value in bytes */
+                               /* NOTE:  drec_size = dval_size * num_dval */
+};
+
+
+/* BLOCK IDENTIFICATION
+ *
+ *    Name:  Label block
+ *    Size:  BLK_SIZE
+ *
+ * DESCRIPTION                              
+ *        This block contains both user and history labels.  Labels are alpha-
+ *     numeric.  History labels include time & date stamp plus calculation time.  
+ */
+
+#define LABEL_LEN        159    /* size of alphanumeric label */
+#define LABELS_PER_BLOCK  1
+                               /* number of labels in each block */
+
+struct label_blk_st {
+    int block_type;            /* required at the beginning of every block */
+    int label_type;            /* type of label */
+    char label_str[LABEL_LEN+1];/* alpha numeric label */
+
+/* history label time stamping */
+
+    TIMEDATE timedate;         /* time and date of operation */
+    float calc_time;           /* calculation time in seconds */
+};
+
+
+/* BLOCK IDENTIFICATION
+ *
+ *     Name:  Data Header Block
+ *     Size:  Variable, but always integer multiple of BLK_SIZE
+ *
+ * DESCRIPTION
+ *       This block hold information entirely specific to the data in the sdf 
+ *     file, such as the user coordinates of the extent of an image, or the
+ *     the rotation increment of raysum data.  When an application program
+ *     reads or writes the data header, it passes the size in bytes of the
+ *     data header to be read or written.  If the length of a data header
+ *     being read doesn't match the length of the data header in the file,
+ *     the header is still read, but a WARNING message is given.
+ */
+
+
+
+/* STRUCTURE IDENTIFICATION
+ *
+ *     Name:  Data File Structure       Contains all information on open files
+ *
+ * DESCRIPTION
+ *        This structure is generated by open_file() and create_file(), it is
+ *     passed to all subroutines of the sdf system.
+ */
+
+struct sdfile_st {
+    bool open;                 /* if file is open or not */
+    int  mode;                 /* read-write mode */
+    int  fd;                   /* file descriptor gotten from C library */
+    bool error;                        /* TRUE if error occurred, all further */
+                               /* procesing is stopped */
+    bool error_report;         /* Error reporting flag */
+
+    unsigned int blk_size;     /* size of a header block */
+    unsigned int num_dirblk;   /* number of directory header blocks */
+    char fname[MAXFULLNAME+1]; /* operating system filename */
+
+    int df_type;               /* identification type of data file */
+
+/* variables that are used when writing to a file, they define what parts
+ * of the file have been written
+ */
+
+    struct wrt {
+       unsigned dir : 1;       /* 1 if directory header has been written */
+       unsigned label : 1;     /* 1 if labels have been written */
+       unsigned dhead : 1;     /* 1 if data header has been written */
+       unsigned drec : 1;      /* 1 when data records have been written */
+    } written;
+
+/* Directory information to have about the file */
+
+    unsigned int start_label;  /* starting position of labels */
+    unsigned int num_label;    /* number of labels in file */
+
+    unsigned int dhead_len;    /* length of data header in bytes */
+
+    unsigned int num_drec;     /* number of data records */
+    unsigned int drec_size;    /* size of data records in bytes */
+    int num_dval;              /* number of values in each data record */
+    int dval_size;             /* size of data value in bytes */
+                               /* NOTE:  drec_size = dval_size * num_dval */
+
+/* ffset pointers into sdf file */
+
+    long int pos_dhead;                /* starting position of data header */
+    long int pos_drec;         /* starting position of users' data */
+};
+
+
+union sdf_blk_un {
+    char buf[BLK_SIZE];
+    struct dir_blk_st   dir;
+    struct label_blk_st lab;
+};
+
+typedef struct dir_blk_st      DIR_BLK;
+typedef struct label_blk_st    LABEL_BLK;
+typedef struct sdfile_st       SDFILE;
+typedef union  sdf_blk_un      SDF_BLK;
+
+
+/*----------------------------------------------------------------------*/
+/*             2-Dimensional Standard Data File Header                 */
+/*----------------------------------------------------------------------*/
+
+
+/* STRUCTURE IDENTIFICATION
+ *
+ *     Name:  sdf_2d_dhead_st          Data header for 2d data files
+ *
+ * DESCRIPTION
+ *
+ *         This structure holds the data that is stored in an image sdf file's
+ *     data header.  It contains all data needed to use 2d data records
+ */
+
+struct sdf_2d_dhead_st {
+       int file_type;          /* type of data making up this file */
+                               /* currenty, DFT_2D_IMAGE or DFT_2D_RAYSUM */
+       int nx;                 /* number of rows */
+       int ny;                 /* number of columns in row */
+       int val_type;           /* type of pixel value, eg, DT_FLOAT */
+       int val_size;           /* size of pixel value in bytes */
+
+       bool axis_ext_kwn;      /* TRUE if picture extent is known */
+                               /* stored in xmin,xmax,ymin,ymax */
+       double xmin, ymin;      /* position of lower left corner of picture */
+       double xmax, ymax;      /* position of upper right corner of picture */
+
+       bool axis_incr_kwn;     /* TRUE if increments are known */
+       double xinc, yinc;
+
+       bool val_ext_kwn;       /* TRUE if pixel extent is known */
+       double dvalmin, dvalmax;/* min & max data value for FLOAT & DOUBLE */
+       long lvalmin, lvalmax;  /* data extent for INT & LONG */
+};
+
+
+/* STRUCTURE IDENTIFICATION
+ *
+ *     Name:  sdf_2d_st                        Information about an sdf image
+ *
+ * DESCRIPTION
+ *
+ *         This structure holds all the information need to access an sdf
+ *     image.
+ */
+
+struct sdf_2d_st {
+  struct sdf_2d_dhead_st dhead;        /* image information that is stored in data header */
+  SDFILE *dfp;                 /* pointer to image's standard data file */
+  MTX *mtx;                    /* data values */
+  int memory_only; /* TRUE if sdf_2d file is stored in memory only */
+};
+
+typedef struct sdf_2d_dhead_st  SDF_2D_DHEAD;
+typedef struct sdf_2d_st        SDF_2D;
+
+/* types of 2d data files */
+
+#define SDF_2D_IMAGE   100             /* data file type is an image */
+#define SDF_2D_RAYSUM  101             /* raysum data file type */
+
+
+/* sdf.c */
+SDFILE *sdf_open(const char *filename, const int mode);
+SDFILE *sdf_create(const char *filename, const int mode, const unsigned int num_drec, const unsigned int num_dval, const int dval_size, const int df_type);
+int sdf_read_label(LABEL_BLK *lrec, const int nlab, SDFILE *dfp);
+int sdf_write_label(LABEL_BLK *lrec, const int nlab, SDFILE *dfp);
+int sdf_add_label(const int ltype, const char *lstr, const double calc_time, SDFILE *dfp);
+int sdf_add_empty_label(SDFILE *dfp);
+int sdf_copy_labels(SDFILE *dfp_to, SDFILE *dfp_from);
+int sdf_read_dhead(void *dh_buf, const unsigned int dhead_len, SDFILE *dfp);
+int sdf_write_dhead(const void *dh_buf, const unsigned int dhead_len, SDFILE *dfp);
+int sdf_read_drec(void *drec, const int start_rec, const int num_rec, SDFILE *dfp);
+int sdf_write_drec(const void *drec, const int start_rec, const int num_rec, SDFILE *dfp);
+int sdf_read_dval(void *dval, const int rec, const int start_val, const int num_val, SDFILE *dfp);
+int sdf_write_dval(const void *dval, const int rec, const int start_val, const int num_val, SDFILE *dfp);
+int sdf_close(SDFILE *dfp);
+void sdf_error_report(SDFILE *dfp, const int flag);
+void sdf_error(const SDFILE *dfp, const char *str, ...);
+bool sdf_check_dfp(const SDFILE *dfp, const int mode, const char *name);
+void *sdf_alloc_blk(const int n, SDFILE *dfp, const char *name);
+int sdf_free_blk(void *hb, SDFILE *dfp, const char *name);
+/* sdf_2d.c */
+SDF_2D *sdf_2d_open(const char *fname, const int mode);
+SDF_2D *sdf_2d_create(const char *fname, const int mode, const int nx, const int ny, const int val_type, const int df_type);
+int sdf_2d_save(SDF_2D *imp);
+int sdf_2d_restore(SDF_2D *imp);
+int sdf_2d_alloc_mtx(SDF_2D *imp);
+int sdf_2d_free_mtx(SDF_2D *sdf_2d);
+int sdf_2d_read_row(char *row_buf, const unsigned int row, SDF_2D *imp);
+int sdf_2d_write_row(const char *row_buf, const unsigned int row, SDF_2D *imp);
+int sdf_2d_read_col(char *col_buf, const unsigned int col, SDF_2D *imp);
+int sdf_2d_write_col(const char *col_buf, const unsigned int col, SDF_2D *imp);
+int sdf_2d_close(SDF_2D *imp);
+char *sdf_2d_alloc_row(const int nrow, SDF_2D *imp);
+char *sdf_2d_alloc_col(const int ncol, SDF_2D *imp);
+void sdf_2d_error(const SDF_2D *imp, const char *str, ...);
+
+#endif
index 32ac0843e60bdcfde61b45feb0fca77fe10eb702..fe661bf7f8835a8f061ac7bd7b24b5e5ee19ef12 100644 (file)
@@ -1,3 +1,26 @@
+/*****************************************************************************
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: sgp.h,v 1.2 2000/04/28 14:14:16 kevin Exp $
+**  $Log: sgp.h,v $
+**  Revision 1.2  2000/04/28 14:14:16  kevin
+**  *** empty log message ***
+**
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
 /*----------------------------------------------------------------------*/
 /*                Standard Graphics Package Header File                */
 /*----------------------------------------------------------------------*/
@@ -7,13 +30,6 @@
 
 #include "kstddef.h"
 
-/* Write modes for CPIX_?????() routines */
-
-#define CPIX_WRT       0
-#define CPIX_XOR       1
-#define CPIX_AND       2
-#define CPIX_OR                3
-
 /* device names */
 
 #define CRTDEV  1