Mercurial > hg > minc-tools
changeset 978:c9f0a10621a3
*** empty log message ***
author | david <david> |
---|---|
date | Mon, 15 Jan 1996 17:38:53 +0000 |
parents | af4ed077889f |
children | 5b22ea40ff27 |
files | volume_io/Volumes/volume_cache.c |
diffstat | 1 files changed, 15 insertions(+), 106 deletions(-) [+] |
line wrap: on
line diff
--- a/volume_io/Volumes/volume_cache.c +++ b/volume_io/Volumes/volume_cache.c @@ -13,7 +13,7 @@ ---------------------------------------------------------------------------- */ #ifndef lint -static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/volume_cache.c,v 1.19 1995-11-20 12:37:39 david Exp $"; +static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Volumes/volume_cache.c,v 1.20 1996-01-15 17:38:53 david Exp $"; #endif #include <internal_volume_io.h> @@ -937,6 +937,18 @@ delete_string( output_filename ); } +public void cache_volume_range_has_changed( + Volume volume ) +{ + if( !volume->is_cached_volume ) + return; + + if( volume->cache.minc_file == NULL && volume->cache.n_blocks == 0 ) + return; + + print( "Not implemented yet in cache_volume_range_has_changed()\n" ); +} + /* ----------------------------- MNI Header ----------------------------------- @NAME : set_cache_volume_file_offset @INPUT : cache @@ -1349,7 +1361,7 @@ @MODIFIED : ---------------------------------------------------------------------------- */ -private Real get_cached_volume_voxel( +public Real get_cached_volume_voxel( Volume volume, int x, int y, @@ -1390,7 +1402,7 @@ @MODIFIED : ---------------------------------------------------------------------------- */ -private void set_cached_volume_voxel( +public void set_cached_volume_voxel( Volume volume, int x, int y, @@ -1433,106 +1445,3 @@ { return( cache->minc_file != NULL ); } - -private Real get_voxel_1d( - Volume volume, - int v0 ) -{ - return( get_cached_volume_voxel( volume, v0, 0, 0, 0, 0 ) ); -} - -private Real get_voxel_2d( - Volume volume, - int v0, - int v1 ) -{ - return( get_cached_volume_voxel( volume, v0, v1, 0, 0, 0 ) ); -} - -private Real get_voxel_3d( - Volume volume, - int v0, - int v1, - int v2 ) -{ - return( get_cached_volume_voxel( volume, v0, v1, v2, 0, 0 ) ); -} - -private Real get_voxel_4d( - Volume volume, - int v0, - int v1, - int v2, - int v3 ) -{ - return( get_cached_volume_voxel( volume, v0, v1, v2, v3, 0 ) ); -} - -private void set_voxel_1d( - Volume volume, - int v0, - Real value ) -{ - set_cached_volume_voxel( volume, v0, 0, 0, 0, 0, value ); -} - -private void set_voxel_2d( - Volume volume, - int v0, - int v1, - Real value ) -{ - set_cached_volume_voxel( volume, v0, v1, 0, 0, 0, value ); -} - -private void set_voxel_3d( - Volume volume, - int v0, - int v1, - int v2, - Real value ) -{ - set_cached_volume_voxel( volume, v0, v1, v2, 0, 0, value ); -} - -private void set_voxel_4d( - Volume volume, - int v0, - int v1, - int v2, - int v3, - Real value ) -{ - set_cached_volume_voxel( volume, v0, v1, v2, v3, 0, value ); -} - -public void set_volume_cache_functions( - Volume volume ) -{ - volume->set = set_cached_volume_voxel; - volume->get = get_cached_volume_voxel; - - switch( get_volume_n_dimensions(volume) ) - { - case 1: - volume->set_1d = set_voxel_1d; - volume->get_1d = get_voxel_1d; - break; - case 2: - volume->set_2d = set_voxel_2d; - volume->get_2d = get_voxel_2d; - break; - case 3: - volume->set_3d = set_voxel_3d; - volume->get_3d = get_voxel_3d; - break; - case 4: - volume->set_4d = set_voxel_4d; - volume->get_4d = get_voxel_4d; - break; - case 5: - volume->set_5d = set_cached_volume_voxel; - volume->get_5d = get_cached_volume_voxel; - break; - } -}