1 /*=========================================================================
4 Module: $RCSfile: TestDictGroupName.cxx,v $
6 Date: $Date: 2005/10/25 14:52:30 $
7 Version: $Revision: 1.4 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
18 #include "gdcmDictGroupName.h"
19 #include "gdcmGlobal.h"
20 #include "gdcmCommon.h"
24 int CompareDictGroupName(gdcm::DictGroupName *groupName,
25 uint16_t group,std::string ref)
27 std::string val = groupName->GetName(group);
28 std::cout << "Group : 0x" << std::hex << std::setw(4) << group
29 << std::dec << " : " << val << " - "
30 << (bool)(val==ref) << std::endl;
35 int TestDictGroupName(int , char *[])
37 gdcm::DictGroupName *groupName = gdcm::DictGroupName::New();
38 groupName->Print( std::cout );
42 std::cout << std::endl;
43 ret += CompareDictGroupName(groupName,0x0002,"Meta Elements");
44 ret += CompareDictGroupName(groupName,0x7fe0,"Pixels");
45 ret += CompareDictGroupName(groupName,0x0007,gdcm::GDCM_UNFOUND);