MeVisLabToolboxReference
MeVis/Foundation/Sources/MLImageFormatBase/mlImageFormatInfos.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00006 
00011 //----------------------------------------------------------------------------------
00012 
00013 #ifndef __mlImageFormatInfos_H
00014 #define __mlImageFormatInfos_H
00015 
00016 // Resolve platform independencies.
00017 #ifndef __MLImageFormatBaseSystem_H
00018 #include "MLImageFormatBaseSystem.h"
00019 #endif
00020 
00021 #ifndef __mlModuleIncludes_H
00022 #include "mlModuleIncludes.h"
00023 #endif
00024 
00025 #ifndef __mlDataCompressor_H
00026 #include "mlDataCompressor.h"
00027 #endif
00028 
00029 #ifndef __mlImageFormatTools_H
00030 #include "mlImageFormatTools.h"
00031 #endif
00032 #ifndef __mlImageFormatTagList_H
00033 #include "mlImageFormatTagList.h"
00034 #endif
00035 #ifndef __mlImageFormatIdxTable_H
00036 #include "mlImageFormatIdxTable.h"
00037 #endif
00038 
00039 ML_START_NAMESPACE
00040 
00041 
00043   class DataCompressor;
00044 
00045   //--------------------------------------------------------------------------------
00046   //--------------------------------------------------------------------------------
00049   //--------------------------------------------------------------------------------
00050   //--------------------------------------------------------------------------------
00051   class MLIMAGEFORMATBASE_EXPORT MLImageFormatInfos
00052   {
00053   public:
00055     inline MLImageFormatInfos(){ compressor = NULL; reset(); }
00056 
00058     inline ~MLImageFormatInfos(){ compressor = NULL; reset(); }
00059 
00061     inline void reset()
00062     {
00063       fileName          = "";
00064       fd                = -1;
00065       defaultVoxelValue = "0";
00066       endianess         = MLIsLittleEndian() ?
00067                             MLImageFormatTagList::ML_LITTLE_ENDIAN :
00068                             MLImageFormatTagList::ML_BIG_ENDIAN;
00069       usesCheckSum      = true;
00070       usesPartialPages  = false;
00071       static const PagedImage defaultPagedImg;
00072       props.setImageProperties(defaultPagedImg);
00073       idxTab.reset();
00074       if (compressor){ ML_DELETE(compressor); }
00075       compressor        = NULL;
00076       compressorName    = "";
00077       compressorVersion = "";
00078       compressionTagList.clear();
00079       userTagList       .clear();
00080       privateTagList    .clear();
00081       tagList           .clear();
00082     }
00083 
00084 
00086     std::string           fileName;
00087 
00089     int                   fd;
00090 
00093     std::string           defaultVoxelValue;
00094 
00096     MLint                 endianess;
00097 
00099     MLint                 usesCheckSum;
00100 
00102     MLint                 usesPartialPages;
00103 
00105     PagedImage            props;
00106 
00108     MLImageFormatIdxTable idxTab;
00109 
00111     DataCompressor        *compressor;
00112 
00114     std::string           compressorName;
00115 
00117     std::string           compressorVersion;
00118 
00120     MLImageFormatTagList  compressionTagList;
00121 
00123     MLImageFormatTagList  userTagList;
00124 
00126     MLImageFormatTagList  privateTagList;
00127 
00129     MLImageFormatTagList  tagList;
00130 
00131 
00132   private:
00134     inline MLImageFormatInfos(const MLImageFormatInfos &){ }
00135 
00137     inline MLImageFormatInfos &operator=(const MLImageFormatInfos &){ return *this; }
00138   };
00139 
00140 ML_END_NAMESPACE
00141 
00142 #endif // __mlImageFormatInfos_H