Mercurial > hg > minc-tools
changeset 764:910c49dd12b6
*** empty log message ***
author | david <david> |
---|---|
date | Mon, 20 Feb 1995 23:01:40 +0000 |
parents | 7986daa84189 |
children | 409f874f1231 |
files | volume_io/Volumes/volumes.c |
diffstat | 1 files changed, 21 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/volume_io/Volumes/volumes.c +++ b/volume_io/Volumes/volumes.c @@ -3,7 +3,7 @@ #include <float.h> #ifndef lint -static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/volumes.c,v 1.39 1995-02-20 13:12:21 david Exp $"; +static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/volumes.c,v 1.40 1995-02-20 23:01:40 david Exp $"; #endif char *XYZ_dimension_names[] = { MIxspace, MIyspace, MIzspace }; @@ -1651,3 +1651,23 @@ return( copy ); } + +public Volume copy_volume( + Volume volume ) +{ + Volume copy; + Real value, voxel; + int v0, v1, v2, v3, v4; + + copy = copy_volume_definition( volume, NC_UNSPECIFIED, FALSE, 0.0, 0.0 ); + + BEGIN_ALL_VOXELS( volume, v0, v1, v2, v3, v4 ) + + GET_VALUE( value, volume, v0, v1, v2, v3, v4 ); + voxel = CONVERT_VOXEL_TO_VALUE( copy, value ); + SET_VOXEL( copy, v0, v1, v2, v3, v4, voxel ); + + END_ALL_VOXELS + + return( copy ); +}