src/imgbuf.h

00001 
00002 
00003 #include "defs.h"
00004 
00005 #ifndef __IMAGER_IMBUF_H__
00006 #define __IMAGER_IMBUF_H__
00007 
00008 
00009 
00010 /* Allocate memory for image of dimensions x,y,z - returns a pointer (img)
00011    and an error code */
00012 
00013 int allocate_image (image_type* img, TYPE_SELECTOR imgtype, int x, int y, int z);
00014 
00015 /* Dpulicate an image */
00016 
00017 int clone_image (image_type* src, image_type* dest);
00018 
00019 /* Move an image buffer from src to dest */
00020 
00021 void handback (image_type* dest, image_type* src);
00022 
00023 /* Retrieve one data element from coordinates (x,y,z) */
00024 
00025 void readbuf (image_type* img, void* element, int x, int y, int z);
00026 
00027 /* Retrieve one element from coordinates (x,y,z) as float, char, rgb */
00028 
00029 double readbuf_flt (image_type* img, int x, int y, int z);
00030 unsigned char readbuf_char (image_type* img, int x, int y, int z);
00031 rgbtriplet readbuf_rgb (image_type* img, int x, int y, int z);
00032 double ireadbuf (image_type* img, double x, double y, int z, interpol_method intp);
00033 rgbtriplet rgbireadbuf (image_type* img, double x, double y, int z, interpol_method intp);
00034 
00035 /* Return whether an element has nonzero content (exact method) */
00036 
00037 unsigned char nonzero (image_type* img, int x, int y, int z);
00038 
00039 /* Store one data element at coords x,y,z */
00040 
00041 void writebuf (image_type* img, void* element, int x, int y, int z);
00042 
00043 /* Copy data between buffers of the same type */
00044 
00045 void copybuf (image_type* src, image_type* dest, int x1, int y1, int z1, 
00046                                 int x2, int y2, int z2, long len);
00047 
00048 /* Copy selected slices (a substack) between images of the same type.
00049    It is assumed that z1 of src becomes z=0 of dest */
00050 
00051 void copybuf_z (image_type* src, image_type* dest, int z1, int z2);
00052 
00053 /* Free data associated with this image */
00054 
00055 void freebuf (image_type* img);
00056 
00057 #endif

Generated on Sat Nov 15 23:24:49 2008 for Crystal Image by  doxygen 1.5.3