% [DMAP, gehead] = dmapread(filename)
%
% Read a double-precision DMAP image from a GE 5.x-format image file.
%
% DMAP - a double-precision image; values may even be negative.  The
%        image scale and shift constants are stored in the GE header.
%
% gehead - a GE-format header structure, of the kind read by geread.m.
%
% filename - name of the image file to read.
%
function [DMAP, gehead] = dmapread(filename)

% First, read the image file
%
[gehead, DMAP] = geread(filename,'m');
  
% Second, scale and shift the DMAP
%
DMAP = (DMAP/gehead.mri.user(2)) - gehead.mri.user(1);

