]> Creatis software - gdcm.git/commitdiff
BUG: Fix previously instroduce cmake bug, now should compile fine even without VTK...
authormalaterre <malaterre>
Wed, 11 May 2005 15:01:46 +0000 (15:01 +0000)
committermalaterre <malaterre>
Wed, 11 May 2005 15:01:46 +0000 (15:01 +0000)
Testing/CMakeLists.txt
src/gdcmDict.cxx
src/gdcmDict.h

index 68c49b2c18fdb6fb6cb5d5284620ce8700d9a0c2..86ce368bfe0f651fc3fd2968ae06c1ce40d82a5f 100644 (file)
@@ -42,13 +42,17 @@ IF (GDCM_DATA_ROOT)
   )
   # add test that require VTK:
   IF(GDCM_VTK)
-    IF(${VTK_MAJOR_VERSION} LESS 4)
+    IF("${VTK_MAJOR_VERSION}" LESS 4)
       MESSAGE(FATAL_ERROR "This VTK version is not supported, you are on your own !")
-    ELSE(${VTK_MAJOR_VERSION} LESS 4)
-      IF(${VTK_MAJOR_VERSION} EQUAL 4 AND ${VTK_MINOR_VERSION} EQUAL 4 AND ${VTK_BUILD_VERSION} LESS 3)
+    ELSE("${VTK_MAJOR_VERSION}" LESS 4)
+      IF("${VTK_MAJOR_VERSION}" EQUAL 4 AND "${VTK_MINOR_VERSION}" EQUAL 2)
         MESSAGE(FATAL_ERROR "This VTK version is not supported, you are on your own !"
                              "Although gdcm should compile fine. You just need to turn BUILD_TESTING:=OFF")
-      ENDIF(${VTK_MAJOR_VERSION} EQUAL 4 AND ${VTK_MINOR_VERSION} EQUAL 4 AND ${VTK_BUILD_VERSION} LESS 3)
+      ENDIF("${VTK_MAJOR_VERSION}" EQUAL 4 AND "${VTK_MINOR_VERSION}" EQUAL 2)
+      IF("${VTK_MAJOR_VERSION}" EQUAL 4 AND "${VTK_MINOR_VERSION}" EQUAL 4 AND "${VTK_BUILD_VERSION}" LESS 3)
+        MESSAGE(FATAL_ERROR "This VTK version is not supported, you are on your own !"
+                             "Although gdcm should compile fine. You just need to turn BUILD_TESTING:=OFF")
+      ENDIF("${VTK_MAJOR_VERSION}" EQUAL 4 AND "${VTK_MINOR_VERSION}" EQUAL 4 AND "${VTK_BUILD_VERSION}" LESS 3)
       # Include the VTK library since we know this is going to work
       INCLUDE(${VTK_USE_FILE})
 
@@ -61,7 +65,7 @@ IF (GDCM_DATA_ROOT)
         VTKTestWrite.cxx
         VTKTestWriteSeq.cxx
       )
-    ENDIF(${VTK_MAJOR_VERSION} LESS 4)
+    ENDIF("${VTK_MAJOR_VERSION}" LESS 4)
   ENDIF(GDCM_VTK)
 ENDIF (GDCM_DATA_ROOT)
 
index fc7c07f2d69dae556afb8222e035b278293a662c..97d0eb7102d85d2e2944b3a3328bb38001990859 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDict.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/11 15:22:18 $
-  Version:   $Revision: 1.74 $
+  Date:      $Date: 2005/05/11 15:01:47 $
+  Version:   $Revision: 1.75 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -177,6 +177,16 @@ void Dict::ClearEntry()
  * @param   elem element of the entry to be found
  * @return  the corresponding dictionary entry when existing, NULL otherwise
  */
+DictEntry *Dict::GetEntry(TagKey const &key)
+{
+   TagKeyHT::iterator it = KeyHt.find(key);
+   if ( it == KeyHt.end() )
+   {
+      return 0;
+   }
+   return &(it->second);
+}
+
 DictEntry *Dict::GetEntry(uint16_t group, uint16_t elem)
 {
    TagKey key = DictEntry::TranslateToKey(group, elem);
index 56db9453a880ead7dc8d3b0d7a692120b3dfc152..1e83f1b692720b1c7f1f908184e6ecb067f02e31 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDict.h,v $
   Language:  C++
-  Date:      $Date: 2005/02/07 09:51:03 $
-  Version:   $Revision: 1.38 $
+  Date:      $Date: 2005/05/11 15:01:47 $
+  Version:   $Revision: 1.39 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -61,6 +61,7 @@ public:
    
 // Tag
    DictEntry *GetEntry(uint16_t group, uint16_t elem);
+   DictEntry *GetEntry(TagKey const &key);
 
    DictEntry *GetFirstEntry();
    DictEntry *GetNextEntry();