]> Creatis software - gdcm.git/blobdiff - src/gdcmDefaultDicts.cxx.in
Reverse order sorting now works, even with user supplied function.
[gdcm.git] / src / gdcmDefaultDicts.cxx.in
index 78873a29c9a3324ecb802d199d2b8b69bad55578..2622cc23bae40ba19df21bcd226f67c3a5f53277 100644 (file)
@@ -1,19 +1,19 @@
 /*=========================================================================
-                                                                                
+
   Program:   gdcm
   Module:    $RCSfile: gdcmDefaultDicts.cxx.in,v $
   Language:  C++
-  Date:      $Date: 2005/01/24 14:14:10 $
-  Version:   $Revision: 1.7 $
-                                                                                
+  Date:      $Date: 2005/04/05 10:56:25 $
+  Version:   $Revision: 1.9 $
+
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
-                                                                                
+
      This software is distributed WITHOUT ANY WARRANTY; without even
      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
      PURPOSE.  See the above copyright notices for more information.
-                                                                                
+
 =========================================================================*/
 
 #ifndef GDCMDEFAULTDICTS_H
@@ -23,6 +23,7 @@
 #include "gdcmDictEntry.h"
 #include "gdcmTS.h"
 #include "gdcmVR.h"
+#include "gdcmDictGroupName.h"
 #include "gdcmDicomDirElement.h"
 
 namespace gdcm
@@ -53,16 +54,21 @@ void FillDefaultDataDict(Dict *d)
    }
 }
 
-void FillDefaultTSDict(TSHT & ts)
+void FillDefaultTSDict(TSHT &ts)
 {
 @DICOM_TS_DICTIONARY@
 }
 
-void FillDefaultVRDict(VRHT & vr)
+void FillDefaultVRDict(VRHT &vr)
 {
 @DICOM_VR_DICTIONARY@
 }
 
+void FillDefaultDictGroupName(DictGroupNameHT &groupName)
+{
+@DICT_GROUP_NAME_DICTIONARY@
+}
+
 typedef struct
 {
    const char *type;
@@ -81,18 +87,21 @@ void FillDefaultDIRDict(DicomDirElement *dde)
    ELEMENT e = dataElement[i];
    Element elem;
    DicomDirType type;
+   std::string strType;
 
    while( e.type != 0 )
    {
-      if( e.type == "metaElem" )
+      // Force to use the string comparision operator ==
+      strType = e.type;
+      if( strType == "metaElem" )
          type = DD_META;
-      else if( e.type == "patientElem" )
+      else if( strType == "patientElem" )
          type = DD_PATIENT;
-      else if( e.type == "studyElem" )
+      else if( strType == "studyElem" )
          type = DD_STUDY;
-      else if( e.type == "serieElem" )
+      else if( strType == "serieElem" )
          type = DD_SERIE;
-      else if( e.type == "imageElem" )
+      else if( strType == "imageElem" )
          type = DD_IMAGE;
       else
          type = DD_UNKNOWN;