Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

FVR/Image_io.h

Go to the documentation of this file.
00001 #ifndef _FVR_IMAGE_IO_H_
00002 #define _FVR_IMAGE_IO_H_
00003 // set of functions to work on raw, pvp and fvr files
00004 // need to add some checks to see if things worked and handle white space better
00005 
00006 #include <fstream.h>
00007 #include "SimpleDefs.h"
00008 #include "vuSimpleTypes.h"
00009 #include "vuVector.h"
00010 
00011 namespace FVR_NS
00012 {
00013 
00014 #define MAGIC_NUM_LEN   128
00015 
00016 // read XSize x YSize x ZSize integers with d_size bytes from fin to vol
00017 // converts to t_datas and assumes vol is size X, Y, Z
00018 void read_raw(ifstream& fin, t_data* vol, dword X, dword Y, dword Z, dword XSize, dword YSize, dword ZSize, dword d_size);
00019 
00020 // read XSize x YSize x ZSize integers with d_size bytes from data to vol
00021 // converts to t_datas and assumes vol is size X, Y, Z
00022 void read_raw(byte *data, float* vol, dword X, dword Y, dword Z, 
00023               dword XSize, dword YSize, dword ZSize, dword d_size);
00024 
00025 // same as above, but read data members in raw
00026 void read_raw_r(ifstream& fin, byte* vol, dword X, dword Y, dword Z, dword XSize, dword YSize, dword ZSize, dword d_size);
00027 
00028 // same as abouve, but faster (using buffers)
00029 void read_raw_fast(ifstream& fin, byte* vol, dword X, dword Y, dword Z, dword XSize, dword YSize, dword ZSize, dword d_size);
00030 
00031 // read pvp or fvr header; return 0 on fail, 1 if pvp, 2 if fvr
00032 int read_head(ifstream& in, dword& XSize, dword& YSize, dword& ZSize, dword& b_size);
00033 
00034 bool write_pvp_head(ofstream& fout, dword XSize, dword YSize, dword ZSize, dword b_size);
00035 
00036 bool write_fvr_head(ofstream& fout, dword XSize, dword YSize, dword ZSize, dword b_size);
00037 
00038 void spitData(float *data, dword len, const char* fileName);
00039 void spitVec3d(vuVector* v, dword len, const char* fileName);
00040 
00041 } // END_NS
00042 
00043 #endif

Generated on Wed Dec 15 21:20:29 2004 for vuVolume by  doxygen 1.3.9.1