]> Creatis software - gdcm.git/blobdiff - src/gdcmFileHelper.h
* src/gdcmBinEntry.cxx : bug fix for BIG_ENDIAN part when writing the content
[gdcm.git] / src / gdcmFileHelper.h
index 1906e485c9be7985c9a21f1d58656a0738f59b67..4891f801b5a88e363af23249bd745cb247fd9676 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFileHelper.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:34 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2005/02/02 16:18:48 $
+  Version:   $Revision: 1.8 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -27,6 +27,7 @@ namespace gdcm
 class File;
 class ValEntry;
 class BinEntry;
+class SeqEntry;
 class PixelReadConvert;
 class PixelWriteConvert;
 class DocEntryArchive;
@@ -57,6 +58,19 @@ public:
    /// Accessor to \ref File
    File *GetFile() { return FileInternal; }
 
+   // File methods
+   bool SetValEntry(std::string const &content,
+                    uint16_t group, uint16_t elem);
+   bool SetBinEntry(uint8_t *content, int lgth,
+                    uint16_t group, uint16_t elem);
+
+   ValEntry *InsertValEntry(std::string const &content,
+                            uint16_t group, uint16_t elem);
+   BinEntry *InsertBinEntry(uint8_t *binArea, int lgth,
+                            uint16_t group, uint16_t elem);
+   SeqEntry *InsertSeqEntry(uint16_t group, uint16_t elem);
+
+   // File helpers
    size_t GetImageDataSize();
    size_t GetImageDataRawSize();
 
@@ -66,35 +80,18 @@ public:
 
    void SetImageData(uint8_t *data, size_t expectedSize);
 
-   // User datas
+   // User data
    void SetUserData(uint8_t *data, size_t expectedSize);
    uint8_t* GetUserData();
    size_t GetUserDataSize();
-   // RBG datas (from file
+   // RBG data (from file
    uint8_t* GetRGBData();
    size_t GetRGBDataSize();
-   // RAW datas (from file
+   // RAW data (from file
    uint8_t* GetRawData();
    size_t GetRawDataSize();
 
-   // Write pixels of ONE image on hard drive
-   // No test is made on processor "endianity"
-   // The user must call his reader correctly
-   bool WriteRawData  (std::string const &fileName);
-   bool WriteDcmImplVR(std::string const &fileName);
-   bool WriteDcmExplVR(std::string const &fileName);
-   bool WriteAcr      (std::string const &fileName);
-   bool Write         (std::string const &fileName);
-
-   bool SetEntry(std::string const &content,
-                 uint16_t group, uint16_t elem);
-   bool SetEntry(uint8_t *content, int lgth,
-                 uint16_t group, uint16_t elem);
-   bool ReplaceOrCreate(std::string const &content,
-                        uint16_t group, uint16_t elem);
-   bool ReplaceOrCreate(uint8_t *binArea, int lgth,
-                        uint16_t group, uint16_t elem);
-
+   // LUT
    uint8_t* GetLutRGBA();
 
    // Write mode
@@ -111,6 +108,15 @@ public:
    void SetWriteType(FileType format) { WriteType = format; };
    FileType GetWriteType()            { return WriteType; };
 
+   // Write pixels of ONE image on hard drive
+   // No test is made on processor "endianity"
+   // The user must call his reader correctly
+   bool WriteRawData  (std::string const &fileName);
+   bool WriteDcmImplVR(std::string const &fileName);
+   bool WriteDcmExplVR(std::string const &fileName);
+   bool WriteAcr      (std::string const &fileName);
+   bool Write         (std::string const &fileName);
+
 protected:
    bool CheckWriteIntegrity();