1funimagerowget(3)             SAORD Documentation            funimagerowget(3)
2
3
4

NAME

6       FunImageRowGet - get row(s) of an image
7

SYNOPSIS

9         #include <funtools.h>
10
11         void *FunImageRowGet(Fun fun, void *buf, int rstart, int rstop,
12                              char *plist)
13

DESCRIPTION

15       The FunImageRowGet() routine returns one or more image rows from the
16       specified section of a Funtools data file.  If the input data are of
17       type image, the array is generated by extracting the specified image
18       rows and then binning them according to the specified bin factor.  If
19       the input data are contained in a binary table or raw event file, the
20       rows are binned on the columns specified by the bincols= keyword (using
21       appropriate default columns as needed), after which the image section
22       and bin factors are applied.
23
24       The first argument is the Funtools handle returned by FunOpen().  The
25       second buf argument is a pointer to a data buffer to fill. If NULL is
26       specified, FunImageGet() will allocate a buffer of the appropriate
27       size.
28
29       The third and fourth arguments specify the first and last row to
30       retrieve.  Rows are counted starting from 1, up to the value of
31       FUN_YMAX(fun).  The final plist (i.e., parameter list) argument is a
32       string containing one or more comma-delimited keyword=value parameters.
33       It can be used to specify the return data type using the bitpix= key‐
34       word.  If no such keyword is specified in the plist string, the data
35       type of the image is the same as the data type of the original input
36       file, or is of type int for FITS binary tables.
37
38       If the bitpix=value is supplied in the plist string, the data type of
39       the returned image will be one of the supported FITS image data types:
40
41       ·   8 unsigned char
42
43       ·   16 short
44
45       ·   32 int
46
47       ·   -32 float
48
49       ·   -64 double
50
51       For example:
52
53         double *drow;
54         Fun fun;
55         ... open files ...
56         /* get section dimensions */
57         FunInfoGet(fun, FUN_SECT_DIM1, &dim1, FUN_SECT_DIM2, &dim2, 0);
58         /* allocate one line's worth */
59         drow = malloc(dim1*sizeof(double));
60         /* retrieve and process each input row (starting at 1) */
61         for(i=1; i <= dim2; i++){
62           if( !FunImageRowGet(fun, drow, i, i, "bitpix=-64") )
63             gerror(stderr, "can't FunImageRowGet: %d %s\n", i, iname);
64             /* reverse the line */
65             for(j=1; j<=dim1; j++){
66               ... process drow[j-1] ...
67             }
68         }
69         ...
70
71       On success, a pointer to the image buffer is returned. (This will be
72       the same as the second argument, if NULL is not passed to the latter.)
73       On error, NULL is returned.  Note that the considerations described
74       above for specifying binning columns in FunImageGet() also apply to
75       FunImageRowGet().
76

SEE ALSO

78       See funtools(n) for a list of Funtools help pages
79
80
81
82version 1.4.0                   August 15, 2007              funimagerowget(3)
Impressum