RSL_get_histogram_from_...


Synopsis

#include "rsl.h"
Histogram *RSL_get_histogram_from_ray(Ray *ray, Histogram *histogram, int low, int hi, int min_range, int max_range);
Histogram *RSL_get_histogram_from_sweep(Sweep *sweep, Histogram *histogram, int low, int hi, int min_range, int max_range);
Histogram *RSL_get_histogram_from_volume(Volume *volume, Histogram *histogram, int low, int hi, int min_range, int max_range);

Description

Load histogram with the histogram from a Ray, Sweep, or Volume. If histogram is NULL, then space is automatically allocated by RSL_allocate_histogram. Notice that a histogram pointer is passed into the routines. The argument histogram is used as an accumulator. For instance, getting the histogram for an entire sweep involves getting the histogram for ray #1, then adding the histograms for ray #2 through #n. Although, the argument histogram is modified, a pointer to that histogram is returned so that the function interface, that is commonly used throughout the RSL, is maintained.

Return value

Upon successful completion, a pointer to Histogram is returned. NULL is returned if an error occurs and errno is set.

See also

RSL_read_histogram, RSL_write_histogram, RSL_print_histogram, RSL_free_histogram

Author: David B. Wolff