2 * \file TestDcmDescriptor.cxx
3 * \brief Test the Descriptor reading.
8 #include <creaImageIOTreeDescriptor.h>
12 * \brief Read a descriptor file and check its content.
13 * \param argc Argument count (unused).
14 * \param argv Argument list (unused).
15 * \return The test result.
17 int TestDcmDescriptor( int argc, char* argv[] )
19 std::cout << "TestDcmDescriptor..." << std::endl;
22 // read a descriptor file
23 creaImageIO::tree::Descriptor dscp;
24 const std::string path = GIMMICK_TEST_DATA_DIR;
25 const std::string filepath = path + "/localdatabase_Descriptor.dscp";
26 std::cout << path << std::endl;
27 dscp.createDescriptorfromFile(filepath);
30 creaImageIO::tree::AttributeMapType tags;
31 dscp.BuildAttributeMap(tags);
34 std::cout << "tags size: " << tags.size() << std::endl;
35 creaImageIO::tree::AttributeMapType::iterator it;
36 for ( it=tags.begin() ; it != tags.end(); it++ )
38 std::cout << (*it).first << " => " << "empty" << std::endl;
42 // default test result