File: registry.cpp

package info (click to toggle)
odil 0.13.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,476 kB
  • sloc: cpp: 55,982; python: 3,947; javascript: 460; xml: 182; makefile: 99; sh: 36
file content (40 lines) | stat: -rw-r--r-- 1,462 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#define BOOST_TEST_MODULE registry
#include <boost/test/unit_test.hpp>

#include "odil/registry.h"
#include "odil/Tag.h"

BOOST_AUTO_TEST_CASE(PublicDictionary)
{
    auto const iterator = odil::registry::public_dictionary.find(
        odil::registry::PatientName);
    BOOST_REQUIRE(iterator != odil::registry::public_dictionary.end());
    auto const & entry = iterator->second;
    BOOST_REQUIRE_EQUAL(entry.name, "Patient's Name");
    BOOST_REQUIRE_EQUAL(entry.keyword, "PatientName");
    BOOST_REQUIRE_EQUAL(entry.vr, "PN");
    BOOST_REQUIRE_EQUAL(entry.vm, "1");
}

BOOST_AUTO_TEST_CASE(PublicDictionaryRepeatingGroup)
{
    auto const iterator = odil::registry::public_dictionary.find(
        std::string("60xx0010"));
    BOOST_REQUIRE(iterator != odil::registry::public_dictionary.end());
    auto const & entry = iterator->second;
    BOOST_REQUIRE_EQUAL(entry.name, "Overlay Rows");
    BOOST_REQUIRE_EQUAL(entry.keyword, "OverlayRows");
    BOOST_REQUIRE_EQUAL(entry.vr, "US");
    BOOST_REQUIRE_EQUAL(entry.vm, "1");
}

BOOST_AUTO_TEST_CASE(UIDsDictionary)
{
    auto const iterator = odil::registry::uids_dictionary.find(
        odil::registry::MRImageStorage);
    BOOST_REQUIRE(iterator != odil::registry::uids_dictionary.end());
    auto const & entry = iterator->second;
    BOOST_REQUIRE_EQUAL(entry.name, "MR Image Storage");
    BOOST_REQUIRE_EQUAL(entry.keyword, "MRImageStorage");
    BOOST_REQUIRE_EQUAL(entry.type, "SOP Class");
}