function read_tomo_volume, file
;+
; NAME:
; READ_TOMO_VOLUME
;
; PURPOSE:
; Reads in 3-D volume files written by WRITE_TOMO_VOLUME. These are binary files
; written in architecture-dependent format. These files are used for efficiency, so
; that additional reconstructions can be done without having to re-read the raw data files
; are re-apply the dark current, white field and zinger corrections.
;
; CATEGORY:
; Tomography data processing
;
; CALLING SEQUENCE:
;
; Result = READ_TOMO_VOLUME(File)
;
; INPUTS:
; File: The name of the volume file to be read.
; OUTPUTS:
; This function returns a 3-D 16-bit integer array. The dimensions are
; NX, NY, NANGLES
;
; RESTRICTIONS:
; These files are written using the host byte order and floating point format.
; They are thus not portable, and are intended to be used for intermediate storage only.
; no important restrictions.
;
; EXAMPLE:
; volume = READ_TOMO_VOLUME('diamond2.volume')
;
; MODIFICATION HISTORY:
; Written by: Mark Rivers, May 13, 1998
;-
openr, lun, file, /get
ncols = 0L
nrows = 0L
nangles = 0L
readu, lun, ncols, nrows, nangles
volume = intarr(ncols, nrows, nangles, /nozero)
readu, lun, volume
free_lun, lun
return, volume
end