next up previous
Next: convert_vector() Up: Brain Volume I/O Handling Previous: set_signal_level()

scale_volume()  

Scale/add volume



Synopsis


int
scale_volume( header *hdr, void *data, double subtr, double scale, double prescale)


Description
Scale and offset values in volume.

vol = scale*(vol*prescale-subtr)

Range checking is performed for 8 and 16 bit datatypes so that if the result of the scaling operation is outside the range of the datatype, the max/min value is used instead. See volio.h for available data_types.

Usage

Revision


1.0  15/8-97   Ulrik Kjems


Program listing






Ulrik Kjems
6/3/1998