]> Creatis software - gdcm.git/commitdiff
Removal of useless and dangerous methods :
authorjpr <jpr>
Fri, 7 Jan 2005 08:46:17 +0000 (08:46 +0000)
committerjpr <jpr>
Fri, 7 Jan 2005 08:46:17 +0000 (08:46 +0000)
 GetEntryByName, GetEntryVRByName, GetDocEntryByName, SetEntryByName

src/gdcmDict.h
src/gdcmDocument.cxx
src/gdcmDocument.h
src/gdcmSQItem.h

index cfbdb9e9da071683f4a9d1ee77409b6850167f45..4892ed05078a417caf150e28e7e2e9eb94de1cbe 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDict.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 20:03:27 $
-  Version:   $Revision: 1.26 $
+  Date:      $Date: 2005/01/07 08:46:17 $
+  Version:   $Revision: 1.27 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -40,8 +40,8 @@ typedef std::map<std::string,
 /*
  * \defgroup Dict
  * \brief    Dict acts a memory representation of a dicom dictionary i.e.
- *           it is a container for a collection of dictionary entries. The
- *           dictionary is loaded from in an ascii file.
+ *           it is a container for a collection of dictionary entries.
+ *           The dictionary is loaded from in an ascii file.
  *           There should be a single public dictionary (THE dictionary of
  *           the actual DICOM v3) but as many shadow dictionaries as imagers 
  *           combined with all software versions...
index 2c705af22df48a1ece6ea8bedfeec4c28ea465ff..d10b222857a8bf2b6c160b1a999d403117d2e990 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 20:03:27 $
-  Version:   $Revision: 1.161 $
+  Date:      $Date: 2005/01/07 08:46:18 $
+  Version:   $Revision: 1.162 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -764,51 +764,6 @@ bool Document::CheckIfEntryExistByNumber(uint16_t group, uint16_t element )
    return TagHT.count(key) != 0;
 }
 
-/**
- * \brief   Searches within Header Entries (Dicom Elements) parsed with 
- *          the public and private dictionaries 
- *          for the element value of a given tag.
- * \warning Don't use any longer : use GetPubEntryByName
- * @param   tagName name of the searched element.
- * @return  Corresponding element value when it exists,
- *          and the string GDCM_UNFOUND ("gdcm::Unfound") otherwise.
- */
-std::string Document::GetEntryByName(TagName const &tagName)
-{
-   DictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName); 
-   if( !dictEntry )
-   {
-      return GDCM_UNFOUND;
-   }
-
-   return GetEntryByNumber(dictEntry->GetGroup(),dictEntry->GetElement());
-}
-
-/**
- * \brief   Searches within Header Entries (Dicom Elements) parsed with 
- *          the public and private dictionaries 
- *          for the element value representation of a given tag.
- *
- *          Obtaining the VR (Value Representation) might be needed by caller
- *          to convert the string typed content to caller's native type 
- *          (think of C++ vs Python). The VR is actually of a higher level
- *          of semantics than just the native C++ type.
- * @param   tagName name of the searched element.
- * @return  Corresponding element value representation when it exists,
- *          and the string GDCM_UNFOUND ("gdcm::Unfound") otherwise.
- */
-std::string Document::GetEntryVRByName(TagName const& tagName)
-{
-   DictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName); 
-   if( dictEntry == NULL)
-   {
-      return GDCM_UNFOUND;
-   }
-
-   DocEntry *elem = GetDocEntryByNumber(dictEntry->GetGroup(),
-                                        dictEntry->GetElement());
-   return elem->GetVR();
-}
 
 /**
  * \brief   Searches within Header Entries (Dicom Elements) parsed with 
@@ -871,24 +826,6 @@ int Document::GetEntryLengthByNumber(uint16_t group, uint16_t element)
    }
    return elem->GetLength();
 }
-/**
- * \brief   Sets the value (string) of the Header Entry (Dicom Element)
- * @param   content string value of the Dicom Element
- * @param   tagName name of the searched Dicom Element.
- * @return  true when found
- */
-bool Document::SetEntryByName( std::string const &content,
-                               TagName const &tagName)
-{
-   DictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName); 
-   if( !dictEntry )
-   {
-      return false;
-   }
-
-   return SetEntryByNumber(content,dictEntry->GetGroup(),
-                                   dictEntry->GetElement());
-}
 
 /**
  * \brief   Accesses an existing DocEntry (i.e. a Dicom Element)
@@ -1083,24 +1020,6 @@ void Document::LoadEntryBinArea(BinEntry *element)
    return false;
 }*/
 
-/**
- * \brief   Searches within the Header Entries for a Dicom Element of
- *          a given tag.
- * @param   tagName name of the searched Dicom Element.
- * @return  Corresponding Dicom Element when it exists, and NULL
- *          otherwise.
- */
-DocEntry *Document::GetDocEntryByName(TagName const &tagName)
-{
-   DictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName); 
-   if( !dictEntry )
-   {
-      return NULL;
-   }
-
-  return GetDocEntryByNumber(dictEntry->GetGroup(),dictEntry->GetElement());
-}
-
 /**
  * \brief  retrieves a Dicom Element (the first one) using (group, element)
  * \warning (group, element) IS NOT an identifier inside the Dicom Header
index e7233eb029fff390ccb7fe075d98c43e2b01e406..bacbe5cf278ef919a829082f3d312ceb3271231b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 20:03:27 $
-  Version:   $Revision: 1.75 $
+  Date:      $Date: 2005/01/07 08:46:18 $
+  Version:   $Revision: 1.76 $
  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -110,8 +110,7 @@ public:
    void WriteContent( std::ofstream *fp, FileType type );
 
 // Content entries
-   virtual bool SetEntryByName  (std::string const &content, 
-                                 TagName const &tagName );
+
    virtual bool SetEntryByNumber(std::string const &content,
                                  uint16_t group, uint16_t element);
    virtual bool SetEntryByNumber(uint8_t *content, int lgth,
@@ -121,14 +120,11 @@ public:
 
    virtual void *GetEntryBinAreaByNumber(uint16_t group, uint16_t elem);   
 
-   virtual std::string GetEntryByName    (TagName const &tagName);
-   virtual std::string GetEntryVRByName  (TagName const &tagName);
    virtual std::string GetEntryByNumber  (uint16_t group, uint16_t elem);
    virtual std::string GetEntryVRByNumber(uint16_t group, uint16_t elem);
    virtual int GetEntryLengthByNumber(uint16_t group, uint16_t elem);
 
    DocEntry *GetDocEntryByNumber(uint16_t group, uint16_t element); 
-   DocEntry *GetDocEntryByName  (TagName const &tagName);
    ValEntry *GetValEntryByNumber(uint16_t group, uint16_t element); 
    BinEntry *GetBinEntryByNumber(uint16_t group, uint16_t element); 
 
index 9bce85dd5311b1f27bbdf4395d5d5a5de6e350fc..9874b61dd9b658f8246feda6ba4bb89a8e37f4b7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 20:03:28 $
-  Version:   $Revision: 1.28 $
+  Date:      $Date: 2005/01/07 08:46:18 $
+  Version:   $Revision: 1.29 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -50,8 +50,6 @@ public:
    bool RemoveEntryNoDestroy(DocEntry *EntryToRemove);
   
    DocEntry *GetDocEntryByNumber(uint16_t group, uint16_t element);
-   // FIXME method to write
-   //DocEntry *GetDocEntryByName(std::string Name);
    
    bool SetEntryByNumber(std::string const &val, uint16_t group, 
                                                  uint16_t element);