]> Creatis software - gdcm.git/blobdiff - Testing/TestDictGroupName.cxx
* src/gdcmDictGroupName.[h|cxx] : add a correlation between a group (number)
[gdcm.git] / Testing / TestDictGroupName.cxx
diff --git a/Testing/TestDictGroupName.cxx b/Testing/TestDictGroupName.cxx
new file mode 100644 (file)
index 0000000..d8ee701
--- /dev/null
@@ -0,0 +1,34 @@
+/*=========================================================================
+                                                                                
+  Program:   gdcm
+  Module:    $RCSfile: TestDictGroupName.cxx,v $
+  Language:  C++
+  Date:      $Date: 2005/04/05 10:56:24 $
+  Version:   $Revision: 1.1 $
+                                                                                
+  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.
+                                                                                
+=========================================================================*/
+#include "gdcmDictGroupName.h"
+#include "gdcmGlobal.h"
+#include "gdcmCommon.h"
+
+int TestDictGroupName(int , char *[])
+{
+   gdcm::DictGroupName groupName;
+   groupName.Print( std::cout );
+
+   std::cout << std::endl;
+   std::cout << "Group : 0x0002 : " << groupName.GetName(0x0002) << " - " 
+             << (bool)(groupName.GetName(0x0002)=="Meta Elements") << std::endl;
+   std::cout << "Group : 0x0007 : " << groupName.GetName(0x0007) << " - " 
+             << (bool)(groupName.GetName(0x0007)==gdcm::GDCM_UNFOUND) << std::endl;
+
+   return groupName.GetName( 0x7fe0 ) != "";
+}