TAPs 0.7.7.3
TAPsRead3DRaw.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsRead3DRaw.hpp
00003 
00004 Create 3-dimensional array from a .raw format file.
00005 This .raw format stores 8-bit binary data for xyz position.
00006 
00007 SUKITTI PUNAK   (04/28/2007)
00008 UPDATE          (04/28/2007)
00009 ******************************************************************************/
00010 #ifndef TAPs_READ_3D_RAW_HPP
00011 #define TAPs_READ_3D_RAW_HPP
00012 
00013 // The necessary headers are included in TAPsReadModel.hpp which directly uses
00014 // this header.
00015 /*
00016 #include <iomanip>
00017 #include <cmath>
00018 #include <fstream>
00019 #include <cstring>  // for string token strtok
00020 #include <cstdlib>  // for converting string to numeric (strtod, strtol, strtoul)
00021 */
00022 
00023 BEGIN_NAMESPACE_TAPs
00024 //=============================================================================
00025 //template <typename T>
00026 class Read3DRaw {
00027 // Member Functions  ----------------------------------------------------------
00028 public:
00029     //-------------------------------------------------------------------------
00030     // Read an input file
00031     //  I/P: fileName
00032     //  O/P: *pr3DScalar
00033     // One fn by class template so each function is created for each data type.
00047     template <typename T1, typename T2>
00048     static bool ReadFile ( 
00049         const char * fileName,              // I/P: file name .raw
00050         int sizeX, int sizeY, int sizeZ,    // I/P: 3D data size X x Y x Z
00051         T2 * const pr3DScalar               // O/P: 3D array of type T
00052     );                              // Output space must already be allocated
00053     //-------------------------------------------------------------------------
00054     //-------------------------------------------------------------------------
00055 //-----------------------------------------------------------------------------
00056 // Data Members  --------------------------------------------------------------
00057 private:
00058 };
00059 //=============================================================================
00060 END_NAMESPACE_TAPs
00061 //-----------------------------------------------------------------------------
00062 // Include definition if TAPs_USE_EXPORT is not defined
00063 #if !defined( TAPs_USE_EXPORT )
00064     #include "TAPsRead3DRaw.cpp"
00065 #endif
00066 //-----------------------------------------------------------------------------
00067 #endif
00068 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00069 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines