]> Creatis software - gdcm.git/blobdiff - src/gdcmHeader.h
Update for writting DCM files
[gdcm.git] / src / gdcmHeader.h
index ec1943ba30f741e27974276c3489b9118dbd02d9..91b92549255f7137735515769cb708e3ccb133a5 100644 (file)
@@ -47,9 +47,9 @@ private:
    gdcmDict* RefShaDict;
 
    /// ELement VALueS parsed with the PUBlic dictionary.
-   gdcmElValSet PubElVals;
+   gdcmElValSet PubElValSet;
    /// ELement VALueS parsed with the SHAdow dictionary.
-   gdcmElValSet ShaElVals;
+   gdcmElValSet ShaElValSet;
    /// Refering underlying filename.
    string filename; 
    FILE * fp;
@@ -97,6 +97,7 @@ private:
    void SkipElementValue(gdcmElValue *);
    void FixFoundLength(gdcmElValue*, guint32);
    bool IsAnInteger(gdcmElValue *);
+   void LoadElements(void);
    
    bool IsImplicitVRLittleEndianTransferSyntax(void);
    bool IsExplicitVRLittleEndianTransferSyntax(void);
@@ -122,7 +123,7 @@ protected:
    int write(ostream&);   
    int anonymize(ostream&);  // FIXME : anonymize should be a friend ?
 public:
-   void LoadElements(void);
+   bool IsReadable(void);
    virtual void ParseHeader(bool exception_on_error = false)
      throw(gdcmFormatError);
    gdcmHeader(const char *filename, bool exception_on_error = false)
@@ -143,9 +144,9 @@ public:
    string GetPubElValRepByName(string TagName);
    string GetPubElValRepByNumber(guint16 group, guint16 element);
 
-   TagElValueHT & GetPubElVal(void) { return PubElVals.GetTagHt(); };
+   TagElValueHT & GetPubElVal(void) { return PubElValSet.GetTagHt(); };
    void   PrintPubElVal(ostream & os = cout);
-   void   PrintPubDict(ostream & os = cout);
+   void   PrintPubDict (ostream & os = cout);
      
    // TODO Swig string* GetShaTagNames(); 
    string GetShaElValByName(string TagName);
@@ -163,9 +164,10 @@ public:
    int SetShaElValByName(string content, string ShadowTagName);
    int SetShaElValByNumber(string content, guint16 group, guint16 element);
    
-   int SetPubElValLengthByNumber(guint32 lgr, guint16 group, guint16 element);
+   int SetPubElValLengthByNumber(guint32 lgr, guint16 group, guint16 element);                                   
+   int ReplaceOrCreateByNumber(guint16 Group, guint16 Elem, string Value);                                
 
-   gdcmElValSet GetPubElVals() { return(PubElVals); }
+   gdcmElValSet GetPubElValSet() { return(PubElValSet); }
 };
 
 #endif