Add three new parameteres to _readImage_raw, to specify the spacing of the

image (vx, vy, vz).
This commit is contained in:
Laurent Rineau 2008-04-08 08:58:00 +00:00
parent c6fa89e93c
commit f0226fd8a2
2 changed files with 14 additions and 4 deletions

View File

@ -376,8 +376,13 @@ _image* _readNonInterlacedImage(const char *name);
/** Read an image from a file. The word type is supposed to be unsigned
char, and the dimensions are (rx, ry, rz). */
_image* _readImage_raw(const char *name,const unsigned int rx,
const unsigned int ry,const unsigned int rz);
_image* _readImage_raw(const char *name,
const unsigned int rx,
const unsigned int ry,
const unsigned int rz,
const double vx = 1.,
const double vy = 1.,
const double vz = 1.);
/** Writes given image in file 'name'.<br>

View File

@ -557,7 +557,10 @@ _image* _readImage(const char *name) {
_image* _readImage_raw(const char *name,
const unsigned int rx,
const unsigned int ry,
const unsigned int rz)
const unsigned int rz,
const double vx,
const double vy,
const double vz)
{
_image *im = NULL;
im = (_image *) ImageIO_alloc(sizeof(_image));
@ -568,7 +571,9 @@ _image* _readImage_raw(const char *name,
im->ydim = ry;
im->zdim = rz;
im->vdim = 1;
im->vx = im->vy = im->vz = 0.1;
im->vx = vx;
im->vy = vy;
im->vz = vz;
// image center
im->cx = im->cy = im->cz = 0;