/** * \file TestDcmDescriptor.cxx * \brief Test the Descriptor reading. */ #include #include #include /** * TestDcmDescriptor * \brief Read a descriptor file and check its content. * \param argc Argument count (unused). * \param argv Argument list (unused). * \return The test result. */ int TestDcmDescriptor( int argc, char* argv[] ) { std::cout << "TestDcmDescriptor..." << std::endl; // read a descriptor file creaImageIO::tree::Descriptor dscp; const std::string path = GIMMICK_TEST_DATA_DIR; const std::string filepath = path + "/localdatabase_Descriptor.dscp"; std::cout << path << std::endl; dscp.createDescriptorfromFile(filepath); // get Attribute map creaImageIO::tree::AttributeMapType tags; dscp.BuildAttributeMap(tags); // check its content std::cout << "tags size: " << tags.size() << std::endl; creaImageIO::tree::AttributeMapType::iterator it; for ( it=tags.begin() ; it != tags.end(); it++ ) { std::cout << (*it).first << " => " << "empty" << std::endl; } // default test result return EXIT_FAILURE; }