SDS_IN(3)
NAME
sds_in, sds_out - functions to handle file input & output
SYNOPSIS
#include <soi_sds.h>
SDS *sds_in(char *filename, int datatype, int filetype)
int sds_out(SDS *sdsptr, char *filename, int filetype)
DESCRIPTION
sds_in reads in the named file, converting the data, if
necessary, to the type specified by datatype. If the data-
type is SDS_ANY then the no conversion is performed and the
file is read in its native type.
sds_in creates and returns a pointer to a complete SDS
(attributes, data, etc.) unless a serious error in reading
the file occurrs in which case it sets soi_errno to some-
thing appropriate and returns NULL.
sds_out writes whatever information it can from the SDS into
a file of the specified type named filename.
The following filetypes are presently supported: SDS_FITS,
SDS_RAW, and SDS_GIF (output only). If GIF output is
selected the scaling unconditionally assumes that the data
range of interest is in [-1.0, 1.0]; the animation rate for
multi-image data records is unconditionally set to 0.2
sec/frame.
The following datatypes are presently supported: SDS_ANY
(no conversion), SDS_BYTE, SDS_UBYTE, SDS_SHORT, SDS_USHORT,
SDS_INT, SDS_UINT, SDS_FLOAT, and SDS_DOUBLE. Not all input
conversions work correctly, especially in going from higher
to lower ranges.
FILES
~soi/CM/include/soi_sds.h
~soi/CM/src/libsds.d/sds_in.c
~soi/CM/src/libsds.d/sds_out.c
SEE ALSO
sds_read(3), sds_write(3), sds_get_one_fits(3),
sds_put_one_fits(3), sds_convert(3), sds_gif(3)
DIAGNOSTICS
BAD_FILE_DESCRIPTOR, CANT_OPEN_FILE, SDS_CONVERT_FAILED,
UNSUPPORTED_DATA_FORMAT, SDS_DATA_PTR_NULL, IO_ERROR
BUGS
Support for filetype SDS_GIF is weak; it is still under
development.
FITS (Flexible Image Transport System) is the only supported
format suitable for data interchange. GIF (Graphics Inter-
change Format) is standard, but useful only for visual
images. Raw data formats are architecture-dependent.
HISTORY
99.07.22 R Bogart: GIF documentation for SOI v 4.3