Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

funimagerowget(3) [debian man page]

funimagerowget(3)						SAORD Documentation						 funimagerowget(3)

NAME
FunImageRowGet - get row(s) of an image SYNOPSIS
#include <funtools.h> void *FunImageRowGet(Fun fun, void *buf, int rstart, int rstop, char *plist) DESCRIPTION
The FunImageRowGet() routine returns one or more image rows from the specified section of a Funtools data file. If the input data are of type image, the array is generated by extracting the specified image rows and then binning them according to the specified bin factor. If the input data are contained in a binary table or raw event file, the rows are binned on the columns specified by the bincols= keyword (using appropriate default columns as needed), after which the image section and bin factors are applied. The first argument is the Funtools handle returned by FunOpen(). The second buf argument is a pointer to a data buffer to fill. If NULL is specified, FunImageGet() will allocate a buffer of the appropriate size. The third and fourth arguments specify the first and last row to retrieve. Rows are counted starting from 1, up to the value of FUN_YMAX(fun). The final plist (i.e., parameter list) argument is a string containing one or more comma-delimited keyword=value parame- ters. It can be used to specify the return data type using the bitpix= keyword. If no such keyword is specified in the plist string, the data type of the image is the same as the data type of the original input file, or is of type int for FITS binary tables. If the bitpix=value is supplied in the plist string, the data type of the returned image will be one of the supported FITS image data types: o 8 unsigned char o 16 short o 32 int o -32 float o -64 double For example: double *drow; Fun fun; ... open files ... /* get section dimensions */ FunInfoGet(fun, FUN_SECT_DIM1, &dim1, FUN_SECT_DIM2, &dim2, 0); /* allocate one line's worth */ drow = malloc(dim1*sizeof(double)); /* retrieve and process each input row (starting at 1) */ for(i=1; i <= dim2; i++){ if( !FunImageRowGet(fun, drow, i, i, "bitpix=-64") ) gerror(stderr, "can't FunImageRowGet: %d %s ", i, iname); /* reverse the line */ for(j=1; j<=dim1; j++){ ... process drow[j-1] ... } } ... On success, a pointer to the image buffer is returned. (This will be the same as the second argument, if NULL is not passed to the latter.) On error, NULL is returned. Note that the considerations described above for specifying binning columns in FunImageGet() also apply to FunImageRowGet(). SEE ALSO
See funtools(7) for a list of Funtools help pages version 1.4.2 January 2, 2008 funimagerowget(3)

Check Out this Related Man Page

funimagerowput(3)						SAORD Documentation						 funimagerowput(3)

NAME
FunImageRowPut - put row(s) of an image SYNOPSIS
#include <funtools.h> void *FunImageRowPut(Fun fun, void *buf, int rstart, int rstop, int dim1, int dim2, int bitpix, char *plist) DESCRIPTION
The FunImageRowPut() routine writes one or more image rows to the specified FITS image file. The first argument is the Funtools handle returned by FunOpen(). The second buf argument is a pointer to the row data buffer, while the third and fourth arguments specify the starting and ending rows to write. Valid rows values range from 1 to dim2, i.e., row is one-valued. The dim1and dim2 arguments that follow specify the dimensions, where dim1 corresponds to naxis1 and dim2 corresponds to naxis2. The bitpix argument data type of the image and can have the following FITS-standard values: o 8 unsigned char o 16 short o 32 int o -32 float o -64 double For example: double *drow; Fun fun, fun2; ... open files ... /* get section dimensions */ FunInfoGet(fun, FUN_SECT_DIM1, &dim1, FUN_SECT_DIM2, &dim2, 0); /* allocate one line's worth */ drow = malloc(dim1*sizeof(double)); /* retrieve and process each input row (starting at 1) */ for(i=1; i <= dim2; i++){ if( !FunImageRowGet(fun, drow, i, i, "bitpix=-64") ) gerror(stderr, "can't FunImageRowGet: %d %s ", i, iname); ... process drow ... if( !FunImageRowPut(fun2, drow, i, i, 64, NULL) ) gerror(stderr, "can't FunImageRowPut: %d %s ", i, oname); } ... The data are assumed to be in the native machine format and will automatically be swapped to big-endian FITS format if necessary. This behavior can be over-ridden with the convert=[true|false] keyword in the plist param list string. When you are finished writing the image, you should call FunFlush() to write out the FITS image padding. However, this is not necessary if you subsequently call FunClose() without doing any other I/O to the FITS file. SEE ALSO
See funtools(7) for a list of Funtools help pages version 1.4.2 January 2, 2008 funimagerowput(3)
Man Page