Mercurial > hg > minc-tools
changeset 742:5b7c44739e6c
Moved private function declarations from minc_routines.h to appropriate file.
author | neelin <neelin> |
---|---|
date | Wed, 08 Feb 1995 19:01:06 +0000 |
parents | 0feaccf4ab02 |
children | 8b1cdeef596e |
files | libsrc/dim_conversion.c libsrc/image_conversion.c libsrc/minc_convenience.c libsrc/minc_routines.h libsrc/netcdf_convenience.c libsrc/value_conversion.c |
diffstat | 6 files changed, 97 insertions(+), 72 deletions(-) [+] |
line wrap: on
line diff
--- a/libsrc/dim_conversion.c +++ b/libsrc/dim_conversion.c @@ -17,10 +17,13 @@ MI_icv_dimconv_init @CREATED : September 9, 1992. (Peter Neelin) @MODIFIED : $Log: dim_conversion.c,v $ -@MODIFIED : Revision 2.1 1994-11-02 09:42:37 neelin -@MODIFIED : Fixed conversion of vector to scalar (old code simply returned the first -@MODIFIED : component of the vector - now averaging is done properly). +@MODIFIED : Revision 2.2 1995-02-08 19:01:06 neelin +@MODIFIED : Moved private function declarations from minc_routines.h to appropriate file. @MODIFIED : + * Revision 2.1 1994/11/02 09:42:37 neelin + * Fixed conversion of vector to scalar (old code simply returned the first + * component of the vector - now averaging is done properly). + * * Revision 2.0 94/09/28 10:37:52 neelin * Release of minc version 0.2 * @@ -49,12 +52,28 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[] = "$Header: /private-cvsroot/minc/libsrc/dim_conversion.c,v 2.1 1994-11-02 09:42:37 neelin Exp $ MINC (MNI)"; +static char rcsid[] = "$Header: /private-cvsroot/minc/libsrc/dim_conversion.c,v 2.2 1995-02-08 19:01:06 neelin Exp $ MINC (MNI)"; #endif #include <type_limits.h> #include <minc_private.h> +/* Private functions */ +private int MI_icv_get_dim(mi_icv_type *icvp, int cdfid, int varid); +private int MI_get_dim_flip(mi_icv_type *icvp, int cdfid, int dimvid[], + int subsc[]); +private int MI_get_dim_scale(mi_icv_type *icvp, int cdfid, int dimvid[]); +private int MI_get_dim_bufsize_step(mi_icv_type *icvp, int subsc[]); +private int MI_icv_get_dim_conversion(mi_icv_type *icvp, int subsc[]); +private int MI_icv_dimconvert(int operation, mi_icv_type *icvp, + long start[], long count[], void *values, + long bufstart[], long bufcount[], void *buffer); +private int MI_icv_dimconv_init(int operation, mi_icv_type *icvp, + mi_icv_dimconv_type *dcp, + long start[], long count[], void *values, + long bufstart[], long bufcount[], void *buffer); + + /* ----------------------------- MNI Header ----------------------------------- @NAME : miicv_attach
--- a/libsrc/image_conversion.c +++ b/libsrc/image_conversion.c @@ -33,10 +33,13 @@ MI_icv_calc_scale @CREATED : July 27, 1992. (Peter Neelin, Montreal Neurological Institute) @MODIFIED : $Log: image_conversion.c,v $ -@MODIFIED : Revision 2.1 1994-12-09 09:12:30 neelin -@MODIFIED : Added test in miicv_detach to make sure that icv is attached before -@MODIFIED : detaching it. +@MODIFIED : Revision 2.2 1995-02-08 19:01:06 neelin +@MODIFIED : Moved private function declarations from minc_routines.h to appropriate file. @MODIFIED : + * Revision 2.1 1994/12/09 09:12:30 neelin + * Added test in miicv_detach to make sure that icv is attached before + * detaching it. + * * Revision 2.0 94/09/28 10:37:55 neelin * Release of minc version 0.2 * @@ -74,12 +77,25 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[] = "$Header: /private-cvsroot/minc/libsrc/image_conversion.c,v 2.1 1994-12-09 09:12:30 neelin Exp $ MINC (MNI)"; +static char rcsid[] = "$Header: /private-cvsroot/minc/libsrc/image_conversion.c,v 2.2 1995-02-08 19:01:06 neelin Exp $ MINC (MNI)"; #endif #include <type_limits.h> #include <minc_private.h> +/* Private functions */ +private int MI_icv_get_type(mi_icv_type *icvp, int cdfid, int varid); +private int MI_icv_get_vrange(mi_icv_type *icvp, int cdfid, int varid); +private double MI_get_default_range(char *what, nc_type datatype, int sign); +private int MI_icv_get_norm(mi_icv_type *icvp, int cdfid, int varid); +private int MI_icv_access(int operation, mi_icv_type *icvp, long start[], + long count[], void *values); +private int MI_icv_zero_buffer(mi_icv_type *icvp, long count[], void *values); +private int MI_icv_coords_tovar(mi_icv_type *icvp, + long icv_start[], long icv_count[], + long var_start[], long var_count[]); +private int MI_icv_calc_scale(int operation, mi_icv_type *icvp, long coords[]); + /* Array of pointers to image conversion structures */ static mi_icv_type *minc_icv_list[MI_MAX_NUM_ICV] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
--- a/libsrc/minc_convenience.c +++ b/libsrc/minc_convenience.c @@ -20,9 +20,12 @@ MI_is_in_list @CREATED : July 27, 1992. (Peter Neelin, Montreal Neurological Institute) @MODIFIED : $Log: minc_convenience.c,v $ -@MODIFIED : Revision 2.0 1994-09-28 10:38:02 neelin -@MODIFIED : Release of minc version 0.2 +@MODIFIED : Revision 2.1 1995-02-08 19:01:06 neelin +@MODIFIED : Moved private function declarations from minc_routines.h to appropriate file. @MODIFIED : + * Revision 2.0 1994/09/28 10:38:02 neelin + * Release of minc version 0.2 + * * Revision 1.18 94/09/28 10:37:12 neelin * Pre-release * @@ -42,12 +45,30 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[] = "$Header: /private-cvsroot/minc/libsrc/minc_convenience.c,v 2.0 1994-09-28 10:38:02 neelin Exp $ MINC (MNI)"; +static char rcsid[] = "$Header: /private-cvsroot/minc/libsrc/minc_convenience.c,v 2.1 1995-02-08 19:01:06 neelin Exp $ MINC (MNI)"; #endif #include <minc_private.h> #include <minc_varlists.h> +/* Private functions */ +private int MI_create_dim_variable(int cdfid, char *name, + nc_type datatype, int ndims); +private int MI_create_dimwidth_variable(int cdfid, char *name, + nc_type datatype, int ndims); +private int MI_create_image_variable(int cdfid, char *name, nc_type datatype, + int ndims, int dim[]); +private int MI_create_imaxmin_variable(int cdfid, char *name, nc_type datatype, + int ndims, int dim[]); +private int MI_verify_maxmin_dims(int cdfid, + int image_ndims, int image_dim[], + int maxmin_ndims, int maxmin_dim[]); +private int MI_create_root_variable(int cdfid, char *name); +private int MI_create_simple_variable(int cdfid, char *name); +private int MI_add_stdgroup(int cdfid, int varid); +private int MI_is_in_list(char *string, char *list[]); + + /* ----------------------------- MNI Header ----------------------------------- @NAME : miattput_pointer
--- a/libsrc/minc_routines.h +++ b/libsrc/minc_routines.h @@ -12,9 +12,12 @@ @CALLS : @CREATED : August 28, 1992 (Peter Neelin) @MODIFIED : $Log: minc_routines.h,v $ -@MODIFIED : Revision 2.1 1995-01-20 15:21:20 neelin -@MODIFIED : Added midecompress_file with ability to decompress only the header of a file. +@MODIFIED : Revision 2.2 1995-02-08 19:01:06 neelin +@MODIFIED : Moved private function declarations from minc_routines.h to appropriate file. @MODIFIED : + * Revision 2.1 1995/01/20 15:21:20 neelin + * Added midecompress_file with ability to decompress only the header of a file. + * * Revision 2.0 94/09/28 10:38:08 neelin * Release of minc version 0.2 * @@ -34,7 +37,7 @@ make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. -@RCSID : $Header: /private-cvsroot/minc/libsrc/minc_routines.h,v 2.1 1995-01-20 15:21:20 neelin Exp $ MINC (MNI) +@RCSID : $Header: /private-cvsroot/minc/libsrc/minc_routines.h,v 2.2 1995-02-08 19:01:06 neelin Exp $ MINC (MNI) ---------------------------------------------------------------------------- */ /* MINC routines that should only be visible to the package (semiprivate) */ @@ -52,8 +55,6 @@ long start[], long count[], nc_type datatype, int sign, void *values, int *bufsize_step, mi_icv_type *icvp); -private int MI_var_action(int ndims, long var_start[], long var_count[], - long nvalues, void *var_buffer, void *caller_data); semiprivate int MI_var_loop(int ndims, long start[], long count[], int value_size, int *bufsize_step, long max_buffer_size, @@ -61,63 +62,13 @@ int (*action_func) (int, long [], long [], long, void *, void *)); semiprivate int MI_get_sign_from_string(nc_type datatype, char *sign); -private int MI_get_sign(nc_type datatype, int sign); semiprivate int MI_convert_type(long number_of_values, nc_type intype, int insign, void *invalues, nc_type outtype, int outsign, void *outvalues, mi_icv_type *icvp); -/* From netcdf_convenience.c */ -private int execute_decompress_command(char *command, char *infile, - char *outfile, int header_only); -private int MI_vcopy_action(int ndims, long start[], long count[], - long nvalues, void *var_buffer, void *caller_data); - -/* From minc_convenience.c */ -private int MI_create_dim_variable(int cdfid, char *name, - nc_type datatype, int ndims); -private int MI_create_dimwidth_variable(int cdfid, char *name, - nc_type datatype, int ndims); -private int MI_create_image_variable(int cdfid, char *name, nc_type datatype, - int ndims, int dim[]); -private int MI_create_imaxmin_variable(int cdfid, char *name, nc_type datatype, - int ndims, int dim[]); -private int MI_verify_maxmin_dims(int cdfid, - int image_ndims, int image_dim[], - int maxmin_ndims, int maxmin_dim[]); -private int MI_create_root_variable(int cdfid, char *name); -private int MI_create_simple_variable(int cdfid, char *name); -private int MI_add_stdgroup(int cdfid, int varid); -private int MI_is_in_list(char *string, char *list[]); - /* From image_conversion.c */ -private int MI_icv_get_type(mi_icv_type *icvp, int cdfid, int varid); -private int MI_icv_get_vrange(mi_icv_type *icvp, int cdfid, int varid); -private double MI_get_default_range(char *what, nc_type datatype, int sign); -private int MI_icv_get_norm(mi_icv_type *icvp, int cdfid, int varid); -private int MI_icv_access(int operation, mi_icv_type *icvp, long start[], - long count[], void *values); -private int MI_icv_zero_buffer(mi_icv_type *icvp, long count[], void *values); -private int MI_icv_coords_tovar(mi_icv_type *icvp, - long icv_start[], long icv_count[], - long var_start[], long var_count[]); -private int MI_icv_calc_scale(int operation, mi_icv_type *icvp, long coords[]); semiprivate mi_icv_type *MI_icv_chkid(int icvid); -/* From dim_conversion.c */ -private int MI_icv_get_dim(mi_icv_type *icvp, int cdfid, int varid); -private int MI_get_dim_flip(mi_icv_type *icvp, int cdfid, int dimvid[], - int subsc[]); -private int MI_get_dim_scale(mi_icv_type *icvp, int cdfid, int dimvid[]); -private int MI_get_dim_bufsize_step(mi_icv_type *icvp, int subsc[]); -private int MI_icv_get_dim_conversion(mi_icv_type *icvp, int subsc[]); -private int MI_icv_dimconvert(int operation, mi_icv_type *icvp, - long start[], long count[], void *values, - long bufstart[], long bufcount[], void *buffer); -private int MI_icv_dimconv_init(int operation, mi_icv_type *icvp, - mi_icv_dimconv_type *dcp, - long start[], long count[], void *values, - long bufstart[], long bufcount[], void *buffer); - #endif
--- a/libsrc/netcdf_convenience.c +++ b/libsrc/netcdf_convenience.c @@ -34,9 +34,12 @@ MI_vcopy_action @CREATED : July 27, 1992. (Peter Neelin, Montreal Neurological Institute) @MODIFIED : $Log: netcdf_convenience.c,v $ -@MODIFIED : Revision 2.3 1995-01-24 08:34:11 neelin -@MODIFIED : Added optional tempfile argument to miexpand_file. +@MODIFIED : Revision 2.4 1995-02-08 19:01:06 neelin +@MODIFIED : Moved private function declarations from minc_routines.h to appropriate file. @MODIFIED : + * Revision 2.3 1995/01/24 08:34:11 neelin + * Added optional tempfile argument to miexpand_file. + * * Revision 2.2 95/01/23 08:28:19 neelin * Changed name of midecompress_file to miexpand_file. * @@ -69,11 +72,18 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[] = "$Header: /private-cvsroot/minc/libsrc/netcdf_convenience.c,v 2.3 1995-01-24 08:34:11 neelin Exp $ MINC (MNI)"; +static char rcsid[] = "$Header: /private-cvsroot/minc/libsrc/netcdf_convenience.c,v 2.4 1995-02-08 19:01:06 neelin Exp $ MINC (MNI)"; #endif #include <minc_private.h> +/* Private functions */ +private int execute_decompress_command(char *command, char *infile, + char *outfile, int header_only); +private int MI_vcopy_action(int ndims, long start[], long count[], + long nvalues, void *var_buffer, void *caller_data); + + /* ----------------------------- MNI Header -----------------------------------
--- a/libsrc/value_conversion.c +++ b/libsrc/value_conversion.c @@ -13,9 +13,12 @@ MI_var_action @CREATED : July 27, 1992. (Peter Neelin, Montreal Neurological Institute) @MODIFIED : $Log: value_conversion.c,v $ -@MODIFIED : Revision 2.0 1994-09-28 10:38:21 neelin -@MODIFIED : Release of minc version 0.2 +@MODIFIED : Revision 2.1 1995-02-08 19:01:06 neelin +@MODIFIED : Moved private function declarations from minc_routines.h to appropriate file. @MODIFIED : + * Revision 2.0 1994/09/28 10:38:21 neelin + * Release of minc version 0.2 + * * Revision 1.9 94/09/28 10:37:22 neelin * Pre-release * @@ -45,12 +48,17 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[] = "$Header: /private-cvsroot/minc/libsrc/value_conversion.c,v 2.0 1994-09-28 10:38:21 neelin Exp $ MINC (MNI)"; +static char rcsid[] = "$Header: /private-cvsroot/minc/libsrc/value_conversion.c,v 2.1 1995-02-08 19:01:06 neelin Exp $ MINC (MNI)"; #endif #include <type_limits.h> #include <minc_private.h> +/* Private functions */ +private int MI_var_action(int ndims, long var_start[], long var_count[], + long nvalues, void *var_buffer, void *caller_data); +private int MI_get_sign(nc_type datatype, int sign); + /* ----------------------------- MNI Header -----------------------------------