Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

scan_objects.c

Go to the documentation of this file.
00001 /* ---------------------------------------------------------------------------- 00002 @COPYRIGHT : 00003 Copyright 1993,1994,1995 David MacDonald, 00004 McConnell Brain Imaging Centre, 00005 Montreal Neurological Institute, McGill University. 00006 Permission to use, copy, modify, and distribute this 00007 software and its documentation for any purpose and without 00008 fee is hereby granted, provided that the above copyright 00009 notice appear in all copies. The author and McGill University 00010 make no representations about the suitability of this 00011 software for any purpose. It is provided "as is" without 00012 express or implied warranty. 00013 ---------------------------------------------------------------------------- */ 00014 00015 #include <volume_io/internal_volume_io.h> 00016 #include <bicpl.h> 00017 00018 #ifndef lint 00019 static char rcsid[] = "$Header: /software/source//libraries/bicpl/Volumes/scan_objects.c,v 1.8 2000/02/06 15:30:57 stever Exp $"; 00020 #endif 00021 00022 /* ----------------------------- MNI Header ----------------------------------- 00023 @NAME : scan_object_to_volume 00024 @INPUT : object 00025 volume 00026 label_volume 00027 label 00028 max_distance 00029 @OUTPUT : 00030 @RETURNS : 00031 @DESCRIPTION: Scans an object into a label_volume. 00032 @METHOD : 00033 @GLOBALS : 00034 @CALLS : 00035 @CREATED : 1993 David MacDonald 00036 @MODIFIED : 00037 ---------------------------------------------------------------------------- */ 00038 00039 public void scan_object_to_volume( 00040 object_struct *object, 00041 Volume volume, 00042 Volume label_volume, 00043 int label, 00044 Real max_distance ) 00045 { 00046 object_struct *current_object; 00047 object_traverse_struct object_traverse; 00048 00049 initialize_object_traverse( &object_traverse, FALSE, 1, &object ); 00050 00051 while( get_next_object_traverse(&object_traverse,&current_object) ) 00052 { 00053 switch( get_object_type( current_object ) ) 00054 { 00055 case POLYGONS: 00056 scan_polygons_to_voxels( get_polygons_ptr(current_object), 00057 volume, label_volume, 00058 label, max_distance ); 00059 break; 00060 00061 case QUADMESH: 00062 scan_quadmesh_to_voxels( get_quadmesh_ptr(current_object), 00063 volume, label_volume, 00064 label, max_distance ); 00065 break; 00066 00067 case LINES: 00068 scan_lines_to_voxels( get_lines_ptr(current_object), 00069 volume, label_volume, 00070 label ); 00071 break; 00072 00073 case MARKER: 00074 scan_marker_to_voxels( get_marker_ptr(current_object), 00075 volume, label_volume, 00076 label ); 00077 break; 00078 default: 00079 print_error("scan_object_to_volume: object type %d not handled.\n", 00080 get_object_type( current_object ) ); 00081 } 00082 } 00083 }

Generated on Wed Jul 28 09:10:58 2004 for BICPL by doxygen 1.3.7