From 1e8e203f6b646a69235589d3b8f931da12e77b91 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 16 May 2000 04:33:17 +0000 Subject: [PATCH] r55: Updated documentation --- include/ir.h | 26 +++++++++++++++----------- include/kstddef.h | 28 ++++++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/include/ir.h b/include/ir.h index 96b2129..08cdd1d 100644 --- a/include/ir.h +++ b/include/ir.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ir.h,v 1.14 2000/05/11 14:07:00 kevin Exp $ +** $Id: ir.h,v 1.15 2000/05/16 04:33:17 kevin Exp $ ** $Log: ir.h,v $ +** Revision 1.15 2000/05/16 04:33:17 kevin +** Updated documentation +** ** Revision 1.14 2000/05/11 14:07:00 kevin ** Added support for Windows NT ** @@ -203,10 +206,10 @@ struct detector_st { typedef struct detector_st DETECTOR; struct raysum_st { - int fd; - int file_mode; - int header_size; - int geometry; + int fd; /* Disk file descriptor */ + int file_mode; /* Current file mode (read or write) */ + int header_size; /* Size of disk file header */ + int geometry; /* Geometry of scanner */ struct detarray_st **view; /* Pointer to array of detarray_st pointers */ char remark[MAXREMARK+1]; /* description of raysum data */ @@ -420,22 +423,23 @@ IMAGE *image_load(const char *fname); void image_filter_response(IMAGE *im, int domain, double bw, int filt_type, double filt_param, int opt_trace); /* options.c */ -int opt_set_trace(const char *optarg, const char *program); +int opt_set_trace(const char *optarg); const char *name_of_phantom(const int phmid); -int opt_set_phantom(const char *optarg, const char *program); -int opt_set_interpolation(const char *optarg, const char *program); +int opt_set_phantom(const char *optarg); +int opt_set_interpolation(const char *optarg); const char *name_of_interpolation(int interp_type); -int opt_set_filter(const char *optarg, const char *program); +int opt_set_filter(const char *optarg); const char *name_of_filter(const int filter); -DomainType opt_set_filter_domain(const char *optarg, const char *program); +DomainType opt_set_filter_domain(const char *optarg); const char *name_of_filter_domain(const DomainType domain); -int opt_set_backproj(const char *optarg, const char *program); +int opt_set_backproj(const char *optarg); const char *name_of_backproj(const BackprojType backproj); /* phm.c */ PHANTOM *phm_create(const int phmid); PHANTOM *phm_create_from_file(const char *fname); PHANTOM *phm_init(void); +void phm_free (PHANTOM *phm); int phm_add_pelm_file(PHANTOM *phm, const char *fname); void phm_add_pelm (PHANTOM *phm, const char *type, const double cx, const double cy, const double u, const double v, const double rot, const double atten); diff --git a/include/kstddef.h b/include/kstddef.h index 7b19338..b6ad48f 100644 --- a/include/kstddef.h +++ b/include/kstddef.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: kstddef.h,v 1.9 2000/05/11 01:04:44 kevin Exp $ +** $Id: kstddef.h,v 1.10 2000/05/16 04:33:17 kevin Exp $ ** $Log: kstddef.h,v $ +** Revision 1.10 2000/05/16 04:33:17 kevin +** Updated documentation +** ** Revision 1.9 2000/05/11 01:04:44 kevin ** Added Microsoft Windows compatibility ** @@ -123,7 +126,6 @@ typedef unsigned char string[STR_SIZE]; #define ISWAP(a,b) {int i; i = a; a = b; b = i;} #define CLIP(n,lb,ub) if (n < lb) n = lb; else if (n > ub) n = ub -#define FOREVER for (;;) #define STR_EQUAL(s1,s2) (strcmp (s1, s2) == 0) /*----------------------------------------------------------------------*/ @@ -188,33 +190,46 @@ typedef struct timedate_st TIMEDATE; float *alloc_float(int n); double *alloc_double(int n); int *alloc_int(int n); + /* fexist.c */ int file_exists(const char *fname); + /* kbasename.c */ char *kbasename(const char *filename); + /* iclip.c */ int iclip(int n, int lb, int ub); + /* s_head.c */ char *str_skip_head(const char *str, const char *charlist); + /* s_lower.c */ char *str_lower(char *s); + /* s_rmtail.c */ char *str_wrm_tail(char *str); char *str_rm_tail(char *str, const char *charlist); + /* s_save.c */ char *str_save(const char *s); + /* s_upper.c */ char *str_upper(char *str); + /* sysalloc.c */ void *sys_alloc(const int nbytes, const char *name); + /* syserror.c */ void sys_error(int severity, const char *msg, ...); void sys_verror(int severity, const char *msg, va_list arg); void sys_error_level(int severity); + /* sysfopen.c */ FILE *sys_fopen(const char *filename, const char *mode, const char *progname); + /* sysfree.c */ void sys_free(void *ptr, const char *name); + /* timedate.c */ DATE *td_get_date(DATE *d); TIME *td_get_time(TIME *t); @@ -233,6 +248,15 @@ char *td_str_cdate(DATE *d); char *td_month_name(int n); char *td_day_name(int n); +/* netorder.c */ +void *strreverse (void *dest, const void *src, size_t n); +int read_nlong (unsigned long int *n, int fd); +int write_nlong (unsigned long int const *n, int fd); +int read_nfloat (float *f, int fd); +int write_nfloat (float const *f, int fd); +int read_ndouble (double *d, int fd); +int write_ndouble (double const *d, int fd); + #ifdef __cplusplus } #endif /* __cplusplus */ -- 2.34.1