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