NAME

read_spectra_file_header - Reads header in spectra file.

SYNOPSIS

#include "s/s_io.h"

Example compile flags (system dependent):
  -DLINUX_X86_64 -DLINUX_X86_64_OPTERON  -DGNU_COMPILER 
   -I/home/kobus/include
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 


int read_spectra_file_header
(
	char *file_name,
	int *num_freq_intervals_ptr,
	double *offset_ptr,
	double *step_ptr,
	Spectra_origin *type_ptr
);

DESCRIPTION

This routine reads the spectra header in file_name. The file is opened, processed from the begining, and then closed. If the header contains information about the number of frequency intervals, the offset, or the step size, then the corresponding variables whose pointers are arguments are set. Variables are not changed unless there is information in the header. The type information works similarly, except that the file suffix is also considered a source of information.

NOTE

This routine is not normally needed. It is used for code that use different forms of handling spectra (which explains also why the parameters needed are low-level concepts, rather than the Spectra type).

RELATED

fp_read_spectra_file_header

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Kobus Barnard

DOCUMENTER

Kobus Barnard

SEE ALSO

read_spectra_from_config_file , read_reflectance_spectra , read_illuminant_spectra , read_sensor_spectra , read_spectra , fp_read_spectra_file_header , write_spectra_full_precision , fp_write_spectra_full_precision , write_spectra , fp_write_spectra , fp_write_spectra_file_header