X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmFile.h;h=2cfd69f70eded4db1f3ea55986771a83126c3649;hb=8b50829e21f22a3353c83e3d902cdf20bc5367f6;hp=f72484188d77d0a8363eaa7d4f457398996aed20;hpb=8d10ccb6794a0f22234983990e2181a24625fbd8;p=gdcm.git diff --git a/src/gdcmFile.h b/src/gdcmFile.h index f7248418..2cfd69f7 100644 --- a/src/gdcmFile.h +++ b/src/gdcmFile.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFile.h,v $ Language: C++ - Date: $Date: 2004/12/04 09:41:02 $ - Version: $Revision: 1.84 $ + Date: $Date: 2004/12/10 13:49:07 $ + Version: $Revision: 1.86 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -40,11 +40,12 @@ class GDCM_EXPORT File public: enum FileMode { - WMODE_DECOMPRESSED, + WMODE_RAW, WMODE_RGB }; public: + File( ); File( Header* header ); File( std::string const& filename ); @@ -60,7 +61,18 @@ public: uint8_t* GetImageDataRaw(); size_t GetImageDataIntoVector(void* destination, size_t maxSize); - bool SetImageData (uint8_t* data, size_t expectedSize); + void SetImageData(uint8_t* data, size_t expectedSize); + + // User datas + void SetUserData(uint8_t* data, size_t expectedSize); + uint8_t* GetUserData(); + size_t GetUserDataSize(); + // RBG datas (from file + uint8_t* GetRGBData(); + size_t GetRGBDataSize(); + // RAW datas (from file + uint8_t* GetRawData(); + size_t GetRawDataSize(); // Write pixels of ONE image on hard drive // No test is made on processor "endianity" @@ -72,11 +84,18 @@ public: bool Write(std::string const& fileName); bool SetEntryByNumber(std::string const& content, + uint16_t group, uint16_t element); + bool SetEntryByNumber(uint8_t* content, int lgth, + uint16_t group, uint16_t element); + bool ReplaceOrCreateByNumber(std::string const& content, uint16_t group, uint16_t element); + bool ReplaceOrCreateByNumber(uint8_t* binArea, int lgth, + uint16_t group, uint16_t elem); + uint8_t* GetLutRGBA(); // Write mode - void SetWriteModeToDecompressed() { SetWriteMode(WMODE_DECOMPRESSED); }; + void SetWriteModeToRaw() { SetWriteMode(WMODE_RAW); }; void SetWriteModeToRGB() { SetWriteMode(WMODE_RGB); }; void SetWriteMode(FileMode mode) { WriteMode = mode; }; FileMode GetWriteMode() { return WriteMode; }; @@ -93,7 +112,7 @@ protected: bool WriteBase(std::string const& fileName); bool CheckWriteIntegrity(); - void SetWriteToDecompressed(); + void SetWriteToRaw(); void SetWriteToRGB(); void RestoreWrite(); @@ -112,8 +131,7 @@ protected: private: void Initialise(); - uint8_t* GetDecompressed(); - int ComputeDecompressedPixelDataSizeFromHeader(); + uint8_t* GetRaw(); private: // members variables: