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

lightfield.cpp

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include "lightfield.h"
00003 
00004 //----------------------------------------------------------------------------
00005 //------------------------- protected read() ---------------------------------
00006 //----------------------------------------------------------------------------
00007 
00008 bool vu16::read(FILE *file)
00009 {
00010   int ret = 0;
00011   int len = 0;
00012 
00013   bool success = vu1::read(file);
00014   if (!success) return false;
00015   //Read in the Dataset type, checking if it's a fixel volume
00016   ret = fscanf(file,"DATASET LIGHTFIELD %n",&len);
00017   if (len < 19) return setInvalidFormatError();
00018 
00019   return true;
00020 }
00021 
00022 //----------------------------------------------------------------------------
00023 //------------------------- protected write() --------------------------------
00024 //----------------------------------------------------------------------------
00025 
00026 bool vu16::write(FILE *file)
00027 {
00028   int ret = 0;
00029 
00030   bool success = vu1::write(file);
00031   if (!success) return false;
00032 
00033   //Write the Dataset type
00034   ret = fprintf(file,"DATASET LIGHTFIELD\n");
00035     
00036   if (ret > 0)
00037     return true;
00038   else
00039     return setWriteError();
00040 }

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