pax_global_header00006660000000000000000000000064136224465600014522gustar00rootroot0000000000000052 comment=b7e612cf9f0162d337c2f4913f5cb30029e0927b odil-0.11.0/000077500000000000000000000000001362244656000125305ustar00rootroot00000000000000odil-0.11.0/.bumpversion.cfg000066400000000000000000000002351362244656000156400ustar00rootroot00000000000000[bumpversion] current_version = 0.11.0 commit = True tag = True [bumpversion:file:CMakeLists.txt] [bumpversion:file:documentation/installation/index.rst] odil-0.11.0/.ci/000077500000000000000000000000001362244656000132015ustar00rootroot00000000000000odil-0.11.0/.ci/brew/000077500000000000000000000000001362244656000141405ustar00rootroot00000000000000odil-0.11.0/.ci/brew/build000077500000000000000000000010031362244656000151570ustar00rootroot00000000000000#!/bin/sh set -ev export WORKSPACE=${WORKSPACE:?} export BUILD_DIR="${WORKSPACE}/${BUILD_DIR:-build}" export INSTALL_DIR="${WORKSPACE}/${INSTALL_DIR:-install}" mkdir -p ${BUILD_DIR} mkdir -p ${INSTALL_DIR} cd ${BUILD_DIR} export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig cmake \ -G Ninja \ -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ -DCMAKE_BUILD_TYPE=Release \ -D PYTHON_EXECUTABLE=/usr/local/bin/python3 \ ${CMAKE_OPTIONS} \ .. cmake --build . --target install odil-0.11.0/.ci/brew/install000077500000000000000000000013371362244656000155400ustar00rootroot00000000000000#!/bin/sh set -ev export PYTHON=${PYTHON:-python} # WARNING The Python environment in Travis is weird: "brew install python" fails # when symlinking, due to the presence of python@2. brew upgrade python || brew install python || true brew link --overwrite python || true for PACKAGE in boost cmake dcmtk icu4c jsoncpp ninja pkg-config pybind11; do VERSIONS=$(brew ls --versions ${PACKAGE} || true) if [ -z "${VERSIONS}" ]; then COMMAND="install" else OUTDATED=$(brew outdated ${PACKAGE} || true) if [ -z "${OUTDATED}" ]; then COMMAND="" else COMMAND="upgrade" fi fi if [ -n "${COMMAND}" ]; then brew ${COMMAND} ${PACKAGE} fi done odil-0.11.0/.ci/brew/post_build000077500000000000000000000017201362244656000162320ustar00rootroot00000000000000#!/bin/bash set -v export WORKSPACE=${WORKSPACE:?} export BUILD_DIR="${WORKSPACE}/${BUILD_DIR:-build}" export INSTALL_DIR="${WORKSPACE}/${INSTALL_DIR:-install}" PYTHON=$(awk -F= '$0 ~ /^PYTHON_EXECUTABLE:/ { print $2 }' ${BUILD_DIR}/CMakeCache.txt) export LD_LIBRARY_PATH=${INSTALL_DIR}/lib export PYTHONPATH=${INSTALL_DIR}/$(${PYTHON} -c "from distutils.sysconfig import *; print(get_python_lib(True, prefix=''))") export ODIL_OWN_AET=LOCAL export ODIL_PEER_HOST_NAME=127.0.0.1 export ODIL_PEER_PORT=11112 export ODIL_PEER_AET=REMOTE export PATH=${WORKSPACE}/tests/tools:${PATH} cd "${WORKSPACE}/tests/data" dcmqridx ./ dataset.dcm dcmqrscp -ll error -c dcmqrscp.config 11112 & sleep 1 cd "${BUILD_DIR}" ctest --output-on-failure R1=$? ${PYTHON} -m unittest discover -s ${WORKSPACE}/tests/wrappers/ R2=$? kill %1 cd "${WORKSPACE}/tests/data" rm -f index.dat RAW_*.dcm RETURNCODE=$(if test ${R2} -gt ${R1}; then echo ${R2} ; else echo ${R1}; fi) exit ${RETURNCODE} odil-0.11.0/.ci/deb/000077500000000000000000000000001362244656000137335ustar00rootroot00000000000000odil-0.11.0/.ci/deb/build000077500000000000000000000006511362244656000147620ustar00rootroot00000000000000#!/bin/sh set -ev export WORKSPACE=${WORKSPACE:?} export BUILD_DIR="${WORKSPACE}/${BUILD_DIR:-build}" export INSTALL_DIR="${WORKSPACE}/${INSTALL_DIR:-install}" mkdir -p ${BUILD_DIR} mkdir -p ${INSTALL_DIR} cd ${BUILD_DIR} cmake \ -G Ninja \ -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ -DCMAKE_BUILD_TYPE=Release \ -D PYTHON_EXECUTABLE=/usr/bin/python3 \ ${CMAKE_OPTIONS} \ .. cmake --build . --target install odil-0.11.0/.ci/deb/install000077500000000000000000000013331362244656000153270ustar00rootroot00000000000000#!/bin/sh set -ev apt-get -y update BINTRAY=http://dl.bintray.com/lamyj/generic/apt apt-get -y --no-install-recommends install gnupg software-properties-common wget wget -O - http://dl.bintray.com/lamyj/generic/gpg.key | apt-key add - if wget -q -O /dev/null ${BINTRAY}/dists/$(lsb_release -cs)/Release; then add-apt-repository "deb ${BINTRAY} $(lsb_release -cs) main" fi apt-get update apt-get -y --no-install-recommends install \ build-essential cmake ninja-build pkg-config python3 \ libboost-dev libboost-date-time-dev libboost-exception-dev \ libboost-log-dev libboost-filesystem-dev \ libdcmtk2-dev libicu-dev libjsoncpp-dev zlib1g-dev \ pybind11-dev python3-pybind11 python3-dev \ libboost-test-dev dcmtk odil-0.11.0/.ci/deb/post_build000077500000000000000000000017201362244656000160250ustar00rootroot00000000000000#!/bin/bash set -v export WORKSPACE=${WORKSPACE:?} export BUILD_DIR="${WORKSPACE}/${BUILD_DIR:-build}" export INSTALL_DIR="${WORKSPACE}/${INSTALL_DIR:-install}" PYTHON=$(awk -F= '$0 ~ /^PYTHON_EXECUTABLE:/ { print $2 }' ${BUILD_DIR}/CMakeCache.txt) export LD_LIBRARY_PATH=${INSTALL_DIR}/lib export PYTHONPATH=${INSTALL_DIR}/$(${PYTHON} -c "from distutils.sysconfig import *; print(get_python_lib(True, prefix=''))") export ODIL_OWN_AET=LOCAL export ODIL_PEER_HOST_NAME=127.0.0.1 export ODIL_PEER_PORT=11112 export ODIL_PEER_AET=REMOTE export PATH=${WORKSPACE}/tests/tools:${PATH} cd "${WORKSPACE}/tests/data" dcmqridx ./ dataset.dcm dcmqrscp -ll error -c dcmqrscp.config 11112 & sleep 1 cd "${BUILD_DIR}" ctest --output-on-failure R1=$? ${PYTHON} -m unittest discover -s ${WORKSPACE}/tests/wrappers/ R2=$? kill %1 cd "${WORKSPACE}/tests/data" rm -f index.dat RAW_*.dcm RETURNCODE=$(if test ${R2} -gt ${R1}; then echo ${R2} ; else echo ${R1}; fi) exit ${RETURNCODE} odil-0.11.0/.ci/windows/000077500000000000000000000000001362244656000146735ustar00rootroot00000000000000odil-0.11.0/.ci/windows/build.cmd000066400000000000000000000007571362244656000164700ustar00rootroot00000000000000set BUILD_DIR=%WORKSPACE%\build set INSTALL_DIR=%WORKSPACE%\install mkdir %BUILD_DIR% mkdir %INSTALL_DIR% cd %BUILD_DIR% cmake ^ -G Ninja ^ -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF ^ -DWITH_DCMTK=OFF ^ -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% ^ -DCMAKE_BUILD_TYPE=Release ^ -DPYTHON_EXECUTABLE=%PYTHON% ^ ${CMAKE_OPTIONS} ^ .. if %errorlevel% neq 0 exit /b %errorlevel% cmake --build . --config Release --target install if %errorlevel% neq 0 exit /b %errorlevel% cd %WORKSPACE% odil-0.11.0/.ci/windows/install.cmd000066400000000000000000000003261362244656000170270ustar00rootroot00000000000000REM WARNING: assume conda is installed conda update -y -n base -c defaults conda conda install -y -c conda-forge boost cmake icu jsoncpp ninja pkg-config pybind11 python if %errorlevel% neq 0 exit /b %errorlevel% odil-0.11.0/.ci/windows/post_build.cmd000077500000000000000000000011721362244656000175300ustar00rootroot00000000000000set BUILD_DIR=%WORKSPACE%\build set INSTALL_DIR=%WORKSPACE%\install cd %BUILD_DIR% echo %PYTHON% for /f "tokens=*" %%a in ( '%PYTHON% -c "from distutils.sysconfig import *; print(get_python_lib(True, prefix=\"\"))"' ) do set PYTHONPATH=%INSTALL_DIR%\%%a if %errorlevel% neq 0 exit /b %errorlevel% echo %PYTHONPATH% set PATH=%PATH%;%INSTALL_DIR%\bin echo "WARNING: no DCMTK package is available on Windows; not running tests" REM ctest -T Test REM if %errorlevel% neq 0 exit /b %errorlevel% REM REM %PYTHON% -m unittest discover -s %WORKSPACE%/tests/python/ REM if %errorlevel% neq 0 exit /b %errorlevel% REM REM cd %WORKSPACE% odil-0.11.0/.ci/windows/python_executable.cmake000066400000000000000000000002061362244656000214150ustar00rootroot00000000000000file(READ "CMakeCache.txt" cache) string(REGEX MATCH "PYTHON_EXECUTABLE:([^=]+)=([^\n\r]+)" _ "${cache}") message("${CMAKE_MATCH_2}") odil-0.11.0/.travis.yml000066400000000000000000000026271362244656000146500ustar00rootroot00000000000000language: minimal matrix: include: - name: "Debian 10 (Buster)" os: linux sudo: required services: - docker env: - CI_TYPE=deb - WORKSPACE=${TRAVIS_BUILD_DIR} - RUNNER="docker exec -w ${TRAVIS_BUILD_DIR} -e WORKSPACE=${WORKSPACE} debian_buster" before_install: - docker run -di -v ${TRAVIS_BUILD_DIR}:${TRAVIS_BUILD_DIR} --name debian_buster --rm debian:buster after_success: - docker kill debian_buster - name: "Ubuntu 18.04 (Bionic)" os: linux sudo: required services: - docker env: - CI_TYPE=deb - WORKSPACE=${TRAVIS_BUILD_DIR} - RUNNER="docker exec -w ${TRAVIS_BUILD_DIR} -e WORKSPACE=${WORKSPACE} ubuntu_bionic" before_install: - docker run -di -v ${TRAVIS_BUILD_DIR}:${TRAVIS_BUILD_DIR} --name ubuntu_bionic --rm ubuntu:bionic after_success: - docker kill ubuntu_bionic - name: "macOS 10.14 (Mojave)" os: osx osx_image: xcode11 env: - CI_TYPE=brew - CMAKE_OPTIONS="-DBoost_NO_BOOST_CMAKE=ON" - WORKSPACE=${TRAVIS_BUILD_DIR} - RUNNER="" cache: directories: - $HOME/Library/Caches/Homebrew before_cache: - brew cleanup script: | ${RUNNER} ./.ci/${CI_TYPE}/install ${RUNNER} ./.ci/${CI_TYPE}/build ${RUNNER} ./.ci/${CI_TYPE}/post_build odil-0.11.0/CMakeLists.txt000066400000000000000000000061011362244656000152660ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.5) project("odil") set(odil_VERSION 0.11.0) string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" _ "${odil_VERSION}") set(odil_MAJOR_VERSION "${CMAKE_MATCH_1}") set(odil_MINOR_VERSION "${CMAKE_MATCH_2}") set(odil_PATCH_VERSION "${CMAKE_MATCH_3}") option(BUILD_SHARED_LIBS "Build Odil with shared libraries." ON) option(BUILD_EXAMPLES "Build the examples directory." ON) option(BUILD_PYTHON_WRAPPERS "Build the Python Wrappers." ON) option(BUILD_JAVASCRIPT_WRAPPERS "Build the Javascript Wrappers." OFF) option(WITH_DCMTK "Build the DCMTK converter" ON) option( USE_BUILTIN_DCMTK_GETSCU "Compile a locally packaged version of getscu for old DCMTK versions" ON) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}" ${CMAKE_MODULE_PATH}) include(CTest) include(cmake/functions.cmake) # Add the C++0x or C++11 flag include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG(-std=c++11 COMPILER_SUPPORTS_CXX11) CHECK_CXX_COMPILER_FLAG(-std=c++0x COMPILER_SUPPORTS_CXX0X) if(COMPILER_SUPPORTS_CXX11) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") elseif(COMPILER_SUPPORTS_CXX0X) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") endif() set_property(GLOBAL PROPERTY USE_FOLDERS ON) if(WIN32) # We have to set _WIN32_WINNT for Asio if(${CMAKE_SYSTEM_VERSION} EQUAL 10) # Windows 10 add_definitions(-D _WIN32_WINNT=0x0A00) elseif(${CMAKE_SYSTEM_VERSION} EQUAL 6.3) # Windows 8.1 add_definitions(-D _WIN32_WINNT=0x0603) elseif(${CMAKE_SYSTEM_VERSION} EQUAL 6.2) # Windows 8 add_definitions(-D _WIN32_WINNT=0x0602) elseif(${CMAKE_SYSTEM_VERSION} EQUAL 6.1) # Windows 7 add_definitions(-D _WIN32_WINNT=0x0601) elseif(${CMAKE_SYSTEM_VERSION} EQUAL 6.0) # Windows Vista add_definitions(-D _WIN32_WINNT=0x0600) else() # Windows XP (5.1) add_definitions(-D _WIN32_WINNT=0x0501) endif() # Starting with Visual Studio 2015 / VC 14 / MSVC 19.00, snprintf is present if(${MSVC_VERSION} GREATER_EQUAL "1900") add_definitions(-D HAVE_SNPRINTF) endif() endif() add_subdirectory("src") if(BUILD_EXAMPLES) add_subdirectory("examples") endif() if(BUILD_TESTING) add_subdirectory("tests") endif() if(BUILD_PYTHON_WRAPPERS) add_subdirectory("wrappers/python") add_subdirectory("applications") endif() if(BUILD_JAVASCRIPT_WRAPPERS) add_subdirectory("wrappers/js") endif() file(GLOB_RECURSE ci_resources .ci/*) add_custom_target( CIIntegration ${CMAKE_COMMAND} -E echo "CI Integration" SOURCES appveyor.yml .travis.yml ${ci_resources}) set_target_properties(CIIntegration PROPERTIES FOLDER "Utils") file(GLOB_RECURSE documentation documentation/*) add_custom_target( Documentation ${CMAKE_COMMAND} -E echo "Documentation" SOURCES LICENSE.txt README.md ${documentation}) set_target_properties(Documentation PROPERTIES FOLDER "Utils") file(GLOB_RECURSE registry_templates registry*.tmpl) add_custom_target( Registry ${CMAKE_COMMAND} -E echo "Registry" SOURCES generate_registry ${registry_templates}) set_target_properties(Registry PROPERTIES FOLDER "Utils") odil-0.11.0/FindICU.cmake000066400000000000000000000024371362244656000147610ustar00rootroot00000000000000# - Try to find ICU # Once done this will define # ICU_FOUND - System has ICU # ICU_INCLUDE_DIRS - The ICU include directories # ICU_LIBRARIES - The libraries needed to use ICU # ICU_DEFINITIONS - Compiler switches required for using ICU find_package(PkgConfig) pkg_check_modules(PC_ICU QUIET icu-uc) set(ICU_DEFINITIONS ${PC_ICU_CFLAGS_OTHER}) find_path(ICU_INCLUDE_DIR "unicode/ucnv.h" HINTS ${PC_ICU_INCLUDE_DIRS}) # Get version if(ICU_INCLUDE_DIR AND EXISTS "${ICU_INCLUDE_DIR}/unicode/uvernum.h") file(STRINGS "${ICU_INCLUDE_DIR}/unicode/uvernum.h" icu_header_str REGEX "^#define[\t ]+U_ICU_VERSION[\t ]+\".*\".*") string(REGEX REPLACE "^#define[\t ]+U_ICU_VERSION[\t ]+\"([0-9]*).*" "\\1" icu_version_string "${icu_header_str}") set(ICU_VERSION "${icu_version_string}" ) unset(icu_header_str) unset(icu_version_string) endif() find_library(ICU_LIBRARY NAMES icuuc icuuc${ICU_VERSION} icuuc${ICU_VERSION}d HINTS ${PC_ICU_LIBRARY_DIRS} ) set(ICU_LIBRARIES ${ICU_LIBRARY} ) set(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR} ) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set ICU_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(ICU DEFAULT_MSG ICU_LIBRARY ICU_INCLUDE_DIR) mark_as_advanced(ICU_INCLUDE_DIR ICU_LIBRARY) odil-0.11.0/FindJsonCpp.cmake000066400000000000000000000016661362244656000157200ustar00rootroot00000000000000# - Try to find JsonCpp # Once done this will define # JsonCpp_FOUND - System has JsonCpp # JsonCpp_INCLUDE_DIRS - The JsonCpp include directories # JsonCpp_LIBRARIES - The libraries needed to use JsonCpp # JsonCpp_DEFINITIONS - Compiler switches required for using JsonCpp find_package(PkgConfig) pkg_check_modules(PC_JsonCpp QUIET jsoncpp) set(JsonCpp_DEFINITIONS ${PC_JsonCpp_CFLAGS_OTHER}) find_path(JsonCpp_INCLUDE_DIR "json/json.h" HINTS ${PC_JsonCpp_INCLUDE_DIRS}) find_library(JsonCpp_LIBRARY NAMES jsoncpp HINTS ${PC_JsonCpp_LIBRARY_DIRS} ) set(JsonCpp_LIBRARIES ${JsonCpp_LIBRARY} ) set(JsonCpp_INCLUDE_DIRS ${JsonCpp_INCLUDE_DIR} ) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set JsonCpp_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args( JsonCpp DEFAULT_MSG JsonCpp_LIBRARY JsonCpp_INCLUDE_DIR) mark_as_advanced(JsonCpp_INCLUDE_DIR JsonCpp_LIBRARY) odil-0.11.0/LICENSE.txt000066400000000000000000000516221362244656000143610ustar00rootroot00000000000000 CeCILL-B FREE SOFTWARE LICENSE AGREEMENT Notice This Agreement is a Free Software license agreement that is the result of discussions between its authors in order to ensure compliance with the two main principles guiding its drafting: * firstly, compliance with the principles governing the distribution of Free Software: access to source code, broad rights granted to users, * secondly, the election of a governing law, French law, with which it is conformant, both as regards the law of torts and intellectual property law, and the protection that it offers to both authors and holders of the economic rights over software. The authors of the CeCILL-B (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre]) license are: Commissariat à l'Energie Atomique - CEA, a public scientific, technical and industrial research establishment, having its principal place of business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France. Centre National de la Recherche Scientifique - CNRS, a public scientific and technological establishment, having its principal place of business at 3 rue Michel-Ange, 75794 Paris cedex 16, France. Institut National de Recherche en Informatique et en Automatique - INRIA, a public scientific and technological establishment, having its principal place of business at Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay cedex, France. Preamble This Agreement is an open source software license intended to give users significant freedom to modify and redistribute the software licensed hereunder. The exercising of this freedom is conditional upon a strong obligation of giving credits for everybody that distributes a software incorporating a software ruled by the current license so as all contributions to be properly identified and acknowledged. In consideration of access to the source code and the rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors only have limited liability. In this respect, the risks associated with loading, using, modifying and/or developing or reproducing the software by the user are brought to the user's attention, given its Free Software status, which may make it complicated to use, with the result that its use is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the suitability of the software as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions of security. This Agreement may be freely reproduced and published, provided it is not altered, and that no provisions are either added or removed herefrom. This Agreement may apply to any or all software for which the holder of the economic rights decides to submit the use thereof to its provisions. Article 1 - DEFINITIONS For the purpose of this Agreement, when the following expressions commence with a capital letter, they shall have the following meaning: Agreement: means this license agreement, and its possible subsequent versions and annexes. Software: means the software in its Object Code and/or Source Code form and, where applicable, its documentation, "as is" when the Licensee accepts the Agreement. Initial Software: means the Software in its Source Code and possibly its Object Code form and, where applicable, its documentation, "as is" when it is first distributed under the terms and conditions of the Agreement. Modified Software: means the Software modified by at least one Contribution. Source Code: means all the Software's instructions and program lines to which access is required so as to modify the Software. Object Code: means the binary files originating from the compilation of the Source Code. Holder: means the holder(s) of the economic rights over the Initial Software. Licensee: means the Software user(s) having accepted the Agreement. Contributor: means a Licensee having made at least one Contribution. Licensor: means the Holder, or any other individual or legal entity, who distributes the Software under the Agreement. Contribution: means any or all modifications, corrections, translations, adaptations and/or new functions integrated into the Software by any or all Contributors, as well as any or all Internal Modules. Module: means a set of sources files including their documentation that enables supplementary functions or services in addition to those offered by the Software. External Module: means any or all Modules, not derived from the Software, so that this Module and the Software run in separate address spaces, with one calling the other when they are run. Internal Module: means any or all Module, connected to the Software so that they both execute in the same address space. Parties: mean both the Licensee and the Licensor. These expressions may be used both in singular and plural form. Article 2 - PURPOSE The purpose of the Agreement is the grant by the Licensor to the Licensee of a non-exclusive, transferable and worldwide license for the Software as set forth in Article 5 hereinafter for the whole term of the protection granted by the rights over said Software. Article 3 - ACCEPTANCE 3.1 The Licensee shall be deemed as having accepted the terms and conditions of this Agreement upon the occurrence of the first of the following events: * (i) loading the Software by any or all means, notably, by downloading from a remote server, or by loading from a physical medium; * (ii) the first time the Licensee exercises any of the rights granted hereunder. 3.2 One copy of the Agreement, containing a notice relating to the characteristics of the Software, to the limited warranty, and to the fact that its use is restricted to experienced users has been provided to the Licensee prior to its acceptance as set forth in Article 3.1 hereinabove, and the Licensee hereby acknowledges that it has read and understood it. Article 4 - EFFECTIVE DATE AND TERM 4.1 EFFECTIVE DATE The Agreement shall become effective on the date when it is accepted by the Licensee as set forth in Article 3.1. 4.2 TERM The Agreement shall remain in force for the entire legal term of protection of the economic rights over the Software. Article 5 - SCOPE OF RIGHTS GRANTED The Licensor hereby grants to the Licensee, who accepts, the following rights over the Software for any or all use, and for the term of the Agreement, on the basis of the terms and conditions set forth hereinafter. Besides, if the Licensor owns or comes to own one or more patents protecting all or part of the functions of the Software or of its components, the Licensor undertakes not to enforce the rights granted by these patents against successive Licensees using, exploiting or modifying the Software. If these patents are transferred, the Licensor undertakes to have the transferees subscribe to the obligations set forth in this paragraph. 5.1 RIGHT OF USE The Licensee is authorized to use the Software, without any limitation as to its fields of application, with it being hereinafter specified that this comprises: 1. permanent or temporary reproduction of all or part of the Software by any or all means and in any or all form. 2. loading, displaying, running, or storing the Software on any or all medium. 3. entitlement to observe, study or test its operation so as to determine the ideas and principles behind any or all constituent elements of said Software. This shall apply when the Licensee carries out any or all loading, displaying, running, transmission or storage operation as regards the Software, that it is entitled to carry out hereunder. 5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS The right to make Contributions includes the right to translate, adapt, arrange, or make any or all modifications to the Software, and the right to reproduce the resulting software. The Licensee is authorized to make any or all Contributions to the Software provided that it includes an explicit notice that it is the author of said Contribution and indicates the date of the creation thereof. 5.3 RIGHT OF DISTRIBUTION In particular, the right of distribution includes the right to publish, transmit and communicate the Software to the general public on any or all medium, and by any or all means, and the right to market, either in consideration of a fee, or free of charge, one or more copies of the Software by any means. The Licensee is further authorized to distribute copies of the modified or unmodified Software to third parties according to the terms and conditions set forth hereinafter. 5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION The Licensee is authorized to distribute true copies of the Software in Source Code or Object Code form, provided that said distribution complies with all the provisions of the Agreement and is accompanied by: 1. a copy of the Agreement, 2. a notice relating to the limitation of both the Licensor's warranty and liability as set forth in Articles 8 and 9, and that, in the event that only the Object Code of the Software is redistributed, the Licensee allows effective access to the full Source Code of the Software at a minimum during the entire period of its distribution of the Software, it being understood that the additional cost of acquiring the Source Code shall not exceed the cost of transferring the data. 5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE If the Licensee makes any Contribution to the Software, the resulting Modified Software may be distributed under a license agreement other than this Agreement subject to compliance with the provisions of Article 5.3.4. 5.3.3 DISTRIBUTION OF EXTERNAL MODULES When the Licensee has developed an External Module, the terms and conditions of this Agreement do not apply to said External Module, that may be distributed under a separate license agreement. 5.3.4 CREDITS Any Licensee who may distribute a Modified Software hereby expressly agrees to: 1. indicate in the related documentation that it is based on the Software licensed hereunder, and reproduce the intellectual property notice for the Software, 2. ensure that written indications of the Software intended use, intellectual property notice and license hereunder are included in easily accessible format from the Modified Software interface, 3. mention, on a freely accessible website describing the Modified Software, at least throughout the distribution term thereof, that it is based on the Software licensed hereunder, and reproduce the Software intellectual property notice, 4. where it is distributed to a third party that may distribute a Modified Software without having to make its source code available, make its best efforts to ensure that said third party agrees to comply with the obligations set forth in this Article . If the Software, whether or not modified, is distributed with an External Module designed for use in connection with the Software, the Licensee shall submit said External Module to the foregoing obligations. 5.3.5 COMPATIBILITY WITH THE CeCILL AND CeCILL-C LICENSES Where a Modified Software contains a Contribution subject to the CeCILL license, the provisions set forth in Article 5.3.4 shall be optional. A Modified Software may be distributed under the CeCILL-C license. In such a case the provisions set forth in Article 5.3.4 shall be optional. Article 6 - INTELLECTUAL PROPERTY 6.1 OVER THE INITIAL SOFTWARE The Holder owns the economic rights over the Initial Software. Any or all use of the Initial Software is subject to compliance with the terms and conditions under which the Holder has elected to distribute its work and no one shall be entitled to modify the terms and conditions for the distribution of said Initial Software. The Holder undertakes that the Initial Software will remain ruled at least by this Agreement, for the duration set forth in Article 4.2. 6.2 OVER THE CONTRIBUTIONS The Licensee who develops a Contribution is the owner of the intellectual property rights over this Contribution as defined by applicable law. 6.3 OVER THE EXTERNAL MODULES The Licensee who develops an External Module is the owner of the intellectual property rights over this External Module as defined by applicable law and is free to choose the type of agreement that shall govern its distribution. 6.4 JOINT PROVISIONS The Licensee expressly undertakes: 1. not to remove, or modify, in any manner, the intellectual property notices attached to the Software; 2. to reproduce said notices, in an identical manner, in the copies of the Software modified or not. The Licensee undertakes not to directly or indirectly infringe the intellectual property rights of the Holder and/or Contributors on the Software and to take, where applicable, vis-à-vis its staff, any and all measures required to ensure respect of said intellectual property rights of the Holder and/or Contributors. Article 7 - RELATED SERVICES 7.1 Under no circumstances shall the Agreement oblige the Licensor to provide technical assistance or maintenance services for the Software. However, the Licensor is entitled to offer this type of services. The terms and conditions of such technical assistance, and/or such maintenance, shall be set forth in a separate instrument. Only the Licensor offering said maintenance and/or technical assistance services shall incur liability therefor. 7.2 Similarly, any Licensor is entitled to offer to its licensees, under its sole responsibility, a warranty, that shall only be binding upon itself, for the redistribution of the Software and/or the Modified Software, under terms and conditions that it is free to decide. Said warranty, and the financial terms and conditions of its application, shall be subject of a separate instrument executed between the Licensor and the Licensee. Article 8 - LIABILITY 8.1 Subject to the provisions of Article 8.2, the Licensee shall be entitled to claim compensation for any direct loss it may have suffered from the Software as a result of a fault on the part of the relevant Licensor, subject to providing evidence thereof. 8.2 The Licensor's liability is limited to the commitments made under this Agreement and shall not be incurred as a result of in particular: (i) loss due the Licensee's total or partial failure to fulfill its obligations, (ii) direct or consequential loss that is suffered by the Licensee due to the use or performance of the Software, and (iii) more generally, any consequential loss. In particular the Parties expressly agree that any or all pecuniary or business loss (i.e. loss of data, loss of profits, operating loss, loss of customers or orders, opportunity cost, any disturbance to business activities) or any or all legal proceedings instituted against the Licensee by a third party, shall constitute consequential loss and shall not provide entitlement to any or all compensation from the Licensor. Article 9 - WARRANTY 9.1 The Licensee acknowledges that the scientific and technical state-of-the-art when the Software was distributed did not enable all possible uses to be tested and verified, nor for the presence of possible defects to be detected. In this respect, the Licensee's attention has been drawn to the risks associated with loading, using, modifying and/or developing and reproducing the Software which are reserved for experienced users. The Licensee shall be responsible for verifying, by any or all means, the suitability of the product for its requirements, its good working order, and for ensuring that it shall not cause damage to either persons or properties. 9.2 The Licensor hereby represents, in good faith, that it is entitled to grant all the rights over the Software (including in particular the rights set forth in Article 5). 9.3 The Licensee acknowledges that the Software is supplied "as is" by the Licensor without any other express or tacit warranty, other than that provided for in Article 9.2 and, in particular, without any warranty as to its commercial value, its secured, safe, innovative or relevant nature. Specifically, the Licensor does not warrant that the Software is free from any error, that it will operate without interruption, that it will be compatible with the Licensee's own equipment and software configuration, nor that it will meet the Licensee's requirements. 9.4 The Licensor does not either expressly or tacitly warrant that the Software does not infringe any third party intellectual property right relating to a patent, software or any other property right. Therefore, the Licensor disclaims any and all liability towards the Licensee arising out of any or all proceedings for infringement that may be instituted in respect of the use, modification and redistribution of the Software. Nevertheless, should such proceedings be instituted against the Licensee, the Licensor shall provide it with technical and legal assistance for its defense. Such technical and legal assistance shall be decided on a case-by-case basis between the relevant Licensor and the Licensee pursuant to a memorandum of understanding. The Licensor disclaims any and all liability as regards the Licensee's use of the name of the Software. No warranty is given as regards the existence of prior rights over the name of the Software or as regards the existence of a trademark. Article 10 - TERMINATION 10.1 In the event of a breach by the Licensee of its obligations hereunder, the Licensor may automatically terminate this Agreement thirty (30) days after notice has been sent to the Licensee and has remained ineffective. 10.2 A Licensee whose Agreement is terminated shall no longer be authorized to use, modify or distribute the Software. However, any licenses that it may have granted prior to termination of the Agreement shall remain valid subject to their having been granted in compliance with the terms and conditions hereof. Article 11 - MISCELLANEOUS 11.1 EXCUSABLE EVENTS Neither Party shall be liable for any or all delay, or failure to perform the Agreement, that may be attributable to an event of force majeure, an act of God or an outside cause, such as defective functioning or interruptions of the electricity or telecommunications networks, network paralysis following a virus attack, intervention by government authorities, natural disasters, water damage, earthquakes, fire, explosions, strikes and labor unrest, war, etc. 11.2 Any failure by either Party, on one or more occasions, to invoke one or more of the provisions hereof, shall under no circumstances be interpreted as being a waiver by the interested Party of its right to invoke said provision(s) subsequently. 11.3 The Agreement cancels and replaces any or all previous agreements, whether written or oral, between the Parties and having the same purpose, and constitutes the entirety of the agreement between said Parties concerning said purpose. No supplement or modification to the terms and conditions hereof shall be effective as between the Parties unless it is made in writing and signed by their duly authorized representatives. 11.4 In the event that one or more of the provisions hereof were to conflict with a current or future applicable act or legislative text, said act or legislative text shall prevail, and the Parties shall make the necessary amendments so as to comply with said act or legislative text. All other provisions shall remain effective. Similarly, invalidity of a provision of the Agreement, for any reason whatsoever, shall not cause the Agreement as a whole to be invalid. 11.5 LANGUAGE The Agreement is drafted in both French and English and both versions are deemed authentic. Article 12 - NEW VERSIONS OF THE AGREEMENT 12.1 Any person is authorized to duplicate and distribute copies of this Agreement. 12.2 So as to ensure coherence, the wording of this Agreement is protected and may only be modified by the authors of the License, who reserve the right to periodically publish updates or new versions of the Agreement, each with a separate number. These subsequent versions may address new issues encountered by Free Software. 12.3 Any Software distributed under a given version of the Agreement may only be subsequently distributed under the same version of the Agreement or a subsequent version. Article 13 - GOVERNING LAW AND JURISDICTION 13.1 The Agreement is governed by French law. The Parties agree to endeavor to seek an amicable solution to any disagreements or disputes that may arise during the performance of the Agreement. 13.2 Failing an amicable solution within two (2) months as from their occurrence, and unless emergency proceedings are necessary, the disagreements or disputes shall be referred to the Paris Courts having jurisdiction, by the more diligent Party. Version 1.0 dated 2006-09-05. odil-0.11.0/README.md000066400000000000000000000030011362244656000140010ustar00rootroot00000000000000# Odil [![Build Status (Travis)](https://travis-ci.com/lamyj/odil.svg?branch=master)](https://travis-ci.com/lamyj/odil) [![Build Status (Appveyor)](https://ci.appveyor.com/api/projects/status/github/lamyj/odil?svg=true)](https://ci.appveyor.com/project/lamyj/odil) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/odil.svg)](https://anaconda.org/conda-forge/odil) Odil is a [DICOM][] library which provides a user-friendly C++11 and Python API for the different parts of the DICOM standard: - Reading and writing data sets with any transfer syntax - Standard JSON and XML representation of datasets - Clients and servers for the various DICOM protocols (C-FIND, C-GET, C-MOVE, C-STORE) - Implementation of the DICOM web-services (WADO-RS, QIDO-RS, STOW-RS) - Conversion to and from [DCMTK][] data structures. Packaged versions of Odil are available on [Anaconda][] for Linux, macOS and Windows. Official packages are available for [Debian][] and [Ubuntu][], as well as [unofficial backports][]. Installation and usage instructions are available on the [documentation website][]. [Anaconda]: https://anaconda.org/conda-forge/odil [DCMTK]: http://dicom.offis.de/dcmtk.php.en [Debian]: https://packages.debian.org/search?keywords=odil&searchon=sourcenames&suite=all§ion=all [DICOM]: http://dicom.nema.org/ [documentation website]: http://odil.readthedocs.io/ [Ubuntu]: http://packages.ubuntu.com/search?keywords=odil&searchon=sourcenames&suite=all§ion=all [unofficial backports]: https://github.com/lamyj/packages odil-0.11.0/applications/000077500000000000000000000000001362244656000152165ustar00rootroot00000000000000odil-0.11.0/applications/CMakeLists.txt000066400000000000000000000014511362244656000177570ustar00rootroot00000000000000file(GLOB_RECURSE module_files *.py) set(python_files ${module_files} odil) add_custom_target( PythonFiles ${CMAKE_COMMAND} -E echo "Python files" SOURCES ${python_files}) set_target_properties(PythonFiles PROPERTIES FOLDER "Examples") if(BUILD_PYTHON_WRAPPERS) execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import *; print(get_python_lib(True, prefix='').replace('\\\\', '/'))" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) install(DIRECTORY DESTINATION "${PYTHON_SITE_PACKAGES}") install(FILES ${module_files} DESTINATION "${PYTHON_SITE_PACKAGES}/odil/cli") configure_file("odil" "${CMAKE_CURRENT_BINARY_DIR}/odil") install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/odil" DESTINATION bin) endif() odil-0.11.0/applications/cli/000077500000000000000000000000001362244656000157655ustar00rootroot00000000000000odil-0.11.0/applications/cli/__init__.py000066400000000000000000000002201362244656000200700ustar00rootroot00000000000000from . import dicomdir from . import echo from . import find from . import get from . import print_ from . import store from . import transcode odil-0.11.0/applications/cli/dicomdir.py000066400000000000000000000042501362244656000201320ustar00rootroot00000000000000import logging import os import odil def add_subparser(subparsers): parser = subparsers.add_parser( "dicomdir", help="Create a DICOMDIR") parser.add_argument( "names", nargs="+", metavar="name", help="DICOM files or directories") parser.add_argument( "directory", help="Output directory for the DICOMDIR file") parser.add_argument( "--patient-key", "-p", default=[], action="append", help="User-defined keys for PATIENT-level records, " "expressed as KEYWORD[:TYPE]. TYPE defaults to 3.") parser.add_argument( "--study-key", "-S", default=[], action="append", help="User-defined keys for STUDY-level records") parser.add_argument( "--series-key", "-s", default=[], action="append", help="User-defined keys for SERIES-level records") parser.add_argument( "--image-key", "-i", default=[], action="append", help="User-defined keys for IMAGE-level records") parser.set_defaults(function=create_dicomdir) return parser def create_dicomdir( names, directory, patient_key, study_key, series_key, image_key): files = [] for name in names: if os.path.isfile(name): files.append(os.path.abspath(name)) elif os.path.isdir(name): for dirpath, _, filenames in os.walk(name): dirpath = os.path.abspath(dirpath) files.extend(os.path.join(dirpath, x) for x in filenames) directory = os.path.abspath(directory) if not all(x.startswith(directory) for x in files): raise Exception("All files must be under {}".format(directory)) files = [x[len(directory)+1:] for x in files] keys = {} for level in ["patient", "study", "series", "image"]: for entry in locals()["{}_key".format(level)]: if ":" in entry: tag, type_ = entry.split(":") else: tag, type_ = entry, "3" tag = getattr(odil.registry, tag) type_ = int(type_) keys.setdefault(level.upper(), []).append((tag, type_)) creator = odil.BasicDirectoryCreator(directory, files, keys) creator() odil-0.11.0/applications/cli/echo.py000066400000000000000000000025601362244656000172600ustar00rootroot00000000000000import argparse import logging import odil def add_subparser(subparsers): parser = subparsers.add_parser( "echo", help="Ping a remote DICOM server (C-ECHO)", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument("host", help="Remote host address") parser.add_argument("port", type=int, help="Remote host port") parser.add_argument( "calling_ae_title", help="AE title of the calling application") parser.add_argument( "called_ae_title", help="AE title of the called application") parser.set_defaults(function=echo) return parser def echo(host, port, calling_ae_title, called_ae_title): association = odil.Association() association.set_peer_host(host) association.set_peer_port(port) association.update_parameters()\ .set_calling_ae_title(calling_ae_title)\ .set_called_ae_title(called_ae_title) \ .set_presentation_contexts([ odil.AssociationParameters.PresentationContext( 3, odil.registry.VerificationSOPClass, [ odil.registry.ImplicitVRLittleEndian ], True, False ) ]) association.associate() logging.info("Association established") echo = odil.EchoSCU(association) echo.echo() logging.info("C-ECHO successful") association.release() logging.info("Association released") odil-0.11.0/applications/cli/find.py000066400000000000000000000055741362244656000172720ustar00rootroot00000000000000from __future__ import print_function import argparse import logging import odil from .print_ import find_max_name_length, print_data_set def add_subparser(subparsers): parser = subparsers.add_parser( "find", help="DICOM query (C-FIND)", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument("host", help="Remote host address") parser.add_argument("port", type=int, help="Remote host port") parser.add_argument( "calling_ae_title", help="AE title of the calling application") parser.add_argument( "called_ae_title", help="AE title of the called application") parser.add_argument( "level", choices=["patient", "study"], help="Root object of the query") parser.add_argument("keys", nargs="+", help="Query keys") parser.add_argument( "--decode-uids", "-u", action="store_true", help="Print human-friendly name of known UIDs") parser.set_defaults(function=find) return parser def find(host, port, calling_ae_title, called_ae_title, level, keys, decode_uids): query = odil.DataSet() for key in keys: if "=" in key: key, value = key.split("=", 1) value = value.split("\\") else: value = None tag = getattr(odil.registry, key) if value is not None: vr = odil.registry.public_dictionary[tag].vr if vr in ["DS", "FL", "FD"]: value = [float(x) for x in value] elif vr in ["IS", "SL", "SS", "UL", "US"]: value = [int(x) for x in value] query.add(tag, value) else: query.add(tag) sop_class = getattr( odil.registry, "{}RootQueryRetrieveInformationModelFIND".format(level.capitalize())) find_pc = odil.AssociationParameters.PresentationContext( 1, sop_class, [ odil.registry.ImplicitVRLittleEndian, odil.registry.ExplicitVRLittleEndian ], True, False ) association = odil.Association() association.set_peer_host(host) association.set_peer_port(port) association.update_parameters()\ .set_calling_ae_title(calling_ae_title)\ .set_called_ae_title(called_ae_title) \ .set_presentation_contexts([find_pc]) association.associate() logging.info("Association established") find = odil.FindSCU(association) find.set_affected_sop_class(sop_class) data_sets = find.find(query) print("{} answer{}".format(len(data_sets), "s" if len(data_sets)>1 else "")) max_length = 0 for data_set in data_sets: max_length = max(max_length, find_max_name_length(data_set)) for data_set in data_sets: print_data_set(data_set, decode_uids, "", max_length, odil.Value.Strings()) print() association.release() logging.info("Association released") odil-0.11.0/applications/cli/get.py000066400000000000000000000277021362244656000171260ustar00rootroot00000000000000from __future__ import print_function, unicode_literals import argparse import logging import os import re import odil from .print_ import find_max_name_length from .dicomdir import create_dicomdir def add_subparser(subparsers): parser = subparsers.add_parser( "get", help="DICOM retrieve (C-GET)", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument("host", help="Remote host address") parser.add_argument("port", type=int, help="Remote host port") parser.add_argument( "calling_ae_title", help="AE title of the calling application") parser.add_argument( "called_ae_title", help="AE title of the called application") parser.add_argument( "level", choices=["patient", "study"], help="Root object of the retrieval") parser.add_argument("keys", nargs="+", help="Retrieve keys") parser.add_argument( "--directory", "-d", default=os.getcwd(), help="Directory where the output files will be stored") parser.add_argument( "--iso-9660", "-I", action="store_true", help="Save file names using ISO-9660 compatible file names") parser.add_argument( "--layout", "-l", choices=["flat", "tree"], default="flat", help="Save files in the same directory (flat) or in a " "patient/study/series tree (hierarchical)") parser.add_argument( "--dicomdir", "-D", action="store_true", help="Create a DICOMDIR from the retrieved files") parser.add_argument( "--patient-key", "-p", default=[], action="append", help="User-defined keys for PATIENT-level records, " "expressed as KEYWORD[:TYPE]. TYPE defaults to 3.") parser.add_argument( "--study-key", "-S", default=[], action="append", help="User-defined keys for STUDY-level records") parser.add_argument( "--series-key", "-s", default=[], action="append", help="User-defined keys for SERIES-level records") parser.add_argument( "--image-key", "-i", default=[], action="append", help="User-defined keys for IMAGE-level records") parser.set_defaults(function=get) return parser def get( host, port, calling_ae_title, called_ae_title, level, keys, directory, iso_9660, layout, dicomdir, patient_key, study_key, series_key, image_key): if dicomdir and not iso_9660: raise Exception("Cannot create a DICOMDIR without ISO-9660 filenames") query = odil.DataSet() for key in keys: key, value = key.split("=", 1) value = value.split("\\") tag = getattr(odil.registry, key) vr = odil.registry.public_dictionary[tag].vr if vr in ["DS", "FL", "FD"]: value = [float(x) for x in value] elif vr in ["IS", "SL", "SS", "UL", "US"]: value = [int(x) for x in value] query.add(tag, value) get_syntax = getattr( odil.registry, "{}RootQueryRetrieveInformationModelGET".format(level.capitalize())) transfer_syntaxes = [ odil.registry.ImplicitVRLittleEndian, odil.registry.ExplicitVRLittleEndian ] get_pc = odil.AssociationParameters.PresentationContext( 1, get_syntax, transfer_syntaxes, True, False) abstract_syntaxes = find_abstract_syntaxes( host, port, calling_ae_title, called_ae_title, level, keys) if not abstract_syntaxes: # Negotiate ALL storage syntaxes. Is there a better way to do this? abstract_syntaxes = [ entry.key() for entry in odil.registry.uids_dictionary if entry.data().name.endswith("Storage") ] if len(abstract_syntaxes) > 126: raise Exception("Too many storage syntaxes") storage_pcs = [ odil.AssociationParameters.PresentationContext( 2*(i+1)+1, uid, transfer_syntaxes, False, True) for i, uid in enumerate(abstract_syntaxes) ] association = odil.Association() association.set_peer_host(host) association.set_peer_port(port) association.update_parameters()\ .set_calling_ae_title(calling_ae_title)\ .set_called_ae_title(called_ae_title) \ .set_presentation_contexts([get_pc]+storage_pcs) association.associate() logging.info("Association established") get = odil.GetSCU(association) get.set_affected_sop_class(get_syntax) class Callback(object): def __init__(self, directory): self.directory = directory self.completed = 0 self.remaining = 0 self.failed = 0 self.warning = 0 self.stored = {} self.files = [] self._study_ids = {} self._series_ids = {} def store(self, data_set): specific_character_set = odil.Value.Strings() if "SpecificCharacterSet" in data_set: specific_character_set = data_set.as_string( "SpecificCharacterSet") as_unicode = lambda x: odil.as_unicode(x, specific_character_set) if layout == "flat": directory = "" elif layout == "tree": # Patient directory: or . patient_directory = None if "PatientName" in data_set and data_set.as_string("PatientName"): patient_directory = data_set.as_string("PatientName")[0] else: patient_directory = data_set.as_string("PatientID")[0] patient_directory = as_unicode(patient_directory) # Study directory: _, both parts are # optional. If both tags are missing or empty, default to a # numeric index based on StudyInstanceUID. study_directory = [] if "StudyID" in data_set and data_set.as_string("StudyID"): study_directory.append(data_set.as_string("StudyID")[0]) if ("StudyDescription" in data_set and data_set.as_string("StudyDescription")): study_directory.append( data_set.as_string("StudyDescription")[0]) if not study_directory: study_instance_uid = data_set.as_string("StudyInstanceUID")[0] study_directory.append( self._study_ids.setdefault( study_instance_uid, 1+len(self._study_ids))) study_directory = "_".join(as_unicode(x) for x in study_directory) # Study directory: _, both # parts are optional. If both tags are missing or empty, default # to a numeric index based on SeriesInstanceUID. series_directory = [] if "SeriesNumber" in data_set and data_set.as_int("SeriesNumber"): series_directory.append(str(data_set.as_int("SeriesNumber")[0])) if ("SeriesDescription" in data_set and data_set.as_string("SeriesDescription")): series_directory.append( data_set.as_string("SeriesDescription")[0]) if not series_directory: series_instance_uid = data_set.as_string("series_instance_uid")[0] series_directory.append( self._series_ids.setdefault( series_instance_uid, 1+len(self._series_ids))) series_directory = "_".join(as_unicode(x) for x in series_directory) if iso_9660: patient_directory = to_iso_9660(patient_directory) study_directory = to_iso_9660(study_directory) series_directory = to_iso_9660(series_directory) directory = os.path.join( patient_directory, study_directory, series_directory) if not os.path.isdir(os.path.join(self.directory, directory)): os.makedirs(os.path.join(self.directory, directory)) else: raise NotImplementedError() self.stored.setdefault(directory, 0) if iso_9660: filename = "IM{:06d}".format(1+self.stored[directory]) else: filename = as_unicode(data_set.as_string("SOPInstanceUID")[0]) with odil.open(os.path.join(self.directory, directory, filename), "wb") as fd: odil.Writer.write_file(data_set, fd) self.stored[directory] += 1 self.files.append(os.path.join(directory, filename)) def get(self, message): for type_ in ["completed", "remaining", "failed", "warning"]: base = "number_of_{}_sub_operations".format(type_) if getattr(message, "has_{}".format(base))(): setattr( self, type_, getattr(message, "get_{}".format(base))()) logging.info( "Remaining: {}, completed: {}, failed: {}, warning: {}".format( self.remaining, self.completed, self.failed, self.warning)) if not os.path.isdir(directory): os.makedirs(directory) if len(os.listdir(directory)): logging.warning("{} is not empty".format(directory)) callback = Callback(directory) get.get(query, callback.store, callback.get) print( "Completed: {}, remaining: {}, failed: {}, warning: {}".format( callback.completed, callback.remaining, callback.failed, callback.warning)) association.release() logging.info("Association released") if dicomdir: logging.info("Creating DICOMDIR") create_dicomdir( [os.path.join(directory, x) for x in callback.files], directory, patient_key, study_key, series_key, image_key) def find_abstract_syntaxes( host, port, calling_ae_title, called_ae_title, level, keys): """ Return the abstract syntaxes corresponding to the query, based on SOP Classes in Study. """ query = odil.DataSet() for key in keys: key, value = key.split("=", 1) value = value.split("\\") if key in ["QueryRetrieveLevel", "SOPClassesInStudy"]: continue tag = getattr(odil.registry, key) vr = odil.registry.public_dictionary[tag].vr if vr in ["DS", "FL", "FD"]: value = [float(x) for x in value] elif vr in ["IS", "SL", "SS", "UL", "US"]: value = [int(x) for x in value] query.add(tag, value) query.add("QueryRetrieveLevel", ["STUDY"]) query.add("SOPClassesInStudy") find_syntax = getattr( odil.registry, "{}RootQueryRetrieveInformationModelFIND".format(level.capitalize())) transfer_syntaxes = [ odil.registry.ImplicitVRLittleEndian, odil.registry.ExplicitVRLittleEndian ] find_pc = odil.AssociationParameters.PresentationContext( 1, find_syntax, transfer_syntaxes, True, False) association = odil.Association() association.set_peer_host(host) association.set_peer_port(port) association.update_parameters()\ .set_calling_ae_title(calling_ae_title)\ .set_called_ae_title(called_ae_title) \ .set_presentation_contexts([find_pc]) association.associate() logging.info("Association established") find = odil.FindSCU(association) find.set_affected_sop_class(find_syntax) data_sets = find.find(query) sop_classes = set() for data_set in data_sets: if "SOPClassesInStudy" in data_set: sop_classes.update(data_set.as_string("SOPClassesInStudy")) return sop_classes def to_iso_9660(value): value = value[:8].upper() value = re.sub(r"[^A-Z0-9_]", "_", value) return value odil-0.11.0/applications/cli/print_.py000066400000000000000000000103071362244656000176330ustar00rootroot00000000000000from __future__ import print_function import argparse import logging import odil def add_subparser(subparsers): parser = subparsers.add_parser( "print", help="Print the contents of data sets", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument("inputs", nargs="+", metavar="FILE", help="Input files") parser.add_argument( "--print-header", "-H", action="store_true", help="Print the header as well as the data set") parser.add_argument( "--decode-uids", "-u", action="store_true", help="Print human-friendly name of known UIDs") parser.set_defaults(function=print_) return parser def print_(inputs, print_header, decode_uids): for input in inputs: logging.info("Printing {}".format(input)) with odil.open(input) as stream: header, data_set = odil.Reader.read_file(stream) max_length = find_max_name_length(data_set) if print_header: max_length = max(max_length, find_max_name_length(header)) if print_header: print_data_set( header, decode_uids, "", max_length, odil.Value.Strings()) print() print_data_set( data_set, decode_uids, "", max_length, odil.Value.Strings()) def print_data_set( data_set, decode_uids, padding, max_length, specific_character_set): for tag, element in data_set.items(): name = "{:04x},{:04x}".format(tag.group, tag.element) if tag in odil.registry.public_dictionary: entry = odil.registry.public_dictionary[tag] name = entry.name if tag == odil.registry.SpecificCharacterSet: specific_character_set = element.as_string() if element.is_data_set(): value = "(sequence, {} item{})".format( len(element), "s" if len(element)>1 else "") elif element.is_binary(): lengths = [len(x) for x in element.as_binary()] value = "(binary, {} item{}, {} byte{})".format( len(element), "s" if len(element)>1 else "", "+".join(str(x) for x in lengths), "s" if sum(lengths)>1 else "") else: getter = None if element.empty(): getter = lambda: [] elif element.is_int(): getter = element.as_int elif element.is_real(): getter = element.as_real elif element.is_string(): getter = lambda: [ odil.as_unicode(x, specific_character_set) for x in element.as_string()] value = [x for x in getter()] if decode_uids and element.vr == odil.VR.UI: value = [ odil.registry.uids_dictionary[uid].name if uid in odil.registry.uids_dictionary else uid for uid in value ] print("{}{}{} {:04x},{:04x} {} {}".format( padding, name, (max_length-len(name)-len(padding))*" ", tag.group, tag.element, element.vr, value)) if element.is_data_set(): sequence = element.as_data_set() if sequence: for item in sequence[:-1]: print_data_set( item, decode_uids, padding+" ", max_length, specific_character_set) print() print_data_set( sequence[-1], decode_uids, padding+" ", max_length, specific_character_set) def find_max_name_length(data_set, max_length=0, padding_length=0): for tag, element in data_set.items(): if tag in odil.registry.public_dictionary: entry = odil.registry.public_dictionary[tag] length = len(entry.name) else: length = 9 # xxxx,yyyy max_length = max(max_length, padding_length+length) if element.is_data_set(): sequence = element.as_data_set() for item in sequence: max_length = max( max_length, find_max_name_length(item, max_length, 2+padding_length)) return max_length odil-0.11.0/applications/cli/store.py000066400000000000000000000047311362244656000175000ustar00rootroot00000000000000from __future__ import print_function import argparse import odil def add_subparser(subparsers): parser = subparsers.add_parser( "store", help="DICOM store (C-STORE)", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument("host", help="Remote host address") parser.add_argument("port", type=int, help="Remote host port") parser.add_argument( "calling_ae_title", help="AE title of the calling application") parser.add_argument( "called_ae_title", help="AE title of the called application") parser.add_argument("filenames", nargs="+", help="File names") parser.set_defaults(function=store) return parser def store(host, port, calling_ae_title, called_ae_title, filenames): transfer_syntaxes = [ odil.registry.ExplicitVRLittleEndian, odil.registry.ImplicitVRLittleEndian, ] # Find all SOP classes to negotiate at association time. We don't need to # read the whole data set for this sop_classes = set() for filename in filenames: with odil.open(filename) as stream: _, data_set = odil.Reader.read_file( stream, halt_condition=lambda tag: tag>odil.registry.SOPClassUID) sop_classes.update(data_set.as_string("SOPClassUID")) presentation_contexts = [ odil.AssociationParameters.PresentationContext( 2*i+1, sop_class, transfer_syntaxes, True, False) for i, sop_class in enumerate(sop_classes) ] # Create the association and the Store SCU association = odil.Association() association.set_peer_host(host) association.set_peer_port(port) association.update_parameters()\ .set_calling_ae_title(calling_ae_title)\ .set_called_ae_title(called_ae_title)\ .set_presentation_contexts(presentation_contexts) association.associate() negotiated_parameters = association.get_negotiated_parameters() negotiated_pc = negotiated_parameters.get_presentation_contexts() store = odil.StoreSCU(association) for filename in filenames: with odil.open(filename) as stream: _, data_set = odil.Reader.read_file(stream) try: store.set_affected_sop_class(data_set) store.store(data_set) except Exception as e: print("Could not store {}: {}".format(filename, e)) association.release() odil-0.11.0/applications/cli/transcode.py000066400000000000000000000044401362244656000203230ustar00rootroot00000000000000import argparse import logging import odil def add_subparser(subparsers): parser = subparsers.add_parser( "transcode", help="Change the transfer syntax or the format", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument("input", help="Input file name") parser.add_argument("output", help="Output file name") parser.add_argument( "--format", "-f", choices=["binary", "json", "xml"], default="binary", help="Output file format") parser.add_argument( "--transfer-syntax", "-t", help="Transfer syntax of output file (binary only)") parser.add_argument( "--pretty-print", "-p", action="store_true", help="Pretty-print in output file (JSON and XML only)") parser.set_defaults(function=transcode) return parser def transcode(input, output, format, transfer_syntax, pretty_print): kwargs = {} if format == "binary": if transfer_syntax: transfer_syntax = getattr(odil.registry, transfer_syntax) ts_info = odil.registry.uids_dictionary[transfer_syntax] if ts_info.type != "Transfer Syntax": raise Exception( "{} is not a transfer syntax".format(ts_info.name)) kwargs["transfer_syntax"] = transfer_syntax else: kwargs["transfer_syntax"] = None elif format == "json": kwargs["pretty_print"] = pretty_print elif format == "xml": kwargs["pretty_print"] = pretty_print globals()["as_{}".format(format)](input, output, **kwargs) def as_binary(input, output, transfer_syntax): with odil.open(input) as stream: _, data_set = odil.Reader.read_file(stream) with odil.open(output, "wb") as fd: odil.Writer.write_file(data_set, fd, transfer_syntax=transfer_syntax) def as_json(input, output, pretty_print): with odil.open(input) as stream: _, data_set = odil.Reader.read_file(stream) with open(output, "w") as fd: json = odil.as_json(data_set, pretty_print) fd.write(json) def as_xml(input, output, pretty_print): with odil.open(input) as stream: _, data_set = odil.Reader.read_file(stream) with open(output, "w") as fd: xml = odil.as_xml(data_set, pretty_print) fd.write(xml) odil-0.11.0/applications/odil000077500000000000000000000020641362244656000160750ustar00rootroot00000000000000#!${PYTHON_EXECUTABLE} import argparse import logging import sys import odil.cli def main(): parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(help="Sub-commands help") modules = [ "print_", "transcode", "dicomdir", "echo", "find", "get", "store" ] for module in modules: sub_parser = getattr(odil.cli, module).add_subparser(subparsers) sub_parser.add_argument( "--verbosity", "-v", choices=["warning", "info", "debug"], default="warning") arguments = parser.parse_args() verbosity = arguments.__dict__.pop("verbosity", "warning") logging.getLogger().setLevel(verbosity.upper()) function = arguments.__dict__.pop("function", None) if function is not None: try: function(**arguments.__dict__) except Exception as e: if verbosity == "debug": raise else: parser.error(e) else: parser.error("Missing function") if __name__ == "__main__": sys.exit(main()) odil-0.11.0/appveyor.yml000066400000000000000000000011111362244656000151120ustar00rootroot00000000000000version: '{build}' image: Visual Studio 2017 environment: PATH: C:\Miniconda3-x64;C:\Miniconda3-x64\Scripts;C:\Miniconda3-x64\Library\bin;$(PATH) PLATFORM: x64 PYTHON: C:\Miniconda3-x64\python.exe VCVARS_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat" WORKSPACE: $(APPVEYOR_BUILD_FOLDER) branches: only: - master - appveyor install: - call "%VCVARS_PATH%" %PLATFORM% - call .\.ci\windows\install.cmd build_script: - call .\.ci\windows\build.cmd test_script: - call .\.ci\windows\post_build.cmd odil-0.11.0/cmake/000077500000000000000000000000001362244656000136105ustar00rootroot00000000000000odil-0.11.0/cmake/functions.cmake000066400000000000000000000034121362244656000166220ustar00rootroot00000000000000# Group files by their folder macro(GroupFiles fileGroup) # Beautify fileGroup (HEADER_FILES -> Header Files) string(REPLACE "_" " " fileGroupName ${fileGroup}) # Replace underscores with spaces string(TOLOWER ${fileGroupName} fileGroupName) # To lower set(finalFileGroupName) string(REGEX MATCHALL "([^ ]+)" fileGroupNameSplit ${fileGroupName}) # Split each word foreach(fileGroupNameWord ${fileGroupNameSplit}) # Set to upper the first letter of each word string(SUBSTRING ${fileGroupNameWord} 0 1 firstLetter) string(SUBSTRING ${fileGroupNameWord} 1 -1 otherLetters) string(TOUPPER ${firstLetter} firstLetter) if(finalFileGroupName) set(finalFileGroupName "${finalFileGroupName} ") endif() set(finalFileGroupName "${finalFileGroupName}${firstLetter}${otherLetters}") endforeach() # Put each file in the correct group foreach(currentFile ${${fileGroup}}) set(folder ${currentFile}) get_filename_component(filename ${folder} NAME) # Get the file name string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "" folder ${folder}) # Get the folder relative to the current one string(REPLACE "${filename}" "" folder ${folder}) # Remove the file name set(groupName "${finalFileGroupName}") if(NOT folder STREQUAL "") # Parse the remaining directories hierarchy string(REGEX REPLACE "/+$" "" baseFolder ${folder}) # Remove trailing slash string(REPLACE "/" "\\" baseFolder ${baseFolder}) # Forward to backward slashes set(groupName "${groupName}\\${baseFolder}") # Put together the entire group name endif() source_group("${groupName}" FILES ${currentFile}) # Put the file in this group endforeach() endmacro()odil-0.11.0/documentation/000077500000000000000000000000001362244656000154015ustar00rootroot00000000000000odil-0.11.0/documentation/Doxyfile000066400000000000000000000016061362244656000171120ustar00rootroot00000000000000PROJECT_NAME = Odil PROJECT_BRIEF = "A C++11 library for the DICOM standard" OUTPUT_DIRECTORY = ./_build/doxygen EXTRACT_ALL = YES QUIET = YES INPUT = ../src FILE_PATTERNS = *.h RECURSIVE = YES CASE_SENSE_NAMES = YES ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES PREDEFINED = "ODIL_API=''" EXPAND_AS_DEFINED = ODIL_DATASET_ADD \ ODIL_VALUE_CONSTRUCTORS \ ODIL_MESSAGE_MANDATORY_FIELD_STRING_MACRO \ ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO GENERATE_HTML = YES GENERATE_LATEX = NO GENERATE_RTF = NO GENERATE_MAN = NO GENERATE_DOCBOOK = NO GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO GENERATE_XML = NO odil-0.11.0/documentation/Doxyfile.breathe000066400000000000000000000023441362244656000205230ustar00rootroot00000000000000OUTPUT_DIRECTORY = ./_build/doxygen EXTRACT_ALL = YES QUIET = YES INPUT = ../src FILE_PATTERNS = *.h RECURSIVE = YES # DCMTK wrappers and registry confuse Breathe EXCLUDE = ../src/odil/dcmtk ../src/odil/registry.h ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES PREDEFINED = "ODIL_API=''" EXPAND_AS_DEFINED = ODIL_VALUE_CONSTRUCTORS \ ODIL_MESSAGE_MANDATORY_FIELD_STRING_MACRO \ ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO GENERATE_HTML = NO GENERATE_LATEX = NO GENERATE_RTF = NO GENERATE_MAN = NO GENERATE_DOCBOOK = NO GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO GENERATE_XML = YES XML_OUTPUT = xml # If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size # of the XML output. # The default value is: YES. # This tag requires that the tag GENERATE_XML is set to YES. XML_PROGRAMLISTING = YES odil-0.11.0/documentation/DoxygenLayout.xml000066400000000000000000000137101362244656000207400ustar00rootroot00000000000000 odil-0.11.0/documentation/Makefile000066400000000000000000000011311362244656000170350ustar00rootroot00000000000000# Minimal makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build SPHINXPROJ = Odil SOURCEDIR = . BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)odil-0.11.0/documentation/conf.py000066400000000000000000000135001362244656000166770ustar00rootroot00000000000000#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Odil documentation build configuration file, created by # sphinx-quickstart on Wed Jan 17 15:20:04 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # # import os # import sys # sys.path.insert(0, os.path.abspath('.')) import glob import os import re import shutil import subprocess import sphinx_rtd_theme # Make sure Doxygen is up-to-date if os.environ.get("READTHEDOCS", None) == "True": if not os.path.isdir(os.path.join("_build", "doxygen")): os.makedirs(os.path.join("_build", "doxygen")) subprocess.check_call(["doxygen", "Doxyfile"]) if os.path.isdir(os.path.join("_build", "html", "_static", "doxygen")): shutil.rmtree(os.path.join("_build", "html", "_static", "doxygen")) os.makedirs(os.path.join("_build", "html", "_static", "doxygen")) for entry in glob.glob(os.path.join("_build", "doxygen", "html", "*")): shutil.move(entry, os.path.join("_build", "html", "_static", "doxygen")) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] source_suffix = '.rst' # The master toctree document. master_doc = 'index' # General information about the project. project = 'Odil' copyright = '2020, Julien Lamy' author = 'Julien Lamy' # The short X.Y version here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, "..", "CMakeLists.txt")) as fd: version = re.search(r"set\(odil_VERSION (.+?)\)", fd.read()) if not version: raise Exception("Could not get version from CMakeLists.txt") version = version.group(1) # The full version, including alpha/beta/rc tags release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = "sphinx_rtd_theme" html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # # html_theme_options = {} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # Custom sidebar templates, must be a dictionary that maps document names # to template names. # # This is required for the alabaster theme # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars # html_sidebars = { # '**': [ # 'relations.html', # needs 'show_related': True theme option to display # 'searchbox.html', # ] # } # -- Options for HTMLHelp output ------------------------------------------ # Output file base name for HTML help builder. htmlhelp_basename = 'Odildoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # # 'preamble': '', # Latex figure (float) alignment # # 'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'Odil.tex', 'Odil Documentation', 'Julien Lamy', 'manual'), ] # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ (master_doc, 'odil', 'Odil Documentation', [author], 1) ] # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'Odil', 'Odil Documentation', author, 'Odil', 'A C++11 library for the DICOM standard', 'Miscellaneous'), ] odil-0.11.0/documentation/developer/000077500000000000000000000000001362244656000173665ustar00rootroot00000000000000odil-0.11.0/documentation/developer/cpp/000077500000000000000000000000001362244656000201505ustar00rootroot00000000000000odil-0.11.0/documentation/developer/cpp/association.rst000066400000000000000000000146331362244656000232250ustar00rootroot00000000000000Network association =================== .. highlight:: c++ The connection between two DICOM peers is handled by `odil::Association`_ and `odil::AssociationParameters`_. The former encapsulates the connection itself (TCP/IP layer and DICOM layer) while the latter handles the various options that parameterize the association (AE titles, presentation contexts, authentication, etc.). Establishing an association --------------------------- An association will at least require to define the application entity titles (both local and remote) the presentation contexts (i.e. representation of the data) that are acceptable for the application. The following example shows how to create a simple `odil::AssociationParameters`_ object. :: #include #include odil::AssociationParameters create_parameters() { std::vector transfer_syntaxes{ odil::registry::ExplicitVRLittleEndian, odil::registry::ExplicitVRLittleEndian }; odil::AssociationParameters parameters; parameters .set_calling_ae_title("WORKSTATION") .set_called_ae_title("SERVER") .set_presentation_contexts({ { odil::registry::VerificationSOPClass, transfer_syntaxes, true, false }, { odil::registry::PatientRootQueryRetrieveInformationModelFIND, transfer_syntaxes, true, false } }); return parameters; } Note that the `odil::AssociationParameters`_ object uses parameter chaining. The objects passed to ``set_presentation_contexts`` are of type `odil::AssociationParameters::PresentationContext`_. In this example, the id of the presentation context is not specified: it is instead set to an special value by the constructor, and a valid id is then assigned in ``set_presentation_contexts``. After setting the address and port of the remote peer, the association is established through the ``associate`` member function. Once established, the negotiated parameters (i.e. acceptable to both peers) may be obtained by the ``get_negotiated_parameters`` member function. :: #include int main() { odil::Association association; association.set_peer_host("www.dicomserver.co.uk"); association.set_peer_port(11112); association.set_parameters(create_parameters()); association.associate(); auto const & contexts = association.get_negotiated_parameters().get_presentation_contexts(); std::cout << "Presentation contexts (" << contexts.size() << ")\n"; for(auto const & context: contexts) { std::cout << "\t" << odil::registry::uids_dictionary.at(context.abstract_syntax).name << ": " << odil::registry::uids_dictionary.at(context.transfer_syntaxes[0]).name << ", " << (context.scu_role_support?"SCU":"") << ((context.scu_role_support & context.scp_role_support)?"/":"") << (context.scp_role_support?"SCP":"") << std::endl; } } Receiving an association ------------------------ Receiving an association is performed by the ``receive_association`` member function. It will listen on the given IP address and TCP port and block until an acceptable association request is received or until an error occurs. By default all association requests are deemed acceptable, and the first transfer syntax of each presentation context is accepted. Errors (unacceptable association, low-level protocol error) will throw an exception. After acceptance, the association object contains the negotiated parameters: :: #include int main() { odil::Association association; association.receive_association(boost::asio::ip::tcp::v4(), 11112); std::cout << "Received association from " << association.get_peer_host() << ":" << association.get_peer_port() << std::endl ; auto const & contexts = association.get_negotiated_parameters().get_presentation_contexts(); std::cout << "Presentation contexts (" << contexts.size() << ")\n"; for(auto const & context: contexts) { std::cout << "\t" << odil::registry::uids_dictionary.at(context.abstract_syntax).name << ": " << odil::registry::uids_dictionary.at(context.transfer_syntaxes[0]).name << ", " << (context.scu_role_support?"SCU":"") << ((context.scu_role_support & context.scp_role_support)?"/":"") << (context.scp_role_support?"SCP":"") << std::endl; } } Optionnally, a callback which indicates whether the association request is acceptable or may be specified. If the request is acceptable, the callback must return the accepted parameters, otherwise it must throw an exception of type `odil::AssociationRejected`_. As an example, the default acceptation callback, which accepts the first transfer syntax for all abstract syntaxes, would be: :: #include odil::AssociationParameters acceptor(odil::AssociationParameters const & input) { odil::AssociationParameters output; output.set_called_ae_title(input.get_called_ae_title()); output.set_calling_ae_title(input.get_calling_ae_title()); auto presentation_contexts = input.get_presentation_contexts(); for(auto & presentation_context: presentation_contexts) { presentation_context.transfer_syntaxes = { presentation_context.transfer_syntaxes[0] }; presentation_context.result = odil::AssociationParameters::PresentationContext::Result::Acceptance; } output.set_presentation_contexts(presentation_contexts); output.set_maximum_length(input.get_maximum_length()); return output; } .. _odil::Association: ../../_static/doxygen/classodil_1_1Association.html .. _odil::AssociationParameters: ../../_static/doxygen/classodil_1_1AssociationParameters.html .. _odil::AssociationParameters::PresentationContext: ../../_static/doxygen/structodil_1_1AssociationParameters_1_1PresentationContext.html .. _odil::AssociationRejected: ../../_static/doxygen/structodil_1_1AssociationRejected.html odil-0.11.0/documentation/developer/cpp/data_sets.rst000066400000000000000000000077661362244656000226710ustar00rootroot00000000000000Data sets, elements and values ============================== .. highlight:: c++ The `data set`_ is the central data structure in the DICOM standard and in Odil. In Odil, it is a dictionary of elements (i.e. `typed`_ values), where the key is a tag, identifying the semantics of the element. Data sets are handled by the `odil::DataSet`_ class. The `odil::Value`_ class holds the actual value of an element, stored as an array of one of five types, each of them mapped to some of the 31 VRs of DICOM: - Integers (IS, SL, SS, UL, US) - Reals (DS, FL, FD) - Strings (AE, AS, AT, CS, DA, DT, LO, LT, PN, SH, ST, TM, UC, UI, UR, UT) - Binary (OB, OD, OF, OL, OW, UN) - DataSets (SQ) The default constructor creates an empty data set, as can be shown by the ``size()`` or the ``empty()`` member function: :: #include #include int main() { odil::DataSet data_set; std::cout << std::boolalpha << "Size: " << data_set.size() << ", empty: " << data_set.empty() << "\n"; } Adding an element is done through the ``add()`` member function. All public tags are pre-defined in ``odil::registry``, but can also be created when needed. Most of the functions that have `odil::Tag`_ parameters may also use the keywords of public tags (an exception will be raised if no such name exists in the directory). :: #include #include #include int main() { odil::DataSet data_set; // Pre-defined tag data_set.add(odil::registry::PatientName, {"Doe^John"}); // Temporary Tag object for Patient ID data_set.add(odil::Tag(0x0010, 0x0020), {"12345"}); // Using the keyword of the tag data_set.add("PixelSpacing", {1.0, 1.0}); } In the previous example, note that the type of the value and the VR of the element are inferred from the parameters. *Patient Name* and *Patient ID* will have a *Strings* value, and *Pixel Spacing* will have a *Reals* value. The `VR`_ is inferred from the dictionary, but can be explicit, as in ``data_set.add(tag, value, odil::VR::SL)``. Access to already-inserted elements is done through one of the ``as_XXX(tag)`` functions (``as_int``, ``as_real``, ``as_string``, ``as_data_set``, ``as_binary``). The type of the element will be checked, and an exception will be raised if there is a mismatch. The presence of an element can be checked with the ``has(tag)`` member function and the type of an element with the ``is_XXX(tag)`` member functions. :: #include #include int main() { odil::DataSet data_set; data_set.add("PatientName", {"Doe^John"}); std::cout << data_set.as_string("PatientName")[0] << "\n"; data_set.as_string("PatientName") = {"Bloggs^Jane"}; std::cout << "PatientName " << (data_set.is_string("PatientName")?"contains ":"does not contain ") << "strings" << "\n"; std::cout << "PatientID is " << (data_set.has("PatientID")?"present":"missing") << "\n"; } Note that the value of an element is *always an array* even if it is empty or contains only one element. The number of items in an element can be obtained with the ``size(tag)`` member function: :: #include #include int main() { odil::DataSet data_set; // Empty element data_set.add("PatientName"); std::cout << std::boolalpha << "Size of PatientName: " << data_set.size("PatientName") << ", empty: " << data_set.empty("PatientName") << "\n"; } .. _data set: http://dicom.nema.org/medical/dicom/current/output/chtml/part05/chapter_7.html .. _odil::DataSet: ../../_static/doxygen/classodil_1_1DataSet.html .. _odil::Tag: ../../_static/doxygen/classodil_1_1Tag.html .. _odil::Value: ../../_static/doxygen/classodil_1_1Value.html .. _VR: ../../_static/doxygen/VR_8h.html .. _typed: http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_6.2.html odil-0.11.0/documentation/developer/cpp/index.rst000066400000000000000000000011621362244656000220110ustar00rootroot00000000000000C++ API ======= The primary programming language of Odil is C++11: other languages (as :doc:`Python <../python/index>` or :doc:`Javascript <../javascript/index>`) are wrappers of the C++ code and try to mimic the C++ API. All classes, functions and variables of Odil are declared in the ``odil`` namespace. The include files reflect the classes: the ``odil::DataSet`` class will be declared in the ``odil/DataSet.h``. The full Doxygen reference is also `available`_. .. toctree:: :maxdepth: 2 data_sets io association services-scu services-scp webservices .. _available: ../../_static/doxygen/index.html odil-0.11.0/documentation/developer/cpp/io.rst000066400000000000000000000121131362244656000213070ustar00rootroot00000000000000Reading and writing files ========================= .. highlight:: c++ Odil reads and write data sets using the three standard formats `binary`_, `JSON`_ and `XML`_. Binary format ------------- Two classes are responsible for reading and writing using the binary DICOM format: `odil::Reader`_ and `odil::Writer`_. Both classes handle not only whole data sets stored in DICOM files, but also give access to lower-level functions like individual elements and tags. These two classes are based on C++ streams and so can any class that implement the streams API. The simplest usage to write a data set to a file is: :: #include #include #include #include #include int main() { odil::DataSet data_set; data_set.add("SOPClassUID", {odil::registry::RawDataStorage}); data_set.add("SOPInstanceUID", {odil::generate_uid()}); data_set.add("PatientName", {"Doe^John"}); std::ofstream stream{"foo.dcm"}; odil::Writer::write_file(data_set, stream); } This will use a default transfer syntax (*Explicit VR Little Endian*) and add required meta information extracted from the data set. Note that the data set must include the *SOP Class UID* and *SOP Instance UID* to be written to a file. The previous example uses `odil::generate_uid`_ to create a random UID. Reading from a file return a pair of data sets: the first element of the pair is file meta-information, the second is the data set itself. :: #include #include #include #include #include int main() { std::ifstream stream{"foo.dcm"}; odil::DataSet header, data_set; std::tie(header, data_set) = odil::Reader::read_file(stream); std::cout << header.as_string("ImplementationVersionName")[0] << "\n"; std::cout << data_set.as_string("SOPInstanceUID")[0] << "\n"; } JSON format ----------- JSON serialization and de-serialization is managed by two functions `odil::as_json`_ and `odil::as_dataset(json)`_. Reading and writing to a file is delegated to the underlying JSON toolkit, `JsonCpp`_. The following code sample converts a data set to JSON and writes it to a file. Refer to the JsonCpp documentation for more information about `formatting`_. :: #include #include "odil/json_converter.h" int main() { odil::DataSet data_set; // Fill data set auto const json = odil::as_json(data_set); std::ofstream foo{"foo.json"}; foo << json; return 0; } The converse operation, reading from a file and converting the JSON to a data set, is similar. :: #include #include "odil/json_converter.h" int main() { Json::Value json std::ifstream foo{"foo.json"}; foo >> json; auto const data_set = odil::as_dataset(json); return 0; } XML format ---------- The XML serialization and de-serialization is very similar to the JSON one: the respective functions performing these tasks are `odil::as_xml`_ and `odil::as_dataset(xml)`_. The underlying toolkit in the XML case is `Boost.PropertyTree`_. The following snippet saves a data set to an XML file: :: #include #include #include "odil/xml_converter.h" int main() { odil::DataSet data_set; // Fill data set auto const xml = odil.as_xml(data_set); std::ofstream foo{"foo.xml"}; boost::propery_tree::write_xml(foo, xml); return 0; } The following snippet loads a data set from an XML file: :: #include #include #include "odil/xml_converter.h" int main() { std::ifstream foo{"foo.xml"}; boost::property_tree::ptree xml; boost::propery_tree::read_xml(foo, xml); auto const data_set = odil::as_dataset(xml); return 0; } .. _binary: http://dicom.nema.org/medical/dicom/current/output/chtml/part10/chapter_7.html .. _Boost.PropertyTree: http://www.boost.org/doc/libs/1_66_0/doc/html/property_tree.html .. _formatting: http://open-source-parsers.github.io/jsoncpp-docs/doxygen/index.html .. _JSON: http://dicom.nema.org/medical/dicom/current/output/chtml/part18/chapter_F.html .. _JsonCpp: https://github.com/open-source-parsers/jsoncpp .. _odil::as_dataset(json): ../../_static/doxygen/namespaceodil.html#aecc7f7828df77fd27dd166f4748f5d5d .. _odil::as_dataset(xml): ../../_static/doxygen/namespaceodil.html#a03f0a5fe3c4acac080a627c90ef81dee .. _odil::as_json: ../../_static/doxygen/namespaceodil.html#a2c6f4e235991f2082e45f0db5611a177 .. _odil::as_xml: ../../_static/doxygen/namespaceodil.html#adea55ac4f5896897390b0c0474400ee8 .. _odil::Reader: ../../_static/doxygen/classodil_1_1Reader.html .. _odil::generate_uid: ../../_static/doxygen/namespaceodil.html#ab4e34fa7513bb4d7890586e99a9d7add .. _odil::Writer: ../../_static/doxygen/classodil_1_1Writer.html .. _XML: http://dicom.nema.org/medical/dicom/2016b/output/chtml/part19/chapter_A.html odil-0.11.0/documentation/developer/cpp/services-scp.rst000066400000000000000000000175721362244656000233240ustar00rootroot00000000000000DICOM services -- server side ============================= .. highlight:: c++ The design of the :abbr:`SCPs (Service Class Provider)`: an abstract base class, `odil::SCP`_, implementing common features and concrete classes for each service (see table below). Every service requires an association which is correctly associated and has negotiated the corresponding abstract syntax. .. table:: DICOM services and Odil classes +-------------+-------------------+ | Service | Odil class | +=============+===================+ | `C-ECHO`_ | `odil::EchoSCP`_ | +-------------+-------------------+ | `C-FIND`_ | `odil::FindSCP`_ | +-------------+-------------------+ | `C-GET`_ | `odil::GetSCP`_ | +-------------+-------------------+ | `C-MOVE`_ | `odil::MoveSCP`_ | +-------------+-------------------+ | `C-STORE`_ | `odil::StoreSCP`_ | +-------------+-------------------+ The SCP classes handle the low-level message exchange, and the action (e.g. querying a data base or storing a file) is left to the user. If the SCP's responses contain no data set (C-ECHO, C-STORE), the action is a callback with a single parameter (the request message) which returns the status of the operation; if the SCP returns data sets (C-FIND, C-GET, C-MOVE), the action is specified as a class which inherits from `odil::SCP::DataSetGenerator`_. A data set generator must specify the following member functions: - ``void initialize(message::Request const &request)``: initialize the generator given an incoming request - ``bool done()``: test whether all elements have been generated - ``void next()``: prepare the next element - ``DataSet get()``: return the current element The SCP may process an already-existing message using the ``operator()`` or may receive a message on the underlying association and process it through the ``receive_and_process`` member function. In the former case, the function will return once the response has been sent; in the latter case, the function will block until a message has been received *and* the response has been sent. SCPs returning no data set -------------------------- The following example show the use of a C-ECHO SCP. The message handler prints a message on the server console and returns successfully. :: #incude #include #include #include odil::Value::Integer echo(odil::message::CEchoRequest const & request) { std::cout << "Received echo\n"; std::cout << " ID: " << request.get_message_id() << "\n"; std::cout << " Affected SOP Class UID: " << request.get_affected_sop_class_uid() << "\n"; return odil::message::Response::Success; } int main() { odil::Association association; association.receive_association(boost::asio::ip::tcp::v4(), 11112); odil::EchoSCP scp(association, echo); scp.receive_and_process(); } SCPs returning data sets ------------------------ The following example shows an implementation of a ``DataSetGenerator`` which simulates the query of a database returning two matching data sets. The generator is the used in a C-FIND SCP. :: #include #include #include #include #include class FindGenerator: public odil::SCP::DataSetGenerator { public: FindGenerator() { // Nothing to do } virtual ~FindGenerator() { // Nothing to do. } virtual void initialize(odil::message::CFindRequest const & ) { odil::DataSet data_set_1; data_set_1.add(odil::registry::PatientName, {"Hello^World"}); data_set_1.add(odil::registry::PatientID, {"1234"}); this->_responses.push_back(data_set_1); odil::DataSet data_set_2; data_set_2.add(odil::registry::PatientName, {"Doe^John"}); data_set_2.add(odil::registry::PatientID, {"5678"}); this->_responses.push_back(data_set_2); this->_response_iterator = this->_responses.begin(); } virtual bool done() const { return (this->_response_iterator == this->_responses.end()); } virtual odil::DataSet get() const { return *this->_response_iterator; } virtual void next() { ++this->_response_iterator; } private: std::vector _responses; std::vector::const_iterator _response_iterator; }; int main() { odil::Association association; association.receive_association(boost::asio::ip::tcp::v4(), 11112); FindGenerator generator; odil::FindSCP scp(association, generator); scp.receive_and_process(); } The generators used by the C-GET and C-MOVE SCPs have an extra member function, ``count``, which must return the number of data sets that the SCP will send. Moreover, since C-MOVE needs to establish a new association to send its responses, generators for the C-MOVE SCPs must implement the ``get_association`` member function which returns a non-associated association. SCP dispatcher -------------- In order to facilitate the development of a DICOM server handling multiple services, the `odil::SCPDispatcher`_ class maps the type of a message to an instance of a SCP and dispatches an incoming message to the correct SCP. :: #incude #incude #include #include #include #include #include // See above for the definitions odil::Value::Integer echo(odil::message::CEchoRequest const & request); class FindGenerator; int main() { odil::Association association; association.receive_association(boost::asio::ip::tcp::v4(), 11112); auto echo_scp = std::make_shared(association, echo); auto find_scp = std::make_shared( association, std::make_shared()); odil::SCPDispatcher dispatcher(association); dispatcher.set_scp(odil::message::Message::Command::C_ECHO_RQ, echo_scp); dispatcher.set_scp(odil::message::Message::Command::C_FIND_RQ, find_scp); bool done = false; while(!done) { try { dispatcher.dispatch(); } catch(odil::AssociationReleased const &) { std::cout << "Peer released association" << std::endl; done = true; } catch(odil::AssociationAborted const & e) { std::cout << "Peer aborted association, " << "source: " << int(e.source) << ", " << "reason: " << int(e.reason) << std::endl; done = true; } } } .. _C-ECHO: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/chapter_A.html .. _C-FIND: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.html#sect_C.4.1 .. _C-GET: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.3.html .. _C-MOVE: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.2.html .. _C-STORE: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/chapter_B.html .. _odil::EchoSCP: ../../_static/doxygen/classodil_1_1EchoSCP.html .. _odil::FindSCP: ../../_static/doxygen/classodil_1_1FindSCP.html .. _odil::GetSCP: ../../_static/doxygen/classodil_1_1GetSCP.html .. _odil::MoveSCP: ../../_static/doxygen/classodil_1_1MoveSCP.html .. _odil::SCP: ../../_static/doxygen/classodil_1_1SCP.html .. _odil::SCP::DataSetGenerator: ../../_static/doxygen/classodil_1_1SCP_1_1DataSetGenerator.html .. _odil::SCPDispatcher: ../../_static/doxygen/classodil_1_1SCPDispatcher.html .. _odil::StoreSCP: ../../_static/doxygen/classodil_1_1StoreSCP.html odil-0.11.0/documentation/developer/cpp/services-scu.rst000066400000000000000000000222441362244656000233210ustar00rootroot00000000000000DICOM services -- client side ============================= .. highlight:: c++ :abbr:`SCUs (Service Class User)` (i.e. *clients*) are available for `C-ECHO`_, `C-FIND`_, `C-GET`_, `C-MOVE`_, and `C-STORE`_, with an abstract base class, `odil::SCU`_, implementing common features and concrete classes for each service (see table below). Every service requires an association which is correctly associated and has negotiated the corresponding abstract syntax. .. table:: DICOM services and Odil classes +----------+-------------------+ | Service | Odil class | +==========+===================+ | C-ECHO | `odil::EchoSCU`_ | +----------+-------------------+ | C-FIND | `odil::FindSCU`_ | +----------+-------------------+ | C-GET | `odil::GetSCU`_ | +----------+-------------------+ | C-MOVE | `odil::MoveSCU`_ | +----------+-------------------+ | C-STORE | `odil::StoreSCU`_ | +----------+-------------------+ Verifying DICOM communication ----------------------------- The simplest service is C-ECHO, used to verify that the two peers can exchange information using DICOM. :: #include #include #include int main() { odil::Association association; association.set_peer_host("www.dicomserver.co.uk"); association.set_peer_port(11112); association.update_parameters() .set_calling_ae_title("WORKSTATION") .set_called_ae_title("SERVER") .set_presentation_contexts({ { odil::registry::VerificationSOPClass, { odil::registry::ExplicitVRLittleEndian }, true, false } }); association.associate(); odil::EchoSCU echo_scu(association); echo_scu.echo(); association.release(); } Querying a database ------------------- The query service, C-FIND, is parameterized by a query and either returns all the matching data sets or calls a function for each match. :: #include #include #include #include void print_informations(odil::DataSet const & response) { auto const name = (response.has("PatientName") && !response.empty("PatientName")) ?response.as_string("PatientName", 0):"(no name)"; auto const study = (response.has("StudyDescription") && !response.empty("StudyDescription")) ?response.as_string("StudyDescription", 0):"(no description)"; std::cout << name << ": " << study << "\n"; } int main() { auto const model = odil::registry::StudyRootQueryRetrieveInformationModelFIND; odil::Association association; association.set_peer_host("www.dicomserver.co.uk"); association.set_peer_port(11112); association.update_parameters() .set_calling_ae_title("WORKSTATION") .set_called_ae_title("SERVER") .set_presentation_contexts({ { model, { odil::registry::ExplicitVRLittleEndian }, true, false } }); association.associate(); odil::DataSet query; query.add("PatientName", { "*" }); query.add("QueryRetrieveLevel", { "STUDY" }); query.add("StudyDescription"); query.add("StudyDate"); odil::FindSCU find_scu(association); find_scu.set_affected_sop_class(model); auto const result = find_scu.find(query); for(auto const & dataset: result) { print_informations(dataset); } find_scu.find(query, print_informations); association.release(); } Retrieving data sets -------------------- The retrieval of data sets, using either C-GET or C-MOVE, is very similar to querying a database. The main difference is the additional presentation contexts required to transfer the data sets. :: #include #include #include #include #include #include #include odil::DataSet find( std::string const & host, unsigned int port, std::string const & calling_aet, std::string const & called_aet) { auto const model = odil::registry::StudyRootQueryRetrieveInformationModelFIND; odil::Association association; association.set_peer_host(host); association.set_peer_port(port); association.update_parameters() .set_calling_ae_title(calling_aet).set_called_ae_title(called_aet) .set_presentation_contexts({ { model, { odil::registry::ExplicitVRLittleEndian }, true, false } }); association.associate(); odil::DataSet query; query.add("QueryRetrieveLevel", { "STUDY" }); query.add("StudyInstanceUID"); query.add("SOPClassesInStudy"); query.add("StudyDate"); odil::FindSCU scu(association); scu.set_affected_sop_class(model); auto const studies = scu.find(query); association.release(); if(studies.empty()) { throw std::runtime_error("No matching studies"); } return studies[0]; } std::vector get_study( std::string const & host, unsigned int port, std::string const & calling_aet, std::string const & called_aet, odil::DataSet const & study) { auto const model = odil::registry::StudyRootQueryRetrieveInformationModelGET; odil::Association association; association.set_peer_host(host); association.set_peer_port(port); association.update_parameters() .set_calling_ae_title(calling_aet).set_called_ae_title(called_aet); std::vector contexts{ { model, { odil::registry::ExplicitVRLittleEndian }, true, false } }; for(auto const & abstract_syntax: study.as_string("SOPClassesInStudy")) { contexts.push_back({ abstract_syntax, { odil::registry::ExplicitVRLittleEndian }, false, true }); } association.update_parameters().set_presentation_contexts(contexts); association.associate(); odil::DataSet query; query.add("QueryRetrieveLevel", { "STUDY" }); query.add("StudyInstanceUID", study.as_string("StudyInstanceUID")); odil::GetSCU scu(association); scu.set_affected_sop_class(model); auto const data_sets = scu.get(query); association.release(); return data_sets; } int main() { std::string const host = "www.dicomserver.co.uk"; unsigned int port = 11112; std::string const calling_aet = "WORKSTATION"; std::string const called_aet = "SERVER"; auto const study = find(host, port, calling_aet, called_aet); auto const data_sets = get_study( host, port, calling_aet, called_aet, study); std::cout << data_sets.size() << " data set" << (data_sets.size()>0?"s":"") << " " << "received\n"; } Note that several presentation contexts must be specified: the C-GET context and one for each type of object returned by C-FIND in the *SOP Classes In Study* element. The C-GET SCU can also be called using one or two callbacks: one which will be called for each C-STORE operation initiated by the server and an optional one which will be called for each C-GET response. The latter one may for example be used for progress information. The C-MOVE SCU is similar to the C-GET SCU in terms of required presentation contexts (the *XXX Root Query Retrieve Information Model GET* being replaced by *XXX Root Query Retrieve Information Model MOVE*) and callbacks. The C-MOVE SCU has additional member functions used to specify where the remote peer will send the data sets: ``get_move_destination`` and ``set_move_destination``. If the move destination is the local peer and not a third party, the port of a temporary C-STORE SCP may be specified through ``set_incoming_port``. The default value of ``0`` means that no C-STORE SCP should be started. Storing data sets ----------------- The C-STORE SCU differs from the query/retrieve SCUs since it has no callback: each data set is either stored successfully or an exception is raised. An optional move origin (if the C-STORE SCU is created by a C-MOVE SCP) may be specified. .. _C-ECHO: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/chapter_A.html .. _C-FIND: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.html#sect_C.4.1 .. _C-GET: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.3.html .. _C-MOVE: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.2.html .. _C-STORE: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/chapter_B.html .. _odil::EchoSCU: ../../_static/doxygen/classodil_1_1EchoSCU.html .. _odil::FindSCU: ../../_static/doxygen/classodil_1_1FindSCU.html .. _odil::GetSCU: ../../_static/doxygen/classodil_1_1GetSCU.html .. _odil::MoveSCU: ../../_static/doxygen/classodil_1_1MoveSCU.html .. _odil::SCU: ../../_static/doxygen/classodil_1_1SCU.html .. _odil::StoreSCU: ../../_static/doxygen/classodil_1_1StoreSCU.html odil-0.11.0/documentation/developer/cpp/webservices.rst000066400000000000000000000250621362244656000232300ustar00rootroot00000000000000DICOM web services ================== .. highlight:: c++ .. note:: Even though Odil implements the DICOM web services, it does not contain an HTTP server; the library however contains everything required to create and parse the content of HTTP requests and responses. The web services implementation in Odil revolves around two classes: `odil::webservices::HTTPRequest`_ and `odil::webservices::HTTPResponse`_ which create and parse HTTP requests and responses. Each web service is implemented by a pair of classes which generate and parse the specific service requests and responses, as show in the table below. .. table:: DICOM wen services and Odil classes +------------+--------------------------------------+ | Service | Odil classes | +============+======================================+ | `QIDO-RS`_ | `odil::webservices::QIDORSRequest`_, | | | `odil::webservices::QIDORSResponse`_ | +------------+--------------------------------------+ | `WADO-RS`_ | `odil::webservices::WADORSRequest`_, | | | `odil::webservices::WADORSResponse`_ | +------------+--------------------------------------+ | `STOW-RS`_ | `odil::webservices::STOWRSRequest`_, | | | `odil::webservices::STOWRSResponse`_ | +------------+--------------------------------------+ Common data structures ---------------------- URLs are represented by `odil::webservices::URL`_ and contain fields as defined in `RFC 3986`_ (scheme, authority, path, query and fragment). The ``URL`` class can parse a string to the URL components and be converted to a string: :: #include #include int main() { auto url = odil::webservices::URL::parse("foo://info.example.com?fred"); url.path = "/people"; std::cout << url << "\n"; } HTTP messages, i.e. requests and responses, are handled by `odil::webservices::HTTPRequest`_ and `odil::webservices::HTTPResponse`_, both having serialization (i.e. ``operator<<``) and de-serialization (i.e. ``operator>>``). Both contains headers and a body; the HTTP request contains the method (e.g. *GET* or *POST*), the target URL, the HTTP version, the headers and the body; the HTTP response contains the HTTP version, the status and its text representation (i.e. the reason), the headers and the body. :: #include #include #include #include int main() { odil::webservices::HTTPRequest request{ "POST", odil::webservices::URL::parse("https://www.example.com:80/")}; request.set_header("Content-Type", "application/json"); request.set_body("{\"foo\": \"bar\" }"); std::cout << request << "\n"; std::istringstream stream( "HTTP/1.0 200 OK\n" "Content-Type: application/json\n"); odil::webservices::HTTPResponse response; stream >> response; std::cout << response.has_header("Content-Type") << "\n"; } Querying a database ------------------- The following example show how to use `Boost.Asio`_ in order to create a very simple HTTP client. The ``http_client`` function is assume to be defined in subsequent examples. :: #include #include #include #include odil::webservices::HTTPResponse http_client( std::string const & host, std::string const & port, odil::webservices::HTTPRequest const & request) { boost::asio::ip::tcp::iostream stream; stream.connect(host, port); stream << request; odil::webservices::HTTPResponse response; stream >> response; return response; } QIDO-RS queries are similar to C-FIND queries: both have a query root and a data set. The query root is specified by ``set_affected_sop_class`` in C-services, while in web services it is specified by `odil::webservices::Selector`_. The data set is specified the same way in C-services and web services: non-empty elements are used as filters while empty terms are used to specified extra fields to be returned. The following example shows how to retrieve all the studies of a given patient through QIDO: :: #include #include #include #include #include #include int main() { auto const root = odil::webservices::URL::parse( "http://dicomserver.co.uk:81/qido"); odil::webservices::QIDORSRequest qido_request(root); odil::webservices::Selector selector; selector.set_study(""); odil::DataSet query; query.add("PatientName", {"Doe"}); query.add("StudyDescription"); qido_request.request_datasets( odil::webservices::Representation::DICOM_JSON, selector, query, false, -1, 0, true); auto http_request = qido_request.get_http_request(); auto const http_response = http_client( "dicomserver.co.uk", "81", http_request); odil::webservices::QIDORSResponse qido_response(http_response); std::cout << "Got " << qido_response.get_data_sets().size() << " data sets" << "\n"; } Retrieving data sets -------------------- The data sets to be received through WADO-RS works are specified by the selector. Using WADO-RS is otherwise very similar to using QIDO-RS: :: #include #include #include #include #include #include #include #include int main() { odil::webservices::QIDORSRequest qido_request( odil::webservices::URL::parse("http://dicomserver.co.uk:81/qido")); odil::DataSet query; query.add("PatientName", {"Doe"}); qido_request.request_datasets( odil::webservices::Representation::DICOM_JSON, std::map({{"studies", ""}}), query, false, 1, 0, true); auto http_request = qido_request.get_http_request(); auto http_response = http_client("dicomserver.co.uk", "81", http_request); odil::webservices::QIDORSResponse const qido_response(http_response); auto const study = qido_response.get_data_sets()[0]; odil::webservices::WADORSRequest wado_request( odil::webservices::URL::parse("http://dicomserver.co.uk:81/wado")); wado_request.request_dicom( odil::webservices::Representation::DICOM_JSON, std::map({ {"studies", study.as_string("StudyInstanceUID")[0]}}) ); http_request = wado_request.get_http_request(); http_response = http_client("dicomserver.co.uk", "81", http_request); odil::webservices::WADORSResponse const wado_response(http_response); auto const data_sets = wado_response.get_data_sets(); std::cout << "Got " << wado_response.get_data_sets().size() << " data sets" << "\n"; } Storing data sets ----------------- STOW-RS requires both a selector and a vector of data sets. The selector must contain the *studies* term, and may specify the Study Instance UID: :: #include #include #include #include #include #include #include int main() { odil::webservices::STOWRSRequest stow_request( odil::webservices::URL::parse("http://dicomserver.co.uk:81/stow")); odil::DataSet data_set; data_set.add("PatientName", {"Doe^John"}); data_set.add("PatientID", {odil::generate_uid()}); data_set.add("StudyInstanceUID", {odil::generate_uid()}); data_set.add("Modality", {"OT"}); data_set.add("SeriesInstanceUID", {odil::generate_uid()}); data_set.add("SOPClassUID", {odil::registry::RawDataStorage}); data_set.add("SOPInstanceUID", {odil::generate_uid()}); stow_request.request_dicom( {data_set}, std::map({{"studies", ""}}), odil::webservices::Representation::DICOM_XML); auto http_request = stow_request.get_http_request(); http_request.set_http_version("HTTP/1.1"); http_request.set_header("Host", stow_request.get_base_url().authority); http_request.set_header("Content-Length", std::to_string(http_request.get_body().size())); http_request.set_header("Accept", "application/dicom+xml"); http_request.set_header("Connection", "close"); auto const http_response = http_client( "dicomserver.co.uk", "81", http_request); odil::webservices::STOWRSResponse const stow_response(http_response); auto const responses = stow_response.get_store_instance_responses(); } .. _Boost.Asio: http://www.boost.org/doc/libs/release/libs/asio/ .. _odil::webservices::HTTPRequest: ../../_static/doxygen/classodil_1_1webservices_1_1HTTPRequest.html .. _odil::webservices::HTTPResponse: ../../_static/doxygen/classodil_1_1webservices_1_1HTTPResponse.html .. _odil::webservices::QIDORSRequest: ../../_static/doxygen/classodil_1_1webservices_1_1QIDORSRequest.html .. _odil::webservices::QIDORSResponse: ../../_static/doxygen/classodil_1_1webservices_1_1QIDORSResponse.html .. _odil::webservices::Selector: ../../_static/doxygen/classodil_1_1webservices_1_1Selector.html .. _odil::webservices::STOWRSRequest: ../../_static/doxygen/classodil_1_1webservices_1_1STOWRSRequest.html .. _odil::webservices::STOWRSResponse: ../../_static/doxygen/classodil_1_1webservices_1_1STOWRSResponse.html .. _odil::webservices::URL: ../../_static/doxygen/structodil_1_1webservices_1_1URL.html .. _odil::webservices::WADORSRequest: ../../_static/doxygen/classodil_1_1webservices_1_1WADORSRequest.html .. _odil::webservices::WADORSResponse: ../../_static/doxygen/classodil_1_1webservices_1_1WADORSResponse.html .. _QIDO-RS: http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_6.7.html .. _RFC 3986: https://tools.ietf.org/html/rfc3986 .. _STOW-RS: http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_6.6.html .. _WADO-RS: http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_6.5.html odil-0.11.0/documentation/developer/index.rst000066400000000000000000000001761362244656000212330ustar00rootroot00000000000000Developer documentation ======================= .. toctree:: :maxdepth: 2 cpp/index python/index javascript/index odil-0.11.0/documentation/developer/javascript/000077500000000000000000000000001362244656000215345ustar00rootroot00000000000000odil-0.11.0/documentation/developer/javascript/index.rst000066400000000000000000000120451362244656000233770ustar00rootroot00000000000000Javascript API ============== .. highlight:: javascript As opposed to the :doc:`Python API <../python/index>`, the Javascript API covers fewer parts of the :doc:`C++ API <../cpp/index>` and differs more often. Due to the focus of Javascript to web applications, the wrappers cover basic manipulation of data sets and the DICOM web services. Adding Odil.js to an HTML document ---------------------------------- The following example show how to integrate Odil.js in an HTML web page: .. code-block:: html Odil web app Tags ---- The ``Tag`` object exposes the ``group`` and ``element`` member variables, and the ``is_private`` and ``get_name`` member functions. Additional C++ operators are exposed as Javascript member functions: .. table:: C++ operators on Tag objects and their Javascript equivalents +------------------------+------------------------------+ | C++ | Javascript | +========================+==============================+ | ``tag1 == tag2;`` | ``tag1.equal(tag2);`` | +------------------------+------------------------------+ | ``tag1 != tag2;`` | ``tag1.notEqual(tag2);`` | +------------------------+------------------------------+ | ``tag1 < tag1;`` | ``tag1.less(tag2);`` | +------------------------+------------------------------+ | ``tag1 > tag2;`` | ``tag1.greater(tag2);`` | +------------------------+------------------------------+ | ``tag1 <= tag2;`` | ``tag1.lessEqual(tag2);`` | +------------------------+------------------------------+ | ``tag1 >= tag2;`` | ``tag1.greaterEqual(tag2);`` | +------------------------+------------------------------+ | ``std::string(tag1);`` | ``tag1.toString;`` | +------------------------+------------------------------+ The registry of elements is looked up using the ``getTag`` function: :: var tag = odil.getTag("PatientName"); console.log(tag.get_name()); Value representations (VR) -------------------------- The members of the `VR`_ enum are exposed as individual variables, with an additional ``VRtoString`` function to convert them to their name. :: var vr = odil.PN; console.log(odil.VRtoString(vr)); Data sets --------- Data sets can be read from an `ArrayBuffer`_ object using the ``readBuffer`` function, which return an array comprised of the meta-information and the data set in a file. This can be used in conjunction with a `FileReader`_ to read a user-selected file as shown in the following example: .. code-block:: html Odil web app
Accessing the element of the data set is done as in Python or C++: :: function onFileRead(event) { var headerAndDataSet = odil.readBuffer(event.target.result); var dataSet = headerAndDataSet.get(1); console.log(dataSet.as_string(odil.getTag("PatientName")).get(0)); } In addition to the ``as_XXX`` member functions, the following member functions are also exposed: - ``is_XXX`` - ``remove`` - ``has`` - ``get_vr`` - ``get_transfer_syntax`` and ``set_transfer_syntax`` The equality and difference operators are exposed as ``equal`` and ``notEqual``, as for ``Tag`` objects. Some member functions in C++ and Python which may apply to either the whole data set or just an element (``empty``, ``size``, ``clear``) are exposed as to Javascript functions: ``empty`` will apply to the whole data set, while ``empty_tag`` will apply to a single element specified by its tag. It is also possible to iterate the data sets, by iterating the tags of its elements: :: function onFileRead(event) { var headerAndDataSet = odil.readBuffer(event.target.result); var dataSet = headerAndDataSet.get(1); var tags = dataSet.get_tags(); for(var i=0; i` as much as possible: most classes and other constructs keep the same name and semantics. However, when C++ and Python differ too much, new Python functions or classes are defined. Basic operations ---------------- The following example show basic manipulations of a data set. This code snippet, and all the others in this section assume that for Python 2, ``from __future__ import print_function`` was used. Note that the Python version of ``odil.DataSet`` adds a few member functions to the C++ version (e.g. ``items``, ``__len__``, ``__iter__``) to make it more similar to Python containers. :: import sys import odil # Reading a data set with odil.open(sys.argv[1]) as stream: header, data_set = odil.Reader.read_file(stream) # Data set size, using C++ API print( "The header {} empty and has {} elemens".format( "is" if header.empty() else "is not", header.size())) # Data set size, using Python API print( "The data set {} empty and has {} elements".format( "is" if not data_set else "is not", len(data_set))) # Element presence, C++ and Python API print("Patient's Name {} in header".format( "is" if header.has(odil.registry.PatientName) else "is not")) print("Patient's Name {} in data set".format( "is" if "PatientName" in data_set else "is not")) # Element access, assuming PatientName is in data set data_set.as_string("PatientName")[0] = "Somebody^Else" print("Patient's Name: {}".format(list(data_set.as_string("PatientName")))) # Iteration, sequence-like for tag in header: element = header[tag] print(tag.get_name(), element.vr) # Iteration, dict-like for tag, element in data_set.items(): try: name = tag.get_name() except odil.Exception as e: name = str(tag) print(name, element.vr) # Writing a data set with odil.open(sys.argv[2], "w") as stream: odil.Writer.write_file(data_set, stream) DICOM services -- client side ----------------------------- The behavior of C++ SCUs w is kept as is in Python: services which return data sets (C-FIND, C-GET, C-MOVE) either return all data sets to the caller or call a function for each of them. The following example adapts the C++ examples for C-ECHO, C-FIND and C-GET in Python. :: import sys import odil transfer_syntaxes = [ getattr(odil.registry, "{}VRLittleEndian".format(x)) for x in ["Implicit", "Explicit"]] # Create the association association = odil.Association() association.set_peer_host("www.dicomserver.co.uk") association.set_peer_port(11112) association.update_parameters()\ .set_calling_ae_title("WORKSTATION")\ .set_called_ae_title("SERVER")\ .set_presentation_contexts([ odil.AssociationParameters.PresentationContext( odil.registry.VerificationSOPClass, transfer_syntaxes, True, False ), odil.AssociationParameters.PresentationContext( odil.registry.StudyRootQueryRetrieveInformationModelFIND, transfer_syntaxes, True, False ) ]) association.associate() # Check DICOM connectivity echo_scu = odil.EchoSCU(association) try: echo_scu.echo() except odil.Exception as e: print("DICOM connection to remote server failed: {}".format(e)) sys.exit(1) # Find the matching studies query = odil.DataSet() query.add("QueryRetrieveLevel", [ "STUDY" ]) query.add("PatientName", ["Doe"]) query.add("StudyInstanceUID") query.add("SOPClassesInStudy") find_scu = odil.FindSCU(association) find_scu.set_affected_sop_class(odil.registry.StudyRootQueryRetrieveInformationModelFIND) study = find_scu.find(query)[0] # Fetch the first study association.release() association = odil.Association() association.set_peer_host("www.dicomserver.co.uk") association.set_peer_port(11112) association.update_parameters()\ .set_calling_ae_title("WORKSTATION")\ .set_called_ae_title("SERVER")\ .set_presentation_contexts([ odil.AssociationParameters.PresentationContext( odil.registry.StudyRootQueryRetrieveInformationModelGET, transfer_syntaxes, True, False ) ] +[ odil.AssociationParameters.PresentationContext( x, [odil.registry.ExplicitVRLittleEndian], True, False) for x in study.as_string("SOPClassesInStudy") ]) association.associate() query = odil.DataSet() query.add("QueryRetrieveLevel", [ "STUDY" ]) query.add("StudyInstanceUID", study.as_string("StudyInstanceUID")) query.add("SOPClassesInStudy") get_scu = odil.GetSCU(association) get_scu.set_affected_sop_class(odil.registry.StudyRootQueryRetrieveInformationModelGET) def data_set_received(data_set): print("Got data set {}".format(data_set.as_string("SOPInstanceUID")[0])) get_scu.get(query, data_set_received) DICOM services -- server side ----------------------------- Similar to C++ SCPs, the Python SCPs work with generators, inherited from their base classes (e.g. ``odil.FindSCP.DataSetGenerator``). The following example shows the implementation of a dummy C-FIND SCP. :: import odil # Create the association association = odil.Association() association.receive_association("v4", 11112) # Create the generator class Generator(odil.FindSCP.DataSetGenerator): def __init__(self): odil.FindSCP.DataSetGenerator.__init__(self) self._responses = [] self._response_index = None def initialize(self, message): data_set = odil.DataSet() data_set.add("PatientName", ["Hello^World"]) data_set.add("PatientID", ["1234"]) self._responses.append(data_set) self._response_index = 0 def done(self): return (self._response_index == len(self._responses)) def next(self): self._response_index += 1 def get(self): return self._responses[self._response_index] find_scp = odil.FindSCP(association) generator = Generator() find_scp.set_generator(generator) # Receive and handle a message message = association.receive_message() find_scp(message) # Check if we have more termination_ok = False try: association.receive_message() except odil.AssociationReleased: print("Association released") except odil.AssociationAborted: print("Association aborted") odil-0.11.0/documentation/index.rst000066400000000000000000000027601362244656000172470ustar00rootroot00000000000000Welcome to Odil's documentation! ================================ *Odil* is a `DICOM`_ library which provides a user-friendly C++11 and Python API for the different parts of the DICOM standard: - Reading and writing data sets with any transfer syntax - Standard JSON and XML representation of datasets - Clients and servers for the various DICOM protocols (C-FIND, C-GET, C-MOVE, C-STORE) - Implementation of the DICOM web-services (WADO-RS, QIDO-RS, STOW-RS) - Conversion to and from `DCMTK`_ data structures. Odil builds and run on Linux, macOS and Windows. `Anaconda`_ packages are available for those three platforms. Official packages are additionnally available in `Debian`_ and `Ubuntu`_, as well as `unofficial backports`_. Odil is free software: you can redistribute and/or modify it under the terms of the `CeCILL-B license`_. Table of contents ----------------- .. toctree:: :includehidden: :maxdepth: 2 installation/index user/index developer/index .. _Anaconda: https://anaconda.org/conda-forge/odil .. _CeCILL-B license: http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html .. _DCMTK: http://dicom.offis.de/dcmtk.php.en .. _Debian: https://packages.debian.org/search?keywords=odil&searchon=sourcenames&suite=all§ion=all .. _DICOM: http://dicom.nema.org/ .. _Homebrew tap: https://github.com/lamyj/homebrew-odil .. _Ubuntu: http://packages.ubuntu.com/search?keywords=odil&searchon=sourcenames&suite=all§ion=all .. _unofficial backports: https://github.com/lamyj/packages/ odil-0.11.0/documentation/installation/000077500000000000000000000000001362244656000201025ustar00rootroot00000000000000odil-0.11.0/documentation/installation/index.rst000066400000000000000000000122661362244656000217520ustar00rootroot00000000000000Installation ============ .. toctree:: :hidden: :maxdepth: 2 linux mac The easiest way to install Odil is to use the pre-compiled packages, either from `Anaconda`_, or from `Debian`_/`Ubuntu`_. For Anaconda packages, simply run ``conda install -c conda-forge odil``. For Debian and Ubuntu packages, packages are available from the official repositories but are usually not the latest version; `unofficial packages`_ are also available: follow the linked instructions to set up the repository, then run ``apt-get install odil``. To compile from source, you will need a C++ 11 compiler and `CMake`_, as well as several additional libraries: `Boost`_ (`Asio`_, `Date Time`_, `Filesystem`_, `Fusion`_, `Log`_, `Preprocessor`_, `Property Tree`_, `Spirit`_, `Uuid`_), `ICU4C`_, `JsonCpp`_ and `pybind11`_. Moreover, the DCMTK converter requires `DCMTK`_, and unit tests require `Boost Test`_. The build process consists in 1. Get the code (cf. below). 2. Inside the directory containing the source code, create a ``build`` directory. 3. From the ``build`` directory, run ``cmake -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" ..`` to configure the project (replacing ``${INSTALL_DIR}`` with the destination directory for the installed files). 4. Run ``cmake --build . --target install`` to build and install Odil. Further sub-sections describe how to build and deploy Odil on different operating systems (:doc:`Linux `, :doc:`macOS `) in more details. Getting the code ---------------- The system-specific instructions will detail how to install using pre-compiled packages or from source. Pre-compiled packages are the easiest to use, but may not contain the latest feeatures; building from source will require download the source code of Odil. Archives of stable releases are hosted on `Github`_. Fetch the latest one and decompress it: .. code-block:: bash wget https://github.com/lamyj/odil/archive/v0.11.0.tar.gz tar -x -f v0.11.0.tar.gz cd odil-0.11.0 You can also clone the `Git repository`_. Note that the latest Git version may not always compile; should it happen, you can keep your clone but check out the latest tagged version: .. code-block:: bash git clone https://github.com/lamyj/odil cd odil git checkout v0.11.0 Build options ------------- Without additional options, the examples, the Python wrappers and the DCMTK converter are built. The following optinal features are summarized in the table below and may passed to CMake with the ``-D`` flag (for example ``cmake -D BUILD_EXAMPLES=OFF ..``). .. csv-table:: :header: "Feature", "Option name", "Possible values" "Code examples", "``BUILD_EXAMPLES``", "``ON`` (default), ``OFF``" "Python wrappers", "``BUILD_PYTHON_WRAPPERS``", "``ON`` (default), ``OFF``" "Python interpreter", "``PYTHON_EXECUTABLE``", "Defaults to ``python``" "Python include directory", "``PYTHON_INCLUDE_DIR``", "Default depending on the interpreter" "Python library", "``PYTHON_LIBRARY``", Default depending on the interpreter "DCMTK converter", "``WITH_DCMTK``", "``ON`` (default), ``OFF``" Note that the Python wrappers are required for the command-line application. When building the Python wrappers, the Python interpreter and libraries default to whatever version is invoked when running ``python`` from a terminal. On a system that has multiple versions of Python and multiple versions of Boost.Python, the required versions should be explicitely specified to avoid version mismatch at link-time, which yield errors at run-time. The following CMake options control this behavior: - ``PYTHON_EXECUTABLE``: the Python interpreter that will be used when calling the main command-line application, ``odil`` - ``PYTHON_INCLUDE_DIR``: the directory containing the development headers of Python - ``PYTHON_LIBRARY``: path to the Python library, static or shared .. _Anaconda: https://anaconda.org/conda-forge/odil/ .. _Asio: http://www.boost.org/doc/libs/release/libs/asio/ .. _Boost: http://www.boost.org/ .. _Boost.Python: http://www.boost.org/doc/libs/release/libs/python/ .. _Boost Test: http://www.boost.org/doc/libs/release/libs/test/ .. _CMake: https://cmake.org/ .. _Date Time: http://www.boost.org/doc/libs/release/libs/date_time/ .. _Debian: https://packages.debian.org/search?keywords=odil&searchon=sourcenames&suite=all§ion=all .. _DCMTK: http://dicom.offis.de/dcmtk.php.en .. _Filesystem: http://www.boost.org/doc/libs/release/libs/filesystem/ .. _Fusion: http://www.boost.org/doc/libs/release/libs/fusion/doc/html/ .. _Github: https://github.com/lamyj/odil/releases .. _Git repository: https://github.com/lamyj/odil .. _ICU4C: https://ssl.icu-project.org/apiref/icu4c/ .. _JsonCpp: https://github.com/open-source-parsers/jsoncpp .. _Log: http://www.boost.org/doc/libs/release/libs/log/ .. _Preprocessor: http://www.boost.org/doc/libs/release/libs/preprocessor/ .. _Property Tree: http://www.boost.org/doc/libs/release/libs/property_tree/ .. _pybind11: https://pybind11.readthedocs.io/en/stable/ .. _Spirit: http://www.boost.org/doc/libs/release/libs/spirit/ .. _Ubuntu: http://packages.ubuntu.com/search?keywords=odil&searchon=sourcenames&suite=all§ion=all .. _unofficial packages: https://github.com/lamyj/packages/ .. _Uuid: http://www.boost.org/doc/libs/release/libs/uuid/ odil-0.11.0/documentation/installation/linux.rst000066400000000000000000000076201362244656000220000ustar00rootroot00000000000000Installation on Linux ===================== Unofficial packages are provided for stable Debian and Ubuntu versions. After following the `instructions to set up the unofficial repository`_, install the ``odil`` package with the usual tools provided by your distribution, for example ``sudo apt-get install odil``. This will install the main command-line application as well as the C++ library and the Python wrappers. If your distribution has no pre-compiled package available, you can compile it from source. Install dependencies -------------------- For Debian and Ubuntu, the following package list will allow you to compile the whole library: .. code-block:: bash sudo apt-get install \ build-essential cmake ninja-build pkg-config python3 \ libboost-dev libboost-date-time-dev libboost-exception-dev \ libboost-log-dev libboost-filesystem-dev \ libdcmtk2-dev libicu-dev libjsoncpp-dev zlib1g-dev \ pybind11-dev python3-pybind11 python3-dev \ libboost-test-dev dcmtk Build Odil ---------- First, choose where the compiled files will be installed: it can be for example ``$HOME/local``. From the source directory, create a ``build`` directory, configure and run the build: .. code-block:: bash mkdir build cd build cmake -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" .. cmake --build . The ``${INSTALL_DIR}`` in the previous snippet must be replaced with the installation directory. The compilation can take advantage of a multi-core CPU either by using `make`_ with the ``-jN`` flag (where ``N`` is the number of concurrent tasks, i.e. the number of cores) or by using `Ninja`_. Without additional options, the examples, the Python wrappers and the DCMTK converter are built. The following optinal features are summarized in the table below and may passed to CMake with the ``-D`` flag (for example ``cmake -D BUILD_EXAMPLES=OFF ..``). .. csv-table:: :header: "Feature", "Option name", "Possible values" "Code examples", "``BUILD_EXAMPLES``", "``ON`` (default), ``OFF``" "Python wrappers", "``BUILD_PYTHON_WRAPPERS``", "``ON`` (default), ``OFF``" "Python interpreter", "``PYTHON_EXECUTABLE``", "Defaults to ``python``" "Python include directory", "``PYTHON_INCLUDE_DIR``", "Default depending on the interpreter" "Python library", "``PYTHON_LIBRARY``", Default depending on the interpreter "DCMTK converter", "``WITH_DCMTK``", "``ON`` (default), ``OFF``" Note that the Python wrappers are required for the command-line application. When building the Python wrappers, the Python interpreter and libraries default to whatever version is invoked when running ``python`` from a terminal. On a system that has multiple versions of Python and multiple versions of Boost.Python, the required versions should be explicitely specified to avoid version mismatch at link-time, which yield errors at run-time. The following CMake options control this behavior: - ``PYTHON_EXECUTABLE``: the Python interpreter that will be used when calling the main command-line application, ``odil`` - ``PYTHON_INCLUDE_DIR``: the directory containing the development headers of Python - ``PYTHON_LIBRARY``: path to the Python library, static or shared Install Odil ------------ If your install path is a standard system path (e.g. ``/usr`` or ``/usr/local``, being *root* may be required in these cases), no additional step need to be taken. In a user-dependent path or a non-standard system path, you may need to update two environment variables. Assuming your install prefix is ``/some/location``, add ``/some/location/bin`` to your ``PATH``, and ``/some/location/lib`` to your ``LD_LIBRARY_PATH``. With Python wrappers, you should also add ``/some/location/lib/python3.5/site-packages`` (update according to the Python version you built for) to your ``PYTHONPATH``. .. _instructions to set up the unofficial repository: https://github.com/lamyj/packages .. _make: https://www.gnu.org/software/make/ .. _Ninja: https://ninja-build.org/ odil-0.11.0/documentation/installation/mac.rst000066400000000000000000000073351362244656000214040ustar00rootroot00000000000000Installation on macOS ===================== An `unofficial Homebrew formula`_ is provided for macOS. To use it, add a new tap to Homebrew, and install ``odil``: .. code-block:: bash brew tap lamyj/odil brew install odil This will install the main command-line application as well as the C++ library and the Python wrappers. Odil may also be compiled from source. This documentation uses `Homebrew`_ to install dependencies. Install dependencies -------------------- The following package list will allow you to compile the whole library: .. code-block:: bash brew install boost cmake dcmtk icu4c jsoncpp ninja pkg-config pybind11 Note that if some dependencies are already installed, the previous command will fail; in that case, it can be run as ``brew upgrade`` instead of ``brew install``. Build Odil ---------- First, choose where the compiled files will be installed: it can be for example ``$HOME/local``. From the source directory, create a ``build`` directory, configure and run the build: .. code-block:: bash mkdir build cd build cmake -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" .. cmake --build . The ``${INSTALL_DIR}`` in the previous snippet must be replaced with the installation directory. The compilation can take advantage of a multi-core CPU either by using `make`_ with the ``-jN`` flag (where ``N`` is the number of concurrent tasks, i.e. the number of cores) or by using `Ninja`_. Without additional options, the examples, the Python wrappers and the DCMTK converter are built. The following optinal features are summarized in the table below and may passed to CMake with the ``-D`` flag (for example ``cmake -D BUILD_EXAMPLES=OFF ..``). .. csv-table:: :header: "Feature", "Option name", "Possible values" "Code examples", "``BUILD_EXAMPLES``", "``ON`` (default), ``OFF``" "Python wrappers", "``BUILD_PYTHON_WRAPPERS``", "``ON`` (default), ``OFF``" "Python interpreter", "``PYTHON_EXECUTABLE``", "Defaults to ``python``" "Python include directory", "``PYTHON_INCLUDE_DIR``", "Default depending on the interpreter" "Python library", "``PYTHON_LIBRARY``", Default depending on the interpreter "DCMTK converter", "``WITH_DCMTK``", "``ON`` (default), ``OFF``" Note that the Python wrappers are required for the command-line application. When building the Python wrappers, the Python interpreter and libraries default to whatever version is invoked when running ``python`` from a terminal. On a system that has multiple versions of Python and multiple versions of Boost.Python, the required versions should be explicitely specified to avoid version mismatch at link-time, which yield errors at run-time. The following CMake options control this behavior: - ``PYTHON_EXECUTABLE``: the Python interpreter that will be used when calling the main command-line application, ``odil`` - ``PYTHON_INCLUDE_DIR``: the directory containing the development headers of Python - ``PYTHON_LIBRARY``: path to the Python library, static or shared Install Odil ------------ If your install path is a standard system path (e.g. ``/usr`` or ``/usr/local``, being *root* may be required in these cases), no additional step need to be taken. In a user-dependent path or a non-standard system path, you may need to update two environment variables. Assuming your install prefix is ``/some/location``, add ``/some/location/bin`` to your ``PATH``, and ``/some/location/lib`` to your ``LD_LIBRARY_PATH``. With Python wrappers, you should also add ``/some/location/lib/python3.5/site-packages`` (update according to the Python version you built for) to your ``PYTHONPATH``. .. _Homebrew: https://brew.sh/ .. _make: https://www.gnu.org/software/make/ .. _Ninja: https://ninja-build.org/ .. _unofficial Homebrew formula: https://github.com/lamyj/homebrew-odil odil-0.11.0/documentation/make.bat000066400000000000000000000014501362244656000170060ustar00rootroot00000000000000@ECHO OFF pushd %~dp0 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set SOURCEDIR=. set BUILDDIR=_build set SPHINXPROJ=Odil if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.installed, then set the SPHINXBUILD environment variable to point echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% goto end :help %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% :end popd odil-0.11.0/documentation/user/000077500000000000000000000000001362244656000163575ustar00rootroot00000000000000odil-0.11.0/documentation/user/dicomdir.rst000066400000000000000000000061201362244656000207020ustar00rootroot00000000000000Create a DICOMDIR ================= From a set of DICOM files, the command ``odil dicomdir`` creates a DICOMDIR (i.e. a `Basic Directory`_) referencing those files: .. code-block:: console $ odil dicomdir /some/location/images/* /some/location $ odil print /some/location/DICOMDIR ... Directory Record Sequence 0004,1220 SQ (sequence, 13 items) ... Directory Record Type 0004,1430 CS ['PATIENT'] Patient's Name 0010,0010 PN ['Doe^John'] ... ... Directory Record Type 0004,1430 CS ['STUDY'] Study Description 0008,1030 LO ['Brain 32 ch'] ... ... Directory Record Type 0004,1430 CS ['SERIES'] Modality 0008,0060 CS ['MR'] ... ... Directory Record Type 0004,1430 CS ['IMAGE'] Referenced File ID 0004,1500 CS ['images', 'dicom', '23492.dcm'] ... ... The last argument is the path to the directory where the DICOMDIR will be created. The DICOM standard requires that this directory contains all the referenced files. Adding extra elements to records -------------------------------- In the previous output, note that *Study Description* is present but *Series Description* is not. By default, ``odil dicomdir`` only create `mandatory elements for each record`_. This behavior can be changed using the following options: +--------------+-------------------+-------------------------+ | Record level | Long option | Short option | +==============+===================+=========================+ | *PATIENT* | ``--patient-key`` | ``-p`` | +--------------+-------------------+-------------------------+ | *STUDY* | ``--study-key`` | ``-S`` (capital *S*) | +--------------+-------------------+-------------------------+ | *SERIES* | ``--series-key`` | ``-s`` (lower-case *s*) | +--------------+-------------------+-------------------------+ | *IMAGE* | ``--image-key`` | ``-i`` | +--------------+-------------------+-------------------------+ The element is specified its keyword and an optional `type`_: - *1*: the element must be present and non-null in all referenced files - *2*: the element must be present in all referenced files but may be null - *3*: the element may be missing in referenced files. This is the default value. To add the *Series Description* element to all *SERIES*-level record: .. code-block:: console $ odil dicomdir -s SeriesDescription /some/location/images/* /some/location $ odil print /some/location/DICOMDIR ... Directory Record Sequence 0004,1220 SQ (sequence, 13 items) ... ... Directory Record Type 0004,1430 CS ['SERIES'] Modality 0008,0060 CS ['MR'] Series Description 0008,103e LO ['di_TE00_TI2000'] ... ... .. _Basic Directory: http://dicom.nema.org/medical/dicom/current/output/chtml/part03/chapter_F.html .. _mandatory elements for each record: http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_F.5.html .. _type: http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_7.4.html odil-0.11.0/documentation/user/echo.rst000066400000000000000000000015221362244656000200270ustar00rootroot00000000000000Verifying DICOM communication ============================= Similarly to the ICMP ping, DICOM has a `communication verification service`_ which checks that two peers can communicate at the DICOM level. It is accessible through ``odil echo``: .. code-block:: bash odil echo www.dicomserver.co.uk 11112 WORKSTATION SERVER The first two arguments are the TCP/IP information (respectively the host and port) and the last two arguments are the `name of the DICOM applications`_ (respectively the calling and called AE titles). If the DICOM ping fails, the error is displayed; otherwise the command just returns. .. _communication verification service: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/chapter_A.html .. _name of the DICOM applications: http://dicom.nema.org/medical/dicom/current/output/chtml/part08/chapter_C.html odil-0.11.0/documentation/user/find.rst000066400000000000000000000053411362244656000200340ustar00rootroot00000000000000Querying a DICOM database ========================= `Queries to a DICOM database`_ are performed through ``odil find``: .. code-block:: console $ odil find \ www.dicomserver.co.uk 11112 WORKSTATION SERVER \ patient \ QueryRetrieveLevel=PATIENT PatientName PatientID 347 answers Specific Character Set 0008,0005 CS [] Query/Retrieve Level 0008,0052 CS ['PATIENT'] Retrieve AE Title 0008,0054 AE ['SERVER'] Patient's Name 0010,0010 PN ['Abdomen^Abby^'] Patient ID 0010,0020 LO ['AA'] Specific Character Set 0008,0005 CS [] Query/Retrieve Level 0008,0052 CS ['PATIENT'] Retrieve AE Title 0008,0054 AE ['SERVER'] Patient's Name 0010,0010 PN ['Doo^Scooby'] Patient ID 0010,0020 LO ['05255'] ... The first four arguments are the TCP/IP information (respectively the host and port) and the `name of the DICOM applications`_ (respectively the calling and called AE titles). The fifth argument is the `information model`_ to use in the query (either ``patient`` or ``study``). Following are the query elements. Each query element may be either an element keyword and a value (as *QueryRetrieveLevel=PATIENT*) or only the element keyword (as *PatientName* or *PatientID*). In the former case, the value will be matched against the records on the remote application and in the latter case the keyword indicates that the user wishes to retrieve the value from the server. The *QueryRetrieveLevel* element must be specified and determines what objects the server will return (``PATIENT``, ``STUDY``, ``SERIES``, ``IMAGE``). The various `attribute matching rules`_ can be used: .. code-block:: console $ odil find \ www.dicomserver.co.uk 11112 WORKSTATION SERVER \ patient \ QueryRetrieveLevel=PATIENT PatientName=Doo* PatientID 2 answers Specific Character Set 0008,0005 CS [] Query/Retrieve Level 0008,0052 CS ['PATIENT'] Retrieve AE Title 0008,0054 AE ['SERVER'] Patient's Name 0010,0010 PN ['Doo^Scooby'] Patient ID 0010,0020 LO ['05255'] Specific Character Set 0008,0005 CS [] Query/Retrieve Level 0008,0052 CS ['PATIENT'] Retrieve AE Title 0008,0054 AE ['SERVER'] Patient's Name 0010,0010 PN ['Doo^Shaggy'] Patient ID 0010,0020 LO ['05256'] .. _attribute matching rules: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.2.2.2.html .. _information model: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.3.html .. _name of the DICOM applications: http://dicom.nema.org/medical/dicom/current/output/chtml/part08/chapter_C.html .. _Queries to a DICOM database: http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.html#sect_C.4.1 odil-0.11.0/documentation/user/get.rst000066400000000000000000000075301362244656000176750ustar00rootroot00000000000000Retrieving DICOM data sets ========================== Based on the results of :doc:`queries `, the matching data sets can be retrieved using ``odil find``: .. code-block:: console $ odil find \ www.dicomserver.co.uk 11112 WORKSTATION SERVER \ patient \ QueryRetrieveLevel=PATIENT PatientName=Doo* PatientID 2 answers Specific Character Set 0008,0005 CS [] Query/Retrieve Level 0008,0052 CS ['PATIENT'] Retrieve AE Title 0008,0054 AE ['SERVER'] Patient's Name 0010,0010 PN ['Doo^Scooby'] Patient ID 0010,0020 LO ['05255'] Specific Character Set 0008,0005 CS [] Query/Retrieve Level 0008,0052 CS ['PATIENT'] Retrieve AE Title 0008,0054 AE ['SERVER'] Patient's Name 0010,0010 PN ['Doo^Shaggy'] Patient ID 0010,0020 LO ['05256'] $ odil get \ www.dicomserver.co.uk 11112 WORKSTATION SERVER \ patient QueryRetrieveLevel=PATIENT PatientID=05256 Completed: 1, remaining: 0, failed: 0, warning: 0 $ LC_ALL=C ls -l total 3752 -rw-rw---- 1 user group 1920876 Jan 18 12:38 2.25.310762891399725865476346432149665484276 $ odil print 2.25.310762891399725865476346432149665484276 ... Patient's Name 0010,0010 PN ['Doo^Shaggy'] Patient ID 0010,0020 LO ['05256'] ... The arguments in the previous example are the same as in :doc:`odil find ` By default, the files will be stored in the current directory and named according to the value of their *SOP Instance UID* element. Modifying the storage --------------------- The files hierarchy can be modified with the ``--layout`` (or ``-l``) option. The default is ``flat`` layout, where all the files are in the same directory; a ``tree`` where a *patient/study/series* hierarchy is created can also be used: .. code-block:: console $ odil get -l tree \ www.dicomserver.co.uk 11112 WORKSTATION SERVER \ study QueryRetrieveLevel=STUDY StudyInstanceUID=1.2.76.0.7230010.3.2.107 Completed: 18, remaining: 0, failed: 0, warning: 0 $ tree . └── BEETHOVEN^LUDWIG └── 1 └── 1 ├── 1.2.826.0.1.3680043.6.11323.24626.20170922143703.136.48 ├── 1.2.826.0.1.3680043.6.11840.18756.20170922143703.136.44 ├── 1.2.826.0.1.3680043.6.14604.32391.20170922143702.136.12 ... To `comply with the DICOM standard`_, the files and directories created by ``odil get`` can also be created with ISO-9660 names with the ``--iso-9660`` (or ``-I``) option: .. code-block:: console $ odil get -I \ www.dicomserver.co.uk 11112 WORKSTATION SERVER \ study QueryRetrieveLevel=STUDY StudyInstanceUID=1.2.76.0.7230010.3.2.107 Completed: 18, remaining: 0, failed: 0, warning: 0 $ ls -l total 218880 -rw-rw---- 1 user group 6221840 Jan 18 13:02 IM000001 -rw-rw---- 1 user group 6221840 Jan 18 13:02 IM000002 -rw-rw---- 1 user group 6221844 Jan 18 13:02 IM000003 ... This option may be used along with the layout option: .. code-block:: console $ odil get -l tree -I \ www.dicomserver.co.uk 11112 WORKSTATION SERVER \ study QueryRetrieveLevel=STUDY StudyInstanceUID=1.2.76.0.7230010.3.2.107 Completed: 18, remaining: 0, failed: 0, warning: 0 $ tree . └── BEETHOVE └── 1 └── 1 ├── IM000001 ├── IM000002 ├── IM000003 ... Creating a DICOMDIR ------------------- A DICOMDIR can be created for the retrieved files by using the ``--dicomdir`` (or ``-D``) option. Additional record keys can be specified using the same options than in :doc:`odil dicomdir `. Creating a DICOM requires the use of ISO-9660 file names, but may use flat or hierarchical storage. .. _comply with the DICOM standard: http://dicom.nema.org/medical/dicom/current/output/chtml/part10/sect_8.2.html odil-0.11.0/documentation/user/index.rst000066400000000000000000000020261362244656000202200ustar00rootroot00000000000000User documentation ================== *Odil* (the software package) includes a command-line tool called ``odil`` which gives access to: .. toctree:: :maxdepth: 2 print transcode dicomdir echo find get store .. note:: If Odil was installed from source, the command-line tool requires the Python wrappers. Complete usage for each command and for the whole tool can be obtained with the ``-h`` flag: .. code-block:: console $ odil print -h usage: odil print [-h] [--print-header] [--decode-uids] [--verbosity {warning,info,debug}] FILE [FILE ...] positional arguments: FILE Input files optional arguments: -h, --help show this help message and exit --print-header, -H Print the header as well as the data set (default: False) --decode-uids, -u Print human-friendly name of known UIDs (default: False) --verbosity {warning,info,debug}, -v {warning,info,debug} odil-0.11.0/documentation/user/print.rst000066400000000000000000000065321362244656000202530ustar00rootroot00000000000000Displaying the content of a DICOM file ====================================== The command ``odil print`` displays the content of a `DICOM file`_. For each element, it will display its `name`_ and its `tag`_, its `VR`_ (value representation, i.e. type), and its value. .. code-block:: console $ odil print file.dcm Specific Character Set 0008,0005 CS ['ISO_IR 100'] ... SOP Class UID 0008,0016 UI ['1.2.840.10008.5.1.4.1.1.4'] ... 0019,0010 0019,0010 LO ['SIEMENS MR HEADER'] 0019,1008 0019,1008 CS ['IMAGE NUM 4'] ... Image Position (Patient) 0020,0032 DS [-32.0, -120.3125, 175.0] ... Pixel Data 7fe0,0010 OW (binary, 1 item, 90112 bytes) Text and numeric elements, even when nested in other elements, will display their full value. Binary elements (for example the pixel data) cannot be easily displayed, and are only shown as a summary containing the number of items and the size in bytes. Note that for unknown elements (like the private element *0019,1008* in the above example), no name can be displayed, and the tag is used instead. The value is however displayed as for known elements. Displaying the name of UIDs --------------------------- By default, the `UIDs`_ (like the value of *SOP Class UID*) are displayed as their value (*1.2.840.10008.5.1.4.1.1.4*) and not as their name (*MR Image Storage*). This behavior can be changed with the ``-u`` option: .. code-block:: console $ odil print -u file.dcm Specific Character Set 0008,0005 CS ['ISO_IR 100'] ... SOP Class UID 0008,0016 UI ['MR Image Storage'] ... The name will only be displayed for `registered UIDs`_. Displaying the meta information ------------------------------- Only elements in the data set (i.e. where the group is higher than *0008*) are displayed by default. To display the `meta information`_ or *header* of the file, use the `-H` flag: .. code-block:: console $ odil print -H file.dcm File Meta Information Version 0002,0001 OB (binary, 1 item, 2 bytes) Media Storage SOP Class UID 0002,0002 UI ['1.2.840.10008.5.1.4.1.1.4'] ... Transfer Syntax UID 0002,0010 UI ['1.2.840.10008.1.2.1'] ... Specific Character Set 0008,0005 CS ['ISO_IR 100'] ... Displaying multiple files ------------------------- Multiple files may be specified, in which case their respective contents will be displayed in order: .. code-block:: console $ odil print file1.dcm file2.dcm ... fileN.dcm ... SOP Instance UID 0008,0018 UI ['1.3.12.2.1107.5.2.30.25842.35105'] ... SOP Instance UID 0008,0018 UI ['1.3.12.2.1107.5.2.30.25842.35125'] ... SOP Instance UID 0008,0018 UI ['1.3.12.2.1107.5.2.30.25842.35109'] ... .. _DICOM file: http://dicom.nema.org/medical/dicom/current/output/chtml/part10/chapter_7.html .. _meta information: http://dicom.nema.org/medical/dicom/current/output/chtml/part10/chapter_7.html#sect_7.1 .. _name: http://dicom.nema.org/medical/dicom/current/output/chtml/part06/chapter_6.html .. _registered UIDs: http://dicom.nema.org/medical/dicom/current/output/chtml/part06/chapter_A.html .. _tag: http://dicom.nema.org/medical/dicom/current/output/chtml/part06/chapter_5.html .. _UIDs: http://dicom.nema.org/medical/dicom/current/output/chtml/part05/chapter_9.html .. _VR: http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_6.2.html odil-0.11.0/documentation/user/store.rst000066400000000000000000000012251362244656000202450ustar00rootroot00000000000000Storing DICOM data on a remote server ===================================== Storing DICOM data on a remote server is performed through ``odil store``: .. code-block:: bash odil store \ www.dicomserver.co.uk 11112 WORKSTATION SERVER \ file1.dcm file2.dcm fileN.dcm The first four arguments are the TCP/IP information (respectively the host and port) and the `name of the DICOM applications`_ (respectively the calling and called AE titles). The remaining arguments are the paths to the files to be sent to the remote application. .. _name of the DICOM applications: http://dicom.nema.org/medical/dicom/current/output/chtml/part08/chapter_C.html odil-0.11.0/documentation/user/transcode.rst000066400000000000000000000042231362244656000210740ustar00rootroot00000000000000Convert a binary DICOM file =========================== Binary DICOM files can be converted to their `JSON`_ or `XML`_ representation or recoded using another `transfer syntax`_ using ``odil transcode``. Convert to JSON --------------- Specify ``-f json`` to convert to JSON: .. code-block:: console $ odil transcode -f json file.dcm /dev/stdout { "00080005":{"Value":["ISO_IR 100"],"vr":"CS"}, ... } If the output is to be read by a human being, the condensed format is not appropriate, and the result can be pretty-printed using the ``-p`` flag: .. code-block:: console $ odil transcode -f json -p file.dcm /dev/stdout { "00080005" : { "Value" : [ "ISO_IR 100" ], "vr" : "CS" }, ... "00080016" : { "Value" : [ "1.2.840.10008.5.1.4.1.1.4" ], "vr" : "UI" }, ... } Convert to XML -------------- Similarly, specify ``-f xml`` to convert to XML, with optional pretty-printing with the ``-p`` flag: .. code-block:: console $ odil transcode -f xml -p file.dcm /dev/stdout ISO_IR 100 ... 1.2.840.10008.5.1.4.1.1.4 ... Change the transfer syntax -------------------------- The transfer syntax of a file can also be changed through the ``-t`` flag with a `transfer syntax name`_: .. code-block:: console $ odil transcode -t ExplicitVRLittleEndian input.dcm output.dcm $ odil print -H -u output.dcm | grep "Transfer Syntax" Transfer Syntax UID 0002,0010 UI ['Explicit VR Little Endian'] .. _JSON: http://dicom.nema.org/medical/dicom/current/output/chtml/part18/chapter_F.html .. _transfer syntax: http://dicom.nema.org/medical/dicom/current/output/chtml/part05/chapter_10.html .. _transfer syntax name: http://dicom.nema.org/medical/dicom/current/output/chtml/part06/chapter_A.html .. _XML: http://dicom.nema.org/medical/dicom/current/output/chtml/part19/chapter_A.html#sect_A.1 odil-0.11.0/examples/000077500000000000000000000000001362244656000143465ustar00rootroot00000000000000odil-0.11.0/examples/CMakeLists.txt000066400000000000000000000001771362244656000171130ustar00rootroot00000000000000option(INSTALL_EXAMPLES "Install the examples" OFF) add_subdirectory("cpp") add_subdirectory("python") add_subdirectory("js") odil-0.11.0/examples/cpp/000077500000000000000000000000001362244656000151305ustar00rootroot00000000000000odil-0.11.0/examples/cpp/CMakeLists.txt000066400000000000000000000015111362244656000176660ustar00rootroot00000000000000find_package(Boost REQUIRED) find_package(DCMTK REQUIRED) find_package(JsonCpp REQUIRED) include_directories( ${CMAKE_SOURCE_DIR}/src ${Boost_INCLUDE_DIRS} ${DCMTK_INCLUDE_DIRS} ${JsonCpp_INCLUDE_DIRS}) add_definitions( ${DCMTK_DEFINITIONS} -D ODIL_MAJOR_VERSION=${odil_MAJOR_VERSION} ) if(BUILD_SHARED_LIBS) add_definitions(-D BOOST_ALL_DYN_LINK) endif() link_directories(${Boost_LIBRARY_DIRS} ${DCMTK_LIBRARY_DIRS}) file(GLOB_RECURSE examples *.cpp) foreach(example_file ${examples}) get_filename_component(example ${example_file} NAME_WE) add_executable(${example} ${example_file}) target_link_libraries(${example} libodil) if(INSTALL_EXAMPLES) install(TARGETS ${example} RUNTIME DESTINATION bin) endif() set_target_properties(${example} PROPERTIES FOLDER "Examples") endforeach() odil-0.11.0/examples/cpp/dicomdir.cpp000066400000000000000000000011311362244656000174220ustar00rootroot00000000000000#include #include #include #include int main(int argc, char** argv) { std::string const root(argv[1]); std::vector const files(argv+2, argv+argc); odil::BasicDirectoryCreator creator(root, files, { {"PATIENT", { {odil::registry::PatientBirthDate, 3} }}, {"STUDY", { {odil::registry::PatientAge, 3} }}, {"SERIES", { {odil::registry::SeriesDescription, 3} }}, {"IMAGE", { {odil::registry::ImageType, 3} }}, }); creator(); return 0; } odil-0.11.0/examples/cpp/dump.cpp000066400000000000000000000042121362244656000166000ustar00rootroot00000000000000#include #include #include #include #include #include #include #include struct Printer { typedef void result_type; std::ostream & stream; std::string indent; Printer(std::ostream & stream, std::string const & indent="") : stream(stream), indent(indent) { // Nothing else } template void operator()(T const & value) const { for(auto const & item: value) { this->stream << item << " "; } } void operator()(odil::Value::DataSets const & value) const { this->stream << "\n"; auto const last_it = --value.end(); for(auto it=value.begin(); it!= value.end(); ++it) { Printer const printer(this->stream, this->indent+" "); printer(*it); if(it != last_it) { this->stream << "----\n"; } } } void operator()(odil::Value::Binary const &) const { this->stream << this->indent << "(binary)"; } void operator()(std::shared_ptr const & data_set) const { for(auto const & item: *data_set) { this->stream << this->indent << item.first << " " << as_string(item.second.vr) << " "; odil::apply_visitor(*this, item.second.get_value()); this->stream << "\n"; } } }; int main(int argc, char** argv) { for(int i=1; i, std::shared_ptr> file; try { file = odil::Reader::read_file(stream); } catch(std::exception & e) { std::cout << "Could not read " << argv[i] << ": " << e.what() << "\n"; } auto const & meta_information = file.first; auto const & data_set = file.second; Printer printer(std::cout); printer(meta_information); std::cout << "\n"; printer(data_set); } return 0; } odil-0.11.0/examples/cpp/find.cpp000066400000000000000000000050111362244656000165510ustar00rootroot00000000000000#include #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/EchoSCU.h" #include "odil/FindSCU.h" #include "odil/registry.h" void print_informations(std::shared_ptr response) { auto const name = (response->has("PatientName") && !response->empty("PatientName"))? response->as_string("PatientName", 0):"(no name)"; auto const study = (response->has("StudyDescription") && !response->empty("StudyDescription"))? response->as_string("StudyDescription", 0):"(no description)"; auto const date = (response->has("StudyDate") && !response->empty("StudyDate"))? response->as_string("StudyDate", 0):"(no date)"; std::cout << "\"" << name << "\": \"" << study << "\" on " << date << "\n"; } int main() { odil::Association association; association.set_peer_host("184.73.255.26"); association.set_peer_port(11112); association.update_parameters() .set_calling_ae_title("myself") .set_called_ae_title("AWSPIXELMEDPUB") .set_presentation_contexts({ { odil::registry::StudyRootQueryRetrieveInformationModelFIND, { odil::registry::ExplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCU }, { odil::registry::VerificationSOPClass, { odil::registry::ExplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCU } }); association.associate(); odil::EchoSCU echo_scu(association); echo_scu.echo(); odil::FindSCU scu(association); auto query = std::make_shared(); query->add("PatientName", { "*" }); query->add("QueryRetrieveLevel", { "STUDY" }); query->add("StudyDescription"); query->add("StudyDate"); scu.set_affected_sop_class(odil::registry::StudyRootQueryRetrieveInformationModelFIND); std::cout << "--------\n"; std::cout << "Callback\n"; std::cout << "--------\n\n"; // We are re-using the query in the next call to "find", so do not move it. scu.find(query, print_informations); std::cout << "\n"; std::cout << "------\n"; std::cout << "vector\n"; std::cout << "------\n\n"; // We are not re-using the query, so move it. auto const result = scu.find(std::move(query)); for(auto const & dataset: result) { print_informations(dataset); } association.release(); } odil-0.11.0/examples/cpp/genericscp.cpp000066400000000000000000000127611362244656000177650ustar00rootroot00000000000000#include #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/EchoSCP.h" #include "odil/FindSCP.h" #include "odil/StoreSCP.h" #include "odil/NSetSCP.h" #include "odil/registry.h" #include "odil/SCPDispatcher.h" #include "odil/SCP.h" #include "odil/message/CEchoRequest.h" #include "odil/message/CFindRequest.h" #include "odil/message/CFindResponse.h" #include "odil/message/CStoreRequest.h" #include "odil/message/NSetRequest.h" class FindGenerator: public odil::SCP::DataSetGenerator { public: FindGenerator() { // Nothing to do } virtual ~FindGenerator() { // Nothing to do. } virtual void initialize(std::shared_ptr ) { auto data_set_1 = std::make_shared(); data_set_1->add(odil::registry::PatientName, {"Hello^World"}); data_set_1->add(odil::registry::PatientID, {"1234"}); this->_responses.push_back(data_set_1); auto data_set_2 = std::make_shared(); data_set_2->add(odil::registry::PatientName, {"Doe^John"}); data_set_2->add(odil::registry::PatientID, {"5678"}); this->_responses.push_back(data_set_2); this->_response_iterator = this->_responses.begin(); } virtual bool done() const { return (this->_response_iterator == this->_responses.end()); } virtual std::shared_ptr get() const { return *this->_response_iterator; } virtual void next() { ++this->_response_iterator; } private: odil::Value::DataSets _responses; odil::Value::DataSets::const_iterator _response_iterator; }; odil::Value::Integer echo(std::shared_ptr request) { std::cout << "Received echo\n"; std::cout << " ID: " << request->get_message_id() << "\n"; std::cout << " Affected SOP Class UID: " << request->get_affected_sop_class_uid() << "\n"; return odil::message::Response::Success; } odil::Value::Integer store(std::shared_ptr request) { auto const patient_name = request->get_data_set()->as_string(odil::registry::PatientName)[0]; std::cout << "Storing " << patient_name << "\n"; return odil::message::Response::Success; } odil::Value::Integer nset(std::shared_ptr request) { std::cout << "NSetRequest message ID: " << request->get_message_id() <<"\n"; std::cout << "NSetRequest requested SOP Class UID: " << request->get_requested_sop_class_uid()<<"\n"; return odil::message::Response::Success; } int main() { odil::Association association; while (true) { std::cout << "Waiting for an association on port : 11112..." << std::endl; association.receive_association(boost::asio::ip::tcp::v4(), 11112); std::cout << "Received association from " << association.get_peer_host() << ":" << association.get_peer_port() << std::endl ; auto const & contexts = association.get_negotiated_parameters().get_presentation_contexts(); std::cout << "Presentation contexts (" << contexts.size() << ")\n"; for(auto const & context: contexts) { std::cout << "\t" << odil::registry::uids_dictionary.at(context.abstract_syntax).name << ": " << odil::registry::uids_dictionary.at(context.transfer_syntaxes[0]).name << ", "; if(context.role == odil::AssociationParameters::PresentationContext::Role::SCU) { std::cout << "SCU"; } else if(context.role == odil::AssociationParameters::PresentationContext::Role::SCP) { std::cout << "SCP"; } else if(context.role == odil::AssociationParameters::PresentationContext::Role::Both) { std::cout << "SCU+SCP"; } else if(context.role == odil::AssociationParameters::PresentationContext::Role::Unspecified) { std::cout << "no role specified"; } else if(context.role == odil::AssociationParameters::PresentationContext::Role::None) { std::cout << "no role"; } std::cout << std::endl; } auto echo_scp = std::make_shared(association, echo); auto find_scp = std::make_shared( association, std::make_shared()); auto store_scp = std::make_shared(association, store); auto nset_scp = std::make_shared(association, nset); odil::SCPDispatcher dispatcher(association); dispatcher.set_scp(odil::message::Message::Command::C_ECHO_RQ, echo_scp); dispatcher.set_scp(odil::message::Message::Command::C_FIND_RQ, find_scp); dispatcher.set_scp( odil::message::Message::Command::C_STORE_RQ, store_scp); dispatcher.set_scp( odil::message::Message::Command::N_SET_RQ, nset_scp); bool done = false; while(!done) { try { dispatcher.dispatch(); } catch(odil::AssociationReleased const &) { std::cout << "Peer released association" << std::endl; done = true; } catch(odil::AssociationAborted const & e) { std::cout << "Peer aborted association, " << "source: " << int(e.source) << ", " << "reason: " << int(e.reason) << std::endl; done = true; } } } } odil-0.11.0/examples/cpp/get.cpp000066400000000000000000000073221362244656000164170ustar00rootroot00000000000000#include #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/FindSCU.h" #include "odil/GetSCU.h" #include "odil/registry.h" void print_informations(std::shared_ptr response) { auto const name = response->has("PatientName")? response->as_string("PatientName", 0):"(no name)"; auto const study = response->has("StudyDescription")? response->as_string("StudyDescription", 0):"(no study description)"; auto const series = response->has("SeriesDescription")? response->as_string("SeriesDescription", 0):"(no series description)"; auto const instance = response->has("InstanceNumber")? response->as_int("InstanceNumber", 0):(-1); std::cout << name << ": " << study << " / " << series << ": " << instance << "\n"; } int main() { odil::Association association; association.set_peer_host("184.73.255.26"); association.set_peer_port(11112); association.update_parameters() .set_calling_ae_title("myself") .set_called_ae_title("AWSPIXELMEDPUB") .set_presentation_contexts({ { odil::registry::StudyRootQueryRetrieveInformationModelFIND, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCU }, { odil::registry::StudyRootQueryRetrieveInformationModelGET, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCU }, { odil::registry::MRImageStorage, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCP }, { odil::registry::VerificationSOPClass, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCU } }); association.associate(); odil::FindSCU find_scu(association); find_scu.set_affected_sop_class( odil::registry::StudyRootQueryRetrieveInformationModelFIND); auto query = std::make_shared(); query->add("QueryRetrieveLevel", { "STUDY" }); query->add("StudyInstanceUID"); auto const studies = find_scu.find(query); std::shared_ptr series; for(auto const & study: studies) { if(!study->has("StudyInstanceUID")) { continue; } query->clear(); query->add("QueryRetrieveLevel", {"SERIES"}); query->add("Modality", {"MR"}); query->add("StudyInstanceUID", study->as_string("StudyInstanceUID")); query->add("SeriesInstanceUID"); auto const study_series = find_scu.find(query); if(!study_series.empty()) { series = study_series[0]; break; } } odil::GetSCU get_scu(association); get_scu.set_affected_sop_class( odil::registry::StudyRootQueryRetrieveInformationModelGET); query->clear(); query->add("QueryRetrieveLevel", { "SERIES" }); query->add("StudyInstanceUID", (*series)["StudyInstanceUID"]); query->add("SeriesInstanceUID", (*series)["SeriesInstanceUID"]); std::cout << "--------\n"; std::cout << "Callback\n"; std::cout << "--------\n\n"; get_scu.get(query, print_informations); std::cout << "\n"; std::cout << "------\n"; std::cout << "vector\n"; std::cout << "------\n\n"; auto const result = get_scu.get(query); for(auto const & dataset: result) { print_informations(dataset); } association.release(); } odil-0.11.0/examples/cpp/move.cpp000066400000000000000000000075561362244656000166170ustar00rootroot00000000000000#include #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/FindSCU.h" #include "odil/MoveSCU.h" #include "odil/registry.h" void print_informations(std::shared_ptr response) { auto const name = response->has("PatientName")? response->as_string("PatientName", 0):"(no name)"; auto const study = response->has("StudyDescription")? response->as_string("StudyDescription", 0):"(no study description)"; auto const series = response->has("SeriesDescription")? response->as_string("SeriesDescription", 0):"(no series description)"; auto const instance = response->has("InstanceNumber")? response->as_int("InstanceNumber", 0):(-1); std::cout << name << ": " << study << " / " << series << ": " << instance << "\n"; } int main() { odil::Association association; association.set_peer_host("184.73.255.26"); association.set_peer_port(11112); association.update_parameters() .set_calling_ae_title("myself") .set_called_ae_title("AWSPIXELMEDPUB") .set_presentation_contexts({ { odil::registry::StudyRootQueryRetrieveInformationModelFIND, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCU }, { odil::registry::StudyRootQueryRetrieveInformationModelMOVE, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCU }, { odil::registry::MRImageStorage, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCP }, { odil::registry::VerificationSOPClass, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCU } }); association.associate(); odil::FindSCU find_scu(association); find_scu.set_affected_sop_class( odil::registry::StudyRootQueryRetrieveInformationModelFIND); auto query = std::make_shared(); query->add("QueryRetrieveLevel", { "STUDY" }); query->add("StudyInstanceUID"); query->add("NumberOfStudyRelatedSeries"); auto const studies = find_scu.find(query); std::shared_ptr series; for(auto const & study: studies) { if(!study->has("StudyInstanceUID")) { continue; } query->clear(); query->add("QueryRetrieveLevel", {"SERIES"}); query->add("Modality", {"MR"}); query->add("StudyInstanceUID", study->as_string("StudyInstanceUID")); query->add("SeriesInstanceUID"); auto const study_series = find_scu.find(query); if(!study_series.empty()) { series = study_series[0]; break; } } odil::MoveSCU move_scu(association); move_scu.set_affected_sop_class( odil::registry::StudyRootQueryRetrieveInformationModelMOVE); move_scu.set_move_destination( association.get_parameters().get_calling_ae_title()); query->clear(); query->add("QueryRetrieveLevel", { "SERIES" }); query->add("StudyInstanceUID", (*series)["StudyInstanceUID"]); query->add("SeriesInstanceUID", (*series)["SeriesInstanceUID"]); std::cout << "--------\n"; std::cout << "Callback\n"; std::cout << "--------\n\n"; move_scu.move(query, print_informations, odil::MoveSCU::MoveCallback()); std::cout << "\n"; std::cout << "------\n"; std::cout << "vector\n"; std::cout << "------\n\n"; auto const result = move_scu.move(query); for(auto const & dataset: result) { print_informations(dataset); } association.release(); } odil-0.11.0/examples/cpp/qido-rs-client.cpp000066400000000000000000000101101362244656000204570ustar00rootroot00000000000000#include #include #include #include #include #include #include #include #include #include #include #include #include "odil/json_converter.h" #include "odil/registry.h" #include "list" #include #include "odil/Exception.h" struct Printer { typedef void result_type; std::ostream & stream; std::string indent; Printer(std::ostream & stream, std::string const & indent="") : stream(stream), indent(indent) { // Nothing else } template void operator()(T const & value) const { for(auto const & item: value) { this->stream << item << " "; } } void operator()(odil::Value::DataSets const & value) const { this->stream << "\n"; auto const last_it = --value.end(); for(auto it=value.begin(); it!= value.end(); ++it) { Printer const printer(this->stream, this->indent+" "); printer(*it); if(it != last_it) { this->stream << "----\n"; } } } void operator()(odil::Value::Binary const & value) const { this->stream << this->indent << "(binary)"; } void operator()(std::shared_ptr const & data_set) const { for(auto const & item: *data_set) { this->stream << this->indent << item.first << " " << as_string(item.second.vr) << " "; odil::apply_visitor(*this, item.second.get_value()); this->stream << "\n"; } } }; int main () { // orthanc local // odil::webservices::URL const root{ // "http", "localhost", "/dicom-web"}; // orthanc remote odil::webservices::URL const root{ "http", "demo.orthanc-server.com", "/dicom-web"}; odil::webservices::QIDORSRequest qido_request(root); //-------------------- Query DataSet creation auto query_ds = std::make_shared(); query_ds->add(odil::Tag("PatientName"), {"KNI*"}); // Only to test the regex //-------------------- Wanted included fields query_ds->add(odil::Tag("00200035")); query_ds->add(odil::Tag("00200030")); //-------------------- Selector creation odil::webservices::Selector selector; selector.set_series(""); qido_request.request_datasets( odil::webservices::Representation::DICOM_JSON, selector, query_ds ); auto http_request = qido_request.get_http_request(); // Explicitely use HTTP/1.0 to avoid chunked encoding http_request.set_http_version("HTTP/1.0"); http_request.set_header("Host", root.authority); http_request.set_header("Connection", "close"); // orthanc local // boost::asio::ip::tcp::iostream stream("localhost", "8042"); // orthanc remote boost::asio::ip::tcp::iostream stream; stream.connect(root.authority, root.scheme); if(!stream) { std::cerr << "Error connecting: " #if BOOST_VERSION >= 104700 << stream.error().message() #endif << std::endl; return 1; } stream << http_request; if(!stream) { std::cerr << "Error sending: " #if BOOST_VERSION >= 104700 << stream.error().message() #endif << std::endl; return 1; } odil::webservices::HTTPResponse http_response; stream >> http_response; if(!stream) { std::cerr << "Error receiving: " #if BOOST_VERSION >= 104700 << stream.error().message() #endif << std::endl; return 1; } odil::webservices::QIDORSResponse qido_response(http_response); std::cout << "Datasets: " << qido_response.get_data_sets().size() << std::endl; Printer printer(std::cout); for(auto const & data_set: qido_response.get_data_sets()) { printer(data_set); } return 0; } odil-0.11.0/examples/cpp/store.cpp000066400000000000000000000025241362244656000167730ustar00rootroot00000000000000#include "odil/Association.h" #include "odil/DataSet.h" #include "odil/EchoSCU.h" #include "odil/Reader.h" #include "odil/StoreSCU.h" int main(int argc, char** argv) { odil::Association association; association.set_peer_host("184.73.255.26"); association.set_peer_port(11112); association.update_parameters() .set_calling_ae_title("myself") .set_called_ae_title("AWSPIXELMEDPUB") .set_presentation_contexts({ { odil::registry::MRImageStorage, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCP }, { odil::registry::VerificationSOPClass, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCU } }); association.associate(); odil::EchoSCU echo_scu(association); echo_scu.echo(); odil::StoreSCU scu(association); for(int i=1; i #include #include #include #include "odil/VR.h" #include #include #include #include "json/json.h" #include "odil/Reader.h" #include "odil/DataSet.h" #include "odil/registry.h" #include "odil/Tag.h" #include #include #include "odil/webservices/URL.h" #include "odil/webservices/Selector.h" struct Printer { typedef void result_type; std::ostream & stream; std::string indent; Printer(std::ostream & stream, std::string const & indent="") : stream(stream), indent(indent) { // Nothing else } template void operator()(T const & value) const { for(auto const & item: value) { this->stream << item << " "; } } void operator()(odil::Value::DataSets const & value) const { this->stream << "\n"; auto const last_it = --value.end(); for(auto it=value.begin(); it!= value.end(); ++it) { Printer const printer(this->stream, this->indent+" "); printer(std::const_pointer_cast(*it)); if(it != last_it) { this->stream << "----\n"; } } } void operator()(odil::Value::Binary const &) const { this->stream << this->indent << "(binary)"; } void operator()(std::shared_ptr const & data_set) const { for(auto const & item: *data_set) { this->stream << this->indent << item.first << " " << as_string(item.second.vr) << " "; odil::apply_visitor(*this, item.second.get_value()); this->stream << "\n"; } } }; struct Data { odil::Value::DataSets data_sets; Data() { //-------------------- DataSets Creation auto ds = std::make_shared(); ds->add(odil::Tag("PatientName"), {"TOTO"}); ds->add(odil::Tag("PatientID"), {"TOTO"}); ds->add(odil::Tag("SOPClassUID"), {odil::registry::MRImageStorage}); ds->add(odil::Tag("SOPInstanceUID"), {"1.2.3.5"}); ds->add(odil::Tag("StudyInstanceUID"), {"1.3.46.670589.11.38235.5.0.4644.2013061709032540000"}); ds->add(odil::Tag("SeriesInstanceUID"), {"1.3.46.670589.11.38235.5.0.5964.2013061710064254405"}); ds->add(odil::Tag("Signature"), odil::Value::Binary({{0x01, 0x02}})); ds->add(odil::Tag("TransferSyntaxUID"), {odil::registry::ExplicitVRLittleEndian}); auto ds_2 = std::make_shared(); ds_2->add(odil::Tag("PatientName"), {"JP"}); ds_2->add(odil::Tag("PatientID"), {"TUTU"}); ds_2->add(odil::Tag("SOPClassUID"), {odil::registry::MRImageStorage}); ds_2->add(odil::Tag("SOPInstanceUID"), {"1.2.3.6"}); ds_2->add(odil::Tag("StudyInstanceUID"), {"1.3.46.670589.11.38235.5.0.4644.2013061709032540000"}); ds_2->add(odil::Tag("SeriesInstanceUID"), {"1.3.46.670589.11.38235.5.0.5964.31"}); ds_2->add(odil::Tag("TransferSyntaxUID"), {odil::registry::ExplicitVRLittleEndian}); this->data_sets = {ds, ds_2}; } }; int main() { // Uncomment to test it locally (need to have orthanc installed) // odil::webservices::URL const root{ // "http", "localhost", "/dicom-web"}; // Uncomment to test it on a remote server (dicomserver.co.uk) odil::webservices::URL const root{ "http", "dicomserver.co.uk", "/stow"}; // Uncomment to test it on a remote server (demo.orthanc-server.com) // odil::webservices::URL const root{ // "http", "demo.orthanc-server.com", "/dicom-web"}; odil::webservices::STOWRSRequest stow_request(root); Data d; //-------------------- Selector creation odil::webservices::Selector selector; selector.set_study("1.3.46.670589.11.38235.5.0.4644.2013061709032540000"); stow_request.request_dicom(d.data_sets, selector, odil::webservices::Representation::DICOM_JSON); auto http_request = stow_request.get_http_request(); // Explicitely use HTTP/1.0 to avoid chunked encoding http_request.set_http_version("HTTP/1.0"); http_request.set_header("Host", root.authority); http_request.set_header("Content-Length", std::to_string(http_request.get_body().size())); http_request.set_header("Transfer-Encoding", "identity"); http_request.set_header("Accept", "application/dicom+xml"); http_request.set_header("Connection", "close"); // Dicomserver.co (seems to not support the XML or JSON format) boost::asio::ip::tcp::iostream stream("dicomserver.co.uk", "81"); // Uncomment to test it locally (need to have orthanc installed) // boost::asio::ip::tcp::iostream stream("localhost", "8042"); // Uncomment the two following lines to test on demo.orthanc-server.com // boost::asio::ip::tcp::iostream stream; // stream.connect(root.authority, root.scheme); if(!stream) { std::cerr << "Error connecting: " #if BOOST_VERSION >= 104700 << stream.error().message() #endif << std::endl; return 1; } for (auto const header: http_request.get_headers()) { std::cout << header.first << " : " << header.second << std::endl; } stream << http_request; if(!stream) { std::cerr << "Error sending: " #if BOOST_VERSION >= 104700 << stream.error().message() #endif << std::endl; return 1; } odil::webservices::HTTPResponse http_response; stream >> http_response; if (!stream) { std::cerr << "Error receiving : " #if BOOST_VERSION >= 104700 << stream.error().message() #endif << std::endl; return 1; } odil::webservices::STOWRSResponse stow_response(http_response); auto const data_set = stow_response.get_store_instance_responses(); Printer printer(std::cout); printer(data_set); return 0; } odil-0.11.0/examples/cpp/wado-rs-client.cpp000066400000000000000000000072511362244656000204710ustar00rootroot00000000000000#include #include #include #include #include #include #include #include #include #include struct Printer { typedef void result_type; std::ostream & stream; std::string indent; Printer(std::ostream & stream, std::string const & indent="") : stream(stream), indent(indent) { // Nothing else } template void operator()(T const & value) const { for(auto const & item: value) { this->stream << item << " "; } } void operator()(odil::Value::DataSets const & value) const { this->stream << "\n"; auto const last_it = --value.end(); for(auto it=value.begin(); it!= value.end(); ++it) { Printer const printer(this->stream, this->indent+" "); printer(*it); if(it != last_it) { this->stream << "----\n"; } } } void operator()(odil::Value::Binary const & value) const { this->stream << this->indent << "(binary)"; } void operator()(std::shared_ptr const & data_set) const { for(auto const & item: *data_set) { this->stream << this->indent << item.first << " " << as_string(item.second.vr) << " "; odil::apply_visitor(*this, item.second.get_value()); this->stream << "\n"; } } }; int main() { odil::webservices::URL const root{ "http", "demo.orthanc-server.com", "/dicom-web"}; odil::webservices::WADORSRequest wado_request(root); wado_request.request_dicom( odil::webservices::Representation::DICOM_XML, std::map( { {"study", "2.16.840.1.113669.632.20.1211.10000357775"}, {"series", "1.3.46.670589.11.0.0.11.4.2.0.8743.5.5396.2006120114314125550"}, {"instance", "1.3.46.670589.11.0.0.11.4.2.0.8743.5.5396.2006120114333648576"} }) ); auto http_request = wado_request.get_http_request(); // Explicitely use HTTP/1.0 to avoid chunked encoding http_request.set_http_version("HTTP/1.0"); http_request.set_header("Host", root.authority); http_request.set_header("Connection", "close"); boost::asio::ip::tcp::iostream stream; stream.connect(root.authority, root.scheme); if(!stream) { std::cerr << "Error connecting: " #if BOOST_VERSION >= 104700 << stream.error().message() #endif << std::endl; return 1; } stream << http_request; if(!stream) { std::cerr << "Error sending: " #if BOOST_VERSION >= 104700 << stream.error().message() #endif << std::endl; return 1; } odil::webservices::HTTPResponse http_response; stream >> http_response; if(!stream) { std::cerr << "Error receiving: " #if BOOST_VERSION >= 104700 << stream.error().message() #endif << std::endl; return 1; } odil::webservices::WADORSResponse const wado_response(http_response); std::cout << "Datasets: " << wado_response.get_data_sets().size() << std::endl; std::cout << "Bulk data: " << wado_response.get_bulk_data().size() << std::endl; std::cout << "Partial content: " << std::boolalpha << wado_response.is_partial() << std::endl; Printer printer(std::cout); for(auto const & data_set: wado_response.get_data_sets()) { printer(data_set); } return 0; } odil-0.11.0/examples/js/000077500000000000000000000000001362244656000147625ustar00rootroot00000000000000odil-0.11.0/examples/js/CMakeLists.txt000066400000000000000000000003451362244656000175240ustar00rootroot00000000000000file(GLOB_RECURSE examples *.js *.html) add_custom_target( JavascriptExamples ${CMAKE_COMMAND} -E echo "Javascript examples" SOURCES ${examples}) set_target_properties(JavascriptExamples PROPERTIES FOLDER "Examples") odil-0.11.0/examples/js/print.html000066400000000000000000000046361362244656000170150ustar00rootroot00000000000000
    odil-0.11.0/examples/js/print.js000066400000000000000000000126471362244656000164660ustar00rootroot00000000000000function renderDataSet(dataSet, parent) { var tags = dataSet.get_tags(); for(var tagIndex=0; tagIndex 1) { listItem.textContent += 's'; } var ol = document.createElement('ol'); listItem.appendChild(ol); var element = dataSet.as_data_set(tag); for(var i=0; i1?'s':'') + ')'); } listItem.textContent += JSON.stringify(array); } else { listItem.textContent += '(unknonw type)'; } } } function putDataSetImage(dataSet, context) { var bytes = dataSet.as_bytes(odil.getTag('PixelData')); var arrayBuffer = new ArrayBuffer(bytes.length); var view = new DataView(arrayBuffer); for(var i=0; i < bytes.length; ++i) { view.setUint8(i, bytes[i]); } var bitsAllocated = dataSet.as_int(odil.getTag('BitsAllocated')).get(0); var isSigned = false; if(dataSet.has(odil.getTag('PixelRepresentation'))) { isSigned = ( dataSet.as_int(odil.getTag('PixelRepresentation')).get(0) === 1); } var getter = 'get'+(isSigned?'Int':'Uint')+bitsAllocated; getter = DataView.prototype[getter].bind(view); var bytesAllocated = bitsAllocated/8; var rows = dataSet.as_int(odil.getTag('Rows')).get(0); var columns = dataSet.as_int(odil.getTag('Columns')).get(0); var imageData = context.getImageData(0, 0, columns, rows); var smallest = getter(0, true); var largest = getter(0, true); for(var i=0; i






    odil-0.11.0/examples/js/qido.js000066400000000000000000000201741362244656000162600ustar00rootroot00000000000000function onRetrieve(event) { var qidoRequest = getQIDORequest(); var xhr = getXMLHttpRequest(qidoRequest); xhr.send(); } function getQIDORequest() { var baseUrl = odil.webservices.URL.parse( document.querySelector('#baseUrl').value); var map = new odil.MapStringString(); var frames = new odil.Integers(); map.set("studies", ""); var selector = odil.webservices.Selector.fromMap(map, frames); var retrieveLevel = document.getElementById("retrieve_level").value; if (retrieveLevel === "series") { var study = document.getElementById("studyInstanceUID").value; selector.set_study(study); selector.set_series(""); } else if (retrieveLevel === "instances") { var study = document.getElementById("studyInstanceUID").value; selector.set_study(study); var series = document.getElementById("seriesInstanceUID").value; selector.set_series(series); selector.set_instance(""); } else // retriveLevel === studies { // do Nothing (let selector unchanged) } var qidoRequest = new odil.webservices.QIDORSRequest(baseUrl); var repr = odil.webservices.Utils.Representation.DICOM_JSON; var patientName = document.getElementById("patientName").value; var studyDescription = document.getElementById("studyDescription").value; var seriesDescription = document.getElementById("seriesDescription").value; var queryElement = {}; if (patientName !== "") { queryElement["00100010"] = {"Value" : [ { "Alphabetic" : ""+patientName+"" }], "vr" : "PN" } ; } if (studyDescription !== "") { queryElement["00081030"] = {"Value" : [ {"Alphabetic" : ""+studyDescription+"" }], "vr" : "LO"}; } if (seriesDescription !== "") { queryElement["0008103e"] = {"Value" : [ ""+seriesDescription+"" ] , "vr" : "LO" }; } var json = JSON.stringify([queryElement]); qidoRequest.request_datasets(repr, selector, json); return qidoRequest; } function getXMLHttpRequest(qidoRequest) { var httpRequest = qidoRequest.get_http_request(); var xhr = new XMLHttpRequest(); xhr.addEventListener('load', function(event) { var xhr = event.target; var headers = new odil.MapStringString(); headers.set( 'Content-Type', event.target.getResponseHeader('Content-Type')); var httpResponse = new odil.webservices.HTTPResponse( 'HTTP/1.1', xhr.status, xhr.statusText, headers, xhr.response); var qidoResponse = new odil.webservices.QIDORSResponse (httpResponse); window.state['dataSets'] = qidoResponse.get_data_sets(); document.querySelector('#Study').innerHTML = ''; updateGui(); }); xhr.addEventListener('error', function(event) { console.log('An error occured in XMLHttpRequest'); console.log(event); }); xhr.open(httpRequest.get_method(), httpRequest.get_target().toString()); // FIXME: no way to iterate over map! xhr.setRequestHeader( 'Accept', httpRequest.get_headers().get('Accept')); xhr.responseType = 'arraybuffer'; return xhr; } function updateGui() { var tag_patientName = new odil.Tag(16, 16); // Study Level tags var tag_studyDescr = new odil.Tag(8, 4144); var tag_studyInstanceUID = new odil.Tag(32,13); var tag_studyDate = new odil.Tag(8, 32); var tag_studyTime = new odil.Tag(8, 48); var tag_numberOfStudyRelatedSeries = new odil.Tag(32, 4614); // Series Level tags var tag_seriesDescr = new odil.Tag(8, 4158); var tag_seriesNumber = new odil.Tag(32, 17); var tag_modality = new odil.Tag(8, 96); var tag_seriesInstanceUID = new odil.Tag(32, 14); var tag_numberOfSeriesRelatedInstances = new odil.Tag(32, 4617); var studyTags = [tag_studyDescr, tag_patientName, tag_studyDate, tag_studyTime, tag_numberOfStudyRelatedSeries]; var seriesTags = [tag_seriesDescr, tag_seriesNumber, tag_modality, tag_numberOfSeriesRelatedInstances]; var ds = window.state['dataSets']; document.querySelector("#info").textContent = "Found "+ds.size()+" dataSet(s)"; for (var i = 0; i < ds.size(); i++) { var studyUID = ds.get(i).as_string(tag_studyInstanceUID).get(0); var study_item = document.getElementById(studyUID); var study_list = document.getElementById("Study"); // SEARCH For Study display var study_info = document.getElementById("Study"+studyUID+"-info"); if (study_item === null) { study_item = document.createElement("li"); study_item.id = studyUID; study_item.appendChild(document.createTextNode("Study " + studyUID)); study_info = document.createElement("ul"); study_info.id = "Study"+studyUID+"-info"; for (var study_tags_idx = 0; study_tags_idx < studyTags.length; study_tags_idx ++) { var currentTag = studyTags[study_tags_idx]; console.log(currentTag.toString()); if (ds.get(i).has(currentTag)) { console.log("here"); if (ds.get(i).is_int(currentTag)) { var elem = ds.get(i).as_int(currentTag).get(0); } else { var elem = ds.get(i).as_string(currentTag).get(0); } var html_li = document.createElement("li"); html_li.appendChild(document.createTextNode(currentTag.get_name() + ": "+ elem)); study_info.appendChild(html_li); } } study_item.appendChild(study_info); study_list.appendChild(study_item); } // SEARCH For Series display var series_list = document.getElementById("Study"+studyUID+"-series"); if (study_item === null) { study_item = document.createElement("li"); study_item.id = studyUID; study_item.appendChild(document.createTextNode("Study " + studyUID)); } if (series_list === null) { series_list = document.createElement("ul"); series_list.id = "Study"+studyUID+"-series"; } if (ds.get(i).has(tag_seriesInstanceUID) && !ds.get(i).empty_tag(tag_seriesInstanceUID)) { var seriesUID = ds.get(i).as_string(tag_seriesInstanceUID).get(0); var series_item = document.getElementById(seriesUID); if (series_item === null) { series_item = document.createElement("li"); series_item.id = seriesUID; series_item.appendChild(document.createTextNode("Series " + seriesUID)); var series_info = document.createElement("ul"); series_info.id = "Series"+seriesUID+"-info"; for (var series_tag_idx = 0; series_tag_idx < seriesTags.length; series_tag_idx ++) { var currentTag = seriesTags[series_tag_idx]; if (ds.get(i).has(currentTag)) { console.log(currentTag.get_name()); if (ds.get(i).is_int(currentTag)) { var elem = ds.get(i).as_int(currentTag).get(0); } else { var elem = ds.get(i).as_string(currentTag).get(0); } var html_li = document.createElement("li"); html_li.appendChild(document.createTextNode(currentTag.get_name() + ": " + elem)); series_info.appendChild(html_li); } else { console.log(currentTag.get_name() +" not present"); } } series_item.appendChild(series_info); series_list.appendChild(series_item); study_item.append(series_list); } } } } odil-0.11.0/examples/js/wado.html000066400000000000000000000054721362244656000166120ustar00rootroot00000000000000





    Result :
    Choosen DataSet:
      odil-0.11.0/examples/js/wado.js000066400000000000000000000153141362244656000162560ustar00rootroot00000000000000function onRetrieve(event) { document.querySelector('#Study').innerHTML = ''; document.querySelector("#elements").innerHTML = ''; document.querySelector("#pixelData").width = 0; document.querySelector("#pixelData").height = 0; document.querySelector("#info").innerHTML = ''; var wadoRequest = getWADORequest(); var xhr = getXMLHttpRequest(wadoRequest); xhr.send(); } function getWADORequest() { var baseUrl = odil.webservices.URL.parse( document.querySelector('#baseUrl').value); var selector = new odil.webservices.Selector(); // Set study var study = document.querySelector('#study').value; if (study !== '') { selector.set_study(study); } // Set series var series = document.querySelector('#series').value; if (series !== '') { selector.set_series(series); } // Set instance var instance = document.querySelector('#instance').value; if (instance !== '') { selector.set_instance(instance); } var wadoRequest = new odil.webservices.WADORSRequest( baseUrl, '', '', false, false); var repr_dcm = document.querySelector('#representation__dicom'); var repr_xml = document.querySelector('#representation__xml'); var repr_json = document.querySelector('#representation__json'); // for the moment only DICOM representation is handled var repr = odil.webservices.Utils.Representation.DICOM; // if(repr_dcm.checked) // { // repr = odil.webservices.Utils.Representation.DICOM; // } // else if (repr_xml.checked) // { // repr = odil.webservices.Utils.Representation.DICOM_XML; // } // else // if (repr_json.checked()) // { // repr = odil.webservices.Utils.Representation.DICOM_JSON; // } wadoRequest.request_dicom( repr, selector); return wadoRequest; } function getXMLHttpRequest(wadoRequest) { var httpRequest = wadoRequest.get_http_request(); var xhr = new XMLHttpRequest(); xhr.addEventListener('load', function(event) { var xhr = event.target; var headers = new odil.MapStringString(); headers.set( 'Content-Type', event.target.getResponseHeader('Content-Type')); var httpResponse = new odil.webservices.HTTPResponse( 'HTTP/1.1', xhr.status, xhr.statusText, headers, xhr.response); var wadoResponse = odil.webservices.WADORSResponse.fromHTTPResponse( httpResponse); window.state['dataSets'] = wadoResponse.get_data_sets(); updateGui(); }); xhr.addEventListener('error', function(event) { console.log('An error occured in XMLHttpRequest'); console.log(event); }); xhr.open(httpRequest.get_method(), httpRequest.get_target().toString()); // FIXME: no way to iterate over map! xhr.setRequestHeader( 'Accept', httpRequest.get_headers().get('Accept')); xhr.responseType = 'arraybuffer'; return xhr; } function updateGui() { var ds = window.state['dataSets']; document.querySelector("#info").textContent = "Found "+ds.size()+" dataSet(s)"; var tag_studyInstanceUID = new odil.Tag(32,13); var tag_seriesInstanceUID = new odil.Tag(32,14); var tag_sopInstanceUID = new odil.Tag(8,24); for (var i = 0; i < ds.size(); i++) { var sopInstanceUID = ds.get(i).as_string(tag_sopInstanceUID).get(0); if (ds.get(i).has(tag_studyInstanceUID) && document.getElementById(sopInstanceUID) === null) { // append to the wanted study // 1 . find li with SeriesUID id var studyUID = ds.get(i).as_string(tag_studyInstanceUID).get(0); var study_item = document.getElementById(studyUID); var series_ul = document.getElementById("Study"+studyUID+"-Series"); var study_list = document.getElementById("Study"); if (study_item === null) { study_item = document.createElement("li"); study_item.id = studyUID; study_item.appendChild(document.createTextNode("Study "+ studyUID)); series_ul = document.createElement("ul"); series_ul.id = "Study"+studyUID+"-Series"; } // append series if (ds.get(i).has(tag_seriesInstanceUID)) { var seriesUID = ds.get(i).as_string(tag_seriesInstanceUID).get(0); var series_item = document.getElementById(seriesUID); var instance_ul = document.getElementById("Series"+seriesUID+"-Instances"); if (series_item === null) { series_item = document.createElement("li"); series_item.id = seriesUID; series_item.appendChild(document.createTextNode("Series "+seriesUID)); instance_ul = document.createElement("ul"); instance_ul.id = "Series"+seriesUID+"-Instances"; } // append Instance var instance_item = document.createElement("li"); instance_item.id = sopInstanceUID; var instance_link = document.createElement("a"); instance_link.innerHTML = "Instance "+sopInstanceUID; instance_link.dataset.id = i; instance_link.href = "#"; instance_link.addEventListener("click",displayDs); instance_item.appendChild(instance_link); instance_ul.appendChild(instance_item); series_item.append(instance_ul); // append Elements in the right order series_ul.appendChild(series_item); study_item.appendChild(series_ul); } else { // add into "Unknow Series" } study_list.appendChild(study_item); } } } function displayDs(event) { document.querySelector("#elements").innerHTML = ''; document.querySelector("#pixelData").width = 0; document.querySelector("#pixelData").height = 0; var idx = event.target.dataset.id; var dataSet = window.state['dataSets'].get(Number(idx)); renderDataSet(dataSet, document.querySelector('#elements')); var pixelDataCanvas = document.querySelector('#pixelData'); if(dataSet.has(odil.getTag('PixelData'))) { var rows = dataSet.as_int(odil.getTag('Rows')).get(0); var columns = dataSet.as_int(odil.getTag('Columns')).get(0); pixelDataCanvas.width = columns; pixelDataCanvas.height = rows; var context = pixelDataCanvas.getContext('2d'); putDataSetImage(dataSet, context); } else { pixelDataCanvas.width = 0; pixelDataCanvas.height = 0; } } odil-0.11.0/examples/python/000077500000000000000000000000001362244656000156675ustar00rootroot00000000000000odil-0.11.0/examples/python/CMakeLists.txt000066400000000000000000000003221362244656000204240ustar00rootroot00000000000000file(GLOB_RECURSE examples *.py) add_custom_target( PythonExamples ${CMAKE_COMMAND} -E echo "Python examples" SOURCES ${examples}) set_target_properties(PythonExamples PROPERTIES FOLDER "Examples") odil-0.11.0/examples/python/convert.py000066400000000000000000000033321362244656000177220ustar00rootroot00000000000000import argparse import sys import odil def main(): parser = argparse.ArgumentParser(description="Convert a DICOM file") parser.add_argument("input") parser.add_argument("output") parser.add_argument("--transfer-syntax", "-t", help="Transfer syntax") parser.add_argument( "--item-length", "-i", choices=["Explicit", "Undefined"], default="Explicit", help="Item length encoding") parser.add_argument( "--use-group-length", "-g", action="store_true", help="Include group length tags") arguments = parser.parse_args() if arguments.transfer_syntax not in dir(odil.registry): parser.error("Unknown transfer syntax") uid = getattr(odil.registry, arguments.transfer_syntax) if uid not in odil.registry.uids_dictionary: parser.error("Unknown transfer syntax") if odil.registry.uids_dictionary[uid].type != "Transfer Syntax": parser.error("Not a transfer syntax") arguments.transfer_syntax = uid arguments.item_length = getattr( odil.Writer.ItemEncoding, "{}Length".format(arguments.item_length)) convert(**arguments.__dict__) def convert(input, output, transfer_syntax, item_length, use_group_length): with odil.open(input) as stream: header, data_set = odil.Reader.read_file(stream) to_remove = [ "FileMetaInformationVersion", "MediaStorageSOPClassUID", "MediaStorageSOPInstanceUID", "TransferSyntaxUID", "ImplementationClassUID", "ImplementationVersionName" ] for name in to_remove: header.remove(getattr(odil.registry, name)) odil.write(data_set, output, header, transfer_syntax, item_length, use_group_length) if __name__ == "__main__": sys.exit(main()) odil-0.11.0/examples/python/dump.py000066400000000000000000000046321362244656000172130ustar00rootroot00000000000000import argparse import sys import odil def main(): parser = argparse.ArgumentParser(description="Print content of DICOM file") parser.add_argument("file") parser.add_argument( "--header", "-H", action="store_true", help="Print header") parser.add_argument( "--decode-uids", "-D", action="store_true", help="Display UID names") arguments = parser.parse_args() with odil.open(arguments.file) as stream: header, data_set = odil.Reader.read_file(stream) if arguments.header: print_data_set(header, arguments.decode_uids) print print_data_set(data_set, arguments.decode_uids) def print_data_set(data_set, decode_uids=False, padding=""): max_length = 0 for tag in data_set.keys(): if tag in odil.registry.public_dictionary: entry = odil.registry.public_dictionary[tag] max_length = max(max_length, len(entry.name)) for tag, element in data_set.items(): name = "{:04x},{:04x}".format(tag.group, tag.element) if tag in odil.registry.public_dictionary: entry = odil.registry.public_dictionary[tag] name = entry.name if element.is_data_set(): value = "" elif element.is_binary(): length = len(element.as_binary()) value = "(binary, {} byte{})".format(length, "s" if length>1 else "") else: getter = None if element.is_int(): getter = element.as_int elif element.is_real(): getter = element.as_real elif element.is_string(): getter = element.as_string value = [x for x in getter()] if decode_uids and element.vr == odil.VR.UI: value = [ odil.registry.uids_dictionary[uid].name if uid in odil.registry.uids_dictionary else uid for uid in value ] print "{}{}{} {:04x},{:04x} {} {}".format( padding, name, (max_length-len(name))*" ", tag.group, tag.element, element.vr, value) if element.is_data_set(): for item in element.as_data_set()[:-1]: print_data_set(item, decode_uids, padding+" ") print print_data_set(element.as_data_set()[-1], padding+" ") if __name__ == "__main__": sys.exit(main()) odil-0.11.0/examples/python/find.py000066400000000000000000000024471362244656000171700ustar00rootroot00000000000000import odil association = odil.Association() association.set_peer_host("184.73.255.26") association.set_peer_port(11112) presentation_contexts = [ odil.AssociationParameters.PresentationContext( 1, odil.registry.StudyRootQueryRetrieveInformationModelFIND, [ odil.registry.ExplicitVRLittleEndian ], True, False ), odil.AssociationParameters.PresentationContext( 3, odil.registry.VerificationSOPClass, [ odil.registry.ExplicitVRLittleEndian ], True, False ) ] association.update_parameters()\ .set_calling_ae_title("myself")\ .set_called_ae_title("AWSPIXELMEDPUB") \ .set_presentation_contexts(presentation_contexts) association.associate() query = odil.DataSet() query.add(odil.registry.PatientName, odil.Value.Strings(["*"])) query.add(odil.registry.QueryRetrieveLevel, odil.Value.Strings(["STUDY"])) query.add(odil.registry.StudyDescription) query.add(odil.registry.StudyDate) find = odil.FindSCU(association) find.set_affected_sop_class(odil.registry.StudyRootQueryRetrieveInformationModelFIND) def callback(data_set): print data_set.as_string(odil.registry.PatientName)[0] find.find(query, callback) data_sets = find.find(query) print len(data_sets), "found" for data_set in data_sets: print data_set.as_string(odil.registry.PatientName)[0] odil-0.11.0/generate_registry000077500000000000000000000127231362244656000162050ustar00rootroot00000000000000#!/usr/bin/env python3 import argparse import os import re import urllib.request import sys import xml.etree.ElementTree import jinja2 def main(): parser = argparse.ArgumentParser("Generate registry files") parser.add_argument( "root", nargs="?", default="http://dicom.nema.org/medical/dicom/current/source/docbook", help="Root URL or path to the Docbook version of the DICOM standard") arguments = parser.parse_args() jinja_environment = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.dirname(__file__)), trim_blocks=True) sources = [ ("part07/part07.xml", "table_E.1-1"), ("part06/part06.xml", "table_7-1"), ("part06/part06.xml", "table_8-1"), ("part06/part06.xml", "table_6-1"), ] elements_dictionary = {} for url, id_ in sources: url = os.path.join(arguments.root, url) entries = parse_elements_dictionaries(url, id_) for group, group_entries in entries.items(): elements_dictionary.setdefault(group, []).extend(group_entries) sources = [ ("part06/part06.xml", "table_A-1"), ] uids = [] for url, id_ in sources: uids.extend(parse_uids(os.path.join(arguments.root, url), id_)) group_templates = { "src/odil/registry_{}.h": jinja_environment.get_template("registry_group.h.tmpl"), "src/odil/registry_{}.cpp": jinja_environment.get_template("registry_group.cpp.tmpl"), } for group, group_items in elements_dictionary.items(): for path, template in group_templates.items(): suffix = "{:04x}".format(group) if group != "misc" else group with open(path.format(suffix), "w") as fd: fd.write(template.render( elements_dictionary=group_items, group=suffix)) main_templates = { "src/odil/registry.h": jinja_environment.get_template("registry.h.tmpl"), "src/odil/registry.cpp": jinja_environment.get_template("registry.cpp.tmpl"), } groups = [ "{:04x}".format(x) if x != "misc" else x for x in elements_dictionary.keys()] for path, template in main_templates.items(): with open(path, "w") as fd: fd.write(template.render(uids=uids, groups=groups)) def parse_elements_dictionaries(url, id_): fd = urllib.request.urlopen(url) document = xml.etree.ElementTree.parse(fd) fd.close() namespaces = { "xml": "http://www.w3.org/XML/1998/namespace", "docbook": "http://docbook.org/ns/docbook" } table = document.find(".//*[@xml:id=\"{}\"]".format(id_), namespaces) entries = {} for row in table.iterfind("./docbook:tbody/docbook:tr", namespaces): entry = row.findall("./docbook:td/docbook:para", namespaces) tag, name, keyword, vr, vm = entry[:5] if tag.getchildren(): tag = tag.find("./docbook:emphasis", namespaces) tag = tag.text converters = [ ( r"\(([0-9a-fA-F]{4}),([0-9a-fA-F]{4})\)", lambda x,y: (int(x, 16), int(y, 16)) ), ( r"\(([0-9a-fA-Fx]{4}),([0-9a-fA-Fx]{4})\)", lambda x,y: str(x+y) ) ] for expression, converter in converters: match = re.match(expression, tag) if match: tag = converter(*match.groups()) break keyword = get_value(keyword, "ascii", namespaces) if not keyword: continue name = get_value(name, "utf-8", namespaces) vr = get_value(vr, "ascii", namespaces) vm = get_value(vm, "ascii", namespaces) if isinstance(tag, tuple): group = tag[0] elif isinstance(tag, str): group = "misc" else: raise NotImplementedError("Unknown tag type: ".format(type(tag))) entries.setdefault(group, []).append((tag, name, keyword, vr, vm)) return entries def parse_uids(url, id_): fd = urllib.request.urlopen(url) document = xml.etree.ElementTree.parse(fd) fd.close() namespaces = { "xml": "http://www.w3.org/XML/1998/namespace", "docbook": "http://docbook.org/ns/docbook" } table = document.find(".//*[@xml:id=\"{}\"]".format(id_), namespaces) keywords_map = { "12leadECGWaveformStorage": "TwelveleadECGWaveformStorage", } entries = [] for row in table.iterfind("./docbook:tbody/docbook:tr", namespaces): entry = row.findall("./docbook:td/docbook:para", namespaces) uid, name, type_ = entry[:3] uid = get_value(uid, "ascii", namespaces) name = get_value(name, "ascii", namespaces) type_ = get_value(type_, "ascii", namespaces) if name == "(Retired)": continue retired = name.endswith(" (Retired)") keyword = name.replace(" (Retired)", "") keyword = re.sub(":.*", "", keyword) keyword = re.sub("\W", " ", keyword).strip().replace(" ", "") if retired: keyword += "_Retired" keyword = keywords_map.get(keyword, keyword) entries.append((uid, name, keyword, type_)) return entries def get_value(element, encoding, namespaces): emphasis = element.find("./docbook:emphasis", namespaces) if emphasis is not None: element = emphasis element = element.text or "" element = element.replace(u"\u200b", "").replace(u"\u00b5", "u") return element if __name__ == "__main__": sys.exit(main()) odil-0.11.0/registry.cpp.tmpl000066400000000000000000000031501362244656000160560ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/registry.h" #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" #include "odil/UIDsDictionary.h" namespace odil { namespace registry { {% for group in groups %} void update_{{ group }}(ElementsDictionary &, std::map &); {% endfor %} void update_uids_dictionary(UIDsDictionary & uids_dictionary) { {% for entry in uids %} uids_dictionary.emplace("{{ entry[0] }}", UIDsDictionaryEntry("{{ entry[1] }}", "{{ entry[2] }}", "{{ entry[3] }}")); {% endfor %} } bool update( odil::ElementsDictionary & public_dictionary, std::map & public_tags, odil::UIDsDictionary & uids_dictionary) { {% for group in groups %} update_{{ group }}(public_dictionary, public_tags); {% endfor %} update_uids_dictionary(uids_dictionary); return true; } } } odil::ElementsDictionary odil::registry::public_dictionary = {}; std::map odil::registry::public_tags = {}; odil::UIDsDictionary odil::registry::uids_dictionary = {}; bool const odil::registry::dummy = odil::registry::update( odil::registry::public_dictionary, odil::registry::public_tags, odil::registry::uids_dictionary); odil-0.11.0/registry.h.tmpl000066400000000000000000000021201362244656000155170ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9 #include #include #include "odil/odil.h" #include "odil/ElementsDictionary.h" #include "odil/Tag.h" #include "odil/UIDsDictionary.h" {% for group in groups %} #include "odil/registry_{{ group }}.h" {% endfor %} namespace odil { namespace registry { {% for entry in uids %} std::string const {{ entry[2] }}("{{ entry[0] }}"); {% endfor %} extern ODIL_API ElementsDictionary public_dictionary; extern ODIL_API std::map public_tags; extern ODIL_API UIDsDictionary uids_dictionary; extern ODIL_API bool const dummy; } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9 odil-0.11.0/registry_group.cpp.tmpl000066400000000000000000000023071362244656000172750ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_{{ group }}( ElementsDictionary & public_dictionary, std::map & public_tags) { {% for entry in elements_dictionary %} public_dictionary.emplace({% if entry[0] is string %}std::string("{{ entry[0] }}"){% else %}Tag({{ "0x%04x, 0x%04x"|format(*entry[0]) }}){% endif %}, ElementsDictionaryEntry("{{ entry[1] }}", "{{ entry[2] }}", "{{ entry[3] }}", "{{ entry[4] }}")); {% endfor %} {% for entry in elements_dictionary %}{% if not entry[0] is string %} public_tags.emplace("{{ entry[2] }}", Tag({{ "0x%04x, 0x%04x"|format(*entry[0]) }})); {% endif %}{% endfor %} } } } odil-0.11.0/registry_group.h.tmpl000066400000000000000000000016711362244656000167450ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_{{ group }} #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_{{ group }} #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { {% for entry in elements_dictionary %} {% if entry[0] is string %} std::string const {{ entry[2] }}("{{ entry[0] }}"); {% elif entry[0] is sequence %} Tag const {{ entry[2] }}({{ "0x%04x, 0x%04x"|format(*entry[0]) }}); {% endif %} {% endfor %} } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_{{ group }} odil-0.11.0/src/000077500000000000000000000000001362244656000133175ustar00rootroot00000000000000odil-0.11.0/src/CMakeLists.txt000066400000000000000000000043541362244656000160650ustar00rootroot00000000000000find_package(Boost REQUIRED COMPONENTS date_time exception filesystem log system) find_package(ICU REQUIRED) find_package(JsonCpp REQUIRED) if(WITH_DCMTK) find_package(DCMTK REQUIRED) endif() file(GLOB_RECURSE Header_Files "*.h") file(GLOB_RECURSE Source_Files "*.cpp") file(GLOB_RECURSE templates "*.txx") list(SORT Header_Files) list(SORT Source_Files) list(SORT templates) if(NOT WITH_DCMTK) set(pattern "${CMAKE_CURRENT_SOURCE_DIR}/odil/dcmtk/[^;]+[;$]") string(REGEX REPLACE ${pattern} "" Header_Files "${Header_Files}") string(REGEX REPLACE ${pattern} "" Source_Files "${Source_Files}") string(REGEX REPLACE ${pattern} "" templates "${templates}") endif() # Regroup files by folder GroupFiles(Header_Files) GroupFiles(Source_Files) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${Boost_INCLUDE_DIRS} ${DCMTK_INCLUDE_DIRS} ${ICU_INCLUDE_DIRS} ${JsonCpp_INCLUDE_DIRS}) add_definitions( ${DCMTK_DEFINITIONS} -D BOOST_ASIO_SEPARATE_COMPILATION -D ODIL_MAJOR_VERSION=${odil_MAJOR_VERSION} ) if(WIN32) add_definitions(-D BOOST_UUID_FORCE_AUTO_LINK) endif() if(BUILD_SHARED_LIBS) add_definitions(-D BOOST_ALL_DYN_LINK) endif() link_directories(${Boost_LIBRARY_DIRS} ${DCMTK_LIBRARY_DIRS}) add_library(libodil ${Source_Files} ${Header_Files} ${templates}) set_target_properties(libodil PROPERTIES OUTPUT_NAME odil) target_link_libraries(libodil ${Boost_LIBRARIES} ${DCMTK_LIBRARIES} ${ICU_LIBRARIES} ${JsonCpp_LIBRARIES}) if(WIN32) add_definitions(-DBUILDING_ODIL) target_link_libraries(libodil netapi32) if(${VCPKG_TOOLCHAIN}) # WARNING Need to link with bcrypt explicitely, # cf. https://github.com/boostorg/uuid/issues/68#issuecomment-430173245 # Not sure why iphlpapi is not linked. target_link_libraries(libodil bcrypt iphlpapi) endif() endif() set_target_properties(libodil PROPERTIES VERSION ${odil_VERSION} SOVERSION ${odil_MAJOR_VERSION}) if(APPLE) set_target_properties( libodil PROPERTIES INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib) endif() install( DIRECTORY odil/ DESTINATION include/odil FILES_MATCHING PATTERN "*.h" PATTERN "*.txx") install( TARGETS libodil ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin) odil-0.11.0/src/odil/000077500000000000000000000000001362244656000142465ustar00rootroot00000000000000odil-0.11.0/src/odil/Association.cpp000066400000000000000000000374421362244656000172400ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "Association.h" #include #include #include #include #include #include "odil/AssociationParameters.h" #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/uid.h" #include "odil/dul/StateMachine.h" #include "odil/message/Message.h" #include "odil/pdu/AAbort.h" #include "odil/pdu/AAssociate.h" #include "odil/pdu/AAssociateRJ.h" #include "odil/pdu/AReleaseRP.h" #include "odil/pdu/AReleaseRQ.h" #include "odil/pdu/ImplementationClassUID.h" #include "odil/pdu/ImplementationVersionName.h" #include "odil/pdu/PDataTF.h" #include "odil/pdu/PresentationContextAC.h" #include "odil/pdu/PresentationContextRQ.h" #include "odil/pdu/RoleSelection.h" #include "odil/pdu/UserIdentityRQ.h" #include "odil/pdu/UserInformation.h" #include "odil/Reader.h" #include "odil/StringStream.h" #include "odil/Writer.h" namespace odil { Association ::Association() : _state_machine(), _peer_host(""), _peer_port(104), _association_parameters(), _transfer_syntaxes_by_abstract_syntax(), _transfer_syntaxes_by_id(), _next_message_id(1) { this->set_tcp_timeout(boost::posix_time::pos_infin); this->set_message_timeout(boost::posix_time::seconds(30)); } Association ::Association(Association const & other) : _state_machine(), _peer_host(other._peer_host), _peer_port(other._peer_port), _association_parameters(other._association_parameters), _transfer_syntaxes_by_abstract_syntax(), _transfer_syntaxes_by_id(), _next_message_id(other._next_message_id) { this->set_tcp_timeout(other.get_tcp_timeout()); this->set_message_timeout(other.get_message_timeout()); } Association ::~Association() { // Nothing to do, everything is taken care of by the StateMachine } dul::Transport & Association ::get_transport() { return this->_state_machine.get_transport(); } Association & Association ::operator=(Association const & other) { if(this != &other) { this->set_peer_host(other.get_peer_host()); this->set_peer_port(other.get_peer_port()); this->set_parameters(other.get_parameters()); } return *this; } std::string const & Association ::get_peer_host() const { return this->_peer_host; } void Association ::set_peer_host(std::string const & host) { if(this->is_associated()) { throw Exception("Cannot set member while associated"); } this->_peer_host = host; } uint16_t Association ::get_peer_port() const { return this->_peer_port; } void Association ::set_peer_port(uint16_t port) { if(this->is_associated()) { throw Exception("Cannot set member while associated"); } this->_peer_port = port; } AssociationParameters const & Association ::get_parameters() const { return this->_association_parameters; } AssociationParameters & Association ::update_parameters() { if(this->is_associated()) { throw Exception("Cannot set member while associated"); } return this->_association_parameters; } void Association ::set_parameters(AssociationParameters const & value) { if(this->is_associated()) { throw Exception("Cannot set member while associated"); } this->_association_parameters = value; } AssociationParameters const & Association ::get_negotiated_parameters() const { return this->_negotiated_parameters; } Association::duration_type Association ::get_tcp_timeout() const { return this->_state_machine.get_transport().get_timeout(); } void Association ::set_tcp_timeout(duration_type const & duration) { this->_state_machine.get_transport().set_timeout(duration); } Association::duration_type Association ::get_message_timeout() const { return this->_state_machine.get_timeout(); } void Association ::set_message_timeout(duration_type const & duration) { this->_state_machine.set_timeout(duration); } bool Association ::is_associated() const { return ( this->_state_machine.get_transport().is_open() && this->_state_machine.get_state() == dul::StateMachine::State::Sta6); } void Association ::associate() { boost::asio::ip::tcp::resolver resolver( this->_state_machine.get_transport().get_service()); boost::asio::ip::tcp::resolver::query const query(this->_peer_host, ""); auto const endpoint_it = resolver.resolve(query); dul::EventData data; data.peer_endpoint = *endpoint_it; data.peer_endpoint.port(this->_peer_port); auto const request = std::make_shared( this->_association_parameters.as_a_associate_rq()); data.pdu = request; this->_state_machine.send_pdu(data); this->_state_machine.receive_pdu(data); if(data.pdu == nullptr) { throw Exception("No response received"); } else { auto const acceptation = std::dynamic_pointer_cast(data.pdu); auto const rejection = std::dynamic_pointer_cast(data.pdu); if(acceptation != nullptr) { this->_negotiated_parameters = AssociationParameters( *acceptation, this->_association_parameters); this->_transfer_syntaxes_by_abstract_syntax.clear(); this->_transfer_syntaxes_by_id.clear(); for(auto const & pc: this->_negotiated_parameters.get_presentation_contexts()) { if(pc.result != AssociationParameters::PresentationContext::Result::Acceptance) { continue; } this->_transfer_syntaxes_by_id[pc.id] = pc.transfer_syntaxes[0]; this->_transfer_syntaxes_by_abstract_syntax[pc.abstract_syntax] = {pc.id, pc.transfer_syntaxes[0]}; } } else if(rejection != nullptr) { throw Exception("Association rejected"); } else { throw Exception("Invalid response"); } } } void Association ::receive_association( boost::asio::ip::tcp const & protocol, unsigned short port, AssociationAcceptor acceptor) { dul::EventData data; data.peer_endpoint = dul::Transport::Socket::endpoint_type(protocol, port); this->_state_machine.set_association_acceptor(acceptor); this->_state_machine.receive(data); this->_state_machine.receive_pdu(data); if(data.pdu == NULL) { // We have rejected the request if(!data.reject) { throw (*data.reject); } else { throw AssociationRejected( Association::RejectedTransient, Association::ULServiceProvderPresentationRelatedFunction, Association::NoReasonGiven, "No reject information"); } } else { auto const & request = std::dynamic_pointer_cast(data.pdu); if(request == nullptr) { throw Exception("Invalid response"); } auto const endpoint = this->_state_machine.get_transport().get_socket()->remote_endpoint(); this->_peer_host = endpoint.address().to_string(); this->_peer_port = endpoint.port(); this->_negotiated_parameters = data.association_parameters; this->_transfer_syntaxes_by_abstract_syntax.clear(); this->_transfer_syntaxes_by_id.clear(); for(auto const & pc: this->_negotiated_parameters.get_presentation_contexts()) { if(pc.result != AssociationParameters::PresentationContext::Result::Acceptance) { continue; } this->_transfer_syntaxes_by_id[pc.id] = pc.transfer_syntaxes[0]; this->_transfer_syntaxes_by_abstract_syntax[pc.abstract_syntax] = {pc.id, pc.transfer_syntaxes[0]}; } data.pdu = std::make_shared( this->_negotiated_parameters.as_a_associate_ac()); this->_state_machine.send_pdu(data); } } void Association ::release() { if(!this->is_associated()) { throw Exception("Not associated"); } auto pdu = std::make_shared(); dul::EventData data; data.pdu = pdu; this->_state_machine.send_pdu(data); this->_state_machine.receive_pdu(data); auto const reply = std::dynamic_pointer_cast(data.pdu); if(reply == nullptr) { // Invalid response, accept it nevertheless. } } void Association ::abort(int source, int reason) { if(!this->is_associated()) { throw Exception("Not associated"); } auto pdu = std::make_shared(source, reason); dul::EventData data; data.pdu = pdu; this->_state_machine.send_pdu(data); } std::shared_ptr Association ::receive_message() { bool done = false; int presentation_context_id; bool command_set_received=false; bool has_data_set=true; bool data_set_received=false; std::shared_ptr command_set; std::string command_buffer; std::string data_buffer; while(!done) { dul::EventData data; data.pdu = nullptr; this->_state_machine.receive_pdu(data); auto const a_release_rq = std::dynamic_pointer_cast(data.pdu); if(a_release_rq != nullptr) { data.pdu = std::make_shared(); this->_state_machine.send_pdu(data); throw AssociationReleased(); } auto const a_abort = std::dynamic_pointer_cast(data.pdu); if(a_abort != nullptr) { throw AssociationAborted(a_abort->get_source(), a_abort->get_reason()); } auto const p_data_tf = std::dynamic_pointer_cast(data.pdu); if(p_data_tf == nullptr) { throw Exception("Invalid PDU received"); } for(auto const & pdv: p_data_tf->get_pdv_items()) { presentation_context_id = pdv.get_presentation_context_id(); // Check if this is the last command or data PDV auto & received = pdv.is_command()?command_set_received:data_set_received; received |= pdv.is_last_fragment(); // Accumulate incoming PDVs in command or data buffer auto & buffer = (pdv.is_command()?command_buffer:data_buffer); buffer.append(pdv.get_fragment()); if(command_set_received && !command_set) { IStringStream istream(&command_buffer[0], command_buffer.size()); Reader reader(istream, registry::ImplicitVRLittleEndian); command_set = reader.read_data_set(); auto const value = command_set->as_int(registry::CommandDataSetType, 0); if(value == message::Message::DataSetType::ABSENT) { has_data_set = false; } } } done = command_set_received && (!has_data_set || data_set_received); } std::shared_ptr data_set; if(has_data_set) { auto const transfer_syntax_it = this->_transfer_syntaxes_by_id.find(presentation_context_id); if(transfer_syntax_it == this->_transfer_syntaxes_by_id.end()) { throw Exception("No such Presentation Context ID"); } IStringStream istream(&data_buffer[0], data_buffer.size()); Reader reader(istream, transfer_syntax_it->second); data_set = reader.read_data_set(); } return std::make_shared(command_set, data_set); } void Association ::send_message( std::shared_ptr message, std::string const & abstract_syntax) { if(!this->is_associated()) { throw Exception("Not associated"); } auto const transfer_syntax_it = this->_transfer_syntaxes_by_abstract_syntax.find(abstract_syntax); if(transfer_syntax_it == this->_transfer_syntaxes_by_abstract_syntax.end()) { throw Exception("No transfer syntax for "+abstract_syntax); } auto const & transfer_syntax = transfer_syntax_it->second.second; auto const & id = transfer_syntax_it->second.first; std::vector pdv_items; std::string command_buffer; OStringStream command_stream(command_buffer); Writer command_writer( command_stream, registry::ImplicitVRLittleEndian, // implicit vr for command Writer::ItemEncoding::ExplicitLength, true); // true for Command command_writer.write_data_set(message->get_command_set()); command_stream.flush(); pdv_items.emplace_back(id, 3, command_buffer); if (message->has_data_set()) { std::string data_buffer; OStringStream data_stream(data_buffer); Writer data_writer( data_stream, transfer_syntax, Writer::ItemEncoding::ExplicitLength, false); data_writer.write_data_set(message->get_data_set()); data_stream.flush(); auto const max_length = this->_negotiated_parameters.get_maximum_length(); auto current_length = command_buffer.size() + 12; // 12 is the size of all that is added on top of the fragment if (!max_length || (current_length + data_buffer.size() + 6 < max_length)) { // Can send all the buffer in one go pdv_items.emplace_back(transfer_syntax_it->second.first, 2, data_buffer); dul::EventData data; data.pdu = std::make_shared(pdv_items); this->_state_machine.send_pdu(data); } else // We have to fragment into multiple PDUs { auto available = max_length - 6 - current_length; // Need at least 6 bytes for the headers int64_t remaining = data_buffer.size(); std::size_t offset = 0; if (available > 0) // Send some data with the command set { remaining -= available; pdv_items.emplace_back(transfer_syntax_it->second.first, (remaining > 0 ? 0 : 2), data_buffer.substr(0, available)); offset += available; } auto pdu = std::make_shared(pdv_items); dul::EventData data; data.pdu = pdu; this->_state_machine.send_pdu(data); available = max_length - 6; // In case some software do not take into account the size of the header when allocating their buffer while (remaining > 0) { remaining -= available; pdv_items.clear(); pdv_items.emplace_back(transfer_syntax_it->second.first, (remaining > 0 ? 0 : 2), data_buffer.substr(offset, available)); offset += available; pdu->set_pdv_items(pdv_items); this->_state_machine.send_pdu(data); } } } else { dul::EventData data; data.pdu = std::make_shared(pdv_items); this->_state_machine.send_pdu(data); } } uint16_t Association ::next_message_id() { return ++this->_next_message_id; } AssociationReleased ::AssociationReleased() : Exception("Association released") { // Nothing else. } AssociationReleased ::~AssociationReleased() noexcept { // Nothing to do. } AssociationAborted ::AssociationAborted(unsigned char source, unsigned char reason) : Exception("Association aborted"), source(source), reason(reason) { // Nothing else. } AssociationAborted ::~AssociationAborted() noexcept { // Nothing to do. } } odil-0.11.0/src/odil/Association.h000066400000000000000000000153641362244656000167040ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _a52696bc_5c6e_402d_a343_6cb085eb0138 #define _a52696bc_5c6e_402d_a343_6cb085eb0138 #include #include #include #include #include #include "odil/AssociationAcceptor.h" #include "odil/AssociationParameters.h" #include "odil/dul/StateMachine.h" #include "odil/message/Message.h" #include "odil/odil.h" namespace odil { /** * @brief Association. */ class ODIL_API Association { public: /// @brief Association result (ITU-T X.227, PS 3.8, 7.1.1.7 and PS 3.8, 9.3.4). enum Result { Accepted=0, RejectedPermanent=1, RejectedTransient=2, }; /// @brief Source of association result (PS 3.8, 7.1.1.8 and PS 3.8, 9.3.4). enum ResultSource { ULServiceUser=1, ULServiceProviderACSERelatedFunction=2, ULServiceProvderPresentationRelatedFunction=3, }; // PS 3.8, 7.1.1.9, and PS 3.8, 9.3.4, and ITU-T X.227 (UL service-user, // UL service-provider ACSE-related function), ITU-T X.226 (UL // service-provider presentation-related function) /// @brief Diagnostic of association result enum Diagnostic { // UL service-user NoReasonGiven=1, ApplicationContextNameNotSupported=2, CallingAETitleNotRecognized=3, CallingAPInvocationIdentifierNotRecognized=4, CallingAEQualifierNotRecognized=5, CallingAEInvocationIdentifierNotRecognized=6, CalledAETitleNotRecognized=7, CalledAPInvocationIdentifierNotRecognized=8, CalledAEQualifierNotRecognized=9, CalledAEInvocationIdentifierNotRecognized=10, // UL service-provider, ACSE-related function NoCommonULVersion=2, // UL service-provider, presentation-related function TemporaryCongestion=1, LocalLimitExceeded=2, CalledPresentationAddressUnknown=3, PresentationProtocolVersionNotSupported=4, NoPresentationServiceAccessPointAvailable=7, }; /// @brief Duration of the timeout. typedef dul::StateMachine::duration_type duration_type; /// @brief Create a default, un-associated, association. Association(); /// @brief Create an un-associated association. Association(Association const & other); /// @brief Destroy the association, release it if necessary. ~Association(); /// @brief Return the TCP transport. dul::Transport & get_transport(); /// @brief Assing an un-associated association; it remains un-associated. Association & operator=(Association const & other); /// @name Peer /// @{ /// @brief Return the host name of the peer. Defaults to "". std::string const & get_peer_host() const; /// @brief Set the host name of the peer. void set_peer_host(std::string const & host); /// @brief Return the port of the peer. Defaults to 104. uint16_t get_peer_port() const; /// @brief Set the port of the peer. void set_peer_port(uint16_t port); /// @} /// @brief Return the association parameters. AssociationParameters const & get_parameters() const; /// @brief Return the association parameters. AssociationParameters & update_parameters(); /// @brief Set the association parameters, throw an exception when associated. void set_parameters(AssociationParameters const & value); /// @brief Return the negotiated association parameters. AssociationParameters const & get_negotiated_parameters() const; /// @name Timeouts /// @{ /// @brief Return the TCP timeout, default to infinity. duration_type get_tcp_timeout() const; /// @brief Set the timeout. void set_tcp_timeout(duration_type const & duration); /// @brief Return the DIMSE timeout, default to 30s. duration_type get_message_timeout() const; /// @brief Set the DIMSE timeout. void set_message_timeout(duration_type const & duration); /// @} /// @name Association /// @{ /// @brief Test whether the object is currently associated to its peer. bool is_associated() const; /// @brief Request an association with the peer. Throws an exception if the endpoint can not be reached. void associate(); /// @brief Receive an association from a peer. void receive_association( boost::asio::ip::tcp const & protocol, unsigned short port, AssociationAcceptor acceptor=default_association_acceptor); /// @brief Reject the received association request. void reject(Result result, ResultSource result_source, Diagnostic diagnostic); /// @brief Gracefully release the association. Throws an exception if not associated. void release(); /// @brief Forcefully release the association. Throws an exception if not associated. void abort(int source, int reason); /// @} /// @name DIMSE messages sending and reception. /// @{ /** * @brief Receive a generic DIMSE message. * * Throw an AssociationReleased or AssociationAborted if the peer released * or aborted the association. */ std::shared_ptr receive_message(); /// @brief Send a DIMSE message. void send_message( std::shared_ptr message, std::string const & abstract_syntax); /// @brief Return the next available message id. uint16_t next_message_id(); /// @} private: dul::StateMachine _state_machine; std::string _peer_host; uint16_t _peer_port; AssociationParameters _association_parameters; AssociationParameters _negotiated_parameters; std::map> _transfer_syntaxes_by_abstract_syntax; std::map _transfer_syntaxes_by_id; uint16_t _next_message_id; }; /** * @brief Exception reported when receiving a message after the association was * released. */ class ODIL_API AssociationReleased: public Exception { public: AssociationReleased(); virtual ~AssociationReleased() noexcept; }; /** * @brief Exception reported when receiving a message after the association was * aborted. */ class ODIL_API AssociationAborted: public Exception { public: /// @brief Source of the error. uint8_t source; /// @brief Reason of the error. uint8_t reason; AssociationAborted(unsigned char source, unsigned char reason); virtual ~AssociationAborted() noexcept; }; } #endif // _a52696bc_5c6e_402d_a343_6cb085eb0138 odil-0.11.0/src/odil/AssociationAcceptor.cpp000066400000000000000000000042311362244656000207070ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/AssociationAcceptor.h" #include #include #include #include "odil/AssociationParameters.h" #include "odil/Exception.h" namespace odil { AssociationParameters default_association_acceptor(AssociationParameters const & input) { AssociationParameters output; output.set_called_ae_title(input.get_called_ae_title()); output.set_calling_ae_title(input.get_calling_ae_title()); std::vector presentation_contexts = input.get_presentation_contexts(); for(auto & presentation_context: presentation_contexts) { presentation_context.transfer_syntaxes = { presentation_context.transfer_syntaxes[0] }; presentation_context.result = AssociationParameters::PresentationContext::Result::Acceptance; } output.set_presentation_contexts(presentation_contexts); output.set_maximum_length(input.get_maximum_length()); return output; } AssociationRejected ::AssociationRejected( unsigned char result, unsigned char source, unsigned char reason, std::string const & message) : Exception(message) { this->set_result(result); this->set_source(source); this->set_reason(reason); } unsigned char AssociationRejected ::get_result() const { return this->_result; } void AssociationRejected ::set_result(unsigned char value) { this->_result = value; } unsigned char AssociationRejected ::get_source() const { return this->_source; } void AssociationRejected ::set_source(unsigned char value) { this->_source = value; } unsigned char AssociationRejected ::get_reason() const { return this->_reason; } void AssociationRejected ::set_reason(unsigned char value) { this->_reason = value; } } odil-0.11.0/src/odil/AssociationAcceptor.h000066400000000000000000000043651362244656000203640ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _b21e4f11_9337_4612_8152_b59dedc16f18 #define _b21e4f11_9337_4612_8152_b59dedc16f18 #include #include #include "odil/AssociationParameters.h" #include "odil/Exception.h" #include "odil/odil.h" namespace odil { /** * @brief Callback to check whether the association request is acceptable. * * The callback shall return the parameters for the acceptation or throw an * AssociationRejected exception if the association is not acceptable. */ typedef std::function AssociationAcceptor; /** * @brief Default association acceptor. * * Reverse the calling and called AE titles, accept the first transfer syntax * and the roles of each presentation context, do not check identity, * keep maximum length. */ ODIL_API AssociationParameters default_association_acceptor(AssociationParameters const & input); /// @brief Exception reported when an incoming association is rejected. struct ODIL_API AssociationRejected: public Exception { public: /// @brief Constructor. AssociationRejected( unsigned char result, unsigned char source, unsigned char reason, std::string const & message="Association rejected"); /// @brief Return the rejection result. unsigned char get_result() const; /// @brief Set the rejection result. void set_result(unsigned char value); /// @brief Return the rejection source. unsigned char get_source() const; /// @brief Set the rejection source. void set_source(unsigned char value); /// @brief Return the rejection reason. unsigned char get_reason() const; /// @brief Set the rejection reason. void set_reason(unsigned char value); private: unsigned char _result; unsigned char _source; unsigned char _reason; }; } #endif // _b21e4f11_9337_4612_8152_b59dedc16f18 odil-0.11.0/src/odil/AssociationParameters.cpp000066400000000000000000000550221362244656000212560ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/AssociationParameters.h" #include #include #include #include #include #include "odil/pdu/AAssociateAC.h" #include "odil/pdu/AAssociateRQ.h" #include "odil/Exception.h" #include "odil/uid.h" #include "odil/pdu/AsynchronousOperationsWindow.h" #include "odil/pdu/ImplementationClassUID.h" #include "odil/pdu/ImplementationVersionName.h" #include "odil/pdu/PresentationContextAC.h" #include "odil/pdu/PresentationContextRQ.h" #include "odil/pdu/RoleSelection.h" #include "odil/pdu/SOPClassExtendedNegotiation.h" #include "odil/pdu/SOPClassCommonExtendedNegotiation.h" #include namespace odil { AssociationParameters::PresentationContext ::PresentationContext( uint8_t id, std::string const & abstract_syntax, std::vector const & transfer_syntaxes, Role role, Result result) : id(id), abstract_syntax(abstract_syntax), transfer_syntaxes(transfer_syntaxes), role(role), result(result) { // Nothing else. } AssociationParameters::PresentationContext ::PresentationContext( std::string const & abstract_syntax, std::vector const & transfer_syntaxes, Role role, Result result) : id(0), abstract_syntax(abstract_syntax), transfer_syntaxes(transfer_syntaxes), role(role), result(result) { // Nothing else. } bool AssociationParameters::PresentationContext ::operator==(PresentationContext const & other) const { return ( this->id == other.id && this->abstract_syntax == other.abstract_syntax && this->transfer_syntaxes == other.transfer_syntaxes && this->role == other.role && this->result == other.result ); } AssociationParameters::UserIdentity ::UserIdentity() : type(UserIdentity::Type::None), primary_field(), secondary_field() { // Nothing else. } AssociationParameters::UserIdentity ::UserIdentity( Type type, std::string const & primary_field, std::string const & secondary_field) : type(type), primary_field(primary_field), secondary_field(secondary_field) { // Nothing else. } bool AssociationParameters::UserIdentity ::operator==(UserIdentity const & other) const { return ( this->type == other.type && ( this->type == Type::None || ( this->type == Type::Username && this->primary_field == other.primary_field ) || ( this->type == Type::UsernameAndPassword && this->primary_field == other.primary_field && this->secondary_field == other.secondary_field ) || ( this->type == Type::Kerberos && this->primary_field == other.primary_field ) || ( this->type == Type::SAML && this->primary_field == other.primary_field ) ) ); } AssociationParameters ::AssociationParameters() : _called_ae_title(""), _calling_ae_title(""), _presentation_contexts(), _user_identity({UserIdentity::Type::None, "", ""}), _maximum_length(16384), _maximum_number_operations_invoked(1), _maximum_number_operations_performed(1), _sop_class_extended_negotiation(), _sop_class_common_extended_negotiation() { // Nothing else. } AssociationParameters ::AssociationParameters(pdu::AAssociateRQ const & pdu) : _called_ae_title(""), _calling_ae_title(""), _presentation_contexts(), _user_identity({UserIdentity::Type::None, "", ""}), _maximum_length(16384), _maximum_number_operations_invoked(1), _maximum_number_operations_performed(1), _sop_class_extended_negotiation(), _sop_class_common_extended_negotiation() { this->set_called_ae_title(pdu.get_called_ae_title()); this->set_calling_ae_title(pdu.get_calling_ae_title()); auto const user_information = pdu.get_user_information(); // Presentation contexts auto const & pcs_pdu = pdu.get_presentation_contexts(); std::map roles_map; auto const role_items = user_information.get_sub_items(); for(auto const & role_item: role_items) { auto role = PresentationContext::Role::None; if(role_item.get_scu_role_support() && role_item.get_scp_role_support()) { role = PresentationContext::Role::Both; } else if(role_item.get_scu_role_support()) { role = PresentationContext::Role::SCU; } else if(role_item.get_scp_role_support()) { role = PresentationContext::Role::SCP; } roles_map[role_item.get_sop_class_uid()] = role; } std::vector pcs_parameters; pcs_parameters.reserve(pcs_pdu.size()); for(auto const & pc_pdu: pcs_pdu) { auto const it = roles_map.find(pc_pdu.get_abstract_syntax()); pcs_parameters.emplace_back( pc_pdu.get_id(), pc_pdu.get_abstract_syntax(), pc_pdu.get_transfer_syntaxes(), (it!=roles_map.end())?it->second:PresentationContext::Role::Unspecified); } this->set_presentation_contexts(pcs_parameters); // User identity auto const user_identity = user_information.get_sub_items(); if(!user_identity.empty()) { if(user_identity[0].get_type() == 1) { this->set_user_identity_to_username( user_identity[0].get_primary_field()); } else if(user_identity[0].get_type() == 2) { this->set_user_identity_to_username_and_password( user_identity[0].get_primary_field(), user_identity[0].get_secondary_field()); } else if(user_identity[0].get_type() == 3) { this->set_user_identity_to_kerberos( user_identity[0].get_primary_field()); } else if(user_identity[0].get_type() == 4) { this->set_user_identity_to_saml( user_identity[0].get_primary_field()); } } // Maximum length auto const maximum_length = user_information.get_sub_items(); if(!maximum_length.empty()) { this->set_maximum_length(maximum_length[0].get_maximum_length()); } // Maximum number of operations performed/invoked auto const asynchronous_operations_window = user_information.get_sub_items(); if(!asynchronous_operations_window.empty()) { this->_maximum_number_operations_invoked = asynchronous_operations_window[0].get_maximum_number_operations_invoked(); this->_maximum_number_operations_performed = asynchronous_operations_window[0].get_maximum_number_operations_performed(); } this->_sop_class_common_extended_negotiation = user_information.get_sub_items(); } AssociationParameters ::AssociationParameters( pdu::AAssociateAC const & pdu, AssociationParameters const & request) : _called_ae_title(""), _calling_ae_title(""), _presentation_contexts(), _user_identity({UserIdentity::Type::None, "", ""}), _maximum_length(16384), _maximum_number_operations_invoked(1), _maximum_number_operations_performed(1), _sop_class_extended_negotiation(), _sop_class_common_extended_negotiation() { // Calling and Called AE titles are not meaningful in A-ASSOCIATE-AC this->set_called_ae_title(request.get_called_ae_title()); this->set_calling_ae_title(request.get_calling_ae_title()); auto const user_information = pdu.get_user_information(); // Presentation contexts auto const & pcs_request = request.get_presentation_contexts(); std::map pcs_request_map; for(auto const & pc: pcs_request) { pcs_request_map.insert({pc.id, pc}); } auto const & pcs_pdu = pdu.get_presentation_contexts(); std::map roles_map; auto const role_items = user_information.get_sub_items(); for(auto const & role_item: role_items) { auto role = PresentationContext::Role::None; if(role_item.get_scu_role_support() && role_item.get_scp_role_support()) { role = PresentationContext::Role::Both; } else if(role_item.get_scu_role_support()) { role = PresentationContext::Role::SCU; } else if(role_item.get_scp_role_support()) { role = PresentationContext::Role::SCP; } roles_map[role_item.get_sop_class_uid()] = role; } std::vector pcs_parameters; pcs_parameters.reserve(pcs_pdu.size()); for(auto const & pc_pdu: pcs_pdu) { auto const & pc_request = pcs_request_map.at(pc_pdu.get_id()); auto const it = roles_map.find(pc_request.abstract_syntax); pcs_parameters.emplace_back( pc_pdu.get_id(), pc_request.abstract_syntax, std::vector{ pc_pdu.get_transfer_syntax() }, (it!=roles_map.end())?it->second:PresentationContext::Role::Unspecified, static_cast(pc_pdu.get_result_reason())); } this->set_presentation_contexts(pcs_parameters); // User identity auto const user_identity = user_information.get_sub_items(); if(!user_identity.empty()) { auto const type = request.get_user_identity().type; if(type == UserIdentity::Type::Kerberos) { this->set_user_identity_to_kerberos( user_identity[0].get_server_response()); } else if(type == UserIdentity::Type::SAML) { this->set_user_identity_to_saml( user_identity[0].get_server_response()); } } // Maximum length auto const maximum_length = user_information.get_sub_items(); if(!maximum_length.empty()) { this->set_maximum_length(maximum_length[0].get_maximum_length()); } // Maximum number of operations performed/invoked auto const asynchronous_operations_window = user_information.get_sub_items(); if(!asynchronous_operations_window.empty()) { this->_maximum_number_operations_invoked = asynchronous_operations_window[0].get_maximum_number_operations_invoked(); this->_maximum_number_operations_performed = asynchronous_operations_window[0].get_maximum_number_operations_performed(); } // No SOPClassCommonExtendedNegotiation in AC } std::string const & AssociationParameters ::get_called_ae_title() const { return this->_called_ae_title; } AssociationParameters & AssociationParameters ::set_called_ae_title(std::string const & value) { if(value.size() > 16) { throw Exception("AE Title must be less than 16 characters"); } this->_called_ae_title = value; return *this; } std::string const & AssociationParameters ::get_calling_ae_title() const { return this->_calling_ae_title; } AssociationParameters & AssociationParameters ::set_calling_ae_title(std::string const & value) { if(value.size() > 16) { throw Exception("AE Title must be less than 16 characters"); } this->_calling_ae_title = value; return *this; } std::vector const & AssociationParameters ::get_presentation_contexts() const { return this->_presentation_contexts; } AssociationParameters & AssociationParameters ::set_presentation_contexts(std::vector const & value) { std::vector contexts; contexts.reserve(value.size()); std::vector id_needed_indices; std::set ids; for(unsigned int i=0; i_presentation_contexts = std::move(contexts); return *this; } AssociationParameters::UserIdentity const & AssociationParameters ::get_user_identity() const { return this->_user_identity; } AssociationParameters & AssociationParameters ::set_user_identity_to_none() { return this->_set_user_identity({UserIdentity::Type::None, "", ""}); } AssociationParameters & AssociationParameters ::set_user_identity_to_username(std::string const & username) { return this->_set_user_identity( {UserIdentity::Type::Username, username, ""}); } AssociationParameters & AssociationParameters ::set_user_identity_to_username_and_password( std::string const & username, std::string const & password) { return this->_set_user_identity( {UserIdentity::Type::UsernameAndPassword, username, password}); } AssociationParameters & AssociationParameters ::set_user_identity_to_kerberos(std::string const & ticket) { return this->_set_user_identity({UserIdentity::Type::Kerberos, ticket, ""}); } AssociationParameters & AssociationParameters ::set_user_identity_to_saml(std::string const & assertion) { return this->_set_user_identity({UserIdentity::Type::SAML, assertion, ""}); } uint32_t AssociationParameters ::get_maximum_length() const { return this->_maximum_length; } AssociationParameters & AssociationParameters ::set_maximum_length(uint32_t value) { this->_maximum_length = value; return *this; } uint16_t AssociationParameters ::get_maximum_number_operations_invoked() const { return this->_maximum_number_operations_invoked; } AssociationParameters & AssociationParameters ::set_maximum_number_operations_invoked(uint16_t value) { this->_maximum_number_operations_invoked = value; return *this; } uint16_t AssociationParameters ::get_maximum_number_operations_performed() const { return this->_maximum_number_operations_performed; } AssociationParameters & AssociationParameters ::set_maximum_number_operations_performed(uint16_t value) { this->_maximum_number_operations_performed = value; return *this; } std::vector AssociationParameters ::get_sop_class_extended_negotiation() const { return this->_sop_class_extended_negotiation; } void AssociationParameters ::set_sop_class_extended_negotiation( std::vector const & value) { this->_sop_class_extended_negotiation = value; } std::vector AssociationParameters ::get_sop_class_common_extended_negotiation() const { return this->_sop_class_common_extended_negotiation; } void AssociationParameters ::set_sop_class_common_extended_negotiation( std::vector const & value) { this->_sop_class_common_extended_negotiation = value; } pdu::AAssociateRQ AssociationParameters ::as_a_associate_rq() const { pdu::AAssociateRQ pdu; pdu.set_protocol_version(1); pdu.set_application_context(std::string("1.2.840.10008.3.1.1.1")); pdu.set_called_ae_title(this->get_called_ae_title()); pdu.set_calling_ae_title(this->get_calling_ae_title()); // Presentation contexts { auto const & source = this->get_presentation_contexts(); std::vector destination; destination.reserve(source.size()); for(auto const & source_pc: source) { pdu::PresentationContextRQ const pc( source_pc.id, source_pc.abstract_syntax, source_pc.transfer_syntaxes); destination.push_back(pc); } pdu.set_presentation_contexts(destination); } pdu::UserInformation user_information; user_information.set_sub_items( {this->get_maximum_length()}); user_information.set_sub_items( {implementation_class_uid}); if(this->_maximum_number_operations_invoked != 1 || this->_maximum_number_operations_performed != 1) { user_information.set_sub_items({{ this->_maximum_number_operations_invoked, this->_maximum_number_operations_performed }}); } user_information.set_sub_items( this->_sop_class_extended_negotiation); user_information.set_sub_items( this->_sop_class_common_extended_negotiation); user_information.set_sub_items( {implementation_version_name}); std::vector roles; for(auto const & presentation_context: this->get_presentation_contexts()) { if(presentation_context.role == PresentationContext::Role::Unspecified) { continue; } pdu::RoleSelection const role( presentation_context.abstract_syntax, presentation_context.role == PresentationContext::Role::SCU || presentation_context.role == PresentationContext::Role::Both, presentation_context.role == PresentationContext::Role::SCP || presentation_context.role == PresentationContext::Role::Both); roles.push_back(role); } user_information.set_sub_items(roles); auto const & user_identity = this->get_user_identity(); if(user_identity.type != AssociationParameters::UserIdentity::Type::None) { pdu::UserIdentityRQ sub_item; sub_item.set_type(static_cast(user_identity.type)); sub_item.set_primary_field(user_identity.primary_field); sub_item.set_secondary_field(user_identity.secondary_field); // TODO sub_item.set_positive_response_requested(true); user_information.set_sub_items({sub_item}); } pdu.set_user_information(user_information); return pdu; } pdu::AAssociateAC AssociationParameters ::as_a_associate_ac() const { pdu::AAssociateAC pdu; pdu.set_protocol_version(1); pdu.set_application_context(std::string("1.2.840.10008.3.1.1.1")); pdu.set_called_ae_title(this->get_called_ae_title()); pdu.set_calling_ae_title(this->get_calling_ae_title()); // Presentation contexts { auto const & source = this->get_presentation_contexts(); std::vector destination; destination.reserve(source.size()); for(auto const & source_pc: source) { pdu::PresentationContextAC const pc( source_pc.id, source_pc.transfer_syntaxes[0], static_cast(source_pc.result)); destination.push_back(pc); } pdu.set_presentation_contexts(destination); } pdu::UserInformation user_information; user_information.set_sub_items( {this->get_maximum_length()}); user_information.set_sub_items( {implementation_class_uid}); if(this->_maximum_number_operations_invoked != 1 || this->_maximum_number_operations_performed != 1) { user_information.set_sub_items({{ this->_maximum_number_operations_invoked, this->_maximum_number_operations_performed }}); } user_information.set_sub_items( this->_sop_class_extended_negotiation); // No SOPClassCommonExtendedNegotiation in AC user_information.set_sub_items( {implementation_version_name}); std::vector roles; for(auto const & presentation_context: this->get_presentation_contexts()) { if(presentation_context.role == PresentationContext::Role::Unspecified) { continue; } pdu::RoleSelection const role( presentation_context.abstract_syntax, presentation_context.role == PresentationContext::Role::SCU || presentation_context.role == PresentationContext::Role::Both, presentation_context.role == PresentationContext::Role::SCP || presentation_context.role == PresentationContext::Role::Both); roles.push_back(role); } user_information.set_sub_items(roles); pdu.set_user_information(user_information); return pdu; } bool AssociationParameters ::operator==(AssociationParameters const & other) const { return ( this->get_called_ae_title() == other.get_called_ae_title() && this->get_calling_ae_title() == other.get_calling_ae_title() && this->get_presentation_contexts() == other.get_presentation_contexts() && this->get_user_identity() == other.get_user_identity() && this->get_maximum_length() == other.get_maximum_length() && this->get_maximum_number_operations_invoked() == other.get_maximum_number_operations_invoked() && this->get_maximum_number_operations_performed() == other.get_maximum_number_operations_performed() && this->get_sop_class_extended_negotiation() == other.get_sop_class_extended_negotiation() && this->get_sop_class_common_extended_negotiation() == other.get_sop_class_common_extended_negotiation() ); } AssociationParameters & AssociationParameters ::_set_user_identity(UserIdentity const & value) { this->_user_identity = value; return *this; } } odil-0.11.0/src/odil/AssociationParameters.h000066400000000000000000000205021362244656000207160ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _061fafd4_982e_4a7e_9eb0_29e06443ebf3 #define _061fafd4_982e_4a7e_9eb0_29e06443ebf3 #include #include #include #include "odil/odil.h" #include "odil/pdu/AAssociateAC.h" #include "odil/pdu/AAssociateRQ.h" #include "odil/pdu/SOPClassCommonExtendedNegotiation.h" #include "odil/pdu/SOPClassExtendedNegotiation.h" namespace odil { /// @brief Encapsulate association parameters class ODIL_API AssociationParameters { public: /** * @brief Presentation Context, cf. PS 3.8, 9.3.2.2, PS 3.8, 9.3.3.2, * PS 3.7, D.3.3.4.1 and PS 3.7 D.3.3.4.2. */ struct ODIL_API PresentationContext { /// @brief Result of the presentation context negotiation. enum class Result { Acceptance = 0, UserRejection = 1, NoReason = 2, AbstractSyntaxNotSupported = 3, TransferSyntaxesNotSupported = 4, }; enum class Role { Unspecified, // No information specified in a query None, // No role accepted in a response SCU, SCP, Both, }; /// @brief Constructor. PresentationContext( uint8_t id, std::string const & abstract_syntax, std::vector const & transfer_syntaxes, Role role, Result result=Result::NoReason); /// @brief Simplified constructor, sets the id to the invalid value 0. PresentationContext( std::string const & abstract_syntax, std::vector const & transfer_syntaxes, Role role, Result result=Result::NoReason); /// @brief Identifier of the presentation context, must be odd. uint8_t id; /// @brief Proposed abstract syntax. std::string abstract_syntax; /// @brief Proposed transfer syntaxes or accepted transfer syntax. std::vector transfer_syntaxes; /// @brief SCU/SCP role negotiation Role role; /// @brief Result of the negotiation. Result result; /// @brief Member-wise equality. bool operator==(PresentationContext const & other) const; }; /// @brief User Identity, cf. PS3.8 D.3.3.7 struct ODIL_API UserIdentity { /// @brief User identity type. enum class Type { None = 0, Username = 1, UsernameAndPassword = 2, Kerberos = 3, SAML = 4 }; UserIdentity(); UserIdentity( Type type, std::string const & primary_field, std::string const & secondary_field); /// @brief Identity type. Type type; /// @brief Primary identity field. std::string primary_field; /// @brief Secondary identity field. std::string secondary_field; /// @brief Member-wise equality. bool operator==(UserIdentity const & other) const; }; /// @brief Constructor. AssociationParameters(); /// @brief Constructor from an A-ASSOCIATE-RQ PDU. AssociationParameters(pdu::AAssociateRQ const & pdu); /// @brief Constructor from an A-ASSOCIATE-RQ PDU. AssociationParameters( pdu::AAssociateAC const & pdu, AssociationParameters const & request); /// @brief Return the called AE title, default to empty. std::string const & get_called_ae_title() const; /** * @brief Set the called AE title. * * An exception is raised if the value is empty or if it is longer than * 16 characters. */ AssociationParameters & set_called_ae_title(std::string const & value); /// @brief Return the calling AE title, default to empty. std::string const & get_calling_ae_title() const; /** * @brief Set the calling AE title. * * An exception is raised if the value is empty or if it is longer than * 16 characters. */ AssociationParameters & set_calling_ae_title(std::string const & value); /// @brief Return the presentation contexts, default to empty. std::vector const & get_presentation_contexts() const; /// @brief Set the presentation contexts. All ids must be odd and unique. AssociationParameters & set_presentation_contexts(std::vector const & value); /// @brief Return the user identity, default to None. UserIdentity const & get_user_identity() const; /// @brief Do no authenticate user. AssociationParameters & set_user_identity_to_none(); /// @brief Authenticate user using only a username. AssociationParameters & set_user_identity_to_username(std::string const & username); /// @brief Authenticate user using a username and a password. AssociationParameters & set_user_identity_to_username_and_password( std::string const & username, std::string const & password); /// @brief Authenticate user using a Kerberos ticket. AssociationParameters & set_user_identity_to_kerberos(std::string const & ticket); /// @brief Authenticate user using a SAML assertion. AssociationParameters & set_user_identity_to_saml(std::string const & assertion); /// @brief Return the maximum length of a PDU, default to 16384. uint32_t get_maximum_length() const; /** * @brief Set the maximum length of a PDU, the value 0 meaning * no maximum length. */ AssociationParameters & set_maximum_length(uint32_t value); /// @brief Return the maximum number of outstanding operations invoked uint16_t get_maximum_number_operations_invoked() const; /** * @brief Set the maximum number of outstanding operations invoked, * default to 1. */ AssociationParameters & set_maximum_number_operations_invoked(uint16_t value); /// @brief Return the maximum number of outstanding operations performed uint16_t get_maximum_number_operations_performed() const; /** * @brief Set the maximum number of outstanding operations performed, * default to 1. */ AssociationParameters & set_maximum_number_operations_performed(uint16_t value); /// @brief Return the list of SOP Class Extended Negotiation items. std::vector get_sop_class_extended_negotiation() const; /** * @brief Set the list of SOP Class Extended Negotiation items, default * to an empty list. */ void set_sop_class_extended_negotiation( std::vector const & value); /// @brief Return the list of SOP Class Extended Negotiation items. std::vector get_sop_class_common_extended_negotiation() const; /** * @brief Set the list of SOP Class Common Extend Negotiation items, default * to an empty list. */ void set_sop_class_common_extended_negotiation( std::vector const & value); /// @brief Create an A-ASSOCIATE-RQ PDU. pdu::AAssociateRQ as_a_associate_rq() const; /// @brief Create an A-ASSOCIATE-AC PDU. pdu::AAssociateAC as_a_associate_ac() const; /// @brief Member-wise equality. bool operator==(AssociationParameters const & other) const; private: std::string _called_ae_title; std::string _calling_ae_title; std::vector _presentation_contexts; UserIdentity _user_identity; uint32_t _maximum_length; uint16_t _maximum_number_operations_invoked; uint16_t _maximum_number_operations_performed; std::vector _sop_class_extended_negotiation; std::vector _sop_class_common_extended_negotiation; /// @brief Set the user identity. AssociationParameters & _set_user_identity(UserIdentity const & value); }; } #endif // _061fafd4_982e_4a7e_9eb0_29e06443ebf3 odil-0.11.0/src/odil/BasicDirectoryCreator.cpp000066400000000000000000000362221362244656000212050ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/BasicDirectoryCreator.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/Reader.h" #include "odil/registry.h" #include "odil/Tag.h" #include "odil/uid.h" namespace odil { std::map> const BasicDirectoryCreator ::default_record_keys = { { "PATIENT", { { registry::PatientName, 2}, { registry::PatientID, 1 } } }, { "STUDY", { { registry::StudyDate, 1 }, { registry::StudyTime, 1 }, { registry::StudyDescription, 2 }, { registry::StudyInstanceUID, 1 }, // only if (0004,1511) is absent (see Note) { registry::StudyID, 1 }, { registry::AccessionNumber, 2 } } }, { "SERIES", { { registry::Modality, 1 }, { registry::SeriesInstanceUID, 1 }, { registry::SeriesNumber, 1 }, //registry::IconImageSequence } }, { "IMAGE", { { registry::InstanceNumber, 1 }, //registry::IconImageSequence } }, }; BasicDirectoryCreator ::BasicDirectoryCreator( std::string const & root, std::vector const & files, RecordKeyMap const & extra_record_keys, Writer::ItemEncoding item_encoding) : root(root), files(files), extra_record_keys(extra_record_keys), item_encoding(item_encoding) { // Nothing else. } void BasicDirectoryCreator ::operator()() const { auto const record_tree = this->_create_records(); auto linearized_tree = this->_linearize_records(record_tree); auto const relative_offsets = this->_get_relative_offsets( linearized_tree.records); this->_write(linearized_tree, relative_offsets); } BasicDirectoryCreator::RecordMap BasicDirectoryCreator ::_create_records() const { RecordMap patients; for(auto const & file: files) { auto const absolute_path = boost::filesystem::path(this->root)/file; if(!boost::filesystem::is_regular_file(absolute_path)) { throw Exception("No such file: "+absolute_path.string()); } boost::filesystem::ifstream stream( absolute_path, std::ifstream::in | std::ifstream::binary); auto const meta_info_and_data_set = Reader::read_file(stream); auto const & data_set = meta_info_and_data_set.second; auto const & patient_id = data_set->as_string( registry::PatientID)[0]; auto & patient = this->_find_record(patients, patient_id); if(patient.data_set->empty()) { this->_fill_record(data_set, patient, "PATIENT"); } auto const & study_instance_uid = data_set->as_string( registry::StudyInstanceUID)[0]; auto & study = this->_find_record(patient.children, study_instance_uid); if(study.data_set->empty()) { this->_fill_record(data_set, study, "STUDY"); } auto const & series_instance_uid = data_set->as_string( registry::SeriesInstanceUID)[0]; auto & series = this->_find_record(study.children, series_instance_uid); if(series.data_set->empty()) { this->_fill_record(data_set, series, "SERIES"); } auto const & sop_instance_uid = data_set->as_string( registry::SOPInstanceUID)[0]; auto & image = this->_find_record(series.children, sop_instance_uid); if(image.data_set->empty()) { this->_fill_record(data_set, image, "IMAGE"); Value::Strings file_id; int begin = 0; while(begin != std::string::npos) { auto const end = file.find('/', begin); auto const size = (end==std::string::npos)?std::string::npos:(end-begin); std::string const item = file.substr(begin, size); file_id.push_back(item); if(end == std::string::npos) { begin = end; } else { begin = end+1; } } // Required if the Directory Record references a SOP Instance (PS3.3 F.3.2.2) image.data_set->add(registry::ReferencedFileID, file_id); image.data_set->add( registry::ReferencedSOPClassUIDInFile, (*data_set)[registry::SOPClassUID]); image.data_set->add( registry::ReferencedSOPInstanceUIDInFile, (*data_set)[registry::SOPInstanceUID]); auto const & meta_info = meta_info_and_data_set.first; image.data_set->add( registry::ReferencedTransferSyntaxUIDInFile, (*meta_info)[registry::TransferSyntaxUID]); } } return patients; } BasicDirectoryCreator::Record & BasicDirectoryCreator ::_find_record(RecordMap & records, std::string const & key) const { auto iterator = records.find(key); if(iterator == records.end()) { iterator = records.insert({key, std::make_shared()}).first; } return *(iterator->second); } void BasicDirectoryCreator ::_fill_record( std::shared_ptr data_set, Record & record, std::string const & type) const { record.data_set->add(registry::DirectoryRecordType, {type}); record.data_set->add(registry::OffsetOfTheNextDirectoryRecord, {0}); record.data_set->add(registry::RecordInUseFlag, {0xffff}); record.data_set->add( registry::OffsetOfReferencedLowerLevelDirectoryEntity, {0}); this->_update_record(data_set, record, this->default_record_keys.at(type)); auto const extra_record_keys_it = this->extra_record_keys.find(type); if(extra_record_keys_it != this->extra_record_keys.end()) { this->_update_record(data_set, record, extra_record_keys_it->second); } } void BasicDirectoryCreator ::_update_record( std::shared_ptr data_set, Record & record, std::vector const & keys) const { for(auto const & key: keys) { auto const & tag = key.first; auto const & type = key.second; if(data_set->has(tag)) { record.data_set->add(tag, (*data_set)[tag]); } else { if(type == 1) { throw Exception("Type 1 tag missing from data set: "+std::string(tag)); } else if(type == 2) { record.data_set->add(tag); } // Otherwise do nothing. } } // TODO: registry::RecordInUseFlag; } BasicDirectoryCreator::LinearizedTree BasicDirectoryCreator ::_linearize_records(RecordMap const & record_tree) const { LinearizedTree linearized_tree; // Create a depth-first list of records and a sibling map. // Prime the stack and sibling map with all top-level records. std::stack stack; std::map location_map; std::map sibling_map; for(auto it=record_tree.begin(); it!=record_tree.end(); ++it) { stack.push(it->second); auto const sibling_it = std::next(it); if(sibling_it != record_tree.end()) { auto const & sibling = sibling_it->second; sibling_map[it->second.get()] = sibling.get(); } } // Create a depth-first list of records and a sibling map. while(!stack.empty()) { auto const & record = stack.top(); stack.pop(); linearized_tree.records.push_back(record); location_map[record.get()] = linearized_tree.records.size()-1; auto const & children = record->children; for(auto child_it=children.begin(); child_it!=children.end(); ++child_it) { auto const & child_record = child_it->second; auto const sibling_it = std::next(child_it); if(sibling_it != children.end()) { auto const & sibling = sibling_it->second; sibling_map[child_record.get()] = sibling.get(); } } // Use reverse iterators to keep the relative order of children during // the depth-first search. std::for_each( children.rbegin(), children.rend(), [&] (RecordMap::value_type const & child) { stack.push(child.second); }); } // Update the topological information. linearized_tree.child.resize(location_map.size()); std::fill(linearized_tree.child.begin(), linearized_tree.child.end(), -1); linearized_tree.sibling.resize(location_map.size()); std::fill(linearized_tree.sibling.begin(), linearized_tree.sibling.end(), -1); for(auto const & location_it: location_map) { auto const & record = location_it.first; auto const & location = location_it.second; if(!record->children.empty()) { linearized_tree.child[location] = location_map.at(record->children.begin()->second.get()); } else { linearized_tree.child[location] = -1; } auto const sibling_it = sibling_map.find(record); if(sibling_it != sibling_map.end()) { linearized_tree.sibling[location] = location_map.at(sibling_it->second); } else { linearized_tree.sibling[location] = -1; } } return linearized_tree; } std::vector BasicDirectoryCreator ::_get_relative_offsets(std::vector const & records) const { // Create an in-memory stream to compute the position of the start of the // records std::ostringstream stream; // PS3.10, 8.6: The DICOMDIR File shall use the Explicit VR Little Endian // Transfer Syntax Writer const writer( stream, registry::ExplicitVRLittleEndian, this->item_encoding); std::vector relative_offsets; std::streampos offset = 0; for(auto const & record: records) { relative_offsets.push_back(stream.tellp()+offset); // Item tag: 4 bytes // Item length: 4 bytes offset += 8; writer.write_data_set(record->data_set); if(this->item_encoding == Writer::ItemEncoding::UndefinedLength) { // Item Delimitation Item tag: 4 bytes // Item Delimitation Item length: 4 bytes offset += 8; } } return relative_offsets; } void BasicDirectoryCreator ::_write( LinearizedTree const & linearized_tree, std::vector const & relative_offsets) const { auto meta_information = std::make_shared(); meta_information->add( registry::FileMetaInformationVersion, Value::Binary({{0x00, 0x01}})); meta_information->add( registry::MediaStorageSOPClassUID, { registry::MediaStorageDirectoryStorage }); meta_information->add( registry::MediaStorageSOPInstanceUID, { generate_uid() }); meta_information->add( registry::TransferSyntaxUID, { registry::ExplicitVRLittleEndian }); meta_information->add( registry::ImplementationClassUID, { implementation_class_uid }); meta_information->add( registry::ImplementationVersionName, { implementation_version_name }); auto basic_directory = std::make_shared(); // File-Set Identification Module (PS3.3 F.3.2.1) basic_directory->add(registry::FileSetID, { "" }); // Don't include user comments yet. // registry::FileSetDescriptorFileID; // registry::SpecificCharacterSetOfFileSetDescriptorFile; // Directory Information Module (PS3.3 F.3.2.2) basic_directory->add( registry::OffsetOfTheFirstDirectoryRecordOfTheRootDirectoryEntity, { 0 }); basic_directory->add( registry::OffsetOfTheLastDirectoryRecordOfTheRootDirectoryEntity, { 0 }); basic_directory->add(registry::FileSetConsistencyFlag, { 0 }); std::ostringstream buffer; Writer buffer_writer( buffer, meta_information->as_string(registry::TransferSyntaxUID)[0], this->item_encoding); buffer_writer.write_data_set(meta_information); buffer_writer.write_data_set(basic_directory); // Preamble + prefix + data + Directory Record Sequence (tag + VR + reserved + VL) auto const start_of_directory_records = 128+4+buffer.tellp()+4+2+2+4; std::vector absolute_offsets(relative_offsets.size()); std::transform( relative_offsets.begin(), relative_offsets.end(), absolute_offsets.begin(), [&](std::streampos offset) { return offset+start_of_directory_records; }); basic_directory->as_int( registry::OffsetOfTheFirstDirectoryRecordOfTheRootDirectoryEntity)[0] = *(absolute_offsets.begin()); int last_top_level = 0; while(linearized_tree.sibling[last_top_level] != -1) { last_top_level = linearized_tree.sibling[last_top_level]; } basic_directory->as_int( registry::OffsetOfTheLastDirectoryRecordOfTheRootDirectoryEntity)[0] = absolute_offsets[last_top_level]; Value::DataSets record_sequence; for(int record_index=0; record_indexdata_set; auto const sibling = linearized_tree.sibling[record_index]; if(sibling != -1) { item->as_int( registry::OffsetOfTheNextDirectoryRecord)[0] = absolute_offsets[sibling]; } auto const child = linearized_tree.child[record_index]; if(child != -1) { item->as_int( registry::OffsetOfReferencedLowerLevelDirectoryEntity)[0] = absolute_offsets[child]; } record_sequence.push_back(item); } basic_directory->add(registry::DirectoryRecordSequence, record_sequence); boost::filesystem::ofstream file( boost::filesystem::path(root)/"DICOMDIR", std::ofstream::out | std::ofstream::binary); Writer file_writer( file, buffer_writer.byte_ordering, buffer_writer.explicit_vr, buffer_writer.item_encoding, buffer_writer.use_group_length); // File preamble for(unsigned int i=0; i<128; ++i) { file.put(0); if(!file) { throw Exception("Could not write to stream"); } } // DICOM prefix std::string const prefix("DICM"); file.write(&prefix[0], prefix.size()); if(!file) { throw Exception("Could not write to stream"); } file_writer.write_data_set(meta_information); file_writer.write_data_set(basic_directory); } } odil-0.11.0/src/odil/BasicDirectoryCreator.h000066400000000000000000000101411362244656000206420ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _8836a563_24f6_4afb_89ba_377d49ce9f5d #define _8836a563_24f6_4afb_89ba_377d49ce9f5d #include #include #include #include #include #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/Tag.h" #include "odil/Writer.h" namespace odil { /// @brief Write a Basic Directory (i.e. DICOMDIR) object to the disk. class ODIL_API BasicDirectoryCreator { public: /// @brief The tag and its associated type in the record. typedef std::pair RecordKey; /// @brief Map from a record type to the extra keys. typedef std::map> RecordKeyMap; /// @brief Default record keys, classified by record type. static RecordKeyMap const default_record_keys; /** * @brief Root of the DICOM files and location of the output DICOMDIR file. * * The concatenation of root and each file, as well as of root and * "DICOMDIR" must be a valid path. */ std::string root; /** * @brief Path to the DICOM files, relative to root. * * The concatenation of root and each file must be a valid path. */ std::vector files; /// @brief User-defined record keys, classified by record type. RecordKeyMap extra_record_keys; /// @brief Encoding of sequence items, defaults to Writer::ItemEncoding::ExplicitLength. Writer::ItemEncoding item_encoding; /// @brief Constructor. BasicDirectoryCreator( std::string const & root="", std::vector const & files=std::vector(), RecordKeyMap const & extra_record_keys=RecordKeyMap(), Writer::ItemEncoding item_encoding=Writer::ItemEncoding::ExplicitLength ); /// @brief Create and write the Basic Directory. void operator()() const; private: struct Record { typedef std::shared_ptr Pointer; Record() : data_set(std::make_shared()) { // Nothing else. } Record(Record const &) = default; Record(Record &&) = default; Record & operator=(Record const &) = default; Record & operator=(Record &&) = default; ~Record() = default; std::shared_ptr data_set; std::map children; }; struct LinearizedTree { std::vector records; std::vector sibling; std::vector child; }; typedef std::map RecordMap; /// @brief Create a hierarchy of records from the files. std::map _create_records() const; /// @brief Find a given record or insert a new one and return it. Record & _find_record(RecordMap & records, std::string const & key) const; /// @brief Create a default record. void _fill_record( std::shared_ptr data_set, Record & record, std::string const & type) const; /// @brief Update the record content from a data set. void _update_record( std::shared_ptr data_set, Record & record, std::vector const & keys) const; /// @brief Return a linearized version of the record hierarchy. LinearizedTree _linearize_records(RecordMap const & record_tree) const; /// @brief Compute the offsets of the records relative to the first record. std::vector _get_relative_offsets( std::vector const & records) const; /// @brief Write the DICOMDIR. void _write( LinearizedTree const & linearized_tree, std::vector const & relative_offsets) const; }; } #endif // _8836a563_24f6_4afb_89ba_377d49ce9f5d odil-0.11.0/src/odil/DataSet.cpp000066400000000000000000000205051362244656000163010ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/DataSet.h" #include #include #include #include #include #include "odil/Exception.h" #include "odil/Tag.h" #include "odil/VR.h" namespace odil { DataSet ::DataSet(std::string const & transfer_syntax) : _transfer_syntax(transfer_syntax) { // Nothing else. } void DataSet ::add(Tag const & tag, Element const & element) { auto const iterator = this->_elements.find(tag); if(iterator == this->_elements.end()) { // WARNING: std::map::emplace does not exist on old compilers. // This is however a case of non-mandatory copy elision, so the copy // constructor of element should only be called once. this->_elements.insert(std::make_pair(tag, element)); //this->_elements.emplace(tag, element); } else { iterator->second = element; } } void DataSet ::add(Tag const & tag, Element && element) { auto const iterator = this->_elements.find(tag); if(iterator == this->_elements.end()) { // WARNING: std::map::emplace does not exist on old compilers. this->_elements.insert(std::make_pair(tag, std::move(element))); //this->_elements.emplace(tag, std::move(element)); } else { iterator->second = element; } } void DataSet ::add(Tag const & tag, VR vr) { if(vr == VR::UNKNOWN) { vr = as_vr(tag); } this->add(tag, Element(vr)); } #define ODIL_DATASET_ADD(type) \ void\ DataSet\ ::add(\ Tag const & tag, Value::type const & value, VR vr)\ { \ if(vr == VR::UNKNOWN)\ {\ vr = as_vr(tag);\ }\ this->add(tag, Element(value, vr));\ }\ void\ DataSet\ ::add(\ Tag const & tag, Value::type && value, VR vr)\ { \ if(vr == VR::UNKNOWN)\ {\ vr = as_vr(tag);\ }\ this->add(tag, Element(std::move(value), vr));\ }\ void\ DataSet\ ::add(\ Tag const & tag, \ std::initializer_list const & value, VR vr)\ { \ if(vr == VR::UNKNOWN)\ {\ vr = as_vr(tag);\ }\ this->add(tag, Element(value, vr));\ } /* * No need for for a rvalue reference version of std::initializer_list: * copying a std::initializer_list does not copy the underlying objects. */ ODIL_DATASET_ADD(Integers); ODIL_DATASET_ADD(Reals); ODIL_DATASET_ADD(Strings); ODIL_DATASET_ADD(DataSets); ODIL_DATASET_ADD(Binary); #undef ODIL_DATASET_ADD void DataSet ::add(Tag const & tag, std::initializer_list const & value, VR vr) { if(vr == VR::UNKNOWN) { vr = as_vr(tag); } this->add(tag, Element(value, vr)); } void DataSet ::add( Tag const & tag, std::initializer_list> const & value, VR vr) { if(vr == VR::UNKNOWN) { vr = as_vr(tag); } this->add(tag, Element(value, vr)); } void DataSet ::remove(Tag const & tag) { if(!this->has(tag)) { throw Exception("No such element " + std::string( tag )); } this->_elements.erase(tag); } bool DataSet ::empty() const { return this->_elements.empty(); } std::size_t DataSet ::size() const { return this->_elements.size(); } Element const & DataSet ::operator[](Tag const & tag) const { ElementMap::const_iterator const it = this->_elements.find(tag); if(it == this->_elements.end()) { throw Exception("No such element " + std::string( tag )); } return it->second; } Element & DataSet ::operator[](Tag const & tag) { ElementMap::iterator it = this->_elements.find(tag); if(it == this->_elements.end()) { throw Exception("No such element " + std::string( tag )); } return it->second; } template typename TContainer::value_type const & at_pos( TContainer const & container, unsigned int position) { if(container.size() <= position) { throw Exception("No such element"); } return container[position]; } bool DataSet ::is_int(Tag const & tag) const { return (*this)[tag].is_int(); } Value::Integers const & DataSet ::as_int(Tag const & tag) const { return (*this)[tag].as_int(); } Value::Integers & DataSet ::as_int(Tag const & tag) { return (*this)[tag].as_int(); } Value::Integer const & DataSet ::as_int(Tag const & tag, unsigned int position) const { return at_pos(as_int(tag), position); } bool DataSet ::is_real(Tag const & tag) const { return (*this)[tag].is_real(); } Value::Reals const & DataSet ::as_real(Tag const & tag) const { return (*this)[tag].as_real(); } Value::Reals & DataSet ::as_real(Tag const & tag) { return (*this)[tag].as_real(); } Value::Real const & DataSet ::as_real(Tag const & tag, unsigned int position) const { return at_pos(as_real(tag), position); } bool DataSet ::is_string(Tag const & tag) const { return (*this)[tag].is_string(); } Value::Strings const & DataSet ::as_string(Tag const & tag) const { return (*this)[tag].as_string(); } Value::Strings & DataSet ::as_string(Tag const & tag) { return (*this)[tag].as_string(); } Value::String const & DataSet ::as_string(Tag const & tag, unsigned int position) const { return at_pos(as_string(tag), position); } bool DataSet ::is_data_set(Tag const & tag) const { return (*this)[tag].is_data_set(); } Value::DataSets const & DataSet ::as_data_set(Tag const & tag) const { return (*this)[tag].as_data_set(); } Value::DataSets & DataSet ::as_data_set(Tag const & tag) { return (*this)[tag].as_data_set(); } std::shared_ptr const & DataSet ::as_data_set(Tag const & tag, unsigned int position) const { return at_pos(as_data_set(tag), position); } bool DataSet ::is_binary(Tag const & tag) const { return (*this)[tag].is_binary(); } Value::Binary const & DataSet ::as_binary(Tag const & tag) const { return (*this)[tag].as_binary(); } Value::Binary & DataSet ::as_binary(Tag const & tag) { return (*this)[tag].as_binary(); } Value::Binary::value_type const & DataSet ::as_binary(Tag const & tag, unsigned int position) const { return at_pos(as_binary(tag), position); } bool DataSet ::has(Tag const & tag) const { return (this->_elements.find(tag) != this->_elements.end()); } VR DataSet ::get_vr(Tag const & tag) const { ElementMap::const_iterator const it = this->_elements.find(tag); if(it == this->_elements.end()) { throw Exception("No such element "+ std::string(tag) ); } return it->second.vr; } bool DataSet ::empty(Tag const & tag) const { ElementMap::const_iterator const it = this->_elements.find(tag); if(it == this->_elements.end()) { throw Exception("No such element " + std::string( tag ) ); } return it->second.empty(); } std::size_t DataSet ::size(Tag const & tag) const { ElementMap::const_iterator const it = this->_elements.find(tag); if(it == this->_elements.end()) { throw Exception("No such element " + std::string( tag )); } return it->second.size(); } DataSet::const_iterator DataSet ::begin() const { return this->_elements.begin(); } DataSet::const_iterator DataSet ::end() const { return this->_elements.end(); } bool DataSet ::operator==(DataSet const & other) const { return (this->_elements == other._elements); } bool DataSet ::operator!=(DataSet const & other) const { return !(*this == other); } void DataSet ::clear() { this->_elements.clear(); } void DataSet ::clear(Tag const & tag) { ElementMap::iterator const it = this->_elements.find(tag); if(it == this->_elements.end()) { throw Exception("No such element: "+std::string(tag)); } it->second.clear(); } std::string const & DataSet ::get_transfer_syntax() const { return _transfer_syntax; } void DataSet ::set_transfer_syntax(std::string const & transfer_syntax) { this->_transfer_syntax = transfer_syntax; } } odil-0.11.0/src/odil/DataSet.h000066400000000000000000000173161362244656000157540ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _8424446e_1153_4acc_9f57_e86faa7246e3 #define _8424446e_1153_4acc_9f57_e86faa7246e3 #include #include #include #include #include #include #include "odil/Element.h" #include "odil/odil.h" #include "odil/Value.h" namespace odil { /** * @brief DICOM Data set. */ class ODIL_API DataSet { public: /// @brief Create an empty data set. explicit DataSet(std::string const & transfer_syntax=""); /** @addtogroup default_operations Default class operations * @{ */ ~DataSet() =default; DataSet(DataSet const &) =default; DataSet(DataSet &&) =default; DataSet & operator=(DataSet const &) =default; DataSet & operator=(DataSet &&) =default; /// @} /// @brief Add an element to the dataset. void add(Tag const & tag, Element const & element); /// @brief Add an element to the dataset. void add(Tag const & tag, Element && element); /// @brief Add an empty element to the dataset. void add(Tag const & tag, VR vr=VR::UNKNOWN); #define ODIL_DATASET_ADD(type) \ void add(\ Tag const & tag, Value::type const & value, VR vr=VR::UNKNOWN);\ void add(\ Tag const & tag, Value::type && value, VR vr=VR::UNKNOWN); \ void add(\ Tag const & tag, \ std::initializer_list const & value, \ VR vr=VR::UNKNOWN); /* * No need for for a rvalue reference version of std::initializer_list: * copying a std::initializer_list does not copy the underlying objects. */ ODIL_DATASET_ADD(Integers); ODIL_DATASET_ADD(Reals); ODIL_DATASET_ADD(Strings); ODIL_DATASET_ADD(DataSets); ODIL_DATASET_ADD(Binary); #undef ODIL_DATASET_ADD /// @brief Add an element to the dataset. void add( Tag const & tag, std::initializer_list const & value, VR vr=VR::UNKNOWN); /// @brief Add an element to the dataset. void add( Tag const & tag, std::initializer_list> const & value, VR vr=VR::UNKNOWN); /** * @brief Remove an element from the data set. * * If the element is not in the data set, a odil::Exception is raised. */ void remove(Tag const & tag); /// @brief Test whether the data set is empty. bool empty() const; /// @brief Return the number of elements in the data set. std::size_t size() const; /// @brief Test whether an element is in the data set. bool has(Tag const & tag) const; /** * @brief Return the VR of an element in the data set. * * If the element is not in the data set, a odil::Exception is raised. */ VR get_vr(Tag const & tag) const; /** * @brief Test whether an element of the data set is empty. * * If the element is not in the data set, a odil::Exception is raised. */ bool empty(Tag const & tag) const; /** * @brief Return the number of values in an element of the data set. * * If the element is not in the data set, a odil::Exception is raised. */ std::size_t size(Tag const & tag) const; /** * @brief Access the given element. * * If the element is not in the data set, a odil::Exception is raised. */ Element const & operator[](Tag const & tag) const; /** * @brief Access the given element. * * If the element is not in the data set, a odil::Exception is raised. */ Element & operator[](Tag const & tag); /// @brief Test whether an existing element has integer type. bool is_int(Tag const & tag) const; /// @brief Return the integers contained in an existing element (read-only). Value::Integers const & as_int(Tag const & tag) const; /// @brief Return the integers contained in an existing element (read-write). Value::Integers & as_int(Tag const & tag); /// @brief Return an integer contained in an existing element (read-only). Value::Integer const & as_int(Tag const & tag, unsigned int position) const; /// @brief Test whether an existing element has real type. bool is_real(Tag const & tag) const; /// @brief Return the reals contained in an existing element (read-only). Value::Reals const & as_real(Tag const & tag) const; /// @brief Return the reals contained in an existing element (read-write). Value::Reals & as_real(Tag const & tag); /// @brief Return an real contained in an existing element (read-only). Value::Real const & as_real(Tag const & tag, unsigned int position) const; /// @brief Test whether an existing element has string type. bool is_string(Tag const & tag) const; /// @brief Return the strings contained in an existing element (read-only). Value::Strings const & as_string(Tag const & tag) const; /// @brief Return the strings contained in an existing element (read-write). Value::Strings & as_string(Tag const & tag); /// @brief Return a string contained in an existing element (read-only). Value::String const & as_string(Tag const & tag, unsigned int position) const; /// @brief Test whether an existing element has data set type. bool is_data_set(Tag const & tag) const; /// @brief Return the data sets contained in an existing element (read-only). Value::DataSets const & as_data_set(Tag const & tag) const; /// @brief Return the data sets contained in an existing element (read-write). Value::DataSets & as_data_set(Tag const & tag); /// @brief Return a data set contained in an existing element (read-only). std::shared_ptr const & as_data_set(Tag const & tag, unsigned int position) const; /// @brief Test whether an existing element has binary type. bool is_binary(Tag const & tag) const; /// @brief Return the binary items contained in an existing element (read-only). Value::Binary const & as_binary(Tag const & tag) const; /// @brief Return the binary items contained in an existing element (read-write). Value::Binary & as_binary(Tag const & tag); /// @brief Return a binary item contained in an existing element (read-only). Value::Binary::value_type const & as_binary(Tag const & tag, unsigned int position) const; /// @brief Iterator to the elements. typedef std::map::const_iterator const_iterator; /// @brief Return an iterator to the start of the elements. const_iterator begin() const; /// @brief Return an iterator to the end of the elements. const_iterator end() const; /// @brief Equality test. bool operator==(DataSet const & other) const; /// @brief Difference test. bool operator!=(DataSet const & other) const; /** * @brief Clear the data set (data_set.empty() will be true). All iterators * and all references to elements will be invalidated. */ void clear(); /// @brief Clear the element (data_set.empty(tag) will be true). void clear(Tag const & tag); /// @brief Return the current transfer syntax. std::string const & get_transfer_syntax() const; /// @brief Set the current transfer syntax. void set_transfer_syntax(std::string const & transfer_syntax); private: typedef std::map ElementMap; ElementMap _elements; /// @brief Current transfer syntax. std::string _transfer_syntax; }; } #endif // _8424446e_1153_4acc_9f57_e86faa7246e3 odil-0.11.0/src/odil/EchoSCP.cpp000066400000000000000000000037651362244656000162110ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/EchoSCP.h" #include #include "odil/Association.h" #include "odil/SCP.h" #include "odil/Value.h" #include "odil/message/CEchoRequest.h" #include "odil/message/CEchoResponse.h" #include "odil/message/Message.h" namespace odil { EchoSCP ::EchoSCP(Association & association) : SCP(association), _callback() { // Nothing else. } EchoSCP ::EchoSCP(Association & association, Callback const & callback) : SCP(association), _callback() { this->set_callback(callback); } EchoSCP::Callback const & EchoSCP::get_callback() const { return this->_callback; } void EchoSCP ::set_callback(Callback const & callback) { this->_callback = callback; } void EchoSCP ::operator()(std::shared_ptr message) { auto request = std::make_shared(message); this->operator()(request); } void EchoSCP ::operator()(std::shared_ptr request) { Value::Integer status=message::CEchoResponse::Success; std::shared_ptr status_fields; try { status = this->_callback(request); } catch(SCP::Exception const & e) { status = e.status; status_fields = e.status_fields; } catch(odil::Exception const &) { status = message::CEchoResponse::ProcessingFailure; } auto response = std::make_shared( request->get_message_id(), status, request->get_affected_sop_class_uid()); response->set_status_fields(status_fields); this->_association.send_message( response, request->get_affected_sop_class_uid()); } } odil-0.11.0/src/odil/EchoSCP.h000066400000000000000000000031511362244656000156430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _1a61d976_ba12_4dba_af34_67f064d38506 #define _1a61d976_ba12_4dba_af34_67f064d38506 #include #include "odil/Association.h" #include "odil/odil.h" #include "odil/SCP.h" #include "odil/Value.h" #include "odil/message/CEchoRequest.h" #include "odil/message/Message.h" namespace odil { /// @brief SCP for C-Echo services. class ODIL_API EchoSCP: public SCP { public: /** * @brief Callback called when a request is received, shall throw an * SCP::Exception on error. */ typedef std::function< Value::Integer(std::shared_ptr) > Callback; /// @brief Constructor. EchoSCP(Association & association); /// @brief Constructor. EchoSCP(Association & association, Callback const & callback); /// @brief Return the callback. Callback const & get_callback() const; /// @brief Set the callback. void set_callback(Callback const & callback); /// @brief Process a C-Echo request. virtual void operator()(std::shared_ptr message); private: Callback _callback; void operator()(std::shared_ptr request); }; } #endif // _1a61d976_ba12_4dba_af34_67f064d38506 odil-0.11.0/src/odil/EchoSCU.cpp000066400000000000000000000026661362244656000162150ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/EchoSCU.h" #include "odil/Association.h" #include "odil/Exception.h" #include "odil/message/CEchoRequest.h" #include "odil/message/CEchoResponse.h" #include "odil/registry.h" namespace odil { EchoSCU ::EchoSCU(Association & association) : SCU(association) { // Nothing else. } void EchoSCU ::echo() const { auto const message_id = this->_association.next_message_id(); auto request = std::make_shared( message_id, registry::VerificationSOPClass); this->_association.send_message( request, request->get_affected_sop_class_uid()); auto response = std::make_shared( this->_association.receive_message()); if(response->get_message_id_being_responded_to() != message_id) { std::ostringstream message; message << "DIMSE: Unexpected Response MsgId: " << response->get_message_id_being_responded_to() << "(expected: " << message_id << ")"; throw Exception(message.str()); } } } odil-0.11.0/src/odil/EchoSCU.h000066400000000000000000000015331362244656000156520ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _94f3b347_1f95_49ab_83f6_8710f5a3ad67 #define _94f3b347_1f95_49ab_83f6_8710f5a3ad67 #include "odil/Association.h" #include "odil/odil.h" #include "odil/SCU.h" namespace odil { /// @brief SCU for the C-ECHO services. class ODIL_API EchoSCU: public SCU { public: /// @brief Constructor EchoSCU(Association & association); /// @brief Perform DICOM ping void echo() const; }; } #endif // _94f3b347_1f95_49ab_83f6_8710f5a3ad67 odil-0.11.0/src/odil/Element.cpp000066400000000000000000000103551362244656000163470ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/Element.h" #include #include #include "odil/Exception.h" #include "odil/Value.h" #include "odil/DataSet.h" namespace odil { Element ::Element(VR const & vr) : _value(Value::Integers()), vr(vr) { if(odil::is_int(vr)) { this->_value = Value::Integers(); } else if(odil::is_real(vr)) { this->_value = Value::Reals(); } else if(odil::is_string(vr)) { this->_value = Value::Strings(); } else if(vr == VR::SQ) { this->_value = Value::DataSets(); } else if(odil::is_binary(vr)) { this->_value = Value::Binary(); } else { throw Exception("Unknown VR type"); } } Element ::Element(Value const & value, VR const & vr) : _value(value), vr(vr) { // Nothing else } Element ::Element(Value && value, VR const & vr) : _value(std::move(value)), vr(vr) { // Nothing else } #define ODIL_ELEMENT_CONSTRUCTORS(type) \ Element\ ::Element(Value::type const & value, VR const & vr)\ : vr(vr), _value(value)\ {\ }\ \ Element\ ::Element(Value::type && value, VR const & vr)\ : vr(vr), _value(std::move(value))\ {\ }\ \ Element\ ::Element(\ std::initializer_list const & value, \ VR const & vr)\ : vr(vr), _value(value)\ {\ } /* * No need for for a rvalue reference version of std::initializer_list: * copying a std::initializer_list does not copy the underlying objects. */ ODIL_ELEMENT_CONSTRUCTORS(Integers); ODIL_ELEMENT_CONSTRUCTORS(Reals); ODIL_ELEMENT_CONSTRUCTORS(Strings); ODIL_ELEMENT_CONSTRUCTORS(DataSets); ODIL_ELEMENT_CONSTRUCTORS(Binary); #undef ODIL_ELEMENT_CONSTRUCTORS Element ::Element(std::initializer_list const & value, VR const & vr) : vr(vr), _value(value) { // Nothing else } Element ::Element( std::initializer_list> const & value, VR const & vr) : vr(vr), _value(value) { // Nothing else } bool Element ::empty() const { return this->_value.empty(); } std::size_t Element ::size() const { return this->_value.size(); } Value const & Element ::get_value() const { return this->_value; } bool Element ::is_int() const { return (this->_value.get_type() == Value::Type::Integers); } Value::Integers const & Element ::as_int() const { return this->_value.as_integers(); } Value::Integers & Element ::as_int() { return this->_value.as_integers(); } bool Element ::is_real() const { return (this->_value.get_type() == Value::Type::Reals); } Value::Reals const & Element ::as_real() const { return this->_value.as_reals(); } Value::Reals & Element ::as_real() { return this->_value.as_reals(); } bool Element ::is_string() const { return (this->_value.get_type() == Value::Type::Strings); } Value::Strings const & Element ::as_string() const { return this->_value.as_strings(); } Value::Strings & Element ::as_string() { return this->_value.as_strings(); } bool Element ::is_data_set() const { return (this->_value.get_type() == Value::Type::DataSets); } Value::DataSets const & Element ::as_data_set() const { return this->_value.as_data_sets(); } Value::DataSets & Element::as_data_set() { return this->_value.as_data_sets(); } bool Element ::is_binary() const { return (this->_value.get_type() == Value::Type::Binary); } Value::Binary const & Element ::as_binary() const { return this->_value.as_binary(); } Value::Binary & Element::as_binary() { return this->_value.as_binary(); } bool Element ::operator==(Element const & other) const { return (this->vr == other.vr) && (this->_value == other._value); } bool Element ::operator!=(Element const & other) const { return !(*this == other); } void Element ::clear() { this->_value.clear(); } } odil-0.11.0/src/odil/Element.h000066400000000000000000000125141362244656000160130ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _9c3d8f32_0310_4e3a_b5d2_6d69f229a2cf #define _9c3d8f32_0310_4e3a_b5d2_6d69f229a2cf #include #include #include "odil/odil.h" #include "odil/Tag.h" #include "odil/Value.h" #include "odil/VR.h" namespace odil { /** * @brief Element of a DICOM data set. */ class ODIL_API Element { public: /// @brief VR of the element. VR vr; /// @brief Constructor using the VR to create an according empty container. Element(VR const & vr); /// @brief Constructor. Element(Value const & value, VR const & vr); /// @brief Constructor. Element(Value && value, VR const & vr); #define ODIL_ELEMENT_CONSTRUCTORS(type) \ Element(Value::type const & value, VR const & vr=VR::INVALID); \ Element(Value::type && value, VR const & vr=VR::INVALID); \ Element(\ std::initializer_list const & value, \ VR const & vr=VR::INVALID); /* * No need for for a rvalue reference version of std::initializer_list: * copying a std::initializer_list does not copy the underlying objects. */ ODIL_ELEMENT_CONSTRUCTORS(Integers); ODIL_ELEMENT_CONSTRUCTORS(Reals); ODIL_ELEMENT_CONSTRUCTORS(Strings); ODIL_ELEMENT_CONSTRUCTORS(DataSets); ODIL_ELEMENT_CONSTRUCTORS(Binary); #undef ODIL_ELEMENT_CONSTRUCTORS Element( std::initializer_list const & value, VR const & vr=VR::INVALID); Element( std::initializer_list> const & value, VR const & vr=VR::INVALID); /** @addtogroup default_operations Default class operations * @{ */ ~Element() =default; Element(Element const &) =default; Element(Element &&) =default; Element & operator=(Element const &) =default; Element & operator=(Element &&) =default; /// @} /// @brief Test whether the element is empty. bool empty() const; /// @brief Return the number of items in the value. std::size_t size() const; /// @brief Return the raw value. Value const & get_value() const; /// @brief Test whether the value contains integers. bool is_int() const; /** * @brief Return the integers contained in the element. * * If the element does not contain integers, a odil::Exception is raised. */ Value::Integers const & as_int() const; /** * @brief Return the integers contained in the element. * * If the element does not contain integers, a odil::Exception is raised. */ Value::Integers & as_int(); /// @brief Test whether the value contains reals. bool is_real() const; /** * @brief Return the reals contained in the element. * * If the element does not contain reals, a odil::Exception is raised. */ Value::Reals const & as_real() const; /** * @brief Return the reals contained in the element. * * If the element does not contain reals, a odil::Exception is raised. */ Value::Reals & as_real(); /// @brief Test whether the value contains strings. bool is_string() const; /** * @brief Return the strings contained in the element. * * If the element does not contain strings, a odil::Exception is raised. */ Value::Strings const & as_string() const; /** * @brief Return the strings contained in the element. * * If the element does not contain strings, a odil::Exception is raised. */ Value::Strings & as_string(); /// @brief Test whether the value contains data sets. bool is_data_set() const; /** * @brief Return the data sets contained in the element. * * If the element does not contain data sets, a odil::Exception is raised. */ Value::DataSets const & as_data_set() const; /** * @brief Return the data sets contained in the element. * * If the element does not contain data sets, a odil::Exception is raised. */ Value::DataSets & as_data_set(); /// @brief Test whether the value contains data sets. bool is_binary() const; /** * @brief Return the binary data contained in the element. * * If the element does not contain binary data, a odil::Exception is raised. */ Value::Binary const & as_binary() const; /** * @brief Return the binary data contained in the element. * * If the element does not contain binary data, a odil::Exception is raised. */ Value::Binary & as_binary(); /// @brief Equality test bool operator==(Element const & other) const; /// @brief Difference test bool operator!=(Element const & other) const; /// @brief Clear the element (element.empty() will be true). void clear(); private: Value _value; }; /** * @brief Visitor of elements. */ template typename TVisitor::result_type apply_visitor(TVisitor const & visitor, Element const & element); } #include "odil/Element.txx" #endif // _9c3d8f32_0310_4e3a_b5d2_6d69f229a2cf odil-0.11.0/src/odil/Element.txx000066400000000000000000000026371362244656000164140ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _feb2071a_de26_4adb_9305_59d0dd64c970 #define _feb2071a_de26_4adb_9305_59d0dd64c970 #include "odil/Element.h" #include #include "odil/Exception.h" namespace odil { template typename TVisitor::result_type apply_visitor(TVisitor const & visitor, Element const & element) { if(element.empty()) { return visitor(element.vr); } else if(is_string(element.vr)) { return visitor(element.vr, element.as_string()); } else if(is_real(element.vr)) { return visitor(element.vr, element.as_real()); } else if(is_int(element.vr)) { return visitor(element.vr, element.as_int()); } else if(element.vr == VR::SQ) { return visitor(element.vr, element.as_data_set()); } else if(is_binary(element.vr)) { return visitor(element.vr, element.as_binary()); } else { throw Exception("Unknown VR: "+as_string(element.vr)); } } } #endif // _feb2071a_de26_4adb_9305_59d0dd64c970 odil-0.11.0/src/odil/ElementsDictionary.cpp000066400000000000000000000060311362244656000205540ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/ElementsDictionary.h" #include #include "odil/Exception.h" namespace odil { ElementsDictionaryKey ::ElementsDictionaryKey() : _type(Type::None) { // Nothing else. } ElementsDictionaryKey ::ElementsDictionaryKey(Tag const & value) { this->set(value); } ElementsDictionaryKey ::ElementsDictionaryKey(std::string const & value) { this->set(value); } ElementsDictionaryKey::Type const & ElementsDictionaryKey ::get_type() const { return this->_type; } Tag const & ElementsDictionaryKey ::get_tag() const { if(this->_type != Type::Tag) { throw Exception("Invalid type"); } return this->_tag; } std::string const & ElementsDictionaryKey ::get_string() const { if(this->_type != Type::String) { throw Exception("Invalid type"); } return this->_string; } void ElementsDictionaryKey ::set(Tag const value) { this->_type = Type::Tag; this->_tag = value; } void ElementsDictionaryKey ::set(std::string const & value) { this->_type = Type::String; this->_string = value; } bool ElementsDictionaryKey ::operator<(ElementsDictionaryKey const & other) const { if(this->_type == other._type) { if(this->_type == Type::Tag) { return (this->_tag < other._tag); } else if(this->_type == Type::String) { return (this->_string < other._string); } else { throw Exception("Invalid type"); } } else { return static_cast(this->_type) < static_cast(other._type); } } bool ElementsDictionaryKey ::operator==(ElementsDictionaryKey const & other) const { if(this->_type == other._type) { if(this->_type == Type::Tag) { return (this->_tag == other._tag); } else if(this->_type == Type::String) { return (this->_string == other._string); } else { throw Exception("Invalid type"); } } else { return false; } } ElementsDictionaryEntry ::ElementsDictionaryEntry( std::string const & name, std::string const & keyword, std::string const & vr, std::string const & vm) : name(name), keyword(keyword), vr(vr), vm(vm) { // Nothing else } ElementsDictionary::const_iterator find(ElementsDictionary const & dictionary, Tag const & tag) { auto iterator = dictionary.find(tag); if(iterator == dictionary.end()) { std::string tag_string(tag); tag_string[2] = 'x'; tag_string[3] = 'x'; iterator = dictionary.find(tag_string); } return iterator; } } odil-0.11.0/src/odil/ElementsDictionary.h000066400000000000000000000047671362244656000202370ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _f4b88e07_d515_41be_ad1b_37899ec6451e #define _f4b88e07_d515_41be_ad1b_37899ec6451e #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { /// @brief Key of a dictionary of DICOM elements. class ODIL_API ElementsDictionaryKey { public: /// @brief Type of the key. enum class Type { Tag, String, None }; /// @brief Create a key with type equal to None. ElementsDictionaryKey(); /// @brief Create a key with type equal to Tag. ElementsDictionaryKey(Tag const & value); /// @brief Create a key with type equal to String. ElementsDictionaryKey(std::string const & value); /// @brief Return the type. Type const & get_type() const; /// @brief Return the tag value or raise an exception if type is not Tag. Tag const & get_tag() const; /// @brief Return the string value or raise an exception if type is not String. std::string const & get_string() const; /// @brief Set the type to Tag. void set(Tag const value); /// @brief Set the type to String. void set(std::string const & value); /// @brief Comparator. bool operator<(ElementsDictionaryKey const & other) const; /// @brief Comparator. bool operator==(ElementsDictionaryKey const & other) const; private: Type _type; Tag _tag; std::string _string; }; /** * @brief Entry in a dictionary of DICOM elements. */ struct ODIL_API ElementsDictionaryEntry { /// @brief Full name. std::string name; /// @brief Brief name. std::string keyword; /// @brief Type. std::string vr; /// @brief Multiplicity. std::string vm; /// @brief Constructor. ElementsDictionaryEntry( std::string const & name="", std::string const & keyword="", std::string const & vr="", std::string const & vm=""); }; typedef std::map ElementsDictionary; ODIL_API ElementsDictionary::const_iterator find(ElementsDictionary const & dictionary, Tag const & tag); } #endif // _f4b88e07_d515_41be_ad1b_37899ec6451e odil-0.11.0/src/odil/Exception.cpp000066400000000000000000000013441362244656000167120ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/Exception.h" #include #include namespace odil { Exception ::Exception(std::string const & message) : _message(message) { // Nothing else. } Exception ::~Exception() noexcept { // Nothing to do. } char const * Exception ::what() const noexcept { return this->_message.c_str(); } } odil-0.11.0/src/odil/Exception.h000066400000000000000000000020621362244656000163550ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _b9607695_cb3b_4188_8caa_bc8bb051ef28 #define _b9607695_cb3b_4188_8caa_bc8bb051ef28 #include #include #include "odil/odil.h" namespace odil { /// @brief Base class for odil exceptions. class ODIL_API Exception: public std::exception { public: /// @brief Message string constructor. Exception(std::string const & message=""); /// @brief Destructor. virtual ~Exception() noexcept; /// @brief Return the reason for the exception. virtual const char* what() const noexcept; protected: /// @brief Message of the exception. std::string _message; }; } #endif // _b9607695_cb3b_4188_8caa_bc8bb051ef28 odil-0.11.0/src/odil/FindSCP.cpp000066400000000000000000000051231362244656000162010ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/FindSCP.h" #include #include "odil/Association.h" #include "odil/Exception.h" #include "odil/SCP.h" #include "odil/message/CFindRequest.h" #include "odil/message/CFindResponse.h" #include "odil/message/Response.h" namespace odil { FindSCP ::FindSCP(Association & association) : SCP(association), _generator(nullptr) { // Nothing else. } FindSCP ::FindSCP( Association & association, std::shared_ptr const & generator) : SCP(association), _generator(nullptr) { this->set_generator(generator); } std::shared_ptr FindSCP ::get_generator() const { return this->_generator; } void FindSCP ::set_generator(std::shared_ptr const & generator) { this->_generator = generator; } void FindSCP ::operator()(std::shared_ptr message) { auto request = std::make_shared(message); this->operator()(request); } void FindSCP ::operator()(std::shared_ptr request) { Value::Integer final_status = message::CFindResponse::Success; auto status_fields = std::make_shared(); try { this->_generator->initialize(request); while(!this->_generator->done()) { auto data_set = this->_generator->get(); auto response = std::make_shared( request->get_message_id(), message::CFindResponse::Pending, data_set); this->_association.send_message( response, request->get_affected_sop_class_uid()); this->_generator->next(); } } catch(SCP::Exception const & e) { final_status = e.status; status_fields = e.status_fields; } catch(odil::Exception const & e) { status_fields->add(registry::ErrorComment, {e.what()}); final_status = message::CFindResponse::UnableToProcess; } auto response = std::make_shared( request->get_message_id(), final_status); response->set_status_fields(status_fields); this->_association.send_message( response, request->get_affected_sop_class_uid()); } } odil-0.11.0/src/odil/FindSCP.h000066400000000000000000000027301362244656000156470ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _d54d5d3d_791c_43e5_b13a_397954053963 #define _d54d5d3d_791c_43e5_b13a_397954053963 #include #include "odil/Association.h" #include "odil/odil.h" #include "odil/SCP.h" #include "odil/message/CFindRequest.h" #include "odil/message/Message.h" namespace odil { /// @brief SCP for C-Find services. class ODIL_API FindSCP: public SCP { public: /// @brief Constructor. FindSCP(Association & association); /// @brief Constructor. FindSCP( Association & association, std::shared_ptr const & generator); /// @brief Return the generator. std::shared_ptr get_generator() const; /// @brief Set the generator. void set_generator(std::shared_ptr const & generator); /// @brief Process a C-Find request. virtual void operator()(std::shared_ptr message); private: std::shared_ptr _generator; void operator()(std::shared_ptr request); }; } #endif // _d54d5d3d_791c_43e5_b13a_397954053963 odil-0.11.0/src/odil/FindSCU.cpp000066400000000000000000000063511362244656000162120ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/FindSCU.h" #include #include #include #include #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/logging.h" #include "odil/message/CFindRequest.h" #include "odil/message/CFindResponse.h" namespace odil { FindSCU ::FindSCU(Association & asociation) : SCU(asociation) { // Nothing else. } void FindSCU ::find(std::shared_ptr query, Callback callback) const { auto request = std::make_shared( this->_association.next_message_id(), this->_affected_sop_class, message::Message::Priority::MEDIUM, query); this->_find(request, callback); } void _accumulate( std::vector> & data_sets, std::shared_ptr data_set) { data_sets.push_back(data_set); } Value::DataSets FindSCU ::find(std::shared_ptr query) const { Value::DataSets result; auto callback = [&result](std::shared_ptr dataset) { result.push_back(dataset); }; this->find(query, callback); return result; } void FindSCU ::_find( std::shared_ptr request, Callback callback) const { this->_association.send_message(request, this->_affected_sop_class); // Receive the responses bool done = false; while(!done) { // FIXME: include progress callback auto response = std::make_shared( this->_association.receive_message()); if(response->get_message_id_being_responded_to() != request->get_message_id()) { std::ostringstream message; message << "DIMSE: Unexpected Response MsgId: " << response->get_message_id_being_responded_to() << "(expected: " << request->get_message_id() << ")"; throw Exception(message.str()); } if(response->has_affected_sop_class_uid() && response->get_affected_sop_class_uid() != request->get_affected_sop_class_uid()) { std::ostringstream message; message << "DIMSE: Unexpected Response Affected SOP Class UID: " << response->get_affected_sop_class_uid() << " (expected: " << request->get_affected_sop_class_uid() << ")"; throw Exception(message.str()); } if(message::Response::is_warning(response->get_status())) { ODIL_LOG(warning) << "C-FIND response status: " << response->get_status(); } else if(message::Response::is_failure(response->get_status())) { ODIL_LOG(error) << "C-FIND response status: " << response->get_status(); } done = !response->is_pending(); if(!done) { callback(response->get_data_set()); } } } } odil-0.11.0/src/odil/FindSCU.h000066400000000000000000000026041362244656000156540ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _0106eb3a_4e02_4d7c_93bf_4d53dcafbb05 #define _0106eb3a_4e02_4d7c_93bf_4d53dcafbb05 #include #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/message/CFindRequest.h" #include "odil/odil.h" #include "odil/SCU.h" namespace odil { /// @brief SCU for C-FIND services. class ODIL_API FindSCU: public SCU { public: /// @brief Callback called when a response is received. typedef std::function)> Callback; /// @brief Constructor. FindSCU(Association & association); /// @brief Perform the C-FIND using an optional callback. void find(std::shared_ptr query, Callback callback) const; /** * @brief Return a list of datasets matching the query. */ Value::DataSets find(std::shared_ptr query) const; private: void _find( std::shared_ptr request, Callback callback) const; }; } #endif // _0106eb3a_4e02_4d7c_93bf_4d53dcafbb05 odil-0.11.0/src/odil/GetSCP.cpp000066400000000000000000000074311362244656000160440ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/GetSCP.h" #include #include "odil/Association.h" #include "odil/Exception.h" #include "odil/SCP.h" #include "odil/StoreSCU.h" #include "odil/message/CGetRequest.h" #include "odil/message/CGetResponse.h" #include "odil/message/Response.h" namespace odil { GetSCP ::GetSCP( Association & association, std::shared_ptr const & generator) : SCP(association), _generator(nullptr) { this->set_generator(generator); } std::shared_ptr GetSCP ::get_generator() const { return this->_generator; } void GetSCP ::set_generator(std::shared_ptr const & generator) { this->_generator = generator; } void GetSCP ::operator()(std::shared_ptr message) { auto request = std::make_shared(message); this->operator()(request); } void GetSCP ::operator()(std::shared_ptr request) { StoreSCU store_scu(this->_association); Value::Integer final_status = message::CGetResponse::Success; auto status_fields = std::make_shared(); unsigned int remaining_sub_operations = 0; unsigned int completed_sub_operations=0; unsigned int failed_sub_operations=0; unsigned int warning_sub_operations=0; try { this->_generator->initialize(request); remaining_sub_operations = this->_generator->count(); while(!this->_generator->done()) { auto response = std::make_shared( request->get_message_id(), message::CGetResponse::Pending); response->set_number_of_remaining_sub_operations( remaining_sub_operations); response->set_number_of_completed_sub_operations( completed_sub_operations); response->set_number_of_failed_sub_operations( failed_sub_operations); response->set_number_of_warning_sub_operations( warning_sub_operations); this->_association.send_message( response, request->get_affected_sop_class_uid()); auto data_set = this->_generator->get(); store_scu.set_affected_sop_class(data_set); try { store_scu.store(data_set); --remaining_sub_operations; ++completed_sub_operations; } catch(Exception const &) { ++failed_sub_operations; } this->_generator->next(); } } catch(SCP::Exception const & e) { final_status = e.status; status_fields = e.status_fields; } catch(odil::Exception const & e) { status_fields->add(registry::ErrorComment, {e.what()}); final_status = message::CGetResponse::UnableToProcess; } auto response = std::make_shared( request->get_message_id(), final_status); response->set_status_fields(status_fields); response->set_number_of_remaining_sub_operations(remaining_sub_operations); response->set_number_of_completed_sub_operations(completed_sub_operations); response->set_number_of_failed_sub_operations(failed_sub_operations); response->set_number_of_warning_sub_operations(warning_sub_operations); this->_association.send_message( response, request->get_affected_sop_class_uid()); } } odil-0.11.0/src/odil/GetSCP.h000066400000000000000000000031601362244656000155040ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _2f0ad1fd_8779_4ab3_b7e8_6d37fdc0c018 #define _2f0ad1fd_8779_4ab3_b7e8_6d37fdc0c018 #include #include "odil/Association.h" #include "odil/odil.h" #include "odil/SCP.h" #include "odil/message/CGetRequest.h" #include "odil/message/Message.h" namespace odil { /// @brief SCP for C-Get services. class ODIL_API GetSCP: public SCP { public: /// @brief Generator of C-GET responses. class DataSetGenerator: public SCP::DataSetGenerator { public: /// @brief Return the number of responses. virtual unsigned int count() const =0; }; /// @brief Constructor. GetSCP( Association & association, std::shared_ptr const & generator={}); /// @brief Return the generator. std::shared_ptr get_generator() const; /// @brief Set the generator. void set_generator(std::shared_ptr const & generator); /// @brief Process a C-Get request. virtual void operator()(std::shared_ptr message); private: std::shared_ptr _generator; void operator()(std::shared_ptr request); }; } #endif // _2f0ad1fd_8779_4ab3_b7e8_6d37fdc0c018 odil-0.11.0/src/odil/GetSCU.cpp000066400000000000000000000075121362244656000160510ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/GetSCU.h" #include #include #include #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/logging.h" #include "odil/StoreSCP.h" #include "odil/message/CGetRequest.h" #include "odil/message/CGetResponse.h" #include "odil/message/CStoreRequest.h" namespace odil { GetSCU ::GetSCU(Association & association) : SCU(association) { // Nothing else } void GetSCU ::get( std::shared_ptr query, StoreCallback store_callback, GetCallback get_callback) const { // Send the request auto request = std::make_shared( this->_association.next_message_id(), this->_affected_sop_class, message::Message::Priority::MEDIUM, query); this->_get(request, store_callback, get_callback); } std::vector> GetSCU ::get(std::shared_ptr query) const { std::vector> result; auto callback = [&result](std::shared_ptr data_set) { result.push_back(data_set); }; this->get(query, callback); return result; } void GetSCU ::_get( std::shared_ptr request, StoreCallback store_callback, GetCallback get_callback) const { this->_association.send_message(request, this->_affected_sop_class); // Receive the responses bool done = false; while(!done) { auto message = this->_association.receive_message(); if(message->get_command_field() == message::Message::Command::C_GET_RSP) { done = this->_handle_get_response( std::make_shared(message), get_callback); } else if(message->get_command_field() == message::Message::Command::C_STORE_RQ) { try { this->_handle_store_request( std::make_shared(message), store_callback); } catch(...) { // FIXME: logging done = true; } } else { std::ostringstream exception_message; exception_message << "DIMSE: Unexpected Response Command Field: 0x" << std::hex << message->get_command_field(); throw Exception(exception_message.str()); } } } bool GetSCU ::_handle_get_response( std::shared_ptr response, GetCallback callback) const { if(message::Response::is_warning(response->get_status())) { ODIL_LOG(warning) << "C-GET response status: " << response->get_status(); } else if(message::Response::is_failure(response->get_status())) { ODIL_LOG(error) << "C-GET response status: " << response->get_status(); } // Store status before moving the response-> auto const done = !response->is_pending(); if(callback) { callback(response); } return done; } void GetSCU ::_handle_store_request( std::shared_ptr request, StoreCallback callback) const { auto const store_callback = [&callback](std::shared_ptr request) { if(callback) { callback(request->get_data_set()); } return message::Response::Success; }; StoreSCP scp(this->_association, store_callback); scp(request); } } odil-0.11.0/src/odil/GetSCU.h000066400000000000000000000043121362244656000155110ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _f82a15e2_fd13_44b5_af7d_c6983494c9c6 #define _f82a15e2_fd13_44b5_af7d_c6983494c9c6 #include #include #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/SCU.h" #include "odil/message/CGetRequest.h" #include "odil/message/CGetResponse.h" #include "odil/message/CStoreRequest.h" namespace odil { /// @brief SCU for C-GET services. class ODIL_API GetSCU: public SCU { public: /// @brief Callback called when a C-STORE request is received. typedef std::function)> StoreCallback; /** * @brief Typedef to keep compatibility with previous versions. * @deprecated The StoreCallback typedef should now be used. */ typedef StoreCallback Callback; /// @brief Callback called when a C-GET response is received. typedef std::function< void(std::shared_ptr) > GetCallback; /// @brief Constructor. GetSCU(Association & association); /// @brief Perform the C-GET using callbacks. void get( std::shared_ptr query, StoreCallback store_callback, GetCallback get_callback=GetCallback()) const; /** * @brief Return a list of datasets matching the query. */ std::vector> get( std::shared_ptr query) const; private: void _get( std::shared_ptr request, StoreCallback store_callback, GetCallback get_callback) const; bool _handle_get_response( std::shared_ptr response, GetCallback callback) const; void _handle_store_request( std::shared_ptr request, StoreCallback callback) const; }; } #endif // _f82a15e2_fd13_44b5_af7d_c6983494c9c6 odil-0.11.0/src/odil/MoveSCP.cpp000066400000000000000000000115161362244656000162320ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/MoveSCP.h" #include #include #include #include #include "odil/Association.h" #include "odil/Exception.h" #include "odil/logging.h" #include "odil/SCP.h" #include "odil/StoreSCU.h" #include "odil/message/CMoveRequest.h" #include "odil/message/CMoveResponse.h" #include "odil/message/Response.h" namespace odil { MoveSCP ::MoveSCP(Association & association) : SCP(association), _generator(nullptr) { // Nothing else. } MoveSCP ::MoveSCP( Association & association, std::shared_ptr const & generator) : SCP(association), _generator(nullptr) { this->set_generator(generator); } std::shared_ptr MoveSCP ::get_generator() const { return this->_generator; } void MoveSCP ::set_generator(std::shared_ptr const & generator) { this->_generator = generator; } void MoveSCP ::operator()(std::shared_ptr message) { auto request = std::make_shared(message); this->operator()(request); } void MoveSCP ::operator()(std::shared_ptr request) { Association move_association; try { move_association = this->_generator->get_association(request); } catch(odil::Exception const & e) { ODIL_LOG(error) << "Cannot get move association: " << e.what(); auto response = std::make_shared( request->get_message_id(), message::CMoveResponse::RefusedMoveDestinationUnknown); this->_association.send_message( response, request->get_affected_sop_class_uid()); return; } move_association.associate(); StoreSCU store_scu(move_association); Value::Integer final_status = message::CMoveResponse::Success; std::shared_ptr status_fields; unsigned int remaining_sub_operations = 0; unsigned int completed_sub_operations=0; unsigned int failed_sub_operations=0; unsigned int warning_sub_operations=0; auto const & move_originator_aet = this->_association.get_negotiated_parameters().get_calling_ae_title(); auto const & move_originator_message_id = request->get_message_id(); try { this->_generator->initialize(request); remaining_sub_operations = this->_generator->count(); while(!this->_generator->done()) { auto response = std::make_shared( request->get_message_id(), message::CMoveResponse::Pending); response->set_number_of_remaining_sub_operations( remaining_sub_operations); response->set_number_of_completed_sub_operations( completed_sub_operations); response->set_number_of_failed_sub_operations( failed_sub_operations); response->set_number_of_warning_sub_operations( warning_sub_operations); this->_association.send_message( response, request->get_affected_sop_class_uid()); auto data_set = this->_generator->get(); store_scu.set_affected_sop_class(data_set); try { store_scu.store( data_set, move_originator_aet, move_originator_message_id); --remaining_sub_operations; ++completed_sub_operations; } catch(Exception const &) { --remaining_sub_operations; ++failed_sub_operations; } this->_generator->next(); } } catch(SCP::Exception const & e) { final_status = e.status; status_fields = e.status_fields; } catch(odil::Exception const & e) { status_fields->add(registry::ErrorComment, {e.what()}); final_status = message::CMoveResponse::UnableToProcess; } auto response = std::make_shared( request->get_message_id(), final_status); response->set_status_fields(status_fields); response->set_number_of_remaining_sub_operations(remaining_sub_operations); response->set_number_of_completed_sub_operations(completed_sub_operations); response->set_number_of_failed_sub_operations(failed_sub_operations); response->set_number_of_warning_sub_operations(warning_sub_operations); this->_association.send_message( response, request->get_affected_sop_class_uid()); } } odil-0.11.0/src/odil/MoveSCP.h000066400000000000000000000040571362244656000157010ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _7e899e10_2a21_45b8_a2d6_af1d13cbfd29 #define _7e899e10_2a21_45b8_a2d6_af1d13cbfd29 #include #include #include #include #include "odil/Association.h" #include "odil/odil.h" #include "odil/SCP.h" #include "odil/message/CMoveRequest.h" #include "odil/message/Message.h" namespace odil { /// @brief SCP for C-Move services. class ODIL_API MoveSCP: public SCP { public: /// @brief Generator of C-MOVE responses. class DataSetGenerator: public SCP::DataSetGenerator { public: /// @brief Return the number of responses. virtual unsigned int count() const =0; /** * @brief Return the sub-association to send responses on. * * If the move destination is unknown, an odil::Exception must be * thrown. */ virtual Association get_association( std::shared_ptr) const =0; }; /// @brief Constructor. MoveSCP(Association & association); /// @brief Constructor. MoveSCP( Association & association, std::shared_ptr const & generator); /// @brief Return the generator. std::shared_ptr get_generator() const; /// @brief Set the generator. void set_generator(std::shared_ptr const & generator); /// @brief Process a C-Get request. virtual void operator()(std::shared_ptr message); private: std::shared_ptr _generator; void operator()(std::shared_ptr request); }; } #endif // _7e899e10_2a21_45b8_a2d6_af1d13cbfd29 odil-0.11.0/src/odil/MoveSCU.cpp000066400000000000000000000135501362244656000162370ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/MoveSCU.h" #include #include #include #include #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/logging.h" #include "odil/StoreSCP.h" #include "odil/message/CMoveRequest.h" #include "odil/message/CMoveResponse.h" #include "odil/message/Message.h" namespace odil { MoveSCU ::MoveSCU(Association & association) : SCU(association), _move_destination(""), _incoming_port(0) { // Nothing else. } std::string const & MoveSCU ::get_move_destination() const { return this->_move_destination; } void MoveSCU ::set_move_destination(std::string const & move_destination) { this->_move_destination = move_destination; } uint16_t MoveSCU ::get_incoming_port() const { return this->_incoming_port; } void MoveSCU ::set_incoming_port(uint16_t port) { this->_incoming_port = port; } void MoveSCU ::move(std::shared_ptr query, StoreCallback store_callback) const { this->move(query, store_callback, MoveCallback()); } void MoveSCU ::move(std::shared_ptr query, MoveCallback move_callback) const { this->move(query, StoreCallback(), move_callback); } void MoveSCU ::move( std::shared_ptr query, StoreCallback store_callback, MoveCallback move_callback) const { // Send the request auto request = std::make_shared( this->_association.next_message_id(), this->_affected_sop_class, message::Message::Priority::MEDIUM, this->_move_destination, query); this->_move(request, store_callback, move_callback); } void MoveSCU ::_move( std::shared_ptr request, StoreCallback store_callback, MoveCallback move_callback) const { this->_association.send_message(request, this->_affected_sop_class); // Receive the responses Association store_association; bool done = false; if(this->_incoming_port != 0) { while(!done) { // Use a small timeout to avoid blocking for a long time. boost::posix_time::milliseconds const timeout(10); store_association.set_tcp_timeout(timeout); store_association.set_message_timeout(timeout); if(!store_association.is_associated()) { try { store_association.receive_association( boost::asio::ip::tcp::v4(), this->_incoming_port); store_association.set_tcp_timeout( this->_association.get_tcp_timeout()); store_association.set_message_timeout( this->_association.get_message_timeout()); } catch(Exception const & e) { // Ignore } if(store_association.is_associated()) { done = true; } } } } this->_dispatch(store_association, store_callback, move_callback); } std::vector> MoveSCU ::move(std::shared_ptr query) const { std::vector> result; auto callback = [&result](std::shared_ptr data_set) { result.push_back(data_set); }; this->move(query, callback, MoveCallback()); return result; } void MoveSCU ::_dispatch( Association & store_association, StoreCallback store_callback, MoveCallback move_callback) const { // If no store association has been established, store is considered done bool store_done = !store_association.is_associated(); bool main_done = false; while(!(store_done && main_done)) { if(!store_done && store_association.get_transport().get_socket()->available() > 0) { store_done = this->_handle_store_association( store_association, store_callback); } if(!main_done && this->_association.get_transport().get_socket()->available() > 0) { main_done = this->_handle_main_association(move_callback); } std::this_thread::sleep_for(std::chrono::milliseconds(10)); } } bool MoveSCU ::_handle_main_association(MoveCallback callback) const { auto response = std::make_shared( this->_association.receive_message()); if(message::Response::is_warning(response->get_status())) { ODIL_LOG(error) << "C-MOVE response status: " << response->get_status(); } else if(message::Response::is_failure(response->get_status())) { ODIL_LOG(error) << "C-MOVE response status: " << response->get_status(); } // Store status before moving the response. auto const done = !response->is_pending(); if(callback) { callback(response); } return done; } bool MoveSCU ::_handle_store_association( Association & association, StoreCallback callback) const { bool result = false; try { auto const store_callback = [&callback](std::shared_ptr request) { if(callback) { callback(request->get_data_set()); } return message::Response::Success; }; StoreSCP scp(association, store_callback); scp.receive_and_process(); } catch(AssociationReleased const &) { result = true; } catch(AssociationAborted const & e) { result = true; } return result; } } odil-0.11.0/src/odil/MoveSCU.h000066400000000000000000000061011362244656000156760ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _5ff4d940_4db7_4d85_9d3a_230b944b31fe #define _5ff4d940_4db7_4d85_9d3a_230b944b31fe #include #include #include #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/message/CMoveRequest.h" #include "odil/message/CMoveResponse.h" #include "odil/odil.h" #include "odil/SCU.h" namespace odil { /// @brief SCU for C-MOVE services. class ODIL_API MoveSCU: public SCU { public: /// @brief Callback called when a C-STORE request is received. typedef std::function)> StoreCallback; /** * @brief Typedef to keep compatibility with previous versions. * @deprecated The StoreCallback typedef should now be used. */ typedef StoreCallback Callback; /// @brief Callback called when a C-MOVE response is received. typedef std::function< void(std::shared_ptr) > MoveCallback; /// @brief Constructor. MoveSCU(Association & association); /// @brief Return the AE title of the destination, defaults to "". std::string const & get_move_destination() const; /// @brief Set the AE title of the destination. void set_move_destination(std::string const & move_destination); /// @brief Return the port for incoming associations, defaults to 0. uint16_t get_incoming_port() const; /// @brief Set the port for incoming associations, use 0 to disable. void set_incoming_port(uint16_t port); /// @brief Perform the C-MOVE using callbacks. void move( std::shared_ptr query, StoreCallback store_callback) const; /// @brief Perform the C-MOVE using callbacks. void move( std::shared_ptr query, MoveCallback move_callback) const; /// @brief Perform the C-MOVE using callbacks. void move( std::shared_ptr query, StoreCallback store_callback, MoveCallback move_callback) const; /** * @brief Return a list of datasets matching the query. */ std::vector> move( std::shared_ptr query) const; private: std::string _move_destination; uint16_t _incoming_port; void _move( std::shared_ptr request, StoreCallback store_callback, MoveCallback move_callback) const; void _dispatch( Association & store_association, StoreCallback store_callback, MoveCallback move_callback) const; bool _handle_main_association(MoveCallback callback) const; bool _handle_store_association( Association & association, StoreCallback callback) const; }; } #endif // _5ff4d940_4db7_4d85_9d3a_230b944b31fe odil-0.11.0/src/odil/NCreateSCP.cpp000066400000000000000000000042151362244656000166430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/NCreateSCP.h" #include #include "odil/Association.h" #include "odil/SCP.h" #include "odil/Value.h" #include "odil/message/NCreateResponse.h" namespace odil { NCreateSCP ::NCreateSCP(Association & association) : SCP(association), _callback() { // Nothing else. } NCreateSCP ::NCreateSCP(Association & association, Callback const & callback) : SCP(association), _callback() { this->set_callback(callback); } NCreateSCP::Callback const & NCreateSCP::get_callback() const { return this->_callback; } void NCreateSCP ::set_callback(Callback const & callback) { this->_callback = callback; } void NCreateSCP ::operator()(std::shared_ptr message) { auto request = std::make_shared(message); this->operator()(request); } void NCreateSCP ::operator()(std::shared_ptr request) { Value::Integer status=message::NCreateResponse::Success; auto status_fields = std::make_shared(); try { status = this->_callback(request); } catch(SCP::Exception const & e) { status = e.status; status_fields = e.status_fields; } catch(odil::Exception const &) { status = message::NCreateResponse::ProcessingFailure; } auto response = std::make_shared( request->get_message_id(), status, request->get_affected_sop_class_uid()); if(request->has_affected_sop_instance_uid()) { response->set_affected_sop_instance_uid( request->get_affected_sop_instance_uid()); } response->set_status_fields(status_fields); this->_association.send_message( response, request->get_affected_sop_class_uid()); } } odil-0.11.0/src/odil/NCreateSCP.h000066400000000000000000000031741362244656000163130ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _918ce553_d774_44c0_9cbf_56f32584a1ab #define _918ce553_d774_44c0_9cbf_56f32584a1ab #include #include "odil/Association.h" #include "odil/odil.h" #include "odil/SCP.h" #include "odil/Value.h" #include "odil/message/NCreateRequest.h" #include "odil/message/Message.h" namespace odil { /// @brief SCP for N-Create services. class ODIL_API NCreateSCP: public SCP { public: /** * @brief Callback called when a request is received, shall throw an * SCP::Exception on error. */ typedef std::function< Value::Integer(std::shared_ptr) > Callback; /// @brief Constructor. NCreateSCP(Association & association); /// @brief Constructor. NCreateSCP(Association & association, Callback const & callback); /// @brief Return the callback. Callback const & get_callback() const; /// @brief Set the callback. void set_callback(Callback const & callback); /// @brief Process a N-Create request. virtual void operator()(std::shared_ptr message); private: Callback _callback; void operator()(std::shared_ptr message); }; } #endif // _918ce553_d774_44c0_9cbf_56f32584a1ab odil-0.11.0/src/odil/NSetSCP.cpp000066400000000000000000000037731362244656000162030ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/Association.h" #include "odil/NSetSCP.h" #include "odil/SCP.h" #include "odil/Value.h" #include "odil/message/NSetResponse.h" #include namespace odil { NSetSCP ::NSetSCP(Association& association) : SCP(association), _callback() { // Nothing else. } NSetSCP ::NSetSCP(Association& association, Callback const& callback) : SCP(association), _callback() { this->set_callback(callback); } NSetSCP::Callback const & NSetSCP::get_callback() const { return this->_callback; } void NSetSCP ::set_callback(Callback const & callback) { this->_callback = callback; } void NSetSCP ::operator()(std::shared_ptr message) { auto request = std::make_shared(message); this->operator()(request); } void NSetSCP ::operator()(std::shared_ptr request) { Value::Integer status = message::NSetResponse::Success; auto status_fields = std::make_shared(); try { status = this->_callback(request); } catch(SCP::Exception const& e) { status = e.status; status_fields = e.status_fields; } catch(odil::Exception const&) { status = message::NSetResponse::ProcessingFailure; } auto response = std::make_shared( request->get_message_id(), status, request->get_requested_sop_class_uid(), request->get_requested_sop_instance_uid() ); response->set_status_fields(status_fields); this->_association.send_message( response, request->get_requested_sop_class_uid()); } } odil-0.11.0/src/odil/NSetSCP.h000066400000000000000000000031441362244656000156400ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _cca2fb7a_c3b6_47f4_a619_44701b074cda #define _cca2fb7a_c3b6_47f4_a619_44701b074cda #include #include "odil/Association.h" #include "odil/odil.h" #include "odil/SCP.h" #include "odil/Value.h" #include "odil/message/Message.h" #include "odil/message/NSetRequest.h" namespace odil { /// @brief SCP for N-Set services. class ODIL_API NSetSCP: public SCP { public: /** * @brief Callback called when a request is received, shall throw an * SCP::Exception on error. */ typedef std::function< Value::Integer(std::shared_ptr) > Callback; /// @brief Constructor. NSetSCP(Association & association); /// @brief Constructor. NSetSCP(Association & association, Callback const & callback); /// @brief Return the callback. Callback const & get_callback() const; /// @brief Set the callback. void set_callback(Callback const & callback); /// @brief Process a N-Set request. virtual void operator()(std::shared_ptr message); private: Callback _callback; void operator()(std::shared_ptr message); }; } #endif // _cca2fb7a_c3b6_47f4_a619_44701b074cda odil-0.11.0/src/odil/NSetSCU.cpp000066400000000000000000000035331362244656000162020ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "NSetSCU.h" #include #include #include #include #include "odil/message/NSetRequest.h" #include "odil/message/NSetResponse.h" #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/SCU.h" namespace odil { NSetSCU ::NSetSCU(Association & association) : SCU(association) { // Nothing else. } void NSetSCU ::set_affected_sop_class(std::shared_ptr dataset) { auto const & sop_class_uid = dataset->as_string( registry::RequestedSOPClassUID, 0); this->SCU::set_affected_sop_class(sop_class_uid); } void NSetSCU ::set(std::shared_ptr dataset) const { auto request = std::make_shared( this->_association.next_message_id(), this->_affected_sop_class, dataset->as_string(registry::RequestedSOPInstanceUID, 0), dataset); this->_association.send_message(request, this->_affected_sop_class); auto response = std::make_shared( this->_association.receive_message()); if(response->get_message_id_being_responded_to() != request->get_message_id()) { std::ostringstream message; message << "DIMSE: Unexpected Response MsgId: " << response->get_message_id_being_responded_to() << "(expected: " << request->get_message_id() << ")"; throw Exception(message.str()); } } } odil-0.11.0/src/odil/NSetSCU.h000066400000000000000000000020331362244656000156410ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _c80c338c_36d7_4724_9732_c7afed87902b #define _c80c338c_36d7_4724_9732_c7afed87902b #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/SCU.h" namespace odil { /// @brief SCU for C-Store services. class ODIL_API NSetSCU: public SCU { public: /// @brief Constructor. NSetSCU(Association & association); /// @brief Set the affected SOP class based on the dataset. void set_affected_sop_class(std::shared_ptr dataset); /// @brief Perform the N-SET. void set(std::shared_ptr dataset) const; }; } #endif // _c80c338c_36d7_4724_9732_c7afed87902b odil-0.11.0/src/odil/Reader.cpp000066400000000000000000000477021362244656000161660ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/Reader.h" #include #include #include #include #include #include #include #include #include #include "odil/DataSet.h" #include "odil/Element.h" #include "odil/endian.h" #include "odil/Exception.h" #include "odil/logging.h" #include "odil/registry.h" #include "odil/Tag.h" #include "odil/Value.h" #include "odil/VR.h" #include "odil/VRFinder.h" std::string read_string(std::istream & stream, unsigned int size) { if(size == 0) { return std::string(); } std::string value(size, '\0'); stream.read(&value[0], value.size()); if(!stream) { throw odil::Exception("Cannot read string"); } return value; } namespace odil { Value::Binary Reader ::read_encapsulated_pixel_data( std::istream & stream, ByteOrdering byte_ordering, std::string transfer_syntax, bool keep_group_length) { Value::Binary value; // PS 3.5, A.4 Reader const sequence_reader(stream, transfer_syntax, keep_group_length); bool done = false; while(!done) { auto const tag = sequence_reader.read_tag(); auto const item_length = Reader::read_binary( stream, byte_ordering); if(tag == registry::Item) { Value::Binary::value_type item_data(item_length); if(item_length > 0) { stream.read( reinterpret_cast(&item_data[0]), item_length); if(!stream) { throw Exception("Could not read from stream"); } } value.push_back(item_data); } else if(tag == registry::SequenceDelimitationItem) { // No value for Sequence Delimitation Item done = true; } else { throw Exception( "Expected SequenceDelimitationItem, got: "+std::string(tag)); } } return value; } void Reader ::ignore(std::istream & stream, std::streamsize size) { stream.ignore(size); if(!stream) { throw Exception("Could not read from stream"); } } Reader ::Reader( std::istream & stream, std::string const & transfer_syntax, bool keep_group_length) : stream(stream), transfer_syntax(transfer_syntax), byte_ordering( (transfer_syntax==registry::ExplicitVRBigEndian_Retired)? ByteOrdering::BigEndian:ByteOrdering::LittleEndian), explicit_vr(transfer_syntax!=registry::ImplicitVRLittleEndian), keep_group_length(keep_group_length) { // Nothing else } std::shared_ptr Reader ::read_data_set(std::function halt_condition) const { auto data_set = std::make_shared(this->transfer_syntax); bool done = (this->stream.peek() == EOF); while(!done) { Tag const tag = this->read_tag(); if(halt_condition(tag)) { done = true; this->stream.seekg(-4, std::ios::cur); break; } else { Element element = this->read_element(tag, data_set); if(this->keep_group_length || tag.element != 0) { data_set->add(tag, std::move(element)); } } done = (this->stream.peek() == EOF); } return data_set; } Tag Reader ::read_tag() const { auto const group = this->read_binary( this->stream, this->byte_ordering); auto const element = this->read_binary( this->stream, this->byte_ordering); return Tag(group, element); } uint32_t Reader ::read_length(VR vr) const { uint32_t length; if(this->explicit_vr) { // PS 3.5, 7.1.2 if(is_binary(vr) || vr == VR::SQ || vr == VR::UC || vr == VR::UR || vr == VR::UT) { Reader::ignore(this->stream, 2); auto const vl = Reader::read_binary( this->stream, this->byte_ordering); length = vl; } else { auto const vl = Reader::read_binary( this->stream, this->byte_ordering); length = vl; } } else { auto const vl = Reader::read_binary( this->stream, this->byte_ordering); length = vl; } return length; } Element Reader ::read_element(Tag const & tag, std::shared_ptr data_set) const { VR vr; if(this->explicit_vr) { vr = as_vr(read_string(this->stream, 2)); } else { VRFinder const vr_finder; vr = vr_finder(tag, data_set, this->transfer_syntax); } std::shared_ptr value; auto const vl = this->read_length(vr); if(is_int(vr)) { value = std::make_shared(Value::Integers()); } else if(is_real(vr)) { value = std::make_shared(Value::Reals()); } else if(is_string(vr)) { value = std::make_shared(Value::Strings()); } else if(vr == VR::SQ) { value = std::make_shared(Value::DataSets()); } else if(is_binary(vr)) { value = std::make_shared(Value::Binary()); } else { throw Exception("Cannot create value for VR " + as_string(vr)); } if(vl > 0) { Visitor visitor( this->stream, vr, vl, this->transfer_syntax, this->byte_ordering, this->explicit_vr, this->keep_group_length); apply_visitor(visitor, *value); } return Element(*value, vr); } std::pair, std::shared_ptr> Reader ::read_file( std::istream & stream, bool keep_group_length, std::function halt_condition) { // File preamble stream.ignore(128); if(!stream) { throw Exception("Cannot read preamble"); } // DICOM prefix std::string const prefix = read_string(stream, 4); if(prefix != "DICM") { throw Exception("Unexpected prefix: \""+prefix+"\""); } // Read meta information Reader meta_information_reader( stream, registry::ExplicitVRLittleEndian, keep_group_length); auto meta_information = meta_information_reader.read_data_set( [](Tag const & tag) { return (tag.group != 0x0002); }); if(!meta_information->has(registry::TransferSyntaxUID)) { throw Exception("Missing Transfer Syntax UID"); } if(!meta_information->is_string(registry::TransferSyntaxUID)) { throw Exception("Transfer Syntax UID is not a string"); } if(meta_information->as_string(registry::TransferSyntaxUID).size()<1) { throw Exception("Empty Transfer Syntax UID"); } Reader data_set_reader( stream, meta_information->as_string(registry::TransferSyntaxUID)[0], keep_group_length); auto data_set = data_set_reader.read_data_set(halt_condition); return std::make_pair(meta_information, data_set); } Reader::Visitor ::Visitor( std::istream & stream, VR vr, uint32_t vl, std::string const & transfer_syntax, ByteOrdering byte_ordering, bool explicit_vr, bool keep_group_length) : stream(stream), vr(vr), vl(vl), transfer_syntax(transfer_syntax), byte_ordering(byte_ordering), explicit_vr(explicit_vr), keep_group_length(keep_group_length) { // Nothing else } Reader::Visitor::result_type Reader::Visitor ::operator()(Value::Integers & value) const { if(this->vr == VR::IS) { auto const string = read_string(this->stream, this->vl); if(!string.empty()) { auto const strings = this->split_strings(string); value.resize(strings.size()); std::transform( strings.begin(), strings.end(), value.begin(), [](std::string const & s) { long long value = 0; try { value = std::stoll(s); } catch(std::invalid_argument const &) { ODIL_LOG(error) << "Cannot convert \"" << s << "\" to IS, " << "setting to 0"; } return static_cast(value); }); } } else { uint32_t items = 0; if(this->vr == VR::SV || this->vr == VR::UV) { items = this->vl/8; } else if(this->vr == VR::SL || this->vr == VR::UL) { items = this->vl/4; } else if(this->vr == VR::AT || this->vr == VR::SS || this->vr == VR::US) { items = this->vl/2; } else { throw Exception("Cannot read integers from "+as_string(this->vr)); } value.resize(items); for(unsigned int i=0; ivr == VR::SV) { auto const item = Reader::read_binary( this->stream, this->byte_ordering); value[i] = item; } else if(this->vr == VR::SL) { auto const item = Reader::read_binary( this->stream, this->byte_ordering); value[i] = item; } else if(this->vr == VR::SS) { auto const item = Reader::read_binary( this->stream, this->byte_ordering); value[i] = item; } else if(this->vr == VR::UV) { auto const item = Reader::read_binary( this->stream, this->byte_ordering); value[i] = item; } else if(this->vr == VR::UL) { auto const item = Reader::read_binary( this->stream, this->byte_ordering); value[i] = item; } else if(this->vr == VR::AT || this->vr == VR::US) { auto const item = Reader::read_binary( this->stream, this->byte_ordering); value[i] = item; } } } } Reader::Visitor::result_type Reader::Visitor ::operator()(Value::Reals & value) const { if(this->vr == VR::DS) { auto const string = read_string(this->stream, this->vl); if(!string.empty()) { auto const strings = this->split_strings(string); value.resize(strings.size()); std::transform( strings.begin(), strings.end(), value.begin(), [](std::string const & s) { long double value = 0; try { value = std::stold(s); } catch(std::invalid_argument const &) { ODIL_LOG(error) << "Cannot convert \"" << s << "\" to DS, " << "setting to 0"; } return static_cast(value); } ); } } else { uint32_t items = 0; if(this->vr == VR::FD) { items = this->vl/8; } else if(this->vr == VR::FL) { items = this->vl/4; } else { throw Exception("Cannot read reals from "+as_string(this->vr)); } value.resize(items); for(unsigned int i=0; ivr == VR::FD) { auto const item = Reader::read_binary( this->stream, this->byte_ordering); value[i] = item; } else if(this->vr == VR::FL) { auto const item = Reader::read_binary( this->stream, this->byte_ordering); value[i] = item; } } } } Reader::Visitor::result_type Reader::Visitor ::operator()(Value::Strings & value) const { if(this->vr == VR::AT) { Value::Integers integers; this->operator()(integers); if(integers.size()%2 != 0) { throw Exception("Cannot read AT from odd-sized array"); } for(unsigned int i=0; istream, this->vl); if(this->vr == VR::LT || this->vr == VR::ST || this->vr == VR::UT) { value = { string }; } else { value = this->split_strings(string); } // Remove padding static std::string const padding={ '\0', ' ' }; for(auto & item: value) { auto const last_char = item.find_last_not_of(padding); if(last_char != std::string::npos) { item = item.substr(0, last_char+1); } } } } Reader::Visitor::result_type Reader::Visitor ::operator()(Value::DataSets & value) const { if(this->vl != 0xffffffff) { // Explicit length sequence std::string const data = read_string(this->stream, this->vl); std::istringstream sequence_stream(data); Reader const sequence_reader( sequence_stream, this->transfer_syntax, this->keep_group_length); bool done = (sequence_stream.peek() == EOF); while(!done) { auto const tag = sequence_reader.read_tag(); if(tag == registry::Item) { value.push_back(this->read_item(sequence_stream)); } else { throw Exception("Expected Item, got: "+std::string(tag)); } done = (sequence_stream.peek() == EOF); } } else { // Undefined length sequence Reader const sequence_reader( this->stream, this->transfer_syntax, this->keep_group_length); bool done = false; while(!done) { auto const tag = sequence_reader.read_tag(); if(tag == registry::Item) { value.push_back(this->read_item(this->stream)); } else if(tag == registry::SequenceDelimitationItem) { done = true; Reader::ignore(this->stream, 4); } else { throw Exception("Expected SequenceDelimitationItem, got: "+std::string(tag)); } } } } Reader::Visitor::result_type Reader::Visitor ::operator()(Value::Binary & value) const { if(this->vl == 0) { return; } else if(this->vl == 0xffffffff) { value = Reader::read_encapsulated_pixel_data( this->stream, this->byte_ordering, this->transfer_syntax, this->keep_group_length); } else { value.resize(1); if(this->vr == VR::OB || this->vr == VR::UN) { value[0].resize(this->vl); this->stream.read( reinterpret_cast(&value[0][0]), value[0].size()); } else if(this->vr == VR::OD) { if(this->vl%8 != 0) { throw Exception("Cannot read OD for odd-sized array"); } value[0].resize(this->vl); for(unsigned int i=0; i( this->stream, this->byte_ordering); *reinterpret_cast(&value[0][i]) = item; } } else if(this->vr == VR::OF) { if(this->vl%4 != 0) { throw Exception("Cannot read OF for odd-sized array"); } value[0].resize(this->vl); for(unsigned int i=0; i( this->stream, this->byte_ordering); *reinterpret_cast(&value[0][i]) = item; } } else if(this->vr == VR::OL) { if(this->vl%4 != 0) { throw Exception("Cannot read OL for odd-sized array"); } value[0].resize(this->vl); for(unsigned int i=0; i( this->stream, this->byte_ordering); *reinterpret_cast(&value[0][i]) = item; } } else if(this->vr == VR::OV) { if(this->vl%8 != 0) { throw Exception("Cannot read OV for odd-sized array"); } value[0].resize(this->vl); for(unsigned int i=0; i( this->stream, this->byte_ordering); *reinterpret_cast(&value[0][i]) = item; } } else if(this->vr == VR::OW) { if(this->vl%2 != 0) { throw Exception("Cannot read OW for odd-sized array"); } value[0].resize(this->vl); for(unsigned int i=0; i( this->stream, this->byte_ordering); *reinterpret_cast(&value[0][i]) = item; } } else { throw Exception("Cannot read "+as_string(this->vr)+" as binary"); } } } Value::Strings Reader::Visitor ::split_strings(std::string const & string) const { unsigned int const items_count = 1+std::count(string.begin(), string.end(), '\\'); std::vector value(items_count); std::string::size_type begin = 0; unsigned int index=0; while(begin != string.size()) { auto const end = string.find('\\', begin); auto const item = string.substr( begin, (end==std::string::npos)?end:(end-begin)); value[index] = item; ++index; begin = (end==std::string::npos)?string.size():(end+1); } return value; } std::shared_ptr Reader::Visitor ::read_item(std::istream & specific_stream) const { auto const item_length = Reader::read_binary( specific_stream, this->byte_ordering); std::shared_ptr item; if(item_length != 0xffffffff) { // Explicit length item std::string const data = read_string(specific_stream, item_length); std::istringstream item_stream(data); Reader const item_reader( item_stream, this->transfer_syntax, this->keep_group_length); item = item_reader.read_data_set(); } else { // Undefined length item Reader const item_reader( specific_stream, this->transfer_syntax, this->keep_group_length); item = item_reader.read_data_set( [](Tag const & tag) { return tag == registry::ItemDelimitationItem; }); auto const tag = item_reader.read_tag(); if(tag != registry::ItemDelimitationItem) { throw Exception("Unexpected tag: "+std::string(tag)); } Reader::ignore(specific_stream, 4); } return item; } } odil-0.11.0/src/odil/Reader.h000066400000000000000000000102331362244656000156200ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _aa2965aa_e891_4713_9c90_e8eacd2944ea #define _aa2965aa_e891_4713_9c90_e8eacd2944ea #include #include #include #include #include "odil/DataSet.h" #include "odil/Element.h" #include "odil/endian.h" #include "odil/odil.h" #include "odil/Tag.h" #include "odil/Value.h" #include "odil/VR.h" namespace odil { /// @brief Read DICOM objects from a stream. class ODIL_API Reader { public: /// @brief Input stream. std::istream & stream; /// @brief Transfer syntax used to read the file. std::string transfer_syntax; /// @brief Endianness. ByteOrdering byte_ordering; /// @brief Explicit-ness of the Value Representations. bool explicit_vr; /// @brief Flag to keep or discard group length tags. bool keep_group_length; /** * @brief Read binary data from an stream encoded with the given endianness, * ensure stream is still good. */ template static T read_binary(std::istream & stream, ByteOrdering byte_ordering); /// @brief Read pixel data in encapsulated form. static Value::Binary read_encapsulated_pixel_data( std::istream & stream, ByteOrdering byte_ordering, std::string transfer_syntax, bool keep_group_length=false); /// @brief Ignore data from a stream, ensure stream is still good. static void ignore(std::istream & stream, std::streamsize size); /** * @brief Build a reader, derive byte ordering and explicit-ness of VR * from transfer syntax. */ Reader( std::istream & stream, std::string const & transfer_syntax, bool keep_group_length=false); /// @brief Read a data set. std::shared_ptr read_data_set( std::function halt_condition = [](Tag const &) { return false;}) const; /// @brief Read a tag. Tag read_tag() const; /// @brief Read the length of an element. uint32_t read_length(VR vr) const; /** * @brief Read an element (VR and value), try to guess the VR from the tag, * partially read data set, and transfer syntax for implicit VR transfer * syntaxes. */ Element read_element( Tag const & tag=Tag(0xffff,0xffff), std::shared_ptr data_set=std::make_shared()) const; /// @brief Return the meta-data header and data set stored in the stream. static std::pair, std::shared_ptr> read_file( std::istream & stream, bool keep_group_length=false, std::function halt_condition = [](Tag const &) { return false;}); private: struct Visitor { typedef void result_type; std::istream & stream; VR vr; uint32_t vl; std::string transfer_syntax; ByteOrdering byte_ordering; bool explicit_vr; bool keep_group_length; Visitor( std::istream & stream, VR vr, uint32_t vl, std::string const & transfer_syntax, ByteOrdering byte_ordering, bool explicit_vr, bool keep_group_length); result_type operator()(Value::Integers & value) const; result_type operator()(Value::Reals & value) const; result_type operator()(Value::Strings & value) const; result_type operator()(Value::DataSets & value) const; result_type operator()(Value::Binary & value) const; // uint32_t read_length() const; Value::Strings split_strings(std::string const & string) const; std::shared_ptr read_item(std::istream & specific_stream) const; Value::Binary read_encapsulated_pixel_data( std::istream & specific_stream) const; }; }; } #include "odil/Reader.txx" #endif // _aa2965aa_e891_4713_9c90_e8eacd2944ea odil-0.11.0/src/odil/Reader.txx000066400000000000000000000026051362244656000162200ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _b5ac563c_c5fd_4dcc_815c_66868a4b9614 #define _b5ac563c_c5fd_4dcc_815c_66868a4b9614 #include "odil/Reader.h" #include #include #include #include #include "odil/DataSet.h" #include "odil/Element.h" #include "odil/Exception.h" #include "odil/endian.h" #include "odil/Tag.h" #include "odil/Value.h" #include "odil/VR.h" namespace odil { template T Reader ::read_binary(std::istream & stream, ByteOrdering byte_ordering) { T value; stream.read(reinterpret_cast(&value), sizeof(value)); if(!stream) { throw Exception("Could not read from stream"); } if(byte_ordering == ByteOrdering::LittleEndian) { value = little_endian_to_host(value); } else if(byte_ordering == ByteOrdering::BigEndian) { value = big_endian_to_host(value); } else { throw Exception("Unknown endianness"); } return value; } } #endif // _b5ac563c_c5fd_4dcc_815c_66868a4b9614 odil-0.11.0/src/odil/SCP.cpp000066400000000000000000000021651362244656000154030ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "SCP.h" #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/message/Message.h" #include "odil/message/Request.h" namespace odil { SCP::DataSetGenerator ::~DataSetGenerator() { // Nothing to do. } SCP::Exception ::Exception( std::string const & message, Value::Integer status, std::shared_ptr status_fields) : odil::Exception(message), status(status), status_fields(status_fields) { // Nothing else. } SCP::Exception ::~Exception() noexcept { // Nothing to do. } SCP ::SCP(Association & association) : _association(association) { // Nothing else. } void SCP ::receive_and_process() { auto message = this->_association.receive_message(); (*this)(message); } } odil-0.11.0/src/odil/SCP.h000066400000000000000000000047331362244656000150530ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _f4680d8c_18a8_4317_956d_3ae238cb39cc #define _f4680d8c_18a8_4317_956d_3ae238cb39cc #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/message/Message.h" #include "odil/message/Request.h" #include "odil/odil.h" #include "odil/Value.h" namespace odil { /// @brief Base class for all Service Class Providers. class ODIL_API SCP { public: /** * @brief Abstract base class for SCP returning multiple data sets. * * initialize, done, next and get shall throw an SCP::Exception on error. */ class ODIL_API DataSetGenerator { public: /// @brief Destructor. virtual ~DataSetGenerator() =0; /// @brief Initialize the generator. virtual void initialize( std::shared_ptr request) =0; /// @brief Test whether all elements have been generated. virtual bool done() const =0; /// @brief Prepare the next element. virtual void next() =0; /// @brief Return the current element. virtual std::shared_ptr get() const =0; }; class Exception: public odil::Exception { public: /// @brief Status to be sent back to user. Value::Integer status; /// @brief Status detail fields (e.g. offending element). std::shared_ptr status_fields; /// @brief Constructor. Exception( std::string const & message, Value::Integer status, std::shared_ptr status_fields={}); /// @brief Destructor. virtual ~Exception() noexcept; }; /// @brief Create a Service Class Provider. SCP(Association & association); /// @brief Destructor virtual ~SCP() = default; /// @brief Receive and process a message. void receive_and_process(); /// @brief Process a message. virtual void operator()(std::shared_ptr message) =0; protected: /// @brief Association with peer. Association & _association; }; } #endif // _f4680d8c_18a8_4317_956d_3ae238cb39cc odil-0.11.0/src/odil/SCPDispatcher.cpp000066400000000000000000000034041362244656000174070ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/Association.h" #include "odil/Exception.h" #include "odil/SCP.h" #include "odil/SCPDispatcher.h" #include "odil/Value.h" #include #include #include namespace odil { SCPDispatcher ::SCPDispatcher(Association& association) : _association(association) { // Nothing else. } bool SCPDispatcher ::has_scp(Value::Integer command) const { auto const it = this->_providers.find(command); return (it != this->_providers.end()); } std::shared_ptr const& SCPDispatcher ::get_scp(Value::Integer command) const { auto const it = this->_providers.find(command); if(it == this->_providers.end()) { throw Exception("No such provider"); } return it->second; } void SCPDispatcher ::set_scp(Value::Integer command, std::shared_ptr const& scp) { this->_providers[command] = scp; } void SCPDispatcher ::dispatch() { auto const message = this->_association.receive_message(); auto const it = this->_providers.find(message->get_command_field()); if(it == this->_providers.end()) { std::ostringstream error_message; error_message << "No provider for: " << std::hex << std::setw(4) << std::setfill('0') << message->get_command_field(); throw Exception(error_message.str()); } auto scp = it->second; (*scp)(message); } } odil-0.11.0/src/odil/SCPDispatcher.h000066400000000000000000000027571362244656000170660ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _f0b69ac6_7d52_401d_a2f3_d5d3f7d69376 #define _f0b69ac6_7d52_401d_a2f3_d5d3f7d69376 #include #include #include "odil/Association.h" #include "odil/odil.h" #include "odil/SCP.h" #include "odil/Value.h" namespace odil { /// @brief Dispatch an incoming message to one of the registered SCPs. class ODIL_API SCPDispatcher { public: /// @brief Create a dispatcher with network and association. SCPDispatcher(Association & association); /// @brief Test whether command has an SCP registered. bool has_scp(Value::Integer command) const; /// @brief Return the SCP registered with command. std::shared_ptr const & get_scp(Value::Integer command) const; /// @brief Registered an SCP with command. void set_scp(Value::Integer command, std::shared_ptr const & scp); /// @brief Receive and dispatch an incoming message. void dispatch(); private: typedef std::shared_ptr SCPPointer; Association & _association; std::map > _providers; }; } #endif // _f0b69ac6_7d52_401d_a2f3_d5d3f7d69376 odil-0.11.0/src/odil/SCU.cpp000066400000000000000000000020211362244656000153770ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/SCU.h" #include #include "odil/Association.h" #include "odil/Exception.h" #include "odil/message/CEchoRequest.h" #include "odil/message/CEchoResponse.h" #include "odil/message/Message.h" #include "odil/registry.h" namespace odil { SCU ::SCU(Association & association) : _association(association), _affected_sop_class("") { // Nothing else. } SCU ::~SCU() { // Nothing to do. } std::string const & SCU ::get_affected_sop_class() const { return this->_affected_sop_class; } void SCU ::set_affected_sop_class(std::string const & sop_class) { this->_affected_sop_class = sop_class; } } odil-0.11.0/src/odil/SCU.h000066400000000000000000000023451362244656000150550ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _ba1518e7_8123_46c9_81c0_65439717e40e #define _ba1518e7_8123_46c9_81c0_65439717e40e #include #include "odil/Association.h" #include "odil/odil.h" namespace odil { /// @brief Base class for all Service Class Users. class ODIL_API SCU { public: /// @brief Create a default Service Class User. SCU(Association & association); /// @brief Destructor. virtual ~SCU(); /// @brief Return the affected SOP class. Defaults to "". std::string const & get_affected_sop_class() const; /// @brief Set the affected SOP class void set_affected_sop_class(std::string const & sop_class); protected: /// @brief Association with peer. Association & _association; /// @brief Affected SOP class. std::string _affected_sop_class; }; } #endif // _ba1518e7_8123_46c9_81c0_65439717e40e odil-0.11.0/src/odil/StoreSCP.cpp000066400000000000000000000040371362244656000164200ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/StoreSCP.h" #include #include "odil/Association.h" #include "odil/Exception.h" #include "odil/SCP.h" #include "odil/Value.h" #include "odil/message/CStoreRequest.h" #include "odil/message/CStoreResponse.h" #include "odil/message/CStoreRequest.h" #include "odil/message/CStoreResponse.h" namespace odil { StoreSCP ::StoreSCP(Association & association) : SCP(association), _callback() { // Nothing else. } StoreSCP ::StoreSCP(Association & association, Callback const & callback) : SCP(association), _callback() { this->set_callback(callback); } StoreSCP::Callback const & StoreSCP ::get_callback() const { return this->_callback; } void StoreSCP ::set_callback(Callback const & callback) { this->_callback = callback; } void StoreSCP ::operator()(std::shared_ptr request) { Value::Integer status=message::CStoreResponse::Success; std::shared_ptr status_fields; try { status = this->_callback(request); } catch(SCP::Exception const & e) { status = e.status; status_fields = e.status_fields; } catch(odil::Exception const &) { status = message::CStoreResponse::ProcessingFailure; } auto response = std::make_shared( request->get_message_id(), status); response->set_status_fields(status_fields); this->_association.send_message( response, request->get_affected_sop_class_uid()); } void StoreSCP ::operator()(std::shared_ptr message) { auto request = std::make_shared(message); this->operator()(request); } } odil-0.11.0/src/odil/StoreSCP.h000066400000000000000000000032201362244656000160560ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _fdbf3f51_91f5_464a_b449_c3f994297210 #define _fdbf3f51_91f5_464a_b449_c3f994297210 #include #include "odil/Association.h" #include "odil/odil.h" #include "odil/SCP.h" #include "odil/Value.h" #include "odil/message/CStoreRequest.h" #include "odil/message/Message.h" namespace odil { /// @brief SCP for C-Store services. class ODIL_API StoreSCP: public SCP { public: /** * @brief Callback called when a request is received, shall throw an * SCP::Exception on error. */ typedef std::function< Value::Integer(std::shared_ptr) > Callback; /// @brief Constructor. StoreSCP(Association & association); /// @brief Constructor. StoreSCP(Association & association, Callback const & callback); /// @brief Return the callback. Callback const & get_callback() const; /// @brief Set the callback. void set_callback(Callback const & callback); /// @brief Process a C-Store request. void operator()(std::shared_ptr request); /// @brief Process a C-Store request. virtual void operator()(std::shared_ptr message); private: Callback _callback; }; } #endif // _fdbf3f51_91f5_464a_b449_c3f994297210 odil-0.11.0/src/odil/StoreSCU.cpp000066400000000000000000000075151362244656000164310ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "StoreSCU.h" #include #include #include #include #include "odil/message/CStoreRequest.h" #include "odil/message/CStoreResponse.h" #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/logging.h" #include "odil/registry.h" #include "odil/SCU.h" namespace odil { StoreSCU ::StoreSCU(Association & association) : SCU(association) { // Nothing else. } void StoreSCU ::set_affected_sop_class(std::shared_ptr dataset) { auto const & sop_class_uid = dataset->as_string(registry::SOPClassUID, 0); std::vector storage; for(auto const & uids_it: registry::uids_dictionary) { auto const & name = uids_it.second.name; if(name.find("Storage") != std::string::npos) { storage.push_back(uids_it.first); } } if(std::find(storage.begin(), storage.end(), sop_class_uid) != storage.end()) { this->SCU::set_affected_sop_class(sop_class_uid); } else { throw Exception("Could not guess affected SOP class from dataset"); } } void StoreSCU ::store( std::shared_ptr dataset, Value::String const & move_originator_ae_title , Value::Integer move_originator_message_id ) const { auto request = std::make_shared( this->_association.next_message_id(), this->_affected_sop_class, dataset->as_string(registry::SOPInstanceUID, 0), message::Message::Priority::MEDIUM, dataset, move_originator_ae_title, move_originator_message_id); this->_store(request); } void StoreSCU ::_store(std::shared_ptr request) const { this->_association.send_message(request, this->_affected_sop_class); auto response = std::make_shared( this->_association.receive_message()); if(response->get_message_id_being_responded_to() != request->get_message_id()) { std::ostringstream message; message << "DIMSE: Unexpected Response MsgId: " << response->get_message_id_being_responded_to() << "(expected: " << request->get_message_id() << ")"; throw Exception(message.str()); } if(response->has_affected_sop_class_uid() && response->get_affected_sop_class_uid() != request->get_affected_sop_class_uid()) { std::ostringstream message; message << "DIMSE: Unexpected Response Affected SOP Class UID: " << response->get_affected_sop_class_uid() << " (expected: " << request->get_affected_sop_class_uid() << ")"; throw Exception(message.str()); } if(response->has_affected_sop_instance_uid() && response->get_affected_sop_instance_uid() != request->get_affected_sop_instance_uid()) { std::ostringstream message; message << "DIMSE: Unexpected Response Affected SOP Instance UID: " << response->get_affected_sop_instance_uid() << " (expected: " << request->get_affected_sop_instance_uid() << ")"; throw Exception(message.str()); } if(message::Response::is_warning(response->get_status())) { ODIL_LOG(warning) << "C-STORE response status: " << response->get_status(); } else if(message::Response::is_failure(response->get_status())) { ODIL_LOG(error) << "C-STORE response status: " << response->get_status(); } } } odil-0.11.0/src/odil/StoreSCU.h000066400000000000000000000025071362244656000160720ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _1b2f876e_1ad2_464d_9423_28181320aed0 #define _1b2f876e_1ad2_464d_9423_28181320aed0 #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/message/CStoreRequest.h" #include "odil/odil.h" #include "odil/SCU.h" namespace odil { /// @brief SCU for C-Store services. class ODIL_API StoreSCU: public SCU { public: /// @brief Constructor. StoreSCU(Association & association); /// @brief Set the affected SOP class based on the dataset. void set_affected_sop_class(std::shared_ptr dataset); using SCU::set_affected_sop_class; /// @brief Perform the C-STORE. void store( std::shared_ptr dataset, Value::String const & move_originator_ae_title = "", Value::Integer move_originator_message_id = -1) const; private: void _store(std::shared_ptr request) const; }; } #endif // _1b2f876e_1ad2_464d_9423_28181320aed0 odil-0.11.0/src/odil/StringStream.h000066400000000000000000000022701362244656000170420ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _dadc5c51_56d9_417e_9a96_100ed2838c2a #define _dadc5c51_56d9_417e_9a96_100ed2838c2a #include #include #include #include namespace odil { /// @brief Source stringstream which does not copy its buffer. typedef boost::iostreams::stream IStringStream; template T as(std::string const & string) { T result; IStringStream stream(&string[0], string.size()); stream >> result; return result; } /// @brief Sink stringstream which does not copy its buffer. typedef boost::iostreams::stream< boost::iostreams::back_insert_device > OStringStream; } #endif // _dadc5c51_56d9_417e_9a96_100ed2838c2a odil-0.11.0/src/odil/Tag.cpp000066400000000000000000000071721362244656000154740ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/Tag.h" #include #include #include #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Exception.h" #include "odil/registry.h" namespace odil { Tag ::Tag(uint16_t group, uint16_t element) : group(group), element(element) { // Nothing else } Tag ::Tag(uint32_t tag) : group(tag >> 16), element(tag & 0xffff) { // Nothing else } Tag ::Tag(std::string const & string) { this->_from_string(string); } Tag ::Tag(char const * string) { this->_from_string(string); } bool Tag ::is_private() const { return (this->group%2 == 1); } std::string Tag ::get_name() const { std::string name; auto const iterator = find(registry::public_dictionary, *this); if(iterator != registry::public_dictionary.end()) { name = iterator->second.keyword; } if(name.empty()) { std::string const tag_string(*this); throw Exception("No such element: "+tag_string); } return name; } bool Tag ::operator==(Tag const & other) const { return ((this->group == other.group) && (this->element == other.element)); } bool Tag ::operator!=(Tag const & other) const { return !(*this == other); } bool Tag ::operator<(Tag const & other) const { return ( (this->group < other.group) || (this->group == other.group && this->element < other.element)); } bool Tag ::operator>(Tag const & other) const { return ( (this->group > other.group) || (this->group == other.group && this->element > other.element)); } bool Tag ::operator<=(Tag const & other) const { return !(*this > other); } bool Tag ::operator>=(Tag const & other) const { return !(*this < other); } void Tag ::_from_string(std::string const & string) { bool found = false; uint16_t group; uint16_t element; // Try string form of numeric tag if(string.size() == 8) { try { group = std::stol(string.substr(0, 4), 0, 16); element = std::stol(string.substr(4, 8), 0, 16); found = true; } catch(std::invalid_argument const &) { found = false; } } if(!found) { auto const it = registry::public_tags.find(string); if(it != registry::public_tags.end()) { found = true; group = it->second.group; element = it->second.element; } } if(!found) { throw Exception("No such element: \""+string+"\""); } else { this->group = group; this->element = element; } } Tag ::operator std::string() const { std::ostringstream stream; stream << (*this); return stream.str(); } std::ostream & operator<<(std::ostream & stream, Tag const & tag) { std::ostream::char_type const old_fill = stream.fill(); std::streamsize const old_width = stream.width(); std::ios::fmtflags const flags = stream.flags(); stream << std::hex << std::setw(4) << std::setfill('0') << tag.group << std::setw(4) << std::setfill('0') << tag.element; stream.setf(flags); stream.width(old_width); stream.fill(old_fill); return stream; } } odil-0.11.0/src/odil/Tag.h000066400000000000000000000056511362244656000151410ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _5faf4691_e936_476e_8ad3_40f36a167a74 #define _5faf4691_e936_476e_8ad3_40f36a167a74 #include #include #include #include "odil/odil.h" namespace odil { /** * @brief A DICOM element tag. */ class ODIL_API Tag { public: /// @brief Create a tag based on its group and element as two 16-bits words. Tag(uint16_t group, uint16_t element); /// @brief Create a tag based on its group and element as one 32-bits word. Tag(uint32_t tag=0); /** * @brief Create a tag based on its name or string representation of its * numeric value. * * If the name cannot be found in the public data dictionary, or if the * string is not the representation of a numeric value, a odil::Exception * is raised. */ Tag(std::string const & string); /** * @brief Create a tag based on its name or string representation of its * numeric value. * * If the name cannot be found in the public data dictionary, or if the * string is not the representation of a numeric value, a odil::Exception * is raised. */ Tag(char const * string); /** @addtogroup default_operations Default class operations * @{ */ ~Tag() =default; Tag(Tag const &) =default; Tag(Tag &&) =default; Tag & operator=(Tag const &) =default; Tag & operator=(Tag &&) =default; /// @} /// @brief Group of the tag. uint16_t group; /// @brief Element of the tag. uint16_t element; /// @brief Test whether the tag is private. bool is_private() const; /** * @brief Return the name of the tag. * * If the tag cannot be found in the public data dictionary, * a odil::Exception is raised. */ std::string get_name() const; /// @brief Equality test. bool operator==(Tag const & other) const; /// @brief Difference test. bool operator!=(Tag const & other) const; /// @brief Strict inferiority test. bool operator<(Tag const & other) const; /// @brief Strict superiority test. bool operator>(Tag const & other) const; /// @brief Loose inferiority test. bool operator<=(Tag const & other) const; /// @brief Loose superiority test. bool operator>=(Tag const & other) const; /// @brief Convert to string operator std::string() const; private: void _from_string(std::string const & string); }; /// @brief Stream inserter ODIL_API std::ostream & operator<<(std::ostream & stream, Tag const & tag); } #endif // _5faf4691_e936_476e_8ad3_40f36a167a74 odil-0.11.0/src/odil/UIDsDictionary.cpp000066400000000000000000000012771362244656000176130ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/UIDsDictionary.h" #include #include namespace odil { UIDsDictionaryEntry ::UIDsDictionaryEntry( std::string const & name, std::string const & keyword, std::string const & type) : name(name), keyword(keyword), type(type) { // Nothing else. } } odil-0.11.0/src/odil/UIDsDictionary.h000066400000000000000000000021251362244656000172510ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _7b126e41_bd4d_443f_8873_d2fec52b1019 #define _7b126e41_bd4d_443f_8873_d2fec52b1019 #include #include #include "odil/odil.h" namespace odil { /** * @brief Entry in a dictionary of DICOM UIDs. */ struct ODIL_API UIDsDictionaryEntry { /// @brief Full name. std::string name; /// @brief Brief name. std::string keyword; /// @brief Category. std::string type; /// @brief Constructor. UIDsDictionaryEntry( std::string const & name="", std::string const & keyword="", std::string const & type=""); }; typedef std::map UIDsDictionary; } #endif // _7b126e41_bd4d_443f_8873_d2fec52b1019 odil-0.11.0/src/odil/VR.cpp000066400000000000000000000063561362244656000153130ustar00rootroot00000000000000#include #include #include #include #include "odil/Exception.h" #include "odil/registry.h" #include "odil/Tag.h" // Anonymous namespace, should not be publicly accessed namespace { #define ADD_TO_MAP(map, vr) map[odil::VR::vr] = #vr std::map _build_enum_to_name() { std::map result; ADD_TO_MAP(result, AE); ADD_TO_MAP(result, AS); ADD_TO_MAP(result, AT); ADD_TO_MAP(result, CS); ADD_TO_MAP(result, DA); ADD_TO_MAP(result, DS); ADD_TO_MAP(result, DT); ADD_TO_MAP(result, FL); ADD_TO_MAP(result, FD); ADD_TO_MAP(result, IS); ADD_TO_MAP(result, LO); ADD_TO_MAP(result, LT); ADD_TO_MAP(result, OB); ADD_TO_MAP(result, OD); ADD_TO_MAP(result, OF); ADD_TO_MAP(result, OL); ADD_TO_MAP(result, OW); ADD_TO_MAP(result, PN); ADD_TO_MAP(result, SH); ADD_TO_MAP(result, SL); ADD_TO_MAP(result, SQ); ADD_TO_MAP(result, SS); ADD_TO_MAP(result, ST); ADD_TO_MAP(result, TM); ADD_TO_MAP(result, UC); ADD_TO_MAP(result, UI); ADD_TO_MAP(result, UL); ADD_TO_MAP(result, UN); ADD_TO_MAP(result, UR); ADD_TO_MAP(result, US); ADD_TO_MAP(result, UT); return result; } #undef ADD_TO_MAP std::map _build_name_to_enum() { std::map const enum_to_name = _build_enum_to_name(); std::map result; for(std::map::const_iterator it = enum_to_name.begin(); it != enum_to_name.end(); ++it) { result[it->second] = it->first; } return result; } std::map const _enum_to_name = _build_enum_to_name(); std::map const _name_to_enum = _build_name_to_enum(); } namespace odil { std::string as_string(VR vr) { try { return _enum_to_name.at(vr); } catch(std::out_of_range const &) { throw Exception("Unknown VR: "+std::to_string(static_cast(vr))); } } VR as_vr(std::string const & vr) { try { return _name_to_enum.at(vr); } catch(std::out_of_range const &) { throw Exception("Unknown VR: "+vr); } } VR as_vr(Tag const & tag) { auto const dictionary_it = registry::public_dictionary.find(tag); if(dictionary_it == registry::public_dictionary.end()) { throw Exception("No such element: "+std::string(tag)); } VR const vr(as_vr(std::string(dictionary_it->second.vr))); return vr; } bool is_int(VR vr) { return ( vr == VR::IS || vr == VR::SL || vr == VR::SS || vr == VR::SV || vr == VR::UL || vr == VR::US || vr == VR::UV); } bool is_real(VR vr) { return (vr == VR::DS || vr == VR::FL || vr == VR::FD); } bool is_string(VR vr) { return ( vr == VR::AE || vr == VR::AS || vr == VR::AT || vr == VR::CS || vr == VR::DA || vr == VR::DT || vr == VR::LO || vr == VR::LT || vr == VR::PN || vr == VR::SH || vr == VR::ST || vr == VR::TM || vr == VR::UC || vr == VR::UI || vr == VR::UR || vr == VR::UT); } bool is_binary(VR vr) { return ( vr == VR::OB || vr == VR::OD || vr == VR::OF || vr == VR::OL || vr == VR::OV || vr == VR::OW || vr == VR::UN); } } odil-0.11.0/src/odil/VR.h000066400000000000000000000030561362244656000147520ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _998aa43a_9e90_4d39_a074_a7074ac5c9b8 #define _998aa43a_9e90_4d39_a074_a7074ac5c9b8 #include #include "odil/odil.h" namespace odil { class Tag; /// @brief Value representations of DICOM. enum class VR { UNKNOWN, AE, AS, AT, CS, DA, DS, DT, FL, FD, IS, LO, LT, OB, OD, OF, OL, OV, OW, PN, SH, SL, SQ, SS, ST, SV, TM, UC, UI, UL, UN, UR, US, UT, UV, INVALID=9999 }; /// @brief Convert a VR to its string representation. ODIL_API std::string as_string(VR vr); /** * @brief Convert a string to its VR. * * If the string does not represent a VR, a odil::Exception is raised. */ ODIL_API VR as_vr(std::string const & vr); /** * @brief Guess a VR from a tag. * * If the VR cannot be guessed, a odil::Exception is raised. */ ODIL_API VR as_vr(Tag const & tag); /// @brief Test whether a VR contains integers. ODIL_API bool is_int(VR vr); /// @brief Test whether a VR contains rel numbers. ODIL_API bool is_real(VR vr); /// @brief Test whether a VR contains text. ODIL_API bool is_string(VR vr); /// @brief Test whether a VR contains binary data. ODIL_API bool is_binary(VR vr); } #endif // _998aa43a_9e90_4d39_a074_a7074ac5c9b8 odil-0.11.0/src/odil/VRFinder.cpp000066400000000000000000000232401362244656000164320ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/VRFinder.h" #include #include #include #include #include "odil/DataSet.h" #include "odil/ElementsDictionary.h" #include "odil/Exception.h" #include "odil/logging.h" #include "odil/registry.h" #include "odil/Tag.h" #include "odil/VR.h" namespace odil { std::vector const VRFinder ::default_finders=VRFinder::_get_default_finders(); VRFinder ::VRFinder(bool strict) : finders(), strict(strict) { // Nothing else } VR VRFinder::operator()( Tag const & tag, std::shared_ptr data_set, std::string const & transfer_syntax) const { VR vr = VR::UNKNOWN; for(auto const & finder: this->finders) { try { vr = finder(tag, data_set, transfer_syntax); if (vr != VR::UNKNOWN) { break; } } catch(Exception &) { // Ignore the error, try the next one } } if(vr == VR::UNKNOWN) { for(auto const & finder: VRFinder::default_finders) { try { vr = finder(tag, data_set, transfer_syntax); if (vr != VR::UNKNOWN) { break; } } catch(Exception &) { // Ignore the error, try the next one } } } if(vr == VR::UNKNOWN) { if(this->strict) { throw Exception("Could not find a VR for "+std::string(tag)); } else { ODIL_LOG(info) << "No known VR for " << tag << ", defaulting to UN"; vr = VR::UN; } } return vr; } VR VRFinder ::public_dictionary( Tag const & tag, std::shared_ptr, std::string const &) { VR vr = VR::UNKNOWN; auto const iterator = find(registry::public_dictionary, tag); if(iterator != registry::public_dictionary.end()) { vr = as_vr(iterator->second.vr); } return vr; } VR VRFinder ::group_length( Tag const & tag, std::shared_ptr, std::string const &) { if(tag.element == 0) { return VR::UL; } return VR::UNKNOWN; // Not a group length tag } VR VRFinder ::private_tag( Tag const & tag, std::shared_ptr, std::string const &) { if(tag.group %2 == 1) { return VR::UN; } return VR::UNKNOWN; // Not a private tag } VR VRFinder ::implicit_vr_little_endian( Tag const & tag, std::shared_ptr data_set, std::string const & transfer_syntax) { if(transfer_syntax == registry::ImplicitVRLittleEndian) { // PS3.5, A.1 (c) if(tag == registry::PixelData) { return VR::OW; } else if((tag.group>>8) == 0x60 && tag.element == 0x3000) { return VR::OW; } else if(tag == registry::WaveformData) { return VR::OW; } else if(tag == registry::RedPaletteColorLookupTableData || tag == registry::GreenPaletteColorLookupTableData || tag == registry::BluePaletteColorLookupTableData || tag == registry::AlphaPaletteColorLookupTableData) { return VR::OW; } else if(tag == registry::RedPaletteColorLookupTableDescriptor || tag == registry::GreenPaletteColorLookupTableDescriptor || tag == registry::BluePaletteColorLookupTableDescriptor) { // PS 3.3, C.7.6.3.1.5, note 2 if(!data_set->has(registry::PixelRepresentation)) { throw Exception("Cannot find VR without PixelRepresentation"); } auto const & pixel_representation = data_set->as_int(registry::PixelRepresentation)[0]; return (pixel_representation==0)?(VR::US):(VR::SS); } else if(tag == registry::SegmentedRedPaletteColorLookupTableData || tag == registry::SegmentedGreenPaletteColorLookupTableData || tag == registry::SegmentedBluePaletteColorLookupTableData) { return VR::OW; } else if(tag == registry::LUTData) { return VR::OW; } else if(tag == registry::LUTDescriptor) { // - PS 3.3, C.11.1.1.1: may be heterogeneous, depends on // Pixel Representation // - PS 3.3, C.11.2.1.1: may be heterogeneous, depends on // Pixel Representation, Rescale Slope and Rescale Intercept // - C.11.4.1: always US // - C.11.6.1.1: always US // FIXME This is too context-dependent return VR::UN; } else if(tag == registry::BlendingLookupTableData) { return VR::OW; } else if(tag == registry::VertexPointIndexList || tag == registry::EdgePointIndexList || tag == registry::TrianglePointIndexList || tag == registry::PrimitivePointIndexList) { return VR::OW; } else if(tag == registry::SmallestImagePixelValue || tag == registry::LargestImagePixelValue || tag == registry::SmallestPixelValueInSeries || tag == registry::LargestPixelValueInSeries || tag == registry::PixelPaddingValue) { if(!data_set->has(registry::PixelRepresentation)) { throw Exception("Cannot find VR without PixelRepresentation"); } auto const & pixel_representation = data_set->as_int(registry::PixelRepresentation)[0]; return (pixel_representation==0)?(VR::US):(VR::SS); } else { // Unknown tag return VR::UNKNOWN; } } else { // Unknown transfer syntax return VR::UNKNOWN; } } VR VRFinder ::explicit_vr_little_endian( Tag const & tag, std::shared_ptr data_set, std::string const & transfer_syntax) { if(transfer_syntax == registry::ExplicitVRLittleEndian) { // PS3.5, A.1 (c) if(tag == registry::PixelData) { if(!data_set->has(registry::BitsAllocated)) { throw Exception("Cannot find VR without BitsAllocated"); } auto const & bits_allocated = data_set->as_int(registry::BitsAllocated)[0]; return (bits_allocated<=8)?(VR::OB):(VR::OW); } else if((tag.group>>8) == 0x60 && tag.element == 0x3000) { return VR::OW; } else if(tag == registry::WaveformData) { return VR::OW; } else if(tag == registry::RedPaletteColorLookupTableData || tag == registry::GreenPaletteColorLookupTableData || tag == registry::BluePaletteColorLookupTableData || tag == registry::AlphaPaletteColorLookupTableData) { return VR::OW; } else if(tag == registry::RedPaletteColorLookupTableDescriptor || tag == registry::GreenPaletteColorLookupTableDescriptor || tag == registry::BluePaletteColorLookupTableDescriptor) { // PS 3.3, C.7.6.3.1.5, note 2 if(!data_set->has(registry::PixelRepresentation)) { throw Exception("Cannot find VR without PixelRepresentation"); } auto const & pixel_representation = data_set->as_int(registry::PixelRepresentation)[0]; return (pixel_representation==0)?(VR::US):(VR::SS); } else if(tag == registry::SegmentedRedPaletteColorLookupTableData || tag == registry::SegmentedGreenPaletteColorLookupTableData || tag == registry::SegmentedBluePaletteColorLookupTableData) { return VR::OW; } // LUTData // LUTDescriptor else if(tag == registry::BlendingLookupTableData) { return VR::OW; } else if(tag == registry::VertexPointIndexList || tag == registry::EdgePointIndexList || tag == registry::TrianglePointIndexList || tag == registry::PrimitivePointIndexList) { return VR::OW; } else if(tag == registry::SmallestImagePixelValue || tag == registry::LargestImagePixelValue || tag == registry::SmallestPixelValueInSeries || tag == registry::LargestPixelValueInSeries || tag == registry::PixelPaddingValue) { if(!data_set->has(registry::PixelRepresentation)) { throw Exception("Cannot find VR without PixelRepresentation"); } auto const & pixel_representation = data_set->as_int(registry::PixelRepresentation)[0]; return (pixel_representation==0)?(VR::US):(VR::SS); } else { // Unknown tag return VR::UNKNOWN; } } else { // Unknown transfer syntax return VR::UNKNOWN; } } std::vector VRFinder ::_get_default_finders() { return { group_length, private_tag, implicit_vr_little_endian, explicit_vr_little_endian, public_dictionary }; } } odil-0.11.0/src/odil/VRFinder.h000066400000000000000000000055031362244656000161010ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _b7afd80f_327e_4d9a_b0fa_88c565add7b3 #define _b7afd80f_327e_4d9a_b0fa_88c565add7b3 #include #include #include #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/Tag.h" #include "odil/VR.h" namespace odil { /// @brief Find the VR of elements in an implicit VR data set. class ODIL_API VRFinder { public: /** * @brief Prototype of finder functions. * * Finder functions must raise an exception if they are not applicable. */ typedef std::function, std::string const &)> Finder; /// @brief Default finder functions. static std::vector const default_finders; /// @brief User-defined finder functions, empty by default. std::vector finders; /** * @brief Whether to raise an exception when a VR is not found, or to * return VR::UN. */ bool strict; /// @brief Constructor. VRFinder(bool strict=false); /** * @brief Return a VR for the given tag, partially-constructed data set and * transfer-syntax. If no VR can be found, raise an exception. * * The user-defined finders are tried first, then the default_finders. */ VR operator()( Tag const & tag, std::shared_ptr data_set, std::string const & transfer_syntax) const; /// @brief Return the VR from the public dictionary. static VR public_dictionary( Tag const & tag, std::shared_ptr, std::string const &); /// @brief Return the VR of group-length (gggg,0000) elements. static VR group_length( Tag const & tag, std::shared_ptr, std::string const &); /// @brief Return a default VR (UN) for private tags. static VR private_tag( Tag const & tag, std::shared_ptr, std::string const &); /// @brief Return the VR of elements defined in PS3.5, A.1 (c). static VR implicit_vr_little_endian( Tag const & tag, std::shared_ptr data_set, std::string const & transfer_syntax); /// @brief Return the VR of elements defined in PS3.5, A.2 (c). static VR explicit_vr_little_endian( Tag const & tag, std::shared_ptr data_set, std::string const & transfer_syntax); private: static std::vector _get_default_finders(); }; } #endif // _b7afd80f_327e_4d9a_b0fa_88c565add7b3 odil-0.11.0/src/odil/Value.cpp000066400000000000000000000135121362244656000160300ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/Value.h" #include #include #include #include #include #include #include "odil/DataSet.h" #include "odil/Exception.h" namespace { struct IsEmptyValue { typedef bool result_type; template result_type operator()(T const & container) const { return container.empty(); } }; struct ValueSizeGetter { typedef std::size_t result_type; template result_type operator()(T const & container) const { return container.size(); } }; struct ClearValue { typedef void result_type; template result_type operator()(T & container) const { return container.clear(); } }; } namespace odil { #define ODIL_VALUE_CONSTRUCTORS(type, holder) \ Value\ ::Value(type const & value)\ : _type(Type::type), holder(value) \ {} \ \ Value\ ::Value(type && value)\ : _type(Type::type), holder(std::move(value)) \ {} \ \ Value\ ::Value(std::initializer_list const & value)\ : _type(Type::type), holder(value) \ {} /* * No need for for a rvalue reference version of std::initializer_list: * copying a std::initializer_list does not copy the underlying objects. */ ODIL_VALUE_CONSTRUCTORS(Integers, _integers); ODIL_VALUE_CONSTRUCTORS(Reals, _reals); ODIL_VALUE_CONSTRUCTORS(Strings, _strings); ODIL_VALUE_CONSTRUCTORS(Binary, _binary); #undef ODIL_VALUE_CONSTRUCTORS Value ::Value(DataSets const & value) : _type(Type::DataSets), _data_sets(std::make_shared(value)) { } Value ::Value(DataSets && value) : _type(Type::DataSets), _data_sets(std::make_shared(std::move(value))) { } Value ::Value(std::initializer_list const & value) : _type(Type::DataSets), _data_sets(std::make_shared(value)) { } Value ::Value(std::initializer_list const & value) : _type(Type::Integers) { this->_integers.resize(value.size()); std::copy(value.begin(), value.end(), this->_integers.begin()); } Value ::Value(std::initializer_list> const & value) : _type(Type::Binary) { this->_binary.resize(value.size()); std::copy(value.begin(), value.end(), this->_binary.begin()); } Value::Type Value ::get_type() const { return this->_type; } bool Value ::empty() const { return apply_visitor(IsEmptyValue(), *this); } std::size_t Value ::size() const { return apply_visitor(ValueSizeGetter(), *this); } #define DECLARE_CONST_ACCESSOR(type, name) \ Value::type const & \ Value \ ::as_##name() const \ { \ if(this->get_type() != Type::type) \ { \ throw Exception("Type mismatch"); \ } \ return this->_##name; \ } #define DECLARE_NON_CONST_ACCESSOR(type, name) \ Value::type & \ Value \ ::as_##name() \ { \ if(this->get_type() != Type::type) \ { \ throw Exception("Type mismatch"); \ } \ return this->_##name; \ } DECLARE_CONST_ACCESSOR(Integers, integers) DECLARE_NON_CONST_ACCESSOR(Integers, integers) DECLARE_CONST_ACCESSOR(Reals, reals) DECLARE_NON_CONST_ACCESSOR(Reals, reals) DECLARE_CONST_ACCESSOR(Strings, strings) DECLARE_NON_CONST_ACCESSOR(Strings, strings) Value::DataSets const & Value ::as_data_sets() const { if(this->get_type() != Type::DataSets) { throw Exception("Type mismatch"); } return *this->_data_sets; } Value::DataSets & Value ::as_data_sets() { if(this->get_type() != Type::DataSets) { throw Exception("Type mismatch"); } return *this->_data_sets; } DECLARE_CONST_ACCESSOR(Binary, binary) DECLARE_NON_CONST_ACCESSOR(Binary, binary) #undef DECLARE_NON_CONST_ACCESSOR #undef DECLARE_CONST_ACCESSOR bool Value ::operator==(Value const & other) const { if(this->_type != other._type) { return false; } else if(this->_type == Value::Type::Integers) { return this->_integers == other._integers; } else if(this->_type == Value::Type::Reals) { return this->_reals == other._reals; } else if(this->_type == Value::Type::Strings) { return this->_strings == other._strings; } else if(this->_type == Value::Type::DataSets) { return ( this->_data_sets->size() == other._data_sets->size() && std::equal( this->_data_sets->begin(), this->_data_sets->end(), other._data_sets->begin(), [](std::shared_ptr x, std::shared_ptr y) { return *x == *y; } ) ); } else if(this->_type == Value::Type::Binary) { return this->_binary == other._binary; } else { throw Exception("Unknown type"); } } bool Value ::operator!=(Value const & other) const { return !(*this == other); } void Value ::clear() { apply_visitor(ClearValue(), *this); } bool operator==(Value::DataSets const & left, Value::DataSets const & right) { return ( left.size() == right.size() && std::equal( left.begin(), left.end(), right.begin(), [](std::shared_ptr x, std::shared_ptr y) { return ( (x && y && *x == *y) || (!x && !y)); }) ); } bool operator!=(Value::DataSets const & left, Value::DataSets const & right) { return !(left == right); } } odil-0.11.0/src/odil/Value.h000066400000000000000000000134041362244656000154750ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _dca5b15b_b8df_4925_a446_d42efe06c923 #define _dca5b15b_b8df_4925_a446_d42efe06c923 #include #include #include #include #include #include "odil/odil.h" namespace odil { class DataSet; /** * @brief A value held in a DICOM element. */ class ODIL_API Value { public: /// @brief Possible types stored in the value. enum class Type { Integers, Reals, Strings, DataSets, Binary }; /// @brief Integer type. typedef int64_t Integer; /// @brief Real type. typedef double Real; /// @brief String type. typedef std::string String; /// @brief Integer container. typedef std::vector Integers; /// @brief Real container. typedef std::vector Reals; /// @brief String container. typedef std::vector Strings; /// @brief Data sets container. typedef std::vector> DataSets; /// @brief Binary data container. typedef std::vector> Binary; #define ODIL_VALUE_CONSTRUCTORS(type) \ Value(type const & value); \ Value(type && value); \ Value(std::initializer_list const & value); /* * No need for for a rvalue reference version of std::initializer_list: * copying a std::initializer_list does not copy the underlying objects. */ ODIL_VALUE_CONSTRUCTORS(Integers) ODIL_VALUE_CONSTRUCTORS(Reals) ODIL_VALUE_CONSTRUCTORS(Strings) ODIL_VALUE_CONSTRUCTORS(DataSets) ODIL_VALUE_CONSTRUCTORS(Binary) #undef ODIL_VALUE_CONSTRUCTORS Value(std::initializer_list const & value); Value(std::initializer_list> const & value); /** @addtogroup default_operations Default class operations * @{ */ ~Value() =default; Value(Value const &) =default; Value(Value &&) =default; Value & operator=(Value const &) =default; Value & operator=(Value &&) =default; /// @} /// @brief Return the type store in the value. Type get_type() const; /// @brief Test whether the value is empty. bool empty() const; /// @brief Return the number of items. std::size_t size() const; /** * @brief Return the integers contained in the value. * * If the value does not contain integers, a odil::Exception is raised. */ Integers const & as_integers() const; /** * @brief Return the integers contained in the value. * * If the value does not contain integers, a odil::Exception is raised. */ Integers & as_integers(); /** * @brief Return the reals contained in the value. * * If the value does not contain reals, a odil::Exception is raised. */ Reals const & as_reals() const; /** * @brief Return the reals contained in the value. * * If the value does not contain reals, a odil::Exception is raised. */ Reals & as_reals(); /** * @brief Return the strings contained in the value. * * If the value does not contain strings, a odil::Exception is raised. */ Strings const & as_strings() const; /** * @brief Return the strings contained in the value. * * If the value does not contain strings, a odil::Exception is raised. */ Strings & as_strings(); /** * @brief Return the data sets contained in the value. * * If the value does not contain data sets, a odil::Exception is raised. */ DataSets const & as_data_sets() const; /** * @brief Return the data sets contained in the value. * * If the value does not contain data sets, a odil::Exception is raised. */ DataSets & as_data_sets(); /** * @brief Return the binary data contained in the value. * * If the value does not contain binary data, a odil::Exception is raised. */ Binary const & as_binary() const; /** * @brief Return the binary data contained in the value. * * If the value does not contain binary data, a odil::Exception is raised. */ Binary & as_binary(); /// @brief Equality test. bool operator==(Value const & other) const; /// @brief Difference test. bool operator!=(Value const & other) const; /// @brief Clear the value (value.empty() will be true). void clear(); private: Integers _integers; Reals _reals; Strings _strings; // NOTE: can't use std::vector with forward-declaration of DataSet // cf. C++11, 17.6.4.8, last bullet of clause 2 std::shared_ptr _data_sets; Binary _binary; Type _type; }; /** * @brief Equality test. * * This will have priority over the standard operator of std::vector since the * latter is templated (cf. 23.3.6.1) and the former is not. */ bool ODIL_API operator==(Value::DataSets const & left, Value::DataSets const & right); /// @brief Difference test. bool ODIL_API operator!=(Value::DataSets const & left, Value::DataSets const & right); /** * @brief Visitor of values. */ template typename TVisitor::result_type apply_visitor(TVisitor const & visitor, Value const & value); /** * @brief Visitor of values. */ template typename TVisitor::result_type apply_visitor(TVisitor const & visitor, Value & value); } #include "odil/Value.txx" #endif // _dca5b15b_b8df_4925_a446_d42efe06c923 odil-0.11.0/src/odil/Value.txx000066400000000000000000000040511362244656000160670ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _de64b8e1_4116_41f8_a085_dabfdc6c63c3 #define _de64b8e1_4116_41f8_a085_dabfdc6c63c3 #include "odil/Value.h" #include "odil/Exception.h" namespace odil { template typename TVisitor::result_type apply_visitor(TVisitor const & visitor, Value const & value) { if(value.get_type() == Value::Type::Integers) { return visitor(value.as_integers()); } else if(value.get_type() == Value::Type::Reals) { return visitor(value.as_reals()); } else if(value.get_type() == Value::Type::Strings) { return visitor(value.as_strings()); } else if(value.get_type() == Value::Type::DataSets) { return visitor(value.as_data_sets()); } else if(value.get_type() == Value::Type::Binary) { return visitor(value.as_binary()); } else { throw Exception("Unknown value type"); } } template typename TVisitor::result_type apply_visitor(TVisitor const & visitor, Value & value) { if(value.get_type() == Value::Type::Integers) { return visitor(value.as_integers()); } else if(value.get_type() == Value::Type::Reals) { return visitor(value.as_reals()); } else if(value.get_type() == Value::Type::Strings) { return visitor(value.as_strings()); } else if(value.get_type() == Value::Type::DataSets) { return visitor(value.as_data_sets()); } else if(value.get_type() == Value::Type::Binary) { return visitor(value.as_binary()); } else { throw Exception("Unknown value type"); } } } #endif // _de64b8e1_4116_41f8_a085_dabfdc6c63c3 odil-0.11.0/src/odil/Writer.cpp000066400000000000000000000425431362244656000162360ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/Writer.h" #include #include #include #include #include #include #include #include "odil/DataSet.h" #include "odil/endian.h" #include "odil/Element.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/Tag.h" #include "odil/uid.h" #include "odil/VR.h" #include "odil/write_ds.h" namespace odil { void Writer ::write_encapsulated_pixel_data( Value::Binary const & value, std::ostream & stream, ByteOrdering byte_ordering, bool explicit_vr) { Writer writer(stream, byte_ordering, explicit_vr); uint32_t length; for(auto const & fragment: value) { writer.write_tag(registry::Item); length = fragment.size(); Writer::write_binary(length, stream, byte_ordering); if(length > 0) { stream.write(reinterpret_cast(&fragment[0]), length); if(!stream) { throw Exception("Could not write to stream"); } } } writer.write_tag(registry::SequenceDelimitationItem); length = 0; Writer::write_binary(length, stream, byte_ordering); if(!stream) { throw Exception("Could not write to stream"); } } Writer ::Writer( std::ostream & stream, ByteOrdering byte_ordering, bool explicit_vr, ItemEncoding item_encoding, bool use_group_length) : stream(stream), byte_ordering(byte_ordering), explicit_vr(explicit_vr), item_encoding(item_encoding), use_group_length(use_group_length) { // Nothing else } Writer ::Writer( std::ostream & stream, std::string const & transfer_syntax, ItemEncoding item_encoding, bool use_group_length) : stream(stream), byte_ordering( (transfer_syntax==registry::ExplicitVRBigEndian_Retired)? ByteOrdering::BigEndian:ByteOrdering::LittleEndian), explicit_vr(transfer_syntax!=registry::ImplicitVRLittleEndian), item_encoding(item_encoding), use_group_length(use_group_length) { // Nothing else } void Writer ::write_data_set(std::shared_ptr data_set) const { // Build a map of the different group in order to handle // Group Length elements std::map> groups; for(auto const & item: *data_set) { auto const & tag = item.first; groups[tag.group].push_back(tag); } for(auto const & groups_it: groups) { std::ostringstream group_stream; Writer group_writer( group_stream, this->byte_ordering, this->explicit_vr, this->item_encoding, this->use_group_length); for(auto const & tag: groups_it.second) { group_writer.write_tag(tag); group_writer.write_element((*data_set)[tag]); } // Write group length if necessary // Mandatory for group 0: PS3.7, 9.3, 10.3, and E.1 // Mandatory for group 2: PS3.10, 7.1 // Forbidden for groups 4 and 6? auto const write_group_length = ( groups_it.first == 0 || groups_it.first == 2 || (this->use_group_length && groups_it.first != 4 && groups_it.first != 6)); if(write_group_length) { // Group length: (gggg,0000) UL Type=3 VM=1 this->write_tag(Tag(groups_it.first, 0)); this->write_element( Element(Value::Integers({group_stream.tellp()}), VR::UL)); } // Write group data to main stream std::string const group_data = group_stream.str(); this->stream.write(&group_data[0], group_data.size()); if(!this->stream) { throw Exception("Could not write to stream"); } } } void Writer ::write_tag(Tag const & tag) const { this->write_binary(tag.group, this->stream, this->byte_ordering); this->write_binary(tag.element, this->stream, this->byte_ordering); } void Writer ::write_element(Element const & element) const { auto const vr = element.vr; // Write VR if(this->explicit_vr) { this->stream << as_string(vr); if(!this->stream) { throw Exception("Could not write to stream"); } } // Write value to a sub-stream std::ostringstream value_stream; if(!element.get_value().empty()) { Visitor const visitor( value_stream, vr, this->byte_ordering, this->explicit_vr, this->item_encoding, this->use_group_length); apply_visitor(visitor, element.get_value()); } // Write VL if(this->explicit_vr) { if(vr == VR::OB || vr == VR::OD || vr == VR::OF || vr == VR::OL || vr == VR::OV || vr == VR::OW || vr == VR::SQ || vr == VR::UC || vr == VR::UR || vr == VR::UT || vr == VR::UN) { this->write_binary(uint16_t(0), this->stream, this->byte_ordering); uint32_t vl; if(vr == VR::SQ && this->item_encoding == ItemEncoding::UndefinedLength) { vl = 0xffffffff; } else if(is_binary(vr) && element.size() > 1) { vl = 0xffffffff; } else { vl = value_stream.tellp(); } this->write_binary(vl, this->stream, this->byte_ordering); } else { this->write_binary( uint16_t(value_stream.tellp()), this->stream, this->byte_ordering); } } else { this->write_binary( uint32_t(value_stream.tellp()), this->stream, this->byte_ordering); } this->stream.write(value_stream.str().c_str(), value_stream.tellp()); if(!this->stream) { throw Exception("Could not write to stream"); } } void Writer ::write_file( std::shared_ptr data_set , std::ostream & stream, std::shared_ptr meta_information, std::string const & transfer_syntax, ItemEncoding item_encoding, bool use_group_length) { // Build File Meta Information, PS3.10, 7.1 std::shared_ptr meta_info = meta_information?std::make_shared(*meta_information) :std::make_shared(); meta_info->add( registry::FileMetaInformationVersion, Value::Binary({{0x00, 0x01}})); if(!data_set->has(registry::SOPClassUID)) { throw Exception("Missing SOP Class UID"); } if(!data_set->is_string(registry::SOPClassUID)) { throw Exception("SOP Class UID is not a string"); } if(data_set->as_string(registry::SOPClassUID).size()<1) { throw Exception("Empty SOP Class UID"); } meta_info->add( registry::MediaStorageSOPClassUID, data_set->as_string(registry::SOPClassUID)); if(!data_set->has(registry::SOPInstanceUID)) { throw Exception("Missing SOP Instance UID"); } if(!data_set->is_string(registry::SOPInstanceUID)) { throw Exception("SOP Instance UID is not a string"); } if(data_set->as_string(registry::SOPInstanceUID).size()<1) { throw Exception("Empty SOP Instance UID"); } meta_info->add(registry::MediaStorageSOPInstanceUID, data_set->as_string(registry::SOPInstanceUID)); meta_info->add(registry::TransferSyntaxUID, {transfer_syntax}); meta_info->add( registry::ImplementationClassUID, {implementation_class_uid}); meta_info->add( registry::ImplementationVersionName, { implementation_version_name }); // Information set by input attribut 'meta_information': // - SourceApplicationEntityTitle // - SendingApplicationEntityTitle // - ReceivingApplicationEntityTitle // File preamble for(unsigned int i=0; i<128; ++i) { stream.put(0); if(!stream) { throw Exception("Could not write to stream"); } } // DICOM prefix std::string const prefix("DICM"); stream.write(&prefix[0], prefix.size()); if(!stream) { throw Exception("Could not write to stream"); } // File Meta Information // PS3.10, 7.1: Except for the 128 byte preamble and the 4 byte prefix, the // File Meta Information shall be encoded using the Explicit VR // Little Endian Transfer Syntax Writer meta_information_writer( stream, registry::ExplicitVRLittleEndian, item_encoding, use_group_length); meta_information_writer.write_data_set(meta_info); // Data Set Writer data_set_writer( stream, transfer_syntax, item_encoding, use_group_length); data_set_writer.write_data_set(data_set); } Writer::Visitor ::Visitor( std::ostream & stream, VR vr, ByteOrdering byte_ordering, bool explicit_vr, Writer::ItemEncoding item_encoding, bool use_group_length) : stream(stream), vr(vr), byte_ordering(byte_ordering), explicit_vr(explicit_vr), item_encoding(item_encoding), use_group_length(use_group_length) { // Nothing else } Writer::Visitor::result_type Writer::Visitor ::operator()(Value::Integers const & value) const { if(this->vr == VR::IS) { this->write_strings(value, ' '); } else if(this->vr == VR::SV) { for(auto item: value) { Writer::write_binary( int64_t(item), this->stream, this->byte_ordering); } } else if(this->vr == VR::SL) { for(auto item: value) { Writer::write_binary( int32_t(item), this->stream, this->byte_ordering); } } else if(this->vr == VR::SS) { for(auto item: value) { Writer::write_binary( int16_t(item), this->stream, this->byte_ordering); } } else if(this->vr == VR::UV) { for(auto item: value) { Writer::write_binary( uint64_t(item), this->stream, this->byte_ordering); } } else if(this->vr == VR::UL) { for(auto item: value) { Writer::write_binary( uint32_t(item), this->stream, this->byte_ordering); } } else if(this->vr == VR::AT || this->vr == VR::US) { for(auto item: value) { Writer::write_binary( uint16_t(item), this->stream, this->byte_ordering); } } else { throw Exception("Cannot write " + as_string(this->vr) + " as integers"); } } Writer::Visitor::result_type Writer::Visitor ::operator()(Value::Reals const & value) const { if(this->vr == VR::DS) { int written = 0; for(int i=0; istream.write(buffer, length); written += length; if(!this->stream.good()) { throw Exception("Could not write DS"); } if(istream.put('\\'); written += 1; if(!this->stream.good()) { throw Exception("Could not write DS"); } } }; if(written % 2 == 1) { this->stream.put(' '); } //this->write_strings(value, ' '); } else if(this->vr == VR::FD) { for(auto const & item: value) { Writer::write_binary( double(item), this->stream, this->byte_ordering); } } else if(this->vr == VR::FL) { for(auto const & item: value) { Writer::write_binary( float(item), this->stream, this->byte_ordering); } } else { throw Exception("Cannot write " + as_string(this->vr) + " as reals"); } } Writer::Visitor::result_type Writer::Visitor ::operator()(Value::Strings const & value) const { if(this->vr == VR::AT) { Value::Integers integers; for(auto const & string: value) { Tag const tag(string); integers.push_back(tag.group); integers.push_back(tag.element); } this->operator()(integers); } else { this->write_strings(value, (this->vr == VR::UI)?'\0':' '); } } Writer::Visitor::result_type Writer::Visitor ::operator()(Value::DataSets const & value) const { // Write all items to a sub-stream std::ostringstream sequence_stream; Writer sequence_writer( sequence_stream, this->byte_ordering, this->explicit_vr, this->item_encoding, this->use_group_length); for(auto const & item: value) { // Write item to a sub-stream std::ostringstream item_stream; Writer item_writer( item_stream, this->byte_ordering, this->explicit_vr, this->item_encoding, this->use_group_length); item_writer.write_data_set(item); // Beginning of item sequence_writer.write_tag(registry::Item); // Item length uint32_t item_length; if(this->item_encoding == ItemEncoding::ExplicitLength) { item_length = item_stream.tellp(); } else { item_length = 0xffffffff; } Writer::write_binary(item_length, sequence_stream, this->byte_ordering); // Data set sequence_stream.write(item_stream.str().c_str(), item_stream.tellp()); if(!sequence_stream) { throw Exception("Could not write to stream"); } // End of item if(this->item_encoding == ItemEncoding::UndefinedLength) { sequence_writer.write_tag(registry::ItemDelimitationItem); Writer::write_binary(uint32_t(0), sequence_stream, this->byte_ordering); } } // End of sequence if(this->item_encoding == ItemEncoding::UndefinedLength) { sequence_writer.write_tag(registry::SequenceDelimitationItem); Writer::write_binary(uint32_t(0), sequence_stream, this->byte_ordering); } this->stream.write(sequence_stream.str().c_str(), sequence_stream.tellp()); if(!this->stream) { throw Exception("Could not write to stream"); } } Writer::Visitor::result_type Writer::Visitor ::operator()(Value::Binary const & value) const { if(value.empty()) { return; } else if(value.size() > 1) { Writer::write_encapsulated_pixel_data( value, this->stream, this->byte_ordering, this->explicit_vr); } else { if(this->vr == VR::OB || this->vr == VR::UN) { this->stream.write( reinterpret_cast(&value[0][0]), value[0].size()); } else if(this->vr == VR::OW) { if(value[0].size()%2 != 0) { throw Exception("Value cannot be written as OW"); } for(int i=0; i(&value[0][i]); Writer::write_binary(item, this->stream, this->byte_ordering); } } else if(this->vr == VR::OF) { if(value[0].size()%4 != 0) { throw Exception("Value cannot be written as OF"); } for(int i=0; i(&value[0][i]); Writer::write_binary(item, this->stream, this->byte_ordering); } } else { throw Exception("Cannot write "+as_string(this->vr)+" as binary"); } if(!this->stream) { throw Exception("Could not write to stream"); } if(value[0].size()%2 == 1) { this->stream.put('\0'); } } } template void Writer::Visitor ::write_strings(T const & sequence, char padding) const { if(sequence.empty()) { return; } auto const stream_begin = this->stream.tellp(); auto last_element_it = --sequence.end(); for(auto it = sequence.begin(); it!= sequence.end(); ++it) { this->stream << *it; if(!this->stream) { throw Exception("Could not write to stream"); } if(it != last_element_it) { this->stream << "\\"; if(!this->stream) { throw Exception("Could not write to stream"); } } } auto const stream_end = this->stream.tellp(); if((stream_end-stream_begin)%2 == 1) { this->stream.put(padding); if(!this->stream) { throw Exception("Could not write to stream"); } } } } odil-0.11.0/src/odil/Writer.h000066400000000000000000000076201362244656000157000ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _ca5c06d2_04f9_4009_9e98_5607e1060379 #define _ca5c06d2_04f9_4009_9e98_5607e1060379 #include #include #include "odil/DataSet.h" #include "odil/Element.h" #include "odil/endian.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/Tag.h" #include "odil/Value.h" #include "odil/VR.h" namespace odil { /// @brief Write DICOM objects to a stream. class ODIL_API Writer { public: /// @brief Encodings of sequence items. enum class ItemEncoding { ExplicitLength, UndefinedLength }; /// @brief Output stream. std::ostream & stream; /// @brief Endianness. ByteOrdering byte_ordering; /// @brief Explicit-ness of the Value Representations. bool explicit_vr; /// @brief Encoding of sequence items. ItemEncoding item_encoding; /// @brief Presence of group length elements. bool use_group_length; /** * @brief Write binary data to an stream encoded with the given endianness, * ensure stream is still good. */ template static void write_binary( T const & value, std::ostream & stream, ByteOrdering byte_ordering); /// @brief Write pixel data in encapsulated form. static void write_encapsulated_pixel_data( Value::Binary const & value, std::ostream & stream, ByteOrdering byte_ordering, bool explicit_vr); /// @brief Build a writer. Writer( std::ostream & stream, ByteOrdering byte_ordering, bool explicit_vr, ItemEncoding item_encoding=ItemEncoding::ExplicitLength, bool use_group_length=false); /** * @brief Build a writer, derive byte ordering and explicit-ness of VR * from transfer syntax. */ Writer( std::ostream & stream, std::string const & transfer_syntax, ItemEncoding item_encoding=ItemEncoding::ExplicitLength, bool use_group_length=false); /// @brief Write a data set. void write_data_set(std::shared_ptr data_set) const; /// @brief Write a tag. void write_tag(Tag const & tag) const; /// @brief Write an element (VR, VL and value). void write_element(Element const & element) const; /// @brief Write a file (meta-information and data set). static void write_file( std::shared_ptr data_set, std::ostream & stream, std::shared_ptr meta_information={}, std::string const & transfer_syntax = registry::ExplicitVRLittleEndian, ItemEncoding item_encoding=ItemEncoding::ExplicitLength, bool use_group_length=false); private: struct Visitor { typedef void result_type; std::ostream & stream; VR vr; ByteOrdering byte_ordering; bool explicit_vr; ItemEncoding item_encoding; bool use_group_length; Visitor( std::ostream & stream, VR vr, ByteOrdering byte_ordering, bool explicit_vr, ItemEncoding item_encoding, bool use_group_length); result_type operator()(Value::Integers const & value) const; result_type operator()(Value::Reals const & value) const; result_type operator()(Value::Strings const & value) const; result_type operator()(Value::DataSets const & value) const; result_type operator()(Value::Binary const & value) const; template void write_strings(T const & sequence, char padding) const; }; }; } #include "odil/Writer.txx" #endif // _ca5c06d2_04f9_4009_9e98_5607e1060379 odil-0.11.0/src/odil/Writer.txx000066400000000000000000000025451362244656000162750ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _2e568ec2_62fc_43e5_8342_b4511db705e3 #define _2e568ec2_62fc_43e5_8342_b4511db705e3 #include "odil/Writer.h" #include #include #include "odil/DataSet.h" #include "odil/Element.h" #include "odil/endian.h" #include "odil/registry.h" #include "odil/Tag.h" #include "odil/Value.h" #include "odil/VR.h" namespace odil { template void Writer ::write_binary( T const & value, std::ostream & stream, ByteOrdering byte_ordering) { auto raw = value; if(byte_ordering == ByteOrdering::LittleEndian) { raw = host_to_little_endian(raw); } else if(byte_ordering == ByteOrdering::BigEndian) { raw = host_to_big_endian(raw); } else { throw Exception("Unknown endianness"); } stream.write(reinterpret_cast(&raw), sizeof(raw)); if(!stream) { throw Exception("Could not write to stream"); } } } #endif // _2e568ec2_62fc_43e5_8342_b4511db705e3 odil-0.11.0/src/odil/asio.cpp000066400000000000000000000007251362244656000157110ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ // Build Boost.asio in Odil #include odil-0.11.0/src/odil/base64.cpp000066400000000000000000000024711362244656000160420ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/base64.h" #include namespace odil { namespace base64 { std::string const symbols = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; // Assume ASCII encoding std::string const reversed_symbols( "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" // Not used: 00-0F "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" // Not used: 10-1F "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x00\x00\x3f" // Not used: 20-2A, 2C-2E "\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x00\x00\x00\x00\x00\x00" // 0-9 "\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e" // A-O "\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x00\x00\x00\x00\x00" // P-Z "\x00\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28" // a-o "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x00\x00\x00\x00\x00" // p-z , 0x80); } } odil-0.11.0/src/odil/base64.h000066400000000000000000000024041362244656000155030ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _203e7be8_beaa_4d97_94b2_6a0070f158a1 #define _203e7be8_beaa_4d97_94b2_6a0070f158a1 #include #include "odil/odil.h" namespace odil { namespace base64 { /// @brief Dictionary of symbols for Base64. extern ODIL_API std::string const symbols; /// @brief Mapping of ASCII characters to values of Base64 symbols. extern ODIL_API std::string const reversed_symbols; /// @brief Encode a sequence of 8 bits data to Base64. template void encode( TInputIterator begin, TInputIterator end, TOutputIterator destination); /// @brief Decode a sequence of 8 bits data from Base64. template void decode( TInputIterator begin, TInputIterator end, TOutputIterator destination); } } #include "odil/base64.txx" #endif // _203e7be8_beaa_4d97_94b2_6a0070f158a1 odil-0.11.0/src/odil/base64.txx000066400000000000000000000063611362244656000161050ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/base64.h" #include #include #ifndef _90eec83b_0ab6_4669_8454_e5a7e0a11a26 #define _90eec83b_0ab6_4669_8454_e5a7e0a11a26 namespace odil { namespace base64 { template void encode( TInputIterator begin, TInputIterator end, TOutputIterator destination) { auto iterator = begin; unsigned char carry=0; unsigned int position=0; while(iterator != end) { unsigned char const input = static_cast(*iterator); unsigned char symbol_index; if(position%3 == 0) { symbol_index = input >> 2; carry = input & 3; *destination = symbols[symbol_index]; } else if(position%3 == 1) { symbol_index = (carry << 4) + (input >> 4); carry = input & 15; *destination = symbols[symbol_index]; } else // position%3 == 2 { symbol_index = (carry << 2) + (input >> 6); carry = input & 63; *destination = symbols[symbol_index]; ++destination; *destination = symbols[carry]; } ++iterator; ++destination; ++position; } if(position%3 == 1) { *destination = symbols[carry<<4]; ++destination; *destination = '='; ++destination; *destination = '='; } else if(position%3 == 2) { *destination = symbols[carry<<2]; ++destination; *destination = '='; } // Otherwise (position%3 == 0), nothing to do. } template void decode( TInputIterator begin, TInputIterator end, TOutputIterator destination) { auto iterator = begin; unsigned char current=0; unsigned int position=0; while(iterator != end) { unsigned char input = static_cast(*iterator); if(input != '=') { input = reversed_symbols[input]; if(position%4 == 0) { current = input; } else if(position%4 == 1) { current = (current << 2) + (input >> 4); *destination = current; ++destination; current = input & 15; } else if(position%4 == 2) { current = (current << 4) + (input >> 2); *destination = current; ++destination; current = input & 3; } else // position%4 == 3 { current = (current << 6) + input; *destination = current; ++destination; } } ++iterator; ++position; } } } } #endif // _90eec83b_0ab6_4669_8454_e5a7e0a11a26 odil-0.11.0/src/odil/dcmtk/000077500000000000000000000000001362244656000153505ustar00rootroot00000000000000odil-0.11.0/src/odil/dcmtk/ElementAccessor.cpp000066400000000000000000000025171362244656000211350ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/dcmtk/ElementAccessor.h" #include #include namespace odil { namespace dcmtk { #define DEFINE_ELEMENT_ACCESSOR(TValueType, getter, setter) \ template<> \ ElementAccessor::GetterType const \ ElementAccessor\ ::element_get = getter; \ \ template<> \ ElementAccessor::SetterType const \ ElementAccessor\ ::element_set = setter; DEFINE_ELEMENT_ACCESSOR(std::string, get_string, set_string) DEFINE_ELEMENT_ACCESSOR(std::vector, get_binary, set_binary) DEFINE_ELEMENT_ACCESSOR(Float32, get_default, set_default) DEFINE_ELEMENT_ACCESSOR(Float64, get_default, set_default) DEFINE_ELEMENT_ACCESSOR(Sint16, get_default, set_default) DEFINE_ELEMENT_ACCESSOR(Sint32, get_default, set_default) DEFINE_ELEMENT_ACCESSOR(Uint16, get_default, set_default) DEFINE_ELEMENT_ACCESSOR(Uint32, get_default, set_default) #undef DEFINE_ELEMENT_ACCESSOR } } odil-0.11.0/src/odil/dcmtk/ElementAccessor.h000066400000000000000000000037331362244656000206030ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _dfa4858b_1c9d_4ce9_b220_a1c15d873602 #define _dfa4858b_1c9d_4ce9_b220_a1c15d873602 #include #include #include #include #include "odil/dcmtk/ElementTraits.h" #include "odil/dcmtk/Exception.h" #include "odil/odil.h" namespace odil { namespace dcmtk { /// @brief Generic access to values in DcmElement. template struct ElementAccessor { /// @brief C++ type of the VR. typedef TValueType ValueType; /// @brief Getter type. typedef std::function< ValueType(DcmElement const &, unsigned long const)> GetterType; /// @brief Return the value in the element. static ODIL_API GetterType const element_get; /// @brief Setter type. typedef std::function< void(DcmElement &, ValueType const &, unsigned long const)> SetterType; /// @brief Set the value in the element. static ODIL_API SetterType const element_set; /// @brief Test whether the data set contains a given tag. static bool has(DcmDataset const & dataset, DcmTagKey const & tag); /// @brief Return the value of an element in a dataset. static ValueType get( DcmDataset const & dataset, DcmTagKey const tag, unsigned int const position=0); /// @brief Set the value of an element in a dataset. static void set( DcmDataset & dataset, DcmTagKey const tag, ValueType const & value, unsigned int const position=0); }; } } #include "odil/dcmtk/ElementAccessor.txx" #endif // _dfa4858b_1c9d_4ce9_b220_a1c15d873602 odil-0.11.0/src/odil/dcmtk/ElementAccessor.txx000066400000000000000000000122741362244656000211770ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _f9af3e63_3597_4513_8c10_b55058f5370b #define _f9af3e63_3597_4513_8c10_b55058f5370b #include "odil/dcmtk/ElementAccessor.h" #include #include #include #include #include namespace odil { namespace dcmtk { template bool ElementAccessor ::has(DcmDataset const & dataset, DcmTagKey const & tag) { DcmElement * dummy; OFCondition const condition = const_cast(dataset).findAndGetElement(tag, dummy); if(condition.good()) { return true; } else if(condition == EC_TagNotFound) { return false; } else { throw Exception(condition); } } template TValueType ElementAccessor ::get( DcmDataset const & dataset, DcmTagKey const tag, unsigned int const position) { DcmElement * element; OFCondition const condition = const_cast(dataset).findAndGetElement(tag, element); if(condition.bad()) { throw Exception(condition); } return element_get(*element, position); } template void ElementAccessor ::set( DcmDataset & dataset, DcmTagKey const tag, ValueType const & value, unsigned int const position) { DcmElement * element; OFCondition const get_condition = dataset.findAndGetElement(tag, element); if(get_condition.bad()) { OFCondition const insert_condition = dataset.insertEmptyElement(tag); if(insert_condition.bad()) { throw Exception(insert_condition); } OFCondition const new_get_condition = dataset.findAndGetElement(tag, element); if(new_get_condition.bad()) { throw Exception(insert_condition); } } element_set(*element, value, position); } template TValueType get_default(DcmElement const & element, unsigned long const position) { TValueType value; OFCondition const & condition = ElementTraits::getter( const_cast(element), value, position); if(condition.bad()) { throw Exception(condition); } return value; } template void set_default( DcmElement & element, TValueType const & value, unsigned long const position) { OFCondition const condition = ElementTraits::setter(element, value, position); if(condition.bad()) { throw Exception(condition); } } template TValueType get_string(DcmElement const & element, unsigned long const position) { OFString value; ElementTraits::getter(const_cast(element), value, position); return std::string(value.c_str()); } template void set_string( DcmElement & element, TValueType const & value, unsigned long const position) { OFString const value_dcmtk(value.c_str(), value.size()); OFCondition const condition = ElementTraits::setter( element, value_dcmtk, position); if(condition.bad()) { throw Exception(condition); } } template TValueType get_binary(DcmElement const & element, unsigned long const position) { if(position != 0) { throw Exception("Position must be 0 for binary VRs"); } DcmEVR const evr = element.getTag().getVR().getValidEVR(); TValueType result; OFCondition condition; typename TValueType::value_type * data=NULL; if(evr == EVR_OB || evr == EVR_UN) { Uint8 * typed_data; condition = const_cast(element).getUint8Array(typed_data); data = reinterpret_cast(typed_data); } else if(evr == EVR_OW) { Uint16 * typed_data; condition = const_cast(element).getUint16Array(typed_data); data = reinterpret_cast(typed_data); } else if(evr == EVR_OF) { Float32 * typed_data; condition = const_cast(element).getFloat32Array(typed_data); data = reinterpret_cast(typed_data); } else { throw Exception( std::string("Unknown VR: ") + element.getTag().getVR().getValidVRName()); } if(condition.bad()) { throw Exception(condition); } result.resize(element.getLengthField()); std::copy(data, data+element.getLengthField(), result.begin()); return result; } template void set_binary( DcmElement & element, TValueType const & value, unsigned long const position) { } } } #endif // _f9af3e63_3597_4513_8c10_b55058f5370b odil-0.11.0/src/odil/dcmtk/ElementTraits.cpp000066400000000000000000000043311362244656000206350ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/dcmtk/ElementTraits.h" #include #include #include #include #include #include "odil/Exception.h" namespace odil { namespace dcmtk { OFCondition getString(DcmElement & element, OFString & value, unsigned long const position) { OFCondition condition; DcmEVR const evr = element.getTag().getVR().getValidEVR(); if(evr == EVR_OB || evr == EVR_OF || evr == EVR_OW || evr == EVR_UN) { if(position != 0) { throw Exception("Position must be 0 for binary VRs"); } condition = element.getOFStringArray(value); } else { condition = element.getOFString(value, position); } return condition; } OFCondition putString(DcmElement & element, OFString const value, unsigned long const position) { if(position != 0) { throw Exception("Position must be 0"); } return element.putOFStringArray(value); } #define DEFINE_ELEMENT_TRAITS(TValueType, getter_, setter_) \ template<> \ ElementTraits::GetterType const \ ElementTraits\ ::getter = getter_; \ \ template<> \ ElementTraits::SetterType const \ ElementTraits\ ::setter = setter_; DEFINE_ELEMENT_TRAITS(OFString, getString, putString) DEFINE_ELEMENT_TRAITS(Float32, &DcmElement::getFloat32, &DcmElement::putFloat32) DEFINE_ELEMENT_TRAITS(Float64, &DcmElement::getFloat64, &DcmElement::putFloat64) DEFINE_ELEMENT_TRAITS(Sint16, &DcmElement::getSint16, &DcmElement::putSint16) DEFINE_ELEMENT_TRAITS(Sint32, &DcmElement::getSint32, &DcmElement::putSint32) DEFINE_ELEMENT_TRAITS(Uint16, &DcmElement::getUint16, &DcmElement::putUint16) DEFINE_ELEMENT_TRAITS(Uint32, &DcmElement::getUint32, &DcmElement::putUint32) #undef DEFINE_ELEMENT_TRAITS } } odil-0.11.0/src/odil/dcmtk/ElementTraits.h000066400000000000000000000032411362244656000203010ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _3ae28d18_6f01_4e10_98e2_1c0d21fdcab7 #define _3ae28d18_6f01_4e10_98e2_1c0d21fdcab7 #include #include #include #include #include namespace odil { namespace dcmtk { /** * @class odil::ElementTraits * @brief Traits for generic data access to values of DcmElement. * * The members are: * - GetterType: the type of the getter function * - SetterType: the type of the setter function * - getter: the getter function (one of the get??? functions of DcmElement) * - setter: the setter function (one of the put??? functions of DcmElement) */ template struct ElementTraits { /** @brief Type of the getter function. */ typedef std::function GetterType; /** @brief Getter function (one of the get??? functions of DcmElement). */ static GetterType const getter; /** @brief Type of the setter function. */ typedef std::function SetterType; /** @brief Setter function (one of the put??? functions of DcmElement). */ static SetterType const setter; }; } } #endif // _3ae28d18_6f01_4e10_98e2_1c0d21fdcab7 odil-0.11.0/src/odil/dcmtk/Exception.cpp000066400000000000000000000030021362244656000200050ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/dcmtk/Exception.h" #include #include #include #include "odil/Exception.h" namespace odil { namespace dcmtk { Exception ::Exception(std::string const & message) : odil::Exception(message), _source(Source::Message), _condition() { // Nothing else. } Exception ::Exception(OFCondition const & condition) : odil::Exception(), _source(Source::Condition), _condition(condition) { // Nothing else. } Exception ::~Exception() noexcept { // Nothing to do. } char const * Exception ::what() const noexcept { if(this->_source == Source::Message) { return this->_message.c_str(); } else if(this->_source == Source::Condition) { return this->_condition.text(); } else { throw std::runtime_error("Invalid source"); } } Exception::Source Exception ::get_source() const { return this->_source; } OFCondition const & Exception ::get_condition() const { if(this->_source != Source::Condition) { throw Exception("Wrong source"); } return this->_condition; } } } odil-0.11.0/src/odil/dcmtk/Exception.h000066400000000000000000000034651362244656000174670ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _9e106372_aca6_4551_a591_95695eb00e4c #define _9e106372_aca6_4551_a591_95695eb00e4c #include #include #include "odil/Exception.h" #include "odil/odil.h" namespace odil { namespace dcmtk { class ODIL_API Exception: public odil::Exception { public: /** * @brief Source of the Exception: either a message string or an * OFCondition. */ enum class Source { Message, Condition }; /// @brief Message string constructor, set the source to Source::Message. Exception(std::string const & message); /// @brief Condition constructor, set the source to Source::Condition. Exception(OFCondition const & condition); /// @brief Destructor. virtual ~Exception() noexcept; /// @brief Return the exception source. Source get_source() const; /** * @brief Return the condition that was used to create this exception. * * If the source is not Source::Condition, throw an exception. */ OFCondition const & get_condition() const; /** * @brief Return the reason for the exception. * * The reason for the exception is set to the message (for Source::Message) or * to the text of the condition (for Source::Condition). */ virtual const char* what() const noexcept; private: Source _source; OFCondition _condition; }; } } #endif // _9e106372_aca6_4551_a591_95695eb00e4c odil-0.11.0/src/odil/dcmtk/VRTraits.h000066400000000000000000000041721362244656000172430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _4f556093_02e3_4659_9026_2b16bc2c8a51 #define _4f556093_02e3_4659_9026_2b16bc2c8a51 #include #include #include namespace odil { namespace dcmtk { /** * @class odil::VRTraits * @brief Information related to VR. * * The members are: * - ValueType: the DCMTK type of the VR */ template struct VRTraits; #define DECLARE_VR_TRAITS(vr, value_type) \ /** @brief Traits for generic data access to values of DcmElement. */ \ template<> \ struct VRTraits \ { \ /** @brief Type associated to the VR. */ \ typedef value_type ValueType; \ }; DECLARE_VR_TRAITS(EVR_AE, std::string) DECLARE_VR_TRAITS(EVR_AS, std::string) //DECLARE_VR_TRAITS(EVR_AT DECLARE_VR_TRAITS(EVR_CS, std::string) DECLARE_VR_TRAITS(EVR_DA, std::string) DECLARE_VR_TRAITS(EVR_DS, Float64) DECLARE_VR_TRAITS(EVR_DT, std::string) DECLARE_VR_TRAITS(EVR_FD, Float64) DECLARE_VR_TRAITS(EVR_FL, Float32) DECLARE_VR_TRAITS(EVR_IS, Sint32) DECLARE_VR_TRAITS(EVR_LO, std::string) DECLARE_VR_TRAITS(EVR_LT, std::string) DECLARE_VR_TRAITS(EVR_OB, std::vector) DECLARE_VR_TRAITS(EVR_OF, std::vector) DECLARE_VR_TRAITS(EVR_OW, std::vector) DECLARE_VR_TRAITS(EVR_PN, std::string) DECLARE_VR_TRAITS(EVR_SH, std::string) DECLARE_VR_TRAITS(EVR_SL, Sint32) //DECLARE_VR_TRAITS(EVR_SQ DECLARE_VR_TRAITS(EVR_SS, Sint16) DECLARE_VR_TRAITS(EVR_ST, std::string) DECLARE_VR_TRAITS(EVR_TM, std::string) DECLARE_VR_TRAITS(EVR_UI, std::string) DECLARE_VR_TRAITS(EVR_UL, Uint32) DECLARE_VR_TRAITS(EVR_UN, std::vector) DECLARE_VR_TRAITS(EVR_US, Uint16) DECLARE_VR_TRAITS(EVR_UT, std::string) #undef DECLARE_VR_TRAITS } } #endif // _4f556093_02e3_4659_9026_2b16bc2c8a51 odil-0.11.0/src/odil/dcmtk/conversion.cpp000066400000000000000000000411711362244656000202450ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/dcmtk/conversion.h" #include #include #include #include "odil/DataSet.h" #include "odil/Element.h" #include "odil/Tag.h" #include "odil/VR.h" #include "odil/dcmtk/Exception.h" namespace odil { namespace dcmtk { DcmEVR convert(VR vr) { if(vr == VR::AE) { return EVR_AE; } else if(vr == VR::AS) { return EVR_AS; } else if(vr == VR::AT) { return EVR_AT; } else if(vr == VR::CS) { return EVR_CS; } else if(vr == VR::DA) { return EVR_DA; } else if(vr == VR::DS) { return EVR_DS; } else if(vr == VR::DT) { return EVR_DT; } else if(vr == VR::FL) { return EVR_FL; } else if(vr == VR::FD) { return EVR_FD; } else if(vr == VR::IS) { return EVR_IS; } else if(vr == VR::LO) { return EVR_LO; } else if(vr == VR::LT) { return EVR_LT; } else if(vr == VR::OB) { return EVR_OB; } else if(vr == VR::OF) { return EVR_OF; } else if(vr == VR::OW) { return EVR_OW; } else if(vr == VR::PN) { return EVR_PN; } else if(vr == VR::SH) { return EVR_SH; } else if(vr == VR::SL) { return EVR_SL; } else if(vr == VR::SQ) { return EVR_SQ; } else if(vr == VR::SS) { return EVR_SS; } else if(vr == VR::ST) { return EVR_ST; } else if(vr == VR::TM) { return EVR_TM; } else if(vr == VR::UI) { return EVR_UI; } else if(vr == VR::UL) { return EVR_UL; } else if(vr == VR::UN) { return EVR_UN; } else if(vr == VR::US) { return EVR_US; } else if(vr == VR::UT) { return EVR_UT; } else { throw Exception("Unknown VR: "+as_string(vr)); } } VR convert(DcmEVR evr) { if(evr == EVR_AE) { return VR::AE; } else if(evr == EVR_AS) { return VR::AS; } else if(evr == EVR_AT) { return VR::AT; } else if(evr == EVR_CS) { return VR::CS; } else if(evr == EVR_DA) { return VR::DA; } else if(evr == EVR_DS) { return VR::DS; } else if(evr == EVR_DT) { return VR::DT; } else if(evr == EVR_FL) { return VR::FL; } else if(evr == EVR_FD) { return VR::FD; } else if(evr == EVR_IS) { return VR::IS; } else if(evr == EVR_LO) { return VR::LO; } else if(evr == EVR_LT) { return VR::LT; } else if(evr == EVR_OB) { return VR::OB; } else if(evr == EVR_OF) { return VR::OF; } else if(evr == EVR_OW) { return VR::OW; } else if(evr == EVR_PN) { return VR::PN; } else if(evr == EVR_SH) { return VR::SH; } else if(evr == EVR_SL) { return VR::SL; } else if(evr == EVR_SQ) { return VR::SQ; } else if(evr == EVR_SS) { return VR::SS; } else if(evr == EVR_ST) { return VR::ST; } else if(evr == EVR_TM) { return VR::TM; } else if(evr == EVR_UI) { return VR::UI; } else if(evr == EVR_UL) { return VR::UL; } else if(evr == EVR_UN) { return VR::UN; } else if(evr == EVR_US) { return VR::US; } else if(evr == EVR_UT) { return VR::UT; } else { throw Exception("Unknown VR: "+std::string(DcmVR(evr).getVRName())); } } DcmTagKey convert(Tag const & tag) { return DcmTagKey(tag.group, tag.element); } Tag convert(DcmTagKey const & tag) { return Tag(tag.getGroup(), tag.getElement()); } DcmElement * convert(const Tag & tag, Element const & source) { DcmTag const destination_tag(convert(tag), convert(source.vr)); DcmElement * destination = NULL; if(source.vr == VR::AE) { destination = new DcmApplicationEntity(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_string); } } else if (source.vr == VR::AS) { destination = new DcmAgeString(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_string); } } else if(source.vr == VR::AT) { destination = new DcmAttributeTag(destination_tag); if(!source.empty()) { for(unsigned int i=0; iputTagVal(destination_tag, i); } } } else if (source.vr == VR::CS) { destination = new DcmCodeString(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_string); } } else if (source.vr == VR::DA) { destination = new DcmDate(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_string); } } else if (source.vr == VR::DS) { destination = new DcmDecimalString(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_real); } } else if (source.vr == VR::DT) { destination = new DcmDateTime(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_string); } } else if (source.vr == VR::FD) { destination = new DcmFloatingPointDouble(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_real); } } else if (source.vr == VR::FL) { destination = new DcmFloatingPointSingle(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_real); } } else if (source.vr == VR::IS) { destination = new DcmIntegerString(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_int); } } else if (source.vr == VR::LO) { destination = new DcmLongString(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_string); } } else if (source.vr == VR::LT) { destination = new DcmLongText(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_string); } } else if (source.vr == VR::OB || source.vr == VR::OW) { destination = new DcmOtherByteOtherWord(destination_tag); if(!source.empty()) { convert(source, static_cast(destination)); } } else if(source.vr == VR::OF) { destination = new DcmOtherFloat(destination_tag); if(!source.empty()) { convert(source, static_cast(destination)); } } else if (source.vr == VR::PN) { destination = new DcmPersonName(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_string); } } else if (source.vr == VR::SH) { destination = new DcmShortString(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_string); } } else if (source.vr == VR::SL) { destination = new DcmSignedLong(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_int); } } else if(source.vr == VR::SQ) { DcmSequenceOfItems * sequence = new DcmSequenceOfItems(destination_tag); if(!source.empty()) { for(auto const & source_item: source.as_data_set()) { DcmItem * destination_item = convert(source_item, false); sequence->append(destination_item); } } destination = sequence; } else if (source.vr == VR::SS) { destination = new DcmSignedShort(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_int); } } else if (source.vr == VR::ST) { destination = new DcmShortText(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_string); } } else if (source.vr == VR::TM) { destination = new DcmTime(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_string); } } else if (source.vr == VR::UI) { destination = new DcmUniqueIdentifier(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_string); } } else if (source.vr == VR::UL) { destination = new DcmUnsignedLong(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_int); } } // UN else if (source.vr == VR::US) { destination = new DcmUnsignedShort(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_int); } } else if (source.vr == VR::UT) { destination = new DcmUnlimitedText(destination_tag); if(!source.empty()) { convert(source, destination, &Element::as_string); } } else { throw Exception("Unknown VR: "+as_string(source.vr)); } return destination; } template<> void convert, Value::Binary>( DcmElement * source, Element & destination, Value::Binary & (Element::*getter)()) { // FIXME: does DCMTK only handle a single fragment? auto & destination_values = (destination.*getter)(); destination_values.resize(1); destination_values[0] = ElementAccessor>::element_get(*source, 0); } Element convert(DcmElement * source) { std::shared_ptr destination; DcmEVR const source_vr = source->getTag().getVR().getValidEVR(); VR const destination_vr = convert(source_vr); if(source_vr == EVR_AE || source_vr == EVR_AS || source_vr == EVR_CS || source_vr == EVR_DA || source_vr == EVR_DT || source_vr == EVR_LO || source_vr == EVR_LT || source_vr == EVR_PN || source_vr == EVR_SH || source_vr == EVR_ST || source_vr == EVR_TM || source_vr == EVR_UI || source_vr == EVR_UT) { destination = std::make_shared(Value::Strings(), destination_vr); convert(source, *destination, &Element::as_string); } else if(source_vr == EVR_AT) { destination = std::make_shared(Value::Strings(), destination_vr); destination->as_string().reserve(source->getVM()); for(unsigned int i=0; igetVM(); ++i) { DcmTagKey source_tag; OFCondition const condition = source->getTagVal(source_tag, i); if(condition.bad()) { throw Exception(condition); } Tag const destination_tag = convert(source_tag); destination->as_string().push_back(std::string(destination_tag)); } } else if(source_vr == EVR_DS || source_vr == EVR_FD) { destination = std::make_shared(Value::Reals(), destination_vr); convert(source, *destination, &Element::as_real); } else if(source_vr == EVR_FL) { destination = std::make_shared(Value::Reals(), destination_vr); convert(source, *destination, &Element::as_real); } else if(source_vr == EVR_IS || source_vr == EVR_SL) { destination = std::make_shared(Value::Integers(), destination_vr); convert(source, *destination, &Element::as_int); } else if(source_vr == EVR_SQ) { destination = std::make_shared(Value::DataSets(), destination_vr); DcmSequenceOfItems * sequence = dynamic_cast(source); if(sequence == NULL) { throw Exception("Element is not a DcmSequenceOfItems"); } Value::DataSets & destination_value = destination->as_data_set(); destination_value.reserve(sequence->card()); for(unsigned int i=0; icard(); ++i) { DcmItem * source_item = sequence->getItem(i); std::shared_ptr destination_item = convert(source_item); destination_value.push_back(destination_item); } } else if(source_vr == EVR_SS) { destination = std::make_shared(Value::Integers(), destination_vr); convert(source, *destination, &Element::as_int); } else if(source_vr == EVR_UL) { destination = std::make_shared(Value::Integers(), destination_vr); convert(source, *destination, &Element::as_int); } else if(source_vr == EVR_OB || source_vr == EVR_OF || source_vr == EVR_OW || source_vr == EVR_UN) { destination = std::make_shared(Value::Binary(), destination_vr); convert, Value::Binary>(source, *destination, &Element::as_binary); } else if(source_vr == EVR_US) { destination = std::make_shared(Value::Integers(), destination_vr); convert(source, *destination, &Element::as_int); } else { throw Exception("Unknown VR: "+std::string(DcmVR(source_vr).getVRName())); } return *destination; } void convert(Element const & source, DcmOtherByteOtherWord * destination) { auto const & value = source.as_binary(); if(value.size() > 1) { throw Exception("Cannot convert multiple valued binary element"); } Uint8 * output; OFCondition condition; if(destination->getTag().getVR().getValidEVR() == EVR_OB) { condition = destination->createUint8Array(value[0].size(), output); } else { Uint16* temp; condition = destination->createUint16Array(value[0].size()/2, temp); output = reinterpret_cast(temp); } if(condition.bad()) { throw Exception(condition); } std::copy(value[0].begin(), value[0].end(), output); } void convert(Element const & source, DcmOtherFloat * destination) { auto const & value = source.as_binary(); if(value.size() > 1) { throw Exception("Cannot convert multiple valued binary element"); } if(value[0].size()%4 != 0) { throw Exception("Cannot convert OF from odd-sized array"); } for(unsigned int i=0; i(&value[0][i*4]); destination->putFloat32(f, i); } } DcmItem * convert(std::shared_ptr source, bool as_data_set) { DcmItem * destination = as_data_set?(new DcmDataset()):(new DcmItem()); for(auto const & iterator: *source) { if(iterator.second.vr == VR::SQ) { if(iterator.second.empty()) { destination->insertEmptyElement(DcmTag(convert(iterator.first), convert(iterator.second.vr))); } else { for(auto const & source_item: iterator.second.as_data_set()) { DcmItem* item = convert(source_item, false); destination->insertSequenceItem(DcmTag(convert(iterator.first), convert(iterator.second.vr)), item); } } } else { auto const destination_element = convert( iterator.first, iterator.second); destination->insert(destination_element); } } return destination; } std::shared_ptr convert(DcmItem * source) { auto destination = std::make_shared(); for(unsigned long i=0; icard(); ++i) { auto const source_element = source->getElement(i); auto const destination_tag = convert(source_element->getTag()); auto const destination_element = convert(source_element); destination->add(destination_tag, destination_element); } return destination; } } } odil-0.11.0/src/odil/dcmtk/conversion.h000066400000000000000000000047221362244656000177130ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _d5ecacb8_04ff_48b0_8026_570c9b2ae360 #define _d5ecacb8_04ff_48b0_8026_570c9b2ae360 #include #include #include "odil/DataSet.h" #include "odil/Element.h" #include "odil/odil.h" #include "odil/Tag.h" #include "odil/VR.h" namespace odil { namespace dcmtk { /// @brief Convert a odil::VR to a DcmVR. ODIL_API DcmEVR convert(VR vr); /// @brief Convert a DcmVR to a odil::VR. ODIL_API VR convert(DcmEVR evr); /// @brief Convert a odil::Tag to a DcmTagKey. ODIL_API DcmTagKey convert(Tag const & tag); /// @brief Convert a DcmTagKey to a odil::Tag. ODIL_API Tag convert(DcmTagKey const & tag); /// @brief Convert a odil::Element to a DcmElement. ODIL_API DcmElement * convert(Tag const & tag, Element const & source); /// @brief Low-level element converter. template void convert( Element const & source, DcmElement * destination, TSourceType const & (Element::*getter)() const); /// @brief Convert a DcmElement to a odil::Element. ODIL_API Element convert(DcmElement * source); /// @brief Low-level element converter. template void convert( Element const & source, DcmElement * destination, TSourceType const & (Element::*getter)() const); /// @brief Low-level element converter. ODIL_API void convert(Element const & source, DcmOtherByteOtherWord * destination); /// @brief Low-level element converter. ODIL_API void convert(Element const & source, DcmOtherFloat * destination); /// @brief Low-level element converter. template void convert( DcmElement * source, Element & destination, TDestinationType & (Element::*getter)()); /// @brief Convert a odil::DataSet to a DcmDataset or a DcmItem. ODIL_API DcmItem * convert( std::shared_ptr source, bool as_data_set=true); /// @brief Convert a DcmDataset to a odil::DataSet. ODIL_API std::shared_ptr convert(DcmItem * source); } } #include "odil/dcmtk/conversion.txx" #endif // _d5ecacb8_04ff_48b0_8026_570c9b2ae360 odil-0.11.0/src/odil/dcmtk/conversion.txx000066400000000000000000000044311362244656000203040ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _665b5269_140c_4320_94f2_ad8a7c052e9b #define _665b5269_140c_4320_94f2_ad8a7c052e9b #include "odil/dcmtk/conversion.h" #include #include "odil/Element.h" #include "odil/dcmtk/ElementAccessor.h" namespace odil { namespace dcmtk { template void convert( Element const & source, DcmElement * destination, TSourceType const & (Element::*getter)() const) { auto const & source_values = (source.*getter)(); for(auto i = 0; i::element_set( *destination, source_values[i], i); } } template void convert( Element const & source, DcmElement * destination, TSourceType const & (Element::*getter)() const) { OFString destination_value; auto const & source_values = (source.*getter)(); if(!source_values.empty()) { auto const last_it = --source_values.end(); auto it = source_values.begin(); while(it != last_it) { std::ostringstream stream; stream << *it; destination_value += stream.str().c_str(); destination_value += "\\"; ++it; } std::ostringstream stream; stream << *last_it; destination_value += stream.str().c_str(); } destination->putOFStringArray(destination_value); } template void convert( DcmElement * source, Element & destination, TDestinationType & (Element::*getter)()) { auto & destination_values = (destination.*getter)(); destination_values.reserve(source->getVM()); for(auto i = 0; igetVM(); ++i) { destination_values.push_back( ElementAccessor::element_get(*source, i)); } } } } #endif // _665b5269_140c_4320_94f2_ad8a7c052e9b odil-0.11.0/src/odil/dul/000077500000000000000000000000001362244656000150325ustar00rootroot00000000000000odil-0.11.0/src/odil/dul/EventData.h000066400000000000000000000020421362244656000170540ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _350775b8_701f_4069_ab1e_c974a209389c #define _350775b8_701f_4069_ab1e_c974a209389c #include #include "odil/AssociationAcceptor.h" #include "odil/AssociationParameters.h" #include "odil/dul/Transport.h" #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace dul { /// @brief Data related to events of the DUL state machine. class ODIL_API EventData { public: Transport::Socket::endpoint_type peer_endpoint; std::shared_ptr pdu; AssociationParameters association_parameters; std::shared_ptr reject; }; } } #endif // _350775b8_701f_4069_ab1e_c974a209389c odil-0.11.0/src/odil/dul/StateMachine.cpp000066400000000000000000000501601362244656000201050ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/dul/StateMachine.h" #include #include #include #include #include #include #include #include #include "odil/AssociationParameters.h" #include "odil/endian.h" #include "odil/Exception.h" #include "odil/dul/EventData.h" #include "odil/dul/Transport.h" #include "odil/pdu/AAbort.h" #include "odil/pdu/AAssociate.h" #include "odil/pdu/AAssociateRJ.h" #include "odil/pdu/AReleaseRP.h" #include "odil/pdu/AReleaseRQ.h" #include "odil/pdu/PDataTF.h" namespace odil { namespace dul { StateMachine ::StateMachine() : _state(State::Sta1), _timeout(boost::posix_time::pos_infin), _artim_timer(_transport.get_service()), _association_acceptor(default_association_acceptor) { // Nothing else. } StateMachine ::~StateMachine() { // Nothing to to, transport is closed by ~Transport. } void StateMachine ::transition(Event const & event, EventData & data) { auto const guard_iterator = StateMachine::_guards.find( {this->_state, event}); auto const guard_value = (guard_iterator != StateMachine::_guards.end())? guard_iterator->second(*this, data):true; auto const transition_iterator = StateMachine::_transitions.find( std::make_tuple(this->_state, event, guard_value)); if(transition_iterator == StateMachine::_transitions.end()) { throw Exception("No such transition"); } auto const & action = transition_iterator->second.first; auto const & next_state = transition_iterator->second.second; // Do action if(action == Action::AE_1) { this->AE_1(data); } else if(action == Action::AE_2) { this->AE_2(data); } else if(action == Action::AE_3) { this->AE_3(data); } else if(action == Action::AE_4) { this->AE_4(data); } else if(action == Action::AE_5) { this->AE_5(data); } else if(action == Action::AE_6) { this->AE_6(data); } else if(action == Action::AE_7) { this->AE_7(data); } else if(action == Action::AE_8) { this->AE_8(data); } else if(action == Action::DT_1) { this->DT_1(data); } else if(action == Action::DT_2) { this->DT_2(data); } else if(action == Action::AR_1) { this->AR_1(data); } else if(action == Action::AR_2) { this->AR_2(data); } else if(action == Action::AR_3) { this->AR_3(data); } else if(action == Action::AR_4) { this->AR_4(data); } else if(action == Action::AR_5) { this->AR_5(data); } else if(action == Action::AR_6) { this->AR_6(data); } else if(action == Action::AR_7) { this->AR_7(data); } else if(action == Action::AR_8) { this->AR_8(data); } else if(action == Action::AR_9) { this->AR_9(data); } else if(action == Action::AR_10) { this->AR_10(data); } else if(action == Action::AA_1) { this->AA_1(data); } else if(action == Action::AA_2) { this->AA_2(data); } else if(action == Action::AA_3) { this->AA_3(data); } else if(action == Action::AA_4) { this->AA_4(data); } else if(action == Action::AA_5) { this->AA_5(data); } else if(action == Action::AA_6) { this->AA_6(data); } else if(action == Action::AA_7) { this->AA_7(data); } else if(action == Action::AA_8) { this->AA_8(data); } else { throw Exception("Unknown action"); } this->_state = next_state; } StateMachine::State StateMachine ::get_state() const { return this->_state; } Transport const & StateMachine ::get_transport() const { return this->_transport; } Transport & StateMachine ::get_transport() { return this->_transport; } StateMachine::duration_type StateMachine ::get_timeout() const { return this->_timeout; } void StateMachine ::set_timeout(duration_type timeout) { this->_timeout = timeout; } void StateMachine ::receive(EventData & data) { this->_transport.receive(data.peer_endpoint); this->transition(Event::TransportConnectionIndication, data); } void StateMachine ::send_pdu(EventData & data) { if(data.pdu == nullptr) { throw Exception("No PDU"); } auto const & item = data.pdu->get_item(); auto const type = item.as_unsigned_int_8("PDU-type"); if(type == 0x01) { this->transition(Event::AAssociateRQLocal, data); this->transition(Event::TransportConnectionConfirmation, data); } else if(type == 0x02) { this->transition(Event::AAssociateACLocal, data); } else if(type == 0x03) { this->transition(Event::AAssociateRJLocal, data); } else if(type == 0x04) { this->transition(Event::PDataTFLocal, data); } else if(type == 0x05) { this->transition(Event::AReleaseRQLocal, data); } else if(type == 0x06) { this->transition(Event::AReleaseRPLocal, data); } else if(type == 0x07) { this->transition(Event::AAbortLocal, data); } else { this->transition(Event::InvalidPDU, data); } } void StateMachine ::receive_pdu(EventData & data) { auto const header = this->_transport.read(6); uint8_t const type = header[0]; uint32_t const length = big_endian_to_host( *reinterpret_cast(&header[0]+2)); auto const pdu_data = this->_transport.read(length); std::stringstream stream; stream.write(&header[0], header.size()); stream.write(&pdu_data[0], pdu_data.size()); data.pdu=nullptr; Event event = Event::None; if(type == 0x01) { data.pdu = std::make_shared(stream); event = Event::AAssociateRQRemote; } else if(type == 0x02) { data.pdu = std::make_shared(stream); event = Event::AAssociateACRemote; } else if(type == 0x03) { data.pdu = std::make_shared(stream); event = Event::AAssociateRJRemote; } else if(type == 0x04) { data.pdu = std::make_shared(stream); event = Event::PDataTFRemote; } else if(type == 0x05) { data.pdu = std::make_shared(stream); event = Event::AReleaseRQRemote; } else if(type == 0x06) { data.pdu = std::make_shared(stream); event = Event::AReleaseRPRemote; } else if(type == 0x07) { data.pdu = std::make_shared(stream); event = Event::AAbortRemote; } else { event = Event::InvalidPDU; } this->transition(event, data); } void StateMachine ::start_timer(EventData & data) { return; auto const canceled = this->_artim_timer.expires_from_now(this->_timeout); if(canceled != 0) { throw Exception("ARTIM timer started with pending operations"); } this->_artim_timer.async_wait( [this,&data](boost::system::error_code const & e) { //source = Source::TIMER; //error = e; if(!e) { this->transition(Event::ARTIMTimerExpired, data); } else if(e == boost::asio::error::operation_aborted) { // Do nothing } else { throw boost::system::system_error(e); } } ); } void StateMachine ::stop_timer() { return; this->_artim_timer.expires_at(boost::posix_time::pos_infin); this->_transport.get_service().poll(); // FIXME: check that the timer was aborted /* if(source != Source::TIMER) { throw Exception("Unknown event"); } else if(error != boost::asio::error::operation_aborted) { throw Exception("TCP timer error: "+error.message()); } */ this->_transport.get_service().reset(); } AssociationAcceptor const & StateMachine ::get_association_acceptor() const { return this->_association_acceptor; } void StateMachine ::set_association_acceptor(AssociationAcceptor const & acceptor) { this->_association_acceptor = acceptor; } #define transition_full(start, event, guard, action, end) { \ std::make_tuple(StateMachine::State::start, StateMachine::Event::event, guard), \ { StateMachine::Action::action, StateMachine::State::end } } #define transition(start, event, action, end) \ transition_full(start, event, true, action, end) StateMachine::TransitionMap const StateMachine ::_transitions = { transition(Sta1, AAssociateRQLocal, AE_1, Sta4), transition(Sta1, TransportConnectionIndication, AE_5, Sta2), transition(Sta2, AAssociateACRemote, AA_1, Sta13), transition(Sta2, AAssociateRJRemote, AA_1, Sta13), transition_full(Sta2, AAssociateRQRemote, true, AE_6, Sta3), transition_full(Sta2, AAssociateRQRemote, false, AE_6, Sta13), transition(Sta2, PDataTFRemote, AA_1, Sta13), transition(Sta2, AReleaseRQRemote, AA_1, Sta13), transition(Sta2, AReleaseRPRemote, AA_1, Sta13), transition(Sta2, AAbortRemote, AA_2, Sta1), transition(Sta2, TransportConnectionClosedIndication, AA_5, Sta1), transition(Sta2, ARTIMTimerExpired, AA_2, Sta1), transition(Sta2, InvalidPDU, AA_1, Sta13), transition(Sta3, AAssociateACRemote, AA_8, Sta13), transition(Sta3, AAssociateRJRemote, AA_8, Sta13), transition(Sta3, AAssociateRQRemote, AA_8, Sta13), transition(Sta3, AAssociateACLocal, AE_7, Sta6), transition(Sta3, AAssociateRJLocal, AE_8, Sta13), transition(Sta3, PDataTFRemote, AA_8, Sta13), transition(Sta3, AReleaseRQRemote, AA_8, Sta13), transition(Sta3, AReleaseRPRemote, AA_8, Sta13), transition(Sta3, AAbortLocal, AA_1, Sta13), transition(Sta3, AAbortRemote, AA_3, Sta1), transition(Sta3, TransportConnectionClosedIndication, AA_4, Sta1), transition(Sta3, InvalidPDU, AA_8, Sta13), transition(Sta4, TransportConnectionConfirmation, AE_2, Sta5), transition(Sta4, AAbortLocal, AA_2, Sta1), transition(Sta4, TransportConnectionClosedIndication, AA_4, Sta1), transition(Sta5, AAssociateACRemote, AE_3, Sta6), transition(Sta5, AAssociateRJRemote, AE_4, Sta1), transition(Sta5, AAssociateRQRemote, AA_8, Sta13), transition(Sta5, PDataTFRemote, AA_8, Sta13), transition(Sta5, AReleaseRQRemote, AA_8, Sta13), transition(Sta5, AReleaseRPRemote, AA_8, Sta13), transition(Sta5, AAbortLocal, AA_1, Sta13), transition(Sta5, AAbortRemote, AA_3, Sta1), transition(Sta5, TransportConnectionClosedIndication, AA_4, Sta1), transition(Sta5, InvalidPDU, AA_8, Sta13), transition(Sta6, AAssociateACRemote, AA_8, Sta13), transition(Sta6, AAssociateRJRemote, AA_8, Sta13), transition(Sta6, AAssociateRQRemote, AA_8, Sta13), transition(Sta6, PDataTFLocal, DT_1, Sta6), transition(Sta6, PDataTFRemote, DT_2, Sta6), transition(Sta6, AReleaseRQLocal, AR_1, Sta7), transition(Sta6, AReleaseRQRemote, AR_2, Sta8), transition(Sta6, AReleaseRPRemote, AA_8, Sta13), transition(Sta6, AAbortLocal, AA_1, Sta13), transition(Sta6, AAbortRemote, AA_3, Sta1), transition(Sta6, TransportConnectionClosedIndication, AA_4, Sta1), transition(Sta6, InvalidPDU, AA_8, Sta13), transition(Sta7, AAssociateACRemote, AA_8, Sta13), transition(Sta7, AAssociateRJRemote, AA_8, Sta13), transition(Sta7, AAssociateRQRemote, AA_8, Sta13), transition(Sta7, PDataTFRemote, AR_6, Sta7), //transition(Sta7, AReleaseRQRemote, AR_8, Sta9Or10), transition(Sta7, AReleaseRPRemote, AR_3, Sta1), transition(Sta7, AAbortLocal, AA_1, Sta13), transition(Sta7, AAbortRemote, AA_3, Sta1), transition(Sta7, TransportConnectionClosedIndication, AA_4, Sta1), transition(Sta7, InvalidPDU, AA_8, Sta13), transition(Sta8, AAssociateACRemote, AA_8, Sta13), transition(Sta8, AAssociateRJRemote, AA_8, Sta13), transition(Sta8, AAssociateRQRemote, AA_8, Sta13), transition(Sta8, PDataTFLocal, AR_7, Sta8), transition(Sta8, PDataTFRemote, AA_8, Sta13), transition(Sta8, AReleaseRQRemote, AA_8, Sta13), transition(Sta8, AReleaseRPRemote, AA_8, Sta13), transition(Sta8, AReleaseRPLocal, AR_4, Sta13), transition(Sta8, AAbortLocal, AA_1, Sta13), transition(Sta8, AAbortRemote, AA_3, Sta1), transition(Sta8, TransportConnectionClosedIndication, AA_4, Sta1), transition(Sta8, InvalidPDU, AA_8, Sta13), transition(Sta9, AAssociateACRemote, AA_8, Sta13), transition(Sta9, AAssociateRJRemote, AA_8, Sta13), transition(Sta9, AAssociateRQRemote, AA_8, Sta13), transition(Sta9, PDataTFRemote, AA_8, Sta13), transition(Sta9, AReleaseRQRemote, AA_8, Sta13), transition(Sta9, AReleaseRPRemote, AA_8, Sta13), transition(Sta9, AReleaseRPLocal, AR_9, Sta11), transition(Sta9, AAbortLocal, AA_1, Sta13), transition(Sta9, AAbortRemote, AA_3, Sta1), transition(Sta9, TransportConnectionClosedIndication, AA_4, Sta1), transition(Sta9, InvalidPDU, AA_8, Sta13), transition(Sta10, AAssociateACRemote, AA_8, Sta13), transition(Sta10, AAssociateRJRemote, AA_8, Sta13), transition(Sta10, AAssociateRQRemote, AA_8, Sta13), transition(Sta10, PDataTFRemote, AA_8, Sta13), transition(Sta10, AReleaseRQRemote, AA_8, Sta13), transition(Sta10, AReleaseRPRemote, AR_10, Sta12), transition(Sta10, AAbortLocal, AA_1, Sta13), transition(Sta10, AAbortRemote, AA_3, Sta1), transition(Sta10, TransportConnectionClosedIndication, AA_4, Sta1), transition(Sta10, InvalidPDU, AA_8, Sta13), transition(Sta11, AAssociateACRemote, AA_8, Sta13), transition(Sta11, AAssociateRJRemote, AA_8, Sta13), transition(Sta11, AAssociateRQRemote, AA_8, Sta13), transition(Sta11, PDataTFRemote, AA_8, Sta13), transition(Sta11, AReleaseRQRemote, AA_8, Sta13), transition(Sta11, AReleaseRPRemote, AR_3, Sta1), transition(Sta11, AAbortLocal, AA_1, Sta13), transition(Sta11, AAbortRemote, AA_3, Sta1), transition(Sta11, TransportConnectionClosedIndication, AA_4, Sta1), transition(Sta11, InvalidPDU, AA_8, Sta13), transition(Sta12, AAssociateACRemote, AA_8, Sta13), transition(Sta12, AAssociateRJRemote, AA_8, Sta13), transition(Sta12, AAssociateRQRemote, AA_8, Sta13), transition(Sta12, PDataTFRemote, AA_8, Sta13), transition(Sta12, AReleaseRQRemote, AA_8, Sta13), transition(Sta12, AReleaseRPRemote, AA_8, Sta13), transition(Sta12, AReleaseRPLocal, AR_4, Sta13), transition(Sta12, AAbortLocal, AA_1, Sta13), transition(Sta12, AAbortRemote, AA_3, Sta1), transition(Sta12, TransportConnectionClosedIndication, AA_4, Sta1), transition(Sta12, InvalidPDU, AA_8, Sta13), transition(Sta13, AAssociateACRemote, AA_6, Sta13), transition(Sta13, AAssociateRJRemote, AA_6, Sta13), transition(Sta13, AAssociateRQRemote, AA_7, Sta13), transition(Sta13, PDataTFRemote, AA_6, Sta13), transition(Sta13, AReleaseRQRemote, AA_6, Sta13), transition(Sta13, AReleaseRPRemote, AA_6, Sta13), transition(Sta13, AAbortRemote, AA_2, Sta1), transition(Sta13, TransportConnectionClosedIndication, AR_5, Sta1), transition(Sta13, ARTIMTimerExpired, AA_2, Sta1), transition(Sta13, InvalidPDU, AA_7, Sta13), }; StateMachine::GuardMap const StateMachine ::_guards = { { {StateMachine::State::Sta2, StateMachine::Event::AAssociateRQRemote}, [](StateMachine const & state_machine, EventData & data) { try { AssociationParameters const input_parameters( *std::dynamic_pointer_cast(data.pdu)); data.association_parameters = state_machine.get_association_acceptor()(input_parameters); } catch(AssociationRejected const & reject) { data.reject = std::make_shared(reject); return false; } return true; } }, }; #undef transition #undef transition_full void StateMachine ::_send_pdu(EventData & data, uint8_t pdu_type) { if(data.pdu == nullptr) { throw Exception("No PDU"); } auto const & item = data.pdu->get_item(); if(item.as_unsigned_int_8("PDU-type") != pdu_type) { throw Exception("Invalid PDU"); } std::ostringstream stream; stream << item; this->_transport.write(stream.str()); } void StateMachine ::AE_1(EventData & data) { this->_transport.connect(data.peer_endpoint); } void StateMachine ::AE_2(EventData & data) { this->_send_pdu(data, 0x01); } void StateMachine ::AE_3(EventData & ) { // Do nothing: notification is implicit since this function is only called // by receive_pdu } void StateMachine ::AE_4(EventData & ) { // Notification is implicit since this function is only called by // receive_pdu this->_transport.close(); } void StateMachine ::AE_5(EventData & data) { // Connection response has already been sent. this->start_timer(data); } void StateMachine ::AE_6(EventData & data) { this->stop_timer(); if(data.reject) { data.pdu = std::make_shared( data.reject->get_result(), data.reject->get_source(), data.reject->get_reason()); this->_send_pdu(data, 0x03); data.pdu = NULL; } else { // Issue A-ASSOCIATE indication // Do nothing: notification is implicit since this function is only // called by receive_pdu } } void StateMachine ::AE_7(EventData & data) { this->_send_pdu(data, 0x02); } void StateMachine ::AE_8(EventData & data) { this->_send_pdu(data, 0x03); this->start_timer(data); } void StateMachine ::DT_1(EventData & data) { this->_send_pdu(data, 0x04); } void StateMachine ::DT_2(EventData & ) { // Do nothing: notification is implicit since this function is only called // by receive_pdu } void StateMachine ::AR_1(EventData & data) { this->_send_pdu(data, 0x05); } void StateMachine ::AR_2(EventData & ) { // Do nothing: notification is implicit since this function is only called // by receive_pdu } void StateMachine ::AR_3(EventData & ) { // Notification is implicit since this function is only called by // receive_pdu this->_transport.close(); } void StateMachine ::AR_4(EventData & data) { this->_send_pdu(data, 0x06); this->start_timer(data); } void StateMachine ::AR_5(EventData & ) { this->stop_timer(); } void StateMachine ::AR_6(EventData & ) { // Do nothing: notification is implicit since this function is only called // by receive_pdu } void StateMachine ::AR_7(EventData & data) { this->_send_pdu(data, 0x04); } void StateMachine ::AR_8(EventData & ) { // Do nothing: notification is implicit since this function is only called // by receive_pdu } void StateMachine ::AR_9(EventData & data) { this->_send_pdu(data, 0x06); } void StateMachine ::AR_10(EventData & ) { // Do nothing: notification is implicit since this function is only called // by receive_pdu } void StateMachine ::AA_1(EventData & data) { if(std::dynamic_pointer_cast(data.pdu)) { this->_send_pdu(data, 0x07); } else { data.pdu = std::make_shared(1, 2); this->send_pdu(data); } this->start_timer(data); } void StateMachine ::AA_2(EventData & ) { this->stop_timer(); this->_transport.close(); } void StateMachine ::AA_3(EventData & ) { // Notification is implicit since this function is only called // by receive_pdu this->_transport.close(); } void StateMachine ::AA_4(EventData & ) { // Do nothing: notification is implicit since this function is only called // by receive_pdu } void StateMachine ::AA_5(EventData & ) { this->stop_timer(); } void StateMachine ::AA_6(EventData & ) { // Nothing to do. } void StateMachine ::AA_7(EventData & data) { this->_send_pdu(data, 0x07); } void StateMachine ::AA_8(EventData & data) { data.pdu = std::make_shared(2, 2); this->_send_pdu(data, 0x07); // Notification is implicit this->start_timer(data); } } } odil-0.11.0/src/odil/dul/StateMachine.h000066400000000000000000000165771362244656000175700ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _981c80db_b2ac_4f25_af6c_febf5563d178 #define _981c80db_b2ac_4f25_af6c_febf5563d178 #include #include #include #include #include #include "odil/AssociationAcceptor.h" #include "odil/dul/EventData.h" #include "odil/dul/Transport.h" #include "odil/odil.h" namespace odil { namespace dul { /// @brief State machine for the DICOM upper layer. class ODIL_API StateMachine { public: /// @brief States of the state machine. enum class State { Sta1, Sta2, Sta3, Sta4, Sta5, Sta6, Sta7, Sta8, Sta9, Sta10, Sta11, Sta12, Sta13 }; /// @brief Event causing the transitions. enum class Event { None, // dummy event to allow easier initialization TransportConnectionIndication, TransportConnectionConfirmation, TransportConnectionClosedIndication, AAssociateRQLocal, AAssociateRQRemote, AAssociateACLocal, AAssociateACRemote, AAssociateRJLocal, AAssociateRJRemote, AReleaseRQLocal, AReleaseRQRemote, AReleaseRPLocal, AReleaseRPRemote, PDataTFLocal, PDataTFRemote, AAbortLocal, AAbortRemote, ARTIMTimerExpired, InvalidPDU, }; /// @brief Duration of the timeout. typedef boost::asio::deadline_timer::duration_type duration_type; /// @brief Constructor, initializing to Sta1. StateMachine(); /// @brief Destructor, closing the transport. ~StateMachine(); /** * @brief Perform the transition related to the event and current state. * Raise an exception if no such transition exists. */ void transition(Event const & event, EventData & data); /// @brief Return the current state. State get_state() const; /// @brief Return the TCP transport. Transport const & get_transport() const; /// @brief Return the TCP transport. Transport & get_transport(); /// @brief Return the timeout, default to infinity. duration_type get_timeout() const; /// @brief Set the timeout. void set_timeout(duration_type timeout); /** * @brief Receive a connection on the TCP transport, perform the * corresponding transition. */ void receive(EventData & data); /// @brief Send a PDU to the transport, perform the corresponding transition. void send_pdu(EventData & data); /// @brief Receive a PDU on the transport, perform the corresponding transition. void receive_pdu(EventData & data); /// @brief Start (or re-start if already started) the ARTIM timer. void start_timer(EventData & data); /// @brief Stop the ARTIM timer. void stop_timer(); /** * @brief Return the callback checking whether the association request is * acceptable. * * By default, all association requests are accepted. */ AssociationAcceptor const & get_association_acceptor() const; /** * @brief Set the callback checking whether the association request is * acceptable. */ void set_association_acceptor(AssociationAcceptor const & acceptor); private: enum class Action { AE_1, AE_2, AE_3, AE_4, AE_5, AE_6, AE_7, AE_8, DT_1, DT_2, AR_1, AR_2, AR_3, AR_4, AR_5, AR_6, AR_7, AR_8, AR_9, AR_10, AA_1, AA_2, AA_3, AA_4, AA_5, AA_6, AA_7, AA_8 }; typedef std::map< std::tuple, std::pair> TransitionMap; typedef std::map< std::pair, std::function> GuardMap; static TransitionMap const _transitions; static GuardMap const _guards; /// @brief Current state. State _state; /// @brief TCP transport. Transport _transport; /// @brief Timeout of the ARTIM timer. duration_type _timeout; /// @brief Association Request/Reject/Release Timer. boost::asio::deadline_timer _artim_timer; /// @brief Callback checking whether an association request is acceptable. AssociationAcceptor _association_acceptor; /// @brief Check the PDU type in data and send it. void _send_pdu(EventData & data, uint8_t pdu_type); /** * @brief Issue TRANSPORT CONNECT request primitive to local transport * service. */ void AE_1(EventData & data); /// @brief Send A-ASSOCIATE-RQ-PDU. void AE_2(EventData & data); /// @brief Issue A-ASSOCIATE confirmation (accept) primitive. void AE_3(EventData & data); /** * @brief Issue A-ASSOCIATE confirmation (reject) primitive and close * transport connection. */ void AE_4(EventData & data); /// @brief Issue Transport connection response primitive; start ARTIM timer. void AE_5(EventData & data); /// @brief Stop ARTIM timer and accept or reject connection. void AE_6(EventData & data); /// @brief Send A-ASSOCIATE-AC PDU. void AE_7(EventData & data); /// @brief Send A-ASSOCIATE-RJ PDU and start ARTIM timer. void AE_8(EventData & data); /// @brief Send P-DATA-TF PDU. void DT_1(EventData & data); /// @brief Send P-DATA indication primitive. void DT_2(EventData & data); /// @brief Send A-RELEASE-RQ PDU. void AR_1(EventData & data); /// @brief Issue A-RELEASE indication primitive. void AR_2(EventData & data); /** * @brief Issue A-RELEASE confirmation primitive, and close transport. * connection. */ void AR_3(EventData & data); /// @brief Issue A-RELEASE-RP PDU and start ARTIM timer. void AR_4(EventData & data); /// @brief Stop ARTIM timer. void AR_5(EventData & data); /// @brief Issue P-DATA indication. void AR_6(EventData & data); /// @brief Issue P-DATA-TF PDU. void AR_7(EventData & data); /// @brief Issue A-RELEASE indication (release collision). void AR_8(EventData & data); /// @brief Send A-RELEASE-RP PDU. void AR_9(EventData & data); /// @brief Issue A-RELEASE confirmation primitive. void AR_10(EventData & data); /** * @brief Send A-ABORT PDU (service-user source) and start (or restart if * already started) ARTIM timer. */ void AA_1(EventData & data); /// @brief Stop ARTIM timer if running. Close transport connection. void AA_2(EventData & data); /** * @brief If (service-user inititated abort): issue A-ABORT indication and * close transport connection ; otherwise (service-provider inititated * abort): issue A-P-ABORT indication and close transport connection. */ void AA_3(EventData & data); /// @brief Issue A-P-ABORT indication primitive. void AA_4(EventData & data); /// @brief Stop ARTIM timer. void AA_5(EventData & data); /// @brief Ignore PDU. void AA_6(EventData & data); /// @brief Send A-ABORT PDU. void AA_7(EventData & data); /** * @brief Send A-ABORT PDU (service-provider source-), issue an A-P-ABORT * indication, and start ARTIM timer. */ void AA_8(EventData & data); }; } } #endif // _981c80db_b2ac_4f25_af6c_febf5563d178 odil-0.11.0/src/odil/dul/Transport.cpp000066400000000000000000000147371362244656000175460ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/dul/Transport.h" #include #include #include #include #include "odil/Exception.h" #include "odil/logging.h" namespace odil { namespace dul { Transport ::Transport() : _service(), _socket(nullptr), _timeout(boost::posix_time::pos_infin), _deadline(_service) { // Nothing else } Transport ::~Transport() { if(this->is_open()) { this->close(); } } boost::asio::io_service const & Transport ::get_service() const { return this->_service; } boost::asio::io_service & Transport ::get_service() { return this->_service; } std::shared_ptr Transport ::get_socket() const { return this->_socket; } std::shared_ptr Transport ::get_socket() { return this->_socket; } Transport::duration_type Transport ::get_timeout() const { return this->_timeout; } void Transport ::set_timeout(duration_type timeout) { this->_timeout = timeout; } bool Transport ::is_open() const { return (this->_socket != nullptr && this->_socket->is_open()); } void Transport ::connect(Socket::endpoint_type const & peer_endpoint) { if(this->is_open()) { throw Exception("Already connected"); } auto source = Source::NONE; boost::system::error_code error; this->_start_deadline(source, error); this->_socket = std::make_shared(this->_service); this->_socket->async_connect( peer_endpoint, [&source,&error](boost::system::error_code const & e) { source = Source::OPERATION; error = e; } ); this->_run(source, error); } void Transport ::receive(Socket::endpoint_type const & endpoint) { if(this->is_open()) { throw Exception("Already connected"); } auto source = Source::NONE; boost::system::error_code error; this->_start_deadline(source, error); this->_socket = std::make_shared(this->_service); this->_acceptor = std::make_shared( this->_service, endpoint); boost::asio::socket_base::reuse_address option(true); this->_acceptor->set_option(option); this->_acceptor->async_accept( *this->_socket, [&source,&error](boost::system::error_code const & e) { source = Source::OPERATION; error = e; } ); this->_run(source, error); this->_acceptor = nullptr; } void Transport ::close() { if(this->_acceptor && this->_acceptor->is_open()) { this->_acceptor->close(); this->_acceptor = nullptr; } if(this->is_open()) { try { this->_socket->shutdown(boost::asio::ip::tcp::socket::shutdown_both); } // Only used to prevent uncatchable error on WIN32 platforms and in wrappers. catch(std::exception & e) { ODIL_LOG(debug) << "Could not shut down transport: " << e.what(); } catch(...) { ODIL_LOG(debug) << "Could not shut down transport (unknown exception)"; } this->_socket->close(); this->_socket = nullptr; } } std::string Transport ::read(std::size_t length) { if(!this->is_open()) { throw Exception("Not connected"); } std::string data(length, 'a'); auto source = Source::NONE; boost::system::error_code error; this->_start_deadline(source, error); boost::asio::async_read( *this->_socket, boost::asio::buffer(&data[0], data.size()), [&source,&error](boost::system::error_code const & e, std::size_t) { source = Source::OPERATION; error = e; } ); this->_run(source, error); return data; } void Transport ::write(std::string const & data) { if(!this->is_open()) { throw Exception("Not connected"); } auto source = Source::NONE; boost::system::error_code error; this->_start_deadline(source, error); boost::asio::async_write( *this->_socket, boost::asio::buffer(data), [&source,&error](boost::system::error_code const & e, std::size_t) { source = Source::OPERATION; error = e; } ); this->_run(source, error); } void Transport ::_start_deadline(Source & source, boost::system::error_code & error) { auto const canceled = this->_deadline.expires_from_now(this->_timeout); if(canceled != 0) { throw Exception("TCP timer started with pending operations"); } this->_deadline.async_wait( [&source,&error](boost::system::error_code const & e) { source = Source::TIMER; error = e; } ); } void Transport ::_stop_deadline() { this->_deadline.expires_at(boost::posix_time::pos_infin); } void Transport ::_run(Source & source, boost::system::error_code & error) { // WARNING: it seems that run_one runs a *simple* operation, not a // *composed* operation, as is done by async_read/async_write while(source == Source::NONE) { auto const ran = this->_service.run_one(); if(ran == 0) { throw Exception("No operations ran"); } this->_service.reset(); } if(source == Source::OPERATION) { if(error) { throw Exception("Operation error: "+error.message()); } source = Source::NONE; this->_stop_deadline(); while(source == Source::NONE) { auto const polled = this->_service.poll_one(); if(polled == 0) { throw Exception("No operations polled"); } this->_service.reset(); } if(source != Source::TIMER) { throw Exception("Unknown event"); } else if(error != boost::asio::error::operation_aborted) { throw Exception("TCP timer error: "+error.message()); } } else if(source == Source::TIMER) { throw Exception("TCP time out"); } else { throw Exception("Unknown source"); } } } } odil-0.11.0/src/odil/dul/Transport.h000066400000000000000000000055351362244656000172070ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _1619bae8_acba_4bf8_8205_aa8dd0085c66 #define _1619bae8_acba_4bf8_8205_aa8dd0085c66 #include #include #include #include #include "odil/odil.h" namespace odil { namespace dul { /** * @brief TCP transport for the DICOM Upper Layer. * * The behavior of connect, receive, read and write is governed by the timeout * value: if the timeout expires before the operation is completed, an exception * will be raised. */ struct ODIL_API Transport { /// @brief Socket type. typedef boost::asio::ip::tcp::socket Socket; /// @brief Duration of the timeout. typedef boost::asio::deadline_timer::duration_type duration_type; /// @brief Constructor. Transport(); /// @brief Destructor. ~Transport(); /// @brief Return the io_service. boost::asio::io_service const & get_service() const; /// @brief Return the io_service. boost::asio::io_service & get_service(); /// @brief Return the socket. std::shared_ptr get_socket() const; /// @brief Return the socket. std::shared_ptr get_socket(); /// @brief Return the timeout, default to infinity. duration_type get_timeout() const; /// @brief Set the timeout. void set_timeout(duration_type timeout); /// @brief Test whether the transport is open. bool is_open() const; /// @brief Connect to the specified endpoint, raise an exception upon error. void connect(Socket::endpoint_type const & peer_endpoint); /** * @brief Receive a connection on the specified endpoint, raise an * exception upon error. */ void receive(Socket::endpoint_type const & endpoint); /// @brief Close the connection. void close(); /// @brief Read data, raise an exception on error. std::string read(std::size_t length); /// @brief Write data, raise an exception on error. void write(std::string const & data); private: boost::asio::io_service _service; std::shared_ptr _socket; duration_type _timeout; boost::asio::deadline_timer _deadline; std::shared_ptr _acceptor; enum class Source { NONE, TIMER, OPERATION, }; void _start_deadline(Source & source, boost::system::error_code & error); void _stop_deadline(); void _run(Source & source, boost::system::error_code & error); }; } } #endif // _1619bae8_acba_4bf8_8205_aa8dd0085c66 odil-0.11.0/src/odil/endian.h000066400000000000000000000031651362244656000156620ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _05d00816_25d0_41d1_9768_afd39f0503da #define _05d00816_25d0_41d1_9768_afd39f0503da #include #define ODIL_SWAP \ auto source = reinterpret_cast(&value); \ auto const end = source + sizeof(value); \ T result; \ auto destination = reinterpret_cast(&result) + sizeof(result) - 1; \ while(source != end) \ { \ *destination = *source; \ ++source; \ --destination; \ } namespace odil { enum class ByteOrdering { LittleEndian, BigEndian }; template T host_to_big_endian(T const & value) { #ifdef BOOST_LITTLE_ENDIAN ODIL_SWAP return result; #else return value; #endif } template T host_to_little_endian(T const & value) { #ifdef BOOST_BIG_ENDIAN ODIL_SWAP return result; #else return value; #endif } template T big_endian_to_host(T const & value) { #ifdef BOOST_LITTLE_ENDIAN ODIL_SWAP return result; #else return value; #endif } template T little_endian_to_host(T const & value) { #ifdef BOOST_BIG_ENDIAN ODIL_SWAP return result; #else return value; #endif } } #undef ODIL_SWAP #endif // _05d00816_25d0_41d1_9768_afd39f0503da odil-0.11.0/src/odil/json_converter.cpp000066400000000000000000000210701362244656000200120ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/json_converter.h" #include #include #include "odil/base64.h" #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/unicode.h" #include "odil/Value.h" #include "odil/VR.h" namespace odil { /// @brief Element visitor converting to JSON. class ToJSONVisitor { public: typedef Json::Value result_type; ToJSONVisitor(Value::Strings const & specific_char_set) : _specific_character_set(specific_char_set) { // Nothing else. } result_type operator()(VR const vr) const { result_type result; result["vr"] = as_string(vr); return result; } template result_type operator()(VR const vr, T const & value) const { result_type result; result["vr"] = as_string(vr); for(auto const & item: value) { result["Value"].append(item); } return result; } result_type operator()(VR const vr, Value::Integers const & value) const { result_type result; result["vr"] = as_string(vr); for(auto const & item: value) { result["Value"].append(Json::Int64(item)); } return result; } result_type operator()(VR const vr, Value::Strings const & value) const { result_type result; result["vr"] = as_string(vr); if(vr == VR::PN) { for(auto const & item: value) { result["Value"].append(this->_convert_pn(item)); } } else { for(auto const & item: value) { result["Value"].append(this->_convert_string(vr, item)); } } return result; } result_type operator()(VR const vr, Value::DataSets const & value) const { result_type result; result["vr"] = as_string(vr); for(auto const & item: value) { result["Value"].append(as_json(item)); } return result; } result_type operator()(VR const vr, Value::Binary const & value) const { if(value.size() > 1) { // PS3.18 2016b, F.2.7: There is a single InlineBinary value // representing the entire Value Field. // PS3.18 2016b, Figure 6.5-1: Pixel data is not encoded in // JSON/XML, but transfered using a different content type throw Exception("Binary element is multiple-valued"); } result_type result; result["vr"] = as_string(vr); std::string encoded; encoded.reserve(value[0].size()*4/3); base64::encode( value[0].begin(), value[0].end(), std::back_inserter(encoded)); result["InlineBinary"] = encoded; return result; } private: Value::Strings _specific_character_set; std::string _convert_string(VR const vr, Value::String const & value) const { if( vr != VR::LO && vr != VR::LT && vr != VR::PN && vr != VR::SH && vr != VR::ST && vr != VR::UT) { // Nothing to do return value; } return as_utf8(value, this->_specific_character_set, vr==VR::PN); } Json::Value _convert_pn(Value::String const & value) const { static auto const fields = { "Alphabetic", "Ideographic", "Phonetic" }; Json::Value json; auto fields_it = fields.begin(); std::string::size_type begin=0; while(begin != std::string::npos) { auto const end = value.find("=", begin); std::string::size_type size = 0; if(end != std::string::npos) { size = end-begin; } else { size = std::string::npos; } auto const component = value.substr(begin, size); json[*fields_it] = this->_convert_string(VR::PN, component); if(end != std::string::npos) { begin = end+1; ++fields_it; if(fields_it == fields.end()) { throw Exception("Invalid Person Name"); } } else { begin = end; } } return json; } }; Json::Value as_json( std::shared_ptr data_set, Value::Strings const & specific_character_set) { auto current_specific_char_set = specific_character_set; Json::Value json; if(!data_set) { return json; } for(auto const & it: *data_set) { auto const & tag = it.first; if(tag.element == 0) { // Skip group length tags continue; } auto const & element = it.second; // Specific character set if(tag == registry::SpecificCharacterSet) { current_specific_char_set = element.as_string(); } std::string const key(tag); ToJSONVisitor const visitor(current_specific_char_set); auto const value = apply_visitor(visitor, element); json[key] = value; } return json; } std::shared_ptr as_dataset(Json::Value const & json) { auto data_set = std::make_shared(); for(auto it=json.begin(); it != json.end(); ++it) { #if defined(JSONCPP_VERSION_HEXA) && JSONCPP_VERSION_HEXA >= 0x010504 Tag const tag(it.name()); #else Tag const tag(it.memberName()); #endif auto const & json_element = *it; auto const vr = as_vr(json_element["vr"].asString()); Element element(vr); if(is_string(vr) && vr != VR::PN) { auto const & json_value = json_element["Value"]; for(auto const & json_item: json_value) { element.as_string().push_back(json_item.asString()); } } else if(vr == VR::PN) { auto const & json_value = json_element["Value"]; for(auto const & json_item: json_value) { Value::Strings::value_type dicom_item; auto const fields = { "Alphabetic", "Ideographic", "Phonetic" }; for(auto const & field: fields) { if(json_item.isMember(field)) { dicom_item += json_item[field].asString(); } dicom_item += "="; } while(*dicom_item.rbegin() == '=') { dicom_item = dicom_item.substr(0, dicom_item.size()-1); } element.as_string().push_back(dicom_item); } } else if(is_real(vr)) { auto const & json_value = json_element["Value"]; for(auto const & json_item: json_value) { element.as_real().push_back(json_item.asDouble()); } } else if(is_int(vr)) { auto const & json_value = json_element["Value"]; for(auto const & json_item: json_value) { element.as_int().push_back(json_item.asInt64()); } } else if(vr == VR::SQ) { auto const & json_value = json_element["Value"]; for(auto const & json_item: json_value) { auto const dicom_item = as_dataset(json_item); element.as_data_set().push_back(dicom_item); } } else if(is_binary(vr)) { // cf. ToJSONVisitor::operator()(VR, Value::Binary): InlineBinary is // single-valued auto const & encoded = json_element["InlineBinary"].asString(); auto & decoded = element.as_binary(); decoded.resize(1); decoded.reserve(encoded.size()*3/4); base64::decode( encoded.begin(), encoded.end(), std::back_inserter(decoded[0])); } else { throw Exception("Unknown VR: "+as_string(vr)); } data_set->add(tag, element); } return data_set; } } odil-0.11.0/src/odil/json_converter.h000066400000000000000000000017331362244656000174630ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _6f5dc463_a89a_4f77_a0ed_36dca74b9e59 #define _6f5dc463_a89a_4f77_a0ed_36dca74b9e59 #include #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/Value.h" namespace odil { /// @brief Convert a data set to its JSON representation. ODIL_API Json::Value as_json( std::shared_ptr data_set, Value::Strings const & specific_character_set={}); /// @brief Create a data set from its JSON representation. ODIL_API std::shared_ptr as_dataset(Json::Value const & json); } #endif // _6f5dc463_a89a_4f77_a0ed_36dca74b9e59 odil-0.11.0/src/odil/logging.cpp000066400000000000000000000015651362244656000164070ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/logging.h" #include #include #include #include "odil/odil.h" namespace odil { namespace logging { bool configure() { boost::log::core::get()->set_filter( boost::log::trivial::severity >= boost::log::trivial::warning); return true; } boost::log::sources::severity_logger logger = {}; static bool const configured = configure(); } } odil-0.11.0/src/odil/logging.h000066400000000000000000000015351362244656000160510ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _5382f5e0_e993_4966_9447_542844edb635 #define _5382f5e0_e993_4966_9447_542844edb635 #include #include #include "odil/odil.h" #define ODIL_LOG(level) \ BOOST_LOG_SEV(odil::logging::logger, boost::log::trivial::level) namespace odil { namespace logging { extern ODIL_API boost::log::sources::severity_logger logger; } } #endif // _5382f5e0_e993_4966_9447_542844edb635 odil-0.11.0/src/odil/message/000077500000000000000000000000001362244656000156725ustar00rootroot00000000000000odil-0.11.0/src/odil/message/CEchoRequest.cpp000066400000000000000000000023011362244656000207240ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "CEchoRequest.h" #include "odil/message/Request.h" #include "odil/registry.h" #include "odil/Value.h" namespace odil { namespace message { CEchoRequest ::CEchoRequest( Value::Integer message_id, Value::String const & affected_sop_class_uid) : Request(message_id) { this->set_command_field(Command::C_ECHO_RQ); this->set_affected_sop_class_uid(affected_sop_class_uid); } CEchoRequest ::CEchoRequest(std::shared_ptr message) : Request(message) { if(!message || message->get_command_field() != Command::C_ECHO_RQ) { throw Exception("Message is not a C-ECHO-RQ"); } this->set_command_field(message->get_command_field()); this->set_affected_sop_class_uid( message->get_command_set()->as_string(registry::AffectedSOPClassUID, 0)); } } } odil-0.11.0/src/odil/message/CEchoRequest.h000066400000000000000000000024601362244656000203770ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _aec786b8_0074_4cb2_b9a1_4bf26bbd20fc #define _aec786b8_0074_4cb2_b9a1_4bf26bbd20fc #include "odil/message/Request.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief C-ECHO-RQ message. class ODIL_API CEchoRequest: public Request { public: /** * @brief Create an echo request with given Message ID and * affected SOP class UID. */ CEchoRequest( Value::Integer message_id, Value::String const & affected_sop_class_uid); /** * @brief Create a C-ECHO-RQ from a generic Message. * * Raise an exception if the Message does not contain a C-ECHO-RQ. */ CEchoRequest(std::shared_ptr message); ODIL_MESSAGE_MANDATORY_FIELD_STRING_MACRO( affected_sop_class_uid, registry::AffectedSOPClassUID) }; } } #endif // _aec786b8_0074_4cb2_b9a1_4bf26bbd20fc odil-0.11.0/src/odil/message/CEchoResponse.cpp000066400000000000000000000024651362244656000211050ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "CEchoResponse.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/message/Response.h" #include "odil/Value.h" namespace odil { namespace message { CEchoResponse ::CEchoResponse( Value::Integer message_id_being_responded_to, Value::Integer status, Value::String const & affected_sop_class_uid) : Response(message_id_being_responded_to, status) { this->set_command_field(Command::C_ECHO_RSP); this->set_affected_sop_class_uid(affected_sop_class_uid); } CEchoResponse ::CEchoResponse(std::shared_ptr message) : Response(message) { if(!message || message->get_command_field() != Command::C_ECHO_RSP) { throw Exception("Message is not a C-ECHO-RSP"); } this->set_command_field(message->get_command_field()); this->set_affected_sop_class_uid( message->get_command_set()->as_string(registry::AffectedSOPClassUID, 0)); } } } odil-0.11.0/src/odil/message/CEchoResponse.h000066400000000000000000000025441362244656000205500ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _266252d9_e801_479e_a805_004b101c5250 #define _266252d9_e801_479e_a805_004b101c5250 #include "odil/odil.h" #include "odil/registry.h" #include "odil/message/Response.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief C-ECHO-RSP message. class ODIL_API CEchoResponse: public Response { public: /** * @brief Create an echo response with given Message ID and * affected SOP class UID. */ CEchoResponse( Value::Integer message_id_being_responded_to, Value::Integer status, Value::String const & affected_sop_class_uid); /** * @brief Create a C-ECHO-RSP from a generic Message. * * Raise an exception if the Message does not contain a C-ECHO-RSP. */ CEchoResponse(std::shared_ptr message); ODIL_MESSAGE_MANDATORY_FIELD_STRING_MACRO( affected_sop_class_uid, registry::AffectedSOPClassUID) }; } } #endif // _266252d9_e801_479e_a805_004b101c5250 odil-0.11.0/src/odil/message/CFindRequest.cpp000066400000000000000000000040201362244656000207260ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "CFindRequest.h" #include #include "odil/Exception.h" #include "odil/registry.h" #include "odil/message/Request.h" #include "odil/Value.h" namespace odil { namespace message { CFindRequest ::CFindRequest( Value::Integer message_id, Value::String const & affected_sop_class_uid, Value::Integer priority, std::shared_ptr dataset) : Request(message_id) { this->_create(affected_sop_class_uid, priority, dataset); this->set_data_set(dataset); } CFindRequest ::CFindRequest(std::shared_ptr message) : Request(message) { this->_parse(message); this->set_data_set(message->get_data_set()); } void CFindRequest ::_create( Value::String const & affected_sop_class_uid, Value::Integer priority, std::shared_ptr dataset) { this->set_command_field(Command::C_FIND_RQ); this->set_affected_sop_class_uid(affected_sop_class_uid); this->set_priority(priority); if(!dataset || dataset->empty()) { throw Exception("Data set is required"); } } void CFindRequest ::_parse(std::shared_ptr message) { if(!message || message->get_command_field() != Command::C_FIND_RQ) { throw Exception("Message is not a C-FIND-RQ"); } this->set_command_field(message->get_command_field()); this->set_affected_sop_class_uid( message->get_command_set()->as_string(registry::AffectedSOPClassUID, 0)); this->set_priority(message->get_command_set()->as_int(registry::Priority, 0)); if(!message->has_data_set() || message->get_data_set()->empty()) { throw Exception("Data set is required"); } } } } odil-0.11.0/src/odil/message/CFindRequest.h000066400000000000000000000032401362244656000203760ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _74cfa9e7_da35_4130_a941_e17cb6932f60 #define _74cfa9e7_da35_4130_a941_e17cb6932f60 #include "odil/odil.h" #include "odil/registry.h" #include "odil/message/Request.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief C-FIND-RQ message. class ODIL_API CFindRequest: public Request { public: /** * @brief Create an find request with given Message ID, * affected SOP class UID, priority, and data set. */ CFindRequest( Value::Integer message_id, Value::String const & affected_sop_class_uid, Value::Integer priority, std::shared_ptr dataset); /** * @brief Create a C-FIND-RQ from a generic Message. * * Raise an exception if the Message does not contain a C-FIND-RQ. */ CFindRequest(std::shared_ptr message); ODIL_MESSAGE_MANDATORY_FIELD_STRING_MACRO( affected_sop_class_uid, registry::AffectedSOPClassUID) ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO(priority, registry::Priority) private: void _create( Value::String const & affected_sop_class_uid, Value::Integer priority, std::shared_ptr dataset); void _parse(std::shared_ptr message); }; } } #endif // _74cfa9e7_da35_4130_a941_e17cb6932f60 odil-0.11.0/src/odil/message/CFindResponse.cpp000066400000000000000000000035131362244656000211020ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "CFindResponse.h" #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/message/Response.h" #include "odil/Value.h" namespace odil { namespace message { CFindResponse ::CFindResponse( Value::Integer message_id_being_responded_to, Value::Integer status) : Response(message_id_being_responded_to, status) { this->set_command_field(Command::C_FIND_RSP); } CFindResponse ::CFindResponse( Value::Integer message_id_being_responded_to, Value::Integer status, std::shared_ptr dataset) : Response(message_id_being_responded_to, status) { this->set_command_field(Command::C_FIND_RSP); this->set_data_set(dataset); } CFindResponse ::CFindResponse(std::shared_ptr message) : Response(message) { this->_parse(message); if(message->has_data_set()) { this->set_data_set(message->get_data_set()); } } void CFindResponse ::_parse(std::shared_ptr message) { if(!message || message->get_command_field() != Command::C_FIND_RSP) { throw Exception("Message is not a C-FIND-RSP"); } this->set_command_field(message->get_command_field()); ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), message_id, registry::MessageID, as_int) ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), affected_sop_class_uid, registry::AffectedSOPClassUID, as_string) } } } odil-0.11.0/src/odil/message/CFindResponse.h000066400000000000000000000037301362244656000205500ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _5fd36547_9498_4cf3_87cc_737af51e93a9 #define _5fd36547_9498_4cf3_87cc_737af51e93a9 #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/message/Response.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief C-FIND-RSP message. class ODIL_API CFindResponse: public Response { public: /// @brief C-FIND status codes, PS 3.4, C.4.1.1.4 enum Status { // Failure RefusedOutOfResources=0xA700, IdentifierDoesNotMatchSOPClass=0xA900, UnableToProcess=0xC000, // Pending PendingWarningOptionalKeysNotSupported=0xFF01, }; /** * @brief Create an find response with given Message ID, and status. */ CFindResponse( Value::Integer message_id_being_responded_to, Value::Integer status); /** * @brief Create an find response with given Message ID, status, * and data set. */ CFindResponse( Value::Integer message_id_being_responded_to, Value::Integer status, std::shared_ptr dataset); /** * @brief Create a C-FIND-RSP from a generic Message. * * Raise an exception if the Message does not contain a C-FIND-RSP. */ CFindResponse(std::shared_ptr message); ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO(message_id, registry::MessageID) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO( affected_sop_class_uid, registry::AffectedSOPClassUID) private: void _parse(std::shared_ptr message); }; } } #endif // _5fd36547_9498_4cf3_87cc_737af51e93a9 odil-0.11.0/src/odil/message/CGetRequest.cpp000066400000000000000000000040401362244656000205670ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "CGetRequest.h" #include #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/message/Request.h" #include "odil/Value.h" namespace odil { namespace message { CGetRequest ::CGetRequest( Value::Integer message_id, Value::String const & affected_sop_class_uid, Value::Integer priority, std::shared_ptr dataset) : Request(message_id) { this->_create(affected_sop_class_uid, priority, dataset); this->set_data_set(dataset); } CGetRequest ::CGetRequest(std::shared_ptr message) : Request(message) { this->_parse(message); this->set_data_set(message->get_data_set()); } void CGetRequest ::_create( Value::String const & affected_sop_class_uid, Value::Integer priority, std::shared_ptr dataset) { this->set_command_field(Command::C_GET_RQ); this->set_affected_sop_class_uid(affected_sop_class_uid); this->set_priority(priority); if(!dataset || dataset->empty()) { throw Exception("Data set is required"); } } void CGetRequest ::_parse(std::shared_ptr message) { if(!message || message->get_command_field() != Command::C_GET_RQ) { throw Exception("Message is not a C-GET-RQ"); } this->set_command_field(message->get_command_field()); this->set_affected_sop_class_uid( message->get_command_set()->as_string(registry::AffectedSOPClassUID, 0)); this->set_priority(message->get_command_set()->as_int(registry::Priority, 0)); if(!message->has_data_set() || message->get_data_set()->empty()) { throw Exception("Data set is required"); } } } } odil-0.11.0/src/odil/message/CGetRequest.h000066400000000000000000000032571362244656000202450ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _6a22f126_7cc6_47ab_81c2_5f66b2714345 #define _6a22f126_7cc6_47ab_81c2_5f66b2714345 #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/message/Request.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief C-GET-RQ message. class ODIL_API CGetRequest: public Request { public: /** * @brief Create an get request with given Message ID, * affected SOP class UID, priority, and data set. */ CGetRequest( Value::Integer message_id, Value::String const & affected_sop_class_uid, Value::Integer priority, std::shared_ptr dataset); /** * @brief Create a C-GET-RQ from a generic Message. * * Raise an exception if the Message does not contain a C-GET-RQ. */ CGetRequest(std::shared_ptr message); ODIL_MESSAGE_MANDATORY_FIELD_STRING_MACRO( affected_sop_class_uid, registry::AffectedSOPClassUID) ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO(priority, registry::Priority) private: void _create( Value::String const & affected_sop_class_uid, Value::Integer priority, std::shared_ptr dataset); void _parse(std::shared_ptr message); }; } } #endif // _6a22f126_7cc6_47ab_81c2_5f66b2714345 odil-0.11.0/src/odil/message/CGetResponse.cpp000066400000000000000000000047521362244656000207470ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "CGetResponse.h" #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/message/Response.h" #include "odil/Value.h" namespace odil { namespace message { CGetResponse ::CGetResponse( Value::Integer message_id_being_responded_to, Value::Integer status) : Response(message_id_being_responded_to, status) { this->set_command_field(Command::C_GET_RSP); } CGetResponse ::CGetResponse( Value::Integer message_id_being_responded_to, Value::Integer status, std::shared_ptr dataset) : Response(message_id_being_responded_to, status) { this->set_command_field(Command::C_GET_RSP); this->set_data_set(dataset); } CGetResponse ::CGetResponse(std::shared_ptr message) : Response(message) { this->_parse(message); if(message->has_data_set()) { this->set_data_set(message->get_data_set()); } } void CGetResponse ::_parse(std::shared_ptr message) { if(!message || message->get_command_field() != Command::C_GET_RSP) { throw Exception("Message is not a C-GET-RSP"); } this->set_command_field(message->get_command_field()); ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), message_id, registry::MessageID, as_int) ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), affected_sop_class_uid, registry::AffectedSOPClassUID, as_string) ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), number_of_remaining_sub_operations, registry::NumberOfRemainingSuboperations, as_int) ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), number_of_completed_sub_operations, registry::NumberOfCompletedSuboperations, as_int) ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), number_of_failed_sub_operations, registry::NumberOfFailedSuboperations, as_int) ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), number_of_warning_sub_operations, registry::NumberOfWarningSuboperations, as_int) } } } odil-0.11.0/src/odil/message/CGetResponse.h000066400000000000000000000051041362244656000204040ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _7b9819f1_d7a2_4898_a850_3ed6a61f08c6 #define _7b9819f1_d7a2_4898_a850_3ed6a61f08c6 #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/message/Response.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief C-GET-RSP message. class ODIL_API CGetResponse: public Response { public: /// @brief C-GET status codes, PS 3.4, C.4.3.1.4 enum Status { // Failure RefusedOutOfResourcesUnableToCalculateNumberOfMatches=0xA701, RefusedOutOfResourcesUnableToPerformSubOperations=0xA702, IdentifierDoesNotMatchSOPClass=0xA900, UnableToProcess=0xC000, // Warning SubOperationsCompleteOneOrMoreFailuresOrWarnings=0xB000 }; /** * @brief Create an get response with given Message ID, and status. */ CGetResponse( Value::Integer message_id_being_responded_to, Value::Integer status); /** * @brief Create an get response with given Message ID, status, * and data set. */ CGetResponse( Value::Integer message_id_being_responded_to, Value::Integer status, std::shared_ptr dataset); /** * @brief Create a C-GET-RSP from a generic Message. * * Raise an exception if the Message does not contain a C-GET-RSP. */ CGetResponse(std::shared_ptr message); ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO(message_id, registry::MessageID) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO( affected_sop_class_uid, registry::AffectedSOPClassUID) ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO( number_of_remaining_sub_operations, registry::NumberOfRemainingSuboperations) ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO( number_of_completed_sub_operations, registry::NumberOfCompletedSuboperations) ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO( number_of_failed_sub_operations, registry::NumberOfFailedSuboperations) ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO( number_of_warning_sub_operations, registry::NumberOfWarningSuboperations) private: void _parse(std::shared_ptr message); }; } } #endif // _7b9819f1_d7a2_4898_a850_3ed6a61f08c6 odil-0.11.0/src/odil/message/CMoveRequest.cpp000066400000000000000000000044431362244656000207650ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "CMoveRequest.h" #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/message/Request.h" #include "odil/Value.h" namespace odil { namespace message { CMoveRequest ::CMoveRequest( Value::Integer message_id, Value::String const & affected_sop_class_uid, Value::Integer priority, Value::String const & move_destination, std::shared_ptr dataset) : Request(message_id) { this->_create(affected_sop_class_uid, priority, move_destination, dataset); this->set_data_set(dataset); } CMoveRequest ::CMoveRequest(std::shared_ptr message) : Request(message) { this->_parse(message); this->set_data_set(message->get_data_set()); } void CMoveRequest ::_create( Value::String const & affected_sop_class_uid, Value::Integer priority, Value::String const & move_destination, std::shared_ptr dataset) { this->set_command_field(Command::C_MOVE_RQ); this->set_affected_sop_class_uid(affected_sop_class_uid); this->set_priority(priority); this->set_move_destination(move_destination); if(!dataset || dataset->empty()) { throw Exception("Data set is required"); } } void CMoveRequest ::_parse(std::shared_ptr message) { if(!message || message->get_command_field() != Command::C_MOVE_RQ) { throw Exception("Message is not a C-MOVE-RQ"); } this->set_command_field(message->get_command_field()); this->set_affected_sop_class_uid( message->get_command_set()->as_string(registry::AffectedSOPClassUID, 0)); this->set_priority(message->get_command_set()->as_int(registry::Priority, 0)); this->set_move_destination( message->get_command_set()->as_string(registry::MoveDestination, 0)); if(!message->has_data_set() || message->get_data_set()->empty()) { throw Exception("Data set is required"); } } } } odil-0.11.0/src/odil/message/CMoveRequest.h000066400000000000000000000036141362244656000204310ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _f6e243d2_6113_4fe3_8d04_3f034fc796bf #define _f6e243d2_6113_4fe3_8d04_3f034fc796bf #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/message/Request.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief C-MOVE-RQ message. class ODIL_API CMoveRequest: public Request { public: /** * @brief Create an move request with given Message ID, * affected SOP class UID, priority, move destination, and data set. */ CMoveRequest( Value::Integer message_id, Value::String const & affected_sop_class_uid, Value::Integer priority, Value::String const & move_destination, std::shared_ptr dataset); /** * @brief Create a C-MOVE-RQ from a generic Message. * * Raise an exception if the Message does not contain a C-MOVE-RQ. */ CMoveRequest(std::shared_ptr message); ODIL_MESSAGE_MANDATORY_FIELD_STRING_MACRO( affected_sop_class_uid, registry::AffectedSOPClassUID) ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO(priority, registry::Priority) ODIL_MESSAGE_MANDATORY_FIELD_STRING_MACRO( move_destination, registry::MoveDestination) private: void _create( Value::String const & affected_sop_class_uid, Value::Integer priority, Value::String const & move_destination, std::shared_ptr dataset); void _parse(std::shared_ptr message); }; } } #endif // _f6e243d2_6113_4fe3_8d04_3f034fc796bf odil-0.11.0/src/odil/message/CMoveResponse.cpp000066400000000000000000000047661362244656000211430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "CMoveResponse.h" #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/message/Response.h" #include "odil/Value.h" namespace odil { namespace message { CMoveResponse ::CMoveResponse( Value::Integer message_id_being_responded_to, Value::Integer status) : Response(message_id_being_responded_to, status) { this->set_command_field(Command::C_MOVE_RSP); } CMoveResponse ::CMoveResponse( Value::Integer message_id_being_responded_to, Value::Integer status, std::shared_ptr dataset) : Response(message_id_being_responded_to, status) { this->set_command_field(Command::C_MOVE_RSP); this->set_data_set(dataset); } CMoveResponse ::CMoveResponse(std::shared_ptr message) : Response(message) { this->_parse(message); if(message->has_data_set()) { this->set_data_set(message->get_data_set()); } } void CMoveResponse ::_parse(std::shared_ptr message) { if(!message || message->get_command_field() != Command::C_MOVE_RSP) { throw Exception("Message is not a C-MOVE-RSP"); } this->set_command_field(message->get_command_field()); ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), message_id, registry::MessageID, as_int) ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), affected_sop_class_uid, registry::AffectedSOPClassUID, as_string) ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), number_of_remaining_sub_operations, registry::NumberOfRemainingSuboperations, as_int) ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), number_of_completed_sub_operations, registry::NumberOfCompletedSuboperations, as_int) ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), number_of_failed_sub_operations, registry::NumberOfFailedSuboperations, as_int) ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), number_of_warning_sub_operations, registry::NumberOfWarningSuboperations, as_int) } } } odil-0.11.0/src/odil/message/CMoveResponse.h000066400000000000000000000051741362244656000206020ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _b245f6f2_50c3_4c7c_80e1_f03d9c831301 #define _b245f6f2_50c3_4c7c_80e1_f03d9c831301 #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/message/Response.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief C-MOVE-RSP message. class ODIL_API CMoveResponse: public Response { public: /// @brief C-MOVE status codes, PS 3.4, C.4.2.1.5 enum Status { // Failure RefusedOutOfResourcesUnableToCalculateNumberOfMatches=0xA701, RefusedOutOfResourcesUnableToPerformSubOperations=0xA702, RefusedMoveDestinationUnknown=0xA801, IdentifierDoesNotMatchSOPClass=0xA900, UnableToProcess=0xC000, // Warning SubOperationsCompleteOneOrMoreFailuresOrWarnings=0xB000 }; /** * @brief Create an move response with given Message ID, and status. */ CMoveResponse( Value::Integer message_id_being_responded_to, Value::Integer status); /** * @brief Create an move response with given Message ID, status, * and data set. */ CMoveResponse( Value::Integer message_id_being_responded_to, Value::Integer status, std::shared_ptr dataset); /** * @brief Create a C-MOVE-RSP from a generic Message. * * Raise an exception if the Message does not contain a C-MOVE-RSP. */ CMoveResponse(std::shared_ptr message); ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO(message_id, registry::MessageID) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO( affected_sop_class_uid, registry::AffectedSOPClassUID) ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO( number_of_remaining_sub_operations, registry::NumberOfRemainingSuboperations) ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO( number_of_completed_sub_operations, registry::NumberOfCompletedSuboperations) ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO( number_of_failed_sub_operations, registry::NumberOfFailedSuboperations) ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO( number_of_warning_sub_operations, registry::NumberOfWarningSuboperations) private: void _parse(std::shared_ptr message); }; } } #endif // _b245f6f2_50c3_4c7c_80e1_f03d9c831301 odil-0.11.0/src/odil/message/CStoreRequest.cpp000066400000000000000000000061511362244656000211510ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "CStoreRequest.h" #include #include "odil/Exception.h" #include "odil/message/Request.h" namespace odil { namespace message { CStoreRequest ::CStoreRequest( Value::Integer message_id, Value::String const & affected_sop_class_uid, Value::String const & affected_sop_instance_uid, Value::Integer priority, std::shared_ptr dataset, Value::String const & move_originator_ae_title, Value::Integer move_originator_message_id) : Request(message_id) { this->_create( affected_sop_class_uid, affected_sop_instance_uid, priority, dataset, move_originator_ae_title, move_originator_message_id); this->set_data_set(dataset); } CStoreRequest ::CStoreRequest(std::shared_ptr message) : Request(message) { this->_parse(message); this->set_data_set(message->get_data_set()); } void CStoreRequest ::_create( Value::String const & affected_sop_class_uid, Value::String const & affected_sop_instance_uid, Value::Integer priority, std::shared_ptr dataset, Value::String const & move_originator_ae_title, Value::Integer move_originator_message_id) { this->set_command_field(Command::C_STORE_RQ); this->set_affected_sop_class_uid(affected_sop_class_uid); this->set_affected_sop_instance_uid(affected_sop_instance_uid); this->set_priority(priority); if(!move_originator_ae_title.empty()) this->set_move_originator_ae_title(move_originator_ae_title); if(move_originator_message_id >= 0) this->set_move_originator_message_id(move_originator_message_id); if(!dataset || dataset->empty()) { throw Exception("Data set is required"); } } void CStoreRequest ::_parse(std::shared_ptr message) { if(!message || message->get_command_field() != Command::C_STORE_RQ) { throw Exception("Message is not a C-STORE-RQ"); } this->set_command_field(message->get_command_field()); this->set_affected_sop_class_uid( message->get_command_set()->as_string(registry::AffectedSOPClassUID, 0)); this->set_affected_sop_instance_uid( message->get_command_set()->as_string(registry::AffectedSOPInstanceUID, 0)); this->set_priority(message->get_command_set()->as_int(registry::Priority, 0)); ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), move_originator_ae_title, registry::MoveOriginatorApplicationEntityTitle, as_string) ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), move_originator_message_id, registry::MoveOriginatorMessageID, as_int) if(!message->has_data_set() || message->get_data_set()->empty()) { throw Exception("Data set is required"); } } } } odil-0.11.0/src/odil/message/CStoreRequest.h000066400000000000000000000046151362244656000206210ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _b85a19af_b74d_4c96_89a0_f30a41b790b3 #define _b85a19af_b74d_4c96_89a0_f30a41b790b3 #include #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/message/Request.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief C-STORE-RQ message. class ODIL_API CStoreRequest: public Request { public: /** * @brief Create an store request with given Message ID, * affected SOP class UID, priority, and data set. */ CStoreRequest( Value::Integer message_id, Value::String const & affected_sop_class_uid, Value::String const & affected_sop_instance_uid, Value::Integer priority, std::shared_ptr dataset, Value::String const & move_originator_ae_title = "", Value::Integer move_originator_message_id = -1); /** * @brief Create a C-STORE-RQ from a generic Message. * * Raise an exception if the Message does not contain a C-STORE-RQ. */ CStoreRequest(std::shared_ptr message); ODIL_MESSAGE_MANDATORY_FIELD_STRING_MACRO( affected_sop_class_uid, registry::AffectedSOPClassUID) ODIL_MESSAGE_MANDATORY_FIELD_STRING_MACRO( affected_sop_instance_uid, registry::AffectedSOPInstanceUID) ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO(priority, registry::Priority) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO( move_originator_ae_title, registry::MoveOriginatorApplicationEntityTitle) ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO( move_originator_message_id, registry::MoveOriginatorMessageID) private: void _create( Value::String const & affected_sop_class_uid, Value::String const & affected_sop_instance_uid, Value::Integer priority, std::shared_ptr dataset, Value::String const & move_originator_ae_title, Value::Integer move_originator_message_id); void _parse(std::shared_ptr message); }; } } #endif // _b85a19af_b74d_4c96_89a0_f30a41b790b3 odil-0.11.0/src/odil/message/CStoreResponse.cpp000066400000000000000000000032521362244656000213160ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "CStoreResponse.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/message/Response.h" #include "odil/Value.h" namespace odil { namespace message { CStoreResponse ::CStoreResponse( Value::Integer message_id_being_responded_to, Value::Integer status) : Response(message_id_being_responded_to, status) { this->set_command_field(Command::C_STORE_RSP); } CStoreResponse ::CStoreResponse(std::shared_ptr message) : Response(message) { if(!message || message->get_command_field() != Command::C_STORE_RSP) { throw Exception("Message is not a C-STORE-RSP"); } this->set_command_field(message->get_command_field()); ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), message_id, registry::MessageID, as_int) ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), affected_sop_class_uid, registry::AffectedSOPClassUID, as_string) ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), affected_sop_instance_uid, registry::AffectedSOPInstanceUID, as_string) if(message->has_data_set() && !message->get_data_set()->empty()) { throw Exception("Data set must not be present"); } this->delete_data_set(); } } } odil-0.11.0/src/odil/message/CStoreResponse.h000066400000000000000000000035101362244656000207600ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _7e193624_081c_47dd_a011_986e96916ea9 #define _7e193624_081c_47dd_a011_986e96916ea9 #include "odil/odil.h" #include "odil/registry.h" #include "odil/message/Response.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief C-STORE-RSP message. class ODIL_API CStoreResponse: public Response { public: /// @brief C-STORE status codes, PS 3.4, B.2.3 enum Status { // Failure RefusedOutOfResources=0xA700, ErrorDataSetDoesNotMatchSOPClass=0xA900, ErrorCannotUnderstand=0xC000, // Warning CoercionOfDataElements=0xB000, DataSetDoesNotMatchSOPClass=0xB007, ElementsDiscarded=0xB006, }; /** * @brief Create an store response with given Message ID, and status. */ CStoreResponse( Value::Integer message_id_being_responded_to, Value::Integer status); /** * @brief Create a C-STORE-RSP from a generic Message. * * Raise an exception if the Message does not contain a C-STORE-RSP. */ CStoreResponse(std::shared_ptr message); ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO(message_id, registry::MessageID) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO( affected_sop_class_uid, registry::AffectedSOPClassUID) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO( affected_sop_instance_uid, registry::AffectedSOPInstanceUID) }; } } #endif // _7e193624_081c_47dd_a011_986e96916ea9 odil-0.11.0/src/odil/message/Cancellation.cpp000066400000000000000000000023051362244656000207720ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/message/Cancellation.h" #include "odil/Exception.h" #include "odil/message/Message.h" #include "odil/registry.h" #include "odil/Value.h" namespace odil { namespace message { Cancellation ::Cancellation(uint16_t message_id_being_responded_to) : Message() { this->set_command_field(Command::C_CANCEL_RQ); this->set_message_id_being_responded_to(message_id_being_responded_to); } Cancellation ::Cancellation(std::shared_ptr message) { if(!message || message->get_command_field() != Command::C_CANCEL_RQ) { throw Exception("Message is not a C-CANCEL-RQ"); } this->set_command_field(message->get_command_field()); this->set_message_id_being_responded_to( message->get_command_set()->as_int(registry::MessageIDBeingRespondedTo, 0)); } } } odil-0.11.0/src/odil/message/Cancellation.h000066400000000000000000000023731362244656000204440ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _97fc1bfc_4cff_40f2_a1ed_4550c71a0bda #define _97fc1bfc_4cff_40f2_a1ed_4550c71a0bda #include "odil/message/Message.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief Base class for cancellation messages. class ODIL_API Cancellation: public Message { public: /// @brief Create a response with given message id being responded to. Cancellation(uint16_t message_id_being_responded_to); /** * @brief Create a response from the Message ID Being Responded To. * * Raise an exception is this element is missing. */ Cancellation(std::shared_ptr message); ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO( message_id_being_responded_to, registry::MessageIDBeingRespondedTo); }; } } #endif // _97fc1bfc_4cff_40f2_a1ed_4550c71a0bda odil-0.11.0/src/odil/message/Message.cpp000066400000000000000000000035631362244656000177710ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "Message.h" #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/Value.h" namespace odil { namespace message { Message ::Message(std::shared_ptr command_set, std::shared_ptr data_set) : _command_set(command_set) { if(!this->_command_set->has(registry::CommandDataSetType)) { this->_command_set->add(registry::CommandDataSetType, VR::US); } this->_command_set->as_int(registry::CommandDataSetType) = { DataSetType::ABSENT }; this->set_data_set(data_set); } std::shared_ptr Message ::get_command_set() const { return this->_command_set; } bool Message ::has_data_set() const { return ( this->_command_set->as_int(registry::CommandDataSetType, 0) == DataSetType::PRESENT); } std::shared_ptr Message ::get_data_set() const { if(!this->has_data_set()) { throw Exception("No data set in message"); } return this->_data_set; } std::shared_ptr Message ::get_data_set() { if(!this->has_data_set()) { throw Exception("No data set in message"); } return this->_data_set; } void Message ::set_data_set(std::shared_ptr data_set) { this->_data_set = data_set; this->_command_set->as_int(registry::CommandDataSetType) = { this->_data_set?DataSetType::PRESENT:DataSetType::ABSENT }; } void Message ::delete_data_set() { this->set_data_set(nullptr); } } } odil-0.11.0/src/odil/message/Message.h000066400000000000000000000114731362244656000174350ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _dcfa5213_ad7e_4194_8b4b_e630aa0df2e8 #define _dcfa5213_ad7e_4194_8b4b_e630aa0df2e8 #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/Value.h" namespace odil { namespace message { #define ODIL_MESSAGE_MANDATORY_FIELD_MACRO(name, tag, TValueType, function) \ /** @brief Return the tag element of the command set. */ \ TValueType const & get_##name() const \ { \ auto const & data = this->_command_set->function(tag); \ if(data.empty()) \ { \ throw Exception("Empty element"); \ } \ return data[0]; \ } \ /** @brief Set the tag element of the command set. */ \ void set_##name(TValueType const & value) \ { \ if(!this->_command_set->has(tag)) \ { \ this->_command_set->add(tag); \ } \ this->_command_set->function(tag) = { value }; \ } #define ODIL_MESSAGE_OPTIONAL_FIELD_MACRO(name, tag, TValueType, function) \ ODIL_MESSAGE_MANDATORY_FIELD_MACRO(name, tag, TValueType, function) \ bool has_##name() const \ { \ return this->_command_set->has(tag);; \ } \ void delete_##name() \ { \ this->_command_set->remove(tag); \ } #define ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO(dataset, name, tag, function) \ if(dataset->has(tag)) \ { \ this->set_##name(dataset->function(tag, 0)); \ } #define ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO(name, tag) \ ODIL_MESSAGE_MANDATORY_FIELD_MACRO(name, tag, Value::Integer, as_int) #define ODIL_MESSAGE_MANDATORY_FIELD_STRING_MACRO(name, tag) \ ODIL_MESSAGE_MANDATORY_FIELD_MACRO(name, tag, Value::String, as_string) #define ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO(name, tag) \ ODIL_MESSAGE_OPTIONAL_FIELD_MACRO(name, tag, Value::Integer, as_int) #define ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO(name, tag) \ ODIL_MESSAGE_OPTIONAL_FIELD_MACRO(name, tag, Value::String, as_string) /** * @brief Base class for all DIMSE messages. */ class ODIL_API Message { public: enum Command { C_STORE_RQ = 0x0001, C_STORE_RSP = 0x8001, C_FIND_RQ = 0x0020, C_FIND_RSP = 0x8020, C_CANCEL_RQ = 0x0FFF, C_GET_RQ = 0x0010, C_GET_RSP = 0x8010, C_MOVE_RQ = 0x0021, C_MOVE_RSP = 0x8021, C_ECHO_RQ = 0x0030, C_ECHO_RSP = 0x8030, N_EVENT_REPORT_RQ = 0x0100, N_EVENT_REPORT_RSP = 0x8100, N_GET_RQ = 0x0110, N_GET_RSP = 0x8110, N_SET_RQ = 0x0120, N_SET_RSP = 0x8120, N_ACTION_RQ = 0x0130, N_ACTION_RSP = 0x8130, N_CREATE_RQ = 0x0140, N_CREATE_RSP = 0x8140, N_DELETE_RQ = 0x0150, N_DELETE_RSP = 0x8150, }; enum Priority { LOW = 0x0002, MEDIUM = 0x0000, HIGH = 0x0001, }; enum DataSetType { PRESENT = 0x0000, ABSENT = 0x0101, }; /// @brief Create a message with an empty command set and no data set. Message( std::shared_ptr command_set=std::make_shared(), std::shared_ptr data_set={}); Message(Message const &) = default; Message(Message &&) = default; Message & operator=(Message const &) = default; Message & operator=(Message &&) = default; virtual ~Message() = default; /// @brief Return the command set of the message (by reference or shared pointer). std::shared_ptr get_command_set() const; /// @brief Test whether as data set is present in the message. bool has_data_set() const; /** * @brief Return the data set of the message, raise an exception if no * data set is present. */ std::shared_ptr get_data_set() const; /** * @brief Return the data set of the message, raise an exception if no * data set is present. */ std::shared_ptr get_data_set(); /// @brief Set the data set of the message. void set_data_set(std::shared_ptr data_set); /// @brief Delete the data set in this message. void delete_data_set(); ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO( command_field, registry::CommandField) protected: /// @brief Command set of the message. std::shared_ptr _command_set; /// @brief Data set of the message. std::shared_ptr _data_set; }; } } #endif // _dcfa5213_ad7e_4194_8b4b_e630aa0df2e8 odil-0.11.0/src/odil/message/NCreateRequest.cpp000066400000000000000000000033121362244656000212670ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "NCreateRequest.h" #include "odil/message/Request.h" #include "odil/registry.h" #include "odil/Value.h" namespace odil { namespace message { NCreateRequest ::NCreateRequest( Value::Integer message_id, const Value::String &affected_sop_class_uid, std::shared_ptr dataset) : Request(message_id) { this->set_command_field(Command::N_CREATE_RQ); this->set_affected_sop_class_uid(affected_sop_class_uid); if(!dataset || dataset->empty()) { throw Exception("Data set is required"); } this->set_data_set(dataset); } NCreateRequest ::NCreateRequest(std::shared_ptr message) : Request(message) { if(!message || message->get_command_field() != Command::N_CREATE_RQ) { throw Exception("Message is not a N-CREATE-RQ"); } this->set_command_field(message->get_command_field()); this->set_affected_sop_class_uid( message->get_command_set()->as_string( registry::AffectedSOPClassUID, 0)); ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), affected_sop_instance_uid, registry::AffectedSOPInstanceUID, as_string) if(!message->has_data_set() || message->get_data_set()->empty()) { throw Exception("Data set is required"); } this->set_data_set(message->get_data_set()); } } } odil-0.11.0/src/odil/message/NCreateRequest.h000066400000000000000000000032341362244656000207370ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _9a741b7f_0254_4eac_9bbd_04b719c1f86a #define _9a741b7f_0254_4eac_9bbd_04b719c1f86a #include "odil/message/Request.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief N-Create-RQ message. class ODIL_API NCreateRequest: public Request { public: /** * @brief Create an NCreate request with given Message ID and * affected SOP class UID. */ NCreateRequest( Value::Integer message_id, Value::String const & affected_sop_class_uid, std::shared_ptr dataset); /** * @brief Create a N-Create-RQ from a generic Message. * * Raise an exception if the Message does not contain a N-Create-RQ. */ NCreateRequest(std::shared_ptr message); ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO( message_id, registry::MessageID) ODIL_MESSAGE_MANDATORY_FIELD_STRING_MACRO( affected_sop_class_uid, registry::AffectedSOPClassUID) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO( affected_sop_instance_uid, registry::AffectedSOPInstanceUID) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO( attribute_list, registry::AttributeIdentifierList) }; } } #endif // _9a741b7f_0254_4eac_9bbd_04b719c1f86a odil-0.11.0/src/odil/message/NCreateResponse.cpp000066400000000000000000000027661362244656000214510ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "NCreateResponse.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/message/Response.h" #include "odil/Value.h" namespace odil { namespace message { NCreateResponse ::NCreateResponse( Value::Integer const & message_id_being_responded_to, Value::Integer const & status, Value::String const & affected_sop_class_uid) : Response(message_id_being_responded_to, status) { this->set_command_field(Command::N_CREATE_RSP); this->set_affected_sop_class_uid(affected_sop_class_uid); } NCreateResponse ::NCreateResponse(std::shared_ptr message) : Response(message) { if(!message || message->get_command_field() != Command::N_CREATE_RSP) { throw Exception("Message is not a N-CREATE-RSP"); } this->set_command_field(message->get_command_field()); this->set_affected_sop_class_uid( message->get_command_set()->as_string(registry::AffectedSOPClassUID, 0)); ODIL_MESSAGE_SET_OPTIONAL_FIELD_MACRO( message->get_command_set(), affected_sop_instance_uid, registry::AffectedSOPInstanceUID, as_string) } } } odil-0.11.0/src/odil/message/NCreateResponse.h000066400000000000000000000030111362244656000210760ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _4f465ff9_8cd7_47cb_afc5_51461124bb01 #define _4f465ff9_8cd7_47cb_afc5_51461124bb01 #include "odil/odil.h" #include "odil/registry.h" #include "odil/message/Response.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief N-Create-RSP message. class ODIL_API NCreateResponse: public Response { public: /** * @brief Create an NCreate response with given Message ID and * affected SOP class UID. */ NCreateResponse( Value::Integer const & message_id_being_responded_to, Value::Integer const & status, Value::String const & affected_sop_class_uid); /** * @brief Create a N-Create-RSP from a generic Message. * * Raise an exception if the Message does not contain a N-Create-RSP. */ NCreateResponse(std::shared_ptr message); ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO( message_id_being_responded_to, registry::MessageIDBeingRespondedTo) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO( affected_sop_class_uid, registry::AffectedSOPClassUID) }; } } #endif // _4f465ff9_8cd7_47cb_afc5_51461124bb01 odil-0.11.0/src/odil/message/NSetRequest.cpp000066400000000000000000000034171362244656000206250ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "NSetRequest.h" #include #include "odil/Exception.h" #include "odil/VR.h" namespace odil { namespace message { NSetRequest ::NSetRequest( Value::Integer message_id, Value::String const & requested_sop_class_uid, Value::String const & requested_sop_instance_uid, std::shared_ptr dataset) : Request(message_id) { this->set_command_field(Message::Command::N_SET_RQ); this->set_requested_sop_class_uid(requested_sop_class_uid); this->set_requested_sop_instance_uid(requested_sop_instance_uid); if(!dataset || dataset->empty()) { throw Exception("Data set is required"); } this->set_data_set(dataset); } NSetRequest ::NSetRequest(std::shared_ptr message) : Request(message) { if(!message || message->get_command_field() != Command::N_SET_RQ) { throw Exception("Message is not a N-SET-RQ"); } this->set_command_field(message->get_command_field()); this->set_requested_sop_class_uid( message->get_command_set()->as_string(registry::RequestedSOPClassUID, 0)); this->set_requested_sop_instance_uid( message->get_command_set()->as_string(registry::RequestedSOPInstanceUID, 0)); if(!message->has_data_set() || message->get_data_set()->empty()) { throw Exception("Data set is required"); } this->set_data_set(message->get_data_set()); } } } odil-0.11.0/src/odil/message/NSetRequest.h000066400000000000000000000030301362244656000202610ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _8125ab8d_bf37_4116_8ca8_93151ba022a8 #define _8125ab8d_bf37_4116_8ca8_93151ba022a8 #include "odil/message/Request.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief N-Set-RQ message. class ODIL_API NSetRequest: public Request { public: /** * @brief Create a N-Set-RQ from a generic Message. * * Raise an exception if the Message does not contain a N-Set-RQ. */ NSetRequest(std::shared_ptr message); /** * @brief Create an NSet request with given Message ID and * requested SOP class UID and SOP Instance UID. */ NSetRequest( Value::Integer message_id, Value::String const & requested_sop_class_uid, Value::String const & requested_sop_instance_uid, std::shared_ptr dataset); ODIL_MESSAGE_MANDATORY_FIELD_STRING_MACRO( requested_sop_class_uid, registry::RequestedSOPClassUID) ODIL_MESSAGE_MANDATORY_FIELD_STRING_MACRO( requested_sop_instance_uid, registry::RequestedSOPInstanceUID) }; } } #endif // _8125ab8d_bf37_4116_8ca8_93151ba022a8 odil-0.11.0/src/odil/message/NSetResponse.cpp000066400000000000000000000030761362244656000207740ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "NSetResponse.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/message/Response.h" #include "odil/Value.h" namespace odil { namespace message { NSetResponse ::NSetResponse( Value::Integer const & message_id_being_responded_to, Value::Integer const & status, Value::String const & requested_sop_class_uid, Value::String const & requested_sop_instance_uid) : Response(message_id_being_responded_to, status) { this->set_command_field(Command::N_SET_RSP); this->set_affected_sop_class_uid(requested_sop_class_uid); this->set_affected_sop_instance_uid(requested_sop_instance_uid ); } NSetResponse ::NSetResponse(std::shared_ptr message) : Response(message) { if(!message || message->get_command_field() != Command::N_SET_RSP) { throw Exception("Message is not a N-SET-RSP"); } this->set_command_field(message->get_command_field()); this->set_affected_sop_class_uid( message->get_command_set()->as_string(registry::RequestedSOPClassUID, 0)); this->set_affected_sop_instance_uid( message->get_command_set()->as_string(registry::RequestedSOPInstanceUID, 0)); } } } odil-0.11.0/src/odil/message/NSetResponse.h000066400000000000000000000027721362244656000204430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _5d350855_531e_405a_a221_af3b0e720fd1 #define _5d350855_531e_405a_a221_af3b0e720fd1 #include "odil/registry.h" #include "odil/message/Response.h" #include "odil/odil.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief N-Set-RSP message. class ODIL_API NSetResponse: public Response { public: /** * @brief Create an NSet response with given Message ID and * affected SOP class UID. */ NSetResponse( Value::Integer const & message_id_being_responded_to, Value::Integer const & status, Value::String const & requested_sop_class_uid, Value::String const & requested_sop_instance_uid); /** * @brief Create a N-Set-RSP from a generic Message. * * Raise an exception if the Message does not contain a N-Set-RSP. */ NSetResponse(std::shared_ptr message); ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO(status, registry::Status) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO( affected_sop_class_uid, registry::AffectedSOPClassUID) }; } } #endif // _5d350855_531e_405a_a221_af3b0e720fd1 odil-0.11.0/src/odil/message/Request.cpp000066400000000000000000000014741362244656000200340ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "Request.h" #include "odil/message/Message.h" #include "odil/registry.h" #include "odil/Value.h" namespace odil { namespace message { Request ::Request(Value::Integer message_id) : Message() { this->set_message_id(message_id); } Request ::Request(std::shared_ptr message) : Message() { this->set_message_id( message->get_command_set()->as_int(registry::MessageID, 0)); } } } odil-0.11.0/src/odil/message/Request.h000066400000000000000000000023131362244656000174720ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _8d06a300_6aee_4d1f_bf10_ecdf4916ae9f #define _8d06a300_6aee_4d1f_bf10_ecdf4916ae9f #include "odil/message/Message.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief Base class for all DIMSE request messages. class ODIL_API Request: public Message { public: /// @brief Create a request with given Message ID. Request(Value::Integer message_id); /** * @brief Create a request from the Message ID stored in the message * command set. * * Raise an exception is either of this element is missing. */ Request(std::shared_ptr message); ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO( message_id, registry::MessageID) }; } } #endif // _8d06a300_6aee_4d1f_bf10_ecdf4916ae9f odil-0.11.0/src/odil/message/Response.cpp000066400000000000000000000045221362244656000201770ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "Response.h" #include "odil/message/Message.h" #include "odil/registry.h" #include "odil/Value.h" namespace odil { namespace message { bool Response ::is_pending(Value::Integer status) { return (status == Response::Pending || status == 0xFF01); } bool Response ::is_warning(Value::Integer status) { return ( status == 0x0001 || (status>>12) == 0xB || status == Response::AttributeListError || status == Response::AttributeValueOutOfRange); } bool Response ::is_failure(Value::Integer status) { return ( (status>>12) == 0xA || (status>>12) == 0xC || ((status>>8) == 0x01 && !is_warning(status)) || (status>>8) == 0x02 ); } Response ::Response(Value::Integer message_id_being_responded_to, Value::Integer status) : Message() { this->set_message_id_being_responded_to(message_id_being_responded_to); this->set_status(status); } Response ::Response(std::shared_ptr message) : Message() { this->set_message_id_being_responded_to( message->get_command_set()->as_int( registry::MessageIDBeingRespondedTo, 0)); this->set_status(message->get_command_set()->as_int(registry::Status, 0)); } bool Response ::is_pending() const { return Response::is_pending(this->get_status()); } bool Response ::is_warning() const { return Response::is_warning(this->get_status()); } bool Response ::is_failure() const { return Response::is_failure(this->get_status()); } void Response ::set_status_fields(std::shared_ptr status_fields) { if(!status_fields) { return; } for(auto const & tag_and_element: *status_fields) { if(this->_command_set->has(tag_and_element.first)) { (*this->_command_set)[tag_and_element.first] = tag_and_element.second; } else { this->_command_set->add(tag_and_element.first, tag_and_element.second); } } } } } odil-0.11.0/src/odil/message/Response.h000066400000000000000000000072411362244656000176450ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _0dd2e31e_212a_494a_a8d3_93b235336658 #define _0dd2e31e_212a_494a_a8d3_93b235336658 #include "odil/message/Message.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/Value.h" namespace odil { namespace message { /// @brief Base class for all DIMSE response messages. class ODIL_API Response: public Message { public: /// @brief General status codes, from PS3.7, C enum Status { Success=0x0000, // Warning: 0001 or Bxxx // Failure: Axxx or Cxxx Cancel=0xFE00, Pending=0xFF00, // Warning Status Classes, PS3.7, C.3 AttributeListError=0x0107, AttributeValueOutOfRange=0x0116, // Failure Status Classes, PS3.7, C.4 SOPClassNotSupported=0x0122, ClassInstanceConflict=0x0119, DuplicateSOPInstance=0x0111, DuplicateInvocation=0x0210, InvalidArgumentValue=0x0115, InvalidAttributeValue=0x0106, InvalidObjectInstance=0x0117, MissingAttribute=0x0120, MissingAttributeValue=0x0121, MistypedArgument=0x0212, NoSuchArgument=0x0114, NoSuchAttribute=0x0105, NoSuchEventType=0x0113, NoSuchSOPInstance=0x0112, NoSuchSOPClass=0x0118, ProcessingFailure=0x0110, ResourceLimitation=0x0213, UnrecognizedOperation=0x0211, NoSuchActionType=0x0123, RefusedNotAuthorized=0x0124, }; /// @brief Test whether the status class is pending. static bool is_pending(Value::Integer status); /// @brief Test whether the status class is warning. static bool is_warning(Value::Integer status); /// @brief Test whether the status class is failure. static bool is_failure(Value::Integer status); /// @brief Create a response with given message id and status; Response(Value::Integer message_id_being_responded_to, Value::Integer status); /** * @brief Create a response from the Message ID Being Responded To and the * Status stored in the message command set. * * Raise an exception is either of those elements is missing. */ Response(std::shared_ptr message); ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO( message_id_being_responded_to, registry::MessageIDBeingRespondedTo) ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO(status, registry::Status) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO( offending_element, registry::OffendingElement) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO( error_comment, registry::ErrorComment) ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO( error_id, registry::ErrorID) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO( affected_sop_instance_uid, registry::AffectedSOPInstanceUID) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO( attribute_identifier_list, registry::AttributeIdentifierList) /// @brief Test whether the status class is pending. bool is_pending() const; /// @brief Test whether the status class is warning. bool is_warning() const; /// @brief Test whether the status class is failure. bool is_failure() const; /// @brief Set the status fields (cf. PS.37, C) void set_status_fields(std::shared_ptr status_fields); }; } } #endif // _0dd2e31e_212a_494a_a8d3_93b235336658 odil-0.11.0/src/odil/odil.h000066400000000000000000000022571362244656000153540ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _b9c5b481_c291_4d87_b721_1e19d577d5e4 #define _b9c5b481_c291_4d87_b721_1e19d577d5e4 #ifdef WIN32 # define EXPORT_DYNAMIC_LIBRARY __declspec(dllexport) # define IMPORT_DYNAMIC_LIBRARY __declspec(dllimport) // disable warning: 'identifier': class 'type' needs to have dll-interface to be // used by clients of class 'type2' // disable warning: non - DLL-interface classkey 'identifier' used as base for // DLL-interface classkey 'identifier' #pragma warning( disable : 4251 4275 ) #else // WIN32 # define EXPORT_DYNAMIC_LIBRARY # define IMPORT_DYNAMIC_LIBRARY #endif // WIN32 #ifdef BUILDING_ODIL # define ODIL_API EXPORT_DYNAMIC_LIBRARY #else // BUILDING_ODIL # define ODIL_API IMPORT_DYNAMIC_LIBRARY #endif // BUILDING_ODIL #endif // _b9c5b481_c291_4d87_b721_1e19d577d5e4 odil-0.11.0/src/odil/pdu/000077500000000000000000000000001362244656000150365ustar00rootroot00000000000000odil-0.11.0/src/odil/pdu/AAbort.cpp000066400000000000000000000043541362244656000167200ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/AAbort.h" #include #include #include "odil/Exception.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { AAbort ::AAbort(unsigned char source, unsigned char reason) { this->_item.add("PDU-type", uint8_t(0x07)); this->_item.add("Reserved-1", uint8_t(0)); this->_item.add("PDU-length", uint32_t(4)); this->_item.add("Reserved-2", uint8_t(0)); this->_item.add("Reserved-3", uint8_t(0)); this->_item.add("Source", uint8_t(0)); this->_item.add("Reason", uint8_t(0)); this->set_source(source); this->set_reason(reason); } AAbort ::AAbort(std::istream & stream) { this->_item.read(stream, "PDU-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("PDU-type") != 0x07) { throw Exception("Invalid PDU type"); } this->_item.read(stream, "Reserved-1", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "PDU-length", Item::Field::Type::unsigned_int_32); this->_item.read(stream, "Reserved-2", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Reserved-3", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Source", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Reason", Item::Field::Type::unsigned_int_8); } unsigned char AAbort ::get_source() const { return this->_item.as_unsigned_int_8("Source"); } void AAbort ::set_source(unsigned char source) { if(source > 2) { throw Exception("Unknown source"); } this->_item.as_unsigned_int_8("Source") = source; } unsigned char AAbort ::get_reason() const { return this->_item.as_unsigned_int_8("Reason"); } void AAbort ::set_reason(unsigned char reason) { if(reason > 6) { throw Exception("Unknown reason"); } this->_item.as_unsigned_int_8("Reason") = reason; } } } odil-0.11.0/src/odil/pdu/AAbort.h000066400000000000000000000023531362244656000163620ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _536f93f0_914e_40ff_8917_36644acbc4b1 #define _536f93f0_914e_40ff_8917_36644acbc4b1 #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /// @brief A-ABORT PDU, cf. PS 3.8, 9.3.8. class ODIL_API AAbort: public Object { public: /// @brief Constructor. AAbort(unsigned char source, unsigned char reason); /// @brief Constructor for binary data. AAbort(std::istream & stream); /// @brief Return the source. unsigned char get_source() const; /// @brief Set the source, must be 0, 1 or 2. void set_source(unsigned char source); /// @brief Return the reason. unsigned char get_reason() const; /// @brief Set the reason, must be between 0 and 6. void set_reason(unsigned char reason); }; } } #endif // _536f93f0_914e_40ff_8917_36644acbc4b1 odil-0.11.0/src/odil/pdu/AAssociate.cpp000066400000000000000000000161631362244656000175650ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/AAssociate.h" #include #include #include #include #include #include #include "odil/Exception.h" #include "odil/pdu/ApplicationContext.h" #include "odil/pdu/Item.h" #include "odil/pdu/Object.h" #include "odil/pdu/PresentationContextAC.h" #include "odil/pdu/PresentationContextRQ.h" #include "odil/pdu/UserInformation.h" namespace odil { namespace pdu { AAssociate ::AAssociate() { this->_item.add("PDU-type", uint8_t(0)); this->_item.add("Reserved-1", uint8_t(0)); this->_item.add("PDU-length", uint32_t(0)); this->_item.add("Protocol-version", uint16_t(0)); this->_item.add("Reserved-2", uint16_t(0)); this->_item.add("Called-AE-title", std::string()); this->_item.add("Calling-AE-title", std::string()); this->_item.add("Reserved-3", std::string(32, '\0')); this->_item.add("Variable-items", std::vector()); this->_item.as_unsigned_int_32("PDU-length") = this->_compute_length(); } AAssociate ::AAssociate(std::istream & stream) { this->_item.read(stream, "PDU-type", Item::Field::Type::unsigned_int_8); auto const type = this->_item.as_unsigned_int_8("PDU-type"); if(type != 0x01 && type != 0x02) { throw Exception("Invalid PDU type"); } this->_item.read(stream, "Reserved-1", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "PDU-length", Item::Field::Type::unsigned_int_32); auto const begin = stream.tellg(); this->_item.read( stream, "Protocol-version", Item::Field::Type::unsigned_int_16); this->_item.read(stream, "Reserved-2", Item::Field::Type::unsigned_int_16); this->_item.read(stream, "Called-AE-title", Item::Field::Type::string, 16); this->_item.read(stream, "Calling-AE-title", Item::Field::Type::string, 16); this->_item.read(stream, "Reserved-3", Item::Field::Type::string, 32); auto const length = this->_item.as_unsigned_int_32("PDU-length"); this->_item.add("Variable-items", std::vector()); auto & variable_items = this->_item.as_items("Variable-items"); while(stream.tellg()-begin < length) { auto const type = stream.peek(); Item sub_item; if(type == 0x10) { sub_item = ApplicationContext(stream).get_item(); } else if(type == 0x20) { sub_item = PresentationContextRQ(stream).get_item(); } else if(type == 0x21) { sub_item = PresentationContextAC(stream).get_item(); } else if(type == 0x50) { sub_item = UserInformation(stream).get_item(); } else { throw Exception("Invalid sub-item"); } variable_items.push_back(sub_item); } this->_item.as_unsigned_int_32("PDU-length") = this->_compute_length(); } AAssociate ::~AAssociate() { // Nothing to do. } uint16_t AAssociate ::get_protocol_version() const { return this->_item.as_unsigned_int_16("Protocol-version"); } void AAssociate ::set_protocol_version(uint16_t value) { this->_item.as_unsigned_int_16("Protocol-version") = value; } std::string AAssociate ::get_called_ae_title() const { return this->_decode_ae_title(this->_item.as_string("Called-AE-title")); } void AAssociate ::set_called_ae_title(std::string const & value) { this->_item.as_string("Called-AE-title") = this->_encode_ae_title(value); } std::string AAssociate ::get_calling_ae_title() const { return this->_decode_ae_title(this->_item.as_string("Calling-AE-title")); } void AAssociate ::set_calling_ae_title(std::string const & value) { this->_item.as_string("Calling-AE-title") = this->_encode_ae_title(value); } ApplicationContext AAssociate ::get_application_context() const { auto const & sub_items = this->_item.as_items("Variable-items"); auto const it = std::find_if( sub_items.begin(), sub_items.end(), [](Item const & x) { return x.as_unsigned_int_8("Item-type") == 0x10; }); if(it == sub_items.end()) { throw Exception("No Application Context"); } std::stringstream stream; stream << *it; return ApplicationContext(stream); } void AAssociate ::set_application_context(ApplicationContext const & value) { auto const & old_items = this->_item.as_items("Variable-items"); std::vector new_items; new_items.push_back(value.get_item()); std::copy_if( old_items.begin(), old_items.end(), std::back_inserter(new_items), [](Item const & item) { return item.as_unsigned_int_8("Item-type") == 0x21; }); std::copy_if( old_items.begin(), old_items.end(), std::back_inserter(new_items), [](Item const & item) { return item.as_unsigned_int_8("Item-type") == 0x50; }); this->_item.as_items("Variable-items") = new_items; this->_item.as_unsigned_int_32("PDU-length") = this->_compute_length(); } UserInformation AAssociate ::get_user_information() const { auto const & sub_items = this->_item.as_items("Variable-items"); auto const it = std::find_if( sub_items.begin(), sub_items.end(), [](Item const & x) { return x.as_unsigned_int_8("Item-type") == 0x50; }); if(it == sub_items.end()) { throw Exception("No User Information"); } std::stringstream stream; stream << *it; return UserInformation(stream); } void AAssociate ::set_user_information(UserInformation const & value) { auto const & old_items = this->_item.as_items("Variable-items"); std::vector new_items; std::copy_if( old_items.begin(), old_items.end(), std::back_inserter(new_items), [](Item const & item) { return item.as_unsigned_int_8("Item-type") == 0x10; }); std::copy_if( old_items.begin(), old_items.end(), std::back_inserter(new_items), [](Item const & item) { return ( item.as_unsigned_int_8("Item-type") == 0x20 || item.as_unsigned_int_8("Item-type") == 0x21); }); new_items.push_back(value.get_item()); this->_item.as_items("Variable-items") = new_items; this->_item.as_unsigned_int_32("PDU-length") = this->_compute_length(); } std::string AAssociate ::_encode_ae_title(std::string const & value) { if(value.empty() || value.size() > 16) { throw Exception("Invalid AE title"); } auto const padded = value+std::string(16-value.size(), ' '); return padded; } std::string AAssociate ::_decode_ae_title(std::string const & value) { auto const begin = value.find_first_not_of(' '); if(begin == std::string::npos) { return ""; } else { auto const end = value.find_last_not_of(' '); return value.substr(begin, end-begin+1); } } } } odil-0.11.0/src/odil/pdu/AAssociate.h000066400000000000000000000050771362244656000172340ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _00e9792a_98a8_4ca7_9272_43dcd7e331ea #define _00e9792a_98a8_4ca7_9272_43dcd7e331ea #include #include #include #include "odil/odil.h" #include "odil/pdu/ApplicationContext.h" #include "odil/pdu/Object.h" #include "odil/pdu/UserInformation.h" namespace odil { namespace pdu { /// @brief A-ASSOCIATE-RQ and A-ASSOCIATE-AC PDU, cf. PS 3.8, 9.3.2 and 9.3.3. class ODIL_API AAssociate: public Object { public: /// @brief Constructor. AAssociate(); /// @brief Constructor for binary data. AAssociate(std::istream & stream); /// @brief Destructor. virtual ~AAssociate() =0; /// @brief Return the protocol version. uint16_t get_protocol_version() const; /// @brief Set the protocol version. void set_protocol_version(uint16_t value); /// @brief Return the called AE title. std::string get_called_ae_title() const; /** * @brief Set the called AE title. * * An exception is raised if the value is empty or if it is longer than * 16 characters. */ void set_called_ae_title(std::string const & value); /// @brief Return the calling AE title. std::string get_calling_ae_title() const; /** * @brief Set the calling AE title. * * An exception is raised if the value is empty or if it is longer than * 16 characters. */ void set_calling_ae_title(std::string const & value); /// @brief Return the Application Context sub-item. ApplicationContext get_application_context() const; /// @brief Set the Application Context sub-item. void set_application_context(ApplicationContext const & value); /// @brief Return the User Information sub-item. UserInformation get_user_information() const; /// @brief Set the User Information sub-item. void set_user_information(UserInformation const & value); private: /// @brief Pad the value with spaces so that it is 16 characters long. static std::string _encode_ae_title(std::string const & value); /// @brief Remove the leading and trailing spaces. static std::string _decode_ae_title(std::string const & value); }; } } #endif // _00e9792a_98a8_4ca7_9272_43dcd7e331ea odil-0.11.0/src/odil/pdu/AAssociateAC.cpp000066400000000000000000000044211362244656000177630ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/AAssociateAC.h" #include #include #include #include "odil/Exception.h" #include "odil/pdu/AAssociate.h" #include "odil/pdu/PresentationContextAC.h" namespace odil { namespace pdu { AAssociateAC ::AAssociateAC() : AAssociate() { this->_item.as_unsigned_int_8("PDU-type") = 0x02; } AAssociateAC ::AAssociateAC(std::istream & stream) : AAssociate(stream) { if(this->_item.as_unsigned_int_8("PDU-type") != 0x02) { throw Exception("Invalid PDU type"); } } AAssociateAC ::~AAssociateAC() { // Nothing to do. } std::vector AAssociateAC ::get_presentation_contexts() const { std::vector result; for(auto const & item: this->_item.as_items("Variable-items")) { if(item.as_unsigned_int_8("Item-type") == 0x21) { std::stringstream stream; stream << item; result.push_back(PresentationContextAC(stream)); } } return result; } void AAssociateAC ::set_presentation_contexts(std::vector const & value) { auto const & old_items = this->_item.as_items("Variable-items"); std::vector new_items; std::copy_if( old_items.begin(), old_items.end(), std::back_inserter(new_items), [](Item const & item) { return item.as_unsigned_int_8("Item-type") == 0x10; }); std::transform( value.begin(), value.end(), std::back_inserter(new_items), [](PresentationContext const & x) { return x.get_item(); }); std::copy_if( old_items.begin(), old_items.end(), std::back_inserter(new_items), [](Item const & item) { return item.as_unsigned_int_8("Item-type") == 0x50; }); this->_item.as_items("Variable-items") = new_items; this->_item.as_unsigned_int_32("PDU-length") = this->_compute_length(); } } } odil-0.11.0/src/odil/pdu/AAssociateAC.h000066400000000000000000000023751362244656000174360ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _973ae1d9_c41c_4518_9c35_df13b2253369 #define _973ae1d9_c41c_4518_9c35_df13b2253369 #include #include "odil/odil.h" #include "odil/pdu/AAssociate.h" #include "odil/pdu/PresentationContextAC.h" namespace odil { namespace pdu { /// @brief A-ASSOCIATE-AC PDU, cf. PS 3.8, 9.3.3. class ODIL_API AAssociateAC: public AAssociate { public: /// @brief Constructor. AAssociateAC(); /// @brief Constructor for binary data. AAssociateAC(std::istream & stream); /// @brief Destructor. ~AAssociateAC(); /// @brief Return the Presentation Context sub-items. std::vector get_presentation_contexts() const; /// @brief Set the Presentation Context sub-items. void set_presentation_contexts(std::vector const & value); }; } } #endif // _973ae1d9_c41c_4518_9c35_df13b2253369 odil-0.11.0/src/odil/pdu/AAssociateRJ.cpp000066400000000000000000000051621362244656000200160ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/AAssociateRJ.h" #include #include #include "odil/Exception.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { AAssociateRJ ::AAssociateRJ(unsigned char result, unsigned char source, unsigned char reason) { this->_item.add("PDU-type", uint8_t(0x03)); this->_item.add("Reserved-1", uint8_t(0)); this->_item.add("PDU-length", uint32_t(4)); this->_item.add("Reserved-2", uint8_t(0)); this->_item.add("Result", uint8_t(0)); this->_item.add("Source", uint8_t(0)); this->_item.add("Reason", uint8_t(0)); this->set_result(result); this->set_source(source); this->set_reason(reason); } AAssociateRJ ::AAssociateRJ(std::istream & stream) { this->_item.read(stream, "PDU-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("PDU-type") != 0x03) { throw Exception("Invalid PDU type"); } this->_item.read(stream, "Reserved-1", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "PDU-length", Item::Field::Type::unsigned_int_32); this->_item.read(stream, "Reserved-2", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Result", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Source", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Reason", Item::Field::Type::unsigned_int_8); } unsigned char AAssociateRJ ::get_result() const { return this->_item.as_unsigned_int_8("Result"); } void AAssociateRJ ::set_result(unsigned char result) { if(result > 2) { throw Exception("Unknown result"); } this->_item.as_unsigned_int_8("Result") = result; } unsigned char AAssociateRJ ::get_source() const { return this->_item.as_unsigned_int_8("Source"); } void AAssociateRJ ::set_source(unsigned char source) { if(source > 3) { throw Exception("Unknown source"); } this->_item.as_unsigned_int_8("Source") = source; } unsigned char AAssociateRJ ::get_reason() const { return this->_item.as_unsigned_int_8("Reason"); } void AAssociateRJ ::set_reason(unsigned char reason) { if(reason > 10) { throw Exception("Unknown reason"); } this->_item.as_unsigned_int_8("Reason") = reason; } } } odil-0.11.0/src/odil/pdu/AAssociateRJ.h000066400000000000000000000026261362244656000174650ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _3980566c_9185_40a2_8e7d_6286c2cd1959 #define _3980566c_9185_40a2_8e7d_6286c2cd1959 #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /// @brief A-ASSOCIATE-RJ PDU, cf. PS 3.8, 9.3.4. class ODIL_API AAssociateRJ: public Object { public: /// @brief Constructor. AAssociateRJ( unsigned char result, unsigned char source, unsigned char reason); /// @brief Constructor from stream. AAssociateRJ(std::istream & stream); /// @brief Return the result. unsigned char get_result() const; /// @brief Set the result, must be 1 or 2. void set_result(unsigned char result); /// @brief Return the source. unsigned char get_source() const; /// @brief Set the source, must be 1, 2 or 3. void set_source(unsigned char source); /// @brief Return the reason. unsigned char get_reason() const; /// @brief Set the reason. void set_reason(unsigned char reason); }; } } #endif // _3980566c_9185_40a2_8e7d_6286c2cd1959 odil-0.11.0/src/odil/pdu/AAssociateRQ.cpp000066400000000000000000000044211362244656000200220ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/AAssociateRQ.h" #include #include #include #include "odil/Exception.h" #include "odil/pdu/AAssociate.h" #include "odil/pdu/PresentationContextRQ.h" namespace odil { namespace pdu { AAssociateRQ ::AAssociateRQ() : AAssociate() { this->_item.as_unsigned_int_8("PDU-type") = 0x01; } AAssociateRQ ::AAssociateRQ(std::istream & stream) : AAssociate(stream) { if(this->_item.as_unsigned_int_8("PDU-type") != 0x01) { throw Exception("Invalid PDU type"); } } AAssociateRQ ::~AAssociateRQ() { // Nothing to do. } std::vector AAssociateRQ ::get_presentation_contexts() const { std::vector result; for(auto const & item: this->_item.as_items("Variable-items")) { if(item.as_unsigned_int_8("Item-type") == 0x20) { std::stringstream stream; stream << item; result.push_back(PresentationContextRQ(stream)); } } return result; } void AAssociateRQ ::set_presentation_contexts(std::vector const & value) { auto const & old_items = this->_item.as_items("Variable-items"); std::vector new_items; std::copy_if( old_items.begin(), old_items.end(), std::back_inserter(new_items), [](Item const & item) { return item.as_unsigned_int_8("Item-type") == 0x10; }); std::transform( value.begin(), value.end(), std::back_inserter(new_items), [](PresentationContext const & x) { return x.get_item(); }); std::copy_if( old_items.begin(), old_items.end(), std::back_inserter(new_items), [](Item const & item) { return item.as_unsigned_int_8("Item-type") == 0x50; }); this->_item.as_items("Variable-items") = new_items; this->_item.as_unsigned_int_32("PDU-length") = this->_compute_length(); } } } odil-0.11.0/src/odil/pdu/AAssociateRQ.h000066400000000000000000000023701362244656000174700ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _22fc6fe5_f7d1_461b_932f_cedfcae13897 #define _22fc6fe5_f7d1_461b_932f_cedfcae13897 #include #include "odil/odil.h" #include "odil/pdu/AAssociate.h" #include "odil/pdu/PresentationContextRQ.h" namespace odil { namespace pdu { /// @brief A-ASSOCIATE-RQ, cf. PS 3.8, 9.3.2 class ODIL_API AAssociateRQ: public AAssociate { public: /// @brief Constructor. AAssociateRQ(); /// @brief Constructor for binary data. AAssociateRQ(std::istream & stream); /// @brief Destructor. ~AAssociateRQ(); /// @brief Return the Presentation Context sub-items. std::vector get_presentation_contexts() const; /// @brief Set the Presentation Context sub-items. void set_presentation_contexts(std::vector const & value); }; } } #endif // _22fc6fe5_f7d1_461b_932f_cedfcae13897 odil-0.11.0/src/odil/pdu/AReleaseRP.cpp000066400000000000000000000024031362244656000174640ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/AReleaseRP.h" #include #include #include "odil/Exception.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { AReleaseRP ::AReleaseRP() { this->_item.add("PDU-type", uint8_t(0x06)); this->_item.add("Reserved-1", uint8_t(0)); this->_item.add("PDU-length", uint32_t(4)); this->_item.add("Reserved-2", uint32_t(0)); } AReleaseRP ::AReleaseRP(std::istream & stream) { this->_item.read(stream, "PDU-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("PDU-type") != 0x06) { throw Exception("Invalid PDU type"); } this->_item.read(stream, "Reserved-1", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "PDU-length", Item::Field::Type::unsigned_int_32); this->_item.read(stream, "Reserved-2", Item::Field::Type::unsigned_int_32); } } } odil-0.11.0/src/odil/pdu/AReleaseRP.h000066400000000000000000000015721362244656000171370ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _a70fb011_8d69_4768_a84d_7f535621c335 #define _a70fb011_8d69_4768_a84d_7f535621c335 #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /// @brief A-RELEASE-RP PDU, cf. PS 3.8, 9.3.7. class ODIL_API AReleaseRP: public Object { public: /// @brief Constructor. AReleaseRP(); /// @brief Constructor from stream. AReleaseRP(std::istream & stream); }; } } #endif // _a70fb011_8d69_4768_a84d_7f535621c335 odil-0.11.0/src/odil/pdu/AReleaseRQ.cpp000066400000000000000000000024031362244656000174650ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/AReleaseRQ.h" #include #include #include "odil/Exception.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { AReleaseRQ ::AReleaseRQ() { this->_item.add("PDU-type", uint8_t(0x05)); this->_item.add("Reserved-1", uint8_t(0)); this->_item.add("PDU-length", uint32_t(4)); this->_item.add("Reserved-2", uint32_t(0)); } AReleaseRQ ::AReleaseRQ(std::istream & stream) { this->_item.read(stream, "PDU-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("PDU-type") != 0x05) { throw Exception("Invalid PDU type"); } this->_item.read(stream, "Reserved-1", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "PDU-length", Item::Field::Type::unsigned_int_32); this->_item.read(stream, "Reserved-2", Item::Field::Type::unsigned_int_32); } } } odil-0.11.0/src/odil/pdu/AReleaseRQ.h000066400000000000000000000015721362244656000171400ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _87f54a57_5741_4fde_871b_ea9c774795ad #define _87f54a57_5741_4fde_871b_ea9c774795ad #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /// @brief A-RELEASE-RQ PDU, cf. PS 3.8, 9.3.6. class ODIL_API AReleaseRQ: public Object { public: /// @brief Constructor. AReleaseRQ(); /// @brief Constructor from stream. AReleaseRQ(std::istream & stream); }; } } #endif // _87f54a57_5741_4fde_871b_ea9c774795ad odil-0.11.0/src/odil/pdu/ApplicationContext.cpp000066400000000000000000000034111362244656000213510ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/ApplicationContext.h" #include #include #include #include "odil/Exception.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { ApplicationContext ::ApplicationContext(std::string const & name) { this->_item.add("Item-type", uint8_t(0x10)); this->_item.add("Reserved", uint8_t(0)); this->_item.add("Item-length", uint16_t(0)); this->_item.add("Application-context-name", std::string()); this->set_name(name); } ApplicationContext ::ApplicationContext(std::istream & stream) { this->_item.read(stream, "Item-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("Item-type") != 0x10) { throw Exception("Invalid item type"); } this->_item.read(stream, "Reserved", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Item-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "Application-context-name", Item::Field::Type::string, this->_item.as_unsigned_int_16("Item-length")); } std::string ApplicationContext ::get_name() const { return this->_item.as_string("Application-context-name"); } void ApplicationContext ::set_name(std::string const & name) { this->_item.as_string("Application-context-name") = name; this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } } } odil-0.11.0/src/odil/pdu/ApplicationContext.h000066400000000000000000000022631362244656000210220ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _12bdb8f1_48c2_44d0_957a_bc1fb6f6733a #define _12bdb8f1_48c2_44d0_957a_bc1fb6f6733a #include #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /** * @brief Application Context item, (PS 3.8, 9.3.2.1). */ class ODIL_API ApplicationContext: public Object { public: /// @brief Create an Application Context. ApplicationContext(std::string const & name); /// @brief Read an Application Context from a stream. ApplicationContext(std::istream & stream); /// @brief Return the name of the Application Context. std::string get_name() const; /// @brief Set the name of the Application Context. void set_name(std::string const & name); }; } } #endif // _12bdb8f1_48c2_44d0_957a_bc1fb6f6733a odil-0.11.0/src/odil/pdu/AsynchronousOperationsWindow.cpp000066400000000000000000000050621362244656000234740ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/AsynchronousOperationsWindow.h" #include #include #include "odil/Exception.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { AsynchronousOperationsWindow ::AsynchronousOperationsWindow( uint16_t maximum_number_operations_invoked, uint16_t maximum_number_operations_performed) { this->_item.add("Item-type", this->type); this->_item.add("Reserved", uint8_t(0)); this->_item.add("Item-length", uint16_t(4)); this->_item.add("Maximum-number-operations-invoked", uint16_t(0)); this->_item.add("Maximum-number-operations-performed", uint16_t(0)); this->set_maximum_number_operations_invoked(maximum_number_operations_invoked); this->set_maximum_number_operations_performed(maximum_number_operations_performed); } AsynchronousOperationsWindow ::AsynchronousOperationsWindow(std::istream & stream) { this->_item.read(stream, "Item-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("Item-type") != this->type) { throw Exception("Invalid item type"); } this->_item.read(stream, "Reserved", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Item-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "Maximum-number-operations-invoked", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "Maximum-number-operations-performed", Item::Field::Type::unsigned_int_16); } uint16_t AsynchronousOperationsWindow ::get_maximum_number_operations_invoked() const { return this->_item.as_unsigned_int_16("Maximum-number-operations-invoked"); } void AsynchronousOperationsWindow ::set_maximum_number_operations_invoked(uint16_t value) { this->_item.as_unsigned_int_16("Maximum-number-operations-invoked") = value; } uint16_t AsynchronousOperationsWindow ::get_maximum_number_operations_performed() const { return this->_item.as_unsigned_int_16("Maximum-number-operations-performed"); } void AsynchronousOperationsWindow ::set_maximum_number_operations_performed(uint16_t value) { this->_item.as_unsigned_int_16("Maximum-number-operations-performed") = value; } } } odil-0.11.0/src/odil/pdu/AsynchronousOperationsWindow.h000066400000000000000000000033111362244656000231340ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _a24346ab_a585_4412_9237_5b2142f2d6eb #define _a24346ab_a585_4412_9237_5b2142f2d6eb #include #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /// @brief Asynchronous Operations Window Sub-Item (PS 3.7, D.3.3.3.1 and D.3.3.3.2). class ODIL_API AsynchronousOperationsWindow: public Object { public: /// @brief Item type. static uint8_t const type=0x53; /// @brief Create a Asynchronous Operations Window item. AsynchronousOperationsWindow( uint16_t maximum_number_operations_invoked, uint16_t maximum_number_operations_performed); /// @brief Read a Asynchronous Operations Window item from a stream. AsynchronousOperationsWindow(std::istream & stream); /// @brief Return the Maximum-number-operations-invoked. uint16_t get_maximum_number_operations_invoked() const; /// @brief Set the Maximum-number-operations-invoked. void set_maximum_number_operations_invoked(uint16_t value); /// @brief Return the Maximum-number-operations-performed. uint16_t get_maximum_number_operations_performed() const; /// @brief Set the Maximum-number-operations-performed. void set_maximum_number_operations_performed(uint16_t value); }; } } #endif // _a24346ab_a585_4412_9237_5b2142f2d6eb odil-0.11.0/src/odil/pdu/ImplementationClassUID.cpp000066400000000000000000000036161362244656000220650ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/ImplementationClassUID.h" #include #include #include #include "odil/Exception.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { ImplementationClassUID ::ImplementationClassUID(std::string const & implementation_class_uid) { this->_item.add("Item-type", this->type); this->_item.add("Reserved", uint8_t(0)); this->_item.add("Item-length", uint16_t(0)); this->_item.add("Implementation-class-uid", std::string()); this->set_implementation_class_uid(implementation_class_uid); } ImplementationClassUID ::ImplementationClassUID(std::istream & stream) { this->_item.read(stream, "Item-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("Item-type") != this->type) { throw Exception("Invalid item type"); } this->_item.read(stream, "Reserved", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Item-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "Implementation-class-uid", Item::Field::Type::string, this->_item.as_unsigned_int_16("Item-length")); } std::string ImplementationClassUID ::get_implementation_class_uid() const { return this->_item.as_string("Implementation-class-uid"); } void ImplementationClassUID ::set_implementation_class_uid(std::string const & value) { this->_item.as_string("Implementation-class-uid") = value; this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } } } odil-0.11.0/src/odil/pdu/ImplementationClassUID.h000066400000000000000000000025431362244656000215300ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _6b085e0c_afd5_4ed7_ab4d_6bdb9b28ca67 #define _6b085e0c_afd5_4ed7_ab4d_6bdb9b28ca67 #include #include #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /// @brief Implementation Class UID Sub-Item (PS 3.7, D.3.3.2.1 and D.3.3.2.2). class ODIL_API ImplementationClassUID: public Object { public: /// @brief Item type. static uint8_t const type=0x52; /// @brief Create a Implementation Class UID item. ImplementationClassUID(std::string const & implementation_class_uid); /// @brief Read a Implementation Class UID item from a stream. ImplementationClassUID(std::istream & stream); /// @brief Return the Implementation Class UID. std::string get_implementation_class_uid() const; /// @brief Set the Implementation Class UID. void set_implementation_class_uid(std::string const & value); }; } } #endif // _6b085e0c_afd5_4ed7_ab4d_6bdb9b28ca67 odil-0.11.0/src/odil/pdu/ImplementationVersionName.cpp000066400000000000000000000040631362244656000227010ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/ImplementationVersionName.h" #include #include #include #include "odil/Exception.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { ImplementationVersionName ::ImplementationVersionName(std::string const & implementation_version_name) { this->_item.add("Item-type", this->type); this->_item.add("Reserved", uint8_t(0)); this->_item.add("Item-length", uint16_t(0)); this->_item.add("Implementation-version-name", std::string()); this->set_implementation_version_name(implementation_version_name); } ImplementationVersionName ::ImplementationVersionName(std::istream & stream) { this->_item.read(stream, "Item-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("Item-type") != this->type) { throw Exception("Invalid item type"); } this->_item.read(stream, "Reserved", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Item-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "Implementation-version-name", Item::Field::Type::string, this->_item.as_unsigned_int_16("Item-length")); } std::string ImplementationVersionName ::get_implementation_version_name() const { return this->_item.as_string("Implementation-version-name"); } void ImplementationVersionName ::set_implementation_version_name(std::string const & value) { if(value.empty() || value.size()>16) { throw Exception("Invalid implementation version name"); } this->_item.as_string("Implementation-version-name") = value; this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } } } odil-0.11.0/src/odil/pdu/ImplementationVersionName.h000066400000000000000000000026041362244656000223450ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _43545543_c8f8_44c4_b3ce_93cf2adfd365 #define _43545543_c8f8_44c4_b3ce_93cf2adfd365 #include #include #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /// @brief Implementation Version Name Sub-Item (PS 3.7, D.3.3.2.3 and D.3.3.2.4). class ODIL_API ImplementationVersionName: public Object { public: /// @brief Item type. static uint8_t const type=0x55; /// @brief Create a Implementation Version Name item. ImplementationVersionName(std::string const & implementation_version_name); /// @brief Read a Implementation Version Name item from a stream. ImplementationVersionName(std::istream & stream); /// @brief Return the Implementation Version Name. std::string get_implementation_version_name() const; /// @brief Set the Implementation Version Name. void set_implementation_version_name(std::string const & value); }; } } #endif // _43545543_c8f8_44c4_b3ce_93cf2adfd365 odil-0.11.0/src/odil/pdu/Item.cpp000066400000000000000000000216421362244656000164450ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/Item.h" #include #include #include #include #include #include #include #include "odil/endian.h" #include "odil/Exception.h" namespace odil { namespace pdu { Item::Field ::Field(uint8_t value) : _type(Type::unsigned_int_8), _uint8(value) { // Nothing else. } Item::Field ::Field(uint16_t value) : _type(Type::unsigned_int_16), _uint16(value) { // Nothing else. } Item::Field ::Field(uint32_t value) : _type(Type::unsigned_int_32), _uint32(value) { // Nothing else. } Item::Field ::Field(std::string const & value) : _type(Type::string), _string(value) { // Nothing else. } Item::Field ::Field(std::vector const & value) : _type(Type::items), _items(value) { // Nothing else. } Item::Field::Type Item::Field ::get_type() const { return this->_type; } uint8_t Item::Field ::as_unsigned_int_8() const { if(this->_type != Type::unsigned_int_8) { throw Exception("Incorrect type"); } return this->_uint8; } uint8_t & Item::Field ::as_unsigned_int_8() { if(this->_type != Type::unsigned_int_8) { throw Exception("Incorrect type"); } return this->_uint8; } uint16_t Item::Field ::as_unsigned_int_16() const { if(this->_type != Type::unsigned_int_16) { throw Exception("Incorrect type"); } return this->_uint16; } uint16_t & Item::Field ::as_unsigned_int_16() { if(this->_type != Type::unsigned_int_16) { throw Exception("Incorrect type"); } return this->_uint16; } uint32_t Item::Field ::as_unsigned_int_32() const { if(this->_type != Type::unsigned_int_32) { throw Exception("Incorrect type"); } return this->_uint32; } uint32_t & Item::Field ::as_unsigned_int_32() { if(this->_type != Type::unsigned_int_32) { throw Exception("Incorrect type"); } return this->_uint32; } std::string const & Item::Field ::as_string() const { if(this->_type != Type::string) { throw Exception("Incorrect type"); } return this->_string; } std::string & Item::Field ::as_string() { if(this->_type != Type::string) { throw Exception("Incorrect type"); } return this->_string; } std::vector const & Item::Field ::as_items() const { if(this->_type != Type::items) { throw Exception("Incorrect type"); } return this->_items; } std::vector & Item::Field ::as_items() { if(this->_type != Type::items) { throw Exception("Incorrect type"); } return this->_items; } Item ::Item() { // Nothing to do. } Item ::Item(std::vector> const & fields) : _fields(fields) { // Nothing else. } Item & Item ::add(std::string const & name, Field const & field) { this->_fields.push_back(std::make_pair(name, field)); return *this; } Item::Container::size_type Item ::size() const { return this->_fields.size(); } bool Item ::empty() const { return this->_fields.empty(); } bool Item ::has_field(std::string const & name) const { auto const iterator = std::find_if( this->_fields.begin(), this->_fields.end(), [&name](std::pair const & x) { return (x.first == name); }); return (iterator != this->_fields.end()); } Item::Field const & Item ::operator[](std::string const & name) const { auto const iterator = std::find_if( this->_fields.begin(), this->_fields.end(), [&name](std::pair const & x) { return (x.first == name); }); if(iterator == this->_fields.end()) { throw Exception("No such field"); } return iterator->second; } Item::Field & Item ::operator[](std::string const & name) { auto const iterator = std::find_if( this->_fields.begin(), this->_fields.end(), [&name](std::pair const & x) { return (x.first == name); }); if(iterator == this->_fields.end()) { throw Exception("No such field"); } return iterator->second; } uint8_t Item ::as_unsigned_int_8(std::string const & name) const { auto const & field = (*this)[name]; return field.as_unsigned_int_8(); } uint8_t & Item ::as_unsigned_int_8(std::string const & name) { auto & field = (*this)[name]; return field.as_unsigned_int_8(); } uint16_t Item ::as_unsigned_int_16(std::string const & name) const { auto const & field = (*this)[name]; return field.as_unsigned_int_16(); } uint16_t & Item ::as_unsigned_int_16(std::string const & name) { auto & field = (*this)[name]; return field.as_unsigned_int_16(); } uint32_t Item ::as_unsigned_int_32(std::string const & name) const { auto const & field = (*this)[name]; return field.as_unsigned_int_32(); } uint32_t & Item ::as_unsigned_int_32(std::string const & name) { auto & field = (*this)[name]; return field.as_unsigned_int_32(); } std::string const & Item ::as_string(std::string const & name) const { auto & field = (*this)[name]; return field.as_string(); } std::string & Item ::as_string(std::string const & name) { auto & field = (*this)[name]; return field.as_string(); } std::vector const & Item ::as_items(std::string const & name) const { auto & field = (*this)[name]; return field.as_items(); } std::vector & Item ::as_items(std::string const & name) { auto & field = (*this)[name]; return field.as_items(); } Item::const_iterator Item ::begin() const { return this->_fields.begin(); } Item::const_iterator Item ::end() const { return this->_fields.end(); } void Item ::read( std::istream & stream, std::string const & name, Field::Type type, std::streamsize size) { if(type == Field::Type::unsigned_int_8) { uint8_t value; stream.read(reinterpret_cast(&value), sizeof(value)); if(!stream.good()) { throw Exception("Could not read unsigned_int_8 field"); } this->add(name, Field(value)); } else if(type == Field::Type::unsigned_int_16) { uint16_t value; stream.read(reinterpret_cast(&value), sizeof(value)); if(!stream.good()) { throw Exception("Could not read unsigned_int_16 field"); } value = big_endian_to_host(value); this->add(name, Field(value)); } else if(type == Field::Type::unsigned_int_32) { uint32_t value; stream.read(reinterpret_cast(&value), sizeof(value)); if(!stream.good()) { throw Exception("Could not read unsigned_int_32 field"); } value = big_endian_to_host(value); this->add(name, Field(value)); } else if(type == Field::Type::string) { std::string value(size, '\0'); if(value.size() > 0) { stream.read(reinterpret_cast(&value[0]), value.size()); if(!stream.good()) { throw Exception("Could not read string field"); } } this->add(name, Field(value)); } else { throw Exception("Unknown field type"); } } std::ostream & operator<<(std::ostream & stream, Item const & item) { for(auto const & named_field: item) { auto const & field = named_field.second; auto const type = field.get_type(); if(type == Item::Field::Type::unsigned_int_8) { auto const value = field.as_unsigned_int_8(); stream.write(reinterpret_cast(&value), sizeof(value)); } else if(type == Item::Field::Type::unsigned_int_16) { auto const value = host_to_big_endian(field.as_unsigned_int_16()); stream.write(reinterpret_cast(&value), sizeof(value)); } else if(type == Item::Field::Type::unsigned_int_32) { auto const value = host_to_big_endian(field.as_unsigned_int_32()); stream.write(reinterpret_cast(&value), sizeof(value)); } else if(type == Item::Field::Type::string) { auto const value = field.as_string(); stream.write(reinterpret_cast(&value[0]), value.size()); } else if(type == Item::Field::Type::items) { auto const value = field.as_items(); for(auto const & sub_item: value) { stream << sub_item; } } else { throw Exception("Unknown type"); } } return stream; } } } odil-0.11.0/src/odil/pdu/Item.h000066400000000000000000000170111362244656000161050ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _1c7b57cc_79f5_497c_815c_920e0711a864 #define _1c7b57cc_79f5_497c_815c_920e0711a864 #include #include #include #include #include #include #include "odil/odil.h" namespace odil { namespace pdu { /// @brief A sequence of fields forming a full PDU or a part of it. class ODIL_API Item { public: /// @brief Generic field. class ODIL_API Field { public: /// @brief Possible types stored in the field. enum class Type { unsigned_int_8, unsigned_int_16, unsigned_int_32, string, items }; /// @brief Constructor. Field(uint8_t value); /// @brief Constructor. Field(uint16_t value); /// @brief Constructor. Field(uint32_t value); /// @brief Constructor. Field(std::string const & value); /// @brief Constructor. Field(std::vector const & value); /// @brief Return the concrete type stored in the field. Type get_type() const; /** * @brief Return the uint8_t stored in the field. * * If the field does not contain an uint8_t, a odil::Exception is raised. */ uint8_t as_unsigned_int_8() const; /** * @brief Return the uint8_t stored in the field. * * If the field does not contain an uint8_t, a odil::Exception is raised. */ uint8_t & as_unsigned_int_8(); /** * @brief Return the uint16_t stored in the field. * * If the field does not contain an uint16_t, a odil::Exception is raised. */ uint16_t as_unsigned_int_16() const; /** * @brief Return the uint16_t stored in the field. * * If the field does not contain an uint16_t, a odil::Exception is raised. */ uint16_t & as_unsigned_int_16(); /** * @brief Return the uint32_t stored in the field. * * If the field does not contain an uint32_t, a odil::Exception is raised. */ uint32_t as_unsigned_int_32() const; /** * @brief Return the uint32_t stored in the field. * * If the field does not contain an uint32_t, a odil::Exception is raised. */ uint32_t & as_unsigned_int_32(); /** * @brief Return the string stored in the field. * * If the field does not contain an string, a odil::Exception is raised. */ std::string const & as_string() const; /** * @brief Return the string stored in the field. * * If the field does not contain an string, a odil::Exception is raised. */ std::string & as_string(); /** * @brief Return the items stored in the field. * * If the field does not contain items, a odil::Exception is raised. */ std::vector const & as_items() const; /** * @brief Return the items stored in the field. * * If the field does not contain items, a odil::Exception is raised. */ std::vector & as_items(); private: Type _type; uint8_t _uint8; uint16_t _uint16; uint32_t _uint32; std::string _string; std::vector _items; }; typedef std::vector> Container; /// @brief Create an empty PDU item. Item(); /// @brief Create an initialized PDU item. Item(std::vector> const & fields); /// @brief Add a new field to the PDU item. Item & add(std::string const & name, Field const & field); /// @brief Return the number of fields. Container::size_type size() const; /// @brief Test whether the container is empty. bool empty() const; /// @brief Test whether the PDU item contains a field with a given name. bool has_field(std::string const & name) const; /// @brief Return the named field. Raise an exception if no such field exists. Field const & operator[](std::string const & name) const; /// @brief Return the named field. Raise an exception if no such field exists. Field & operator[](std::string const & name); /** * @brief Return the named field as an uint8_t. * * Raise an exception if no such field exists or if the field does not * contain an uint8_t. */ uint8_t as_unsigned_int_8(std::string const & name) const; /** * @brief Return the named field as an uint8_t. * * Raise an exception if no such field exists or if the field does not * contain an uint8_t. */ uint8_t & as_unsigned_int_8(std::string const & name); /** * @brief Return the named field as an uint16_t. * * Raise an exception if no such field exists or if the field does not * contain an uint16_t. */ uint16_t as_unsigned_int_16(std::string const & name) const; /** * @brief Return the named field as an uint16_t. * * Raise an exception if no such field exists or if the field does not * contain an uint16_t. */ uint16_t & as_unsigned_int_16(std::string const & name); /** * @brief Return the named field as an uint32_t. * * Raise an exception if no such field exists or if the field does not * contain an uint32_t. */ uint32_t as_unsigned_int_32(std::string const & name) const; /** * @brief Return the named field as an uint32_t. * * Raise an exception if no such field exists or if the field does not * contain an uint32_t. */ uint32_t & as_unsigned_int_32(std::string const & name); /** * @brief Return the named field as a string. * * Raise an exception if no such field exists or if the field does not * contain a string. */ std::string const & as_string(std::string const & name) const; /** * @brief Return the named field as a sequence of items. * * Raise an exception if no such field exists or if the field does not * contain a sequence of items. */ std::string & as_string(std::string const & name); std::vector const & as_items(std::string const & name) const; /** * @brief Return the named field as a sequence of items. * * Raise an exception if no such field exists or if the field does not * contain a sequence of items. */ std::vector & as_items(std::string const & name); typedef Container::const_iterator const_iterator; const_iterator begin() const; const_iterator end() const; /** * @brief Read a field from a stream. * * The size parameter is ignored for non-string types. */ void read( std::istream & stream,std::string const & name, Field::Type type, std::streamsize size=0); private: std::vector> _fields; }; // No operator>> since we need explicit names and types. ODIL_API std::ostream & operator<<(std::ostream & stream, Item const & item); } } #endif // _1c7b57cc_79f5_497c_815c_920e0711a864 odil-0.11.0/src/odil/pdu/MaximumLength.cpp000066400000000000000000000032001362244656000203140ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/MaximumLength.h" #include #include #include "odil/Exception.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { MaximumLength ::MaximumLength(uint32_t maximum_length) { this->_item.add("Item-type", uint8_t(0x51)); this->_item.add("Reserved", uint8_t(0)); this->_item.add("Item-length", uint16_t(4)); this->_item.add("Maximum-length-received", uint32_t(0)); this->set_maximum_length(maximum_length); } MaximumLength ::MaximumLength(std::istream & stream) { this->_item.read(stream, "Item-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("Item-type") != 0x51) { throw Exception("Invalid item type"); } this->_item.read(stream, "Reserved", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Item-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "Maximum-length-received", Item::Field::Type::unsigned_int_32); } uint32_t MaximumLength ::get_maximum_length() const { return this->_item.as_unsigned_int_32("Maximum-length-received"); } void MaximumLength ::set_maximum_length(uint32_t value) { this->_item.as_unsigned_int_32("Maximum-length-received") = value; } } } odil-0.11.0/src/odil/pdu/MaximumLength.h000066400000000000000000000023051362244656000177660ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _b2091b0b_1a6e_435c_b927_e5c54aff89c5 #define _b2091b0b_1a6e_435c_b927_e5c54aff89c5 #include #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /// @brief Maximum Length Sub-Item Structure (PS 3.8, D.1). class ODIL_API MaximumLength: public Object { public: /// @brief Item type. static uint8_t const type=0x51; /// @brief Create a Maximum Length item. MaximumLength(uint32_t maximum_length=0); /// @brief Read a Maximum Length item from a stream. MaximumLength(std::istream & stream); /// @brief Return the maximum length. uint32_t get_maximum_length() const; /// @brief Set the maximum length. void set_maximum_length(uint32_t value); }; } } #endif // _b2091b0b_1a6e_435c_b927_e5c54aff89c5 odil-0.11.0/src/odil/pdu/Object.cpp000066400000000000000000000043351362244656000167550ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/Object.h" #include #include #include "odil/Exception.h" #include "odil/pdu/Item.h" namespace odil { namespace pdu { Object ::~Object() { // Nothing to do. } Item const & Object ::get_item() const { return this->_item; } uint32_t Object ::_compute_length() const { uint32_t length=0; // First 3 fields are always the same: type, reserved and length. auto it = this->_item.begin(); std::advance(it, 3); for(; it!=this->_item.end(); ++it) { Item::Field const & field = it->second; length += this->_compute_length(field); } return length; } uint32_t Object ::_compute_length(Item const & item) const { uint32_t length=0; for(auto const & named_field: item) { Item::Field const & field = named_field.second; length += this->_compute_length(field); } return length; } uint32_t Object ::_compute_length(Item::Field const & field) const { uint32_t length=0; if(field.get_type() == Item::Field::Type::unsigned_int_8) { length += 1; } else if(field.get_type() == Item::Field::Type::unsigned_int_16) { length += 2; } else if(field.get_type() == Item::Field::Type::unsigned_int_32) { length += 4; } else if(field.get_type() == Item::Field::Type::string) { length += field.as_string().size(); } else if(field.get_type() == Item::Field::Type::items) { auto const & items = field.as_items(); for(auto const & item: items) { length += this->_compute_length(item); } } else { throw Exception("Unknown field type"); } return length; } std::ostream & operator<<(std::ostream & stream, Object const & object) { stream << object.get_item(); return stream; } } } odil-0.11.0/src/odil/pdu/Object.h000066400000000000000000000026331362244656000164210ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _da2270e3_d393_415a_9c5c_6253152ed9da #define _da2270e3_d393_415a_9c5c_6253152ed9da #include #include "odil/odil.h" #include "odil/pdu/Item.h" namespace odil { namespace pdu { /** * @brief Base class for all PDU-related high-level objects (PDU, items and * sub-items). */ class ODIL_API Object { public: /// @brief Destructor, makes the type polymorphic. virtual ~Object(); /// @brief Get the underlying item. Item const & get_item() const; protected: Item _item; /// @brief Compute the value of the length field of the object. uint32_t _compute_length() const; /// @brief Compute the full size of an item. uint32_t _compute_length(Item const & item) const; /// @brief Compute the full size of a field. uint32_t _compute_length(Item::Field const & field) const; }; /// @brief Dump the PDU-object in its binary form. ODIL_API std::ostream & operator<<(std::ostream & stream, Object const & object); } } #endif // _da2270e3_d393_415a_9c5c_6253152ed9da odil-0.11.0/src/odil/pdu/PDataTF.cpp000066400000000000000000000116411362244656000167700ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/PDataTF.h" #include #include #include #include #include #include "odil/Exception.h" #include "odil/pdu/Item.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { PDataTF::PresentationDataValueItem ::PresentationDataValueItem( uint8_t presentation_context_id, uint8_t control_header, std::string const & fragment) { this->_item.add("Item-length", uint32_t(4)); this->_item.add("Presentation-Context-ID", uint8_t(0)); this->_item.add("Control-header", uint8_t(0)); this->_item.add("Fragment", std::string()); this->set_presentation_context_id(presentation_context_id); this->set_control_header(control_header); this->set_fragment(fragment); } PDataTF::PresentationDataValueItem ::PresentationDataValueItem(std::istream & stream) { this->_item.read(stream, "Item-length", Item::Field::Type::unsigned_int_32); this->_item.read( stream, "Presentation-Context-ID", Item::Field::Type::unsigned_int_8); this->_item.read( stream, "Control-header", Item::Field::Type::unsigned_int_8); this->_item.read( stream, "Fragment", Item::Field::Type::string, this->_item.as_unsigned_int_32("Item-length")-2); } uint8_t PDataTF::PresentationDataValueItem ::get_presentation_context_id() const { return this->_item.as_unsigned_int_8("Presentation-Context-ID"); } void PDataTF::PresentationDataValueItem ::set_presentation_context_id(uint8_t value) { if(value%2 == 0) { throw Exception("Invalid Presentation Context ID"); } this->_item.as_unsigned_int_8("Presentation-Context-ID") = value; } uint8_t PDataTF::PresentationDataValueItem ::get_control_header() const { return this->_item.as_unsigned_int_8("Control-header"); } void PDataTF::PresentationDataValueItem ::set_control_header(uint8_t value) { this->_item.as_unsigned_int_8("Control-header") = value; } bool PDataTF::PresentationDataValueItem ::is_command() const { return (this->get_control_header()%2==1); } bool PDataTF::PresentationDataValueItem ::is_last_fragment() const { return ((this->get_control_header()>>1)%2==1); } std::string const & PDataTF::PresentationDataValueItem ::get_fragment() const { return this->_item.as_string("Fragment"); } void PDataTF::PresentationDataValueItem ::set_fragment(std::string const & fragment) { this->_item.as_string("Fragment") = fragment; this->_item.as_unsigned_int_32("Item-length") = 2+fragment.size(); } PDataTF ::PDataTF(std::vector const & pdv_items) { this->_item.add("PDU-type", uint8_t(0x04)); this->_item.add("Reserved-1", uint8_t(0)); this->_item.add("PDU-length", uint32_t(4)); this->_item.add("Presentation-data-value-Items", std::vector()); this->set_pdv_items(pdv_items); } PDataTF ::PDataTF(std::istream & stream) { this->_item.read(stream, "PDU-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("PDU-type") != 0x04) { throw Exception("Invalid PDU type"); } this->_item.read(stream, "Reserved-1", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "PDU-length", Item::Field::Type::unsigned_int_32); auto const pdu_length = this->_item.as_unsigned_int_32("PDU-length"); auto const begin = stream.tellg(); std::vector pdv_items; while(stream.tellg()-begin < pdu_length) { PresentationDataValueItem pdv_item(stream); pdv_items.push_back(pdv_item); } this->_item.add("Presentation-data-value-Items", std::vector()); this->set_pdv_items(pdv_items); } std::vector PDataTF ::get_pdv_items() const { std::vector result; for(auto const & item: this->_item.as_items("Presentation-data-value-Items")) { PresentationDataValueItem const pdv_item( item.as_unsigned_int_8("Presentation-Context-ID"), item.as_unsigned_int_8("Control-header"), item.as_string("Fragment")); result.push_back(pdv_item); } return result; } void PDataTF ::set_pdv_items(std::vector const &pdv_items) { auto & items = this->_item.as_items("Presentation-data-value-Items"); items.resize(pdv_items.size()); std::transform( pdv_items.begin(), pdv_items.end(), items.begin(), [](PresentationDataValueItem const& x){ return x.get_item(); }); this->_item.as_unsigned_int_32("PDU-length") = this->_compute_length(); } } } odil-0.11.0/src/odil/pdu/PDataTF.h000066400000000000000000000035641362244656000164420ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _b3062f12_8a06_46a8_9dda_8a7edf96e4a6 #define _b3062f12_8a06_46a8_9dda_8a7edf96e4a6 #include #include #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /// @brief P-DATA-TF PDU, cf. PS 3.8, 9.3.5. class ODIL_API PDataTF: public Object { public: class ODIL_API PresentationDataValueItem: public Object { public: PresentationDataValueItem( uint8_t presentation_context_id, uint8_t control_header, std::string const & fragment); PresentationDataValueItem(std::istream & stream); uint8_t get_presentation_context_id() const; void set_presentation_context_id(uint8_t value); uint8_t get_control_header() const; void set_control_header(uint8_t value); bool is_command() const; bool is_last_fragment() const; std::string const & get_fragment() const; void set_fragment(std::string const & fragment); }; /// @brief Constructor. PDataTF(std::vector const & pdv_items); /// @brief Constructor from stream. PDataTF(std::istream & stream); /// @brief Return the Presentation Data Value Items. std::vector get_pdv_items() const; /// @brief Set the Presentation Data Value Items. void set_pdv_items(std::vector const &pdv_items); }; } } #endif // _b3062f12_8a06_46a8_9dda_8a7edf96e4a6 odil-0.11.0/src/odil/pdu/PresentationContext.cpp000066400000000000000000000132421362244656000215640ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/PresentationContext.h" #include #include #include #include #include "odil/Exception.h" #include "odil/pdu/Object.h" #include "odil/pdu/Item.h" namespace odil { namespace pdu { PresentationContext ::PresentationContext() { // Nothing to do. } PresentationContext ::PresentationContext(std::istream & stream) { this->_item.read(stream, "Item-type", Item::Field::Type::unsigned_int_8); if(this->get_item_type() != 0x20 && this->get_item_type() != 0x21) { throw Exception("Invalid item type"); } this->_item.read(stream, "Reserved-1", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Item-length", Item::Field::Type::unsigned_int_16); auto const item_length = this->_item.as_unsigned_int_16("Item-length"); auto const begin = stream.tellg(); this->_item.read( stream, "Presentation-context-id", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Reserved-2", Item::Field::Type::unsigned_int_8); this->_item.read( stream, "Result/Reason", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Reserved-3", Item::Field::Type::unsigned_int_8); std::vector sub_items; while(stream.tellg()-begin < item_length) { Item item; item.read(stream, "Item-type", Item::Field::Type::unsigned_int_8); std::string type; auto const & item_type = item.as_unsigned_int_8("Item-type"); if(item_type == 0x30) { type = "Abstract"; } else if(item_type == 0x40) { type = "Transfer"; } else { throw Exception("Invalid item"); } item.read(stream, "Reserved", Item::Field::Type::unsigned_int_8); item.read(stream, "Item-length", Item::Field::Type::unsigned_int_16); item.read( stream, type+"-syntax-name", Item::Field::Type::string, item.as_unsigned_int_16("Item-length")); sub_items.push_back(item); } this->_item.add("Abstract/Transfer Syntax Sub-Items", sub_items); } PresentationContext ::~PresentationContext() { // Nothing to do. } uint8_t PresentationContext ::get_item_type() const { return this->_item.as_unsigned_int_8("Item-type"); } uint8_t PresentationContext ::get_id() const { return this->_item.as_unsigned_int_8("Presentation-context-id"); } void PresentationContext ::set_id(uint8_t id) { this->_item.as_unsigned_int_8("Presentation-context-id") = id; } Item PresentationContext ::_make_string_item( std::string const & type, std::string const & value) { Item item; uint8_t item_type; if(type == "Abstract") { item_type = 0x30; } else if(type == "Transfer") { item_type = 0x40; } else { throw Exception("Unknown sub-item type"); } item.add("Item-type", item_type); item.add("Reserved", uint8_t(0)); item.add("Item-length", uint16_t(value.size())); item.add(type+"-syntax-name", value); return item; } void PresentationContext ::_add_fields() { this->_item.add("Item-type", uint8_t(0x0)); this->_item.add("Reserved-1", uint8_t(0)); this->_item.add("Item-length", uint16_t(0)); this->_item.add("Presentation-context-id", uint8_t(0)); this->_item.add("Reserved-2", uint8_t(0)); this->_item.add("Result/Reason", uint8_t(0)); this->_item.add("Reserved-3", uint8_t(0)); this->_item.add("Abstract/Transfer Syntax Sub-Items", std::vector()); } std::vector PresentationContext ::_get_syntaxes(std::string const & type) const { auto const & sub_items = this->_item.as_items( "Abstract/Transfer Syntax Sub-Items"); std::vector result; std::for_each( sub_items.begin(), sub_items.end(), [&type, &result](Item const & item) { uint8_t const item_type = (type=="Abstract")?0x30:0x40; if(item.as_unsigned_int_8("Item-type") == item_type) { auto const value = item.as_string(type+"-syntax-name"); result.push_back(value); } }); return result; } void PresentationContext ::_set_syntaxes( std::string const & type, std::vector const & syntaxes) { std::string const other_type = (type=="Abstract")?"Transfer":"Abstract"; auto const other_syntaxes = this->_get_syntaxes(other_type); auto & sub_items = this->_item.as_items( "Abstract/Transfer Syntax Sub-Items"); sub_items.resize(other_syntaxes.size()+syntaxes.size()); auto const & abstract_syntaxes = (type=="Abstract")?syntaxes:other_syntaxes; auto const & transfer_syntaxes = (type=="Abstract")?other_syntaxes:syntaxes; std::transform( abstract_syntaxes.begin(), abstract_syntaxes.end(), sub_items.begin(), [this](std::string const & name) { return PresentationContext::_make_string_item("Abstract", name); }); std::transform( transfer_syntaxes.begin(), transfer_syntaxes.end(), sub_items.begin()+abstract_syntaxes.size(), [this](std::string const & name) { return PresentationContext::_make_string_item("Transfer", name); }); this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } } } odil-0.11.0/src/odil/pdu/PresentationContext.h000066400000000000000000000035771362244656000212430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _30f1a581_9ae6_4a02_a455_bf2b6ea58bc6 #define _30f1a581_9ae6_4a02_a455_bf2b6ea58bc6 #include #include #include #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /** * @brief Presentation Context item, either for a A-ASSOCIATE-RQ PDU (PS 3.8, * 9.3.2.2) or for a A-ASSOCIATE-AC PDU (PS 3.8, 9.3.3.2). */ class ODIL_API PresentationContext: public Object { public: /// @brief Constructor PresentationContext(); /// @brief Read from a stream. PresentationContext(std::istream & stream); /// @brief Destructor, make the class pure virtual. virtual ~PresentationContext() =0; /// @brief Return the Item-type. uint8_t get_item_type() const; /// @brief Return the Presentation context id. uint8_t get_id() const; /// @brief Set the Presentation context id. void set_id(uint8_t id); protected: /// @brief Create an Abstract Syntax or Transfer Syntax sub-item. static Item _make_string_item( std::string const & type, std::string const & value); /// @brief Add common fields. void _add_fields(); /// @brief Return the Abstract or Transfer syntaxes. std::vector _get_syntaxes(std::string const & type) const; /// @brief Set the Abstract or Transfer syntaxes. void _set_syntaxes( std::string const & type, std::vector const & syntaxes); }; } } #endif // _30f1a581_9ae6_4a02_a455_bf2b6ea58bc6 odil-0.11.0/src/odil/pdu/PresentationContextAC.cpp000066400000000000000000000037001362244656000217660ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/PresentationContextAC.h" #include #include #include #include "odil/Exception.h" #include "odil/pdu/PresentationContext.h" namespace odil { namespace pdu { PresentationContextAC ::PresentationContextAC( uint8_t id, std::string const & transfer_syntax, uint8_t result_reason) { this->_add_fields(); this->_item.as_unsigned_int_8("Item-type") = 0x21; this->set_id(id); this->set_transfer_syntax(transfer_syntax); this->set_result_reason(result_reason); } PresentationContextAC ::PresentationContextAC(std::istream & stream) : PresentationContext(stream) { if(this->get_item_type() != 0x21) { throw Exception("Invalid item type"); } } PresentationContextAC ::~PresentationContextAC() { // Nothing to do. } uint8_t PresentationContextAC ::get_result_reason() const { return this->_item.as_unsigned_int_8("Result/Reason"); } void PresentationContextAC ::set_result_reason(uint8_t result_reason) { this->_item.as_unsigned_int_8("Result/Reason") = result_reason; } std::string PresentationContextAC ::get_transfer_syntax() const { auto const & syntaxes = this->_get_syntaxes("Transfer"); if(syntaxes.empty()) { throw Exception("No Transfer Syntax sub-item"); } else if(syntaxes.size() > 1) { throw Exception("Several Transfer Syntax sub-items"); } return syntaxes[0]; } void PresentationContextAC ::set_transfer_syntax(std::string const & transfer_syntax) { this->_set_syntaxes("Transfer", {transfer_syntax}); } } } odil-0.11.0/src/odil/pdu/PresentationContextAC.h000066400000000000000000000030061362244656000214320ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _69f1f7a9_d252_4ccd_a2d5_5df0ac4fb054 #define _69f1f7a9_d252_4ccd_a2d5_5df0ac4fb054 #include #include #include #include "odil/odil.h" #include "odil/pdu/PresentationContext.h" namespace odil { namespace pdu { /// @brief Presentation Context item for a A-ASSOCIATE-AC PDU (PS 3.8, 9.3.3.2). class ODIL_API PresentationContextAC: public PresentationContext { public: /// @brief Constructor. PresentationContextAC( uint8_t id, std::string const & transfer_syntax, uint8_t result_reason); /// @brief Read a Presentation Context from a stream. PresentationContextAC(std::istream & stream); /// @brief Destructor. ~PresentationContextAC(); /// @brief Return the Result/Reason. uint8_t get_result_reason() const; /// @brief Set the Result/Reason. void set_result_reason(uint8_t result_reason); /// @brief Return the Transfer Syntax. std::string get_transfer_syntax() const; /// @brief Set the Transfer Syntax. void set_transfer_syntax(std::string const & transfer_syntax); }; } } #endif // _69f1f7a9_d252_4ccd_a2d5_5df0ac4fb054 odil-0.11.0/src/odil/pdu/PresentationContextRQ.cpp000066400000000000000000000042471362244656000220340ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _952c6d4c_b331_4033_8476_5b0e75022b68 #define _952c6d4c_b331_4033_8476_5b0e75022b68 #include "odil/pdu/PresentationContextRQ.h" #include #include #include #include #include "odil/Exception.h" #include "odil/pdu/PresentationContext.h" namespace odil { namespace pdu { PresentationContextRQ ::PresentationContextRQ( uint8_t id, std::string const & abstract_syntax, std::vector const & transfer_syntaxes) { this->_add_fields(); this->_item.as_unsigned_int_8("Item-type") = 0x20; this->set_id(id); this->set_abstract_syntax(abstract_syntax); this->set_transfer_syntaxes(transfer_syntaxes); } PresentationContextRQ ::PresentationContextRQ(std::istream & stream) : PresentationContext(stream) { if(this->get_item_type() != 0x20) { throw Exception("Invalid item type"); } } PresentationContextRQ ::~PresentationContextRQ() { // Nothing to do. } std::string PresentationContextRQ ::get_abstract_syntax() const { auto const & syntaxes = this->_get_syntaxes("Abstract"); if(syntaxes.empty()) { throw Exception("No Abstract Syntax sub-item"); } else if(syntaxes.size() > 1) { throw Exception("Several Abstract Syntax sub-items"); } return syntaxes[0]; } void PresentationContextRQ ::set_abstract_syntax(std::string const & abstract_syntax) { this->_set_syntaxes("Abstract", {abstract_syntax}); } std::vector PresentationContextRQ ::get_transfer_syntaxes() const { return this->_get_syntaxes("Transfer"); } void PresentationContextRQ ::set_transfer_syntaxes(std::vector const & transfer_syntaxes) { this->_set_syntaxes("Transfer", transfer_syntaxes); } } } #endif // _952c6d4c_b331_4033_8476_5b0e75022b68 odil-0.11.0/src/odil/pdu/PresentationContextRQ.h000066400000000000000000000032141362244656000214720ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _e6e42ffd_7318_48f5_b35a_d44093564044 #define _e6e42ffd_7318_48f5_b35a_d44093564044 #include #include #include #include #include "odil/odil.h" #include "odil/pdu/PresentationContext.h" namespace odil { namespace pdu { /// @brief Presentation Context item for a A-ASSOCIATE-RQ PDU (PS 3.8, 9.3.2.2). class ODIL_API PresentationContextRQ: public PresentationContext { public: /// @brief Constructor. PresentationContextRQ( uint8_t id, std::string const & abstract_syntax, std::vector const & transfer_syntaxes); /// @brief Read a Presentation Context from a stream. PresentationContextRQ(std::istream & stream); /// @brief Destructor. ~PresentationContextRQ(); /// @brief Return the Abstract Syntax. std::string get_abstract_syntax() const; /// @brief Set the Abstract Syntax. void set_abstract_syntax(std::string const & abstract_syntax); /// @brief Return the Transfer Syntaxes. std::vector get_transfer_syntaxes() const; /// @brief Set the Transfer Syntax sub-items. void set_transfer_syntaxes( std::vector const & transfer_syntaxes); }; } } #endif // _e6e42ffd_7318_48f5_b35a_d44093564044 odil-0.11.0/src/odil/pdu/RoleSelection.cpp000066400000000000000000000054561362244656000203230ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/RoleSelection.h" #include #include #include #include "odil/Exception.h" #include "odil/pdu/Item.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { RoleSelection ::RoleSelection( std::string const & sop_class_uid, bool scu_role_support, bool scp_role_support) { this->_item.add("Item-type", this->type); this->_item.add("Reserved", uint8_t(0)); this->_item.add("Item-length", uint16_t(0)); this->_item.add("UID-length", uint16_t(0)); this->_item.add("SOP-class-uid", std::string()); this->_item.add("SCU-role", uint8_t(0)); this->_item.add("SCP-role", uint8_t(0)); this->set_sop_class_uid(sop_class_uid); this->set_scu_role_support(scu_role_support); this->set_scp_role_support(scp_role_support); } RoleSelection ::RoleSelection(std::istream & stream) { this->_item.read(stream, "Item-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("Item-type") != this->type) { throw Exception("Invalid item type"); } this->_item.read(stream, "Reserved", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Item-length", Item::Field::Type::unsigned_int_16); this->_item.read(stream, "UID-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "SOP-class-uid", Item::Field::Type::string, this->_item.as_unsigned_int_16("UID-length")); this->_item.read(stream, "SCU-role", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "SCP-role", Item::Field::Type::unsigned_int_8); } std::string const & RoleSelection ::get_sop_class_uid() const { return this->_item.as_string("SOP-class-uid"); } void RoleSelection ::set_sop_class_uid(std::string const & value) { this->_item.as_string("SOP-class-uid") = value; this->_item.as_unsigned_int_16("UID-length") = value.size(); this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } bool RoleSelection ::get_scu_role_support() const { return (this->_item.as_unsigned_int_8("SCU-role")!=0); } void RoleSelection ::set_scu_role_support(bool value) { this->_item.as_unsigned_int_8("SCU-role") = value?1:0; } bool RoleSelection ::get_scp_role_support() const { return (this->_item.as_unsigned_int_8("SCP-role")!=0); } void RoleSelection ::set_scp_role_support(bool value) { this->_item.as_unsigned_int_8("SCP-role") = value?1:0; } } } odil-0.11.0/src/odil/pdu/RoleSelection.h000066400000000000000000000035531362244656000177640ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _8a990556_f9c3_49f3_bb84_6e604ec9b8f4 #define _8a990556_f9c3_49f3_bb84_6e604ec9b8f4 #include #include #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /// @brief SCU/SCP Role Selection Sub-Item (PS 3.7, D.3.3.4.1 and D.3.3.4.2). class ODIL_API RoleSelection: public Object { public: /// @brief Item type. static uint8_t const type=0x54; /// @brief Create a Role Selection Sub-Item. RoleSelection( std::string const & sop_class_uid="", bool scu_role_support=false, bool scp_role_support=false); /// @brief Read a Role Selection Sub-Item from a stream. RoleSelection(std::istream & stream); /** * @brief Return the SOP class uid identifying the abstract syntax, * defaults to "". */ std::string const & get_sop_class_uid() const; /// @brief Set the SOP class uid identifying the abstract syntax. void set_sop_class_uid(std::string const & value); /// @brief Return whether the SCU role is supported, defaults to false. bool get_scu_role_support() const; /// @brief Set whether the SCP role is supported. void set_scu_role_support(bool value); /// @brief Return whether the SCP role is supported, defaults to false. bool get_scp_role_support() const; /// @brief Set whether the SCP role is supported. void set_scp_role_support(bool value); }; } } #endif // _8a990556_f9c3_49f3_bb84_6e604ec9b8f4 odil-0.11.0/src/odil/pdu/SOPClassCommonExtendedNegotiation.cpp000066400000000000000000000140551362244656000242310ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/SOPClassCommonExtendedNegotiation.h" #include #include #include #include #include "odil/Exception.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { SOPClassCommonExtendedNegotiation ::SOPClassCommonExtendedNegotiation( std::string const & sop_class_uid, std::string const & service_class_uid, std::vector const & related_general_sop_class_uids) { this->_item.add("Item-type", this->type); this->_item.add("Sub-item-version", uint8_t(0)); this->_item.add("Item-length", uint16_t(0)); this->_item.add("SOP-class-uid-length", uint16_t(0)); this->_item.add("SOP-class-uid", std::string()); this->_item.add("Service-class-uid-length", uint16_t(0)); this->_item.add("Service-class-uid", std::string()); this->_item.add( "Related-general-sop-class-identification-length", uint16_t(0)); this->_item.add( "Related-general-sop-class-identification", std::vector()); this->set_sop_class_uid(sop_class_uid); this->set_service_class_uid(service_class_uid); this->set_related_general_sop_class_uids(related_general_sop_class_uids); } SOPClassCommonExtendedNegotiation ::SOPClassCommonExtendedNegotiation(std::istream & stream) { this->_item.read(stream, "Item-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("Item-type") != this->type) { throw Exception("Invalid item type"); } this->_item.read( stream, "Sub-item-version", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Item-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "SOP-class-uid-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "SOP-class-uid", Item::Field::Type::string, this->_item.as_unsigned_int_16("SOP-class-uid-length")); this->_item.read( stream, "Service-class-uid-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "Service-class-uid", Item::Field::Type::string, this->_item.as_unsigned_int_16("Service-class-uid-length")); this->_item.read( stream, "Related-general-sop-class-identification-length", Item::Field::Type::unsigned_int_16); auto const related_classes_length = this->_item.as_unsigned_int_16( "Related-general-sop-class-identification-length"); auto const begin = stream.tellg(); std::vector sub_items; while(stream.tellg()-begin < related_classes_length) { Item item; item.read( stream, "Related-general-sop-class-uid-length", Item::Field::Type::unsigned_int_16); item.read( stream, "Related-general-sop-class-uid", Item::Field::Type::string, item.as_unsigned_int_16("Related-general-sop-class-uid-length")); sub_items.push_back(item); } this->_item.add("Related-general-sop-class-identification", sub_items); } bool SOPClassCommonExtendedNegotiation ::operator==(SOPClassCommonExtendedNegotiation const & other) const { return ( this->get_sop_class_uid() == other.get_sop_class_uid() && this->get_service_class_uid() == other.get_service_class_uid() && this->get_related_general_sop_class_uids() == other.get_related_general_sop_class_uids() ); } std::string const & SOPClassCommonExtendedNegotiation ::get_sop_class_uid() const { return this->_item.as_string("SOP-class-uid"); } void SOPClassCommonExtendedNegotiation ::set_sop_class_uid(std::string const & value) { this->_item.as_unsigned_int_16("SOP-class-uid-length") = value.size(); this->_item.as_string("SOP-class-uid") = value; this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } std::string const & SOPClassCommonExtendedNegotiation ::get_service_class_uid() const { return this->_item.as_string("Service-class-uid"); } void SOPClassCommonExtendedNegotiation ::set_service_class_uid(std::string const & value) { this->_item.as_unsigned_int_16("Service-class-uid-length") = value.size(); this->_item.as_string("Service-class-uid") = value; this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } std::vector SOPClassCommonExtendedNegotiation ::get_related_general_sop_class_uids() const { auto const & sub_items = this->_item.as_items( "Related-general-sop-class-identification"); std::vector result(sub_items.size()); std::transform( sub_items.begin(), sub_items.end(), result.begin(), [](Item const & item) { return item.as_string("Related-general-sop-class-uid"); }); return result; } void SOPClassCommonExtendedNegotiation ::set_related_general_sop_class_uids(std::vector const & value) { auto & sub_items = this->_item.as_items( "Related-general-sop-class-identification"); sub_items.resize(value.size()); uint16_t size=0; std::transform( value.begin(), value.end(), sub_items.begin(), [&size](std::string const & sop_class_uid) { Item item; item.add( "Related-general-sop-class-uid-length", uint16_t(sop_class_uid.size())); item.add("Related-general-sop-class-uid", sop_class_uid); size += (2+sop_class_uid.size()); return item; }); this->_item.as_unsigned_int_16( "Related-general-sop-class-identification-length") = size; this->_item.as_items( "Related-general-sop-class-identification") = sub_items; this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } } } odil-0.11.0/src/odil/pdu/SOPClassCommonExtendedNegotiation.h000066400000000000000000000041321362244656000236710ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _4182d886_9654_4ec2_8cd6_7f334f290e56 #define _4182d886_9654_4ec2_8cd6_7f334f290e56 #include #include #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /// @brief SOP Class Common Extended Negotiation sub-item (PS 3.7, D.3.3.6). class ODIL_API SOPClassCommonExtendedNegotiation: public Object { public: /// @brief Item type. static uint8_t const type=0x57; /// @brief Constructor. SOPClassCommonExtendedNegotiation( std::string const & sop_class_uid, std::string const & service_class_uid="", std::vector const & related_general_sop_class_uids=std::vector()); /// @brief Read a SOP Class Common Extended Negotiation from a stream. SOPClassCommonExtendedNegotiation(std::istream & stream); /// @brief Comparison. bool operator==(SOPClassCommonExtendedNegotiation const & other) const; /// @brief Return the SOP Class UID. std::string const & get_sop_class_uid() const; /// @brief Set the SOP Class UID. void set_sop_class_uid(std::string const & value); /// @brief Return the Service Class UID. std::string const & get_service_class_uid() const; /// @brief Set the Service Class UID (default to ""). void set_service_class_uid(std::string const & value); /// @brief Return the Related General SOP Class UIDs. std::vector get_related_general_sop_class_uids() const; /// @brief Set the Related General SOP Class UIDs (default to empty). void set_related_general_sop_class_uids( std::vector const & value); }; } } #endif // _4182d886_9654_4ec2_8cd6_7f334f290e56 odil-0.11.0/src/odil/pdu/SOPClassExtendedNegotiation.cpp000066400000000000000000000071461362244656000230630ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/SOPClassExtendedNegotiation.h" #include #include #include #include #include #include "odil/Exception.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { SOPClassExtendedNegotiation ::SOPClassExtendedNegotiation( std::string const & sop_class_uid, std::vector const & service_class_application_information) { this->_item.add("Item-type", this->type); this->_item.add("Reserved", uint8_t(0)); this->_item.add("Item-length", uint16_t(0)); this->_item.add("SOP-class-uid-length", uint16_t(0)); this->_item.add("SOP-class-uid", std::string()); this->_item.add("Service-class-application-information", std::string()); this->set_sop_class_uid(sop_class_uid); this->set_service_class_application_information( service_class_application_information); } SOPClassExtendedNegotiation ::SOPClassExtendedNegotiation(std::istream & stream) { this->_item.read(stream, "Item-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("Item-type") != this->type) { throw Exception("Invalid item type"); } this->_item.read(stream, "Reserved", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Item-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "SOP-class-uid-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "SOP-class-uid", Item::Field::Type::string, this->_item.as_unsigned_int_16("SOP-class-uid-length")); this->_item.read( stream, "Service-class-application-information", Item::Field::Type::string, this->_item.as_unsigned_int_16("Item-length") -this->_item.as_unsigned_int_16("SOP-class-uid-length") -2); } bool SOPClassExtendedNegotiation ::operator==(SOPClassExtendedNegotiation const & other) const { return ( this->get_sop_class_uid() == other.get_sop_class_uid() && this->get_service_class_application_information() == other.get_service_class_application_information() ); } std::string const & SOPClassExtendedNegotiation ::get_sop_class_uid() const { return this->_item.as_string("SOP-class-uid"); } void SOPClassExtendedNegotiation ::set_sop_class_uid(std::string const & value) { this->_item.as_unsigned_int_16("SOP-class-uid-length") = value.size(); this->_item.as_string("SOP-class-uid") = value; this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } std::vector SOPClassExtendedNegotiation ::get_service_class_application_information() const { auto const & string = this->_item.as_string( "Service-class-application-information"); std::vector result(string.size()); std::copy(string.begin(), string.end(), result.begin()); return result; } void SOPClassExtendedNegotiation ::set_service_class_application_information(std::vector const & value) { std::string string(value.size(), '\0'); std::copy(value.begin(), value.end(), string.begin()); this->_item.as_string("Service-class-application-information") = string; this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } } } odil-0.11.0/src/odil/pdu/SOPClassExtendedNegotiation.h000066400000000000000000000034371362244656000225270ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _6e3d351d_e5dc_4ab6_9c2d_8582e4fe2aa5 #define _6e3d351d_e5dc_4ab6_9c2d_8582e4fe2aa5 #include #include #include #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /// @brief SOP Class Extended Negotiation sub-item (PS 3.7, D.3.3.5). class ODIL_API SOPClassExtendedNegotiation: public Object { public: /// @brief Item type. static uint8_t const type=0x56; /// @brief Constructor. SOPClassExtendedNegotiation( std::string const & sop_class_uid, std::vector const & service_class_application_information); /// @brief Read a SOP Class Common Extended Negotiation from a stream. SOPClassExtendedNegotiation(std::istream & stream); /// @brief Comparison. bool operator==(SOPClassExtendedNegotiation const & other) const; /// @brief Return the SOP Class UID. std::string const & get_sop_class_uid() const; /// @brief Set the SOP Class UID. void set_sop_class_uid(std::string const & value); /// @brief Return the Service Class Application Information. std::vector get_service_class_application_information() const; /// @brief Set the Service Class Application Information. void set_service_class_application_information( std::vector const & value); }; } } #endif // _6e3d351d_e5dc_4ab6_9c2d_8582e4fe2aa5 odil-0.11.0/src/odil/pdu/UserIdentityAC.cpp000066400000000000000000000040341362244656000203770ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/UserIdentityAC.h" #include #include #include #include "odil/Exception.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { UserIdentityAC ::UserIdentityAC(std::string const & server_response) { this->_item.add("Item-type", uint8_t(0x59)); this->_item.add("Reserved", uint8_t(0)); this->_item.add("Item-length", uint16_t(0)); this->_item.add("Server-response-length", uint16_t(0)); this->_item.add("Server-response", std::string("")); this->set_server_response(server_response); } UserIdentityAC ::UserIdentityAC(std::istream & stream) { this->_item.read(stream, "Item-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("Item-type") != 0x59) { throw Exception("Invalid item type"); } this->_item.read(stream, "Reserved", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Item-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "Server-response-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "Server-response", Item::Field::Type::string, this->_item.as_unsigned_int_16("Server-response-length")); } std::string const & UserIdentityAC ::get_server_response() const { return this->_item.as_string("Server-response"); } void UserIdentityAC ::set_server_response(std::string const & value) { this->_item.as_unsigned_int_16("Server-response-length") = value.size(); this->_item.as_string("Server-response") = value; this->_item.as_unsigned_int_16("Item-length") = 2+this->get_server_response().size(); } } } odil-0.11.0/src/odil/pdu/UserIdentityAC.h000066400000000000000000000023721362244656000200470ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _1c3d6b3c_09a0_4452_9263_aa010ee1d973 #define _1c3d6b3c_09a0_4452_9263_aa010ee1d973 #include #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /// @brief User Identity Sub-Item Structure (A-ASSOCIATE-AC) (PS 3.7, D.3.3.7.2). class ODIL_API UserIdentityAC: public Object { public: /// @brief Item type. static uint8_t const type=0x59; /// @brief Create an User Identity. UserIdentityAC(std::string const & server_response=""); /// @brief Read an User Identity from a stream. UserIdentityAC(std::istream & stream); /// @brief Return the server response. std::string const & get_server_response() const; /// @brief Set the server response. void set_server_response(std::string const & value); }; } } #endif // _1c3d6b3c_09a0_4452_9263_aa010ee1d973 odil-0.11.0/src/odil/pdu/UserIdentityRQ.cpp000066400000000000000000000104671362244656000204450ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/UserIdentityRQ.h" #include #include #include #include "odil/Exception.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { UserIdentityRQ ::UserIdentityRQ() { this->_item.add("Item-type", uint8_t(0x58)); this->_item.add("Reserved", uint8_t(0)); this->_item.add("Item-length", uint16_t(0)); this->_item.add("User-Identity-Type", uint8_t(1)); this->_item.add("Positive-response-requested", uint8_t(0)); this->_item.add("Primary-field-length", uint16_t(0)); this->_item.add("Primary-field", std::string("")); this->_item.add("Secondary-field-length", uint16_t(0)); this->_item.add("Secondary-field", std::string("")); this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } UserIdentityRQ ::UserIdentityRQ(std::istream & stream) { this->_item.read(stream, "Item-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("Item-type") != 0x58) { throw Exception("Invalid item type"); } this->_item.read(stream, "Reserved", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Item-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "User-Identity-Type", Item::Field::Type::unsigned_int_8); this->_item.read( stream, "Positive-response-requested", Item::Field::Type::unsigned_int_8); this->_item.read( stream, "Primary-field-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "Primary-field", Item::Field::Type::string, this->_item.as_unsigned_int_16("Primary-field-length")); this->_item.read( stream, "Secondary-field-length", Item::Field::Type::unsigned_int_16); this->_item.read( stream, "Secondary-field", Item::Field::Type::string, this->_item.as_unsigned_int_16("Secondary-field-length")); } uint8_t UserIdentityRQ ::get_type() const { return this->_item.as_unsigned_int_8("User-Identity-Type"); } void UserIdentityRQ ::set_type(uint8_t type) { this->_item.as_unsigned_int_8("User-Identity-Type") = type; } bool UserIdentityRQ ::get_positive_response_requested() const { return (this->_item.as_unsigned_int_8("Positive-response-requested") != 0); } void UserIdentityRQ ::set_positive_response_requested(bool value) { this->_item.as_unsigned_int_8("Positive-response-requested") = value?1:0; } std::string const & UserIdentityRQ ::get_primary_field() const { return this->_item.as_string("Primary-field"); } void UserIdentityRQ ::set_primary_field(std::string const & value) { this->_item.as_unsigned_int_16("Primary-field-length") = value.size(); this->_item.as_string("Primary-field") = value; this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } std::string const & UserIdentityRQ ::get_secondary_field() const { return this->_item.as_string("Secondary-field"); } void UserIdentityRQ ::set_secondary_field(std::string const & value) { this->_item.as_unsigned_int_16("Secondary-field-length") = value.size(); this->_item.as_string("Secondary-field") = value; this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } void UserIdentityRQ ::set_username(std::string const & username) { this->set_type(1); this->set_primary_field(username); this->set_secondary_field(""); } void UserIdentityRQ ::set_username_and_passcode( std::string const & username, std::string const & passcode) { this->set_type(2); this->set_primary_field(username); this->set_secondary_field(passcode); } void UserIdentityRQ ::set_kerberos_service_ticket(std::string const & ticket) { this->set_type(3); this->set_primary_field(ticket); this->set_secondary_field(""); } void UserIdentityRQ ::set_saml_assertion(std::string const & assertion) { this->set_type(4); this->set_primary_field(assertion); this->set_secondary_field(""); } } } odil-0.11.0/src/odil/pdu/UserIdentityRQ.h000066400000000000000000000041651362244656000201100ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _b935542d_12c9_4c81_963c_32b7996af777 #define _b935542d_12c9_4c81_963c_32b7996af777 #include #include #include #include "odil/odil.h" #include "odil/pdu/Object.h" namespace odil { namespace pdu { /// @brief User Identity Sub-Item Structure (A-ASSOCIATE-RQ) (PS 3.7, D.3.3.7.1). class ODIL_API UserIdentityRQ: public Object { public: /// @brief Item type. static uint8_t const type=0x58; /// @brief Create an User Identity. UserIdentityRQ(); /// @brief Read an User Identity from a stream. UserIdentityRQ(std::istream & stream); /// @brief Return the type of the User Identity. uint8_t get_type() const; /// @brief Set the type of the User Identity. void set_type(uint8_t type); /// @brief Return whether a positive response is requested. bool get_positive_response_requested() const; /// @brief Set whether a positive response is requested. void set_positive_response_requested(bool value); /// @brief Return the primary identity field. std::string const & get_primary_field() const; /// @brief Set the primary identity field. void set_primary_field(std::string const & value); /// @brief Return the secondary identity field. std::string const & get_secondary_field() const; /// @brief Set the secondary identity field. void set_secondary_field(std::string const & value); void set_username(std::string const & username); void set_username_and_passcode( std::string const & username, std::string const & passcode); void set_kerberos_service_ticket(std::string const & ticket); void set_saml_assertion(std::string const & assertion); }; } } #endif // _b935542d_12c9_4c81_963c_32b7996af777 odil-0.11.0/src/odil/pdu/UserInformation.cpp000066400000000000000000000123251362244656000206710ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/pdu/UserInformation.h" #include #include #include #include "odil/endian.h" #include "odil/Exception.h" #include "odil/logging.h" #include "odil/pdu/AsynchronousOperationsWindow.h" #include "odil/pdu/ImplementationClassUID.h" #include "odil/pdu/ImplementationVersionName.h" #include "odil/pdu/MaximumLength.h" #include "odil/pdu/Object.h" #include "odil/pdu/RoleSelection.h" #include "odil/pdu/SOPClassCommonExtendedNegotiation.h" #include "odil/pdu/SOPClassExtendedNegotiation.h" #include "odil/pdu/UserIdentityAC.h" #include "odil/pdu/UserIdentityRQ.h" namespace odil { namespace pdu { UserInformation ::UserInformation() { this->_item.add("Item-type", uint8_t(0x50)); this->_item.add("Reserved", uint8_t(0)); this->_item.add("Item-length", uint16_t(4)); this->_item.add("User-data", std::vector()); } UserInformation ::UserInformation(std::istream & stream) { this->_item.read(stream, "Item-type", Item::Field::Type::unsigned_int_8); if(this->_item.as_unsigned_int_8("Item-type") != 0x50) { throw Exception("Invalid item type"); } this->_item.read(stream, "Reserved", Item::Field::Type::unsigned_int_8); this->_item.read(stream, "Item-length", Item::Field::Type::unsigned_int_16); this->_item.add("User-data", std::vector()); auto const begin = stream.tellg(); auto const item_length = this->_item.as_unsigned_int_16("Item-length"); // Store sub-items so that all sub-items of a given type are adjacent, and // that their type is in growing order. std::vector maximum_length; std::vector implementation_class_uid; std::vector asynchronous_operation_window; std::vector role_selection; std::vector implementation_version_name; std::vector sop_class_extended_negotiation; std::vector sop_class_common_extended_negotiation; std::vector user_identity_rq; std::vector user_identity_ac; while(stream.tellg()-begin < item_length) { uint8_t const type = stream.peek(); if(type == 0x51) { maximum_length.emplace_back(stream); } else if(type == 0x52) { implementation_class_uid.emplace_back(stream); } else if(type == 0x53) { asynchronous_operation_window.emplace_back(stream); } else if(type == 0x54) { role_selection.emplace_back(stream); } else if(type == 0x55) { implementation_version_name.emplace_back(stream); } else if(type == 0x56) { sop_class_extended_negotiation.emplace_back(stream); } else if(type == 0x57) { sop_class_common_extended_negotiation.emplace_back(stream); } else if(type == 0x58) { user_identity_rq.emplace_back(stream); } else if(type == 0x59) { user_identity_ac.emplace_back(stream); } else { stream.ignore(2*sizeof(uint8_t)); // item type, reserved if(!stream.good()) { throw Exception("Could not skip sub-item header"); } uint16_t sub_item_length; stream.read( reinterpret_cast(&sub_item_length), sizeof(sub_item_length)); if(!stream.good()) { throw Exception("Could not read length"); } sub_item_length = big_endian_to_host(sub_item_length); ODIL_LOG(warning) << "Skipping unknown item with type " << std::hex << (unsigned int)type << std::dec << " " << "(" << sub_item_length << " byte" << (sub_item_length>1?"s":"") << ")"; if(sub_item_length > 0) { // CAUTION: using ignore could cause eofbit to be positioned and // change semantics of later calls. Read the sub-item instead; this // is sub-optimal but does not crash. std::string sub_item(sub_item_length, '\0'); stream.read(reinterpret_cast(&sub_item[0]), sub_item.size()); if(!stream.good()) { throw Exception("Could not skip sub-item"); } } } } this->set_sub_items(maximum_length); this->set_sub_items(implementation_class_uid); this->set_sub_items(role_selection); this->set_sub_items(implementation_version_name); this->set_sub_items(user_identity_rq); this->set_sub_items(user_identity_ac); } } } odil-0.11.0/src/odil/pdu/UserInformation.h000066400000000000000000000036001362244656000203320ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _7449339a_913f_4545_9846_311f055632c1 #define _7449339a_913f_4545_9846_311f055632c1 #include #include #include #include "odil/odil.h" #include "odil/pdu/MaximumLength.h" #include "odil/pdu/Object.h" #include "odil/pdu/UserIdentityAC.h" #include "odil/pdu/UserIdentityRQ.h" namespace odil { namespace pdu { /// @brief User Information Item Structure (PS 3.8, 9.3.2.3 and 9.3.3.3). class ODIL_API UserInformation: public Object { public: /// @brief Create a User Information item with no sub-items. UserInformation(); /// @brief Read a User Information item from a stream. UserInformation(std::istream & stream); /// @brief Return sub-items of given type. template std::vector get_sub_items() const; /// @brief Set a sequence of sub-items. template void set_sub_items(std::vector const & sub_item); /// @brief Delete sub-items of given type. template void delete_sub_items(); private: typedef std::vector Items; /// @brief Return the iterators to the sub items of given type. template std::vector _find_sub_items() const; /// @brief Return the iterators to the sub items of given type. template std::vector _find_sub_items(); }; } } #include "odil/pdu/UserInformation.txx" #endif // _7449339a_913f_4545_9846_311f055632c1 odil-0.11.0/src/odil/pdu/UserInformation.txx000066400000000000000000000076631362244656000207430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _bb325c55_d983_41e3_b6c4_e3b957baedba #define _bb325c55_d983_41e3_b6c4_e3b957baedba #include "odil/pdu/UserInformation.h" #include #include #include #include #include #include #include "odil/Exception.h" #include "odil/pdu/Item.h" #include "odil/pdu/MaximumLength.h" #include "odil/pdu/Object.h" #include "odil/pdu/UserIdentityAC.h" #include "odil/pdu/UserIdentityRQ.h" namespace odil { namespace pdu { template std::vector UserInformation ::get_sub_items() const { auto const iterators = this->_find_sub_items(); std::vector result; result.reserve(iterators.size()); std::transform( iterators.begin(), iterators.end(), std::back_inserter(result), [](Items::const_iterator const & it) { std::stringstream stream; stream << *it; return TObject(stream); } ); return result; } template void UserInformation ::set_sub_items(std::vector const & sub_items) { auto const & old_items = this->_item.as_items("User-data"); std::vector new_items; auto old_items_iterator = old_items.begin(); while(old_items_iterator != old_items.end() && old_items_iterator->as_unsigned_int_8("Item-type") < TObject::type) { new_items.push_back(*old_items_iterator); ++old_items_iterator; } std::transform( sub_items.begin(), sub_items.end(), std::back_inserter(new_items), [](Object const & object) { return object.get_item(); }); while(old_items_iterator != old_items.end() && old_items_iterator->as_unsigned_int_8("Item-type") == TObject::type) { ++old_items_iterator; } while(old_items_iterator != old_items.end()) { new_items.push_back(*old_items_iterator); ++old_items_iterator; } this->_item.as_items("User-data") = new_items; this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } template void UserInformation ::delete_sub_items() { auto const & old_items = this->_item.as_items("User-data"); std::vector new_items; std::copy_if( old_items.begin(), old_items.end(), std::back_inserter(new_items), [](Item const & item) { return item.as_unsigned_int_8("Item-type") != TObject::type; } ); this->_item.as_items("User-data") = new_items; this->_item.as_unsigned_int_16("Item-length") = this->_compute_length(); } template std::vector UserInformation ::_find_sub_items() const { std::vector result; auto const & sub_items = this->_item.as_items("User-data"); auto iterator = sub_items.begin(); for(; iterator != sub_items.end(); ++iterator) { if(iterator->as_unsigned_int_8("Item-type") == TObject::type) { result.push_back(iterator); } } return result; } template std::vector UserInformation ::_find_sub_items() { std::vector result; auto & sub_items = this->_item.as_items("User-data"); auto iterator = sub_items.begin(); for(; iterator != sub_items.end(); ++iterator) { if(iterator->as_unsigned_int_8("Item-type") == TObject::type) { result.push_back(iterator); } } return result; } } } #endif // _bb325c55_d983_41e3_b6c4_e3b957baedba odil-0.11.0/src/odil/registry.cpp000066400000000000000000002443231362244656000166320ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/registry.h" #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" #include "odil/UIDsDictionary.h" namespace odil { namespace registry { void update_0000(ElementsDictionary &, std::map &); void update_0002(ElementsDictionary &, std::map &); void update_0004(ElementsDictionary &, std::map &); void update_0008(ElementsDictionary &, std::map &); void update_0010(ElementsDictionary &, std::map &); void update_0012(ElementsDictionary &, std::map &); void update_0014(ElementsDictionary &, std::map &); void update_0016(ElementsDictionary &, std::map &); void update_0018(ElementsDictionary &, std::map &); void update_0020(ElementsDictionary &, std::map &); void update_misc(ElementsDictionary &, std::map &); void update_0022(ElementsDictionary &, std::map &); void update_0024(ElementsDictionary &, std::map &); void update_0028(ElementsDictionary &, std::map &); void update_0032(ElementsDictionary &, std::map &); void update_0034(ElementsDictionary &, std::map &); void update_0038(ElementsDictionary &, std::map &); void update_003a(ElementsDictionary &, std::map &); void update_0040(ElementsDictionary &, std::map &); void update_0042(ElementsDictionary &, std::map &); void update_0044(ElementsDictionary &, std::map &); void update_0046(ElementsDictionary &, std::map &); void update_0048(ElementsDictionary &, std::map &); void update_0050(ElementsDictionary &, std::map &); void update_0052(ElementsDictionary &, std::map &); void update_0054(ElementsDictionary &, std::map &); void update_0060(ElementsDictionary &, std::map &); void update_0062(ElementsDictionary &, std::map &); void update_0064(ElementsDictionary &, std::map &); void update_0066(ElementsDictionary &, std::map &); void update_0068(ElementsDictionary &, std::map &); void update_0070(ElementsDictionary &, std::map &); void update_0072(ElementsDictionary &, std::map &); void update_0074(ElementsDictionary &, std::map &); void update_0076(ElementsDictionary &, std::map &); void update_0078(ElementsDictionary &, std::map &); void update_0080(ElementsDictionary &, std::map &); void update_0082(ElementsDictionary &, std::map &); void update_0088(ElementsDictionary &, std::map &); void update_0100(ElementsDictionary &, std::map &); void update_0400(ElementsDictionary &, std::map &); void update_2000(ElementsDictionary &, std::map &); void update_2010(ElementsDictionary &, std::map &); void update_2020(ElementsDictionary &, std::map &); void update_2030(ElementsDictionary &, std::map &); void update_2040(ElementsDictionary &, std::map &); void update_2050(ElementsDictionary &, std::map &); void update_2100(ElementsDictionary &, std::map &); void update_2110(ElementsDictionary &, std::map &); void update_2120(ElementsDictionary &, std::map &); void update_2130(ElementsDictionary &, std::map &); void update_2200(ElementsDictionary &, std::map &); void update_3002(ElementsDictionary &, std::map &); void update_3004(ElementsDictionary &, std::map &); void update_3006(ElementsDictionary &, std::map &); void update_3008(ElementsDictionary &, std::map &); void update_300a(ElementsDictionary &, std::map &); void update_300c(ElementsDictionary &, std::map &); void update_300e(ElementsDictionary &, std::map &); void update_3010(ElementsDictionary &, std::map &); void update_4000(ElementsDictionary &, std::map &); void update_4008(ElementsDictionary &, std::map &); void update_4010(ElementsDictionary &, std::map &); void update_4ffe(ElementsDictionary &, std::map &); void update_5200(ElementsDictionary &, std::map &); void update_5400(ElementsDictionary &, std::map &); void update_5600(ElementsDictionary &, std::map &); void update_7fe0(ElementsDictionary &, std::map &); void update_fffa(ElementsDictionary &, std::map &); void update_fffc(ElementsDictionary &, std::map &); void update_fffe(ElementsDictionary &, std::map &); void update_uids_dictionary(UIDsDictionary & uids_dictionary) { uids_dictionary.emplace("1.2.840.10008.1.1", UIDsDictionaryEntry("Verification SOP Class", "VerificationSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.1.2", UIDsDictionaryEntry("Implicit VR Little Endian: Default Transfer Syntax for DICOM", "ImplicitVRLittleEndian", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.1", UIDsDictionaryEntry("Explicit VR Little Endian", "ExplicitVRLittleEndian", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.1.99", UIDsDictionaryEntry("Deflated Explicit VR Little Endian", "DeflatedExplicitVRLittleEndian", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.2", UIDsDictionaryEntry("Explicit VR Big Endian (Retired)", "ExplicitVRBigEndian_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.50", UIDsDictionaryEntry("JPEG Baseline (Process 1): Default Transfer Syntax for Lossy JPEG 8 Bit Image Compression", "JPEGBaselineProcess1", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.51", UIDsDictionaryEntry("JPEG Extended (Process 2 & 4): Default Transfer Syntax for Lossy JPEG 12 Bit Image Compression (Process 4 only)", "JPEGExtendedProcess24", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.52", UIDsDictionaryEntry("JPEG Extended (Process 3 & 5) (Retired)", "JPEGExtendedProcess35_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.53", UIDsDictionaryEntry("JPEG Spectral Selection, Non-Hierarchical (Process 6 & 8) (Retired)", "JPEGSpectralSelectionNonHierarchicalProcess68_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.54", UIDsDictionaryEntry("JPEG Spectral Selection, Non-Hierarchical (Process 7 & 9) (Retired)", "JPEGSpectralSelectionNonHierarchicalProcess79_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.55", UIDsDictionaryEntry("JPEG Full Progression, Non-Hierarchical (Process 10 & 12) (Retired)", "JPEGFullProgressionNonHierarchicalProcess1012_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.56", UIDsDictionaryEntry("JPEG Full Progression, Non-Hierarchical (Process 11 & 13) (Retired)", "JPEGFullProgressionNonHierarchicalProcess1113_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.57", UIDsDictionaryEntry("JPEG Lossless, Non-Hierarchical (Process 14)", "JPEGLosslessNonHierarchicalProcess14", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.58", UIDsDictionaryEntry("JPEG Lossless, Non-Hierarchical (Process 15) (Retired)", "JPEGLosslessNonHierarchicalProcess15_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.59", UIDsDictionaryEntry("JPEG Extended, Hierarchical (Process 16 & 18) (Retired)", "JPEGExtendedHierarchicalProcess1618_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.60", UIDsDictionaryEntry("JPEG Extended, Hierarchical (Process 17 & 19) (Retired)", "JPEGExtendedHierarchicalProcess1719_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.61", UIDsDictionaryEntry("JPEG Spectral Selection, Hierarchical (Process 20 & 22) (Retired)", "JPEGSpectralSelectionHierarchicalProcess2022_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.62", UIDsDictionaryEntry("JPEG Spectral Selection, Hierarchical (Process 21 & 23) (Retired)", "JPEGSpectralSelectionHierarchicalProcess2123_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.63", UIDsDictionaryEntry("JPEG Full Progression, Hierarchical (Process 24 & 26) (Retired)", "JPEGFullProgressionHierarchicalProcess2426_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.64", UIDsDictionaryEntry("JPEG Full Progression, Hierarchical (Process 25 & 27) (Retired)", "JPEGFullProgressionHierarchicalProcess2527_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.65", UIDsDictionaryEntry("JPEG Lossless, Hierarchical (Process 28) (Retired)", "JPEGLosslessHierarchicalProcess28_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.66", UIDsDictionaryEntry("JPEG Lossless, Hierarchical (Process 29) (Retired)", "JPEGLosslessHierarchicalProcess29_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.70", UIDsDictionaryEntry("JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression", "JPEGLosslessNonHierarchicalFirstOrderPredictionProcess14SelectionValue1", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.80", UIDsDictionaryEntry("JPEG-LS Lossless Image Compression", "JPEGLSLosslessImageCompression", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.81", UIDsDictionaryEntry("JPEG-LS Lossy (Near-Lossless) Image Compression", "JPEGLSLossyNearLosslessImageCompression", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.90", UIDsDictionaryEntry("JPEG 2000 Image Compression (Lossless Only)", "JPEG2000ImageCompressionLosslessOnly", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.91", UIDsDictionaryEntry("JPEG 2000 Image Compression", "JPEG2000ImageCompression", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.92", UIDsDictionaryEntry("JPEG 2000 Part 2 Multi-component Image Compression (Lossless Only)", "JPEG2000Part2MulticomponentImageCompressionLosslessOnly", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.93", UIDsDictionaryEntry("JPEG 2000 Part 2 Multi-component Image Compression", "JPEG2000Part2MulticomponentImageCompression", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.94", UIDsDictionaryEntry("JPIP Referenced", "JPIPReferenced", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.95", UIDsDictionaryEntry("JPIP Referenced Deflate", "JPIPReferencedDeflate", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.100", UIDsDictionaryEntry("MPEG2 Main Profile / Main Level", "MPEG2MainProfileMainLevel", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.101", UIDsDictionaryEntry("MPEG2 Main Profile / High Level", "MPEG2MainProfileHighLevel", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.102", UIDsDictionaryEntry("MPEG-4 AVC/H.264 High Profile / Level 4.1", "MPEG4AVCH264HighProfileLevel41", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.103", UIDsDictionaryEntry("MPEG-4 AVC/H.264 BD-compatible High Profile / Level 4.1", "MPEG4AVCH264BDcompatibleHighProfileLevel41", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.104", UIDsDictionaryEntry("MPEG-4 AVC/H.264 High Profile / Level 4.2 For 2D Video", "MPEG4AVCH264HighProfileLevel42For2DVideo", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.105", UIDsDictionaryEntry("MPEG-4 AVC/H.264 High Profile / Level 4.2 For 3D Video", "MPEG4AVCH264HighProfileLevel42For3DVideo", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.106", UIDsDictionaryEntry("MPEG-4 AVC/H.264 Stereo High Profile / Level 4.2", "MPEG4AVCH264StereoHighProfileLevel42", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.107", UIDsDictionaryEntry("HEVC/H.265 Main Profile / Level 5.1", "HEVCH265MainProfileLevel51", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.4.108", UIDsDictionaryEntry("HEVC/H.265 Main 10 Profile / Level 5.1", "HEVCH265Main10ProfileLevel51", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.5", UIDsDictionaryEntry("RLE Lossless", "RLELossless", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.6.1", UIDsDictionaryEntry("RFC 2557 MIME encapsulation (Retired)", "RFC2557MIMEencapsulation_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.6.2", UIDsDictionaryEntry("XML Encoding (Retired)", "XMLEncoding_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.7.1", UIDsDictionaryEntry("SMPTE ST 2110-20 Uncompressed Progressive Active Video", "SMPTEST211020UncompressedProgressiveActiveVideo", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.7.2", UIDsDictionaryEntry("SMPTE ST 2110-20 Uncompressed Interlaced Active Video", "SMPTEST211020UncompressedInterlacedActiveVideo", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.2.7.3", UIDsDictionaryEntry("SMPTE ST 2110-30 PCM Digital Audio", "SMPTEST211030PCMDigitalAudio", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.3.10", UIDsDictionaryEntry("Media Storage Directory Storage", "MediaStorageDirectoryStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.1.4.1.1", UIDsDictionaryEntry("Talairach Brain Atlas Frame of Reference", "TalairachBrainAtlasFrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.2", UIDsDictionaryEntry("SPM2 T1 Frame of Reference", "SPM2T1FrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.3", UIDsDictionaryEntry("SPM2 T2 Frame of Reference", "SPM2T2FrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.4", UIDsDictionaryEntry("SPM2 PD Frame of Reference", "SPM2PDFrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.5", UIDsDictionaryEntry("SPM2 EPI Frame of Reference", "SPM2EPIFrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.6", UIDsDictionaryEntry("SPM2 FIL T1 Frame of Reference", "SPM2FILT1FrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.7", UIDsDictionaryEntry("SPM2 PET Frame of Reference", "SPM2PETFrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.8", UIDsDictionaryEntry("SPM2 TRANSM Frame of Reference", "SPM2TRANSMFrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.9", UIDsDictionaryEntry("SPM2 SPECT Frame of Reference", "SPM2SPECTFrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.10", UIDsDictionaryEntry("SPM2 GRAY Frame of Reference", "SPM2GRAYFrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.11", UIDsDictionaryEntry("SPM2 WHITE Frame of Reference", "SPM2WHITEFrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.12", UIDsDictionaryEntry("SPM2 CSF Frame of Reference", "SPM2CSFFrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.13", UIDsDictionaryEntry("SPM2 BRAINMASK Frame of Reference", "SPM2BRAINMASKFrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.14", UIDsDictionaryEntry("SPM2 AVG305T1 Frame of Reference", "SPM2AVG305T1FrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.15", UIDsDictionaryEntry("SPM2 AVG152T1 Frame of Reference", "SPM2AVG152T1FrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.16", UIDsDictionaryEntry("SPM2 AVG152T2 Frame of Reference", "SPM2AVG152T2FrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.17", UIDsDictionaryEntry("SPM2 AVG152PD Frame of Reference", "SPM2AVG152PDFrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.1.18", UIDsDictionaryEntry("SPM2 SINGLESUBJT1 Frame of Reference", "SPM2SINGLESUBJT1FrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.2.1", UIDsDictionaryEntry("ICBM 452 T1 Frame of Reference", "ICBM452T1FrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.2.2", UIDsDictionaryEntry("ICBM Single Subject MRI Frame of Reference", "ICBMSingleSubjectMRIFrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.3.1", UIDsDictionaryEntry("IEC 61217 Fixed Coordinate System Frame of Reference", "IEC61217FixedCoordinateSystemFrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.4.3.2", UIDsDictionaryEntry("Standard Robotic-Arm Coordinate System Frame of Reference", "StandardRoboticArmCoordinateSystemFrameofReference", "Well-known frame of reference")); uids_dictionary.emplace("1.2.840.10008.1.5.1", UIDsDictionaryEntry("Hot Iron Color Palette SOP Instance", "HotIronColorPaletteSOPInstance", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.1.5.2", UIDsDictionaryEntry("PET Color Palette SOP Instance", "PETColorPaletteSOPInstance", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.1.5.3", UIDsDictionaryEntry("Hot Metal Blue Color Palette SOP Instance", "HotMetalBlueColorPaletteSOPInstance", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.1.5.4", UIDsDictionaryEntry("PET 20 Step Color Palette SOP Instance", "PET20StepColorPaletteSOPInstance", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.1.5.5", UIDsDictionaryEntry("Spring Color Palette SOP Instance", "SpringColorPaletteSOPInstance", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.1.5.6", UIDsDictionaryEntry("Summer Color Palette SOP Instance", "SummerColorPaletteSOPInstance", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.1.5.7", UIDsDictionaryEntry("Fall Color Palette SOP Instance", "FallColorPaletteSOPInstance", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.1.5.8", UIDsDictionaryEntry("Winter Color Palette SOP Instance", "WinterColorPaletteSOPInstance", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.1.9", UIDsDictionaryEntry("Basic Study Content Notification SOP Class (Retired)", "BasicStudyContentNotificationSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.1.20", UIDsDictionaryEntry("Papyrus 3 Implicit VR Little Endian (Retired)", "Papyrus3ImplicitVRLittleEndian_Retired", "Transfer Syntax")); uids_dictionary.emplace("1.2.840.10008.1.20.1", UIDsDictionaryEntry("Storage Commitment Push Model SOP Class", "StorageCommitmentPushModelSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.1.20.1.1", UIDsDictionaryEntry("Storage Commitment Push Model SOP Instance", "StorageCommitmentPushModelSOPInstance", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.1.20.2", UIDsDictionaryEntry("Storage Commitment Pull Model SOP Class (Retired)", "StorageCommitmentPullModelSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.1.20.2.1", UIDsDictionaryEntry("Storage Commitment Pull Model SOP Instance (Retired)", "StorageCommitmentPullModelSOPInstance_Retired", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.1.40", UIDsDictionaryEntry("Procedural Event Logging SOP Class", "ProceduralEventLoggingSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.1.40.1", UIDsDictionaryEntry("Procedural Event Logging SOP Instance", "ProceduralEventLoggingSOPInstance", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.1.42", UIDsDictionaryEntry("Substance Administration Logging SOP Class", "SubstanceAdministrationLoggingSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.1.42.1", UIDsDictionaryEntry("Substance Administration Logging SOP Instance", "SubstanceAdministrationLoggingSOPInstance", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.2.6.1", UIDsDictionaryEntry("DICOM UID Registry", "DICOMUIDRegistry", "DICOM UIDs as a Coding Scheme")); uids_dictionary.emplace("1.2.840.10008.2.16.4", UIDsDictionaryEntry("DICOM Controlled Terminology", "DICOMControlledTerminology", "Coding Scheme")); uids_dictionary.emplace("1.2.840.10008.2.16.5", UIDsDictionaryEntry("Adult Mouse Anatomy Ontology", "AdultMouseAnatomyOntology", "Coding Scheme")); uids_dictionary.emplace("1.2.840.10008.2.16.6", UIDsDictionaryEntry("Uberon Ontology", "UberonOntology", "Coding Scheme")); uids_dictionary.emplace("1.2.840.10008.2.16.7", UIDsDictionaryEntry("Integrated Taxonomic Information System (ITIS) Taxonomic Serial Number (TSN)", "IntegratedTaxonomicInformationSystemITISTaxonomicSerialNumberTSN", "Coding Scheme")); uids_dictionary.emplace("1.2.840.10008.2.16.8", UIDsDictionaryEntry("Mouse Genome Initiative (MGI)", "MouseGenomeInitiativeMGI", "Coding Scheme")); uids_dictionary.emplace("1.2.840.10008.2.16.9", UIDsDictionaryEntry("PubChem Compound CID", "PubChemCompoundCID", "Coding Scheme")); uids_dictionary.emplace("1.2.840.10008.2.16.10", UIDsDictionaryEntry("ICD-11", "ICD11", "Coding Scheme")); uids_dictionary.emplace("1.2.840.10008.2.16.11", UIDsDictionaryEntry("New York University Melanoma Clinical Cooperative Group", "NewYorkUniversityMelanomaClinicalCooperativeGroup", "Coding Scheme")); uids_dictionary.emplace("1.2.840.10008.2.16.12", UIDsDictionaryEntry("Mayo Clinic Non-radiological Images Specific Body Structure Anatomical Surface Region Guide", "MayoClinicNonradiologicalImagesSpecificBodyStructureAnatomicalSurfaceRegionGuide", "Coding Scheme")); uids_dictionary.emplace("1.2.840.10008.2.16.13", UIDsDictionaryEntry("Image Biomarker Standardisation Initiative", "ImageBiomarkerStandardisationInitiative", "Coding Scheme")); uids_dictionary.emplace("1.2.840.10008.2.16.14", UIDsDictionaryEntry("Radiomics Ontology", "RadiomicsOntology", "Coding Scheme")); uids_dictionary.emplace("1.2.840.10008.2.16.15", UIDsDictionaryEntry("RadElement", "RadElement", "Coding Scheme")); uids_dictionary.emplace("1.2.840.10008.3.1.1.1", UIDsDictionaryEntry("DICOM Application Context Name", "DICOMApplicationContextName", "Application Context Name")); uids_dictionary.emplace("1.2.840.10008.3.1.2.1.1", UIDsDictionaryEntry("Detached Patient Management SOP Class (Retired)", "DetachedPatientManagementSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.3.1.2.1.4", UIDsDictionaryEntry("Detached Patient Management Meta SOP Class (Retired)", "DetachedPatientManagementMetaSOPClass_Retired", "Meta SOP Class")); uids_dictionary.emplace("1.2.840.10008.3.1.2.2.1", UIDsDictionaryEntry("Detached Visit Management SOP Class (Retired)", "DetachedVisitManagementSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.3.1.2.3.1", UIDsDictionaryEntry("Detached Study Management SOP Class (Retired)", "DetachedStudyManagementSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.3.1.2.3.2", UIDsDictionaryEntry("Study Component Management SOP Class (Retired)", "StudyComponentManagementSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.3.1.2.3.3", UIDsDictionaryEntry("Modality Performed Procedure Step SOP Class", "ModalityPerformedProcedureStepSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.3.1.2.3.4", UIDsDictionaryEntry("Modality Performed Procedure Step Retrieve SOP Class", "ModalityPerformedProcedureStepRetrieveSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.3.1.2.3.5", UIDsDictionaryEntry("Modality Performed Procedure Step Notification SOP Class", "ModalityPerformedProcedureStepNotificationSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.3.1.2.5.1", UIDsDictionaryEntry("Detached Results Management SOP Class (Retired)", "DetachedResultsManagementSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.3.1.2.5.4", UIDsDictionaryEntry("Detached Results Management Meta SOP Class (Retired)", "DetachedResultsManagementMetaSOPClass_Retired", "Meta SOP Class")); uids_dictionary.emplace("1.2.840.10008.3.1.2.5.5", UIDsDictionaryEntry("Detached Study Management Meta SOP Class (Retired)", "DetachedStudyManagementMetaSOPClass_Retired", "Meta SOP Class")); uids_dictionary.emplace("1.2.840.10008.3.1.2.6.1", UIDsDictionaryEntry("Detached Interpretation Management SOP Class (Retired)", "DetachedInterpretationManagementSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.4.2", UIDsDictionaryEntry("Storage Service Class", "StorageServiceClass", "Service Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.1", UIDsDictionaryEntry("Basic Film Session SOP Class", "BasicFilmSessionSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.2", UIDsDictionaryEntry("Basic Film Box SOP Class", "BasicFilmBoxSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.4", UIDsDictionaryEntry("Basic Grayscale Image Box SOP Class", "BasicGrayscaleImageBoxSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.4.1", UIDsDictionaryEntry("Basic Color Image Box SOP Class", "BasicColorImageBoxSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.4.2", UIDsDictionaryEntry("Referenced Image Box SOP Class (Retired)", "ReferencedImageBoxSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.9", UIDsDictionaryEntry("Basic Grayscale Print Management Meta SOP Class", "BasicGrayscalePrintManagementMetaSOPClass", "Meta SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.9.1", UIDsDictionaryEntry("Referenced Grayscale Print Management Meta SOP Class (Retired)", "ReferencedGrayscalePrintManagementMetaSOPClass_Retired", "Meta SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.14", UIDsDictionaryEntry("Print Job SOP Class", "PrintJobSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.15", UIDsDictionaryEntry("Basic Annotation Box SOP Class", "BasicAnnotationBoxSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.16", UIDsDictionaryEntry("Printer SOP Class", "PrinterSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.16.376", UIDsDictionaryEntry("Printer Configuration Retrieval SOP Class", "PrinterConfigurationRetrievalSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.17", UIDsDictionaryEntry("Printer SOP Instance", "PrinterSOPInstance", "Well-known Printer SOP Instance")); uids_dictionary.emplace("1.2.840.10008.5.1.1.17.376", UIDsDictionaryEntry("Printer Configuration Retrieval SOP Instance", "PrinterConfigurationRetrievalSOPInstance", "Well-known Printer SOP Instance")); uids_dictionary.emplace("1.2.840.10008.5.1.1.18", UIDsDictionaryEntry("Basic Color Print Management Meta SOP Class", "BasicColorPrintManagementMetaSOPClass", "Meta SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.18.1", UIDsDictionaryEntry("Referenced Color Print Management Meta SOP Class (Retired)", "ReferencedColorPrintManagementMetaSOPClass_Retired", "Meta SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.22", UIDsDictionaryEntry("VOI LUT Box SOP Class", "VOILUTBoxSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.23", UIDsDictionaryEntry("Presentation LUT SOP Class", "PresentationLUTSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.24", UIDsDictionaryEntry("Image Overlay Box SOP Class (Retired)", "ImageOverlayBoxSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.24.1", UIDsDictionaryEntry("Basic Print Image Overlay Box SOP Class (Retired)", "BasicPrintImageOverlayBoxSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.25", UIDsDictionaryEntry("Print Queue SOP Instance (Retired)", "PrintQueueSOPInstance_Retired", "Well-known Print Queue SOP Instance")); uids_dictionary.emplace("1.2.840.10008.5.1.1.26", UIDsDictionaryEntry("Print Queue Management SOP Class (Retired)", "PrintQueueManagementSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.27", UIDsDictionaryEntry("Stored Print Storage SOP Class (Retired)", "StoredPrintStorageSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.29", UIDsDictionaryEntry("Hardcopy Grayscale Image Storage SOP Class (Retired)", "HardcopyGrayscaleImageStorageSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.30", UIDsDictionaryEntry("Hardcopy Color Image Storage SOP Class (Retired)", "HardcopyColorImageStorageSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.31", UIDsDictionaryEntry("Pull Print Request SOP Class (Retired)", "PullPrintRequestSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.32", UIDsDictionaryEntry("Pull Stored Print Management Meta SOP Class (Retired)", "PullStoredPrintManagementMetaSOPClass_Retired", "Meta SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.33", UIDsDictionaryEntry("Media Creation Management SOP Class UID", "MediaCreationManagementSOPClassUID", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.40", UIDsDictionaryEntry("Display System SOP Class", "DisplaySystemSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.1.40.1", UIDsDictionaryEntry("Display System SOP Instance", "DisplaySystemSOPInstance", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.1", UIDsDictionaryEntry("Computed Radiography Image Storage", "ComputedRadiographyImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.1.1", UIDsDictionaryEntry("Digital X-Ray Image Storage - For Presentation", "DigitalXRayImageStorageForPresentation", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.1.1.1", UIDsDictionaryEntry("Digital X-Ray Image Storage - For Processing", "DigitalXRayImageStorageForProcessing", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.1.2", UIDsDictionaryEntry("Digital Mammography X-Ray Image Storage - For Presentation", "DigitalMammographyXRayImageStorageForPresentation", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.1.2.1", UIDsDictionaryEntry("Digital Mammography X-Ray Image Storage - For Processing", "DigitalMammographyXRayImageStorageForProcessing", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.1.3", UIDsDictionaryEntry("Digital Intra-Oral X-Ray Image Storage - For Presentation", "DigitalIntraOralXRayImageStorageForPresentation", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.1.3.1", UIDsDictionaryEntry("Digital Intra-Oral X-Ray Image Storage - For Processing", "DigitalIntraOralXRayImageStorageForProcessing", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.2", UIDsDictionaryEntry("CT Image Storage", "CTImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.2.1", UIDsDictionaryEntry("Enhanced CT Image Storage", "EnhancedCTImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.2.2", UIDsDictionaryEntry("Legacy Converted Enhanced CT Image Storage", "LegacyConvertedEnhancedCTImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.3", UIDsDictionaryEntry("Ultrasound Multi-frame Image Storage (Retired)", "UltrasoundMultiframeImageStorage_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.3.1", UIDsDictionaryEntry("Ultrasound Multi-frame Image Storage", "UltrasoundMultiframeImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.4", UIDsDictionaryEntry("MR Image Storage", "MRImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.4.1", UIDsDictionaryEntry("Enhanced MR Image Storage", "EnhancedMRImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.4.2", UIDsDictionaryEntry("MR Spectroscopy Storage", "MRSpectroscopyStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.4.3", UIDsDictionaryEntry("Enhanced MR Color Image Storage", "EnhancedMRColorImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.4.4", UIDsDictionaryEntry("Legacy Converted Enhanced MR Image Storage", "LegacyConvertedEnhancedMRImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.5", UIDsDictionaryEntry("Nuclear Medicine Image Storage (Retired)", "NuclearMedicineImageStorage_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.6", UIDsDictionaryEntry("Ultrasound Image Storage (Retired)", "UltrasoundImageStorage_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.6.1", UIDsDictionaryEntry("Ultrasound Image Storage", "UltrasoundImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.6.2", UIDsDictionaryEntry("Enhanced US Volume Storage", "EnhancedUSVolumeStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.7", UIDsDictionaryEntry("Secondary Capture Image Storage", "SecondaryCaptureImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.7.1", UIDsDictionaryEntry("Multi-frame Single Bit Secondary Capture Image Storage", "MultiframeSingleBitSecondaryCaptureImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.7.2", UIDsDictionaryEntry("Multi-frame Grayscale Byte Secondary Capture Image Storage", "MultiframeGrayscaleByteSecondaryCaptureImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.7.3", UIDsDictionaryEntry("Multi-frame Grayscale Word Secondary Capture Image Storage", "MultiframeGrayscaleWordSecondaryCaptureImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.7.4", UIDsDictionaryEntry("Multi-frame True Color Secondary Capture Image Storage", "MultiframeTrueColorSecondaryCaptureImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.8", UIDsDictionaryEntry("Standalone Overlay Storage (Retired)", "StandaloneOverlayStorage_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.9", UIDsDictionaryEntry("Standalone Curve Storage (Retired)", "StandaloneCurveStorage_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.9.1", UIDsDictionaryEntry("Waveform Storage - Trial (Retired)", "WaveformStorageTrial_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.9.1.1", UIDsDictionaryEntry("12-lead ECG Waveform Storage", "TwelveleadECGWaveformStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.9.1.2", UIDsDictionaryEntry("General ECG Waveform Storage", "GeneralECGWaveformStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.9.1.3", UIDsDictionaryEntry("Ambulatory ECG Waveform Storage", "AmbulatoryECGWaveformStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.9.2.1", UIDsDictionaryEntry("Hemodynamic Waveform Storage", "HemodynamicWaveformStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.9.3.1", UIDsDictionaryEntry("Cardiac Electrophysiology Waveform Storage", "CardiacElectrophysiologyWaveformStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.9.4.1", UIDsDictionaryEntry("Basic Voice Audio Waveform Storage", "BasicVoiceAudioWaveformStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.9.4.2", UIDsDictionaryEntry("General Audio Waveform Storage", "GeneralAudioWaveformStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.9.5.1", UIDsDictionaryEntry("Arterial Pulse Waveform Storage", "ArterialPulseWaveformStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.9.6.1", UIDsDictionaryEntry("Respiratory Waveform Storage", "RespiratoryWaveformStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.10", UIDsDictionaryEntry("Standalone Modality LUT Storage (Retired)", "StandaloneModalityLUTStorage_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.11", UIDsDictionaryEntry("Standalone VOI LUT Storage (Retired)", "StandaloneVOILUTStorage_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.11.1", UIDsDictionaryEntry("Grayscale Softcopy Presentation State Storage", "GrayscaleSoftcopyPresentationStateStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.11.2", UIDsDictionaryEntry("Color Softcopy Presentation State Storage", "ColorSoftcopyPresentationStateStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.11.3", UIDsDictionaryEntry("Pseudo-Color Softcopy Presentation State Storage", "PseudoColorSoftcopyPresentationStateStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.11.4", UIDsDictionaryEntry("Blending Softcopy Presentation State Storage", "BlendingSoftcopyPresentationStateStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.11.5", UIDsDictionaryEntry("XA/XRF Grayscale Softcopy Presentation State Storage", "XAXRFGrayscaleSoftcopyPresentationStateStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.11.6", UIDsDictionaryEntry("Grayscale Planar MPR Volumetric Presentation State Storage", "GrayscalePlanarMPRVolumetricPresentationStateStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.11.7", UIDsDictionaryEntry("Compositing Planar MPR Volumetric Presentation State Storage", "CompositingPlanarMPRVolumetricPresentationStateStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.11.8", UIDsDictionaryEntry("Advanced Blending Presentation State Storage", "AdvancedBlendingPresentationStateStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.11.9", UIDsDictionaryEntry("Volume Rendering Volumetric Presentation State Storage", "VolumeRenderingVolumetricPresentationStateStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.11.10", UIDsDictionaryEntry("Segmented Volume Rendering Volumetric Presentation State Storage", "SegmentedVolumeRenderingVolumetricPresentationStateStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.11.11", UIDsDictionaryEntry("Multiple Volume Rendering Volumetric Presentation State Storage", "MultipleVolumeRenderingVolumetricPresentationStateStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.12.1", UIDsDictionaryEntry("X-Ray Angiographic Image Storage", "XRayAngiographicImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.12.1.1", UIDsDictionaryEntry("Enhanced XA Image Storage", "EnhancedXAImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.12.2", UIDsDictionaryEntry("X-Ray Radiofluoroscopic Image Storage", "XRayRadiofluoroscopicImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.12.2.1", UIDsDictionaryEntry("Enhanced XRF Image Storage", "EnhancedXRFImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.12.3", UIDsDictionaryEntry("X-Ray Angiographic Bi-Plane Image Storage (Retired)", "XRayAngiographicBiPlaneImageStorage_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.13.1.1", UIDsDictionaryEntry("X-Ray 3D Angiographic Image Storage", "XRay3DAngiographicImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.13.1.2", UIDsDictionaryEntry("X-Ray 3D Craniofacial Image Storage", "XRay3DCraniofacialImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.13.1.3", UIDsDictionaryEntry("Breast Tomosynthesis Image Storage", "BreastTomosynthesisImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.13.1.4", UIDsDictionaryEntry("Breast Projection X-Ray Image Storage - For Presentation", "BreastProjectionXRayImageStorageForPresentation", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.13.1.5", UIDsDictionaryEntry("Breast Projection X-Ray Image Storage - For Processing", "BreastProjectionXRayImageStorageForProcessing", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.14.1", UIDsDictionaryEntry("Intravascular Optical Coherence Tomography Image Storage - For Presentation", "IntravascularOpticalCoherenceTomographyImageStorageForPresentation", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.14.2", UIDsDictionaryEntry("Intravascular Optical Coherence Tomography Image Storage - For Processing", "IntravascularOpticalCoherenceTomographyImageStorageForProcessing", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.20", UIDsDictionaryEntry("Nuclear Medicine Image Storage", "NuclearMedicineImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.30", UIDsDictionaryEntry("Parametric Map Storage", "ParametricMapStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.66", UIDsDictionaryEntry("Raw Data Storage", "RawDataStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.66.1", UIDsDictionaryEntry("Spatial Registration Storage", "SpatialRegistrationStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.66.2", UIDsDictionaryEntry("Spatial Fiducials Storage", "SpatialFiducialsStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.66.3", UIDsDictionaryEntry("Deformable Spatial Registration Storage", "DeformableSpatialRegistrationStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.66.4", UIDsDictionaryEntry("Segmentation Storage", "SegmentationStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.66.5", UIDsDictionaryEntry("Surface Segmentation Storage", "SurfaceSegmentationStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.66.6", UIDsDictionaryEntry("Tractography Results Storage", "TractographyResultsStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.67", UIDsDictionaryEntry("Real World Value Mapping Storage", "RealWorldValueMappingStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.68.1", UIDsDictionaryEntry("Surface Scan Mesh Storage", "SurfaceScanMeshStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.68.2", UIDsDictionaryEntry("Surface Scan Point Cloud Storage", "SurfaceScanPointCloudStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1", UIDsDictionaryEntry("VL Image Storage - Trial (Retired)", "VLImageStorageTrial_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.2", UIDsDictionaryEntry("VL Multi-frame Image Storage - Trial (Retired)", "VLMultiframeImageStorageTrial_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.1", UIDsDictionaryEntry("VL Endoscopic Image Storage", "VLEndoscopicImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.1.1", UIDsDictionaryEntry("Video Endoscopic Image Storage", "VideoEndoscopicImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.2", UIDsDictionaryEntry("VL Microscopic Image Storage", "VLMicroscopicImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.2.1", UIDsDictionaryEntry("Video Microscopic Image Storage", "VideoMicroscopicImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.3", UIDsDictionaryEntry("VL Slide-Coordinates Microscopic Image Storage", "VLSlideCoordinatesMicroscopicImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.4", UIDsDictionaryEntry("VL Photographic Image Storage", "VLPhotographicImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.4.1", UIDsDictionaryEntry("Video Photographic Image Storage", "VideoPhotographicImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.5.1", UIDsDictionaryEntry("Ophthalmic Photography 8 Bit Image Storage", "OphthalmicPhotography8BitImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.5.2", UIDsDictionaryEntry("Ophthalmic Photography 16 Bit Image Storage", "OphthalmicPhotography16BitImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.5.3", UIDsDictionaryEntry("Stereometric Relationship Storage", "StereometricRelationshipStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.5.4", UIDsDictionaryEntry("Ophthalmic Tomography Image Storage", "OphthalmicTomographyImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.5.5", UIDsDictionaryEntry("Wide Field Ophthalmic Photography Stereographic Projection Image Storage", "WideFieldOphthalmicPhotographyStereographicProjectionImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.5.6", UIDsDictionaryEntry("Wide Field Ophthalmic Photography 3D Coordinates Image Storage", "WideFieldOphthalmicPhotography3DCoordinatesImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.5.7", UIDsDictionaryEntry("Ophthalmic Optical Coherence Tomography En Face Image Storage", "OphthalmicOpticalCoherenceTomographyEnFaceImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.5.8", UIDsDictionaryEntry("Ophthalmic Optical Coherence Tomography B-scan Volume Analysis Storage", "OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.77.1.6", UIDsDictionaryEntry("VL Whole Slide Microscopy Image Storage", "VLWholeSlideMicroscopyImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.78.1", UIDsDictionaryEntry("Lensometry Measurements Storage", "LensometryMeasurementsStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.78.2", UIDsDictionaryEntry("Autorefraction Measurements Storage", "AutorefractionMeasurementsStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.78.3", UIDsDictionaryEntry("Keratometry Measurements Storage", "KeratometryMeasurementsStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.78.4", UIDsDictionaryEntry("Subjective Refraction Measurements Storage", "SubjectiveRefractionMeasurementsStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.78.5", UIDsDictionaryEntry("Visual Acuity Measurements Storage", "VisualAcuityMeasurementsStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.78.6", UIDsDictionaryEntry("Spectacle Prescription Report Storage", "SpectaclePrescriptionReportStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.78.7", UIDsDictionaryEntry("Ophthalmic Axial Measurements Storage", "OphthalmicAxialMeasurementsStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.78.8", UIDsDictionaryEntry("Intraocular Lens Calculations Storage", "IntraocularLensCalculationsStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.79.1", UIDsDictionaryEntry("Macular Grid Thickness and Volume Report Storage", "MacularGridThicknessandVolumeReportStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.80.1", UIDsDictionaryEntry("Ophthalmic Visual Field Static Perimetry Measurements Storage", "OphthalmicVisualFieldStaticPerimetryMeasurementsStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.81.1", UIDsDictionaryEntry("Ophthalmic Thickness Map Storage", "OphthalmicThicknessMapStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.82.1", UIDsDictionaryEntry("Corneal Topography Map Storage", "CornealTopographyMapStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.1", UIDsDictionaryEntry("Text SR Storage - Trial (Retired)", "TextSRStorageTrial_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.2", UIDsDictionaryEntry("Audio SR Storage - Trial (Retired)", "AudioSRStorageTrial_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.3", UIDsDictionaryEntry("Detail SR Storage - Trial (Retired)", "DetailSRStorageTrial_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.4", UIDsDictionaryEntry("Comprehensive SR Storage - Trial (Retired)", "ComprehensiveSRStorageTrial_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.11", UIDsDictionaryEntry("Basic Text SR Storage", "BasicTextSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.22", UIDsDictionaryEntry("Enhanced SR Storage", "EnhancedSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.33", UIDsDictionaryEntry("Comprehensive SR Storage", "ComprehensiveSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.34", UIDsDictionaryEntry("Comprehensive 3D SR Storage", "Comprehensive3DSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.35", UIDsDictionaryEntry("Extensible SR Storage", "ExtensibleSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.40", UIDsDictionaryEntry("Procedure Log Storage", "ProcedureLogStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.50", UIDsDictionaryEntry("Mammography CAD SR Storage", "MammographyCADSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.59", UIDsDictionaryEntry("Key Object Selection Document Storage", "KeyObjectSelectionDocumentStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.65", UIDsDictionaryEntry("Chest CAD SR Storage", "ChestCADSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.67", UIDsDictionaryEntry("X-Ray Radiation Dose SR Storage", "XRayRadiationDoseSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.68", UIDsDictionaryEntry("Radiopharmaceutical Radiation Dose SR Storage", "RadiopharmaceuticalRadiationDoseSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.69", UIDsDictionaryEntry("Colon CAD SR Storage", "ColonCADSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.70", UIDsDictionaryEntry("Implantation Plan SR Storage", "ImplantationPlanSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.71", UIDsDictionaryEntry("Acquisition Context SR Storage", "AcquisitionContextSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.72", UIDsDictionaryEntry("Simplified Adult Echo SR Storage", "SimplifiedAdultEchoSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.73", UIDsDictionaryEntry("Patient Radiation Dose SR Storage", "PatientRadiationDoseSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.74", UIDsDictionaryEntry("Planned Imaging Agent Administration SR Storage", "PlannedImagingAgentAdministrationSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.88.75", UIDsDictionaryEntry("Performed Imaging Agent Administration SR Storage", "PerformedImagingAgentAdministrationSRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.90.1", UIDsDictionaryEntry("Content Assessment Results Storage", "ContentAssessmentResultsStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.104.1", UIDsDictionaryEntry("Encapsulated PDF Storage", "EncapsulatedPDFStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.104.2", UIDsDictionaryEntry("Encapsulated CDA Storage", "EncapsulatedCDAStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.104.3", UIDsDictionaryEntry("Encapsulated STL Storage", "EncapsulatedSTLStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.104.4", UIDsDictionaryEntry("Encapsulated OBJ Storage", "EncapsulatedOBJStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.104.5", UIDsDictionaryEntry("Encapsulated MTL Storage", "EncapsulatedMTLStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.128", UIDsDictionaryEntry("Positron Emission Tomography Image Storage", "PositronEmissionTomographyImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.128.1", UIDsDictionaryEntry("Legacy Converted Enhanced PET Image Storage", "LegacyConvertedEnhancedPETImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.129", UIDsDictionaryEntry("Standalone PET Curve Storage (Retired)", "StandalonePETCurveStorage_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.130", UIDsDictionaryEntry("Enhanced PET Image Storage", "EnhancedPETImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.131", UIDsDictionaryEntry("Basic Structured Display Storage", "BasicStructuredDisplayStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.200.1", UIDsDictionaryEntry("CT Defined Procedure Protocol Storage", "CTDefinedProcedureProtocolStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.200.2", UIDsDictionaryEntry("CT Performed Procedure Protocol Storage", "CTPerformedProcedureProtocolStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.200.3", UIDsDictionaryEntry("Protocol Approval Storage", "ProtocolApprovalStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.200.4", UIDsDictionaryEntry("Protocol Approval Information Model - FIND", "ProtocolApprovalInformationModelFIND", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.200.5", UIDsDictionaryEntry("Protocol Approval Information Model - MOVE", "ProtocolApprovalInformationModelMOVE", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.200.6", UIDsDictionaryEntry("Protocol Approval Information Model - GET", "ProtocolApprovalInformationModelGET", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.1", UIDsDictionaryEntry("RT Image Storage", "RTImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.2", UIDsDictionaryEntry("RT Dose Storage", "RTDoseStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.3", UIDsDictionaryEntry("RT Structure Set Storage", "RTStructureSetStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.4", UIDsDictionaryEntry("RT Beams Treatment Record Storage", "RTBeamsTreatmentRecordStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.5", UIDsDictionaryEntry("RT Plan Storage", "RTPlanStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.6", UIDsDictionaryEntry("RT Brachy Treatment Record Storage", "RTBrachyTreatmentRecordStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.7", UIDsDictionaryEntry("RT Treatment Summary Record Storage", "RTTreatmentSummaryRecordStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.8", UIDsDictionaryEntry("RT Ion Plan Storage", "RTIonPlanStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.9", UIDsDictionaryEntry("RT Ion Beams Treatment Record Storage", "RTIonBeamsTreatmentRecordStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.10", UIDsDictionaryEntry("RT Physician Intent Storage", "RTPhysicianIntentStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.11", UIDsDictionaryEntry("RT Segment Annotation Storage", "RTSegmentAnnotationStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.12", UIDsDictionaryEntry("RT Radiation Set Storage", "RTRadiationSetStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.13", UIDsDictionaryEntry("C-Arm Photon-Electron Radiation Storage", "CArmPhotonElectronRadiationStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.14", UIDsDictionaryEntry("Tomotherapeutic Radiation Storage", "TomotherapeuticRadiationStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.481.15", UIDsDictionaryEntry("Robotic-Arm Radiation Storage", "RoboticArmRadiationStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.501.1", UIDsDictionaryEntry("DICOS CT Image Storage", "DICOSCTImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.501.2.1", UIDsDictionaryEntry("DICOS Digital X-Ray Image Storage - For Presentation", "DICOSDigitalXRayImageStorageForPresentation", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.501.2.2", UIDsDictionaryEntry("DICOS Digital X-Ray Image Storage - For Processing", "DICOSDigitalXRayImageStorageForProcessing", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.501.3", UIDsDictionaryEntry("DICOS Threat Detection Report Storage", "DICOSThreatDetectionReportStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.501.4", UIDsDictionaryEntry("DICOS 2D AIT Storage", "DICOS2DAITStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.501.5", UIDsDictionaryEntry("DICOS 3D AIT Storage", "DICOS3DAITStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.501.6", UIDsDictionaryEntry("DICOS Quadrupole Resonance (QR) Storage", "DICOSQuadrupoleResonanceQRStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.601.1", UIDsDictionaryEntry("Eddy Current Image Storage", "EddyCurrentImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.1.601.2", UIDsDictionaryEntry("Eddy Current Multi-frame Image Storage", "EddyCurrentMultiframeImageStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.2.1.1", UIDsDictionaryEntry("Patient Root Query/Retrieve Information Model - FIND", "PatientRootQueryRetrieveInformationModelFIND", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.2.1.2", UIDsDictionaryEntry("Patient Root Query/Retrieve Information Model - MOVE", "PatientRootQueryRetrieveInformationModelMOVE", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.2.1.3", UIDsDictionaryEntry("Patient Root Query/Retrieve Information Model - GET", "PatientRootQueryRetrieveInformationModelGET", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.2.2.1", UIDsDictionaryEntry("Study Root Query/Retrieve Information Model - FIND", "StudyRootQueryRetrieveInformationModelFIND", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.2.2.2", UIDsDictionaryEntry("Study Root Query/Retrieve Information Model - MOVE", "StudyRootQueryRetrieveInformationModelMOVE", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.2.2.3", UIDsDictionaryEntry("Study Root Query/Retrieve Information Model - GET", "StudyRootQueryRetrieveInformationModelGET", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.2.3.1", UIDsDictionaryEntry("Patient/Study Only Query/Retrieve Information Model - FIND (Retired)", "PatientStudyOnlyQueryRetrieveInformationModelFIND_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.2.3.2", UIDsDictionaryEntry("Patient/Study Only Query/Retrieve Information Model - MOVE (Retired)", "PatientStudyOnlyQueryRetrieveInformationModelMOVE_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.2.3.3", UIDsDictionaryEntry("Patient/Study Only Query/Retrieve Information Model - GET (Retired)", "PatientStudyOnlyQueryRetrieveInformationModelGET_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.2.4.2", UIDsDictionaryEntry("Composite Instance Root Retrieve - MOVE", "CompositeInstanceRootRetrieveMOVE", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.2.4.3", UIDsDictionaryEntry("Composite Instance Root Retrieve - GET", "CompositeInstanceRootRetrieveGET", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.1.2.5.3", UIDsDictionaryEntry("Composite Instance Retrieve Without Bulk Data - GET", "CompositeInstanceRetrieveWithoutBulkDataGET", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.20.1", UIDsDictionaryEntry("Defined Procedure Protocol Information Model - FIND", "DefinedProcedureProtocolInformationModelFIND", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.20.2", UIDsDictionaryEntry("Defined Procedure Protocol Information Model - MOVE", "DefinedProcedureProtocolInformationModelMOVE", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.20.3", UIDsDictionaryEntry("Defined Procedure Protocol Information Model - GET", "DefinedProcedureProtocolInformationModelGET", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.31", UIDsDictionaryEntry("Modality Worklist Information Model - FIND", "ModalityWorklistInformationModelFIND", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.32", UIDsDictionaryEntry("General Purpose Worklist Management Meta SOP Class (Retired)", "GeneralPurposeWorklistManagementMetaSOPClass_Retired", "Meta SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.32.1", UIDsDictionaryEntry("General Purpose Worklist Information Model - FIND (Retired)", "GeneralPurposeWorklistInformationModelFIND_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.32.2", UIDsDictionaryEntry("General Purpose Scheduled Procedure Step SOP Class (Retired)", "GeneralPurposeScheduledProcedureStepSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.32.3", UIDsDictionaryEntry("General Purpose Performed Procedure Step SOP Class (Retired)", "GeneralPurposePerformedProcedureStepSOPClass_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.33", UIDsDictionaryEntry("Instance Availability Notification SOP Class", "InstanceAvailabilityNotificationSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.1", UIDsDictionaryEntry("RT Beams Delivery Instruction Storage - Trial (Retired)", "RTBeamsDeliveryInstructionStorageTrial_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.2", UIDsDictionaryEntry("RT Conventional Machine Verification - Trial (Retired)", "RTConventionalMachineVerificationTrial_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.3", UIDsDictionaryEntry("RT Ion Machine Verification - Trial (Retired)", "RTIonMachineVerificationTrial_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.4", UIDsDictionaryEntry("Unified Worklist and Procedure Step Service Class - Trial (Retired)", "UnifiedWorklistandProcedureStepServiceClassTrial_Retired", "Service Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.4.1", UIDsDictionaryEntry("Unified Procedure Step - Push SOP Class - Trial (Retired)", "UnifiedProcedureStepPushSOPClassTrial_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.4.2", UIDsDictionaryEntry("Unified Procedure Step - Watch SOP Class - Trial (Retired)", "UnifiedProcedureStepWatchSOPClassTrial_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.4.3", UIDsDictionaryEntry("Unified Procedure Step - Pull SOP Class - Trial (Retired)", "UnifiedProcedureStepPullSOPClassTrial_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.4.4", UIDsDictionaryEntry("Unified Procedure Step - Event SOP Class - Trial (Retired)", "UnifiedProcedureStepEventSOPClassTrial_Retired", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.5", UIDsDictionaryEntry("UPS Global Subscription SOP Instance", "UPSGlobalSubscriptionSOPInstance", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.5.1", UIDsDictionaryEntry("UPS Filtered Global Subscription SOP Instance", "UPSFilteredGlobalSubscriptionSOPInstance", "Well-known SOP Instance")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.6", UIDsDictionaryEntry("Unified Worklist and Procedure Step Service Class", "UnifiedWorklistandProcedureStepServiceClass", "Service Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.6.1", UIDsDictionaryEntry("Unified Procedure Step - Push SOP Class", "UnifiedProcedureStepPushSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.6.2", UIDsDictionaryEntry("Unified Procedure Step - Watch SOP Class", "UnifiedProcedureStepWatchSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.6.3", UIDsDictionaryEntry("Unified Procedure Step - Pull SOP Class", "UnifiedProcedureStepPullSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.6.4", UIDsDictionaryEntry("Unified Procedure Step - Event SOP Class", "UnifiedProcedureStepEventSOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.6.5", UIDsDictionaryEntry("Unified Procedure Step - Query SOP Class", "UnifiedProcedureStepQuerySOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.7", UIDsDictionaryEntry("RT Beams Delivery Instruction Storage", "RTBeamsDeliveryInstructionStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.8", UIDsDictionaryEntry("RT Conventional Machine Verification", "RTConventionalMachineVerification", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.9", UIDsDictionaryEntry("RT Ion Machine Verification", "RTIonMachineVerification", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.34.10", UIDsDictionaryEntry("RT Brachy Application Setup Delivery Instruction Storage", "RTBrachyApplicationSetupDeliveryInstructionStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.37.1", UIDsDictionaryEntry("General Relevant Patient Information Query", "GeneralRelevantPatientInformationQuery", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.37.2", UIDsDictionaryEntry("Breast Imaging Relevant Patient Information Query", "BreastImagingRelevantPatientInformationQuery", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.37.3", UIDsDictionaryEntry("Cardiac Relevant Patient Information Query", "CardiacRelevantPatientInformationQuery", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.38.1", UIDsDictionaryEntry("Hanging Protocol Storage", "HangingProtocolStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.38.2", UIDsDictionaryEntry("Hanging Protocol Information Model - FIND", "HangingProtocolInformationModelFIND", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.38.3", UIDsDictionaryEntry("Hanging Protocol Information Model - MOVE", "HangingProtocolInformationModelMOVE", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.38.4", UIDsDictionaryEntry("Hanging Protocol Information Model - GET", "HangingProtocolInformationModelGET", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.39.1", UIDsDictionaryEntry("Color Palette Storage", "ColorPaletteStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.39.2", UIDsDictionaryEntry("Color Palette Query/Retrieve Information Model - FIND", "ColorPaletteQueryRetrieveInformationModelFIND", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.39.3", UIDsDictionaryEntry("Color Palette Query/Retrieve Information Model - MOVE", "ColorPaletteQueryRetrieveInformationModelMOVE", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.39.4", UIDsDictionaryEntry("Color Palette Query/Retrieve Information Model - GET", "ColorPaletteQueryRetrieveInformationModelGET", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.41", UIDsDictionaryEntry("Product Characteristics Query SOP Class", "ProductCharacteristicsQuerySOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.42", UIDsDictionaryEntry("Substance Approval Query SOP Class", "SubstanceApprovalQuerySOPClass", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.43.1", UIDsDictionaryEntry("Generic Implant Template Storage", "GenericImplantTemplateStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.43.2", UIDsDictionaryEntry("Generic Implant Template Information Model - FIND", "GenericImplantTemplateInformationModelFIND", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.43.3", UIDsDictionaryEntry("Generic Implant Template Information Model - MOVE", "GenericImplantTemplateInformationModelMOVE", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.43.4", UIDsDictionaryEntry("Generic Implant Template Information Model - GET", "GenericImplantTemplateInformationModelGET", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.44.1", UIDsDictionaryEntry("Implant Assembly Template Storage", "ImplantAssemblyTemplateStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.44.2", UIDsDictionaryEntry("Implant Assembly Template Information Model - FIND", "ImplantAssemblyTemplateInformationModelFIND", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.44.3", UIDsDictionaryEntry("Implant Assembly Template Information Model - MOVE", "ImplantAssemblyTemplateInformationModelMOVE", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.44.4", UIDsDictionaryEntry("Implant Assembly Template Information Model - GET", "ImplantAssemblyTemplateInformationModelGET", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.45.1", UIDsDictionaryEntry("Implant Template Group Storage", "ImplantTemplateGroupStorage", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.45.2", UIDsDictionaryEntry("Implant Template Group Information Model - FIND", "ImplantTemplateGroupInformationModelFIND", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.45.3", UIDsDictionaryEntry("Implant Template Group Information Model - MOVE", "ImplantTemplateGroupInformationModelMOVE", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.5.1.4.45.4", UIDsDictionaryEntry("Implant Template Group Information Model - GET", "ImplantTemplateGroupInformationModelGET", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.7.1.1", UIDsDictionaryEntry("Native DICOM Model", "NativeDICOMModel", "Application Hosting Model")); uids_dictionary.emplace("1.2.840.10008.7.1.2", UIDsDictionaryEntry("Abstract Multi-Dimensional Image Model", "AbstractMultiDimensionalImageModel", "Application Hosting Model")); uids_dictionary.emplace("1.2.840.10008.8.1.1", UIDsDictionaryEntry("DICOM Content Mapping Resource", "DICOMContentMappingResource", "Mapping Resource")); uids_dictionary.emplace("1.2.840.10008.10.1", UIDsDictionaryEntry("Video Endoscopic Image Real-Time Communication", "VideoEndoscopicImageRealTimeCommunication", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.10.2", UIDsDictionaryEntry("Video Photographic Image Real-Time Communication", "VideoPhotographicImageRealTimeCommunication", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.10.3", UIDsDictionaryEntry("Audio Waveform Real-Time Communication", "AudioWaveformRealTimeCommunication", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.10.4", UIDsDictionaryEntry("Rendition Selection Document Real-Time Communication", "RenditionSelectionDocumentRealTimeCommunication", "SOP Class")); uids_dictionary.emplace("1.2.840.10008.15.0.3.1", UIDsDictionaryEntry("dicomDeviceName", "dicomDeviceName", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.2", UIDsDictionaryEntry("dicomDescription", "dicomDescription", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.3", UIDsDictionaryEntry("dicomManufacturer", "dicomManufacturer", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.4", UIDsDictionaryEntry("dicomManufacturerModelName", "dicomManufacturerModelName", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.5", UIDsDictionaryEntry("dicomSoftwareVersion", "dicomSoftwareVersion", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.6", UIDsDictionaryEntry("dicomVendorData", "dicomVendorData", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.7", UIDsDictionaryEntry("dicomAETitle", "dicomAETitle", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.8", UIDsDictionaryEntry("dicomNetworkConnectionReference", "dicomNetworkConnectionReference", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.9", UIDsDictionaryEntry("dicomApplicationCluster", "dicomApplicationCluster", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.10", UIDsDictionaryEntry("dicomAssociationInitiator", "dicomAssociationInitiator", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.11", UIDsDictionaryEntry("dicomAssociationAcceptor", "dicomAssociationAcceptor", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.12", UIDsDictionaryEntry("dicomHostname", "dicomHostname", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.13", UIDsDictionaryEntry("dicomPort", "dicomPort", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.14", UIDsDictionaryEntry("dicomSOPClass", "dicomSOPClass", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.15", UIDsDictionaryEntry("dicomTransferRole", "dicomTransferRole", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.16", UIDsDictionaryEntry("dicomTransferSyntax", "dicomTransferSyntax", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.17", UIDsDictionaryEntry("dicomPrimaryDeviceType", "dicomPrimaryDeviceType", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.18", UIDsDictionaryEntry("dicomRelatedDeviceReference", "dicomRelatedDeviceReference", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.19", UIDsDictionaryEntry("dicomPreferredCalledAETitle", "dicomPreferredCalledAETitle", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.20", UIDsDictionaryEntry("dicomTLSCyphersuite", "dicomTLSCyphersuite", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.21", UIDsDictionaryEntry("dicomAuthorizedNodeCertificateReference", "dicomAuthorizedNodeCertificateReference", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.22", UIDsDictionaryEntry("dicomThisNodeCertificateReference", "dicomThisNodeCertificateReference", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.23", UIDsDictionaryEntry("dicomInstalled", "dicomInstalled", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.24", UIDsDictionaryEntry("dicomStationName", "dicomStationName", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.25", UIDsDictionaryEntry("dicomDeviceSerialNumber", "dicomDeviceSerialNumber", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.26", UIDsDictionaryEntry("dicomInstitutionName", "dicomInstitutionName", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.27", UIDsDictionaryEntry("dicomInstitutionAddress", "dicomInstitutionAddress", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.28", UIDsDictionaryEntry("dicomInstitutionDepartmentName", "dicomInstitutionDepartmentName", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.29", UIDsDictionaryEntry("dicomIssuerOfPatientID", "dicomIssuerOfPatientID", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.30", UIDsDictionaryEntry("dicomPreferredCallingAETitle", "dicomPreferredCallingAETitle", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.3.31", UIDsDictionaryEntry("dicomSupportedCharacterSet", "dicomSupportedCharacterSet", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.4.1", UIDsDictionaryEntry("dicomConfigurationRoot", "dicomConfigurationRoot", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.4.2", UIDsDictionaryEntry("dicomDevicesRoot", "dicomDevicesRoot", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.4.3", UIDsDictionaryEntry("dicomUniqueAETitlesRegistryRoot", "dicomUniqueAETitlesRegistryRoot", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.4.4", UIDsDictionaryEntry("dicomDevice", "dicomDevice", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.4.5", UIDsDictionaryEntry("dicomNetworkAE", "dicomNetworkAE", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.4.6", UIDsDictionaryEntry("dicomNetworkConnection", "dicomNetworkConnection", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.4.7", UIDsDictionaryEntry("dicomUniqueAETitle", "dicomUniqueAETitle", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.0.4.8", UIDsDictionaryEntry("dicomTransferCapability", "dicomTransferCapability", "LDAP OID")); uids_dictionary.emplace("1.2.840.10008.15.1.1", UIDsDictionaryEntry("Universal Coordinated Time", "UniversalCoordinatedTime", "Synchronization Frame of Reference")); } bool update( odil::ElementsDictionary & public_dictionary, std::map & public_tags, odil::UIDsDictionary & uids_dictionary) { update_0000(public_dictionary, public_tags); update_0002(public_dictionary, public_tags); update_0004(public_dictionary, public_tags); update_0008(public_dictionary, public_tags); update_0010(public_dictionary, public_tags); update_0012(public_dictionary, public_tags); update_0014(public_dictionary, public_tags); update_0016(public_dictionary, public_tags); update_0018(public_dictionary, public_tags); update_0020(public_dictionary, public_tags); update_misc(public_dictionary, public_tags); update_0022(public_dictionary, public_tags); update_0024(public_dictionary, public_tags); update_0028(public_dictionary, public_tags); update_0032(public_dictionary, public_tags); update_0034(public_dictionary, public_tags); update_0038(public_dictionary, public_tags); update_003a(public_dictionary, public_tags); update_0040(public_dictionary, public_tags); update_0042(public_dictionary, public_tags); update_0044(public_dictionary, public_tags); update_0046(public_dictionary, public_tags); update_0048(public_dictionary, public_tags); update_0050(public_dictionary, public_tags); update_0052(public_dictionary, public_tags); update_0054(public_dictionary, public_tags); update_0060(public_dictionary, public_tags); update_0062(public_dictionary, public_tags); update_0064(public_dictionary, public_tags); update_0066(public_dictionary, public_tags); update_0068(public_dictionary, public_tags); update_0070(public_dictionary, public_tags); update_0072(public_dictionary, public_tags); update_0074(public_dictionary, public_tags); update_0076(public_dictionary, public_tags); update_0078(public_dictionary, public_tags); update_0080(public_dictionary, public_tags); update_0082(public_dictionary, public_tags); update_0088(public_dictionary, public_tags); update_0100(public_dictionary, public_tags); update_0400(public_dictionary, public_tags); update_2000(public_dictionary, public_tags); update_2010(public_dictionary, public_tags); update_2020(public_dictionary, public_tags); update_2030(public_dictionary, public_tags); update_2040(public_dictionary, public_tags); update_2050(public_dictionary, public_tags); update_2100(public_dictionary, public_tags); update_2110(public_dictionary, public_tags); update_2120(public_dictionary, public_tags); update_2130(public_dictionary, public_tags); update_2200(public_dictionary, public_tags); update_3002(public_dictionary, public_tags); update_3004(public_dictionary, public_tags); update_3006(public_dictionary, public_tags); update_3008(public_dictionary, public_tags); update_300a(public_dictionary, public_tags); update_300c(public_dictionary, public_tags); update_300e(public_dictionary, public_tags); update_3010(public_dictionary, public_tags); update_4000(public_dictionary, public_tags); update_4008(public_dictionary, public_tags); update_4010(public_dictionary, public_tags); update_4ffe(public_dictionary, public_tags); update_5200(public_dictionary, public_tags); update_5400(public_dictionary, public_tags); update_5600(public_dictionary, public_tags); update_7fe0(public_dictionary, public_tags); update_fffa(public_dictionary, public_tags); update_fffc(public_dictionary, public_tags); update_fffe(public_dictionary, public_tags); update_uids_dictionary(uids_dictionary); return true; } } } odil::ElementsDictionary odil::registry::public_dictionary = {}; std::map odil::registry::public_tags = {}; odil::UIDsDictionary odil::registry::uids_dictionary = {}; bool const odil::registry::dummy = odil::registry::update( odil::registry::public_dictionary, odil::registry::public_tags, odil::registry::uids_dictionary);odil-0.11.0/src/odil/registry.h000066400000000000000000001116751362244656000163020ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9 #include #include #include "odil/odil.h" #include "odil/ElementsDictionary.h" #include "odil/Tag.h" #include "odil/UIDsDictionary.h" #include "odil/registry_0000.h" #include "odil/registry_0002.h" #include "odil/registry_0004.h" #include "odil/registry_0008.h" #include "odil/registry_0010.h" #include "odil/registry_0012.h" #include "odil/registry_0014.h" #include "odil/registry_0016.h" #include "odil/registry_0018.h" #include "odil/registry_0020.h" #include "odil/registry_misc.h" #include "odil/registry_0022.h" #include "odil/registry_0024.h" #include "odil/registry_0028.h" #include "odil/registry_0032.h" #include "odil/registry_0034.h" #include "odil/registry_0038.h" #include "odil/registry_003a.h" #include "odil/registry_0040.h" #include "odil/registry_0042.h" #include "odil/registry_0044.h" #include "odil/registry_0046.h" #include "odil/registry_0048.h" #include "odil/registry_0050.h" #include "odil/registry_0052.h" #include "odil/registry_0054.h" #include "odil/registry_0060.h" #include "odil/registry_0062.h" #include "odil/registry_0064.h" #include "odil/registry_0066.h" #include "odil/registry_0068.h" #include "odil/registry_0070.h" #include "odil/registry_0072.h" #include "odil/registry_0074.h" #include "odil/registry_0076.h" #include "odil/registry_0078.h" #include "odil/registry_0080.h" #include "odil/registry_0082.h" #include "odil/registry_0088.h" #include "odil/registry_0100.h" #include "odil/registry_0400.h" #include "odil/registry_2000.h" #include "odil/registry_2010.h" #include "odil/registry_2020.h" #include "odil/registry_2030.h" #include "odil/registry_2040.h" #include "odil/registry_2050.h" #include "odil/registry_2100.h" #include "odil/registry_2110.h" #include "odil/registry_2120.h" #include "odil/registry_2130.h" #include "odil/registry_2200.h" #include "odil/registry_3002.h" #include "odil/registry_3004.h" #include "odil/registry_3006.h" #include "odil/registry_3008.h" #include "odil/registry_300a.h" #include "odil/registry_300c.h" #include "odil/registry_300e.h" #include "odil/registry_3010.h" #include "odil/registry_4000.h" #include "odil/registry_4008.h" #include "odil/registry_4010.h" #include "odil/registry_4ffe.h" #include "odil/registry_5200.h" #include "odil/registry_5400.h" #include "odil/registry_5600.h" #include "odil/registry_7fe0.h" #include "odil/registry_fffa.h" #include "odil/registry_fffc.h" #include "odil/registry_fffe.h" namespace odil { namespace registry { std::string const VerificationSOPClass("1.2.840.10008.1.1"); std::string const ImplicitVRLittleEndian("1.2.840.10008.1.2"); std::string const ExplicitVRLittleEndian("1.2.840.10008.1.2.1"); std::string const DeflatedExplicitVRLittleEndian("1.2.840.10008.1.2.1.99"); std::string const ExplicitVRBigEndian_Retired("1.2.840.10008.1.2.2"); std::string const JPEGBaselineProcess1("1.2.840.10008.1.2.4.50"); std::string const JPEGExtendedProcess24("1.2.840.10008.1.2.4.51"); std::string const JPEGExtendedProcess35_Retired("1.2.840.10008.1.2.4.52"); std::string const JPEGSpectralSelectionNonHierarchicalProcess68_Retired("1.2.840.10008.1.2.4.53"); std::string const JPEGSpectralSelectionNonHierarchicalProcess79_Retired("1.2.840.10008.1.2.4.54"); std::string const JPEGFullProgressionNonHierarchicalProcess1012_Retired("1.2.840.10008.1.2.4.55"); std::string const JPEGFullProgressionNonHierarchicalProcess1113_Retired("1.2.840.10008.1.2.4.56"); std::string const JPEGLosslessNonHierarchicalProcess14("1.2.840.10008.1.2.4.57"); std::string const JPEGLosslessNonHierarchicalProcess15_Retired("1.2.840.10008.1.2.4.58"); std::string const JPEGExtendedHierarchicalProcess1618_Retired("1.2.840.10008.1.2.4.59"); std::string const JPEGExtendedHierarchicalProcess1719_Retired("1.2.840.10008.1.2.4.60"); std::string const JPEGSpectralSelectionHierarchicalProcess2022_Retired("1.2.840.10008.1.2.4.61"); std::string const JPEGSpectralSelectionHierarchicalProcess2123_Retired("1.2.840.10008.1.2.4.62"); std::string const JPEGFullProgressionHierarchicalProcess2426_Retired("1.2.840.10008.1.2.4.63"); std::string const JPEGFullProgressionHierarchicalProcess2527_Retired("1.2.840.10008.1.2.4.64"); std::string const JPEGLosslessHierarchicalProcess28_Retired("1.2.840.10008.1.2.4.65"); std::string const JPEGLosslessHierarchicalProcess29_Retired("1.2.840.10008.1.2.4.66"); std::string const JPEGLosslessNonHierarchicalFirstOrderPredictionProcess14SelectionValue1("1.2.840.10008.1.2.4.70"); std::string const JPEGLSLosslessImageCompression("1.2.840.10008.1.2.4.80"); std::string const JPEGLSLossyNearLosslessImageCompression("1.2.840.10008.1.2.4.81"); std::string const JPEG2000ImageCompressionLosslessOnly("1.2.840.10008.1.2.4.90"); std::string const JPEG2000ImageCompression("1.2.840.10008.1.2.4.91"); std::string const JPEG2000Part2MulticomponentImageCompressionLosslessOnly("1.2.840.10008.1.2.4.92"); std::string const JPEG2000Part2MulticomponentImageCompression("1.2.840.10008.1.2.4.93"); std::string const JPIPReferenced("1.2.840.10008.1.2.4.94"); std::string const JPIPReferencedDeflate("1.2.840.10008.1.2.4.95"); std::string const MPEG2MainProfileMainLevel("1.2.840.10008.1.2.4.100"); std::string const MPEG2MainProfileHighLevel("1.2.840.10008.1.2.4.101"); std::string const MPEG4AVCH264HighProfileLevel41("1.2.840.10008.1.2.4.102"); std::string const MPEG4AVCH264BDcompatibleHighProfileLevel41("1.2.840.10008.1.2.4.103"); std::string const MPEG4AVCH264HighProfileLevel42For2DVideo("1.2.840.10008.1.2.4.104"); std::string const MPEG4AVCH264HighProfileLevel42For3DVideo("1.2.840.10008.1.2.4.105"); std::string const MPEG4AVCH264StereoHighProfileLevel42("1.2.840.10008.1.2.4.106"); std::string const HEVCH265MainProfileLevel51("1.2.840.10008.1.2.4.107"); std::string const HEVCH265Main10ProfileLevel51("1.2.840.10008.1.2.4.108"); std::string const RLELossless("1.2.840.10008.1.2.5"); std::string const RFC2557MIMEencapsulation_Retired("1.2.840.10008.1.2.6.1"); std::string const XMLEncoding_Retired("1.2.840.10008.1.2.6.2"); std::string const SMPTEST211020UncompressedProgressiveActiveVideo("1.2.840.10008.1.2.7.1"); std::string const SMPTEST211020UncompressedInterlacedActiveVideo("1.2.840.10008.1.2.7.2"); std::string const SMPTEST211030PCMDigitalAudio("1.2.840.10008.1.2.7.3"); std::string const MediaStorageDirectoryStorage("1.2.840.10008.1.3.10"); std::string const TalairachBrainAtlasFrameofReference("1.2.840.10008.1.4.1.1"); std::string const SPM2T1FrameofReference("1.2.840.10008.1.4.1.2"); std::string const SPM2T2FrameofReference("1.2.840.10008.1.4.1.3"); std::string const SPM2PDFrameofReference("1.2.840.10008.1.4.1.4"); std::string const SPM2EPIFrameofReference("1.2.840.10008.1.4.1.5"); std::string const SPM2FILT1FrameofReference("1.2.840.10008.1.4.1.6"); std::string const SPM2PETFrameofReference("1.2.840.10008.1.4.1.7"); std::string const SPM2TRANSMFrameofReference("1.2.840.10008.1.4.1.8"); std::string const SPM2SPECTFrameofReference("1.2.840.10008.1.4.1.9"); std::string const SPM2GRAYFrameofReference("1.2.840.10008.1.4.1.10"); std::string const SPM2WHITEFrameofReference("1.2.840.10008.1.4.1.11"); std::string const SPM2CSFFrameofReference("1.2.840.10008.1.4.1.12"); std::string const SPM2BRAINMASKFrameofReference("1.2.840.10008.1.4.1.13"); std::string const SPM2AVG305T1FrameofReference("1.2.840.10008.1.4.1.14"); std::string const SPM2AVG152T1FrameofReference("1.2.840.10008.1.4.1.15"); std::string const SPM2AVG152T2FrameofReference("1.2.840.10008.1.4.1.16"); std::string const SPM2AVG152PDFrameofReference("1.2.840.10008.1.4.1.17"); std::string const SPM2SINGLESUBJT1FrameofReference("1.2.840.10008.1.4.1.18"); std::string const ICBM452T1FrameofReference("1.2.840.10008.1.4.2.1"); std::string const ICBMSingleSubjectMRIFrameofReference("1.2.840.10008.1.4.2.2"); std::string const IEC61217FixedCoordinateSystemFrameofReference("1.2.840.10008.1.4.3.1"); std::string const StandardRoboticArmCoordinateSystemFrameofReference("1.2.840.10008.1.4.3.2"); std::string const HotIronColorPaletteSOPInstance("1.2.840.10008.1.5.1"); std::string const PETColorPaletteSOPInstance("1.2.840.10008.1.5.2"); std::string const HotMetalBlueColorPaletteSOPInstance("1.2.840.10008.1.5.3"); std::string const PET20StepColorPaletteSOPInstance("1.2.840.10008.1.5.4"); std::string const SpringColorPaletteSOPInstance("1.2.840.10008.1.5.5"); std::string const SummerColorPaletteSOPInstance("1.2.840.10008.1.5.6"); std::string const FallColorPaletteSOPInstance("1.2.840.10008.1.5.7"); std::string const WinterColorPaletteSOPInstance("1.2.840.10008.1.5.8"); std::string const BasicStudyContentNotificationSOPClass_Retired("1.2.840.10008.1.9"); std::string const Papyrus3ImplicitVRLittleEndian_Retired("1.2.840.10008.1.20"); std::string const StorageCommitmentPushModelSOPClass("1.2.840.10008.1.20.1"); std::string const StorageCommitmentPushModelSOPInstance("1.2.840.10008.1.20.1.1"); std::string const StorageCommitmentPullModelSOPClass_Retired("1.2.840.10008.1.20.2"); std::string const StorageCommitmentPullModelSOPInstance_Retired("1.2.840.10008.1.20.2.1"); std::string const ProceduralEventLoggingSOPClass("1.2.840.10008.1.40"); std::string const ProceduralEventLoggingSOPInstance("1.2.840.10008.1.40.1"); std::string const SubstanceAdministrationLoggingSOPClass("1.2.840.10008.1.42"); std::string const SubstanceAdministrationLoggingSOPInstance("1.2.840.10008.1.42.1"); std::string const DICOMUIDRegistry("1.2.840.10008.2.6.1"); std::string const DICOMControlledTerminology("1.2.840.10008.2.16.4"); std::string const AdultMouseAnatomyOntology("1.2.840.10008.2.16.5"); std::string const UberonOntology("1.2.840.10008.2.16.6"); std::string const IntegratedTaxonomicInformationSystemITISTaxonomicSerialNumberTSN("1.2.840.10008.2.16.7"); std::string const MouseGenomeInitiativeMGI("1.2.840.10008.2.16.8"); std::string const PubChemCompoundCID("1.2.840.10008.2.16.9"); std::string const ICD11("1.2.840.10008.2.16.10"); std::string const NewYorkUniversityMelanomaClinicalCooperativeGroup("1.2.840.10008.2.16.11"); std::string const MayoClinicNonradiologicalImagesSpecificBodyStructureAnatomicalSurfaceRegionGuide("1.2.840.10008.2.16.12"); std::string const ImageBiomarkerStandardisationInitiative("1.2.840.10008.2.16.13"); std::string const RadiomicsOntology("1.2.840.10008.2.16.14"); std::string const RadElement("1.2.840.10008.2.16.15"); std::string const DICOMApplicationContextName("1.2.840.10008.3.1.1.1"); std::string const DetachedPatientManagementSOPClass_Retired("1.2.840.10008.3.1.2.1.1"); std::string const DetachedPatientManagementMetaSOPClass_Retired("1.2.840.10008.3.1.2.1.4"); std::string const DetachedVisitManagementSOPClass_Retired("1.2.840.10008.3.1.2.2.1"); std::string const DetachedStudyManagementSOPClass_Retired("1.2.840.10008.3.1.2.3.1"); std::string const StudyComponentManagementSOPClass_Retired("1.2.840.10008.3.1.2.3.2"); std::string const ModalityPerformedProcedureStepSOPClass("1.2.840.10008.3.1.2.3.3"); std::string const ModalityPerformedProcedureStepRetrieveSOPClass("1.2.840.10008.3.1.2.3.4"); std::string const ModalityPerformedProcedureStepNotificationSOPClass("1.2.840.10008.3.1.2.3.5"); std::string const DetachedResultsManagementSOPClass_Retired("1.2.840.10008.3.1.2.5.1"); std::string const DetachedResultsManagementMetaSOPClass_Retired("1.2.840.10008.3.1.2.5.4"); std::string const DetachedStudyManagementMetaSOPClass_Retired("1.2.840.10008.3.1.2.5.5"); std::string const DetachedInterpretationManagementSOPClass_Retired("1.2.840.10008.3.1.2.6.1"); std::string const StorageServiceClass("1.2.840.10008.4.2"); std::string const BasicFilmSessionSOPClass("1.2.840.10008.5.1.1.1"); std::string const BasicFilmBoxSOPClass("1.2.840.10008.5.1.1.2"); std::string const BasicGrayscaleImageBoxSOPClass("1.2.840.10008.5.1.1.4"); std::string const BasicColorImageBoxSOPClass("1.2.840.10008.5.1.1.4.1"); std::string const ReferencedImageBoxSOPClass_Retired("1.2.840.10008.5.1.1.4.2"); std::string const BasicGrayscalePrintManagementMetaSOPClass("1.2.840.10008.5.1.1.9"); std::string const ReferencedGrayscalePrintManagementMetaSOPClass_Retired("1.2.840.10008.5.1.1.9.1"); std::string const PrintJobSOPClass("1.2.840.10008.5.1.1.14"); std::string const BasicAnnotationBoxSOPClass("1.2.840.10008.5.1.1.15"); std::string const PrinterSOPClass("1.2.840.10008.5.1.1.16"); std::string const PrinterConfigurationRetrievalSOPClass("1.2.840.10008.5.1.1.16.376"); std::string const PrinterSOPInstance("1.2.840.10008.5.1.1.17"); std::string const PrinterConfigurationRetrievalSOPInstance("1.2.840.10008.5.1.1.17.376"); std::string const BasicColorPrintManagementMetaSOPClass("1.2.840.10008.5.1.1.18"); std::string const ReferencedColorPrintManagementMetaSOPClass_Retired("1.2.840.10008.5.1.1.18.1"); std::string const VOILUTBoxSOPClass("1.2.840.10008.5.1.1.22"); std::string const PresentationLUTSOPClass("1.2.840.10008.5.1.1.23"); std::string const ImageOverlayBoxSOPClass_Retired("1.2.840.10008.5.1.1.24"); std::string const BasicPrintImageOverlayBoxSOPClass_Retired("1.2.840.10008.5.1.1.24.1"); std::string const PrintQueueSOPInstance_Retired("1.2.840.10008.5.1.1.25"); std::string const PrintQueueManagementSOPClass_Retired("1.2.840.10008.5.1.1.26"); std::string const StoredPrintStorageSOPClass_Retired("1.2.840.10008.5.1.1.27"); std::string const HardcopyGrayscaleImageStorageSOPClass_Retired("1.2.840.10008.5.1.1.29"); std::string const HardcopyColorImageStorageSOPClass_Retired("1.2.840.10008.5.1.1.30"); std::string const PullPrintRequestSOPClass_Retired("1.2.840.10008.5.1.1.31"); std::string const PullStoredPrintManagementMetaSOPClass_Retired("1.2.840.10008.5.1.1.32"); std::string const MediaCreationManagementSOPClassUID("1.2.840.10008.5.1.1.33"); std::string const DisplaySystemSOPClass("1.2.840.10008.5.1.1.40"); std::string const DisplaySystemSOPInstance("1.2.840.10008.5.1.1.40.1"); std::string const ComputedRadiographyImageStorage("1.2.840.10008.5.1.4.1.1.1"); std::string const DigitalXRayImageStorageForPresentation("1.2.840.10008.5.1.4.1.1.1.1"); std::string const DigitalXRayImageStorageForProcessing("1.2.840.10008.5.1.4.1.1.1.1.1"); std::string const DigitalMammographyXRayImageStorageForPresentation("1.2.840.10008.5.1.4.1.1.1.2"); std::string const DigitalMammographyXRayImageStorageForProcessing("1.2.840.10008.5.1.4.1.1.1.2.1"); std::string const DigitalIntraOralXRayImageStorageForPresentation("1.2.840.10008.5.1.4.1.1.1.3"); std::string const DigitalIntraOralXRayImageStorageForProcessing("1.2.840.10008.5.1.4.1.1.1.3.1"); std::string const CTImageStorage("1.2.840.10008.5.1.4.1.1.2"); std::string const EnhancedCTImageStorage("1.2.840.10008.5.1.4.1.1.2.1"); std::string const LegacyConvertedEnhancedCTImageStorage("1.2.840.10008.5.1.4.1.1.2.2"); std::string const UltrasoundMultiframeImageStorage_Retired("1.2.840.10008.5.1.4.1.1.3"); std::string const UltrasoundMultiframeImageStorage("1.2.840.10008.5.1.4.1.1.3.1"); std::string const MRImageStorage("1.2.840.10008.5.1.4.1.1.4"); std::string const EnhancedMRImageStorage("1.2.840.10008.5.1.4.1.1.4.1"); std::string const MRSpectroscopyStorage("1.2.840.10008.5.1.4.1.1.4.2"); std::string const EnhancedMRColorImageStorage("1.2.840.10008.5.1.4.1.1.4.3"); std::string const LegacyConvertedEnhancedMRImageStorage("1.2.840.10008.5.1.4.1.1.4.4"); std::string const NuclearMedicineImageStorage_Retired("1.2.840.10008.5.1.4.1.1.5"); std::string const UltrasoundImageStorage_Retired("1.2.840.10008.5.1.4.1.1.6"); std::string const UltrasoundImageStorage("1.2.840.10008.5.1.4.1.1.6.1"); std::string const EnhancedUSVolumeStorage("1.2.840.10008.5.1.4.1.1.6.2"); std::string const SecondaryCaptureImageStorage("1.2.840.10008.5.1.4.1.1.7"); std::string const MultiframeSingleBitSecondaryCaptureImageStorage("1.2.840.10008.5.1.4.1.1.7.1"); std::string const MultiframeGrayscaleByteSecondaryCaptureImageStorage("1.2.840.10008.5.1.4.1.1.7.2"); std::string const MultiframeGrayscaleWordSecondaryCaptureImageStorage("1.2.840.10008.5.1.4.1.1.7.3"); std::string const MultiframeTrueColorSecondaryCaptureImageStorage("1.2.840.10008.5.1.4.1.1.7.4"); std::string const StandaloneOverlayStorage_Retired("1.2.840.10008.5.1.4.1.1.8"); std::string const StandaloneCurveStorage_Retired("1.2.840.10008.5.1.4.1.1.9"); std::string const WaveformStorageTrial_Retired("1.2.840.10008.5.1.4.1.1.9.1"); std::string const TwelveleadECGWaveformStorage("1.2.840.10008.5.1.4.1.1.9.1.1"); std::string const GeneralECGWaveformStorage("1.2.840.10008.5.1.4.1.1.9.1.2"); std::string const AmbulatoryECGWaveformStorage("1.2.840.10008.5.1.4.1.1.9.1.3"); std::string const HemodynamicWaveformStorage("1.2.840.10008.5.1.4.1.1.9.2.1"); std::string const CardiacElectrophysiologyWaveformStorage("1.2.840.10008.5.1.4.1.1.9.3.1"); std::string const BasicVoiceAudioWaveformStorage("1.2.840.10008.5.1.4.1.1.9.4.1"); std::string const GeneralAudioWaveformStorage("1.2.840.10008.5.1.4.1.1.9.4.2"); std::string const ArterialPulseWaveformStorage("1.2.840.10008.5.1.4.1.1.9.5.1"); std::string const RespiratoryWaveformStorage("1.2.840.10008.5.1.4.1.1.9.6.1"); std::string const StandaloneModalityLUTStorage_Retired("1.2.840.10008.5.1.4.1.1.10"); std::string const StandaloneVOILUTStorage_Retired("1.2.840.10008.5.1.4.1.1.11"); std::string const GrayscaleSoftcopyPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.1"); std::string const ColorSoftcopyPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.2"); std::string const PseudoColorSoftcopyPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.3"); std::string const BlendingSoftcopyPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.4"); std::string const XAXRFGrayscaleSoftcopyPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.5"); std::string const GrayscalePlanarMPRVolumetricPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.6"); std::string const CompositingPlanarMPRVolumetricPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.7"); std::string const AdvancedBlendingPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.8"); std::string const VolumeRenderingVolumetricPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.9"); std::string const SegmentedVolumeRenderingVolumetricPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.10"); std::string const MultipleVolumeRenderingVolumetricPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.11"); std::string const XRayAngiographicImageStorage("1.2.840.10008.5.1.4.1.1.12.1"); std::string const EnhancedXAImageStorage("1.2.840.10008.5.1.4.1.1.12.1.1"); std::string const XRayRadiofluoroscopicImageStorage("1.2.840.10008.5.1.4.1.1.12.2"); std::string const EnhancedXRFImageStorage("1.2.840.10008.5.1.4.1.1.12.2.1"); std::string const XRayAngiographicBiPlaneImageStorage_Retired("1.2.840.10008.5.1.4.1.1.12.3"); std::string const XRay3DAngiographicImageStorage("1.2.840.10008.5.1.4.1.1.13.1.1"); std::string const XRay3DCraniofacialImageStorage("1.2.840.10008.5.1.4.1.1.13.1.2"); std::string const BreastTomosynthesisImageStorage("1.2.840.10008.5.1.4.1.1.13.1.3"); std::string const BreastProjectionXRayImageStorageForPresentation("1.2.840.10008.5.1.4.1.1.13.1.4"); std::string const BreastProjectionXRayImageStorageForProcessing("1.2.840.10008.5.1.4.1.1.13.1.5"); std::string const IntravascularOpticalCoherenceTomographyImageStorageForPresentation("1.2.840.10008.5.1.4.1.1.14.1"); std::string const IntravascularOpticalCoherenceTomographyImageStorageForProcessing("1.2.840.10008.5.1.4.1.1.14.2"); std::string const NuclearMedicineImageStorage("1.2.840.10008.5.1.4.1.1.20"); std::string const ParametricMapStorage("1.2.840.10008.5.1.4.1.1.30"); std::string const RawDataStorage("1.2.840.10008.5.1.4.1.1.66"); std::string const SpatialRegistrationStorage("1.2.840.10008.5.1.4.1.1.66.1"); std::string const SpatialFiducialsStorage("1.2.840.10008.5.1.4.1.1.66.2"); std::string const DeformableSpatialRegistrationStorage("1.2.840.10008.5.1.4.1.1.66.3"); std::string const SegmentationStorage("1.2.840.10008.5.1.4.1.1.66.4"); std::string const SurfaceSegmentationStorage("1.2.840.10008.5.1.4.1.1.66.5"); std::string const TractographyResultsStorage("1.2.840.10008.5.1.4.1.1.66.6"); std::string const RealWorldValueMappingStorage("1.2.840.10008.5.1.4.1.1.67"); std::string const SurfaceScanMeshStorage("1.2.840.10008.5.1.4.1.1.68.1"); std::string const SurfaceScanPointCloudStorage("1.2.840.10008.5.1.4.1.1.68.2"); std::string const VLImageStorageTrial_Retired("1.2.840.10008.5.1.4.1.1.77.1"); std::string const VLMultiframeImageStorageTrial_Retired("1.2.840.10008.5.1.4.1.1.77.2"); std::string const VLEndoscopicImageStorage("1.2.840.10008.5.1.4.1.1.77.1.1"); std::string const VideoEndoscopicImageStorage("1.2.840.10008.5.1.4.1.1.77.1.1.1"); std::string const VLMicroscopicImageStorage("1.2.840.10008.5.1.4.1.1.77.1.2"); std::string const VideoMicroscopicImageStorage("1.2.840.10008.5.1.4.1.1.77.1.2.1"); std::string const VLSlideCoordinatesMicroscopicImageStorage("1.2.840.10008.5.1.4.1.1.77.1.3"); std::string const VLPhotographicImageStorage("1.2.840.10008.5.1.4.1.1.77.1.4"); std::string const VideoPhotographicImageStorage("1.2.840.10008.5.1.4.1.1.77.1.4.1"); std::string const OphthalmicPhotography8BitImageStorage("1.2.840.10008.5.1.4.1.1.77.1.5.1"); std::string const OphthalmicPhotography16BitImageStorage("1.2.840.10008.5.1.4.1.1.77.1.5.2"); std::string const StereometricRelationshipStorage("1.2.840.10008.5.1.4.1.1.77.1.5.3"); std::string const OphthalmicTomographyImageStorage("1.2.840.10008.5.1.4.1.1.77.1.5.4"); std::string const WideFieldOphthalmicPhotographyStereographicProjectionImageStorage("1.2.840.10008.5.1.4.1.1.77.1.5.5"); std::string const WideFieldOphthalmicPhotography3DCoordinatesImageStorage("1.2.840.10008.5.1.4.1.1.77.1.5.6"); std::string const OphthalmicOpticalCoherenceTomographyEnFaceImageStorage("1.2.840.10008.5.1.4.1.1.77.1.5.7"); std::string const OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage("1.2.840.10008.5.1.4.1.1.77.1.5.8"); std::string const VLWholeSlideMicroscopyImageStorage("1.2.840.10008.5.1.4.1.1.77.1.6"); std::string const LensometryMeasurementsStorage("1.2.840.10008.5.1.4.1.1.78.1"); std::string const AutorefractionMeasurementsStorage("1.2.840.10008.5.1.4.1.1.78.2"); std::string const KeratometryMeasurementsStorage("1.2.840.10008.5.1.4.1.1.78.3"); std::string const SubjectiveRefractionMeasurementsStorage("1.2.840.10008.5.1.4.1.1.78.4"); std::string const VisualAcuityMeasurementsStorage("1.2.840.10008.5.1.4.1.1.78.5"); std::string const SpectaclePrescriptionReportStorage("1.2.840.10008.5.1.4.1.1.78.6"); std::string const OphthalmicAxialMeasurementsStorage("1.2.840.10008.5.1.4.1.1.78.7"); std::string const IntraocularLensCalculationsStorage("1.2.840.10008.5.1.4.1.1.78.8"); std::string const MacularGridThicknessandVolumeReportStorage("1.2.840.10008.5.1.4.1.1.79.1"); std::string const OphthalmicVisualFieldStaticPerimetryMeasurementsStorage("1.2.840.10008.5.1.4.1.1.80.1"); std::string const OphthalmicThicknessMapStorage("1.2.840.10008.5.1.4.1.1.81.1"); std::string const CornealTopographyMapStorage("1.2.840.10008.5.1.4.1.1.82.1"); std::string const TextSRStorageTrial_Retired("1.2.840.10008.5.1.4.1.1.88.1"); std::string const AudioSRStorageTrial_Retired("1.2.840.10008.5.1.4.1.1.88.2"); std::string const DetailSRStorageTrial_Retired("1.2.840.10008.5.1.4.1.1.88.3"); std::string const ComprehensiveSRStorageTrial_Retired("1.2.840.10008.5.1.4.1.1.88.4"); std::string const BasicTextSRStorage("1.2.840.10008.5.1.4.1.1.88.11"); std::string const EnhancedSRStorage("1.2.840.10008.5.1.4.1.1.88.22"); std::string const ComprehensiveSRStorage("1.2.840.10008.5.1.4.1.1.88.33"); std::string const Comprehensive3DSRStorage("1.2.840.10008.5.1.4.1.1.88.34"); std::string const ExtensibleSRStorage("1.2.840.10008.5.1.4.1.1.88.35"); std::string const ProcedureLogStorage("1.2.840.10008.5.1.4.1.1.88.40"); std::string const MammographyCADSRStorage("1.2.840.10008.5.1.4.1.1.88.50"); std::string const KeyObjectSelectionDocumentStorage("1.2.840.10008.5.1.4.1.1.88.59"); std::string const ChestCADSRStorage("1.2.840.10008.5.1.4.1.1.88.65"); std::string const XRayRadiationDoseSRStorage("1.2.840.10008.5.1.4.1.1.88.67"); std::string const RadiopharmaceuticalRadiationDoseSRStorage("1.2.840.10008.5.1.4.1.1.88.68"); std::string const ColonCADSRStorage("1.2.840.10008.5.1.4.1.1.88.69"); std::string const ImplantationPlanSRStorage("1.2.840.10008.5.1.4.1.1.88.70"); std::string const AcquisitionContextSRStorage("1.2.840.10008.5.1.4.1.1.88.71"); std::string const SimplifiedAdultEchoSRStorage("1.2.840.10008.5.1.4.1.1.88.72"); std::string const PatientRadiationDoseSRStorage("1.2.840.10008.5.1.4.1.1.88.73"); std::string const PlannedImagingAgentAdministrationSRStorage("1.2.840.10008.5.1.4.1.1.88.74"); std::string const PerformedImagingAgentAdministrationSRStorage("1.2.840.10008.5.1.4.1.1.88.75"); std::string const ContentAssessmentResultsStorage("1.2.840.10008.5.1.4.1.1.90.1"); std::string const EncapsulatedPDFStorage("1.2.840.10008.5.1.4.1.1.104.1"); std::string const EncapsulatedCDAStorage("1.2.840.10008.5.1.4.1.1.104.2"); std::string const EncapsulatedSTLStorage("1.2.840.10008.5.1.4.1.1.104.3"); std::string const EncapsulatedOBJStorage("1.2.840.10008.5.1.4.1.1.104.4"); std::string const EncapsulatedMTLStorage("1.2.840.10008.5.1.4.1.1.104.5"); std::string const PositronEmissionTomographyImageStorage("1.2.840.10008.5.1.4.1.1.128"); std::string const LegacyConvertedEnhancedPETImageStorage("1.2.840.10008.5.1.4.1.1.128.1"); std::string const StandalonePETCurveStorage_Retired("1.2.840.10008.5.1.4.1.1.129"); std::string const EnhancedPETImageStorage("1.2.840.10008.5.1.4.1.1.130"); std::string const BasicStructuredDisplayStorage("1.2.840.10008.5.1.4.1.1.131"); std::string const CTDefinedProcedureProtocolStorage("1.2.840.10008.5.1.4.1.1.200.1"); std::string const CTPerformedProcedureProtocolStorage("1.2.840.10008.5.1.4.1.1.200.2"); std::string const ProtocolApprovalStorage("1.2.840.10008.5.1.4.1.1.200.3"); std::string const ProtocolApprovalInformationModelFIND("1.2.840.10008.5.1.4.1.1.200.4"); std::string const ProtocolApprovalInformationModelMOVE("1.2.840.10008.5.1.4.1.1.200.5"); std::string const ProtocolApprovalInformationModelGET("1.2.840.10008.5.1.4.1.1.200.6"); std::string const RTImageStorage("1.2.840.10008.5.1.4.1.1.481.1"); std::string const RTDoseStorage("1.2.840.10008.5.1.4.1.1.481.2"); std::string const RTStructureSetStorage("1.2.840.10008.5.1.4.1.1.481.3"); std::string const RTBeamsTreatmentRecordStorage("1.2.840.10008.5.1.4.1.1.481.4"); std::string const RTPlanStorage("1.2.840.10008.5.1.4.1.1.481.5"); std::string const RTBrachyTreatmentRecordStorage("1.2.840.10008.5.1.4.1.1.481.6"); std::string const RTTreatmentSummaryRecordStorage("1.2.840.10008.5.1.4.1.1.481.7"); std::string const RTIonPlanStorage("1.2.840.10008.5.1.4.1.1.481.8"); std::string const RTIonBeamsTreatmentRecordStorage("1.2.840.10008.5.1.4.1.1.481.9"); std::string const RTPhysicianIntentStorage("1.2.840.10008.5.1.4.1.1.481.10"); std::string const RTSegmentAnnotationStorage("1.2.840.10008.5.1.4.1.1.481.11"); std::string const RTRadiationSetStorage("1.2.840.10008.5.1.4.1.1.481.12"); std::string const CArmPhotonElectronRadiationStorage("1.2.840.10008.5.1.4.1.1.481.13"); std::string const TomotherapeuticRadiationStorage("1.2.840.10008.5.1.4.1.1.481.14"); std::string const RoboticArmRadiationStorage("1.2.840.10008.5.1.4.1.1.481.15"); std::string const DICOSCTImageStorage("1.2.840.10008.5.1.4.1.1.501.1"); std::string const DICOSDigitalXRayImageStorageForPresentation("1.2.840.10008.5.1.4.1.1.501.2.1"); std::string const DICOSDigitalXRayImageStorageForProcessing("1.2.840.10008.5.1.4.1.1.501.2.2"); std::string const DICOSThreatDetectionReportStorage("1.2.840.10008.5.1.4.1.1.501.3"); std::string const DICOS2DAITStorage("1.2.840.10008.5.1.4.1.1.501.4"); std::string const DICOS3DAITStorage("1.2.840.10008.5.1.4.1.1.501.5"); std::string const DICOSQuadrupoleResonanceQRStorage("1.2.840.10008.5.1.4.1.1.501.6"); std::string const EddyCurrentImageStorage("1.2.840.10008.5.1.4.1.1.601.1"); std::string const EddyCurrentMultiframeImageStorage("1.2.840.10008.5.1.4.1.1.601.2"); std::string const PatientRootQueryRetrieveInformationModelFIND("1.2.840.10008.5.1.4.1.2.1.1"); std::string const PatientRootQueryRetrieveInformationModelMOVE("1.2.840.10008.5.1.4.1.2.1.2"); std::string const PatientRootQueryRetrieveInformationModelGET("1.2.840.10008.5.1.4.1.2.1.3"); std::string const StudyRootQueryRetrieveInformationModelFIND("1.2.840.10008.5.1.4.1.2.2.1"); std::string const StudyRootQueryRetrieveInformationModelMOVE("1.2.840.10008.5.1.4.1.2.2.2"); std::string const StudyRootQueryRetrieveInformationModelGET("1.2.840.10008.5.1.4.1.2.2.3"); std::string const PatientStudyOnlyQueryRetrieveInformationModelFIND_Retired("1.2.840.10008.5.1.4.1.2.3.1"); std::string const PatientStudyOnlyQueryRetrieveInformationModelMOVE_Retired("1.2.840.10008.5.1.4.1.2.3.2"); std::string const PatientStudyOnlyQueryRetrieveInformationModelGET_Retired("1.2.840.10008.5.1.4.1.2.3.3"); std::string const CompositeInstanceRootRetrieveMOVE("1.2.840.10008.5.1.4.1.2.4.2"); std::string const CompositeInstanceRootRetrieveGET("1.2.840.10008.5.1.4.1.2.4.3"); std::string const CompositeInstanceRetrieveWithoutBulkDataGET("1.2.840.10008.5.1.4.1.2.5.3"); std::string const DefinedProcedureProtocolInformationModelFIND("1.2.840.10008.5.1.4.20.1"); std::string const DefinedProcedureProtocolInformationModelMOVE("1.2.840.10008.5.1.4.20.2"); std::string const DefinedProcedureProtocolInformationModelGET("1.2.840.10008.5.1.4.20.3"); std::string const ModalityWorklistInformationModelFIND("1.2.840.10008.5.1.4.31"); std::string const GeneralPurposeWorklistManagementMetaSOPClass_Retired("1.2.840.10008.5.1.4.32"); std::string const GeneralPurposeWorklistInformationModelFIND_Retired("1.2.840.10008.5.1.4.32.1"); std::string const GeneralPurposeScheduledProcedureStepSOPClass_Retired("1.2.840.10008.5.1.4.32.2"); std::string const GeneralPurposePerformedProcedureStepSOPClass_Retired("1.2.840.10008.5.1.4.32.3"); std::string const InstanceAvailabilityNotificationSOPClass("1.2.840.10008.5.1.4.33"); std::string const RTBeamsDeliveryInstructionStorageTrial_Retired("1.2.840.10008.5.1.4.34.1"); std::string const RTConventionalMachineVerificationTrial_Retired("1.2.840.10008.5.1.4.34.2"); std::string const RTIonMachineVerificationTrial_Retired("1.2.840.10008.5.1.4.34.3"); std::string const UnifiedWorklistandProcedureStepServiceClassTrial_Retired("1.2.840.10008.5.1.4.34.4"); std::string const UnifiedProcedureStepPushSOPClassTrial_Retired("1.2.840.10008.5.1.4.34.4.1"); std::string const UnifiedProcedureStepWatchSOPClassTrial_Retired("1.2.840.10008.5.1.4.34.4.2"); std::string const UnifiedProcedureStepPullSOPClassTrial_Retired("1.2.840.10008.5.1.4.34.4.3"); std::string const UnifiedProcedureStepEventSOPClassTrial_Retired("1.2.840.10008.5.1.4.34.4.4"); std::string const UPSGlobalSubscriptionSOPInstance("1.2.840.10008.5.1.4.34.5"); std::string const UPSFilteredGlobalSubscriptionSOPInstance("1.2.840.10008.5.1.4.34.5.1"); std::string const UnifiedWorklistandProcedureStepServiceClass("1.2.840.10008.5.1.4.34.6"); std::string const UnifiedProcedureStepPushSOPClass("1.2.840.10008.5.1.4.34.6.1"); std::string const UnifiedProcedureStepWatchSOPClass("1.2.840.10008.5.1.4.34.6.2"); std::string const UnifiedProcedureStepPullSOPClass("1.2.840.10008.5.1.4.34.6.3"); std::string const UnifiedProcedureStepEventSOPClass("1.2.840.10008.5.1.4.34.6.4"); std::string const UnifiedProcedureStepQuerySOPClass("1.2.840.10008.5.1.4.34.6.5"); std::string const RTBeamsDeliveryInstructionStorage("1.2.840.10008.5.1.4.34.7"); std::string const RTConventionalMachineVerification("1.2.840.10008.5.1.4.34.8"); std::string const RTIonMachineVerification("1.2.840.10008.5.1.4.34.9"); std::string const RTBrachyApplicationSetupDeliveryInstructionStorage("1.2.840.10008.5.1.4.34.10"); std::string const GeneralRelevantPatientInformationQuery("1.2.840.10008.5.1.4.37.1"); std::string const BreastImagingRelevantPatientInformationQuery("1.2.840.10008.5.1.4.37.2"); std::string const CardiacRelevantPatientInformationQuery("1.2.840.10008.5.1.4.37.3"); std::string const HangingProtocolStorage("1.2.840.10008.5.1.4.38.1"); std::string const HangingProtocolInformationModelFIND("1.2.840.10008.5.1.4.38.2"); std::string const HangingProtocolInformationModelMOVE("1.2.840.10008.5.1.4.38.3"); std::string const HangingProtocolInformationModelGET("1.2.840.10008.5.1.4.38.4"); std::string const ColorPaletteStorage("1.2.840.10008.5.1.4.39.1"); std::string const ColorPaletteQueryRetrieveInformationModelFIND("1.2.840.10008.5.1.4.39.2"); std::string const ColorPaletteQueryRetrieveInformationModelMOVE("1.2.840.10008.5.1.4.39.3"); std::string const ColorPaletteQueryRetrieveInformationModelGET("1.2.840.10008.5.1.4.39.4"); std::string const ProductCharacteristicsQuerySOPClass("1.2.840.10008.5.1.4.41"); std::string const SubstanceApprovalQuerySOPClass("1.2.840.10008.5.1.4.42"); std::string const GenericImplantTemplateStorage("1.2.840.10008.5.1.4.43.1"); std::string const GenericImplantTemplateInformationModelFIND("1.2.840.10008.5.1.4.43.2"); std::string const GenericImplantTemplateInformationModelMOVE("1.2.840.10008.5.1.4.43.3"); std::string const GenericImplantTemplateInformationModelGET("1.2.840.10008.5.1.4.43.4"); std::string const ImplantAssemblyTemplateStorage("1.2.840.10008.5.1.4.44.1"); std::string const ImplantAssemblyTemplateInformationModelFIND("1.2.840.10008.5.1.4.44.2"); std::string const ImplantAssemblyTemplateInformationModelMOVE("1.2.840.10008.5.1.4.44.3"); std::string const ImplantAssemblyTemplateInformationModelGET("1.2.840.10008.5.1.4.44.4"); std::string const ImplantTemplateGroupStorage("1.2.840.10008.5.1.4.45.1"); std::string const ImplantTemplateGroupInformationModelFIND("1.2.840.10008.5.1.4.45.2"); std::string const ImplantTemplateGroupInformationModelMOVE("1.2.840.10008.5.1.4.45.3"); std::string const ImplantTemplateGroupInformationModelGET("1.2.840.10008.5.1.4.45.4"); std::string const NativeDICOMModel("1.2.840.10008.7.1.1"); std::string const AbstractMultiDimensionalImageModel("1.2.840.10008.7.1.2"); std::string const DICOMContentMappingResource("1.2.840.10008.8.1.1"); std::string const VideoEndoscopicImageRealTimeCommunication("1.2.840.10008.10.1"); std::string const VideoPhotographicImageRealTimeCommunication("1.2.840.10008.10.2"); std::string const AudioWaveformRealTimeCommunication("1.2.840.10008.10.3"); std::string const RenditionSelectionDocumentRealTimeCommunication("1.2.840.10008.10.4"); std::string const dicomDeviceName("1.2.840.10008.15.0.3.1"); std::string const dicomDescription("1.2.840.10008.15.0.3.2"); std::string const dicomManufacturer("1.2.840.10008.15.0.3.3"); std::string const dicomManufacturerModelName("1.2.840.10008.15.0.3.4"); std::string const dicomSoftwareVersion("1.2.840.10008.15.0.3.5"); std::string const dicomVendorData("1.2.840.10008.15.0.3.6"); std::string const dicomAETitle("1.2.840.10008.15.0.3.7"); std::string const dicomNetworkConnectionReference("1.2.840.10008.15.0.3.8"); std::string const dicomApplicationCluster("1.2.840.10008.15.0.3.9"); std::string const dicomAssociationInitiator("1.2.840.10008.15.0.3.10"); std::string const dicomAssociationAcceptor("1.2.840.10008.15.0.3.11"); std::string const dicomHostname("1.2.840.10008.15.0.3.12"); std::string const dicomPort("1.2.840.10008.15.0.3.13"); std::string const dicomSOPClass("1.2.840.10008.15.0.3.14"); std::string const dicomTransferRole("1.2.840.10008.15.0.3.15"); std::string const dicomTransferSyntax("1.2.840.10008.15.0.3.16"); std::string const dicomPrimaryDeviceType("1.2.840.10008.15.0.3.17"); std::string const dicomRelatedDeviceReference("1.2.840.10008.15.0.3.18"); std::string const dicomPreferredCalledAETitle("1.2.840.10008.15.0.3.19"); std::string const dicomTLSCyphersuite("1.2.840.10008.15.0.3.20"); std::string const dicomAuthorizedNodeCertificateReference("1.2.840.10008.15.0.3.21"); std::string const dicomThisNodeCertificateReference("1.2.840.10008.15.0.3.22"); std::string const dicomInstalled("1.2.840.10008.15.0.3.23"); std::string const dicomStationName("1.2.840.10008.15.0.3.24"); std::string const dicomDeviceSerialNumber("1.2.840.10008.15.0.3.25"); std::string const dicomInstitutionName("1.2.840.10008.15.0.3.26"); std::string const dicomInstitutionAddress("1.2.840.10008.15.0.3.27"); std::string const dicomInstitutionDepartmentName("1.2.840.10008.15.0.3.28"); std::string const dicomIssuerOfPatientID("1.2.840.10008.15.0.3.29"); std::string const dicomPreferredCallingAETitle("1.2.840.10008.15.0.3.30"); std::string const dicomSupportedCharacterSet("1.2.840.10008.15.0.3.31"); std::string const dicomConfigurationRoot("1.2.840.10008.15.0.4.1"); std::string const dicomDevicesRoot("1.2.840.10008.15.0.4.2"); std::string const dicomUniqueAETitlesRegistryRoot("1.2.840.10008.15.0.4.3"); std::string const dicomDevice("1.2.840.10008.15.0.4.4"); std::string const dicomNetworkAE("1.2.840.10008.15.0.4.5"); std::string const dicomNetworkConnection("1.2.840.10008.15.0.4.6"); std::string const dicomUniqueAETitle("1.2.840.10008.15.0.4.7"); std::string const dicomTransferCapability("1.2.840.10008.15.0.4.8"); std::string const UniversalCoordinatedTime("1.2.840.10008.15.1.1"); extern ODIL_API ElementsDictionary public_dictionary; extern ODIL_API std::map public_tags; extern ODIL_API UIDsDictionary uids_dictionary; extern ODIL_API bool const dummy; } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9odil-0.11.0/src/odil/registry_0000.cpp000066400000000000000000000127641362244656000172730ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0000( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0000, 0x0000), ElementsDictionaryEntry("Command Group Length", "CommandGroupLength", "UL", "1")); public_dictionary.emplace(Tag(0x0000, 0x0002), ElementsDictionaryEntry("Affected SOP Class UID", "AffectedSOPClassUID", "UI", "1")); public_dictionary.emplace(Tag(0x0000, 0x0003), ElementsDictionaryEntry("Requested SOP Class UID", "RequestedSOPClassUID", "UI", "1")); public_dictionary.emplace(Tag(0x0000, 0x0100), ElementsDictionaryEntry("Command Field", "CommandField", "US", "1")); public_dictionary.emplace(Tag(0x0000, 0x0110), ElementsDictionaryEntry("Message ID", "MessageID", "US", "1")); public_dictionary.emplace(Tag(0x0000, 0x0120), ElementsDictionaryEntry("Message ID Being Responded To", "MessageIDBeingRespondedTo", "US", "1")); public_dictionary.emplace(Tag(0x0000, 0x0600), ElementsDictionaryEntry("Move Destination", "MoveDestination", "AE", "1")); public_dictionary.emplace(Tag(0x0000, 0x0700), ElementsDictionaryEntry("Priority", "Priority", "US", "1")); public_dictionary.emplace(Tag(0x0000, 0x0800), ElementsDictionaryEntry("Command Data Set Type", "CommandDataSetType", "US", "1")); public_dictionary.emplace(Tag(0x0000, 0x0900), ElementsDictionaryEntry("Status", "Status", "US", "1")); public_dictionary.emplace(Tag(0x0000, 0x0901), ElementsDictionaryEntry("Offending Element", "OffendingElement", "AT", "1-n")); public_dictionary.emplace(Tag(0x0000, 0x0902), ElementsDictionaryEntry("Error Comment", "ErrorComment", "LO", "1")); public_dictionary.emplace(Tag(0x0000, 0x0903), ElementsDictionaryEntry("Error ID", "ErrorID", "US", "1")); public_dictionary.emplace(Tag(0x0000, 0x1000), ElementsDictionaryEntry("Affected SOP Instance UID", "AffectedSOPInstanceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0000, 0x1001), ElementsDictionaryEntry("Requested SOP Instance UID", "RequestedSOPInstanceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0000, 0x1002), ElementsDictionaryEntry("Event Type ID", "EventTypeID", "US", "1")); public_dictionary.emplace(Tag(0x0000, 0x1005), ElementsDictionaryEntry("Attribute Identifier List", "AttributeIdentifierList", "AT", "1-n")); public_dictionary.emplace(Tag(0x0000, 0x1008), ElementsDictionaryEntry("Action Type ID", "ActionTypeID", "US", "1")); public_dictionary.emplace(Tag(0x0000, 0x1020), ElementsDictionaryEntry("Number of Remaining Sub-operations", "NumberOfRemainingSuboperations", "US", "1")); public_dictionary.emplace(Tag(0x0000, 0x1021), ElementsDictionaryEntry("Number of Completed Sub-operations", "NumberOfCompletedSuboperations", "US", "1")); public_dictionary.emplace(Tag(0x0000, 0x1022), ElementsDictionaryEntry("Number of Failed Sub-operations", "NumberOfFailedSuboperations", "US", "1")); public_dictionary.emplace(Tag(0x0000, 0x1023), ElementsDictionaryEntry("Number of Warning Sub-operations", "NumberOfWarningSuboperations", "US", "1")); public_dictionary.emplace(Tag(0x0000, 0x1030), ElementsDictionaryEntry("Move Originator Application Entity Title", "MoveOriginatorApplicationEntityTitle", "AE", "1")); public_dictionary.emplace(Tag(0x0000, 0x1031), ElementsDictionaryEntry("Move Originator Message ID", "MoveOriginatorMessageID", "US", "1")); public_tags.emplace("CommandGroupLength", Tag(0x0000, 0x0000)); public_tags.emplace("AffectedSOPClassUID", Tag(0x0000, 0x0002)); public_tags.emplace("RequestedSOPClassUID", Tag(0x0000, 0x0003)); public_tags.emplace("CommandField", Tag(0x0000, 0x0100)); public_tags.emplace("MessageID", Tag(0x0000, 0x0110)); public_tags.emplace("MessageIDBeingRespondedTo", Tag(0x0000, 0x0120)); public_tags.emplace("MoveDestination", Tag(0x0000, 0x0600)); public_tags.emplace("Priority", Tag(0x0000, 0x0700)); public_tags.emplace("CommandDataSetType", Tag(0x0000, 0x0800)); public_tags.emplace("Status", Tag(0x0000, 0x0900)); public_tags.emplace("OffendingElement", Tag(0x0000, 0x0901)); public_tags.emplace("ErrorComment", Tag(0x0000, 0x0902)); public_tags.emplace("ErrorID", Tag(0x0000, 0x0903)); public_tags.emplace("AffectedSOPInstanceUID", Tag(0x0000, 0x1000)); public_tags.emplace("RequestedSOPInstanceUID", Tag(0x0000, 0x1001)); public_tags.emplace("EventTypeID", Tag(0x0000, 0x1002)); public_tags.emplace("AttributeIdentifierList", Tag(0x0000, 0x1005)); public_tags.emplace("ActionTypeID", Tag(0x0000, 0x1008)); public_tags.emplace("NumberOfRemainingSuboperations", Tag(0x0000, 0x1020)); public_tags.emplace("NumberOfCompletedSuboperations", Tag(0x0000, 0x1021)); public_tags.emplace("NumberOfFailedSuboperations", Tag(0x0000, 0x1022)); public_tags.emplace("NumberOfWarningSuboperations", Tag(0x0000, 0x1023)); public_tags.emplace("MoveOriginatorApplicationEntityTitle", Tag(0x0000, 0x1030)); public_tags.emplace("MoveOriginatorMessageID", Tag(0x0000, 0x1031)); } } }odil-0.11.0/src/odil/registry_0000.h000066400000000000000000000034211362244656000167260ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0000 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0000 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const CommandGroupLength(0x0000, 0x0000); Tag const AffectedSOPClassUID(0x0000, 0x0002); Tag const RequestedSOPClassUID(0x0000, 0x0003); Tag const CommandField(0x0000, 0x0100); Tag const MessageID(0x0000, 0x0110); Tag const MessageIDBeingRespondedTo(0x0000, 0x0120); Tag const MoveDestination(0x0000, 0x0600); Tag const Priority(0x0000, 0x0700); Tag const CommandDataSetType(0x0000, 0x0800); Tag const Status(0x0000, 0x0900); Tag const OffendingElement(0x0000, 0x0901); Tag const ErrorComment(0x0000, 0x0902); Tag const ErrorID(0x0000, 0x0903); Tag const AffectedSOPInstanceUID(0x0000, 0x1000); Tag const RequestedSOPInstanceUID(0x0000, 0x1001); Tag const EventTypeID(0x0000, 0x1002); Tag const AttributeIdentifierList(0x0000, 0x1005); Tag const ActionTypeID(0x0000, 0x1008); Tag const NumberOfRemainingSuboperations(0x0000, 0x1020); Tag const NumberOfCompletedSuboperations(0x0000, 0x1021); Tag const NumberOfFailedSuboperations(0x0000, 0x1022); Tag const NumberOfWarningSuboperations(0x0000, 0x1023); Tag const MoveOriginatorApplicationEntityTitle(0x0000, 0x1030); Tag const MoveOriginatorMessageID(0x0000, 0x1031); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0000odil-0.11.0/src/odil/registry_0002.cpp000066400000000000000000000127671362244656000173000ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0002( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0002, 0x0000), ElementsDictionaryEntry("File Meta Information Group Length", "FileMetaInformationGroupLength", "UL", "1")); public_dictionary.emplace(Tag(0x0002, 0x0001), ElementsDictionaryEntry("File Meta Information Version", "FileMetaInformationVersion", "OB", "1")); public_dictionary.emplace(Tag(0x0002, 0x0002), ElementsDictionaryEntry("Media Storage SOP Class UID", "MediaStorageSOPClassUID", "UI", "1")); public_dictionary.emplace(Tag(0x0002, 0x0003), ElementsDictionaryEntry("Media Storage SOP Instance UID", "MediaStorageSOPInstanceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0002, 0x0010), ElementsDictionaryEntry("Transfer Syntax UID", "TransferSyntaxUID", "UI", "1")); public_dictionary.emplace(Tag(0x0002, 0x0012), ElementsDictionaryEntry("Implementation Class UID", "ImplementationClassUID", "UI", "1")); public_dictionary.emplace(Tag(0x0002, 0x0013), ElementsDictionaryEntry("Implementation Version Name", "ImplementationVersionName", "SH", "1")); public_dictionary.emplace(Tag(0x0002, 0x0016), ElementsDictionaryEntry("Source Application Entity Title", "SourceApplicationEntityTitle", "AE", "1")); public_dictionary.emplace(Tag(0x0002, 0x0017), ElementsDictionaryEntry("Sending Application Entity Title", "SendingApplicationEntityTitle", "AE", "1")); public_dictionary.emplace(Tag(0x0002, 0x0018), ElementsDictionaryEntry("Receiving Application Entity Title", "ReceivingApplicationEntityTitle", "AE", "1")); public_dictionary.emplace(Tag(0x0002, 0x0026), ElementsDictionaryEntry("Source Presentation Address", "SourcePresentationAddress", "UR", "1")); public_dictionary.emplace(Tag(0x0002, 0x0027), ElementsDictionaryEntry("Sending Presentation Address", "SendingPresentationAddress", "UR", "1")); public_dictionary.emplace(Tag(0x0002, 0x0028), ElementsDictionaryEntry("Receiving Presentation Address", "ReceivingPresentationAddress", "UR", "1")); public_dictionary.emplace(Tag(0x0002, 0x0031), ElementsDictionaryEntry("RTV Meta Information Version", "RTVMetaInformationVersion", "OB", "1")); public_dictionary.emplace(Tag(0x0002, 0x0032), ElementsDictionaryEntry("RTV Communication SOP Class UID", "RTVCommunicationSOPClassUID", "UI", "1")); public_dictionary.emplace(Tag(0x0002, 0x0033), ElementsDictionaryEntry("RTV Communication SOP Instance UID", "RTVCommunicationSOPInstanceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0002, 0x0035), ElementsDictionaryEntry("RTV Source Identifier", "RTVSourceIdentifier", "OB", "1")); public_dictionary.emplace(Tag(0x0002, 0x0036), ElementsDictionaryEntry("RTV Flow Identifier", "RTVFlowIdentifier", "OB", "1")); public_dictionary.emplace(Tag(0x0002, 0x0037), ElementsDictionaryEntry("RTV Flow RTP Sampling Rate", "RTVFlowRTPSamplingRate", "UL", "1")); public_dictionary.emplace(Tag(0x0002, 0x0038), ElementsDictionaryEntry("RTV Flow Actual Frame Duration", "RTVFlowActualFrameDuration", "FD", "1")); public_dictionary.emplace(Tag(0x0002, 0x0100), ElementsDictionaryEntry("Private Information Creator UID", "PrivateInformationCreatorUID", "UI", "1")); public_dictionary.emplace(Tag(0x0002, 0x0102), ElementsDictionaryEntry("Private Information", "PrivateInformation", "OB", "1")); public_tags.emplace("FileMetaInformationGroupLength", Tag(0x0002, 0x0000)); public_tags.emplace("FileMetaInformationVersion", Tag(0x0002, 0x0001)); public_tags.emplace("MediaStorageSOPClassUID", Tag(0x0002, 0x0002)); public_tags.emplace("MediaStorageSOPInstanceUID", Tag(0x0002, 0x0003)); public_tags.emplace("TransferSyntaxUID", Tag(0x0002, 0x0010)); public_tags.emplace("ImplementationClassUID", Tag(0x0002, 0x0012)); public_tags.emplace("ImplementationVersionName", Tag(0x0002, 0x0013)); public_tags.emplace("SourceApplicationEntityTitle", Tag(0x0002, 0x0016)); public_tags.emplace("SendingApplicationEntityTitle", Tag(0x0002, 0x0017)); public_tags.emplace("ReceivingApplicationEntityTitle", Tag(0x0002, 0x0018)); public_tags.emplace("SourcePresentationAddress", Tag(0x0002, 0x0026)); public_tags.emplace("SendingPresentationAddress", Tag(0x0002, 0x0027)); public_tags.emplace("ReceivingPresentationAddress", Tag(0x0002, 0x0028)); public_tags.emplace("RTVMetaInformationVersion", Tag(0x0002, 0x0031)); public_tags.emplace("RTVCommunicationSOPClassUID", Tag(0x0002, 0x0032)); public_tags.emplace("RTVCommunicationSOPInstanceUID", Tag(0x0002, 0x0033)); public_tags.emplace("RTVSourceIdentifier", Tag(0x0002, 0x0035)); public_tags.emplace("RTVFlowIdentifier", Tag(0x0002, 0x0036)); public_tags.emplace("RTVFlowRTPSamplingRate", Tag(0x0002, 0x0037)); public_tags.emplace("RTVFlowActualFrameDuration", Tag(0x0002, 0x0038)); public_tags.emplace("PrivateInformationCreatorUID", Tag(0x0002, 0x0100)); public_tags.emplace("PrivateInformation", Tag(0x0002, 0x0102)); } } }odil-0.11.0/src/odil/registry_0002.h000066400000000000000000000034731362244656000167370ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0002 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0002 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const FileMetaInformationGroupLength(0x0002, 0x0000); Tag const FileMetaInformationVersion(0x0002, 0x0001); Tag const MediaStorageSOPClassUID(0x0002, 0x0002); Tag const MediaStorageSOPInstanceUID(0x0002, 0x0003); Tag const TransferSyntaxUID(0x0002, 0x0010); Tag const ImplementationClassUID(0x0002, 0x0012); Tag const ImplementationVersionName(0x0002, 0x0013); Tag const SourceApplicationEntityTitle(0x0002, 0x0016); Tag const SendingApplicationEntityTitle(0x0002, 0x0017); Tag const ReceivingApplicationEntityTitle(0x0002, 0x0018); Tag const SourcePresentationAddress(0x0002, 0x0026); Tag const SendingPresentationAddress(0x0002, 0x0027); Tag const ReceivingPresentationAddress(0x0002, 0x0028); Tag const RTVMetaInformationVersion(0x0002, 0x0031); Tag const RTVCommunicationSOPClassUID(0x0002, 0x0032); Tag const RTVCommunicationSOPInstanceUID(0x0002, 0x0033); Tag const RTVSourceIdentifier(0x0002, 0x0035); Tag const RTVFlowIdentifier(0x0002, 0x0036); Tag const RTVFlowRTPSamplingRate(0x0002, 0x0037); Tag const RTVFlowActualFrameDuration(0x0002, 0x0038); Tag const PrivateInformationCreatorUID(0x0002, 0x0100); Tag const PrivateInformation(0x0002, 0x0102); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0002odil-0.11.0/src/odil/registry_0004.cpp000066400000000000000000000121101362244656000172600ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0004( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0004, 0x1130), ElementsDictionaryEntry("File-set ID", "FileSetID", "CS", "1")); public_dictionary.emplace(Tag(0x0004, 0x1141), ElementsDictionaryEntry("File-set Descriptor File ID", "FileSetDescriptorFileID", "CS", "1-8")); public_dictionary.emplace(Tag(0x0004, 0x1142), ElementsDictionaryEntry("Specific Character Set of File-set Descriptor File", "SpecificCharacterSetOfFileSetDescriptorFile", "CS", "1")); public_dictionary.emplace(Tag(0x0004, 0x1200), ElementsDictionaryEntry("Offset of the First Directory Record of the Root Directory Entity", "OffsetOfTheFirstDirectoryRecordOfTheRootDirectoryEntity", "UL", "1")); public_dictionary.emplace(Tag(0x0004, 0x1202), ElementsDictionaryEntry("Offset of the Last Directory Record of the Root Directory Entity", "OffsetOfTheLastDirectoryRecordOfTheRootDirectoryEntity", "UL", "1")); public_dictionary.emplace(Tag(0x0004, 0x1212), ElementsDictionaryEntry("File-set Consistency Flag", "FileSetConsistencyFlag", "US", "1")); public_dictionary.emplace(Tag(0x0004, 0x1220), ElementsDictionaryEntry("Directory Record Sequence", "DirectoryRecordSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0004, 0x1400), ElementsDictionaryEntry("Offset of the Next Directory Record", "OffsetOfTheNextDirectoryRecord", "UL", "1")); public_dictionary.emplace(Tag(0x0004, 0x1410), ElementsDictionaryEntry("Record In-use Flag", "RecordInUseFlag", "US", "1")); public_dictionary.emplace(Tag(0x0004, 0x1420), ElementsDictionaryEntry("Offset of Referenced Lower-Level Directory Entity", "OffsetOfReferencedLowerLevelDirectoryEntity", "UL", "1")); public_dictionary.emplace(Tag(0x0004, 0x1430), ElementsDictionaryEntry("Directory Record Type", "DirectoryRecordType", "CS", "1")); public_dictionary.emplace(Tag(0x0004, 0x1432), ElementsDictionaryEntry("Private Record UID", "PrivateRecordUID", "UI", "1")); public_dictionary.emplace(Tag(0x0004, 0x1500), ElementsDictionaryEntry("Referenced File ID", "ReferencedFileID", "CS", "1-8")); public_dictionary.emplace(Tag(0x0004, 0x1504), ElementsDictionaryEntry("MRDR Directory Record Offset", "MRDRDirectoryRecordOffset", "UL", "1")); public_dictionary.emplace(Tag(0x0004, 0x1510), ElementsDictionaryEntry("Referenced SOP Class UID in File", "ReferencedSOPClassUIDInFile", "UI", "1")); public_dictionary.emplace(Tag(0x0004, 0x1511), ElementsDictionaryEntry("Referenced SOP Instance UID in File", "ReferencedSOPInstanceUIDInFile", "UI", "1")); public_dictionary.emplace(Tag(0x0004, 0x1512), ElementsDictionaryEntry("Referenced Transfer Syntax UID in File", "ReferencedTransferSyntaxUIDInFile", "UI", "1")); public_dictionary.emplace(Tag(0x0004, 0x151a), ElementsDictionaryEntry("Referenced Related General SOP Class UID in File", "ReferencedRelatedGeneralSOPClassUIDInFile", "UI", "1-n")); public_dictionary.emplace(Tag(0x0004, 0x1600), ElementsDictionaryEntry("Number of References", "NumberOfReferences", "UL", "1")); public_tags.emplace("FileSetID", Tag(0x0004, 0x1130)); public_tags.emplace("FileSetDescriptorFileID", Tag(0x0004, 0x1141)); public_tags.emplace("SpecificCharacterSetOfFileSetDescriptorFile", Tag(0x0004, 0x1142)); public_tags.emplace("OffsetOfTheFirstDirectoryRecordOfTheRootDirectoryEntity", Tag(0x0004, 0x1200)); public_tags.emplace("OffsetOfTheLastDirectoryRecordOfTheRootDirectoryEntity", Tag(0x0004, 0x1202)); public_tags.emplace("FileSetConsistencyFlag", Tag(0x0004, 0x1212)); public_tags.emplace("DirectoryRecordSequence", Tag(0x0004, 0x1220)); public_tags.emplace("OffsetOfTheNextDirectoryRecord", Tag(0x0004, 0x1400)); public_tags.emplace("RecordInUseFlag", Tag(0x0004, 0x1410)); public_tags.emplace("OffsetOfReferencedLowerLevelDirectoryEntity", Tag(0x0004, 0x1420)); public_tags.emplace("DirectoryRecordType", Tag(0x0004, 0x1430)); public_tags.emplace("PrivateRecordUID", Tag(0x0004, 0x1432)); public_tags.emplace("ReferencedFileID", Tag(0x0004, 0x1500)); public_tags.emplace("MRDRDirectoryRecordOffset", Tag(0x0004, 0x1504)); public_tags.emplace("ReferencedSOPClassUIDInFile", Tag(0x0004, 0x1510)); public_tags.emplace("ReferencedSOPInstanceUIDInFile", Tag(0x0004, 0x1511)); public_tags.emplace("ReferencedTransferSyntaxUIDInFile", Tag(0x0004, 0x1512)); public_tags.emplace("ReferencedRelatedGeneralSOPClassUIDInFile", Tag(0x0004, 0x151a)); public_tags.emplace("NumberOfReferences", Tag(0x0004, 0x1600)); } } }odil-0.11.0/src/odil/registry_0004.h000066400000000000000000000033411362244656000167330ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0004 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0004 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const FileSetID(0x0004, 0x1130); Tag const FileSetDescriptorFileID(0x0004, 0x1141); Tag const SpecificCharacterSetOfFileSetDescriptorFile(0x0004, 0x1142); Tag const OffsetOfTheFirstDirectoryRecordOfTheRootDirectoryEntity(0x0004, 0x1200); Tag const OffsetOfTheLastDirectoryRecordOfTheRootDirectoryEntity(0x0004, 0x1202); Tag const FileSetConsistencyFlag(0x0004, 0x1212); Tag const DirectoryRecordSequence(0x0004, 0x1220); Tag const OffsetOfTheNextDirectoryRecord(0x0004, 0x1400); Tag const RecordInUseFlag(0x0004, 0x1410); Tag const OffsetOfReferencedLowerLevelDirectoryEntity(0x0004, 0x1420); Tag const DirectoryRecordType(0x0004, 0x1430); Tag const PrivateRecordUID(0x0004, 0x1432); Tag const ReferencedFileID(0x0004, 0x1500); Tag const MRDRDirectoryRecordOffset(0x0004, 0x1504); Tag const ReferencedSOPClassUIDInFile(0x0004, 0x1510); Tag const ReferencedSOPInstanceUIDInFile(0x0004, 0x1511); Tag const ReferencedTransferSyntaxUIDInFile(0x0004, 0x1512); Tag const ReferencedRelatedGeneralSOPClassUIDInFile(0x0004, 0x151a); Tag const NumberOfReferences(0x0004, 0x1600); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0004odil-0.11.0/src/odil/registry_0008.cpp000066400000000000000000001355461362244656000173070ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0008( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0008, 0x0001), ElementsDictionaryEntry("Length to End", "LengthToEnd", "UL", "1")); public_dictionary.emplace(Tag(0x0008, 0x0005), ElementsDictionaryEntry("Specific Character Set", "SpecificCharacterSet", "CS", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x0006), ElementsDictionaryEntry("Language Code Sequence", "LanguageCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x0008), ElementsDictionaryEntry("Image Type", "ImageType", "CS", "2-n")); public_dictionary.emplace(Tag(0x0008, 0x0010), ElementsDictionaryEntry("Recognition Code", "RecognitionCode", "SH", "1")); public_dictionary.emplace(Tag(0x0008, 0x0012), ElementsDictionaryEntry("Instance Creation Date", "InstanceCreationDate", "DA", "1")); public_dictionary.emplace(Tag(0x0008, 0x0013), ElementsDictionaryEntry("Instance Creation Time", "InstanceCreationTime", "TM", "1")); public_dictionary.emplace(Tag(0x0008, 0x0014), ElementsDictionaryEntry("Instance Creator UID", "InstanceCreatorUID", "UI", "1")); public_dictionary.emplace(Tag(0x0008, 0x0015), ElementsDictionaryEntry("Instance Coercion DateTime", "InstanceCoercionDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0008, 0x0016), ElementsDictionaryEntry("SOP Class UID", "SOPClassUID", "UI", "1")); public_dictionary.emplace(Tag(0x0008, 0x0018), ElementsDictionaryEntry("SOP Instance UID", "SOPInstanceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0008, 0x001a), ElementsDictionaryEntry("Related General SOP Class UID", "RelatedGeneralSOPClassUID", "UI", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x001b), ElementsDictionaryEntry("Original Specialized SOP Class UID", "OriginalSpecializedSOPClassUID", "UI", "1")); public_dictionary.emplace(Tag(0x0008, 0x0020), ElementsDictionaryEntry("Study Date", "StudyDate", "DA", "1")); public_dictionary.emplace(Tag(0x0008, 0x0021), ElementsDictionaryEntry("Series Date", "SeriesDate", "DA", "1")); public_dictionary.emplace(Tag(0x0008, 0x0022), ElementsDictionaryEntry("Acquisition Date", "AcquisitionDate", "DA", "1")); public_dictionary.emplace(Tag(0x0008, 0x0023), ElementsDictionaryEntry("Content Date", "ContentDate", "DA", "1")); public_dictionary.emplace(Tag(0x0008, 0x0024), ElementsDictionaryEntry("Overlay Date", "OverlayDate", "DA", "1")); public_dictionary.emplace(Tag(0x0008, 0x0025), ElementsDictionaryEntry("Curve Date", "CurveDate", "DA", "1")); public_dictionary.emplace(Tag(0x0008, 0x002a), ElementsDictionaryEntry("Acquisition DateTime", "AcquisitionDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0008, 0x0030), ElementsDictionaryEntry("Study Time", "StudyTime", "TM", "1")); public_dictionary.emplace(Tag(0x0008, 0x0031), ElementsDictionaryEntry("Series Time", "SeriesTime", "TM", "1")); public_dictionary.emplace(Tag(0x0008, 0x0032), ElementsDictionaryEntry("Acquisition Time", "AcquisitionTime", "TM", "1")); public_dictionary.emplace(Tag(0x0008, 0x0033), ElementsDictionaryEntry("Content Time", "ContentTime", "TM", "1")); public_dictionary.emplace(Tag(0x0008, 0x0034), ElementsDictionaryEntry("Overlay Time", "OverlayTime", "TM", "1")); public_dictionary.emplace(Tag(0x0008, 0x0035), ElementsDictionaryEntry("Curve Time", "CurveTime", "TM", "1")); public_dictionary.emplace(Tag(0x0008, 0x0040), ElementsDictionaryEntry("Data Set Type", "DataSetType", "US", "1")); public_dictionary.emplace(Tag(0x0008, 0x0041), ElementsDictionaryEntry("Data Set Subtype", "DataSetSubtype", "LO", "1")); public_dictionary.emplace(Tag(0x0008, 0x0042), ElementsDictionaryEntry("Nuclear Medicine Series Type", "NuclearMedicineSeriesType", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x0050), ElementsDictionaryEntry("Accession Number", "AccessionNumber", "SH", "1")); public_dictionary.emplace(Tag(0x0008, 0x0051), ElementsDictionaryEntry("Issuer of Accession Number Sequence", "IssuerOfAccessionNumberSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x0052), ElementsDictionaryEntry("Query/Retrieve Level", "QueryRetrieveLevel", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x0053), ElementsDictionaryEntry("Query/Retrieve View", "QueryRetrieveView", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x0054), ElementsDictionaryEntry("Retrieve AE Title", "RetrieveAETitle", "AE", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x0055), ElementsDictionaryEntry("Station AE Title", "StationAETitle", "AE", "1")); public_dictionary.emplace(Tag(0x0008, 0x0056), ElementsDictionaryEntry("Instance Availability", "InstanceAvailability", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x0058), ElementsDictionaryEntry("Failed SOP Instance UID List", "FailedSOPInstanceUIDList", "UI", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x0060), ElementsDictionaryEntry("Modality", "Modality", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x0061), ElementsDictionaryEntry("Modalities in Study", "ModalitiesInStudy", "CS", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x0062), ElementsDictionaryEntry("SOP Classes in Study", "SOPClassesInStudy", "UI", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x0063), ElementsDictionaryEntry("Anatomic Regions in Study Code Sequence", "AnatomicRegionsInStudyCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x0064), ElementsDictionaryEntry("Conversion Type", "ConversionType", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x0068), ElementsDictionaryEntry("Presentation Intent Type", "PresentationIntentType", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x0070), ElementsDictionaryEntry("Manufacturer", "Manufacturer", "LO", "1")); public_dictionary.emplace(Tag(0x0008, 0x0080), ElementsDictionaryEntry("Institution Name", "InstitutionName", "LO", "1")); public_dictionary.emplace(Tag(0x0008, 0x0081), ElementsDictionaryEntry("Institution Address", "InstitutionAddress", "ST", "1")); public_dictionary.emplace(Tag(0x0008, 0x0082), ElementsDictionaryEntry("Institution Code Sequence", "InstitutionCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x0090), ElementsDictionaryEntry("Referring Physician's Name", "ReferringPhysicianName", "PN", "1")); public_dictionary.emplace(Tag(0x0008, 0x0092), ElementsDictionaryEntry("Referring Physician's Address", "ReferringPhysicianAddress", "ST", "1")); public_dictionary.emplace(Tag(0x0008, 0x0094), ElementsDictionaryEntry("Referring Physician's Telephone Numbers", "ReferringPhysicianTelephoneNumbers", "SH", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x0096), ElementsDictionaryEntry("Referring Physician Identification Sequence", "ReferringPhysicianIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x009c), ElementsDictionaryEntry("Consulting Physician's Name", "ConsultingPhysicianName", "PN", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x009d), ElementsDictionaryEntry("Consulting Physician Identification Sequence", "ConsultingPhysicianIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x0100), ElementsDictionaryEntry("Code Value", "CodeValue", "SH", "1")); public_dictionary.emplace(Tag(0x0008, 0x0101), ElementsDictionaryEntry("Extended Code Value", "ExtendedCodeValue", "LO", "1")); public_dictionary.emplace(Tag(0x0008, 0x0102), ElementsDictionaryEntry("Coding Scheme Designator", "CodingSchemeDesignator", "SH", "1")); public_dictionary.emplace(Tag(0x0008, 0x0103), ElementsDictionaryEntry("Coding Scheme Version", "CodingSchemeVersion", "SH", "1")); public_dictionary.emplace(Tag(0x0008, 0x0104), ElementsDictionaryEntry("Code Meaning", "CodeMeaning", "LO", "1")); public_dictionary.emplace(Tag(0x0008, 0x0105), ElementsDictionaryEntry("Mapping Resource", "MappingResource", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x0106), ElementsDictionaryEntry("Context Group Version", "ContextGroupVersion", "DT", "1")); public_dictionary.emplace(Tag(0x0008, 0x0107), ElementsDictionaryEntry("Context Group Local Version", "ContextGroupLocalVersion", "DT", "1")); public_dictionary.emplace(Tag(0x0008, 0x0108), ElementsDictionaryEntry("Extended Code Meaning", "ExtendedCodeMeaning", "LT", "1")); public_dictionary.emplace(Tag(0x0008, 0x0109), ElementsDictionaryEntry("Coding Scheme Resources Sequence", "CodingSchemeResourcesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x010a), ElementsDictionaryEntry("Coding Scheme URL Type", "CodingSchemeURLType", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x010b), ElementsDictionaryEntry("Context Group Extension Flag", "ContextGroupExtensionFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x010c), ElementsDictionaryEntry("Coding Scheme UID", "CodingSchemeUID", "UI", "1")); public_dictionary.emplace(Tag(0x0008, 0x010d), ElementsDictionaryEntry("Context Group Extension Creator UID", "ContextGroupExtensionCreatorUID", "UI", "1")); public_dictionary.emplace(Tag(0x0008, 0x010e), ElementsDictionaryEntry("Coding Scheme URL", "CodingSchemeURL", "UR", "1")); public_dictionary.emplace(Tag(0x0008, 0x010f), ElementsDictionaryEntry("Context Identifier", "ContextIdentifier", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x0110), ElementsDictionaryEntry("Coding Scheme Identification Sequence", "CodingSchemeIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x0112), ElementsDictionaryEntry("Coding Scheme Registry", "CodingSchemeRegistry", "LO", "1")); public_dictionary.emplace(Tag(0x0008, 0x0114), ElementsDictionaryEntry("Coding Scheme External ID", "CodingSchemeExternalID", "ST", "1")); public_dictionary.emplace(Tag(0x0008, 0x0115), ElementsDictionaryEntry("Coding Scheme Name", "CodingSchemeName", "ST", "1")); public_dictionary.emplace(Tag(0x0008, 0x0116), ElementsDictionaryEntry("Coding Scheme Responsible Organization", "CodingSchemeResponsibleOrganization", "ST", "1")); public_dictionary.emplace(Tag(0x0008, 0x0117), ElementsDictionaryEntry("Context UID", "ContextUID", "UI", "1")); public_dictionary.emplace(Tag(0x0008, 0x0118), ElementsDictionaryEntry("Mapping Resource UID", "MappingResourceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0008, 0x0119), ElementsDictionaryEntry("Long Code Value", "LongCodeValue", "UC", "1")); public_dictionary.emplace(Tag(0x0008, 0x0120), ElementsDictionaryEntry("URN Code Value", "URNCodeValue", "UR", "1")); public_dictionary.emplace(Tag(0x0008, 0x0121), ElementsDictionaryEntry("Equivalent Code Sequence", "EquivalentCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x0122), ElementsDictionaryEntry("Mapping Resource Name", "MappingResourceName", "LO", "1")); public_dictionary.emplace(Tag(0x0008, 0x0123), ElementsDictionaryEntry("Context Group Identification Sequence", "ContextGroupIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x0124), ElementsDictionaryEntry("Mapping Resource Identification Sequence", "MappingResourceIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x0201), ElementsDictionaryEntry("Timezone Offset From UTC", "TimezoneOffsetFromUTC", "SH", "1")); public_dictionary.emplace(Tag(0x0008, 0x0220), ElementsDictionaryEntry("Responsible Group Code Sequence", "ResponsibleGroupCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x0221), ElementsDictionaryEntry("Equipment Modality", "EquipmentModality", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x0222), ElementsDictionaryEntry("Manufacturer's Related Model Group", "ManufacturerRelatedModelGroup", "LO", "1")); public_dictionary.emplace(Tag(0x0008, 0x0300), ElementsDictionaryEntry("Private Data Element Characteristics Sequence", "PrivateDataElementCharacteristicsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x0301), ElementsDictionaryEntry("Private Group Reference", "PrivateGroupReference", "US", "1")); public_dictionary.emplace(Tag(0x0008, 0x0302), ElementsDictionaryEntry("Private Creator Reference", "PrivateCreatorReference", "LO", "1")); public_dictionary.emplace(Tag(0x0008, 0x0303), ElementsDictionaryEntry("Block Identifying Information Status", "BlockIdentifyingInformationStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x0304), ElementsDictionaryEntry("Nonidentifying Private Elements", "NonidentifyingPrivateElements", "US", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x0306), ElementsDictionaryEntry("Identifying Private Elements", "IdentifyingPrivateElements", "US", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x0305), ElementsDictionaryEntry("Deidentification Action Sequence", "DeidentificationActionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x0307), ElementsDictionaryEntry("Deidentification Action", "DeidentificationAction", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x0308), ElementsDictionaryEntry("Private Data Element", "PrivateDataElement", "US", "1")); public_dictionary.emplace(Tag(0x0008, 0x0309), ElementsDictionaryEntry("Private Data Element Value Multiplicity", "PrivateDataElementValueMultiplicity", "UL", "1-3")); public_dictionary.emplace(Tag(0x0008, 0x030a), ElementsDictionaryEntry("Private Data Element Value Representation", "PrivateDataElementValueRepresentation", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x030b), ElementsDictionaryEntry("Private Data Element Number of Items", "PrivateDataElementNumberOfItems", "UL", "1-2")); public_dictionary.emplace(Tag(0x0008, 0x030c), ElementsDictionaryEntry("Private Data Element Name", "PrivateDataElementName", "UC", "1")); public_dictionary.emplace(Tag(0x0008, 0x030d), ElementsDictionaryEntry("Private Data Element Keyword", "PrivateDataElementKeyword", "UC", "1")); public_dictionary.emplace(Tag(0x0008, 0x030e), ElementsDictionaryEntry("Private Data Element Description", "PrivateDataElementDescription", "UT", "1")); public_dictionary.emplace(Tag(0x0008, 0x030f), ElementsDictionaryEntry("Private Data Element Encoding", "PrivateDataElementEncoding", "UT", "1")); public_dictionary.emplace(Tag(0x0008, 0x0310), ElementsDictionaryEntry("Private Data Element Definition Sequence", "PrivateDataElementDefinitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1000), ElementsDictionaryEntry("Network ID", "NetworkID", "AE", "1")); public_dictionary.emplace(Tag(0x0008, 0x1010), ElementsDictionaryEntry("Station Name", "StationName", "SH", "1")); public_dictionary.emplace(Tag(0x0008, 0x1030), ElementsDictionaryEntry("Study Description", "StudyDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0008, 0x1032), ElementsDictionaryEntry("Procedure Code Sequence", "ProcedureCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x103e), ElementsDictionaryEntry("Series Description", "SeriesDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0008, 0x103f), ElementsDictionaryEntry("Series Description Code Sequence", "SeriesDescriptionCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1040), ElementsDictionaryEntry("Institutional Department Name", "InstitutionalDepartmentName", "LO", "1")); public_dictionary.emplace(Tag(0x0008, 0x1041), ElementsDictionaryEntry("Institutional Department Type Code Sequence", "InstitutionalDepartmentTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1048), ElementsDictionaryEntry("Physician(s) of Record", "PhysiciansOfRecord", "PN", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x1049), ElementsDictionaryEntry("Physician(s) of Record Identification Sequence", "PhysiciansOfRecordIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1050), ElementsDictionaryEntry("Performing Physician's Name", "PerformingPhysicianName", "PN", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x1052), ElementsDictionaryEntry("Performing Physician Identification Sequence", "PerformingPhysicianIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1060), ElementsDictionaryEntry("Name of Physician(s) Reading Study", "NameOfPhysiciansReadingStudy", "PN", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x1062), ElementsDictionaryEntry("Physician(s) Reading Study Identification Sequence", "PhysiciansReadingStudyIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1070), ElementsDictionaryEntry("Operators' Name", "OperatorsName", "PN", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x1072), ElementsDictionaryEntry("Operator Identification Sequence", "OperatorIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1080), ElementsDictionaryEntry("Admitting Diagnoses Description", "AdmittingDiagnosesDescription", "LO", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x1084), ElementsDictionaryEntry("Admitting Diagnoses Code Sequence", "AdmittingDiagnosesCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1090), ElementsDictionaryEntry("Manufacturer's Model Name", "ManufacturerModelName", "LO", "1")); public_dictionary.emplace(Tag(0x0008, 0x1100), ElementsDictionaryEntry("Referenced Results Sequence", "ReferencedResultsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1110), ElementsDictionaryEntry("Referenced Study Sequence", "ReferencedStudySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1111), ElementsDictionaryEntry("Referenced Performed Procedure Step Sequence", "ReferencedPerformedProcedureStepSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1115), ElementsDictionaryEntry("Referenced Series Sequence", "ReferencedSeriesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1120), ElementsDictionaryEntry("Referenced Patient Sequence", "ReferencedPatientSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1125), ElementsDictionaryEntry("Referenced Visit Sequence", "ReferencedVisitSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1130), ElementsDictionaryEntry("Referenced Overlay Sequence", "ReferencedOverlaySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1134), ElementsDictionaryEntry("Referenced Stereometric Instance Sequence", "ReferencedStereometricInstanceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x113a), ElementsDictionaryEntry("Referenced Waveform Sequence", "ReferencedWaveformSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1140), ElementsDictionaryEntry("Referenced Image Sequence", "ReferencedImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1145), ElementsDictionaryEntry("Referenced Curve Sequence", "ReferencedCurveSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x114a), ElementsDictionaryEntry("Referenced Instance Sequence", "ReferencedInstanceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x114b), ElementsDictionaryEntry("Referenced Real World Value Mapping Instance Sequence", "ReferencedRealWorldValueMappingInstanceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1150), ElementsDictionaryEntry("Referenced SOP Class UID", "ReferencedSOPClassUID", "UI", "1")); public_dictionary.emplace(Tag(0x0008, 0x1155), ElementsDictionaryEntry("Referenced SOP Instance UID", "ReferencedSOPInstanceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0008, 0x1156), ElementsDictionaryEntry("Definition Source Sequence", "DefinitionSourceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x115a), ElementsDictionaryEntry("SOP Classes Supported", "SOPClassesSupported", "UI", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x1160), ElementsDictionaryEntry("Referenced Frame Number", "ReferencedFrameNumber", "IS", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x1161), ElementsDictionaryEntry("Simple Frame List", "SimpleFrameList", "UL", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x1162), ElementsDictionaryEntry("Calculated Frame List", "CalculatedFrameList", "UL", "3-3n")); public_dictionary.emplace(Tag(0x0008, 0x1163), ElementsDictionaryEntry("Time Range", "TimeRange", "FD", "2")); public_dictionary.emplace(Tag(0x0008, 0x1164), ElementsDictionaryEntry("Frame Extraction Sequence", "FrameExtractionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1167), ElementsDictionaryEntry("Multi-frame Source SOP Instance UID", "MultiFrameSourceSOPInstanceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0008, 0x1190), ElementsDictionaryEntry("Retrieve URL", "RetrieveURL", "UR", "1")); public_dictionary.emplace(Tag(0x0008, 0x1195), ElementsDictionaryEntry("Transaction UID", "TransactionUID", "UI", "1")); public_dictionary.emplace(Tag(0x0008, 0x1196), ElementsDictionaryEntry("Warning Reason", "WarningReason", "US", "1")); public_dictionary.emplace(Tag(0x0008, 0x1197), ElementsDictionaryEntry("Failure Reason", "FailureReason", "US", "1")); public_dictionary.emplace(Tag(0x0008, 0x1198), ElementsDictionaryEntry("Failed SOP Sequence", "FailedSOPSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1199), ElementsDictionaryEntry("Referenced SOP Sequence", "ReferencedSOPSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x119a), ElementsDictionaryEntry("Other Failures Sequence", "OtherFailuresSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1200), ElementsDictionaryEntry("Studies Containing Other Referenced Instances Sequence", "StudiesContainingOtherReferencedInstancesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x1250), ElementsDictionaryEntry("Related Series Sequence", "RelatedSeriesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2110), ElementsDictionaryEntry("Lossy Image Compression (Retired)", "LossyImageCompressionRetired", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x2111), ElementsDictionaryEntry("Derivation Description", "DerivationDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0008, 0x2112), ElementsDictionaryEntry("Source Image Sequence", "SourceImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2120), ElementsDictionaryEntry("Stage Name", "StageName", "SH", "1")); public_dictionary.emplace(Tag(0x0008, 0x2122), ElementsDictionaryEntry("Stage Number", "StageNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0008, 0x2124), ElementsDictionaryEntry("Number of Stages", "NumberOfStages", "IS", "1")); public_dictionary.emplace(Tag(0x0008, 0x2127), ElementsDictionaryEntry("View Name", "ViewName", "SH", "1")); public_dictionary.emplace(Tag(0x0008, 0x2128), ElementsDictionaryEntry("View Number", "ViewNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0008, 0x2129), ElementsDictionaryEntry("Number of Event Timers", "NumberOfEventTimers", "IS", "1")); public_dictionary.emplace(Tag(0x0008, 0x212a), ElementsDictionaryEntry("Number of Views in Stage", "NumberOfViewsInStage", "IS", "1")); public_dictionary.emplace(Tag(0x0008, 0x2130), ElementsDictionaryEntry("Event Elapsed Time(s)", "EventElapsedTimes", "DS", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x2132), ElementsDictionaryEntry("Event Timer Name(s)", "EventTimerNames", "LO", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x2133), ElementsDictionaryEntry("Event Timer Sequence", "EventTimerSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2134), ElementsDictionaryEntry("Event Time Offset", "EventTimeOffset", "FD", "1")); public_dictionary.emplace(Tag(0x0008, 0x2135), ElementsDictionaryEntry("Event Code Sequence", "EventCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2142), ElementsDictionaryEntry("Start Trim", "StartTrim", "IS", "1")); public_dictionary.emplace(Tag(0x0008, 0x2143), ElementsDictionaryEntry("Stop Trim", "StopTrim", "IS", "1")); public_dictionary.emplace(Tag(0x0008, 0x2144), ElementsDictionaryEntry("Recommended Display Frame Rate", "RecommendedDisplayFrameRate", "IS", "1")); public_dictionary.emplace(Tag(0x0008, 0x2200), ElementsDictionaryEntry("Transducer Position", "TransducerPosition", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x2204), ElementsDictionaryEntry("Transducer Orientation", "TransducerOrientation", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x2208), ElementsDictionaryEntry("Anatomic Structure", "AnatomicStructure", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x2218), ElementsDictionaryEntry("Anatomic Region Sequence", "AnatomicRegionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2220), ElementsDictionaryEntry("Anatomic Region Modifier Sequence", "AnatomicRegionModifierSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2228), ElementsDictionaryEntry("Primary Anatomic Structure Sequence", "PrimaryAnatomicStructureSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2229), ElementsDictionaryEntry("Anatomic Structure, Space or Region Sequence", "AnatomicStructureSpaceOrRegionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2230), ElementsDictionaryEntry("Primary Anatomic Structure Modifier Sequence", "PrimaryAnatomicStructureModifierSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2240), ElementsDictionaryEntry("Transducer Position Sequence", "TransducerPositionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2242), ElementsDictionaryEntry("Transducer Position Modifier Sequence", "TransducerPositionModifierSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2244), ElementsDictionaryEntry("Transducer Orientation Sequence", "TransducerOrientationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2246), ElementsDictionaryEntry("Transducer Orientation Modifier Sequence", "TransducerOrientationModifierSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2251), ElementsDictionaryEntry("Anatomic Structure Space Or Region Code Sequence (Trial)", "AnatomicStructureSpaceOrRegionCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2253), ElementsDictionaryEntry("Anatomic Portal Of Entrance Code Sequence (Trial)", "AnatomicPortalOfEntranceCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2255), ElementsDictionaryEntry("Anatomic Approach Direction Code Sequence (Trial)", "AnatomicApproachDirectionCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2256), ElementsDictionaryEntry("Anatomic Perspective Description (Trial)", "AnatomicPerspectiveDescriptionTrial", "ST", "1")); public_dictionary.emplace(Tag(0x0008, 0x2257), ElementsDictionaryEntry("Anatomic Perspective Code Sequence (Trial)", "AnatomicPerspectiveCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x2258), ElementsDictionaryEntry("Anatomic Location Of Examining Instrument Description (Trial)", "AnatomicLocationOfExaminingInstrumentDescriptionTrial", "ST", "1")); public_dictionary.emplace(Tag(0x0008, 0x2259), ElementsDictionaryEntry("Anatomic Location Of Examining Instrument Code Sequence (Trial)", "AnatomicLocationOfExaminingInstrumentCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x225a), ElementsDictionaryEntry("Anatomic Structure Space Or Region Modifier Code Sequence (Trial)", "AnatomicStructureSpaceOrRegionModifierCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x225c), ElementsDictionaryEntry("On Axis Background Anatomic Structure Code Sequence (Trial)", "OnAxisBackgroundAnatomicStructureCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x3001), ElementsDictionaryEntry("Alternate Representation Sequence", "AlternateRepresentationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x3002), ElementsDictionaryEntry("Available Transfer Syntax UID", "AvailableTransferSyntaxUID", "UI", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x3010), ElementsDictionaryEntry("Irradiation Event UID", "IrradiationEventUID", "UI", "1-n")); public_dictionary.emplace(Tag(0x0008, 0x3011), ElementsDictionaryEntry("Source Irradiation Event Sequence", "SourceIrradiationEventSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x3012), ElementsDictionaryEntry("Radiopharmaceutical Administration Event UID", "RadiopharmaceuticalAdministrationEventUID", "UI", "1")); public_dictionary.emplace(Tag(0x0008, 0x4000), ElementsDictionaryEntry("Identifying Comments", "IdentifyingComments", "LT", "1")); public_dictionary.emplace(Tag(0x0008, 0x9007), ElementsDictionaryEntry("Frame Type", "FrameType", "CS", "4")); public_dictionary.emplace(Tag(0x0008, 0x9092), ElementsDictionaryEntry("Referenced Image Evidence Sequence", "ReferencedImageEvidenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x9121), ElementsDictionaryEntry("Referenced Raw Data Sequence", "ReferencedRawDataSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x9123), ElementsDictionaryEntry("Creator-Version UID", "CreatorVersionUID", "UI", "1")); public_dictionary.emplace(Tag(0x0008, 0x9124), ElementsDictionaryEntry("Derivation Image Sequence", "DerivationImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x9154), ElementsDictionaryEntry("Source Image Evidence Sequence", "SourceImageEvidenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x9205), ElementsDictionaryEntry("Pixel Presentation", "PixelPresentation", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x9206), ElementsDictionaryEntry("Volumetric Properties", "VolumetricProperties", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x9207), ElementsDictionaryEntry("Volume Based Calculation Technique", "VolumeBasedCalculationTechnique", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x9208), ElementsDictionaryEntry("Complex Image Component", "ComplexImageComponent", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x9209), ElementsDictionaryEntry("Acquisition Contrast", "AcquisitionContrast", "CS", "1")); public_dictionary.emplace(Tag(0x0008, 0x9215), ElementsDictionaryEntry("Derivation Code Sequence", "DerivationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x9237), ElementsDictionaryEntry("Referenced Presentation State Sequence", "ReferencedPresentationStateSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x9410), ElementsDictionaryEntry("Referenced Other Plane Sequence", "ReferencedOtherPlaneSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x9458), ElementsDictionaryEntry("Frame Display Sequence", "FrameDisplaySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0008, 0x9459), ElementsDictionaryEntry("Recommended Display Frame Rate in Float", "RecommendedDisplayFrameRateInFloat", "FL", "1")); public_dictionary.emplace(Tag(0x0008, 0x9460), ElementsDictionaryEntry("Skip Frame Range Flag", "SkipFrameRangeFlag", "CS", "1")); public_tags.emplace("LengthToEnd", Tag(0x0008, 0x0001)); public_tags.emplace("SpecificCharacterSet", Tag(0x0008, 0x0005)); public_tags.emplace("LanguageCodeSequence", Tag(0x0008, 0x0006)); public_tags.emplace("ImageType", Tag(0x0008, 0x0008)); public_tags.emplace("RecognitionCode", Tag(0x0008, 0x0010)); public_tags.emplace("InstanceCreationDate", Tag(0x0008, 0x0012)); public_tags.emplace("InstanceCreationTime", Tag(0x0008, 0x0013)); public_tags.emplace("InstanceCreatorUID", Tag(0x0008, 0x0014)); public_tags.emplace("InstanceCoercionDateTime", Tag(0x0008, 0x0015)); public_tags.emplace("SOPClassUID", Tag(0x0008, 0x0016)); public_tags.emplace("SOPInstanceUID", Tag(0x0008, 0x0018)); public_tags.emplace("RelatedGeneralSOPClassUID", Tag(0x0008, 0x001a)); public_tags.emplace("OriginalSpecializedSOPClassUID", Tag(0x0008, 0x001b)); public_tags.emplace("StudyDate", Tag(0x0008, 0x0020)); public_tags.emplace("SeriesDate", Tag(0x0008, 0x0021)); public_tags.emplace("AcquisitionDate", Tag(0x0008, 0x0022)); public_tags.emplace("ContentDate", Tag(0x0008, 0x0023)); public_tags.emplace("OverlayDate", Tag(0x0008, 0x0024)); public_tags.emplace("CurveDate", Tag(0x0008, 0x0025)); public_tags.emplace("AcquisitionDateTime", Tag(0x0008, 0x002a)); public_tags.emplace("StudyTime", Tag(0x0008, 0x0030)); public_tags.emplace("SeriesTime", Tag(0x0008, 0x0031)); public_tags.emplace("AcquisitionTime", Tag(0x0008, 0x0032)); public_tags.emplace("ContentTime", Tag(0x0008, 0x0033)); public_tags.emplace("OverlayTime", Tag(0x0008, 0x0034)); public_tags.emplace("CurveTime", Tag(0x0008, 0x0035)); public_tags.emplace("DataSetType", Tag(0x0008, 0x0040)); public_tags.emplace("DataSetSubtype", Tag(0x0008, 0x0041)); public_tags.emplace("NuclearMedicineSeriesType", Tag(0x0008, 0x0042)); public_tags.emplace("AccessionNumber", Tag(0x0008, 0x0050)); public_tags.emplace("IssuerOfAccessionNumberSequence", Tag(0x0008, 0x0051)); public_tags.emplace("QueryRetrieveLevel", Tag(0x0008, 0x0052)); public_tags.emplace("QueryRetrieveView", Tag(0x0008, 0x0053)); public_tags.emplace("RetrieveAETitle", Tag(0x0008, 0x0054)); public_tags.emplace("StationAETitle", Tag(0x0008, 0x0055)); public_tags.emplace("InstanceAvailability", Tag(0x0008, 0x0056)); public_tags.emplace("FailedSOPInstanceUIDList", Tag(0x0008, 0x0058)); public_tags.emplace("Modality", Tag(0x0008, 0x0060)); public_tags.emplace("ModalitiesInStudy", Tag(0x0008, 0x0061)); public_tags.emplace("SOPClassesInStudy", Tag(0x0008, 0x0062)); public_tags.emplace("AnatomicRegionsInStudyCodeSequence", Tag(0x0008, 0x0063)); public_tags.emplace("ConversionType", Tag(0x0008, 0x0064)); public_tags.emplace("PresentationIntentType", Tag(0x0008, 0x0068)); public_tags.emplace("Manufacturer", Tag(0x0008, 0x0070)); public_tags.emplace("InstitutionName", Tag(0x0008, 0x0080)); public_tags.emplace("InstitutionAddress", Tag(0x0008, 0x0081)); public_tags.emplace("InstitutionCodeSequence", Tag(0x0008, 0x0082)); public_tags.emplace("ReferringPhysicianName", Tag(0x0008, 0x0090)); public_tags.emplace("ReferringPhysicianAddress", Tag(0x0008, 0x0092)); public_tags.emplace("ReferringPhysicianTelephoneNumbers", Tag(0x0008, 0x0094)); public_tags.emplace("ReferringPhysicianIdentificationSequence", Tag(0x0008, 0x0096)); public_tags.emplace("ConsultingPhysicianName", Tag(0x0008, 0x009c)); public_tags.emplace("ConsultingPhysicianIdentificationSequence", Tag(0x0008, 0x009d)); public_tags.emplace("CodeValue", Tag(0x0008, 0x0100)); public_tags.emplace("ExtendedCodeValue", Tag(0x0008, 0x0101)); public_tags.emplace("CodingSchemeDesignator", Tag(0x0008, 0x0102)); public_tags.emplace("CodingSchemeVersion", Tag(0x0008, 0x0103)); public_tags.emplace("CodeMeaning", Tag(0x0008, 0x0104)); public_tags.emplace("MappingResource", Tag(0x0008, 0x0105)); public_tags.emplace("ContextGroupVersion", Tag(0x0008, 0x0106)); public_tags.emplace("ContextGroupLocalVersion", Tag(0x0008, 0x0107)); public_tags.emplace("ExtendedCodeMeaning", Tag(0x0008, 0x0108)); public_tags.emplace("CodingSchemeResourcesSequence", Tag(0x0008, 0x0109)); public_tags.emplace("CodingSchemeURLType", Tag(0x0008, 0x010a)); public_tags.emplace("ContextGroupExtensionFlag", Tag(0x0008, 0x010b)); public_tags.emplace("CodingSchemeUID", Tag(0x0008, 0x010c)); public_tags.emplace("ContextGroupExtensionCreatorUID", Tag(0x0008, 0x010d)); public_tags.emplace("CodingSchemeURL", Tag(0x0008, 0x010e)); public_tags.emplace("ContextIdentifier", Tag(0x0008, 0x010f)); public_tags.emplace("CodingSchemeIdentificationSequence", Tag(0x0008, 0x0110)); public_tags.emplace("CodingSchemeRegistry", Tag(0x0008, 0x0112)); public_tags.emplace("CodingSchemeExternalID", Tag(0x0008, 0x0114)); public_tags.emplace("CodingSchemeName", Tag(0x0008, 0x0115)); public_tags.emplace("CodingSchemeResponsibleOrganization", Tag(0x0008, 0x0116)); public_tags.emplace("ContextUID", Tag(0x0008, 0x0117)); public_tags.emplace("MappingResourceUID", Tag(0x0008, 0x0118)); public_tags.emplace("LongCodeValue", Tag(0x0008, 0x0119)); public_tags.emplace("URNCodeValue", Tag(0x0008, 0x0120)); public_tags.emplace("EquivalentCodeSequence", Tag(0x0008, 0x0121)); public_tags.emplace("MappingResourceName", Tag(0x0008, 0x0122)); public_tags.emplace("ContextGroupIdentificationSequence", Tag(0x0008, 0x0123)); public_tags.emplace("MappingResourceIdentificationSequence", Tag(0x0008, 0x0124)); public_tags.emplace("TimezoneOffsetFromUTC", Tag(0x0008, 0x0201)); public_tags.emplace("ResponsibleGroupCodeSequence", Tag(0x0008, 0x0220)); public_tags.emplace("EquipmentModality", Tag(0x0008, 0x0221)); public_tags.emplace("ManufacturerRelatedModelGroup", Tag(0x0008, 0x0222)); public_tags.emplace("PrivateDataElementCharacteristicsSequence", Tag(0x0008, 0x0300)); public_tags.emplace("PrivateGroupReference", Tag(0x0008, 0x0301)); public_tags.emplace("PrivateCreatorReference", Tag(0x0008, 0x0302)); public_tags.emplace("BlockIdentifyingInformationStatus", Tag(0x0008, 0x0303)); public_tags.emplace("NonidentifyingPrivateElements", Tag(0x0008, 0x0304)); public_tags.emplace("IdentifyingPrivateElements", Tag(0x0008, 0x0306)); public_tags.emplace("DeidentificationActionSequence", Tag(0x0008, 0x0305)); public_tags.emplace("DeidentificationAction", Tag(0x0008, 0x0307)); public_tags.emplace("PrivateDataElement", Tag(0x0008, 0x0308)); public_tags.emplace("PrivateDataElementValueMultiplicity", Tag(0x0008, 0x0309)); public_tags.emplace("PrivateDataElementValueRepresentation", Tag(0x0008, 0x030a)); public_tags.emplace("PrivateDataElementNumberOfItems", Tag(0x0008, 0x030b)); public_tags.emplace("PrivateDataElementName", Tag(0x0008, 0x030c)); public_tags.emplace("PrivateDataElementKeyword", Tag(0x0008, 0x030d)); public_tags.emplace("PrivateDataElementDescription", Tag(0x0008, 0x030e)); public_tags.emplace("PrivateDataElementEncoding", Tag(0x0008, 0x030f)); public_tags.emplace("PrivateDataElementDefinitionSequence", Tag(0x0008, 0x0310)); public_tags.emplace("NetworkID", Tag(0x0008, 0x1000)); public_tags.emplace("StationName", Tag(0x0008, 0x1010)); public_tags.emplace("StudyDescription", Tag(0x0008, 0x1030)); public_tags.emplace("ProcedureCodeSequence", Tag(0x0008, 0x1032)); public_tags.emplace("SeriesDescription", Tag(0x0008, 0x103e)); public_tags.emplace("SeriesDescriptionCodeSequence", Tag(0x0008, 0x103f)); public_tags.emplace("InstitutionalDepartmentName", Tag(0x0008, 0x1040)); public_tags.emplace("InstitutionalDepartmentTypeCodeSequence", Tag(0x0008, 0x1041)); public_tags.emplace("PhysiciansOfRecord", Tag(0x0008, 0x1048)); public_tags.emplace("PhysiciansOfRecordIdentificationSequence", Tag(0x0008, 0x1049)); public_tags.emplace("PerformingPhysicianName", Tag(0x0008, 0x1050)); public_tags.emplace("PerformingPhysicianIdentificationSequence", Tag(0x0008, 0x1052)); public_tags.emplace("NameOfPhysiciansReadingStudy", Tag(0x0008, 0x1060)); public_tags.emplace("PhysiciansReadingStudyIdentificationSequence", Tag(0x0008, 0x1062)); public_tags.emplace("OperatorsName", Tag(0x0008, 0x1070)); public_tags.emplace("OperatorIdentificationSequence", Tag(0x0008, 0x1072)); public_tags.emplace("AdmittingDiagnosesDescription", Tag(0x0008, 0x1080)); public_tags.emplace("AdmittingDiagnosesCodeSequence", Tag(0x0008, 0x1084)); public_tags.emplace("ManufacturerModelName", Tag(0x0008, 0x1090)); public_tags.emplace("ReferencedResultsSequence", Tag(0x0008, 0x1100)); public_tags.emplace("ReferencedStudySequence", Tag(0x0008, 0x1110)); public_tags.emplace("ReferencedPerformedProcedureStepSequence", Tag(0x0008, 0x1111)); public_tags.emplace("ReferencedSeriesSequence", Tag(0x0008, 0x1115)); public_tags.emplace("ReferencedPatientSequence", Tag(0x0008, 0x1120)); public_tags.emplace("ReferencedVisitSequence", Tag(0x0008, 0x1125)); public_tags.emplace("ReferencedOverlaySequence", Tag(0x0008, 0x1130)); public_tags.emplace("ReferencedStereometricInstanceSequence", Tag(0x0008, 0x1134)); public_tags.emplace("ReferencedWaveformSequence", Tag(0x0008, 0x113a)); public_tags.emplace("ReferencedImageSequence", Tag(0x0008, 0x1140)); public_tags.emplace("ReferencedCurveSequence", Tag(0x0008, 0x1145)); public_tags.emplace("ReferencedInstanceSequence", Tag(0x0008, 0x114a)); public_tags.emplace("ReferencedRealWorldValueMappingInstanceSequence", Tag(0x0008, 0x114b)); public_tags.emplace("ReferencedSOPClassUID", Tag(0x0008, 0x1150)); public_tags.emplace("ReferencedSOPInstanceUID", Tag(0x0008, 0x1155)); public_tags.emplace("DefinitionSourceSequence", Tag(0x0008, 0x1156)); public_tags.emplace("SOPClassesSupported", Tag(0x0008, 0x115a)); public_tags.emplace("ReferencedFrameNumber", Tag(0x0008, 0x1160)); public_tags.emplace("SimpleFrameList", Tag(0x0008, 0x1161)); public_tags.emplace("CalculatedFrameList", Tag(0x0008, 0x1162)); public_tags.emplace("TimeRange", Tag(0x0008, 0x1163)); public_tags.emplace("FrameExtractionSequence", Tag(0x0008, 0x1164)); public_tags.emplace("MultiFrameSourceSOPInstanceUID", Tag(0x0008, 0x1167)); public_tags.emplace("RetrieveURL", Tag(0x0008, 0x1190)); public_tags.emplace("TransactionUID", Tag(0x0008, 0x1195)); public_tags.emplace("WarningReason", Tag(0x0008, 0x1196)); public_tags.emplace("FailureReason", Tag(0x0008, 0x1197)); public_tags.emplace("FailedSOPSequence", Tag(0x0008, 0x1198)); public_tags.emplace("ReferencedSOPSequence", Tag(0x0008, 0x1199)); public_tags.emplace("OtherFailuresSequence", Tag(0x0008, 0x119a)); public_tags.emplace("StudiesContainingOtherReferencedInstancesSequence", Tag(0x0008, 0x1200)); public_tags.emplace("RelatedSeriesSequence", Tag(0x0008, 0x1250)); public_tags.emplace("LossyImageCompressionRetired", Tag(0x0008, 0x2110)); public_tags.emplace("DerivationDescription", Tag(0x0008, 0x2111)); public_tags.emplace("SourceImageSequence", Tag(0x0008, 0x2112)); public_tags.emplace("StageName", Tag(0x0008, 0x2120)); public_tags.emplace("StageNumber", Tag(0x0008, 0x2122)); public_tags.emplace("NumberOfStages", Tag(0x0008, 0x2124)); public_tags.emplace("ViewName", Tag(0x0008, 0x2127)); public_tags.emplace("ViewNumber", Tag(0x0008, 0x2128)); public_tags.emplace("NumberOfEventTimers", Tag(0x0008, 0x2129)); public_tags.emplace("NumberOfViewsInStage", Tag(0x0008, 0x212a)); public_tags.emplace("EventElapsedTimes", Tag(0x0008, 0x2130)); public_tags.emplace("EventTimerNames", Tag(0x0008, 0x2132)); public_tags.emplace("EventTimerSequence", Tag(0x0008, 0x2133)); public_tags.emplace("EventTimeOffset", Tag(0x0008, 0x2134)); public_tags.emplace("EventCodeSequence", Tag(0x0008, 0x2135)); public_tags.emplace("StartTrim", Tag(0x0008, 0x2142)); public_tags.emplace("StopTrim", Tag(0x0008, 0x2143)); public_tags.emplace("RecommendedDisplayFrameRate", Tag(0x0008, 0x2144)); public_tags.emplace("TransducerPosition", Tag(0x0008, 0x2200)); public_tags.emplace("TransducerOrientation", Tag(0x0008, 0x2204)); public_tags.emplace("AnatomicStructure", Tag(0x0008, 0x2208)); public_tags.emplace("AnatomicRegionSequence", Tag(0x0008, 0x2218)); public_tags.emplace("AnatomicRegionModifierSequence", Tag(0x0008, 0x2220)); public_tags.emplace("PrimaryAnatomicStructureSequence", Tag(0x0008, 0x2228)); public_tags.emplace("AnatomicStructureSpaceOrRegionSequence", Tag(0x0008, 0x2229)); public_tags.emplace("PrimaryAnatomicStructureModifierSequence", Tag(0x0008, 0x2230)); public_tags.emplace("TransducerPositionSequence", Tag(0x0008, 0x2240)); public_tags.emplace("TransducerPositionModifierSequence", Tag(0x0008, 0x2242)); public_tags.emplace("TransducerOrientationSequence", Tag(0x0008, 0x2244)); public_tags.emplace("TransducerOrientationModifierSequence", Tag(0x0008, 0x2246)); public_tags.emplace("AnatomicStructureSpaceOrRegionCodeSequenceTrial", Tag(0x0008, 0x2251)); public_tags.emplace("AnatomicPortalOfEntranceCodeSequenceTrial", Tag(0x0008, 0x2253)); public_tags.emplace("AnatomicApproachDirectionCodeSequenceTrial", Tag(0x0008, 0x2255)); public_tags.emplace("AnatomicPerspectiveDescriptionTrial", Tag(0x0008, 0x2256)); public_tags.emplace("AnatomicPerspectiveCodeSequenceTrial", Tag(0x0008, 0x2257)); public_tags.emplace("AnatomicLocationOfExaminingInstrumentDescriptionTrial", Tag(0x0008, 0x2258)); public_tags.emplace("AnatomicLocationOfExaminingInstrumentCodeSequenceTrial", Tag(0x0008, 0x2259)); public_tags.emplace("AnatomicStructureSpaceOrRegionModifierCodeSequenceTrial", Tag(0x0008, 0x225a)); public_tags.emplace("OnAxisBackgroundAnatomicStructureCodeSequenceTrial", Tag(0x0008, 0x225c)); public_tags.emplace("AlternateRepresentationSequence", Tag(0x0008, 0x3001)); public_tags.emplace("AvailableTransferSyntaxUID", Tag(0x0008, 0x3002)); public_tags.emplace("IrradiationEventUID", Tag(0x0008, 0x3010)); public_tags.emplace("SourceIrradiationEventSequence", Tag(0x0008, 0x3011)); public_tags.emplace("RadiopharmaceuticalAdministrationEventUID", Tag(0x0008, 0x3012)); public_tags.emplace("IdentifyingComments", Tag(0x0008, 0x4000)); public_tags.emplace("FrameType", Tag(0x0008, 0x9007)); public_tags.emplace("ReferencedImageEvidenceSequence", Tag(0x0008, 0x9092)); public_tags.emplace("ReferencedRawDataSequence", Tag(0x0008, 0x9121)); public_tags.emplace("CreatorVersionUID", Tag(0x0008, 0x9123)); public_tags.emplace("DerivationImageSequence", Tag(0x0008, 0x9124)); public_tags.emplace("SourceImageEvidenceSequence", Tag(0x0008, 0x9154)); public_tags.emplace("PixelPresentation", Tag(0x0008, 0x9205)); public_tags.emplace("VolumetricProperties", Tag(0x0008, 0x9206)); public_tags.emplace("VolumeBasedCalculationTechnique", Tag(0x0008, 0x9207)); public_tags.emplace("ComplexImageComponent", Tag(0x0008, 0x9208)); public_tags.emplace("AcquisitionContrast", Tag(0x0008, 0x9209)); public_tags.emplace("DerivationCodeSequence", Tag(0x0008, 0x9215)); public_tags.emplace("ReferencedPresentationStateSequence", Tag(0x0008, 0x9237)); public_tags.emplace("ReferencedOtherPlaneSequence", Tag(0x0008, 0x9410)); public_tags.emplace("FrameDisplaySequence", Tag(0x0008, 0x9458)); public_tags.emplace("RecommendedDisplayFrameRateInFloat", Tag(0x0008, 0x9459)); public_tags.emplace("SkipFrameRangeFlag", Tag(0x0008, 0x9460)); } } }odil-0.11.0/src/odil/registry_0008.h000066400000000000000000000266771362244656000167600ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0008 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0008 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const LengthToEnd(0x0008, 0x0001); Tag const SpecificCharacterSet(0x0008, 0x0005); Tag const LanguageCodeSequence(0x0008, 0x0006); Tag const ImageType(0x0008, 0x0008); Tag const RecognitionCode(0x0008, 0x0010); Tag const InstanceCreationDate(0x0008, 0x0012); Tag const InstanceCreationTime(0x0008, 0x0013); Tag const InstanceCreatorUID(0x0008, 0x0014); Tag const InstanceCoercionDateTime(0x0008, 0x0015); Tag const SOPClassUID(0x0008, 0x0016); Tag const SOPInstanceUID(0x0008, 0x0018); Tag const RelatedGeneralSOPClassUID(0x0008, 0x001a); Tag const OriginalSpecializedSOPClassUID(0x0008, 0x001b); Tag const StudyDate(0x0008, 0x0020); Tag const SeriesDate(0x0008, 0x0021); Tag const AcquisitionDate(0x0008, 0x0022); Tag const ContentDate(0x0008, 0x0023); Tag const OverlayDate(0x0008, 0x0024); Tag const CurveDate(0x0008, 0x0025); Tag const AcquisitionDateTime(0x0008, 0x002a); Tag const StudyTime(0x0008, 0x0030); Tag const SeriesTime(0x0008, 0x0031); Tag const AcquisitionTime(0x0008, 0x0032); Tag const ContentTime(0x0008, 0x0033); Tag const OverlayTime(0x0008, 0x0034); Tag const CurveTime(0x0008, 0x0035); Tag const DataSetType(0x0008, 0x0040); Tag const DataSetSubtype(0x0008, 0x0041); Tag const NuclearMedicineSeriesType(0x0008, 0x0042); Tag const AccessionNumber(0x0008, 0x0050); Tag const IssuerOfAccessionNumberSequence(0x0008, 0x0051); Tag const QueryRetrieveLevel(0x0008, 0x0052); Tag const QueryRetrieveView(0x0008, 0x0053); Tag const RetrieveAETitle(0x0008, 0x0054); Tag const StationAETitle(0x0008, 0x0055); Tag const InstanceAvailability(0x0008, 0x0056); Tag const FailedSOPInstanceUIDList(0x0008, 0x0058); Tag const Modality(0x0008, 0x0060); Tag const ModalitiesInStudy(0x0008, 0x0061); Tag const SOPClassesInStudy(0x0008, 0x0062); Tag const AnatomicRegionsInStudyCodeSequence(0x0008, 0x0063); Tag const ConversionType(0x0008, 0x0064); Tag const PresentationIntentType(0x0008, 0x0068); Tag const Manufacturer(0x0008, 0x0070); Tag const InstitutionName(0x0008, 0x0080); Tag const InstitutionAddress(0x0008, 0x0081); Tag const InstitutionCodeSequence(0x0008, 0x0082); Tag const ReferringPhysicianName(0x0008, 0x0090); Tag const ReferringPhysicianAddress(0x0008, 0x0092); Tag const ReferringPhysicianTelephoneNumbers(0x0008, 0x0094); Tag const ReferringPhysicianIdentificationSequence(0x0008, 0x0096); Tag const ConsultingPhysicianName(0x0008, 0x009c); Tag const ConsultingPhysicianIdentificationSequence(0x0008, 0x009d); Tag const CodeValue(0x0008, 0x0100); Tag const ExtendedCodeValue(0x0008, 0x0101); Tag const CodingSchemeDesignator(0x0008, 0x0102); Tag const CodingSchemeVersion(0x0008, 0x0103); Tag const CodeMeaning(0x0008, 0x0104); Tag const MappingResource(0x0008, 0x0105); Tag const ContextGroupVersion(0x0008, 0x0106); Tag const ContextGroupLocalVersion(0x0008, 0x0107); Tag const ExtendedCodeMeaning(0x0008, 0x0108); Tag const CodingSchemeResourcesSequence(0x0008, 0x0109); Tag const CodingSchemeURLType(0x0008, 0x010a); Tag const ContextGroupExtensionFlag(0x0008, 0x010b); Tag const CodingSchemeUID(0x0008, 0x010c); Tag const ContextGroupExtensionCreatorUID(0x0008, 0x010d); Tag const CodingSchemeURL(0x0008, 0x010e); Tag const ContextIdentifier(0x0008, 0x010f); Tag const CodingSchemeIdentificationSequence(0x0008, 0x0110); Tag const CodingSchemeRegistry(0x0008, 0x0112); Tag const CodingSchemeExternalID(0x0008, 0x0114); Tag const CodingSchemeName(0x0008, 0x0115); Tag const CodingSchemeResponsibleOrganization(0x0008, 0x0116); Tag const ContextUID(0x0008, 0x0117); Tag const MappingResourceUID(0x0008, 0x0118); Tag const LongCodeValue(0x0008, 0x0119); Tag const URNCodeValue(0x0008, 0x0120); Tag const EquivalentCodeSequence(0x0008, 0x0121); Tag const MappingResourceName(0x0008, 0x0122); Tag const ContextGroupIdentificationSequence(0x0008, 0x0123); Tag const MappingResourceIdentificationSequence(0x0008, 0x0124); Tag const TimezoneOffsetFromUTC(0x0008, 0x0201); Tag const ResponsibleGroupCodeSequence(0x0008, 0x0220); Tag const EquipmentModality(0x0008, 0x0221); Tag const ManufacturerRelatedModelGroup(0x0008, 0x0222); Tag const PrivateDataElementCharacteristicsSequence(0x0008, 0x0300); Tag const PrivateGroupReference(0x0008, 0x0301); Tag const PrivateCreatorReference(0x0008, 0x0302); Tag const BlockIdentifyingInformationStatus(0x0008, 0x0303); Tag const NonidentifyingPrivateElements(0x0008, 0x0304); Tag const IdentifyingPrivateElements(0x0008, 0x0306); Tag const DeidentificationActionSequence(0x0008, 0x0305); Tag const DeidentificationAction(0x0008, 0x0307); Tag const PrivateDataElement(0x0008, 0x0308); Tag const PrivateDataElementValueMultiplicity(0x0008, 0x0309); Tag const PrivateDataElementValueRepresentation(0x0008, 0x030a); Tag const PrivateDataElementNumberOfItems(0x0008, 0x030b); Tag const PrivateDataElementName(0x0008, 0x030c); Tag const PrivateDataElementKeyword(0x0008, 0x030d); Tag const PrivateDataElementDescription(0x0008, 0x030e); Tag const PrivateDataElementEncoding(0x0008, 0x030f); Tag const PrivateDataElementDefinitionSequence(0x0008, 0x0310); Tag const NetworkID(0x0008, 0x1000); Tag const StationName(0x0008, 0x1010); Tag const StudyDescription(0x0008, 0x1030); Tag const ProcedureCodeSequence(0x0008, 0x1032); Tag const SeriesDescription(0x0008, 0x103e); Tag const SeriesDescriptionCodeSequence(0x0008, 0x103f); Tag const InstitutionalDepartmentName(0x0008, 0x1040); Tag const InstitutionalDepartmentTypeCodeSequence(0x0008, 0x1041); Tag const PhysiciansOfRecord(0x0008, 0x1048); Tag const PhysiciansOfRecordIdentificationSequence(0x0008, 0x1049); Tag const PerformingPhysicianName(0x0008, 0x1050); Tag const PerformingPhysicianIdentificationSequence(0x0008, 0x1052); Tag const NameOfPhysiciansReadingStudy(0x0008, 0x1060); Tag const PhysiciansReadingStudyIdentificationSequence(0x0008, 0x1062); Tag const OperatorsName(0x0008, 0x1070); Tag const OperatorIdentificationSequence(0x0008, 0x1072); Tag const AdmittingDiagnosesDescription(0x0008, 0x1080); Tag const AdmittingDiagnosesCodeSequence(0x0008, 0x1084); Tag const ManufacturerModelName(0x0008, 0x1090); Tag const ReferencedResultsSequence(0x0008, 0x1100); Tag const ReferencedStudySequence(0x0008, 0x1110); Tag const ReferencedPerformedProcedureStepSequence(0x0008, 0x1111); Tag const ReferencedSeriesSequence(0x0008, 0x1115); Tag const ReferencedPatientSequence(0x0008, 0x1120); Tag const ReferencedVisitSequence(0x0008, 0x1125); Tag const ReferencedOverlaySequence(0x0008, 0x1130); Tag const ReferencedStereometricInstanceSequence(0x0008, 0x1134); Tag const ReferencedWaveformSequence(0x0008, 0x113a); Tag const ReferencedImageSequence(0x0008, 0x1140); Tag const ReferencedCurveSequence(0x0008, 0x1145); Tag const ReferencedInstanceSequence(0x0008, 0x114a); Tag const ReferencedRealWorldValueMappingInstanceSequence(0x0008, 0x114b); Tag const ReferencedSOPClassUID(0x0008, 0x1150); Tag const ReferencedSOPInstanceUID(0x0008, 0x1155); Tag const DefinitionSourceSequence(0x0008, 0x1156); Tag const SOPClassesSupported(0x0008, 0x115a); Tag const ReferencedFrameNumber(0x0008, 0x1160); Tag const SimpleFrameList(0x0008, 0x1161); Tag const CalculatedFrameList(0x0008, 0x1162); Tag const TimeRange(0x0008, 0x1163); Tag const FrameExtractionSequence(0x0008, 0x1164); Tag const MultiFrameSourceSOPInstanceUID(0x0008, 0x1167); Tag const RetrieveURL(0x0008, 0x1190); Tag const TransactionUID(0x0008, 0x1195); Tag const WarningReason(0x0008, 0x1196); Tag const FailureReason(0x0008, 0x1197); Tag const FailedSOPSequence(0x0008, 0x1198); Tag const ReferencedSOPSequence(0x0008, 0x1199); Tag const OtherFailuresSequence(0x0008, 0x119a); Tag const StudiesContainingOtherReferencedInstancesSequence(0x0008, 0x1200); Tag const RelatedSeriesSequence(0x0008, 0x1250); Tag const LossyImageCompressionRetired(0x0008, 0x2110); Tag const DerivationDescription(0x0008, 0x2111); Tag const SourceImageSequence(0x0008, 0x2112); Tag const StageName(0x0008, 0x2120); Tag const StageNumber(0x0008, 0x2122); Tag const NumberOfStages(0x0008, 0x2124); Tag const ViewName(0x0008, 0x2127); Tag const ViewNumber(0x0008, 0x2128); Tag const NumberOfEventTimers(0x0008, 0x2129); Tag const NumberOfViewsInStage(0x0008, 0x212a); Tag const EventElapsedTimes(0x0008, 0x2130); Tag const EventTimerNames(0x0008, 0x2132); Tag const EventTimerSequence(0x0008, 0x2133); Tag const EventTimeOffset(0x0008, 0x2134); Tag const EventCodeSequence(0x0008, 0x2135); Tag const StartTrim(0x0008, 0x2142); Tag const StopTrim(0x0008, 0x2143); Tag const RecommendedDisplayFrameRate(0x0008, 0x2144); Tag const TransducerPosition(0x0008, 0x2200); Tag const TransducerOrientation(0x0008, 0x2204); Tag const AnatomicStructure(0x0008, 0x2208); Tag const AnatomicRegionSequence(0x0008, 0x2218); Tag const AnatomicRegionModifierSequence(0x0008, 0x2220); Tag const PrimaryAnatomicStructureSequence(0x0008, 0x2228); Tag const AnatomicStructureSpaceOrRegionSequence(0x0008, 0x2229); Tag const PrimaryAnatomicStructureModifierSequence(0x0008, 0x2230); Tag const TransducerPositionSequence(0x0008, 0x2240); Tag const TransducerPositionModifierSequence(0x0008, 0x2242); Tag const TransducerOrientationSequence(0x0008, 0x2244); Tag const TransducerOrientationModifierSequence(0x0008, 0x2246); Tag const AnatomicStructureSpaceOrRegionCodeSequenceTrial(0x0008, 0x2251); Tag const AnatomicPortalOfEntranceCodeSequenceTrial(0x0008, 0x2253); Tag const AnatomicApproachDirectionCodeSequenceTrial(0x0008, 0x2255); Tag const AnatomicPerspectiveDescriptionTrial(0x0008, 0x2256); Tag const AnatomicPerspectiveCodeSequenceTrial(0x0008, 0x2257); Tag const AnatomicLocationOfExaminingInstrumentDescriptionTrial(0x0008, 0x2258); Tag const AnatomicLocationOfExaminingInstrumentCodeSequenceTrial(0x0008, 0x2259); Tag const AnatomicStructureSpaceOrRegionModifierCodeSequenceTrial(0x0008, 0x225a); Tag const OnAxisBackgroundAnatomicStructureCodeSequenceTrial(0x0008, 0x225c); Tag const AlternateRepresentationSequence(0x0008, 0x3001); Tag const AvailableTransferSyntaxUID(0x0008, 0x3002); Tag const IrradiationEventUID(0x0008, 0x3010); Tag const SourceIrradiationEventSequence(0x0008, 0x3011); Tag const RadiopharmaceuticalAdministrationEventUID(0x0008, 0x3012); Tag const IdentifyingComments(0x0008, 0x4000); Tag const FrameType(0x0008, 0x9007); Tag const ReferencedImageEvidenceSequence(0x0008, 0x9092); Tag const ReferencedRawDataSequence(0x0008, 0x9121); Tag const CreatorVersionUID(0x0008, 0x9123); Tag const DerivationImageSequence(0x0008, 0x9124); Tag const SourceImageEvidenceSequence(0x0008, 0x9154); Tag const PixelPresentation(0x0008, 0x9205); Tag const VolumetricProperties(0x0008, 0x9206); Tag const VolumeBasedCalculationTechnique(0x0008, 0x9207); Tag const ComplexImageComponent(0x0008, 0x9208); Tag const AcquisitionContrast(0x0008, 0x9209); Tag const DerivationCodeSequence(0x0008, 0x9215); Tag const ReferencedPresentationStateSequence(0x0008, 0x9237); Tag const ReferencedOtherPlaneSequence(0x0008, 0x9410); Tag const FrameDisplaySequence(0x0008, 0x9458); Tag const RecommendedDisplayFrameRateInFloat(0x0008, 0x9459); Tag const SkipFrameRangeFlag(0x0008, 0x9460); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0008odil-0.11.0/src/odil/registry_0010.cpp000066400000000000000000000412001362244656000172570ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0010( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0010, 0x0010), ElementsDictionaryEntry("Patient's Name", "PatientName", "PN", "1")); public_dictionary.emplace(Tag(0x0010, 0x0020), ElementsDictionaryEntry("Patient ID", "PatientID", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x0021), ElementsDictionaryEntry("Issuer of Patient ID", "IssuerOfPatientID", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x0022), ElementsDictionaryEntry("Type of Patient ID", "TypeOfPatientID", "CS", "1")); public_dictionary.emplace(Tag(0x0010, 0x0024), ElementsDictionaryEntry("Issuer of Patient ID Qualifiers Sequence", "IssuerOfPatientIDQualifiersSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x0026), ElementsDictionaryEntry("Source Patient Group Identification Sequence", "SourcePatientGroupIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x0027), ElementsDictionaryEntry("Group of Patients Identification Sequence", "GroupOfPatientsIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x0028), ElementsDictionaryEntry("Subject Relative Position in Image", "SubjectRelativePositionInImage", "US", "3")); public_dictionary.emplace(Tag(0x0010, 0x0030), ElementsDictionaryEntry("Patient's Birth Date", "PatientBirthDate", "DA", "1")); public_dictionary.emplace(Tag(0x0010, 0x0032), ElementsDictionaryEntry("Patient's Birth Time", "PatientBirthTime", "TM", "1")); public_dictionary.emplace(Tag(0x0010, 0x0033), ElementsDictionaryEntry("Patient's Birth Date in Alternative Calendar", "PatientBirthDateInAlternativeCalendar", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x0034), ElementsDictionaryEntry("Patient's Death Date in Alternative Calendar", "PatientDeathDateInAlternativeCalendar", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x0035), ElementsDictionaryEntry("Patient's Alternative Calendar", "PatientAlternativeCalendar", "CS", "1")); public_dictionary.emplace(Tag(0x0010, 0x0040), ElementsDictionaryEntry("Patient's Sex", "PatientSex", "CS", "1")); public_dictionary.emplace(Tag(0x0010, 0x0050), ElementsDictionaryEntry("Patient's Insurance Plan Code Sequence", "PatientInsurancePlanCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x0101), ElementsDictionaryEntry("Patient's Primary Language Code Sequence", "PatientPrimaryLanguageCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x0102), ElementsDictionaryEntry("Patient's Primary Language Modifier Code Sequence", "PatientPrimaryLanguageModifierCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x0200), ElementsDictionaryEntry("Quality Control Subject", "QualityControlSubject", "CS", "1")); public_dictionary.emplace(Tag(0x0010, 0x0201), ElementsDictionaryEntry("Quality Control Subject Type Code Sequence", "QualityControlSubjectTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x0212), ElementsDictionaryEntry("Strain Description", "StrainDescription", "UC", "1")); public_dictionary.emplace(Tag(0x0010, 0x0213), ElementsDictionaryEntry("Strain Nomenclature", "StrainNomenclature", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x0214), ElementsDictionaryEntry("Strain Stock Number", "StrainStockNumber", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x0215), ElementsDictionaryEntry("Strain Source Registry Code Sequence", "StrainSourceRegistryCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x0216), ElementsDictionaryEntry("Strain Stock Sequence", "StrainStockSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x0217), ElementsDictionaryEntry("Strain Source", "StrainSource", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x0218), ElementsDictionaryEntry("Strain Additional Information", "StrainAdditionalInformation", "UT", "1")); public_dictionary.emplace(Tag(0x0010, 0x0219), ElementsDictionaryEntry("Strain Code Sequence", "StrainCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x0221), ElementsDictionaryEntry("Genetic Modifications Sequence", "GeneticModificationsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x0222), ElementsDictionaryEntry("Genetic Modifications Description", "GeneticModificationsDescription", "UC", "1")); public_dictionary.emplace(Tag(0x0010, 0x0223), ElementsDictionaryEntry("Genetic Modifications Nomenclature", "GeneticModificationsNomenclature", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x0229), ElementsDictionaryEntry("Genetic Modifications Code Sequence", "GeneticModificationsCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x1000), ElementsDictionaryEntry("Other Patient IDs", "OtherPatientIDs", "LO", "1-n")); public_dictionary.emplace(Tag(0x0010, 0x1001), ElementsDictionaryEntry("Other Patient Names", "OtherPatientNames", "PN", "1-n")); public_dictionary.emplace(Tag(0x0010, 0x1002), ElementsDictionaryEntry("Other Patient IDs Sequence", "OtherPatientIDsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x1005), ElementsDictionaryEntry("Patient's Birth Name", "PatientBirthName", "PN", "1")); public_dictionary.emplace(Tag(0x0010, 0x1010), ElementsDictionaryEntry("Patient's Age", "PatientAge", "AS", "1")); public_dictionary.emplace(Tag(0x0010, 0x1020), ElementsDictionaryEntry("Patient's Size", "PatientSize", "DS", "1")); public_dictionary.emplace(Tag(0x0010, 0x1021), ElementsDictionaryEntry("Patient's Size Code Sequence", "PatientSizeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x1022), ElementsDictionaryEntry("Patient's Body Mass Index", "PatientBodyMassIndex", "DS", "1")); public_dictionary.emplace(Tag(0x0010, 0x1023), ElementsDictionaryEntry("Measured AP Dimension", "MeasuredAPDimension", "DS", "1")); public_dictionary.emplace(Tag(0x0010, 0x1024), ElementsDictionaryEntry("Measured Lateral Dimension", "MeasuredLateralDimension", "DS", "1")); public_dictionary.emplace(Tag(0x0010, 0x1030), ElementsDictionaryEntry("Patient's Weight", "PatientWeight", "DS", "1")); public_dictionary.emplace(Tag(0x0010, 0x1040), ElementsDictionaryEntry("Patient's Address", "PatientAddress", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x1050), ElementsDictionaryEntry("Insurance Plan Identification", "InsurancePlanIdentification", "LO", "1-n")); public_dictionary.emplace(Tag(0x0010, 0x1060), ElementsDictionaryEntry("Patient's Mother's Birth Name", "PatientMotherBirthName", "PN", "1")); public_dictionary.emplace(Tag(0x0010, 0x1080), ElementsDictionaryEntry("Military Rank", "MilitaryRank", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x1081), ElementsDictionaryEntry("Branch of Service", "BranchOfService", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x1090), ElementsDictionaryEntry("Medical Record Locator", "MedicalRecordLocator", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x1100), ElementsDictionaryEntry("Referenced Patient Photo Sequence", "ReferencedPatientPhotoSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x2000), ElementsDictionaryEntry("Medical Alerts", "MedicalAlerts", "LO", "1-n")); public_dictionary.emplace(Tag(0x0010, 0x2110), ElementsDictionaryEntry("Allergies", "Allergies", "LO", "1-n")); public_dictionary.emplace(Tag(0x0010, 0x2150), ElementsDictionaryEntry("Country of Residence", "CountryOfResidence", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x2152), ElementsDictionaryEntry("Region of Residence", "RegionOfResidence", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x2154), ElementsDictionaryEntry("Patient's Telephone Numbers", "PatientTelephoneNumbers", "SH", "1-n")); public_dictionary.emplace(Tag(0x0010, 0x2155), ElementsDictionaryEntry("Patient's Telecom Information", "PatientTelecomInformation", "LT", "1")); public_dictionary.emplace(Tag(0x0010, 0x2160), ElementsDictionaryEntry("Ethnic Group", "EthnicGroup", "SH", "1")); public_dictionary.emplace(Tag(0x0010, 0x2180), ElementsDictionaryEntry("Occupation", "Occupation", "SH", "1")); public_dictionary.emplace(Tag(0x0010, 0x21a0), ElementsDictionaryEntry("Smoking Status", "SmokingStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0010, 0x21b0), ElementsDictionaryEntry("Additional Patient History", "AdditionalPatientHistory", "LT", "1")); public_dictionary.emplace(Tag(0x0010, 0x21c0), ElementsDictionaryEntry("Pregnancy Status", "PregnancyStatus", "US", "1")); public_dictionary.emplace(Tag(0x0010, 0x21d0), ElementsDictionaryEntry("Last Menstrual Date", "LastMenstrualDate", "DA", "1")); public_dictionary.emplace(Tag(0x0010, 0x21f0), ElementsDictionaryEntry("Patient's Religious Preference", "PatientReligiousPreference", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x2201), ElementsDictionaryEntry("Patient Species Description", "PatientSpeciesDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x2202), ElementsDictionaryEntry("Patient Species Code Sequence", "PatientSpeciesCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x2203), ElementsDictionaryEntry("Patient's Sex Neutered", "PatientSexNeutered", "CS", "1")); public_dictionary.emplace(Tag(0x0010, 0x2210), ElementsDictionaryEntry("Anatomical Orientation Type", "AnatomicalOrientationType", "CS", "1")); public_dictionary.emplace(Tag(0x0010, 0x2292), ElementsDictionaryEntry("Patient Breed Description", "PatientBreedDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x2293), ElementsDictionaryEntry("Patient Breed Code Sequence", "PatientBreedCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x2294), ElementsDictionaryEntry("Breed Registration Sequence", "BreedRegistrationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x2295), ElementsDictionaryEntry("Breed Registration Number", "BreedRegistrationNumber", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x2296), ElementsDictionaryEntry("Breed Registry Code Sequence", "BreedRegistryCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0010, 0x2297), ElementsDictionaryEntry("Responsible Person", "ResponsiblePerson", "PN", "1")); public_dictionary.emplace(Tag(0x0010, 0x2298), ElementsDictionaryEntry("Responsible Person Role", "ResponsiblePersonRole", "CS", "1")); public_dictionary.emplace(Tag(0x0010, 0x2299), ElementsDictionaryEntry("Responsible Organization", "ResponsibleOrganization", "LO", "1")); public_dictionary.emplace(Tag(0x0010, 0x4000), ElementsDictionaryEntry("Patient Comments", "PatientComments", "LT", "1")); public_dictionary.emplace(Tag(0x0010, 0x9431), ElementsDictionaryEntry("Examined Body Thickness", "ExaminedBodyThickness", "FL", "1")); public_tags.emplace("PatientName", Tag(0x0010, 0x0010)); public_tags.emplace("PatientID", Tag(0x0010, 0x0020)); public_tags.emplace("IssuerOfPatientID", Tag(0x0010, 0x0021)); public_tags.emplace("TypeOfPatientID", Tag(0x0010, 0x0022)); public_tags.emplace("IssuerOfPatientIDQualifiersSequence", Tag(0x0010, 0x0024)); public_tags.emplace("SourcePatientGroupIdentificationSequence", Tag(0x0010, 0x0026)); public_tags.emplace("GroupOfPatientsIdentificationSequence", Tag(0x0010, 0x0027)); public_tags.emplace("SubjectRelativePositionInImage", Tag(0x0010, 0x0028)); public_tags.emplace("PatientBirthDate", Tag(0x0010, 0x0030)); public_tags.emplace("PatientBirthTime", Tag(0x0010, 0x0032)); public_tags.emplace("PatientBirthDateInAlternativeCalendar", Tag(0x0010, 0x0033)); public_tags.emplace("PatientDeathDateInAlternativeCalendar", Tag(0x0010, 0x0034)); public_tags.emplace("PatientAlternativeCalendar", Tag(0x0010, 0x0035)); public_tags.emplace("PatientSex", Tag(0x0010, 0x0040)); public_tags.emplace("PatientInsurancePlanCodeSequence", Tag(0x0010, 0x0050)); public_tags.emplace("PatientPrimaryLanguageCodeSequence", Tag(0x0010, 0x0101)); public_tags.emplace("PatientPrimaryLanguageModifierCodeSequence", Tag(0x0010, 0x0102)); public_tags.emplace("QualityControlSubject", Tag(0x0010, 0x0200)); public_tags.emplace("QualityControlSubjectTypeCodeSequence", Tag(0x0010, 0x0201)); public_tags.emplace("StrainDescription", Tag(0x0010, 0x0212)); public_tags.emplace("StrainNomenclature", Tag(0x0010, 0x0213)); public_tags.emplace("StrainStockNumber", Tag(0x0010, 0x0214)); public_tags.emplace("StrainSourceRegistryCodeSequence", Tag(0x0010, 0x0215)); public_tags.emplace("StrainStockSequence", Tag(0x0010, 0x0216)); public_tags.emplace("StrainSource", Tag(0x0010, 0x0217)); public_tags.emplace("StrainAdditionalInformation", Tag(0x0010, 0x0218)); public_tags.emplace("StrainCodeSequence", Tag(0x0010, 0x0219)); public_tags.emplace("GeneticModificationsSequence", Tag(0x0010, 0x0221)); public_tags.emplace("GeneticModificationsDescription", Tag(0x0010, 0x0222)); public_tags.emplace("GeneticModificationsNomenclature", Tag(0x0010, 0x0223)); public_tags.emplace("GeneticModificationsCodeSequence", Tag(0x0010, 0x0229)); public_tags.emplace("OtherPatientIDs", Tag(0x0010, 0x1000)); public_tags.emplace("OtherPatientNames", Tag(0x0010, 0x1001)); public_tags.emplace("OtherPatientIDsSequence", Tag(0x0010, 0x1002)); public_tags.emplace("PatientBirthName", Tag(0x0010, 0x1005)); public_tags.emplace("PatientAge", Tag(0x0010, 0x1010)); public_tags.emplace("PatientSize", Tag(0x0010, 0x1020)); public_tags.emplace("PatientSizeCodeSequence", Tag(0x0010, 0x1021)); public_tags.emplace("PatientBodyMassIndex", Tag(0x0010, 0x1022)); public_tags.emplace("MeasuredAPDimension", Tag(0x0010, 0x1023)); public_tags.emplace("MeasuredLateralDimension", Tag(0x0010, 0x1024)); public_tags.emplace("PatientWeight", Tag(0x0010, 0x1030)); public_tags.emplace("PatientAddress", Tag(0x0010, 0x1040)); public_tags.emplace("InsurancePlanIdentification", Tag(0x0010, 0x1050)); public_tags.emplace("PatientMotherBirthName", Tag(0x0010, 0x1060)); public_tags.emplace("MilitaryRank", Tag(0x0010, 0x1080)); public_tags.emplace("BranchOfService", Tag(0x0010, 0x1081)); public_tags.emplace("MedicalRecordLocator", Tag(0x0010, 0x1090)); public_tags.emplace("ReferencedPatientPhotoSequence", Tag(0x0010, 0x1100)); public_tags.emplace("MedicalAlerts", Tag(0x0010, 0x2000)); public_tags.emplace("Allergies", Tag(0x0010, 0x2110)); public_tags.emplace("CountryOfResidence", Tag(0x0010, 0x2150)); public_tags.emplace("RegionOfResidence", Tag(0x0010, 0x2152)); public_tags.emplace("PatientTelephoneNumbers", Tag(0x0010, 0x2154)); public_tags.emplace("PatientTelecomInformation", Tag(0x0010, 0x2155)); public_tags.emplace("EthnicGroup", Tag(0x0010, 0x2160)); public_tags.emplace("Occupation", Tag(0x0010, 0x2180)); public_tags.emplace("SmokingStatus", Tag(0x0010, 0x21a0)); public_tags.emplace("AdditionalPatientHistory", Tag(0x0010, 0x21b0)); public_tags.emplace("PregnancyStatus", Tag(0x0010, 0x21c0)); public_tags.emplace("LastMenstrualDate", Tag(0x0010, 0x21d0)); public_tags.emplace("PatientReligiousPreference", Tag(0x0010, 0x21f0)); public_tags.emplace("PatientSpeciesDescription", Tag(0x0010, 0x2201)); public_tags.emplace("PatientSpeciesCodeSequence", Tag(0x0010, 0x2202)); public_tags.emplace("PatientSexNeutered", Tag(0x0010, 0x2203)); public_tags.emplace("AnatomicalOrientationType", Tag(0x0010, 0x2210)); public_tags.emplace("PatientBreedDescription", Tag(0x0010, 0x2292)); public_tags.emplace("PatientBreedCodeSequence", Tag(0x0010, 0x2293)); public_tags.emplace("BreedRegistrationSequence", Tag(0x0010, 0x2294)); public_tags.emplace("BreedRegistrationNumber", Tag(0x0010, 0x2295)); public_tags.emplace("BreedRegistryCodeSequence", Tag(0x0010, 0x2296)); public_tags.emplace("ResponsiblePerson", Tag(0x0010, 0x2297)); public_tags.emplace("ResponsiblePersonRole", Tag(0x0010, 0x2298)); public_tags.emplace("ResponsibleOrganization", Tag(0x0010, 0x2299)); public_tags.emplace("PatientComments", Tag(0x0010, 0x4000)); public_tags.emplace("ExaminedBodyThickness", Tag(0x0010, 0x9431)); } } }odil-0.11.0/src/odil/registry_0010.h000066400000000000000000000105571362244656000167370ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0010 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0010 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const PatientName(0x0010, 0x0010); Tag const PatientID(0x0010, 0x0020); Tag const IssuerOfPatientID(0x0010, 0x0021); Tag const TypeOfPatientID(0x0010, 0x0022); Tag const IssuerOfPatientIDQualifiersSequence(0x0010, 0x0024); Tag const SourcePatientGroupIdentificationSequence(0x0010, 0x0026); Tag const GroupOfPatientsIdentificationSequence(0x0010, 0x0027); Tag const SubjectRelativePositionInImage(0x0010, 0x0028); Tag const PatientBirthDate(0x0010, 0x0030); Tag const PatientBirthTime(0x0010, 0x0032); Tag const PatientBirthDateInAlternativeCalendar(0x0010, 0x0033); Tag const PatientDeathDateInAlternativeCalendar(0x0010, 0x0034); Tag const PatientAlternativeCalendar(0x0010, 0x0035); Tag const PatientSex(0x0010, 0x0040); Tag const PatientInsurancePlanCodeSequence(0x0010, 0x0050); Tag const PatientPrimaryLanguageCodeSequence(0x0010, 0x0101); Tag const PatientPrimaryLanguageModifierCodeSequence(0x0010, 0x0102); Tag const QualityControlSubject(0x0010, 0x0200); Tag const QualityControlSubjectTypeCodeSequence(0x0010, 0x0201); Tag const StrainDescription(0x0010, 0x0212); Tag const StrainNomenclature(0x0010, 0x0213); Tag const StrainStockNumber(0x0010, 0x0214); Tag const StrainSourceRegistryCodeSequence(0x0010, 0x0215); Tag const StrainStockSequence(0x0010, 0x0216); Tag const StrainSource(0x0010, 0x0217); Tag const StrainAdditionalInformation(0x0010, 0x0218); Tag const StrainCodeSequence(0x0010, 0x0219); Tag const GeneticModificationsSequence(0x0010, 0x0221); Tag const GeneticModificationsDescription(0x0010, 0x0222); Tag const GeneticModificationsNomenclature(0x0010, 0x0223); Tag const GeneticModificationsCodeSequence(0x0010, 0x0229); Tag const OtherPatientIDs(0x0010, 0x1000); Tag const OtherPatientNames(0x0010, 0x1001); Tag const OtherPatientIDsSequence(0x0010, 0x1002); Tag const PatientBirthName(0x0010, 0x1005); Tag const PatientAge(0x0010, 0x1010); Tag const PatientSize(0x0010, 0x1020); Tag const PatientSizeCodeSequence(0x0010, 0x1021); Tag const PatientBodyMassIndex(0x0010, 0x1022); Tag const MeasuredAPDimension(0x0010, 0x1023); Tag const MeasuredLateralDimension(0x0010, 0x1024); Tag const PatientWeight(0x0010, 0x1030); Tag const PatientAddress(0x0010, 0x1040); Tag const InsurancePlanIdentification(0x0010, 0x1050); Tag const PatientMotherBirthName(0x0010, 0x1060); Tag const MilitaryRank(0x0010, 0x1080); Tag const BranchOfService(0x0010, 0x1081); Tag const MedicalRecordLocator(0x0010, 0x1090); Tag const ReferencedPatientPhotoSequence(0x0010, 0x1100); Tag const MedicalAlerts(0x0010, 0x2000); Tag const Allergies(0x0010, 0x2110); Tag const CountryOfResidence(0x0010, 0x2150); Tag const RegionOfResidence(0x0010, 0x2152); Tag const PatientTelephoneNumbers(0x0010, 0x2154); Tag const PatientTelecomInformation(0x0010, 0x2155); Tag const EthnicGroup(0x0010, 0x2160); Tag const Occupation(0x0010, 0x2180); Tag const SmokingStatus(0x0010, 0x21a0); Tag const AdditionalPatientHistory(0x0010, 0x21b0); Tag const PregnancyStatus(0x0010, 0x21c0); Tag const LastMenstrualDate(0x0010, 0x21d0); Tag const PatientReligiousPreference(0x0010, 0x21f0); Tag const PatientSpeciesDescription(0x0010, 0x2201); Tag const PatientSpeciesCodeSequence(0x0010, 0x2202); Tag const PatientSexNeutered(0x0010, 0x2203); Tag const AnatomicalOrientationType(0x0010, 0x2210); Tag const PatientBreedDescription(0x0010, 0x2292); Tag const PatientBreedCodeSequence(0x0010, 0x2293); Tag const BreedRegistrationSequence(0x0010, 0x2294); Tag const BreedRegistrationNumber(0x0010, 0x2295); Tag const BreedRegistryCodeSequence(0x0010, 0x2296); Tag const ResponsiblePerson(0x0010, 0x2297); Tag const ResponsiblePersonRole(0x0010, 0x2298); Tag const ResponsibleOrganization(0x0010, 0x2299); Tag const PatientComments(0x0010, 0x4000); Tag const ExaminedBodyThickness(0x0010, 0x9431); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0010odil-0.11.0/src/odil/registry_0012.cpp000066400000000000000000000144031362244656000172660ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0012( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0012, 0x0010), ElementsDictionaryEntry("Clinical Trial Sponsor Name", "ClinicalTrialSponsorName", "LO", "1")); public_dictionary.emplace(Tag(0x0012, 0x0020), ElementsDictionaryEntry("Clinical Trial Protocol ID", "ClinicalTrialProtocolID", "LO", "1")); public_dictionary.emplace(Tag(0x0012, 0x0021), ElementsDictionaryEntry("Clinical Trial Protocol Name", "ClinicalTrialProtocolName", "LO", "1")); public_dictionary.emplace(Tag(0x0012, 0x0030), ElementsDictionaryEntry("Clinical Trial Site ID", "ClinicalTrialSiteID", "LO", "1")); public_dictionary.emplace(Tag(0x0012, 0x0031), ElementsDictionaryEntry("Clinical Trial Site Name", "ClinicalTrialSiteName", "LO", "1")); public_dictionary.emplace(Tag(0x0012, 0x0040), ElementsDictionaryEntry("Clinical Trial Subject ID", "ClinicalTrialSubjectID", "LO", "1")); public_dictionary.emplace(Tag(0x0012, 0x0042), ElementsDictionaryEntry("Clinical Trial Subject Reading ID", "ClinicalTrialSubjectReadingID", "LO", "1")); public_dictionary.emplace(Tag(0x0012, 0x0050), ElementsDictionaryEntry("Clinical Trial Time Point ID", "ClinicalTrialTimePointID", "LO", "1")); public_dictionary.emplace(Tag(0x0012, 0x0051), ElementsDictionaryEntry("Clinical Trial Time Point Description", "ClinicalTrialTimePointDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0012, 0x0052), ElementsDictionaryEntry("Longitudinal Temporal Offset from Event", "LongitudinalTemporalOffsetFromEvent", "FD", "1")); public_dictionary.emplace(Tag(0x0012, 0x0053), ElementsDictionaryEntry("Longitudinal Temporal Event Type", "LongitudinalTemporalEventType", "CS", "1")); public_dictionary.emplace(Tag(0x0012, 0x0060), ElementsDictionaryEntry("Clinical Trial Coordinating Center Name", "ClinicalTrialCoordinatingCenterName", "LO", "1")); public_dictionary.emplace(Tag(0x0012, 0x0062), ElementsDictionaryEntry("Patient Identity Removed", "PatientIdentityRemoved", "CS", "1")); public_dictionary.emplace(Tag(0x0012, 0x0063), ElementsDictionaryEntry("De-identification Method", "DeidentificationMethod", "LO", "1-n")); public_dictionary.emplace(Tag(0x0012, 0x0064), ElementsDictionaryEntry("De-identification Method Code Sequence", "DeidentificationMethodCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0012, 0x0071), ElementsDictionaryEntry("Clinical Trial Series ID", "ClinicalTrialSeriesID", "LO", "1")); public_dictionary.emplace(Tag(0x0012, 0x0072), ElementsDictionaryEntry("Clinical Trial Series Description", "ClinicalTrialSeriesDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0012, 0x0081), ElementsDictionaryEntry("Clinical Trial Protocol Ethics Committee Name", "ClinicalTrialProtocolEthicsCommitteeName", "LO", "1")); public_dictionary.emplace(Tag(0x0012, 0x0082), ElementsDictionaryEntry("Clinical Trial Protocol Ethics Committee Approval Number", "ClinicalTrialProtocolEthicsCommitteeApprovalNumber", "LO", "1")); public_dictionary.emplace(Tag(0x0012, 0x0083), ElementsDictionaryEntry("Consent for Clinical Trial Use Sequence", "ConsentForClinicalTrialUseSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0012, 0x0084), ElementsDictionaryEntry("Distribution Type", "DistributionType", "CS", "1")); public_dictionary.emplace(Tag(0x0012, 0x0085), ElementsDictionaryEntry("Consent for Distribution Flag", "ConsentForDistributionFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0012, 0x0086), ElementsDictionaryEntry("Ethics Committee Approval Effectiveness Start Date", "EthicsCommitteeApprovalEffectivenessStartDate", "DA", "1")); public_dictionary.emplace(Tag(0x0012, 0x0087), ElementsDictionaryEntry("Ethics Committee Approval Effectiveness End Date", "EthicsCommitteeApprovalEffectivenessEndDate", "DA", "1")); public_tags.emplace("ClinicalTrialSponsorName", Tag(0x0012, 0x0010)); public_tags.emplace("ClinicalTrialProtocolID", Tag(0x0012, 0x0020)); public_tags.emplace("ClinicalTrialProtocolName", Tag(0x0012, 0x0021)); public_tags.emplace("ClinicalTrialSiteID", Tag(0x0012, 0x0030)); public_tags.emplace("ClinicalTrialSiteName", Tag(0x0012, 0x0031)); public_tags.emplace("ClinicalTrialSubjectID", Tag(0x0012, 0x0040)); public_tags.emplace("ClinicalTrialSubjectReadingID", Tag(0x0012, 0x0042)); public_tags.emplace("ClinicalTrialTimePointID", Tag(0x0012, 0x0050)); public_tags.emplace("ClinicalTrialTimePointDescription", Tag(0x0012, 0x0051)); public_tags.emplace("LongitudinalTemporalOffsetFromEvent", Tag(0x0012, 0x0052)); public_tags.emplace("LongitudinalTemporalEventType", Tag(0x0012, 0x0053)); public_tags.emplace("ClinicalTrialCoordinatingCenterName", Tag(0x0012, 0x0060)); public_tags.emplace("PatientIdentityRemoved", Tag(0x0012, 0x0062)); public_tags.emplace("DeidentificationMethod", Tag(0x0012, 0x0063)); public_tags.emplace("DeidentificationMethodCodeSequence", Tag(0x0012, 0x0064)); public_tags.emplace("ClinicalTrialSeriesID", Tag(0x0012, 0x0071)); public_tags.emplace("ClinicalTrialSeriesDescription", Tag(0x0012, 0x0072)); public_tags.emplace("ClinicalTrialProtocolEthicsCommitteeName", Tag(0x0012, 0x0081)); public_tags.emplace("ClinicalTrialProtocolEthicsCommitteeApprovalNumber", Tag(0x0012, 0x0082)); public_tags.emplace("ConsentForClinicalTrialUseSequence", Tag(0x0012, 0x0083)); public_tags.emplace("DistributionType", Tag(0x0012, 0x0084)); public_tags.emplace("ConsentForDistributionFlag", Tag(0x0012, 0x0085)); public_tags.emplace("EthicsCommitteeApprovalEffectivenessStartDate", Tag(0x0012, 0x0086)); public_tags.emplace("EthicsCommitteeApprovalEffectivenessEndDate", Tag(0x0012, 0x0087)); } } }odil-0.11.0/src/odil/registry_0012.h000066400000000000000000000040151362244656000167310ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0012 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0012 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ClinicalTrialSponsorName(0x0012, 0x0010); Tag const ClinicalTrialProtocolID(0x0012, 0x0020); Tag const ClinicalTrialProtocolName(0x0012, 0x0021); Tag const ClinicalTrialSiteID(0x0012, 0x0030); Tag const ClinicalTrialSiteName(0x0012, 0x0031); Tag const ClinicalTrialSubjectID(0x0012, 0x0040); Tag const ClinicalTrialSubjectReadingID(0x0012, 0x0042); Tag const ClinicalTrialTimePointID(0x0012, 0x0050); Tag const ClinicalTrialTimePointDescription(0x0012, 0x0051); Tag const LongitudinalTemporalOffsetFromEvent(0x0012, 0x0052); Tag const LongitudinalTemporalEventType(0x0012, 0x0053); Tag const ClinicalTrialCoordinatingCenterName(0x0012, 0x0060); Tag const PatientIdentityRemoved(0x0012, 0x0062); Tag const DeidentificationMethod(0x0012, 0x0063); Tag const DeidentificationMethodCodeSequence(0x0012, 0x0064); Tag const ClinicalTrialSeriesID(0x0012, 0x0071); Tag const ClinicalTrialSeriesDescription(0x0012, 0x0072); Tag const ClinicalTrialProtocolEthicsCommitteeName(0x0012, 0x0081); Tag const ClinicalTrialProtocolEthicsCommitteeApprovalNumber(0x0012, 0x0082); Tag const ConsentForClinicalTrialUseSequence(0x0012, 0x0083); Tag const DistributionType(0x0012, 0x0084); Tag const ConsentForDistributionFlag(0x0012, 0x0085); Tag const EthicsCommitteeApprovalEffectivenessStartDate(0x0012, 0x0086); Tag const EthicsCommitteeApprovalEffectivenessEndDate(0x0012, 0x0087); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0012odil-0.11.0/src/odil/registry_0014.cpp000066400000000000000000001167451362244656000173040ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0014( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0014, 0x0023), ElementsDictionaryEntry("CAD File Format", "CADFileFormat", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x0024), ElementsDictionaryEntry("Component Reference System", "ComponentReferenceSystem", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x0025), ElementsDictionaryEntry("Component Manufacturing Procedure", "ComponentManufacturingProcedure", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x0028), ElementsDictionaryEntry("Component Manufacturer", "ComponentManufacturer", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x0030), ElementsDictionaryEntry("Material Thickness", "MaterialThickness", "DS", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x0032), ElementsDictionaryEntry("Material Pipe Diameter", "MaterialPipeDiameter", "DS", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x0034), ElementsDictionaryEntry("Material Isolation Diameter", "MaterialIsolationDiameter", "DS", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x0042), ElementsDictionaryEntry("Material Grade", "MaterialGrade", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x0044), ElementsDictionaryEntry("Material Properties Description", "MaterialPropertiesDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x0045), ElementsDictionaryEntry("Material Properties File Format (Retired)", "MaterialPropertiesFileFormatRetired", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x0046), ElementsDictionaryEntry("Material Notes", "MaterialNotes", "LT", "1")); public_dictionary.emplace(Tag(0x0014, 0x0050), ElementsDictionaryEntry("Component Shape", "ComponentShape", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x0052), ElementsDictionaryEntry("Curvature Type", "CurvatureType", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x0054), ElementsDictionaryEntry("Outer Diameter", "OuterDiameter", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x0056), ElementsDictionaryEntry("Inner Diameter", "InnerDiameter", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x0100), ElementsDictionaryEntry("Component Welder IDs", "ComponentWelderIDs", "LO", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x0101), ElementsDictionaryEntry("Secondary Approval Status", "SecondaryApprovalStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x0102), ElementsDictionaryEntry("Secondary Review Date", "SecondaryReviewDate", "DA", "1")); public_dictionary.emplace(Tag(0x0014, 0x0103), ElementsDictionaryEntry("Secondary Review Time", "SecondaryReviewTime", "TM", "1")); public_dictionary.emplace(Tag(0x0014, 0x0104), ElementsDictionaryEntry("Secondary Reviewer Name", "SecondaryReviewerName", "PN", "1")); public_dictionary.emplace(Tag(0x0014, 0x0105), ElementsDictionaryEntry("Repair ID", "RepairID", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x0106), ElementsDictionaryEntry("Multiple Component Approval Sequence", "MultipleComponentApprovalSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x0107), ElementsDictionaryEntry("Other Approval Status", "OtherApprovalStatus", "CS", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x0108), ElementsDictionaryEntry("Other Secondary Approval Status", "OtherSecondaryApprovalStatus", "CS", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x1010), ElementsDictionaryEntry("Actual Environmental Conditions", "ActualEnvironmentalConditions", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x1020), ElementsDictionaryEntry("Expiry Date", "ExpiryDate", "DA", "1")); public_dictionary.emplace(Tag(0x0014, 0x1040), ElementsDictionaryEntry("Environmental Conditions", "EnvironmentalConditions", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x2002), ElementsDictionaryEntry("Evaluator Sequence", "EvaluatorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x2004), ElementsDictionaryEntry("Evaluator Number", "EvaluatorNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0014, 0x2006), ElementsDictionaryEntry("Evaluator Name", "EvaluatorName", "PN", "1")); public_dictionary.emplace(Tag(0x0014, 0x2008), ElementsDictionaryEntry("Evaluation Attempt", "EvaluationAttempt", "IS", "1")); public_dictionary.emplace(Tag(0x0014, 0x2012), ElementsDictionaryEntry("Indication Sequence", "IndicationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x2014), ElementsDictionaryEntry("Indication Number", "IndicationNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0014, 0x2016), ElementsDictionaryEntry("Indication Label", "IndicationLabel", "SH", "1")); public_dictionary.emplace(Tag(0x0014, 0x2018), ElementsDictionaryEntry("Indication Description", "IndicationDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x201a), ElementsDictionaryEntry("Indication Type", "IndicationType", "CS", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x201c), ElementsDictionaryEntry("Indication Disposition", "IndicationDisposition", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x201e), ElementsDictionaryEntry("Indication ROI Sequence", "IndicationROISequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x2030), ElementsDictionaryEntry("Indication Physical Property Sequence", "IndicationPhysicalPropertySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x2032), ElementsDictionaryEntry("Property Label", "PropertyLabel", "SH", "1")); public_dictionary.emplace(Tag(0x0014, 0x2202), ElementsDictionaryEntry("Coordinate System Number of Axes", "CoordinateSystemNumberOfAxes", "IS", "1")); public_dictionary.emplace(Tag(0x0014, 0x2204), ElementsDictionaryEntry("Coordinate System Axes Sequence", "CoordinateSystemAxesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x2206), ElementsDictionaryEntry("Coordinate System Axis Description", "CoordinateSystemAxisDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x2208), ElementsDictionaryEntry("Coordinate System Data Set Mapping", "CoordinateSystemDataSetMapping", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x220a), ElementsDictionaryEntry("Coordinate System Axis Number", "CoordinateSystemAxisNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0014, 0x220c), ElementsDictionaryEntry("Coordinate System Axis Type", "CoordinateSystemAxisType", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x220e), ElementsDictionaryEntry("Coordinate System Axis Units", "CoordinateSystemAxisUnits", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x2210), ElementsDictionaryEntry("Coordinate System Axis Values", "CoordinateSystemAxisValues", "OB", "1")); public_dictionary.emplace(Tag(0x0014, 0x2220), ElementsDictionaryEntry("Coordinate System Transform Sequence", "CoordinateSystemTransformSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x2222), ElementsDictionaryEntry("Transform Description", "TransformDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x2224), ElementsDictionaryEntry("Transform Number of Axes", "TransformNumberOfAxes", "IS", "1")); public_dictionary.emplace(Tag(0x0014, 0x2226), ElementsDictionaryEntry("Transform Order of Axes", "TransformOrderOfAxes", "IS", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x2228), ElementsDictionaryEntry("Transformed Axis Units", "TransformedAxisUnits", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x222a), ElementsDictionaryEntry("Coordinate System Transform Rotation and Scale Matrix", "CoordinateSystemTransformRotationAndScaleMatrix", "DS", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x222c), ElementsDictionaryEntry("Coordinate System Transform Translation Matrix", "CoordinateSystemTransformTranslationMatrix", "DS", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x3011), ElementsDictionaryEntry("Internal Detector Frame Time", "InternalDetectorFrameTime", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x3012), ElementsDictionaryEntry("Number of Frames Integrated", "NumberOfFramesIntegrated", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x3020), ElementsDictionaryEntry("Detector Temperature Sequence", "DetectorTemperatureSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x3022), ElementsDictionaryEntry("Sensor Name", "SensorName", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x3024), ElementsDictionaryEntry("Horizontal Offset of Sensor", "HorizontalOffsetOfSensor", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x3026), ElementsDictionaryEntry("Vertical Offset of Sensor", "VerticalOffsetOfSensor", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x3028), ElementsDictionaryEntry("Sensor Temperature", "SensorTemperature", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x3040), ElementsDictionaryEntry("Dark Current Sequence", "DarkCurrentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x3050), ElementsDictionaryEntry("Dark Current Counts", "DarkCurrentCounts", "OB or OW", "1")); public_dictionary.emplace(Tag(0x0014, 0x3060), ElementsDictionaryEntry("Gain Correction Reference Sequence", "GainCorrectionReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x3070), ElementsDictionaryEntry("Air Counts", "AirCounts", "OB or OW", "1")); public_dictionary.emplace(Tag(0x0014, 0x3071), ElementsDictionaryEntry("KV Used in Gain Calibration", "KVUsedInGainCalibration", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x3072), ElementsDictionaryEntry("MA Used in Gain Calibration", "MAUsedInGainCalibration", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x3073), ElementsDictionaryEntry("Number of Frames Used for Integration", "NumberOfFramesUsedForIntegration", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x3074), ElementsDictionaryEntry("Filter Material Used in Gain Calibration", "FilterMaterialUsedInGainCalibration", "LO", "1")); public_dictionary.emplace(Tag(0x0014, 0x3075), ElementsDictionaryEntry("Filter Thickness Used in Gain Calibration", "FilterThicknessUsedInGainCalibration", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x3076), ElementsDictionaryEntry("Date of Gain Calibration", "DateOfGainCalibration", "DA", "1")); public_dictionary.emplace(Tag(0x0014, 0x3077), ElementsDictionaryEntry("Time of Gain Calibration", "TimeOfGainCalibration", "TM", "1")); public_dictionary.emplace(Tag(0x0014, 0x3080), ElementsDictionaryEntry("Bad Pixel Image", "BadPixelImage", "OB", "1")); public_dictionary.emplace(Tag(0x0014, 0x3099), ElementsDictionaryEntry("Calibration Notes", "CalibrationNotes", "LT", "1")); public_dictionary.emplace(Tag(0x0014, 0x4002), ElementsDictionaryEntry("Pulser Equipment Sequence", "PulserEquipmentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4004), ElementsDictionaryEntry("Pulser Type", "PulserType", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4006), ElementsDictionaryEntry("Pulser Notes", "PulserNotes", "LT", "1")); public_dictionary.emplace(Tag(0x0014, 0x4008), ElementsDictionaryEntry("Receiver Equipment Sequence", "ReceiverEquipmentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x400a), ElementsDictionaryEntry("Amplifier Type", "AmplifierType", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x400c), ElementsDictionaryEntry("Receiver Notes", "ReceiverNotes", "LT", "1")); public_dictionary.emplace(Tag(0x0014, 0x400e), ElementsDictionaryEntry("Pre-Amplifier Equipment Sequence", "PreAmplifierEquipmentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x400f), ElementsDictionaryEntry("Pre-Amplifier Notes", "PreAmplifierNotes", "LT", "1")); public_dictionary.emplace(Tag(0x0014, 0x4010), ElementsDictionaryEntry("Transmit Transducer Sequence", "TransmitTransducerSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4011), ElementsDictionaryEntry("Receive Transducer Sequence", "ReceiveTransducerSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4012), ElementsDictionaryEntry("Number of Elements", "NumberOfElements", "US", "1")); public_dictionary.emplace(Tag(0x0014, 0x4013), ElementsDictionaryEntry("Element Shape", "ElementShape", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4014), ElementsDictionaryEntry("Element Dimension A", "ElementDimensionA", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4015), ElementsDictionaryEntry("Element Dimension B", "ElementDimensionB", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4016), ElementsDictionaryEntry("Element Pitch A", "ElementPitchA", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4017), ElementsDictionaryEntry("Measured Beam Dimension A", "MeasuredBeamDimensionA", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4018), ElementsDictionaryEntry("Measured Beam Dimension B", "MeasuredBeamDimensionB", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4019), ElementsDictionaryEntry("Location of Measured Beam Diameter", "LocationOfMeasuredBeamDiameter", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x401a), ElementsDictionaryEntry("Nominal Frequency", "NominalFrequency", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x401b), ElementsDictionaryEntry("Measured Center Frequency", "MeasuredCenterFrequency", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x401c), ElementsDictionaryEntry("Measured Bandwidth", "MeasuredBandwidth", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x401d), ElementsDictionaryEntry("Element Pitch B", "ElementPitchB", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4020), ElementsDictionaryEntry("Pulser Settings Sequence", "PulserSettingsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4022), ElementsDictionaryEntry("Pulse Width", "PulseWidth", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4024), ElementsDictionaryEntry("Excitation Frequency", "ExcitationFrequency", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4026), ElementsDictionaryEntry("Modulation Type", "ModulationType", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4028), ElementsDictionaryEntry("Damping", "Damping", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4030), ElementsDictionaryEntry("Receiver Settings Sequence", "ReceiverSettingsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4031), ElementsDictionaryEntry("Acquired Soundpath Length", "AcquiredSoundpathLength", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4032), ElementsDictionaryEntry("Acquisition Compression Type", "AcquisitionCompressionType", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4033), ElementsDictionaryEntry("Acquisition Sample Size", "AcquisitionSampleSize", "IS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4034), ElementsDictionaryEntry("Rectifier Smoothing", "RectifierSmoothing", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4035), ElementsDictionaryEntry("DAC Sequence", "DACSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4036), ElementsDictionaryEntry("DAC Type", "DACType", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4038), ElementsDictionaryEntry("DAC Gain Points", "DACGainPoints", "DS", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x403a), ElementsDictionaryEntry("DAC Time Points", "DACTimePoints", "DS", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x403c), ElementsDictionaryEntry("DAC Amplitude", "DACAmplitude", "DS", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x4040), ElementsDictionaryEntry("Pre-Amplifier Settings Sequence", "PreAmplifierSettingsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4050), ElementsDictionaryEntry("Transmit Transducer Settings Sequence", "TransmitTransducerSettingsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4051), ElementsDictionaryEntry("Receive Transducer Settings Sequence", "ReceiveTransducerSettingsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4052), ElementsDictionaryEntry("Incident Angle", "IncidentAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4054), ElementsDictionaryEntry("Coupling Technique", "CouplingTechnique", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x4056), ElementsDictionaryEntry("Coupling Medium", "CouplingMedium", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x4057), ElementsDictionaryEntry("Coupling Velocity", "CouplingVelocity", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4058), ElementsDictionaryEntry("Probe Center Location X", "ProbeCenterLocationX", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4059), ElementsDictionaryEntry("Probe Center Location Z", "ProbeCenterLocationZ", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x405a), ElementsDictionaryEntry("Sound Path Length", "SoundPathLength", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x405c), ElementsDictionaryEntry("Delay Law Identifier", "DelayLawIdentifier", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x4060), ElementsDictionaryEntry("Gate Settings Sequence", "GateSettingsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4062), ElementsDictionaryEntry("Gate Threshold", "GateThreshold", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4064), ElementsDictionaryEntry("Velocity of Sound", "VelocityOfSound", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4070), ElementsDictionaryEntry("Calibration Settings Sequence", "CalibrationSettingsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4072), ElementsDictionaryEntry("Calibration Procedure", "CalibrationProcedure", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x4074), ElementsDictionaryEntry("Procedure Version", "ProcedureVersion", "SH", "1")); public_dictionary.emplace(Tag(0x0014, 0x4076), ElementsDictionaryEntry("Procedure Creation Date", "ProcedureCreationDate", "DA", "1")); public_dictionary.emplace(Tag(0x0014, 0x4078), ElementsDictionaryEntry("Procedure Expiration Date", "ProcedureExpirationDate", "DA", "1")); public_dictionary.emplace(Tag(0x0014, 0x407a), ElementsDictionaryEntry("Procedure Last Modified Date", "ProcedureLastModifiedDate", "DA", "1")); public_dictionary.emplace(Tag(0x0014, 0x407c), ElementsDictionaryEntry("Calibration Time", "CalibrationTime", "TM", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x407e), ElementsDictionaryEntry("Calibration Date", "CalibrationDate", "DA", "1-n")); public_dictionary.emplace(Tag(0x0014, 0x4080), ElementsDictionaryEntry("Probe Drive Equipment Sequence", "ProbeDriveEquipmentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4081), ElementsDictionaryEntry("Drive Type", "DriveType", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4082), ElementsDictionaryEntry("Probe Drive Notes", "ProbeDriveNotes", "LT", "1")); public_dictionary.emplace(Tag(0x0014, 0x4083), ElementsDictionaryEntry("Drive Probe Sequence", "DriveProbeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4084), ElementsDictionaryEntry("Probe Inductance", "ProbeInductance", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4085), ElementsDictionaryEntry("Probe Resistance", "ProbeResistance", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4086), ElementsDictionaryEntry("Receive Probe Sequence", "ReceiveProbeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4087), ElementsDictionaryEntry("Probe Drive Settings Sequence", "ProbeDriveSettingsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4088), ElementsDictionaryEntry("Bridge Resistors", "BridgeResistors", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4089), ElementsDictionaryEntry("Probe Orientation Angle", "ProbeOrientationAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x408b), ElementsDictionaryEntry("User Selected Gain Y", "UserSelectedGainY", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x408c), ElementsDictionaryEntry("User Selected Phase", "UserSelectedPhase", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x408d), ElementsDictionaryEntry("User Selected Offset X", "UserSelectedOffsetX", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x408e), ElementsDictionaryEntry("User Selected Offset Y", "UserSelectedOffsetY", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x4091), ElementsDictionaryEntry("Channel Settings Sequence", "ChannelSettingsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x4092), ElementsDictionaryEntry("Channel Threshold", "ChannelThreshold", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x409a), ElementsDictionaryEntry("Scanner Settings Sequence", "ScannerSettingsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0014, 0x409b), ElementsDictionaryEntry("Scan Procedure", "ScanProcedure", "ST", "1")); public_dictionary.emplace(Tag(0x0014, 0x409c), ElementsDictionaryEntry("Translation Rate X", "TranslationRateX", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x409d), ElementsDictionaryEntry("Translation Rate Y", "TranslationRateY", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x409f), ElementsDictionaryEntry("Channel Overlap", "ChannelOverlap", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x40a0), ElementsDictionaryEntry("Image Quality Indicator Type", "ImageQualityIndicatorType", "LO", "1")); public_dictionary.emplace(Tag(0x0014, 0x40a1), ElementsDictionaryEntry("Image Quality Indicator Material", "ImageQualityIndicatorMaterial", "LO", "1")); public_dictionary.emplace(Tag(0x0014, 0x40a2), ElementsDictionaryEntry("Image Quality Indicator Size", "ImageQualityIndicatorSize", "LO", "1")); public_dictionary.emplace(Tag(0x0014, 0x5002), ElementsDictionaryEntry("LINAC Energy", "LINACEnergy", "IS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5004), ElementsDictionaryEntry("LINAC Output", "LINACOutput", "IS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5100), ElementsDictionaryEntry("Active Aperture", "ActiveAperture", "US", "1")); public_dictionary.emplace(Tag(0x0014, 0x5101), ElementsDictionaryEntry("Total Aperture", "TotalAperture", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5102), ElementsDictionaryEntry("Aperture Elevation", "ApertureElevation", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5103), ElementsDictionaryEntry("Main Lobe Angle", "MainLobeAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5104), ElementsDictionaryEntry("Main Roof Angle", "MainRoofAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5105), ElementsDictionaryEntry("Connector Type", "ConnectorType", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5106), ElementsDictionaryEntry("Wedge Model Number", "WedgeModelNumber", "SH", "1")); public_dictionary.emplace(Tag(0x0014, 0x5107), ElementsDictionaryEntry("Wedge Angle Float", "WedgeAngleFloat", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5108), ElementsDictionaryEntry("Wedge Roof Angle", "WedgeRoofAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5109), ElementsDictionaryEntry("Wedge Element 1 Position", "WedgeElement1Position", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x510a), ElementsDictionaryEntry("Wedge Material Velocity", "WedgeMaterialVelocity", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x510b), ElementsDictionaryEntry("Wedge Material", "WedgeMaterial", "SH", "1")); public_dictionary.emplace(Tag(0x0014, 0x510c), ElementsDictionaryEntry("Wedge Offset Z", "WedgeOffsetZ", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x510d), ElementsDictionaryEntry("Wedge Origin Offset X", "WedgeOriginOffsetX", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x510e), ElementsDictionaryEntry("Wedge Time Delay", "WedgeTimeDelay", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x510f), ElementsDictionaryEntry("Wedge Name", "WedgeName", "SH", "1")); public_dictionary.emplace(Tag(0x0014, 0x5110), ElementsDictionaryEntry("Wedge Manufacturer Name", "WedgeManufacturerName", "SH", "1")); public_dictionary.emplace(Tag(0x0014, 0x5111), ElementsDictionaryEntry("Wedge Description", "WedgeDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0014, 0x5112), ElementsDictionaryEntry("Nominal Beam Angle", "NominalBeamAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5113), ElementsDictionaryEntry("Wedge Offset X", "WedgeOffsetX", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5114), ElementsDictionaryEntry("Wedge Offset Y", "WedgeOffsetY", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5115), ElementsDictionaryEntry("Wedge Total Length", "WedgeTotalLength", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5116), ElementsDictionaryEntry("Wedge In Contact Length", "WedgeInContactLength", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5117), ElementsDictionaryEntry("Wedge Front Gap", "WedgeFrontGap", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5118), ElementsDictionaryEntry("Wedge Total Height", "WedgeTotalHeight", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x5119), ElementsDictionaryEntry("Wedge Front Height", "WedgeFrontHeight", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x511a), ElementsDictionaryEntry("Wedge Rear Height", "WedgeRearHeight", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x511b), ElementsDictionaryEntry("Wedge Total Width", "WedgeTotalWidth", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x511c), ElementsDictionaryEntry("Wedge In Contact Width", "WedgeInContactWidth", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x511d), ElementsDictionaryEntry("Wedge Chamfer Height", "WedgeChamferHeight", "DS", "1")); public_dictionary.emplace(Tag(0x0014, 0x511e), ElementsDictionaryEntry("Wedge Curve", "WedgeCurve", "CS", "1")); public_dictionary.emplace(Tag(0x0014, 0x511f), ElementsDictionaryEntry("Radius Along the Wedge", "RadiusAlongWedge", "DS", "1")); public_tags.emplace("CADFileFormat", Tag(0x0014, 0x0023)); public_tags.emplace("ComponentReferenceSystem", Tag(0x0014, 0x0024)); public_tags.emplace("ComponentManufacturingProcedure", Tag(0x0014, 0x0025)); public_tags.emplace("ComponentManufacturer", Tag(0x0014, 0x0028)); public_tags.emplace("MaterialThickness", Tag(0x0014, 0x0030)); public_tags.emplace("MaterialPipeDiameter", Tag(0x0014, 0x0032)); public_tags.emplace("MaterialIsolationDiameter", Tag(0x0014, 0x0034)); public_tags.emplace("MaterialGrade", Tag(0x0014, 0x0042)); public_tags.emplace("MaterialPropertiesDescription", Tag(0x0014, 0x0044)); public_tags.emplace("MaterialPropertiesFileFormatRetired", Tag(0x0014, 0x0045)); public_tags.emplace("MaterialNotes", Tag(0x0014, 0x0046)); public_tags.emplace("ComponentShape", Tag(0x0014, 0x0050)); public_tags.emplace("CurvatureType", Tag(0x0014, 0x0052)); public_tags.emplace("OuterDiameter", Tag(0x0014, 0x0054)); public_tags.emplace("InnerDiameter", Tag(0x0014, 0x0056)); public_tags.emplace("ComponentWelderIDs", Tag(0x0014, 0x0100)); public_tags.emplace("SecondaryApprovalStatus", Tag(0x0014, 0x0101)); public_tags.emplace("SecondaryReviewDate", Tag(0x0014, 0x0102)); public_tags.emplace("SecondaryReviewTime", Tag(0x0014, 0x0103)); public_tags.emplace("SecondaryReviewerName", Tag(0x0014, 0x0104)); public_tags.emplace("RepairID", Tag(0x0014, 0x0105)); public_tags.emplace("MultipleComponentApprovalSequence", Tag(0x0014, 0x0106)); public_tags.emplace("OtherApprovalStatus", Tag(0x0014, 0x0107)); public_tags.emplace("OtherSecondaryApprovalStatus", Tag(0x0014, 0x0108)); public_tags.emplace("ActualEnvironmentalConditions", Tag(0x0014, 0x1010)); public_tags.emplace("ExpiryDate", Tag(0x0014, 0x1020)); public_tags.emplace("EnvironmentalConditions", Tag(0x0014, 0x1040)); public_tags.emplace("EvaluatorSequence", Tag(0x0014, 0x2002)); public_tags.emplace("EvaluatorNumber", Tag(0x0014, 0x2004)); public_tags.emplace("EvaluatorName", Tag(0x0014, 0x2006)); public_tags.emplace("EvaluationAttempt", Tag(0x0014, 0x2008)); public_tags.emplace("IndicationSequence", Tag(0x0014, 0x2012)); public_tags.emplace("IndicationNumber", Tag(0x0014, 0x2014)); public_tags.emplace("IndicationLabel", Tag(0x0014, 0x2016)); public_tags.emplace("IndicationDescription", Tag(0x0014, 0x2018)); public_tags.emplace("IndicationType", Tag(0x0014, 0x201a)); public_tags.emplace("IndicationDisposition", Tag(0x0014, 0x201c)); public_tags.emplace("IndicationROISequence", Tag(0x0014, 0x201e)); public_tags.emplace("IndicationPhysicalPropertySequence", Tag(0x0014, 0x2030)); public_tags.emplace("PropertyLabel", Tag(0x0014, 0x2032)); public_tags.emplace("CoordinateSystemNumberOfAxes", Tag(0x0014, 0x2202)); public_tags.emplace("CoordinateSystemAxesSequence", Tag(0x0014, 0x2204)); public_tags.emplace("CoordinateSystemAxisDescription", Tag(0x0014, 0x2206)); public_tags.emplace("CoordinateSystemDataSetMapping", Tag(0x0014, 0x2208)); public_tags.emplace("CoordinateSystemAxisNumber", Tag(0x0014, 0x220a)); public_tags.emplace("CoordinateSystemAxisType", Tag(0x0014, 0x220c)); public_tags.emplace("CoordinateSystemAxisUnits", Tag(0x0014, 0x220e)); public_tags.emplace("CoordinateSystemAxisValues", Tag(0x0014, 0x2210)); public_tags.emplace("CoordinateSystemTransformSequence", Tag(0x0014, 0x2220)); public_tags.emplace("TransformDescription", Tag(0x0014, 0x2222)); public_tags.emplace("TransformNumberOfAxes", Tag(0x0014, 0x2224)); public_tags.emplace("TransformOrderOfAxes", Tag(0x0014, 0x2226)); public_tags.emplace("TransformedAxisUnits", Tag(0x0014, 0x2228)); public_tags.emplace("CoordinateSystemTransformRotationAndScaleMatrix", Tag(0x0014, 0x222a)); public_tags.emplace("CoordinateSystemTransformTranslationMatrix", Tag(0x0014, 0x222c)); public_tags.emplace("InternalDetectorFrameTime", Tag(0x0014, 0x3011)); public_tags.emplace("NumberOfFramesIntegrated", Tag(0x0014, 0x3012)); public_tags.emplace("DetectorTemperatureSequence", Tag(0x0014, 0x3020)); public_tags.emplace("SensorName", Tag(0x0014, 0x3022)); public_tags.emplace("HorizontalOffsetOfSensor", Tag(0x0014, 0x3024)); public_tags.emplace("VerticalOffsetOfSensor", Tag(0x0014, 0x3026)); public_tags.emplace("SensorTemperature", Tag(0x0014, 0x3028)); public_tags.emplace("DarkCurrentSequence", Tag(0x0014, 0x3040)); public_tags.emplace("DarkCurrentCounts", Tag(0x0014, 0x3050)); public_tags.emplace("GainCorrectionReferenceSequence", Tag(0x0014, 0x3060)); public_tags.emplace("AirCounts", Tag(0x0014, 0x3070)); public_tags.emplace("KVUsedInGainCalibration", Tag(0x0014, 0x3071)); public_tags.emplace("MAUsedInGainCalibration", Tag(0x0014, 0x3072)); public_tags.emplace("NumberOfFramesUsedForIntegration", Tag(0x0014, 0x3073)); public_tags.emplace("FilterMaterialUsedInGainCalibration", Tag(0x0014, 0x3074)); public_tags.emplace("FilterThicknessUsedInGainCalibration", Tag(0x0014, 0x3075)); public_tags.emplace("DateOfGainCalibration", Tag(0x0014, 0x3076)); public_tags.emplace("TimeOfGainCalibration", Tag(0x0014, 0x3077)); public_tags.emplace("BadPixelImage", Tag(0x0014, 0x3080)); public_tags.emplace("CalibrationNotes", Tag(0x0014, 0x3099)); public_tags.emplace("PulserEquipmentSequence", Tag(0x0014, 0x4002)); public_tags.emplace("PulserType", Tag(0x0014, 0x4004)); public_tags.emplace("PulserNotes", Tag(0x0014, 0x4006)); public_tags.emplace("ReceiverEquipmentSequence", Tag(0x0014, 0x4008)); public_tags.emplace("AmplifierType", Tag(0x0014, 0x400a)); public_tags.emplace("ReceiverNotes", Tag(0x0014, 0x400c)); public_tags.emplace("PreAmplifierEquipmentSequence", Tag(0x0014, 0x400e)); public_tags.emplace("PreAmplifierNotes", Tag(0x0014, 0x400f)); public_tags.emplace("TransmitTransducerSequence", Tag(0x0014, 0x4010)); public_tags.emplace("ReceiveTransducerSequence", Tag(0x0014, 0x4011)); public_tags.emplace("NumberOfElements", Tag(0x0014, 0x4012)); public_tags.emplace("ElementShape", Tag(0x0014, 0x4013)); public_tags.emplace("ElementDimensionA", Tag(0x0014, 0x4014)); public_tags.emplace("ElementDimensionB", Tag(0x0014, 0x4015)); public_tags.emplace("ElementPitchA", Tag(0x0014, 0x4016)); public_tags.emplace("MeasuredBeamDimensionA", Tag(0x0014, 0x4017)); public_tags.emplace("MeasuredBeamDimensionB", Tag(0x0014, 0x4018)); public_tags.emplace("LocationOfMeasuredBeamDiameter", Tag(0x0014, 0x4019)); public_tags.emplace("NominalFrequency", Tag(0x0014, 0x401a)); public_tags.emplace("MeasuredCenterFrequency", Tag(0x0014, 0x401b)); public_tags.emplace("MeasuredBandwidth", Tag(0x0014, 0x401c)); public_tags.emplace("ElementPitchB", Tag(0x0014, 0x401d)); public_tags.emplace("PulserSettingsSequence", Tag(0x0014, 0x4020)); public_tags.emplace("PulseWidth", Tag(0x0014, 0x4022)); public_tags.emplace("ExcitationFrequency", Tag(0x0014, 0x4024)); public_tags.emplace("ModulationType", Tag(0x0014, 0x4026)); public_tags.emplace("Damping", Tag(0x0014, 0x4028)); public_tags.emplace("ReceiverSettingsSequence", Tag(0x0014, 0x4030)); public_tags.emplace("AcquiredSoundpathLength", Tag(0x0014, 0x4031)); public_tags.emplace("AcquisitionCompressionType", Tag(0x0014, 0x4032)); public_tags.emplace("AcquisitionSampleSize", Tag(0x0014, 0x4033)); public_tags.emplace("RectifierSmoothing", Tag(0x0014, 0x4034)); public_tags.emplace("DACSequence", Tag(0x0014, 0x4035)); public_tags.emplace("DACType", Tag(0x0014, 0x4036)); public_tags.emplace("DACGainPoints", Tag(0x0014, 0x4038)); public_tags.emplace("DACTimePoints", Tag(0x0014, 0x403a)); public_tags.emplace("DACAmplitude", Tag(0x0014, 0x403c)); public_tags.emplace("PreAmplifierSettingsSequence", Tag(0x0014, 0x4040)); public_tags.emplace("TransmitTransducerSettingsSequence", Tag(0x0014, 0x4050)); public_tags.emplace("ReceiveTransducerSettingsSequence", Tag(0x0014, 0x4051)); public_tags.emplace("IncidentAngle", Tag(0x0014, 0x4052)); public_tags.emplace("CouplingTechnique", Tag(0x0014, 0x4054)); public_tags.emplace("CouplingMedium", Tag(0x0014, 0x4056)); public_tags.emplace("CouplingVelocity", Tag(0x0014, 0x4057)); public_tags.emplace("ProbeCenterLocationX", Tag(0x0014, 0x4058)); public_tags.emplace("ProbeCenterLocationZ", Tag(0x0014, 0x4059)); public_tags.emplace("SoundPathLength", Tag(0x0014, 0x405a)); public_tags.emplace("DelayLawIdentifier", Tag(0x0014, 0x405c)); public_tags.emplace("GateSettingsSequence", Tag(0x0014, 0x4060)); public_tags.emplace("GateThreshold", Tag(0x0014, 0x4062)); public_tags.emplace("VelocityOfSound", Tag(0x0014, 0x4064)); public_tags.emplace("CalibrationSettingsSequence", Tag(0x0014, 0x4070)); public_tags.emplace("CalibrationProcedure", Tag(0x0014, 0x4072)); public_tags.emplace("ProcedureVersion", Tag(0x0014, 0x4074)); public_tags.emplace("ProcedureCreationDate", Tag(0x0014, 0x4076)); public_tags.emplace("ProcedureExpirationDate", Tag(0x0014, 0x4078)); public_tags.emplace("ProcedureLastModifiedDate", Tag(0x0014, 0x407a)); public_tags.emplace("CalibrationTime", Tag(0x0014, 0x407c)); public_tags.emplace("CalibrationDate", Tag(0x0014, 0x407e)); public_tags.emplace("ProbeDriveEquipmentSequence", Tag(0x0014, 0x4080)); public_tags.emplace("DriveType", Tag(0x0014, 0x4081)); public_tags.emplace("ProbeDriveNotes", Tag(0x0014, 0x4082)); public_tags.emplace("DriveProbeSequence", Tag(0x0014, 0x4083)); public_tags.emplace("ProbeInductance", Tag(0x0014, 0x4084)); public_tags.emplace("ProbeResistance", Tag(0x0014, 0x4085)); public_tags.emplace("ReceiveProbeSequence", Tag(0x0014, 0x4086)); public_tags.emplace("ProbeDriveSettingsSequence", Tag(0x0014, 0x4087)); public_tags.emplace("BridgeResistors", Tag(0x0014, 0x4088)); public_tags.emplace("ProbeOrientationAngle", Tag(0x0014, 0x4089)); public_tags.emplace("UserSelectedGainY", Tag(0x0014, 0x408b)); public_tags.emplace("UserSelectedPhase", Tag(0x0014, 0x408c)); public_tags.emplace("UserSelectedOffsetX", Tag(0x0014, 0x408d)); public_tags.emplace("UserSelectedOffsetY", Tag(0x0014, 0x408e)); public_tags.emplace("ChannelSettingsSequence", Tag(0x0014, 0x4091)); public_tags.emplace("ChannelThreshold", Tag(0x0014, 0x4092)); public_tags.emplace("ScannerSettingsSequence", Tag(0x0014, 0x409a)); public_tags.emplace("ScanProcedure", Tag(0x0014, 0x409b)); public_tags.emplace("TranslationRateX", Tag(0x0014, 0x409c)); public_tags.emplace("TranslationRateY", Tag(0x0014, 0x409d)); public_tags.emplace("ChannelOverlap", Tag(0x0014, 0x409f)); public_tags.emplace("ImageQualityIndicatorType", Tag(0x0014, 0x40a0)); public_tags.emplace("ImageQualityIndicatorMaterial", Tag(0x0014, 0x40a1)); public_tags.emplace("ImageQualityIndicatorSize", Tag(0x0014, 0x40a2)); public_tags.emplace("LINACEnergy", Tag(0x0014, 0x5002)); public_tags.emplace("LINACOutput", Tag(0x0014, 0x5004)); public_tags.emplace("ActiveAperture", Tag(0x0014, 0x5100)); public_tags.emplace("TotalAperture", Tag(0x0014, 0x5101)); public_tags.emplace("ApertureElevation", Tag(0x0014, 0x5102)); public_tags.emplace("MainLobeAngle", Tag(0x0014, 0x5103)); public_tags.emplace("MainRoofAngle", Tag(0x0014, 0x5104)); public_tags.emplace("ConnectorType", Tag(0x0014, 0x5105)); public_tags.emplace("WedgeModelNumber", Tag(0x0014, 0x5106)); public_tags.emplace("WedgeAngleFloat", Tag(0x0014, 0x5107)); public_tags.emplace("WedgeRoofAngle", Tag(0x0014, 0x5108)); public_tags.emplace("WedgeElement1Position", Tag(0x0014, 0x5109)); public_tags.emplace("WedgeMaterialVelocity", Tag(0x0014, 0x510a)); public_tags.emplace("WedgeMaterial", Tag(0x0014, 0x510b)); public_tags.emplace("WedgeOffsetZ", Tag(0x0014, 0x510c)); public_tags.emplace("WedgeOriginOffsetX", Tag(0x0014, 0x510d)); public_tags.emplace("WedgeTimeDelay", Tag(0x0014, 0x510e)); public_tags.emplace("WedgeName", Tag(0x0014, 0x510f)); public_tags.emplace("WedgeManufacturerName", Tag(0x0014, 0x5110)); public_tags.emplace("WedgeDescription", Tag(0x0014, 0x5111)); public_tags.emplace("NominalBeamAngle", Tag(0x0014, 0x5112)); public_tags.emplace("WedgeOffsetX", Tag(0x0014, 0x5113)); public_tags.emplace("WedgeOffsetY", Tag(0x0014, 0x5114)); public_tags.emplace("WedgeTotalLength", Tag(0x0014, 0x5115)); public_tags.emplace("WedgeInContactLength", Tag(0x0014, 0x5116)); public_tags.emplace("WedgeFrontGap", Tag(0x0014, 0x5117)); public_tags.emplace("WedgeTotalHeight", Tag(0x0014, 0x5118)); public_tags.emplace("WedgeFrontHeight", Tag(0x0014, 0x5119)); public_tags.emplace("WedgeRearHeight", Tag(0x0014, 0x511a)); public_tags.emplace("WedgeTotalWidth", Tag(0x0014, 0x511b)); public_tags.emplace("WedgeInContactWidth", Tag(0x0014, 0x511c)); public_tags.emplace("WedgeChamferHeight", Tag(0x0014, 0x511d)); public_tags.emplace("WedgeCurve", Tag(0x0014, 0x511e)); public_tags.emplace("RadiusAlongWedge", Tag(0x0014, 0x511f)); } } }odil-0.11.0/src/odil/registry_0014.h000066400000000000000000000230361362244656000167370ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0014 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0014 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const CADFileFormat(0x0014, 0x0023); Tag const ComponentReferenceSystem(0x0014, 0x0024); Tag const ComponentManufacturingProcedure(0x0014, 0x0025); Tag const ComponentManufacturer(0x0014, 0x0028); Tag const MaterialThickness(0x0014, 0x0030); Tag const MaterialPipeDiameter(0x0014, 0x0032); Tag const MaterialIsolationDiameter(0x0014, 0x0034); Tag const MaterialGrade(0x0014, 0x0042); Tag const MaterialPropertiesDescription(0x0014, 0x0044); Tag const MaterialPropertiesFileFormatRetired(0x0014, 0x0045); Tag const MaterialNotes(0x0014, 0x0046); Tag const ComponentShape(0x0014, 0x0050); Tag const CurvatureType(0x0014, 0x0052); Tag const OuterDiameter(0x0014, 0x0054); Tag const InnerDiameter(0x0014, 0x0056); Tag const ComponentWelderIDs(0x0014, 0x0100); Tag const SecondaryApprovalStatus(0x0014, 0x0101); Tag const SecondaryReviewDate(0x0014, 0x0102); Tag const SecondaryReviewTime(0x0014, 0x0103); Tag const SecondaryReviewerName(0x0014, 0x0104); Tag const RepairID(0x0014, 0x0105); Tag const MultipleComponentApprovalSequence(0x0014, 0x0106); Tag const OtherApprovalStatus(0x0014, 0x0107); Tag const OtherSecondaryApprovalStatus(0x0014, 0x0108); Tag const ActualEnvironmentalConditions(0x0014, 0x1010); Tag const ExpiryDate(0x0014, 0x1020); Tag const EnvironmentalConditions(0x0014, 0x1040); Tag const EvaluatorSequence(0x0014, 0x2002); Tag const EvaluatorNumber(0x0014, 0x2004); Tag const EvaluatorName(0x0014, 0x2006); Tag const EvaluationAttempt(0x0014, 0x2008); Tag const IndicationSequence(0x0014, 0x2012); Tag const IndicationNumber(0x0014, 0x2014); Tag const IndicationLabel(0x0014, 0x2016); Tag const IndicationDescription(0x0014, 0x2018); Tag const IndicationType(0x0014, 0x201a); Tag const IndicationDisposition(0x0014, 0x201c); Tag const IndicationROISequence(0x0014, 0x201e); Tag const IndicationPhysicalPropertySequence(0x0014, 0x2030); Tag const PropertyLabel(0x0014, 0x2032); Tag const CoordinateSystemNumberOfAxes(0x0014, 0x2202); Tag const CoordinateSystemAxesSequence(0x0014, 0x2204); Tag const CoordinateSystemAxisDescription(0x0014, 0x2206); Tag const CoordinateSystemDataSetMapping(0x0014, 0x2208); Tag const CoordinateSystemAxisNumber(0x0014, 0x220a); Tag const CoordinateSystemAxisType(0x0014, 0x220c); Tag const CoordinateSystemAxisUnits(0x0014, 0x220e); Tag const CoordinateSystemAxisValues(0x0014, 0x2210); Tag const CoordinateSystemTransformSequence(0x0014, 0x2220); Tag const TransformDescription(0x0014, 0x2222); Tag const TransformNumberOfAxes(0x0014, 0x2224); Tag const TransformOrderOfAxes(0x0014, 0x2226); Tag const TransformedAxisUnits(0x0014, 0x2228); Tag const CoordinateSystemTransformRotationAndScaleMatrix(0x0014, 0x222a); Tag const CoordinateSystemTransformTranslationMatrix(0x0014, 0x222c); Tag const InternalDetectorFrameTime(0x0014, 0x3011); Tag const NumberOfFramesIntegrated(0x0014, 0x3012); Tag const DetectorTemperatureSequence(0x0014, 0x3020); Tag const SensorName(0x0014, 0x3022); Tag const HorizontalOffsetOfSensor(0x0014, 0x3024); Tag const VerticalOffsetOfSensor(0x0014, 0x3026); Tag const SensorTemperature(0x0014, 0x3028); Tag const DarkCurrentSequence(0x0014, 0x3040); Tag const DarkCurrentCounts(0x0014, 0x3050); Tag const GainCorrectionReferenceSequence(0x0014, 0x3060); Tag const AirCounts(0x0014, 0x3070); Tag const KVUsedInGainCalibration(0x0014, 0x3071); Tag const MAUsedInGainCalibration(0x0014, 0x3072); Tag const NumberOfFramesUsedForIntegration(0x0014, 0x3073); Tag const FilterMaterialUsedInGainCalibration(0x0014, 0x3074); Tag const FilterThicknessUsedInGainCalibration(0x0014, 0x3075); Tag const DateOfGainCalibration(0x0014, 0x3076); Tag const TimeOfGainCalibration(0x0014, 0x3077); Tag const BadPixelImage(0x0014, 0x3080); Tag const CalibrationNotes(0x0014, 0x3099); Tag const PulserEquipmentSequence(0x0014, 0x4002); Tag const PulserType(0x0014, 0x4004); Tag const PulserNotes(0x0014, 0x4006); Tag const ReceiverEquipmentSequence(0x0014, 0x4008); Tag const AmplifierType(0x0014, 0x400a); Tag const ReceiverNotes(0x0014, 0x400c); Tag const PreAmplifierEquipmentSequence(0x0014, 0x400e); Tag const PreAmplifierNotes(0x0014, 0x400f); Tag const TransmitTransducerSequence(0x0014, 0x4010); Tag const ReceiveTransducerSequence(0x0014, 0x4011); Tag const NumberOfElements(0x0014, 0x4012); Tag const ElementShape(0x0014, 0x4013); Tag const ElementDimensionA(0x0014, 0x4014); Tag const ElementDimensionB(0x0014, 0x4015); Tag const ElementPitchA(0x0014, 0x4016); Tag const MeasuredBeamDimensionA(0x0014, 0x4017); Tag const MeasuredBeamDimensionB(0x0014, 0x4018); Tag const LocationOfMeasuredBeamDiameter(0x0014, 0x4019); Tag const NominalFrequency(0x0014, 0x401a); Tag const MeasuredCenterFrequency(0x0014, 0x401b); Tag const MeasuredBandwidth(0x0014, 0x401c); Tag const ElementPitchB(0x0014, 0x401d); Tag const PulserSettingsSequence(0x0014, 0x4020); Tag const PulseWidth(0x0014, 0x4022); Tag const ExcitationFrequency(0x0014, 0x4024); Tag const ModulationType(0x0014, 0x4026); Tag const Damping(0x0014, 0x4028); Tag const ReceiverSettingsSequence(0x0014, 0x4030); Tag const AcquiredSoundpathLength(0x0014, 0x4031); Tag const AcquisitionCompressionType(0x0014, 0x4032); Tag const AcquisitionSampleSize(0x0014, 0x4033); Tag const RectifierSmoothing(0x0014, 0x4034); Tag const DACSequence(0x0014, 0x4035); Tag const DACType(0x0014, 0x4036); Tag const DACGainPoints(0x0014, 0x4038); Tag const DACTimePoints(0x0014, 0x403a); Tag const DACAmplitude(0x0014, 0x403c); Tag const PreAmplifierSettingsSequence(0x0014, 0x4040); Tag const TransmitTransducerSettingsSequence(0x0014, 0x4050); Tag const ReceiveTransducerSettingsSequence(0x0014, 0x4051); Tag const IncidentAngle(0x0014, 0x4052); Tag const CouplingTechnique(0x0014, 0x4054); Tag const CouplingMedium(0x0014, 0x4056); Tag const CouplingVelocity(0x0014, 0x4057); Tag const ProbeCenterLocationX(0x0014, 0x4058); Tag const ProbeCenterLocationZ(0x0014, 0x4059); Tag const SoundPathLength(0x0014, 0x405a); Tag const DelayLawIdentifier(0x0014, 0x405c); Tag const GateSettingsSequence(0x0014, 0x4060); Tag const GateThreshold(0x0014, 0x4062); Tag const VelocityOfSound(0x0014, 0x4064); Tag const CalibrationSettingsSequence(0x0014, 0x4070); Tag const CalibrationProcedure(0x0014, 0x4072); Tag const ProcedureVersion(0x0014, 0x4074); Tag const ProcedureCreationDate(0x0014, 0x4076); Tag const ProcedureExpirationDate(0x0014, 0x4078); Tag const ProcedureLastModifiedDate(0x0014, 0x407a); Tag const CalibrationTime(0x0014, 0x407c); Tag const CalibrationDate(0x0014, 0x407e); Tag const ProbeDriveEquipmentSequence(0x0014, 0x4080); Tag const DriveType(0x0014, 0x4081); Tag const ProbeDriveNotes(0x0014, 0x4082); Tag const DriveProbeSequence(0x0014, 0x4083); Tag const ProbeInductance(0x0014, 0x4084); Tag const ProbeResistance(0x0014, 0x4085); Tag const ReceiveProbeSequence(0x0014, 0x4086); Tag const ProbeDriveSettingsSequence(0x0014, 0x4087); Tag const BridgeResistors(0x0014, 0x4088); Tag const ProbeOrientationAngle(0x0014, 0x4089); Tag const UserSelectedGainY(0x0014, 0x408b); Tag const UserSelectedPhase(0x0014, 0x408c); Tag const UserSelectedOffsetX(0x0014, 0x408d); Tag const UserSelectedOffsetY(0x0014, 0x408e); Tag const ChannelSettingsSequence(0x0014, 0x4091); Tag const ChannelThreshold(0x0014, 0x4092); Tag const ScannerSettingsSequence(0x0014, 0x409a); Tag const ScanProcedure(0x0014, 0x409b); Tag const TranslationRateX(0x0014, 0x409c); Tag const TranslationRateY(0x0014, 0x409d); Tag const ChannelOverlap(0x0014, 0x409f); Tag const ImageQualityIndicatorType(0x0014, 0x40a0); Tag const ImageQualityIndicatorMaterial(0x0014, 0x40a1); Tag const ImageQualityIndicatorSize(0x0014, 0x40a2); Tag const LINACEnergy(0x0014, 0x5002); Tag const LINACOutput(0x0014, 0x5004); Tag const ActiveAperture(0x0014, 0x5100); Tag const TotalAperture(0x0014, 0x5101); Tag const ApertureElevation(0x0014, 0x5102); Tag const MainLobeAngle(0x0014, 0x5103); Tag const MainRoofAngle(0x0014, 0x5104); Tag const ConnectorType(0x0014, 0x5105); Tag const WedgeModelNumber(0x0014, 0x5106); Tag const WedgeAngleFloat(0x0014, 0x5107); Tag const WedgeRoofAngle(0x0014, 0x5108); Tag const WedgeElement1Position(0x0014, 0x5109); Tag const WedgeMaterialVelocity(0x0014, 0x510a); Tag const WedgeMaterial(0x0014, 0x510b); Tag const WedgeOffsetZ(0x0014, 0x510c); Tag const WedgeOriginOffsetX(0x0014, 0x510d); Tag const WedgeTimeDelay(0x0014, 0x510e); Tag const WedgeName(0x0014, 0x510f); Tag const WedgeManufacturerName(0x0014, 0x5110); Tag const WedgeDescription(0x0014, 0x5111); Tag const NominalBeamAngle(0x0014, 0x5112); Tag const WedgeOffsetX(0x0014, 0x5113); Tag const WedgeOffsetY(0x0014, 0x5114); Tag const WedgeTotalLength(0x0014, 0x5115); Tag const WedgeInContactLength(0x0014, 0x5116); Tag const WedgeFrontGap(0x0014, 0x5117); Tag const WedgeTotalHeight(0x0014, 0x5118); Tag const WedgeFrontHeight(0x0014, 0x5119); Tag const WedgeRearHeight(0x0014, 0x511a); Tag const WedgeTotalWidth(0x0014, 0x511b); Tag const WedgeInContactWidth(0x0014, 0x511c); Tag const WedgeChamferHeight(0x0014, 0x511d); Tag const WedgeCurve(0x0014, 0x511e); Tag const RadiusAlongWedge(0x0014, 0x511f); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0014odil-0.11.0/src/odil/registry_0016.cpp000066400000000000000000000511431362244656000172740ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0016( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0016, 0x0001), ElementsDictionaryEntry("White Point", "WhitePoint", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0002), ElementsDictionaryEntry("Primary Chromaticities", "PrimaryChromaticities", "DS", "3")); public_dictionary.emplace(Tag(0x0016, 0x0003), ElementsDictionaryEntry("Battery Level", "BatteryLevel", "UT", "1")); public_dictionary.emplace(Tag(0x0016, 0x0004), ElementsDictionaryEntry("Exposure Time in Seconds", "ExposureTimeInSeconds", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0005), ElementsDictionaryEntry("F-Number", "FNumber", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0006), ElementsDictionaryEntry("OECF Rows", "OECFRows", "IS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0007), ElementsDictionaryEntry("OECF Columns", "OECFColumns", "IS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0008), ElementsDictionaryEntry("OECF Column Names", "OECFColumnNames", "UC", "1-n")); public_dictionary.emplace(Tag(0x0016, 0x0009), ElementsDictionaryEntry("OECF Values", "OECFValues", "DS", "1-n")); public_dictionary.emplace(Tag(0x0016, 0x000a), ElementsDictionaryEntry("Spatial Frequency Response Rows", "SpatialFrequencyResponseRows", "IS", "1")); public_dictionary.emplace(Tag(0x0016, 0x000b), ElementsDictionaryEntry("Spatial Frequency Response Columns", "SpatialFrequencyResponseColumns", "IS", "1")); public_dictionary.emplace(Tag(0x0016, 0x000c), ElementsDictionaryEntry("Spatial Frequency Response Column Names", "SpatialFrequencyResponseColumnNames", "UC", "1-n")); public_dictionary.emplace(Tag(0x0016, 0x000d), ElementsDictionaryEntry("Spatial Frequency Response Values", "SpatialFrequencyResponseValues", "DS", "1-n")); public_dictionary.emplace(Tag(0x0016, 0x000e), ElementsDictionaryEntry("Color Filter Array Pattern Rows", "ColorFilterArrayPatternRows", "IS", "1")); public_dictionary.emplace(Tag(0x0016, 0x000f), ElementsDictionaryEntry("Color Filter Array Pattern Columns", "ColorFilterArrayPatternColumns", "IS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0010), ElementsDictionaryEntry("Color Filter Array Pattern Values", "ColorFilterArrayPatternValues", "DS", "1-n")); public_dictionary.emplace(Tag(0x0016, 0x0011), ElementsDictionaryEntry("Flash Firing Status", "FlashFiringStatus", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0012), ElementsDictionaryEntry("Flash Return Status", "FlashReturnStatus", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0013), ElementsDictionaryEntry("Flash Mode", "FlashMode", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0014), ElementsDictionaryEntry("Flash Function Present", "FlashFunctionPresent", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0015), ElementsDictionaryEntry("Flash Red Eye Mode", "FlashRedEyeMode", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0016), ElementsDictionaryEntry("Exposure Program", "ExposureProgram", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0017), ElementsDictionaryEntry("Spectral Sensitivity", "SpectralSensitivity", "UT", "1")); public_dictionary.emplace(Tag(0x0016, 0x0018), ElementsDictionaryEntry("Photographic Sensitivity", "PhotographicSensitivity", "IS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0019), ElementsDictionaryEntry("Self Timer Mode", "SelfTimerMode", "IS", "1")); public_dictionary.emplace(Tag(0x0016, 0x001a), ElementsDictionaryEntry("Sensitivity Type", "SensitivityType", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x001b), ElementsDictionaryEntry("Standard Output Sensitivity", "StandardOutputSensitivity", "IS", "1")); public_dictionary.emplace(Tag(0x0016, 0x001c), ElementsDictionaryEntry("Recommended Exposure Index", "RecommendedExposureIndex", "IS", "1")); public_dictionary.emplace(Tag(0x0016, 0x001d), ElementsDictionaryEntry("ISO Speed", "ISOSpeed", "IS", "1")); public_dictionary.emplace(Tag(0x0016, 0x001e), ElementsDictionaryEntry("ISO Speed Latitude yyy", "ISOSpeedLatitudeyyy", "IS", "1")); public_dictionary.emplace(Tag(0x0016, 0x001f), ElementsDictionaryEntry("ISO Speed Latitude zzz", "ISOSpeedLatitudezzz", "IS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0020), ElementsDictionaryEntry("EXIF Version", "EXIFVersion", "UT", "1")); public_dictionary.emplace(Tag(0x0016, 0x0021), ElementsDictionaryEntry("Shutter Speed Value", "ShutterSpeedValue", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0022), ElementsDictionaryEntry("Aperture Value", "ApertureValue", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0023), ElementsDictionaryEntry("Brightness Value", "BrightnessValue", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0024), ElementsDictionaryEntry("Exposure Bias Value", "ExposureBiasValue", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0025), ElementsDictionaryEntry("Max Aperture Value", "MaxApertureValue", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0026), ElementsDictionaryEntry("Subject Distance", "SubjectDistance", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0027), ElementsDictionaryEntry("Metering Mode", "MeteringMode", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0028), ElementsDictionaryEntry("Light Source", "LightSource", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0029), ElementsDictionaryEntry("Focal Length", "FocalLength", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x002a), ElementsDictionaryEntry("Subject Area", "SubjectArea", "IS", "2-4")); public_dictionary.emplace(Tag(0x0016, 0x002b), ElementsDictionaryEntry("Maker Note", "MakerNote", "OB", "1")); public_dictionary.emplace(Tag(0x0016, 0x0030), ElementsDictionaryEntry("Temperature", "Temperature", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0031), ElementsDictionaryEntry("Humidity", "Humidity", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0032), ElementsDictionaryEntry("Pressure", "Pressure", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0033), ElementsDictionaryEntry("Water Depth", "WaterDepth", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0034), ElementsDictionaryEntry("Acceleration", "Acceleration", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0035), ElementsDictionaryEntry("Camera Elevation Angle", "CameraElevationAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0036), ElementsDictionaryEntry("Flash Energy", "FlashEnergy", "DS", "1-2")); public_dictionary.emplace(Tag(0x0016, 0x0037), ElementsDictionaryEntry("Subject Location", "SubjectLocation", "IS", "2")); public_dictionary.emplace(Tag(0x0016, 0x0038), ElementsDictionaryEntry("Photographic Exposure Index", "PhotographicExposureIndex", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0039), ElementsDictionaryEntry("Sensing Method", "SensingMethod", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x003a), ElementsDictionaryEntry("File Source", "FileSource", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x003b), ElementsDictionaryEntry("Scene Type", "SceneType", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0041), ElementsDictionaryEntry("Custom Rendered", "CustomRendered", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0042), ElementsDictionaryEntry("Exposure Mode", "ExposureMode", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0043), ElementsDictionaryEntry("White Balance", "WhiteBalance", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0044), ElementsDictionaryEntry("Digital Zoom Ratio", "DigitalZoomRatio", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0045), ElementsDictionaryEntry("Focal Length In 35mm Film", "FocalLengthIn35mmFilm", "IS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0046), ElementsDictionaryEntry("Scene Capture Type", "SceneCaptureType", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0047), ElementsDictionaryEntry("Gain Control", "GainControl", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0048), ElementsDictionaryEntry("Contrast", "Contrast", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0049), ElementsDictionaryEntry("Saturation", "Saturation", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x004a), ElementsDictionaryEntry("Sharpness", "Sharpness", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x004b), ElementsDictionaryEntry("Device Setting Description", "DeviceSettingDescription", "OB", "1")); public_dictionary.emplace(Tag(0x0016, 0x004c), ElementsDictionaryEntry("Subject Distance Range", "SubjectDistanceRange", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x004d), ElementsDictionaryEntry("Camera Owner Name", "CameraOwnerName", "UT", "1")); public_dictionary.emplace(Tag(0x0016, 0x004e), ElementsDictionaryEntry("Lens Specification", "LensSpecification", "DS", "4")); public_dictionary.emplace(Tag(0x0016, 0x004f), ElementsDictionaryEntry("Lens Make", "LensMake", "UT", "1")); public_dictionary.emplace(Tag(0x0016, 0x0050), ElementsDictionaryEntry("Lens Model", "LensModel", "UT", "1")); public_dictionary.emplace(Tag(0x0016, 0x0051), ElementsDictionaryEntry("Lens Serial Number", "LensSerialNumber", "UT", "1")); public_dictionary.emplace(Tag(0x0016, 0x0061), ElementsDictionaryEntry("Interoperability Index", "InteroperabilityIndex", "CS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0062), ElementsDictionaryEntry("Interoperability Version", "InteroperabilityVersion", "OB", "1")); public_dictionary.emplace(Tag(0x0016, 0x0070), ElementsDictionaryEntry("GPS Version ID", "GPSVersionID", "OB", "1")); public_dictionary.emplace(Tag(0x0016, 0x0071), ElementsDictionaryEntry("GPS Latitude Ref", "GPSLatitudeRef", "CS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0072), ElementsDictionaryEntry("GPS Latitude", "GPSLatitude", "DS", "3")); public_dictionary.emplace(Tag(0x0016, 0x0073), ElementsDictionaryEntry("GPS Longitude Ref", "GPSLongitudeRef", "CS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0074), ElementsDictionaryEntry("GPS Longitude", "GPSLongitude", "DS", "3")); public_dictionary.emplace(Tag(0x0016, 0x0075), ElementsDictionaryEntry("GPS Altitude Ref", "GPSAltitudeRef", "US", "1")); public_dictionary.emplace(Tag(0x0016, 0x0076), ElementsDictionaryEntry("GPS Altitude", "GPSAltitude", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0077), ElementsDictionaryEntry("GPS Time Stamp", "GPSTimeStamp", "DT", "1")); public_dictionary.emplace(Tag(0x0016, 0x0078), ElementsDictionaryEntry("GPS Satellites", "GPSSatellites", "UT", "1")); public_dictionary.emplace(Tag(0x0016, 0x0079), ElementsDictionaryEntry("GPS Status", "GPSStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0016, 0x007a), ElementsDictionaryEntry("GPS Measure Mode", "GPSMeasureMode", "CS", "1")); public_dictionary.emplace(Tag(0x0016, 0x007b), ElementsDictionaryEntry("GPS DOP", "GPSDOP", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x007c), ElementsDictionaryEntry("GPS Speed Ref", "GPSSpeedRef", "CS", "1")); public_dictionary.emplace(Tag(0x0016, 0x007d), ElementsDictionaryEntry("GPS Speed", "GPSSpeed", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x007e), ElementsDictionaryEntry("GPS Track Ref", "GPSTrackRef", "CS", "1")); public_dictionary.emplace(Tag(0x0016, 0x007f), ElementsDictionaryEntry("GPS Track", "GPSTrack", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0080), ElementsDictionaryEntry("GPS Img Direction Ref", "GPSImgDirectionRef", "CS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0081), ElementsDictionaryEntry("GPS Img Direction", "GPSImgDirection", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0082), ElementsDictionaryEntry("GPS Map Datum", "GPSMapDatum", "UT", "1")); public_dictionary.emplace(Tag(0x0016, 0x0083), ElementsDictionaryEntry("GPS Dest Latitude Ref", "GPSDestLatitudeRef", "CS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0084), ElementsDictionaryEntry("GPS Dest Latitude", "GPSDestLatitude", "DS", "3")); public_dictionary.emplace(Tag(0x0016, 0x0085), ElementsDictionaryEntry("GPS Dest Longitude Ref", "GPSDestLongitudeRef", "CS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0086), ElementsDictionaryEntry("GPS Dest Longitude", "GPSDestLongitude", "DS", "3")); public_dictionary.emplace(Tag(0x0016, 0x0087), ElementsDictionaryEntry("GPS Dest Bearing Ref", "GPSDestBearingRef", "CS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0088), ElementsDictionaryEntry("GPS Dest Bearing", "GPSDestBearing", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x0089), ElementsDictionaryEntry("GPS Dest Distance Ref", "GPSDestDistanceRef", "CS", "1")); public_dictionary.emplace(Tag(0x0016, 0x008a), ElementsDictionaryEntry("GPS Dest Distance", "GPSDestDistance", "DS", "1")); public_dictionary.emplace(Tag(0x0016, 0x008b), ElementsDictionaryEntry("GPS Processing Method", "GPSProcessingMethod", "OB", "1")); public_dictionary.emplace(Tag(0x0016, 0x008c), ElementsDictionaryEntry("GPS Area Information", "GPSAreaInformation", "OB", "1")); public_dictionary.emplace(Tag(0x0016, 0x008d), ElementsDictionaryEntry("GPS Date Stamp", "GPSDateStamp", "DT", "1")); public_dictionary.emplace(Tag(0x0016, 0x008e), ElementsDictionaryEntry("GPS Differential", "GPSDifferential", "IS", "1")); public_tags.emplace("WhitePoint", Tag(0x0016, 0x0001)); public_tags.emplace("PrimaryChromaticities", Tag(0x0016, 0x0002)); public_tags.emplace("BatteryLevel", Tag(0x0016, 0x0003)); public_tags.emplace("ExposureTimeInSeconds", Tag(0x0016, 0x0004)); public_tags.emplace("FNumber", Tag(0x0016, 0x0005)); public_tags.emplace("OECFRows", Tag(0x0016, 0x0006)); public_tags.emplace("OECFColumns", Tag(0x0016, 0x0007)); public_tags.emplace("OECFColumnNames", Tag(0x0016, 0x0008)); public_tags.emplace("OECFValues", Tag(0x0016, 0x0009)); public_tags.emplace("SpatialFrequencyResponseRows", Tag(0x0016, 0x000a)); public_tags.emplace("SpatialFrequencyResponseColumns", Tag(0x0016, 0x000b)); public_tags.emplace("SpatialFrequencyResponseColumnNames", Tag(0x0016, 0x000c)); public_tags.emplace("SpatialFrequencyResponseValues", Tag(0x0016, 0x000d)); public_tags.emplace("ColorFilterArrayPatternRows", Tag(0x0016, 0x000e)); public_tags.emplace("ColorFilterArrayPatternColumns", Tag(0x0016, 0x000f)); public_tags.emplace("ColorFilterArrayPatternValues", Tag(0x0016, 0x0010)); public_tags.emplace("FlashFiringStatus", Tag(0x0016, 0x0011)); public_tags.emplace("FlashReturnStatus", Tag(0x0016, 0x0012)); public_tags.emplace("FlashMode", Tag(0x0016, 0x0013)); public_tags.emplace("FlashFunctionPresent", Tag(0x0016, 0x0014)); public_tags.emplace("FlashRedEyeMode", Tag(0x0016, 0x0015)); public_tags.emplace("ExposureProgram", Tag(0x0016, 0x0016)); public_tags.emplace("SpectralSensitivity", Tag(0x0016, 0x0017)); public_tags.emplace("PhotographicSensitivity", Tag(0x0016, 0x0018)); public_tags.emplace("SelfTimerMode", Tag(0x0016, 0x0019)); public_tags.emplace("SensitivityType", Tag(0x0016, 0x001a)); public_tags.emplace("StandardOutputSensitivity", Tag(0x0016, 0x001b)); public_tags.emplace("RecommendedExposureIndex", Tag(0x0016, 0x001c)); public_tags.emplace("ISOSpeed", Tag(0x0016, 0x001d)); public_tags.emplace("ISOSpeedLatitudeyyy", Tag(0x0016, 0x001e)); public_tags.emplace("ISOSpeedLatitudezzz", Tag(0x0016, 0x001f)); public_tags.emplace("EXIFVersion", Tag(0x0016, 0x0020)); public_tags.emplace("ShutterSpeedValue", Tag(0x0016, 0x0021)); public_tags.emplace("ApertureValue", Tag(0x0016, 0x0022)); public_tags.emplace("BrightnessValue", Tag(0x0016, 0x0023)); public_tags.emplace("ExposureBiasValue", Tag(0x0016, 0x0024)); public_tags.emplace("MaxApertureValue", Tag(0x0016, 0x0025)); public_tags.emplace("SubjectDistance", Tag(0x0016, 0x0026)); public_tags.emplace("MeteringMode", Tag(0x0016, 0x0027)); public_tags.emplace("LightSource", Tag(0x0016, 0x0028)); public_tags.emplace("FocalLength", Tag(0x0016, 0x0029)); public_tags.emplace("SubjectArea", Tag(0x0016, 0x002a)); public_tags.emplace("MakerNote", Tag(0x0016, 0x002b)); public_tags.emplace("Temperature", Tag(0x0016, 0x0030)); public_tags.emplace("Humidity", Tag(0x0016, 0x0031)); public_tags.emplace("Pressure", Tag(0x0016, 0x0032)); public_tags.emplace("WaterDepth", Tag(0x0016, 0x0033)); public_tags.emplace("Acceleration", Tag(0x0016, 0x0034)); public_tags.emplace("CameraElevationAngle", Tag(0x0016, 0x0035)); public_tags.emplace("FlashEnergy", Tag(0x0016, 0x0036)); public_tags.emplace("SubjectLocation", Tag(0x0016, 0x0037)); public_tags.emplace("PhotographicExposureIndex", Tag(0x0016, 0x0038)); public_tags.emplace("SensingMethod", Tag(0x0016, 0x0039)); public_tags.emplace("FileSource", Tag(0x0016, 0x003a)); public_tags.emplace("SceneType", Tag(0x0016, 0x003b)); public_tags.emplace("CustomRendered", Tag(0x0016, 0x0041)); public_tags.emplace("ExposureMode", Tag(0x0016, 0x0042)); public_tags.emplace("WhiteBalance", Tag(0x0016, 0x0043)); public_tags.emplace("DigitalZoomRatio", Tag(0x0016, 0x0044)); public_tags.emplace("FocalLengthIn35mmFilm", Tag(0x0016, 0x0045)); public_tags.emplace("SceneCaptureType", Tag(0x0016, 0x0046)); public_tags.emplace("GainControl", Tag(0x0016, 0x0047)); public_tags.emplace("Contrast", Tag(0x0016, 0x0048)); public_tags.emplace("Saturation", Tag(0x0016, 0x0049)); public_tags.emplace("Sharpness", Tag(0x0016, 0x004a)); public_tags.emplace("DeviceSettingDescription", Tag(0x0016, 0x004b)); public_tags.emplace("SubjectDistanceRange", Tag(0x0016, 0x004c)); public_tags.emplace("CameraOwnerName", Tag(0x0016, 0x004d)); public_tags.emplace("LensSpecification", Tag(0x0016, 0x004e)); public_tags.emplace("LensMake", Tag(0x0016, 0x004f)); public_tags.emplace("LensModel", Tag(0x0016, 0x0050)); public_tags.emplace("LensSerialNumber", Tag(0x0016, 0x0051)); public_tags.emplace("InteroperabilityIndex", Tag(0x0016, 0x0061)); public_tags.emplace("InteroperabilityVersion", Tag(0x0016, 0x0062)); public_tags.emplace("GPSVersionID", Tag(0x0016, 0x0070)); public_tags.emplace("GPSLatitudeRef", Tag(0x0016, 0x0071)); public_tags.emplace("GPSLatitude", Tag(0x0016, 0x0072)); public_tags.emplace("GPSLongitudeRef", Tag(0x0016, 0x0073)); public_tags.emplace("GPSLongitude", Tag(0x0016, 0x0074)); public_tags.emplace("GPSAltitudeRef", Tag(0x0016, 0x0075)); public_tags.emplace("GPSAltitude", Tag(0x0016, 0x0076)); public_tags.emplace("GPSTimeStamp", Tag(0x0016, 0x0077)); public_tags.emplace("GPSSatellites", Tag(0x0016, 0x0078)); public_tags.emplace("GPSStatus", Tag(0x0016, 0x0079)); public_tags.emplace("GPSMeasureMode", Tag(0x0016, 0x007a)); public_tags.emplace("GPSDOP", Tag(0x0016, 0x007b)); public_tags.emplace("GPSSpeedRef", Tag(0x0016, 0x007c)); public_tags.emplace("GPSSpeed", Tag(0x0016, 0x007d)); public_tags.emplace("GPSTrackRef", Tag(0x0016, 0x007e)); public_tags.emplace("GPSTrack", Tag(0x0016, 0x007f)); public_tags.emplace("GPSImgDirectionRef", Tag(0x0016, 0x0080)); public_tags.emplace("GPSImgDirection", Tag(0x0016, 0x0081)); public_tags.emplace("GPSMapDatum", Tag(0x0016, 0x0082)); public_tags.emplace("GPSDestLatitudeRef", Tag(0x0016, 0x0083)); public_tags.emplace("GPSDestLatitude", Tag(0x0016, 0x0084)); public_tags.emplace("GPSDestLongitudeRef", Tag(0x0016, 0x0085)); public_tags.emplace("GPSDestLongitude", Tag(0x0016, 0x0086)); public_tags.emplace("GPSDestBearingRef", Tag(0x0016, 0x0087)); public_tags.emplace("GPSDestBearing", Tag(0x0016, 0x0088)); public_tags.emplace("GPSDestDistanceRef", Tag(0x0016, 0x0089)); public_tags.emplace("GPSDestDistance", Tag(0x0016, 0x008a)); public_tags.emplace("GPSProcessingMethod", Tag(0x0016, 0x008b)); public_tags.emplace("GPSAreaInformation", Tag(0x0016, 0x008c)); public_tags.emplace("GPSDateStamp", Tag(0x0016, 0x008d)); public_tags.emplace("GPSDifferential", Tag(0x0016, 0x008e)); } } }odil-0.11.0/src/odil/registry_0016.h000066400000000000000000000121471362244656000167420ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0016 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0016 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const WhitePoint(0x0016, 0x0001); Tag const PrimaryChromaticities(0x0016, 0x0002); Tag const BatteryLevel(0x0016, 0x0003); Tag const ExposureTimeInSeconds(0x0016, 0x0004); Tag const FNumber(0x0016, 0x0005); Tag const OECFRows(0x0016, 0x0006); Tag const OECFColumns(0x0016, 0x0007); Tag const OECFColumnNames(0x0016, 0x0008); Tag const OECFValues(0x0016, 0x0009); Tag const SpatialFrequencyResponseRows(0x0016, 0x000a); Tag const SpatialFrequencyResponseColumns(0x0016, 0x000b); Tag const SpatialFrequencyResponseColumnNames(0x0016, 0x000c); Tag const SpatialFrequencyResponseValues(0x0016, 0x000d); Tag const ColorFilterArrayPatternRows(0x0016, 0x000e); Tag const ColorFilterArrayPatternColumns(0x0016, 0x000f); Tag const ColorFilterArrayPatternValues(0x0016, 0x0010); Tag const FlashFiringStatus(0x0016, 0x0011); Tag const FlashReturnStatus(0x0016, 0x0012); Tag const FlashMode(0x0016, 0x0013); Tag const FlashFunctionPresent(0x0016, 0x0014); Tag const FlashRedEyeMode(0x0016, 0x0015); Tag const ExposureProgram(0x0016, 0x0016); Tag const SpectralSensitivity(0x0016, 0x0017); Tag const PhotographicSensitivity(0x0016, 0x0018); Tag const SelfTimerMode(0x0016, 0x0019); Tag const SensitivityType(0x0016, 0x001a); Tag const StandardOutputSensitivity(0x0016, 0x001b); Tag const RecommendedExposureIndex(0x0016, 0x001c); Tag const ISOSpeed(0x0016, 0x001d); Tag const ISOSpeedLatitudeyyy(0x0016, 0x001e); Tag const ISOSpeedLatitudezzz(0x0016, 0x001f); Tag const EXIFVersion(0x0016, 0x0020); Tag const ShutterSpeedValue(0x0016, 0x0021); Tag const ApertureValue(0x0016, 0x0022); Tag const BrightnessValue(0x0016, 0x0023); Tag const ExposureBiasValue(0x0016, 0x0024); Tag const MaxApertureValue(0x0016, 0x0025); Tag const SubjectDistance(0x0016, 0x0026); Tag const MeteringMode(0x0016, 0x0027); Tag const LightSource(0x0016, 0x0028); Tag const FocalLength(0x0016, 0x0029); Tag const SubjectArea(0x0016, 0x002a); Tag const MakerNote(0x0016, 0x002b); Tag const Temperature(0x0016, 0x0030); Tag const Humidity(0x0016, 0x0031); Tag const Pressure(0x0016, 0x0032); Tag const WaterDepth(0x0016, 0x0033); Tag const Acceleration(0x0016, 0x0034); Tag const CameraElevationAngle(0x0016, 0x0035); Tag const FlashEnergy(0x0016, 0x0036); Tag const SubjectLocation(0x0016, 0x0037); Tag const PhotographicExposureIndex(0x0016, 0x0038); Tag const SensingMethod(0x0016, 0x0039); Tag const FileSource(0x0016, 0x003a); Tag const SceneType(0x0016, 0x003b); Tag const CustomRendered(0x0016, 0x0041); Tag const ExposureMode(0x0016, 0x0042); Tag const WhiteBalance(0x0016, 0x0043); Tag const DigitalZoomRatio(0x0016, 0x0044); Tag const FocalLengthIn35mmFilm(0x0016, 0x0045); Tag const SceneCaptureType(0x0016, 0x0046); Tag const GainControl(0x0016, 0x0047); Tag const Contrast(0x0016, 0x0048); Tag const Saturation(0x0016, 0x0049); Tag const Sharpness(0x0016, 0x004a); Tag const DeviceSettingDescription(0x0016, 0x004b); Tag const SubjectDistanceRange(0x0016, 0x004c); Tag const CameraOwnerName(0x0016, 0x004d); Tag const LensSpecification(0x0016, 0x004e); Tag const LensMake(0x0016, 0x004f); Tag const LensModel(0x0016, 0x0050); Tag const LensSerialNumber(0x0016, 0x0051); Tag const InteroperabilityIndex(0x0016, 0x0061); Tag const InteroperabilityVersion(0x0016, 0x0062); Tag const GPSVersionID(0x0016, 0x0070); Tag const GPSLatitudeRef(0x0016, 0x0071); Tag const GPSLatitude(0x0016, 0x0072); Tag const GPSLongitudeRef(0x0016, 0x0073); Tag const GPSLongitude(0x0016, 0x0074); Tag const GPSAltitudeRef(0x0016, 0x0075); Tag const GPSAltitude(0x0016, 0x0076); Tag const GPSTimeStamp(0x0016, 0x0077); Tag const GPSSatellites(0x0016, 0x0078); Tag const GPSStatus(0x0016, 0x0079); Tag const GPSMeasureMode(0x0016, 0x007a); Tag const GPSDOP(0x0016, 0x007b); Tag const GPSSpeedRef(0x0016, 0x007c); Tag const GPSSpeed(0x0016, 0x007d); Tag const GPSTrackRef(0x0016, 0x007e); Tag const GPSTrack(0x0016, 0x007f); Tag const GPSImgDirectionRef(0x0016, 0x0080); Tag const GPSImgDirection(0x0016, 0x0081); Tag const GPSMapDatum(0x0016, 0x0082); Tag const GPSDestLatitudeRef(0x0016, 0x0083); Tag const GPSDestLatitude(0x0016, 0x0084); Tag const GPSDestLongitudeRef(0x0016, 0x0085); Tag const GPSDestLongitude(0x0016, 0x0086); Tag const GPSDestBearingRef(0x0016, 0x0087); Tag const GPSDestBearing(0x0016, 0x0088); Tag const GPSDestDistanceRef(0x0016, 0x0089); Tag const GPSDestDistance(0x0016, 0x008a); Tag const GPSProcessingMethod(0x0016, 0x008b); Tag const GPSAreaInformation(0x0016, 0x008c); Tag const GPSDateStamp(0x0016, 0x008d); Tag const GPSDifferential(0x0016, 0x008e); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0016odil-0.11.0/src/odil/registry_0018.cpp000066400000000000000000005526151362244656000173100ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0018( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0018, 0x0010), ElementsDictionaryEntry("Contrast/Bolus Agent", "ContrastBolusAgent", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x0012), ElementsDictionaryEntry("Contrast/Bolus Agent Sequence", "ContrastBolusAgentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x0013), ElementsDictionaryEntry("Contrast/Bolus T1 Relaxivity", "ContrastBolusT1Relaxivity", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x0014), ElementsDictionaryEntry("Contrast/Bolus Administration Route Sequence", "ContrastBolusAdministrationRouteSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x0015), ElementsDictionaryEntry("Body Part Examined", "BodyPartExamined", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0020), ElementsDictionaryEntry("Scanning Sequence", "ScanningSequence", "CS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x0021), ElementsDictionaryEntry("Sequence Variant", "SequenceVariant", "CS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x0022), ElementsDictionaryEntry("Scan Options", "ScanOptions", "CS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x0023), ElementsDictionaryEntry("MR Acquisition Type", "MRAcquisitionType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0024), ElementsDictionaryEntry("Sequence Name", "SequenceName", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x0025), ElementsDictionaryEntry("Angio Flag", "AngioFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0026), ElementsDictionaryEntry("Intervention Drug Information Sequence", "InterventionDrugInformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x0027), ElementsDictionaryEntry("Intervention Drug Stop Time", "InterventionDrugStopTime", "TM", "1")); public_dictionary.emplace(Tag(0x0018, 0x0028), ElementsDictionaryEntry("Intervention Drug Dose", "InterventionDrugDose", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0029), ElementsDictionaryEntry("Intervention Drug Code Sequence", "InterventionDrugCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x002a), ElementsDictionaryEntry("Additional Drug Sequence", "AdditionalDrugSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x0030), ElementsDictionaryEntry("Radionuclide", "Radionuclide", "LO", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x0031), ElementsDictionaryEntry("Radiopharmaceutical", "Radiopharmaceutical", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x0032), ElementsDictionaryEntry("Energy Window Centerline", "EnergyWindowCenterline", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0033), ElementsDictionaryEntry("Energy Window Total Width", "EnergyWindowTotalWidth", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x0034), ElementsDictionaryEntry("Intervention Drug Name", "InterventionDrugName", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x0035), ElementsDictionaryEntry("Intervention Drug Start Time", "InterventionDrugStartTime", "TM", "1")); public_dictionary.emplace(Tag(0x0018, 0x0036), ElementsDictionaryEntry("Intervention Sequence", "InterventionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x0037), ElementsDictionaryEntry("Therapy Type", "TherapyType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0038), ElementsDictionaryEntry("Intervention Status", "InterventionStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0039), ElementsDictionaryEntry("Therapy Description", "TherapyDescription", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x003a), ElementsDictionaryEntry("Intervention Description", "InterventionDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0018, 0x0040), ElementsDictionaryEntry("Cine Rate", "CineRate", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0042), ElementsDictionaryEntry("Initial Cine Run State", "InitialCineRunState", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0050), ElementsDictionaryEntry("Slice Thickness", "SliceThickness", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0060), ElementsDictionaryEntry("KVP", "KVP", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0070), ElementsDictionaryEntry("Counts Accumulated", "CountsAccumulated", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0071), ElementsDictionaryEntry("Acquisition Termination Condition", "AcquisitionTerminationCondition", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0072), ElementsDictionaryEntry("Effective Duration", "EffectiveDuration", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0073), ElementsDictionaryEntry("Acquisition Start Condition", "AcquisitionStartCondition", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0074), ElementsDictionaryEntry("Acquisition Start Condition Data", "AcquisitionStartConditionData", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0075), ElementsDictionaryEntry("Acquisition Termination Condition Data", "AcquisitionTerminationConditionData", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0080), ElementsDictionaryEntry("Repetition Time", "RepetitionTime", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0081), ElementsDictionaryEntry("Echo Time", "EchoTime", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0082), ElementsDictionaryEntry("Inversion Time", "InversionTime", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0083), ElementsDictionaryEntry("Number of Averages", "NumberOfAverages", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0084), ElementsDictionaryEntry("Imaging Frequency", "ImagingFrequency", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0085), ElementsDictionaryEntry("Imaged Nucleus", "ImagedNucleus", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x0086), ElementsDictionaryEntry("Echo Number(s)", "EchoNumbers", "IS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x0087), ElementsDictionaryEntry("Magnetic Field Strength", "MagneticFieldStrength", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0088), ElementsDictionaryEntry("Spacing Between Slices", "SpacingBetweenSlices", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0089), ElementsDictionaryEntry("Number of Phase Encoding Steps", "NumberOfPhaseEncodingSteps", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0090), ElementsDictionaryEntry("Data Collection Diameter", "DataCollectionDiameter", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0091), ElementsDictionaryEntry("Echo Train Length", "EchoTrainLength", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0093), ElementsDictionaryEntry("Percent Sampling", "PercentSampling", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0094), ElementsDictionaryEntry("Percent Phase Field of View", "PercentPhaseFieldOfView", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x0095), ElementsDictionaryEntry("Pixel Bandwidth", "PixelBandwidth", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1000), ElementsDictionaryEntry("Device Serial Number", "DeviceSerialNumber", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1002), ElementsDictionaryEntry("Device UID", "DeviceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0018, 0x1003), ElementsDictionaryEntry("Device ID", "DeviceID", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1004), ElementsDictionaryEntry("Plate ID", "PlateID", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1005), ElementsDictionaryEntry("Generator ID", "GeneratorID", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1006), ElementsDictionaryEntry("Grid ID", "GridID", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1007), ElementsDictionaryEntry("Cassette ID", "CassetteID", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1008), ElementsDictionaryEntry("Gantry ID", "GantryID", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1009), ElementsDictionaryEntry("Unique Device Identifier", "UniqueDeviceIdentifier", "UT", "1")); public_dictionary.emplace(Tag(0x0018, 0x100a), ElementsDictionaryEntry("UDI Sequence", "UDISequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x100b), ElementsDictionaryEntry("Manufacturer's Device Class UID", "ManufacturerDeviceClassUID", "UI", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1010), ElementsDictionaryEntry("Secondary Capture Device ID", "SecondaryCaptureDeviceID", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1011), ElementsDictionaryEntry("Hardcopy Creation Device ID", "HardcopyCreationDeviceID", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1012), ElementsDictionaryEntry("Date of Secondary Capture", "DateOfSecondaryCapture", "DA", "1")); public_dictionary.emplace(Tag(0x0018, 0x1014), ElementsDictionaryEntry("Time of Secondary Capture", "TimeOfSecondaryCapture", "TM", "1")); public_dictionary.emplace(Tag(0x0018, 0x1016), ElementsDictionaryEntry("Secondary Capture Device Manufacturer", "SecondaryCaptureDeviceManufacturer", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1017), ElementsDictionaryEntry("Hardcopy Device Manufacturer", "HardcopyDeviceManufacturer", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1018), ElementsDictionaryEntry("Secondary Capture Device Manufacturer's Model Name", "SecondaryCaptureDeviceManufacturerModelName", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1019), ElementsDictionaryEntry("Secondary Capture Device Software Versions", "SecondaryCaptureDeviceSoftwareVersions", "LO", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x101a), ElementsDictionaryEntry("Hardcopy Device Software Version", "HardcopyDeviceSoftwareVersion", "LO", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x101b), ElementsDictionaryEntry("Hardcopy Device Manufacturer's Model Name", "HardcopyDeviceManufacturerModelName", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1020), ElementsDictionaryEntry("Software Versions", "SoftwareVersions", "LO", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1022), ElementsDictionaryEntry("Video Image Format Acquired", "VideoImageFormatAcquired", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x1023), ElementsDictionaryEntry("Digital Image Format Acquired", "DigitalImageFormatAcquired", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1030), ElementsDictionaryEntry("Protocol Name", "ProtocolName", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1040), ElementsDictionaryEntry("Contrast/Bolus Route", "ContrastBolusRoute", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1041), ElementsDictionaryEntry("Contrast/Bolus Volume", "ContrastBolusVolume", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1042), ElementsDictionaryEntry("Contrast/Bolus Start Time", "ContrastBolusStartTime", "TM", "1")); public_dictionary.emplace(Tag(0x0018, 0x1043), ElementsDictionaryEntry("Contrast/Bolus Stop Time", "ContrastBolusStopTime", "TM", "1")); public_dictionary.emplace(Tag(0x0018, 0x1044), ElementsDictionaryEntry("Contrast/Bolus Total Dose", "ContrastBolusTotalDose", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1045), ElementsDictionaryEntry("Syringe Counts", "SyringeCounts", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1046), ElementsDictionaryEntry("Contrast Flow Rate", "ContrastFlowRate", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1047), ElementsDictionaryEntry("Contrast Flow Duration", "ContrastFlowDuration", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1048), ElementsDictionaryEntry("Contrast/Bolus Ingredient", "ContrastBolusIngredient", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1049), ElementsDictionaryEntry("Contrast/Bolus Ingredient Concentration", "ContrastBolusIngredientConcentration", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1050), ElementsDictionaryEntry("Spatial Resolution", "SpatialResolution", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1060), ElementsDictionaryEntry("Trigger Time", "TriggerTime", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1061), ElementsDictionaryEntry("Trigger Source or Type", "TriggerSourceOrType", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1062), ElementsDictionaryEntry("Nominal Interval", "NominalInterval", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1063), ElementsDictionaryEntry("Frame Time", "FrameTime", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1064), ElementsDictionaryEntry("Cardiac Framing Type", "CardiacFramingType", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1065), ElementsDictionaryEntry("Frame Time Vector", "FrameTimeVector", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1066), ElementsDictionaryEntry("Frame Delay", "FrameDelay", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1067), ElementsDictionaryEntry("Image Trigger Delay", "ImageTriggerDelay", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1068), ElementsDictionaryEntry("Multiplex Group Time Offset", "MultiplexGroupTimeOffset", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1069), ElementsDictionaryEntry("Trigger Time Offset", "TriggerTimeOffset", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x106a), ElementsDictionaryEntry("Synchronization Trigger", "SynchronizationTrigger", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x106c), ElementsDictionaryEntry("Synchronization Channel", "SynchronizationChannel", "US", "2")); public_dictionary.emplace(Tag(0x0018, 0x106e), ElementsDictionaryEntry("Trigger Sample Position", "TriggerSamplePosition", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x1070), ElementsDictionaryEntry("Radiopharmaceutical Route", "RadiopharmaceuticalRoute", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1071), ElementsDictionaryEntry("Radiopharmaceutical Volume", "RadiopharmaceuticalVolume", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1072), ElementsDictionaryEntry("Radiopharmaceutical Start Time", "RadiopharmaceuticalStartTime", "TM", "1")); public_dictionary.emplace(Tag(0x0018, 0x1073), ElementsDictionaryEntry("Radiopharmaceutical Stop Time", "RadiopharmaceuticalStopTime", "TM", "1")); public_dictionary.emplace(Tag(0x0018, 0x1074), ElementsDictionaryEntry("Radionuclide Total Dose", "RadionuclideTotalDose", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1075), ElementsDictionaryEntry("Radionuclide Half Life", "RadionuclideHalfLife", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1076), ElementsDictionaryEntry("Radionuclide Positron Fraction", "RadionuclidePositronFraction", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1077), ElementsDictionaryEntry("Radiopharmaceutical Specific Activity", "RadiopharmaceuticalSpecificActivity", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1078), ElementsDictionaryEntry("Radiopharmaceutical Start DateTime", "RadiopharmaceuticalStartDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0018, 0x1079), ElementsDictionaryEntry("Radiopharmaceutical Stop DateTime", "RadiopharmaceuticalStopDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0018, 0x1080), ElementsDictionaryEntry("Beat Rejection Flag", "BeatRejectionFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1081), ElementsDictionaryEntry("Low R-R Value", "LowRRValue", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1082), ElementsDictionaryEntry("High R-R Value", "HighRRValue", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1083), ElementsDictionaryEntry("Intervals Acquired", "IntervalsAcquired", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1084), ElementsDictionaryEntry("Intervals Rejected", "IntervalsRejected", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1085), ElementsDictionaryEntry("PVC Rejection", "PVCRejection", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1086), ElementsDictionaryEntry("Skip Beats", "SkipBeats", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1088), ElementsDictionaryEntry("Heart Rate", "HeartRate", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1090), ElementsDictionaryEntry("Cardiac Number of Images", "CardiacNumberOfImages", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1094), ElementsDictionaryEntry("Trigger Window", "TriggerWindow", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1100), ElementsDictionaryEntry("Reconstruction Diameter", "ReconstructionDiameter", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1110), ElementsDictionaryEntry("Distance Source to Detector", "DistanceSourceToDetector", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1111), ElementsDictionaryEntry("Distance Source to Patient", "DistanceSourceToPatient", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1114), ElementsDictionaryEntry("Estimated Radiographic Magnification Factor", "EstimatedRadiographicMagnificationFactor", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1120), ElementsDictionaryEntry("Gantry/Detector Tilt", "GantryDetectorTilt", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1121), ElementsDictionaryEntry("Gantry/Detector Slew", "GantryDetectorSlew", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1130), ElementsDictionaryEntry("Table Height", "TableHeight", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1131), ElementsDictionaryEntry("Table Traverse", "TableTraverse", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1134), ElementsDictionaryEntry("Table Motion", "TableMotion", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1135), ElementsDictionaryEntry("Table Vertical Increment", "TableVerticalIncrement", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1136), ElementsDictionaryEntry("Table Lateral Increment", "TableLateralIncrement", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1137), ElementsDictionaryEntry("Table Longitudinal Increment", "TableLongitudinalIncrement", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1138), ElementsDictionaryEntry("Table Angle", "TableAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x113a), ElementsDictionaryEntry("Table Type", "TableType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1140), ElementsDictionaryEntry("Rotation Direction", "RotationDirection", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1141), ElementsDictionaryEntry("Angular Position", "AngularPosition", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1142), ElementsDictionaryEntry("Radial Position", "RadialPosition", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1143), ElementsDictionaryEntry("Scan Arc", "ScanArc", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1144), ElementsDictionaryEntry("Angular Step", "AngularStep", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1145), ElementsDictionaryEntry("Center of Rotation Offset", "CenterOfRotationOffset", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1146), ElementsDictionaryEntry("Rotation Offset", "RotationOffset", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1147), ElementsDictionaryEntry("Field of View Shape", "FieldOfViewShape", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1149), ElementsDictionaryEntry("Field of View Dimension(s)", "FieldOfViewDimensions", "IS", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x1150), ElementsDictionaryEntry("Exposure Time", "ExposureTime", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1151), ElementsDictionaryEntry("X-Ray Tube Current", "XRayTubeCurrent", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1152), ElementsDictionaryEntry("Exposure", "Exposure", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1153), ElementsDictionaryEntry("Exposure in uAs", "ExposureInuAs", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1154), ElementsDictionaryEntry("Average Pulse Width", "AveragePulseWidth", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1155), ElementsDictionaryEntry("Radiation Setting", "RadiationSetting", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1156), ElementsDictionaryEntry("Rectification Type", "RectificationType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x115a), ElementsDictionaryEntry("Radiation Mode", "RadiationMode", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x115e), ElementsDictionaryEntry("Image and Fluoroscopy Area Dose Product", "ImageAndFluoroscopyAreaDoseProduct", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1160), ElementsDictionaryEntry("Filter Type", "FilterType", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x1161), ElementsDictionaryEntry("Type of Filters", "TypeOfFilters", "LO", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1162), ElementsDictionaryEntry("Intensifier Size", "IntensifierSize", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1164), ElementsDictionaryEntry("Imager Pixel Spacing", "ImagerPixelSpacing", "DS", "2")); public_dictionary.emplace(Tag(0x0018, 0x1166), ElementsDictionaryEntry("Grid", "Grid", "CS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1170), ElementsDictionaryEntry("Generator Power", "GeneratorPower", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1180), ElementsDictionaryEntry("Collimator/grid Name", "CollimatorGridName", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x1181), ElementsDictionaryEntry("Collimator Type", "CollimatorType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1182), ElementsDictionaryEntry("Focal Distance", "FocalDistance", "IS", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x1183), ElementsDictionaryEntry("X Focus Center", "XFocusCenter", "DS", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x1184), ElementsDictionaryEntry("Y Focus Center", "YFocusCenter", "DS", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x1190), ElementsDictionaryEntry("Focal Spot(s)", "FocalSpots", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1191), ElementsDictionaryEntry("Anode Target Material", "AnodeTargetMaterial", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x11a0), ElementsDictionaryEntry("Body Part Thickness", "BodyPartThickness", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x11a2), ElementsDictionaryEntry("Compression Force", "CompressionForce", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x11a3), ElementsDictionaryEntry("Compression Pressure", "CompressionPressure", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x11a4), ElementsDictionaryEntry("Paddle Description", "PaddleDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x11a5), ElementsDictionaryEntry("Compression Contact Area", "CompressionContactArea", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1200), ElementsDictionaryEntry("Date of Last Calibration", "DateOfLastCalibration", "DA", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1201), ElementsDictionaryEntry("Time of Last Calibration", "TimeOfLastCalibration", "TM", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1202), ElementsDictionaryEntry("DateTime of Last Calibration", "DateTimeOfLastCalibration", "DT", "1")); public_dictionary.emplace(Tag(0x0018, 0x1210), ElementsDictionaryEntry("Convolution Kernel", "ConvolutionKernel", "SH", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1240), ElementsDictionaryEntry("Upper/Lower Pixel Values", "UpperLowerPixelValues", "IS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1242), ElementsDictionaryEntry("Actual Frame Duration", "ActualFrameDuration", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1243), ElementsDictionaryEntry("Count Rate", "CountRate", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1244), ElementsDictionaryEntry("Preferred Playback Sequencing", "PreferredPlaybackSequencing", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x1250), ElementsDictionaryEntry("Receive Coil Name", "ReceiveCoilName", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x1251), ElementsDictionaryEntry("Transmit Coil Name", "TransmitCoilName", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x1260), ElementsDictionaryEntry("Plate Type", "PlateType", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x1261), ElementsDictionaryEntry("Phosphor Type", "PhosphorType", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1271), ElementsDictionaryEntry("Water Equivalent Diameter", "WaterEquivalentDiameter", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x1272), ElementsDictionaryEntry("Water Equivalent Diameter Calculation Method Code Sequence", "WaterEquivalentDiameterCalculationMethodCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x1300), ElementsDictionaryEntry("Scan Velocity", "ScanVelocity", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1301), ElementsDictionaryEntry("Whole Body Technique", "WholeBodyTechnique", "CS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1302), ElementsDictionaryEntry("Scan Length", "ScanLength", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1310), ElementsDictionaryEntry("Acquisition Matrix", "AcquisitionMatrix", "US", "4")); public_dictionary.emplace(Tag(0x0018, 0x1312), ElementsDictionaryEntry("In-plane Phase Encoding Direction", "InPlanePhaseEncodingDirection", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1314), ElementsDictionaryEntry("Flip Angle", "FlipAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1315), ElementsDictionaryEntry("Variable Flip Angle Flag", "VariableFlipAngleFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1316), ElementsDictionaryEntry("SAR", "SAR", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1318), ElementsDictionaryEntry("dB/dt", "dBdt", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1320), ElementsDictionaryEntry("B1rms", "B1rms", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x1400), ElementsDictionaryEntry("Acquisition Device Processing Description", "AcquisitionDeviceProcessingDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1401), ElementsDictionaryEntry("Acquisition Device Processing Code", "AcquisitionDeviceProcessingCode", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x1402), ElementsDictionaryEntry("Cassette Orientation", "CassetteOrientation", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1403), ElementsDictionaryEntry("Cassette Size", "CassetteSize", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1404), ElementsDictionaryEntry("Exposures on Plate", "ExposuresOnPlate", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x1405), ElementsDictionaryEntry("Relative X-Ray Exposure", "RelativeXRayExposure", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1411), ElementsDictionaryEntry("Exposure Index", "ExposureIndex", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1412), ElementsDictionaryEntry("Target Exposure Index", "TargetExposureIndex", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1413), ElementsDictionaryEntry("Deviation Index", "DeviationIndex", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1450), ElementsDictionaryEntry("Column Angulation", "ColumnAngulation", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1460), ElementsDictionaryEntry("Tomo Layer Height", "TomoLayerHeight", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1470), ElementsDictionaryEntry("Tomo Angle", "TomoAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1480), ElementsDictionaryEntry("Tomo Time", "TomoTime", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1490), ElementsDictionaryEntry("Tomo Type", "TomoType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1491), ElementsDictionaryEntry("Tomo Class", "TomoClass", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1495), ElementsDictionaryEntry("Number of Tomosynthesis Source Images", "NumberOfTomosynthesisSourceImages", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1500), ElementsDictionaryEntry("Positioner Motion", "PositionerMotion", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1508), ElementsDictionaryEntry("Positioner Type", "PositionerType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1510), ElementsDictionaryEntry("Positioner Primary Angle", "PositionerPrimaryAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1511), ElementsDictionaryEntry("Positioner Secondary Angle", "PositionerSecondaryAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1520), ElementsDictionaryEntry("Positioner Primary Angle Increment", "PositionerPrimaryAngleIncrement", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1521), ElementsDictionaryEntry("Positioner Secondary Angle Increment", "PositionerSecondaryAngleIncrement", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x1530), ElementsDictionaryEntry("Detector Primary Angle", "DetectorPrimaryAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1531), ElementsDictionaryEntry("Detector Secondary Angle", "DetectorSecondaryAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1600), ElementsDictionaryEntry("Shutter Shape", "ShutterShape", "CS", "1-3")); public_dictionary.emplace(Tag(0x0018, 0x1602), ElementsDictionaryEntry("Shutter Left Vertical Edge", "ShutterLeftVerticalEdge", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1604), ElementsDictionaryEntry("Shutter Right Vertical Edge", "ShutterRightVerticalEdge", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1606), ElementsDictionaryEntry("Shutter Upper Horizontal Edge", "ShutterUpperHorizontalEdge", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1608), ElementsDictionaryEntry("Shutter Lower Horizontal Edge", "ShutterLowerHorizontalEdge", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1610), ElementsDictionaryEntry("Center of Circular Shutter", "CenterOfCircularShutter", "IS", "2")); public_dictionary.emplace(Tag(0x0018, 0x1612), ElementsDictionaryEntry("Radius of Circular Shutter", "RadiusOfCircularShutter", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1620), ElementsDictionaryEntry("Vertices of the Polygonal Shutter", "VerticesOfThePolygonalShutter", "IS", "2-2n")); public_dictionary.emplace(Tag(0x0018, 0x1622), ElementsDictionaryEntry("Shutter Presentation Value", "ShutterPresentationValue", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x1623), ElementsDictionaryEntry("Shutter Overlay Group", "ShutterOverlayGroup", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x1624), ElementsDictionaryEntry("Shutter Presentation Color CIELab Value", "ShutterPresentationColorCIELabValue", "US", "3")); public_dictionary.emplace(Tag(0x0018, 0x1630), ElementsDictionaryEntry("Outline Shape Type", "OutlineShapeType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1631), ElementsDictionaryEntry("Outline Left Vertical Edge", "OutlineLeftVerticalEdge", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x1632), ElementsDictionaryEntry("Outline Right Vertical Edge", "OutlineRightVerticalEdge", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x1633), ElementsDictionaryEntry("Outline Upper Horizontal Edge", "OutlineUpperHorizontalEdge", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x1634), ElementsDictionaryEntry("Outline Lower Horizontal Edge", "OutlineLowerHorizontalEdge", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x1635), ElementsDictionaryEntry("Center of Circular Outline", "CenterOfCircularOutline", "FD", "2")); public_dictionary.emplace(Tag(0x0018, 0x1636), ElementsDictionaryEntry("Diameter of Circular Outline", "DiameterOfCircularOutline", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x1637), ElementsDictionaryEntry("Number of Polygonal Vertices", "NumberOfPolygonalVertices", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x1638), ElementsDictionaryEntry("Vertices of the Polygonal Outline", "VerticesOfThePolygonalOutline", "OF", "1")); public_dictionary.emplace(Tag(0x0018, 0x1700), ElementsDictionaryEntry("Collimator Shape", "CollimatorShape", "CS", "1-3")); public_dictionary.emplace(Tag(0x0018, 0x1702), ElementsDictionaryEntry("Collimator Left Vertical Edge", "CollimatorLeftVerticalEdge", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1704), ElementsDictionaryEntry("Collimator Right Vertical Edge", "CollimatorRightVerticalEdge", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1706), ElementsDictionaryEntry("Collimator Upper Horizontal Edge", "CollimatorUpperHorizontalEdge", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1708), ElementsDictionaryEntry("Collimator Lower Horizontal Edge", "CollimatorLowerHorizontalEdge", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1710), ElementsDictionaryEntry("Center of Circular Collimator", "CenterOfCircularCollimator", "IS", "2")); public_dictionary.emplace(Tag(0x0018, 0x1712), ElementsDictionaryEntry("Radius of Circular Collimator", "RadiusOfCircularCollimator", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1720), ElementsDictionaryEntry("Vertices of the Polygonal Collimator", "VerticesOfThePolygonalCollimator", "IS", "2-2n")); public_dictionary.emplace(Tag(0x0018, 0x1800), ElementsDictionaryEntry("Acquisition Time Synchronized", "AcquisitionTimeSynchronized", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1801), ElementsDictionaryEntry("Time Source", "TimeSource", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x1802), ElementsDictionaryEntry("Time Distribution Protocol", "TimeDistributionProtocol", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x1803), ElementsDictionaryEntry("NTP Source Address", "NTPSourceAddress", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x2001), ElementsDictionaryEntry("Page Number Vector", "PageNumberVector", "IS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x2002), ElementsDictionaryEntry("Frame Label Vector", "FrameLabelVector", "SH", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x2003), ElementsDictionaryEntry("Frame Primary Angle Vector", "FramePrimaryAngleVector", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x2004), ElementsDictionaryEntry("Frame Secondary Angle Vector", "FrameSecondaryAngleVector", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x2005), ElementsDictionaryEntry("Slice Location Vector", "SliceLocationVector", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x2006), ElementsDictionaryEntry("Display Window Label Vector", "DisplayWindowLabelVector", "SH", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x2010), ElementsDictionaryEntry("Nominal Scanned Pixel Spacing", "NominalScannedPixelSpacing", "DS", "2")); public_dictionary.emplace(Tag(0x0018, 0x2020), ElementsDictionaryEntry("Digitizing Device Transport Direction", "DigitizingDeviceTransportDirection", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x2030), ElementsDictionaryEntry("Rotation of Scanned Film", "RotationOfScannedFilm", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x2041), ElementsDictionaryEntry("Biopsy Target Sequence", "BiopsyTargetSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x2042), ElementsDictionaryEntry("Target UID", "TargetUID", "UI", "1")); public_dictionary.emplace(Tag(0x0018, 0x2043), ElementsDictionaryEntry("Localizing Cursor Position", "LocalizingCursorPosition", "FL", "2")); public_dictionary.emplace(Tag(0x0018, 0x2044), ElementsDictionaryEntry("Calculated Target Position", "CalculatedTargetPosition", "FL", "3")); public_dictionary.emplace(Tag(0x0018, 0x2045), ElementsDictionaryEntry("Target Label", "TargetLabel", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x2046), ElementsDictionaryEntry("Displayed Z Value", "DisplayedZValue", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x3100), ElementsDictionaryEntry("IVUS Acquisition", "IVUSAcquisition", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x3101), ElementsDictionaryEntry("IVUS Pullback Rate", "IVUSPullbackRate", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x3102), ElementsDictionaryEntry("IVUS Gated Rate", "IVUSGatedRate", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x3103), ElementsDictionaryEntry("IVUS Pullback Start Frame Number", "IVUSPullbackStartFrameNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x3104), ElementsDictionaryEntry("IVUS Pullback Stop Frame Number", "IVUSPullbackStopFrameNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x3105), ElementsDictionaryEntry("Lesion Number", "LesionNumber", "IS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x4000), ElementsDictionaryEntry("Acquisition Comments", "AcquisitionComments", "LT", "1")); public_dictionary.emplace(Tag(0x0018, 0x5000), ElementsDictionaryEntry("Output Power", "OutputPower", "SH", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x5010), ElementsDictionaryEntry("Transducer Data", "TransducerData", "LO", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x5012), ElementsDictionaryEntry("Focus Depth", "FocusDepth", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x5020), ElementsDictionaryEntry("Processing Function", "ProcessingFunction", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x5021), ElementsDictionaryEntry("Postprocessing Function", "PostprocessingFunction", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x5022), ElementsDictionaryEntry("Mechanical Index", "MechanicalIndex", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x5024), ElementsDictionaryEntry("Bone Thermal Index", "BoneThermalIndex", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x5026), ElementsDictionaryEntry("Cranial Thermal Index", "CranialThermalIndex", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x5027), ElementsDictionaryEntry("Soft Tissue Thermal Index", "SoftTissueThermalIndex", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x5028), ElementsDictionaryEntry("Soft Tissue-focus Thermal Index", "SoftTissueFocusThermalIndex", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x5029), ElementsDictionaryEntry("Soft Tissue-surface Thermal Index", "SoftTissueSurfaceThermalIndex", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x5030), ElementsDictionaryEntry("Dynamic Range", "DynamicRange", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x5040), ElementsDictionaryEntry("Total Gain", "TotalGain", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x5050), ElementsDictionaryEntry("Depth of Scan Field", "DepthOfScanField", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x5100), ElementsDictionaryEntry("Patient Position", "PatientPosition", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x5101), ElementsDictionaryEntry("View Position", "ViewPosition", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x5104), ElementsDictionaryEntry("Projection Eponymous Name Code Sequence", "ProjectionEponymousNameCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x5210), ElementsDictionaryEntry("Image Transformation Matrix", "ImageTransformationMatrix", "DS", "6")); public_dictionary.emplace(Tag(0x0018, 0x5212), ElementsDictionaryEntry("Image Translation Vector", "ImageTranslationVector", "DS", "3")); public_dictionary.emplace(Tag(0x0018, 0x6000), ElementsDictionaryEntry("Sensitivity", "Sensitivity", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x6011), ElementsDictionaryEntry("Sequence of Ultrasound Regions", "SequenceOfUltrasoundRegions", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x6012), ElementsDictionaryEntry("Region Spatial Format", "RegionSpatialFormat", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x6014), ElementsDictionaryEntry("Region Data Type", "RegionDataType", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x6016), ElementsDictionaryEntry("Region Flags", "RegionFlags", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6018), ElementsDictionaryEntry("Region Location Min X0", "RegionLocationMinX0", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x601a), ElementsDictionaryEntry("Region Location Min Y0", "RegionLocationMinY0", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x601c), ElementsDictionaryEntry("Region Location Max X1", "RegionLocationMaxX1", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x601e), ElementsDictionaryEntry("Region Location Max Y1", "RegionLocationMaxY1", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6020), ElementsDictionaryEntry("Reference Pixel X0", "ReferencePixelX0", "SL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6022), ElementsDictionaryEntry("Reference Pixel Y0", "ReferencePixelY0", "SL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6024), ElementsDictionaryEntry("Physical Units X Direction", "PhysicalUnitsXDirection", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x6026), ElementsDictionaryEntry("Physical Units Y Direction", "PhysicalUnitsYDirection", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x6028), ElementsDictionaryEntry("Reference Pixel Physical Value X", "ReferencePixelPhysicalValueX", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x602a), ElementsDictionaryEntry("Reference Pixel Physical Value Y", "ReferencePixelPhysicalValueY", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x602c), ElementsDictionaryEntry("Physical Delta X", "PhysicalDeltaX", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x602e), ElementsDictionaryEntry("Physical Delta Y", "PhysicalDeltaY", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x6030), ElementsDictionaryEntry("Transducer Frequency", "TransducerFrequency", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6031), ElementsDictionaryEntry("Transducer Type", "TransducerType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x6032), ElementsDictionaryEntry("Pulse Repetition Frequency", "PulseRepetitionFrequency", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6034), ElementsDictionaryEntry("Doppler Correction Angle", "DopplerCorrectionAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x6036), ElementsDictionaryEntry("Steering Angle", "SteeringAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x6038), ElementsDictionaryEntry("Doppler Sample Volume X Position (Retired)", "DopplerSampleVolumeXPositionRetired", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6039), ElementsDictionaryEntry("Doppler Sample Volume X Position", "DopplerSampleVolumeXPosition", "SL", "1")); public_dictionary.emplace(Tag(0x0018, 0x603a), ElementsDictionaryEntry("Doppler Sample Volume Y Position (Retired)", "DopplerSampleVolumeYPositionRetired", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x603b), ElementsDictionaryEntry("Doppler Sample Volume Y Position", "DopplerSampleVolumeYPosition", "SL", "1")); public_dictionary.emplace(Tag(0x0018, 0x603c), ElementsDictionaryEntry("TM-Line Position X0 (Retired)", "TMLinePositionX0Retired", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x603d), ElementsDictionaryEntry("TM-Line Position X0", "TMLinePositionX0", "SL", "1")); public_dictionary.emplace(Tag(0x0018, 0x603e), ElementsDictionaryEntry("TM-Line Position Y0 (Retired)", "TMLinePositionY0Retired", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x603f), ElementsDictionaryEntry("TM-Line Position Y0", "TMLinePositionY0", "SL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6040), ElementsDictionaryEntry("TM-Line Position X1 (Retired)", "TMLinePositionX1Retired", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6041), ElementsDictionaryEntry("TM-Line Position X1", "TMLinePositionX1", "SL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6042), ElementsDictionaryEntry("TM-Line Position Y1 (Retired)", "TMLinePositionY1Retired", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6043), ElementsDictionaryEntry("TM-Line Position Y1", "TMLinePositionY1", "SL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6044), ElementsDictionaryEntry("Pixel Component Organization", "PixelComponentOrganization", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x6046), ElementsDictionaryEntry("Pixel Component Mask", "PixelComponentMask", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6048), ElementsDictionaryEntry("Pixel Component Range Start", "PixelComponentRangeStart", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x604a), ElementsDictionaryEntry("Pixel Component Range Stop", "PixelComponentRangeStop", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x604c), ElementsDictionaryEntry("Pixel Component Physical Units", "PixelComponentPhysicalUnits", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x604e), ElementsDictionaryEntry("Pixel Component Data Type", "PixelComponentDataType", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x6050), ElementsDictionaryEntry("Number of Table Break Points", "NumberOfTableBreakPoints", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6052), ElementsDictionaryEntry("Table of X Break Points", "TableOfXBreakPoints", "UL", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x6054), ElementsDictionaryEntry("Table of Y Break Points", "TableOfYBreakPoints", "FD", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x6056), ElementsDictionaryEntry("Number of Table Entries", "NumberOfTableEntries", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x6058), ElementsDictionaryEntry("Table of Pixel Values", "TableOfPixelValues", "UL", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x605a), ElementsDictionaryEntry("Table of Parameter Values", "TableOfParameterValues", "FL", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x6060), ElementsDictionaryEntry("R Wave Time Vector", "RWaveTimeVector", "FL", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x7000), ElementsDictionaryEntry("Detector Conditions Nominal Flag", "DetectorConditionsNominalFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7001), ElementsDictionaryEntry("Detector Temperature", "DetectorTemperature", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7004), ElementsDictionaryEntry("Detector Type", "DetectorType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7005), ElementsDictionaryEntry("Detector Configuration", "DetectorConfiguration", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7006), ElementsDictionaryEntry("Detector Description", "DetectorDescription", "LT", "1")); public_dictionary.emplace(Tag(0x0018, 0x7008), ElementsDictionaryEntry("Detector Mode", "DetectorMode", "LT", "1")); public_dictionary.emplace(Tag(0x0018, 0x700a), ElementsDictionaryEntry("Detector ID", "DetectorID", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x700c), ElementsDictionaryEntry("Date of Last Detector Calibration", "DateOfLastDetectorCalibration", "DA", "1")); public_dictionary.emplace(Tag(0x0018, 0x700e), ElementsDictionaryEntry("Time of Last Detector Calibration", "TimeOfLastDetectorCalibration", "TM", "1")); public_dictionary.emplace(Tag(0x0018, 0x7010), ElementsDictionaryEntry("Exposures on Detector Since Last Calibration", "ExposuresOnDetectorSinceLastCalibration", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7011), ElementsDictionaryEntry("Exposures on Detector Since Manufactured", "ExposuresOnDetectorSinceManufactured", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7012), ElementsDictionaryEntry("Detector Time Since Last Exposure", "DetectorTimeSinceLastExposure", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7014), ElementsDictionaryEntry("Detector Active Time", "DetectorActiveTime", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7016), ElementsDictionaryEntry("Detector Activation Offset From Exposure", "DetectorActivationOffsetFromExposure", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x701a), ElementsDictionaryEntry("Detector Binning", "DetectorBinning", "DS", "2")); public_dictionary.emplace(Tag(0x0018, 0x7020), ElementsDictionaryEntry("Detector Element Physical Size", "DetectorElementPhysicalSize", "DS", "2")); public_dictionary.emplace(Tag(0x0018, 0x7022), ElementsDictionaryEntry("Detector Element Spacing", "DetectorElementSpacing", "DS", "2")); public_dictionary.emplace(Tag(0x0018, 0x7024), ElementsDictionaryEntry("Detector Active Shape", "DetectorActiveShape", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7026), ElementsDictionaryEntry("Detector Active Dimension(s)", "DetectorActiveDimensions", "DS", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x7028), ElementsDictionaryEntry("Detector Active Origin", "DetectorActiveOrigin", "DS", "2")); public_dictionary.emplace(Tag(0x0018, 0x702a), ElementsDictionaryEntry("Detector Manufacturer Name", "DetectorManufacturerName", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x702b), ElementsDictionaryEntry("Detector Manufacturer's Model Name", "DetectorManufacturerModelName", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x7030), ElementsDictionaryEntry("Field of View Origin", "FieldOfViewOrigin", "DS", "2")); public_dictionary.emplace(Tag(0x0018, 0x7032), ElementsDictionaryEntry("Field of View Rotation", "FieldOfViewRotation", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7034), ElementsDictionaryEntry("Field of View Horizontal Flip", "FieldOfViewHorizontalFlip", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7036), ElementsDictionaryEntry("Pixel Data Area Origin Relative To FOV", "PixelDataAreaOriginRelativeToFOV", "FL", "2")); public_dictionary.emplace(Tag(0x0018, 0x7038), ElementsDictionaryEntry("Pixel Data Area Rotation Angle Relative To FOV", "PixelDataAreaRotationAngleRelativeToFOV", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x7040), ElementsDictionaryEntry("Grid Absorbing Material", "GridAbsorbingMaterial", "LT", "1")); public_dictionary.emplace(Tag(0x0018, 0x7041), ElementsDictionaryEntry("Grid Spacing Material", "GridSpacingMaterial", "LT", "1")); public_dictionary.emplace(Tag(0x0018, 0x7042), ElementsDictionaryEntry("Grid Thickness", "GridThickness", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7044), ElementsDictionaryEntry("Grid Pitch", "GridPitch", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7046), ElementsDictionaryEntry("Grid Aspect Ratio", "GridAspectRatio", "IS", "2")); public_dictionary.emplace(Tag(0x0018, 0x7048), ElementsDictionaryEntry("Grid Period", "GridPeriod", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x704c), ElementsDictionaryEntry("Grid Focal Distance", "GridFocalDistance", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7050), ElementsDictionaryEntry("Filter Material", "FilterMaterial", "CS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x7052), ElementsDictionaryEntry("Filter Thickness Minimum", "FilterThicknessMinimum", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x7054), ElementsDictionaryEntry("Filter Thickness Maximum", "FilterThicknessMaximum", "DS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x7056), ElementsDictionaryEntry("Filter Beam Path Length Minimum", "FilterBeamPathLengthMinimum", "FL", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x7058), ElementsDictionaryEntry("Filter Beam Path Length Maximum", "FilterBeamPathLengthMaximum", "FL", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x7060), ElementsDictionaryEntry("Exposure Control Mode", "ExposureControlMode", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7062), ElementsDictionaryEntry("Exposure Control Mode Description", "ExposureControlModeDescription", "LT", "1")); public_dictionary.emplace(Tag(0x0018, 0x7064), ElementsDictionaryEntry("Exposure Status", "ExposureStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x7065), ElementsDictionaryEntry("Phototimer Setting", "PhototimerSetting", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x8150), ElementsDictionaryEntry("Exposure Time in uS", "ExposureTimeInuS", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x8151), ElementsDictionaryEntry("X-Ray Tube Current in uA", "XRayTubeCurrentInuA", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9004), ElementsDictionaryEntry("Content Qualification", "ContentQualification", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9005), ElementsDictionaryEntry("Pulse Sequence Name", "PulseSequenceName", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x9006), ElementsDictionaryEntry("MR Imaging Modifier Sequence", "MRImagingModifierSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9008), ElementsDictionaryEntry("Echo Pulse Sequence", "EchoPulseSequence", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9009), ElementsDictionaryEntry("Inversion Recovery", "InversionRecovery", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9010), ElementsDictionaryEntry("Flow Compensation", "FlowCompensation", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9011), ElementsDictionaryEntry("Multiple Spin Echo", "MultipleSpinEcho", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9012), ElementsDictionaryEntry("Multi-planar Excitation", "MultiPlanarExcitation", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9014), ElementsDictionaryEntry("Phase Contrast", "PhaseContrast", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9015), ElementsDictionaryEntry("Time of Flight Contrast", "TimeOfFlightContrast", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9016), ElementsDictionaryEntry("Spoiling", "Spoiling", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9017), ElementsDictionaryEntry("Steady State Pulse Sequence", "SteadyStatePulseSequence", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9018), ElementsDictionaryEntry("Echo Planar Pulse Sequence", "EchoPlanarPulseSequence", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9019), ElementsDictionaryEntry("Tag Angle First Axis", "TagAngleFirstAxis", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9020), ElementsDictionaryEntry("Magnetization Transfer", "MagnetizationTransfer", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9021), ElementsDictionaryEntry("T2 Preparation", "T2Preparation", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9022), ElementsDictionaryEntry("Blood Signal Nulling", "BloodSignalNulling", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9024), ElementsDictionaryEntry("Saturation Recovery", "SaturationRecovery", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9025), ElementsDictionaryEntry("Spectrally Selected Suppression", "SpectrallySelectedSuppression", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9026), ElementsDictionaryEntry("Spectrally Selected Excitation", "SpectrallySelectedExcitation", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9027), ElementsDictionaryEntry("Spatial Pre-saturation", "SpatialPresaturation", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9028), ElementsDictionaryEntry("Tagging", "Tagging", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9029), ElementsDictionaryEntry("Oversampling Phase", "OversamplingPhase", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9030), ElementsDictionaryEntry("Tag Spacing First Dimension", "TagSpacingFirstDimension", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9032), ElementsDictionaryEntry("Geometry of k-Space Traversal", "GeometryOfKSpaceTraversal", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9033), ElementsDictionaryEntry("Segmented k-Space Traversal", "SegmentedKSpaceTraversal", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9034), ElementsDictionaryEntry("Rectilinear Phase Encode Reordering", "RectilinearPhaseEncodeReordering", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9035), ElementsDictionaryEntry("Tag Thickness", "TagThickness", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9036), ElementsDictionaryEntry("Partial Fourier Direction", "PartialFourierDirection", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9037), ElementsDictionaryEntry("Cardiac Synchronization Technique", "CardiacSynchronizationTechnique", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9041), ElementsDictionaryEntry("Receive Coil Manufacturer Name", "ReceiveCoilManufacturerName", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9042), ElementsDictionaryEntry("MR Receive Coil Sequence", "MRReceiveCoilSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9043), ElementsDictionaryEntry("Receive Coil Type", "ReceiveCoilType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9044), ElementsDictionaryEntry("Quadrature Receive Coil", "QuadratureReceiveCoil", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9045), ElementsDictionaryEntry("Multi-Coil Definition Sequence", "MultiCoilDefinitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9046), ElementsDictionaryEntry("Multi-Coil Configuration", "MultiCoilConfiguration", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9047), ElementsDictionaryEntry("Multi-Coil Element Name", "MultiCoilElementName", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x9048), ElementsDictionaryEntry("Multi-Coil Element Used", "MultiCoilElementUsed", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9049), ElementsDictionaryEntry("MR Transmit Coil Sequence", "MRTransmitCoilSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9050), ElementsDictionaryEntry("Transmit Coil Manufacturer Name", "TransmitCoilManufacturerName", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9051), ElementsDictionaryEntry("Transmit Coil Type", "TransmitCoilType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9052), ElementsDictionaryEntry("Spectral Width", "SpectralWidth", "FD", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x9053), ElementsDictionaryEntry("Chemical Shift Reference", "ChemicalShiftReference", "FD", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x9054), ElementsDictionaryEntry("Volume Localization Technique", "VolumeLocalizationTechnique", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9058), ElementsDictionaryEntry("MR Acquisition Frequency Encoding Steps", "MRAcquisitionFrequencyEncodingSteps", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9059), ElementsDictionaryEntry("De-coupling", "Decoupling", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9060), ElementsDictionaryEntry("De-coupled Nucleus", "DecoupledNucleus", "CS", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x9061), ElementsDictionaryEntry("De-coupling Frequency", "DecouplingFrequency", "FD", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x9062), ElementsDictionaryEntry("De-coupling Method", "DecouplingMethod", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9063), ElementsDictionaryEntry("De-coupling Chemical Shift Reference", "DecouplingChemicalShiftReference", "FD", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x9064), ElementsDictionaryEntry("k-space Filtering", "KSpaceFiltering", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9065), ElementsDictionaryEntry("Time Domain Filtering", "TimeDomainFiltering", "CS", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x9066), ElementsDictionaryEntry("Number of Zero Fills", "NumberOfZeroFills", "US", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x9067), ElementsDictionaryEntry("Baseline Correction", "BaselineCorrection", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9069), ElementsDictionaryEntry("Parallel Reduction Factor In-plane", "ParallelReductionFactorInPlane", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9070), ElementsDictionaryEntry("Cardiac R-R Interval Specified", "CardiacRRIntervalSpecified", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9073), ElementsDictionaryEntry("Acquisition Duration", "AcquisitionDuration", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9074), ElementsDictionaryEntry("Frame Acquisition DateTime", "FrameAcquisitionDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9075), ElementsDictionaryEntry("Diffusion Directionality", "DiffusionDirectionality", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9076), ElementsDictionaryEntry("Diffusion Gradient Direction Sequence", "DiffusionGradientDirectionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9077), ElementsDictionaryEntry("Parallel Acquisition", "ParallelAcquisition", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9078), ElementsDictionaryEntry("Parallel Acquisition Technique", "ParallelAcquisitionTechnique", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9079), ElementsDictionaryEntry("Inversion Times", "InversionTimes", "FD", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x9080), ElementsDictionaryEntry("Metabolite Map Description", "MetaboliteMapDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0018, 0x9081), ElementsDictionaryEntry("Partial Fourier", "PartialFourier", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9082), ElementsDictionaryEntry("Effective Echo Time", "EffectiveEchoTime", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9083), ElementsDictionaryEntry("Metabolite Map Code Sequence", "MetaboliteMapCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9084), ElementsDictionaryEntry("Chemical Shift Sequence", "ChemicalShiftSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9085), ElementsDictionaryEntry("Cardiac Signal Source", "CardiacSignalSource", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9087), ElementsDictionaryEntry("Diffusion b-value", "DiffusionBValue", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9089), ElementsDictionaryEntry("Diffusion Gradient Orientation", "DiffusionGradientOrientation", "FD", "3")); public_dictionary.emplace(Tag(0x0018, 0x9090), ElementsDictionaryEntry("Velocity Encoding Direction", "VelocityEncodingDirection", "FD", "3")); public_dictionary.emplace(Tag(0x0018, 0x9091), ElementsDictionaryEntry("Velocity Encoding Minimum Value", "VelocityEncodingMinimumValue", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9092), ElementsDictionaryEntry("Velocity Encoding Acquisition Sequence", "VelocityEncodingAcquisitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9093), ElementsDictionaryEntry("Number of k-Space Trajectories", "NumberOfKSpaceTrajectories", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9094), ElementsDictionaryEntry("Coverage of k-Space", "CoverageOfKSpace", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9095), ElementsDictionaryEntry("Spectroscopy Acquisition Phase Rows", "SpectroscopyAcquisitionPhaseRows", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9096), ElementsDictionaryEntry("Parallel Reduction Factor In-plane (Retired)", "ParallelReductionFactorInPlaneRetired", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9098), ElementsDictionaryEntry("Transmitter Frequency", "TransmitterFrequency", "FD", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x9100), ElementsDictionaryEntry("Resonant Nucleus", "ResonantNucleus", "CS", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x9101), ElementsDictionaryEntry("Frequency Correction", "FrequencyCorrection", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9103), ElementsDictionaryEntry("MR Spectroscopy FOV/Geometry Sequence", "MRSpectroscopyFOVGeometrySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9104), ElementsDictionaryEntry("Slab Thickness", "SlabThickness", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9105), ElementsDictionaryEntry("Slab Orientation", "SlabOrientation", "FD", "3")); public_dictionary.emplace(Tag(0x0018, 0x9106), ElementsDictionaryEntry("Mid Slab Position", "MidSlabPosition", "FD", "3")); public_dictionary.emplace(Tag(0x0018, 0x9107), ElementsDictionaryEntry("MR Spatial Saturation Sequence", "MRSpatialSaturationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9112), ElementsDictionaryEntry("MR Timing and Related Parameters Sequence", "MRTimingAndRelatedParametersSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9114), ElementsDictionaryEntry("MR Echo Sequence", "MREchoSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9115), ElementsDictionaryEntry("MR Modifier Sequence", "MRModifierSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9117), ElementsDictionaryEntry("MR Diffusion Sequence", "MRDiffusionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9118), ElementsDictionaryEntry("Cardiac Synchronization Sequence", "CardiacSynchronizationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9119), ElementsDictionaryEntry("MR Averages Sequence", "MRAveragesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9125), ElementsDictionaryEntry("MR FOV/Geometry Sequence", "MRFOVGeometrySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9126), ElementsDictionaryEntry("Volume Localization Sequence", "VolumeLocalizationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9127), ElementsDictionaryEntry("Spectroscopy Acquisition Data Columns", "SpectroscopyAcquisitionDataColumns", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9147), ElementsDictionaryEntry("Diffusion Anisotropy Type", "DiffusionAnisotropyType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9151), ElementsDictionaryEntry("Frame Reference DateTime", "FrameReferenceDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9152), ElementsDictionaryEntry("MR Metabolite Map Sequence", "MRMetaboliteMapSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9155), ElementsDictionaryEntry("Parallel Reduction Factor out-of-plane", "ParallelReductionFactorOutOfPlane", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9159), ElementsDictionaryEntry("Spectroscopy Acquisition Out-of-plane Phase Steps", "SpectroscopyAcquisitionOutOfPlanePhaseSteps", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9166), ElementsDictionaryEntry("Bulk Motion Status", "BulkMotionStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9168), ElementsDictionaryEntry("Parallel Reduction Factor Second In-plane", "ParallelReductionFactorSecondInPlane", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9169), ElementsDictionaryEntry("Cardiac Beat Rejection Technique", "CardiacBeatRejectionTechnique", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9170), ElementsDictionaryEntry("Respiratory Motion Compensation Technique", "RespiratoryMotionCompensationTechnique", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9171), ElementsDictionaryEntry("Respiratory Signal Source", "RespiratorySignalSource", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9172), ElementsDictionaryEntry("Bulk Motion Compensation Technique", "BulkMotionCompensationTechnique", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9173), ElementsDictionaryEntry("Bulk Motion Signal Source", "BulkMotionSignalSource", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9174), ElementsDictionaryEntry("Applicable Safety Standard Agency", "ApplicableSafetyStandardAgency", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9175), ElementsDictionaryEntry("Applicable Safety Standard Description", "ApplicableSafetyStandardDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9176), ElementsDictionaryEntry("Operating Mode Sequence", "OperatingModeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9177), ElementsDictionaryEntry("Operating Mode Type", "OperatingModeType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9178), ElementsDictionaryEntry("Operating Mode", "OperatingMode", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9179), ElementsDictionaryEntry("Specific Absorption Rate Definition", "SpecificAbsorptionRateDefinition", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9180), ElementsDictionaryEntry("Gradient Output Type", "GradientOutputType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9181), ElementsDictionaryEntry("Specific Absorption Rate Value", "SpecificAbsorptionRateValue", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9182), ElementsDictionaryEntry("Gradient Output", "GradientOutput", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9183), ElementsDictionaryEntry("Flow Compensation Direction", "FlowCompensationDirection", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9184), ElementsDictionaryEntry("Tagging Delay", "TaggingDelay", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9185), ElementsDictionaryEntry("Respiratory Motion Compensation Technique Description", "RespiratoryMotionCompensationTechniqueDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0018, 0x9186), ElementsDictionaryEntry("Respiratory Signal Source ID", "RespiratorySignalSourceID", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x9195), ElementsDictionaryEntry("Chemical Shift Minimum Integration Limit in Hz", "ChemicalShiftMinimumIntegrationLimitInHz", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9196), ElementsDictionaryEntry("Chemical Shift Maximum Integration Limit in Hz", "ChemicalShiftMaximumIntegrationLimitInHz", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9197), ElementsDictionaryEntry("MR Velocity Encoding Sequence", "MRVelocityEncodingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9198), ElementsDictionaryEntry("First Order Phase Correction", "FirstOrderPhaseCorrection", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9199), ElementsDictionaryEntry("Water Referenced Phase Correction", "WaterReferencedPhaseCorrection", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9200), ElementsDictionaryEntry("MR Spectroscopy Acquisition Type", "MRSpectroscopyAcquisitionType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9214), ElementsDictionaryEntry("Respiratory Cycle Position", "RespiratoryCyclePosition", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9217), ElementsDictionaryEntry("Velocity Encoding Maximum Value", "VelocityEncodingMaximumValue", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9218), ElementsDictionaryEntry("Tag Spacing Second Dimension", "TagSpacingSecondDimension", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9219), ElementsDictionaryEntry("Tag Angle Second Axis", "TagAngleSecondAxis", "SS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9220), ElementsDictionaryEntry("Frame Acquisition Duration", "FrameAcquisitionDuration", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9226), ElementsDictionaryEntry("MR Image Frame Type Sequence", "MRImageFrameTypeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9227), ElementsDictionaryEntry("MR Spectroscopy Frame Type Sequence", "MRSpectroscopyFrameTypeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9231), ElementsDictionaryEntry("MR Acquisition Phase Encoding Steps in-plane", "MRAcquisitionPhaseEncodingStepsInPlane", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9232), ElementsDictionaryEntry("MR Acquisition Phase Encoding Steps out-of-plane", "MRAcquisitionPhaseEncodingStepsOutOfPlane", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9234), ElementsDictionaryEntry("Spectroscopy Acquisition Phase Columns", "SpectroscopyAcquisitionPhaseColumns", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9236), ElementsDictionaryEntry("Cardiac Cycle Position", "CardiacCyclePosition", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9239), ElementsDictionaryEntry("Specific Absorption Rate Sequence", "SpecificAbsorptionRateSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9240), ElementsDictionaryEntry("RF Echo Train Length", "RFEchoTrainLength", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9241), ElementsDictionaryEntry("Gradient Echo Train Length", "GradientEchoTrainLength", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9250), ElementsDictionaryEntry("Arterial Spin Labeling Contrast", "ArterialSpinLabelingContrast", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9251), ElementsDictionaryEntry("MR Arterial Spin Labeling Sequence", "MRArterialSpinLabelingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9252), ElementsDictionaryEntry("ASL Technique Description", "ASLTechniqueDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9253), ElementsDictionaryEntry("ASL Slab Number", "ASLSlabNumber", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9254), ElementsDictionaryEntry("ASL Slab Thickness", "ASLSlabThickness", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9255), ElementsDictionaryEntry("ASL Slab Orientation", "ASLSlabOrientation", "FD", "3")); public_dictionary.emplace(Tag(0x0018, 0x9256), ElementsDictionaryEntry("ASL Mid Slab Position", "ASLMidSlabPosition", "FD", "3")); public_dictionary.emplace(Tag(0x0018, 0x9257), ElementsDictionaryEntry("ASL Context", "ASLContext", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9258), ElementsDictionaryEntry("ASL Pulse Train Duration", "ASLPulseTrainDuration", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9259), ElementsDictionaryEntry("ASL Crusher Flag", "ASLCrusherFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x925a), ElementsDictionaryEntry("ASL Crusher Flow Limit", "ASLCrusherFlowLimit", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x925b), ElementsDictionaryEntry("ASL Crusher Description", "ASLCrusherDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x925c), ElementsDictionaryEntry("ASL Bolus Cut-off Flag", "ASLBolusCutoffFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x925d), ElementsDictionaryEntry("ASL Bolus Cut-off Timing Sequence", "ASLBolusCutoffTimingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x925e), ElementsDictionaryEntry("ASL Bolus Cut-off Technique", "ASLBolusCutoffTechnique", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x925f), ElementsDictionaryEntry("ASL Bolus Cut-off Delay Time", "ASLBolusCutoffDelayTime", "UL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9260), ElementsDictionaryEntry("ASL Slab Sequence", "ASLSlabSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9295), ElementsDictionaryEntry("Chemical Shift Minimum Integration Limit in ppm", "ChemicalShiftMinimumIntegrationLimitInppm", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9296), ElementsDictionaryEntry("Chemical Shift Maximum Integration Limit in ppm", "ChemicalShiftMaximumIntegrationLimitInppm", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9297), ElementsDictionaryEntry("Water Reference Acquisition", "WaterReferenceAcquisition", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9298), ElementsDictionaryEntry("Echo Peak Position", "EchoPeakPosition", "IS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9301), ElementsDictionaryEntry("CT Acquisition Type Sequence", "CTAcquisitionTypeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9302), ElementsDictionaryEntry("Acquisition Type", "AcquisitionType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9303), ElementsDictionaryEntry("Tube Angle", "TubeAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9304), ElementsDictionaryEntry("CT Acquisition Details Sequence", "CTAcquisitionDetailsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9305), ElementsDictionaryEntry("Revolution Time", "RevolutionTime", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9306), ElementsDictionaryEntry("Single Collimation Width", "SingleCollimationWidth", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9307), ElementsDictionaryEntry("Total Collimation Width", "TotalCollimationWidth", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9308), ElementsDictionaryEntry("CT Table Dynamics Sequence", "CTTableDynamicsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9309), ElementsDictionaryEntry("Table Speed", "TableSpeed", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9310), ElementsDictionaryEntry("Table Feed per Rotation", "TableFeedPerRotation", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9311), ElementsDictionaryEntry("Spiral Pitch Factor", "SpiralPitchFactor", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9312), ElementsDictionaryEntry("CT Geometry Sequence", "CTGeometrySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9313), ElementsDictionaryEntry("Data Collection Center (Patient)", "DataCollectionCenterPatient", "FD", "3")); public_dictionary.emplace(Tag(0x0018, 0x9314), ElementsDictionaryEntry("CT Reconstruction Sequence", "CTReconstructionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9315), ElementsDictionaryEntry("Reconstruction Algorithm", "ReconstructionAlgorithm", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9316), ElementsDictionaryEntry("Convolution Kernel Group", "ConvolutionKernelGroup", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9317), ElementsDictionaryEntry("Reconstruction Field of View", "ReconstructionFieldOfView", "FD", "2")); public_dictionary.emplace(Tag(0x0018, 0x9318), ElementsDictionaryEntry("Reconstruction Target Center (Patient)", "ReconstructionTargetCenterPatient", "FD", "3")); public_dictionary.emplace(Tag(0x0018, 0x9319), ElementsDictionaryEntry("Reconstruction Angle", "ReconstructionAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9320), ElementsDictionaryEntry("Image Filter", "ImageFilter", "SH", "1")); public_dictionary.emplace(Tag(0x0018, 0x9321), ElementsDictionaryEntry("CT Exposure Sequence", "CTExposureSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9322), ElementsDictionaryEntry("Reconstruction Pixel Spacing", "ReconstructionPixelSpacing", "FD", "2")); public_dictionary.emplace(Tag(0x0018, 0x9323), ElementsDictionaryEntry("Exposure Modulation Type", "ExposureModulationType", "CS", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x9324), ElementsDictionaryEntry("Estimated Dose Saving", "EstimatedDoseSaving", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9325), ElementsDictionaryEntry("CT X-Ray Details Sequence", "CTXRayDetailsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9326), ElementsDictionaryEntry("CT Position Sequence", "CTPositionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9327), ElementsDictionaryEntry("Table Position", "TablePosition", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9328), ElementsDictionaryEntry("Exposure Time in ms", "ExposureTimeInms", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9329), ElementsDictionaryEntry("CT Image Frame Type Sequence", "CTImageFrameTypeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9330), ElementsDictionaryEntry("X-Ray Tube Current in mA", "XRayTubeCurrentInmA", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9332), ElementsDictionaryEntry("Exposure in mAs", "ExposureInmAs", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9333), ElementsDictionaryEntry("Constant Volume Flag", "ConstantVolumeFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9334), ElementsDictionaryEntry("Fluoroscopy Flag", "FluoroscopyFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9335), ElementsDictionaryEntry("Distance Source to Data Collection Center", "DistanceSourceToDataCollectionCenter", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9337), ElementsDictionaryEntry("Contrast/Bolus Agent Number", "ContrastBolusAgentNumber", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9338), ElementsDictionaryEntry("Contrast/Bolus Ingredient Code Sequence", "ContrastBolusIngredientCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9340), ElementsDictionaryEntry("Contrast Administration Profile Sequence", "ContrastAdministrationProfileSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9341), ElementsDictionaryEntry("Contrast/Bolus Usage Sequence", "ContrastBolusUsageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9342), ElementsDictionaryEntry("Contrast/Bolus Agent Administered", "ContrastBolusAgentAdministered", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9343), ElementsDictionaryEntry("Contrast/Bolus Agent Detected", "ContrastBolusAgentDetected", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9344), ElementsDictionaryEntry("Contrast/Bolus Agent Phase", "ContrastBolusAgentPhase", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9345), ElementsDictionaryEntry("CTDIvol", "CTDIvol", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9346), ElementsDictionaryEntry("CTDI Phantom Type Code Sequence", "CTDIPhantomTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9351), ElementsDictionaryEntry("Calcium Scoring Mass Factor Patient", "CalciumScoringMassFactorPatient", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9352), ElementsDictionaryEntry("Calcium Scoring Mass Factor Device", "CalciumScoringMassFactorDevice", "FL", "3")); public_dictionary.emplace(Tag(0x0018, 0x9353), ElementsDictionaryEntry("Energy Weighting Factor", "EnergyWeightingFactor", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9360), ElementsDictionaryEntry("CT Additional X-Ray Source Sequence", "CTAdditionalXRaySourceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9361), ElementsDictionaryEntry("Multi-energy CT Acquisition", "MultienergyCTAcquisition", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9362), ElementsDictionaryEntry("Multi-energy CT Acquisition Sequence", "MultienergyCTAcquisitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9363), ElementsDictionaryEntry("Multi-energy CT Processing Sequence", "MultienergyCTProcessingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9364), ElementsDictionaryEntry("Multi-energy CT Characteristics Sequence", "MultienergyCTCharacteristicsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9365), ElementsDictionaryEntry("Multi-energy CT X-Ray Source Sequence", "MultienergyCTXRaySourceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9366), ElementsDictionaryEntry("X-Ray Source Index", "XRaySourceIndex", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9367), ElementsDictionaryEntry("X-Ray Source ID", "XRaySourceID", "UC", "1")); public_dictionary.emplace(Tag(0x0018, 0x9368), ElementsDictionaryEntry("Multi-energy Source Technique", "MultienergySourceTechnique", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9369), ElementsDictionaryEntry("Source Start DateTime", "SourceStartDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0018, 0x936a), ElementsDictionaryEntry("Source End DateTime", "SourceEndDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0018, 0x936b), ElementsDictionaryEntry("Switching Phase Number", "SwitchingPhaseNumber", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x936c), ElementsDictionaryEntry("Switching Phase Nominal Duration", "SwitchingPhaseNominalDuration", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x936d), ElementsDictionaryEntry("Switching Phase Transition Duration", "SwitchingPhaseTransitionDuration", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x936e), ElementsDictionaryEntry("Effective Bin Energy", "EffectiveBinEnergy", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x936f), ElementsDictionaryEntry("Multi-energy CT X-Ray Detector Sequence", "MultienergyCTXRayDetectorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9370), ElementsDictionaryEntry("X-Ray Detector Index", "XRayDetectorIndex", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9371), ElementsDictionaryEntry("X-Ray Detector ID", "XRayDetectorID", "UC", "1")); public_dictionary.emplace(Tag(0x0018, 0x9372), ElementsDictionaryEntry("Multi-energy Detector Type", "MultienergyDetectorType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9373), ElementsDictionaryEntry("X-Ray Detector Label", "XRayDetectorLabel", "ST", "1")); public_dictionary.emplace(Tag(0x0018, 0x9374), ElementsDictionaryEntry("Nominal Max Energy", "NominalMaxEnergy", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9375), ElementsDictionaryEntry("Nominal Min Energy", "NominalMinEnergy", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9376), ElementsDictionaryEntry("Referenced X-Ray Detector Index", "ReferencedXRayDetectorIndex", "US", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x9377), ElementsDictionaryEntry("Referenced X-Ray Source Index", "ReferencedXRaySourceIndex", "US", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x9378), ElementsDictionaryEntry("Referenced Path Index", "ReferencedPathIndex", "US", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x9379), ElementsDictionaryEntry("Multi-energy CT Path Sequence", "MultienergyCTPathSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x937a), ElementsDictionaryEntry("Multi-energy CT Path Index", "MultienergyCTPathIndex", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x937b), ElementsDictionaryEntry("Multi-energy Acquisition Description", "MultienergyAcquisitionDescription", "UT", "1")); public_dictionary.emplace(Tag(0x0018, 0x937c), ElementsDictionaryEntry("Monoenergetic Energy Equivalent", "MonoenergeticEnergyEquivalent", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x937d), ElementsDictionaryEntry("Material Code Sequence", "MaterialCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x937e), ElementsDictionaryEntry("Decomposition Method", "DecompositionMethod", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x937f), ElementsDictionaryEntry("Decomposition Description", "DecompositionDescription", "UT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9380), ElementsDictionaryEntry("Decomposition Algorithm Identification Sequence", "DecompositionAlgorithmIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9381), ElementsDictionaryEntry("Decomposition Material Sequence", "DecompositionMaterialSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9382), ElementsDictionaryEntry("Material Attenuation Sequence", "MaterialAttenuationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9383), ElementsDictionaryEntry("Photon Energy", "PhotonEnergy", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9384), ElementsDictionaryEntry("X-Ray Mass Attenuation Coefficient", "XRayMassAttenuationCoefficient", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9401), ElementsDictionaryEntry("Projection Pixel Calibration Sequence", "ProjectionPixelCalibrationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9402), ElementsDictionaryEntry("Distance Source to Isocenter", "DistanceSourceToIsocenter", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9403), ElementsDictionaryEntry("Distance Object to Table Top", "DistanceObjectToTableTop", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9404), ElementsDictionaryEntry("Object Pixel Spacing in Center of Beam", "ObjectPixelSpacingInCenterOfBeam", "FL", "2")); public_dictionary.emplace(Tag(0x0018, 0x9405), ElementsDictionaryEntry("Positioner Position Sequence", "PositionerPositionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9406), ElementsDictionaryEntry("Table Position Sequence", "TablePositionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9407), ElementsDictionaryEntry("Collimator Shape Sequence", "CollimatorShapeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9410), ElementsDictionaryEntry("Planes in Acquisition", "PlanesInAcquisition", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9412), ElementsDictionaryEntry("XA/XRF Frame Characteristics Sequence", "XAXRFFrameCharacteristicsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9417), ElementsDictionaryEntry("Frame Acquisition Sequence", "FrameAcquisitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9420), ElementsDictionaryEntry("X-Ray Receptor Type", "XRayReceptorType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9423), ElementsDictionaryEntry("Acquisition Protocol Name", "AcquisitionProtocolName", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9424), ElementsDictionaryEntry("Acquisition Protocol Description", "AcquisitionProtocolDescription", "LT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9425), ElementsDictionaryEntry("Contrast/Bolus Ingredient Opaque", "ContrastBolusIngredientOpaque", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9426), ElementsDictionaryEntry("Distance Receptor Plane to Detector Housing", "DistanceReceptorPlaneToDetectorHousing", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9427), ElementsDictionaryEntry("Intensifier Active Shape", "IntensifierActiveShape", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9428), ElementsDictionaryEntry("Intensifier Active Dimension(s)", "IntensifierActiveDimensions", "FL", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x9429), ElementsDictionaryEntry("Physical Detector Size", "PhysicalDetectorSize", "FL", "2")); public_dictionary.emplace(Tag(0x0018, 0x9430), ElementsDictionaryEntry("Position of Isocenter Projection", "PositionOfIsocenterProjection", "FL", "2")); public_dictionary.emplace(Tag(0x0018, 0x9432), ElementsDictionaryEntry("Field of View Sequence", "FieldOfViewSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9433), ElementsDictionaryEntry("Field of View Description", "FieldOfViewDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9434), ElementsDictionaryEntry("Exposure Control Sensing Regions Sequence", "ExposureControlSensingRegionsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9435), ElementsDictionaryEntry("Exposure Control Sensing Region Shape", "ExposureControlSensingRegionShape", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9436), ElementsDictionaryEntry("Exposure Control Sensing Region Left Vertical Edge", "ExposureControlSensingRegionLeftVerticalEdge", "SS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9437), ElementsDictionaryEntry("Exposure Control Sensing Region Right Vertical Edge", "ExposureControlSensingRegionRightVerticalEdge", "SS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9438), ElementsDictionaryEntry("Exposure Control Sensing Region Upper Horizontal Edge", "ExposureControlSensingRegionUpperHorizontalEdge", "SS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9439), ElementsDictionaryEntry("Exposure Control Sensing Region Lower Horizontal Edge", "ExposureControlSensingRegionLowerHorizontalEdge", "SS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9440), ElementsDictionaryEntry("Center of Circular Exposure Control Sensing Region", "CenterOfCircularExposureControlSensingRegion", "SS", "2")); public_dictionary.emplace(Tag(0x0018, 0x9441), ElementsDictionaryEntry("Radius of Circular Exposure Control Sensing Region", "RadiusOfCircularExposureControlSensingRegion", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9442), ElementsDictionaryEntry("Vertices of the Polygonal Exposure Control Sensing Region", "VerticesOfThePolygonalExposureControlSensingRegion", "SS", "2-n")); public_dictionary.emplace(Tag(0x0018, 0x9447), ElementsDictionaryEntry("Column Angulation (Patient)", "ColumnAngulationPatient", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9449), ElementsDictionaryEntry("Beam Angle", "BeamAngle", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9451), ElementsDictionaryEntry("Frame Detector Parameters Sequence", "FrameDetectorParametersSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9452), ElementsDictionaryEntry("Calculated Anatomy Thickness", "CalculatedAnatomyThickness", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9455), ElementsDictionaryEntry("Calibration Sequence", "CalibrationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9456), ElementsDictionaryEntry("Object Thickness Sequence", "ObjectThicknessSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9457), ElementsDictionaryEntry("Plane Identification", "PlaneIdentification", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9461), ElementsDictionaryEntry("Field of View Dimension(s) in Float", "FieldOfViewDimensionsInFloat", "FL", "1-2")); public_dictionary.emplace(Tag(0x0018, 0x9462), ElementsDictionaryEntry("Isocenter Reference System Sequence", "IsocenterReferenceSystemSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9463), ElementsDictionaryEntry("Positioner Isocenter Primary Angle", "PositionerIsocenterPrimaryAngle", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9464), ElementsDictionaryEntry("Positioner Isocenter Secondary Angle", "PositionerIsocenterSecondaryAngle", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9465), ElementsDictionaryEntry("Positioner Isocenter Detector Rotation Angle", "PositionerIsocenterDetectorRotationAngle", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9466), ElementsDictionaryEntry("Table X Position to Isocenter", "TableXPositionToIsocenter", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9467), ElementsDictionaryEntry("Table Y Position to Isocenter", "TableYPositionToIsocenter", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9468), ElementsDictionaryEntry("Table Z Position to Isocenter", "TableZPositionToIsocenter", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9469), ElementsDictionaryEntry("Table Horizontal Rotation Angle", "TableHorizontalRotationAngle", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9470), ElementsDictionaryEntry("Table Head Tilt Angle", "TableHeadTiltAngle", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9471), ElementsDictionaryEntry("Table Cradle Tilt Angle", "TableCradleTiltAngle", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9472), ElementsDictionaryEntry("Frame Display Shutter Sequence", "FrameDisplayShutterSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9473), ElementsDictionaryEntry("Acquired Image Area Dose Product", "AcquiredImageAreaDoseProduct", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9474), ElementsDictionaryEntry("C-arm Positioner Tabletop Relationship", "CArmPositionerTabletopRelationship", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9476), ElementsDictionaryEntry("X-Ray Geometry Sequence", "XRayGeometrySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9477), ElementsDictionaryEntry("Irradiation Event Identification Sequence", "IrradiationEventIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9504), ElementsDictionaryEntry("X-Ray 3D Frame Type Sequence", "XRay3DFrameTypeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9506), ElementsDictionaryEntry("Contributing Sources Sequence", "ContributingSourcesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9507), ElementsDictionaryEntry("X-Ray 3D Acquisition Sequence", "XRay3DAcquisitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9508), ElementsDictionaryEntry("Primary Positioner Scan Arc", "PrimaryPositionerScanArc", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9509), ElementsDictionaryEntry("Secondary Positioner Scan Arc", "SecondaryPositionerScanArc", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9510), ElementsDictionaryEntry("Primary Positioner Scan Start Angle", "PrimaryPositionerScanStartAngle", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9511), ElementsDictionaryEntry("Secondary Positioner Scan Start Angle", "SecondaryPositionerScanStartAngle", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9514), ElementsDictionaryEntry("Primary Positioner Increment", "PrimaryPositionerIncrement", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9515), ElementsDictionaryEntry("Secondary Positioner Increment", "SecondaryPositionerIncrement", "FL", "1")); public_dictionary.emplace(Tag(0x0018, 0x9516), ElementsDictionaryEntry("Start Acquisition DateTime", "StartAcquisitionDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9517), ElementsDictionaryEntry("End Acquisition DateTime", "EndAcquisitionDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9518), ElementsDictionaryEntry("Primary Positioner Increment Sign", "PrimaryPositionerIncrementSign", "SS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9519), ElementsDictionaryEntry("Secondary Positioner Increment Sign", "SecondaryPositionerIncrementSign", "SS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9524), ElementsDictionaryEntry("Application Name", "ApplicationName", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9525), ElementsDictionaryEntry("Application Version", "ApplicationVersion", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9526), ElementsDictionaryEntry("Application Manufacturer", "ApplicationManufacturer", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9527), ElementsDictionaryEntry("Algorithm Type", "AlgorithmType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9528), ElementsDictionaryEntry("Algorithm Description", "AlgorithmDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9530), ElementsDictionaryEntry("X-Ray 3D Reconstruction Sequence", "XRay3DReconstructionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9531), ElementsDictionaryEntry("Reconstruction Description", "ReconstructionDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9538), ElementsDictionaryEntry("Per Projection Acquisition Sequence", "PerProjectionAcquisitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9541), ElementsDictionaryEntry("Detector Position Sequence", "DetectorPositionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9542), ElementsDictionaryEntry("X-Ray Acquisition Dose Sequence", "XRayAcquisitionDoseSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9543), ElementsDictionaryEntry("X-Ray Source Isocenter Primary Angle", "XRaySourceIsocenterPrimaryAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9544), ElementsDictionaryEntry("X-Ray Source Isocenter Secondary Angle", "XRaySourceIsocenterSecondaryAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9545), ElementsDictionaryEntry("Breast Support Isocenter Primary Angle", "BreastSupportIsocenterPrimaryAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9546), ElementsDictionaryEntry("Breast Support Isocenter Secondary Angle", "BreastSupportIsocenterSecondaryAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9547), ElementsDictionaryEntry("Breast Support X Position to Isocenter", "BreastSupportXPositionToIsocenter", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9548), ElementsDictionaryEntry("Breast Support Y Position to Isocenter", "BreastSupportYPositionToIsocenter", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9549), ElementsDictionaryEntry("Breast Support Z Position to Isocenter", "BreastSupportZPositionToIsocenter", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9550), ElementsDictionaryEntry("Detector Isocenter Primary Angle", "DetectorIsocenterPrimaryAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9551), ElementsDictionaryEntry("Detector Isocenter Secondary Angle", "DetectorIsocenterSecondaryAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9552), ElementsDictionaryEntry("Detector X Position to Isocenter", "DetectorXPositionToIsocenter", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9553), ElementsDictionaryEntry("Detector Y Position to Isocenter", "DetectorYPositionToIsocenter", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9554), ElementsDictionaryEntry("Detector Z Position to Isocenter", "DetectorZPositionToIsocenter", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9555), ElementsDictionaryEntry("X-Ray Grid Sequence", "XRayGridSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9556), ElementsDictionaryEntry("X-Ray Filter Sequence", "XRayFilterSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9557), ElementsDictionaryEntry("Detector Active Area TLHC Position", "DetectorActiveAreaTLHCPosition", "FD", "3")); public_dictionary.emplace(Tag(0x0018, 0x9558), ElementsDictionaryEntry("Detector Active Area Orientation", "DetectorActiveAreaOrientation", "FD", "6")); public_dictionary.emplace(Tag(0x0018, 0x9559), ElementsDictionaryEntry("Positioner Primary Angle Direction", "PositionerPrimaryAngleDirection", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9601), ElementsDictionaryEntry("Diffusion b-matrix Sequence", "DiffusionBMatrixSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9602), ElementsDictionaryEntry("Diffusion b-value XX", "DiffusionBValueXX", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9603), ElementsDictionaryEntry("Diffusion b-value XY", "DiffusionBValueXY", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9604), ElementsDictionaryEntry("Diffusion b-value XZ", "DiffusionBValueXZ", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9605), ElementsDictionaryEntry("Diffusion b-value YY", "DiffusionBValueYY", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9606), ElementsDictionaryEntry("Diffusion b-value YZ", "DiffusionBValueYZ", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9607), ElementsDictionaryEntry("Diffusion b-value ZZ", "DiffusionBValueZZ", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9621), ElementsDictionaryEntry("Functional MR Sequence", "FunctionalMRSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9622), ElementsDictionaryEntry("Functional Settling Phase Frames Present", "FunctionalSettlingPhaseFramesPresent", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9623), ElementsDictionaryEntry("Functional Sync Pulse", "FunctionalSyncPulse", "DT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9624), ElementsDictionaryEntry("Settling Phase Frame", "SettlingPhaseFrame", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9701), ElementsDictionaryEntry("Decay Correction DateTime", "DecayCorrectionDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9715), ElementsDictionaryEntry("Start Density Threshold", "StartDensityThreshold", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9716), ElementsDictionaryEntry("Start Relative Density Difference Threshold", "StartRelativeDensityDifferenceThreshold", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9717), ElementsDictionaryEntry("Start Cardiac Trigger Count Threshold", "StartCardiacTriggerCountThreshold", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9718), ElementsDictionaryEntry("Start Respiratory Trigger Count Threshold", "StartRespiratoryTriggerCountThreshold", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9719), ElementsDictionaryEntry("Termination Counts Threshold", "TerminationCountsThreshold", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9720), ElementsDictionaryEntry("Termination Density Threshold", "TerminationDensityThreshold", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9721), ElementsDictionaryEntry("Termination Relative Density Threshold", "TerminationRelativeDensityThreshold", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9722), ElementsDictionaryEntry("Termination Time Threshold", "TerminationTimeThreshold", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9723), ElementsDictionaryEntry("Termination Cardiac Trigger Count Threshold", "TerminationCardiacTriggerCountThreshold", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9724), ElementsDictionaryEntry("Termination Respiratory Trigger Count Threshold", "TerminationRespiratoryTriggerCountThreshold", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9725), ElementsDictionaryEntry("Detector Geometry", "DetectorGeometry", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9726), ElementsDictionaryEntry("Transverse Detector Separation", "TransverseDetectorSeparation", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9727), ElementsDictionaryEntry("Axial Detector Dimension", "AxialDetectorDimension", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9729), ElementsDictionaryEntry("Radiopharmaceutical Agent Number", "RadiopharmaceuticalAgentNumber", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9732), ElementsDictionaryEntry("PET Frame Acquisition Sequence", "PETFrameAcquisitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9733), ElementsDictionaryEntry("PET Detector Motion Details Sequence", "PETDetectorMotionDetailsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9734), ElementsDictionaryEntry("PET Table Dynamics Sequence", "PETTableDynamicsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9735), ElementsDictionaryEntry("PET Position Sequence", "PETPositionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9736), ElementsDictionaryEntry("PET Frame Correction Factors Sequence", "PETFrameCorrectionFactorsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9737), ElementsDictionaryEntry("Radiopharmaceutical Usage Sequence", "RadiopharmaceuticalUsageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9738), ElementsDictionaryEntry("Attenuation Correction Source", "AttenuationCorrectionSource", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9739), ElementsDictionaryEntry("Number of Iterations", "NumberOfIterations", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9740), ElementsDictionaryEntry("Number of Subsets", "NumberOfSubsets", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9749), ElementsDictionaryEntry("PET Reconstruction Sequence", "PETReconstructionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9751), ElementsDictionaryEntry("PET Frame Type Sequence", "PETFrameTypeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9755), ElementsDictionaryEntry("Time of Flight Information Used", "TimeOfFlightInformationUsed", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9756), ElementsDictionaryEntry("Reconstruction Type", "ReconstructionType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9758), ElementsDictionaryEntry("Decay Corrected", "DecayCorrected", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9759), ElementsDictionaryEntry("Attenuation Corrected", "AttenuationCorrected", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9760), ElementsDictionaryEntry("Scatter Corrected", "ScatterCorrected", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9761), ElementsDictionaryEntry("Dead Time Corrected", "DeadTimeCorrected", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9762), ElementsDictionaryEntry("Gantry Motion Corrected", "GantryMotionCorrected", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9763), ElementsDictionaryEntry("Patient Motion Corrected", "PatientMotionCorrected", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9764), ElementsDictionaryEntry("Count Loss Normalization Corrected", "CountLossNormalizationCorrected", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9765), ElementsDictionaryEntry("Randoms Corrected", "RandomsCorrected", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9766), ElementsDictionaryEntry("Non-uniform Radial Sampling Corrected", "NonUniformRadialSamplingCorrected", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9767), ElementsDictionaryEntry("Sensitivity Calibrated", "SensitivityCalibrated", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9768), ElementsDictionaryEntry("Detector Normalization Correction", "DetectorNormalizationCorrection", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9769), ElementsDictionaryEntry("Iterative Reconstruction Method", "IterativeReconstructionMethod", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9770), ElementsDictionaryEntry("Attenuation Correction Temporal Relationship", "AttenuationCorrectionTemporalRelationship", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9771), ElementsDictionaryEntry("Patient Physiological State Sequence", "PatientPhysiologicalStateSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9772), ElementsDictionaryEntry("Patient Physiological State Code Sequence", "PatientPhysiologicalStateCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9801), ElementsDictionaryEntry("Depth(s) of Focus", "DepthsOfFocus", "FD", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x9803), ElementsDictionaryEntry("Excluded Intervals Sequence", "ExcludedIntervalsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9804), ElementsDictionaryEntry("Exclusion Start DateTime", "ExclusionStartDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9805), ElementsDictionaryEntry("Exclusion Duration", "ExclusionDuration", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9806), ElementsDictionaryEntry("US Image Description Sequence", "USImageDescriptionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9807), ElementsDictionaryEntry("Image Data Type Sequence", "ImageDataTypeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9808), ElementsDictionaryEntry("Data Type", "DataType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9809), ElementsDictionaryEntry("Transducer Scan Pattern Code Sequence", "TransducerScanPatternCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x980b), ElementsDictionaryEntry("Aliased Data Type", "AliasedDataType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x980c), ElementsDictionaryEntry("Position Measuring Device Used", "PositionMeasuringDeviceUsed", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x980d), ElementsDictionaryEntry("Transducer Geometry Code Sequence", "TransducerGeometryCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x980e), ElementsDictionaryEntry("Transducer Beam Steering Code Sequence", "TransducerBeamSteeringCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x980f), ElementsDictionaryEntry("Transducer Application Code Sequence", "TransducerApplicationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9810), ElementsDictionaryEntry("Zero Velocity Pixel Value", "ZeroVelocityPixelValue", "US or SS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9900), ElementsDictionaryEntry("Reference Location Label", "ReferenceLocationLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9901), ElementsDictionaryEntry("Reference Location Description", "ReferenceLocationDescription", "UT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9902), ElementsDictionaryEntry("Reference Basis Code Sequence", "ReferenceBasisCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9903), ElementsDictionaryEntry("Reference Geometry Code Sequence", "ReferenceGeometryCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9904), ElementsDictionaryEntry("Offset Distance", "OffsetDistance", "DS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9905), ElementsDictionaryEntry("Offset Direction", "OffsetDirection", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9906), ElementsDictionaryEntry("Potential Scheduled Protocol Code Sequence", "PotentialScheduledProtocolCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9907), ElementsDictionaryEntry("Potential Requested Procedure Code Sequence", "PotentialRequestedProcedureCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9908), ElementsDictionaryEntry("Potential Reasons for Procedure", "PotentialReasonsForProcedure", "UC", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x9909), ElementsDictionaryEntry("Potential Reasons for Procedure Code Sequence", "PotentialReasonsForProcedureCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x990a), ElementsDictionaryEntry("Potential Diagnostic Tasks", "PotentialDiagnosticTasks", "UC", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x990b), ElementsDictionaryEntry("Contraindications Code Sequence", "ContraindicationsCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x990c), ElementsDictionaryEntry("Referenced Defined Protocol Sequence", "ReferencedDefinedProtocolSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x990d), ElementsDictionaryEntry("Referenced Performed Protocol Sequence", "ReferencedPerformedProtocolSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x990e), ElementsDictionaryEntry("Predecessor Protocol Sequence", "PredecessorProtocolSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x990f), ElementsDictionaryEntry("Protocol Planning Information", "ProtocolPlanningInformation", "UT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9910), ElementsDictionaryEntry("Protocol Design Rationale", "ProtocolDesignRationale", "UT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9911), ElementsDictionaryEntry("Patient Specification Sequence", "PatientSpecificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9912), ElementsDictionaryEntry("Model Specification Sequence", "ModelSpecificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9913), ElementsDictionaryEntry("Parameters Specification Sequence", "ParametersSpecificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9914), ElementsDictionaryEntry("Instruction Sequence", "InstructionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9915), ElementsDictionaryEntry("Instruction Index", "InstructionIndex", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9916), ElementsDictionaryEntry("Instruction Text", "InstructionText", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9917), ElementsDictionaryEntry("Instruction Description", "InstructionDescription", "UT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9918), ElementsDictionaryEntry("Instruction Performed Flag", "InstructionPerformedFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9919), ElementsDictionaryEntry("Instruction Performed DateTime", "InstructionPerformedDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0018, 0x991a), ElementsDictionaryEntry("Instruction Performance Comment", "InstructionPerformanceComment", "UT", "1")); public_dictionary.emplace(Tag(0x0018, 0x991b), ElementsDictionaryEntry("Patient Positioning Instruction Sequence", "PatientPositioningInstructionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x991c), ElementsDictionaryEntry("Positioning Method Code Sequence", "PositioningMethodCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x991d), ElementsDictionaryEntry("Positioning Landmark Sequence", "PositioningLandmarkSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x991e), ElementsDictionaryEntry("Target Frame of Reference UID", "TargetFrameOfReferenceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0018, 0x991f), ElementsDictionaryEntry("Acquisition Protocol Element Specification Sequence", "AcquisitionProtocolElementSpecificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9920), ElementsDictionaryEntry("Acquisition Protocol Element Sequence", "AcquisitionProtocolElementSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9921), ElementsDictionaryEntry("Protocol Element Number", "ProtocolElementNumber", "US", "1")); public_dictionary.emplace(Tag(0x0018, 0x9922), ElementsDictionaryEntry("Protocol Element Name", "ProtocolElementName", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9923), ElementsDictionaryEntry("Protocol Element Characteristics Summary", "ProtocolElementCharacteristicsSummary", "UT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9924), ElementsDictionaryEntry("Protocol Element Purpose", "ProtocolElementPurpose", "UT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9930), ElementsDictionaryEntry("Acquisition Motion", "AcquisitionMotion", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9931), ElementsDictionaryEntry("Acquisition Start Location Sequence", "AcquisitionStartLocationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9932), ElementsDictionaryEntry("Acquisition End Location Sequence", "AcquisitionEndLocationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9933), ElementsDictionaryEntry("Reconstruction Protocol Element Specification Sequence", "ReconstructionProtocolElementSpecificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9934), ElementsDictionaryEntry("Reconstruction Protocol Element Sequence", "ReconstructionProtocolElementSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9935), ElementsDictionaryEntry("Storage Protocol Element Specification Sequence", "StorageProtocolElementSpecificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9936), ElementsDictionaryEntry("Storage Protocol Element Sequence", "StorageProtocolElementSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9937), ElementsDictionaryEntry("Requested Series Description", "RequestedSeriesDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0018, 0x9938), ElementsDictionaryEntry("Source Acquisition Protocol Element Number", "SourceAcquisitionProtocolElementNumber", "US", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x9939), ElementsDictionaryEntry("Source Acquisition Beam Number", "SourceAcquisitionBeamNumber", "US", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x993a), ElementsDictionaryEntry("Source Reconstruction Protocol Element Number", "SourceReconstructionProtocolElementNumber", "US", "1-n")); public_dictionary.emplace(Tag(0x0018, 0x993b), ElementsDictionaryEntry("Reconstruction Start Location Sequence", "ReconstructionStartLocationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x993c), ElementsDictionaryEntry("Reconstruction End Location Sequence", "ReconstructionEndLocationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x993d), ElementsDictionaryEntry("Reconstruction Algorithm Sequence", "ReconstructionAlgorithmSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x993e), ElementsDictionaryEntry("Reconstruction Target Center Location Sequence", "ReconstructionTargetCenterLocationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0x9941), ElementsDictionaryEntry("Image Filter Description", "ImageFilterDescription", "UT", "1")); public_dictionary.emplace(Tag(0x0018, 0x9942), ElementsDictionaryEntry("CTDIvol Notification Trigger", "CTDIvolNotificationTrigger", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9943), ElementsDictionaryEntry("DLP Notification Trigger", "DLPNotificationTrigger", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9944), ElementsDictionaryEntry("Auto KVP Selection Type", "AutoKVPSelectionType", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0x9945), ElementsDictionaryEntry("Auto KVP Upper Bound", "AutoKVPUpperBound", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9946), ElementsDictionaryEntry("Auto KVP Lower Bound", "AutoKVPLowerBound", "FD", "1")); public_dictionary.emplace(Tag(0x0018, 0x9947), ElementsDictionaryEntry("Protocol Defined Patient Position", "ProtocolDefinedPatientPosition", "CS", "1")); public_dictionary.emplace(Tag(0x0018, 0xa001), ElementsDictionaryEntry("Contributing Equipment Sequence", "ContributingEquipmentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0018, 0xa002), ElementsDictionaryEntry("Contribution DateTime", "ContributionDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0018, 0xa003), ElementsDictionaryEntry("Contribution Description", "ContributionDescription", "ST", "1")); public_tags.emplace("ContrastBolusAgent", Tag(0x0018, 0x0010)); public_tags.emplace("ContrastBolusAgentSequence", Tag(0x0018, 0x0012)); public_tags.emplace("ContrastBolusT1Relaxivity", Tag(0x0018, 0x0013)); public_tags.emplace("ContrastBolusAdministrationRouteSequence", Tag(0x0018, 0x0014)); public_tags.emplace("BodyPartExamined", Tag(0x0018, 0x0015)); public_tags.emplace("ScanningSequence", Tag(0x0018, 0x0020)); public_tags.emplace("SequenceVariant", Tag(0x0018, 0x0021)); public_tags.emplace("ScanOptions", Tag(0x0018, 0x0022)); public_tags.emplace("MRAcquisitionType", Tag(0x0018, 0x0023)); public_tags.emplace("SequenceName", Tag(0x0018, 0x0024)); public_tags.emplace("AngioFlag", Tag(0x0018, 0x0025)); public_tags.emplace("InterventionDrugInformationSequence", Tag(0x0018, 0x0026)); public_tags.emplace("InterventionDrugStopTime", Tag(0x0018, 0x0027)); public_tags.emplace("InterventionDrugDose", Tag(0x0018, 0x0028)); public_tags.emplace("InterventionDrugCodeSequence", Tag(0x0018, 0x0029)); public_tags.emplace("AdditionalDrugSequence", Tag(0x0018, 0x002a)); public_tags.emplace("Radionuclide", Tag(0x0018, 0x0030)); public_tags.emplace("Radiopharmaceutical", Tag(0x0018, 0x0031)); public_tags.emplace("EnergyWindowCenterline", Tag(0x0018, 0x0032)); public_tags.emplace("EnergyWindowTotalWidth", Tag(0x0018, 0x0033)); public_tags.emplace("InterventionDrugName", Tag(0x0018, 0x0034)); public_tags.emplace("InterventionDrugStartTime", Tag(0x0018, 0x0035)); public_tags.emplace("InterventionSequence", Tag(0x0018, 0x0036)); public_tags.emplace("TherapyType", Tag(0x0018, 0x0037)); public_tags.emplace("InterventionStatus", Tag(0x0018, 0x0038)); public_tags.emplace("TherapyDescription", Tag(0x0018, 0x0039)); public_tags.emplace("InterventionDescription", Tag(0x0018, 0x003a)); public_tags.emplace("CineRate", Tag(0x0018, 0x0040)); public_tags.emplace("InitialCineRunState", Tag(0x0018, 0x0042)); public_tags.emplace("SliceThickness", Tag(0x0018, 0x0050)); public_tags.emplace("KVP", Tag(0x0018, 0x0060)); public_tags.emplace("CountsAccumulated", Tag(0x0018, 0x0070)); public_tags.emplace("AcquisitionTerminationCondition", Tag(0x0018, 0x0071)); public_tags.emplace("EffectiveDuration", Tag(0x0018, 0x0072)); public_tags.emplace("AcquisitionStartCondition", Tag(0x0018, 0x0073)); public_tags.emplace("AcquisitionStartConditionData", Tag(0x0018, 0x0074)); public_tags.emplace("AcquisitionTerminationConditionData", Tag(0x0018, 0x0075)); public_tags.emplace("RepetitionTime", Tag(0x0018, 0x0080)); public_tags.emplace("EchoTime", Tag(0x0018, 0x0081)); public_tags.emplace("InversionTime", Tag(0x0018, 0x0082)); public_tags.emplace("NumberOfAverages", Tag(0x0018, 0x0083)); public_tags.emplace("ImagingFrequency", Tag(0x0018, 0x0084)); public_tags.emplace("ImagedNucleus", Tag(0x0018, 0x0085)); public_tags.emplace("EchoNumbers", Tag(0x0018, 0x0086)); public_tags.emplace("MagneticFieldStrength", Tag(0x0018, 0x0087)); public_tags.emplace("SpacingBetweenSlices", Tag(0x0018, 0x0088)); public_tags.emplace("NumberOfPhaseEncodingSteps", Tag(0x0018, 0x0089)); public_tags.emplace("DataCollectionDiameter", Tag(0x0018, 0x0090)); public_tags.emplace("EchoTrainLength", Tag(0x0018, 0x0091)); public_tags.emplace("PercentSampling", Tag(0x0018, 0x0093)); public_tags.emplace("PercentPhaseFieldOfView", Tag(0x0018, 0x0094)); public_tags.emplace("PixelBandwidth", Tag(0x0018, 0x0095)); public_tags.emplace("DeviceSerialNumber", Tag(0x0018, 0x1000)); public_tags.emplace("DeviceUID", Tag(0x0018, 0x1002)); public_tags.emplace("DeviceID", Tag(0x0018, 0x1003)); public_tags.emplace("PlateID", Tag(0x0018, 0x1004)); public_tags.emplace("GeneratorID", Tag(0x0018, 0x1005)); public_tags.emplace("GridID", Tag(0x0018, 0x1006)); public_tags.emplace("CassetteID", Tag(0x0018, 0x1007)); public_tags.emplace("GantryID", Tag(0x0018, 0x1008)); public_tags.emplace("UniqueDeviceIdentifier", Tag(0x0018, 0x1009)); public_tags.emplace("UDISequence", Tag(0x0018, 0x100a)); public_tags.emplace("ManufacturerDeviceClassUID", Tag(0x0018, 0x100b)); public_tags.emplace("SecondaryCaptureDeviceID", Tag(0x0018, 0x1010)); public_tags.emplace("HardcopyCreationDeviceID", Tag(0x0018, 0x1011)); public_tags.emplace("DateOfSecondaryCapture", Tag(0x0018, 0x1012)); public_tags.emplace("TimeOfSecondaryCapture", Tag(0x0018, 0x1014)); public_tags.emplace("SecondaryCaptureDeviceManufacturer", Tag(0x0018, 0x1016)); public_tags.emplace("HardcopyDeviceManufacturer", Tag(0x0018, 0x1017)); public_tags.emplace("SecondaryCaptureDeviceManufacturerModelName", Tag(0x0018, 0x1018)); public_tags.emplace("SecondaryCaptureDeviceSoftwareVersions", Tag(0x0018, 0x1019)); public_tags.emplace("HardcopyDeviceSoftwareVersion", Tag(0x0018, 0x101a)); public_tags.emplace("HardcopyDeviceManufacturerModelName", Tag(0x0018, 0x101b)); public_tags.emplace("SoftwareVersions", Tag(0x0018, 0x1020)); public_tags.emplace("VideoImageFormatAcquired", Tag(0x0018, 0x1022)); public_tags.emplace("DigitalImageFormatAcquired", Tag(0x0018, 0x1023)); public_tags.emplace("ProtocolName", Tag(0x0018, 0x1030)); public_tags.emplace("ContrastBolusRoute", Tag(0x0018, 0x1040)); public_tags.emplace("ContrastBolusVolume", Tag(0x0018, 0x1041)); public_tags.emplace("ContrastBolusStartTime", Tag(0x0018, 0x1042)); public_tags.emplace("ContrastBolusStopTime", Tag(0x0018, 0x1043)); public_tags.emplace("ContrastBolusTotalDose", Tag(0x0018, 0x1044)); public_tags.emplace("SyringeCounts", Tag(0x0018, 0x1045)); public_tags.emplace("ContrastFlowRate", Tag(0x0018, 0x1046)); public_tags.emplace("ContrastFlowDuration", Tag(0x0018, 0x1047)); public_tags.emplace("ContrastBolusIngredient", Tag(0x0018, 0x1048)); public_tags.emplace("ContrastBolusIngredientConcentration", Tag(0x0018, 0x1049)); public_tags.emplace("SpatialResolution", Tag(0x0018, 0x1050)); public_tags.emplace("TriggerTime", Tag(0x0018, 0x1060)); public_tags.emplace("TriggerSourceOrType", Tag(0x0018, 0x1061)); public_tags.emplace("NominalInterval", Tag(0x0018, 0x1062)); public_tags.emplace("FrameTime", Tag(0x0018, 0x1063)); public_tags.emplace("CardiacFramingType", Tag(0x0018, 0x1064)); public_tags.emplace("FrameTimeVector", Tag(0x0018, 0x1065)); public_tags.emplace("FrameDelay", Tag(0x0018, 0x1066)); public_tags.emplace("ImageTriggerDelay", Tag(0x0018, 0x1067)); public_tags.emplace("MultiplexGroupTimeOffset", Tag(0x0018, 0x1068)); public_tags.emplace("TriggerTimeOffset", Tag(0x0018, 0x1069)); public_tags.emplace("SynchronizationTrigger", Tag(0x0018, 0x106a)); public_tags.emplace("SynchronizationChannel", Tag(0x0018, 0x106c)); public_tags.emplace("TriggerSamplePosition", Tag(0x0018, 0x106e)); public_tags.emplace("RadiopharmaceuticalRoute", Tag(0x0018, 0x1070)); public_tags.emplace("RadiopharmaceuticalVolume", Tag(0x0018, 0x1071)); public_tags.emplace("RadiopharmaceuticalStartTime", Tag(0x0018, 0x1072)); public_tags.emplace("RadiopharmaceuticalStopTime", Tag(0x0018, 0x1073)); public_tags.emplace("RadionuclideTotalDose", Tag(0x0018, 0x1074)); public_tags.emplace("RadionuclideHalfLife", Tag(0x0018, 0x1075)); public_tags.emplace("RadionuclidePositronFraction", Tag(0x0018, 0x1076)); public_tags.emplace("RadiopharmaceuticalSpecificActivity", Tag(0x0018, 0x1077)); public_tags.emplace("RadiopharmaceuticalStartDateTime", Tag(0x0018, 0x1078)); public_tags.emplace("RadiopharmaceuticalStopDateTime", Tag(0x0018, 0x1079)); public_tags.emplace("BeatRejectionFlag", Tag(0x0018, 0x1080)); public_tags.emplace("LowRRValue", Tag(0x0018, 0x1081)); public_tags.emplace("HighRRValue", Tag(0x0018, 0x1082)); public_tags.emplace("IntervalsAcquired", Tag(0x0018, 0x1083)); public_tags.emplace("IntervalsRejected", Tag(0x0018, 0x1084)); public_tags.emplace("PVCRejection", Tag(0x0018, 0x1085)); public_tags.emplace("SkipBeats", Tag(0x0018, 0x1086)); public_tags.emplace("HeartRate", Tag(0x0018, 0x1088)); public_tags.emplace("CardiacNumberOfImages", Tag(0x0018, 0x1090)); public_tags.emplace("TriggerWindow", Tag(0x0018, 0x1094)); public_tags.emplace("ReconstructionDiameter", Tag(0x0018, 0x1100)); public_tags.emplace("DistanceSourceToDetector", Tag(0x0018, 0x1110)); public_tags.emplace("DistanceSourceToPatient", Tag(0x0018, 0x1111)); public_tags.emplace("EstimatedRadiographicMagnificationFactor", Tag(0x0018, 0x1114)); public_tags.emplace("GantryDetectorTilt", Tag(0x0018, 0x1120)); public_tags.emplace("GantryDetectorSlew", Tag(0x0018, 0x1121)); public_tags.emplace("TableHeight", Tag(0x0018, 0x1130)); public_tags.emplace("TableTraverse", Tag(0x0018, 0x1131)); public_tags.emplace("TableMotion", Tag(0x0018, 0x1134)); public_tags.emplace("TableVerticalIncrement", Tag(0x0018, 0x1135)); public_tags.emplace("TableLateralIncrement", Tag(0x0018, 0x1136)); public_tags.emplace("TableLongitudinalIncrement", Tag(0x0018, 0x1137)); public_tags.emplace("TableAngle", Tag(0x0018, 0x1138)); public_tags.emplace("TableType", Tag(0x0018, 0x113a)); public_tags.emplace("RotationDirection", Tag(0x0018, 0x1140)); public_tags.emplace("AngularPosition", Tag(0x0018, 0x1141)); public_tags.emplace("RadialPosition", Tag(0x0018, 0x1142)); public_tags.emplace("ScanArc", Tag(0x0018, 0x1143)); public_tags.emplace("AngularStep", Tag(0x0018, 0x1144)); public_tags.emplace("CenterOfRotationOffset", Tag(0x0018, 0x1145)); public_tags.emplace("RotationOffset", Tag(0x0018, 0x1146)); public_tags.emplace("FieldOfViewShape", Tag(0x0018, 0x1147)); public_tags.emplace("FieldOfViewDimensions", Tag(0x0018, 0x1149)); public_tags.emplace("ExposureTime", Tag(0x0018, 0x1150)); public_tags.emplace("XRayTubeCurrent", Tag(0x0018, 0x1151)); public_tags.emplace("Exposure", Tag(0x0018, 0x1152)); public_tags.emplace("ExposureInuAs", Tag(0x0018, 0x1153)); public_tags.emplace("AveragePulseWidth", Tag(0x0018, 0x1154)); public_tags.emplace("RadiationSetting", Tag(0x0018, 0x1155)); public_tags.emplace("RectificationType", Tag(0x0018, 0x1156)); public_tags.emplace("RadiationMode", Tag(0x0018, 0x115a)); public_tags.emplace("ImageAndFluoroscopyAreaDoseProduct", Tag(0x0018, 0x115e)); public_tags.emplace("FilterType", Tag(0x0018, 0x1160)); public_tags.emplace("TypeOfFilters", Tag(0x0018, 0x1161)); public_tags.emplace("IntensifierSize", Tag(0x0018, 0x1162)); public_tags.emplace("ImagerPixelSpacing", Tag(0x0018, 0x1164)); public_tags.emplace("Grid", Tag(0x0018, 0x1166)); public_tags.emplace("GeneratorPower", Tag(0x0018, 0x1170)); public_tags.emplace("CollimatorGridName", Tag(0x0018, 0x1180)); public_tags.emplace("CollimatorType", Tag(0x0018, 0x1181)); public_tags.emplace("FocalDistance", Tag(0x0018, 0x1182)); public_tags.emplace("XFocusCenter", Tag(0x0018, 0x1183)); public_tags.emplace("YFocusCenter", Tag(0x0018, 0x1184)); public_tags.emplace("FocalSpots", Tag(0x0018, 0x1190)); public_tags.emplace("AnodeTargetMaterial", Tag(0x0018, 0x1191)); public_tags.emplace("BodyPartThickness", Tag(0x0018, 0x11a0)); public_tags.emplace("CompressionForce", Tag(0x0018, 0x11a2)); public_tags.emplace("CompressionPressure", Tag(0x0018, 0x11a3)); public_tags.emplace("PaddleDescription", Tag(0x0018, 0x11a4)); public_tags.emplace("CompressionContactArea", Tag(0x0018, 0x11a5)); public_tags.emplace("DateOfLastCalibration", Tag(0x0018, 0x1200)); public_tags.emplace("TimeOfLastCalibration", Tag(0x0018, 0x1201)); public_tags.emplace("DateTimeOfLastCalibration", Tag(0x0018, 0x1202)); public_tags.emplace("ConvolutionKernel", Tag(0x0018, 0x1210)); public_tags.emplace("UpperLowerPixelValues", Tag(0x0018, 0x1240)); public_tags.emplace("ActualFrameDuration", Tag(0x0018, 0x1242)); public_tags.emplace("CountRate", Tag(0x0018, 0x1243)); public_tags.emplace("PreferredPlaybackSequencing", Tag(0x0018, 0x1244)); public_tags.emplace("ReceiveCoilName", Tag(0x0018, 0x1250)); public_tags.emplace("TransmitCoilName", Tag(0x0018, 0x1251)); public_tags.emplace("PlateType", Tag(0x0018, 0x1260)); public_tags.emplace("PhosphorType", Tag(0x0018, 0x1261)); public_tags.emplace("WaterEquivalentDiameter", Tag(0x0018, 0x1271)); public_tags.emplace("WaterEquivalentDiameterCalculationMethodCodeSequence", Tag(0x0018, 0x1272)); public_tags.emplace("ScanVelocity", Tag(0x0018, 0x1300)); public_tags.emplace("WholeBodyTechnique", Tag(0x0018, 0x1301)); public_tags.emplace("ScanLength", Tag(0x0018, 0x1302)); public_tags.emplace("AcquisitionMatrix", Tag(0x0018, 0x1310)); public_tags.emplace("InPlanePhaseEncodingDirection", Tag(0x0018, 0x1312)); public_tags.emplace("FlipAngle", Tag(0x0018, 0x1314)); public_tags.emplace("VariableFlipAngleFlag", Tag(0x0018, 0x1315)); public_tags.emplace("SAR", Tag(0x0018, 0x1316)); public_tags.emplace("dBdt", Tag(0x0018, 0x1318)); public_tags.emplace("B1rms", Tag(0x0018, 0x1320)); public_tags.emplace("AcquisitionDeviceProcessingDescription", Tag(0x0018, 0x1400)); public_tags.emplace("AcquisitionDeviceProcessingCode", Tag(0x0018, 0x1401)); public_tags.emplace("CassetteOrientation", Tag(0x0018, 0x1402)); public_tags.emplace("CassetteSize", Tag(0x0018, 0x1403)); public_tags.emplace("ExposuresOnPlate", Tag(0x0018, 0x1404)); public_tags.emplace("RelativeXRayExposure", Tag(0x0018, 0x1405)); public_tags.emplace("ExposureIndex", Tag(0x0018, 0x1411)); public_tags.emplace("TargetExposureIndex", Tag(0x0018, 0x1412)); public_tags.emplace("DeviationIndex", Tag(0x0018, 0x1413)); public_tags.emplace("ColumnAngulation", Tag(0x0018, 0x1450)); public_tags.emplace("TomoLayerHeight", Tag(0x0018, 0x1460)); public_tags.emplace("TomoAngle", Tag(0x0018, 0x1470)); public_tags.emplace("TomoTime", Tag(0x0018, 0x1480)); public_tags.emplace("TomoType", Tag(0x0018, 0x1490)); public_tags.emplace("TomoClass", Tag(0x0018, 0x1491)); public_tags.emplace("NumberOfTomosynthesisSourceImages", Tag(0x0018, 0x1495)); public_tags.emplace("PositionerMotion", Tag(0x0018, 0x1500)); public_tags.emplace("PositionerType", Tag(0x0018, 0x1508)); public_tags.emplace("PositionerPrimaryAngle", Tag(0x0018, 0x1510)); public_tags.emplace("PositionerSecondaryAngle", Tag(0x0018, 0x1511)); public_tags.emplace("PositionerPrimaryAngleIncrement", Tag(0x0018, 0x1520)); public_tags.emplace("PositionerSecondaryAngleIncrement", Tag(0x0018, 0x1521)); public_tags.emplace("DetectorPrimaryAngle", Tag(0x0018, 0x1530)); public_tags.emplace("DetectorSecondaryAngle", Tag(0x0018, 0x1531)); public_tags.emplace("ShutterShape", Tag(0x0018, 0x1600)); public_tags.emplace("ShutterLeftVerticalEdge", Tag(0x0018, 0x1602)); public_tags.emplace("ShutterRightVerticalEdge", Tag(0x0018, 0x1604)); public_tags.emplace("ShutterUpperHorizontalEdge", Tag(0x0018, 0x1606)); public_tags.emplace("ShutterLowerHorizontalEdge", Tag(0x0018, 0x1608)); public_tags.emplace("CenterOfCircularShutter", Tag(0x0018, 0x1610)); public_tags.emplace("RadiusOfCircularShutter", Tag(0x0018, 0x1612)); public_tags.emplace("VerticesOfThePolygonalShutter", Tag(0x0018, 0x1620)); public_tags.emplace("ShutterPresentationValue", Tag(0x0018, 0x1622)); public_tags.emplace("ShutterOverlayGroup", Tag(0x0018, 0x1623)); public_tags.emplace("ShutterPresentationColorCIELabValue", Tag(0x0018, 0x1624)); public_tags.emplace("OutlineShapeType", Tag(0x0018, 0x1630)); public_tags.emplace("OutlineLeftVerticalEdge", Tag(0x0018, 0x1631)); public_tags.emplace("OutlineRightVerticalEdge", Tag(0x0018, 0x1632)); public_tags.emplace("OutlineUpperHorizontalEdge", Tag(0x0018, 0x1633)); public_tags.emplace("OutlineLowerHorizontalEdge", Tag(0x0018, 0x1634)); public_tags.emplace("CenterOfCircularOutline", Tag(0x0018, 0x1635)); public_tags.emplace("DiameterOfCircularOutline", Tag(0x0018, 0x1636)); public_tags.emplace("NumberOfPolygonalVertices", Tag(0x0018, 0x1637)); public_tags.emplace("VerticesOfThePolygonalOutline", Tag(0x0018, 0x1638)); public_tags.emplace("CollimatorShape", Tag(0x0018, 0x1700)); public_tags.emplace("CollimatorLeftVerticalEdge", Tag(0x0018, 0x1702)); public_tags.emplace("CollimatorRightVerticalEdge", Tag(0x0018, 0x1704)); public_tags.emplace("CollimatorUpperHorizontalEdge", Tag(0x0018, 0x1706)); public_tags.emplace("CollimatorLowerHorizontalEdge", Tag(0x0018, 0x1708)); public_tags.emplace("CenterOfCircularCollimator", Tag(0x0018, 0x1710)); public_tags.emplace("RadiusOfCircularCollimator", Tag(0x0018, 0x1712)); public_tags.emplace("VerticesOfThePolygonalCollimator", Tag(0x0018, 0x1720)); public_tags.emplace("AcquisitionTimeSynchronized", Tag(0x0018, 0x1800)); public_tags.emplace("TimeSource", Tag(0x0018, 0x1801)); public_tags.emplace("TimeDistributionProtocol", Tag(0x0018, 0x1802)); public_tags.emplace("NTPSourceAddress", Tag(0x0018, 0x1803)); public_tags.emplace("PageNumberVector", Tag(0x0018, 0x2001)); public_tags.emplace("FrameLabelVector", Tag(0x0018, 0x2002)); public_tags.emplace("FramePrimaryAngleVector", Tag(0x0018, 0x2003)); public_tags.emplace("FrameSecondaryAngleVector", Tag(0x0018, 0x2004)); public_tags.emplace("SliceLocationVector", Tag(0x0018, 0x2005)); public_tags.emplace("DisplayWindowLabelVector", Tag(0x0018, 0x2006)); public_tags.emplace("NominalScannedPixelSpacing", Tag(0x0018, 0x2010)); public_tags.emplace("DigitizingDeviceTransportDirection", Tag(0x0018, 0x2020)); public_tags.emplace("RotationOfScannedFilm", Tag(0x0018, 0x2030)); public_tags.emplace("BiopsyTargetSequence", Tag(0x0018, 0x2041)); public_tags.emplace("TargetUID", Tag(0x0018, 0x2042)); public_tags.emplace("LocalizingCursorPosition", Tag(0x0018, 0x2043)); public_tags.emplace("CalculatedTargetPosition", Tag(0x0018, 0x2044)); public_tags.emplace("TargetLabel", Tag(0x0018, 0x2045)); public_tags.emplace("DisplayedZValue", Tag(0x0018, 0x2046)); public_tags.emplace("IVUSAcquisition", Tag(0x0018, 0x3100)); public_tags.emplace("IVUSPullbackRate", Tag(0x0018, 0x3101)); public_tags.emplace("IVUSGatedRate", Tag(0x0018, 0x3102)); public_tags.emplace("IVUSPullbackStartFrameNumber", Tag(0x0018, 0x3103)); public_tags.emplace("IVUSPullbackStopFrameNumber", Tag(0x0018, 0x3104)); public_tags.emplace("LesionNumber", Tag(0x0018, 0x3105)); public_tags.emplace("AcquisitionComments", Tag(0x0018, 0x4000)); public_tags.emplace("OutputPower", Tag(0x0018, 0x5000)); public_tags.emplace("TransducerData", Tag(0x0018, 0x5010)); public_tags.emplace("FocusDepth", Tag(0x0018, 0x5012)); public_tags.emplace("ProcessingFunction", Tag(0x0018, 0x5020)); public_tags.emplace("PostprocessingFunction", Tag(0x0018, 0x5021)); public_tags.emplace("MechanicalIndex", Tag(0x0018, 0x5022)); public_tags.emplace("BoneThermalIndex", Tag(0x0018, 0x5024)); public_tags.emplace("CranialThermalIndex", Tag(0x0018, 0x5026)); public_tags.emplace("SoftTissueThermalIndex", Tag(0x0018, 0x5027)); public_tags.emplace("SoftTissueFocusThermalIndex", Tag(0x0018, 0x5028)); public_tags.emplace("SoftTissueSurfaceThermalIndex", Tag(0x0018, 0x5029)); public_tags.emplace("DynamicRange", Tag(0x0018, 0x5030)); public_tags.emplace("TotalGain", Tag(0x0018, 0x5040)); public_tags.emplace("DepthOfScanField", Tag(0x0018, 0x5050)); public_tags.emplace("PatientPosition", Tag(0x0018, 0x5100)); public_tags.emplace("ViewPosition", Tag(0x0018, 0x5101)); public_tags.emplace("ProjectionEponymousNameCodeSequence", Tag(0x0018, 0x5104)); public_tags.emplace("ImageTransformationMatrix", Tag(0x0018, 0x5210)); public_tags.emplace("ImageTranslationVector", Tag(0x0018, 0x5212)); public_tags.emplace("Sensitivity", Tag(0x0018, 0x6000)); public_tags.emplace("SequenceOfUltrasoundRegions", Tag(0x0018, 0x6011)); public_tags.emplace("RegionSpatialFormat", Tag(0x0018, 0x6012)); public_tags.emplace("RegionDataType", Tag(0x0018, 0x6014)); public_tags.emplace("RegionFlags", Tag(0x0018, 0x6016)); public_tags.emplace("RegionLocationMinX0", Tag(0x0018, 0x6018)); public_tags.emplace("RegionLocationMinY0", Tag(0x0018, 0x601a)); public_tags.emplace("RegionLocationMaxX1", Tag(0x0018, 0x601c)); public_tags.emplace("RegionLocationMaxY1", Tag(0x0018, 0x601e)); public_tags.emplace("ReferencePixelX0", Tag(0x0018, 0x6020)); public_tags.emplace("ReferencePixelY0", Tag(0x0018, 0x6022)); public_tags.emplace("PhysicalUnitsXDirection", Tag(0x0018, 0x6024)); public_tags.emplace("PhysicalUnitsYDirection", Tag(0x0018, 0x6026)); public_tags.emplace("ReferencePixelPhysicalValueX", Tag(0x0018, 0x6028)); public_tags.emplace("ReferencePixelPhysicalValueY", Tag(0x0018, 0x602a)); public_tags.emplace("PhysicalDeltaX", Tag(0x0018, 0x602c)); public_tags.emplace("PhysicalDeltaY", Tag(0x0018, 0x602e)); public_tags.emplace("TransducerFrequency", Tag(0x0018, 0x6030)); public_tags.emplace("TransducerType", Tag(0x0018, 0x6031)); public_tags.emplace("PulseRepetitionFrequency", Tag(0x0018, 0x6032)); public_tags.emplace("DopplerCorrectionAngle", Tag(0x0018, 0x6034)); public_tags.emplace("SteeringAngle", Tag(0x0018, 0x6036)); public_tags.emplace("DopplerSampleVolumeXPositionRetired", Tag(0x0018, 0x6038)); public_tags.emplace("DopplerSampleVolumeXPosition", Tag(0x0018, 0x6039)); public_tags.emplace("DopplerSampleVolumeYPositionRetired", Tag(0x0018, 0x603a)); public_tags.emplace("DopplerSampleVolumeYPosition", Tag(0x0018, 0x603b)); public_tags.emplace("TMLinePositionX0Retired", Tag(0x0018, 0x603c)); public_tags.emplace("TMLinePositionX0", Tag(0x0018, 0x603d)); public_tags.emplace("TMLinePositionY0Retired", Tag(0x0018, 0x603e)); public_tags.emplace("TMLinePositionY0", Tag(0x0018, 0x603f)); public_tags.emplace("TMLinePositionX1Retired", Tag(0x0018, 0x6040)); public_tags.emplace("TMLinePositionX1", Tag(0x0018, 0x6041)); public_tags.emplace("TMLinePositionY1Retired", Tag(0x0018, 0x6042)); public_tags.emplace("TMLinePositionY1", Tag(0x0018, 0x6043)); public_tags.emplace("PixelComponentOrganization", Tag(0x0018, 0x6044)); public_tags.emplace("PixelComponentMask", Tag(0x0018, 0x6046)); public_tags.emplace("PixelComponentRangeStart", Tag(0x0018, 0x6048)); public_tags.emplace("PixelComponentRangeStop", Tag(0x0018, 0x604a)); public_tags.emplace("PixelComponentPhysicalUnits", Tag(0x0018, 0x604c)); public_tags.emplace("PixelComponentDataType", Tag(0x0018, 0x604e)); public_tags.emplace("NumberOfTableBreakPoints", Tag(0x0018, 0x6050)); public_tags.emplace("TableOfXBreakPoints", Tag(0x0018, 0x6052)); public_tags.emplace("TableOfYBreakPoints", Tag(0x0018, 0x6054)); public_tags.emplace("NumberOfTableEntries", Tag(0x0018, 0x6056)); public_tags.emplace("TableOfPixelValues", Tag(0x0018, 0x6058)); public_tags.emplace("TableOfParameterValues", Tag(0x0018, 0x605a)); public_tags.emplace("RWaveTimeVector", Tag(0x0018, 0x6060)); public_tags.emplace("DetectorConditionsNominalFlag", Tag(0x0018, 0x7000)); public_tags.emplace("DetectorTemperature", Tag(0x0018, 0x7001)); public_tags.emplace("DetectorType", Tag(0x0018, 0x7004)); public_tags.emplace("DetectorConfiguration", Tag(0x0018, 0x7005)); public_tags.emplace("DetectorDescription", Tag(0x0018, 0x7006)); public_tags.emplace("DetectorMode", Tag(0x0018, 0x7008)); public_tags.emplace("DetectorID", Tag(0x0018, 0x700a)); public_tags.emplace("DateOfLastDetectorCalibration", Tag(0x0018, 0x700c)); public_tags.emplace("TimeOfLastDetectorCalibration", Tag(0x0018, 0x700e)); public_tags.emplace("ExposuresOnDetectorSinceLastCalibration", Tag(0x0018, 0x7010)); public_tags.emplace("ExposuresOnDetectorSinceManufactured", Tag(0x0018, 0x7011)); public_tags.emplace("DetectorTimeSinceLastExposure", Tag(0x0018, 0x7012)); public_tags.emplace("DetectorActiveTime", Tag(0x0018, 0x7014)); public_tags.emplace("DetectorActivationOffsetFromExposure", Tag(0x0018, 0x7016)); public_tags.emplace("DetectorBinning", Tag(0x0018, 0x701a)); public_tags.emplace("DetectorElementPhysicalSize", Tag(0x0018, 0x7020)); public_tags.emplace("DetectorElementSpacing", Tag(0x0018, 0x7022)); public_tags.emplace("DetectorActiveShape", Tag(0x0018, 0x7024)); public_tags.emplace("DetectorActiveDimensions", Tag(0x0018, 0x7026)); public_tags.emplace("DetectorActiveOrigin", Tag(0x0018, 0x7028)); public_tags.emplace("DetectorManufacturerName", Tag(0x0018, 0x702a)); public_tags.emplace("DetectorManufacturerModelName", Tag(0x0018, 0x702b)); public_tags.emplace("FieldOfViewOrigin", Tag(0x0018, 0x7030)); public_tags.emplace("FieldOfViewRotation", Tag(0x0018, 0x7032)); public_tags.emplace("FieldOfViewHorizontalFlip", Tag(0x0018, 0x7034)); public_tags.emplace("PixelDataAreaOriginRelativeToFOV", Tag(0x0018, 0x7036)); public_tags.emplace("PixelDataAreaRotationAngleRelativeToFOV", Tag(0x0018, 0x7038)); public_tags.emplace("GridAbsorbingMaterial", Tag(0x0018, 0x7040)); public_tags.emplace("GridSpacingMaterial", Tag(0x0018, 0x7041)); public_tags.emplace("GridThickness", Tag(0x0018, 0x7042)); public_tags.emplace("GridPitch", Tag(0x0018, 0x7044)); public_tags.emplace("GridAspectRatio", Tag(0x0018, 0x7046)); public_tags.emplace("GridPeriod", Tag(0x0018, 0x7048)); public_tags.emplace("GridFocalDistance", Tag(0x0018, 0x704c)); public_tags.emplace("FilterMaterial", Tag(0x0018, 0x7050)); public_tags.emplace("FilterThicknessMinimum", Tag(0x0018, 0x7052)); public_tags.emplace("FilterThicknessMaximum", Tag(0x0018, 0x7054)); public_tags.emplace("FilterBeamPathLengthMinimum", Tag(0x0018, 0x7056)); public_tags.emplace("FilterBeamPathLengthMaximum", Tag(0x0018, 0x7058)); public_tags.emplace("ExposureControlMode", Tag(0x0018, 0x7060)); public_tags.emplace("ExposureControlModeDescription", Tag(0x0018, 0x7062)); public_tags.emplace("ExposureStatus", Tag(0x0018, 0x7064)); public_tags.emplace("PhototimerSetting", Tag(0x0018, 0x7065)); public_tags.emplace("ExposureTimeInuS", Tag(0x0018, 0x8150)); public_tags.emplace("XRayTubeCurrentInuA", Tag(0x0018, 0x8151)); public_tags.emplace("ContentQualification", Tag(0x0018, 0x9004)); public_tags.emplace("PulseSequenceName", Tag(0x0018, 0x9005)); public_tags.emplace("MRImagingModifierSequence", Tag(0x0018, 0x9006)); public_tags.emplace("EchoPulseSequence", Tag(0x0018, 0x9008)); public_tags.emplace("InversionRecovery", Tag(0x0018, 0x9009)); public_tags.emplace("FlowCompensation", Tag(0x0018, 0x9010)); public_tags.emplace("MultipleSpinEcho", Tag(0x0018, 0x9011)); public_tags.emplace("MultiPlanarExcitation", Tag(0x0018, 0x9012)); public_tags.emplace("PhaseContrast", Tag(0x0018, 0x9014)); public_tags.emplace("TimeOfFlightContrast", Tag(0x0018, 0x9015)); public_tags.emplace("Spoiling", Tag(0x0018, 0x9016)); public_tags.emplace("SteadyStatePulseSequence", Tag(0x0018, 0x9017)); public_tags.emplace("EchoPlanarPulseSequence", Tag(0x0018, 0x9018)); public_tags.emplace("TagAngleFirstAxis", Tag(0x0018, 0x9019)); public_tags.emplace("MagnetizationTransfer", Tag(0x0018, 0x9020)); public_tags.emplace("T2Preparation", Tag(0x0018, 0x9021)); public_tags.emplace("BloodSignalNulling", Tag(0x0018, 0x9022)); public_tags.emplace("SaturationRecovery", Tag(0x0018, 0x9024)); public_tags.emplace("SpectrallySelectedSuppression", Tag(0x0018, 0x9025)); public_tags.emplace("SpectrallySelectedExcitation", Tag(0x0018, 0x9026)); public_tags.emplace("SpatialPresaturation", Tag(0x0018, 0x9027)); public_tags.emplace("Tagging", Tag(0x0018, 0x9028)); public_tags.emplace("OversamplingPhase", Tag(0x0018, 0x9029)); public_tags.emplace("TagSpacingFirstDimension", Tag(0x0018, 0x9030)); public_tags.emplace("GeometryOfKSpaceTraversal", Tag(0x0018, 0x9032)); public_tags.emplace("SegmentedKSpaceTraversal", Tag(0x0018, 0x9033)); public_tags.emplace("RectilinearPhaseEncodeReordering", Tag(0x0018, 0x9034)); public_tags.emplace("TagThickness", Tag(0x0018, 0x9035)); public_tags.emplace("PartialFourierDirection", Tag(0x0018, 0x9036)); public_tags.emplace("CardiacSynchronizationTechnique", Tag(0x0018, 0x9037)); public_tags.emplace("ReceiveCoilManufacturerName", Tag(0x0018, 0x9041)); public_tags.emplace("MRReceiveCoilSequence", Tag(0x0018, 0x9042)); public_tags.emplace("ReceiveCoilType", Tag(0x0018, 0x9043)); public_tags.emplace("QuadratureReceiveCoil", Tag(0x0018, 0x9044)); public_tags.emplace("MultiCoilDefinitionSequence", Tag(0x0018, 0x9045)); public_tags.emplace("MultiCoilConfiguration", Tag(0x0018, 0x9046)); public_tags.emplace("MultiCoilElementName", Tag(0x0018, 0x9047)); public_tags.emplace("MultiCoilElementUsed", Tag(0x0018, 0x9048)); public_tags.emplace("MRTransmitCoilSequence", Tag(0x0018, 0x9049)); public_tags.emplace("TransmitCoilManufacturerName", Tag(0x0018, 0x9050)); public_tags.emplace("TransmitCoilType", Tag(0x0018, 0x9051)); public_tags.emplace("SpectralWidth", Tag(0x0018, 0x9052)); public_tags.emplace("ChemicalShiftReference", Tag(0x0018, 0x9053)); public_tags.emplace("VolumeLocalizationTechnique", Tag(0x0018, 0x9054)); public_tags.emplace("MRAcquisitionFrequencyEncodingSteps", Tag(0x0018, 0x9058)); public_tags.emplace("Decoupling", Tag(0x0018, 0x9059)); public_tags.emplace("DecoupledNucleus", Tag(0x0018, 0x9060)); public_tags.emplace("DecouplingFrequency", Tag(0x0018, 0x9061)); public_tags.emplace("DecouplingMethod", Tag(0x0018, 0x9062)); public_tags.emplace("DecouplingChemicalShiftReference", Tag(0x0018, 0x9063)); public_tags.emplace("KSpaceFiltering", Tag(0x0018, 0x9064)); public_tags.emplace("TimeDomainFiltering", Tag(0x0018, 0x9065)); public_tags.emplace("NumberOfZeroFills", Tag(0x0018, 0x9066)); public_tags.emplace("BaselineCorrection", Tag(0x0018, 0x9067)); public_tags.emplace("ParallelReductionFactorInPlane", Tag(0x0018, 0x9069)); public_tags.emplace("CardiacRRIntervalSpecified", Tag(0x0018, 0x9070)); public_tags.emplace("AcquisitionDuration", Tag(0x0018, 0x9073)); public_tags.emplace("FrameAcquisitionDateTime", Tag(0x0018, 0x9074)); public_tags.emplace("DiffusionDirectionality", Tag(0x0018, 0x9075)); public_tags.emplace("DiffusionGradientDirectionSequence", Tag(0x0018, 0x9076)); public_tags.emplace("ParallelAcquisition", Tag(0x0018, 0x9077)); public_tags.emplace("ParallelAcquisitionTechnique", Tag(0x0018, 0x9078)); public_tags.emplace("InversionTimes", Tag(0x0018, 0x9079)); public_tags.emplace("MetaboliteMapDescription", Tag(0x0018, 0x9080)); public_tags.emplace("PartialFourier", Tag(0x0018, 0x9081)); public_tags.emplace("EffectiveEchoTime", Tag(0x0018, 0x9082)); public_tags.emplace("MetaboliteMapCodeSequence", Tag(0x0018, 0x9083)); public_tags.emplace("ChemicalShiftSequence", Tag(0x0018, 0x9084)); public_tags.emplace("CardiacSignalSource", Tag(0x0018, 0x9085)); public_tags.emplace("DiffusionBValue", Tag(0x0018, 0x9087)); public_tags.emplace("DiffusionGradientOrientation", Tag(0x0018, 0x9089)); public_tags.emplace("VelocityEncodingDirection", Tag(0x0018, 0x9090)); public_tags.emplace("VelocityEncodingMinimumValue", Tag(0x0018, 0x9091)); public_tags.emplace("VelocityEncodingAcquisitionSequence", Tag(0x0018, 0x9092)); public_tags.emplace("NumberOfKSpaceTrajectories", Tag(0x0018, 0x9093)); public_tags.emplace("CoverageOfKSpace", Tag(0x0018, 0x9094)); public_tags.emplace("SpectroscopyAcquisitionPhaseRows", Tag(0x0018, 0x9095)); public_tags.emplace("ParallelReductionFactorInPlaneRetired", Tag(0x0018, 0x9096)); public_tags.emplace("TransmitterFrequency", Tag(0x0018, 0x9098)); public_tags.emplace("ResonantNucleus", Tag(0x0018, 0x9100)); public_tags.emplace("FrequencyCorrection", Tag(0x0018, 0x9101)); public_tags.emplace("MRSpectroscopyFOVGeometrySequence", Tag(0x0018, 0x9103)); public_tags.emplace("SlabThickness", Tag(0x0018, 0x9104)); public_tags.emplace("SlabOrientation", Tag(0x0018, 0x9105)); public_tags.emplace("MidSlabPosition", Tag(0x0018, 0x9106)); public_tags.emplace("MRSpatialSaturationSequence", Tag(0x0018, 0x9107)); public_tags.emplace("MRTimingAndRelatedParametersSequence", Tag(0x0018, 0x9112)); public_tags.emplace("MREchoSequence", Tag(0x0018, 0x9114)); public_tags.emplace("MRModifierSequence", Tag(0x0018, 0x9115)); public_tags.emplace("MRDiffusionSequence", Tag(0x0018, 0x9117)); public_tags.emplace("CardiacSynchronizationSequence", Tag(0x0018, 0x9118)); public_tags.emplace("MRAveragesSequence", Tag(0x0018, 0x9119)); public_tags.emplace("MRFOVGeometrySequence", Tag(0x0018, 0x9125)); public_tags.emplace("VolumeLocalizationSequence", Tag(0x0018, 0x9126)); public_tags.emplace("SpectroscopyAcquisitionDataColumns", Tag(0x0018, 0x9127)); public_tags.emplace("DiffusionAnisotropyType", Tag(0x0018, 0x9147)); public_tags.emplace("FrameReferenceDateTime", Tag(0x0018, 0x9151)); public_tags.emplace("MRMetaboliteMapSequence", Tag(0x0018, 0x9152)); public_tags.emplace("ParallelReductionFactorOutOfPlane", Tag(0x0018, 0x9155)); public_tags.emplace("SpectroscopyAcquisitionOutOfPlanePhaseSteps", Tag(0x0018, 0x9159)); public_tags.emplace("BulkMotionStatus", Tag(0x0018, 0x9166)); public_tags.emplace("ParallelReductionFactorSecondInPlane", Tag(0x0018, 0x9168)); public_tags.emplace("CardiacBeatRejectionTechnique", Tag(0x0018, 0x9169)); public_tags.emplace("RespiratoryMotionCompensationTechnique", Tag(0x0018, 0x9170)); public_tags.emplace("RespiratorySignalSource", Tag(0x0018, 0x9171)); public_tags.emplace("BulkMotionCompensationTechnique", Tag(0x0018, 0x9172)); public_tags.emplace("BulkMotionSignalSource", Tag(0x0018, 0x9173)); public_tags.emplace("ApplicableSafetyStandardAgency", Tag(0x0018, 0x9174)); public_tags.emplace("ApplicableSafetyStandardDescription", Tag(0x0018, 0x9175)); public_tags.emplace("OperatingModeSequence", Tag(0x0018, 0x9176)); public_tags.emplace("OperatingModeType", Tag(0x0018, 0x9177)); public_tags.emplace("OperatingMode", Tag(0x0018, 0x9178)); public_tags.emplace("SpecificAbsorptionRateDefinition", Tag(0x0018, 0x9179)); public_tags.emplace("GradientOutputType", Tag(0x0018, 0x9180)); public_tags.emplace("SpecificAbsorptionRateValue", Tag(0x0018, 0x9181)); public_tags.emplace("GradientOutput", Tag(0x0018, 0x9182)); public_tags.emplace("FlowCompensationDirection", Tag(0x0018, 0x9183)); public_tags.emplace("TaggingDelay", Tag(0x0018, 0x9184)); public_tags.emplace("RespiratoryMotionCompensationTechniqueDescription", Tag(0x0018, 0x9185)); public_tags.emplace("RespiratorySignalSourceID", Tag(0x0018, 0x9186)); public_tags.emplace("ChemicalShiftMinimumIntegrationLimitInHz", Tag(0x0018, 0x9195)); public_tags.emplace("ChemicalShiftMaximumIntegrationLimitInHz", Tag(0x0018, 0x9196)); public_tags.emplace("MRVelocityEncodingSequence", Tag(0x0018, 0x9197)); public_tags.emplace("FirstOrderPhaseCorrection", Tag(0x0018, 0x9198)); public_tags.emplace("WaterReferencedPhaseCorrection", Tag(0x0018, 0x9199)); public_tags.emplace("MRSpectroscopyAcquisitionType", Tag(0x0018, 0x9200)); public_tags.emplace("RespiratoryCyclePosition", Tag(0x0018, 0x9214)); public_tags.emplace("VelocityEncodingMaximumValue", Tag(0x0018, 0x9217)); public_tags.emplace("TagSpacingSecondDimension", Tag(0x0018, 0x9218)); public_tags.emplace("TagAngleSecondAxis", Tag(0x0018, 0x9219)); public_tags.emplace("FrameAcquisitionDuration", Tag(0x0018, 0x9220)); public_tags.emplace("MRImageFrameTypeSequence", Tag(0x0018, 0x9226)); public_tags.emplace("MRSpectroscopyFrameTypeSequence", Tag(0x0018, 0x9227)); public_tags.emplace("MRAcquisitionPhaseEncodingStepsInPlane", Tag(0x0018, 0x9231)); public_tags.emplace("MRAcquisitionPhaseEncodingStepsOutOfPlane", Tag(0x0018, 0x9232)); public_tags.emplace("SpectroscopyAcquisitionPhaseColumns", Tag(0x0018, 0x9234)); public_tags.emplace("CardiacCyclePosition", Tag(0x0018, 0x9236)); public_tags.emplace("SpecificAbsorptionRateSequence", Tag(0x0018, 0x9239)); public_tags.emplace("RFEchoTrainLength", Tag(0x0018, 0x9240)); public_tags.emplace("GradientEchoTrainLength", Tag(0x0018, 0x9241)); public_tags.emplace("ArterialSpinLabelingContrast", Tag(0x0018, 0x9250)); public_tags.emplace("MRArterialSpinLabelingSequence", Tag(0x0018, 0x9251)); public_tags.emplace("ASLTechniqueDescription", Tag(0x0018, 0x9252)); public_tags.emplace("ASLSlabNumber", Tag(0x0018, 0x9253)); public_tags.emplace("ASLSlabThickness", Tag(0x0018, 0x9254)); public_tags.emplace("ASLSlabOrientation", Tag(0x0018, 0x9255)); public_tags.emplace("ASLMidSlabPosition", Tag(0x0018, 0x9256)); public_tags.emplace("ASLContext", Tag(0x0018, 0x9257)); public_tags.emplace("ASLPulseTrainDuration", Tag(0x0018, 0x9258)); public_tags.emplace("ASLCrusherFlag", Tag(0x0018, 0x9259)); public_tags.emplace("ASLCrusherFlowLimit", Tag(0x0018, 0x925a)); public_tags.emplace("ASLCrusherDescription", Tag(0x0018, 0x925b)); public_tags.emplace("ASLBolusCutoffFlag", Tag(0x0018, 0x925c)); public_tags.emplace("ASLBolusCutoffTimingSequence", Tag(0x0018, 0x925d)); public_tags.emplace("ASLBolusCutoffTechnique", Tag(0x0018, 0x925e)); public_tags.emplace("ASLBolusCutoffDelayTime", Tag(0x0018, 0x925f)); public_tags.emplace("ASLSlabSequence", Tag(0x0018, 0x9260)); public_tags.emplace("ChemicalShiftMinimumIntegrationLimitInppm", Tag(0x0018, 0x9295)); public_tags.emplace("ChemicalShiftMaximumIntegrationLimitInppm", Tag(0x0018, 0x9296)); public_tags.emplace("WaterReferenceAcquisition", Tag(0x0018, 0x9297)); public_tags.emplace("EchoPeakPosition", Tag(0x0018, 0x9298)); public_tags.emplace("CTAcquisitionTypeSequence", Tag(0x0018, 0x9301)); public_tags.emplace("AcquisitionType", Tag(0x0018, 0x9302)); public_tags.emplace("TubeAngle", Tag(0x0018, 0x9303)); public_tags.emplace("CTAcquisitionDetailsSequence", Tag(0x0018, 0x9304)); public_tags.emplace("RevolutionTime", Tag(0x0018, 0x9305)); public_tags.emplace("SingleCollimationWidth", Tag(0x0018, 0x9306)); public_tags.emplace("TotalCollimationWidth", Tag(0x0018, 0x9307)); public_tags.emplace("CTTableDynamicsSequence", Tag(0x0018, 0x9308)); public_tags.emplace("TableSpeed", Tag(0x0018, 0x9309)); public_tags.emplace("TableFeedPerRotation", Tag(0x0018, 0x9310)); public_tags.emplace("SpiralPitchFactor", Tag(0x0018, 0x9311)); public_tags.emplace("CTGeometrySequence", Tag(0x0018, 0x9312)); public_tags.emplace("DataCollectionCenterPatient", Tag(0x0018, 0x9313)); public_tags.emplace("CTReconstructionSequence", Tag(0x0018, 0x9314)); public_tags.emplace("ReconstructionAlgorithm", Tag(0x0018, 0x9315)); public_tags.emplace("ConvolutionKernelGroup", Tag(0x0018, 0x9316)); public_tags.emplace("ReconstructionFieldOfView", Tag(0x0018, 0x9317)); public_tags.emplace("ReconstructionTargetCenterPatient", Tag(0x0018, 0x9318)); public_tags.emplace("ReconstructionAngle", Tag(0x0018, 0x9319)); public_tags.emplace("ImageFilter", Tag(0x0018, 0x9320)); public_tags.emplace("CTExposureSequence", Tag(0x0018, 0x9321)); public_tags.emplace("ReconstructionPixelSpacing", Tag(0x0018, 0x9322)); public_tags.emplace("ExposureModulationType", Tag(0x0018, 0x9323)); public_tags.emplace("EstimatedDoseSaving", Tag(0x0018, 0x9324)); public_tags.emplace("CTXRayDetailsSequence", Tag(0x0018, 0x9325)); public_tags.emplace("CTPositionSequence", Tag(0x0018, 0x9326)); public_tags.emplace("TablePosition", Tag(0x0018, 0x9327)); public_tags.emplace("ExposureTimeInms", Tag(0x0018, 0x9328)); public_tags.emplace("CTImageFrameTypeSequence", Tag(0x0018, 0x9329)); public_tags.emplace("XRayTubeCurrentInmA", Tag(0x0018, 0x9330)); public_tags.emplace("ExposureInmAs", Tag(0x0018, 0x9332)); public_tags.emplace("ConstantVolumeFlag", Tag(0x0018, 0x9333)); public_tags.emplace("FluoroscopyFlag", Tag(0x0018, 0x9334)); public_tags.emplace("DistanceSourceToDataCollectionCenter", Tag(0x0018, 0x9335)); public_tags.emplace("ContrastBolusAgentNumber", Tag(0x0018, 0x9337)); public_tags.emplace("ContrastBolusIngredientCodeSequence", Tag(0x0018, 0x9338)); public_tags.emplace("ContrastAdministrationProfileSequence", Tag(0x0018, 0x9340)); public_tags.emplace("ContrastBolusUsageSequence", Tag(0x0018, 0x9341)); public_tags.emplace("ContrastBolusAgentAdministered", Tag(0x0018, 0x9342)); public_tags.emplace("ContrastBolusAgentDetected", Tag(0x0018, 0x9343)); public_tags.emplace("ContrastBolusAgentPhase", Tag(0x0018, 0x9344)); public_tags.emplace("CTDIvol", Tag(0x0018, 0x9345)); public_tags.emplace("CTDIPhantomTypeCodeSequence", Tag(0x0018, 0x9346)); public_tags.emplace("CalciumScoringMassFactorPatient", Tag(0x0018, 0x9351)); public_tags.emplace("CalciumScoringMassFactorDevice", Tag(0x0018, 0x9352)); public_tags.emplace("EnergyWeightingFactor", Tag(0x0018, 0x9353)); public_tags.emplace("CTAdditionalXRaySourceSequence", Tag(0x0018, 0x9360)); public_tags.emplace("MultienergyCTAcquisition", Tag(0x0018, 0x9361)); public_tags.emplace("MultienergyCTAcquisitionSequence", Tag(0x0018, 0x9362)); public_tags.emplace("MultienergyCTProcessingSequence", Tag(0x0018, 0x9363)); public_tags.emplace("MultienergyCTCharacteristicsSequence", Tag(0x0018, 0x9364)); public_tags.emplace("MultienergyCTXRaySourceSequence", Tag(0x0018, 0x9365)); public_tags.emplace("XRaySourceIndex", Tag(0x0018, 0x9366)); public_tags.emplace("XRaySourceID", Tag(0x0018, 0x9367)); public_tags.emplace("MultienergySourceTechnique", Tag(0x0018, 0x9368)); public_tags.emplace("SourceStartDateTime", Tag(0x0018, 0x9369)); public_tags.emplace("SourceEndDateTime", Tag(0x0018, 0x936a)); public_tags.emplace("SwitchingPhaseNumber", Tag(0x0018, 0x936b)); public_tags.emplace("SwitchingPhaseNominalDuration", Tag(0x0018, 0x936c)); public_tags.emplace("SwitchingPhaseTransitionDuration", Tag(0x0018, 0x936d)); public_tags.emplace("EffectiveBinEnergy", Tag(0x0018, 0x936e)); public_tags.emplace("MultienergyCTXRayDetectorSequence", Tag(0x0018, 0x936f)); public_tags.emplace("XRayDetectorIndex", Tag(0x0018, 0x9370)); public_tags.emplace("XRayDetectorID", Tag(0x0018, 0x9371)); public_tags.emplace("MultienergyDetectorType", Tag(0x0018, 0x9372)); public_tags.emplace("XRayDetectorLabel", Tag(0x0018, 0x9373)); public_tags.emplace("NominalMaxEnergy", Tag(0x0018, 0x9374)); public_tags.emplace("NominalMinEnergy", Tag(0x0018, 0x9375)); public_tags.emplace("ReferencedXRayDetectorIndex", Tag(0x0018, 0x9376)); public_tags.emplace("ReferencedXRaySourceIndex", Tag(0x0018, 0x9377)); public_tags.emplace("ReferencedPathIndex", Tag(0x0018, 0x9378)); public_tags.emplace("MultienergyCTPathSequence", Tag(0x0018, 0x9379)); public_tags.emplace("MultienergyCTPathIndex", Tag(0x0018, 0x937a)); public_tags.emplace("MultienergyAcquisitionDescription", Tag(0x0018, 0x937b)); public_tags.emplace("MonoenergeticEnergyEquivalent", Tag(0x0018, 0x937c)); public_tags.emplace("MaterialCodeSequence", Tag(0x0018, 0x937d)); public_tags.emplace("DecompositionMethod", Tag(0x0018, 0x937e)); public_tags.emplace("DecompositionDescription", Tag(0x0018, 0x937f)); public_tags.emplace("DecompositionAlgorithmIdentificationSequence", Tag(0x0018, 0x9380)); public_tags.emplace("DecompositionMaterialSequence", Tag(0x0018, 0x9381)); public_tags.emplace("MaterialAttenuationSequence", Tag(0x0018, 0x9382)); public_tags.emplace("PhotonEnergy", Tag(0x0018, 0x9383)); public_tags.emplace("XRayMassAttenuationCoefficient", Tag(0x0018, 0x9384)); public_tags.emplace("ProjectionPixelCalibrationSequence", Tag(0x0018, 0x9401)); public_tags.emplace("DistanceSourceToIsocenter", Tag(0x0018, 0x9402)); public_tags.emplace("DistanceObjectToTableTop", Tag(0x0018, 0x9403)); public_tags.emplace("ObjectPixelSpacingInCenterOfBeam", Tag(0x0018, 0x9404)); public_tags.emplace("PositionerPositionSequence", Tag(0x0018, 0x9405)); public_tags.emplace("TablePositionSequence", Tag(0x0018, 0x9406)); public_tags.emplace("CollimatorShapeSequence", Tag(0x0018, 0x9407)); public_tags.emplace("PlanesInAcquisition", Tag(0x0018, 0x9410)); public_tags.emplace("XAXRFFrameCharacteristicsSequence", Tag(0x0018, 0x9412)); public_tags.emplace("FrameAcquisitionSequence", Tag(0x0018, 0x9417)); public_tags.emplace("XRayReceptorType", Tag(0x0018, 0x9420)); public_tags.emplace("AcquisitionProtocolName", Tag(0x0018, 0x9423)); public_tags.emplace("AcquisitionProtocolDescription", Tag(0x0018, 0x9424)); public_tags.emplace("ContrastBolusIngredientOpaque", Tag(0x0018, 0x9425)); public_tags.emplace("DistanceReceptorPlaneToDetectorHousing", Tag(0x0018, 0x9426)); public_tags.emplace("IntensifierActiveShape", Tag(0x0018, 0x9427)); public_tags.emplace("IntensifierActiveDimensions", Tag(0x0018, 0x9428)); public_tags.emplace("PhysicalDetectorSize", Tag(0x0018, 0x9429)); public_tags.emplace("PositionOfIsocenterProjection", Tag(0x0018, 0x9430)); public_tags.emplace("FieldOfViewSequence", Tag(0x0018, 0x9432)); public_tags.emplace("FieldOfViewDescription", Tag(0x0018, 0x9433)); public_tags.emplace("ExposureControlSensingRegionsSequence", Tag(0x0018, 0x9434)); public_tags.emplace("ExposureControlSensingRegionShape", Tag(0x0018, 0x9435)); public_tags.emplace("ExposureControlSensingRegionLeftVerticalEdge", Tag(0x0018, 0x9436)); public_tags.emplace("ExposureControlSensingRegionRightVerticalEdge", Tag(0x0018, 0x9437)); public_tags.emplace("ExposureControlSensingRegionUpperHorizontalEdge", Tag(0x0018, 0x9438)); public_tags.emplace("ExposureControlSensingRegionLowerHorizontalEdge", Tag(0x0018, 0x9439)); public_tags.emplace("CenterOfCircularExposureControlSensingRegion", Tag(0x0018, 0x9440)); public_tags.emplace("RadiusOfCircularExposureControlSensingRegion", Tag(0x0018, 0x9441)); public_tags.emplace("VerticesOfThePolygonalExposureControlSensingRegion", Tag(0x0018, 0x9442)); public_tags.emplace("ColumnAngulationPatient", Tag(0x0018, 0x9447)); public_tags.emplace("BeamAngle", Tag(0x0018, 0x9449)); public_tags.emplace("FrameDetectorParametersSequence", Tag(0x0018, 0x9451)); public_tags.emplace("CalculatedAnatomyThickness", Tag(0x0018, 0x9452)); public_tags.emplace("CalibrationSequence", Tag(0x0018, 0x9455)); public_tags.emplace("ObjectThicknessSequence", Tag(0x0018, 0x9456)); public_tags.emplace("PlaneIdentification", Tag(0x0018, 0x9457)); public_tags.emplace("FieldOfViewDimensionsInFloat", Tag(0x0018, 0x9461)); public_tags.emplace("IsocenterReferenceSystemSequence", Tag(0x0018, 0x9462)); public_tags.emplace("PositionerIsocenterPrimaryAngle", Tag(0x0018, 0x9463)); public_tags.emplace("PositionerIsocenterSecondaryAngle", Tag(0x0018, 0x9464)); public_tags.emplace("PositionerIsocenterDetectorRotationAngle", Tag(0x0018, 0x9465)); public_tags.emplace("TableXPositionToIsocenter", Tag(0x0018, 0x9466)); public_tags.emplace("TableYPositionToIsocenter", Tag(0x0018, 0x9467)); public_tags.emplace("TableZPositionToIsocenter", Tag(0x0018, 0x9468)); public_tags.emplace("TableHorizontalRotationAngle", Tag(0x0018, 0x9469)); public_tags.emplace("TableHeadTiltAngle", Tag(0x0018, 0x9470)); public_tags.emplace("TableCradleTiltAngle", Tag(0x0018, 0x9471)); public_tags.emplace("FrameDisplayShutterSequence", Tag(0x0018, 0x9472)); public_tags.emplace("AcquiredImageAreaDoseProduct", Tag(0x0018, 0x9473)); public_tags.emplace("CArmPositionerTabletopRelationship", Tag(0x0018, 0x9474)); public_tags.emplace("XRayGeometrySequence", Tag(0x0018, 0x9476)); public_tags.emplace("IrradiationEventIdentificationSequence", Tag(0x0018, 0x9477)); public_tags.emplace("XRay3DFrameTypeSequence", Tag(0x0018, 0x9504)); public_tags.emplace("ContributingSourcesSequence", Tag(0x0018, 0x9506)); public_tags.emplace("XRay3DAcquisitionSequence", Tag(0x0018, 0x9507)); public_tags.emplace("PrimaryPositionerScanArc", Tag(0x0018, 0x9508)); public_tags.emplace("SecondaryPositionerScanArc", Tag(0x0018, 0x9509)); public_tags.emplace("PrimaryPositionerScanStartAngle", Tag(0x0018, 0x9510)); public_tags.emplace("SecondaryPositionerScanStartAngle", Tag(0x0018, 0x9511)); public_tags.emplace("PrimaryPositionerIncrement", Tag(0x0018, 0x9514)); public_tags.emplace("SecondaryPositionerIncrement", Tag(0x0018, 0x9515)); public_tags.emplace("StartAcquisitionDateTime", Tag(0x0018, 0x9516)); public_tags.emplace("EndAcquisitionDateTime", Tag(0x0018, 0x9517)); public_tags.emplace("PrimaryPositionerIncrementSign", Tag(0x0018, 0x9518)); public_tags.emplace("SecondaryPositionerIncrementSign", Tag(0x0018, 0x9519)); public_tags.emplace("ApplicationName", Tag(0x0018, 0x9524)); public_tags.emplace("ApplicationVersion", Tag(0x0018, 0x9525)); public_tags.emplace("ApplicationManufacturer", Tag(0x0018, 0x9526)); public_tags.emplace("AlgorithmType", Tag(0x0018, 0x9527)); public_tags.emplace("AlgorithmDescription", Tag(0x0018, 0x9528)); public_tags.emplace("XRay3DReconstructionSequence", Tag(0x0018, 0x9530)); public_tags.emplace("ReconstructionDescription", Tag(0x0018, 0x9531)); public_tags.emplace("PerProjectionAcquisitionSequence", Tag(0x0018, 0x9538)); public_tags.emplace("DetectorPositionSequence", Tag(0x0018, 0x9541)); public_tags.emplace("XRayAcquisitionDoseSequence", Tag(0x0018, 0x9542)); public_tags.emplace("XRaySourceIsocenterPrimaryAngle", Tag(0x0018, 0x9543)); public_tags.emplace("XRaySourceIsocenterSecondaryAngle", Tag(0x0018, 0x9544)); public_tags.emplace("BreastSupportIsocenterPrimaryAngle", Tag(0x0018, 0x9545)); public_tags.emplace("BreastSupportIsocenterSecondaryAngle", Tag(0x0018, 0x9546)); public_tags.emplace("BreastSupportXPositionToIsocenter", Tag(0x0018, 0x9547)); public_tags.emplace("BreastSupportYPositionToIsocenter", Tag(0x0018, 0x9548)); public_tags.emplace("BreastSupportZPositionToIsocenter", Tag(0x0018, 0x9549)); public_tags.emplace("DetectorIsocenterPrimaryAngle", Tag(0x0018, 0x9550)); public_tags.emplace("DetectorIsocenterSecondaryAngle", Tag(0x0018, 0x9551)); public_tags.emplace("DetectorXPositionToIsocenter", Tag(0x0018, 0x9552)); public_tags.emplace("DetectorYPositionToIsocenter", Tag(0x0018, 0x9553)); public_tags.emplace("DetectorZPositionToIsocenter", Tag(0x0018, 0x9554)); public_tags.emplace("XRayGridSequence", Tag(0x0018, 0x9555)); public_tags.emplace("XRayFilterSequence", Tag(0x0018, 0x9556)); public_tags.emplace("DetectorActiveAreaTLHCPosition", Tag(0x0018, 0x9557)); public_tags.emplace("DetectorActiveAreaOrientation", Tag(0x0018, 0x9558)); public_tags.emplace("PositionerPrimaryAngleDirection", Tag(0x0018, 0x9559)); public_tags.emplace("DiffusionBMatrixSequence", Tag(0x0018, 0x9601)); public_tags.emplace("DiffusionBValueXX", Tag(0x0018, 0x9602)); public_tags.emplace("DiffusionBValueXY", Tag(0x0018, 0x9603)); public_tags.emplace("DiffusionBValueXZ", Tag(0x0018, 0x9604)); public_tags.emplace("DiffusionBValueYY", Tag(0x0018, 0x9605)); public_tags.emplace("DiffusionBValueYZ", Tag(0x0018, 0x9606)); public_tags.emplace("DiffusionBValueZZ", Tag(0x0018, 0x9607)); public_tags.emplace("FunctionalMRSequence", Tag(0x0018, 0x9621)); public_tags.emplace("FunctionalSettlingPhaseFramesPresent", Tag(0x0018, 0x9622)); public_tags.emplace("FunctionalSyncPulse", Tag(0x0018, 0x9623)); public_tags.emplace("SettlingPhaseFrame", Tag(0x0018, 0x9624)); public_tags.emplace("DecayCorrectionDateTime", Tag(0x0018, 0x9701)); public_tags.emplace("StartDensityThreshold", Tag(0x0018, 0x9715)); public_tags.emplace("StartRelativeDensityDifferenceThreshold", Tag(0x0018, 0x9716)); public_tags.emplace("StartCardiacTriggerCountThreshold", Tag(0x0018, 0x9717)); public_tags.emplace("StartRespiratoryTriggerCountThreshold", Tag(0x0018, 0x9718)); public_tags.emplace("TerminationCountsThreshold", Tag(0x0018, 0x9719)); public_tags.emplace("TerminationDensityThreshold", Tag(0x0018, 0x9720)); public_tags.emplace("TerminationRelativeDensityThreshold", Tag(0x0018, 0x9721)); public_tags.emplace("TerminationTimeThreshold", Tag(0x0018, 0x9722)); public_tags.emplace("TerminationCardiacTriggerCountThreshold", Tag(0x0018, 0x9723)); public_tags.emplace("TerminationRespiratoryTriggerCountThreshold", Tag(0x0018, 0x9724)); public_tags.emplace("DetectorGeometry", Tag(0x0018, 0x9725)); public_tags.emplace("TransverseDetectorSeparation", Tag(0x0018, 0x9726)); public_tags.emplace("AxialDetectorDimension", Tag(0x0018, 0x9727)); public_tags.emplace("RadiopharmaceuticalAgentNumber", Tag(0x0018, 0x9729)); public_tags.emplace("PETFrameAcquisitionSequence", Tag(0x0018, 0x9732)); public_tags.emplace("PETDetectorMotionDetailsSequence", Tag(0x0018, 0x9733)); public_tags.emplace("PETTableDynamicsSequence", Tag(0x0018, 0x9734)); public_tags.emplace("PETPositionSequence", Tag(0x0018, 0x9735)); public_tags.emplace("PETFrameCorrectionFactorsSequence", Tag(0x0018, 0x9736)); public_tags.emplace("RadiopharmaceuticalUsageSequence", Tag(0x0018, 0x9737)); public_tags.emplace("AttenuationCorrectionSource", Tag(0x0018, 0x9738)); public_tags.emplace("NumberOfIterations", Tag(0x0018, 0x9739)); public_tags.emplace("NumberOfSubsets", Tag(0x0018, 0x9740)); public_tags.emplace("PETReconstructionSequence", Tag(0x0018, 0x9749)); public_tags.emplace("PETFrameTypeSequence", Tag(0x0018, 0x9751)); public_tags.emplace("TimeOfFlightInformationUsed", Tag(0x0018, 0x9755)); public_tags.emplace("ReconstructionType", Tag(0x0018, 0x9756)); public_tags.emplace("DecayCorrected", Tag(0x0018, 0x9758)); public_tags.emplace("AttenuationCorrected", Tag(0x0018, 0x9759)); public_tags.emplace("ScatterCorrected", Tag(0x0018, 0x9760)); public_tags.emplace("DeadTimeCorrected", Tag(0x0018, 0x9761)); public_tags.emplace("GantryMotionCorrected", Tag(0x0018, 0x9762)); public_tags.emplace("PatientMotionCorrected", Tag(0x0018, 0x9763)); public_tags.emplace("CountLossNormalizationCorrected", Tag(0x0018, 0x9764)); public_tags.emplace("RandomsCorrected", Tag(0x0018, 0x9765)); public_tags.emplace("NonUniformRadialSamplingCorrected", Tag(0x0018, 0x9766)); public_tags.emplace("SensitivityCalibrated", Tag(0x0018, 0x9767)); public_tags.emplace("DetectorNormalizationCorrection", Tag(0x0018, 0x9768)); public_tags.emplace("IterativeReconstructionMethod", Tag(0x0018, 0x9769)); public_tags.emplace("AttenuationCorrectionTemporalRelationship", Tag(0x0018, 0x9770)); public_tags.emplace("PatientPhysiologicalStateSequence", Tag(0x0018, 0x9771)); public_tags.emplace("PatientPhysiologicalStateCodeSequence", Tag(0x0018, 0x9772)); public_tags.emplace("DepthsOfFocus", Tag(0x0018, 0x9801)); public_tags.emplace("ExcludedIntervalsSequence", Tag(0x0018, 0x9803)); public_tags.emplace("ExclusionStartDateTime", Tag(0x0018, 0x9804)); public_tags.emplace("ExclusionDuration", Tag(0x0018, 0x9805)); public_tags.emplace("USImageDescriptionSequence", Tag(0x0018, 0x9806)); public_tags.emplace("ImageDataTypeSequence", Tag(0x0018, 0x9807)); public_tags.emplace("DataType", Tag(0x0018, 0x9808)); public_tags.emplace("TransducerScanPatternCodeSequence", Tag(0x0018, 0x9809)); public_tags.emplace("AliasedDataType", Tag(0x0018, 0x980b)); public_tags.emplace("PositionMeasuringDeviceUsed", Tag(0x0018, 0x980c)); public_tags.emplace("TransducerGeometryCodeSequence", Tag(0x0018, 0x980d)); public_tags.emplace("TransducerBeamSteeringCodeSequence", Tag(0x0018, 0x980e)); public_tags.emplace("TransducerApplicationCodeSequence", Tag(0x0018, 0x980f)); public_tags.emplace("ZeroVelocityPixelValue", Tag(0x0018, 0x9810)); public_tags.emplace("ReferenceLocationLabel", Tag(0x0018, 0x9900)); public_tags.emplace("ReferenceLocationDescription", Tag(0x0018, 0x9901)); public_tags.emplace("ReferenceBasisCodeSequence", Tag(0x0018, 0x9902)); public_tags.emplace("ReferenceGeometryCodeSequence", Tag(0x0018, 0x9903)); public_tags.emplace("OffsetDistance", Tag(0x0018, 0x9904)); public_tags.emplace("OffsetDirection", Tag(0x0018, 0x9905)); public_tags.emplace("PotentialScheduledProtocolCodeSequence", Tag(0x0018, 0x9906)); public_tags.emplace("PotentialRequestedProcedureCodeSequence", Tag(0x0018, 0x9907)); public_tags.emplace("PotentialReasonsForProcedure", Tag(0x0018, 0x9908)); public_tags.emplace("PotentialReasonsForProcedureCodeSequence", Tag(0x0018, 0x9909)); public_tags.emplace("PotentialDiagnosticTasks", Tag(0x0018, 0x990a)); public_tags.emplace("ContraindicationsCodeSequence", Tag(0x0018, 0x990b)); public_tags.emplace("ReferencedDefinedProtocolSequence", Tag(0x0018, 0x990c)); public_tags.emplace("ReferencedPerformedProtocolSequence", Tag(0x0018, 0x990d)); public_tags.emplace("PredecessorProtocolSequence", Tag(0x0018, 0x990e)); public_tags.emplace("ProtocolPlanningInformation", Tag(0x0018, 0x990f)); public_tags.emplace("ProtocolDesignRationale", Tag(0x0018, 0x9910)); public_tags.emplace("PatientSpecificationSequence", Tag(0x0018, 0x9911)); public_tags.emplace("ModelSpecificationSequence", Tag(0x0018, 0x9912)); public_tags.emplace("ParametersSpecificationSequence", Tag(0x0018, 0x9913)); public_tags.emplace("InstructionSequence", Tag(0x0018, 0x9914)); public_tags.emplace("InstructionIndex", Tag(0x0018, 0x9915)); public_tags.emplace("InstructionText", Tag(0x0018, 0x9916)); public_tags.emplace("InstructionDescription", Tag(0x0018, 0x9917)); public_tags.emplace("InstructionPerformedFlag", Tag(0x0018, 0x9918)); public_tags.emplace("InstructionPerformedDateTime", Tag(0x0018, 0x9919)); public_tags.emplace("InstructionPerformanceComment", Tag(0x0018, 0x991a)); public_tags.emplace("PatientPositioningInstructionSequence", Tag(0x0018, 0x991b)); public_tags.emplace("PositioningMethodCodeSequence", Tag(0x0018, 0x991c)); public_tags.emplace("PositioningLandmarkSequence", Tag(0x0018, 0x991d)); public_tags.emplace("TargetFrameOfReferenceUID", Tag(0x0018, 0x991e)); public_tags.emplace("AcquisitionProtocolElementSpecificationSequence", Tag(0x0018, 0x991f)); public_tags.emplace("AcquisitionProtocolElementSequence", Tag(0x0018, 0x9920)); public_tags.emplace("ProtocolElementNumber", Tag(0x0018, 0x9921)); public_tags.emplace("ProtocolElementName", Tag(0x0018, 0x9922)); public_tags.emplace("ProtocolElementCharacteristicsSummary", Tag(0x0018, 0x9923)); public_tags.emplace("ProtocolElementPurpose", Tag(0x0018, 0x9924)); public_tags.emplace("AcquisitionMotion", Tag(0x0018, 0x9930)); public_tags.emplace("AcquisitionStartLocationSequence", Tag(0x0018, 0x9931)); public_tags.emplace("AcquisitionEndLocationSequence", Tag(0x0018, 0x9932)); public_tags.emplace("ReconstructionProtocolElementSpecificationSequence", Tag(0x0018, 0x9933)); public_tags.emplace("ReconstructionProtocolElementSequence", Tag(0x0018, 0x9934)); public_tags.emplace("StorageProtocolElementSpecificationSequence", Tag(0x0018, 0x9935)); public_tags.emplace("StorageProtocolElementSequence", Tag(0x0018, 0x9936)); public_tags.emplace("RequestedSeriesDescription", Tag(0x0018, 0x9937)); public_tags.emplace("SourceAcquisitionProtocolElementNumber", Tag(0x0018, 0x9938)); public_tags.emplace("SourceAcquisitionBeamNumber", Tag(0x0018, 0x9939)); public_tags.emplace("SourceReconstructionProtocolElementNumber", Tag(0x0018, 0x993a)); public_tags.emplace("ReconstructionStartLocationSequence", Tag(0x0018, 0x993b)); public_tags.emplace("ReconstructionEndLocationSequence", Tag(0x0018, 0x993c)); public_tags.emplace("ReconstructionAlgorithmSequence", Tag(0x0018, 0x993d)); public_tags.emplace("ReconstructionTargetCenterLocationSequence", Tag(0x0018, 0x993e)); public_tags.emplace("ImageFilterDescription", Tag(0x0018, 0x9941)); public_tags.emplace("CTDIvolNotificationTrigger", Tag(0x0018, 0x9942)); public_tags.emplace("DLPNotificationTrigger", Tag(0x0018, 0x9943)); public_tags.emplace("AutoKVPSelectionType", Tag(0x0018, 0x9944)); public_tags.emplace("AutoKVPUpperBound", Tag(0x0018, 0x9945)); public_tags.emplace("AutoKVPLowerBound", Tag(0x0018, 0x9946)); public_tags.emplace("ProtocolDefinedPatientPosition", Tag(0x0018, 0x9947)); public_tags.emplace("ContributingEquipmentSequence", Tag(0x0018, 0xa001)); public_tags.emplace("ContributionDateTime", Tag(0x0018, 0xa002)); public_tags.emplace("ContributionDescription", Tag(0x0018, 0xa003)); } } }odil-0.11.0/src/odil/registry_0018.h000066400000000000000000001253271362244656000167510ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0018 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0018 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ContrastBolusAgent(0x0018, 0x0010); Tag const ContrastBolusAgentSequence(0x0018, 0x0012); Tag const ContrastBolusT1Relaxivity(0x0018, 0x0013); Tag const ContrastBolusAdministrationRouteSequence(0x0018, 0x0014); Tag const BodyPartExamined(0x0018, 0x0015); Tag const ScanningSequence(0x0018, 0x0020); Tag const SequenceVariant(0x0018, 0x0021); Tag const ScanOptions(0x0018, 0x0022); Tag const MRAcquisitionType(0x0018, 0x0023); Tag const SequenceName(0x0018, 0x0024); Tag const AngioFlag(0x0018, 0x0025); Tag const InterventionDrugInformationSequence(0x0018, 0x0026); Tag const InterventionDrugStopTime(0x0018, 0x0027); Tag const InterventionDrugDose(0x0018, 0x0028); Tag const InterventionDrugCodeSequence(0x0018, 0x0029); Tag const AdditionalDrugSequence(0x0018, 0x002a); Tag const Radionuclide(0x0018, 0x0030); Tag const Radiopharmaceutical(0x0018, 0x0031); Tag const EnergyWindowCenterline(0x0018, 0x0032); Tag const EnergyWindowTotalWidth(0x0018, 0x0033); Tag const InterventionDrugName(0x0018, 0x0034); Tag const InterventionDrugStartTime(0x0018, 0x0035); Tag const InterventionSequence(0x0018, 0x0036); Tag const TherapyType(0x0018, 0x0037); Tag const InterventionStatus(0x0018, 0x0038); Tag const TherapyDescription(0x0018, 0x0039); Tag const InterventionDescription(0x0018, 0x003a); Tag const CineRate(0x0018, 0x0040); Tag const InitialCineRunState(0x0018, 0x0042); Tag const SliceThickness(0x0018, 0x0050); Tag const KVP(0x0018, 0x0060); Tag const CountsAccumulated(0x0018, 0x0070); Tag const AcquisitionTerminationCondition(0x0018, 0x0071); Tag const EffectiveDuration(0x0018, 0x0072); Tag const AcquisitionStartCondition(0x0018, 0x0073); Tag const AcquisitionStartConditionData(0x0018, 0x0074); Tag const AcquisitionTerminationConditionData(0x0018, 0x0075); Tag const RepetitionTime(0x0018, 0x0080); Tag const EchoTime(0x0018, 0x0081); Tag const InversionTime(0x0018, 0x0082); Tag const NumberOfAverages(0x0018, 0x0083); Tag const ImagingFrequency(0x0018, 0x0084); Tag const ImagedNucleus(0x0018, 0x0085); Tag const EchoNumbers(0x0018, 0x0086); Tag const MagneticFieldStrength(0x0018, 0x0087); Tag const SpacingBetweenSlices(0x0018, 0x0088); Tag const NumberOfPhaseEncodingSteps(0x0018, 0x0089); Tag const DataCollectionDiameter(0x0018, 0x0090); Tag const EchoTrainLength(0x0018, 0x0091); Tag const PercentSampling(0x0018, 0x0093); Tag const PercentPhaseFieldOfView(0x0018, 0x0094); Tag const PixelBandwidth(0x0018, 0x0095); Tag const DeviceSerialNumber(0x0018, 0x1000); Tag const DeviceUID(0x0018, 0x1002); Tag const DeviceID(0x0018, 0x1003); Tag const PlateID(0x0018, 0x1004); Tag const GeneratorID(0x0018, 0x1005); Tag const GridID(0x0018, 0x1006); Tag const CassetteID(0x0018, 0x1007); Tag const GantryID(0x0018, 0x1008); Tag const UniqueDeviceIdentifier(0x0018, 0x1009); Tag const UDISequence(0x0018, 0x100a); Tag const ManufacturerDeviceClassUID(0x0018, 0x100b); Tag const SecondaryCaptureDeviceID(0x0018, 0x1010); Tag const HardcopyCreationDeviceID(0x0018, 0x1011); Tag const DateOfSecondaryCapture(0x0018, 0x1012); Tag const TimeOfSecondaryCapture(0x0018, 0x1014); Tag const SecondaryCaptureDeviceManufacturer(0x0018, 0x1016); Tag const HardcopyDeviceManufacturer(0x0018, 0x1017); Tag const SecondaryCaptureDeviceManufacturerModelName(0x0018, 0x1018); Tag const SecondaryCaptureDeviceSoftwareVersions(0x0018, 0x1019); Tag const HardcopyDeviceSoftwareVersion(0x0018, 0x101a); Tag const HardcopyDeviceManufacturerModelName(0x0018, 0x101b); Tag const SoftwareVersions(0x0018, 0x1020); Tag const VideoImageFormatAcquired(0x0018, 0x1022); Tag const DigitalImageFormatAcquired(0x0018, 0x1023); Tag const ProtocolName(0x0018, 0x1030); Tag const ContrastBolusRoute(0x0018, 0x1040); Tag const ContrastBolusVolume(0x0018, 0x1041); Tag const ContrastBolusStartTime(0x0018, 0x1042); Tag const ContrastBolusStopTime(0x0018, 0x1043); Tag const ContrastBolusTotalDose(0x0018, 0x1044); Tag const SyringeCounts(0x0018, 0x1045); Tag const ContrastFlowRate(0x0018, 0x1046); Tag const ContrastFlowDuration(0x0018, 0x1047); Tag const ContrastBolusIngredient(0x0018, 0x1048); Tag const ContrastBolusIngredientConcentration(0x0018, 0x1049); Tag const SpatialResolution(0x0018, 0x1050); Tag const TriggerTime(0x0018, 0x1060); Tag const TriggerSourceOrType(0x0018, 0x1061); Tag const NominalInterval(0x0018, 0x1062); Tag const FrameTime(0x0018, 0x1063); Tag const CardiacFramingType(0x0018, 0x1064); Tag const FrameTimeVector(0x0018, 0x1065); Tag const FrameDelay(0x0018, 0x1066); Tag const ImageTriggerDelay(0x0018, 0x1067); Tag const MultiplexGroupTimeOffset(0x0018, 0x1068); Tag const TriggerTimeOffset(0x0018, 0x1069); Tag const SynchronizationTrigger(0x0018, 0x106a); Tag const SynchronizationChannel(0x0018, 0x106c); Tag const TriggerSamplePosition(0x0018, 0x106e); Tag const RadiopharmaceuticalRoute(0x0018, 0x1070); Tag const RadiopharmaceuticalVolume(0x0018, 0x1071); Tag const RadiopharmaceuticalStartTime(0x0018, 0x1072); Tag const RadiopharmaceuticalStopTime(0x0018, 0x1073); Tag const RadionuclideTotalDose(0x0018, 0x1074); Tag const RadionuclideHalfLife(0x0018, 0x1075); Tag const RadionuclidePositronFraction(0x0018, 0x1076); Tag const RadiopharmaceuticalSpecificActivity(0x0018, 0x1077); Tag const RadiopharmaceuticalStartDateTime(0x0018, 0x1078); Tag const RadiopharmaceuticalStopDateTime(0x0018, 0x1079); Tag const BeatRejectionFlag(0x0018, 0x1080); Tag const LowRRValue(0x0018, 0x1081); Tag const HighRRValue(0x0018, 0x1082); Tag const IntervalsAcquired(0x0018, 0x1083); Tag const IntervalsRejected(0x0018, 0x1084); Tag const PVCRejection(0x0018, 0x1085); Tag const SkipBeats(0x0018, 0x1086); Tag const HeartRate(0x0018, 0x1088); Tag const CardiacNumberOfImages(0x0018, 0x1090); Tag const TriggerWindow(0x0018, 0x1094); Tag const ReconstructionDiameter(0x0018, 0x1100); Tag const DistanceSourceToDetector(0x0018, 0x1110); Tag const DistanceSourceToPatient(0x0018, 0x1111); Tag const EstimatedRadiographicMagnificationFactor(0x0018, 0x1114); Tag const GantryDetectorTilt(0x0018, 0x1120); Tag const GantryDetectorSlew(0x0018, 0x1121); Tag const TableHeight(0x0018, 0x1130); Tag const TableTraverse(0x0018, 0x1131); Tag const TableMotion(0x0018, 0x1134); Tag const TableVerticalIncrement(0x0018, 0x1135); Tag const TableLateralIncrement(0x0018, 0x1136); Tag const TableLongitudinalIncrement(0x0018, 0x1137); Tag const TableAngle(0x0018, 0x1138); Tag const TableType(0x0018, 0x113a); Tag const RotationDirection(0x0018, 0x1140); Tag const AngularPosition(0x0018, 0x1141); Tag const RadialPosition(0x0018, 0x1142); Tag const ScanArc(0x0018, 0x1143); Tag const AngularStep(0x0018, 0x1144); Tag const CenterOfRotationOffset(0x0018, 0x1145); Tag const RotationOffset(0x0018, 0x1146); Tag const FieldOfViewShape(0x0018, 0x1147); Tag const FieldOfViewDimensions(0x0018, 0x1149); Tag const ExposureTime(0x0018, 0x1150); Tag const XRayTubeCurrent(0x0018, 0x1151); Tag const Exposure(0x0018, 0x1152); Tag const ExposureInuAs(0x0018, 0x1153); Tag const AveragePulseWidth(0x0018, 0x1154); Tag const RadiationSetting(0x0018, 0x1155); Tag const RectificationType(0x0018, 0x1156); Tag const RadiationMode(0x0018, 0x115a); Tag const ImageAndFluoroscopyAreaDoseProduct(0x0018, 0x115e); Tag const FilterType(0x0018, 0x1160); Tag const TypeOfFilters(0x0018, 0x1161); Tag const IntensifierSize(0x0018, 0x1162); Tag const ImagerPixelSpacing(0x0018, 0x1164); Tag const Grid(0x0018, 0x1166); Tag const GeneratorPower(0x0018, 0x1170); Tag const CollimatorGridName(0x0018, 0x1180); Tag const CollimatorType(0x0018, 0x1181); Tag const FocalDistance(0x0018, 0x1182); Tag const XFocusCenter(0x0018, 0x1183); Tag const YFocusCenter(0x0018, 0x1184); Tag const FocalSpots(0x0018, 0x1190); Tag const AnodeTargetMaterial(0x0018, 0x1191); Tag const BodyPartThickness(0x0018, 0x11a0); Tag const CompressionForce(0x0018, 0x11a2); Tag const CompressionPressure(0x0018, 0x11a3); Tag const PaddleDescription(0x0018, 0x11a4); Tag const CompressionContactArea(0x0018, 0x11a5); Tag const DateOfLastCalibration(0x0018, 0x1200); Tag const TimeOfLastCalibration(0x0018, 0x1201); Tag const DateTimeOfLastCalibration(0x0018, 0x1202); Tag const ConvolutionKernel(0x0018, 0x1210); Tag const UpperLowerPixelValues(0x0018, 0x1240); Tag const ActualFrameDuration(0x0018, 0x1242); Tag const CountRate(0x0018, 0x1243); Tag const PreferredPlaybackSequencing(0x0018, 0x1244); Tag const ReceiveCoilName(0x0018, 0x1250); Tag const TransmitCoilName(0x0018, 0x1251); Tag const PlateType(0x0018, 0x1260); Tag const PhosphorType(0x0018, 0x1261); Tag const WaterEquivalentDiameter(0x0018, 0x1271); Tag const WaterEquivalentDiameterCalculationMethodCodeSequence(0x0018, 0x1272); Tag const ScanVelocity(0x0018, 0x1300); Tag const WholeBodyTechnique(0x0018, 0x1301); Tag const ScanLength(0x0018, 0x1302); Tag const AcquisitionMatrix(0x0018, 0x1310); Tag const InPlanePhaseEncodingDirection(0x0018, 0x1312); Tag const FlipAngle(0x0018, 0x1314); Tag const VariableFlipAngleFlag(0x0018, 0x1315); Tag const SAR(0x0018, 0x1316); Tag const dBdt(0x0018, 0x1318); Tag const B1rms(0x0018, 0x1320); Tag const AcquisitionDeviceProcessingDescription(0x0018, 0x1400); Tag const AcquisitionDeviceProcessingCode(0x0018, 0x1401); Tag const CassetteOrientation(0x0018, 0x1402); Tag const CassetteSize(0x0018, 0x1403); Tag const ExposuresOnPlate(0x0018, 0x1404); Tag const RelativeXRayExposure(0x0018, 0x1405); Tag const ExposureIndex(0x0018, 0x1411); Tag const TargetExposureIndex(0x0018, 0x1412); Tag const DeviationIndex(0x0018, 0x1413); Tag const ColumnAngulation(0x0018, 0x1450); Tag const TomoLayerHeight(0x0018, 0x1460); Tag const TomoAngle(0x0018, 0x1470); Tag const TomoTime(0x0018, 0x1480); Tag const TomoType(0x0018, 0x1490); Tag const TomoClass(0x0018, 0x1491); Tag const NumberOfTomosynthesisSourceImages(0x0018, 0x1495); Tag const PositionerMotion(0x0018, 0x1500); Tag const PositionerType(0x0018, 0x1508); Tag const PositionerPrimaryAngle(0x0018, 0x1510); Tag const PositionerSecondaryAngle(0x0018, 0x1511); Tag const PositionerPrimaryAngleIncrement(0x0018, 0x1520); Tag const PositionerSecondaryAngleIncrement(0x0018, 0x1521); Tag const DetectorPrimaryAngle(0x0018, 0x1530); Tag const DetectorSecondaryAngle(0x0018, 0x1531); Tag const ShutterShape(0x0018, 0x1600); Tag const ShutterLeftVerticalEdge(0x0018, 0x1602); Tag const ShutterRightVerticalEdge(0x0018, 0x1604); Tag const ShutterUpperHorizontalEdge(0x0018, 0x1606); Tag const ShutterLowerHorizontalEdge(0x0018, 0x1608); Tag const CenterOfCircularShutter(0x0018, 0x1610); Tag const RadiusOfCircularShutter(0x0018, 0x1612); Tag const VerticesOfThePolygonalShutter(0x0018, 0x1620); Tag const ShutterPresentationValue(0x0018, 0x1622); Tag const ShutterOverlayGroup(0x0018, 0x1623); Tag const ShutterPresentationColorCIELabValue(0x0018, 0x1624); Tag const OutlineShapeType(0x0018, 0x1630); Tag const OutlineLeftVerticalEdge(0x0018, 0x1631); Tag const OutlineRightVerticalEdge(0x0018, 0x1632); Tag const OutlineUpperHorizontalEdge(0x0018, 0x1633); Tag const OutlineLowerHorizontalEdge(0x0018, 0x1634); Tag const CenterOfCircularOutline(0x0018, 0x1635); Tag const DiameterOfCircularOutline(0x0018, 0x1636); Tag const NumberOfPolygonalVertices(0x0018, 0x1637); Tag const VerticesOfThePolygonalOutline(0x0018, 0x1638); Tag const CollimatorShape(0x0018, 0x1700); Tag const CollimatorLeftVerticalEdge(0x0018, 0x1702); Tag const CollimatorRightVerticalEdge(0x0018, 0x1704); Tag const CollimatorUpperHorizontalEdge(0x0018, 0x1706); Tag const CollimatorLowerHorizontalEdge(0x0018, 0x1708); Tag const CenterOfCircularCollimator(0x0018, 0x1710); Tag const RadiusOfCircularCollimator(0x0018, 0x1712); Tag const VerticesOfThePolygonalCollimator(0x0018, 0x1720); Tag const AcquisitionTimeSynchronized(0x0018, 0x1800); Tag const TimeSource(0x0018, 0x1801); Tag const TimeDistributionProtocol(0x0018, 0x1802); Tag const NTPSourceAddress(0x0018, 0x1803); Tag const PageNumberVector(0x0018, 0x2001); Tag const FrameLabelVector(0x0018, 0x2002); Tag const FramePrimaryAngleVector(0x0018, 0x2003); Tag const FrameSecondaryAngleVector(0x0018, 0x2004); Tag const SliceLocationVector(0x0018, 0x2005); Tag const DisplayWindowLabelVector(0x0018, 0x2006); Tag const NominalScannedPixelSpacing(0x0018, 0x2010); Tag const DigitizingDeviceTransportDirection(0x0018, 0x2020); Tag const RotationOfScannedFilm(0x0018, 0x2030); Tag const BiopsyTargetSequence(0x0018, 0x2041); Tag const TargetUID(0x0018, 0x2042); Tag const LocalizingCursorPosition(0x0018, 0x2043); Tag const CalculatedTargetPosition(0x0018, 0x2044); Tag const TargetLabel(0x0018, 0x2045); Tag const DisplayedZValue(0x0018, 0x2046); Tag const IVUSAcquisition(0x0018, 0x3100); Tag const IVUSPullbackRate(0x0018, 0x3101); Tag const IVUSGatedRate(0x0018, 0x3102); Tag const IVUSPullbackStartFrameNumber(0x0018, 0x3103); Tag const IVUSPullbackStopFrameNumber(0x0018, 0x3104); Tag const LesionNumber(0x0018, 0x3105); Tag const AcquisitionComments(0x0018, 0x4000); Tag const OutputPower(0x0018, 0x5000); Tag const TransducerData(0x0018, 0x5010); Tag const FocusDepth(0x0018, 0x5012); Tag const ProcessingFunction(0x0018, 0x5020); Tag const PostprocessingFunction(0x0018, 0x5021); Tag const MechanicalIndex(0x0018, 0x5022); Tag const BoneThermalIndex(0x0018, 0x5024); Tag const CranialThermalIndex(0x0018, 0x5026); Tag const SoftTissueThermalIndex(0x0018, 0x5027); Tag const SoftTissueFocusThermalIndex(0x0018, 0x5028); Tag const SoftTissueSurfaceThermalIndex(0x0018, 0x5029); Tag const DynamicRange(0x0018, 0x5030); Tag const TotalGain(0x0018, 0x5040); Tag const DepthOfScanField(0x0018, 0x5050); Tag const PatientPosition(0x0018, 0x5100); Tag const ViewPosition(0x0018, 0x5101); Tag const ProjectionEponymousNameCodeSequence(0x0018, 0x5104); Tag const ImageTransformationMatrix(0x0018, 0x5210); Tag const ImageTranslationVector(0x0018, 0x5212); Tag const Sensitivity(0x0018, 0x6000); Tag const SequenceOfUltrasoundRegions(0x0018, 0x6011); Tag const RegionSpatialFormat(0x0018, 0x6012); Tag const RegionDataType(0x0018, 0x6014); Tag const RegionFlags(0x0018, 0x6016); Tag const RegionLocationMinX0(0x0018, 0x6018); Tag const RegionLocationMinY0(0x0018, 0x601a); Tag const RegionLocationMaxX1(0x0018, 0x601c); Tag const RegionLocationMaxY1(0x0018, 0x601e); Tag const ReferencePixelX0(0x0018, 0x6020); Tag const ReferencePixelY0(0x0018, 0x6022); Tag const PhysicalUnitsXDirection(0x0018, 0x6024); Tag const PhysicalUnitsYDirection(0x0018, 0x6026); Tag const ReferencePixelPhysicalValueX(0x0018, 0x6028); Tag const ReferencePixelPhysicalValueY(0x0018, 0x602a); Tag const PhysicalDeltaX(0x0018, 0x602c); Tag const PhysicalDeltaY(0x0018, 0x602e); Tag const TransducerFrequency(0x0018, 0x6030); Tag const TransducerType(0x0018, 0x6031); Tag const PulseRepetitionFrequency(0x0018, 0x6032); Tag const DopplerCorrectionAngle(0x0018, 0x6034); Tag const SteeringAngle(0x0018, 0x6036); Tag const DopplerSampleVolumeXPositionRetired(0x0018, 0x6038); Tag const DopplerSampleVolumeXPosition(0x0018, 0x6039); Tag const DopplerSampleVolumeYPositionRetired(0x0018, 0x603a); Tag const DopplerSampleVolumeYPosition(0x0018, 0x603b); Tag const TMLinePositionX0Retired(0x0018, 0x603c); Tag const TMLinePositionX0(0x0018, 0x603d); Tag const TMLinePositionY0Retired(0x0018, 0x603e); Tag const TMLinePositionY0(0x0018, 0x603f); Tag const TMLinePositionX1Retired(0x0018, 0x6040); Tag const TMLinePositionX1(0x0018, 0x6041); Tag const TMLinePositionY1Retired(0x0018, 0x6042); Tag const TMLinePositionY1(0x0018, 0x6043); Tag const PixelComponentOrganization(0x0018, 0x6044); Tag const PixelComponentMask(0x0018, 0x6046); Tag const PixelComponentRangeStart(0x0018, 0x6048); Tag const PixelComponentRangeStop(0x0018, 0x604a); Tag const PixelComponentPhysicalUnits(0x0018, 0x604c); Tag const PixelComponentDataType(0x0018, 0x604e); Tag const NumberOfTableBreakPoints(0x0018, 0x6050); Tag const TableOfXBreakPoints(0x0018, 0x6052); Tag const TableOfYBreakPoints(0x0018, 0x6054); Tag const NumberOfTableEntries(0x0018, 0x6056); Tag const TableOfPixelValues(0x0018, 0x6058); Tag const TableOfParameterValues(0x0018, 0x605a); Tag const RWaveTimeVector(0x0018, 0x6060); Tag const DetectorConditionsNominalFlag(0x0018, 0x7000); Tag const DetectorTemperature(0x0018, 0x7001); Tag const DetectorType(0x0018, 0x7004); Tag const DetectorConfiguration(0x0018, 0x7005); Tag const DetectorDescription(0x0018, 0x7006); Tag const DetectorMode(0x0018, 0x7008); Tag const DetectorID(0x0018, 0x700a); Tag const DateOfLastDetectorCalibration(0x0018, 0x700c); Tag const TimeOfLastDetectorCalibration(0x0018, 0x700e); Tag const ExposuresOnDetectorSinceLastCalibration(0x0018, 0x7010); Tag const ExposuresOnDetectorSinceManufactured(0x0018, 0x7011); Tag const DetectorTimeSinceLastExposure(0x0018, 0x7012); Tag const DetectorActiveTime(0x0018, 0x7014); Tag const DetectorActivationOffsetFromExposure(0x0018, 0x7016); Tag const DetectorBinning(0x0018, 0x701a); Tag const DetectorElementPhysicalSize(0x0018, 0x7020); Tag const DetectorElementSpacing(0x0018, 0x7022); Tag const DetectorActiveShape(0x0018, 0x7024); Tag const DetectorActiveDimensions(0x0018, 0x7026); Tag const DetectorActiveOrigin(0x0018, 0x7028); Tag const DetectorManufacturerName(0x0018, 0x702a); Tag const DetectorManufacturerModelName(0x0018, 0x702b); Tag const FieldOfViewOrigin(0x0018, 0x7030); Tag const FieldOfViewRotation(0x0018, 0x7032); Tag const FieldOfViewHorizontalFlip(0x0018, 0x7034); Tag const PixelDataAreaOriginRelativeToFOV(0x0018, 0x7036); Tag const PixelDataAreaRotationAngleRelativeToFOV(0x0018, 0x7038); Tag const GridAbsorbingMaterial(0x0018, 0x7040); Tag const GridSpacingMaterial(0x0018, 0x7041); Tag const GridThickness(0x0018, 0x7042); Tag const GridPitch(0x0018, 0x7044); Tag const GridAspectRatio(0x0018, 0x7046); Tag const GridPeriod(0x0018, 0x7048); Tag const GridFocalDistance(0x0018, 0x704c); Tag const FilterMaterial(0x0018, 0x7050); Tag const FilterThicknessMinimum(0x0018, 0x7052); Tag const FilterThicknessMaximum(0x0018, 0x7054); Tag const FilterBeamPathLengthMinimum(0x0018, 0x7056); Tag const FilterBeamPathLengthMaximum(0x0018, 0x7058); Tag const ExposureControlMode(0x0018, 0x7060); Tag const ExposureControlModeDescription(0x0018, 0x7062); Tag const ExposureStatus(0x0018, 0x7064); Tag const PhototimerSetting(0x0018, 0x7065); Tag const ExposureTimeInuS(0x0018, 0x8150); Tag const XRayTubeCurrentInuA(0x0018, 0x8151); Tag const ContentQualification(0x0018, 0x9004); Tag const PulseSequenceName(0x0018, 0x9005); Tag const MRImagingModifierSequence(0x0018, 0x9006); Tag const EchoPulseSequence(0x0018, 0x9008); Tag const InversionRecovery(0x0018, 0x9009); Tag const FlowCompensation(0x0018, 0x9010); Tag const MultipleSpinEcho(0x0018, 0x9011); Tag const MultiPlanarExcitation(0x0018, 0x9012); Tag const PhaseContrast(0x0018, 0x9014); Tag const TimeOfFlightContrast(0x0018, 0x9015); Tag const Spoiling(0x0018, 0x9016); Tag const SteadyStatePulseSequence(0x0018, 0x9017); Tag const EchoPlanarPulseSequence(0x0018, 0x9018); Tag const TagAngleFirstAxis(0x0018, 0x9019); Tag const MagnetizationTransfer(0x0018, 0x9020); Tag const T2Preparation(0x0018, 0x9021); Tag const BloodSignalNulling(0x0018, 0x9022); Tag const SaturationRecovery(0x0018, 0x9024); Tag const SpectrallySelectedSuppression(0x0018, 0x9025); Tag const SpectrallySelectedExcitation(0x0018, 0x9026); Tag const SpatialPresaturation(0x0018, 0x9027); Tag const Tagging(0x0018, 0x9028); Tag const OversamplingPhase(0x0018, 0x9029); Tag const TagSpacingFirstDimension(0x0018, 0x9030); Tag const GeometryOfKSpaceTraversal(0x0018, 0x9032); Tag const SegmentedKSpaceTraversal(0x0018, 0x9033); Tag const RectilinearPhaseEncodeReordering(0x0018, 0x9034); Tag const TagThickness(0x0018, 0x9035); Tag const PartialFourierDirection(0x0018, 0x9036); Tag const CardiacSynchronizationTechnique(0x0018, 0x9037); Tag const ReceiveCoilManufacturerName(0x0018, 0x9041); Tag const MRReceiveCoilSequence(0x0018, 0x9042); Tag const ReceiveCoilType(0x0018, 0x9043); Tag const QuadratureReceiveCoil(0x0018, 0x9044); Tag const MultiCoilDefinitionSequence(0x0018, 0x9045); Tag const MultiCoilConfiguration(0x0018, 0x9046); Tag const MultiCoilElementName(0x0018, 0x9047); Tag const MultiCoilElementUsed(0x0018, 0x9048); Tag const MRTransmitCoilSequence(0x0018, 0x9049); Tag const TransmitCoilManufacturerName(0x0018, 0x9050); Tag const TransmitCoilType(0x0018, 0x9051); Tag const SpectralWidth(0x0018, 0x9052); Tag const ChemicalShiftReference(0x0018, 0x9053); Tag const VolumeLocalizationTechnique(0x0018, 0x9054); Tag const MRAcquisitionFrequencyEncodingSteps(0x0018, 0x9058); Tag const Decoupling(0x0018, 0x9059); Tag const DecoupledNucleus(0x0018, 0x9060); Tag const DecouplingFrequency(0x0018, 0x9061); Tag const DecouplingMethod(0x0018, 0x9062); Tag const DecouplingChemicalShiftReference(0x0018, 0x9063); Tag const KSpaceFiltering(0x0018, 0x9064); Tag const TimeDomainFiltering(0x0018, 0x9065); Tag const NumberOfZeroFills(0x0018, 0x9066); Tag const BaselineCorrection(0x0018, 0x9067); Tag const ParallelReductionFactorInPlane(0x0018, 0x9069); Tag const CardiacRRIntervalSpecified(0x0018, 0x9070); Tag const AcquisitionDuration(0x0018, 0x9073); Tag const FrameAcquisitionDateTime(0x0018, 0x9074); Tag const DiffusionDirectionality(0x0018, 0x9075); Tag const DiffusionGradientDirectionSequence(0x0018, 0x9076); Tag const ParallelAcquisition(0x0018, 0x9077); Tag const ParallelAcquisitionTechnique(0x0018, 0x9078); Tag const InversionTimes(0x0018, 0x9079); Tag const MetaboliteMapDescription(0x0018, 0x9080); Tag const PartialFourier(0x0018, 0x9081); Tag const EffectiveEchoTime(0x0018, 0x9082); Tag const MetaboliteMapCodeSequence(0x0018, 0x9083); Tag const ChemicalShiftSequence(0x0018, 0x9084); Tag const CardiacSignalSource(0x0018, 0x9085); Tag const DiffusionBValue(0x0018, 0x9087); Tag const DiffusionGradientOrientation(0x0018, 0x9089); Tag const VelocityEncodingDirection(0x0018, 0x9090); Tag const VelocityEncodingMinimumValue(0x0018, 0x9091); Tag const VelocityEncodingAcquisitionSequence(0x0018, 0x9092); Tag const NumberOfKSpaceTrajectories(0x0018, 0x9093); Tag const CoverageOfKSpace(0x0018, 0x9094); Tag const SpectroscopyAcquisitionPhaseRows(0x0018, 0x9095); Tag const ParallelReductionFactorInPlaneRetired(0x0018, 0x9096); Tag const TransmitterFrequency(0x0018, 0x9098); Tag const ResonantNucleus(0x0018, 0x9100); Tag const FrequencyCorrection(0x0018, 0x9101); Tag const MRSpectroscopyFOVGeometrySequence(0x0018, 0x9103); Tag const SlabThickness(0x0018, 0x9104); Tag const SlabOrientation(0x0018, 0x9105); Tag const MidSlabPosition(0x0018, 0x9106); Tag const MRSpatialSaturationSequence(0x0018, 0x9107); Tag const MRTimingAndRelatedParametersSequence(0x0018, 0x9112); Tag const MREchoSequence(0x0018, 0x9114); Tag const MRModifierSequence(0x0018, 0x9115); Tag const MRDiffusionSequence(0x0018, 0x9117); Tag const CardiacSynchronizationSequence(0x0018, 0x9118); Tag const MRAveragesSequence(0x0018, 0x9119); Tag const MRFOVGeometrySequence(0x0018, 0x9125); Tag const VolumeLocalizationSequence(0x0018, 0x9126); Tag const SpectroscopyAcquisitionDataColumns(0x0018, 0x9127); Tag const DiffusionAnisotropyType(0x0018, 0x9147); Tag const FrameReferenceDateTime(0x0018, 0x9151); Tag const MRMetaboliteMapSequence(0x0018, 0x9152); Tag const ParallelReductionFactorOutOfPlane(0x0018, 0x9155); Tag const SpectroscopyAcquisitionOutOfPlanePhaseSteps(0x0018, 0x9159); Tag const BulkMotionStatus(0x0018, 0x9166); Tag const ParallelReductionFactorSecondInPlane(0x0018, 0x9168); Tag const CardiacBeatRejectionTechnique(0x0018, 0x9169); Tag const RespiratoryMotionCompensationTechnique(0x0018, 0x9170); Tag const RespiratorySignalSource(0x0018, 0x9171); Tag const BulkMotionCompensationTechnique(0x0018, 0x9172); Tag const BulkMotionSignalSource(0x0018, 0x9173); Tag const ApplicableSafetyStandardAgency(0x0018, 0x9174); Tag const ApplicableSafetyStandardDescription(0x0018, 0x9175); Tag const OperatingModeSequence(0x0018, 0x9176); Tag const OperatingModeType(0x0018, 0x9177); Tag const OperatingMode(0x0018, 0x9178); Tag const SpecificAbsorptionRateDefinition(0x0018, 0x9179); Tag const GradientOutputType(0x0018, 0x9180); Tag const SpecificAbsorptionRateValue(0x0018, 0x9181); Tag const GradientOutput(0x0018, 0x9182); Tag const FlowCompensationDirection(0x0018, 0x9183); Tag const TaggingDelay(0x0018, 0x9184); Tag const RespiratoryMotionCompensationTechniqueDescription(0x0018, 0x9185); Tag const RespiratorySignalSourceID(0x0018, 0x9186); Tag const ChemicalShiftMinimumIntegrationLimitInHz(0x0018, 0x9195); Tag const ChemicalShiftMaximumIntegrationLimitInHz(0x0018, 0x9196); Tag const MRVelocityEncodingSequence(0x0018, 0x9197); Tag const FirstOrderPhaseCorrection(0x0018, 0x9198); Tag const WaterReferencedPhaseCorrection(0x0018, 0x9199); Tag const MRSpectroscopyAcquisitionType(0x0018, 0x9200); Tag const RespiratoryCyclePosition(0x0018, 0x9214); Tag const VelocityEncodingMaximumValue(0x0018, 0x9217); Tag const TagSpacingSecondDimension(0x0018, 0x9218); Tag const TagAngleSecondAxis(0x0018, 0x9219); Tag const FrameAcquisitionDuration(0x0018, 0x9220); Tag const MRImageFrameTypeSequence(0x0018, 0x9226); Tag const MRSpectroscopyFrameTypeSequence(0x0018, 0x9227); Tag const MRAcquisitionPhaseEncodingStepsInPlane(0x0018, 0x9231); Tag const MRAcquisitionPhaseEncodingStepsOutOfPlane(0x0018, 0x9232); Tag const SpectroscopyAcquisitionPhaseColumns(0x0018, 0x9234); Tag const CardiacCyclePosition(0x0018, 0x9236); Tag const SpecificAbsorptionRateSequence(0x0018, 0x9239); Tag const RFEchoTrainLength(0x0018, 0x9240); Tag const GradientEchoTrainLength(0x0018, 0x9241); Tag const ArterialSpinLabelingContrast(0x0018, 0x9250); Tag const MRArterialSpinLabelingSequence(0x0018, 0x9251); Tag const ASLTechniqueDescription(0x0018, 0x9252); Tag const ASLSlabNumber(0x0018, 0x9253); Tag const ASLSlabThickness(0x0018, 0x9254); Tag const ASLSlabOrientation(0x0018, 0x9255); Tag const ASLMidSlabPosition(0x0018, 0x9256); Tag const ASLContext(0x0018, 0x9257); Tag const ASLPulseTrainDuration(0x0018, 0x9258); Tag const ASLCrusherFlag(0x0018, 0x9259); Tag const ASLCrusherFlowLimit(0x0018, 0x925a); Tag const ASLCrusherDescription(0x0018, 0x925b); Tag const ASLBolusCutoffFlag(0x0018, 0x925c); Tag const ASLBolusCutoffTimingSequence(0x0018, 0x925d); Tag const ASLBolusCutoffTechnique(0x0018, 0x925e); Tag const ASLBolusCutoffDelayTime(0x0018, 0x925f); Tag const ASLSlabSequence(0x0018, 0x9260); Tag const ChemicalShiftMinimumIntegrationLimitInppm(0x0018, 0x9295); Tag const ChemicalShiftMaximumIntegrationLimitInppm(0x0018, 0x9296); Tag const WaterReferenceAcquisition(0x0018, 0x9297); Tag const EchoPeakPosition(0x0018, 0x9298); Tag const CTAcquisitionTypeSequence(0x0018, 0x9301); Tag const AcquisitionType(0x0018, 0x9302); Tag const TubeAngle(0x0018, 0x9303); Tag const CTAcquisitionDetailsSequence(0x0018, 0x9304); Tag const RevolutionTime(0x0018, 0x9305); Tag const SingleCollimationWidth(0x0018, 0x9306); Tag const TotalCollimationWidth(0x0018, 0x9307); Tag const CTTableDynamicsSequence(0x0018, 0x9308); Tag const TableSpeed(0x0018, 0x9309); Tag const TableFeedPerRotation(0x0018, 0x9310); Tag const SpiralPitchFactor(0x0018, 0x9311); Tag const CTGeometrySequence(0x0018, 0x9312); Tag const DataCollectionCenterPatient(0x0018, 0x9313); Tag const CTReconstructionSequence(0x0018, 0x9314); Tag const ReconstructionAlgorithm(0x0018, 0x9315); Tag const ConvolutionKernelGroup(0x0018, 0x9316); Tag const ReconstructionFieldOfView(0x0018, 0x9317); Tag const ReconstructionTargetCenterPatient(0x0018, 0x9318); Tag const ReconstructionAngle(0x0018, 0x9319); Tag const ImageFilter(0x0018, 0x9320); Tag const CTExposureSequence(0x0018, 0x9321); Tag const ReconstructionPixelSpacing(0x0018, 0x9322); Tag const ExposureModulationType(0x0018, 0x9323); Tag const EstimatedDoseSaving(0x0018, 0x9324); Tag const CTXRayDetailsSequence(0x0018, 0x9325); Tag const CTPositionSequence(0x0018, 0x9326); Tag const TablePosition(0x0018, 0x9327); Tag const ExposureTimeInms(0x0018, 0x9328); Tag const CTImageFrameTypeSequence(0x0018, 0x9329); Tag const XRayTubeCurrentInmA(0x0018, 0x9330); Tag const ExposureInmAs(0x0018, 0x9332); Tag const ConstantVolumeFlag(0x0018, 0x9333); Tag const FluoroscopyFlag(0x0018, 0x9334); Tag const DistanceSourceToDataCollectionCenter(0x0018, 0x9335); Tag const ContrastBolusAgentNumber(0x0018, 0x9337); Tag const ContrastBolusIngredientCodeSequence(0x0018, 0x9338); Tag const ContrastAdministrationProfileSequence(0x0018, 0x9340); Tag const ContrastBolusUsageSequence(0x0018, 0x9341); Tag const ContrastBolusAgentAdministered(0x0018, 0x9342); Tag const ContrastBolusAgentDetected(0x0018, 0x9343); Tag const ContrastBolusAgentPhase(0x0018, 0x9344); Tag const CTDIvol(0x0018, 0x9345); Tag const CTDIPhantomTypeCodeSequence(0x0018, 0x9346); Tag const CalciumScoringMassFactorPatient(0x0018, 0x9351); Tag const CalciumScoringMassFactorDevice(0x0018, 0x9352); Tag const EnergyWeightingFactor(0x0018, 0x9353); Tag const CTAdditionalXRaySourceSequence(0x0018, 0x9360); Tag const MultienergyCTAcquisition(0x0018, 0x9361); Tag const MultienergyCTAcquisitionSequence(0x0018, 0x9362); Tag const MultienergyCTProcessingSequence(0x0018, 0x9363); Tag const MultienergyCTCharacteristicsSequence(0x0018, 0x9364); Tag const MultienergyCTXRaySourceSequence(0x0018, 0x9365); Tag const XRaySourceIndex(0x0018, 0x9366); Tag const XRaySourceID(0x0018, 0x9367); Tag const MultienergySourceTechnique(0x0018, 0x9368); Tag const SourceStartDateTime(0x0018, 0x9369); Tag const SourceEndDateTime(0x0018, 0x936a); Tag const SwitchingPhaseNumber(0x0018, 0x936b); Tag const SwitchingPhaseNominalDuration(0x0018, 0x936c); Tag const SwitchingPhaseTransitionDuration(0x0018, 0x936d); Tag const EffectiveBinEnergy(0x0018, 0x936e); Tag const MultienergyCTXRayDetectorSequence(0x0018, 0x936f); Tag const XRayDetectorIndex(0x0018, 0x9370); Tag const XRayDetectorID(0x0018, 0x9371); Tag const MultienergyDetectorType(0x0018, 0x9372); Tag const XRayDetectorLabel(0x0018, 0x9373); Tag const NominalMaxEnergy(0x0018, 0x9374); Tag const NominalMinEnergy(0x0018, 0x9375); Tag const ReferencedXRayDetectorIndex(0x0018, 0x9376); Tag const ReferencedXRaySourceIndex(0x0018, 0x9377); Tag const ReferencedPathIndex(0x0018, 0x9378); Tag const MultienergyCTPathSequence(0x0018, 0x9379); Tag const MultienergyCTPathIndex(0x0018, 0x937a); Tag const MultienergyAcquisitionDescription(0x0018, 0x937b); Tag const MonoenergeticEnergyEquivalent(0x0018, 0x937c); Tag const MaterialCodeSequence(0x0018, 0x937d); Tag const DecompositionMethod(0x0018, 0x937e); Tag const DecompositionDescription(0x0018, 0x937f); Tag const DecompositionAlgorithmIdentificationSequence(0x0018, 0x9380); Tag const DecompositionMaterialSequence(0x0018, 0x9381); Tag const MaterialAttenuationSequence(0x0018, 0x9382); Tag const PhotonEnergy(0x0018, 0x9383); Tag const XRayMassAttenuationCoefficient(0x0018, 0x9384); Tag const ProjectionPixelCalibrationSequence(0x0018, 0x9401); Tag const DistanceSourceToIsocenter(0x0018, 0x9402); Tag const DistanceObjectToTableTop(0x0018, 0x9403); Tag const ObjectPixelSpacingInCenterOfBeam(0x0018, 0x9404); Tag const PositionerPositionSequence(0x0018, 0x9405); Tag const TablePositionSequence(0x0018, 0x9406); Tag const CollimatorShapeSequence(0x0018, 0x9407); Tag const PlanesInAcquisition(0x0018, 0x9410); Tag const XAXRFFrameCharacteristicsSequence(0x0018, 0x9412); Tag const FrameAcquisitionSequence(0x0018, 0x9417); Tag const XRayReceptorType(0x0018, 0x9420); Tag const AcquisitionProtocolName(0x0018, 0x9423); Tag const AcquisitionProtocolDescription(0x0018, 0x9424); Tag const ContrastBolusIngredientOpaque(0x0018, 0x9425); Tag const DistanceReceptorPlaneToDetectorHousing(0x0018, 0x9426); Tag const IntensifierActiveShape(0x0018, 0x9427); Tag const IntensifierActiveDimensions(0x0018, 0x9428); Tag const PhysicalDetectorSize(0x0018, 0x9429); Tag const PositionOfIsocenterProjection(0x0018, 0x9430); Tag const FieldOfViewSequence(0x0018, 0x9432); Tag const FieldOfViewDescription(0x0018, 0x9433); Tag const ExposureControlSensingRegionsSequence(0x0018, 0x9434); Tag const ExposureControlSensingRegionShape(0x0018, 0x9435); Tag const ExposureControlSensingRegionLeftVerticalEdge(0x0018, 0x9436); Tag const ExposureControlSensingRegionRightVerticalEdge(0x0018, 0x9437); Tag const ExposureControlSensingRegionUpperHorizontalEdge(0x0018, 0x9438); Tag const ExposureControlSensingRegionLowerHorizontalEdge(0x0018, 0x9439); Tag const CenterOfCircularExposureControlSensingRegion(0x0018, 0x9440); Tag const RadiusOfCircularExposureControlSensingRegion(0x0018, 0x9441); Tag const VerticesOfThePolygonalExposureControlSensingRegion(0x0018, 0x9442); Tag const ColumnAngulationPatient(0x0018, 0x9447); Tag const BeamAngle(0x0018, 0x9449); Tag const FrameDetectorParametersSequence(0x0018, 0x9451); Tag const CalculatedAnatomyThickness(0x0018, 0x9452); Tag const CalibrationSequence(0x0018, 0x9455); Tag const ObjectThicknessSequence(0x0018, 0x9456); Tag const PlaneIdentification(0x0018, 0x9457); Tag const FieldOfViewDimensionsInFloat(0x0018, 0x9461); Tag const IsocenterReferenceSystemSequence(0x0018, 0x9462); Tag const PositionerIsocenterPrimaryAngle(0x0018, 0x9463); Tag const PositionerIsocenterSecondaryAngle(0x0018, 0x9464); Tag const PositionerIsocenterDetectorRotationAngle(0x0018, 0x9465); Tag const TableXPositionToIsocenter(0x0018, 0x9466); Tag const TableYPositionToIsocenter(0x0018, 0x9467); Tag const TableZPositionToIsocenter(0x0018, 0x9468); Tag const TableHorizontalRotationAngle(0x0018, 0x9469); Tag const TableHeadTiltAngle(0x0018, 0x9470); Tag const TableCradleTiltAngle(0x0018, 0x9471); Tag const FrameDisplayShutterSequence(0x0018, 0x9472); Tag const AcquiredImageAreaDoseProduct(0x0018, 0x9473); Tag const CArmPositionerTabletopRelationship(0x0018, 0x9474); Tag const XRayGeometrySequence(0x0018, 0x9476); Tag const IrradiationEventIdentificationSequence(0x0018, 0x9477); Tag const XRay3DFrameTypeSequence(0x0018, 0x9504); Tag const ContributingSourcesSequence(0x0018, 0x9506); Tag const XRay3DAcquisitionSequence(0x0018, 0x9507); Tag const PrimaryPositionerScanArc(0x0018, 0x9508); Tag const SecondaryPositionerScanArc(0x0018, 0x9509); Tag const PrimaryPositionerScanStartAngle(0x0018, 0x9510); Tag const SecondaryPositionerScanStartAngle(0x0018, 0x9511); Tag const PrimaryPositionerIncrement(0x0018, 0x9514); Tag const SecondaryPositionerIncrement(0x0018, 0x9515); Tag const StartAcquisitionDateTime(0x0018, 0x9516); Tag const EndAcquisitionDateTime(0x0018, 0x9517); Tag const PrimaryPositionerIncrementSign(0x0018, 0x9518); Tag const SecondaryPositionerIncrementSign(0x0018, 0x9519); Tag const ApplicationName(0x0018, 0x9524); Tag const ApplicationVersion(0x0018, 0x9525); Tag const ApplicationManufacturer(0x0018, 0x9526); Tag const AlgorithmType(0x0018, 0x9527); Tag const AlgorithmDescription(0x0018, 0x9528); Tag const XRay3DReconstructionSequence(0x0018, 0x9530); Tag const ReconstructionDescription(0x0018, 0x9531); Tag const PerProjectionAcquisitionSequence(0x0018, 0x9538); Tag const DetectorPositionSequence(0x0018, 0x9541); Tag const XRayAcquisitionDoseSequence(0x0018, 0x9542); Tag const XRaySourceIsocenterPrimaryAngle(0x0018, 0x9543); Tag const XRaySourceIsocenterSecondaryAngle(0x0018, 0x9544); Tag const BreastSupportIsocenterPrimaryAngle(0x0018, 0x9545); Tag const BreastSupportIsocenterSecondaryAngle(0x0018, 0x9546); Tag const BreastSupportXPositionToIsocenter(0x0018, 0x9547); Tag const BreastSupportYPositionToIsocenter(0x0018, 0x9548); Tag const BreastSupportZPositionToIsocenter(0x0018, 0x9549); Tag const DetectorIsocenterPrimaryAngle(0x0018, 0x9550); Tag const DetectorIsocenterSecondaryAngle(0x0018, 0x9551); Tag const DetectorXPositionToIsocenter(0x0018, 0x9552); Tag const DetectorYPositionToIsocenter(0x0018, 0x9553); Tag const DetectorZPositionToIsocenter(0x0018, 0x9554); Tag const XRayGridSequence(0x0018, 0x9555); Tag const XRayFilterSequence(0x0018, 0x9556); Tag const DetectorActiveAreaTLHCPosition(0x0018, 0x9557); Tag const DetectorActiveAreaOrientation(0x0018, 0x9558); Tag const PositionerPrimaryAngleDirection(0x0018, 0x9559); Tag const DiffusionBMatrixSequence(0x0018, 0x9601); Tag const DiffusionBValueXX(0x0018, 0x9602); Tag const DiffusionBValueXY(0x0018, 0x9603); Tag const DiffusionBValueXZ(0x0018, 0x9604); Tag const DiffusionBValueYY(0x0018, 0x9605); Tag const DiffusionBValueYZ(0x0018, 0x9606); Tag const DiffusionBValueZZ(0x0018, 0x9607); Tag const FunctionalMRSequence(0x0018, 0x9621); Tag const FunctionalSettlingPhaseFramesPresent(0x0018, 0x9622); Tag const FunctionalSyncPulse(0x0018, 0x9623); Tag const SettlingPhaseFrame(0x0018, 0x9624); Tag const DecayCorrectionDateTime(0x0018, 0x9701); Tag const StartDensityThreshold(0x0018, 0x9715); Tag const StartRelativeDensityDifferenceThreshold(0x0018, 0x9716); Tag const StartCardiacTriggerCountThreshold(0x0018, 0x9717); Tag const StartRespiratoryTriggerCountThreshold(0x0018, 0x9718); Tag const TerminationCountsThreshold(0x0018, 0x9719); Tag const TerminationDensityThreshold(0x0018, 0x9720); Tag const TerminationRelativeDensityThreshold(0x0018, 0x9721); Tag const TerminationTimeThreshold(0x0018, 0x9722); Tag const TerminationCardiacTriggerCountThreshold(0x0018, 0x9723); Tag const TerminationRespiratoryTriggerCountThreshold(0x0018, 0x9724); Tag const DetectorGeometry(0x0018, 0x9725); Tag const TransverseDetectorSeparation(0x0018, 0x9726); Tag const AxialDetectorDimension(0x0018, 0x9727); Tag const RadiopharmaceuticalAgentNumber(0x0018, 0x9729); Tag const PETFrameAcquisitionSequence(0x0018, 0x9732); Tag const PETDetectorMotionDetailsSequence(0x0018, 0x9733); Tag const PETTableDynamicsSequence(0x0018, 0x9734); Tag const PETPositionSequence(0x0018, 0x9735); Tag const PETFrameCorrectionFactorsSequence(0x0018, 0x9736); Tag const RadiopharmaceuticalUsageSequence(0x0018, 0x9737); Tag const AttenuationCorrectionSource(0x0018, 0x9738); Tag const NumberOfIterations(0x0018, 0x9739); Tag const NumberOfSubsets(0x0018, 0x9740); Tag const PETReconstructionSequence(0x0018, 0x9749); Tag const PETFrameTypeSequence(0x0018, 0x9751); Tag const TimeOfFlightInformationUsed(0x0018, 0x9755); Tag const ReconstructionType(0x0018, 0x9756); Tag const DecayCorrected(0x0018, 0x9758); Tag const AttenuationCorrected(0x0018, 0x9759); Tag const ScatterCorrected(0x0018, 0x9760); Tag const DeadTimeCorrected(0x0018, 0x9761); Tag const GantryMotionCorrected(0x0018, 0x9762); Tag const PatientMotionCorrected(0x0018, 0x9763); Tag const CountLossNormalizationCorrected(0x0018, 0x9764); Tag const RandomsCorrected(0x0018, 0x9765); Tag const NonUniformRadialSamplingCorrected(0x0018, 0x9766); Tag const SensitivityCalibrated(0x0018, 0x9767); Tag const DetectorNormalizationCorrection(0x0018, 0x9768); Tag const IterativeReconstructionMethod(0x0018, 0x9769); Tag const AttenuationCorrectionTemporalRelationship(0x0018, 0x9770); Tag const PatientPhysiologicalStateSequence(0x0018, 0x9771); Tag const PatientPhysiologicalStateCodeSequence(0x0018, 0x9772); Tag const DepthsOfFocus(0x0018, 0x9801); Tag const ExcludedIntervalsSequence(0x0018, 0x9803); Tag const ExclusionStartDateTime(0x0018, 0x9804); Tag const ExclusionDuration(0x0018, 0x9805); Tag const USImageDescriptionSequence(0x0018, 0x9806); Tag const ImageDataTypeSequence(0x0018, 0x9807); Tag const DataType(0x0018, 0x9808); Tag const TransducerScanPatternCodeSequence(0x0018, 0x9809); Tag const AliasedDataType(0x0018, 0x980b); Tag const PositionMeasuringDeviceUsed(0x0018, 0x980c); Tag const TransducerGeometryCodeSequence(0x0018, 0x980d); Tag const TransducerBeamSteeringCodeSequence(0x0018, 0x980e); Tag const TransducerApplicationCodeSequence(0x0018, 0x980f); Tag const ZeroVelocityPixelValue(0x0018, 0x9810); Tag const ReferenceLocationLabel(0x0018, 0x9900); Tag const ReferenceLocationDescription(0x0018, 0x9901); Tag const ReferenceBasisCodeSequence(0x0018, 0x9902); Tag const ReferenceGeometryCodeSequence(0x0018, 0x9903); Tag const OffsetDistance(0x0018, 0x9904); Tag const OffsetDirection(0x0018, 0x9905); Tag const PotentialScheduledProtocolCodeSequence(0x0018, 0x9906); Tag const PotentialRequestedProcedureCodeSequence(0x0018, 0x9907); Tag const PotentialReasonsForProcedure(0x0018, 0x9908); Tag const PotentialReasonsForProcedureCodeSequence(0x0018, 0x9909); Tag const PotentialDiagnosticTasks(0x0018, 0x990a); Tag const ContraindicationsCodeSequence(0x0018, 0x990b); Tag const ReferencedDefinedProtocolSequence(0x0018, 0x990c); Tag const ReferencedPerformedProtocolSequence(0x0018, 0x990d); Tag const PredecessorProtocolSequence(0x0018, 0x990e); Tag const ProtocolPlanningInformation(0x0018, 0x990f); Tag const ProtocolDesignRationale(0x0018, 0x9910); Tag const PatientSpecificationSequence(0x0018, 0x9911); Tag const ModelSpecificationSequence(0x0018, 0x9912); Tag const ParametersSpecificationSequence(0x0018, 0x9913); Tag const InstructionSequence(0x0018, 0x9914); Tag const InstructionIndex(0x0018, 0x9915); Tag const InstructionText(0x0018, 0x9916); Tag const InstructionDescription(0x0018, 0x9917); Tag const InstructionPerformedFlag(0x0018, 0x9918); Tag const InstructionPerformedDateTime(0x0018, 0x9919); Tag const InstructionPerformanceComment(0x0018, 0x991a); Tag const PatientPositioningInstructionSequence(0x0018, 0x991b); Tag const PositioningMethodCodeSequence(0x0018, 0x991c); Tag const PositioningLandmarkSequence(0x0018, 0x991d); Tag const TargetFrameOfReferenceUID(0x0018, 0x991e); Tag const AcquisitionProtocolElementSpecificationSequence(0x0018, 0x991f); Tag const AcquisitionProtocolElementSequence(0x0018, 0x9920); Tag const ProtocolElementNumber(0x0018, 0x9921); Tag const ProtocolElementName(0x0018, 0x9922); Tag const ProtocolElementCharacteristicsSummary(0x0018, 0x9923); Tag const ProtocolElementPurpose(0x0018, 0x9924); Tag const AcquisitionMotion(0x0018, 0x9930); Tag const AcquisitionStartLocationSequence(0x0018, 0x9931); Tag const AcquisitionEndLocationSequence(0x0018, 0x9932); Tag const ReconstructionProtocolElementSpecificationSequence(0x0018, 0x9933); Tag const ReconstructionProtocolElementSequence(0x0018, 0x9934); Tag const StorageProtocolElementSpecificationSequence(0x0018, 0x9935); Tag const StorageProtocolElementSequence(0x0018, 0x9936); Tag const RequestedSeriesDescription(0x0018, 0x9937); Tag const SourceAcquisitionProtocolElementNumber(0x0018, 0x9938); Tag const SourceAcquisitionBeamNumber(0x0018, 0x9939); Tag const SourceReconstructionProtocolElementNumber(0x0018, 0x993a); Tag const ReconstructionStartLocationSequence(0x0018, 0x993b); Tag const ReconstructionEndLocationSequence(0x0018, 0x993c); Tag const ReconstructionAlgorithmSequence(0x0018, 0x993d); Tag const ReconstructionTargetCenterLocationSequence(0x0018, 0x993e); Tag const ImageFilterDescription(0x0018, 0x9941); Tag const CTDIvolNotificationTrigger(0x0018, 0x9942); Tag const DLPNotificationTrigger(0x0018, 0x9943); Tag const AutoKVPSelectionType(0x0018, 0x9944); Tag const AutoKVPUpperBound(0x0018, 0x9945); Tag const AutoKVPLowerBound(0x0018, 0x9946); Tag const ProtocolDefinedPatientPosition(0x0018, 0x9947); Tag const ContributingEquipmentSequence(0x0018, 0xa001); Tag const ContributionDateTime(0x0018, 0xa002); Tag const ContributionDescription(0x0018, 0xa003); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0018odil-0.11.0/src/odil/registry_0020.cpp000066400000000000000000000643331362244656000172740ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0020( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0020, 0x000d), ElementsDictionaryEntry("Study Instance UID", "StudyInstanceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0020, 0x000e), ElementsDictionaryEntry("Series Instance UID", "SeriesInstanceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0020, 0x0010), ElementsDictionaryEntry("Study ID", "StudyID", "SH", "1")); public_dictionary.emplace(Tag(0x0020, 0x0011), ElementsDictionaryEntry("Series Number", "SeriesNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0012), ElementsDictionaryEntry("Acquisition Number", "AcquisitionNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0013), ElementsDictionaryEntry("Instance Number", "InstanceNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0014), ElementsDictionaryEntry("Isotope Number", "IsotopeNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0015), ElementsDictionaryEntry("Phase Number", "PhaseNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0016), ElementsDictionaryEntry("Interval Number", "IntervalNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0017), ElementsDictionaryEntry("Time Slot Number", "TimeSlotNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0018), ElementsDictionaryEntry("Angle Number", "AngleNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0019), ElementsDictionaryEntry("Item Number", "ItemNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0020), ElementsDictionaryEntry("Patient Orientation", "PatientOrientation", "CS", "2")); public_dictionary.emplace(Tag(0x0020, 0x0022), ElementsDictionaryEntry("Overlay Number", "OverlayNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0024), ElementsDictionaryEntry("Curve Number", "CurveNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0026), ElementsDictionaryEntry("LUT Number", "LUTNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0030), ElementsDictionaryEntry("Image Position", "ImagePosition", "DS", "3")); public_dictionary.emplace(Tag(0x0020, 0x0032), ElementsDictionaryEntry("Image Position (Patient)", "ImagePositionPatient", "DS", "3")); public_dictionary.emplace(Tag(0x0020, 0x0035), ElementsDictionaryEntry("Image Orientation", "ImageOrientation", "DS", "6")); public_dictionary.emplace(Tag(0x0020, 0x0037), ElementsDictionaryEntry("Image Orientation (Patient)", "ImageOrientationPatient", "DS", "6")); public_dictionary.emplace(Tag(0x0020, 0x0050), ElementsDictionaryEntry("Location", "Location", "DS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0052), ElementsDictionaryEntry("Frame of Reference UID", "FrameOfReferenceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0020, 0x0060), ElementsDictionaryEntry("Laterality", "Laterality", "CS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0062), ElementsDictionaryEntry("Image Laterality", "ImageLaterality", "CS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0070), ElementsDictionaryEntry("Image Geometry Type", "ImageGeometryType", "LO", "1")); public_dictionary.emplace(Tag(0x0020, 0x0080), ElementsDictionaryEntry("Masking Image", "MaskingImage", "CS", "1-n")); public_dictionary.emplace(Tag(0x0020, 0x00aa), ElementsDictionaryEntry("Report Number", "ReportNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0100), ElementsDictionaryEntry("Temporal Position Identifier", "TemporalPositionIdentifier", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0105), ElementsDictionaryEntry("Number of Temporal Positions", "NumberOfTemporalPositions", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0110), ElementsDictionaryEntry("Temporal Resolution", "TemporalResolution", "DS", "1")); public_dictionary.emplace(Tag(0x0020, 0x0200), ElementsDictionaryEntry("Synchronization Frame of Reference UID", "SynchronizationFrameOfReferenceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0020, 0x0242), ElementsDictionaryEntry("SOP Instance UID of Concatenation Source", "SOPInstanceUIDOfConcatenationSource", "UI", "1")); public_dictionary.emplace(Tag(0x0020, 0x1000), ElementsDictionaryEntry("Series in Study", "SeriesInStudy", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x1001), ElementsDictionaryEntry("Acquisitions in Series", "AcquisitionsInSeries", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x1002), ElementsDictionaryEntry("Images in Acquisition", "ImagesInAcquisition", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x1003), ElementsDictionaryEntry("Images in Series", "ImagesInSeries", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x1004), ElementsDictionaryEntry("Acquisitions in Study", "AcquisitionsInStudy", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x1005), ElementsDictionaryEntry("Images in Study", "ImagesInStudy", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x1020), ElementsDictionaryEntry("Reference", "Reference", "LO", "1-n")); public_dictionary.emplace(Tag(0x0020, 0x103f), ElementsDictionaryEntry("Target Position Reference Indicator", "TargetPositionReferenceIndicator", "LO", "1")); public_dictionary.emplace(Tag(0x0020, 0x1040), ElementsDictionaryEntry("Position Reference Indicator", "PositionReferenceIndicator", "LO", "1")); public_dictionary.emplace(Tag(0x0020, 0x1041), ElementsDictionaryEntry("Slice Location", "SliceLocation", "DS", "1")); public_dictionary.emplace(Tag(0x0020, 0x1070), ElementsDictionaryEntry("Other Study Numbers", "OtherStudyNumbers", "IS", "1-n")); public_dictionary.emplace(Tag(0x0020, 0x1200), ElementsDictionaryEntry("Number of Patient Related Studies", "NumberOfPatientRelatedStudies", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x1202), ElementsDictionaryEntry("Number of Patient Related Series", "NumberOfPatientRelatedSeries", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x1204), ElementsDictionaryEntry("Number of Patient Related Instances", "NumberOfPatientRelatedInstances", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x1206), ElementsDictionaryEntry("Number of Study Related Series", "NumberOfStudyRelatedSeries", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x1208), ElementsDictionaryEntry("Number of Study Related Instances", "NumberOfStudyRelatedInstances", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x1209), ElementsDictionaryEntry("Number of Series Related Instances", "NumberOfSeriesRelatedInstances", "IS", "1")); public_dictionary.emplace(Tag(0x0020, 0x3401), ElementsDictionaryEntry("Modifying Device ID", "ModifyingDeviceID", "CS", "1")); public_dictionary.emplace(Tag(0x0020, 0x3402), ElementsDictionaryEntry("Modified Image ID", "ModifiedImageID", "CS", "1")); public_dictionary.emplace(Tag(0x0020, 0x3403), ElementsDictionaryEntry("Modified Image Date", "ModifiedImageDate", "DA", "1")); public_dictionary.emplace(Tag(0x0020, 0x3404), ElementsDictionaryEntry("Modifying Device Manufacturer", "ModifyingDeviceManufacturer", "LO", "1")); public_dictionary.emplace(Tag(0x0020, 0x3405), ElementsDictionaryEntry("Modified Image Time", "ModifiedImageTime", "TM", "1")); public_dictionary.emplace(Tag(0x0020, 0x3406), ElementsDictionaryEntry("Modified Image Description", "ModifiedImageDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0020, 0x4000), ElementsDictionaryEntry("Image Comments", "ImageComments", "LT", "1")); public_dictionary.emplace(Tag(0x0020, 0x5000), ElementsDictionaryEntry("Original Image Identification", "OriginalImageIdentification", "AT", "1-n")); public_dictionary.emplace(Tag(0x0020, 0x5002), ElementsDictionaryEntry("Original Image Identification Nomenclature", "OriginalImageIdentificationNomenclature", "LO", "1-n")); public_dictionary.emplace(Tag(0x0020, 0x9056), ElementsDictionaryEntry("Stack ID", "StackID", "SH", "1")); public_dictionary.emplace(Tag(0x0020, 0x9057), ElementsDictionaryEntry("In-Stack Position Number", "InStackPositionNumber", "UL", "1")); public_dictionary.emplace(Tag(0x0020, 0x9071), ElementsDictionaryEntry("Frame Anatomy Sequence", "FrameAnatomySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x9072), ElementsDictionaryEntry("Frame Laterality", "FrameLaterality", "CS", "1")); public_dictionary.emplace(Tag(0x0020, 0x9111), ElementsDictionaryEntry("Frame Content Sequence", "FrameContentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x9113), ElementsDictionaryEntry("Plane Position Sequence", "PlanePositionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x9116), ElementsDictionaryEntry("Plane Orientation Sequence", "PlaneOrientationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x9128), ElementsDictionaryEntry("Temporal Position Index", "TemporalPositionIndex", "UL", "1")); public_dictionary.emplace(Tag(0x0020, 0x9153), ElementsDictionaryEntry("Nominal Cardiac Trigger Delay Time", "NominalCardiacTriggerDelayTime", "FD", "1")); public_dictionary.emplace(Tag(0x0020, 0x9154), ElementsDictionaryEntry("Nominal Cardiac Trigger Time Prior To R-Peak", "NominalCardiacTriggerTimePriorToRPeak", "FL", "1")); public_dictionary.emplace(Tag(0x0020, 0x9155), ElementsDictionaryEntry("Actual Cardiac Trigger Time Prior To R-Peak", "ActualCardiacTriggerTimePriorToRPeak", "FL", "1")); public_dictionary.emplace(Tag(0x0020, 0x9156), ElementsDictionaryEntry("Frame Acquisition Number", "FrameAcquisitionNumber", "US", "1")); public_dictionary.emplace(Tag(0x0020, 0x9157), ElementsDictionaryEntry("Dimension Index Values", "DimensionIndexValues", "UL", "1-n")); public_dictionary.emplace(Tag(0x0020, 0x9158), ElementsDictionaryEntry("Frame Comments", "FrameComments", "LT", "1")); public_dictionary.emplace(Tag(0x0020, 0x9161), ElementsDictionaryEntry("Concatenation UID", "ConcatenationUID", "UI", "1")); public_dictionary.emplace(Tag(0x0020, 0x9162), ElementsDictionaryEntry("In-concatenation Number", "InConcatenationNumber", "US", "1")); public_dictionary.emplace(Tag(0x0020, 0x9163), ElementsDictionaryEntry("In-concatenation Total Number", "InConcatenationTotalNumber", "US", "1")); public_dictionary.emplace(Tag(0x0020, 0x9164), ElementsDictionaryEntry("Dimension Organization UID", "DimensionOrganizationUID", "UI", "1")); public_dictionary.emplace(Tag(0x0020, 0x9165), ElementsDictionaryEntry("Dimension Index Pointer", "DimensionIndexPointer", "AT", "1")); public_dictionary.emplace(Tag(0x0020, 0x9167), ElementsDictionaryEntry("Functional Group Pointer", "FunctionalGroupPointer", "AT", "1")); public_dictionary.emplace(Tag(0x0020, 0x9170), ElementsDictionaryEntry("Unassigned Shared Converted Attributes Sequence", "UnassignedSharedConvertedAttributesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x9171), ElementsDictionaryEntry("Unassigned Per-Frame Converted Attributes Sequence", "UnassignedPerFrameConvertedAttributesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x9172), ElementsDictionaryEntry("Conversion Source Attributes Sequence", "ConversionSourceAttributesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x9213), ElementsDictionaryEntry("Dimension Index Private Creator", "DimensionIndexPrivateCreator", "LO", "1")); public_dictionary.emplace(Tag(0x0020, 0x9221), ElementsDictionaryEntry("Dimension Organization Sequence", "DimensionOrganizationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x9222), ElementsDictionaryEntry("Dimension Index Sequence", "DimensionIndexSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x9228), ElementsDictionaryEntry("Concatenation Frame Offset Number", "ConcatenationFrameOffsetNumber", "UL", "1")); public_dictionary.emplace(Tag(0x0020, 0x9238), ElementsDictionaryEntry("Functional Group Private Creator", "FunctionalGroupPrivateCreator", "LO", "1")); public_dictionary.emplace(Tag(0x0020, 0x9241), ElementsDictionaryEntry("Nominal Percentage of Cardiac Phase", "NominalPercentageOfCardiacPhase", "FL", "1")); public_dictionary.emplace(Tag(0x0020, 0x9245), ElementsDictionaryEntry("Nominal Percentage of Respiratory Phase", "NominalPercentageOfRespiratoryPhase", "FL", "1")); public_dictionary.emplace(Tag(0x0020, 0x9246), ElementsDictionaryEntry("Starting Respiratory Amplitude", "StartingRespiratoryAmplitude", "FL", "1")); public_dictionary.emplace(Tag(0x0020, 0x9247), ElementsDictionaryEntry("Starting Respiratory Phase", "StartingRespiratoryPhase", "CS", "1")); public_dictionary.emplace(Tag(0x0020, 0x9248), ElementsDictionaryEntry("Ending Respiratory Amplitude", "EndingRespiratoryAmplitude", "FL", "1")); public_dictionary.emplace(Tag(0x0020, 0x9249), ElementsDictionaryEntry("Ending Respiratory Phase", "EndingRespiratoryPhase", "CS", "1")); public_dictionary.emplace(Tag(0x0020, 0x9250), ElementsDictionaryEntry("Respiratory Trigger Type", "RespiratoryTriggerType", "CS", "1")); public_dictionary.emplace(Tag(0x0020, 0x9251), ElementsDictionaryEntry("R-R Interval Time Nominal", "RRIntervalTimeNominal", "FD", "1")); public_dictionary.emplace(Tag(0x0020, 0x9252), ElementsDictionaryEntry("Actual Cardiac Trigger Delay Time", "ActualCardiacTriggerDelayTime", "FD", "1")); public_dictionary.emplace(Tag(0x0020, 0x9253), ElementsDictionaryEntry("Respiratory Synchronization Sequence", "RespiratorySynchronizationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x9254), ElementsDictionaryEntry("Respiratory Interval Time", "RespiratoryIntervalTime", "FD", "1")); public_dictionary.emplace(Tag(0x0020, 0x9255), ElementsDictionaryEntry("Nominal Respiratory Trigger Delay Time", "NominalRespiratoryTriggerDelayTime", "FD", "1")); public_dictionary.emplace(Tag(0x0020, 0x9256), ElementsDictionaryEntry("Respiratory Trigger Delay Threshold", "RespiratoryTriggerDelayThreshold", "FD", "1")); public_dictionary.emplace(Tag(0x0020, 0x9257), ElementsDictionaryEntry("Actual Respiratory Trigger Delay Time", "ActualRespiratoryTriggerDelayTime", "FD", "1")); public_dictionary.emplace(Tag(0x0020, 0x9301), ElementsDictionaryEntry("Image Position (Volume)", "ImagePositionVolume", "FD", "3")); public_dictionary.emplace(Tag(0x0020, 0x9302), ElementsDictionaryEntry("Image Orientation (Volume)", "ImageOrientationVolume", "FD", "6")); public_dictionary.emplace(Tag(0x0020, 0x9307), ElementsDictionaryEntry("Ultrasound Acquisition Geometry", "UltrasoundAcquisitionGeometry", "CS", "1")); public_dictionary.emplace(Tag(0x0020, 0x9308), ElementsDictionaryEntry("Apex Position", "ApexPosition", "FD", "3")); public_dictionary.emplace(Tag(0x0020, 0x9309), ElementsDictionaryEntry("Volume to Transducer Mapping Matrix", "VolumeToTransducerMappingMatrix", "FD", "16")); public_dictionary.emplace(Tag(0x0020, 0x930a), ElementsDictionaryEntry("Volume to Table Mapping Matrix", "VolumeToTableMappingMatrix", "FD", "16")); public_dictionary.emplace(Tag(0x0020, 0x930b), ElementsDictionaryEntry("Volume to Transducer Relationship", "VolumeToTransducerRelationship", "CS", "1")); public_dictionary.emplace(Tag(0x0020, 0x930c), ElementsDictionaryEntry("Patient Frame of Reference Source", "PatientFrameOfReferenceSource", "CS", "1")); public_dictionary.emplace(Tag(0x0020, 0x930d), ElementsDictionaryEntry("Temporal Position Time Offset", "TemporalPositionTimeOffset", "FD", "1")); public_dictionary.emplace(Tag(0x0020, 0x930e), ElementsDictionaryEntry("Plane Position (Volume) Sequence", "PlanePositionVolumeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x930f), ElementsDictionaryEntry("Plane Orientation (Volume) Sequence", "PlaneOrientationVolumeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x9310), ElementsDictionaryEntry("Temporal Position Sequence", "TemporalPositionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x9311), ElementsDictionaryEntry("Dimension Organization Type", "DimensionOrganizationType", "CS", "1")); public_dictionary.emplace(Tag(0x0020, 0x9312), ElementsDictionaryEntry("Volume Frame of Reference UID", "VolumeFrameOfReferenceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0020, 0x9313), ElementsDictionaryEntry("Table Frame of Reference UID", "TableFrameOfReferenceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0020, 0x9421), ElementsDictionaryEntry("Dimension Description Label", "DimensionDescriptionLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0020, 0x9450), ElementsDictionaryEntry("Patient Orientation in Frame Sequence", "PatientOrientationInFrameSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x9453), ElementsDictionaryEntry("Frame Label", "FrameLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0020, 0x9518), ElementsDictionaryEntry("Acquisition Index", "AcquisitionIndex", "US", "1-n")); public_dictionary.emplace(Tag(0x0020, 0x9529), ElementsDictionaryEntry("Contributing SOP Instances Reference Sequence", "ContributingSOPInstancesReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0020, 0x9536), ElementsDictionaryEntry("Reconstruction Index", "ReconstructionIndex", "US", "1")); public_tags.emplace("StudyInstanceUID", Tag(0x0020, 0x000d)); public_tags.emplace("SeriesInstanceUID", Tag(0x0020, 0x000e)); public_tags.emplace("StudyID", Tag(0x0020, 0x0010)); public_tags.emplace("SeriesNumber", Tag(0x0020, 0x0011)); public_tags.emplace("AcquisitionNumber", Tag(0x0020, 0x0012)); public_tags.emplace("InstanceNumber", Tag(0x0020, 0x0013)); public_tags.emplace("IsotopeNumber", Tag(0x0020, 0x0014)); public_tags.emplace("PhaseNumber", Tag(0x0020, 0x0015)); public_tags.emplace("IntervalNumber", Tag(0x0020, 0x0016)); public_tags.emplace("TimeSlotNumber", Tag(0x0020, 0x0017)); public_tags.emplace("AngleNumber", Tag(0x0020, 0x0018)); public_tags.emplace("ItemNumber", Tag(0x0020, 0x0019)); public_tags.emplace("PatientOrientation", Tag(0x0020, 0x0020)); public_tags.emplace("OverlayNumber", Tag(0x0020, 0x0022)); public_tags.emplace("CurveNumber", Tag(0x0020, 0x0024)); public_tags.emplace("LUTNumber", Tag(0x0020, 0x0026)); public_tags.emplace("ImagePosition", Tag(0x0020, 0x0030)); public_tags.emplace("ImagePositionPatient", Tag(0x0020, 0x0032)); public_tags.emplace("ImageOrientation", Tag(0x0020, 0x0035)); public_tags.emplace("ImageOrientationPatient", Tag(0x0020, 0x0037)); public_tags.emplace("Location", Tag(0x0020, 0x0050)); public_tags.emplace("FrameOfReferenceUID", Tag(0x0020, 0x0052)); public_tags.emplace("Laterality", Tag(0x0020, 0x0060)); public_tags.emplace("ImageLaterality", Tag(0x0020, 0x0062)); public_tags.emplace("ImageGeometryType", Tag(0x0020, 0x0070)); public_tags.emplace("MaskingImage", Tag(0x0020, 0x0080)); public_tags.emplace("ReportNumber", Tag(0x0020, 0x00aa)); public_tags.emplace("TemporalPositionIdentifier", Tag(0x0020, 0x0100)); public_tags.emplace("NumberOfTemporalPositions", Tag(0x0020, 0x0105)); public_tags.emplace("TemporalResolution", Tag(0x0020, 0x0110)); public_tags.emplace("SynchronizationFrameOfReferenceUID", Tag(0x0020, 0x0200)); public_tags.emplace("SOPInstanceUIDOfConcatenationSource", Tag(0x0020, 0x0242)); public_tags.emplace("SeriesInStudy", Tag(0x0020, 0x1000)); public_tags.emplace("AcquisitionsInSeries", Tag(0x0020, 0x1001)); public_tags.emplace("ImagesInAcquisition", Tag(0x0020, 0x1002)); public_tags.emplace("ImagesInSeries", Tag(0x0020, 0x1003)); public_tags.emplace("AcquisitionsInStudy", Tag(0x0020, 0x1004)); public_tags.emplace("ImagesInStudy", Tag(0x0020, 0x1005)); public_tags.emplace("Reference", Tag(0x0020, 0x1020)); public_tags.emplace("TargetPositionReferenceIndicator", Tag(0x0020, 0x103f)); public_tags.emplace("PositionReferenceIndicator", Tag(0x0020, 0x1040)); public_tags.emplace("SliceLocation", Tag(0x0020, 0x1041)); public_tags.emplace("OtherStudyNumbers", Tag(0x0020, 0x1070)); public_tags.emplace("NumberOfPatientRelatedStudies", Tag(0x0020, 0x1200)); public_tags.emplace("NumberOfPatientRelatedSeries", Tag(0x0020, 0x1202)); public_tags.emplace("NumberOfPatientRelatedInstances", Tag(0x0020, 0x1204)); public_tags.emplace("NumberOfStudyRelatedSeries", Tag(0x0020, 0x1206)); public_tags.emplace("NumberOfStudyRelatedInstances", Tag(0x0020, 0x1208)); public_tags.emplace("NumberOfSeriesRelatedInstances", Tag(0x0020, 0x1209)); public_tags.emplace("ModifyingDeviceID", Tag(0x0020, 0x3401)); public_tags.emplace("ModifiedImageID", Tag(0x0020, 0x3402)); public_tags.emplace("ModifiedImageDate", Tag(0x0020, 0x3403)); public_tags.emplace("ModifyingDeviceManufacturer", Tag(0x0020, 0x3404)); public_tags.emplace("ModifiedImageTime", Tag(0x0020, 0x3405)); public_tags.emplace("ModifiedImageDescription", Tag(0x0020, 0x3406)); public_tags.emplace("ImageComments", Tag(0x0020, 0x4000)); public_tags.emplace("OriginalImageIdentification", Tag(0x0020, 0x5000)); public_tags.emplace("OriginalImageIdentificationNomenclature", Tag(0x0020, 0x5002)); public_tags.emplace("StackID", Tag(0x0020, 0x9056)); public_tags.emplace("InStackPositionNumber", Tag(0x0020, 0x9057)); public_tags.emplace("FrameAnatomySequence", Tag(0x0020, 0x9071)); public_tags.emplace("FrameLaterality", Tag(0x0020, 0x9072)); public_tags.emplace("FrameContentSequence", Tag(0x0020, 0x9111)); public_tags.emplace("PlanePositionSequence", Tag(0x0020, 0x9113)); public_tags.emplace("PlaneOrientationSequence", Tag(0x0020, 0x9116)); public_tags.emplace("TemporalPositionIndex", Tag(0x0020, 0x9128)); public_tags.emplace("NominalCardiacTriggerDelayTime", Tag(0x0020, 0x9153)); public_tags.emplace("NominalCardiacTriggerTimePriorToRPeak", Tag(0x0020, 0x9154)); public_tags.emplace("ActualCardiacTriggerTimePriorToRPeak", Tag(0x0020, 0x9155)); public_tags.emplace("FrameAcquisitionNumber", Tag(0x0020, 0x9156)); public_tags.emplace("DimensionIndexValues", Tag(0x0020, 0x9157)); public_tags.emplace("FrameComments", Tag(0x0020, 0x9158)); public_tags.emplace("ConcatenationUID", Tag(0x0020, 0x9161)); public_tags.emplace("InConcatenationNumber", Tag(0x0020, 0x9162)); public_tags.emplace("InConcatenationTotalNumber", Tag(0x0020, 0x9163)); public_tags.emplace("DimensionOrganizationUID", Tag(0x0020, 0x9164)); public_tags.emplace("DimensionIndexPointer", Tag(0x0020, 0x9165)); public_tags.emplace("FunctionalGroupPointer", Tag(0x0020, 0x9167)); public_tags.emplace("UnassignedSharedConvertedAttributesSequence", Tag(0x0020, 0x9170)); public_tags.emplace("UnassignedPerFrameConvertedAttributesSequence", Tag(0x0020, 0x9171)); public_tags.emplace("ConversionSourceAttributesSequence", Tag(0x0020, 0x9172)); public_tags.emplace("DimensionIndexPrivateCreator", Tag(0x0020, 0x9213)); public_tags.emplace("DimensionOrganizationSequence", Tag(0x0020, 0x9221)); public_tags.emplace("DimensionIndexSequence", Tag(0x0020, 0x9222)); public_tags.emplace("ConcatenationFrameOffsetNumber", Tag(0x0020, 0x9228)); public_tags.emplace("FunctionalGroupPrivateCreator", Tag(0x0020, 0x9238)); public_tags.emplace("NominalPercentageOfCardiacPhase", Tag(0x0020, 0x9241)); public_tags.emplace("NominalPercentageOfRespiratoryPhase", Tag(0x0020, 0x9245)); public_tags.emplace("StartingRespiratoryAmplitude", Tag(0x0020, 0x9246)); public_tags.emplace("StartingRespiratoryPhase", Tag(0x0020, 0x9247)); public_tags.emplace("EndingRespiratoryAmplitude", Tag(0x0020, 0x9248)); public_tags.emplace("EndingRespiratoryPhase", Tag(0x0020, 0x9249)); public_tags.emplace("RespiratoryTriggerType", Tag(0x0020, 0x9250)); public_tags.emplace("RRIntervalTimeNominal", Tag(0x0020, 0x9251)); public_tags.emplace("ActualCardiacTriggerDelayTime", Tag(0x0020, 0x9252)); public_tags.emplace("RespiratorySynchronizationSequence", Tag(0x0020, 0x9253)); public_tags.emplace("RespiratoryIntervalTime", Tag(0x0020, 0x9254)); public_tags.emplace("NominalRespiratoryTriggerDelayTime", Tag(0x0020, 0x9255)); public_tags.emplace("RespiratoryTriggerDelayThreshold", Tag(0x0020, 0x9256)); public_tags.emplace("ActualRespiratoryTriggerDelayTime", Tag(0x0020, 0x9257)); public_tags.emplace("ImagePositionVolume", Tag(0x0020, 0x9301)); public_tags.emplace("ImageOrientationVolume", Tag(0x0020, 0x9302)); public_tags.emplace("UltrasoundAcquisitionGeometry", Tag(0x0020, 0x9307)); public_tags.emplace("ApexPosition", Tag(0x0020, 0x9308)); public_tags.emplace("VolumeToTransducerMappingMatrix", Tag(0x0020, 0x9309)); public_tags.emplace("VolumeToTableMappingMatrix", Tag(0x0020, 0x930a)); public_tags.emplace("VolumeToTransducerRelationship", Tag(0x0020, 0x930b)); public_tags.emplace("PatientFrameOfReferenceSource", Tag(0x0020, 0x930c)); public_tags.emplace("TemporalPositionTimeOffset", Tag(0x0020, 0x930d)); public_tags.emplace("PlanePositionVolumeSequence", Tag(0x0020, 0x930e)); public_tags.emplace("PlaneOrientationVolumeSequence", Tag(0x0020, 0x930f)); public_tags.emplace("TemporalPositionSequence", Tag(0x0020, 0x9310)); public_tags.emplace("DimensionOrganizationType", Tag(0x0020, 0x9311)); public_tags.emplace("VolumeFrameOfReferenceUID", Tag(0x0020, 0x9312)); public_tags.emplace("TableFrameOfReferenceUID", Tag(0x0020, 0x9313)); public_tags.emplace("DimensionDescriptionLabel", Tag(0x0020, 0x9421)); public_tags.emplace("PatientOrientationInFrameSequence", Tag(0x0020, 0x9450)); public_tags.emplace("FrameLabel", Tag(0x0020, 0x9453)); public_tags.emplace("AcquisitionIndex", Tag(0x0020, 0x9518)); public_tags.emplace("ContributingSOPInstancesReferenceSequence", Tag(0x0020, 0x9529)); public_tags.emplace("ReconstructionIndex", Tag(0x0020, 0x9536)); } } }odil-0.11.0/src/odil/registry_0020.h000066400000000000000000000151531362244656000167350ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0020 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0020 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const StudyInstanceUID(0x0020, 0x000d); Tag const SeriesInstanceUID(0x0020, 0x000e); Tag const StudyID(0x0020, 0x0010); Tag const SeriesNumber(0x0020, 0x0011); Tag const AcquisitionNumber(0x0020, 0x0012); Tag const InstanceNumber(0x0020, 0x0013); Tag const IsotopeNumber(0x0020, 0x0014); Tag const PhaseNumber(0x0020, 0x0015); Tag const IntervalNumber(0x0020, 0x0016); Tag const TimeSlotNumber(0x0020, 0x0017); Tag const AngleNumber(0x0020, 0x0018); Tag const ItemNumber(0x0020, 0x0019); Tag const PatientOrientation(0x0020, 0x0020); Tag const OverlayNumber(0x0020, 0x0022); Tag const CurveNumber(0x0020, 0x0024); Tag const LUTNumber(0x0020, 0x0026); Tag const ImagePosition(0x0020, 0x0030); Tag const ImagePositionPatient(0x0020, 0x0032); Tag const ImageOrientation(0x0020, 0x0035); Tag const ImageOrientationPatient(0x0020, 0x0037); Tag const Location(0x0020, 0x0050); Tag const FrameOfReferenceUID(0x0020, 0x0052); Tag const Laterality(0x0020, 0x0060); Tag const ImageLaterality(0x0020, 0x0062); Tag const ImageGeometryType(0x0020, 0x0070); Tag const MaskingImage(0x0020, 0x0080); Tag const ReportNumber(0x0020, 0x00aa); Tag const TemporalPositionIdentifier(0x0020, 0x0100); Tag const NumberOfTemporalPositions(0x0020, 0x0105); Tag const TemporalResolution(0x0020, 0x0110); Tag const SynchronizationFrameOfReferenceUID(0x0020, 0x0200); Tag const SOPInstanceUIDOfConcatenationSource(0x0020, 0x0242); Tag const SeriesInStudy(0x0020, 0x1000); Tag const AcquisitionsInSeries(0x0020, 0x1001); Tag const ImagesInAcquisition(0x0020, 0x1002); Tag const ImagesInSeries(0x0020, 0x1003); Tag const AcquisitionsInStudy(0x0020, 0x1004); Tag const ImagesInStudy(0x0020, 0x1005); Tag const Reference(0x0020, 0x1020); Tag const TargetPositionReferenceIndicator(0x0020, 0x103f); Tag const PositionReferenceIndicator(0x0020, 0x1040); Tag const SliceLocation(0x0020, 0x1041); Tag const OtherStudyNumbers(0x0020, 0x1070); Tag const NumberOfPatientRelatedStudies(0x0020, 0x1200); Tag const NumberOfPatientRelatedSeries(0x0020, 0x1202); Tag const NumberOfPatientRelatedInstances(0x0020, 0x1204); Tag const NumberOfStudyRelatedSeries(0x0020, 0x1206); Tag const NumberOfStudyRelatedInstances(0x0020, 0x1208); Tag const NumberOfSeriesRelatedInstances(0x0020, 0x1209); Tag const ModifyingDeviceID(0x0020, 0x3401); Tag const ModifiedImageID(0x0020, 0x3402); Tag const ModifiedImageDate(0x0020, 0x3403); Tag const ModifyingDeviceManufacturer(0x0020, 0x3404); Tag const ModifiedImageTime(0x0020, 0x3405); Tag const ModifiedImageDescription(0x0020, 0x3406); Tag const ImageComments(0x0020, 0x4000); Tag const OriginalImageIdentification(0x0020, 0x5000); Tag const OriginalImageIdentificationNomenclature(0x0020, 0x5002); Tag const StackID(0x0020, 0x9056); Tag const InStackPositionNumber(0x0020, 0x9057); Tag const FrameAnatomySequence(0x0020, 0x9071); Tag const FrameLaterality(0x0020, 0x9072); Tag const FrameContentSequence(0x0020, 0x9111); Tag const PlanePositionSequence(0x0020, 0x9113); Tag const PlaneOrientationSequence(0x0020, 0x9116); Tag const TemporalPositionIndex(0x0020, 0x9128); Tag const NominalCardiacTriggerDelayTime(0x0020, 0x9153); Tag const NominalCardiacTriggerTimePriorToRPeak(0x0020, 0x9154); Tag const ActualCardiacTriggerTimePriorToRPeak(0x0020, 0x9155); Tag const FrameAcquisitionNumber(0x0020, 0x9156); Tag const DimensionIndexValues(0x0020, 0x9157); Tag const FrameComments(0x0020, 0x9158); Tag const ConcatenationUID(0x0020, 0x9161); Tag const InConcatenationNumber(0x0020, 0x9162); Tag const InConcatenationTotalNumber(0x0020, 0x9163); Tag const DimensionOrganizationUID(0x0020, 0x9164); Tag const DimensionIndexPointer(0x0020, 0x9165); Tag const FunctionalGroupPointer(0x0020, 0x9167); Tag const UnassignedSharedConvertedAttributesSequence(0x0020, 0x9170); Tag const UnassignedPerFrameConvertedAttributesSequence(0x0020, 0x9171); Tag const ConversionSourceAttributesSequence(0x0020, 0x9172); Tag const DimensionIndexPrivateCreator(0x0020, 0x9213); Tag const DimensionOrganizationSequence(0x0020, 0x9221); Tag const DimensionIndexSequence(0x0020, 0x9222); Tag const ConcatenationFrameOffsetNumber(0x0020, 0x9228); Tag const FunctionalGroupPrivateCreator(0x0020, 0x9238); Tag const NominalPercentageOfCardiacPhase(0x0020, 0x9241); Tag const NominalPercentageOfRespiratoryPhase(0x0020, 0x9245); Tag const StartingRespiratoryAmplitude(0x0020, 0x9246); Tag const StartingRespiratoryPhase(0x0020, 0x9247); Tag const EndingRespiratoryAmplitude(0x0020, 0x9248); Tag const EndingRespiratoryPhase(0x0020, 0x9249); Tag const RespiratoryTriggerType(0x0020, 0x9250); Tag const RRIntervalTimeNominal(0x0020, 0x9251); Tag const ActualCardiacTriggerDelayTime(0x0020, 0x9252); Tag const RespiratorySynchronizationSequence(0x0020, 0x9253); Tag const RespiratoryIntervalTime(0x0020, 0x9254); Tag const NominalRespiratoryTriggerDelayTime(0x0020, 0x9255); Tag const RespiratoryTriggerDelayThreshold(0x0020, 0x9256); Tag const ActualRespiratoryTriggerDelayTime(0x0020, 0x9257); Tag const ImagePositionVolume(0x0020, 0x9301); Tag const ImageOrientationVolume(0x0020, 0x9302); Tag const UltrasoundAcquisitionGeometry(0x0020, 0x9307); Tag const ApexPosition(0x0020, 0x9308); Tag const VolumeToTransducerMappingMatrix(0x0020, 0x9309); Tag const VolumeToTableMappingMatrix(0x0020, 0x930a); Tag const VolumeToTransducerRelationship(0x0020, 0x930b); Tag const PatientFrameOfReferenceSource(0x0020, 0x930c); Tag const TemporalPositionTimeOffset(0x0020, 0x930d); Tag const PlanePositionVolumeSequence(0x0020, 0x930e); Tag const PlaneOrientationVolumeSequence(0x0020, 0x930f); Tag const TemporalPositionSequence(0x0020, 0x9310); Tag const DimensionOrganizationType(0x0020, 0x9311); Tag const VolumeFrameOfReferenceUID(0x0020, 0x9312); Tag const TableFrameOfReferenceUID(0x0020, 0x9313); Tag const DimensionDescriptionLabel(0x0020, 0x9421); Tag const PatientOrientationInFrameSequence(0x0020, 0x9450); Tag const FrameLabel(0x0020, 0x9453); Tag const AcquisitionIndex(0x0020, 0x9518); Tag const ContributingSOPInstancesReferenceSequence(0x0020, 0x9529); Tag const ReconstructionIndex(0x0020, 0x9536); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0020odil-0.11.0/src/odil/registry_0022.cpp000066400000000000000000001234111362244656000172670ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0022( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0022, 0x0001), ElementsDictionaryEntry("Light Path Filter Pass-Through Wavelength", "LightPathFilterPassThroughWavelength", "US", "1")); public_dictionary.emplace(Tag(0x0022, 0x0002), ElementsDictionaryEntry("Light Path Filter Pass Band", "LightPathFilterPassBand", "US", "2")); public_dictionary.emplace(Tag(0x0022, 0x0003), ElementsDictionaryEntry("Image Path Filter Pass-Through Wavelength", "ImagePathFilterPassThroughWavelength", "US", "1")); public_dictionary.emplace(Tag(0x0022, 0x0004), ElementsDictionaryEntry("Image Path Filter Pass Band", "ImagePathFilterPassBand", "US", "2")); public_dictionary.emplace(Tag(0x0022, 0x0005), ElementsDictionaryEntry("Patient Eye Movement Commanded", "PatientEyeMovementCommanded", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x0006), ElementsDictionaryEntry("Patient Eye Movement Command Code Sequence", "PatientEyeMovementCommandCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x0007), ElementsDictionaryEntry("Spherical Lens Power", "SphericalLensPower", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0008), ElementsDictionaryEntry("Cylinder Lens Power", "CylinderLensPower", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0009), ElementsDictionaryEntry("Cylinder Axis", "CylinderAxis", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x000a), ElementsDictionaryEntry("Emmetropic Magnification", "EmmetropicMagnification", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x000b), ElementsDictionaryEntry("Intra Ocular Pressure", "IntraOcularPressure", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x000c), ElementsDictionaryEntry("Horizontal Field of View", "HorizontalFieldOfView", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x000d), ElementsDictionaryEntry("Pupil Dilated", "PupilDilated", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x000e), ElementsDictionaryEntry("Degree of Dilation", "DegreeOfDilation", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0010), ElementsDictionaryEntry("Stereo Baseline Angle", "StereoBaselineAngle", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0011), ElementsDictionaryEntry("Stereo Baseline Displacement", "StereoBaselineDisplacement", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0012), ElementsDictionaryEntry("Stereo Horizontal Pixel Offset", "StereoHorizontalPixelOffset", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0013), ElementsDictionaryEntry("Stereo Vertical Pixel Offset", "StereoVerticalPixelOffset", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0014), ElementsDictionaryEntry("Stereo Rotation", "StereoRotation", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0015), ElementsDictionaryEntry("Acquisition Device Type Code Sequence", "AcquisitionDeviceTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x0016), ElementsDictionaryEntry("Illumination Type Code Sequence", "IlluminationTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x0017), ElementsDictionaryEntry("Light Path Filter Type Stack Code Sequence", "LightPathFilterTypeStackCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x0018), ElementsDictionaryEntry("Image Path Filter Type Stack Code Sequence", "ImagePathFilterTypeStackCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x0019), ElementsDictionaryEntry("Lenses Code Sequence", "LensesCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x001a), ElementsDictionaryEntry("Channel Description Code Sequence", "ChannelDescriptionCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x001b), ElementsDictionaryEntry("Refractive State Sequence", "RefractiveStateSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x001c), ElementsDictionaryEntry("Mydriatic Agent Code Sequence", "MydriaticAgentCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x001d), ElementsDictionaryEntry("Relative Image Position Code Sequence", "RelativeImagePositionCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x001e), ElementsDictionaryEntry("Camera Angle of View", "CameraAngleOfView", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0020), ElementsDictionaryEntry("Stereo Pairs Sequence", "StereoPairsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x0021), ElementsDictionaryEntry("Left Image Sequence", "LeftImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x0022), ElementsDictionaryEntry("Right Image Sequence", "RightImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x0028), ElementsDictionaryEntry("Stereo Pairs Present", "StereoPairsPresent", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x0030), ElementsDictionaryEntry("Axial Length of the Eye", "AxialLengthOfTheEye", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0031), ElementsDictionaryEntry("Ophthalmic Frame Location Sequence", "OphthalmicFrameLocationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x0032), ElementsDictionaryEntry("Reference Coordinates", "ReferenceCoordinates", "FL", "2-2n")); public_dictionary.emplace(Tag(0x0022, 0x0035), ElementsDictionaryEntry("Depth Spatial Resolution", "DepthSpatialResolution", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0036), ElementsDictionaryEntry("Maximum Depth Distortion", "MaximumDepthDistortion", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0037), ElementsDictionaryEntry("Along-scan Spatial Resolution", "AlongScanSpatialResolution", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0038), ElementsDictionaryEntry("Maximum Along-scan Distortion", "MaximumAlongScanDistortion", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0039), ElementsDictionaryEntry("Ophthalmic Image Orientation", "OphthalmicImageOrientation", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x0041), ElementsDictionaryEntry("Depth of Transverse Image", "DepthOfTransverseImage", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0042), ElementsDictionaryEntry("Mydriatic Agent Concentration Units Sequence", "MydriaticAgentConcentrationUnitsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x0048), ElementsDictionaryEntry("Across-scan Spatial Resolution", "AcrossScanSpatialResolution", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0049), ElementsDictionaryEntry("Maximum Across-scan Distortion", "MaximumAcrossScanDistortion", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x004e), ElementsDictionaryEntry("Mydriatic Agent Concentration", "MydriaticAgentConcentration", "DS", "1")); public_dictionary.emplace(Tag(0x0022, 0x0055), ElementsDictionaryEntry("Illumination Wave Length", "IlluminationWaveLength", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0056), ElementsDictionaryEntry("Illumination Power", "IlluminationPower", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0057), ElementsDictionaryEntry("Illumination Bandwidth", "IlluminationBandwidth", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x0058), ElementsDictionaryEntry("Mydriatic Agent Sequence", "MydriaticAgentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1007), ElementsDictionaryEntry("Ophthalmic Axial Measurements Right Eye Sequence", "OphthalmicAxialMeasurementsRightEyeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1008), ElementsDictionaryEntry("Ophthalmic Axial Measurements Left Eye Sequence", "OphthalmicAxialMeasurementsLeftEyeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1009), ElementsDictionaryEntry("Ophthalmic Axial Measurements Device Type", "OphthalmicAxialMeasurementsDeviceType", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x1010), ElementsDictionaryEntry("Ophthalmic Axial Length Measurements Type", "OphthalmicAxialLengthMeasurementsType", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x1012), ElementsDictionaryEntry("Ophthalmic Axial Length Sequence", "OphthalmicAxialLengthSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1019), ElementsDictionaryEntry("Ophthalmic Axial Length", "OphthalmicAxialLength", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1024), ElementsDictionaryEntry("Lens Status Code Sequence", "LensStatusCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1025), ElementsDictionaryEntry("Vitreous Status Code Sequence", "VitreousStatusCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1028), ElementsDictionaryEntry("IOL Formula Code Sequence", "IOLFormulaCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1029), ElementsDictionaryEntry("IOL Formula Detail", "IOLFormulaDetail", "LO", "1")); public_dictionary.emplace(Tag(0x0022, 0x1033), ElementsDictionaryEntry("Keratometer Index", "KeratometerIndex", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1035), ElementsDictionaryEntry("Source of Ophthalmic Axial Length Code Sequence", "SourceOfOphthalmicAxialLengthCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1036), ElementsDictionaryEntry("Source of Corneal Size Data Code Sequence", "SourceOfCornealSizeDataCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1037), ElementsDictionaryEntry("Target Refraction", "TargetRefraction", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1039), ElementsDictionaryEntry("Refractive Procedure Occurred", "RefractiveProcedureOccurred", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x1040), ElementsDictionaryEntry("Refractive Surgery Type Code Sequence", "RefractiveSurgeryTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1044), ElementsDictionaryEntry("Ophthalmic Ultrasound Method Code Sequence", "OphthalmicUltrasoundMethodCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1045), ElementsDictionaryEntry("Surgically Induced Astigmatism Sequence", "SurgicallyInducedAstigmatismSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1046), ElementsDictionaryEntry("Type of Optical Correction", "TypeOfOpticalCorrection", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x1047), ElementsDictionaryEntry("Toric IOL Power Sequence", "ToricIOLPowerSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1048), ElementsDictionaryEntry("Predicted Toric Error Sequence", "PredictedToricErrorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1049), ElementsDictionaryEntry("Pre-Selected for Implantation", "PreSelectedForImplantation", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x104a), ElementsDictionaryEntry("Toric IOL Power for Exact Emmetropia Sequence", "ToricIOLPowerForExactEmmetropiaSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x104b), ElementsDictionaryEntry("Toric IOL Power for Exact Target Refraction Sequence", "ToricIOLPowerForExactTargetRefractionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1050), ElementsDictionaryEntry("Ophthalmic Axial Length Measurements Sequence", "OphthalmicAxialLengthMeasurementsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1053), ElementsDictionaryEntry("IOL Power", "IOLPower", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1054), ElementsDictionaryEntry("Predicted Refractive Error", "PredictedRefractiveError", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1059), ElementsDictionaryEntry("Ophthalmic Axial Length Velocity", "OphthalmicAxialLengthVelocity", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1065), ElementsDictionaryEntry("Lens Status Description", "LensStatusDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0022, 0x1066), ElementsDictionaryEntry("Vitreous Status Description", "VitreousStatusDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0022, 0x1090), ElementsDictionaryEntry("IOL Power Sequence", "IOLPowerSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1092), ElementsDictionaryEntry("Lens Constant Sequence", "LensConstantSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1093), ElementsDictionaryEntry("IOL Manufacturer", "IOLManufacturer", "LO", "1")); public_dictionary.emplace(Tag(0x0022, 0x1094), ElementsDictionaryEntry("Lens Constant Description", "LensConstantDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0022, 0x1095), ElementsDictionaryEntry("Implant Name", "ImplantName", "LO", "1")); public_dictionary.emplace(Tag(0x0022, 0x1096), ElementsDictionaryEntry("Keratometry Measurement Type Code Sequence", "KeratometryMeasurementTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1097), ElementsDictionaryEntry("Implant Part Number", "ImplantPartNumber", "LO", "1")); public_dictionary.emplace(Tag(0x0022, 0x1100), ElementsDictionaryEntry("Referenced Ophthalmic Axial Measurements Sequence", "ReferencedOphthalmicAxialMeasurementsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1101), ElementsDictionaryEntry("Ophthalmic Axial Length Measurements Segment Name Code Sequence", "OphthalmicAxialLengthMeasurementsSegmentNameCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1103), ElementsDictionaryEntry("Refractive Error Before Refractive Surgery Code Sequence", "RefractiveErrorBeforeRefractiveSurgeryCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1121), ElementsDictionaryEntry("IOL Power For Exact Emmetropia", "IOLPowerForExactEmmetropia", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1122), ElementsDictionaryEntry("IOL Power For Exact Target Refraction", "IOLPowerForExactTargetRefraction", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1125), ElementsDictionaryEntry("Anterior Chamber Depth Definition Code Sequence", "AnteriorChamberDepthDefinitionCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1127), ElementsDictionaryEntry("Lens Thickness Sequence", "LensThicknessSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1128), ElementsDictionaryEntry("Anterior Chamber Depth Sequence", "AnteriorChamberDepthSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x112a), ElementsDictionaryEntry("Calculation Comment Sequence", "CalculationCommentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x112b), ElementsDictionaryEntry("Calculation Comment Type", "CalculationCommentType", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x112c), ElementsDictionaryEntry("Calculation Comment", "CalculationComment", "LT", "1")); public_dictionary.emplace(Tag(0x0022, 0x1130), ElementsDictionaryEntry("Lens Thickness", "LensThickness", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1131), ElementsDictionaryEntry("Anterior Chamber Depth", "AnteriorChamberDepth", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1132), ElementsDictionaryEntry("Source of Lens Thickness Data Code Sequence", "SourceOfLensThicknessDataCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1133), ElementsDictionaryEntry("Source of Anterior Chamber Depth Data Code Sequence", "SourceOfAnteriorChamberDepthDataCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1134), ElementsDictionaryEntry("Source of Refractive Measurements Sequence", "SourceOfRefractiveMeasurementsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1135), ElementsDictionaryEntry("Source of Refractive Measurements Code Sequence", "SourceOfRefractiveMeasurementsCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1140), ElementsDictionaryEntry("Ophthalmic Axial Length Measurement Modified", "OphthalmicAxialLengthMeasurementModified", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x1150), ElementsDictionaryEntry("Ophthalmic Axial Length Data Source Code Sequence", "OphthalmicAxialLengthDataSourceCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1153), ElementsDictionaryEntry("Ophthalmic Axial Length Acquisition Method Code Sequence", "OphthalmicAxialLengthAcquisitionMethodCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1155), ElementsDictionaryEntry("Signal to Noise Ratio", "SignalToNoiseRatio", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1159), ElementsDictionaryEntry("Ophthalmic Axial Length Data Source Description", "OphthalmicAxialLengthDataSourceDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0022, 0x1210), ElementsDictionaryEntry("Ophthalmic Axial Length Measurements Total Length Sequence", "OphthalmicAxialLengthMeasurementsTotalLengthSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1211), ElementsDictionaryEntry("Ophthalmic Axial Length Measurements Segmental Length Sequence", "OphthalmicAxialLengthMeasurementsSegmentalLengthSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1212), ElementsDictionaryEntry("Ophthalmic Axial Length Measurements Length Summation Sequence", "OphthalmicAxialLengthMeasurementsLengthSummationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1220), ElementsDictionaryEntry("Ultrasound Ophthalmic Axial Length Measurements Sequence", "UltrasoundOphthalmicAxialLengthMeasurementsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1225), ElementsDictionaryEntry("Optical Ophthalmic Axial Length Measurements Sequence", "OpticalOphthalmicAxialLengthMeasurementsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1230), ElementsDictionaryEntry("Ultrasound Selected Ophthalmic Axial Length Sequence", "UltrasoundSelectedOphthalmicAxialLengthSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1250), ElementsDictionaryEntry("Ophthalmic Axial Length Selection Method Code Sequence", "OphthalmicAxialLengthSelectionMethodCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1255), ElementsDictionaryEntry("Optical Selected Ophthalmic Axial Length Sequence", "OpticalSelectedOphthalmicAxialLengthSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1257), ElementsDictionaryEntry("Selected Segmental Ophthalmic Axial Length Sequence", "SelectedSegmentalOphthalmicAxialLengthSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1260), ElementsDictionaryEntry("Selected Total Ophthalmic Axial Length Sequence", "SelectedTotalOphthalmicAxialLengthSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1262), ElementsDictionaryEntry("Ophthalmic Axial Length Quality Metric Sequence", "OphthalmicAxialLengthQualityMetricSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1265), ElementsDictionaryEntry("Ophthalmic Axial Length Quality Metric Type Code Sequence", "OphthalmicAxialLengthQualityMetricTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1273), ElementsDictionaryEntry("Ophthalmic Axial Length Quality Metric Type Description", "OphthalmicAxialLengthQualityMetricTypeDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0022, 0x1300), ElementsDictionaryEntry("Intraocular Lens Calculations Right Eye Sequence", "IntraocularLensCalculationsRightEyeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1310), ElementsDictionaryEntry("Intraocular Lens Calculations Left Eye Sequence", "IntraocularLensCalculationsLeftEyeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1330), ElementsDictionaryEntry("Referenced Ophthalmic Axial Length Measurement QC Image Sequence", "ReferencedOphthalmicAxialLengthMeasurementQCImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1415), ElementsDictionaryEntry("Ophthalmic Mapping Device Type", "OphthalmicMappingDeviceType", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x1420), ElementsDictionaryEntry("Acquisition Method Code Sequence", "AcquisitionMethodCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1423), ElementsDictionaryEntry("Acquisition Method Algorithm Sequence", "AcquisitionMethodAlgorithmSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1436), ElementsDictionaryEntry("Ophthalmic Thickness Map Type Code Sequence", "OphthalmicThicknessMapTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1443), ElementsDictionaryEntry("Ophthalmic Thickness Mapping Normals Sequence", "OphthalmicThicknessMappingNormalsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1445), ElementsDictionaryEntry("Retinal Thickness Definition Code Sequence", "RetinalThicknessDefinitionCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1450), ElementsDictionaryEntry("Pixel Value Mapping to Coded Concept Sequence", "PixelValueMappingToCodedConceptSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1452), ElementsDictionaryEntry("Mapped Pixel Value", "MappedPixelValue", "US or SS", "1")); public_dictionary.emplace(Tag(0x0022, 0x1454), ElementsDictionaryEntry("Pixel Value Mapping Explanation", "PixelValueMappingExplanation", "LO", "1")); public_dictionary.emplace(Tag(0x0022, 0x1458), ElementsDictionaryEntry("Ophthalmic Thickness Map Quality Threshold Sequence", "OphthalmicThicknessMapQualityThresholdSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1460), ElementsDictionaryEntry("Ophthalmic Thickness Map Threshold Quality Rating", "OphthalmicThicknessMapThresholdQualityRating", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1463), ElementsDictionaryEntry("Anatomic Structure Reference Point", "AnatomicStructureReferencePoint", "FL", "2")); public_dictionary.emplace(Tag(0x0022, 0x1465), ElementsDictionaryEntry("Registration to Localizer Sequence", "RegistrationToLocalizerSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1466), ElementsDictionaryEntry("Registered Localizer Units", "RegisteredLocalizerUnits", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x1467), ElementsDictionaryEntry("Registered Localizer Top Left Hand Corner", "RegisteredLocalizerTopLeftHandCorner", "FL", "2")); public_dictionary.emplace(Tag(0x0022, 0x1468), ElementsDictionaryEntry("Registered Localizer Bottom Right Hand Corner", "RegisteredLocalizerBottomRightHandCorner", "FL", "2")); public_dictionary.emplace(Tag(0x0022, 0x1470), ElementsDictionaryEntry("Ophthalmic Thickness Map Quality Rating Sequence", "OphthalmicThicknessMapQualityRatingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1472), ElementsDictionaryEntry("Relevant OPT Attributes Sequence", "RelevantOPTAttributesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1512), ElementsDictionaryEntry("Transformation Method Code Sequence", "TransformationMethodCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1513), ElementsDictionaryEntry("Transformation Algorithm Sequence", "TransformationAlgorithmSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1515), ElementsDictionaryEntry("Ophthalmic Axial Length Method", "OphthalmicAxialLengthMethod", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x1517), ElementsDictionaryEntry("Ophthalmic FOV", "OphthalmicFOV", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1518), ElementsDictionaryEntry("Two Dimensional to Three Dimensional Map Sequence", "TwoDimensionalToThreeDimensionalMapSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1525), ElementsDictionaryEntry("Wide Field Ophthalmic Photography Quality Rating Sequence", "WideFieldOphthalmicPhotographyQualityRatingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1526), ElementsDictionaryEntry("Wide Field Ophthalmic Photography Quality Threshold Sequence", "WideFieldOphthalmicPhotographyQualityThresholdSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1527), ElementsDictionaryEntry("Wide Field Ophthalmic Photography Threshold Quality Rating", "WideFieldOphthalmicPhotographyThresholdQualityRating", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1528), ElementsDictionaryEntry("X Coordinates Center Pixel View Angle", "XCoordinatesCenterPixelViewAngle", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1529), ElementsDictionaryEntry("Y Coordinates Center Pixel View Angle", "YCoordinatesCenterPixelViewAngle", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1530), ElementsDictionaryEntry("Number of Map Points", "NumberOfMapPoints", "UL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1531), ElementsDictionaryEntry("Two Dimensional to Three Dimensional Map Data", "TwoDimensionalToThreeDimensionalMapData", "OF", "1")); public_dictionary.emplace(Tag(0x0022, 0x1612), ElementsDictionaryEntry("Derivation Algorithm Sequence", "DerivationAlgorithmSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1615), ElementsDictionaryEntry("Ophthalmic Image Type Code Sequence", "OphthalmicImageTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1616), ElementsDictionaryEntry("Ophthalmic Image Type Description", "OphthalmicImageTypeDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0022, 0x1618), ElementsDictionaryEntry("Scan Pattern Type Code Sequence", "ScanPatternTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1620), ElementsDictionaryEntry("Referenced Surface Mesh Identification Sequence", "ReferencedSurfaceMeshIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1622), ElementsDictionaryEntry("Ophthalmic Volumetric Properties Flag", "OphthalmicVolumetricPropertiesFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0022, 0x1624), ElementsDictionaryEntry("Ophthalmic Anatomic Reference Point X-Coordinate", "OphthalmicAnatomicReferencePointXCoordinate", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1626), ElementsDictionaryEntry("Ophthalmic Anatomic Reference Point Y-Coordinate", "OphthalmicAnatomicReferencePointYCoordinate", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1628), ElementsDictionaryEntry("Ophthalmic En Face Image Quality Rating Sequence", "OphthalmicEnFaceImageQualityRatingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1630), ElementsDictionaryEntry("Quality Threshold", "QualityThreshold", "DS", "1")); public_dictionary.emplace(Tag(0x0022, 0x1640), ElementsDictionaryEntry("OCT B-scan Analysis Acquisition Parameters Sequence", "OCTBscanAnalysisAcquisitionParametersSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0022, 0x1642), ElementsDictionaryEntry("Number of B-scans Per Frame", "NumberofBscansPerFrame", "UL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1643), ElementsDictionaryEntry("B-scan Slab Thickness", "BscanSlabThickness", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1644), ElementsDictionaryEntry("Distance Between B-scan Slabs", "DistanceBetweenBscanSlabs", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1645), ElementsDictionaryEntry("B-scan Cycle Time", "BscanCycleTime", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1646), ElementsDictionaryEntry("B-scan Cycle Time Vector", "BscanCycleTimeVector", "FL", "1-n")); public_dictionary.emplace(Tag(0x0022, 0x1649), ElementsDictionaryEntry("A-scan Rate", "AscanRate", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1650), ElementsDictionaryEntry("B-scan Rate", "BscanRate", "FL", "1")); public_dictionary.emplace(Tag(0x0022, 0x1658), ElementsDictionaryEntry("Surface Mesh Z-Pixel Offset", "SurfaceMeshZPixelOffset", "UL", "1")); public_tags.emplace("LightPathFilterPassThroughWavelength", Tag(0x0022, 0x0001)); public_tags.emplace("LightPathFilterPassBand", Tag(0x0022, 0x0002)); public_tags.emplace("ImagePathFilterPassThroughWavelength", Tag(0x0022, 0x0003)); public_tags.emplace("ImagePathFilterPassBand", Tag(0x0022, 0x0004)); public_tags.emplace("PatientEyeMovementCommanded", Tag(0x0022, 0x0005)); public_tags.emplace("PatientEyeMovementCommandCodeSequence", Tag(0x0022, 0x0006)); public_tags.emplace("SphericalLensPower", Tag(0x0022, 0x0007)); public_tags.emplace("CylinderLensPower", Tag(0x0022, 0x0008)); public_tags.emplace("CylinderAxis", Tag(0x0022, 0x0009)); public_tags.emplace("EmmetropicMagnification", Tag(0x0022, 0x000a)); public_tags.emplace("IntraOcularPressure", Tag(0x0022, 0x000b)); public_tags.emplace("HorizontalFieldOfView", Tag(0x0022, 0x000c)); public_tags.emplace("PupilDilated", Tag(0x0022, 0x000d)); public_tags.emplace("DegreeOfDilation", Tag(0x0022, 0x000e)); public_tags.emplace("StereoBaselineAngle", Tag(0x0022, 0x0010)); public_tags.emplace("StereoBaselineDisplacement", Tag(0x0022, 0x0011)); public_tags.emplace("StereoHorizontalPixelOffset", Tag(0x0022, 0x0012)); public_tags.emplace("StereoVerticalPixelOffset", Tag(0x0022, 0x0013)); public_tags.emplace("StereoRotation", Tag(0x0022, 0x0014)); public_tags.emplace("AcquisitionDeviceTypeCodeSequence", Tag(0x0022, 0x0015)); public_tags.emplace("IlluminationTypeCodeSequence", Tag(0x0022, 0x0016)); public_tags.emplace("LightPathFilterTypeStackCodeSequence", Tag(0x0022, 0x0017)); public_tags.emplace("ImagePathFilterTypeStackCodeSequence", Tag(0x0022, 0x0018)); public_tags.emplace("LensesCodeSequence", Tag(0x0022, 0x0019)); public_tags.emplace("ChannelDescriptionCodeSequence", Tag(0x0022, 0x001a)); public_tags.emplace("RefractiveStateSequence", Tag(0x0022, 0x001b)); public_tags.emplace("MydriaticAgentCodeSequence", Tag(0x0022, 0x001c)); public_tags.emplace("RelativeImagePositionCodeSequence", Tag(0x0022, 0x001d)); public_tags.emplace("CameraAngleOfView", Tag(0x0022, 0x001e)); public_tags.emplace("StereoPairsSequence", Tag(0x0022, 0x0020)); public_tags.emplace("LeftImageSequence", Tag(0x0022, 0x0021)); public_tags.emplace("RightImageSequence", Tag(0x0022, 0x0022)); public_tags.emplace("StereoPairsPresent", Tag(0x0022, 0x0028)); public_tags.emplace("AxialLengthOfTheEye", Tag(0x0022, 0x0030)); public_tags.emplace("OphthalmicFrameLocationSequence", Tag(0x0022, 0x0031)); public_tags.emplace("ReferenceCoordinates", Tag(0x0022, 0x0032)); public_tags.emplace("DepthSpatialResolution", Tag(0x0022, 0x0035)); public_tags.emplace("MaximumDepthDistortion", Tag(0x0022, 0x0036)); public_tags.emplace("AlongScanSpatialResolution", Tag(0x0022, 0x0037)); public_tags.emplace("MaximumAlongScanDistortion", Tag(0x0022, 0x0038)); public_tags.emplace("OphthalmicImageOrientation", Tag(0x0022, 0x0039)); public_tags.emplace("DepthOfTransverseImage", Tag(0x0022, 0x0041)); public_tags.emplace("MydriaticAgentConcentrationUnitsSequence", Tag(0x0022, 0x0042)); public_tags.emplace("AcrossScanSpatialResolution", Tag(0x0022, 0x0048)); public_tags.emplace("MaximumAcrossScanDistortion", Tag(0x0022, 0x0049)); public_tags.emplace("MydriaticAgentConcentration", Tag(0x0022, 0x004e)); public_tags.emplace("IlluminationWaveLength", Tag(0x0022, 0x0055)); public_tags.emplace("IlluminationPower", Tag(0x0022, 0x0056)); public_tags.emplace("IlluminationBandwidth", Tag(0x0022, 0x0057)); public_tags.emplace("MydriaticAgentSequence", Tag(0x0022, 0x0058)); public_tags.emplace("OphthalmicAxialMeasurementsRightEyeSequence", Tag(0x0022, 0x1007)); public_tags.emplace("OphthalmicAxialMeasurementsLeftEyeSequence", Tag(0x0022, 0x1008)); public_tags.emplace("OphthalmicAxialMeasurementsDeviceType", Tag(0x0022, 0x1009)); public_tags.emplace("OphthalmicAxialLengthMeasurementsType", Tag(0x0022, 0x1010)); public_tags.emplace("OphthalmicAxialLengthSequence", Tag(0x0022, 0x1012)); public_tags.emplace("OphthalmicAxialLength", Tag(0x0022, 0x1019)); public_tags.emplace("LensStatusCodeSequence", Tag(0x0022, 0x1024)); public_tags.emplace("VitreousStatusCodeSequence", Tag(0x0022, 0x1025)); public_tags.emplace("IOLFormulaCodeSequence", Tag(0x0022, 0x1028)); public_tags.emplace("IOLFormulaDetail", Tag(0x0022, 0x1029)); public_tags.emplace("KeratometerIndex", Tag(0x0022, 0x1033)); public_tags.emplace("SourceOfOphthalmicAxialLengthCodeSequence", Tag(0x0022, 0x1035)); public_tags.emplace("SourceOfCornealSizeDataCodeSequence", Tag(0x0022, 0x1036)); public_tags.emplace("TargetRefraction", Tag(0x0022, 0x1037)); public_tags.emplace("RefractiveProcedureOccurred", Tag(0x0022, 0x1039)); public_tags.emplace("RefractiveSurgeryTypeCodeSequence", Tag(0x0022, 0x1040)); public_tags.emplace("OphthalmicUltrasoundMethodCodeSequence", Tag(0x0022, 0x1044)); public_tags.emplace("SurgicallyInducedAstigmatismSequence", Tag(0x0022, 0x1045)); public_tags.emplace("TypeOfOpticalCorrection", Tag(0x0022, 0x1046)); public_tags.emplace("ToricIOLPowerSequence", Tag(0x0022, 0x1047)); public_tags.emplace("PredictedToricErrorSequence", Tag(0x0022, 0x1048)); public_tags.emplace("PreSelectedForImplantation", Tag(0x0022, 0x1049)); public_tags.emplace("ToricIOLPowerForExactEmmetropiaSequence", Tag(0x0022, 0x104a)); public_tags.emplace("ToricIOLPowerForExactTargetRefractionSequence", Tag(0x0022, 0x104b)); public_tags.emplace("OphthalmicAxialLengthMeasurementsSequence", Tag(0x0022, 0x1050)); public_tags.emplace("IOLPower", Tag(0x0022, 0x1053)); public_tags.emplace("PredictedRefractiveError", Tag(0x0022, 0x1054)); public_tags.emplace("OphthalmicAxialLengthVelocity", Tag(0x0022, 0x1059)); public_tags.emplace("LensStatusDescription", Tag(0x0022, 0x1065)); public_tags.emplace("VitreousStatusDescription", Tag(0x0022, 0x1066)); public_tags.emplace("IOLPowerSequence", Tag(0x0022, 0x1090)); public_tags.emplace("LensConstantSequence", Tag(0x0022, 0x1092)); public_tags.emplace("IOLManufacturer", Tag(0x0022, 0x1093)); public_tags.emplace("LensConstantDescription", Tag(0x0022, 0x1094)); public_tags.emplace("ImplantName", Tag(0x0022, 0x1095)); public_tags.emplace("KeratometryMeasurementTypeCodeSequence", Tag(0x0022, 0x1096)); public_tags.emplace("ImplantPartNumber", Tag(0x0022, 0x1097)); public_tags.emplace("ReferencedOphthalmicAxialMeasurementsSequence", Tag(0x0022, 0x1100)); public_tags.emplace("OphthalmicAxialLengthMeasurementsSegmentNameCodeSequence", Tag(0x0022, 0x1101)); public_tags.emplace("RefractiveErrorBeforeRefractiveSurgeryCodeSequence", Tag(0x0022, 0x1103)); public_tags.emplace("IOLPowerForExactEmmetropia", Tag(0x0022, 0x1121)); public_tags.emplace("IOLPowerForExactTargetRefraction", Tag(0x0022, 0x1122)); public_tags.emplace("AnteriorChamberDepthDefinitionCodeSequence", Tag(0x0022, 0x1125)); public_tags.emplace("LensThicknessSequence", Tag(0x0022, 0x1127)); public_tags.emplace("AnteriorChamberDepthSequence", Tag(0x0022, 0x1128)); public_tags.emplace("CalculationCommentSequence", Tag(0x0022, 0x112a)); public_tags.emplace("CalculationCommentType", Tag(0x0022, 0x112b)); public_tags.emplace("CalculationComment", Tag(0x0022, 0x112c)); public_tags.emplace("LensThickness", Tag(0x0022, 0x1130)); public_tags.emplace("AnteriorChamberDepth", Tag(0x0022, 0x1131)); public_tags.emplace("SourceOfLensThicknessDataCodeSequence", Tag(0x0022, 0x1132)); public_tags.emplace("SourceOfAnteriorChamberDepthDataCodeSequence", Tag(0x0022, 0x1133)); public_tags.emplace("SourceOfRefractiveMeasurementsSequence", Tag(0x0022, 0x1134)); public_tags.emplace("SourceOfRefractiveMeasurementsCodeSequence", Tag(0x0022, 0x1135)); public_tags.emplace("OphthalmicAxialLengthMeasurementModified", Tag(0x0022, 0x1140)); public_tags.emplace("OphthalmicAxialLengthDataSourceCodeSequence", Tag(0x0022, 0x1150)); public_tags.emplace("OphthalmicAxialLengthAcquisitionMethodCodeSequence", Tag(0x0022, 0x1153)); public_tags.emplace("SignalToNoiseRatio", Tag(0x0022, 0x1155)); public_tags.emplace("OphthalmicAxialLengthDataSourceDescription", Tag(0x0022, 0x1159)); public_tags.emplace("OphthalmicAxialLengthMeasurementsTotalLengthSequence", Tag(0x0022, 0x1210)); public_tags.emplace("OphthalmicAxialLengthMeasurementsSegmentalLengthSequence", Tag(0x0022, 0x1211)); public_tags.emplace("OphthalmicAxialLengthMeasurementsLengthSummationSequence", Tag(0x0022, 0x1212)); public_tags.emplace("UltrasoundOphthalmicAxialLengthMeasurementsSequence", Tag(0x0022, 0x1220)); public_tags.emplace("OpticalOphthalmicAxialLengthMeasurementsSequence", Tag(0x0022, 0x1225)); public_tags.emplace("UltrasoundSelectedOphthalmicAxialLengthSequence", Tag(0x0022, 0x1230)); public_tags.emplace("OphthalmicAxialLengthSelectionMethodCodeSequence", Tag(0x0022, 0x1250)); public_tags.emplace("OpticalSelectedOphthalmicAxialLengthSequence", Tag(0x0022, 0x1255)); public_tags.emplace("SelectedSegmentalOphthalmicAxialLengthSequence", Tag(0x0022, 0x1257)); public_tags.emplace("SelectedTotalOphthalmicAxialLengthSequence", Tag(0x0022, 0x1260)); public_tags.emplace("OphthalmicAxialLengthQualityMetricSequence", Tag(0x0022, 0x1262)); public_tags.emplace("OphthalmicAxialLengthQualityMetricTypeCodeSequence", Tag(0x0022, 0x1265)); public_tags.emplace("OphthalmicAxialLengthQualityMetricTypeDescription", Tag(0x0022, 0x1273)); public_tags.emplace("IntraocularLensCalculationsRightEyeSequence", Tag(0x0022, 0x1300)); public_tags.emplace("IntraocularLensCalculationsLeftEyeSequence", Tag(0x0022, 0x1310)); public_tags.emplace("ReferencedOphthalmicAxialLengthMeasurementQCImageSequence", Tag(0x0022, 0x1330)); public_tags.emplace("OphthalmicMappingDeviceType", Tag(0x0022, 0x1415)); public_tags.emplace("AcquisitionMethodCodeSequence", Tag(0x0022, 0x1420)); public_tags.emplace("AcquisitionMethodAlgorithmSequence", Tag(0x0022, 0x1423)); public_tags.emplace("OphthalmicThicknessMapTypeCodeSequence", Tag(0x0022, 0x1436)); public_tags.emplace("OphthalmicThicknessMappingNormalsSequence", Tag(0x0022, 0x1443)); public_tags.emplace("RetinalThicknessDefinitionCodeSequence", Tag(0x0022, 0x1445)); public_tags.emplace("PixelValueMappingToCodedConceptSequence", Tag(0x0022, 0x1450)); public_tags.emplace("MappedPixelValue", Tag(0x0022, 0x1452)); public_tags.emplace("PixelValueMappingExplanation", Tag(0x0022, 0x1454)); public_tags.emplace("OphthalmicThicknessMapQualityThresholdSequence", Tag(0x0022, 0x1458)); public_tags.emplace("OphthalmicThicknessMapThresholdQualityRating", Tag(0x0022, 0x1460)); public_tags.emplace("AnatomicStructureReferencePoint", Tag(0x0022, 0x1463)); public_tags.emplace("RegistrationToLocalizerSequence", Tag(0x0022, 0x1465)); public_tags.emplace("RegisteredLocalizerUnits", Tag(0x0022, 0x1466)); public_tags.emplace("RegisteredLocalizerTopLeftHandCorner", Tag(0x0022, 0x1467)); public_tags.emplace("RegisteredLocalizerBottomRightHandCorner", Tag(0x0022, 0x1468)); public_tags.emplace("OphthalmicThicknessMapQualityRatingSequence", Tag(0x0022, 0x1470)); public_tags.emplace("RelevantOPTAttributesSequence", Tag(0x0022, 0x1472)); public_tags.emplace("TransformationMethodCodeSequence", Tag(0x0022, 0x1512)); public_tags.emplace("TransformationAlgorithmSequence", Tag(0x0022, 0x1513)); public_tags.emplace("OphthalmicAxialLengthMethod", Tag(0x0022, 0x1515)); public_tags.emplace("OphthalmicFOV", Tag(0x0022, 0x1517)); public_tags.emplace("TwoDimensionalToThreeDimensionalMapSequence", Tag(0x0022, 0x1518)); public_tags.emplace("WideFieldOphthalmicPhotographyQualityRatingSequence", Tag(0x0022, 0x1525)); public_tags.emplace("WideFieldOphthalmicPhotographyQualityThresholdSequence", Tag(0x0022, 0x1526)); public_tags.emplace("WideFieldOphthalmicPhotographyThresholdQualityRating", Tag(0x0022, 0x1527)); public_tags.emplace("XCoordinatesCenterPixelViewAngle", Tag(0x0022, 0x1528)); public_tags.emplace("YCoordinatesCenterPixelViewAngle", Tag(0x0022, 0x1529)); public_tags.emplace("NumberOfMapPoints", Tag(0x0022, 0x1530)); public_tags.emplace("TwoDimensionalToThreeDimensionalMapData", Tag(0x0022, 0x1531)); public_tags.emplace("DerivationAlgorithmSequence", Tag(0x0022, 0x1612)); public_tags.emplace("OphthalmicImageTypeCodeSequence", Tag(0x0022, 0x1615)); public_tags.emplace("OphthalmicImageTypeDescription", Tag(0x0022, 0x1616)); public_tags.emplace("ScanPatternTypeCodeSequence", Tag(0x0022, 0x1618)); public_tags.emplace("ReferencedSurfaceMeshIdentificationSequence", Tag(0x0022, 0x1620)); public_tags.emplace("OphthalmicVolumetricPropertiesFlag", Tag(0x0022, 0x1622)); public_tags.emplace("OphthalmicAnatomicReferencePointXCoordinate", Tag(0x0022, 0x1624)); public_tags.emplace("OphthalmicAnatomicReferencePointYCoordinate", Tag(0x0022, 0x1626)); public_tags.emplace("OphthalmicEnFaceImageQualityRatingSequence", Tag(0x0022, 0x1628)); public_tags.emplace("QualityThreshold", Tag(0x0022, 0x1630)); public_tags.emplace("OCTBscanAnalysisAcquisitionParametersSequence", Tag(0x0022, 0x1640)); public_tags.emplace("NumberofBscansPerFrame", Tag(0x0022, 0x1642)); public_tags.emplace("BscanSlabThickness", Tag(0x0022, 0x1643)); public_tags.emplace("DistanceBetweenBscanSlabs", Tag(0x0022, 0x1644)); public_tags.emplace("BscanCycleTime", Tag(0x0022, 0x1645)); public_tags.emplace("BscanCycleTimeVector", Tag(0x0022, 0x1646)); public_tags.emplace("AscanRate", Tag(0x0022, 0x1649)); public_tags.emplace("BscanRate", Tag(0x0022, 0x1650)); public_tags.emplace("SurfaceMeshZPixelOffset", Tag(0x0022, 0x1658)); } } }odil-0.11.0/src/odil/registry_0022.h000066400000000000000000000251411362244656000167350ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0022 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0022 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const LightPathFilterPassThroughWavelength(0x0022, 0x0001); Tag const LightPathFilterPassBand(0x0022, 0x0002); Tag const ImagePathFilterPassThroughWavelength(0x0022, 0x0003); Tag const ImagePathFilterPassBand(0x0022, 0x0004); Tag const PatientEyeMovementCommanded(0x0022, 0x0005); Tag const PatientEyeMovementCommandCodeSequence(0x0022, 0x0006); Tag const SphericalLensPower(0x0022, 0x0007); Tag const CylinderLensPower(0x0022, 0x0008); Tag const CylinderAxis(0x0022, 0x0009); Tag const EmmetropicMagnification(0x0022, 0x000a); Tag const IntraOcularPressure(0x0022, 0x000b); Tag const HorizontalFieldOfView(0x0022, 0x000c); Tag const PupilDilated(0x0022, 0x000d); Tag const DegreeOfDilation(0x0022, 0x000e); Tag const StereoBaselineAngle(0x0022, 0x0010); Tag const StereoBaselineDisplacement(0x0022, 0x0011); Tag const StereoHorizontalPixelOffset(0x0022, 0x0012); Tag const StereoVerticalPixelOffset(0x0022, 0x0013); Tag const StereoRotation(0x0022, 0x0014); Tag const AcquisitionDeviceTypeCodeSequence(0x0022, 0x0015); Tag const IlluminationTypeCodeSequence(0x0022, 0x0016); Tag const LightPathFilterTypeStackCodeSequence(0x0022, 0x0017); Tag const ImagePathFilterTypeStackCodeSequence(0x0022, 0x0018); Tag const LensesCodeSequence(0x0022, 0x0019); Tag const ChannelDescriptionCodeSequence(0x0022, 0x001a); Tag const RefractiveStateSequence(0x0022, 0x001b); Tag const MydriaticAgentCodeSequence(0x0022, 0x001c); Tag const RelativeImagePositionCodeSequence(0x0022, 0x001d); Tag const CameraAngleOfView(0x0022, 0x001e); Tag const StereoPairsSequence(0x0022, 0x0020); Tag const LeftImageSequence(0x0022, 0x0021); Tag const RightImageSequence(0x0022, 0x0022); Tag const StereoPairsPresent(0x0022, 0x0028); Tag const AxialLengthOfTheEye(0x0022, 0x0030); Tag const OphthalmicFrameLocationSequence(0x0022, 0x0031); Tag const ReferenceCoordinates(0x0022, 0x0032); Tag const DepthSpatialResolution(0x0022, 0x0035); Tag const MaximumDepthDistortion(0x0022, 0x0036); Tag const AlongScanSpatialResolution(0x0022, 0x0037); Tag const MaximumAlongScanDistortion(0x0022, 0x0038); Tag const OphthalmicImageOrientation(0x0022, 0x0039); Tag const DepthOfTransverseImage(0x0022, 0x0041); Tag const MydriaticAgentConcentrationUnitsSequence(0x0022, 0x0042); Tag const AcrossScanSpatialResolution(0x0022, 0x0048); Tag const MaximumAcrossScanDistortion(0x0022, 0x0049); Tag const MydriaticAgentConcentration(0x0022, 0x004e); Tag const IlluminationWaveLength(0x0022, 0x0055); Tag const IlluminationPower(0x0022, 0x0056); Tag const IlluminationBandwidth(0x0022, 0x0057); Tag const MydriaticAgentSequence(0x0022, 0x0058); Tag const OphthalmicAxialMeasurementsRightEyeSequence(0x0022, 0x1007); Tag const OphthalmicAxialMeasurementsLeftEyeSequence(0x0022, 0x1008); Tag const OphthalmicAxialMeasurementsDeviceType(0x0022, 0x1009); Tag const OphthalmicAxialLengthMeasurementsType(0x0022, 0x1010); Tag const OphthalmicAxialLengthSequence(0x0022, 0x1012); Tag const OphthalmicAxialLength(0x0022, 0x1019); Tag const LensStatusCodeSequence(0x0022, 0x1024); Tag const VitreousStatusCodeSequence(0x0022, 0x1025); Tag const IOLFormulaCodeSequence(0x0022, 0x1028); Tag const IOLFormulaDetail(0x0022, 0x1029); Tag const KeratometerIndex(0x0022, 0x1033); Tag const SourceOfOphthalmicAxialLengthCodeSequence(0x0022, 0x1035); Tag const SourceOfCornealSizeDataCodeSequence(0x0022, 0x1036); Tag const TargetRefraction(0x0022, 0x1037); Tag const RefractiveProcedureOccurred(0x0022, 0x1039); Tag const RefractiveSurgeryTypeCodeSequence(0x0022, 0x1040); Tag const OphthalmicUltrasoundMethodCodeSequence(0x0022, 0x1044); Tag const SurgicallyInducedAstigmatismSequence(0x0022, 0x1045); Tag const TypeOfOpticalCorrection(0x0022, 0x1046); Tag const ToricIOLPowerSequence(0x0022, 0x1047); Tag const PredictedToricErrorSequence(0x0022, 0x1048); Tag const PreSelectedForImplantation(0x0022, 0x1049); Tag const ToricIOLPowerForExactEmmetropiaSequence(0x0022, 0x104a); Tag const ToricIOLPowerForExactTargetRefractionSequence(0x0022, 0x104b); Tag const OphthalmicAxialLengthMeasurementsSequence(0x0022, 0x1050); Tag const IOLPower(0x0022, 0x1053); Tag const PredictedRefractiveError(0x0022, 0x1054); Tag const OphthalmicAxialLengthVelocity(0x0022, 0x1059); Tag const LensStatusDescription(0x0022, 0x1065); Tag const VitreousStatusDescription(0x0022, 0x1066); Tag const IOLPowerSequence(0x0022, 0x1090); Tag const LensConstantSequence(0x0022, 0x1092); Tag const IOLManufacturer(0x0022, 0x1093); Tag const LensConstantDescription(0x0022, 0x1094); Tag const ImplantName(0x0022, 0x1095); Tag const KeratometryMeasurementTypeCodeSequence(0x0022, 0x1096); Tag const ImplantPartNumber(0x0022, 0x1097); Tag const ReferencedOphthalmicAxialMeasurementsSequence(0x0022, 0x1100); Tag const OphthalmicAxialLengthMeasurementsSegmentNameCodeSequence(0x0022, 0x1101); Tag const RefractiveErrorBeforeRefractiveSurgeryCodeSequence(0x0022, 0x1103); Tag const IOLPowerForExactEmmetropia(0x0022, 0x1121); Tag const IOLPowerForExactTargetRefraction(0x0022, 0x1122); Tag const AnteriorChamberDepthDefinitionCodeSequence(0x0022, 0x1125); Tag const LensThicknessSequence(0x0022, 0x1127); Tag const AnteriorChamberDepthSequence(0x0022, 0x1128); Tag const CalculationCommentSequence(0x0022, 0x112a); Tag const CalculationCommentType(0x0022, 0x112b); Tag const CalculationComment(0x0022, 0x112c); Tag const LensThickness(0x0022, 0x1130); Tag const AnteriorChamberDepth(0x0022, 0x1131); Tag const SourceOfLensThicknessDataCodeSequence(0x0022, 0x1132); Tag const SourceOfAnteriorChamberDepthDataCodeSequence(0x0022, 0x1133); Tag const SourceOfRefractiveMeasurementsSequence(0x0022, 0x1134); Tag const SourceOfRefractiveMeasurementsCodeSequence(0x0022, 0x1135); Tag const OphthalmicAxialLengthMeasurementModified(0x0022, 0x1140); Tag const OphthalmicAxialLengthDataSourceCodeSequence(0x0022, 0x1150); Tag const OphthalmicAxialLengthAcquisitionMethodCodeSequence(0x0022, 0x1153); Tag const SignalToNoiseRatio(0x0022, 0x1155); Tag const OphthalmicAxialLengthDataSourceDescription(0x0022, 0x1159); Tag const OphthalmicAxialLengthMeasurementsTotalLengthSequence(0x0022, 0x1210); Tag const OphthalmicAxialLengthMeasurementsSegmentalLengthSequence(0x0022, 0x1211); Tag const OphthalmicAxialLengthMeasurementsLengthSummationSequence(0x0022, 0x1212); Tag const UltrasoundOphthalmicAxialLengthMeasurementsSequence(0x0022, 0x1220); Tag const OpticalOphthalmicAxialLengthMeasurementsSequence(0x0022, 0x1225); Tag const UltrasoundSelectedOphthalmicAxialLengthSequence(0x0022, 0x1230); Tag const OphthalmicAxialLengthSelectionMethodCodeSequence(0x0022, 0x1250); Tag const OpticalSelectedOphthalmicAxialLengthSequence(0x0022, 0x1255); Tag const SelectedSegmentalOphthalmicAxialLengthSequence(0x0022, 0x1257); Tag const SelectedTotalOphthalmicAxialLengthSequence(0x0022, 0x1260); Tag const OphthalmicAxialLengthQualityMetricSequence(0x0022, 0x1262); Tag const OphthalmicAxialLengthQualityMetricTypeCodeSequence(0x0022, 0x1265); Tag const OphthalmicAxialLengthQualityMetricTypeDescription(0x0022, 0x1273); Tag const IntraocularLensCalculationsRightEyeSequence(0x0022, 0x1300); Tag const IntraocularLensCalculationsLeftEyeSequence(0x0022, 0x1310); Tag const ReferencedOphthalmicAxialLengthMeasurementQCImageSequence(0x0022, 0x1330); Tag const OphthalmicMappingDeviceType(0x0022, 0x1415); Tag const AcquisitionMethodCodeSequence(0x0022, 0x1420); Tag const AcquisitionMethodAlgorithmSequence(0x0022, 0x1423); Tag const OphthalmicThicknessMapTypeCodeSequence(0x0022, 0x1436); Tag const OphthalmicThicknessMappingNormalsSequence(0x0022, 0x1443); Tag const RetinalThicknessDefinitionCodeSequence(0x0022, 0x1445); Tag const PixelValueMappingToCodedConceptSequence(0x0022, 0x1450); Tag const MappedPixelValue(0x0022, 0x1452); Tag const PixelValueMappingExplanation(0x0022, 0x1454); Tag const OphthalmicThicknessMapQualityThresholdSequence(0x0022, 0x1458); Tag const OphthalmicThicknessMapThresholdQualityRating(0x0022, 0x1460); Tag const AnatomicStructureReferencePoint(0x0022, 0x1463); Tag const RegistrationToLocalizerSequence(0x0022, 0x1465); Tag const RegisteredLocalizerUnits(0x0022, 0x1466); Tag const RegisteredLocalizerTopLeftHandCorner(0x0022, 0x1467); Tag const RegisteredLocalizerBottomRightHandCorner(0x0022, 0x1468); Tag const OphthalmicThicknessMapQualityRatingSequence(0x0022, 0x1470); Tag const RelevantOPTAttributesSequence(0x0022, 0x1472); Tag const TransformationMethodCodeSequence(0x0022, 0x1512); Tag const TransformationAlgorithmSequence(0x0022, 0x1513); Tag const OphthalmicAxialLengthMethod(0x0022, 0x1515); Tag const OphthalmicFOV(0x0022, 0x1517); Tag const TwoDimensionalToThreeDimensionalMapSequence(0x0022, 0x1518); Tag const WideFieldOphthalmicPhotographyQualityRatingSequence(0x0022, 0x1525); Tag const WideFieldOphthalmicPhotographyQualityThresholdSequence(0x0022, 0x1526); Tag const WideFieldOphthalmicPhotographyThresholdQualityRating(0x0022, 0x1527); Tag const XCoordinatesCenterPixelViewAngle(0x0022, 0x1528); Tag const YCoordinatesCenterPixelViewAngle(0x0022, 0x1529); Tag const NumberOfMapPoints(0x0022, 0x1530); Tag const TwoDimensionalToThreeDimensionalMapData(0x0022, 0x1531); Tag const DerivationAlgorithmSequence(0x0022, 0x1612); Tag const OphthalmicImageTypeCodeSequence(0x0022, 0x1615); Tag const OphthalmicImageTypeDescription(0x0022, 0x1616); Tag const ScanPatternTypeCodeSequence(0x0022, 0x1618); Tag const ReferencedSurfaceMeshIdentificationSequence(0x0022, 0x1620); Tag const OphthalmicVolumetricPropertiesFlag(0x0022, 0x1622); Tag const OphthalmicAnatomicReferencePointXCoordinate(0x0022, 0x1624); Tag const OphthalmicAnatomicReferencePointYCoordinate(0x0022, 0x1626); Tag const OphthalmicEnFaceImageQualityRatingSequence(0x0022, 0x1628); Tag const QualityThreshold(0x0022, 0x1630); Tag const OCTBscanAnalysisAcquisitionParametersSequence(0x0022, 0x1640); Tag const NumberofBscansPerFrame(0x0022, 0x1642); Tag const BscanSlabThickness(0x0022, 0x1643); Tag const DistanceBetweenBscanSlabs(0x0022, 0x1644); Tag const BscanCycleTime(0x0022, 0x1645); Tag const BscanCycleTimeVector(0x0022, 0x1646); Tag const AscanRate(0x0022, 0x1649); Tag const BscanRate(0x0022, 0x1650); Tag const SurfaceMeshZPixelOffset(0x0022, 0x1658); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0022odil-0.11.0/src/odil/registry_0024.cpp000066400000000000000000000575751362244656000173120ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0024( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0024, 0x0010), ElementsDictionaryEntry("Visual Field Horizontal Extent", "VisualFieldHorizontalExtent", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0011), ElementsDictionaryEntry("Visual Field Vertical Extent", "VisualFieldVerticalExtent", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0012), ElementsDictionaryEntry("Visual Field Shape", "VisualFieldShape", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0016), ElementsDictionaryEntry("Screening Test Mode Code Sequence", "ScreeningTestModeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0018), ElementsDictionaryEntry("Maximum Stimulus Luminance", "MaximumStimulusLuminance", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0020), ElementsDictionaryEntry("Background Luminance", "BackgroundLuminance", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0021), ElementsDictionaryEntry("Stimulus Color Code Sequence", "StimulusColorCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0024), ElementsDictionaryEntry("Background Illumination Color Code Sequence", "BackgroundIlluminationColorCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0025), ElementsDictionaryEntry("Stimulus Area", "StimulusArea", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0028), ElementsDictionaryEntry("Stimulus Presentation Time", "StimulusPresentationTime", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0032), ElementsDictionaryEntry("Fixation Sequence", "FixationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0033), ElementsDictionaryEntry("Fixation Monitoring Code Sequence", "FixationMonitoringCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0034), ElementsDictionaryEntry("Visual Field Catch Trial Sequence", "VisualFieldCatchTrialSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0035), ElementsDictionaryEntry("Fixation Checked Quantity", "FixationCheckedQuantity", "US", "1")); public_dictionary.emplace(Tag(0x0024, 0x0036), ElementsDictionaryEntry("Patient Not Properly Fixated Quantity", "PatientNotProperlyFixatedQuantity", "US", "1")); public_dictionary.emplace(Tag(0x0024, 0x0037), ElementsDictionaryEntry("Presented Visual Stimuli Data Flag", "PresentedVisualStimuliDataFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0038), ElementsDictionaryEntry("Number of Visual Stimuli", "NumberOfVisualStimuli", "US", "1")); public_dictionary.emplace(Tag(0x0024, 0x0039), ElementsDictionaryEntry("Excessive Fixation Losses Data Flag", "ExcessiveFixationLossesDataFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0040), ElementsDictionaryEntry("Excessive Fixation Losses", "ExcessiveFixationLosses", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0042), ElementsDictionaryEntry("Stimuli Retesting Quantity", "StimuliRetestingQuantity", "US", "1")); public_dictionary.emplace(Tag(0x0024, 0x0044), ElementsDictionaryEntry("Comments on Patient's Performance of Visual Field", "CommentsOnPatientPerformanceOfVisualField", "LT", "1")); public_dictionary.emplace(Tag(0x0024, 0x0045), ElementsDictionaryEntry("False Negatives Estimate Flag", "FalseNegativesEstimateFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0046), ElementsDictionaryEntry("False Negatives Estimate", "FalseNegativesEstimate", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0048), ElementsDictionaryEntry("Negative Catch Trials Quantity", "NegativeCatchTrialsQuantity", "US", "1")); public_dictionary.emplace(Tag(0x0024, 0x0050), ElementsDictionaryEntry("False Negatives Quantity", "FalseNegativesQuantity", "US", "1")); public_dictionary.emplace(Tag(0x0024, 0x0051), ElementsDictionaryEntry("Excessive False Negatives Data Flag", "ExcessiveFalseNegativesDataFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0052), ElementsDictionaryEntry("Excessive False Negatives", "ExcessiveFalseNegatives", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0053), ElementsDictionaryEntry("False Positives Estimate Flag", "FalsePositivesEstimateFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0054), ElementsDictionaryEntry("False Positives Estimate", "FalsePositivesEstimate", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0055), ElementsDictionaryEntry("Catch Trials Data Flag", "CatchTrialsDataFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0056), ElementsDictionaryEntry("Positive Catch Trials Quantity", "PositiveCatchTrialsQuantity", "US", "1")); public_dictionary.emplace(Tag(0x0024, 0x0057), ElementsDictionaryEntry("Test Point Normals Data Flag", "TestPointNormalsDataFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0058), ElementsDictionaryEntry("Test Point Normals Sequence", "TestPointNormalsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0059), ElementsDictionaryEntry("Global Deviation Probability Normals Flag", "GlobalDeviationProbabilityNormalsFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0060), ElementsDictionaryEntry("False Positives Quantity", "FalsePositivesQuantity", "US", "1")); public_dictionary.emplace(Tag(0x0024, 0x0061), ElementsDictionaryEntry("Excessive False Positives Data Flag", "ExcessiveFalsePositivesDataFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0062), ElementsDictionaryEntry("Excessive False Positives", "ExcessiveFalsePositives", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0063), ElementsDictionaryEntry("Visual Field Test Normals Flag", "VisualFieldTestNormalsFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0064), ElementsDictionaryEntry("Results Normals Sequence", "ResultsNormalsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0065), ElementsDictionaryEntry("Age Corrected Sensitivity Deviation Algorithm Sequence", "AgeCorrectedSensitivityDeviationAlgorithmSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0066), ElementsDictionaryEntry("Global Deviation From Normal", "GlobalDeviationFromNormal", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0067), ElementsDictionaryEntry("Generalized Defect Sensitivity Deviation Algorithm Sequence", "GeneralizedDefectSensitivityDeviationAlgorithmSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0068), ElementsDictionaryEntry("Localized Deviation From Normal", "LocalizedDeviationFromNormal", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0069), ElementsDictionaryEntry("Patient Reliability Indicator", "PatientReliabilityIndicator", "LO", "1")); public_dictionary.emplace(Tag(0x0024, 0x0070), ElementsDictionaryEntry("Visual Field Mean Sensitivity", "VisualFieldMeanSensitivity", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0071), ElementsDictionaryEntry("Global Deviation Probability", "GlobalDeviationProbability", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0072), ElementsDictionaryEntry("Local Deviation Probability Normals Flag", "LocalDeviationProbabilityNormalsFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0073), ElementsDictionaryEntry("Localized Deviation Probability", "LocalizedDeviationProbability", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0074), ElementsDictionaryEntry("Short Term Fluctuation Calculated", "ShortTermFluctuationCalculated", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0075), ElementsDictionaryEntry("Short Term Fluctuation", "ShortTermFluctuation", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0076), ElementsDictionaryEntry("Short Term Fluctuation Probability Calculated", "ShortTermFluctuationProbabilityCalculated", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0077), ElementsDictionaryEntry("Short Term Fluctuation Probability", "ShortTermFluctuationProbability", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0078), ElementsDictionaryEntry("Corrected Localized Deviation From Normal Calculated", "CorrectedLocalizedDeviationFromNormalCalculated", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0079), ElementsDictionaryEntry("Corrected Localized Deviation From Normal", "CorrectedLocalizedDeviationFromNormal", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0080), ElementsDictionaryEntry("Corrected Localized Deviation From Normal Probability Calculated", "CorrectedLocalizedDeviationFromNormalProbabilityCalculated", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0081), ElementsDictionaryEntry("Corrected Localized Deviation From Normal Probability", "CorrectedLocalizedDeviationFromNormalProbability", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0083), ElementsDictionaryEntry("Global Deviation Probability Sequence", "GlobalDeviationProbabilitySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0085), ElementsDictionaryEntry("Localized Deviation Probability Sequence", "LocalizedDeviationProbabilitySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0086), ElementsDictionaryEntry("Foveal Sensitivity Measured", "FovealSensitivityMeasured", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0087), ElementsDictionaryEntry("Foveal Sensitivity", "FovealSensitivity", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0088), ElementsDictionaryEntry("Visual Field Test Duration", "VisualFieldTestDuration", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0089), ElementsDictionaryEntry("Visual Field Test Point Sequence", "VisualFieldTestPointSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0090), ElementsDictionaryEntry("Visual Field Test Point X-Coordinate", "VisualFieldTestPointXCoordinate", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0091), ElementsDictionaryEntry("Visual Field Test Point Y-Coordinate", "VisualFieldTestPointYCoordinate", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0092), ElementsDictionaryEntry("Age Corrected Sensitivity Deviation Value", "AgeCorrectedSensitivityDeviationValue", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0093), ElementsDictionaryEntry("Stimulus Results", "StimulusResults", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0094), ElementsDictionaryEntry("Sensitivity Value", "SensitivityValue", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0095), ElementsDictionaryEntry("Retest Stimulus Seen", "RetestStimulusSeen", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0096), ElementsDictionaryEntry("Retest Sensitivity Value", "RetestSensitivityValue", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0097), ElementsDictionaryEntry("Visual Field Test Point Normals Sequence", "VisualFieldTestPointNormalsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0098), ElementsDictionaryEntry("Quantified Defect", "QuantifiedDefect", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0100), ElementsDictionaryEntry("Age Corrected Sensitivity Deviation Probability Value", "AgeCorrectedSensitivityDeviationProbabilityValue", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0102), ElementsDictionaryEntry("Generalized Defect Corrected Sensitivity Deviation Flag", "GeneralizedDefectCorrectedSensitivityDeviationFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0103), ElementsDictionaryEntry("Generalized Defect Corrected Sensitivity Deviation Value", "GeneralizedDefectCorrectedSensitivityDeviationValue", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0104), ElementsDictionaryEntry("Generalized Defect Corrected Sensitivity Deviation Probability Value", "GeneralizedDefectCorrectedSensitivityDeviationProbabilityValue", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0105), ElementsDictionaryEntry("Minimum Sensitivity Value", "MinimumSensitivityValue", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0106), ElementsDictionaryEntry("Blind Spot Localized", "BlindSpotLocalized", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0107), ElementsDictionaryEntry("Blind Spot X-Coordinate", "BlindSpotXCoordinate", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0108), ElementsDictionaryEntry("Blind Spot Y-Coordinate", "BlindSpotYCoordinate", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0110), ElementsDictionaryEntry("Visual Acuity Measurement Sequence", "VisualAcuityMeasurementSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0112), ElementsDictionaryEntry("Refractive Parameters Used on Patient Sequence", "RefractiveParametersUsedOnPatientSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0113), ElementsDictionaryEntry("Measurement Laterality", "MeasurementLaterality", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0114), ElementsDictionaryEntry("Ophthalmic Patient Clinical Information Left Eye Sequence", "OphthalmicPatientClinicalInformationLeftEyeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0115), ElementsDictionaryEntry("Ophthalmic Patient Clinical Information Right Eye Sequence", "OphthalmicPatientClinicalInformationRightEyeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0117), ElementsDictionaryEntry("Foveal Point Normative Data Flag", "FovealPointNormativeDataFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0118), ElementsDictionaryEntry("Foveal Point Probability Value", "FovealPointProbabilityValue", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0120), ElementsDictionaryEntry("Screening Baseline Measured", "ScreeningBaselineMeasured", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0122), ElementsDictionaryEntry("Screening Baseline Measured Sequence", "ScreeningBaselineMeasuredSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0124), ElementsDictionaryEntry("Screening Baseline Type", "ScreeningBaselineType", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0126), ElementsDictionaryEntry("Screening Baseline Value", "ScreeningBaselineValue", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0202), ElementsDictionaryEntry("Algorithm Source", "AlgorithmSource", "LO", "1")); public_dictionary.emplace(Tag(0x0024, 0x0306), ElementsDictionaryEntry("Data Set Name", "DataSetName", "LO", "1")); public_dictionary.emplace(Tag(0x0024, 0x0307), ElementsDictionaryEntry("Data Set Version", "DataSetVersion", "LO", "1")); public_dictionary.emplace(Tag(0x0024, 0x0308), ElementsDictionaryEntry("Data Set Source", "DataSetSource", "LO", "1")); public_dictionary.emplace(Tag(0x0024, 0x0309), ElementsDictionaryEntry("Data Set Description", "DataSetDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0024, 0x0317), ElementsDictionaryEntry("Visual Field Test Reliability Global Index Sequence", "VisualFieldTestReliabilityGlobalIndexSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0320), ElementsDictionaryEntry("Visual Field Global Results Index Sequence", "VisualFieldGlobalResultsIndexSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0325), ElementsDictionaryEntry("Data Observation Sequence", "DataObservationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0024, 0x0338), ElementsDictionaryEntry("Index Normals Flag", "IndexNormalsFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0024, 0x0341), ElementsDictionaryEntry("Index Probability", "IndexProbability", "FL", "1")); public_dictionary.emplace(Tag(0x0024, 0x0344), ElementsDictionaryEntry("Index Probability Sequence", "IndexProbabilitySequence", "SQ", "1")); public_tags.emplace("VisualFieldHorizontalExtent", Tag(0x0024, 0x0010)); public_tags.emplace("VisualFieldVerticalExtent", Tag(0x0024, 0x0011)); public_tags.emplace("VisualFieldShape", Tag(0x0024, 0x0012)); public_tags.emplace("ScreeningTestModeCodeSequence", Tag(0x0024, 0x0016)); public_tags.emplace("MaximumStimulusLuminance", Tag(0x0024, 0x0018)); public_tags.emplace("BackgroundLuminance", Tag(0x0024, 0x0020)); public_tags.emplace("StimulusColorCodeSequence", Tag(0x0024, 0x0021)); public_tags.emplace("BackgroundIlluminationColorCodeSequence", Tag(0x0024, 0x0024)); public_tags.emplace("StimulusArea", Tag(0x0024, 0x0025)); public_tags.emplace("StimulusPresentationTime", Tag(0x0024, 0x0028)); public_tags.emplace("FixationSequence", Tag(0x0024, 0x0032)); public_tags.emplace("FixationMonitoringCodeSequence", Tag(0x0024, 0x0033)); public_tags.emplace("VisualFieldCatchTrialSequence", Tag(0x0024, 0x0034)); public_tags.emplace("FixationCheckedQuantity", Tag(0x0024, 0x0035)); public_tags.emplace("PatientNotProperlyFixatedQuantity", Tag(0x0024, 0x0036)); public_tags.emplace("PresentedVisualStimuliDataFlag", Tag(0x0024, 0x0037)); public_tags.emplace("NumberOfVisualStimuli", Tag(0x0024, 0x0038)); public_tags.emplace("ExcessiveFixationLossesDataFlag", Tag(0x0024, 0x0039)); public_tags.emplace("ExcessiveFixationLosses", Tag(0x0024, 0x0040)); public_tags.emplace("StimuliRetestingQuantity", Tag(0x0024, 0x0042)); public_tags.emplace("CommentsOnPatientPerformanceOfVisualField", Tag(0x0024, 0x0044)); public_tags.emplace("FalseNegativesEstimateFlag", Tag(0x0024, 0x0045)); public_tags.emplace("FalseNegativesEstimate", Tag(0x0024, 0x0046)); public_tags.emplace("NegativeCatchTrialsQuantity", Tag(0x0024, 0x0048)); public_tags.emplace("FalseNegativesQuantity", Tag(0x0024, 0x0050)); public_tags.emplace("ExcessiveFalseNegativesDataFlag", Tag(0x0024, 0x0051)); public_tags.emplace("ExcessiveFalseNegatives", Tag(0x0024, 0x0052)); public_tags.emplace("FalsePositivesEstimateFlag", Tag(0x0024, 0x0053)); public_tags.emplace("FalsePositivesEstimate", Tag(0x0024, 0x0054)); public_tags.emplace("CatchTrialsDataFlag", Tag(0x0024, 0x0055)); public_tags.emplace("PositiveCatchTrialsQuantity", Tag(0x0024, 0x0056)); public_tags.emplace("TestPointNormalsDataFlag", Tag(0x0024, 0x0057)); public_tags.emplace("TestPointNormalsSequence", Tag(0x0024, 0x0058)); public_tags.emplace("GlobalDeviationProbabilityNormalsFlag", Tag(0x0024, 0x0059)); public_tags.emplace("FalsePositivesQuantity", Tag(0x0024, 0x0060)); public_tags.emplace("ExcessiveFalsePositivesDataFlag", Tag(0x0024, 0x0061)); public_tags.emplace("ExcessiveFalsePositives", Tag(0x0024, 0x0062)); public_tags.emplace("VisualFieldTestNormalsFlag", Tag(0x0024, 0x0063)); public_tags.emplace("ResultsNormalsSequence", Tag(0x0024, 0x0064)); public_tags.emplace("AgeCorrectedSensitivityDeviationAlgorithmSequence", Tag(0x0024, 0x0065)); public_tags.emplace("GlobalDeviationFromNormal", Tag(0x0024, 0x0066)); public_tags.emplace("GeneralizedDefectSensitivityDeviationAlgorithmSequence", Tag(0x0024, 0x0067)); public_tags.emplace("LocalizedDeviationFromNormal", Tag(0x0024, 0x0068)); public_tags.emplace("PatientReliabilityIndicator", Tag(0x0024, 0x0069)); public_tags.emplace("VisualFieldMeanSensitivity", Tag(0x0024, 0x0070)); public_tags.emplace("GlobalDeviationProbability", Tag(0x0024, 0x0071)); public_tags.emplace("LocalDeviationProbabilityNormalsFlag", Tag(0x0024, 0x0072)); public_tags.emplace("LocalizedDeviationProbability", Tag(0x0024, 0x0073)); public_tags.emplace("ShortTermFluctuationCalculated", Tag(0x0024, 0x0074)); public_tags.emplace("ShortTermFluctuation", Tag(0x0024, 0x0075)); public_tags.emplace("ShortTermFluctuationProbabilityCalculated", Tag(0x0024, 0x0076)); public_tags.emplace("ShortTermFluctuationProbability", Tag(0x0024, 0x0077)); public_tags.emplace("CorrectedLocalizedDeviationFromNormalCalculated", Tag(0x0024, 0x0078)); public_tags.emplace("CorrectedLocalizedDeviationFromNormal", Tag(0x0024, 0x0079)); public_tags.emplace("CorrectedLocalizedDeviationFromNormalProbabilityCalculated", Tag(0x0024, 0x0080)); public_tags.emplace("CorrectedLocalizedDeviationFromNormalProbability", Tag(0x0024, 0x0081)); public_tags.emplace("GlobalDeviationProbabilitySequence", Tag(0x0024, 0x0083)); public_tags.emplace("LocalizedDeviationProbabilitySequence", Tag(0x0024, 0x0085)); public_tags.emplace("FovealSensitivityMeasured", Tag(0x0024, 0x0086)); public_tags.emplace("FovealSensitivity", Tag(0x0024, 0x0087)); public_tags.emplace("VisualFieldTestDuration", Tag(0x0024, 0x0088)); public_tags.emplace("VisualFieldTestPointSequence", Tag(0x0024, 0x0089)); public_tags.emplace("VisualFieldTestPointXCoordinate", Tag(0x0024, 0x0090)); public_tags.emplace("VisualFieldTestPointYCoordinate", Tag(0x0024, 0x0091)); public_tags.emplace("AgeCorrectedSensitivityDeviationValue", Tag(0x0024, 0x0092)); public_tags.emplace("StimulusResults", Tag(0x0024, 0x0093)); public_tags.emplace("SensitivityValue", Tag(0x0024, 0x0094)); public_tags.emplace("RetestStimulusSeen", Tag(0x0024, 0x0095)); public_tags.emplace("RetestSensitivityValue", Tag(0x0024, 0x0096)); public_tags.emplace("VisualFieldTestPointNormalsSequence", Tag(0x0024, 0x0097)); public_tags.emplace("QuantifiedDefect", Tag(0x0024, 0x0098)); public_tags.emplace("AgeCorrectedSensitivityDeviationProbabilityValue", Tag(0x0024, 0x0100)); public_tags.emplace("GeneralizedDefectCorrectedSensitivityDeviationFlag", Tag(0x0024, 0x0102)); public_tags.emplace("GeneralizedDefectCorrectedSensitivityDeviationValue", Tag(0x0024, 0x0103)); public_tags.emplace("GeneralizedDefectCorrectedSensitivityDeviationProbabilityValue", Tag(0x0024, 0x0104)); public_tags.emplace("MinimumSensitivityValue", Tag(0x0024, 0x0105)); public_tags.emplace("BlindSpotLocalized", Tag(0x0024, 0x0106)); public_tags.emplace("BlindSpotXCoordinate", Tag(0x0024, 0x0107)); public_tags.emplace("BlindSpotYCoordinate", Tag(0x0024, 0x0108)); public_tags.emplace("VisualAcuityMeasurementSequence", Tag(0x0024, 0x0110)); public_tags.emplace("RefractiveParametersUsedOnPatientSequence", Tag(0x0024, 0x0112)); public_tags.emplace("MeasurementLaterality", Tag(0x0024, 0x0113)); public_tags.emplace("OphthalmicPatientClinicalInformationLeftEyeSequence", Tag(0x0024, 0x0114)); public_tags.emplace("OphthalmicPatientClinicalInformationRightEyeSequence", Tag(0x0024, 0x0115)); public_tags.emplace("FovealPointNormativeDataFlag", Tag(0x0024, 0x0117)); public_tags.emplace("FovealPointProbabilityValue", Tag(0x0024, 0x0118)); public_tags.emplace("ScreeningBaselineMeasured", Tag(0x0024, 0x0120)); public_tags.emplace("ScreeningBaselineMeasuredSequence", Tag(0x0024, 0x0122)); public_tags.emplace("ScreeningBaselineType", Tag(0x0024, 0x0124)); public_tags.emplace("ScreeningBaselineValue", Tag(0x0024, 0x0126)); public_tags.emplace("AlgorithmSource", Tag(0x0024, 0x0202)); public_tags.emplace("DataSetName", Tag(0x0024, 0x0306)); public_tags.emplace("DataSetVersion", Tag(0x0024, 0x0307)); public_tags.emplace("DataSetSource", Tag(0x0024, 0x0308)); public_tags.emplace("DataSetDescription", Tag(0x0024, 0x0309)); public_tags.emplace("VisualFieldTestReliabilityGlobalIndexSequence", Tag(0x0024, 0x0317)); public_tags.emplace("VisualFieldGlobalResultsIndexSequence", Tag(0x0024, 0x0320)); public_tags.emplace("DataObservationSequence", Tag(0x0024, 0x0325)); public_tags.emplace("IndexNormalsFlag", Tag(0x0024, 0x0338)); public_tags.emplace("IndexProbability", Tag(0x0024, 0x0341)); public_tags.emplace("IndexProbabilitySequence", Tag(0x0024, 0x0344)); } } }odil-0.11.0/src/odil/registry_0024.h000066400000000000000000000143571362244656000167460ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0024 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0024 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const VisualFieldHorizontalExtent(0x0024, 0x0010); Tag const VisualFieldVerticalExtent(0x0024, 0x0011); Tag const VisualFieldShape(0x0024, 0x0012); Tag const ScreeningTestModeCodeSequence(0x0024, 0x0016); Tag const MaximumStimulusLuminance(0x0024, 0x0018); Tag const BackgroundLuminance(0x0024, 0x0020); Tag const StimulusColorCodeSequence(0x0024, 0x0021); Tag const BackgroundIlluminationColorCodeSequence(0x0024, 0x0024); Tag const StimulusArea(0x0024, 0x0025); Tag const StimulusPresentationTime(0x0024, 0x0028); Tag const FixationSequence(0x0024, 0x0032); Tag const FixationMonitoringCodeSequence(0x0024, 0x0033); Tag const VisualFieldCatchTrialSequence(0x0024, 0x0034); Tag const FixationCheckedQuantity(0x0024, 0x0035); Tag const PatientNotProperlyFixatedQuantity(0x0024, 0x0036); Tag const PresentedVisualStimuliDataFlag(0x0024, 0x0037); Tag const NumberOfVisualStimuli(0x0024, 0x0038); Tag const ExcessiveFixationLossesDataFlag(0x0024, 0x0039); Tag const ExcessiveFixationLosses(0x0024, 0x0040); Tag const StimuliRetestingQuantity(0x0024, 0x0042); Tag const CommentsOnPatientPerformanceOfVisualField(0x0024, 0x0044); Tag const FalseNegativesEstimateFlag(0x0024, 0x0045); Tag const FalseNegativesEstimate(0x0024, 0x0046); Tag const NegativeCatchTrialsQuantity(0x0024, 0x0048); Tag const FalseNegativesQuantity(0x0024, 0x0050); Tag const ExcessiveFalseNegativesDataFlag(0x0024, 0x0051); Tag const ExcessiveFalseNegatives(0x0024, 0x0052); Tag const FalsePositivesEstimateFlag(0x0024, 0x0053); Tag const FalsePositivesEstimate(0x0024, 0x0054); Tag const CatchTrialsDataFlag(0x0024, 0x0055); Tag const PositiveCatchTrialsQuantity(0x0024, 0x0056); Tag const TestPointNormalsDataFlag(0x0024, 0x0057); Tag const TestPointNormalsSequence(0x0024, 0x0058); Tag const GlobalDeviationProbabilityNormalsFlag(0x0024, 0x0059); Tag const FalsePositivesQuantity(0x0024, 0x0060); Tag const ExcessiveFalsePositivesDataFlag(0x0024, 0x0061); Tag const ExcessiveFalsePositives(0x0024, 0x0062); Tag const VisualFieldTestNormalsFlag(0x0024, 0x0063); Tag const ResultsNormalsSequence(0x0024, 0x0064); Tag const AgeCorrectedSensitivityDeviationAlgorithmSequence(0x0024, 0x0065); Tag const GlobalDeviationFromNormal(0x0024, 0x0066); Tag const GeneralizedDefectSensitivityDeviationAlgorithmSequence(0x0024, 0x0067); Tag const LocalizedDeviationFromNormal(0x0024, 0x0068); Tag const PatientReliabilityIndicator(0x0024, 0x0069); Tag const VisualFieldMeanSensitivity(0x0024, 0x0070); Tag const GlobalDeviationProbability(0x0024, 0x0071); Tag const LocalDeviationProbabilityNormalsFlag(0x0024, 0x0072); Tag const LocalizedDeviationProbability(0x0024, 0x0073); Tag const ShortTermFluctuationCalculated(0x0024, 0x0074); Tag const ShortTermFluctuation(0x0024, 0x0075); Tag const ShortTermFluctuationProbabilityCalculated(0x0024, 0x0076); Tag const ShortTermFluctuationProbability(0x0024, 0x0077); Tag const CorrectedLocalizedDeviationFromNormalCalculated(0x0024, 0x0078); Tag const CorrectedLocalizedDeviationFromNormal(0x0024, 0x0079); Tag const CorrectedLocalizedDeviationFromNormalProbabilityCalculated(0x0024, 0x0080); Tag const CorrectedLocalizedDeviationFromNormalProbability(0x0024, 0x0081); Tag const GlobalDeviationProbabilitySequence(0x0024, 0x0083); Tag const LocalizedDeviationProbabilitySequence(0x0024, 0x0085); Tag const FovealSensitivityMeasured(0x0024, 0x0086); Tag const FovealSensitivity(0x0024, 0x0087); Tag const VisualFieldTestDuration(0x0024, 0x0088); Tag const VisualFieldTestPointSequence(0x0024, 0x0089); Tag const VisualFieldTestPointXCoordinate(0x0024, 0x0090); Tag const VisualFieldTestPointYCoordinate(0x0024, 0x0091); Tag const AgeCorrectedSensitivityDeviationValue(0x0024, 0x0092); Tag const StimulusResults(0x0024, 0x0093); Tag const SensitivityValue(0x0024, 0x0094); Tag const RetestStimulusSeen(0x0024, 0x0095); Tag const RetestSensitivityValue(0x0024, 0x0096); Tag const VisualFieldTestPointNormalsSequence(0x0024, 0x0097); Tag const QuantifiedDefect(0x0024, 0x0098); Tag const AgeCorrectedSensitivityDeviationProbabilityValue(0x0024, 0x0100); Tag const GeneralizedDefectCorrectedSensitivityDeviationFlag(0x0024, 0x0102); Tag const GeneralizedDefectCorrectedSensitivityDeviationValue(0x0024, 0x0103); Tag const GeneralizedDefectCorrectedSensitivityDeviationProbabilityValue(0x0024, 0x0104); Tag const MinimumSensitivityValue(0x0024, 0x0105); Tag const BlindSpotLocalized(0x0024, 0x0106); Tag const BlindSpotXCoordinate(0x0024, 0x0107); Tag const BlindSpotYCoordinate(0x0024, 0x0108); Tag const VisualAcuityMeasurementSequence(0x0024, 0x0110); Tag const RefractiveParametersUsedOnPatientSequence(0x0024, 0x0112); Tag const MeasurementLaterality(0x0024, 0x0113); Tag const OphthalmicPatientClinicalInformationLeftEyeSequence(0x0024, 0x0114); Tag const OphthalmicPatientClinicalInformationRightEyeSequence(0x0024, 0x0115); Tag const FovealPointNormativeDataFlag(0x0024, 0x0117); Tag const FovealPointProbabilityValue(0x0024, 0x0118); Tag const ScreeningBaselineMeasured(0x0024, 0x0120); Tag const ScreeningBaselineMeasuredSequence(0x0024, 0x0122); Tag const ScreeningBaselineType(0x0024, 0x0124); Tag const ScreeningBaselineValue(0x0024, 0x0126); Tag const AlgorithmSource(0x0024, 0x0202); Tag const DataSetName(0x0024, 0x0306); Tag const DataSetVersion(0x0024, 0x0307); Tag const DataSetSource(0x0024, 0x0308); Tag const DataSetDescription(0x0024, 0x0309); Tag const VisualFieldTestReliabilityGlobalIndexSequence(0x0024, 0x0317); Tag const VisualFieldGlobalResultsIndexSequence(0x0024, 0x0320); Tag const DataObservationSequence(0x0024, 0x0325); Tag const IndexNormalsFlag(0x0024, 0x0338); Tag const IndexProbability(0x0024, 0x0341); Tag const IndexProbabilitySequence(0x0024, 0x0344); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0024odil-0.11.0/src/odil/registry_0028.cpp000066400000000000000000001451651362244656000173070ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0028( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0028, 0x0002), ElementsDictionaryEntry("Samples per Pixel", "SamplesPerPixel", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0003), ElementsDictionaryEntry("Samples per Pixel Used", "SamplesPerPixelUsed", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0004), ElementsDictionaryEntry("Photometric Interpretation", "PhotometricInterpretation", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0005), ElementsDictionaryEntry("Image Dimensions", "ImageDimensions", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0006), ElementsDictionaryEntry("Planar Configuration", "PlanarConfiguration", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0008), ElementsDictionaryEntry("Number of Frames", "NumberOfFrames", "IS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0009), ElementsDictionaryEntry("Frame Increment Pointer", "FrameIncrementPointer", "AT", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x000a), ElementsDictionaryEntry("Frame Dimension Pointer", "FrameDimensionPointer", "AT", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x0010), ElementsDictionaryEntry("Rows", "Rows", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0011), ElementsDictionaryEntry("Columns", "Columns", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0012), ElementsDictionaryEntry("Planes", "Planes", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0014), ElementsDictionaryEntry("Ultrasound Color Data Present", "UltrasoundColorDataPresent", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0030), ElementsDictionaryEntry("Pixel Spacing", "PixelSpacing", "DS", "2")); public_dictionary.emplace(Tag(0x0028, 0x0031), ElementsDictionaryEntry("Zoom Factor", "ZoomFactor", "DS", "2")); public_dictionary.emplace(Tag(0x0028, 0x0032), ElementsDictionaryEntry("Zoom Center", "ZoomCenter", "DS", "2")); public_dictionary.emplace(Tag(0x0028, 0x0034), ElementsDictionaryEntry("Pixel Aspect Ratio", "PixelAspectRatio", "IS", "2")); public_dictionary.emplace(Tag(0x0028, 0x0040), ElementsDictionaryEntry("Image Format", "ImageFormat", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0050), ElementsDictionaryEntry("Manipulated Image", "ManipulatedImage", "LO", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x0051), ElementsDictionaryEntry("Corrected Image", "CorrectedImage", "CS", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x005f), ElementsDictionaryEntry("Compression Recognition Code", "CompressionRecognitionCode", "LO", "1")); public_dictionary.emplace(Tag(0x0028, 0x0060), ElementsDictionaryEntry("Compression Code", "CompressionCode", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0061), ElementsDictionaryEntry("Compression Originator", "CompressionOriginator", "SH", "1")); public_dictionary.emplace(Tag(0x0028, 0x0062), ElementsDictionaryEntry("Compression Label", "CompressionLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0028, 0x0063), ElementsDictionaryEntry("Compression Description", "CompressionDescription", "SH", "1")); public_dictionary.emplace(Tag(0x0028, 0x0065), ElementsDictionaryEntry("Compression Sequence", "CompressionSequence", "CS", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x0066), ElementsDictionaryEntry("Compression Step Pointers", "CompressionStepPointers", "AT", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x0068), ElementsDictionaryEntry("Repeat Interval", "RepeatInterval", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0069), ElementsDictionaryEntry("Bits Grouped", "BitsGrouped", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0070), ElementsDictionaryEntry("Perimeter Table", "PerimeterTable", "US", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x0071), ElementsDictionaryEntry("Perimeter Value", "PerimeterValue", "US or SS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0080), ElementsDictionaryEntry("Predictor Rows", "PredictorRows", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0081), ElementsDictionaryEntry("Predictor Columns", "PredictorColumns", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0082), ElementsDictionaryEntry("Predictor Constants", "PredictorConstants", "US", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x0090), ElementsDictionaryEntry("Blocked Pixels", "BlockedPixels", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0091), ElementsDictionaryEntry("Block Rows", "BlockRows", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0092), ElementsDictionaryEntry("Block Columns", "BlockColumns", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0093), ElementsDictionaryEntry("Row Overlap", "RowOverlap", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0094), ElementsDictionaryEntry("Column Overlap", "ColumnOverlap", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0100), ElementsDictionaryEntry("Bits Allocated", "BitsAllocated", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0101), ElementsDictionaryEntry("Bits Stored", "BitsStored", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0102), ElementsDictionaryEntry("High Bit", "HighBit", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0103), ElementsDictionaryEntry("Pixel Representation", "PixelRepresentation", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0104), ElementsDictionaryEntry("Smallest Valid Pixel Value", "SmallestValidPixelValue", "US or SS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0105), ElementsDictionaryEntry("Largest Valid Pixel Value", "LargestValidPixelValue", "US or SS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0106), ElementsDictionaryEntry("Smallest Image Pixel Value", "SmallestImagePixelValue", "US or SS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0107), ElementsDictionaryEntry("Largest Image Pixel Value", "LargestImagePixelValue", "US or SS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0108), ElementsDictionaryEntry("Smallest Pixel Value in Series", "SmallestPixelValueInSeries", "US or SS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0109), ElementsDictionaryEntry("Largest Pixel Value in Series", "LargestPixelValueInSeries", "US or SS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0110), ElementsDictionaryEntry("Smallest Image Pixel Value in Plane", "SmallestImagePixelValueInPlane", "US or SS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0111), ElementsDictionaryEntry("Largest Image Pixel Value in Plane", "LargestImagePixelValueInPlane", "US or SS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0120), ElementsDictionaryEntry("Pixel Padding Value", "PixelPaddingValue", "US or SS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0121), ElementsDictionaryEntry("Pixel Padding Range Limit", "PixelPaddingRangeLimit", "US or SS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0122), ElementsDictionaryEntry("Float Pixel Padding Value", "FloatPixelPaddingValue", "FL", "1")); public_dictionary.emplace(Tag(0x0028, 0x0123), ElementsDictionaryEntry("Double Float Pixel Padding Value", "DoubleFloatPixelPaddingValue", "FD", "1")); public_dictionary.emplace(Tag(0x0028, 0x0124), ElementsDictionaryEntry("Float Pixel Padding Range Limit", "FloatPixelPaddingRangeLimit", "FL", "1")); public_dictionary.emplace(Tag(0x0028, 0x0125), ElementsDictionaryEntry("Double Float Pixel Padding Range Limit", "DoubleFloatPixelPaddingRangeLimit", "FD", "1")); public_dictionary.emplace(Tag(0x0028, 0x0200), ElementsDictionaryEntry("Image Location", "ImageLocation", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0300), ElementsDictionaryEntry("Quality Control Image", "QualityControlImage", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0301), ElementsDictionaryEntry("Burned In Annotation", "BurnedInAnnotation", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0302), ElementsDictionaryEntry("Recognizable Visual Features", "RecognizableVisualFeatures", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0303), ElementsDictionaryEntry("Longitudinal Temporal Information Modified", "LongitudinalTemporalInformationModified", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0304), ElementsDictionaryEntry("Referenced Color Palette Instance UID", "ReferencedColorPaletteInstanceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0028, 0x0400), ElementsDictionaryEntry("Transform Label", "TransformLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0028, 0x0401), ElementsDictionaryEntry("Transform Version Number", "TransformVersionNumber", "LO", "1")); public_dictionary.emplace(Tag(0x0028, 0x0402), ElementsDictionaryEntry("Number of Transform Steps", "NumberOfTransformSteps", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0403), ElementsDictionaryEntry("Sequence of Compressed Data", "SequenceOfCompressedData", "LO", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x0404), ElementsDictionaryEntry("Details of Coefficients", "DetailsOfCoefficients", "AT", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x0700), ElementsDictionaryEntry("DCT Label", "DCTLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0028, 0x0701), ElementsDictionaryEntry("Data Block Description", "DataBlockDescription", "CS", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x0702), ElementsDictionaryEntry("Data Block", "DataBlock", "AT", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x0710), ElementsDictionaryEntry("Normalization Factor Format", "NormalizationFactorFormat", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0720), ElementsDictionaryEntry("Zonal Map Number Format", "ZonalMapNumberFormat", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0721), ElementsDictionaryEntry("Zonal Map Location", "ZonalMapLocation", "AT", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x0722), ElementsDictionaryEntry("Zonal Map Format", "ZonalMapFormat", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0730), ElementsDictionaryEntry("Adaptive Map Format", "AdaptiveMapFormat", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0740), ElementsDictionaryEntry("Code Number Format", "CodeNumberFormat", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x0a02), ElementsDictionaryEntry("Pixel Spacing Calibration Type", "PixelSpacingCalibrationType", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x0a04), ElementsDictionaryEntry("Pixel Spacing Calibration Description", "PixelSpacingCalibrationDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0028, 0x1040), ElementsDictionaryEntry("Pixel Intensity Relationship", "PixelIntensityRelationship", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x1041), ElementsDictionaryEntry("Pixel Intensity Relationship Sign", "PixelIntensityRelationshipSign", "SS", "1")); public_dictionary.emplace(Tag(0x0028, 0x1050), ElementsDictionaryEntry("Window Center", "WindowCenter", "DS", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x1051), ElementsDictionaryEntry("Window Width", "WindowWidth", "DS", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x1052), ElementsDictionaryEntry("Rescale Intercept", "RescaleIntercept", "DS", "1")); public_dictionary.emplace(Tag(0x0028, 0x1053), ElementsDictionaryEntry("Rescale Slope", "RescaleSlope", "DS", "1")); public_dictionary.emplace(Tag(0x0028, 0x1054), ElementsDictionaryEntry("Rescale Type", "RescaleType", "LO", "1")); public_dictionary.emplace(Tag(0x0028, 0x1055), ElementsDictionaryEntry("Window Center & Width Explanation", "WindowCenterWidthExplanation", "LO", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x1056), ElementsDictionaryEntry("VOI LUT Function", "VOILUTFunction", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x1080), ElementsDictionaryEntry("Gray Scale", "GrayScale", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x1090), ElementsDictionaryEntry("Recommended Viewing Mode", "RecommendedViewingMode", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x1100), ElementsDictionaryEntry("Gray Lookup Table Descriptor", "GrayLookupTableDescriptor", "US or SS", "3")); public_dictionary.emplace(Tag(0x0028, 0x1101), ElementsDictionaryEntry("Red Palette Color Lookup Table Descriptor", "RedPaletteColorLookupTableDescriptor", "US or SS", "3")); public_dictionary.emplace(Tag(0x0028, 0x1102), ElementsDictionaryEntry("Green Palette Color Lookup Table Descriptor", "GreenPaletteColorLookupTableDescriptor", "US or SS", "3")); public_dictionary.emplace(Tag(0x0028, 0x1103), ElementsDictionaryEntry("Blue Palette Color Lookup Table Descriptor", "BluePaletteColorLookupTableDescriptor", "US or SS", "3")); public_dictionary.emplace(Tag(0x0028, 0x1104), ElementsDictionaryEntry("Alpha Palette Color Lookup Table Descriptor", "AlphaPaletteColorLookupTableDescriptor", "US", "3")); public_dictionary.emplace(Tag(0x0028, 0x1111), ElementsDictionaryEntry("Large Red Palette Color Lookup Table Descriptor", "LargeRedPaletteColorLookupTableDescriptor", "US or SS", "4")); public_dictionary.emplace(Tag(0x0028, 0x1112), ElementsDictionaryEntry("Large Green Palette Color Lookup Table Descriptor", "LargeGreenPaletteColorLookupTableDescriptor", "US or SS", "4")); public_dictionary.emplace(Tag(0x0028, 0x1113), ElementsDictionaryEntry("Large Blue Palette Color Lookup Table Descriptor", "LargeBluePaletteColorLookupTableDescriptor", "US or SS", "4")); public_dictionary.emplace(Tag(0x0028, 0x1199), ElementsDictionaryEntry("Palette Color Lookup Table UID", "PaletteColorLookupTableUID", "UI", "1")); public_dictionary.emplace(Tag(0x0028, 0x1200), ElementsDictionaryEntry("Gray Lookup Table Data", "GrayLookupTableData", "US or SS or OW", "1-n or 1")); public_dictionary.emplace(Tag(0x0028, 0x1201), ElementsDictionaryEntry("Red Palette Color Lookup Table Data", "RedPaletteColorLookupTableData", "OW", "1")); public_dictionary.emplace(Tag(0x0028, 0x1202), ElementsDictionaryEntry("Green Palette Color Lookup Table Data", "GreenPaletteColorLookupTableData", "OW", "1")); public_dictionary.emplace(Tag(0x0028, 0x1203), ElementsDictionaryEntry("Blue Palette Color Lookup Table Data", "BluePaletteColorLookupTableData", "OW", "1")); public_dictionary.emplace(Tag(0x0028, 0x1204), ElementsDictionaryEntry("Alpha Palette Color Lookup Table Data", "AlphaPaletteColorLookupTableData", "OW", "1")); public_dictionary.emplace(Tag(0x0028, 0x1211), ElementsDictionaryEntry("Large Red Palette Color Lookup Table Data", "LargeRedPaletteColorLookupTableData", "OW", "1")); public_dictionary.emplace(Tag(0x0028, 0x1212), ElementsDictionaryEntry("Large Green Palette Color Lookup Table Data", "LargeGreenPaletteColorLookupTableData", "OW", "1")); public_dictionary.emplace(Tag(0x0028, 0x1213), ElementsDictionaryEntry("Large Blue Palette Color Lookup Table Data", "LargeBluePaletteColorLookupTableData", "OW", "1")); public_dictionary.emplace(Tag(0x0028, 0x1214), ElementsDictionaryEntry("Large Palette Color Lookup Table UID", "LargePaletteColorLookupTableUID", "UI", "1")); public_dictionary.emplace(Tag(0x0028, 0x1221), ElementsDictionaryEntry("Segmented Red Palette Color Lookup Table Data", "SegmentedRedPaletteColorLookupTableData", "OW", "1")); public_dictionary.emplace(Tag(0x0028, 0x1222), ElementsDictionaryEntry("Segmented Green Palette Color Lookup Table Data", "SegmentedGreenPaletteColorLookupTableData", "OW", "1")); public_dictionary.emplace(Tag(0x0028, 0x1223), ElementsDictionaryEntry("Segmented Blue Palette Color Lookup Table Data", "SegmentedBluePaletteColorLookupTableData", "OW", "1")); public_dictionary.emplace(Tag(0x0028, 0x1224), ElementsDictionaryEntry("Segmented Alpha Palette Color Lookup Table Data", "SegmentedAlphaPaletteColorLookupTableData", "OW", "1")); public_dictionary.emplace(Tag(0x0028, 0x1230), ElementsDictionaryEntry("Stored Value Color Range Sequence", "StoredValueColorRangeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x1231), ElementsDictionaryEntry("Minimum Stored Value Mapped", "MinimumStoredValueMapped", "FD", "1")); public_dictionary.emplace(Tag(0x0028, 0x1232), ElementsDictionaryEntry("Maximum Stored Value Mapped", "MaximumStoredValueMapped", "FD", "1")); public_dictionary.emplace(Tag(0x0028, 0x1300), ElementsDictionaryEntry("Breast Implant Present", "BreastImplantPresent", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x1350), ElementsDictionaryEntry("Partial View", "PartialView", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x1351), ElementsDictionaryEntry("Partial View Description", "PartialViewDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0028, 0x1352), ElementsDictionaryEntry("Partial View Code Sequence", "PartialViewCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x135a), ElementsDictionaryEntry("Spatial Locations Preserved", "SpatialLocationsPreserved", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x1401), ElementsDictionaryEntry("Data Frame Assignment Sequence", "DataFrameAssignmentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x1402), ElementsDictionaryEntry("Data Path Assignment", "DataPathAssignment", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x1403), ElementsDictionaryEntry("Bits Mapped to Color Lookup Table", "BitsMappedToColorLookupTable", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x1404), ElementsDictionaryEntry("Blending LUT 1 Sequence", "BlendingLUT1Sequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x1405), ElementsDictionaryEntry("Blending LUT 1 Transfer Function", "BlendingLUT1TransferFunction", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x1406), ElementsDictionaryEntry("Blending Weight Constant", "BlendingWeightConstant", "FD", "1")); public_dictionary.emplace(Tag(0x0028, 0x1407), ElementsDictionaryEntry("Blending Lookup Table Descriptor", "BlendingLookupTableDescriptor", "US", "3")); public_dictionary.emplace(Tag(0x0028, 0x1408), ElementsDictionaryEntry("Blending Lookup Table Data", "BlendingLookupTableData", "OW", "1")); public_dictionary.emplace(Tag(0x0028, 0x140b), ElementsDictionaryEntry("Enhanced Palette Color Lookup Table Sequence", "EnhancedPaletteColorLookupTableSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x140c), ElementsDictionaryEntry("Blending LUT 2 Sequence", "BlendingLUT2Sequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x140d), ElementsDictionaryEntry("Blending LUT 2 Transfer Function", "BlendingLUT2TransferFunction", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x140e), ElementsDictionaryEntry("Data Path ID", "DataPathID", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x140f), ElementsDictionaryEntry("RGB LUT Transfer Function", "RGBLUTTransferFunction", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x1410), ElementsDictionaryEntry("Alpha LUT Transfer Function", "AlphaLUTTransferFunction", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x2000), ElementsDictionaryEntry("ICC Profile", "ICCProfile", "OB", "1")); public_dictionary.emplace(Tag(0x0028, 0x2002), ElementsDictionaryEntry("Color Space", "ColorSpace", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x2110), ElementsDictionaryEntry("Lossy Image Compression", "LossyImageCompression", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x2112), ElementsDictionaryEntry("Lossy Image Compression Ratio", "LossyImageCompressionRatio", "DS", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x2114), ElementsDictionaryEntry("Lossy Image Compression Method", "LossyImageCompressionMethod", "CS", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x3000), ElementsDictionaryEntry("Modality LUT Sequence", "ModalityLUTSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x3002), ElementsDictionaryEntry("LUT Descriptor", "LUTDescriptor", "US or SS", "3")); public_dictionary.emplace(Tag(0x0028, 0x3003), ElementsDictionaryEntry("LUT Explanation", "LUTExplanation", "LO", "1")); public_dictionary.emplace(Tag(0x0028, 0x3004), ElementsDictionaryEntry("Modality LUT Type", "ModalityLUTType", "LO", "1")); public_dictionary.emplace(Tag(0x0028, 0x3006), ElementsDictionaryEntry("LUT Data", "LUTData", "US or OW", "1-n or 1")); public_dictionary.emplace(Tag(0x0028, 0x3010), ElementsDictionaryEntry("VOI LUT Sequence", "VOILUTSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x3110), ElementsDictionaryEntry("Softcopy VOI LUT Sequence", "SoftcopyVOILUTSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x4000), ElementsDictionaryEntry("Image Presentation Comments", "ImagePresentationComments", "LT", "1")); public_dictionary.emplace(Tag(0x0028, 0x5000), ElementsDictionaryEntry("Bi-Plane Acquisition Sequence", "BiPlaneAcquisitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x6010), ElementsDictionaryEntry("Representative Frame Number", "RepresentativeFrameNumber", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x6020), ElementsDictionaryEntry("Frame Numbers of Interest (FOI)", "FrameNumbersOfInterest", "US", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x6022), ElementsDictionaryEntry("Frame of Interest Description", "FrameOfInterestDescription", "LO", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x6023), ElementsDictionaryEntry("Frame of Interest Type", "FrameOfInterestType", "CS", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x6030), ElementsDictionaryEntry("Mask Pointer(s)", "MaskPointers", "US", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x6040), ElementsDictionaryEntry("R Wave Pointer", "RWavePointer", "US", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x6100), ElementsDictionaryEntry("Mask Subtraction Sequence", "MaskSubtractionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x6101), ElementsDictionaryEntry("Mask Operation", "MaskOperation", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x6102), ElementsDictionaryEntry("Applicable Frame Range", "ApplicableFrameRange", "US", "2-2n")); public_dictionary.emplace(Tag(0x0028, 0x6110), ElementsDictionaryEntry("Mask Frame Numbers", "MaskFrameNumbers", "US", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x6112), ElementsDictionaryEntry("Contrast Frame Averaging", "ContrastFrameAveraging", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x6114), ElementsDictionaryEntry("Mask Sub-pixel Shift", "MaskSubPixelShift", "FL", "2")); public_dictionary.emplace(Tag(0x0028, 0x6120), ElementsDictionaryEntry("TID Offset", "TIDOffset", "SS", "1")); public_dictionary.emplace(Tag(0x0028, 0x6190), ElementsDictionaryEntry("Mask Operation Explanation", "MaskOperationExplanation", "ST", "1")); public_dictionary.emplace(Tag(0x0028, 0x7000), ElementsDictionaryEntry("Equipment Administrator Sequence", "EquipmentAdministratorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x7001), ElementsDictionaryEntry("Number of Display Subsystems", "NumberOfDisplaySubsystems", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x7002), ElementsDictionaryEntry("Current Configuration ID", "CurrentConfigurationID", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x7003), ElementsDictionaryEntry("Display Subsystem ID", "DisplaySubsystemID", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x7004), ElementsDictionaryEntry("Display Subsystem Name", "DisplaySubsystemName", "SH", "1")); public_dictionary.emplace(Tag(0x0028, 0x7005), ElementsDictionaryEntry("Display Subsystem Description", "DisplaySubsystemDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0028, 0x7006), ElementsDictionaryEntry("System Status", "SystemStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x7007), ElementsDictionaryEntry("System Status Comment", "SystemStatusComment", "LO", "1")); public_dictionary.emplace(Tag(0x0028, 0x7008), ElementsDictionaryEntry("Target Luminance Characteristics Sequence", "TargetLuminanceCharacteristicsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x7009), ElementsDictionaryEntry("Luminance Characteristics ID", "LuminanceCharacteristicsID", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x700a), ElementsDictionaryEntry("Display Subsystem Configuration Sequence", "DisplaySubsystemConfigurationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x700b), ElementsDictionaryEntry("Configuration ID", "ConfigurationID", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x700c), ElementsDictionaryEntry("Configuration Name", "ConfigurationName", "SH", "1")); public_dictionary.emplace(Tag(0x0028, 0x700d), ElementsDictionaryEntry("Configuration Description", "ConfigurationDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0028, 0x700e), ElementsDictionaryEntry("Referenced Target Luminance Characteristics ID", "ReferencedTargetLuminanceCharacteristicsID", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x700f), ElementsDictionaryEntry("QA Results Sequence", "QAResultsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x7010), ElementsDictionaryEntry("Display Subsystem QA Results Sequence", "DisplaySubsystemQAResultsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x7011), ElementsDictionaryEntry("Configuration QA Results Sequence", "ConfigurationQAResultsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x7012), ElementsDictionaryEntry("Measurement Equipment Sequence", "MeasurementEquipmentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x7013), ElementsDictionaryEntry("Measurement Functions", "MeasurementFunctions", "CS", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x7014), ElementsDictionaryEntry("Measurement Equipment Type", "MeasurementEquipmentType", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x7015), ElementsDictionaryEntry("Visual Evaluation Result Sequence", "VisualEvaluationResultSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x7016), ElementsDictionaryEntry("Display Calibration Result Sequence", "DisplayCalibrationResultSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x7017), ElementsDictionaryEntry("DDL Value", "DDLValue", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x7018), ElementsDictionaryEntry("CIExy White Point", "CIExyWhitePoint", "FL", "2")); public_dictionary.emplace(Tag(0x0028, 0x7019), ElementsDictionaryEntry("Display Function Type", "DisplayFunctionType", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x701a), ElementsDictionaryEntry("Gamma Value", "GammaValue", "FL", "1")); public_dictionary.emplace(Tag(0x0028, 0x701b), ElementsDictionaryEntry("Number of Luminance Points", "NumberOfLuminancePoints", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x701c), ElementsDictionaryEntry("Luminance Response Sequence", "LuminanceResponseSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x701d), ElementsDictionaryEntry("Target Minimum Luminance", "TargetMinimumLuminance", "FL", "1")); public_dictionary.emplace(Tag(0x0028, 0x701e), ElementsDictionaryEntry("Target Maximum Luminance", "TargetMaximumLuminance", "FL", "1")); public_dictionary.emplace(Tag(0x0028, 0x701f), ElementsDictionaryEntry("Luminance Value", "LuminanceValue", "FL", "1")); public_dictionary.emplace(Tag(0x0028, 0x7020), ElementsDictionaryEntry("Luminance Response Description", "LuminanceResponseDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0028, 0x7021), ElementsDictionaryEntry("White Point Flag", "WhitePointFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x7022), ElementsDictionaryEntry("Display Device Type Code Sequence", "DisplayDeviceTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x7023), ElementsDictionaryEntry("Display Subsystem Sequence", "DisplaySubsystemSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x7024), ElementsDictionaryEntry("Luminance Result Sequence", "LuminanceResultSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x7025), ElementsDictionaryEntry("Ambient Light Value Source", "AmbientLightValueSource", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x7026), ElementsDictionaryEntry("Measured Characteristics", "MeasuredCharacteristics", "CS", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x7027), ElementsDictionaryEntry("Luminance Uniformity Result Sequence", "LuminanceUniformityResultSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x7028), ElementsDictionaryEntry("Visual Evaluation Test Sequence", "VisualEvaluationTestSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x7029), ElementsDictionaryEntry("Test Result", "TestResult", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x702a), ElementsDictionaryEntry("Test Result Comment", "TestResultComment", "LO", "1")); public_dictionary.emplace(Tag(0x0028, 0x702b), ElementsDictionaryEntry("Test Image Validation", "TestImageValidation", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x702c), ElementsDictionaryEntry("Test Pattern Code Sequence", "TestPatternCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x702d), ElementsDictionaryEntry("Measurement Pattern Code Sequence", "MeasurementPatternCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x702e), ElementsDictionaryEntry("Visual Evaluation Method Code Sequence", "VisualEvaluationMethodCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x7fe0), ElementsDictionaryEntry("Pixel Data Provider URL", "PixelDataProviderURL", "UR", "1")); public_dictionary.emplace(Tag(0x0028, 0x9001), ElementsDictionaryEntry("Data Point Rows", "DataPointRows", "UL", "1")); public_dictionary.emplace(Tag(0x0028, 0x9002), ElementsDictionaryEntry("Data Point Columns", "DataPointColumns", "UL", "1")); public_dictionary.emplace(Tag(0x0028, 0x9003), ElementsDictionaryEntry("Signal Domain Columns", "SignalDomainColumns", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x9099), ElementsDictionaryEntry("Largest Monochrome Pixel Value", "LargestMonochromePixelValue", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x9108), ElementsDictionaryEntry("Data Representation", "DataRepresentation", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x9110), ElementsDictionaryEntry("Pixel Measures Sequence", "PixelMeasuresSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x9132), ElementsDictionaryEntry("Frame VOI LUT Sequence", "FrameVOILUTSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x9145), ElementsDictionaryEntry("Pixel Value Transformation Sequence", "PixelValueTransformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x9235), ElementsDictionaryEntry("Signal Domain Rows", "SignalDomainRows", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x9411), ElementsDictionaryEntry("Display Filter Percentage", "DisplayFilterPercentage", "FL", "1")); public_dictionary.emplace(Tag(0x0028, 0x9415), ElementsDictionaryEntry("Frame Pixel Shift Sequence", "FramePixelShiftSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x9416), ElementsDictionaryEntry("Subtraction Item ID", "SubtractionItemID", "US", "1")); public_dictionary.emplace(Tag(0x0028, 0x9422), ElementsDictionaryEntry("Pixel Intensity Relationship LUT Sequence", "PixelIntensityRelationshipLUTSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x9443), ElementsDictionaryEntry("Frame Pixel Data Properties Sequence", "FramePixelDataPropertiesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x9444), ElementsDictionaryEntry("Geometrical Properties", "GeometricalProperties", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x9445), ElementsDictionaryEntry("Geometric Maximum Distortion", "GeometricMaximumDistortion", "FL", "1")); public_dictionary.emplace(Tag(0x0028, 0x9446), ElementsDictionaryEntry("Image Processing Applied", "ImageProcessingApplied", "CS", "1-n")); public_dictionary.emplace(Tag(0x0028, 0x9454), ElementsDictionaryEntry("Mask Selection Mode", "MaskSelectionMode", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x9474), ElementsDictionaryEntry("LUT Function", "LUTFunction", "CS", "1")); public_dictionary.emplace(Tag(0x0028, 0x9478), ElementsDictionaryEntry("Mask Visibility Percentage", "MaskVisibilityPercentage", "FL", "1")); public_dictionary.emplace(Tag(0x0028, 0x9501), ElementsDictionaryEntry("Pixel Shift Sequence", "PixelShiftSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x9502), ElementsDictionaryEntry("Region Pixel Shift Sequence", "RegionPixelShiftSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x9503), ElementsDictionaryEntry("Vertices of the Region", "VerticesOfTheRegion", "SS", "2-2n")); public_dictionary.emplace(Tag(0x0028, 0x9505), ElementsDictionaryEntry("Multi-frame Presentation Sequence", "MultiFramePresentationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0028, 0x9506), ElementsDictionaryEntry("Pixel Shift Frame Range", "PixelShiftFrameRange", "US", "2-2n")); public_dictionary.emplace(Tag(0x0028, 0x9507), ElementsDictionaryEntry("LUT Frame Range", "LUTFrameRange", "US", "2-2n")); public_dictionary.emplace(Tag(0x0028, 0x9520), ElementsDictionaryEntry("Image to Equipment Mapping Matrix", "ImageToEquipmentMappingMatrix", "DS", "16")); public_dictionary.emplace(Tag(0x0028, 0x9537), ElementsDictionaryEntry("Equipment Coordinate System Identification", "EquipmentCoordinateSystemIdentification", "CS", "1")); public_tags.emplace("SamplesPerPixel", Tag(0x0028, 0x0002)); public_tags.emplace("SamplesPerPixelUsed", Tag(0x0028, 0x0003)); public_tags.emplace("PhotometricInterpretation", Tag(0x0028, 0x0004)); public_tags.emplace("ImageDimensions", Tag(0x0028, 0x0005)); public_tags.emplace("PlanarConfiguration", Tag(0x0028, 0x0006)); public_tags.emplace("NumberOfFrames", Tag(0x0028, 0x0008)); public_tags.emplace("FrameIncrementPointer", Tag(0x0028, 0x0009)); public_tags.emplace("FrameDimensionPointer", Tag(0x0028, 0x000a)); public_tags.emplace("Rows", Tag(0x0028, 0x0010)); public_tags.emplace("Columns", Tag(0x0028, 0x0011)); public_tags.emplace("Planes", Tag(0x0028, 0x0012)); public_tags.emplace("UltrasoundColorDataPresent", Tag(0x0028, 0x0014)); public_tags.emplace("PixelSpacing", Tag(0x0028, 0x0030)); public_tags.emplace("ZoomFactor", Tag(0x0028, 0x0031)); public_tags.emplace("ZoomCenter", Tag(0x0028, 0x0032)); public_tags.emplace("PixelAspectRatio", Tag(0x0028, 0x0034)); public_tags.emplace("ImageFormat", Tag(0x0028, 0x0040)); public_tags.emplace("ManipulatedImage", Tag(0x0028, 0x0050)); public_tags.emplace("CorrectedImage", Tag(0x0028, 0x0051)); public_tags.emplace("CompressionRecognitionCode", Tag(0x0028, 0x005f)); public_tags.emplace("CompressionCode", Tag(0x0028, 0x0060)); public_tags.emplace("CompressionOriginator", Tag(0x0028, 0x0061)); public_tags.emplace("CompressionLabel", Tag(0x0028, 0x0062)); public_tags.emplace("CompressionDescription", Tag(0x0028, 0x0063)); public_tags.emplace("CompressionSequence", Tag(0x0028, 0x0065)); public_tags.emplace("CompressionStepPointers", Tag(0x0028, 0x0066)); public_tags.emplace("RepeatInterval", Tag(0x0028, 0x0068)); public_tags.emplace("BitsGrouped", Tag(0x0028, 0x0069)); public_tags.emplace("PerimeterTable", Tag(0x0028, 0x0070)); public_tags.emplace("PerimeterValue", Tag(0x0028, 0x0071)); public_tags.emplace("PredictorRows", Tag(0x0028, 0x0080)); public_tags.emplace("PredictorColumns", Tag(0x0028, 0x0081)); public_tags.emplace("PredictorConstants", Tag(0x0028, 0x0082)); public_tags.emplace("BlockedPixels", Tag(0x0028, 0x0090)); public_tags.emplace("BlockRows", Tag(0x0028, 0x0091)); public_tags.emplace("BlockColumns", Tag(0x0028, 0x0092)); public_tags.emplace("RowOverlap", Tag(0x0028, 0x0093)); public_tags.emplace("ColumnOverlap", Tag(0x0028, 0x0094)); public_tags.emplace("BitsAllocated", Tag(0x0028, 0x0100)); public_tags.emplace("BitsStored", Tag(0x0028, 0x0101)); public_tags.emplace("HighBit", Tag(0x0028, 0x0102)); public_tags.emplace("PixelRepresentation", Tag(0x0028, 0x0103)); public_tags.emplace("SmallestValidPixelValue", Tag(0x0028, 0x0104)); public_tags.emplace("LargestValidPixelValue", Tag(0x0028, 0x0105)); public_tags.emplace("SmallestImagePixelValue", Tag(0x0028, 0x0106)); public_tags.emplace("LargestImagePixelValue", Tag(0x0028, 0x0107)); public_tags.emplace("SmallestPixelValueInSeries", Tag(0x0028, 0x0108)); public_tags.emplace("LargestPixelValueInSeries", Tag(0x0028, 0x0109)); public_tags.emplace("SmallestImagePixelValueInPlane", Tag(0x0028, 0x0110)); public_tags.emplace("LargestImagePixelValueInPlane", Tag(0x0028, 0x0111)); public_tags.emplace("PixelPaddingValue", Tag(0x0028, 0x0120)); public_tags.emplace("PixelPaddingRangeLimit", Tag(0x0028, 0x0121)); public_tags.emplace("FloatPixelPaddingValue", Tag(0x0028, 0x0122)); public_tags.emplace("DoubleFloatPixelPaddingValue", Tag(0x0028, 0x0123)); public_tags.emplace("FloatPixelPaddingRangeLimit", Tag(0x0028, 0x0124)); public_tags.emplace("DoubleFloatPixelPaddingRangeLimit", Tag(0x0028, 0x0125)); public_tags.emplace("ImageLocation", Tag(0x0028, 0x0200)); public_tags.emplace("QualityControlImage", Tag(0x0028, 0x0300)); public_tags.emplace("BurnedInAnnotation", Tag(0x0028, 0x0301)); public_tags.emplace("RecognizableVisualFeatures", Tag(0x0028, 0x0302)); public_tags.emplace("LongitudinalTemporalInformationModified", Tag(0x0028, 0x0303)); public_tags.emplace("ReferencedColorPaletteInstanceUID", Tag(0x0028, 0x0304)); public_tags.emplace("TransformLabel", Tag(0x0028, 0x0400)); public_tags.emplace("TransformVersionNumber", Tag(0x0028, 0x0401)); public_tags.emplace("NumberOfTransformSteps", Tag(0x0028, 0x0402)); public_tags.emplace("SequenceOfCompressedData", Tag(0x0028, 0x0403)); public_tags.emplace("DetailsOfCoefficients", Tag(0x0028, 0x0404)); public_tags.emplace("DCTLabel", Tag(0x0028, 0x0700)); public_tags.emplace("DataBlockDescription", Tag(0x0028, 0x0701)); public_tags.emplace("DataBlock", Tag(0x0028, 0x0702)); public_tags.emplace("NormalizationFactorFormat", Tag(0x0028, 0x0710)); public_tags.emplace("ZonalMapNumberFormat", Tag(0x0028, 0x0720)); public_tags.emplace("ZonalMapLocation", Tag(0x0028, 0x0721)); public_tags.emplace("ZonalMapFormat", Tag(0x0028, 0x0722)); public_tags.emplace("AdaptiveMapFormat", Tag(0x0028, 0x0730)); public_tags.emplace("CodeNumberFormat", Tag(0x0028, 0x0740)); public_tags.emplace("PixelSpacingCalibrationType", Tag(0x0028, 0x0a02)); public_tags.emplace("PixelSpacingCalibrationDescription", Tag(0x0028, 0x0a04)); public_tags.emplace("PixelIntensityRelationship", Tag(0x0028, 0x1040)); public_tags.emplace("PixelIntensityRelationshipSign", Tag(0x0028, 0x1041)); public_tags.emplace("WindowCenter", Tag(0x0028, 0x1050)); public_tags.emplace("WindowWidth", Tag(0x0028, 0x1051)); public_tags.emplace("RescaleIntercept", Tag(0x0028, 0x1052)); public_tags.emplace("RescaleSlope", Tag(0x0028, 0x1053)); public_tags.emplace("RescaleType", Tag(0x0028, 0x1054)); public_tags.emplace("WindowCenterWidthExplanation", Tag(0x0028, 0x1055)); public_tags.emplace("VOILUTFunction", Tag(0x0028, 0x1056)); public_tags.emplace("GrayScale", Tag(0x0028, 0x1080)); public_tags.emplace("RecommendedViewingMode", Tag(0x0028, 0x1090)); public_tags.emplace("GrayLookupTableDescriptor", Tag(0x0028, 0x1100)); public_tags.emplace("RedPaletteColorLookupTableDescriptor", Tag(0x0028, 0x1101)); public_tags.emplace("GreenPaletteColorLookupTableDescriptor", Tag(0x0028, 0x1102)); public_tags.emplace("BluePaletteColorLookupTableDescriptor", Tag(0x0028, 0x1103)); public_tags.emplace("AlphaPaletteColorLookupTableDescriptor", Tag(0x0028, 0x1104)); public_tags.emplace("LargeRedPaletteColorLookupTableDescriptor", Tag(0x0028, 0x1111)); public_tags.emplace("LargeGreenPaletteColorLookupTableDescriptor", Tag(0x0028, 0x1112)); public_tags.emplace("LargeBluePaletteColorLookupTableDescriptor", Tag(0x0028, 0x1113)); public_tags.emplace("PaletteColorLookupTableUID", Tag(0x0028, 0x1199)); public_tags.emplace("GrayLookupTableData", Tag(0x0028, 0x1200)); public_tags.emplace("RedPaletteColorLookupTableData", Tag(0x0028, 0x1201)); public_tags.emplace("GreenPaletteColorLookupTableData", Tag(0x0028, 0x1202)); public_tags.emplace("BluePaletteColorLookupTableData", Tag(0x0028, 0x1203)); public_tags.emplace("AlphaPaletteColorLookupTableData", Tag(0x0028, 0x1204)); public_tags.emplace("LargeRedPaletteColorLookupTableData", Tag(0x0028, 0x1211)); public_tags.emplace("LargeGreenPaletteColorLookupTableData", Tag(0x0028, 0x1212)); public_tags.emplace("LargeBluePaletteColorLookupTableData", Tag(0x0028, 0x1213)); public_tags.emplace("LargePaletteColorLookupTableUID", Tag(0x0028, 0x1214)); public_tags.emplace("SegmentedRedPaletteColorLookupTableData", Tag(0x0028, 0x1221)); public_tags.emplace("SegmentedGreenPaletteColorLookupTableData", Tag(0x0028, 0x1222)); public_tags.emplace("SegmentedBluePaletteColorLookupTableData", Tag(0x0028, 0x1223)); public_tags.emplace("SegmentedAlphaPaletteColorLookupTableData", Tag(0x0028, 0x1224)); public_tags.emplace("StoredValueColorRangeSequence", Tag(0x0028, 0x1230)); public_tags.emplace("MinimumStoredValueMapped", Tag(0x0028, 0x1231)); public_tags.emplace("MaximumStoredValueMapped", Tag(0x0028, 0x1232)); public_tags.emplace("BreastImplantPresent", Tag(0x0028, 0x1300)); public_tags.emplace("PartialView", Tag(0x0028, 0x1350)); public_tags.emplace("PartialViewDescription", Tag(0x0028, 0x1351)); public_tags.emplace("PartialViewCodeSequence", Tag(0x0028, 0x1352)); public_tags.emplace("SpatialLocationsPreserved", Tag(0x0028, 0x135a)); public_tags.emplace("DataFrameAssignmentSequence", Tag(0x0028, 0x1401)); public_tags.emplace("DataPathAssignment", Tag(0x0028, 0x1402)); public_tags.emplace("BitsMappedToColorLookupTable", Tag(0x0028, 0x1403)); public_tags.emplace("BlendingLUT1Sequence", Tag(0x0028, 0x1404)); public_tags.emplace("BlendingLUT1TransferFunction", Tag(0x0028, 0x1405)); public_tags.emplace("BlendingWeightConstant", Tag(0x0028, 0x1406)); public_tags.emplace("BlendingLookupTableDescriptor", Tag(0x0028, 0x1407)); public_tags.emplace("BlendingLookupTableData", Tag(0x0028, 0x1408)); public_tags.emplace("EnhancedPaletteColorLookupTableSequence", Tag(0x0028, 0x140b)); public_tags.emplace("BlendingLUT2Sequence", Tag(0x0028, 0x140c)); public_tags.emplace("BlendingLUT2TransferFunction", Tag(0x0028, 0x140d)); public_tags.emplace("DataPathID", Tag(0x0028, 0x140e)); public_tags.emplace("RGBLUTTransferFunction", Tag(0x0028, 0x140f)); public_tags.emplace("AlphaLUTTransferFunction", Tag(0x0028, 0x1410)); public_tags.emplace("ICCProfile", Tag(0x0028, 0x2000)); public_tags.emplace("ColorSpace", Tag(0x0028, 0x2002)); public_tags.emplace("LossyImageCompression", Tag(0x0028, 0x2110)); public_tags.emplace("LossyImageCompressionRatio", Tag(0x0028, 0x2112)); public_tags.emplace("LossyImageCompressionMethod", Tag(0x0028, 0x2114)); public_tags.emplace("ModalityLUTSequence", Tag(0x0028, 0x3000)); public_tags.emplace("LUTDescriptor", Tag(0x0028, 0x3002)); public_tags.emplace("LUTExplanation", Tag(0x0028, 0x3003)); public_tags.emplace("ModalityLUTType", Tag(0x0028, 0x3004)); public_tags.emplace("LUTData", Tag(0x0028, 0x3006)); public_tags.emplace("VOILUTSequence", Tag(0x0028, 0x3010)); public_tags.emplace("SoftcopyVOILUTSequence", Tag(0x0028, 0x3110)); public_tags.emplace("ImagePresentationComments", Tag(0x0028, 0x4000)); public_tags.emplace("BiPlaneAcquisitionSequence", Tag(0x0028, 0x5000)); public_tags.emplace("RepresentativeFrameNumber", Tag(0x0028, 0x6010)); public_tags.emplace("FrameNumbersOfInterest", Tag(0x0028, 0x6020)); public_tags.emplace("FrameOfInterestDescription", Tag(0x0028, 0x6022)); public_tags.emplace("FrameOfInterestType", Tag(0x0028, 0x6023)); public_tags.emplace("MaskPointers", Tag(0x0028, 0x6030)); public_tags.emplace("RWavePointer", Tag(0x0028, 0x6040)); public_tags.emplace("MaskSubtractionSequence", Tag(0x0028, 0x6100)); public_tags.emplace("MaskOperation", Tag(0x0028, 0x6101)); public_tags.emplace("ApplicableFrameRange", Tag(0x0028, 0x6102)); public_tags.emplace("MaskFrameNumbers", Tag(0x0028, 0x6110)); public_tags.emplace("ContrastFrameAveraging", Tag(0x0028, 0x6112)); public_tags.emplace("MaskSubPixelShift", Tag(0x0028, 0x6114)); public_tags.emplace("TIDOffset", Tag(0x0028, 0x6120)); public_tags.emplace("MaskOperationExplanation", Tag(0x0028, 0x6190)); public_tags.emplace("EquipmentAdministratorSequence", Tag(0x0028, 0x7000)); public_tags.emplace("NumberOfDisplaySubsystems", Tag(0x0028, 0x7001)); public_tags.emplace("CurrentConfigurationID", Tag(0x0028, 0x7002)); public_tags.emplace("DisplaySubsystemID", Tag(0x0028, 0x7003)); public_tags.emplace("DisplaySubsystemName", Tag(0x0028, 0x7004)); public_tags.emplace("DisplaySubsystemDescription", Tag(0x0028, 0x7005)); public_tags.emplace("SystemStatus", Tag(0x0028, 0x7006)); public_tags.emplace("SystemStatusComment", Tag(0x0028, 0x7007)); public_tags.emplace("TargetLuminanceCharacteristicsSequence", Tag(0x0028, 0x7008)); public_tags.emplace("LuminanceCharacteristicsID", Tag(0x0028, 0x7009)); public_tags.emplace("DisplaySubsystemConfigurationSequence", Tag(0x0028, 0x700a)); public_tags.emplace("ConfigurationID", Tag(0x0028, 0x700b)); public_tags.emplace("ConfigurationName", Tag(0x0028, 0x700c)); public_tags.emplace("ConfigurationDescription", Tag(0x0028, 0x700d)); public_tags.emplace("ReferencedTargetLuminanceCharacteristicsID", Tag(0x0028, 0x700e)); public_tags.emplace("QAResultsSequence", Tag(0x0028, 0x700f)); public_tags.emplace("DisplaySubsystemQAResultsSequence", Tag(0x0028, 0x7010)); public_tags.emplace("ConfigurationQAResultsSequence", Tag(0x0028, 0x7011)); public_tags.emplace("MeasurementEquipmentSequence", Tag(0x0028, 0x7012)); public_tags.emplace("MeasurementFunctions", Tag(0x0028, 0x7013)); public_tags.emplace("MeasurementEquipmentType", Tag(0x0028, 0x7014)); public_tags.emplace("VisualEvaluationResultSequence", Tag(0x0028, 0x7015)); public_tags.emplace("DisplayCalibrationResultSequence", Tag(0x0028, 0x7016)); public_tags.emplace("DDLValue", Tag(0x0028, 0x7017)); public_tags.emplace("CIExyWhitePoint", Tag(0x0028, 0x7018)); public_tags.emplace("DisplayFunctionType", Tag(0x0028, 0x7019)); public_tags.emplace("GammaValue", Tag(0x0028, 0x701a)); public_tags.emplace("NumberOfLuminancePoints", Tag(0x0028, 0x701b)); public_tags.emplace("LuminanceResponseSequence", Tag(0x0028, 0x701c)); public_tags.emplace("TargetMinimumLuminance", Tag(0x0028, 0x701d)); public_tags.emplace("TargetMaximumLuminance", Tag(0x0028, 0x701e)); public_tags.emplace("LuminanceValue", Tag(0x0028, 0x701f)); public_tags.emplace("LuminanceResponseDescription", Tag(0x0028, 0x7020)); public_tags.emplace("WhitePointFlag", Tag(0x0028, 0x7021)); public_tags.emplace("DisplayDeviceTypeCodeSequence", Tag(0x0028, 0x7022)); public_tags.emplace("DisplaySubsystemSequence", Tag(0x0028, 0x7023)); public_tags.emplace("LuminanceResultSequence", Tag(0x0028, 0x7024)); public_tags.emplace("AmbientLightValueSource", Tag(0x0028, 0x7025)); public_tags.emplace("MeasuredCharacteristics", Tag(0x0028, 0x7026)); public_tags.emplace("LuminanceUniformityResultSequence", Tag(0x0028, 0x7027)); public_tags.emplace("VisualEvaluationTestSequence", Tag(0x0028, 0x7028)); public_tags.emplace("TestResult", Tag(0x0028, 0x7029)); public_tags.emplace("TestResultComment", Tag(0x0028, 0x702a)); public_tags.emplace("TestImageValidation", Tag(0x0028, 0x702b)); public_tags.emplace("TestPatternCodeSequence", Tag(0x0028, 0x702c)); public_tags.emplace("MeasurementPatternCodeSequence", Tag(0x0028, 0x702d)); public_tags.emplace("VisualEvaluationMethodCodeSequence", Tag(0x0028, 0x702e)); public_tags.emplace("PixelDataProviderURL", Tag(0x0028, 0x7fe0)); public_tags.emplace("DataPointRows", Tag(0x0028, 0x9001)); public_tags.emplace("DataPointColumns", Tag(0x0028, 0x9002)); public_tags.emplace("SignalDomainColumns", Tag(0x0028, 0x9003)); public_tags.emplace("LargestMonochromePixelValue", Tag(0x0028, 0x9099)); public_tags.emplace("DataRepresentation", Tag(0x0028, 0x9108)); public_tags.emplace("PixelMeasuresSequence", Tag(0x0028, 0x9110)); public_tags.emplace("FrameVOILUTSequence", Tag(0x0028, 0x9132)); public_tags.emplace("PixelValueTransformationSequence", Tag(0x0028, 0x9145)); public_tags.emplace("SignalDomainRows", Tag(0x0028, 0x9235)); public_tags.emplace("DisplayFilterPercentage", Tag(0x0028, 0x9411)); public_tags.emplace("FramePixelShiftSequence", Tag(0x0028, 0x9415)); public_tags.emplace("SubtractionItemID", Tag(0x0028, 0x9416)); public_tags.emplace("PixelIntensityRelationshipLUTSequence", Tag(0x0028, 0x9422)); public_tags.emplace("FramePixelDataPropertiesSequence", Tag(0x0028, 0x9443)); public_tags.emplace("GeometricalProperties", Tag(0x0028, 0x9444)); public_tags.emplace("GeometricMaximumDistortion", Tag(0x0028, 0x9445)); public_tags.emplace("ImageProcessingApplied", Tag(0x0028, 0x9446)); public_tags.emplace("MaskSelectionMode", Tag(0x0028, 0x9454)); public_tags.emplace("LUTFunction", Tag(0x0028, 0x9474)); public_tags.emplace("MaskVisibilityPercentage", Tag(0x0028, 0x9478)); public_tags.emplace("PixelShiftSequence", Tag(0x0028, 0x9501)); public_tags.emplace("RegionPixelShiftSequence", Tag(0x0028, 0x9502)); public_tags.emplace("VerticesOfTheRegion", Tag(0x0028, 0x9503)); public_tags.emplace("MultiFramePresentationSequence", Tag(0x0028, 0x9505)); public_tags.emplace("PixelShiftFrameRange", Tag(0x0028, 0x9506)); public_tags.emplace("LUTFrameRange", Tag(0x0028, 0x9507)); public_tags.emplace("ImageToEquipmentMappingMatrix", Tag(0x0028, 0x9520)); public_tags.emplace("EquipmentCoordinateSystemIdentification", Tag(0x0028, 0x9537)); } } }odil-0.11.0/src/odil/registry_0028.h000066400000000000000000000303141362244656000167410ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0028 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0028 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const SamplesPerPixel(0x0028, 0x0002); Tag const SamplesPerPixelUsed(0x0028, 0x0003); Tag const PhotometricInterpretation(0x0028, 0x0004); Tag const ImageDimensions(0x0028, 0x0005); Tag const PlanarConfiguration(0x0028, 0x0006); Tag const NumberOfFrames(0x0028, 0x0008); Tag const FrameIncrementPointer(0x0028, 0x0009); Tag const FrameDimensionPointer(0x0028, 0x000a); Tag const Rows(0x0028, 0x0010); Tag const Columns(0x0028, 0x0011); Tag const Planes(0x0028, 0x0012); Tag const UltrasoundColorDataPresent(0x0028, 0x0014); Tag const PixelSpacing(0x0028, 0x0030); Tag const ZoomFactor(0x0028, 0x0031); Tag const ZoomCenter(0x0028, 0x0032); Tag const PixelAspectRatio(0x0028, 0x0034); Tag const ImageFormat(0x0028, 0x0040); Tag const ManipulatedImage(0x0028, 0x0050); Tag const CorrectedImage(0x0028, 0x0051); Tag const CompressionRecognitionCode(0x0028, 0x005f); Tag const CompressionCode(0x0028, 0x0060); Tag const CompressionOriginator(0x0028, 0x0061); Tag const CompressionLabel(0x0028, 0x0062); Tag const CompressionDescription(0x0028, 0x0063); Tag const CompressionSequence(0x0028, 0x0065); Tag const CompressionStepPointers(0x0028, 0x0066); Tag const RepeatInterval(0x0028, 0x0068); Tag const BitsGrouped(0x0028, 0x0069); Tag const PerimeterTable(0x0028, 0x0070); Tag const PerimeterValue(0x0028, 0x0071); Tag const PredictorRows(0x0028, 0x0080); Tag const PredictorColumns(0x0028, 0x0081); Tag const PredictorConstants(0x0028, 0x0082); Tag const BlockedPixels(0x0028, 0x0090); Tag const BlockRows(0x0028, 0x0091); Tag const BlockColumns(0x0028, 0x0092); Tag const RowOverlap(0x0028, 0x0093); Tag const ColumnOverlap(0x0028, 0x0094); Tag const BitsAllocated(0x0028, 0x0100); Tag const BitsStored(0x0028, 0x0101); Tag const HighBit(0x0028, 0x0102); Tag const PixelRepresentation(0x0028, 0x0103); Tag const SmallestValidPixelValue(0x0028, 0x0104); Tag const LargestValidPixelValue(0x0028, 0x0105); Tag const SmallestImagePixelValue(0x0028, 0x0106); Tag const LargestImagePixelValue(0x0028, 0x0107); Tag const SmallestPixelValueInSeries(0x0028, 0x0108); Tag const LargestPixelValueInSeries(0x0028, 0x0109); Tag const SmallestImagePixelValueInPlane(0x0028, 0x0110); Tag const LargestImagePixelValueInPlane(0x0028, 0x0111); Tag const PixelPaddingValue(0x0028, 0x0120); Tag const PixelPaddingRangeLimit(0x0028, 0x0121); Tag const FloatPixelPaddingValue(0x0028, 0x0122); Tag const DoubleFloatPixelPaddingValue(0x0028, 0x0123); Tag const FloatPixelPaddingRangeLimit(0x0028, 0x0124); Tag const DoubleFloatPixelPaddingRangeLimit(0x0028, 0x0125); Tag const ImageLocation(0x0028, 0x0200); Tag const QualityControlImage(0x0028, 0x0300); Tag const BurnedInAnnotation(0x0028, 0x0301); Tag const RecognizableVisualFeatures(0x0028, 0x0302); Tag const LongitudinalTemporalInformationModified(0x0028, 0x0303); Tag const ReferencedColorPaletteInstanceUID(0x0028, 0x0304); Tag const TransformLabel(0x0028, 0x0400); Tag const TransformVersionNumber(0x0028, 0x0401); Tag const NumberOfTransformSteps(0x0028, 0x0402); Tag const SequenceOfCompressedData(0x0028, 0x0403); Tag const DetailsOfCoefficients(0x0028, 0x0404); Tag const DCTLabel(0x0028, 0x0700); Tag const DataBlockDescription(0x0028, 0x0701); Tag const DataBlock(0x0028, 0x0702); Tag const NormalizationFactorFormat(0x0028, 0x0710); Tag const ZonalMapNumberFormat(0x0028, 0x0720); Tag const ZonalMapLocation(0x0028, 0x0721); Tag const ZonalMapFormat(0x0028, 0x0722); Tag const AdaptiveMapFormat(0x0028, 0x0730); Tag const CodeNumberFormat(0x0028, 0x0740); Tag const PixelSpacingCalibrationType(0x0028, 0x0a02); Tag const PixelSpacingCalibrationDescription(0x0028, 0x0a04); Tag const PixelIntensityRelationship(0x0028, 0x1040); Tag const PixelIntensityRelationshipSign(0x0028, 0x1041); Tag const WindowCenter(0x0028, 0x1050); Tag const WindowWidth(0x0028, 0x1051); Tag const RescaleIntercept(0x0028, 0x1052); Tag const RescaleSlope(0x0028, 0x1053); Tag const RescaleType(0x0028, 0x1054); Tag const WindowCenterWidthExplanation(0x0028, 0x1055); Tag const VOILUTFunction(0x0028, 0x1056); Tag const GrayScale(0x0028, 0x1080); Tag const RecommendedViewingMode(0x0028, 0x1090); Tag const GrayLookupTableDescriptor(0x0028, 0x1100); Tag const RedPaletteColorLookupTableDescriptor(0x0028, 0x1101); Tag const GreenPaletteColorLookupTableDescriptor(0x0028, 0x1102); Tag const BluePaletteColorLookupTableDescriptor(0x0028, 0x1103); Tag const AlphaPaletteColorLookupTableDescriptor(0x0028, 0x1104); Tag const LargeRedPaletteColorLookupTableDescriptor(0x0028, 0x1111); Tag const LargeGreenPaletteColorLookupTableDescriptor(0x0028, 0x1112); Tag const LargeBluePaletteColorLookupTableDescriptor(0x0028, 0x1113); Tag const PaletteColorLookupTableUID(0x0028, 0x1199); Tag const GrayLookupTableData(0x0028, 0x1200); Tag const RedPaletteColorLookupTableData(0x0028, 0x1201); Tag const GreenPaletteColorLookupTableData(0x0028, 0x1202); Tag const BluePaletteColorLookupTableData(0x0028, 0x1203); Tag const AlphaPaletteColorLookupTableData(0x0028, 0x1204); Tag const LargeRedPaletteColorLookupTableData(0x0028, 0x1211); Tag const LargeGreenPaletteColorLookupTableData(0x0028, 0x1212); Tag const LargeBluePaletteColorLookupTableData(0x0028, 0x1213); Tag const LargePaletteColorLookupTableUID(0x0028, 0x1214); Tag const SegmentedRedPaletteColorLookupTableData(0x0028, 0x1221); Tag const SegmentedGreenPaletteColorLookupTableData(0x0028, 0x1222); Tag const SegmentedBluePaletteColorLookupTableData(0x0028, 0x1223); Tag const SegmentedAlphaPaletteColorLookupTableData(0x0028, 0x1224); Tag const StoredValueColorRangeSequence(0x0028, 0x1230); Tag const MinimumStoredValueMapped(0x0028, 0x1231); Tag const MaximumStoredValueMapped(0x0028, 0x1232); Tag const BreastImplantPresent(0x0028, 0x1300); Tag const PartialView(0x0028, 0x1350); Tag const PartialViewDescription(0x0028, 0x1351); Tag const PartialViewCodeSequence(0x0028, 0x1352); Tag const SpatialLocationsPreserved(0x0028, 0x135a); Tag const DataFrameAssignmentSequence(0x0028, 0x1401); Tag const DataPathAssignment(0x0028, 0x1402); Tag const BitsMappedToColorLookupTable(0x0028, 0x1403); Tag const BlendingLUT1Sequence(0x0028, 0x1404); Tag const BlendingLUT1TransferFunction(0x0028, 0x1405); Tag const BlendingWeightConstant(0x0028, 0x1406); Tag const BlendingLookupTableDescriptor(0x0028, 0x1407); Tag const BlendingLookupTableData(0x0028, 0x1408); Tag const EnhancedPaletteColorLookupTableSequence(0x0028, 0x140b); Tag const BlendingLUT2Sequence(0x0028, 0x140c); Tag const BlendingLUT2TransferFunction(0x0028, 0x140d); Tag const DataPathID(0x0028, 0x140e); Tag const RGBLUTTransferFunction(0x0028, 0x140f); Tag const AlphaLUTTransferFunction(0x0028, 0x1410); Tag const ICCProfile(0x0028, 0x2000); Tag const ColorSpace(0x0028, 0x2002); Tag const LossyImageCompression(0x0028, 0x2110); Tag const LossyImageCompressionRatio(0x0028, 0x2112); Tag const LossyImageCompressionMethod(0x0028, 0x2114); Tag const ModalityLUTSequence(0x0028, 0x3000); Tag const LUTDescriptor(0x0028, 0x3002); Tag const LUTExplanation(0x0028, 0x3003); Tag const ModalityLUTType(0x0028, 0x3004); Tag const LUTData(0x0028, 0x3006); Tag const VOILUTSequence(0x0028, 0x3010); Tag const SoftcopyVOILUTSequence(0x0028, 0x3110); Tag const ImagePresentationComments(0x0028, 0x4000); Tag const BiPlaneAcquisitionSequence(0x0028, 0x5000); Tag const RepresentativeFrameNumber(0x0028, 0x6010); Tag const FrameNumbersOfInterest(0x0028, 0x6020); Tag const FrameOfInterestDescription(0x0028, 0x6022); Tag const FrameOfInterestType(0x0028, 0x6023); Tag const MaskPointers(0x0028, 0x6030); Tag const RWavePointer(0x0028, 0x6040); Tag const MaskSubtractionSequence(0x0028, 0x6100); Tag const MaskOperation(0x0028, 0x6101); Tag const ApplicableFrameRange(0x0028, 0x6102); Tag const MaskFrameNumbers(0x0028, 0x6110); Tag const ContrastFrameAveraging(0x0028, 0x6112); Tag const MaskSubPixelShift(0x0028, 0x6114); Tag const TIDOffset(0x0028, 0x6120); Tag const MaskOperationExplanation(0x0028, 0x6190); Tag const EquipmentAdministratorSequence(0x0028, 0x7000); Tag const NumberOfDisplaySubsystems(0x0028, 0x7001); Tag const CurrentConfigurationID(0x0028, 0x7002); Tag const DisplaySubsystemID(0x0028, 0x7003); Tag const DisplaySubsystemName(0x0028, 0x7004); Tag const DisplaySubsystemDescription(0x0028, 0x7005); Tag const SystemStatus(0x0028, 0x7006); Tag const SystemStatusComment(0x0028, 0x7007); Tag const TargetLuminanceCharacteristicsSequence(0x0028, 0x7008); Tag const LuminanceCharacteristicsID(0x0028, 0x7009); Tag const DisplaySubsystemConfigurationSequence(0x0028, 0x700a); Tag const ConfigurationID(0x0028, 0x700b); Tag const ConfigurationName(0x0028, 0x700c); Tag const ConfigurationDescription(0x0028, 0x700d); Tag const ReferencedTargetLuminanceCharacteristicsID(0x0028, 0x700e); Tag const QAResultsSequence(0x0028, 0x700f); Tag const DisplaySubsystemQAResultsSequence(0x0028, 0x7010); Tag const ConfigurationQAResultsSequence(0x0028, 0x7011); Tag const MeasurementEquipmentSequence(0x0028, 0x7012); Tag const MeasurementFunctions(0x0028, 0x7013); Tag const MeasurementEquipmentType(0x0028, 0x7014); Tag const VisualEvaluationResultSequence(0x0028, 0x7015); Tag const DisplayCalibrationResultSequence(0x0028, 0x7016); Tag const DDLValue(0x0028, 0x7017); Tag const CIExyWhitePoint(0x0028, 0x7018); Tag const DisplayFunctionType(0x0028, 0x7019); Tag const GammaValue(0x0028, 0x701a); Tag const NumberOfLuminancePoints(0x0028, 0x701b); Tag const LuminanceResponseSequence(0x0028, 0x701c); Tag const TargetMinimumLuminance(0x0028, 0x701d); Tag const TargetMaximumLuminance(0x0028, 0x701e); Tag const LuminanceValue(0x0028, 0x701f); Tag const LuminanceResponseDescription(0x0028, 0x7020); Tag const WhitePointFlag(0x0028, 0x7021); Tag const DisplayDeviceTypeCodeSequence(0x0028, 0x7022); Tag const DisplaySubsystemSequence(0x0028, 0x7023); Tag const LuminanceResultSequence(0x0028, 0x7024); Tag const AmbientLightValueSource(0x0028, 0x7025); Tag const MeasuredCharacteristics(0x0028, 0x7026); Tag const LuminanceUniformityResultSequence(0x0028, 0x7027); Tag const VisualEvaluationTestSequence(0x0028, 0x7028); Tag const TestResult(0x0028, 0x7029); Tag const TestResultComment(0x0028, 0x702a); Tag const TestImageValidation(0x0028, 0x702b); Tag const TestPatternCodeSequence(0x0028, 0x702c); Tag const MeasurementPatternCodeSequence(0x0028, 0x702d); Tag const VisualEvaluationMethodCodeSequence(0x0028, 0x702e); Tag const PixelDataProviderURL(0x0028, 0x7fe0); Tag const DataPointRows(0x0028, 0x9001); Tag const DataPointColumns(0x0028, 0x9002); Tag const SignalDomainColumns(0x0028, 0x9003); Tag const LargestMonochromePixelValue(0x0028, 0x9099); Tag const DataRepresentation(0x0028, 0x9108); Tag const PixelMeasuresSequence(0x0028, 0x9110); Tag const FrameVOILUTSequence(0x0028, 0x9132); Tag const PixelValueTransformationSequence(0x0028, 0x9145); Tag const SignalDomainRows(0x0028, 0x9235); Tag const DisplayFilterPercentage(0x0028, 0x9411); Tag const FramePixelShiftSequence(0x0028, 0x9415); Tag const SubtractionItemID(0x0028, 0x9416); Tag const PixelIntensityRelationshipLUTSequence(0x0028, 0x9422); Tag const FramePixelDataPropertiesSequence(0x0028, 0x9443); Tag const GeometricalProperties(0x0028, 0x9444); Tag const GeometricMaximumDistortion(0x0028, 0x9445); Tag const ImageProcessingApplied(0x0028, 0x9446); Tag const MaskSelectionMode(0x0028, 0x9454); Tag const LUTFunction(0x0028, 0x9474); Tag const MaskVisibilityPercentage(0x0028, 0x9478); Tag const PixelShiftSequence(0x0028, 0x9501); Tag const RegionPixelShiftSequence(0x0028, 0x9502); Tag const VerticesOfTheRegion(0x0028, 0x9503); Tag const MultiFramePresentationSequence(0x0028, 0x9505); Tag const PixelShiftFrameRange(0x0028, 0x9506); Tag const LUTFrameRange(0x0028, 0x9507); Tag const ImageToEquipmentMappingMatrix(0x0028, 0x9520); Tag const EquipmentCoordinateSystemIdentification(0x0028, 0x9537); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0028odil-0.11.0/src/odil/registry_0032.cpp000066400000000000000000000151721362244656000172740ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0032( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0032, 0x000a), ElementsDictionaryEntry("Study Status ID", "StudyStatusID", "CS", "1")); public_dictionary.emplace(Tag(0x0032, 0x000c), ElementsDictionaryEntry("Study Priority ID", "StudyPriorityID", "CS", "1")); public_dictionary.emplace(Tag(0x0032, 0x0012), ElementsDictionaryEntry("Study ID Issuer", "StudyIDIssuer", "LO", "1")); public_dictionary.emplace(Tag(0x0032, 0x0032), ElementsDictionaryEntry("Study Verified Date", "StudyVerifiedDate", "DA", "1")); public_dictionary.emplace(Tag(0x0032, 0x0033), ElementsDictionaryEntry("Study Verified Time", "StudyVerifiedTime", "TM", "1")); public_dictionary.emplace(Tag(0x0032, 0x0034), ElementsDictionaryEntry("Study Read Date", "StudyReadDate", "DA", "1")); public_dictionary.emplace(Tag(0x0032, 0x0035), ElementsDictionaryEntry("Study Read Time", "StudyReadTime", "TM", "1")); public_dictionary.emplace(Tag(0x0032, 0x1000), ElementsDictionaryEntry("Scheduled Study Start Date", "ScheduledStudyStartDate", "DA", "1")); public_dictionary.emplace(Tag(0x0032, 0x1001), ElementsDictionaryEntry("Scheduled Study Start Time", "ScheduledStudyStartTime", "TM", "1")); public_dictionary.emplace(Tag(0x0032, 0x1010), ElementsDictionaryEntry("Scheduled Study Stop Date", "ScheduledStudyStopDate", "DA", "1")); public_dictionary.emplace(Tag(0x0032, 0x1011), ElementsDictionaryEntry("Scheduled Study Stop Time", "ScheduledStudyStopTime", "TM", "1")); public_dictionary.emplace(Tag(0x0032, 0x1020), ElementsDictionaryEntry("Scheduled Study Location", "ScheduledStudyLocation", "LO", "1")); public_dictionary.emplace(Tag(0x0032, 0x1021), ElementsDictionaryEntry("Scheduled Study Location AE Title", "ScheduledStudyLocationAETitle", "AE", "1-n")); public_dictionary.emplace(Tag(0x0032, 0x1030), ElementsDictionaryEntry("Reason for Study", "ReasonForStudy", "LO", "1")); public_dictionary.emplace(Tag(0x0032, 0x1031), ElementsDictionaryEntry("Requesting Physician Identification Sequence", "RequestingPhysicianIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0032, 0x1032), ElementsDictionaryEntry("Requesting Physician", "RequestingPhysician", "PN", "1")); public_dictionary.emplace(Tag(0x0032, 0x1033), ElementsDictionaryEntry("Requesting Service", "RequestingService", "LO", "1")); public_dictionary.emplace(Tag(0x0032, 0x1034), ElementsDictionaryEntry("Requesting Service Code Sequence", "RequestingServiceCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0032, 0x1040), ElementsDictionaryEntry("Study Arrival Date", "StudyArrivalDate", "DA", "1")); public_dictionary.emplace(Tag(0x0032, 0x1041), ElementsDictionaryEntry("Study Arrival Time", "StudyArrivalTime", "TM", "1")); public_dictionary.emplace(Tag(0x0032, 0x1050), ElementsDictionaryEntry("Study Completion Date", "StudyCompletionDate", "DA", "1")); public_dictionary.emplace(Tag(0x0032, 0x1051), ElementsDictionaryEntry("Study Completion Time", "StudyCompletionTime", "TM", "1")); public_dictionary.emplace(Tag(0x0032, 0x1055), ElementsDictionaryEntry("Study Component Status ID", "StudyComponentStatusID", "CS", "1")); public_dictionary.emplace(Tag(0x0032, 0x1060), ElementsDictionaryEntry("Requested Procedure Description", "RequestedProcedureDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0032, 0x1064), ElementsDictionaryEntry("Requested Procedure Code Sequence", "RequestedProcedureCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0032, 0x1066), ElementsDictionaryEntry("Reason for Visit", "ReasonForVisit", "UT", "1")); public_dictionary.emplace(Tag(0x0032, 0x1067), ElementsDictionaryEntry("Reason for Visit Code Sequence", "ReasonForVisitCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0032, 0x1070), ElementsDictionaryEntry("Requested Contrast Agent", "RequestedContrastAgent", "LO", "1")); public_dictionary.emplace(Tag(0x0032, 0x4000), ElementsDictionaryEntry("Study Comments", "StudyComments", "LT", "1")); public_tags.emplace("StudyStatusID", Tag(0x0032, 0x000a)); public_tags.emplace("StudyPriorityID", Tag(0x0032, 0x000c)); public_tags.emplace("StudyIDIssuer", Tag(0x0032, 0x0012)); public_tags.emplace("StudyVerifiedDate", Tag(0x0032, 0x0032)); public_tags.emplace("StudyVerifiedTime", Tag(0x0032, 0x0033)); public_tags.emplace("StudyReadDate", Tag(0x0032, 0x0034)); public_tags.emplace("StudyReadTime", Tag(0x0032, 0x0035)); public_tags.emplace("ScheduledStudyStartDate", Tag(0x0032, 0x1000)); public_tags.emplace("ScheduledStudyStartTime", Tag(0x0032, 0x1001)); public_tags.emplace("ScheduledStudyStopDate", Tag(0x0032, 0x1010)); public_tags.emplace("ScheduledStudyStopTime", Tag(0x0032, 0x1011)); public_tags.emplace("ScheduledStudyLocation", Tag(0x0032, 0x1020)); public_tags.emplace("ScheduledStudyLocationAETitle", Tag(0x0032, 0x1021)); public_tags.emplace("ReasonForStudy", Tag(0x0032, 0x1030)); public_tags.emplace("RequestingPhysicianIdentificationSequence", Tag(0x0032, 0x1031)); public_tags.emplace("RequestingPhysician", Tag(0x0032, 0x1032)); public_tags.emplace("RequestingService", Tag(0x0032, 0x1033)); public_tags.emplace("RequestingServiceCodeSequence", Tag(0x0032, 0x1034)); public_tags.emplace("StudyArrivalDate", Tag(0x0032, 0x1040)); public_tags.emplace("StudyArrivalTime", Tag(0x0032, 0x1041)); public_tags.emplace("StudyCompletionDate", Tag(0x0032, 0x1050)); public_tags.emplace("StudyCompletionTime", Tag(0x0032, 0x1051)); public_tags.emplace("StudyComponentStatusID", Tag(0x0032, 0x1055)); public_tags.emplace("RequestedProcedureDescription", Tag(0x0032, 0x1060)); public_tags.emplace("RequestedProcedureCodeSequence", Tag(0x0032, 0x1064)); public_tags.emplace("ReasonForVisit", Tag(0x0032, 0x1066)); public_tags.emplace("ReasonForVisitCodeSequence", Tag(0x0032, 0x1067)); public_tags.emplace("RequestedContrastAgent", Tag(0x0032, 0x1070)); public_tags.emplace("StudyComments", Tag(0x0032, 0x4000)); } } }odil-0.11.0/src/odil/registry_0032.h000066400000000000000000000040471362244656000167400ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0032 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0032 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const StudyStatusID(0x0032, 0x000a); Tag const StudyPriorityID(0x0032, 0x000c); Tag const StudyIDIssuer(0x0032, 0x0012); Tag const StudyVerifiedDate(0x0032, 0x0032); Tag const StudyVerifiedTime(0x0032, 0x0033); Tag const StudyReadDate(0x0032, 0x0034); Tag const StudyReadTime(0x0032, 0x0035); Tag const ScheduledStudyStartDate(0x0032, 0x1000); Tag const ScheduledStudyStartTime(0x0032, 0x1001); Tag const ScheduledStudyStopDate(0x0032, 0x1010); Tag const ScheduledStudyStopTime(0x0032, 0x1011); Tag const ScheduledStudyLocation(0x0032, 0x1020); Tag const ScheduledStudyLocationAETitle(0x0032, 0x1021); Tag const ReasonForStudy(0x0032, 0x1030); Tag const RequestingPhysicianIdentificationSequence(0x0032, 0x1031); Tag const RequestingPhysician(0x0032, 0x1032); Tag const RequestingService(0x0032, 0x1033); Tag const RequestingServiceCodeSequence(0x0032, 0x1034); Tag const StudyArrivalDate(0x0032, 0x1040); Tag const StudyArrivalTime(0x0032, 0x1041); Tag const StudyCompletionDate(0x0032, 0x1050); Tag const StudyCompletionTime(0x0032, 0x1051); Tag const StudyComponentStatusID(0x0032, 0x1055); Tag const RequestedProcedureDescription(0x0032, 0x1060); Tag const RequestedProcedureCodeSequence(0x0032, 0x1064); Tag const ReasonForVisit(0x0032, 0x1066); Tag const ReasonForVisitCodeSequence(0x0032, 0x1067); Tag const RequestedContrastAgent(0x0032, 0x1070); Tag const StudyComments(0x0032, 0x4000); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0032odil-0.11.0/src/odil/registry_0034.cpp000066400000000000000000000062701362244656000172750ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0034( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0034, 0x0001), ElementsDictionaryEntry("Flow Identifier Sequence", "FlowIdentifierSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0034, 0x0002), ElementsDictionaryEntry("Flow Identifier", "FlowIdentifier", "OB", "1")); public_dictionary.emplace(Tag(0x0034, 0x0003), ElementsDictionaryEntry("Flow Transfer Syntax UID", "FlowTransferSyntaxUID", "UI", "1")); public_dictionary.emplace(Tag(0x0034, 0x0004), ElementsDictionaryEntry("Flow RTP Sampling Rate", "FlowRTPSamplingRate", "UL", "1")); public_dictionary.emplace(Tag(0x0034, 0x0005), ElementsDictionaryEntry("Source Identifier", "SourceIdentifier", "OB", "1")); public_dictionary.emplace(Tag(0x0034, 0x0007), ElementsDictionaryEntry("Frame Origin Timestamp", "FrameOriginTimestamp", "OB", "1")); public_dictionary.emplace(Tag(0x0034, 0x0008), ElementsDictionaryEntry("Includes Imaging Subject", "IncludesImagingSubject", "CS", "1")); public_dictionary.emplace(Tag(0x0034, 0x0009), ElementsDictionaryEntry("Frame Usefulness Group Sequence", "FrameUsefulnessGroupSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0034, 0x000a), ElementsDictionaryEntry("Real-Time Bulk Data Flow Sequence", "RealTimeBulkDataFlowSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0034, 0x000b), ElementsDictionaryEntry("Camera Position Group Sequence", "CameraPositionGroupSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0034, 0x000c), ElementsDictionaryEntry("Includes Information", "IncludesInformation", "CS", "1")); public_dictionary.emplace(Tag(0x0034, 0x000d), ElementsDictionaryEntry("Time of Frame Group Sequence", "TimeOfFrameGroupSequence", "SQ", "1")); public_tags.emplace("FlowIdentifierSequence", Tag(0x0034, 0x0001)); public_tags.emplace("FlowIdentifier", Tag(0x0034, 0x0002)); public_tags.emplace("FlowTransferSyntaxUID", Tag(0x0034, 0x0003)); public_tags.emplace("FlowRTPSamplingRate", Tag(0x0034, 0x0004)); public_tags.emplace("SourceIdentifier", Tag(0x0034, 0x0005)); public_tags.emplace("FrameOriginTimestamp", Tag(0x0034, 0x0007)); public_tags.emplace("IncludesImagingSubject", Tag(0x0034, 0x0008)); public_tags.emplace("FrameUsefulnessGroupSequence", Tag(0x0034, 0x0009)); public_tags.emplace("RealTimeBulkDataFlowSequence", Tag(0x0034, 0x000a)); public_tags.emplace("CameraPositionGroupSequence", Tag(0x0034, 0x000b)); public_tags.emplace("IncludesInformation", Tag(0x0034, 0x000c)); public_tags.emplace("TimeOfFrameGroupSequence", Tag(0x0034, 0x000d)); } } }odil-0.11.0/src/odil/registry_0034.h000066400000000000000000000024031362244656000167340ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0034 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0034 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const FlowIdentifierSequence(0x0034, 0x0001); Tag const FlowIdentifier(0x0034, 0x0002); Tag const FlowTransferSyntaxUID(0x0034, 0x0003); Tag const FlowRTPSamplingRate(0x0034, 0x0004); Tag const SourceIdentifier(0x0034, 0x0005); Tag const FrameOriginTimestamp(0x0034, 0x0007); Tag const IncludesImagingSubject(0x0034, 0x0008); Tag const FrameUsefulnessGroupSequence(0x0034, 0x0009); Tag const RealTimeBulkDataFlowSequence(0x0034, 0x000a); Tag const CameraPositionGroupSequence(0x0034, 0x000b); Tag const IncludesInformation(0x0034, 0x000c); Tag const TimeOfFrameGroupSequence(0x0034, 0x000d); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0034odil-0.11.0/src/odil/registry_0038.cpp000066400000000000000000000156731362244656000173100ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0038( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0038, 0x0004), ElementsDictionaryEntry("Referenced Patient Alias Sequence", "ReferencedPatientAliasSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0038, 0x0008), ElementsDictionaryEntry("Visit Status ID", "VisitStatusID", "CS", "1")); public_dictionary.emplace(Tag(0x0038, 0x0010), ElementsDictionaryEntry("Admission ID", "AdmissionID", "LO", "1")); public_dictionary.emplace(Tag(0x0038, 0x0011), ElementsDictionaryEntry("Issuer of Admission ID", "IssuerOfAdmissionID", "LO", "1")); public_dictionary.emplace(Tag(0x0038, 0x0014), ElementsDictionaryEntry("Issuer of Admission ID Sequence", "IssuerOfAdmissionIDSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0038, 0x0016), ElementsDictionaryEntry("Route of Admissions", "RouteOfAdmissions", "LO", "1")); public_dictionary.emplace(Tag(0x0038, 0x001a), ElementsDictionaryEntry("Scheduled Admission Date", "ScheduledAdmissionDate", "DA", "1")); public_dictionary.emplace(Tag(0x0038, 0x001b), ElementsDictionaryEntry("Scheduled Admission Time", "ScheduledAdmissionTime", "TM", "1")); public_dictionary.emplace(Tag(0x0038, 0x001c), ElementsDictionaryEntry("Scheduled Discharge Date", "ScheduledDischargeDate", "DA", "1")); public_dictionary.emplace(Tag(0x0038, 0x001d), ElementsDictionaryEntry("Scheduled Discharge Time", "ScheduledDischargeTime", "TM", "1")); public_dictionary.emplace(Tag(0x0038, 0x001e), ElementsDictionaryEntry("Scheduled Patient Institution Residence", "ScheduledPatientInstitutionResidence", "LO", "1")); public_dictionary.emplace(Tag(0x0038, 0x0020), ElementsDictionaryEntry("Admitting Date", "AdmittingDate", "DA", "1")); public_dictionary.emplace(Tag(0x0038, 0x0021), ElementsDictionaryEntry("Admitting Time", "AdmittingTime", "TM", "1")); public_dictionary.emplace(Tag(0x0038, 0x0030), ElementsDictionaryEntry("Discharge Date", "DischargeDate", "DA", "1")); public_dictionary.emplace(Tag(0x0038, 0x0032), ElementsDictionaryEntry("Discharge Time", "DischargeTime", "TM", "1")); public_dictionary.emplace(Tag(0x0038, 0x0040), ElementsDictionaryEntry("Discharge Diagnosis Description", "DischargeDiagnosisDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0038, 0x0044), ElementsDictionaryEntry("Discharge Diagnosis Code Sequence", "DischargeDiagnosisCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0038, 0x0050), ElementsDictionaryEntry("Special Needs", "SpecialNeeds", "LO", "1")); public_dictionary.emplace(Tag(0x0038, 0x0060), ElementsDictionaryEntry("Service Episode ID", "ServiceEpisodeID", "LO", "1")); public_dictionary.emplace(Tag(0x0038, 0x0061), ElementsDictionaryEntry("Issuer of Service Episode ID", "IssuerOfServiceEpisodeID", "LO", "1")); public_dictionary.emplace(Tag(0x0038, 0x0062), ElementsDictionaryEntry("Service Episode Description", "ServiceEpisodeDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0038, 0x0064), ElementsDictionaryEntry("Issuer of Service Episode ID Sequence", "IssuerOfServiceEpisodeIDSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0038, 0x0100), ElementsDictionaryEntry("Pertinent Documents Sequence", "PertinentDocumentsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0038, 0x0101), ElementsDictionaryEntry("Pertinent Resources Sequence", "PertinentResourcesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0038, 0x0102), ElementsDictionaryEntry("Resource Description", "ResourceDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0038, 0x0300), ElementsDictionaryEntry("Current Patient Location", "CurrentPatientLocation", "LO", "1")); public_dictionary.emplace(Tag(0x0038, 0x0400), ElementsDictionaryEntry("Patient's Institution Residence", "PatientInstitutionResidence", "LO", "1")); public_dictionary.emplace(Tag(0x0038, 0x0500), ElementsDictionaryEntry("Patient State", "PatientState", "LO", "1")); public_dictionary.emplace(Tag(0x0038, 0x0502), ElementsDictionaryEntry("Patient Clinical Trial Participation Sequence", "PatientClinicalTrialParticipationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0038, 0x4000), ElementsDictionaryEntry("Visit Comments", "VisitComments", "LT", "1")); public_tags.emplace("ReferencedPatientAliasSequence", Tag(0x0038, 0x0004)); public_tags.emplace("VisitStatusID", Tag(0x0038, 0x0008)); public_tags.emplace("AdmissionID", Tag(0x0038, 0x0010)); public_tags.emplace("IssuerOfAdmissionID", Tag(0x0038, 0x0011)); public_tags.emplace("IssuerOfAdmissionIDSequence", Tag(0x0038, 0x0014)); public_tags.emplace("RouteOfAdmissions", Tag(0x0038, 0x0016)); public_tags.emplace("ScheduledAdmissionDate", Tag(0x0038, 0x001a)); public_tags.emplace("ScheduledAdmissionTime", Tag(0x0038, 0x001b)); public_tags.emplace("ScheduledDischargeDate", Tag(0x0038, 0x001c)); public_tags.emplace("ScheduledDischargeTime", Tag(0x0038, 0x001d)); public_tags.emplace("ScheduledPatientInstitutionResidence", Tag(0x0038, 0x001e)); public_tags.emplace("AdmittingDate", Tag(0x0038, 0x0020)); public_tags.emplace("AdmittingTime", Tag(0x0038, 0x0021)); public_tags.emplace("DischargeDate", Tag(0x0038, 0x0030)); public_tags.emplace("DischargeTime", Tag(0x0038, 0x0032)); public_tags.emplace("DischargeDiagnosisDescription", Tag(0x0038, 0x0040)); public_tags.emplace("DischargeDiagnosisCodeSequence", Tag(0x0038, 0x0044)); public_tags.emplace("SpecialNeeds", Tag(0x0038, 0x0050)); public_tags.emplace("ServiceEpisodeID", Tag(0x0038, 0x0060)); public_tags.emplace("IssuerOfServiceEpisodeID", Tag(0x0038, 0x0061)); public_tags.emplace("ServiceEpisodeDescription", Tag(0x0038, 0x0062)); public_tags.emplace("IssuerOfServiceEpisodeIDSequence", Tag(0x0038, 0x0064)); public_tags.emplace("PertinentDocumentsSequence", Tag(0x0038, 0x0100)); public_tags.emplace("PertinentResourcesSequence", Tag(0x0038, 0x0101)); public_tags.emplace("ResourceDescription", Tag(0x0038, 0x0102)); public_tags.emplace("CurrentPatientLocation", Tag(0x0038, 0x0300)); public_tags.emplace("PatientInstitutionResidence", Tag(0x0038, 0x0400)); public_tags.emplace("PatientState", Tag(0x0038, 0x0500)); public_tags.emplace("PatientClinicalTrialParticipationSequence", Tag(0x0038, 0x0502)); public_tags.emplace("VisitComments", Tag(0x0038, 0x4000)); } } }odil-0.11.0/src/odil/registry_0038.h000066400000000000000000000041761362244656000167510ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0038 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0038 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ReferencedPatientAliasSequence(0x0038, 0x0004); Tag const VisitStatusID(0x0038, 0x0008); Tag const AdmissionID(0x0038, 0x0010); Tag const IssuerOfAdmissionID(0x0038, 0x0011); Tag const IssuerOfAdmissionIDSequence(0x0038, 0x0014); Tag const RouteOfAdmissions(0x0038, 0x0016); Tag const ScheduledAdmissionDate(0x0038, 0x001a); Tag const ScheduledAdmissionTime(0x0038, 0x001b); Tag const ScheduledDischargeDate(0x0038, 0x001c); Tag const ScheduledDischargeTime(0x0038, 0x001d); Tag const ScheduledPatientInstitutionResidence(0x0038, 0x001e); Tag const AdmittingDate(0x0038, 0x0020); Tag const AdmittingTime(0x0038, 0x0021); Tag const DischargeDate(0x0038, 0x0030); Tag const DischargeTime(0x0038, 0x0032); Tag const DischargeDiagnosisDescription(0x0038, 0x0040); Tag const DischargeDiagnosisCodeSequence(0x0038, 0x0044); Tag const SpecialNeeds(0x0038, 0x0050); Tag const ServiceEpisodeID(0x0038, 0x0060); Tag const IssuerOfServiceEpisodeID(0x0038, 0x0061); Tag const ServiceEpisodeDescription(0x0038, 0x0062); Tag const IssuerOfServiceEpisodeIDSequence(0x0038, 0x0064); Tag const PertinentDocumentsSequence(0x0038, 0x0100); Tag const PertinentResourcesSequence(0x0038, 0x0101); Tag const ResourceDescription(0x0038, 0x0102); Tag const CurrentPatientLocation(0x0038, 0x0300); Tag const PatientInstitutionResidence(0x0038, 0x0400); Tag const PatientState(0x0038, 0x0500); Tag const PatientClinicalTrialParticipationSequence(0x0038, 0x0502); Tag const VisitComments(0x0038, 0x4000); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0038odil-0.11.0/src/odil/registry_003a.cpp000066400000000000000000000213371362244656000173530ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_003a( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x003a, 0x0004), ElementsDictionaryEntry("Waveform Originality", "WaveformOriginality", "CS", "1")); public_dictionary.emplace(Tag(0x003a, 0x0005), ElementsDictionaryEntry("Number of Waveform Channels", "NumberOfWaveformChannels", "US", "1")); public_dictionary.emplace(Tag(0x003a, 0x0010), ElementsDictionaryEntry("Number of Waveform Samples", "NumberOfWaveformSamples", "UL", "1")); public_dictionary.emplace(Tag(0x003a, 0x001a), ElementsDictionaryEntry("Sampling Frequency", "SamplingFrequency", "DS", "1")); public_dictionary.emplace(Tag(0x003a, 0x0020), ElementsDictionaryEntry("Multiplex Group Label", "MultiplexGroupLabel", "SH", "1")); public_dictionary.emplace(Tag(0x003a, 0x0200), ElementsDictionaryEntry("Channel Definition Sequence", "ChannelDefinitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x003a, 0x0202), ElementsDictionaryEntry("Waveform Channel Number", "WaveformChannelNumber", "IS", "1")); public_dictionary.emplace(Tag(0x003a, 0x0203), ElementsDictionaryEntry("Channel Label", "ChannelLabel", "SH", "1")); public_dictionary.emplace(Tag(0x003a, 0x0205), ElementsDictionaryEntry("Channel Status", "ChannelStatus", "CS", "1-n")); public_dictionary.emplace(Tag(0x003a, 0x0208), ElementsDictionaryEntry("Channel Source Sequence", "ChannelSourceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x003a, 0x0209), ElementsDictionaryEntry("Channel Source Modifiers Sequence", "ChannelSourceModifiersSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x003a, 0x020a), ElementsDictionaryEntry("Source Waveform Sequence", "SourceWaveformSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x003a, 0x020c), ElementsDictionaryEntry("Channel Derivation Description", "ChannelDerivationDescription", "LO", "1")); public_dictionary.emplace(Tag(0x003a, 0x0210), ElementsDictionaryEntry("Channel Sensitivity", "ChannelSensitivity", "DS", "1")); public_dictionary.emplace(Tag(0x003a, 0x0211), ElementsDictionaryEntry("Channel Sensitivity Units Sequence", "ChannelSensitivityUnitsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x003a, 0x0212), ElementsDictionaryEntry("Channel Sensitivity Correction Factor", "ChannelSensitivityCorrectionFactor", "DS", "1")); public_dictionary.emplace(Tag(0x003a, 0x0213), ElementsDictionaryEntry("Channel Baseline", "ChannelBaseline", "DS", "1")); public_dictionary.emplace(Tag(0x003a, 0x0214), ElementsDictionaryEntry("Channel Time Skew", "ChannelTimeSkew", "DS", "1")); public_dictionary.emplace(Tag(0x003a, 0x0215), ElementsDictionaryEntry("Channel Sample Skew", "ChannelSampleSkew", "DS", "1")); public_dictionary.emplace(Tag(0x003a, 0x0218), ElementsDictionaryEntry("Channel Offset", "ChannelOffset", "DS", "1")); public_dictionary.emplace(Tag(0x003a, 0x021a), ElementsDictionaryEntry("Waveform Bits Stored", "WaveformBitsStored", "US", "1")); public_dictionary.emplace(Tag(0x003a, 0x0220), ElementsDictionaryEntry("Filter Low Frequency", "FilterLowFrequency", "DS", "1")); public_dictionary.emplace(Tag(0x003a, 0x0221), ElementsDictionaryEntry("Filter High Frequency", "FilterHighFrequency", "DS", "1")); public_dictionary.emplace(Tag(0x003a, 0x0222), ElementsDictionaryEntry("Notch Filter Frequency", "NotchFilterFrequency", "DS", "1")); public_dictionary.emplace(Tag(0x003a, 0x0223), ElementsDictionaryEntry("Notch Filter Bandwidth", "NotchFilterBandwidth", "DS", "1")); public_dictionary.emplace(Tag(0x003a, 0x0230), ElementsDictionaryEntry("Waveform Data Display Scale", "WaveformDataDisplayScale", "FL", "1")); public_dictionary.emplace(Tag(0x003a, 0x0231), ElementsDictionaryEntry("Waveform Display Background CIELab Value", "WaveformDisplayBackgroundCIELabValue", "US", "3")); public_dictionary.emplace(Tag(0x003a, 0x0240), ElementsDictionaryEntry("Waveform Presentation Group Sequence", "WaveformPresentationGroupSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x003a, 0x0241), ElementsDictionaryEntry("Presentation Group Number", "PresentationGroupNumber", "US", "1")); public_dictionary.emplace(Tag(0x003a, 0x0242), ElementsDictionaryEntry("Channel Display Sequence", "ChannelDisplaySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x003a, 0x0244), ElementsDictionaryEntry("Channel Recommended Display CIELab Value", "ChannelRecommendedDisplayCIELabValue", "US", "3")); public_dictionary.emplace(Tag(0x003a, 0x0245), ElementsDictionaryEntry("Channel Position", "ChannelPosition", "FL", "1")); public_dictionary.emplace(Tag(0x003a, 0x0246), ElementsDictionaryEntry("Display Shading Flag", "DisplayShadingFlag", "CS", "1")); public_dictionary.emplace(Tag(0x003a, 0x0247), ElementsDictionaryEntry("Fractional Channel Display Scale", "FractionalChannelDisplayScale", "FL", "1")); public_dictionary.emplace(Tag(0x003a, 0x0248), ElementsDictionaryEntry("Absolute Channel Display Scale", "AbsoluteChannelDisplayScale", "FL", "1")); public_dictionary.emplace(Tag(0x003a, 0x0300), ElementsDictionaryEntry("Multiplexed Audio Channels Description Code Sequence", "MultiplexedAudioChannelsDescriptionCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x003a, 0x0301), ElementsDictionaryEntry("Channel Identification Code", "ChannelIdentificationCode", "IS", "1")); public_dictionary.emplace(Tag(0x003a, 0x0302), ElementsDictionaryEntry("Channel Mode", "ChannelMode", "CS", "1")); public_tags.emplace("WaveformOriginality", Tag(0x003a, 0x0004)); public_tags.emplace("NumberOfWaveformChannels", Tag(0x003a, 0x0005)); public_tags.emplace("NumberOfWaveformSamples", Tag(0x003a, 0x0010)); public_tags.emplace("SamplingFrequency", Tag(0x003a, 0x001a)); public_tags.emplace("MultiplexGroupLabel", Tag(0x003a, 0x0020)); public_tags.emplace("ChannelDefinitionSequence", Tag(0x003a, 0x0200)); public_tags.emplace("WaveformChannelNumber", Tag(0x003a, 0x0202)); public_tags.emplace("ChannelLabel", Tag(0x003a, 0x0203)); public_tags.emplace("ChannelStatus", Tag(0x003a, 0x0205)); public_tags.emplace("ChannelSourceSequence", Tag(0x003a, 0x0208)); public_tags.emplace("ChannelSourceModifiersSequence", Tag(0x003a, 0x0209)); public_tags.emplace("SourceWaveformSequence", Tag(0x003a, 0x020a)); public_tags.emplace("ChannelDerivationDescription", Tag(0x003a, 0x020c)); public_tags.emplace("ChannelSensitivity", Tag(0x003a, 0x0210)); public_tags.emplace("ChannelSensitivityUnitsSequence", Tag(0x003a, 0x0211)); public_tags.emplace("ChannelSensitivityCorrectionFactor", Tag(0x003a, 0x0212)); public_tags.emplace("ChannelBaseline", Tag(0x003a, 0x0213)); public_tags.emplace("ChannelTimeSkew", Tag(0x003a, 0x0214)); public_tags.emplace("ChannelSampleSkew", Tag(0x003a, 0x0215)); public_tags.emplace("ChannelOffset", Tag(0x003a, 0x0218)); public_tags.emplace("WaveformBitsStored", Tag(0x003a, 0x021a)); public_tags.emplace("FilterLowFrequency", Tag(0x003a, 0x0220)); public_tags.emplace("FilterHighFrequency", Tag(0x003a, 0x0221)); public_tags.emplace("NotchFilterFrequency", Tag(0x003a, 0x0222)); public_tags.emplace("NotchFilterBandwidth", Tag(0x003a, 0x0223)); public_tags.emplace("WaveformDataDisplayScale", Tag(0x003a, 0x0230)); public_tags.emplace("WaveformDisplayBackgroundCIELabValue", Tag(0x003a, 0x0231)); public_tags.emplace("WaveformPresentationGroupSequence", Tag(0x003a, 0x0240)); public_tags.emplace("PresentationGroupNumber", Tag(0x003a, 0x0241)); public_tags.emplace("ChannelDisplaySequence", Tag(0x003a, 0x0242)); public_tags.emplace("ChannelRecommendedDisplayCIELabValue", Tag(0x003a, 0x0244)); public_tags.emplace("ChannelPosition", Tag(0x003a, 0x0245)); public_tags.emplace("DisplayShadingFlag", Tag(0x003a, 0x0246)); public_tags.emplace("FractionalChannelDisplayScale", Tag(0x003a, 0x0247)); public_tags.emplace("AbsoluteChannelDisplayScale", Tag(0x003a, 0x0248)); public_tags.emplace("MultiplexedAudioChannelsDescriptionCodeSequence", Tag(0x003a, 0x0300)); public_tags.emplace("ChannelIdentificationCode", Tag(0x003a, 0x0301)); public_tags.emplace("ChannelMode", Tag(0x003a, 0x0302)); } } }odil-0.11.0/src/odil/registry_003a.h000066400000000000000000000050611362244656000170140ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_003a #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_003a #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const WaveformOriginality(0x003a, 0x0004); Tag const NumberOfWaveformChannels(0x003a, 0x0005); Tag const NumberOfWaveformSamples(0x003a, 0x0010); Tag const SamplingFrequency(0x003a, 0x001a); Tag const MultiplexGroupLabel(0x003a, 0x0020); Tag const ChannelDefinitionSequence(0x003a, 0x0200); Tag const WaveformChannelNumber(0x003a, 0x0202); Tag const ChannelLabel(0x003a, 0x0203); Tag const ChannelStatus(0x003a, 0x0205); Tag const ChannelSourceSequence(0x003a, 0x0208); Tag const ChannelSourceModifiersSequence(0x003a, 0x0209); Tag const SourceWaveformSequence(0x003a, 0x020a); Tag const ChannelDerivationDescription(0x003a, 0x020c); Tag const ChannelSensitivity(0x003a, 0x0210); Tag const ChannelSensitivityUnitsSequence(0x003a, 0x0211); Tag const ChannelSensitivityCorrectionFactor(0x003a, 0x0212); Tag const ChannelBaseline(0x003a, 0x0213); Tag const ChannelTimeSkew(0x003a, 0x0214); Tag const ChannelSampleSkew(0x003a, 0x0215); Tag const ChannelOffset(0x003a, 0x0218); Tag const WaveformBitsStored(0x003a, 0x021a); Tag const FilterLowFrequency(0x003a, 0x0220); Tag const FilterHighFrequency(0x003a, 0x0221); Tag const NotchFilterFrequency(0x003a, 0x0222); Tag const NotchFilterBandwidth(0x003a, 0x0223); Tag const WaveformDataDisplayScale(0x003a, 0x0230); Tag const WaveformDisplayBackgroundCIELabValue(0x003a, 0x0231); Tag const WaveformPresentationGroupSequence(0x003a, 0x0240); Tag const PresentationGroupNumber(0x003a, 0x0241); Tag const ChannelDisplaySequence(0x003a, 0x0242); Tag const ChannelRecommendedDisplayCIELabValue(0x003a, 0x0244); Tag const ChannelPosition(0x003a, 0x0245); Tag const DisplayShadingFlag(0x003a, 0x0246); Tag const FractionalChannelDisplayScale(0x003a, 0x0247); Tag const AbsoluteChannelDisplayScale(0x003a, 0x0248); Tag const MultiplexedAudioChannelsDescriptionCodeSequence(0x003a, 0x0300); Tag const ChannelIdentificationCode(0x003a, 0x0301); Tag const ChannelMode(0x003a, 0x0302); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_003aodil-0.11.0/src/odil/registry_0040.cpp000066400000000000000000002206221362244656000172710ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0040( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0040, 0x0001), ElementsDictionaryEntry("Scheduled Station AE Title", "ScheduledStationAETitle", "AE", "1-n")); public_dictionary.emplace(Tag(0x0040, 0x0002), ElementsDictionaryEntry("Scheduled Procedure Step Start Date", "ScheduledProcedureStepStartDate", "DA", "1")); public_dictionary.emplace(Tag(0x0040, 0x0003), ElementsDictionaryEntry("Scheduled Procedure Step Start Time", "ScheduledProcedureStepStartTime", "TM", "1")); public_dictionary.emplace(Tag(0x0040, 0x0004), ElementsDictionaryEntry("Scheduled Procedure Step End Date", "ScheduledProcedureStepEndDate", "DA", "1")); public_dictionary.emplace(Tag(0x0040, 0x0005), ElementsDictionaryEntry("Scheduled Procedure Step End Time", "ScheduledProcedureStepEndTime", "TM", "1")); public_dictionary.emplace(Tag(0x0040, 0x0006), ElementsDictionaryEntry("Scheduled Performing Physician's Name", "ScheduledPerformingPhysicianName", "PN", "1")); public_dictionary.emplace(Tag(0x0040, 0x0007), ElementsDictionaryEntry("Scheduled Procedure Step Description", "ScheduledProcedureStepDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x0008), ElementsDictionaryEntry("Scheduled Protocol Code Sequence", "ScheduledProtocolCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0009), ElementsDictionaryEntry("Scheduled Procedure Step ID", "ScheduledProcedureStepID", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x000a), ElementsDictionaryEntry("Stage Code Sequence", "StageCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x000b), ElementsDictionaryEntry("Scheduled Performing Physician Identification Sequence", "ScheduledPerformingPhysicianIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0010), ElementsDictionaryEntry("Scheduled Station Name", "ScheduledStationName", "SH", "1-n")); public_dictionary.emplace(Tag(0x0040, 0x0011), ElementsDictionaryEntry("Scheduled Procedure Step Location", "ScheduledProcedureStepLocation", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x0012), ElementsDictionaryEntry("Pre-Medication", "PreMedication", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x0020), ElementsDictionaryEntry("Scheduled Procedure Step Status", "ScheduledProcedureStepStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0x0026), ElementsDictionaryEntry("Order Placer Identifier Sequence", "OrderPlacerIdentifierSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0027), ElementsDictionaryEntry("Order Filler Identifier Sequence", "OrderFillerIdentifierSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0031), ElementsDictionaryEntry("Local Namespace Entity ID", "LocalNamespaceEntityID", "UT", "1")); public_dictionary.emplace(Tag(0x0040, 0x0032), ElementsDictionaryEntry("Universal Entity ID", "UniversalEntityID", "UT", "1")); public_dictionary.emplace(Tag(0x0040, 0x0033), ElementsDictionaryEntry("Universal Entity ID Type", "UniversalEntityIDType", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0x0035), ElementsDictionaryEntry("Identifier Type Code", "IdentifierTypeCode", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0x0036), ElementsDictionaryEntry("Assigning Facility Sequence", "AssigningFacilitySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0039), ElementsDictionaryEntry("Assigning Jurisdiction Code Sequence", "AssigningJurisdictionCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x003a), ElementsDictionaryEntry("Assigning Agency or Department Code Sequence", "AssigningAgencyOrDepartmentCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0100), ElementsDictionaryEntry("Scheduled Procedure Step Sequence", "ScheduledProcedureStepSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0220), ElementsDictionaryEntry("Referenced Non-Image Composite SOP Instance Sequence", "ReferencedNonImageCompositeSOPInstanceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0241), ElementsDictionaryEntry("Performed Station AE Title", "PerformedStationAETitle", "AE", "1")); public_dictionary.emplace(Tag(0x0040, 0x0242), ElementsDictionaryEntry("Performed Station Name", "PerformedStationName", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x0243), ElementsDictionaryEntry("Performed Location", "PerformedLocation", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x0244), ElementsDictionaryEntry("Performed Procedure Step Start Date", "PerformedProcedureStepStartDate", "DA", "1")); public_dictionary.emplace(Tag(0x0040, 0x0245), ElementsDictionaryEntry("Performed Procedure Step Start Time", "PerformedProcedureStepStartTime", "TM", "1")); public_dictionary.emplace(Tag(0x0040, 0x0250), ElementsDictionaryEntry("Performed Procedure Step End Date", "PerformedProcedureStepEndDate", "DA", "1")); public_dictionary.emplace(Tag(0x0040, 0x0251), ElementsDictionaryEntry("Performed Procedure Step End Time", "PerformedProcedureStepEndTime", "TM", "1")); public_dictionary.emplace(Tag(0x0040, 0x0252), ElementsDictionaryEntry("Performed Procedure Step Status", "PerformedProcedureStepStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0x0253), ElementsDictionaryEntry("Performed Procedure Step ID", "PerformedProcedureStepID", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x0254), ElementsDictionaryEntry("Performed Procedure Step Description", "PerformedProcedureStepDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x0255), ElementsDictionaryEntry("Performed Procedure Type Description", "PerformedProcedureTypeDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x0260), ElementsDictionaryEntry("Performed Protocol Code Sequence", "PerformedProtocolCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0261), ElementsDictionaryEntry("Performed Protocol Type", "PerformedProtocolType", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0x0270), ElementsDictionaryEntry("Scheduled Step Attributes Sequence", "ScheduledStepAttributesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0275), ElementsDictionaryEntry("Request Attributes Sequence", "RequestAttributesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0280), ElementsDictionaryEntry("Comments on the Performed Procedure Step", "CommentsOnThePerformedProcedureStep", "ST", "1")); public_dictionary.emplace(Tag(0x0040, 0x0281), ElementsDictionaryEntry("Performed Procedure Step Discontinuation Reason Code Sequence", "PerformedProcedureStepDiscontinuationReasonCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0293), ElementsDictionaryEntry("Quantity Sequence", "QuantitySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0294), ElementsDictionaryEntry("Quantity", "Quantity", "DS", "1")); public_dictionary.emplace(Tag(0x0040, 0x0295), ElementsDictionaryEntry("Measuring Units Sequence", "MeasuringUnitsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0296), ElementsDictionaryEntry("Billing Item Sequence", "BillingItemSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0300), ElementsDictionaryEntry("Total Time of Fluoroscopy", "TotalTimeOfFluoroscopy", "US", "1")); public_dictionary.emplace(Tag(0x0040, 0x0301), ElementsDictionaryEntry("Total Number of Exposures", "TotalNumberOfExposures", "US", "1")); public_dictionary.emplace(Tag(0x0040, 0x0302), ElementsDictionaryEntry("Entrance Dose", "EntranceDose", "US", "1")); public_dictionary.emplace(Tag(0x0040, 0x0303), ElementsDictionaryEntry("Exposed Area", "ExposedArea", "US", "1-2")); public_dictionary.emplace(Tag(0x0040, 0x0306), ElementsDictionaryEntry("Distance Source to Entrance", "DistanceSourceToEntrance", "DS", "1")); public_dictionary.emplace(Tag(0x0040, 0x0307), ElementsDictionaryEntry("Distance Source to Support", "DistanceSourceToSupport", "DS", "1")); public_dictionary.emplace(Tag(0x0040, 0x030e), ElementsDictionaryEntry("Exposure Dose Sequence", "ExposureDoseSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0310), ElementsDictionaryEntry("Comments on Radiation Dose", "CommentsOnRadiationDose", "ST", "1")); public_dictionary.emplace(Tag(0x0040, 0x0312), ElementsDictionaryEntry("X-Ray Output", "XRayOutput", "DS", "1")); public_dictionary.emplace(Tag(0x0040, 0x0314), ElementsDictionaryEntry("Half Value Layer", "HalfValueLayer", "DS", "1")); public_dictionary.emplace(Tag(0x0040, 0x0316), ElementsDictionaryEntry("Organ Dose", "OrganDose", "DS", "1")); public_dictionary.emplace(Tag(0x0040, 0x0318), ElementsDictionaryEntry("Organ Exposed", "OrganExposed", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0x0320), ElementsDictionaryEntry("Billing Procedure Step Sequence", "BillingProcedureStepSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0321), ElementsDictionaryEntry("Film Consumption Sequence", "FilmConsumptionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0324), ElementsDictionaryEntry("Billing Supplies and Devices Sequence", "BillingSuppliesAndDevicesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0330), ElementsDictionaryEntry("Referenced Procedure Step Sequence", "ReferencedProcedureStepSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0340), ElementsDictionaryEntry("Performed Series Sequence", "PerformedSeriesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0400), ElementsDictionaryEntry("Comments on the Scheduled Procedure Step", "CommentsOnTheScheduledProcedureStep", "LT", "1")); public_dictionary.emplace(Tag(0x0040, 0x0440), ElementsDictionaryEntry("Protocol Context Sequence", "ProtocolContextSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0441), ElementsDictionaryEntry("Content Item Modifier Sequence", "ContentItemModifierSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0500), ElementsDictionaryEntry("Scheduled Specimen Sequence", "ScheduledSpecimenSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x050a), ElementsDictionaryEntry("Specimen Accession Number", "SpecimenAccessionNumber", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x0512), ElementsDictionaryEntry("Container Identifier", "ContainerIdentifier", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x0513), ElementsDictionaryEntry("Issuer of the Container Identifier Sequence", "IssuerOfTheContainerIdentifierSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0515), ElementsDictionaryEntry("Alternate Container Identifier Sequence", "AlternateContainerIdentifierSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0518), ElementsDictionaryEntry("Container Type Code Sequence", "ContainerTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x051a), ElementsDictionaryEntry("Container Description", "ContainerDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x0520), ElementsDictionaryEntry("Container Component Sequence", "ContainerComponentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0550), ElementsDictionaryEntry("Specimen Sequence", "SpecimenSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0551), ElementsDictionaryEntry("Specimen Identifier", "SpecimenIdentifier", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x0552), ElementsDictionaryEntry("Specimen Description Sequence (Trial)", "SpecimenDescriptionSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0553), ElementsDictionaryEntry("Specimen Description (Trial)", "SpecimenDescriptionTrial", "ST", "1")); public_dictionary.emplace(Tag(0x0040, 0x0554), ElementsDictionaryEntry("Specimen UID", "SpecimenUID", "UI", "1")); public_dictionary.emplace(Tag(0x0040, 0x0555), ElementsDictionaryEntry("Acquisition Context Sequence", "AcquisitionContextSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0556), ElementsDictionaryEntry("Acquisition Context Description", "AcquisitionContextDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0040, 0x059a), ElementsDictionaryEntry("Specimen Type Code Sequence", "SpecimenTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0560), ElementsDictionaryEntry("Specimen Description Sequence", "SpecimenDescriptionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0562), ElementsDictionaryEntry("Issuer of the Specimen Identifier Sequence", "IssuerOfTheSpecimenIdentifierSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0600), ElementsDictionaryEntry("Specimen Short Description", "SpecimenShortDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x0602), ElementsDictionaryEntry("Specimen Detailed Description", "SpecimenDetailedDescription", "UT", "1")); public_dictionary.emplace(Tag(0x0040, 0x0610), ElementsDictionaryEntry("Specimen Preparation Sequence", "SpecimenPreparationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0612), ElementsDictionaryEntry("Specimen Preparation Step Content Item Sequence", "SpecimenPreparationStepContentItemSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x0620), ElementsDictionaryEntry("Specimen Localization Content Item Sequence", "SpecimenLocalizationContentItemSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x06fa), ElementsDictionaryEntry("Slide Identifier", "SlideIdentifier", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x0710), ElementsDictionaryEntry("Whole Slide Microscopy Image Frame Type Sequence", "WholeSlideMicroscopyImageFrameTypeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x071a), ElementsDictionaryEntry("Image Center Point Coordinates Sequence", "ImageCenterPointCoordinatesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x072a), ElementsDictionaryEntry("X Offset in Slide Coordinate System", "XOffsetInSlideCoordinateSystem", "DS", "1")); public_dictionary.emplace(Tag(0x0040, 0x073a), ElementsDictionaryEntry("Y Offset in Slide Coordinate System", "YOffsetInSlideCoordinateSystem", "DS", "1")); public_dictionary.emplace(Tag(0x0040, 0x074a), ElementsDictionaryEntry("Z Offset in Slide Coordinate System", "ZOffsetInSlideCoordinateSystem", "DS", "1")); public_dictionary.emplace(Tag(0x0040, 0x08d8), ElementsDictionaryEntry("Pixel Spacing Sequence", "PixelSpacingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x08da), ElementsDictionaryEntry("Coordinate System Axis Code Sequence", "CoordinateSystemAxisCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x08ea), ElementsDictionaryEntry("Measurement Units Code Sequence", "MeasurementUnitsCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x09f8), ElementsDictionaryEntry("Vital Stain Code Sequence (Trial)", "VitalStainCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x1001), ElementsDictionaryEntry("Requested Procedure ID", "RequestedProcedureID", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x1002), ElementsDictionaryEntry("Reason for the Requested Procedure", "ReasonForTheRequestedProcedure", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x1003), ElementsDictionaryEntry("Requested Procedure Priority", "RequestedProcedurePriority", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x1004), ElementsDictionaryEntry("Patient Transport Arrangements", "PatientTransportArrangements", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x1005), ElementsDictionaryEntry("Requested Procedure Location", "RequestedProcedureLocation", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x1006), ElementsDictionaryEntry("Placer Order Number / Procedure", "PlacerOrderNumberProcedure", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x1007), ElementsDictionaryEntry("Filler Order Number / Procedure", "FillerOrderNumberProcedure", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x1008), ElementsDictionaryEntry("Confidentiality Code", "ConfidentialityCode", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x1009), ElementsDictionaryEntry("Reporting Priority", "ReportingPriority", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x100a), ElementsDictionaryEntry("Reason for Requested Procedure Code Sequence", "ReasonForRequestedProcedureCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x1010), ElementsDictionaryEntry("Names of Intended Recipients of Results", "NamesOfIntendedRecipientsOfResults", "PN", "1-n")); public_dictionary.emplace(Tag(0x0040, 0x1011), ElementsDictionaryEntry("Intended Recipients of Results Identification Sequence", "IntendedRecipientsOfResultsIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x1012), ElementsDictionaryEntry("Reason For Performed Procedure Code Sequence", "ReasonForPerformedProcedureCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x1060), ElementsDictionaryEntry("Requested Procedure Description (Trial)", "RequestedProcedureDescriptionTrial", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x1101), ElementsDictionaryEntry("Person Identification Code Sequence", "PersonIdentificationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x1102), ElementsDictionaryEntry("Person's Address", "PersonAddress", "ST", "1")); public_dictionary.emplace(Tag(0x0040, 0x1103), ElementsDictionaryEntry("Person's Telephone Numbers", "PersonTelephoneNumbers", "LO", "1-n")); public_dictionary.emplace(Tag(0x0040, 0x1104), ElementsDictionaryEntry("Person's Telecom Information", "PersonTelecomInformation", "LT", "1")); public_dictionary.emplace(Tag(0x0040, 0x1400), ElementsDictionaryEntry("Requested Procedure Comments", "RequestedProcedureComments", "LT", "1")); public_dictionary.emplace(Tag(0x0040, 0x2001), ElementsDictionaryEntry("Reason for the Imaging Service Request", "ReasonForTheImagingServiceRequest", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x2004), ElementsDictionaryEntry("Issue Date of Imaging Service Request", "IssueDateOfImagingServiceRequest", "DA", "1")); public_dictionary.emplace(Tag(0x0040, 0x2005), ElementsDictionaryEntry("Issue Time of Imaging Service Request", "IssueTimeOfImagingServiceRequest", "TM", "1")); public_dictionary.emplace(Tag(0x0040, 0x2006), ElementsDictionaryEntry("Placer Order Number / Imaging Service Request (Retired)", "PlacerOrderNumberImagingServiceRequestRetired", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x2007), ElementsDictionaryEntry("Filler Order Number / Imaging Service Request (Retired)", "FillerOrderNumberImagingServiceRequestRetired", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x2008), ElementsDictionaryEntry("Order Entered By", "OrderEnteredBy", "PN", "1")); public_dictionary.emplace(Tag(0x0040, 0x2009), ElementsDictionaryEntry("Order Enterer's Location", "OrderEntererLocation", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x2010), ElementsDictionaryEntry("Order Callback Phone Number", "OrderCallbackPhoneNumber", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x2011), ElementsDictionaryEntry("Order Callback Telecom Information", "OrderCallbackTelecomInformation", "LT", "1")); public_dictionary.emplace(Tag(0x0040, 0x2016), ElementsDictionaryEntry("Placer Order Number / Imaging Service Request", "PlacerOrderNumberImagingServiceRequest", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x2017), ElementsDictionaryEntry("Filler Order Number / Imaging Service Request", "FillerOrderNumberImagingServiceRequest", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x2400), ElementsDictionaryEntry("Imaging Service Request Comments", "ImagingServiceRequestComments", "LT", "1")); public_dictionary.emplace(Tag(0x0040, 0x3001), ElementsDictionaryEntry("Confidentiality Constraint on Patient Data Description", "ConfidentialityConstraintOnPatientDataDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x4001), ElementsDictionaryEntry("General Purpose Scheduled Procedure Step Status", "GeneralPurposeScheduledProcedureStepStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0x4002), ElementsDictionaryEntry("General Purpose Performed Procedure Step Status", "GeneralPurposePerformedProcedureStepStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0x4003), ElementsDictionaryEntry("General Purpose Scheduled Procedure Step Priority", "GeneralPurposeScheduledProcedureStepPriority", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0x4004), ElementsDictionaryEntry("Scheduled Processing Applications Code Sequence", "ScheduledProcessingApplicationsCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4005), ElementsDictionaryEntry("Scheduled Procedure Step Start DateTime", "ScheduledProcedureStepStartDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0040, 0x4006), ElementsDictionaryEntry("Multiple Copies Flag", "MultipleCopiesFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0x4007), ElementsDictionaryEntry("Performed Processing Applications Code Sequence", "PerformedProcessingApplicationsCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4008), ElementsDictionaryEntry("Scheduled Procedure Step Expiration DateTime", "ScheduledProcedureStepExpirationDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0040, 0x4009), ElementsDictionaryEntry("Human Performer Code Sequence", "HumanPerformerCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4010), ElementsDictionaryEntry("Scheduled Procedure Step Modification DateTime", "ScheduledProcedureStepModificationDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0040, 0x4011), ElementsDictionaryEntry("Expected Completion DateTime", "ExpectedCompletionDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0040, 0x4015), ElementsDictionaryEntry("Resulting General Purpose Performed Procedure Steps Sequence", "ResultingGeneralPurposePerformedProcedureStepsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4016), ElementsDictionaryEntry("Referenced General Purpose Scheduled Procedure Step Sequence", "ReferencedGeneralPurposeScheduledProcedureStepSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4018), ElementsDictionaryEntry("Scheduled Workitem Code Sequence", "ScheduledWorkitemCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4019), ElementsDictionaryEntry("Performed Workitem Code Sequence", "PerformedWorkitemCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4020), ElementsDictionaryEntry("Input Availability Flag", "InputAvailabilityFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0x4021), ElementsDictionaryEntry("Input Information Sequence", "InputInformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4022), ElementsDictionaryEntry("Relevant Information Sequence", "RelevantInformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4023), ElementsDictionaryEntry("Referenced General Purpose Scheduled Procedure Step Transaction UID", "ReferencedGeneralPurposeScheduledProcedureStepTransactionUID", "UI", "1")); public_dictionary.emplace(Tag(0x0040, 0x4025), ElementsDictionaryEntry("Scheduled Station Name Code Sequence", "ScheduledStationNameCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4026), ElementsDictionaryEntry("Scheduled Station Class Code Sequence", "ScheduledStationClassCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4027), ElementsDictionaryEntry("Scheduled Station Geographic Location Code Sequence", "ScheduledStationGeographicLocationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4028), ElementsDictionaryEntry("Performed Station Name Code Sequence", "PerformedStationNameCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4029), ElementsDictionaryEntry("Performed Station Class Code Sequence", "PerformedStationClassCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4030), ElementsDictionaryEntry("Performed Station Geographic Location Code Sequence", "PerformedStationGeographicLocationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4031), ElementsDictionaryEntry("Requested Subsequent Workitem Code Sequence", "RequestedSubsequentWorkitemCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4032), ElementsDictionaryEntry("Non-DICOM Output Code Sequence", "NonDICOMOutputCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4033), ElementsDictionaryEntry("Output Information Sequence", "OutputInformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4034), ElementsDictionaryEntry("Scheduled Human Performers Sequence", "ScheduledHumanPerformersSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4035), ElementsDictionaryEntry("Actual Human Performers Sequence", "ActualHumanPerformersSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4036), ElementsDictionaryEntry("Human Performer's Organization", "HumanPerformerOrganization", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0x4037), ElementsDictionaryEntry("Human Performer's Name", "HumanPerformerName", "PN", "1")); public_dictionary.emplace(Tag(0x0040, 0x4040), ElementsDictionaryEntry("Raw Data Handling", "RawDataHandling", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0x4041), ElementsDictionaryEntry("Input Readiness State", "InputReadinessState", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0x4050), ElementsDictionaryEntry("Performed Procedure Step Start DateTime", "PerformedProcedureStepStartDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0040, 0x4051), ElementsDictionaryEntry("Performed Procedure Step End DateTime", "PerformedProcedureStepEndDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0040, 0x4052), ElementsDictionaryEntry("Procedure Step Cancellation DateTime", "ProcedureStepCancellationDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0040, 0x4070), ElementsDictionaryEntry("Output Destination Sequence", "OutputDestinationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4071), ElementsDictionaryEntry("DICOM Storage Sequence", "DICOMStorageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4072), ElementsDictionaryEntry("STOW-RS Storage Sequence", "STOWRSStorageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x4073), ElementsDictionaryEntry("Storage URL", "StorageURL", "UR", "1")); public_dictionary.emplace(Tag(0x0040, 0x4074), ElementsDictionaryEntry("XDS Storage Sequence", "XDSStorageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x8302), ElementsDictionaryEntry("Entrance Dose in mGy", "EntranceDoseInmGy", "DS", "1")); public_dictionary.emplace(Tag(0x0040, 0x8303), ElementsDictionaryEntry("Entrance Dose Derivation", "EntranceDoseDerivation", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0x9092), ElementsDictionaryEntry("Parametric Map Frame Type Sequence", "ParametricMapFrameTypeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x9094), ElementsDictionaryEntry("Referenced Image Real World Value Mapping Sequence", "ReferencedImageRealWorldValueMappingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x9096), ElementsDictionaryEntry("Real World Value Mapping Sequence", "RealWorldValueMappingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x9098), ElementsDictionaryEntry("Pixel Value Mapping Code Sequence", "PixelValueMappingCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x9210), ElementsDictionaryEntry("LUT Label", "LUTLabel", "SH", "1")); public_dictionary.emplace(Tag(0x0040, 0x9211), ElementsDictionaryEntry("Real World Value Last Value Mapped", "RealWorldValueLastValueMapped", "US or SS", "1")); public_dictionary.emplace(Tag(0x0040, 0x9212), ElementsDictionaryEntry("Real World Value LUT Data", "RealWorldValueLUTData", "FD", "1-n")); public_dictionary.emplace(Tag(0x0040, 0x9213), ElementsDictionaryEntry("Double Float Real World Value Last Value Mapped", "DoubleFloatRealWorldValueLastValueMapped", "FD", "1")); public_dictionary.emplace(Tag(0x0040, 0x9214), ElementsDictionaryEntry("Double Float Real World Value First Value Mapped", "DoubleFloatRealWorldValueFirstValueMapped", "FD", "1")); public_dictionary.emplace(Tag(0x0040, 0x9216), ElementsDictionaryEntry("Real World Value First Value Mapped", "RealWorldValueFirstValueMapped", "US or SS", "1")); public_dictionary.emplace(Tag(0x0040, 0x9220), ElementsDictionaryEntry("Quantity Definition Sequence", "QuantityDefinitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0x9224), ElementsDictionaryEntry("Real World Value Intercept", "RealWorldValueIntercept", "FD", "1")); public_dictionary.emplace(Tag(0x0040, 0x9225), ElementsDictionaryEntry("Real World Value Slope", "RealWorldValueSlope", "FD", "1")); public_dictionary.emplace(Tag(0x0040, 0xa007), ElementsDictionaryEntry("Findings Flag (Trial)", "FindingsFlagTrial", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa010), ElementsDictionaryEntry("Relationship Type", "RelationshipType", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa020), ElementsDictionaryEntry("Findings Sequence (Trial)", "FindingsSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa021), ElementsDictionaryEntry("Findings Group UID (Trial)", "FindingsGroupUIDTrial", "UI", "1")); public_dictionary.emplace(Tag(0x0040, 0xa022), ElementsDictionaryEntry("Referenced Findings Group UID (Trial)", "ReferencedFindingsGroupUIDTrial", "UI", "1")); public_dictionary.emplace(Tag(0x0040, 0xa023), ElementsDictionaryEntry("Findings Group Recording Date (Trial)", "FindingsGroupRecordingDateTrial", "DA", "1")); public_dictionary.emplace(Tag(0x0040, 0xa024), ElementsDictionaryEntry("Findings Group Recording Time (Trial)", "FindingsGroupRecordingTimeTrial", "TM", "1")); public_dictionary.emplace(Tag(0x0040, 0xa026), ElementsDictionaryEntry("Findings Source Category Code Sequence (Trial)", "FindingsSourceCategoryCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa027), ElementsDictionaryEntry("Verifying Organization", "VerifyingOrganization", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0xa028), ElementsDictionaryEntry("Documenting Organization Identifier Code Sequence (Trial)", "DocumentingOrganizationIdentifierCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa030), ElementsDictionaryEntry("Verification DateTime", "VerificationDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0040, 0xa032), ElementsDictionaryEntry("Observation DateTime", "ObservationDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0040, 0xa040), ElementsDictionaryEntry("Value Type", "ValueType", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa043), ElementsDictionaryEntry("Concept Name Code Sequence", "ConceptNameCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa047), ElementsDictionaryEntry("Measurement Precision Description (Trial)", "MeasurementPrecisionDescriptionTrial", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0xa050), ElementsDictionaryEntry("Continuity Of Content", "ContinuityOfContent", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa057), ElementsDictionaryEntry("Urgency or Priority Alerts (Trial)", "UrgencyOrPriorityAlertsTrial", "CS", "1-n")); public_dictionary.emplace(Tag(0x0040, 0xa060), ElementsDictionaryEntry("Sequencing Indicator (Trial)", "SequencingIndicatorTrial", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0xa066), ElementsDictionaryEntry("Document Identifier Code Sequence (Trial)", "DocumentIdentifierCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa067), ElementsDictionaryEntry("Document Author (Trial)", "DocumentAuthorTrial", "PN", "1")); public_dictionary.emplace(Tag(0x0040, 0xa068), ElementsDictionaryEntry("Document Author Identifier Code Sequence (Trial)", "DocumentAuthorIdentifierCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa070), ElementsDictionaryEntry("Identifier Code Sequence (Trial)", "IdentifierCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa073), ElementsDictionaryEntry("Verifying Observer Sequence", "VerifyingObserverSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa074), ElementsDictionaryEntry("Object Binary Identifier (Trial)", "ObjectBinaryIdentifierTrial", "OB", "1")); public_dictionary.emplace(Tag(0x0040, 0xa075), ElementsDictionaryEntry("Verifying Observer Name", "VerifyingObserverName", "PN", "1")); public_dictionary.emplace(Tag(0x0040, 0xa076), ElementsDictionaryEntry("Documenting Observer Identifier Code Sequence (Trial)", "DocumentingObserverIdentifierCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa078), ElementsDictionaryEntry("Author Observer Sequence", "AuthorObserverSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa07a), ElementsDictionaryEntry("Participant Sequence", "ParticipantSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa07c), ElementsDictionaryEntry("Custodial Organization Sequence", "CustodialOrganizationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa080), ElementsDictionaryEntry("Participation Type", "ParticipationType", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa082), ElementsDictionaryEntry("Participation DateTime", "ParticipationDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0040, 0xa084), ElementsDictionaryEntry("Observer Type", "ObserverType", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa085), ElementsDictionaryEntry("Procedure Identifier Code Sequence (Trial)", "ProcedureIdentifierCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa088), ElementsDictionaryEntry("Verifying Observer Identification Code Sequence", "VerifyingObserverIdentificationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa089), ElementsDictionaryEntry("Object Directory Binary Identifier (Trial)", "ObjectDirectoryBinaryIdentifierTrial", "OB", "1")); public_dictionary.emplace(Tag(0x0040, 0xa090), ElementsDictionaryEntry("Equivalent CDA Document Sequence", "EquivalentCDADocumentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa0b0), ElementsDictionaryEntry("Referenced Waveform Channels", "ReferencedWaveformChannels", "US", "2-2n")); public_dictionary.emplace(Tag(0x0040, 0xa110), ElementsDictionaryEntry("Date of Document or Verbal Transaction (Trial)", "DateOfDocumentOrVerbalTransactionTrial", "DA", "1")); public_dictionary.emplace(Tag(0x0040, 0xa112), ElementsDictionaryEntry("Time of Document Creation or Verbal Transaction (Trial)", "TimeOfDocumentCreationOrVerbalTransactionTrial", "TM", "1")); public_dictionary.emplace(Tag(0x0040, 0xa120), ElementsDictionaryEntry("DateTime", "DateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0040, 0xa121), ElementsDictionaryEntry("Date", "Date", "DA", "1")); public_dictionary.emplace(Tag(0x0040, 0xa122), ElementsDictionaryEntry("Time", "Time", "TM", "1")); public_dictionary.emplace(Tag(0x0040, 0xa123), ElementsDictionaryEntry("Person Name", "PersonName", "PN", "1")); public_dictionary.emplace(Tag(0x0040, 0xa124), ElementsDictionaryEntry("UID", "UID", "UI", "1")); public_dictionary.emplace(Tag(0x0040, 0xa125), ElementsDictionaryEntry("Report Status ID (Trial)", "ReportStatusIDTrial", "CS", "2")); public_dictionary.emplace(Tag(0x0040, 0xa130), ElementsDictionaryEntry("Temporal Range Type", "TemporalRangeType", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa132), ElementsDictionaryEntry("Referenced Sample Positions", "ReferencedSamplePositions", "UL", "1-n")); public_dictionary.emplace(Tag(0x0040, 0xa136), ElementsDictionaryEntry("Referenced Frame Numbers", "ReferencedFrameNumbers", "US", "1-n")); public_dictionary.emplace(Tag(0x0040, 0xa138), ElementsDictionaryEntry("Referenced Time Offsets", "ReferencedTimeOffsets", "DS", "1-n")); public_dictionary.emplace(Tag(0x0040, 0xa13a), ElementsDictionaryEntry("Referenced DateTime", "ReferencedDateTime", "DT", "1-n")); public_dictionary.emplace(Tag(0x0040, 0xa160), ElementsDictionaryEntry("Text Value", "TextValue", "UT", "1")); public_dictionary.emplace(Tag(0x0040, 0xa161), ElementsDictionaryEntry("Floating Point Value", "FloatingPointValue", "FD", "1-n")); public_dictionary.emplace(Tag(0x0040, 0xa162), ElementsDictionaryEntry("Rational Numerator Value", "RationalNumeratorValue", "SL", "1-n")); public_dictionary.emplace(Tag(0x0040, 0xa163), ElementsDictionaryEntry("Rational Denominator Value", "RationalDenominatorValue", "UL", "1-n")); public_dictionary.emplace(Tag(0x0040, 0xa167), ElementsDictionaryEntry("Observation Category Code Sequence (Trial)", "ObservationCategoryCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa168), ElementsDictionaryEntry("Concept Code Sequence", "ConceptCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa16a), ElementsDictionaryEntry("Bibliographic Citation (Trial)", "BibliographicCitationTrial", "ST", "1")); public_dictionary.emplace(Tag(0x0040, 0xa170), ElementsDictionaryEntry("Purpose of Reference Code Sequence", "PurposeOfReferenceCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa171), ElementsDictionaryEntry("Observation UID", "ObservationUID", "UI", "1")); public_dictionary.emplace(Tag(0x0040, 0xa172), ElementsDictionaryEntry("Referenced Observation UID (Trial)", "ReferencedObservationUIDTrial", "UI", "1")); public_dictionary.emplace(Tag(0x0040, 0xa173), ElementsDictionaryEntry("Referenced Observation Class (Trial)", "ReferencedObservationClassTrial", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa174), ElementsDictionaryEntry("Referenced Object Observation Class (Trial)", "ReferencedObjectObservationClassTrial", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa180), ElementsDictionaryEntry("Annotation Group Number", "AnnotationGroupNumber", "US", "1")); public_dictionary.emplace(Tag(0x0040, 0xa192), ElementsDictionaryEntry("Observation Date (Trial)", "ObservationDateTrial", "DA", "1")); public_dictionary.emplace(Tag(0x0040, 0xa193), ElementsDictionaryEntry("Observation Time (Trial)", "ObservationTimeTrial", "TM", "1")); public_dictionary.emplace(Tag(0x0040, 0xa194), ElementsDictionaryEntry("Measurement Automation (Trial)", "MeasurementAutomationTrial", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa195), ElementsDictionaryEntry("Modifier Code Sequence", "ModifierCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa224), ElementsDictionaryEntry("Identification Description (Trial)", "IdentificationDescriptionTrial", "ST", "1")); public_dictionary.emplace(Tag(0x0040, 0xa290), ElementsDictionaryEntry("Coordinates Set Geometric Type (Trial)", "CoordinatesSetGeometricTypeTrial", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa296), ElementsDictionaryEntry("Algorithm Code Sequence (Trial)", "AlgorithmCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa297), ElementsDictionaryEntry("Algorithm Description (Trial)", "AlgorithmDescriptionTrial", "ST", "1")); public_dictionary.emplace(Tag(0x0040, 0xa29a), ElementsDictionaryEntry("Pixel Coordinates Set (Trial)", "PixelCoordinatesSetTrial", "SL", "2-2n")); public_dictionary.emplace(Tag(0x0040, 0xa300), ElementsDictionaryEntry("Measured Value Sequence", "MeasuredValueSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa301), ElementsDictionaryEntry("Numeric Value Qualifier Code Sequence", "NumericValueQualifierCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa307), ElementsDictionaryEntry("Current Observer (Trial)", "CurrentObserverTrial", "PN", "1")); public_dictionary.emplace(Tag(0x0040, 0xa30a), ElementsDictionaryEntry("Numeric Value", "NumericValue", "DS", "1-n")); public_dictionary.emplace(Tag(0x0040, 0xa313), ElementsDictionaryEntry("Referenced Accession Sequence (Trial)", "ReferencedAccessionSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa33a), ElementsDictionaryEntry("Report Status Comment (Trial)", "ReportStatusCommentTrial", "ST", "1")); public_dictionary.emplace(Tag(0x0040, 0xa340), ElementsDictionaryEntry("Procedure Context Sequence (Trial)", "ProcedureContextSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa352), ElementsDictionaryEntry("Verbal Source (Trial)", "VerbalSourceTrial", "PN", "1")); public_dictionary.emplace(Tag(0x0040, 0xa353), ElementsDictionaryEntry("Address (Trial)", "AddressTrial", "ST", "1")); public_dictionary.emplace(Tag(0x0040, 0xa354), ElementsDictionaryEntry("Telephone Number (Trial)", "TelephoneNumberTrial", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0xa358), ElementsDictionaryEntry("Verbal Source Identifier Code Sequence (Trial)", "VerbalSourceIdentifierCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa360), ElementsDictionaryEntry("Predecessor Documents Sequence", "PredecessorDocumentsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa370), ElementsDictionaryEntry("Referenced Request Sequence", "ReferencedRequestSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa372), ElementsDictionaryEntry("Performed Procedure Code Sequence", "PerformedProcedureCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa375), ElementsDictionaryEntry("Current Requested Procedure Evidence Sequence", "CurrentRequestedProcedureEvidenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa380), ElementsDictionaryEntry("Report Detail Sequence (Trial)", "ReportDetailSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa385), ElementsDictionaryEntry("Pertinent Other Evidence Sequence", "PertinentOtherEvidenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa390), ElementsDictionaryEntry("HL7 Structured Document Reference Sequence", "HL7StructuredDocumentReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa402), ElementsDictionaryEntry("Observation Subject UID (Trial)", "ObservationSubjectUIDTrial", "UI", "1")); public_dictionary.emplace(Tag(0x0040, 0xa403), ElementsDictionaryEntry("Observation Subject Class (Trial)", "ObservationSubjectClassTrial", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa404), ElementsDictionaryEntry("Observation Subject Type Code Sequence (Trial)", "ObservationSubjectTypeCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa491), ElementsDictionaryEntry("Completion Flag", "CompletionFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa492), ElementsDictionaryEntry("Completion Flag Description", "CompletionFlagDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0040, 0xa493), ElementsDictionaryEntry("Verification Flag", "VerificationFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa494), ElementsDictionaryEntry("Archive Requested", "ArchiveRequested", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa496), ElementsDictionaryEntry("Preliminary Flag", "PreliminaryFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa504), ElementsDictionaryEntry("Content Template Sequence", "ContentTemplateSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa525), ElementsDictionaryEntry("Identical Documents Sequence", "IdenticalDocumentsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa600), ElementsDictionaryEntry("Observation Subject Context Flag (Trial)", "ObservationSubjectContextFlagTrial", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa601), ElementsDictionaryEntry("Observer Context Flag (Trial)", "ObserverContextFlagTrial", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa603), ElementsDictionaryEntry("Procedure Context Flag (Trial)", "ProcedureContextFlagTrial", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xa730), ElementsDictionaryEntry("Content Sequence", "ContentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa731), ElementsDictionaryEntry("Relationship Sequence (Trial)", "RelationshipSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa732), ElementsDictionaryEntry("Relationship Type Code Sequence (Trial)", "RelationshipTypeCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa744), ElementsDictionaryEntry("Language Code Sequence (Trial)", "LanguageCodeSequenceTrial", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xa992), ElementsDictionaryEntry("Uniform Resource Locator (Trial)", "UniformResourceLocatorTrial", "ST", "1")); public_dictionary.emplace(Tag(0x0040, 0xb020), ElementsDictionaryEntry("Waveform Annotation Sequence", "WaveformAnnotationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xdb00), ElementsDictionaryEntry("Template Identifier", "TemplateIdentifier", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xdb06), ElementsDictionaryEntry("Template Version", "TemplateVersion", "DT", "1")); public_dictionary.emplace(Tag(0x0040, 0xdb07), ElementsDictionaryEntry("Template Local Version", "TemplateLocalVersion", "DT", "1")); public_dictionary.emplace(Tag(0x0040, 0xdb0b), ElementsDictionaryEntry("Template Extension Flag", "TemplateExtensionFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xdb0c), ElementsDictionaryEntry("Template Extension Organization UID", "TemplateExtensionOrganizationUID", "UI", "1")); public_dictionary.emplace(Tag(0x0040, 0xdb0d), ElementsDictionaryEntry("Template Extension Creator UID", "TemplateExtensionCreatorUID", "UI", "1")); public_dictionary.emplace(Tag(0x0040, 0xdb73), ElementsDictionaryEntry("Referenced Content Item Identifier", "ReferencedContentItemIdentifier", "UL", "1-n")); public_dictionary.emplace(Tag(0x0040, 0xe001), ElementsDictionaryEntry("HL7 Instance Identifier", "HL7InstanceIdentifier", "ST", "1")); public_dictionary.emplace(Tag(0x0040, 0xe004), ElementsDictionaryEntry("HL7 Document Effective Time", "HL7DocumentEffectiveTime", "DT", "1")); public_dictionary.emplace(Tag(0x0040, 0xe006), ElementsDictionaryEntry("HL7 Document Type Code Sequence", "HL7DocumentTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xe008), ElementsDictionaryEntry("Document Class Code Sequence", "DocumentClassCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xe010), ElementsDictionaryEntry("Retrieve URI", "RetrieveURI", "UR", "1")); public_dictionary.emplace(Tag(0x0040, 0xe011), ElementsDictionaryEntry("Retrieve Location UID", "RetrieveLocationUID", "UI", "1")); public_dictionary.emplace(Tag(0x0040, 0xe020), ElementsDictionaryEntry("Type of Instances", "TypeOfInstances", "CS", "1")); public_dictionary.emplace(Tag(0x0040, 0xe021), ElementsDictionaryEntry("DICOM Retrieval Sequence", "DICOMRetrievalSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xe022), ElementsDictionaryEntry("DICOM Media Retrieval Sequence", "DICOMMediaRetrievalSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xe023), ElementsDictionaryEntry("WADO Retrieval Sequence", "WADORetrievalSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xe024), ElementsDictionaryEntry("XDS Retrieval Sequence", "XDSRetrievalSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xe025), ElementsDictionaryEntry("WADO-RS Retrieval Sequence", "WADORSRetrievalSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0040, 0xe030), ElementsDictionaryEntry("Repository Unique ID", "RepositoryUniqueID", "UI", "1")); public_dictionary.emplace(Tag(0x0040, 0xe031), ElementsDictionaryEntry("Home Community ID", "HomeCommunityID", "UI", "1")); public_tags.emplace("ScheduledStationAETitle", Tag(0x0040, 0x0001)); public_tags.emplace("ScheduledProcedureStepStartDate", Tag(0x0040, 0x0002)); public_tags.emplace("ScheduledProcedureStepStartTime", Tag(0x0040, 0x0003)); public_tags.emplace("ScheduledProcedureStepEndDate", Tag(0x0040, 0x0004)); public_tags.emplace("ScheduledProcedureStepEndTime", Tag(0x0040, 0x0005)); public_tags.emplace("ScheduledPerformingPhysicianName", Tag(0x0040, 0x0006)); public_tags.emplace("ScheduledProcedureStepDescription", Tag(0x0040, 0x0007)); public_tags.emplace("ScheduledProtocolCodeSequence", Tag(0x0040, 0x0008)); public_tags.emplace("ScheduledProcedureStepID", Tag(0x0040, 0x0009)); public_tags.emplace("StageCodeSequence", Tag(0x0040, 0x000a)); public_tags.emplace("ScheduledPerformingPhysicianIdentificationSequence", Tag(0x0040, 0x000b)); public_tags.emplace("ScheduledStationName", Tag(0x0040, 0x0010)); public_tags.emplace("ScheduledProcedureStepLocation", Tag(0x0040, 0x0011)); public_tags.emplace("PreMedication", Tag(0x0040, 0x0012)); public_tags.emplace("ScheduledProcedureStepStatus", Tag(0x0040, 0x0020)); public_tags.emplace("OrderPlacerIdentifierSequence", Tag(0x0040, 0x0026)); public_tags.emplace("OrderFillerIdentifierSequence", Tag(0x0040, 0x0027)); public_tags.emplace("LocalNamespaceEntityID", Tag(0x0040, 0x0031)); public_tags.emplace("UniversalEntityID", Tag(0x0040, 0x0032)); public_tags.emplace("UniversalEntityIDType", Tag(0x0040, 0x0033)); public_tags.emplace("IdentifierTypeCode", Tag(0x0040, 0x0035)); public_tags.emplace("AssigningFacilitySequence", Tag(0x0040, 0x0036)); public_tags.emplace("AssigningJurisdictionCodeSequence", Tag(0x0040, 0x0039)); public_tags.emplace("AssigningAgencyOrDepartmentCodeSequence", Tag(0x0040, 0x003a)); public_tags.emplace("ScheduledProcedureStepSequence", Tag(0x0040, 0x0100)); public_tags.emplace("ReferencedNonImageCompositeSOPInstanceSequence", Tag(0x0040, 0x0220)); public_tags.emplace("PerformedStationAETitle", Tag(0x0040, 0x0241)); public_tags.emplace("PerformedStationName", Tag(0x0040, 0x0242)); public_tags.emplace("PerformedLocation", Tag(0x0040, 0x0243)); public_tags.emplace("PerformedProcedureStepStartDate", Tag(0x0040, 0x0244)); public_tags.emplace("PerformedProcedureStepStartTime", Tag(0x0040, 0x0245)); public_tags.emplace("PerformedProcedureStepEndDate", Tag(0x0040, 0x0250)); public_tags.emplace("PerformedProcedureStepEndTime", Tag(0x0040, 0x0251)); public_tags.emplace("PerformedProcedureStepStatus", Tag(0x0040, 0x0252)); public_tags.emplace("PerformedProcedureStepID", Tag(0x0040, 0x0253)); public_tags.emplace("PerformedProcedureStepDescription", Tag(0x0040, 0x0254)); public_tags.emplace("PerformedProcedureTypeDescription", Tag(0x0040, 0x0255)); public_tags.emplace("PerformedProtocolCodeSequence", Tag(0x0040, 0x0260)); public_tags.emplace("PerformedProtocolType", Tag(0x0040, 0x0261)); public_tags.emplace("ScheduledStepAttributesSequence", Tag(0x0040, 0x0270)); public_tags.emplace("RequestAttributesSequence", Tag(0x0040, 0x0275)); public_tags.emplace("CommentsOnThePerformedProcedureStep", Tag(0x0040, 0x0280)); public_tags.emplace("PerformedProcedureStepDiscontinuationReasonCodeSequence", Tag(0x0040, 0x0281)); public_tags.emplace("QuantitySequence", Tag(0x0040, 0x0293)); public_tags.emplace("Quantity", Tag(0x0040, 0x0294)); public_tags.emplace("MeasuringUnitsSequence", Tag(0x0040, 0x0295)); public_tags.emplace("BillingItemSequence", Tag(0x0040, 0x0296)); public_tags.emplace("TotalTimeOfFluoroscopy", Tag(0x0040, 0x0300)); public_tags.emplace("TotalNumberOfExposures", Tag(0x0040, 0x0301)); public_tags.emplace("EntranceDose", Tag(0x0040, 0x0302)); public_tags.emplace("ExposedArea", Tag(0x0040, 0x0303)); public_tags.emplace("DistanceSourceToEntrance", Tag(0x0040, 0x0306)); public_tags.emplace("DistanceSourceToSupport", Tag(0x0040, 0x0307)); public_tags.emplace("ExposureDoseSequence", Tag(0x0040, 0x030e)); public_tags.emplace("CommentsOnRadiationDose", Tag(0x0040, 0x0310)); public_tags.emplace("XRayOutput", Tag(0x0040, 0x0312)); public_tags.emplace("HalfValueLayer", Tag(0x0040, 0x0314)); public_tags.emplace("OrganDose", Tag(0x0040, 0x0316)); public_tags.emplace("OrganExposed", Tag(0x0040, 0x0318)); public_tags.emplace("BillingProcedureStepSequence", Tag(0x0040, 0x0320)); public_tags.emplace("FilmConsumptionSequence", Tag(0x0040, 0x0321)); public_tags.emplace("BillingSuppliesAndDevicesSequence", Tag(0x0040, 0x0324)); public_tags.emplace("ReferencedProcedureStepSequence", Tag(0x0040, 0x0330)); public_tags.emplace("PerformedSeriesSequence", Tag(0x0040, 0x0340)); public_tags.emplace("CommentsOnTheScheduledProcedureStep", Tag(0x0040, 0x0400)); public_tags.emplace("ProtocolContextSequence", Tag(0x0040, 0x0440)); public_tags.emplace("ContentItemModifierSequence", Tag(0x0040, 0x0441)); public_tags.emplace("ScheduledSpecimenSequence", Tag(0x0040, 0x0500)); public_tags.emplace("SpecimenAccessionNumber", Tag(0x0040, 0x050a)); public_tags.emplace("ContainerIdentifier", Tag(0x0040, 0x0512)); public_tags.emplace("IssuerOfTheContainerIdentifierSequence", Tag(0x0040, 0x0513)); public_tags.emplace("AlternateContainerIdentifierSequence", Tag(0x0040, 0x0515)); public_tags.emplace("ContainerTypeCodeSequence", Tag(0x0040, 0x0518)); public_tags.emplace("ContainerDescription", Tag(0x0040, 0x051a)); public_tags.emplace("ContainerComponentSequence", Tag(0x0040, 0x0520)); public_tags.emplace("SpecimenSequence", Tag(0x0040, 0x0550)); public_tags.emplace("SpecimenIdentifier", Tag(0x0040, 0x0551)); public_tags.emplace("SpecimenDescriptionSequenceTrial", Tag(0x0040, 0x0552)); public_tags.emplace("SpecimenDescriptionTrial", Tag(0x0040, 0x0553)); public_tags.emplace("SpecimenUID", Tag(0x0040, 0x0554)); public_tags.emplace("AcquisitionContextSequence", Tag(0x0040, 0x0555)); public_tags.emplace("AcquisitionContextDescription", Tag(0x0040, 0x0556)); public_tags.emplace("SpecimenTypeCodeSequence", Tag(0x0040, 0x059a)); public_tags.emplace("SpecimenDescriptionSequence", Tag(0x0040, 0x0560)); public_tags.emplace("IssuerOfTheSpecimenIdentifierSequence", Tag(0x0040, 0x0562)); public_tags.emplace("SpecimenShortDescription", Tag(0x0040, 0x0600)); public_tags.emplace("SpecimenDetailedDescription", Tag(0x0040, 0x0602)); public_tags.emplace("SpecimenPreparationSequence", Tag(0x0040, 0x0610)); public_tags.emplace("SpecimenPreparationStepContentItemSequence", Tag(0x0040, 0x0612)); public_tags.emplace("SpecimenLocalizationContentItemSequence", Tag(0x0040, 0x0620)); public_tags.emplace("SlideIdentifier", Tag(0x0040, 0x06fa)); public_tags.emplace("WholeSlideMicroscopyImageFrameTypeSequence", Tag(0x0040, 0x0710)); public_tags.emplace("ImageCenterPointCoordinatesSequence", Tag(0x0040, 0x071a)); public_tags.emplace("XOffsetInSlideCoordinateSystem", Tag(0x0040, 0x072a)); public_tags.emplace("YOffsetInSlideCoordinateSystem", Tag(0x0040, 0x073a)); public_tags.emplace("ZOffsetInSlideCoordinateSystem", Tag(0x0040, 0x074a)); public_tags.emplace("PixelSpacingSequence", Tag(0x0040, 0x08d8)); public_tags.emplace("CoordinateSystemAxisCodeSequence", Tag(0x0040, 0x08da)); public_tags.emplace("MeasurementUnitsCodeSequence", Tag(0x0040, 0x08ea)); public_tags.emplace("VitalStainCodeSequenceTrial", Tag(0x0040, 0x09f8)); public_tags.emplace("RequestedProcedureID", Tag(0x0040, 0x1001)); public_tags.emplace("ReasonForTheRequestedProcedure", Tag(0x0040, 0x1002)); public_tags.emplace("RequestedProcedurePriority", Tag(0x0040, 0x1003)); public_tags.emplace("PatientTransportArrangements", Tag(0x0040, 0x1004)); public_tags.emplace("RequestedProcedureLocation", Tag(0x0040, 0x1005)); public_tags.emplace("PlacerOrderNumberProcedure", Tag(0x0040, 0x1006)); public_tags.emplace("FillerOrderNumberProcedure", Tag(0x0040, 0x1007)); public_tags.emplace("ConfidentialityCode", Tag(0x0040, 0x1008)); public_tags.emplace("ReportingPriority", Tag(0x0040, 0x1009)); public_tags.emplace("ReasonForRequestedProcedureCodeSequence", Tag(0x0040, 0x100a)); public_tags.emplace("NamesOfIntendedRecipientsOfResults", Tag(0x0040, 0x1010)); public_tags.emplace("IntendedRecipientsOfResultsIdentificationSequence", Tag(0x0040, 0x1011)); public_tags.emplace("ReasonForPerformedProcedureCodeSequence", Tag(0x0040, 0x1012)); public_tags.emplace("RequestedProcedureDescriptionTrial", Tag(0x0040, 0x1060)); public_tags.emplace("PersonIdentificationCodeSequence", Tag(0x0040, 0x1101)); public_tags.emplace("PersonAddress", Tag(0x0040, 0x1102)); public_tags.emplace("PersonTelephoneNumbers", Tag(0x0040, 0x1103)); public_tags.emplace("PersonTelecomInformation", Tag(0x0040, 0x1104)); public_tags.emplace("RequestedProcedureComments", Tag(0x0040, 0x1400)); public_tags.emplace("ReasonForTheImagingServiceRequest", Tag(0x0040, 0x2001)); public_tags.emplace("IssueDateOfImagingServiceRequest", Tag(0x0040, 0x2004)); public_tags.emplace("IssueTimeOfImagingServiceRequest", Tag(0x0040, 0x2005)); public_tags.emplace("PlacerOrderNumberImagingServiceRequestRetired", Tag(0x0040, 0x2006)); public_tags.emplace("FillerOrderNumberImagingServiceRequestRetired", Tag(0x0040, 0x2007)); public_tags.emplace("OrderEnteredBy", Tag(0x0040, 0x2008)); public_tags.emplace("OrderEntererLocation", Tag(0x0040, 0x2009)); public_tags.emplace("OrderCallbackPhoneNumber", Tag(0x0040, 0x2010)); public_tags.emplace("OrderCallbackTelecomInformation", Tag(0x0040, 0x2011)); public_tags.emplace("PlacerOrderNumberImagingServiceRequest", Tag(0x0040, 0x2016)); public_tags.emplace("FillerOrderNumberImagingServiceRequest", Tag(0x0040, 0x2017)); public_tags.emplace("ImagingServiceRequestComments", Tag(0x0040, 0x2400)); public_tags.emplace("ConfidentialityConstraintOnPatientDataDescription", Tag(0x0040, 0x3001)); public_tags.emplace("GeneralPurposeScheduledProcedureStepStatus", Tag(0x0040, 0x4001)); public_tags.emplace("GeneralPurposePerformedProcedureStepStatus", Tag(0x0040, 0x4002)); public_tags.emplace("GeneralPurposeScheduledProcedureStepPriority", Tag(0x0040, 0x4003)); public_tags.emplace("ScheduledProcessingApplicationsCodeSequence", Tag(0x0040, 0x4004)); public_tags.emplace("ScheduledProcedureStepStartDateTime", Tag(0x0040, 0x4005)); public_tags.emplace("MultipleCopiesFlag", Tag(0x0040, 0x4006)); public_tags.emplace("PerformedProcessingApplicationsCodeSequence", Tag(0x0040, 0x4007)); public_tags.emplace("ScheduledProcedureStepExpirationDateTime", Tag(0x0040, 0x4008)); public_tags.emplace("HumanPerformerCodeSequence", Tag(0x0040, 0x4009)); public_tags.emplace("ScheduledProcedureStepModificationDateTime", Tag(0x0040, 0x4010)); public_tags.emplace("ExpectedCompletionDateTime", Tag(0x0040, 0x4011)); public_tags.emplace("ResultingGeneralPurposePerformedProcedureStepsSequence", Tag(0x0040, 0x4015)); public_tags.emplace("ReferencedGeneralPurposeScheduledProcedureStepSequence", Tag(0x0040, 0x4016)); public_tags.emplace("ScheduledWorkitemCodeSequence", Tag(0x0040, 0x4018)); public_tags.emplace("PerformedWorkitemCodeSequence", Tag(0x0040, 0x4019)); public_tags.emplace("InputAvailabilityFlag", Tag(0x0040, 0x4020)); public_tags.emplace("InputInformationSequence", Tag(0x0040, 0x4021)); public_tags.emplace("RelevantInformationSequence", Tag(0x0040, 0x4022)); public_tags.emplace("ReferencedGeneralPurposeScheduledProcedureStepTransactionUID", Tag(0x0040, 0x4023)); public_tags.emplace("ScheduledStationNameCodeSequence", Tag(0x0040, 0x4025)); public_tags.emplace("ScheduledStationClassCodeSequence", Tag(0x0040, 0x4026)); public_tags.emplace("ScheduledStationGeographicLocationCodeSequence", Tag(0x0040, 0x4027)); public_tags.emplace("PerformedStationNameCodeSequence", Tag(0x0040, 0x4028)); public_tags.emplace("PerformedStationClassCodeSequence", Tag(0x0040, 0x4029)); public_tags.emplace("PerformedStationGeographicLocationCodeSequence", Tag(0x0040, 0x4030)); public_tags.emplace("RequestedSubsequentWorkitemCodeSequence", Tag(0x0040, 0x4031)); public_tags.emplace("NonDICOMOutputCodeSequence", Tag(0x0040, 0x4032)); public_tags.emplace("OutputInformationSequence", Tag(0x0040, 0x4033)); public_tags.emplace("ScheduledHumanPerformersSequence", Tag(0x0040, 0x4034)); public_tags.emplace("ActualHumanPerformersSequence", Tag(0x0040, 0x4035)); public_tags.emplace("HumanPerformerOrganization", Tag(0x0040, 0x4036)); public_tags.emplace("HumanPerformerName", Tag(0x0040, 0x4037)); public_tags.emplace("RawDataHandling", Tag(0x0040, 0x4040)); public_tags.emplace("InputReadinessState", Tag(0x0040, 0x4041)); public_tags.emplace("PerformedProcedureStepStartDateTime", Tag(0x0040, 0x4050)); public_tags.emplace("PerformedProcedureStepEndDateTime", Tag(0x0040, 0x4051)); public_tags.emplace("ProcedureStepCancellationDateTime", Tag(0x0040, 0x4052)); public_tags.emplace("OutputDestinationSequence", Tag(0x0040, 0x4070)); public_tags.emplace("DICOMStorageSequence", Tag(0x0040, 0x4071)); public_tags.emplace("STOWRSStorageSequence", Tag(0x0040, 0x4072)); public_tags.emplace("StorageURL", Tag(0x0040, 0x4073)); public_tags.emplace("XDSStorageSequence", Tag(0x0040, 0x4074)); public_tags.emplace("EntranceDoseInmGy", Tag(0x0040, 0x8302)); public_tags.emplace("EntranceDoseDerivation", Tag(0x0040, 0x8303)); public_tags.emplace("ParametricMapFrameTypeSequence", Tag(0x0040, 0x9092)); public_tags.emplace("ReferencedImageRealWorldValueMappingSequence", Tag(0x0040, 0x9094)); public_tags.emplace("RealWorldValueMappingSequence", Tag(0x0040, 0x9096)); public_tags.emplace("PixelValueMappingCodeSequence", Tag(0x0040, 0x9098)); public_tags.emplace("LUTLabel", Tag(0x0040, 0x9210)); public_tags.emplace("RealWorldValueLastValueMapped", Tag(0x0040, 0x9211)); public_tags.emplace("RealWorldValueLUTData", Tag(0x0040, 0x9212)); public_tags.emplace("DoubleFloatRealWorldValueLastValueMapped", Tag(0x0040, 0x9213)); public_tags.emplace("DoubleFloatRealWorldValueFirstValueMapped", Tag(0x0040, 0x9214)); public_tags.emplace("RealWorldValueFirstValueMapped", Tag(0x0040, 0x9216)); public_tags.emplace("QuantityDefinitionSequence", Tag(0x0040, 0x9220)); public_tags.emplace("RealWorldValueIntercept", Tag(0x0040, 0x9224)); public_tags.emplace("RealWorldValueSlope", Tag(0x0040, 0x9225)); public_tags.emplace("FindingsFlagTrial", Tag(0x0040, 0xa007)); public_tags.emplace("RelationshipType", Tag(0x0040, 0xa010)); public_tags.emplace("FindingsSequenceTrial", Tag(0x0040, 0xa020)); public_tags.emplace("FindingsGroupUIDTrial", Tag(0x0040, 0xa021)); public_tags.emplace("ReferencedFindingsGroupUIDTrial", Tag(0x0040, 0xa022)); public_tags.emplace("FindingsGroupRecordingDateTrial", Tag(0x0040, 0xa023)); public_tags.emplace("FindingsGroupRecordingTimeTrial", Tag(0x0040, 0xa024)); public_tags.emplace("FindingsSourceCategoryCodeSequenceTrial", Tag(0x0040, 0xa026)); public_tags.emplace("VerifyingOrganization", Tag(0x0040, 0xa027)); public_tags.emplace("DocumentingOrganizationIdentifierCodeSequenceTrial", Tag(0x0040, 0xa028)); public_tags.emplace("VerificationDateTime", Tag(0x0040, 0xa030)); public_tags.emplace("ObservationDateTime", Tag(0x0040, 0xa032)); public_tags.emplace("ValueType", Tag(0x0040, 0xa040)); public_tags.emplace("ConceptNameCodeSequence", Tag(0x0040, 0xa043)); public_tags.emplace("MeasurementPrecisionDescriptionTrial", Tag(0x0040, 0xa047)); public_tags.emplace("ContinuityOfContent", Tag(0x0040, 0xa050)); public_tags.emplace("UrgencyOrPriorityAlertsTrial", Tag(0x0040, 0xa057)); public_tags.emplace("SequencingIndicatorTrial", Tag(0x0040, 0xa060)); public_tags.emplace("DocumentIdentifierCodeSequenceTrial", Tag(0x0040, 0xa066)); public_tags.emplace("DocumentAuthorTrial", Tag(0x0040, 0xa067)); public_tags.emplace("DocumentAuthorIdentifierCodeSequenceTrial", Tag(0x0040, 0xa068)); public_tags.emplace("IdentifierCodeSequenceTrial", Tag(0x0040, 0xa070)); public_tags.emplace("VerifyingObserverSequence", Tag(0x0040, 0xa073)); public_tags.emplace("ObjectBinaryIdentifierTrial", Tag(0x0040, 0xa074)); public_tags.emplace("VerifyingObserverName", Tag(0x0040, 0xa075)); public_tags.emplace("DocumentingObserverIdentifierCodeSequenceTrial", Tag(0x0040, 0xa076)); public_tags.emplace("AuthorObserverSequence", Tag(0x0040, 0xa078)); public_tags.emplace("ParticipantSequence", Tag(0x0040, 0xa07a)); public_tags.emplace("CustodialOrganizationSequence", Tag(0x0040, 0xa07c)); public_tags.emplace("ParticipationType", Tag(0x0040, 0xa080)); public_tags.emplace("ParticipationDateTime", Tag(0x0040, 0xa082)); public_tags.emplace("ObserverType", Tag(0x0040, 0xa084)); public_tags.emplace("ProcedureIdentifierCodeSequenceTrial", Tag(0x0040, 0xa085)); public_tags.emplace("VerifyingObserverIdentificationCodeSequence", Tag(0x0040, 0xa088)); public_tags.emplace("ObjectDirectoryBinaryIdentifierTrial", Tag(0x0040, 0xa089)); public_tags.emplace("EquivalentCDADocumentSequence", Tag(0x0040, 0xa090)); public_tags.emplace("ReferencedWaveformChannels", Tag(0x0040, 0xa0b0)); public_tags.emplace("DateOfDocumentOrVerbalTransactionTrial", Tag(0x0040, 0xa110)); public_tags.emplace("TimeOfDocumentCreationOrVerbalTransactionTrial", Tag(0x0040, 0xa112)); public_tags.emplace("DateTime", Tag(0x0040, 0xa120)); public_tags.emplace("Date", Tag(0x0040, 0xa121)); public_tags.emplace("Time", Tag(0x0040, 0xa122)); public_tags.emplace("PersonName", Tag(0x0040, 0xa123)); public_tags.emplace("UID", Tag(0x0040, 0xa124)); public_tags.emplace("ReportStatusIDTrial", Tag(0x0040, 0xa125)); public_tags.emplace("TemporalRangeType", Tag(0x0040, 0xa130)); public_tags.emplace("ReferencedSamplePositions", Tag(0x0040, 0xa132)); public_tags.emplace("ReferencedFrameNumbers", Tag(0x0040, 0xa136)); public_tags.emplace("ReferencedTimeOffsets", Tag(0x0040, 0xa138)); public_tags.emplace("ReferencedDateTime", Tag(0x0040, 0xa13a)); public_tags.emplace("TextValue", Tag(0x0040, 0xa160)); public_tags.emplace("FloatingPointValue", Tag(0x0040, 0xa161)); public_tags.emplace("RationalNumeratorValue", Tag(0x0040, 0xa162)); public_tags.emplace("RationalDenominatorValue", Tag(0x0040, 0xa163)); public_tags.emplace("ObservationCategoryCodeSequenceTrial", Tag(0x0040, 0xa167)); public_tags.emplace("ConceptCodeSequence", Tag(0x0040, 0xa168)); public_tags.emplace("BibliographicCitationTrial", Tag(0x0040, 0xa16a)); public_tags.emplace("PurposeOfReferenceCodeSequence", Tag(0x0040, 0xa170)); public_tags.emplace("ObservationUID", Tag(0x0040, 0xa171)); public_tags.emplace("ReferencedObservationUIDTrial", Tag(0x0040, 0xa172)); public_tags.emplace("ReferencedObservationClassTrial", Tag(0x0040, 0xa173)); public_tags.emplace("ReferencedObjectObservationClassTrial", Tag(0x0040, 0xa174)); public_tags.emplace("AnnotationGroupNumber", Tag(0x0040, 0xa180)); public_tags.emplace("ObservationDateTrial", Tag(0x0040, 0xa192)); public_tags.emplace("ObservationTimeTrial", Tag(0x0040, 0xa193)); public_tags.emplace("MeasurementAutomationTrial", Tag(0x0040, 0xa194)); public_tags.emplace("ModifierCodeSequence", Tag(0x0040, 0xa195)); public_tags.emplace("IdentificationDescriptionTrial", Tag(0x0040, 0xa224)); public_tags.emplace("CoordinatesSetGeometricTypeTrial", Tag(0x0040, 0xa290)); public_tags.emplace("AlgorithmCodeSequenceTrial", Tag(0x0040, 0xa296)); public_tags.emplace("AlgorithmDescriptionTrial", Tag(0x0040, 0xa297)); public_tags.emplace("PixelCoordinatesSetTrial", Tag(0x0040, 0xa29a)); public_tags.emplace("MeasuredValueSequence", Tag(0x0040, 0xa300)); public_tags.emplace("NumericValueQualifierCodeSequence", Tag(0x0040, 0xa301)); public_tags.emplace("CurrentObserverTrial", Tag(0x0040, 0xa307)); public_tags.emplace("NumericValue", Tag(0x0040, 0xa30a)); public_tags.emplace("ReferencedAccessionSequenceTrial", Tag(0x0040, 0xa313)); public_tags.emplace("ReportStatusCommentTrial", Tag(0x0040, 0xa33a)); public_tags.emplace("ProcedureContextSequenceTrial", Tag(0x0040, 0xa340)); public_tags.emplace("VerbalSourceTrial", Tag(0x0040, 0xa352)); public_tags.emplace("AddressTrial", Tag(0x0040, 0xa353)); public_tags.emplace("TelephoneNumberTrial", Tag(0x0040, 0xa354)); public_tags.emplace("VerbalSourceIdentifierCodeSequenceTrial", Tag(0x0040, 0xa358)); public_tags.emplace("PredecessorDocumentsSequence", Tag(0x0040, 0xa360)); public_tags.emplace("ReferencedRequestSequence", Tag(0x0040, 0xa370)); public_tags.emplace("PerformedProcedureCodeSequence", Tag(0x0040, 0xa372)); public_tags.emplace("CurrentRequestedProcedureEvidenceSequence", Tag(0x0040, 0xa375)); public_tags.emplace("ReportDetailSequenceTrial", Tag(0x0040, 0xa380)); public_tags.emplace("PertinentOtherEvidenceSequence", Tag(0x0040, 0xa385)); public_tags.emplace("HL7StructuredDocumentReferenceSequence", Tag(0x0040, 0xa390)); public_tags.emplace("ObservationSubjectUIDTrial", Tag(0x0040, 0xa402)); public_tags.emplace("ObservationSubjectClassTrial", Tag(0x0040, 0xa403)); public_tags.emplace("ObservationSubjectTypeCodeSequenceTrial", Tag(0x0040, 0xa404)); public_tags.emplace("CompletionFlag", Tag(0x0040, 0xa491)); public_tags.emplace("CompletionFlagDescription", Tag(0x0040, 0xa492)); public_tags.emplace("VerificationFlag", Tag(0x0040, 0xa493)); public_tags.emplace("ArchiveRequested", Tag(0x0040, 0xa494)); public_tags.emplace("PreliminaryFlag", Tag(0x0040, 0xa496)); public_tags.emplace("ContentTemplateSequence", Tag(0x0040, 0xa504)); public_tags.emplace("IdenticalDocumentsSequence", Tag(0x0040, 0xa525)); public_tags.emplace("ObservationSubjectContextFlagTrial", Tag(0x0040, 0xa600)); public_tags.emplace("ObserverContextFlagTrial", Tag(0x0040, 0xa601)); public_tags.emplace("ProcedureContextFlagTrial", Tag(0x0040, 0xa603)); public_tags.emplace("ContentSequence", Tag(0x0040, 0xa730)); public_tags.emplace("RelationshipSequenceTrial", Tag(0x0040, 0xa731)); public_tags.emplace("RelationshipTypeCodeSequenceTrial", Tag(0x0040, 0xa732)); public_tags.emplace("LanguageCodeSequenceTrial", Tag(0x0040, 0xa744)); public_tags.emplace("UniformResourceLocatorTrial", Tag(0x0040, 0xa992)); public_tags.emplace("WaveformAnnotationSequence", Tag(0x0040, 0xb020)); public_tags.emplace("TemplateIdentifier", Tag(0x0040, 0xdb00)); public_tags.emplace("TemplateVersion", Tag(0x0040, 0xdb06)); public_tags.emplace("TemplateLocalVersion", Tag(0x0040, 0xdb07)); public_tags.emplace("TemplateExtensionFlag", Tag(0x0040, 0xdb0b)); public_tags.emplace("TemplateExtensionOrganizationUID", Tag(0x0040, 0xdb0c)); public_tags.emplace("TemplateExtensionCreatorUID", Tag(0x0040, 0xdb0d)); public_tags.emplace("ReferencedContentItemIdentifier", Tag(0x0040, 0xdb73)); public_tags.emplace("HL7InstanceIdentifier", Tag(0x0040, 0xe001)); public_tags.emplace("HL7DocumentEffectiveTime", Tag(0x0040, 0xe004)); public_tags.emplace("HL7DocumentTypeCodeSequence", Tag(0x0040, 0xe006)); public_tags.emplace("DocumentClassCodeSequence", Tag(0x0040, 0xe008)); public_tags.emplace("RetrieveURI", Tag(0x0040, 0xe010)); public_tags.emplace("RetrieveLocationUID", Tag(0x0040, 0xe011)); public_tags.emplace("TypeOfInstances", Tag(0x0040, 0xe020)); public_tags.emplace("DICOMRetrievalSequence", Tag(0x0040, 0xe021)); public_tags.emplace("DICOMMediaRetrievalSequence", Tag(0x0040, 0xe022)); public_tags.emplace("WADORetrievalSequence", Tag(0x0040, 0xe023)); public_tags.emplace("XDSRetrievalSequence", Tag(0x0040, 0xe024)); public_tags.emplace("WADORSRetrievalSequence", Tag(0x0040, 0xe025)); public_tags.emplace("RepositoryUniqueID", Tag(0x0040, 0xe030)); public_tags.emplace("HomeCommunityID", Tag(0x0040, 0xe031)); } } }odil-0.11.0/src/odil/registry_0040.h000066400000000000000000000432631362244656000167420ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0040 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0040 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ScheduledStationAETitle(0x0040, 0x0001); Tag const ScheduledProcedureStepStartDate(0x0040, 0x0002); Tag const ScheduledProcedureStepStartTime(0x0040, 0x0003); Tag const ScheduledProcedureStepEndDate(0x0040, 0x0004); Tag const ScheduledProcedureStepEndTime(0x0040, 0x0005); Tag const ScheduledPerformingPhysicianName(0x0040, 0x0006); Tag const ScheduledProcedureStepDescription(0x0040, 0x0007); Tag const ScheduledProtocolCodeSequence(0x0040, 0x0008); Tag const ScheduledProcedureStepID(0x0040, 0x0009); Tag const StageCodeSequence(0x0040, 0x000a); Tag const ScheduledPerformingPhysicianIdentificationSequence(0x0040, 0x000b); Tag const ScheduledStationName(0x0040, 0x0010); Tag const ScheduledProcedureStepLocation(0x0040, 0x0011); Tag const PreMedication(0x0040, 0x0012); Tag const ScheduledProcedureStepStatus(0x0040, 0x0020); Tag const OrderPlacerIdentifierSequence(0x0040, 0x0026); Tag const OrderFillerIdentifierSequence(0x0040, 0x0027); Tag const LocalNamespaceEntityID(0x0040, 0x0031); Tag const UniversalEntityID(0x0040, 0x0032); Tag const UniversalEntityIDType(0x0040, 0x0033); Tag const IdentifierTypeCode(0x0040, 0x0035); Tag const AssigningFacilitySequence(0x0040, 0x0036); Tag const AssigningJurisdictionCodeSequence(0x0040, 0x0039); Tag const AssigningAgencyOrDepartmentCodeSequence(0x0040, 0x003a); Tag const ScheduledProcedureStepSequence(0x0040, 0x0100); Tag const ReferencedNonImageCompositeSOPInstanceSequence(0x0040, 0x0220); Tag const PerformedStationAETitle(0x0040, 0x0241); Tag const PerformedStationName(0x0040, 0x0242); Tag const PerformedLocation(0x0040, 0x0243); Tag const PerformedProcedureStepStartDate(0x0040, 0x0244); Tag const PerformedProcedureStepStartTime(0x0040, 0x0245); Tag const PerformedProcedureStepEndDate(0x0040, 0x0250); Tag const PerformedProcedureStepEndTime(0x0040, 0x0251); Tag const PerformedProcedureStepStatus(0x0040, 0x0252); Tag const PerformedProcedureStepID(0x0040, 0x0253); Tag const PerformedProcedureStepDescription(0x0040, 0x0254); Tag const PerformedProcedureTypeDescription(0x0040, 0x0255); Tag const PerformedProtocolCodeSequence(0x0040, 0x0260); Tag const PerformedProtocolType(0x0040, 0x0261); Tag const ScheduledStepAttributesSequence(0x0040, 0x0270); Tag const RequestAttributesSequence(0x0040, 0x0275); Tag const CommentsOnThePerformedProcedureStep(0x0040, 0x0280); Tag const PerformedProcedureStepDiscontinuationReasonCodeSequence(0x0040, 0x0281); Tag const QuantitySequence(0x0040, 0x0293); Tag const Quantity(0x0040, 0x0294); Tag const MeasuringUnitsSequence(0x0040, 0x0295); Tag const BillingItemSequence(0x0040, 0x0296); Tag const TotalTimeOfFluoroscopy(0x0040, 0x0300); Tag const TotalNumberOfExposures(0x0040, 0x0301); Tag const EntranceDose(0x0040, 0x0302); Tag const ExposedArea(0x0040, 0x0303); Tag const DistanceSourceToEntrance(0x0040, 0x0306); Tag const DistanceSourceToSupport(0x0040, 0x0307); Tag const ExposureDoseSequence(0x0040, 0x030e); Tag const CommentsOnRadiationDose(0x0040, 0x0310); Tag const XRayOutput(0x0040, 0x0312); Tag const HalfValueLayer(0x0040, 0x0314); Tag const OrganDose(0x0040, 0x0316); Tag const OrganExposed(0x0040, 0x0318); Tag const BillingProcedureStepSequence(0x0040, 0x0320); Tag const FilmConsumptionSequence(0x0040, 0x0321); Tag const BillingSuppliesAndDevicesSequence(0x0040, 0x0324); Tag const ReferencedProcedureStepSequence(0x0040, 0x0330); Tag const PerformedSeriesSequence(0x0040, 0x0340); Tag const CommentsOnTheScheduledProcedureStep(0x0040, 0x0400); Tag const ProtocolContextSequence(0x0040, 0x0440); Tag const ContentItemModifierSequence(0x0040, 0x0441); Tag const ScheduledSpecimenSequence(0x0040, 0x0500); Tag const SpecimenAccessionNumber(0x0040, 0x050a); Tag const ContainerIdentifier(0x0040, 0x0512); Tag const IssuerOfTheContainerIdentifierSequence(0x0040, 0x0513); Tag const AlternateContainerIdentifierSequence(0x0040, 0x0515); Tag const ContainerTypeCodeSequence(0x0040, 0x0518); Tag const ContainerDescription(0x0040, 0x051a); Tag const ContainerComponentSequence(0x0040, 0x0520); Tag const SpecimenSequence(0x0040, 0x0550); Tag const SpecimenIdentifier(0x0040, 0x0551); Tag const SpecimenDescriptionSequenceTrial(0x0040, 0x0552); Tag const SpecimenDescriptionTrial(0x0040, 0x0553); Tag const SpecimenUID(0x0040, 0x0554); Tag const AcquisitionContextSequence(0x0040, 0x0555); Tag const AcquisitionContextDescription(0x0040, 0x0556); Tag const SpecimenTypeCodeSequence(0x0040, 0x059a); Tag const SpecimenDescriptionSequence(0x0040, 0x0560); Tag const IssuerOfTheSpecimenIdentifierSequence(0x0040, 0x0562); Tag const SpecimenShortDescription(0x0040, 0x0600); Tag const SpecimenDetailedDescription(0x0040, 0x0602); Tag const SpecimenPreparationSequence(0x0040, 0x0610); Tag const SpecimenPreparationStepContentItemSequence(0x0040, 0x0612); Tag const SpecimenLocalizationContentItemSequence(0x0040, 0x0620); Tag const SlideIdentifier(0x0040, 0x06fa); Tag const WholeSlideMicroscopyImageFrameTypeSequence(0x0040, 0x0710); Tag const ImageCenterPointCoordinatesSequence(0x0040, 0x071a); Tag const XOffsetInSlideCoordinateSystem(0x0040, 0x072a); Tag const YOffsetInSlideCoordinateSystem(0x0040, 0x073a); Tag const ZOffsetInSlideCoordinateSystem(0x0040, 0x074a); Tag const PixelSpacingSequence(0x0040, 0x08d8); Tag const CoordinateSystemAxisCodeSequence(0x0040, 0x08da); Tag const MeasurementUnitsCodeSequence(0x0040, 0x08ea); Tag const VitalStainCodeSequenceTrial(0x0040, 0x09f8); Tag const RequestedProcedureID(0x0040, 0x1001); Tag const ReasonForTheRequestedProcedure(0x0040, 0x1002); Tag const RequestedProcedurePriority(0x0040, 0x1003); Tag const PatientTransportArrangements(0x0040, 0x1004); Tag const RequestedProcedureLocation(0x0040, 0x1005); Tag const PlacerOrderNumberProcedure(0x0040, 0x1006); Tag const FillerOrderNumberProcedure(0x0040, 0x1007); Tag const ConfidentialityCode(0x0040, 0x1008); Tag const ReportingPriority(0x0040, 0x1009); Tag const ReasonForRequestedProcedureCodeSequence(0x0040, 0x100a); Tag const NamesOfIntendedRecipientsOfResults(0x0040, 0x1010); Tag const IntendedRecipientsOfResultsIdentificationSequence(0x0040, 0x1011); Tag const ReasonForPerformedProcedureCodeSequence(0x0040, 0x1012); Tag const RequestedProcedureDescriptionTrial(0x0040, 0x1060); Tag const PersonIdentificationCodeSequence(0x0040, 0x1101); Tag const PersonAddress(0x0040, 0x1102); Tag const PersonTelephoneNumbers(0x0040, 0x1103); Tag const PersonTelecomInformation(0x0040, 0x1104); Tag const RequestedProcedureComments(0x0040, 0x1400); Tag const ReasonForTheImagingServiceRequest(0x0040, 0x2001); Tag const IssueDateOfImagingServiceRequest(0x0040, 0x2004); Tag const IssueTimeOfImagingServiceRequest(0x0040, 0x2005); Tag const PlacerOrderNumberImagingServiceRequestRetired(0x0040, 0x2006); Tag const FillerOrderNumberImagingServiceRequestRetired(0x0040, 0x2007); Tag const OrderEnteredBy(0x0040, 0x2008); Tag const OrderEntererLocation(0x0040, 0x2009); Tag const OrderCallbackPhoneNumber(0x0040, 0x2010); Tag const OrderCallbackTelecomInformation(0x0040, 0x2011); Tag const PlacerOrderNumberImagingServiceRequest(0x0040, 0x2016); Tag const FillerOrderNumberImagingServiceRequest(0x0040, 0x2017); Tag const ImagingServiceRequestComments(0x0040, 0x2400); Tag const ConfidentialityConstraintOnPatientDataDescription(0x0040, 0x3001); Tag const GeneralPurposeScheduledProcedureStepStatus(0x0040, 0x4001); Tag const GeneralPurposePerformedProcedureStepStatus(0x0040, 0x4002); Tag const GeneralPurposeScheduledProcedureStepPriority(0x0040, 0x4003); Tag const ScheduledProcessingApplicationsCodeSequence(0x0040, 0x4004); Tag const ScheduledProcedureStepStartDateTime(0x0040, 0x4005); Tag const MultipleCopiesFlag(0x0040, 0x4006); Tag const PerformedProcessingApplicationsCodeSequence(0x0040, 0x4007); Tag const ScheduledProcedureStepExpirationDateTime(0x0040, 0x4008); Tag const HumanPerformerCodeSequence(0x0040, 0x4009); Tag const ScheduledProcedureStepModificationDateTime(0x0040, 0x4010); Tag const ExpectedCompletionDateTime(0x0040, 0x4011); Tag const ResultingGeneralPurposePerformedProcedureStepsSequence(0x0040, 0x4015); Tag const ReferencedGeneralPurposeScheduledProcedureStepSequence(0x0040, 0x4016); Tag const ScheduledWorkitemCodeSequence(0x0040, 0x4018); Tag const PerformedWorkitemCodeSequence(0x0040, 0x4019); Tag const InputAvailabilityFlag(0x0040, 0x4020); Tag const InputInformationSequence(0x0040, 0x4021); Tag const RelevantInformationSequence(0x0040, 0x4022); Tag const ReferencedGeneralPurposeScheduledProcedureStepTransactionUID(0x0040, 0x4023); Tag const ScheduledStationNameCodeSequence(0x0040, 0x4025); Tag const ScheduledStationClassCodeSequence(0x0040, 0x4026); Tag const ScheduledStationGeographicLocationCodeSequence(0x0040, 0x4027); Tag const PerformedStationNameCodeSequence(0x0040, 0x4028); Tag const PerformedStationClassCodeSequence(0x0040, 0x4029); Tag const PerformedStationGeographicLocationCodeSequence(0x0040, 0x4030); Tag const RequestedSubsequentWorkitemCodeSequence(0x0040, 0x4031); Tag const NonDICOMOutputCodeSequence(0x0040, 0x4032); Tag const OutputInformationSequence(0x0040, 0x4033); Tag const ScheduledHumanPerformersSequence(0x0040, 0x4034); Tag const ActualHumanPerformersSequence(0x0040, 0x4035); Tag const HumanPerformerOrganization(0x0040, 0x4036); Tag const HumanPerformerName(0x0040, 0x4037); Tag const RawDataHandling(0x0040, 0x4040); Tag const InputReadinessState(0x0040, 0x4041); Tag const PerformedProcedureStepStartDateTime(0x0040, 0x4050); Tag const PerformedProcedureStepEndDateTime(0x0040, 0x4051); Tag const ProcedureStepCancellationDateTime(0x0040, 0x4052); Tag const OutputDestinationSequence(0x0040, 0x4070); Tag const DICOMStorageSequence(0x0040, 0x4071); Tag const STOWRSStorageSequence(0x0040, 0x4072); Tag const StorageURL(0x0040, 0x4073); Tag const XDSStorageSequence(0x0040, 0x4074); Tag const EntranceDoseInmGy(0x0040, 0x8302); Tag const EntranceDoseDerivation(0x0040, 0x8303); Tag const ParametricMapFrameTypeSequence(0x0040, 0x9092); Tag const ReferencedImageRealWorldValueMappingSequence(0x0040, 0x9094); Tag const RealWorldValueMappingSequence(0x0040, 0x9096); Tag const PixelValueMappingCodeSequence(0x0040, 0x9098); Tag const LUTLabel(0x0040, 0x9210); Tag const RealWorldValueLastValueMapped(0x0040, 0x9211); Tag const RealWorldValueLUTData(0x0040, 0x9212); Tag const DoubleFloatRealWorldValueLastValueMapped(0x0040, 0x9213); Tag const DoubleFloatRealWorldValueFirstValueMapped(0x0040, 0x9214); Tag const RealWorldValueFirstValueMapped(0x0040, 0x9216); Tag const QuantityDefinitionSequence(0x0040, 0x9220); Tag const RealWorldValueIntercept(0x0040, 0x9224); Tag const RealWorldValueSlope(0x0040, 0x9225); Tag const FindingsFlagTrial(0x0040, 0xa007); Tag const RelationshipType(0x0040, 0xa010); Tag const FindingsSequenceTrial(0x0040, 0xa020); Tag const FindingsGroupUIDTrial(0x0040, 0xa021); Tag const ReferencedFindingsGroupUIDTrial(0x0040, 0xa022); Tag const FindingsGroupRecordingDateTrial(0x0040, 0xa023); Tag const FindingsGroupRecordingTimeTrial(0x0040, 0xa024); Tag const FindingsSourceCategoryCodeSequenceTrial(0x0040, 0xa026); Tag const VerifyingOrganization(0x0040, 0xa027); Tag const DocumentingOrganizationIdentifierCodeSequenceTrial(0x0040, 0xa028); Tag const VerificationDateTime(0x0040, 0xa030); Tag const ObservationDateTime(0x0040, 0xa032); Tag const ValueType(0x0040, 0xa040); Tag const ConceptNameCodeSequence(0x0040, 0xa043); Tag const MeasurementPrecisionDescriptionTrial(0x0040, 0xa047); Tag const ContinuityOfContent(0x0040, 0xa050); Tag const UrgencyOrPriorityAlertsTrial(0x0040, 0xa057); Tag const SequencingIndicatorTrial(0x0040, 0xa060); Tag const DocumentIdentifierCodeSequenceTrial(0x0040, 0xa066); Tag const DocumentAuthorTrial(0x0040, 0xa067); Tag const DocumentAuthorIdentifierCodeSequenceTrial(0x0040, 0xa068); Tag const IdentifierCodeSequenceTrial(0x0040, 0xa070); Tag const VerifyingObserverSequence(0x0040, 0xa073); Tag const ObjectBinaryIdentifierTrial(0x0040, 0xa074); Tag const VerifyingObserverName(0x0040, 0xa075); Tag const DocumentingObserverIdentifierCodeSequenceTrial(0x0040, 0xa076); Tag const AuthorObserverSequence(0x0040, 0xa078); Tag const ParticipantSequence(0x0040, 0xa07a); Tag const CustodialOrganizationSequence(0x0040, 0xa07c); Tag const ParticipationType(0x0040, 0xa080); Tag const ParticipationDateTime(0x0040, 0xa082); Tag const ObserverType(0x0040, 0xa084); Tag const ProcedureIdentifierCodeSequenceTrial(0x0040, 0xa085); Tag const VerifyingObserverIdentificationCodeSequence(0x0040, 0xa088); Tag const ObjectDirectoryBinaryIdentifierTrial(0x0040, 0xa089); Tag const EquivalentCDADocumentSequence(0x0040, 0xa090); Tag const ReferencedWaveformChannels(0x0040, 0xa0b0); Tag const DateOfDocumentOrVerbalTransactionTrial(0x0040, 0xa110); Tag const TimeOfDocumentCreationOrVerbalTransactionTrial(0x0040, 0xa112); Tag const DateTime(0x0040, 0xa120); Tag const Date(0x0040, 0xa121); Tag const Time(0x0040, 0xa122); Tag const PersonName(0x0040, 0xa123); Tag const UID(0x0040, 0xa124); Tag const ReportStatusIDTrial(0x0040, 0xa125); Tag const TemporalRangeType(0x0040, 0xa130); Tag const ReferencedSamplePositions(0x0040, 0xa132); Tag const ReferencedFrameNumbers(0x0040, 0xa136); Tag const ReferencedTimeOffsets(0x0040, 0xa138); Tag const ReferencedDateTime(0x0040, 0xa13a); Tag const TextValue(0x0040, 0xa160); Tag const FloatingPointValue(0x0040, 0xa161); Tag const RationalNumeratorValue(0x0040, 0xa162); Tag const RationalDenominatorValue(0x0040, 0xa163); Tag const ObservationCategoryCodeSequenceTrial(0x0040, 0xa167); Tag const ConceptCodeSequence(0x0040, 0xa168); Tag const BibliographicCitationTrial(0x0040, 0xa16a); Tag const PurposeOfReferenceCodeSequence(0x0040, 0xa170); Tag const ObservationUID(0x0040, 0xa171); Tag const ReferencedObservationUIDTrial(0x0040, 0xa172); Tag const ReferencedObservationClassTrial(0x0040, 0xa173); Tag const ReferencedObjectObservationClassTrial(0x0040, 0xa174); Tag const AnnotationGroupNumber(0x0040, 0xa180); Tag const ObservationDateTrial(0x0040, 0xa192); Tag const ObservationTimeTrial(0x0040, 0xa193); Tag const MeasurementAutomationTrial(0x0040, 0xa194); Tag const ModifierCodeSequence(0x0040, 0xa195); Tag const IdentificationDescriptionTrial(0x0040, 0xa224); Tag const CoordinatesSetGeometricTypeTrial(0x0040, 0xa290); Tag const AlgorithmCodeSequenceTrial(0x0040, 0xa296); Tag const AlgorithmDescriptionTrial(0x0040, 0xa297); Tag const PixelCoordinatesSetTrial(0x0040, 0xa29a); Tag const MeasuredValueSequence(0x0040, 0xa300); Tag const NumericValueQualifierCodeSequence(0x0040, 0xa301); Tag const CurrentObserverTrial(0x0040, 0xa307); Tag const NumericValue(0x0040, 0xa30a); Tag const ReferencedAccessionSequenceTrial(0x0040, 0xa313); Tag const ReportStatusCommentTrial(0x0040, 0xa33a); Tag const ProcedureContextSequenceTrial(0x0040, 0xa340); Tag const VerbalSourceTrial(0x0040, 0xa352); Tag const AddressTrial(0x0040, 0xa353); Tag const TelephoneNumberTrial(0x0040, 0xa354); Tag const VerbalSourceIdentifierCodeSequenceTrial(0x0040, 0xa358); Tag const PredecessorDocumentsSequence(0x0040, 0xa360); Tag const ReferencedRequestSequence(0x0040, 0xa370); Tag const PerformedProcedureCodeSequence(0x0040, 0xa372); Tag const CurrentRequestedProcedureEvidenceSequence(0x0040, 0xa375); Tag const ReportDetailSequenceTrial(0x0040, 0xa380); Tag const PertinentOtherEvidenceSequence(0x0040, 0xa385); Tag const HL7StructuredDocumentReferenceSequence(0x0040, 0xa390); Tag const ObservationSubjectUIDTrial(0x0040, 0xa402); Tag const ObservationSubjectClassTrial(0x0040, 0xa403); Tag const ObservationSubjectTypeCodeSequenceTrial(0x0040, 0xa404); Tag const CompletionFlag(0x0040, 0xa491); Tag const CompletionFlagDescription(0x0040, 0xa492); Tag const VerificationFlag(0x0040, 0xa493); Tag const ArchiveRequested(0x0040, 0xa494); Tag const PreliminaryFlag(0x0040, 0xa496); Tag const ContentTemplateSequence(0x0040, 0xa504); Tag const IdenticalDocumentsSequence(0x0040, 0xa525); Tag const ObservationSubjectContextFlagTrial(0x0040, 0xa600); Tag const ObserverContextFlagTrial(0x0040, 0xa601); Tag const ProcedureContextFlagTrial(0x0040, 0xa603); Tag const ContentSequence(0x0040, 0xa730); Tag const RelationshipSequenceTrial(0x0040, 0xa731); Tag const RelationshipTypeCodeSequenceTrial(0x0040, 0xa732); Tag const LanguageCodeSequenceTrial(0x0040, 0xa744); Tag const UniformResourceLocatorTrial(0x0040, 0xa992); Tag const WaveformAnnotationSequence(0x0040, 0xb020); Tag const TemplateIdentifier(0x0040, 0xdb00); Tag const TemplateVersion(0x0040, 0xdb06); Tag const TemplateLocalVersion(0x0040, 0xdb07); Tag const TemplateExtensionFlag(0x0040, 0xdb0b); Tag const TemplateExtensionOrganizationUID(0x0040, 0xdb0c); Tag const TemplateExtensionCreatorUID(0x0040, 0xdb0d); Tag const ReferencedContentItemIdentifier(0x0040, 0xdb73); Tag const HL7InstanceIdentifier(0x0040, 0xe001); Tag const HL7DocumentEffectiveTime(0x0040, 0xe004); Tag const HL7DocumentTypeCodeSequence(0x0040, 0xe006); Tag const DocumentClassCodeSequence(0x0040, 0xe008); Tag const RetrieveURI(0x0040, 0xe010); Tag const RetrieveLocationUID(0x0040, 0xe011); Tag const TypeOfInstances(0x0040, 0xe020); Tag const DICOMRetrievalSequence(0x0040, 0xe021); Tag const DICOMMediaRetrievalSequence(0x0040, 0xe022); Tag const WADORetrievalSequence(0x0040, 0xe023); Tag const XDSRetrievalSequence(0x0040, 0xe024); Tag const WADORSRetrievalSequence(0x0040, 0xe025); Tag const RepositoryUniqueID(0x0040, 0xe030); Tag const HomeCommunityID(0x0040, 0xe031); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0040odil-0.11.0/src/odil/registry_0042.cpp000066400000000000000000000036451362244656000172770ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0042( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0042, 0x0010), ElementsDictionaryEntry("Document Title", "DocumentTitle", "ST", "1")); public_dictionary.emplace(Tag(0x0042, 0x0011), ElementsDictionaryEntry("Encapsulated Document", "EncapsulatedDocument", "OB", "1")); public_dictionary.emplace(Tag(0x0042, 0x0012), ElementsDictionaryEntry("MIME Type of Encapsulated Document", "MIMETypeOfEncapsulatedDocument", "LO", "1")); public_dictionary.emplace(Tag(0x0042, 0x0013), ElementsDictionaryEntry("Source Instance Sequence", "SourceInstanceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0042, 0x0014), ElementsDictionaryEntry("List of MIME Types", "ListOfMIMETypes", "LO", "1-n")); public_dictionary.emplace(Tag(0x0042, 0x0015), ElementsDictionaryEntry("Encapsulated Document Length", "EncapsulatedDocumentLength", "UL", "1")); public_tags.emplace("DocumentTitle", Tag(0x0042, 0x0010)); public_tags.emplace("EncapsulatedDocument", Tag(0x0042, 0x0011)); public_tags.emplace("MIMETypeOfEncapsulatedDocument", Tag(0x0042, 0x0012)); public_tags.emplace("SourceInstanceSequence", Tag(0x0042, 0x0013)); public_tags.emplace("ListOfMIMETypes", Tag(0x0042, 0x0014)); public_tags.emplace("EncapsulatedDocumentLength", Tag(0x0042, 0x0015)); } } }odil-0.11.0/src/odil/registry_0042.h000066400000000000000000000017251362244656000167410ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0042 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0042 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const DocumentTitle(0x0042, 0x0010); Tag const EncapsulatedDocument(0x0042, 0x0011); Tag const MIMETypeOfEncapsulatedDocument(0x0042, 0x0012); Tag const SourceInstanceSequence(0x0042, 0x0013); Tag const ListOfMIMETypes(0x0042, 0x0014); Tag const EncapsulatedDocumentLength(0x0042, 0x0015); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0042odil-0.11.0/src/odil/registry_0044.cpp000066400000000000000000000140751362244656000173000ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0044( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0044, 0x0001), ElementsDictionaryEntry("Product Package Identifier", "ProductPackageIdentifier", "ST", "1")); public_dictionary.emplace(Tag(0x0044, 0x0002), ElementsDictionaryEntry("Substance Administration Approval", "SubstanceAdministrationApproval", "CS", "1")); public_dictionary.emplace(Tag(0x0044, 0x0003), ElementsDictionaryEntry("Approval Status Further Description", "ApprovalStatusFurtherDescription", "LT", "1")); public_dictionary.emplace(Tag(0x0044, 0x0004), ElementsDictionaryEntry("Approval Status DateTime", "ApprovalStatusDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0044, 0x0007), ElementsDictionaryEntry("Product Type Code Sequence", "ProductTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0044, 0x0008), ElementsDictionaryEntry("Product Name", "ProductName", "LO", "1-n")); public_dictionary.emplace(Tag(0x0044, 0x0009), ElementsDictionaryEntry("Product Description", "ProductDescription", "LT", "1")); public_dictionary.emplace(Tag(0x0044, 0x000a), ElementsDictionaryEntry("Product Lot Identifier", "ProductLotIdentifier", "LO", "1")); public_dictionary.emplace(Tag(0x0044, 0x000b), ElementsDictionaryEntry("Product Expiration DateTime", "ProductExpirationDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0044, 0x0010), ElementsDictionaryEntry("Substance Administration DateTime", "SubstanceAdministrationDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0044, 0x0011), ElementsDictionaryEntry("Substance Administration Notes", "SubstanceAdministrationNotes", "LO", "1")); public_dictionary.emplace(Tag(0x0044, 0x0012), ElementsDictionaryEntry("Substance Administration Device ID", "SubstanceAdministrationDeviceID", "LO", "1")); public_dictionary.emplace(Tag(0x0044, 0x0013), ElementsDictionaryEntry("Product Parameter Sequence", "ProductParameterSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0044, 0x0019), ElementsDictionaryEntry("Substance Administration Parameter Sequence", "SubstanceAdministrationParameterSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0044, 0x0100), ElementsDictionaryEntry("Approval Sequence", "ApprovalSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0044, 0x0101), ElementsDictionaryEntry("Assertion Code Sequence", "AssertionCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0044, 0x0102), ElementsDictionaryEntry("Assertion UID", "AssertionUID", "UI", "1")); public_dictionary.emplace(Tag(0x0044, 0x0103), ElementsDictionaryEntry("Asserter Identification Sequence", "AsserterIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0044, 0x0104), ElementsDictionaryEntry("Assertion DateTime", "AssertionDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0044, 0x0105), ElementsDictionaryEntry("Assertion Expiration DateTime", "AssertionExpirationDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0044, 0x0106), ElementsDictionaryEntry("Assertion Comments", "AssertionComments", "UT", "1")); public_dictionary.emplace(Tag(0x0044, 0x0107), ElementsDictionaryEntry("Related Assertion Sequence", "RelatedAssertionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0044, 0x0108), ElementsDictionaryEntry("Referenced Assertion UID", "ReferencedAssertionUID", "UI", "1")); public_dictionary.emplace(Tag(0x0044, 0x0109), ElementsDictionaryEntry("Approval Subject Sequence", "ApprovalSubjectSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0044, 0x010a), ElementsDictionaryEntry("Organizational Role Code Sequence", "OrganizationalRoleCodeSequence", "SQ", "1")); public_tags.emplace("ProductPackageIdentifier", Tag(0x0044, 0x0001)); public_tags.emplace("SubstanceAdministrationApproval", Tag(0x0044, 0x0002)); public_tags.emplace("ApprovalStatusFurtherDescription", Tag(0x0044, 0x0003)); public_tags.emplace("ApprovalStatusDateTime", Tag(0x0044, 0x0004)); public_tags.emplace("ProductTypeCodeSequence", Tag(0x0044, 0x0007)); public_tags.emplace("ProductName", Tag(0x0044, 0x0008)); public_tags.emplace("ProductDescription", Tag(0x0044, 0x0009)); public_tags.emplace("ProductLotIdentifier", Tag(0x0044, 0x000a)); public_tags.emplace("ProductExpirationDateTime", Tag(0x0044, 0x000b)); public_tags.emplace("SubstanceAdministrationDateTime", Tag(0x0044, 0x0010)); public_tags.emplace("SubstanceAdministrationNotes", Tag(0x0044, 0x0011)); public_tags.emplace("SubstanceAdministrationDeviceID", Tag(0x0044, 0x0012)); public_tags.emplace("ProductParameterSequence", Tag(0x0044, 0x0013)); public_tags.emplace("SubstanceAdministrationParameterSequence", Tag(0x0044, 0x0019)); public_tags.emplace("ApprovalSequence", Tag(0x0044, 0x0100)); public_tags.emplace("AssertionCodeSequence", Tag(0x0044, 0x0101)); public_tags.emplace("AssertionUID", Tag(0x0044, 0x0102)); public_tags.emplace("AsserterIdentificationSequence", Tag(0x0044, 0x0103)); public_tags.emplace("AssertionDateTime", Tag(0x0044, 0x0104)); public_tags.emplace("AssertionExpirationDateTime", Tag(0x0044, 0x0105)); public_tags.emplace("AssertionComments", Tag(0x0044, 0x0106)); public_tags.emplace("RelatedAssertionSequence", Tag(0x0044, 0x0107)); public_tags.emplace("ReferencedAssertionUID", Tag(0x0044, 0x0108)); public_tags.emplace("ApprovalSubjectSequence", Tag(0x0044, 0x0109)); public_tags.emplace("OrganizationalRoleCodeSequence", Tag(0x0044, 0x010a)); } } }odil-0.11.0/src/odil/registry_0044.h000066400000000000000000000037021362244656000167400ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0044 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0044 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ProductPackageIdentifier(0x0044, 0x0001); Tag const SubstanceAdministrationApproval(0x0044, 0x0002); Tag const ApprovalStatusFurtherDescription(0x0044, 0x0003); Tag const ApprovalStatusDateTime(0x0044, 0x0004); Tag const ProductTypeCodeSequence(0x0044, 0x0007); Tag const ProductName(0x0044, 0x0008); Tag const ProductDescription(0x0044, 0x0009); Tag const ProductLotIdentifier(0x0044, 0x000a); Tag const ProductExpirationDateTime(0x0044, 0x000b); Tag const SubstanceAdministrationDateTime(0x0044, 0x0010); Tag const SubstanceAdministrationNotes(0x0044, 0x0011); Tag const SubstanceAdministrationDeviceID(0x0044, 0x0012); Tag const ProductParameterSequence(0x0044, 0x0013); Tag const SubstanceAdministrationParameterSequence(0x0044, 0x0019); Tag const ApprovalSequence(0x0044, 0x0100); Tag const AssertionCodeSequence(0x0044, 0x0101); Tag const AssertionUID(0x0044, 0x0102); Tag const AsserterIdentificationSequence(0x0044, 0x0103); Tag const AssertionDateTime(0x0044, 0x0104); Tag const AssertionExpirationDateTime(0x0044, 0x0105); Tag const AssertionComments(0x0044, 0x0106); Tag const RelatedAssertionSequence(0x0044, 0x0107); Tag const ReferencedAssertionUID(0x0044, 0x0108); Tag const ApprovalSubjectSequence(0x0044, 0x0109); Tag const OrganizationalRoleCodeSequence(0x0044, 0x010a); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0044odil-0.11.0/src/odil/registry_0046.cpp000066400000000000000000000467331362244656000173100ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0046( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0046, 0x0012), ElementsDictionaryEntry("Lens Description", "LensDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0046, 0x0014), ElementsDictionaryEntry("Right Lens Sequence", "RightLensSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0015), ElementsDictionaryEntry("Left Lens Sequence", "LeftLensSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0016), ElementsDictionaryEntry("Unspecified Laterality Lens Sequence", "UnspecifiedLateralityLensSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0018), ElementsDictionaryEntry("Cylinder Sequence", "CylinderSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0028), ElementsDictionaryEntry("Prism Sequence", "PrismSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0030), ElementsDictionaryEntry("Horizontal Prism Power", "HorizontalPrismPower", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0032), ElementsDictionaryEntry("Horizontal Prism Base", "HorizontalPrismBase", "CS", "1")); public_dictionary.emplace(Tag(0x0046, 0x0034), ElementsDictionaryEntry("Vertical Prism Power", "VerticalPrismPower", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0036), ElementsDictionaryEntry("Vertical Prism Base", "VerticalPrismBase", "CS", "1")); public_dictionary.emplace(Tag(0x0046, 0x0038), ElementsDictionaryEntry("Lens Segment Type", "LensSegmentType", "CS", "1")); public_dictionary.emplace(Tag(0x0046, 0x0040), ElementsDictionaryEntry("Optical Transmittance", "OpticalTransmittance", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0042), ElementsDictionaryEntry("Channel Width", "ChannelWidth", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0044), ElementsDictionaryEntry("Pupil Size", "PupilSize", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0046), ElementsDictionaryEntry("Corneal Size", "CornealSize", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0047), ElementsDictionaryEntry("Corneal Size Sequence", "CornealSizeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0050), ElementsDictionaryEntry("Autorefraction Right Eye Sequence", "AutorefractionRightEyeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0052), ElementsDictionaryEntry("Autorefraction Left Eye Sequence", "AutorefractionLeftEyeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0060), ElementsDictionaryEntry("Distance Pupillary Distance", "DistancePupillaryDistance", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0062), ElementsDictionaryEntry("Near Pupillary Distance", "NearPupillaryDistance", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0063), ElementsDictionaryEntry("Intermediate Pupillary Distance", "IntermediatePupillaryDistance", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0064), ElementsDictionaryEntry("Other Pupillary Distance", "OtherPupillaryDistance", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0070), ElementsDictionaryEntry("Keratometry Right Eye Sequence", "KeratometryRightEyeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0071), ElementsDictionaryEntry("Keratometry Left Eye Sequence", "KeratometryLeftEyeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0074), ElementsDictionaryEntry("Steep Keratometric Axis Sequence", "SteepKeratometricAxisSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0075), ElementsDictionaryEntry("Radius of Curvature", "RadiusOfCurvature", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0076), ElementsDictionaryEntry("Keratometric Power", "KeratometricPower", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0077), ElementsDictionaryEntry("Keratometric Axis", "KeratometricAxis", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0080), ElementsDictionaryEntry("Flat Keratometric Axis Sequence", "FlatKeratometricAxisSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0092), ElementsDictionaryEntry("Background Color", "BackgroundColor", "CS", "1")); public_dictionary.emplace(Tag(0x0046, 0x0094), ElementsDictionaryEntry("Optotype", "Optotype", "CS", "1")); public_dictionary.emplace(Tag(0x0046, 0x0095), ElementsDictionaryEntry("Optotype Presentation", "OptotypePresentation", "CS", "1")); public_dictionary.emplace(Tag(0x0046, 0x0097), ElementsDictionaryEntry("Subjective Refraction Right Eye Sequence", "SubjectiveRefractionRightEyeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0098), ElementsDictionaryEntry("Subjective Refraction Left Eye Sequence", "SubjectiveRefractionLeftEyeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0100), ElementsDictionaryEntry("Add Near Sequence", "AddNearSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0101), ElementsDictionaryEntry("Add Intermediate Sequence", "AddIntermediateSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0102), ElementsDictionaryEntry("Add Other Sequence", "AddOtherSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0104), ElementsDictionaryEntry("Add Power", "AddPower", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0106), ElementsDictionaryEntry("Viewing Distance", "ViewingDistance", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0110), ElementsDictionaryEntry("Cornea Measurements Sequence", "CorneaMeasurementsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0111), ElementsDictionaryEntry("Source of Cornea Measurement Data Code Sequence", "SourceOfCorneaMeasurementDataCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0112), ElementsDictionaryEntry("Steep Corneal Axis Sequence", "SteepCornealAxisSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0113), ElementsDictionaryEntry("Flat Corneal Axis Sequence", "FlatCornealAxisSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0114), ElementsDictionaryEntry("Corneal Power", "CornealPower", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0115), ElementsDictionaryEntry("Corneal Axis", "CornealAxis", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0116), ElementsDictionaryEntry("Cornea Measurement Method Code Sequence", "CorneaMeasurementMethodCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0117), ElementsDictionaryEntry("Refractive Index of Cornea", "RefractiveIndexOfCornea", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0118), ElementsDictionaryEntry("Refractive Index of Aqueous Humor", "RefractiveIndexOfAqueousHumor", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0121), ElementsDictionaryEntry("Visual Acuity Type Code Sequence", "VisualAcuityTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0122), ElementsDictionaryEntry("Visual Acuity Right Eye Sequence", "VisualAcuityRightEyeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0123), ElementsDictionaryEntry("Visual Acuity Left Eye Sequence", "VisualAcuityLeftEyeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0124), ElementsDictionaryEntry("Visual Acuity Both Eyes Open Sequence", "VisualAcuityBothEyesOpenSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0125), ElementsDictionaryEntry("Viewing Distance Type", "ViewingDistanceType", "CS", "1")); public_dictionary.emplace(Tag(0x0046, 0x0135), ElementsDictionaryEntry("Visual Acuity Modifiers", "VisualAcuityModifiers", "SS", "2")); public_dictionary.emplace(Tag(0x0046, 0x0137), ElementsDictionaryEntry("Decimal Visual Acuity", "DecimalVisualAcuity", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0139), ElementsDictionaryEntry("Optotype Detailed Definition", "OptotypeDetailedDefinition", "LO", "1")); public_dictionary.emplace(Tag(0x0046, 0x0145), ElementsDictionaryEntry("Referenced Refractive Measurements Sequence", "ReferencedRefractiveMeasurementsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0146), ElementsDictionaryEntry("Sphere Power", "SpherePower", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0147), ElementsDictionaryEntry("Cylinder Power", "CylinderPower", "FD", "1")); public_dictionary.emplace(Tag(0x0046, 0x0201), ElementsDictionaryEntry("Corneal Topography Surface", "CornealTopographySurface", "CS", "1")); public_dictionary.emplace(Tag(0x0046, 0x0202), ElementsDictionaryEntry("Corneal Vertex Location", "CornealVertexLocation", "FL", "2")); public_dictionary.emplace(Tag(0x0046, 0x0203), ElementsDictionaryEntry("Pupil Centroid X-Coordinate", "PupilCentroidXCoordinate", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0204), ElementsDictionaryEntry("Pupil Centroid Y-Coordinate", "PupilCentroidYCoordinate", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0205), ElementsDictionaryEntry("Equivalent Pupil Radius", "EquivalentPupilRadius", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0207), ElementsDictionaryEntry("Corneal Topography Map Type Code Sequence", "CornealTopographyMapTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0208), ElementsDictionaryEntry("Vertices of the Outline of Pupil", "VerticesOfTheOutlineOfPupil", "IS", "2-2n")); public_dictionary.emplace(Tag(0x0046, 0x0210), ElementsDictionaryEntry("Corneal Topography Mapping Normals Sequence", "CornealTopographyMappingNormalsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0211), ElementsDictionaryEntry("Maximum Corneal Curvature Sequence", "MaximumCornealCurvatureSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0212), ElementsDictionaryEntry("Maximum Corneal Curvature", "MaximumCornealCurvature", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0213), ElementsDictionaryEntry("Maximum Corneal Curvature Location", "MaximumCornealCurvatureLocation", "FL", "2")); public_dictionary.emplace(Tag(0x0046, 0x0215), ElementsDictionaryEntry("Minimum Keratometric Sequence", "MinimumKeratometricSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0218), ElementsDictionaryEntry("Simulated Keratometric Cylinder Sequence", "SimulatedKeratometricCylinderSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0220), ElementsDictionaryEntry("Average Corneal Power", "AverageCornealPower", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0224), ElementsDictionaryEntry("Corneal I-S Value", "CornealISValue", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0227), ElementsDictionaryEntry("Analyzed Area", "AnalyzedArea", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0230), ElementsDictionaryEntry("Surface Regularity Index", "SurfaceRegularityIndex", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0232), ElementsDictionaryEntry("Surface Asymmetry Index", "SurfaceAsymmetryIndex", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0234), ElementsDictionaryEntry("Corneal Eccentricity Index", "CornealEccentricityIndex", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0236), ElementsDictionaryEntry("Keratoconus Prediction Index", "KeratoconusPredictionIndex", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0238), ElementsDictionaryEntry("Decimal Potential Visual Acuity", "DecimalPotentialVisualAcuity", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0242), ElementsDictionaryEntry("Corneal Topography Map Quality Evaluation", "CornealTopographyMapQualityEvaluation", "CS", "1")); public_dictionary.emplace(Tag(0x0046, 0x0244), ElementsDictionaryEntry("Source Image Corneal Processed Data Sequence", "SourceImageCornealProcessedDataSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0046, 0x0247), ElementsDictionaryEntry("Corneal Point Location", "CornealPointLocation", "FL", "3")); public_dictionary.emplace(Tag(0x0046, 0x0248), ElementsDictionaryEntry("Corneal Point Estimated", "CornealPointEstimated", "CS", "1")); public_dictionary.emplace(Tag(0x0046, 0x0249), ElementsDictionaryEntry("Axial Power", "AxialPower", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0250), ElementsDictionaryEntry("Tangential Power", "TangentialPower", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0251), ElementsDictionaryEntry("Refractive Power", "RefractivePower", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0252), ElementsDictionaryEntry("Relative Elevation", "RelativeElevation", "FL", "1")); public_dictionary.emplace(Tag(0x0046, 0x0253), ElementsDictionaryEntry("Corneal Wavefront", "CornealWavefront", "FL", "1")); public_tags.emplace("LensDescription", Tag(0x0046, 0x0012)); public_tags.emplace("RightLensSequence", Tag(0x0046, 0x0014)); public_tags.emplace("LeftLensSequence", Tag(0x0046, 0x0015)); public_tags.emplace("UnspecifiedLateralityLensSequence", Tag(0x0046, 0x0016)); public_tags.emplace("CylinderSequence", Tag(0x0046, 0x0018)); public_tags.emplace("PrismSequence", Tag(0x0046, 0x0028)); public_tags.emplace("HorizontalPrismPower", Tag(0x0046, 0x0030)); public_tags.emplace("HorizontalPrismBase", Tag(0x0046, 0x0032)); public_tags.emplace("VerticalPrismPower", Tag(0x0046, 0x0034)); public_tags.emplace("VerticalPrismBase", Tag(0x0046, 0x0036)); public_tags.emplace("LensSegmentType", Tag(0x0046, 0x0038)); public_tags.emplace("OpticalTransmittance", Tag(0x0046, 0x0040)); public_tags.emplace("ChannelWidth", Tag(0x0046, 0x0042)); public_tags.emplace("PupilSize", Tag(0x0046, 0x0044)); public_tags.emplace("CornealSize", Tag(0x0046, 0x0046)); public_tags.emplace("CornealSizeSequence", Tag(0x0046, 0x0047)); public_tags.emplace("AutorefractionRightEyeSequence", Tag(0x0046, 0x0050)); public_tags.emplace("AutorefractionLeftEyeSequence", Tag(0x0046, 0x0052)); public_tags.emplace("DistancePupillaryDistance", Tag(0x0046, 0x0060)); public_tags.emplace("NearPupillaryDistance", Tag(0x0046, 0x0062)); public_tags.emplace("IntermediatePupillaryDistance", Tag(0x0046, 0x0063)); public_tags.emplace("OtherPupillaryDistance", Tag(0x0046, 0x0064)); public_tags.emplace("KeratometryRightEyeSequence", Tag(0x0046, 0x0070)); public_tags.emplace("KeratometryLeftEyeSequence", Tag(0x0046, 0x0071)); public_tags.emplace("SteepKeratometricAxisSequence", Tag(0x0046, 0x0074)); public_tags.emplace("RadiusOfCurvature", Tag(0x0046, 0x0075)); public_tags.emplace("KeratometricPower", Tag(0x0046, 0x0076)); public_tags.emplace("KeratometricAxis", Tag(0x0046, 0x0077)); public_tags.emplace("FlatKeratometricAxisSequence", Tag(0x0046, 0x0080)); public_tags.emplace("BackgroundColor", Tag(0x0046, 0x0092)); public_tags.emplace("Optotype", Tag(0x0046, 0x0094)); public_tags.emplace("OptotypePresentation", Tag(0x0046, 0x0095)); public_tags.emplace("SubjectiveRefractionRightEyeSequence", Tag(0x0046, 0x0097)); public_tags.emplace("SubjectiveRefractionLeftEyeSequence", Tag(0x0046, 0x0098)); public_tags.emplace("AddNearSequence", Tag(0x0046, 0x0100)); public_tags.emplace("AddIntermediateSequence", Tag(0x0046, 0x0101)); public_tags.emplace("AddOtherSequence", Tag(0x0046, 0x0102)); public_tags.emplace("AddPower", Tag(0x0046, 0x0104)); public_tags.emplace("ViewingDistance", Tag(0x0046, 0x0106)); public_tags.emplace("CorneaMeasurementsSequence", Tag(0x0046, 0x0110)); public_tags.emplace("SourceOfCorneaMeasurementDataCodeSequence", Tag(0x0046, 0x0111)); public_tags.emplace("SteepCornealAxisSequence", Tag(0x0046, 0x0112)); public_tags.emplace("FlatCornealAxisSequence", Tag(0x0046, 0x0113)); public_tags.emplace("CornealPower", Tag(0x0046, 0x0114)); public_tags.emplace("CornealAxis", Tag(0x0046, 0x0115)); public_tags.emplace("CorneaMeasurementMethodCodeSequence", Tag(0x0046, 0x0116)); public_tags.emplace("RefractiveIndexOfCornea", Tag(0x0046, 0x0117)); public_tags.emplace("RefractiveIndexOfAqueousHumor", Tag(0x0046, 0x0118)); public_tags.emplace("VisualAcuityTypeCodeSequence", Tag(0x0046, 0x0121)); public_tags.emplace("VisualAcuityRightEyeSequence", Tag(0x0046, 0x0122)); public_tags.emplace("VisualAcuityLeftEyeSequence", Tag(0x0046, 0x0123)); public_tags.emplace("VisualAcuityBothEyesOpenSequence", Tag(0x0046, 0x0124)); public_tags.emplace("ViewingDistanceType", Tag(0x0046, 0x0125)); public_tags.emplace("VisualAcuityModifiers", Tag(0x0046, 0x0135)); public_tags.emplace("DecimalVisualAcuity", Tag(0x0046, 0x0137)); public_tags.emplace("OptotypeDetailedDefinition", Tag(0x0046, 0x0139)); public_tags.emplace("ReferencedRefractiveMeasurementsSequence", Tag(0x0046, 0x0145)); public_tags.emplace("SpherePower", Tag(0x0046, 0x0146)); public_tags.emplace("CylinderPower", Tag(0x0046, 0x0147)); public_tags.emplace("CornealTopographySurface", Tag(0x0046, 0x0201)); public_tags.emplace("CornealVertexLocation", Tag(0x0046, 0x0202)); public_tags.emplace("PupilCentroidXCoordinate", Tag(0x0046, 0x0203)); public_tags.emplace("PupilCentroidYCoordinate", Tag(0x0046, 0x0204)); public_tags.emplace("EquivalentPupilRadius", Tag(0x0046, 0x0205)); public_tags.emplace("CornealTopographyMapTypeCodeSequence", Tag(0x0046, 0x0207)); public_tags.emplace("VerticesOfTheOutlineOfPupil", Tag(0x0046, 0x0208)); public_tags.emplace("CornealTopographyMappingNormalsSequence", Tag(0x0046, 0x0210)); public_tags.emplace("MaximumCornealCurvatureSequence", Tag(0x0046, 0x0211)); public_tags.emplace("MaximumCornealCurvature", Tag(0x0046, 0x0212)); public_tags.emplace("MaximumCornealCurvatureLocation", Tag(0x0046, 0x0213)); public_tags.emplace("MinimumKeratometricSequence", Tag(0x0046, 0x0215)); public_tags.emplace("SimulatedKeratometricCylinderSequence", Tag(0x0046, 0x0218)); public_tags.emplace("AverageCornealPower", Tag(0x0046, 0x0220)); public_tags.emplace("CornealISValue", Tag(0x0046, 0x0224)); public_tags.emplace("AnalyzedArea", Tag(0x0046, 0x0227)); public_tags.emplace("SurfaceRegularityIndex", Tag(0x0046, 0x0230)); public_tags.emplace("SurfaceAsymmetryIndex", Tag(0x0046, 0x0232)); public_tags.emplace("CornealEccentricityIndex", Tag(0x0046, 0x0234)); public_tags.emplace("KeratoconusPredictionIndex", Tag(0x0046, 0x0236)); public_tags.emplace("DecimalPotentialVisualAcuity", Tag(0x0046, 0x0238)); public_tags.emplace("CornealTopographyMapQualityEvaluation", Tag(0x0046, 0x0242)); public_tags.emplace("SourceImageCornealProcessedDataSequence", Tag(0x0046, 0x0244)); public_tags.emplace("CornealPointLocation", Tag(0x0046, 0x0247)); public_tags.emplace("CornealPointEstimated", Tag(0x0046, 0x0248)); public_tags.emplace("AxialPower", Tag(0x0046, 0x0249)); public_tags.emplace("TangentialPower", Tag(0x0046, 0x0250)); public_tags.emplace("RefractivePower", Tag(0x0046, 0x0251)); public_tags.emplace("RelativeElevation", Tag(0x0046, 0x0252)); public_tags.emplace("CornealWavefront", Tag(0x0046, 0x0253)); } } }odil-0.11.0/src/odil/registry_0046.h000066400000000000000000000120551362244656000167430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0046 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0046 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const LensDescription(0x0046, 0x0012); Tag const RightLensSequence(0x0046, 0x0014); Tag const LeftLensSequence(0x0046, 0x0015); Tag const UnspecifiedLateralityLensSequence(0x0046, 0x0016); Tag const CylinderSequence(0x0046, 0x0018); Tag const PrismSequence(0x0046, 0x0028); Tag const HorizontalPrismPower(0x0046, 0x0030); Tag const HorizontalPrismBase(0x0046, 0x0032); Tag const VerticalPrismPower(0x0046, 0x0034); Tag const VerticalPrismBase(0x0046, 0x0036); Tag const LensSegmentType(0x0046, 0x0038); Tag const OpticalTransmittance(0x0046, 0x0040); Tag const ChannelWidth(0x0046, 0x0042); Tag const PupilSize(0x0046, 0x0044); Tag const CornealSize(0x0046, 0x0046); Tag const CornealSizeSequence(0x0046, 0x0047); Tag const AutorefractionRightEyeSequence(0x0046, 0x0050); Tag const AutorefractionLeftEyeSequence(0x0046, 0x0052); Tag const DistancePupillaryDistance(0x0046, 0x0060); Tag const NearPupillaryDistance(0x0046, 0x0062); Tag const IntermediatePupillaryDistance(0x0046, 0x0063); Tag const OtherPupillaryDistance(0x0046, 0x0064); Tag const KeratometryRightEyeSequence(0x0046, 0x0070); Tag const KeratometryLeftEyeSequence(0x0046, 0x0071); Tag const SteepKeratometricAxisSequence(0x0046, 0x0074); Tag const RadiusOfCurvature(0x0046, 0x0075); Tag const KeratometricPower(0x0046, 0x0076); Tag const KeratometricAxis(0x0046, 0x0077); Tag const FlatKeratometricAxisSequence(0x0046, 0x0080); Tag const BackgroundColor(0x0046, 0x0092); Tag const Optotype(0x0046, 0x0094); Tag const OptotypePresentation(0x0046, 0x0095); Tag const SubjectiveRefractionRightEyeSequence(0x0046, 0x0097); Tag const SubjectiveRefractionLeftEyeSequence(0x0046, 0x0098); Tag const AddNearSequence(0x0046, 0x0100); Tag const AddIntermediateSequence(0x0046, 0x0101); Tag const AddOtherSequence(0x0046, 0x0102); Tag const AddPower(0x0046, 0x0104); Tag const ViewingDistance(0x0046, 0x0106); Tag const CorneaMeasurementsSequence(0x0046, 0x0110); Tag const SourceOfCorneaMeasurementDataCodeSequence(0x0046, 0x0111); Tag const SteepCornealAxisSequence(0x0046, 0x0112); Tag const FlatCornealAxisSequence(0x0046, 0x0113); Tag const CornealPower(0x0046, 0x0114); Tag const CornealAxis(0x0046, 0x0115); Tag const CorneaMeasurementMethodCodeSequence(0x0046, 0x0116); Tag const RefractiveIndexOfCornea(0x0046, 0x0117); Tag const RefractiveIndexOfAqueousHumor(0x0046, 0x0118); Tag const VisualAcuityTypeCodeSequence(0x0046, 0x0121); Tag const VisualAcuityRightEyeSequence(0x0046, 0x0122); Tag const VisualAcuityLeftEyeSequence(0x0046, 0x0123); Tag const VisualAcuityBothEyesOpenSequence(0x0046, 0x0124); Tag const ViewingDistanceType(0x0046, 0x0125); Tag const VisualAcuityModifiers(0x0046, 0x0135); Tag const DecimalVisualAcuity(0x0046, 0x0137); Tag const OptotypeDetailedDefinition(0x0046, 0x0139); Tag const ReferencedRefractiveMeasurementsSequence(0x0046, 0x0145); Tag const SpherePower(0x0046, 0x0146); Tag const CylinderPower(0x0046, 0x0147); Tag const CornealTopographySurface(0x0046, 0x0201); Tag const CornealVertexLocation(0x0046, 0x0202); Tag const PupilCentroidXCoordinate(0x0046, 0x0203); Tag const PupilCentroidYCoordinate(0x0046, 0x0204); Tag const EquivalentPupilRadius(0x0046, 0x0205); Tag const CornealTopographyMapTypeCodeSequence(0x0046, 0x0207); Tag const VerticesOfTheOutlineOfPupil(0x0046, 0x0208); Tag const CornealTopographyMappingNormalsSequence(0x0046, 0x0210); Tag const MaximumCornealCurvatureSequence(0x0046, 0x0211); Tag const MaximumCornealCurvature(0x0046, 0x0212); Tag const MaximumCornealCurvatureLocation(0x0046, 0x0213); Tag const MinimumKeratometricSequence(0x0046, 0x0215); Tag const SimulatedKeratometricCylinderSequence(0x0046, 0x0218); Tag const AverageCornealPower(0x0046, 0x0220); Tag const CornealISValue(0x0046, 0x0224); Tag const AnalyzedArea(0x0046, 0x0227); Tag const SurfaceRegularityIndex(0x0046, 0x0230); Tag const SurfaceAsymmetryIndex(0x0046, 0x0232); Tag const CornealEccentricityIndex(0x0046, 0x0234); Tag const KeratoconusPredictionIndex(0x0046, 0x0236); Tag const DecimalPotentialVisualAcuity(0x0046, 0x0238); Tag const CornealTopographyMapQualityEvaluation(0x0046, 0x0242); Tag const SourceImageCornealProcessedDataSequence(0x0046, 0x0244); Tag const CornealPointLocation(0x0046, 0x0247); Tag const CornealPointEstimated(0x0046, 0x0248); Tag const AxialPower(0x0046, 0x0249); Tag const TangentialPower(0x0046, 0x0250); Tag const RefractivePower(0x0046, 0x0251); Tag const RelativeElevation(0x0046, 0x0252); Tag const CornealWavefront(0x0046, 0x0253); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0046odil-0.11.0/src/odil/registry_0048.cpp000066400000000000000000000176351362244656000173110ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0048( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0048, 0x0001), ElementsDictionaryEntry("Imaged Volume Width", "ImagedVolumeWidth", "FL", "1")); public_dictionary.emplace(Tag(0x0048, 0x0002), ElementsDictionaryEntry("Imaged Volume Height", "ImagedVolumeHeight", "FL", "1")); public_dictionary.emplace(Tag(0x0048, 0x0003), ElementsDictionaryEntry("Imaged Volume Depth", "ImagedVolumeDepth", "FL", "1")); public_dictionary.emplace(Tag(0x0048, 0x0006), ElementsDictionaryEntry("Total Pixel Matrix Columns", "TotalPixelMatrixColumns", "UL", "1")); public_dictionary.emplace(Tag(0x0048, 0x0007), ElementsDictionaryEntry("Total Pixel Matrix Rows", "TotalPixelMatrixRows", "UL", "1")); public_dictionary.emplace(Tag(0x0048, 0x0008), ElementsDictionaryEntry("Total Pixel Matrix Origin Sequence", "TotalPixelMatrixOriginSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0048, 0x0010), ElementsDictionaryEntry("Specimen Label in Image", "SpecimenLabelInImage", "CS", "1")); public_dictionary.emplace(Tag(0x0048, 0x0011), ElementsDictionaryEntry("Focus Method", "FocusMethod", "CS", "1")); public_dictionary.emplace(Tag(0x0048, 0x0012), ElementsDictionaryEntry("Extended Depth of Field", "ExtendedDepthOfField", "CS", "1")); public_dictionary.emplace(Tag(0x0048, 0x0013), ElementsDictionaryEntry("Number of Focal Planes", "NumberOfFocalPlanes", "US", "1")); public_dictionary.emplace(Tag(0x0048, 0x0014), ElementsDictionaryEntry("Distance Between Focal Planes", "DistanceBetweenFocalPlanes", "FL", "1")); public_dictionary.emplace(Tag(0x0048, 0x0015), ElementsDictionaryEntry("Recommended Absent Pixel CIELab Value", "RecommendedAbsentPixelCIELabValue", "US", "3")); public_dictionary.emplace(Tag(0x0048, 0x0100), ElementsDictionaryEntry("Illuminator Type Code Sequence", "IlluminatorTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0048, 0x0102), ElementsDictionaryEntry("Image Orientation (Slide)", "ImageOrientationSlide", "DS", "6")); public_dictionary.emplace(Tag(0x0048, 0x0105), ElementsDictionaryEntry("Optical Path Sequence", "OpticalPathSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0048, 0x0106), ElementsDictionaryEntry("Optical Path Identifier", "OpticalPathIdentifier", "SH", "1")); public_dictionary.emplace(Tag(0x0048, 0x0107), ElementsDictionaryEntry("Optical Path Description", "OpticalPathDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0048, 0x0108), ElementsDictionaryEntry("Illumination Color Code Sequence", "IlluminationColorCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0048, 0x0110), ElementsDictionaryEntry("Specimen Reference Sequence", "SpecimenReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0048, 0x0111), ElementsDictionaryEntry("Condenser Lens Power", "CondenserLensPower", "DS", "1")); public_dictionary.emplace(Tag(0x0048, 0x0112), ElementsDictionaryEntry("Objective Lens Power", "ObjectiveLensPower", "DS", "1")); public_dictionary.emplace(Tag(0x0048, 0x0113), ElementsDictionaryEntry("Objective Lens Numerical Aperture", "ObjectiveLensNumericalAperture", "DS", "1")); public_dictionary.emplace(Tag(0x0048, 0x0120), ElementsDictionaryEntry("Palette Color Lookup Table Sequence", "PaletteColorLookupTableSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0048, 0x0200), ElementsDictionaryEntry("Referenced Image Navigation Sequence", "ReferencedImageNavigationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0048, 0x0201), ElementsDictionaryEntry("Top Left Hand Corner of Localizer Area", "TopLeftHandCornerOfLocalizerArea", "US", "2")); public_dictionary.emplace(Tag(0x0048, 0x0202), ElementsDictionaryEntry("Bottom Right Hand Corner of Localizer Area", "BottomRightHandCornerOfLocalizerArea", "US", "2")); public_dictionary.emplace(Tag(0x0048, 0x0207), ElementsDictionaryEntry("Optical Path Identification Sequence", "OpticalPathIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0048, 0x021a), ElementsDictionaryEntry("Plane Position (Slide) Sequence", "PlanePositionSlideSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0048, 0x021e), ElementsDictionaryEntry("Column Position In Total Image Pixel Matrix", "ColumnPositionInTotalImagePixelMatrix", "SL", "1")); public_dictionary.emplace(Tag(0x0048, 0x021f), ElementsDictionaryEntry("Row Position In Total Image Pixel Matrix", "RowPositionInTotalImagePixelMatrix", "SL", "1")); public_dictionary.emplace(Tag(0x0048, 0x0301), ElementsDictionaryEntry("Pixel Origin Interpretation", "PixelOriginInterpretation", "CS", "1")); public_dictionary.emplace(Tag(0x0048, 0x0302), ElementsDictionaryEntry("Number of Optical Paths", "NumberOfOpticalPaths", "UL", "1")); public_dictionary.emplace(Tag(0x0048, 0x0303), ElementsDictionaryEntry("Total Pixel Matrix Focal Planes", "TotalPixelMatrixFocalPlanes", "UL", "1")); public_tags.emplace("ImagedVolumeWidth", Tag(0x0048, 0x0001)); public_tags.emplace("ImagedVolumeHeight", Tag(0x0048, 0x0002)); public_tags.emplace("ImagedVolumeDepth", Tag(0x0048, 0x0003)); public_tags.emplace("TotalPixelMatrixColumns", Tag(0x0048, 0x0006)); public_tags.emplace("TotalPixelMatrixRows", Tag(0x0048, 0x0007)); public_tags.emplace("TotalPixelMatrixOriginSequence", Tag(0x0048, 0x0008)); public_tags.emplace("SpecimenLabelInImage", Tag(0x0048, 0x0010)); public_tags.emplace("FocusMethod", Tag(0x0048, 0x0011)); public_tags.emplace("ExtendedDepthOfField", Tag(0x0048, 0x0012)); public_tags.emplace("NumberOfFocalPlanes", Tag(0x0048, 0x0013)); public_tags.emplace("DistanceBetweenFocalPlanes", Tag(0x0048, 0x0014)); public_tags.emplace("RecommendedAbsentPixelCIELabValue", Tag(0x0048, 0x0015)); public_tags.emplace("IlluminatorTypeCodeSequence", Tag(0x0048, 0x0100)); public_tags.emplace("ImageOrientationSlide", Tag(0x0048, 0x0102)); public_tags.emplace("OpticalPathSequence", Tag(0x0048, 0x0105)); public_tags.emplace("OpticalPathIdentifier", Tag(0x0048, 0x0106)); public_tags.emplace("OpticalPathDescription", Tag(0x0048, 0x0107)); public_tags.emplace("IlluminationColorCodeSequence", Tag(0x0048, 0x0108)); public_tags.emplace("SpecimenReferenceSequence", Tag(0x0048, 0x0110)); public_tags.emplace("CondenserLensPower", Tag(0x0048, 0x0111)); public_tags.emplace("ObjectiveLensPower", Tag(0x0048, 0x0112)); public_tags.emplace("ObjectiveLensNumericalAperture", Tag(0x0048, 0x0113)); public_tags.emplace("PaletteColorLookupTableSequence", Tag(0x0048, 0x0120)); public_tags.emplace("ReferencedImageNavigationSequence", Tag(0x0048, 0x0200)); public_tags.emplace("TopLeftHandCornerOfLocalizerArea", Tag(0x0048, 0x0201)); public_tags.emplace("BottomRightHandCornerOfLocalizerArea", Tag(0x0048, 0x0202)); public_tags.emplace("OpticalPathIdentificationSequence", Tag(0x0048, 0x0207)); public_tags.emplace("PlanePositionSlideSequence", Tag(0x0048, 0x021a)); public_tags.emplace("ColumnPositionInTotalImagePixelMatrix", Tag(0x0048, 0x021e)); public_tags.emplace("RowPositionInTotalImagePixelMatrix", Tag(0x0048, 0x021f)); public_tags.emplace("PixelOriginInterpretation", Tag(0x0048, 0x0301)); public_tags.emplace("NumberOfOpticalPaths", Tag(0x0048, 0x0302)); public_tags.emplace("TotalPixelMatrixFocalPlanes", Tag(0x0048, 0x0303)); } } }odil-0.11.0/src/odil/registry_0048.h000066400000000000000000000045751362244656000167550ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0048 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0048 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ImagedVolumeWidth(0x0048, 0x0001); Tag const ImagedVolumeHeight(0x0048, 0x0002); Tag const ImagedVolumeDepth(0x0048, 0x0003); Tag const TotalPixelMatrixColumns(0x0048, 0x0006); Tag const TotalPixelMatrixRows(0x0048, 0x0007); Tag const TotalPixelMatrixOriginSequence(0x0048, 0x0008); Tag const SpecimenLabelInImage(0x0048, 0x0010); Tag const FocusMethod(0x0048, 0x0011); Tag const ExtendedDepthOfField(0x0048, 0x0012); Tag const NumberOfFocalPlanes(0x0048, 0x0013); Tag const DistanceBetweenFocalPlanes(0x0048, 0x0014); Tag const RecommendedAbsentPixelCIELabValue(0x0048, 0x0015); Tag const IlluminatorTypeCodeSequence(0x0048, 0x0100); Tag const ImageOrientationSlide(0x0048, 0x0102); Tag const OpticalPathSequence(0x0048, 0x0105); Tag const OpticalPathIdentifier(0x0048, 0x0106); Tag const OpticalPathDescription(0x0048, 0x0107); Tag const IlluminationColorCodeSequence(0x0048, 0x0108); Tag const SpecimenReferenceSequence(0x0048, 0x0110); Tag const CondenserLensPower(0x0048, 0x0111); Tag const ObjectiveLensPower(0x0048, 0x0112); Tag const ObjectiveLensNumericalAperture(0x0048, 0x0113); Tag const PaletteColorLookupTableSequence(0x0048, 0x0120); Tag const ReferencedImageNavigationSequence(0x0048, 0x0200); Tag const TopLeftHandCornerOfLocalizerArea(0x0048, 0x0201); Tag const BottomRightHandCornerOfLocalizerArea(0x0048, 0x0202); Tag const OpticalPathIdentificationSequence(0x0048, 0x0207); Tag const PlanePositionSlideSequence(0x0048, 0x021a); Tag const ColumnPositionInTotalImagePixelMatrix(0x0048, 0x021e); Tag const RowPositionInTotalImagePixelMatrix(0x0048, 0x021f); Tag const PixelOriginInterpretation(0x0048, 0x0301); Tag const NumberOfOpticalPaths(0x0048, 0x0302); Tag const TotalPixelMatrixFocalPlanes(0x0048, 0x0303); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0048odil-0.11.0/src/odil/registry_0050.cpp000066400000000000000000000102561362244656000172720ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0050( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0050, 0x0004), ElementsDictionaryEntry("Calibration Image", "CalibrationImage", "CS", "1")); public_dictionary.emplace(Tag(0x0050, 0x0010), ElementsDictionaryEntry("Device Sequence", "DeviceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0050, 0x0012), ElementsDictionaryEntry("Container Component Type Code Sequence", "ContainerComponentTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0050, 0x0013), ElementsDictionaryEntry("Container Component Thickness", "ContainerComponentThickness", "FD", "1")); public_dictionary.emplace(Tag(0x0050, 0x0014), ElementsDictionaryEntry("Device Length", "DeviceLength", "DS", "1")); public_dictionary.emplace(Tag(0x0050, 0x0015), ElementsDictionaryEntry("Container Component Width", "ContainerComponentWidth", "FD", "1")); public_dictionary.emplace(Tag(0x0050, 0x0016), ElementsDictionaryEntry("Device Diameter", "DeviceDiameter", "DS", "1")); public_dictionary.emplace(Tag(0x0050, 0x0017), ElementsDictionaryEntry("Device Diameter Units", "DeviceDiameterUnits", "CS", "1")); public_dictionary.emplace(Tag(0x0050, 0x0018), ElementsDictionaryEntry("Device Volume", "DeviceVolume", "DS", "1")); public_dictionary.emplace(Tag(0x0050, 0x0019), ElementsDictionaryEntry("Inter-Marker Distance", "InterMarkerDistance", "DS", "1")); public_dictionary.emplace(Tag(0x0050, 0x001a), ElementsDictionaryEntry("Container Component Material", "ContainerComponentMaterial", "CS", "1")); public_dictionary.emplace(Tag(0x0050, 0x001b), ElementsDictionaryEntry("Container Component ID", "ContainerComponentID", "LO", "1")); public_dictionary.emplace(Tag(0x0050, 0x001c), ElementsDictionaryEntry("Container Component Length", "ContainerComponentLength", "FD", "1")); public_dictionary.emplace(Tag(0x0050, 0x001d), ElementsDictionaryEntry("Container Component Diameter", "ContainerComponentDiameter", "FD", "1")); public_dictionary.emplace(Tag(0x0050, 0x001e), ElementsDictionaryEntry("Container Component Description", "ContainerComponentDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0050, 0x0020), ElementsDictionaryEntry("Device Description", "DeviceDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0050, 0x0021), ElementsDictionaryEntry("Long Device Description", "LongDeviceDescription", "ST", "1")); public_tags.emplace("CalibrationImage", Tag(0x0050, 0x0004)); public_tags.emplace("DeviceSequence", Tag(0x0050, 0x0010)); public_tags.emplace("ContainerComponentTypeCodeSequence", Tag(0x0050, 0x0012)); public_tags.emplace("ContainerComponentThickness", Tag(0x0050, 0x0013)); public_tags.emplace("DeviceLength", Tag(0x0050, 0x0014)); public_tags.emplace("ContainerComponentWidth", Tag(0x0050, 0x0015)); public_tags.emplace("DeviceDiameter", Tag(0x0050, 0x0016)); public_tags.emplace("DeviceDiameterUnits", Tag(0x0050, 0x0017)); public_tags.emplace("DeviceVolume", Tag(0x0050, 0x0018)); public_tags.emplace("InterMarkerDistance", Tag(0x0050, 0x0019)); public_tags.emplace("ContainerComponentMaterial", Tag(0x0050, 0x001a)); public_tags.emplace("ContainerComponentID", Tag(0x0050, 0x001b)); public_tags.emplace("ContainerComponentLength", Tag(0x0050, 0x001c)); public_tags.emplace("ContainerComponentDiameter", Tag(0x0050, 0x001d)); public_tags.emplace("ContainerComponentDescription", Tag(0x0050, 0x001e)); public_tags.emplace("DeviceDescription", Tag(0x0050, 0x0020)); public_tags.emplace("LongDeviceDescription", Tag(0x0050, 0x0021)); } } }odil-0.11.0/src/odil/registry_0050.h000066400000000000000000000027541362244656000167430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0050 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0050 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const CalibrationImage(0x0050, 0x0004); Tag const DeviceSequence(0x0050, 0x0010); Tag const ContainerComponentTypeCodeSequence(0x0050, 0x0012); Tag const ContainerComponentThickness(0x0050, 0x0013); Tag const DeviceLength(0x0050, 0x0014); Tag const ContainerComponentWidth(0x0050, 0x0015); Tag const DeviceDiameter(0x0050, 0x0016); Tag const DeviceDiameterUnits(0x0050, 0x0017); Tag const DeviceVolume(0x0050, 0x0018); Tag const InterMarkerDistance(0x0050, 0x0019); Tag const ContainerComponentMaterial(0x0050, 0x001a); Tag const ContainerComponentID(0x0050, 0x001b); Tag const ContainerComponentLength(0x0050, 0x001c); Tag const ContainerComponentDiameter(0x0050, 0x001d); Tag const ContainerComponentDescription(0x0050, 0x001e); Tag const DeviceDescription(0x0050, 0x0020); Tag const LongDeviceDescription(0x0050, 0x0021); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0050odil-0.11.0/src/odil/registry_0052.cpp000066400000000000000000000141621362244656000172740ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0052( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0052, 0x0001), ElementsDictionaryEntry("Contrast/Bolus Ingredient Percent by Volume", "ContrastBolusIngredientPercentByVolume", "FL", "1")); public_dictionary.emplace(Tag(0x0052, 0x0002), ElementsDictionaryEntry("OCT Focal Distance", "OCTFocalDistance", "FD", "1")); public_dictionary.emplace(Tag(0x0052, 0x0003), ElementsDictionaryEntry("Beam Spot Size", "BeamSpotSize", "FD", "1")); public_dictionary.emplace(Tag(0x0052, 0x0004), ElementsDictionaryEntry("Effective Refractive Index", "EffectiveRefractiveIndex", "FD", "1")); public_dictionary.emplace(Tag(0x0052, 0x0006), ElementsDictionaryEntry("OCT Acquisition Domain", "OCTAcquisitionDomain", "CS", "1")); public_dictionary.emplace(Tag(0x0052, 0x0007), ElementsDictionaryEntry("OCT Optical Center Wavelength", "OCTOpticalCenterWavelength", "FD", "1")); public_dictionary.emplace(Tag(0x0052, 0x0008), ElementsDictionaryEntry("Axial Resolution", "AxialResolution", "FD", "1")); public_dictionary.emplace(Tag(0x0052, 0x0009), ElementsDictionaryEntry("Ranging Depth", "RangingDepth", "FD", "1")); public_dictionary.emplace(Tag(0x0052, 0x0011), ElementsDictionaryEntry("A-line Rate", "ALineRate", "FD", "1")); public_dictionary.emplace(Tag(0x0052, 0x0012), ElementsDictionaryEntry("A-lines Per Frame", "ALinesPerFrame", "US", "1")); public_dictionary.emplace(Tag(0x0052, 0x0013), ElementsDictionaryEntry("Catheter Rotational Rate", "CatheterRotationalRate", "FD", "1")); public_dictionary.emplace(Tag(0x0052, 0x0014), ElementsDictionaryEntry("A-line Pixel Spacing", "ALinePixelSpacing", "FD", "1")); public_dictionary.emplace(Tag(0x0052, 0x0016), ElementsDictionaryEntry("Mode of Percutaneous Access Sequence", "ModeOfPercutaneousAccessSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0052, 0x0025), ElementsDictionaryEntry("Intravascular OCT Frame Type Sequence", "IntravascularOCTFrameTypeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0052, 0x0026), ElementsDictionaryEntry("OCT Z Offset Applied", "OCTZOffsetApplied", "CS", "1")); public_dictionary.emplace(Tag(0x0052, 0x0027), ElementsDictionaryEntry("Intravascular Frame Content Sequence", "IntravascularFrameContentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0052, 0x0028), ElementsDictionaryEntry("Intravascular Longitudinal Distance", "IntravascularLongitudinalDistance", "FD", "1")); public_dictionary.emplace(Tag(0x0052, 0x0029), ElementsDictionaryEntry("Intravascular OCT Frame Content Sequence", "IntravascularOCTFrameContentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0052, 0x0030), ElementsDictionaryEntry("OCT Z Offset Correction", "OCTZOffsetCorrection", "SS", "1")); public_dictionary.emplace(Tag(0x0052, 0x0031), ElementsDictionaryEntry("Catheter Direction of Rotation", "CatheterDirectionOfRotation", "CS", "1")); public_dictionary.emplace(Tag(0x0052, 0x0033), ElementsDictionaryEntry("Seam Line Location", "SeamLineLocation", "FD", "1")); public_dictionary.emplace(Tag(0x0052, 0x0034), ElementsDictionaryEntry("First A-line Location", "FirstALineLocation", "FD", "1")); public_dictionary.emplace(Tag(0x0052, 0x0036), ElementsDictionaryEntry("Seam Line Index", "SeamLineIndex", "US", "1")); public_dictionary.emplace(Tag(0x0052, 0x0038), ElementsDictionaryEntry("Number of Padded A-lines", "NumberOfPaddedALines", "US", "1")); public_dictionary.emplace(Tag(0x0052, 0x0039), ElementsDictionaryEntry("Interpolation Type", "InterpolationType", "CS", "1")); public_dictionary.emplace(Tag(0x0052, 0x003a), ElementsDictionaryEntry("Refractive Index Applied", "RefractiveIndexApplied", "CS", "1")); public_tags.emplace("ContrastBolusIngredientPercentByVolume", Tag(0x0052, 0x0001)); public_tags.emplace("OCTFocalDistance", Tag(0x0052, 0x0002)); public_tags.emplace("BeamSpotSize", Tag(0x0052, 0x0003)); public_tags.emplace("EffectiveRefractiveIndex", Tag(0x0052, 0x0004)); public_tags.emplace("OCTAcquisitionDomain", Tag(0x0052, 0x0006)); public_tags.emplace("OCTOpticalCenterWavelength", Tag(0x0052, 0x0007)); public_tags.emplace("AxialResolution", Tag(0x0052, 0x0008)); public_tags.emplace("RangingDepth", Tag(0x0052, 0x0009)); public_tags.emplace("ALineRate", Tag(0x0052, 0x0011)); public_tags.emplace("ALinesPerFrame", Tag(0x0052, 0x0012)); public_tags.emplace("CatheterRotationalRate", Tag(0x0052, 0x0013)); public_tags.emplace("ALinePixelSpacing", Tag(0x0052, 0x0014)); public_tags.emplace("ModeOfPercutaneousAccessSequence", Tag(0x0052, 0x0016)); public_tags.emplace("IntravascularOCTFrameTypeSequence", Tag(0x0052, 0x0025)); public_tags.emplace("OCTZOffsetApplied", Tag(0x0052, 0x0026)); public_tags.emplace("IntravascularFrameContentSequence", Tag(0x0052, 0x0027)); public_tags.emplace("IntravascularLongitudinalDistance", Tag(0x0052, 0x0028)); public_tags.emplace("IntravascularOCTFrameContentSequence", Tag(0x0052, 0x0029)); public_tags.emplace("OCTZOffsetCorrection", Tag(0x0052, 0x0030)); public_tags.emplace("CatheterDirectionOfRotation", Tag(0x0052, 0x0031)); public_tags.emplace("SeamLineLocation", Tag(0x0052, 0x0033)); public_tags.emplace("FirstALineLocation", Tag(0x0052, 0x0034)); public_tags.emplace("SeamLineIndex", Tag(0x0052, 0x0036)); public_tags.emplace("NumberOfPaddedALines", Tag(0x0052, 0x0038)); public_tags.emplace("InterpolationType", Tag(0x0052, 0x0039)); public_tags.emplace("RefractiveIndexApplied", Tag(0x0052, 0x003a)); } } }odil-0.11.0/src/odil/registry_0052.h000066400000000000000000000036711362244656000167440ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0052 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0052 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ContrastBolusIngredientPercentByVolume(0x0052, 0x0001); Tag const OCTFocalDistance(0x0052, 0x0002); Tag const BeamSpotSize(0x0052, 0x0003); Tag const EffectiveRefractiveIndex(0x0052, 0x0004); Tag const OCTAcquisitionDomain(0x0052, 0x0006); Tag const OCTOpticalCenterWavelength(0x0052, 0x0007); Tag const AxialResolution(0x0052, 0x0008); Tag const RangingDepth(0x0052, 0x0009); Tag const ALineRate(0x0052, 0x0011); Tag const ALinesPerFrame(0x0052, 0x0012); Tag const CatheterRotationalRate(0x0052, 0x0013); Tag const ALinePixelSpacing(0x0052, 0x0014); Tag const ModeOfPercutaneousAccessSequence(0x0052, 0x0016); Tag const IntravascularOCTFrameTypeSequence(0x0052, 0x0025); Tag const OCTZOffsetApplied(0x0052, 0x0026); Tag const IntravascularFrameContentSequence(0x0052, 0x0027); Tag const IntravascularLongitudinalDistance(0x0052, 0x0028); Tag const IntravascularOCTFrameContentSequence(0x0052, 0x0029); Tag const OCTZOffsetCorrection(0x0052, 0x0030); Tag const CatheterDirectionOfRotation(0x0052, 0x0031); Tag const SeamLineLocation(0x0052, 0x0033); Tag const FirstALineLocation(0x0052, 0x0034); Tag const SeamLineIndex(0x0052, 0x0036); Tag const NumberOfPaddedALines(0x0052, 0x0038); Tag const InterpolationType(0x0052, 0x0039); Tag const RefractiveIndexApplied(0x0052, 0x003a); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0052odil-0.11.0/src/odil/registry_0054.cpp000066400000000000000000000422011362244656000172710ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0054( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0054, 0x0010), ElementsDictionaryEntry("Energy Window Vector", "EnergyWindowVector", "US", "1-n")); public_dictionary.emplace(Tag(0x0054, 0x0011), ElementsDictionaryEntry("Number of Energy Windows", "NumberOfEnergyWindows", "US", "1")); public_dictionary.emplace(Tag(0x0054, 0x0012), ElementsDictionaryEntry("Energy Window Information Sequence", "EnergyWindowInformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0013), ElementsDictionaryEntry("Energy Window Range Sequence", "EnergyWindowRangeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0014), ElementsDictionaryEntry("Energy Window Lower Limit", "EnergyWindowLowerLimit", "DS", "1")); public_dictionary.emplace(Tag(0x0054, 0x0015), ElementsDictionaryEntry("Energy Window Upper Limit", "EnergyWindowUpperLimit", "DS", "1")); public_dictionary.emplace(Tag(0x0054, 0x0016), ElementsDictionaryEntry("Radiopharmaceutical Information Sequence", "RadiopharmaceuticalInformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0017), ElementsDictionaryEntry("Residual Syringe Counts", "ResidualSyringeCounts", "IS", "1")); public_dictionary.emplace(Tag(0x0054, 0x0018), ElementsDictionaryEntry("Energy Window Name", "EnergyWindowName", "SH", "1")); public_dictionary.emplace(Tag(0x0054, 0x0020), ElementsDictionaryEntry("Detector Vector", "DetectorVector", "US", "1-n")); public_dictionary.emplace(Tag(0x0054, 0x0021), ElementsDictionaryEntry("Number of Detectors", "NumberOfDetectors", "US", "1")); public_dictionary.emplace(Tag(0x0054, 0x0022), ElementsDictionaryEntry("Detector Information Sequence", "DetectorInformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0030), ElementsDictionaryEntry("Phase Vector", "PhaseVector", "US", "1-n")); public_dictionary.emplace(Tag(0x0054, 0x0031), ElementsDictionaryEntry("Number of Phases", "NumberOfPhases", "US", "1")); public_dictionary.emplace(Tag(0x0054, 0x0032), ElementsDictionaryEntry("Phase Information Sequence", "PhaseInformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0033), ElementsDictionaryEntry("Number of Frames in Phase", "NumberOfFramesInPhase", "US", "1")); public_dictionary.emplace(Tag(0x0054, 0x0036), ElementsDictionaryEntry("Phase Delay", "PhaseDelay", "IS", "1")); public_dictionary.emplace(Tag(0x0054, 0x0038), ElementsDictionaryEntry("Pause Between Frames", "PauseBetweenFrames", "IS", "1")); public_dictionary.emplace(Tag(0x0054, 0x0039), ElementsDictionaryEntry("Phase Description", "PhaseDescription", "CS", "1")); public_dictionary.emplace(Tag(0x0054, 0x0050), ElementsDictionaryEntry("Rotation Vector", "RotationVector", "US", "1-n")); public_dictionary.emplace(Tag(0x0054, 0x0051), ElementsDictionaryEntry("Number of Rotations", "NumberOfRotations", "US", "1")); public_dictionary.emplace(Tag(0x0054, 0x0052), ElementsDictionaryEntry("Rotation Information Sequence", "RotationInformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0053), ElementsDictionaryEntry("Number of Frames in Rotation", "NumberOfFramesInRotation", "US", "1")); public_dictionary.emplace(Tag(0x0054, 0x0060), ElementsDictionaryEntry("R-R Interval Vector", "RRIntervalVector", "US", "1-n")); public_dictionary.emplace(Tag(0x0054, 0x0061), ElementsDictionaryEntry("Number of R-R Intervals", "NumberOfRRIntervals", "US", "1")); public_dictionary.emplace(Tag(0x0054, 0x0062), ElementsDictionaryEntry("Gated Information Sequence", "GatedInformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0063), ElementsDictionaryEntry("Data Information Sequence", "DataInformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0070), ElementsDictionaryEntry("Time Slot Vector", "TimeSlotVector", "US", "1-n")); public_dictionary.emplace(Tag(0x0054, 0x0071), ElementsDictionaryEntry("Number of Time Slots", "NumberOfTimeSlots", "US", "1")); public_dictionary.emplace(Tag(0x0054, 0x0072), ElementsDictionaryEntry("Time Slot Information Sequence", "TimeSlotInformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0073), ElementsDictionaryEntry("Time Slot Time", "TimeSlotTime", "DS", "1")); public_dictionary.emplace(Tag(0x0054, 0x0080), ElementsDictionaryEntry("Slice Vector", "SliceVector", "US", "1-n")); public_dictionary.emplace(Tag(0x0054, 0x0081), ElementsDictionaryEntry("Number of Slices", "NumberOfSlices", "US", "1")); public_dictionary.emplace(Tag(0x0054, 0x0090), ElementsDictionaryEntry("Angular View Vector", "AngularViewVector", "US", "1-n")); public_dictionary.emplace(Tag(0x0054, 0x0100), ElementsDictionaryEntry("Time Slice Vector", "TimeSliceVector", "US", "1-n")); public_dictionary.emplace(Tag(0x0054, 0x0101), ElementsDictionaryEntry("Number of Time Slices", "NumberOfTimeSlices", "US", "1")); public_dictionary.emplace(Tag(0x0054, 0x0200), ElementsDictionaryEntry("Start Angle", "StartAngle", "DS", "1")); public_dictionary.emplace(Tag(0x0054, 0x0202), ElementsDictionaryEntry("Type of Detector Motion", "TypeOfDetectorMotion", "CS", "1")); public_dictionary.emplace(Tag(0x0054, 0x0210), ElementsDictionaryEntry("Trigger Vector", "TriggerVector", "IS", "1-n")); public_dictionary.emplace(Tag(0x0054, 0x0211), ElementsDictionaryEntry("Number of Triggers in Phase", "NumberOfTriggersInPhase", "US", "1")); public_dictionary.emplace(Tag(0x0054, 0x0220), ElementsDictionaryEntry("View Code Sequence", "ViewCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0222), ElementsDictionaryEntry("View Modifier Code Sequence", "ViewModifierCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0300), ElementsDictionaryEntry("Radionuclide Code Sequence", "RadionuclideCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0302), ElementsDictionaryEntry("Administration Route Code Sequence", "AdministrationRouteCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0304), ElementsDictionaryEntry("Radiopharmaceutical Code Sequence", "RadiopharmaceuticalCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0306), ElementsDictionaryEntry("Calibration Data Sequence", "CalibrationDataSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0308), ElementsDictionaryEntry("Energy Window Number", "EnergyWindowNumber", "US", "1")); public_dictionary.emplace(Tag(0x0054, 0x0400), ElementsDictionaryEntry("Image ID", "ImageID", "SH", "1")); public_dictionary.emplace(Tag(0x0054, 0x0410), ElementsDictionaryEntry("Patient Orientation Code Sequence", "PatientOrientationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0412), ElementsDictionaryEntry("Patient Orientation Modifier Code Sequence", "PatientOrientationModifierCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0414), ElementsDictionaryEntry("Patient Gantry Relationship Code Sequence", "PatientGantryRelationshipCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0054, 0x0500), ElementsDictionaryEntry("Slice Progression Direction", "SliceProgressionDirection", "CS", "1")); public_dictionary.emplace(Tag(0x0054, 0x0501), ElementsDictionaryEntry("Scan Progression Direction", "ScanProgressionDirection", "CS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1000), ElementsDictionaryEntry("Series Type", "SeriesType", "CS", "2")); public_dictionary.emplace(Tag(0x0054, 0x1001), ElementsDictionaryEntry("Units", "Units", "CS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1002), ElementsDictionaryEntry("Counts Source", "CountsSource", "CS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1004), ElementsDictionaryEntry("Reprojection Method", "ReprojectionMethod", "CS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1006), ElementsDictionaryEntry("SUV Type", "SUVType", "CS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1100), ElementsDictionaryEntry("Randoms Correction Method", "RandomsCorrectionMethod", "CS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1101), ElementsDictionaryEntry("Attenuation Correction Method", "AttenuationCorrectionMethod", "LO", "1")); public_dictionary.emplace(Tag(0x0054, 0x1102), ElementsDictionaryEntry("Decay Correction", "DecayCorrection", "CS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1103), ElementsDictionaryEntry("Reconstruction Method", "ReconstructionMethod", "LO", "1")); public_dictionary.emplace(Tag(0x0054, 0x1104), ElementsDictionaryEntry("Detector Lines of Response Used", "DetectorLinesOfResponseUsed", "LO", "1")); public_dictionary.emplace(Tag(0x0054, 0x1105), ElementsDictionaryEntry("Scatter Correction Method", "ScatterCorrectionMethod", "LO", "1")); public_dictionary.emplace(Tag(0x0054, 0x1200), ElementsDictionaryEntry("Axial Acceptance", "AxialAcceptance", "DS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1201), ElementsDictionaryEntry("Axial Mash", "AxialMash", "IS", "2")); public_dictionary.emplace(Tag(0x0054, 0x1202), ElementsDictionaryEntry("Transverse Mash", "TransverseMash", "IS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1203), ElementsDictionaryEntry("Detector Element Size", "DetectorElementSize", "DS", "2")); public_dictionary.emplace(Tag(0x0054, 0x1210), ElementsDictionaryEntry("Coincidence Window Width", "CoincidenceWindowWidth", "DS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1220), ElementsDictionaryEntry("Secondary Counts Type", "SecondaryCountsType", "CS", "1-n")); public_dictionary.emplace(Tag(0x0054, 0x1300), ElementsDictionaryEntry("Frame Reference Time", "FrameReferenceTime", "DS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1310), ElementsDictionaryEntry("Primary (Prompts) Counts Accumulated", "PrimaryPromptsCountsAccumulated", "IS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1311), ElementsDictionaryEntry("Secondary Counts Accumulated", "SecondaryCountsAccumulated", "IS", "1-n")); public_dictionary.emplace(Tag(0x0054, 0x1320), ElementsDictionaryEntry("Slice Sensitivity Factor", "SliceSensitivityFactor", "DS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1321), ElementsDictionaryEntry("Decay Factor", "DecayFactor", "DS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1322), ElementsDictionaryEntry("Dose Calibration Factor", "DoseCalibrationFactor", "DS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1323), ElementsDictionaryEntry("Scatter Fraction Factor", "ScatterFractionFactor", "DS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1324), ElementsDictionaryEntry("Dead Time Factor", "DeadTimeFactor", "DS", "1")); public_dictionary.emplace(Tag(0x0054, 0x1330), ElementsDictionaryEntry("Image Index", "ImageIndex", "US", "1")); public_dictionary.emplace(Tag(0x0054, 0x1400), ElementsDictionaryEntry("Counts Included", "CountsIncluded", "CS", "1-n")); public_dictionary.emplace(Tag(0x0054, 0x1401), ElementsDictionaryEntry("Dead Time Correction Flag", "DeadTimeCorrectionFlag", "CS", "1")); public_tags.emplace("EnergyWindowVector", Tag(0x0054, 0x0010)); public_tags.emplace("NumberOfEnergyWindows", Tag(0x0054, 0x0011)); public_tags.emplace("EnergyWindowInformationSequence", Tag(0x0054, 0x0012)); public_tags.emplace("EnergyWindowRangeSequence", Tag(0x0054, 0x0013)); public_tags.emplace("EnergyWindowLowerLimit", Tag(0x0054, 0x0014)); public_tags.emplace("EnergyWindowUpperLimit", Tag(0x0054, 0x0015)); public_tags.emplace("RadiopharmaceuticalInformationSequence", Tag(0x0054, 0x0016)); public_tags.emplace("ResidualSyringeCounts", Tag(0x0054, 0x0017)); public_tags.emplace("EnergyWindowName", Tag(0x0054, 0x0018)); public_tags.emplace("DetectorVector", Tag(0x0054, 0x0020)); public_tags.emplace("NumberOfDetectors", Tag(0x0054, 0x0021)); public_tags.emplace("DetectorInformationSequence", Tag(0x0054, 0x0022)); public_tags.emplace("PhaseVector", Tag(0x0054, 0x0030)); public_tags.emplace("NumberOfPhases", Tag(0x0054, 0x0031)); public_tags.emplace("PhaseInformationSequence", Tag(0x0054, 0x0032)); public_tags.emplace("NumberOfFramesInPhase", Tag(0x0054, 0x0033)); public_tags.emplace("PhaseDelay", Tag(0x0054, 0x0036)); public_tags.emplace("PauseBetweenFrames", Tag(0x0054, 0x0038)); public_tags.emplace("PhaseDescription", Tag(0x0054, 0x0039)); public_tags.emplace("RotationVector", Tag(0x0054, 0x0050)); public_tags.emplace("NumberOfRotations", Tag(0x0054, 0x0051)); public_tags.emplace("RotationInformationSequence", Tag(0x0054, 0x0052)); public_tags.emplace("NumberOfFramesInRotation", Tag(0x0054, 0x0053)); public_tags.emplace("RRIntervalVector", Tag(0x0054, 0x0060)); public_tags.emplace("NumberOfRRIntervals", Tag(0x0054, 0x0061)); public_tags.emplace("GatedInformationSequence", Tag(0x0054, 0x0062)); public_tags.emplace("DataInformationSequence", Tag(0x0054, 0x0063)); public_tags.emplace("TimeSlotVector", Tag(0x0054, 0x0070)); public_tags.emplace("NumberOfTimeSlots", Tag(0x0054, 0x0071)); public_tags.emplace("TimeSlotInformationSequence", Tag(0x0054, 0x0072)); public_tags.emplace("TimeSlotTime", Tag(0x0054, 0x0073)); public_tags.emplace("SliceVector", Tag(0x0054, 0x0080)); public_tags.emplace("NumberOfSlices", Tag(0x0054, 0x0081)); public_tags.emplace("AngularViewVector", Tag(0x0054, 0x0090)); public_tags.emplace("TimeSliceVector", Tag(0x0054, 0x0100)); public_tags.emplace("NumberOfTimeSlices", Tag(0x0054, 0x0101)); public_tags.emplace("StartAngle", Tag(0x0054, 0x0200)); public_tags.emplace("TypeOfDetectorMotion", Tag(0x0054, 0x0202)); public_tags.emplace("TriggerVector", Tag(0x0054, 0x0210)); public_tags.emplace("NumberOfTriggersInPhase", Tag(0x0054, 0x0211)); public_tags.emplace("ViewCodeSequence", Tag(0x0054, 0x0220)); public_tags.emplace("ViewModifierCodeSequence", Tag(0x0054, 0x0222)); public_tags.emplace("RadionuclideCodeSequence", Tag(0x0054, 0x0300)); public_tags.emplace("AdministrationRouteCodeSequence", Tag(0x0054, 0x0302)); public_tags.emplace("RadiopharmaceuticalCodeSequence", Tag(0x0054, 0x0304)); public_tags.emplace("CalibrationDataSequence", Tag(0x0054, 0x0306)); public_tags.emplace("EnergyWindowNumber", Tag(0x0054, 0x0308)); public_tags.emplace("ImageID", Tag(0x0054, 0x0400)); public_tags.emplace("PatientOrientationCodeSequence", Tag(0x0054, 0x0410)); public_tags.emplace("PatientOrientationModifierCodeSequence", Tag(0x0054, 0x0412)); public_tags.emplace("PatientGantryRelationshipCodeSequence", Tag(0x0054, 0x0414)); public_tags.emplace("SliceProgressionDirection", Tag(0x0054, 0x0500)); public_tags.emplace("ScanProgressionDirection", Tag(0x0054, 0x0501)); public_tags.emplace("SeriesType", Tag(0x0054, 0x1000)); public_tags.emplace("Units", Tag(0x0054, 0x1001)); public_tags.emplace("CountsSource", Tag(0x0054, 0x1002)); public_tags.emplace("ReprojectionMethod", Tag(0x0054, 0x1004)); public_tags.emplace("SUVType", Tag(0x0054, 0x1006)); public_tags.emplace("RandomsCorrectionMethod", Tag(0x0054, 0x1100)); public_tags.emplace("AttenuationCorrectionMethod", Tag(0x0054, 0x1101)); public_tags.emplace("DecayCorrection", Tag(0x0054, 0x1102)); public_tags.emplace("ReconstructionMethod", Tag(0x0054, 0x1103)); public_tags.emplace("DetectorLinesOfResponseUsed", Tag(0x0054, 0x1104)); public_tags.emplace("ScatterCorrectionMethod", Tag(0x0054, 0x1105)); public_tags.emplace("AxialAcceptance", Tag(0x0054, 0x1200)); public_tags.emplace("AxialMash", Tag(0x0054, 0x1201)); public_tags.emplace("TransverseMash", Tag(0x0054, 0x1202)); public_tags.emplace("DetectorElementSize", Tag(0x0054, 0x1203)); public_tags.emplace("CoincidenceWindowWidth", Tag(0x0054, 0x1210)); public_tags.emplace("SecondaryCountsType", Tag(0x0054, 0x1220)); public_tags.emplace("FrameReferenceTime", Tag(0x0054, 0x1300)); public_tags.emplace("PrimaryPromptsCountsAccumulated", Tag(0x0054, 0x1310)); public_tags.emplace("SecondaryCountsAccumulated", Tag(0x0054, 0x1311)); public_tags.emplace("SliceSensitivityFactor", Tag(0x0054, 0x1320)); public_tags.emplace("DecayFactor", Tag(0x0054, 0x1321)); public_tags.emplace("DoseCalibrationFactor", Tag(0x0054, 0x1322)); public_tags.emplace("ScatterFractionFactor", Tag(0x0054, 0x1323)); public_tags.emplace("DeadTimeFactor", Tag(0x0054, 0x1324)); public_tags.emplace("ImageIndex", Tag(0x0054, 0x1330)); public_tags.emplace("CountsIncluded", Tag(0x0054, 0x1400)); public_tags.emplace("DeadTimeCorrectionFlag", Tag(0x0054, 0x1401)); } } }odil-0.11.0/src/odil/registry_0054.h000066400000000000000000000106731362244656000167460ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0054 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0054 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const EnergyWindowVector(0x0054, 0x0010); Tag const NumberOfEnergyWindows(0x0054, 0x0011); Tag const EnergyWindowInformationSequence(0x0054, 0x0012); Tag const EnergyWindowRangeSequence(0x0054, 0x0013); Tag const EnergyWindowLowerLimit(0x0054, 0x0014); Tag const EnergyWindowUpperLimit(0x0054, 0x0015); Tag const RadiopharmaceuticalInformationSequence(0x0054, 0x0016); Tag const ResidualSyringeCounts(0x0054, 0x0017); Tag const EnergyWindowName(0x0054, 0x0018); Tag const DetectorVector(0x0054, 0x0020); Tag const NumberOfDetectors(0x0054, 0x0021); Tag const DetectorInformationSequence(0x0054, 0x0022); Tag const PhaseVector(0x0054, 0x0030); Tag const NumberOfPhases(0x0054, 0x0031); Tag const PhaseInformationSequence(0x0054, 0x0032); Tag const NumberOfFramesInPhase(0x0054, 0x0033); Tag const PhaseDelay(0x0054, 0x0036); Tag const PauseBetweenFrames(0x0054, 0x0038); Tag const PhaseDescription(0x0054, 0x0039); Tag const RotationVector(0x0054, 0x0050); Tag const NumberOfRotations(0x0054, 0x0051); Tag const RotationInformationSequence(0x0054, 0x0052); Tag const NumberOfFramesInRotation(0x0054, 0x0053); Tag const RRIntervalVector(0x0054, 0x0060); Tag const NumberOfRRIntervals(0x0054, 0x0061); Tag const GatedInformationSequence(0x0054, 0x0062); Tag const DataInformationSequence(0x0054, 0x0063); Tag const TimeSlotVector(0x0054, 0x0070); Tag const NumberOfTimeSlots(0x0054, 0x0071); Tag const TimeSlotInformationSequence(0x0054, 0x0072); Tag const TimeSlotTime(0x0054, 0x0073); Tag const SliceVector(0x0054, 0x0080); Tag const NumberOfSlices(0x0054, 0x0081); Tag const AngularViewVector(0x0054, 0x0090); Tag const TimeSliceVector(0x0054, 0x0100); Tag const NumberOfTimeSlices(0x0054, 0x0101); Tag const StartAngle(0x0054, 0x0200); Tag const TypeOfDetectorMotion(0x0054, 0x0202); Tag const TriggerVector(0x0054, 0x0210); Tag const NumberOfTriggersInPhase(0x0054, 0x0211); Tag const ViewCodeSequence(0x0054, 0x0220); Tag const ViewModifierCodeSequence(0x0054, 0x0222); Tag const RadionuclideCodeSequence(0x0054, 0x0300); Tag const AdministrationRouteCodeSequence(0x0054, 0x0302); Tag const RadiopharmaceuticalCodeSequence(0x0054, 0x0304); Tag const CalibrationDataSequence(0x0054, 0x0306); Tag const EnergyWindowNumber(0x0054, 0x0308); Tag const ImageID(0x0054, 0x0400); Tag const PatientOrientationCodeSequence(0x0054, 0x0410); Tag const PatientOrientationModifierCodeSequence(0x0054, 0x0412); Tag const PatientGantryRelationshipCodeSequence(0x0054, 0x0414); Tag const SliceProgressionDirection(0x0054, 0x0500); Tag const ScanProgressionDirection(0x0054, 0x0501); Tag const SeriesType(0x0054, 0x1000); Tag const Units(0x0054, 0x1001); Tag const CountsSource(0x0054, 0x1002); Tag const ReprojectionMethod(0x0054, 0x1004); Tag const SUVType(0x0054, 0x1006); Tag const RandomsCorrectionMethod(0x0054, 0x1100); Tag const AttenuationCorrectionMethod(0x0054, 0x1101); Tag const DecayCorrection(0x0054, 0x1102); Tag const ReconstructionMethod(0x0054, 0x1103); Tag const DetectorLinesOfResponseUsed(0x0054, 0x1104); Tag const ScatterCorrectionMethod(0x0054, 0x1105); Tag const AxialAcceptance(0x0054, 0x1200); Tag const AxialMash(0x0054, 0x1201); Tag const TransverseMash(0x0054, 0x1202); Tag const DetectorElementSize(0x0054, 0x1203); Tag const CoincidenceWindowWidth(0x0054, 0x1210); Tag const SecondaryCountsType(0x0054, 0x1220); Tag const FrameReferenceTime(0x0054, 0x1300); Tag const PrimaryPromptsCountsAccumulated(0x0054, 0x1310); Tag const SecondaryCountsAccumulated(0x0054, 0x1311); Tag const SliceSensitivityFactor(0x0054, 0x1320); Tag const DecayFactor(0x0054, 0x1321); Tag const DoseCalibrationFactor(0x0054, 0x1322); Tag const ScatterFractionFactor(0x0054, 0x1323); Tag const DeadTimeFactor(0x0054, 0x1324); Tag const ImageIndex(0x0054, 0x1330); Tag const CountsIncluded(0x0054, 0x1400); Tag const DeadTimeCorrectionFlag(0x0054, 0x1401); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0054odil-0.11.0/src/odil/registry_0060.cpp000066400000000000000000000041241362244656000172700ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0060( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0060, 0x3000), ElementsDictionaryEntry("Histogram Sequence", "HistogramSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0060, 0x3002), ElementsDictionaryEntry("Histogram Number of Bins", "HistogramNumberOfBins", "US", "1")); public_dictionary.emplace(Tag(0x0060, 0x3004), ElementsDictionaryEntry("Histogram First Bin Value", "HistogramFirstBinValue", "US or SS", "1")); public_dictionary.emplace(Tag(0x0060, 0x3006), ElementsDictionaryEntry("Histogram Last Bin Value", "HistogramLastBinValue", "US or SS", "1")); public_dictionary.emplace(Tag(0x0060, 0x3008), ElementsDictionaryEntry("Histogram Bin Width", "HistogramBinWidth", "US", "1")); public_dictionary.emplace(Tag(0x0060, 0x3010), ElementsDictionaryEntry("Histogram Explanation", "HistogramExplanation", "LO", "1")); public_dictionary.emplace(Tag(0x0060, 0x3020), ElementsDictionaryEntry("Histogram Data", "HistogramData", "UL", "1-n")); public_tags.emplace("HistogramSequence", Tag(0x0060, 0x3000)); public_tags.emplace("HistogramNumberOfBins", Tag(0x0060, 0x3002)); public_tags.emplace("HistogramFirstBinValue", Tag(0x0060, 0x3004)); public_tags.emplace("HistogramLastBinValue", Tag(0x0060, 0x3006)); public_tags.emplace("HistogramBinWidth", Tag(0x0060, 0x3008)); public_tags.emplace("HistogramExplanation", Tag(0x0060, 0x3010)); public_tags.emplace("HistogramData", Tag(0x0060, 0x3020)); } } }odil-0.11.0/src/odil/registry_0060.h000066400000000000000000000017661362244656000167460ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0060 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0060 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const HistogramSequence(0x0060, 0x3000); Tag const HistogramNumberOfBins(0x0060, 0x3002); Tag const HistogramFirstBinValue(0x0060, 0x3004); Tag const HistogramLastBinValue(0x0060, 0x3006); Tag const HistogramBinWidth(0x0060, 0x3008); Tag const HistogramExplanation(0x0060, 0x3010); Tag const HistogramData(0x0060, 0x3020); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0060odil-0.11.0/src/odil/registry_0062.cpp000066400000000000000000000122261362244656000172740ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0062( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0062, 0x0001), ElementsDictionaryEntry("Segmentation Type", "SegmentationType", "CS", "1")); public_dictionary.emplace(Tag(0x0062, 0x0002), ElementsDictionaryEntry("Segment Sequence", "SegmentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0062, 0x0003), ElementsDictionaryEntry("Segmented Property Category Code Sequence", "SegmentedPropertyCategoryCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0062, 0x0004), ElementsDictionaryEntry("Segment Number", "SegmentNumber", "US", "1")); public_dictionary.emplace(Tag(0x0062, 0x0005), ElementsDictionaryEntry("Segment Label", "SegmentLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0062, 0x0006), ElementsDictionaryEntry("Segment Description", "SegmentDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0062, 0x0007), ElementsDictionaryEntry("Segmentation Algorithm Identification Sequence", "SegmentationAlgorithmIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0062, 0x0008), ElementsDictionaryEntry("Segment Algorithm Type", "SegmentAlgorithmType", "CS", "1")); public_dictionary.emplace(Tag(0x0062, 0x0009), ElementsDictionaryEntry("Segment Algorithm Name", "SegmentAlgorithmName", "LO", "1")); public_dictionary.emplace(Tag(0x0062, 0x000a), ElementsDictionaryEntry("Segment Identification Sequence", "SegmentIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0062, 0x000b), ElementsDictionaryEntry("Referenced Segment Number", "ReferencedSegmentNumber", "US", "1-n")); public_dictionary.emplace(Tag(0x0062, 0x000c), ElementsDictionaryEntry("Recommended Display Grayscale Value", "RecommendedDisplayGrayscaleValue", "US", "1")); public_dictionary.emplace(Tag(0x0062, 0x000d), ElementsDictionaryEntry("Recommended Display CIELab Value", "RecommendedDisplayCIELabValue", "US", "3")); public_dictionary.emplace(Tag(0x0062, 0x000e), ElementsDictionaryEntry("Maximum Fractional Value", "MaximumFractionalValue", "US", "1")); public_dictionary.emplace(Tag(0x0062, 0x000f), ElementsDictionaryEntry("Segmented Property Type Code Sequence", "SegmentedPropertyTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0062, 0x0010), ElementsDictionaryEntry("Segmentation Fractional Type", "SegmentationFractionalType", "CS", "1")); public_dictionary.emplace(Tag(0x0062, 0x0011), ElementsDictionaryEntry("Segmented Property Type Modifier Code Sequence", "SegmentedPropertyTypeModifierCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0062, 0x0012), ElementsDictionaryEntry("Used Segments Sequence", "UsedSegmentsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0062, 0x0013), ElementsDictionaryEntry("Segments Overlap", "SegmentsOverlap", "CS", "1")); public_dictionary.emplace(Tag(0x0062, 0x0020), ElementsDictionaryEntry("Tracking ID", "TrackingID", "UT", "1")); public_dictionary.emplace(Tag(0x0062, 0x0021), ElementsDictionaryEntry("Tracking UID", "TrackingUID", "UI", "1")); public_tags.emplace("SegmentationType", Tag(0x0062, 0x0001)); public_tags.emplace("SegmentSequence", Tag(0x0062, 0x0002)); public_tags.emplace("SegmentedPropertyCategoryCodeSequence", Tag(0x0062, 0x0003)); public_tags.emplace("SegmentNumber", Tag(0x0062, 0x0004)); public_tags.emplace("SegmentLabel", Tag(0x0062, 0x0005)); public_tags.emplace("SegmentDescription", Tag(0x0062, 0x0006)); public_tags.emplace("SegmentationAlgorithmIdentificationSequence", Tag(0x0062, 0x0007)); public_tags.emplace("SegmentAlgorithmType", Tag(0x0062, 0x0008)); public_tags.emplace("SegmentAlgorithmName", Tag(0x0062, 0x0009)); public_tags.emplace("SegmentIdentificationSequence", Tag(0x0062, 0x000a)); public_tags.emplace("ReferencedSegmentNumber", Tag(0x0062, 0x000b)); public_tags.emplace("RecommendedDisplayGrayscaleValue", Tag(0x0062, 0x000c)); public_tags.emplace("RecommendedDisplayCIELabValue", Tag(0x0062, 0x000d)); public_tags.emplace("MaximumFractionalValue", Tag(0x0062, 0x000e)); public_tags.emplace("SegmentedPropertyTypeCodeSequence", Tag(0x0062, 0x000f)); public_tags.emplace("SegmentationFractionalType", Tag(0x0062, 0x0010)); public_tags.emplace("SegmentedPropertyTypeModifierCodeSequence", Tag(0x0062, 0x0011)); public_tags.emplace("UsedSegmentsSequence", Tag(0x0062, 0x0012)); public_tags.emplace("SegmentsOverlap", Tag(0x0062, 0x0013)); public_tags.emplace("TrackingID", Tag(0x0062, 0x0020)); public_tags.emplace("TrackingUID", Tag(0x0062, 0x0021)); } } }odil-0.11.0/src/odil/registry_0062.h000066400000000000000000000033401362244656000167360ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0062 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0062 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const SegmentationType(0x0062, 0x0001); Tag const SegmentSequence(0x0062, 0x0002); Tag const SegmentedPropertyCategoryCodeSequence(0x0062, 0x0003); Tag const SegmentNumber(0x0062, 0x0004); Tag const SegmentLabel(0x0062, 0x0005); Tag const SegmentDescription(0x0062, 0x0006); Tag const SegmentationAlgorithmIdentificationSequence(0x0062, 0x0007); Tag const SegmentAlgorithmType(0x0062, 0x0008); Tag const SegmentAlgorithmName(0x0062, 0x0009); Tag const SegmentIdentificationSequence(0x0062, 0x000a); Tag const ReferencedSegmentNumber(0x0062, 0x000b); Tag const RecommendedDisplayGrayscaleValue(0x0062, 0x000c); Tag const RecommendedDisplayCIELabValue(0x0062, 0x000d); Tag const MaximumFractionalValue(0x0062, 0x000e); Tag const SegmentedPropertyTypeCodeSequence(0x0062, 0x000f); Tag const SegmentationFractionalType(0x0062, 0x0010); Tag const SegmentedPropertyTypeModifierCodeSequence(0x0062, 0x0011); Tag const UsedSegmentsSequence(0x0062, 0x0012); Tag const SegmentsOverlap(0x0062, 0x0013); Tag const TrackingID(0x0062, 0x0020); Tag const TrackingUID(0x0062, 0x0021); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0062odil-0.11.0/src/odil/registry_0064.cpp000066400000000000000000000047231362244656000173010ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0064( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0064, 0x0002), ElementsDictionaryEntry("Deformable Registration Sequence", "DeformableRegistrationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0064, 0x0003), ElementsDictionaryEntry("Source Frame of Reference UID", "SourceFrameOfReferenceUID", "UI", "1")); public_dictionary.emplace(Tag(0x0064, 0x0005), ElementsDictionaryEntry("Deformable Registration Grid Sequence", "DeformableRegistrationGridSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0064, 0x0007), ElementsDictionaryEntry("Grid Dimensions", "GridDimensions", "UL", "3")); public_dictionary.emplace(Tag(0x0064, 0x0008), ElementsDictionaryEntry("Grid Resolution", "GridResolution", "FD", "3")); public_dictionary.emplace(Tag(0x0064, 0x0009), ElementsDictionaryEntry("Vector Grid Data", "VectorGridData", "OF", "1")); public_dictionary.emplace(Tag(0x0064, 0x000f), ElementsDictionaryEntry("Pre Deformation Matrix Registration Sequence", "PreDeformationMatrixRegistrationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0064, 0x0010), ElementsDictionaryEntry("Post Deformation Matrix Registration Sequence", "PostDeformationMatrixRegistrationSequence", "SQ", "1")); public_tags.emplace("DeformableRegistrationSequence", Tag(0x0064, 0x0002)); public_tags.emplace("SourceFrameOfReferenceUID", Tag(0x0064, 0x0003)); public_tags.emplace("DeformableRegistrationGridSequence", Tag(0x0064, 0x0005)); public_tags.emplace("GridDimensions", Tag(0x0064, 0x0007)); public_tags.emplace("GridResolution", Tag(0x0064, 0x0008)); public_tags.emplace("VectorGridData", Tag(0x0064, 0x0009)); public_tags.emplace("PreDeformationMatrixRegistrationSequence", Tag(0x0064, 0x000f)); public_tags.emplace("PostDeformationMatrixRegistrationSequence", Tag(0x0064, 0x0010)); } } }odil-0.11.0/src/odil/registry_0064.h000066400000000000000000000021431362244656000167400ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0064 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0064 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const DeformableRegistrationSequence(0x0064, 0x0002); Tag const SourceFrameOfReferenceUID(0x0064, 0x0003); Tag const DeformableRegistrationGridSequence(0x0064, 0x0005); Tag const GridDimensions(0x0064, 0x0007); Tag const GridResolution(0x0064, 0x0008); Tag const VectorGridData(0x0064, 0x0009); Tag const PreDeformationMatrixRegistrationSequence(0x0064, 0x000f); Tag const PostDeformationMatrixRegistrationSequence(0x0064, 0x0010); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0064odil-0.11.0/src/odil/registry_0066.cpp000066400000000000000000000353671362244656000173130ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0066( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0066, 0x0001), ElementsDictionaryEntry("Number of Surfaces", "NumberOfSurfaces", "UL", "1")); public_dictionary.emplace(Tag(0x0066, 0x0002), ElementsDictionaryEntry("Surface Sequence", "SurfaceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0003), ElementsDictionaryEntry("Surface Number", "SurfaceNumber", "UL", "1")); public_dictionary.emplace(Tag(0x0066, 0x0004), ElementsDictionaryEntry("Surface Comments", "SurfaceComments", "LT", "1")); public_dictionary.emplace(Tag(0x0066, 0x0009), ElementsDictionaryEntry("Surface Processing", "SurfaceProcessing", "CS", "1")); public_dictionary.emplace(Tag(0x0066, 0x000a), ElementsDictionaryEntry("Surface Processing Ratio", "SurfaceProcessingRatio", "FL", "1")); public_dictionary.emplace(Tag(0x0066, 0x000b), ElementsDictionaryEntry("Surface Processing Description", "SurfaceProcessingDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0066, 0x000c), ElementsDictionaryEntry("Recommended Presentation Opacity", "RecommendedPresentationOpacity", "FL", "1")); public_dictionary.emplace(Tag(0x0066, 0x000d), ElementsDictionaryEntry("Recommended Presentation Type", "RecommendedPresentationType", "CS", "1")); public_dictionary.emplace(Tag(0x0066, 0x000e), ElementsDictionaryEntry("Finite Volume", "FiniteVolume", "CS", "1")); public_dictionary.emplace(Tag(0x0066, 0x0010), ElementsDictionaryEntry("Manifold", "Manifold", "CS", "1")); public_dictionary.emplace(Tag(0x0066, 0x0011), ElementsDictionaryEntry("Surface Points Sequence", "SurfacePointsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0012), ElementsDictionaryEntry("Surface Points Normals Sequence", "SurfacePointsNormalsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0013), ElementsDictionaryEntry("Surface Mesh Primitives Sequence", "SurfaceMeshPrimitivesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0015), ElementsDictionaryEntry("Number of Surface Points", "NumberOfSurfacePoints", "UL", "1")); public_dictionary.emplace(Tag(0x0066, 0x0016), ElementsDictionaryEntry("Point Coordinates Data", "PointCoordinatesData", "OF", "1")); public_dictionary.emplace(Tag(0x0066, 0x0017), ElementsDictionaryEntry("Point Position Accuracy", "PointPositionAccuracy", "FL", "3")); public_dictionary.emplace(Tag(0x0066, 0x0018), ElementsDictionaryEntry("Mean Point Distance", "MeanPointDistance", "FL", "1")); public_dictionary.emplace(Tag(0x0066, 0x0019), ElementsDictionaryEntry("Maximum Point Distance", "MaximumPointDistance", "FL", "1")); public_dictionary.emplace(Tag(0x0066, 0x001a), ElementsDictionaryEntry("Points Bounding Box Coordinates", "PointsBoundingBoxCoordinates", "FL", "6")); public_dictionary.emplace(Tag(0x0066, 0x001b), ElementsDictionaryEntry("Axis of Rotation", "AxisOfRotation", "FL", "3")); public_dictionary.emplace(Tag(0x0066, 0x001c), ElementsDictionaryEntry("Center of Rotation", "CenterOfRotation", "FL", "3")); public_dictionary.emplace(Tag(0x0066, 0x001e), ElementsDictionaryEntry("Number of Vectors", "NumberOfVectors", "UL", "1")); public_dictionary.emplace(Tag(0x0066, 0x001f), ElementsDictionaryEntry("Vector Dimensionality", "VectorDimensionality", "US", "1")); public_dictionary.emplace(Tag(0x0066, 0x0020), ElementsDictionaryEntry("Vector Accuracy", "VectorAccuracy", "FL", "1-n")); public_dictionary.emplace(Tag(0x0066, 0x0021), ElementsDictionaryEntry("Vector Coordinate Data", "VectorCoordinateData", "OF", "1")); public_dictionary.emplace(Tag(0x0066, 0x0023), ElementsDictionaryEntry("Triangle Point Index List", "TrianglePointIndexList", "OW", "1")); public_dictionary.emplace(Tag(0x0066, 0x0024), ElementsDictionaryEntry("Edge Point Index List", "EdgePointIndexList", "OW", "1")); public_dictionary.emplace(Tag(0x0066, 0x0025), ElementsDictionaryEntry("Vertex Point Index List", "VertexPointIndexList", "OW", "1")); public_dictionary.emplace(Tag(0x0066, 0x0026), ElementsDictionaryEntry("Triangle Strip Sequence", "TriangleStripSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0027), ElementsDictionaryEntry("Triangle Fan Sequence", "TriangleFanSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0028), ElementsDictionaryEntry("Line Sequence", "LineSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0029), ElementsDictionaryEntry("Primitive Point Index List", "PrimitivePointIndexList", "OW", "1")); public_dictionary.emplace(Tag(0x0066, 0x002a), ElementsDictionaryEntry("Surface Count", "SurfaceCount", "UL", "1")); public_dictionary.emplace(Tag(0x0066, 0x002b), ElementsDictionaryEntry("Referenced Surface Sequence", "ReferencedSurfaceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x002c), ElementsDictionaryEntry("Referenced Surface Number", "ReferencedSurfaceNumber", "UL", "1")); public_dictionary.emplace(Tag(0x0066, 0x002d), ElementsDictionaryEntry("Segment Surface Generation Algorithm Identification Sequence", "SegmentSurfaceGenerationAlgorithmIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x002e), ElementsDictionaryEntry("Segment Surface Source Instance Sequence", "SegmentSurfaceSourceInstanceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x002f), ElementsDictionaryEntry("Algorithm Family Code Sequence", "AlgorithmFamilyCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0030), ElementsDictionaryEntry("Algorithm Name Code Sequence", "AlgorithmNameCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0031), ElementsDictionaryEntry("Algorithm Version", "AlgorithmVersion", "LO", "1")); public_dictionary.emplace(Tag(0x0066, 0x0032), ElementsDictionaryEntry("Algorithm Parameters", "AlgorithmParameters", "LT", "1")); public_dictionary.emplace(Tag(0x0066, 0x0034), ElementsDictionaryEntry("Facet Sequence", "FacetSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0035), ElementsDictionaryEntry("Surface Processing Algorithm Identification Sequence", "SurfaceProcessingAlgorithmIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0036), ElementsDictionaryEntry("Algorithm Name", "AlgorithmName", "LO", "1")); public_dictionary.emplace(Tag(0x0066, 0x0037), ElementsDictionaryEntry("Recommended Point Radius", "RecommendedPointRadius", "FL", "1")); public_dictionary.emplace(Tag(0x0066, 0x0038), ElementsDictionaryEntry("Recommended Line Thickness", "RecommendedLineThickness", "FL", "1")); public_dictionary.emplace(Tag(0x0066, 0x0040), ElementsDictionaryEntry("Long Primitive Point Index List", "LongPrimitivePointIndexList", "OL", "1")); public_dictionary.emplace(Tag(0x0066, 0x0041), ElementsDictionaryEntry("Long Triangle Point Index List", "LongTrianglePointIndexList", "OL", "1")); public_dictionary.emplace(Tag(0x0066, 0x0042), ElementsDictionaryEntry("Long Edge Point Index List", "LongEdgePointIndexList", "OL", "1")); public_dictionary.emplace(Tag(0x0066, 0x0043), ElementsDictionaryEntry("Long Vertex Point Index List", "LongVertexPointIndexList", "OL", "1")); public_dictionary.emplace(Tag(0x0066, 0x0101), ElementsDictionaryEntry("Track Set Sequence", "TrackSetSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0102), ElementsDictionaryEntry("Track Sequence", "TrackSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0103), ElementsDictionaryEntry("Recommended Display CIELab Value List", "RecommendedDisplayCIELabValueList", "OW", "1")); public_dictionary.emplace(Tag(0x0066, 0x0104), ElementsDictionaryEntry("Tracking Algorithm Identification Sequence", "TrackingAlgorithmIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0105), ElementsDictionaryEntry("Track Set Number", "TrackSetNumber", "UL", "1")); public_dictionary.emplace(Tag(0x0066, 0x0106), ElementsDictionaryEntry("Track Set Label", "TrackSetLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0066, 0x0107), ElementsDictionaryEntry("Track Set Description", "TrackSetDescription", "UT", "1")); public_dictionary.emplace(Tag(0x0066, 0x0108), ElementsDictionaryEntry("Track Set Anatomical Type Code Sequence", "TrackSetAnatomicalTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0121), ElementsDictionaryEntry("Measurements Sequence", "MeasurementsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0124), ElementsDictionaryEntry("Track Set Statistics Sequence", "TrackSetStatisticsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0125), ElementsDictionaryEntry("Floating Point Values", "FloatingPointValues", "OF", "1")); public_dictionary.emplace(Tag(0x0066, 0x0129), ElementsDictionaryEntry("Track Point Index List", "TrackPointIndexList", "OL", "1")); public_dictionary.emplace(Tag(0x0066, 0x0130), ElementsDictionaryEntry("Track Statistics Sequence", "TrackStatisticsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0132), ElementsDictionaryEntry("Measurement Values Sequence", "MeasurementValuesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0133), ElementsDictionaryEntry("Diffusion Acquisition Code Sequence", "DiffusionAcquisitionCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0066, 0x0134), ElementsDictionaryEntry("Diffusion Model Code Sequence", "DiffusionModelCodeSequence", "SQ", "1")); public_tags.emplace("NumberOfSurfaces", Tag(0x0066, 0x0001)); public_tags.emplace("SurfaceSequence", Tag(0x0066, 0x0002)); public_tags.emplace("SurfaceNumber", Tag(0x0066, 0x0003)); public_tags.emplace("SurfaceComments", Tag(0x0066, 0x0004)); public_tags.emplace("SurfaceProcessing", Tag(0x0066, 0x0009)); public_tags.emplace("SurfaceProcessingRatio", Tag(0x0066, 0x000a)); public_tags.emplace("SurfaceProcessingDescription", Tag(0x0066, 0x000b)); public_tags.emplace("RecommendedPresentationOpacity", Tag(0x0066, 0x000c)); public_tags.emplace("RecommendedPresentationType", Tag(0x0066, 0x000d)); public_tags.emplace("FiniteVolume", Tag(0x0066, 0x000e)); public_tags.emplace("Manifold", Tag(0x0066, 0x0010)); public_tags.emplace("SurfacePointsSequence", Tag(0x0066, 0x0011)); public_tags.emplace("SurfacePointsNormalsSequence", Tag(0x0066, 0x0012)); public_tags.emplace("SurfaceMeshPrimitivesSequence", Tag(0x0066, 0x0013)); public_tags.emplace("NumberOfSurfacePoints", Tag(0x0066, 0x0015)); public_tags.emplace("PointCoordinatesData", Tag(0x0066, 0x0016)); public_tags.emplace("PointPositionAccuracy", Tag(0x0066, 0x0017)); public_tags.emplace("MeanPointDistance", Tag(0x0066, 0x0018)); public_tags.emplace("MaximumPointDistance", Tag(0x0066, 0x0019)); public_tags.emplace("PointsBoundingBoxCoordinates", Tag(0x0066, 0x001a)); public_tags.emplace("AxisOfRotation", Tag(0x0066, 0x001b)); public_tags.emplace("CenterOfRotation", Tag(0x0066, 0x001c)); public_tags.emplace("NumberOfVectors", Tag(0x0066, 0x001e)); public_tags.emplace("VectorDimensionality", Tag(0x0066, 0x001f)); public_tags.emplace("VectorAccuracy", Tag(0x0066, 0x0020)); public_tags.emplace("VectorCoordinateData", Tag(0x0066, 0x0021)); public_tags.emplace("TrianglePointIndexList", Tag(0x0066, 0x0023)); public_tags.emplace("EdgePointIndexList", Tag(0x0066, 0x0024)); public_tags.emplace("VertexPointIndexList", Tag(0x0066, 0x0025)); public_tags.emplace("TriangleStripSequence", Tag(0x0066, 0x0026)); public_tags.emplace("TriangleFanSequence", Tag(0x0066, 0x0027)); public_tags.emplace("LineSequence", Tag(0x0066, 0x0028)); public_tags.emplace("PrimitivePointIndexList", Tag(0x0066, 0x0029)); public_tags.emplace("SurfaceCount", Tag(0x0066, 0x002a)); public_tags.emplace("ReferencedSurfaceSequence", Tag(0x0066, 0x002b)); public_tags.emplace("ReferencedSurfaceNumber", Tag(0x0066, 0x002c)); public_tags.emplace("SegmentSurfaceGenerationAlgorithmIdentificationSequence", Tag(0x0066, 0x002d)); public_tags.emplace("SegmentSurfaceSourceInstanceSequence", Tag(0x0066, 0x002e)); public_tags.emplace("AlgorithmFamilyCodeSequence", Tag(0x0066, 0x002f)); public_tags.emplace("AlgorithmNameCodeSequence", Tag(0x0066, 0x0030)); public_tags.emplace("AlgorithmVersion", Tag(0x0066, 0x0031)); public_tags.emplace("AlgorithmParameters", Tag(0x0066, 0x0032)); public_tags.emplace("FacetSequence", Tag(0x0066, 0x0034)); public_tags.emplace("SurfaceProcessingAlgorithmIdentificationSequence", Tag(0x0066, 0x0035)); public_tags.emplace("AlgorithmName", Tag(0x0066, 0x0036)); public_tags.emplace("RecommendedPointRadius", Tag(0x0066, 0x0037)); public_tags.emplace("RecommendedLineThickness", Tag(0x0066, 0x0038)); public_tags.emplace("LongPrimitivePointIndexList", Tag(0x0066, 0x0040)); public_tags.emplace("LongTrianglePointIndexList", Tag(0x0066, 0x0041)); public_tags.emplace("LongEdgePointIndexList", Tag(0x0066, 0x0042)); public_tags.emplace("LongVertexPointIndexList", Tag(0x0066, 0x0043)); public_tags.emplace("TrackSetSequence", Tag(0x0066, 0x0101)); public_tags.emplace("TrackSequence", Tag(0x0066, 0x0102)); public_tags.emplace("RecommendedDisplayCIELabValueList", Tag(0x0066, 0x0103)); public_tags.emplace("TrackingAlgorithmIdentificationSequence", Tag(0x0066, 0x0104)); public_tags.emplace("TrackSetNumber", Tag(0x0066, 0x0105)); public_tags.emplace("TrackSetLabel", Tag(0x0066, 0x0106)); public_tags.emplace("TrackSetDescription", Tag(0x0066, 0x0107)); public_tags.emplace("TrackSetAnatomicalTypeCodeSequence", Tag(0x0066, 0x0108)); public_tags.emplace("MeasurementsSequence", Tag(0x0066, 0x0121)); public_tags.emplace("TrackSetStatisticsSequence", Tag(0x0066, 0x0124)); public_tags.emplace("FloatingPointValues", Tag(0x0066, 0x0125)); public_tags.emplace("TrackPointIndexList", Tag(0x0066, 0x0129)); public_tags.emplace("TrackStatisticsSequence", Tag(0x0066, 0x0130)); public_tags.emplace("MeasurementValuesSequence", Tag(0x0066, 0x0132)); public_tags.emplace("DiffusionAcquisitionCodeSequence", Tag(0x0066, 0x0133)); public_tags.emplace("DiffusionModelCodeSequence", Tag(0x0066, 0x0134)); } } }odil-0.11.0/src/odil/registry_0066.h000066400000000000000000000077011362244656000167470ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0066 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0066 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const NumberOfSurfaces(0x0066, 0x0001); Tag const SurfaceSequence(0x0066, 0x0002); Tag const SurfaceNumber(0x0066, 0x0003); Tag const SurfaceComments(0x0066, 0x0004); Tag const SurfaceProcessing(0x0066, 0x0009); Tag const SurfaceProcessingRatio(0x0066, 0x000a); Tag const SurfaceProcessingDescription(0x0066, 0x000b); Tag const RecommendedPresentationOpacity(0x0066, 0x000c); Tag const RecommendedPresentationType(0x0066, 0x000d); Tag const FiniteVolume(0x0066, 0x000e); Tag const Manifold(0x0066, 0x0010); Tag const SurfacePointsSequence(0x0066, 0x0011); Tag const SurfacePointsNormalsSequence(0x0066, 0x0012); Tag const SurfaceMeshPrimitivesSequence(0x0066, 0x0013); Tag const NumberOfSurfacePoints(0x0066, 0x0015); Tag const PointCoordinatesData(0x0066, 0x0016); Tag const PointPositionAccuracy(0x0066, 0x0017); Tag const MeanPointDistance(0x0066, 0x0018); Tag const MaximumPointDistance(0x0066, 0x0019); Tag const PointsBoundingBoxCoordinates(0x0066, 0x001a); Tag const AxisOfRotation(0x0066, 0x001b); Tag const CenterOfRotation(0x0066, 0x001c); Tag const NumberOfVectors(0x0066, 0x001e); Tag const VectorDimensionality(0x0066, 0x001f); Tag const VectorAccuracy(0x0066, 0x0020); Tag const VectorCoordinateData(0x0066, 0x0021); Tag const TrianglePointIndexList(0x0066, 0x0023); Tag const EdgePointIndexList(0x0066, 0x0024); Tag const VertexPointIndexList(0x0066, 0x0025); Tag const TriangleStripSequence(0x0066, 0x0026); Tag const TriangleFanSequence(0x0066, 0x0027); Tag const LineSequence(0x0066, 0x0028); Tag const PrimitivePointIndexList(0x0066, 0x0029); Tag const SurfaceCount(0x0066, 0x002a); Tag const ReferencedSurfaceSequence(0x0066, 0x002b); Tag const ReferencedSurfaceNumber(0x0066, 0x002c); Tag const SegmentSurfaceGenerationAlgorithmIdentificationSequence(0x0066, 0x002d); Tag const SegmentSurfaceSourceInstanceSequence(0x0066, 0x002e); Tag const AlgorithmFamilyCodeSequence(0x0066, 0x002f); Tag const AlgorithmNameCodeSequence(0x0066, 0x0030); Tag const AlgorithmVersion(0x0066, 0x0031); Tag const AlgorithmParameters(0x0066, 0x0032); Tag const FacetSequence(0x0066, 0x0034); Tag const SurfaceProcessingAlgorithmIdentificationSequence(0x0066, 0x0035); Tag const AlgorithmName(0x0066, 0x0036); Tag const RecommendedPointRadius(0x0066, 0x0037); Tag const RecommendedLineThickness(0x0066, 0x0038); Tag const LongPrimitivePointIndexList(0x0066, 0x0040); Tag const LongTrianglePointIndexList(0x0066, 0x0041); Tag const LongEdgePointIndexList(0x0066, 0x0042); Tag const LongVertexPointIndexList(0x0066, 0x0043); Tag const TrackSetSequence(0x0066, 0x0101); Tag const TrackSequence(0x0066, 0x0102); Tag const RecommendedDisplayCIELabValueList(0x0066, 0x0103); Tag const TrackingAlgorithmIdentificationSequence(0x0066, 0x0104); Tag const TrackSetNumber(0x0066, 0x0105); Tag const TrackSetLabel(0x0066, 0x0106); Tag const TrackSetDescription(0x0066, 0x0107); Tag const TrackSetAnatomicalTypeCodeSequence(0x0066, 0x0108); Tag const MeasurementsSequence(0x0066, 0x0121); Tag const TrackSetStatisticsSequence(0x0066, 0x0124); Tag const FloatingPointValues(0x0066, 0x0125); Tag const TrackPointIndexList(0x0066, 0x0129); Tag const TrackStatisticsSequence(0x0066, 0x0130); Tag const MeasurementValuesSequence(0x0066, 0x0132); Tag const DiffusionAcquisitionCodeSequence(0x0066, 0x0133); Tag const DiffusionModelCodeSequence(0x0066, 0x0134); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0066odil-0.11.0/src/odil/registry_0068.cpp000066400000000000000000000412021362244656000172760ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0068( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0068, 0x6210), ElementsDictionaryEntry("Implant Size", "ImplantSize", "LO", "1")); public_dictionary.emplace(Tag(0x0068, 0x6221), ElementsDictionaryEntry("Implant Template Version", "ImplantTemplateVersion", "LO", "1")); public_dictionary.emplace(Tag(0x0068, 0x6222), ElementsDictionaryEntry("Replaced Implant Template Sequence", "ReplacedImplantTemplateSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6223), ElementsDictionaryEntry("Implant Type", "ImplantType", "CS", "1")); public_dictionary.emplace(Tag(0x0068, 0x6224), ElementsDictionaryEntry("Derivation Implant Template Sequence", "DerivationImplantTemplateSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6225), ElementsDictionaryEntry("Original Implant Template Sequence", "OriginalImplantTemplateSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6226), ElementsDictionaryEntry("Effective DateTime", "EffectiveDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0068, 0x6230), ElementsDictionaryEntry("Implant Target Anatomy Sequence", "ImplantTargetAnatomySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6260), ElementsDictionaryEntry("Information From Manufacturer Sequence", "InformationFromManufacturerSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6265), ElementsDictionaryEntry("Notification From Manufacturer Sequence", "NotificationFromManufacturerSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6270), ElementsDictionaryEntry("Information Issue DateTime", "InformationIssueDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0068, 0x6280), ElementsDictionaryEntry("Information Summary", "InformationSummary", "ST", "1")); public_dictionary.emplace(Tag(0x0068, 0x62a0), ElementsDictionaryEntry("Implant Regulatory Disapproval Code Sequence", "ImplantRegulatoryDisapprovalCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x62a5), ElementsDictionaryEntry("Overall Template Spatial Tolerance", "OverallTemplateSpatialTolerance", "FD", "1")); public_dictionary.emplace(Tag(0x0068, 0x62c0), ElementsDictionaryEntry("HPGL Document Sequence", "HPGLDocumentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x62d0), ElementsDictionaryEntry("HPGL Document ID", "HPGLDocumentID", "US", "1")); public_dictionary.emplace(Tag(0x0068, 0x62d5), ElementsDictionaryEntry("HPGL Document Label", "HPGLDocumentLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0068, 0x62e0), ElementsDictionaryEntry("View Orientation Code Sequence", "ViewOrientationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x62f0), ElementsDictionaryEntry("View Orientation Modifier Code Sequence", "ViewOrientationModifierCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x62f2), ElementsDictionaryEntry("HPGL Document Scaling", "HPGLDocumentScaling", "FD", "1")); public_dictionary.emplace(Tag(0x0068, 0x6300), ElementsDictionaryEntry("HPGL Document", "HPGLDocument", "OB", "1")); public_dictionary.emplace(Tag(0x0068, 0x6310), ElementsDictionaryEntry("HPGL Contour Pen Number", "HPGLContourPenNumber", "US", "1")); public_dictionary.emplace(Tag(0x0068, 0x6320), ElementsDictionaryEntry("HPGL Pen Sequence", "HPGLPenSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6330), ElementsDictionaryEntry("HPGL Pen Number", "HPGLPenNumber", "US", "1")); public_dictionary.emplace(Tag(0x0068, 0x6340), ElementsDictionaryEntry("HPGL Pen Label", "HPGLPenLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0068, 0x6345), ElementsDictionaryEntry("HPGL Pen Description", "HPGLPenDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0068, 0x6346), ElementsDictionaryEntry("Recommended Rotation Point", "RecommendedRotationPoint", "FD", "2")); public_dictionary.emplace(Tag(0x0068, 0x6347), ElementsDictionaryEntry("Bounding Rectangle", "BoundingRectangle", "FD", "4")); public_dictionary.emplace(Tag(0x0068, 0x6350), ElementsDictionaryEntry("Implant Template 3D Model Surface Number", "ImplantTemplate3DModelSurfaceNumber", "US", "1-n")); public_dictionary.emplace(Tag(0x0068, 0x6360), ElementsDictionaryEntry("Surface Model Description Sequence", "SurfaceModelDescriptionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6380), ElementsDictionaryEntry("Surface Model Label", "SurfaceModelLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0068, 0x6390), ElementsDictionaryEntry("Surface Model Scaling Factor", "SurfaceModelScalingFactor", "FD", "1")); public_dictionary.emplace(Tag(0x0068, 0x63a0), ElementsDictionaryEntry("Materials Code Sequence", "MaterialsCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x63a4), ElementsDictionaryEntry("Coating Materials Code Sequence", "CoatingMaterialsCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x63a8), ElementsDictionaryEntry("Implant Type Code Sequence", "ImplantTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x63ac), ElementsDictionaryEntry("Fixation Method Code Sequence", "FixationMethodCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x63b0), ElementsDictionaryEntry("Mating Feature Sets Sequence", "MatingFeatureSetsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x63c0), ElementsDictionaryEntry("Mating Feature Set ID", "MatingFeatureSetID", "US", "1")); public_dictionary.emplace(Tag(0x0068, 0x63d0), ElementsDictionaryEntry("Mating Feature Set Label", "MatingFeatureSetLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0068, 0x63e0), ElementsDictionaryEntry("Mating Feature Sequence", "MatingFeatureSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x63f0), ElementsDictionaryEntry("Mating Feature ID", "MatingFeatureID", "US", "1")); public_dictionary.emplace(Tag(0x0068, 0x6400), ElementsDictionaryEntry("Mating Feature Degree of Freedom Sequence", "MatingFeatureDegreeOfFreedomSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6410), ElementsDictionaryEntry("Degree of Freedom ID", "DegreeOfFreedomID", "US", "1")); public_dictionary.emplace(Tag(0x0068, 0x6420), ElementsDictionaryEntry("Degree of Freedom Type", "DegreeOfFreedomType", "CS", "1")); public_dictionary.emplace(Tag(0x0068, 0x6430), ElementsDictionaryEntry("2D Mating Feature Coordinates Sequence", "TwoDMatingFeatureCoordinatesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6440), ElementsDictionaryEntry("Referenced HPGL Document ID", "ReferencedHPGLDocumentID", "US", "1")); public_dictionary.emplace(Tag(0x0068, 0x6450), ElementsDictionaryEntry("2D Mating Point", "TwoDMatingPoint", "FD", "2")); public_dictionary.emplace(Tag(0x0068, 0x6460), ElementsDictionaryEntry("2D Mating Axes", "TwoDMatingAxes", "FD", "4")); public_dictionary.emplace(Tag(0x0068, 0x6470), ElementsDictionaryEntry("2D Degree of Freedom Sequence", "TwoDDegreeOfFreedomSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6490), ElementsDictionaryEntry("3D Degree of Freedom Axis", "ThreeDDegreeOfFreedomAxis", "FD", "3")); public_dictionary.emplace(Tag(0x0068, 0x64a0), ElementsDictionaryEntry("Range of Freedom", "RangeOfFreedom", "FD", "2")); public_dictionary.emplace(Tag(0x0068, 0x64c0), ElementsDictionaryEntry("3D Mating Point", "ThreeDMatingPoint", "FD", "3")); public_dictionary.emplace(Tag(0x0068, 0x64d0), ElementsDictionaryEntry("3D Mating Axes", "ThreeDMatingAxes", "FD", "9")); public_dictionary.emplace(Tag(0x0068, 0x64f0), ElementsDictionaryEntry("2D Degree of Freedom Axis", "TwoDDegreeOfFreedomAxis", "FD", "3")); public_dictionary.emplace(Tag(0x0068, 0x6500), ElementsDictionaryEntry("Planning Landmark Point Sequence", "PlanningLandmarkPointSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6510), ElementsDictionaryEntry("Planning Landmark Line Sequence", "PlanningLandmarkLineSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6520), ElementsDictionaryEntry("Planning Landmark Plane Sequence", "PlanningLandmarkPlaneSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6530), ElementsDictionaryEntry("Planning Landmark ID", "PlanningLandmarkID", "US", "1")); public_dictionary.emplace(Tag(0x0068, 0x6540), ElementsDictionaryEntry("Planning Landmark Description", "PlanningLandmarkDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0068, 0x6545), ElementsDictionaryEntry("Planning Landmark Identification Code Sequence", "PlanningLandmarkIdentificationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6550), ElementsDictionaryEntry("2D Point Coordinates Sequence", "TwoDPointCoordinatesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x6560), ElementsDictionaryEntry("2D Point Coordinates", "TwoDPointCoordinates", "FD", "2")); public_dictionary.emplace(Tag(0x0068, 0x6590), ElementsDictionaryEntry("3D Point Coordinates", "ThreeDPointCoordinates", "FD", "3")); public_dictionary.emplace(Tag(0x0068, 0x65a0), ElementsDictionaryEntry("2D Line Coordinates Sequence", "TwoDLineCoordinatesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x65b0), ElementsDictionaryEntry("2D Line Coordinates", "TwoDLineCoordinates", "FD", "4")); public_dictionary.emplace(Tag(0x0068, 0x65d0), ElementsDictionaryEntry("3D Line Coordinates", "ThreeDLineCoordinates", "FD", "6")); public_dictionary.emplace(Tag(0x0068, 0x65e0), ElementsDictionaryEntry("2D Plane Coordinates Sequence", "TwoDPlaneCoordinatesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x65f0), ElementsDictionaryEntry("2D Plane Intersection", "TwoDPlaneIntersection", "FD", "4")); public_dictionary.emplace(Tag(0x0068, 0x6610), ElementsDictionaryEntry("3D Plane Origin", "ThreeDPlaneOrigin", "FD", "3")); public_dictionary.emplace(Tag(0x0068, 0x6620), ElementsDictionaryEntry("3D Plane Normal", "ThreeDPlaneNormal", "FD", "3")); public_dictionary.emplace(Tag(0x0068, 0x7001), ElementsDictionaryEntry("Model Modification", "ModelModification", "CS", "1")); public_dictionary.emplace(Tag(0x0068, 0x7002), ElementsDictionaryEntry("Model Mirroring", "ModelMirroring", "CS", "1")); public_dictionary.emplace(Tag(0x0068, 0x7003), ElementsDictionaryEntry("Model Usage Code Sequence", "ModelUsageCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0068, 0x7004), ElementsDictionaryEntry("Model Group UID", "ModelGroupUID", "UI", "1")); public_dictionary.emplace(Tag(0x0068, 0x7005), ElementsDictionaryEntry("Relative URI Reference Within Encapsulated Document", "RelativeURIReferenceWithinEncapsulatedDocument", "UR", "1")); public_tags.emplace("ImplantSize", Tag(0x0068, 0x6210)); public_tags.emplace("ImplantTemplateVersion", Tag(0x0068, 0x6221)); public_tags.emplace("ReplacedImplantTemplateSequence", Tag(0x0068, 0x6222)); public_tags.emplace("ImplantType", Tag(0x0068, 0x6223)); public_tags.emplace("DerivationImplantTemplateSequence", Tag(0x0068, 0x6224)); public_tags.emplace("OriginalImplantTemplateSequence", Tag(0x0068, 0x6225)); public_tags.emplace("EffectiveDateTime", Tag(0x0068, 0x6226)); public_tags.emplace("ImplantTargetAnatomySequence", Tag(0x0068, 0x6230)); public_tags.emplace("InformationFromManufacturerSequence", Tag(0x0068, 0x6260)); public_tags.emplace("NotificationFromManufacturerSequence", Tag(0x0068, 0x6265)); public_tags.emplace("InformationIssueDateTime", Tag(0x0068, 0x6270)); public_tags.emplace("InformationSummary", Tag(0x0068, 0x6280)); public_tags.emplace("ImplantRegulatoryDisapprovalCodeSequence", Tag(0x0068, 0x62a0)); public_tags.emplace("OverallTemplateSpatialTolerance", Tag(0x0068, 0x62a5)); public_tags.emplace("HPGLDocumentSequence", Tag(0x0068, 0x62c0)); public_tags.emplace("HPGLDocumentID", Tag(0x0068, 0x62d0)); public_tags.emplace("HPGLDocumentLabel", Tag(0x0068, 0x62d5)); public_tags.emplace("ViewOrientationCodeSequence", Tag(0x0068, 0x62e0)); public_tags.emplace("ViewOrientationModifierCodeSequence", Tag(0x0068, 0x62f0)); public_tags.emplace("HPGLDocumentScaling", Tag(0x0068, 0x62f2)); public_tags.emplace("HPGLDocument", Tag(0x0068, 0x6300)); public_tags.emplace("HPGLContourPenNumber", Tag(0x0068, 0x6310)); public_tags.emplace("HPGLPenSequence", Tag(0x0068, 0x6320)); public_tags.emplace("HPGLPenNumber", Tag(0x0068, 0x6330)); public_tags.emplace("HPGLPenLabel", Tag(0x0068, 0x6340)); public_tags.emplace("HPGLPenDescription", Tag(0x0068, 0x6345)); public_tags.emplace("RecommendedRotationPoint", Tag(0x0068, 0x6346)); public_tags.emplace("BoundingRectangle", Tag(0x0068, 0x6347)); public_tags.emplace("ImplantTemplate3DModelSurfaceNumber", Tag(0x0068, 0x6350)); public_tags.emplace("SurfaceModelDescriptionSequence", Tag(0x0068, 0x6360)); public_tags.emplace("SurfaceModelLabel", Tag(0x0068, 0x6380)); public_tags.emplace("SurfaceModelScalingFactor", Tag(0x0068, 0x6390)); public_tags.emplace("MaterialsCodeSequence", Tag(0x0068, 0x63a0)); public_tags.emplace("CoatingMaterialsCodeSequence", Tag(0x0068, 0x63a4)); public_tags.emplace("ImplantTypeCodeSequence", Tag(0x0068, 0x63a8)); public_tags.emplace("FixationMethodCodeSequence", Tag(0x0068, 0x63ac)); public_tags.emplace("MatingFeatureSetsSequence", Tag(0x0068, 0x63b0)); public_tags.emplace("MatingFeatureSetID", Tag(0x0068, 0x63c0)); public_tags.emplace("MatingFeatureSetLabel", Tag(0x0068, 0x63d0)); public_tags.emplace("MatingFeatureSequence", Tag(0x0068, 0x63e0)); public_tags.emplace("MatingFeatureID", Tag(0x0068, 0x63f0)); public_tags.emplace("MatingFeatureDegreeOfFreedomSequence", Tag(0x0068, 0x6400)); public_tags.emplace("DegreeOfFreedomID", Tag(0x0068, 0x6410)); public_tags.emplace("DegreeOfFreedomType", Tag(0x0068, 0x6420)); public_tags.emplace("TwoDMatingFeatureCoordinatesSequence", Tag(0x0068, 0x6430)); public_tags.emplace("ReferencedHPGLDocumentID", Tag(0x0068, 0x6440)); public_tags.emplace("TwoDMatingPoint", Tag(0x0068, 0x6450)); public_tags.emplace("TwoDMatingAxes", Tag(0x0068, 0x6460)); public_tags.emplace("TwoDDegreeOfFreedomSequence", Tag(0x0068, 0x6470)); public_tags.emplace("ThreeDDegreeOfFreedomAxis", Tag(0x0068, 0x6490)); public_tags.emplace("RangeOfFreedom", Tag(0x0068, 0x64a0)); public_tags.emplace("ThreeDMatingPoint", Tag(0x0068, 0x64c0)); public_tags.emplace("ThreeDMatingAxes", Tag(0x0068, 0x64d0)); public_tags.emplace("TwoDDegreeOfFreedomAxis", Tag(0x0068, 0x64f0)); public_tags.emplace("PlanningLandmarkPointSequence", Tag(0x0068, 0x6500)); public_tags.emplace("PlanningLandmarkLineSequence", Tag(0x0068, 0x6510)); public_tags.emplace("PlanningLandmarkPlaneSequence", Tag(0x0068, 0x6520)); public_tags.emplace("PlanningLandmarkID", Tag(0x0068, 0x6530)); public_tags.emplace("PlanningLandmarkDescription", Tag(0x0068, 0x6540)); public_tags.emplace("PlanningLandmarkIdentificationCodeSequence", Tag(0x0068, 0x6545)); public_tags.emplace("TwoDPointCoordinatesSequence", Tag(0x0068, 0x6550)); public_tags.emplace("TwoDPointCoordinates", Tag(0x0068, 0x6560)); public_tags.emplace("ThreeDPointCoordinates", Tag(0x0068, 0x6590)); public_tags.emplace("TwoDLineCoordinatesSequence", Tag(0x0068, 0x65a0)); public_tags.emplace("TwoDLineCoordinates", Tag(0x0068, 0x65b0)); public_tags.emplace("ThreeDLineCoordinates", Tag(0x0068, 0x65d0)); public_tags.emplace("TwoDPlaneCoordinatesSequence", Tag(0x0068, 0x65e0)); public_tags.emplace("TwoDPlaneIntersection", Tag(0x0068, 0x65f0)); public_tags.emplace("ThreeDPlaneOrigin", Tag(0x0068, 0x6610)); public_tags.emplace("ThreeDPlaneNormal", Tag(0x0068, 0x6620)); public_tags.emplace("ModelModification", Tag(0x0068, 0x7001)); public_tags.emplace("ModelMirroring", Tag(0x0068, 0x7002)); public_tags.emplace("ModelUsageCodeSequence", Tag(0x0068, 0x7003)); public_tags.emplace("ModelGroupUID", Tag(0x0068, 0x7004)); public_tags.emplace("RelativeURIReferenceWithinEncapsulatedDocument", Tag(0x0068, 0x7005)); } } }odil-0.11.0/src/odil/registry_0068.h000066400000000000000000000106401362244656000167450ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0068 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0068 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ImplantSize(0x0068, 0x6210); Tag const ImplantTemplateVersion(0x0068, 0x6221); Tag const ReplacedImplantTemplateSequence(0x0068, 0x6222); Tag const ImplantType(0x0068, 0x6223); Tag const DerivationImplantTemplateSequence(0x0068, 0x6224); Tag const OriginalImplantTemplateSequence(0x0068, 0x6225); Tag const EffectiveDateTime(0x0068, 0x6226); Tag const ImplantTargetAnatomySequence(0x0068, 0x6230); Tag const InformationFromManufacturerSequence(0x0068, 0x6260); Tag const NotificationFromManufacturerSequence(0x0068, 0x6265); Tag const InformationIssueDateTime(0x0068, 0x6270); Tag const InformationSummary(0x0068, 0x6280); Tag const ImplantRegulatoryDisapprovalCodeSequence(0x0068, 0x62a0); Tag const OverallTemplateSpatialTolerance(0x0068, 0x62a5); Tag const HPGLDocumentSequence(0x0068, 0x62c0); Tag const HPGLDocumentID(0x0068, 0x62d0); Tag const HPGLDocumentLabel(0x0068, 0x62d5); Tag const ViewOrientationCodeSequence(0x0068, 0x62e0); Tag const ViewOrientationModifierCodeSequence(0x0068, 0x62f0); Tag const HPGLDocumentScaling(0x0068, 0x62f2); Tag const HPGLDocument(0x0068, 0x6300); Tag const HPGLContourPenNumber(0x0068, 0x6310); Tag const HPGLPenSequence(0x0068, 0x6320); Tag const HPGLPenNumber(0x0068, 0x6330); Tag const HPGLPenLabel(0x0068, 0x6340); Tag const HPGLPenDescription(0x0068, 0x6345); Tag const RecommendedRotationPoint(0x0068, 0x6346); Tag const BoundingRectangle(0x0068, 0x6347); Tag const ImplantTemplate3DModelSurfaceNumber(0x0068, 0x6350); Tag const SurfaceModelDescriptionSequence(0x0068, 0x6360); Tag const SurfaceModelLabel(0x0068, 0x6380); Tag const SurfaceModelScalingFactor(0x0068, 0x6390); Tag const MaterialsCodeSequence(0x0068, 0x63a0); Tag const CoatingMaterialsCodeSequence(0x0068, 0x63a4); Tag const ImplantTypeCodeSequence(0x0068, 0x63a8); Tag const FixationMethodCodeSequence(0x0068, 0x63ac); Tag const MatingFeatureSetsSequence(0x0068, 0x63b0); Tag const MatingFeatureSetID(0x0068, 0x63c0); Tag const MatingFeatureSetLabel(0x0068, 0x63d0); Tag const MatingFeatureSequence(0x0068, 0x63e0); Tag const MatingFeatureID(0x0068, 0x63f0); Tag const MatingFeatureDegreeOfFreedomSequence(0x0068, 0x6400); Tag const DegreeOfFreedomID(0x0068, 0x6410); Tag const DegreeOfFreedomType(0x0068, 0x6420); Tag const TwoDMatingFeatureCoordinatesSequence(0x0068, 0x6430); Tag const ReferencedHPGLDocumentID(0x0068, 0x6440); Tag const TwoDMatingPoint(0x0068, 0x6450); Tag const TwoDMatingAxes(0x0068, 0x6460); Tag const TwoDDegreeOfFreedomSequence(0x0068, 0x6470); Tag const ThreeDDegreeOfFreedomAxis(0x0068, 0x6490); Tag const RangeOfFreedom(0x0068, 0x64a0); Tag const ThreeDMatingPoint(0x0068, 0x64c0); Tag const ThreeDMatingAxes(0x0068, 0x64d0); Tag const TwoDDegreeOfFreedomAxis(0x0068, 0x64f0); Tag const PlanningLandmarkPointSequence(0x0068, 0x6500); Tag const PlanningLandmarkLineSequence(0x0068, 0x6510); Tag const PlanningLandmarkPlaneSequence(0x0068, 0x6520); Tag const PlanningLandmarkID(0x0068, 0x6530); Tag const PlanningLandmarkDescription(0x0068, 0x6540); Tag const PlanningLandmarkIdentificationCodeSequence(0x0068, 0x6545); Tag const TwoDPointCoordinatesSequence(0x0068, 0x6550); Tag const TwoDPointCoordinates(0x0068, 0x6560); Tag const ThreeDPointCoordinates(0x0068, 0x6590); Tag const TwoDLineCoordinatesSequence(0x0068, 0x65a0); Tag const TwoDLineCoordinates(0x0068, 0x65b0); Tag const ThreeDLineCoordinates(0x0068, 0x65d0); Tag const TwoDPlaneCoordinatesSequence(0x0068, 0x65e0); Tag const TwoDPlaneIntersection(0x0068, 0x65f0); Tag const ThreeDPlaneOrigin(0x0068, 0x6610); Tag const ThreeDPlaneNormal(0x0068, 0x6620); Tag const ModelModification(0x0068, 0x7001); Tag const ModelMirroring(0x0068, 0x7002); Tag const ModelUsageCodeSequence(0x0068, 0x7003); Tag const ModelGroupUID(0x0068, 0x7004); Tag const RelativeURIReferenceWithinEncapsulatedDocument(0x0068, 0x7005); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0068odil-0.11.0/src/odil/registry_0070.cpp000066400000000000000000001173421362244656000173000ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0070( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0070, 0x0001), ElementsDictionaryEntry("Graphic Annotation Sequence", "GraphicAnnotationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0002), ElementsDictionaryEntry("Graphic Layer", "GraphicLayer", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0003), ElementsDictionaryEntry("Bounding Box Annotation Units", "BoundingBoxAnnotationUnits", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0004), ElementsDictionaryEntry("Anchor Point Annotation Units", "AnchorPointAnnotationUnits", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0005), ElementsDictionaryEntry("Graphic Annotation Units", "GraphicAnnotationUnits", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0006), ElementsDictionaryEntry("Unformatted Text Value", "UnformattedTextValue", "ST", "1")); public_dictionary.emplace(Tag(0x0070, 0x0008), ElementsDictionaryEntry("Text Object Sequence", "TextObjectSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0009), ElementsDictionaryEntry("Graphic Object Sequence", "GraphicObjectSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0010), ElementsDictionaryEntry("Bounding Box Top Left Hand Corner", "BoundingBoxTopLeftHandCorner", "FL", "2")); public_dictionary.emplace(Tag(0x0070, 0x0011), ElementsDictionaryEntry("Bounding Box Bottom Right Hand Corner", "BoundingBoxBottomRightHandCorner", "FL", "2")); public_dictionary.emplace(Tag(0x0070, 0x0012), ElementsDictionaryEntry("Bounding Box Text Horizontal Justification", "BoundingBoxTextHorizontalJustification", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0014), ElementsDictionaryEntry("Anchor Point", "AnchorPoint", "FL", "2")); public_dictionary.emplace(Tag(0x0070, 0x0015), ElementsDictionaryEntry("Anchor Point Visibility", "AnchorPointVisibility", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0020), ElementsDictionaryEntry("Graphic Dimensions", "GraphicDimensions", "US", "1")); public_dictionary.emplace(Tag(0x0070, 0x0021), ElementsDictionaryEntry("Number of Graphic Points", "NumberOfGraphicPoints", "US", "1")); public_dictionary.emplace(Tag(0x0070, 0x0022), ElementsDictionaryEntry("Graphic Data", "GraphicData", "FL", "2-n")); public_dictionary.emplace(Tag(0x0070, 0x0023), ElementsDictionaryEntry("Graphic Type", "GraphicType", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0024), ElementsDictionaryEntry("Graphic Filled", "GraphicFilled", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0040), ElementsDictionaryEntry("Image Rotation (Retired)", "ImageRotationRetired", "IS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0041), ElementsDictionaryEntry("Image Horizontal Flip", "ImageHorizontalFlip", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0042), ElementsDictionaryEntry("Image Rotation", "ImageRotation", "US", "1")); public_dictionary.emplace(Tag(0x0070, 0x0050), ElementsDictionaryEntry("Displayed Area Top Left Hand Corner (Trial)", "DisplayedAreaTopLeftHandCornerTrial", "US", "2")); public_dictionary.emplace(Tag(0x0070, 0x0051), ElementsDictionaryEntry("Displayed Area Bottom Right Hand Corner (Trial)", "DisplayedAreaBottomRightHandCornerTrial", "US", "2")); public_dictionary.emplace(Tag(0x0070, 0x0052), ElementsDictionaryEntry("Displayed Area Top Left Hand Corner", "DisplayedAreaTopLeftHandCorner", "SL", "2")); public_dictionary.emplace(Tag(0x0070, 0x0053), ElementsDictionaryEntry("Displayed Area Bottom Right Hand Corner", "DisplayedAreaBottomRightHandCorner", "SL", "2")); public_dictionary.emplace(Tag(0x0070, 0x005a), ElementsDictionaryEntry("Displayed Area Selection Sequence", "DisplayedAreaSelectionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0060), ElementsDictionaryEntry("Graphic Layer Sequence", "GraphicLayerSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0062), ElementsDictionaryEntry("Graphic Layer Order", "GraphicLayerOrder", "IS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0066), ElementsDictionaryEntry("Graphic Layer Recommended Display Grayscale Value", "GraphicLayerRecommendedDisplayGrayscaleValue", "US", "1")); public_dictionary.emplace(Tag(0x0070, 0x0067), ElementsDictionaryEntry("Graphic Layer Recommended Display RGB Value", "GraphicLayerRecommendedDisplayRGBValue", "US", "3")); public_dictionary.emplace(Tag(0x0070, 0x0068), ElementsDictionaryEntry("Graphic Layer Description", "GraphicLayerDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0070, 0x0080), ElementsDictionaryEntry("Content Label", "ContentLabel", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0081), ElementsDictionaryEntry("Content Description", "ContentDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0070, 0x0082), ElementsDictionaryEntry("Presentation Creation Date", "PresentationCreationDate", "DA", "1")); public_dictionary.emplace(Tag(0x0070, 0x0083), ElementsDictionaryEntry("Presentation Creation Time", "PresentationCreationTime", "TM", "1")); public_dictionary.emplace(Tag(0x0070, 0x0084), ElementsDictionaryEntry("Content Creator's Name", "ContentCreatorName", "PN", "1")); public_dictionary.emplace(Tag(0x0070, 0x0086), ElementsDictionaryEntry("Content Creator's Identification Code Sequence", "ContentCreatorIdentificationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0087), ElementsDictionaryEntry("Alternate Content Description Sequence", "AlternateContentDescriptionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0100), ElementsDictionaryEntry("Presentation Size Mode", "PresentationSizeMode", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0101), ElementsDictionaryEntry("Presentation Pixel Spacing", "PresentationPixelSpacing", "DS", "2")); public_dictionary.emplace(Tag(0x0070, 0x0102), ElementsDictionaryEntry("Presentation Pixel Aspect Ratio", "PresentationPixelAspectRatio", "IS", "2")); public_dictionary.emplace(Tag(0x0070, 0x0103), ElementsDictionaryEntry("Presentation Pixel Magnification Ratio", "PresentationPixelMagnificationRatio", "FL", "1")); public_dictionary.emplace(Tag(0x0070, 0x0207), ElementsDictionaryEntry("Graphic Group Label", "GraphicGroupLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0070, 0x0208), ElementsDictionaryEntry("Graphic Group Description", "GraphicGroupDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0070, 0x0209), ElementsDictionaryEntry("Compound Graphic Sequence", "CompoundGraphicSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0226), ElementsDictionaryEntry("Compound Graphic Instance ID", "CompoundGraphicInstanceID", "UL", "1")); public_dictionary.emplace(Tag(0x0070, 0x0227), ElementsDictionaryEntry("Font Name", "FontName", "LO", "1")); public_dictionary.emplace(Tag(0x0070, 0x0228), ElementsDictionaryEntry("Font Name Type", "FontNameType", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0229), ElementsDictionaryEntry("CSS Font Name", "CSSFontName", "LO", "1")); public_dictionary.emplace(Tag(0x0070, 0x0230), ElementsDictionaryEntry("Rotation Angle", "RotationAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0070, 0x0231), ElementsDictionaryEntry("Text Style Sequence", "TextStyleSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0232), ElementsDictionaryEntry("Line Style Sequence", "LineStyleSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0233), ElementsDictionaryEntry("Fill Style Sequence", "FillStyleSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0234), ElementsDictionaryEntry("Graphic Group Sequence", "GraphicGroupSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0241), ElementsDictionaryEntry("Text Color CIELab Value", "TextColorCIELabValue", "US", "3")); public_dictionary.emplace(Tag(0x0070, 0x0242), ElementsDictionaryEntry("Horizontal Alignment", "HorizontalAlignment", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0243), ElementsDictionaryEntry("Vertical Alignment", "VerticalAlignment", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0244), ElementsDictionaryEntry("Shadow Style", "ShadowStyle", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0245), ElementsDictionaryEntry("Shadow Offset X", "ShadowOffsetX", "FL", "1")); public_dictionary.emplace(Tag(0x0070, 0x0246), ElementsDictionaryEntry("Shadow Offset Y", "ShadowOffsetY", "FL", "1")); public_dictionary.emplace(Tag(0x0070, 0x0247), ElementsDictionaryEntry("Shadow Color CIELab Value", "ShadowColorCIELabValue", "US", "3")); public_dictionary.emplace(Tag(0x0070, 0x0248), ElementsDictionaryEntry("Underlined", "Underlined", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0249), ElementsDictionaryEntry("Bold", "Bold", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0250), ElementsDictionaryEntry("Italic", "Italic", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0251), ElementsDictionaryEntry("Pattern On Color CIELab Value", "PatternOnColorCIELabValue", "US", "3")); public_dictionary.emplace(Tag(0x0070, 0x0252), ElementsDictionaryEntry("Pattern Off Color CIELab Value", "PatternOffColorCIELabValue", "US", "3")); public_dictionary.emplace(Tag(0x0070, 0x0253), ElementsDictionaryEntry("Line Thickness", "LineThickness", "FL", "1")); public_dictionary.emplace(Tag(0x0070, 0x0254), ElementsDictionaryEntry("Line Dashing Style", "LineDashingStyle", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0255), ElementsDictionaryEntry("Line Pattern", "LinePattern", "UL", "1")); public_dictionary.emplace(Tag(0x0070, 0x0256), ElementsDictionaryEntry("Fill Pattern", "FillPattern", "OB", "1")); public_dictionary.emplace(Tag(0x0070, 0x0257), ElementsDictionaryEntry("Fill Mode", "FillMode", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0258), ElementsDictionaryEntry("Shadow Opacity", "ShadowOpacity", "FL", "1")); public_dictionary.emplace(Tag(0x0070, 0x0261), ElementsDictionaryEntry("Gap Length", "GapLength", "FL", "1")); public_dictionary.emplace(Tag(0x0070, 0x0262), ElementsDictionaryEntry("Diameter of Visibility", "DiameterOfVisibility", "FL", "1")); public_dictionary.emplace(Tag(0x0070, 0x0273), ElementsDictionaryEntry("Rotation Point", "RotationPoint", "FL", "2")); public_dictionary.emplace(Tag(0x0070, 0x0274), ElementsDictionaryEntry("Tick Alignment", "TickAlignment", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0278), ElementsDictionaryEntry("Show Tick Label", "ShowTickLabel", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0279), ElementsDictionaryEntry("Tick Label Alignment", "TickLabelAlignment", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0282), ElementsDictionaryEntry("Compound Graphic Units", "CompoundGraphicUnits", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0284), ElementsDictionaryEntry("Pattern On Opacity", "PatternOnOpacity", "FL", "1")); public_dictionary.emplace(Tag(0x0070, 0x0285), ElementsDictionaryEntry("Pattern Off Opacity", "PatternOffOpacity", "FL", "1")); public_dictionary.emplace(Tag(0x0070, 0x0287), ElementsDictionaryEntry("Major Ticks Sequence", "MajorTicksSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0288), ElementsDictionaryEntry("Tick Position", "TickPosition", "FL", "1")); public_dictionary.emplace(Tag(0x0070, 0x0289), ElementsDictionaryEntry("Tick Label", "TickLabel", "SH", "1")); public_dictionary.emplace(Tag(0x0070, 0x0294), ElementsDictionaryEntry("Compound Graphic Type", "CompoundGraphicType", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0295), ElementsDictionaryEntry("Graphic Group ID", "GraphicGroupID", "UL", "1")); public_dictionary.emplace(Tag(0x0070, 0x0306), ElementsDictionaryEntry("Shape Type", "ShapeType", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x0308), ElementsDictionaryEntry("Registration Sequence", "RegistrationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0309), ElementsDictionaryEntry("Matrix Registration Sequence", "MatrixRegistrationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x030a), ElementsDictionaryEntry("Matrix Sequence", "MatrixSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x030b), ElementsDictionaryEntry("Frame of Reference to Displayed Coordinate System Transformation Matrix", "FrameOfReferenceToDisplayedCoordinateSystemTransformationMatrix", "FD", "16")); public_dictionary.emplace(Tag(0x0070, 0x030c), ElementsDictionaryEntry("Frame of Reference Transformation Matrix Type", "FrameOfReferenceTransformationMatrixType", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x030d), ElementsDictionaryEntry("Registration Type Code Sequence", "RegistrationTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x030f), ElementsDictionaryEntry("Fiducial Description", "FiducialDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0070, 0x0310), ElementsDictionaryEntry("Fiducial Identifier", "FiducialIdentifier", "SH", "1")); public_dictionary.emplace(Tag(0x0070, 0x0311), ElementsDictionaryEntry("Fiducial Identifier Code Sequence", "FiducialIdentifierCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0312), ElementsDictionaryEntry("Contour Uncertainty Radius", "ContourUncertaintyRadius", "FD", "1")); public_dictionary.emplace(Tag(0x0070, 0x0314), ElementsDictionaryEntry("Used Fiducials Sequence", "UsedFiducialsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0318), ElementsDictionaryEntry("Graphic Coordinates Data Sequence", "GraphicCoordinatesDataSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x031a), ElementsDictionaryEntry("Fiducial UID", "FiducialUID", "UI", "1")); public_dictionary.emplace(Tag(0x0070, 0x031b), ElementsDictionaryEntry("Referenced Fiducial UID", "ReferencedFiducialUID", "UI", "1")); public_dictionary.emplace(Tag(0x0070, 0x031c), ElementsDictionaryEntry("Fiducial Set Sequence", "FiducialSetSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x031e), ElementsDictionaryEntry("Fiducial Sequence", "FiducialSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x031f), ElementsDictionaryEntry("Fiducials Property Category Code Sequence", "FiducialsPropertyCategoryCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0401), ElementsDictionaryEntry("Graphic Layer Recommended Display CIELab Value", "GraphicLayerRecommendedDisplayCIELabValue", "US", "3")); public_dictionary.emplace(Tag(0x0070, 0x0402), ElementsDictionaryEntry("Blending Sequence", "BlendingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0403), ElementsDictionaryEntry("Relative Opacity", "RelativeOpacity", "FL", "1")); public_dictionary.emplace(Tag(0x0070, 0x0404), ElementsDictionaryEntry("Referenced Spatial Registration Sequence", "ReferencedSpatialRegistrationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x0405), ElementsDictionaryEntry("Blending Position", "BlendingPosition", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1101), ElementsDictionaryEntry("Presentation Display Collection UID", "PresentationDisplayCollectionUID", "UI", "1")); public_dictionary.emplace(Tag(0x0070, 0x1102), ElementsDictionaryEntry("Presentation Sequence Collection UID", "PresentationSequenceCollectionUID", "UI", "1")); public_dictionary.emplace(Tag(0x0070, 0x1103), ElementsDictionaryEntry("Presentation Sequence Position Index", "PresentationSequencePositionIndex", "US", "1")); public_dictionary.emplace(Tag(0x0070, 0x1104), ElementsDictionaryEntry("Rendered Image Reference Sequence", "RenderedImageReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1201), ElementsDictionaryEntry("Volumetric Presentation State Input Sequence", "VolumetricPresentationStateInputSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1202), ElementsDictionaryEntry("Presentation Input Type", "PresentationInputType", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1203), ElementsDictionaryEntry("Input Sequence Position Index", "InputSequencePositionIndex", "US", "1")); public_dictionary.emplace(Tag(0x0070, 0x1204), ElementsDictionaryEntry("Crop", "Crop", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1205), ElementsDictionaryEntry("Cropping Specification Index", "CroppingSpecificationIndex", "US", "1-n")); public_dictionary.emplace(Tag(0x0070, 0x1206), ElementsDictionaryEntry("Compositing Method", "CompositingMethod", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1207), ElementsDictionaryEntry("Volumetric Presentation Input Number", "VolumetricPresentationInputNumber", "US", "1")); public_dictionary.emplace(Tag(0x0070, 0x1208), ElementsDictionaryEntry("Image Volume Geometry", "ImageVolumeGeometry", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1209), ElementsDictionaryEntry("Volumetric Presentation Input Set UID", "VolumetricPresentationInputSetUID", "UI", "1")); public_dictionary.emplace(Tag(0x0070, 0x120a), ElementsDictionaryEntry("Volumetric Presentation Input Set Sequence", "VolumetricPresentationInputSetSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x120b), ElementsDictionaryEntry("Global Crop", "GlobalCrop", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x120c), ElementsDictionaryEntry("Global Cropping Specification Index", "GlobalCroppingSpecificationIndex", "US", "1-n")); public_dictionary.emplace(Tag(0x0070, 0x120d), ElementsDictionaryEntry("Rendering Method", "RenderingMethod", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1301), ElementsDictionaryEntry("Volume Cropping Sequence", "VolumeCroppingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1302), ElementsDictionaryEntry("Volume Cropping Method", "VolumeCroppingMethod", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1303), ElementsDictionaryEntry("Bounding Box Crop", "BoundingBoxCrop", "FD", "6")); public_dictionary.emplace(Tag(0x0070, 0x1304), ElementsDictionaryEntry("Oblique Cropping Plane Sequence", "ObliqueCroppingPlaneSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1305), ElementsDictionaryEntry("Plane", "Plane", "FD", "4")); public_dictionary.emplace(Tag(0x0070, 0x1306), ElementsDictionaryEntry("Plane Normal", "PlaneNormal", "FD", "3")); public_dictionary.emplace(Tag(0x0070, 0x1309), ElementsDictionaryEntry("Cropping Specification Number", "CroppingSpecificationNumber", "US", "1")); public_dictionary.emplace(Tag(0x0070, 0x1501), ElementsDictionaryEntry("Multi-Planar Reconstruction Style", "MultiPlanarReconstructionStyle", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1502), ElementsDictionaryEntry("MPR Thickness Type", "MPRThicknessType", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1503), ElementsDictionaryEntry("MPR Slab Thickness", "MPRSlabThickness", "FD", "1")); public_dictionary.emplace(Tag(0x0070, 0x1505), ElementsDictionaryEntry("MPR Top Left Hand Corner", "MPRTopLeftHandCorner", "FD", "3")); public_dictionary.emplace(Tag(0x0070, 0x1507), ElementsDictionaryEntry("MPR View Width Direction", "MPRViewWidthDirection", "FD", "3")); public_dictionary.emplace(Tag(0x0070, 0x1508), ElementsDictionaryEntry("MPR View Width", "MPRViewWidth", "FD", "1")); public_dictionary.emplace(Tag(0x0070, 0x150c), ElementsDictionaryEntry("Number of Volumetric Curve Points", "NumberOfVolumetricCurvePoints", "UL", "1")); public_dictionary.emplace(Tag(0x0070, 0x150d), ElementsDictionaryEntry("Volumetric Curve Points", "VolumetricCurvePoints", "OD", "1")); public_dictionary.emplace(Tag(0x0070, 0x1511), ElementsDictionaryEntry("MPR View Height Direction", "MPRViewHeightDirection", "FD", "3")); public_dictionary.emplace(Tag(0x0070, 0x1512), ElementsDictionaryEntry("MPR View Height", "MPRViewHeight", "FD", "1")); public_dictionary.emplace(Tag(0x0070, 0x1602), ElementsDictionaryEntry("Render Projection", "RenderProjection", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1603), ElementsDictionaryEntry("Viewpoint Position", "ViewpointPosition", "FD", "3")); public_dictionary.emplace(Tag(0x0070, 0x1604), ElementsDictionaryEntry("Viewpoint LookAt Point", "ViewpointLookAtPoint", "FD", "3")); public_dictionary.emplace(Tag(0x0070, 0x1605), ElementsDictionaryEntry("Viewpoint Up Direction", "ViewpointUpDirection", "FD", "3")); public_dictionary.emplace(Tag(0x0070, 0x1606), ElementsDictionaryEntry("Render Field of View", "RenderFieldOfView", "FD", "6")); public_dictionary.emplace(Tag(0x0070, 0x1607), ElementsDictionaryEntry("Sampling Step Size", "SamplingStepSize", "FD", "1")); public_dictionary.emplace(Tag(0x0070, 0x1701), ElementsDictionaryEntry("Shading Style", "ShadingStyle", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1702), ElementsDictionaryEntry("Ambient Reflection Intensity", "AmbientReflectionIntensity", "FD", "1")); public_dictionary.emplace(Tag(0x0070, 0x1703), ElementsDictionaryEntry("Light Direction", "LightDirection", "FD", "3")); public_dictionary.emplace(Tag(0x0070, 0x1704), ElementsDictionaryEntry("Diffuse Reflection Intensity", "DiffuseReflectionIntensity", "FD", "1")); public_dictionary.emplace(Tag(0x0070, 0x1705), ElementsDictionaryEntry("Specular Reflection Intensity", "SpecularReflectionIntensity", "FD", "1")); public_dictionary.emplace(Tag(0x0070, 0x1706), ElementsDictionaryEntry("Shininess", "Shininess", "FD", "1")); public_dictionary.emplace(Tag(0x0070, 0x1801), ElementsDictionaryEntry("Presentation State Classification Component Sequence", "PresentationStateClassificationComponentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1802), ElementsDictionaryEntry("Component Type", "ComponentType", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1803), ElementsDictionaryEntry("Component Input Sequence", "ComponentInputSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1804), ElementsDictionaryEntry("Volumetric Presentation Input Index", "VolumetricPresentationInputIndex", "US", "1")); public_dictionary.emplace(Tag(0x0070, 0x1805), ElementsDictionaryEntry("Presentation State Compositor Component Sequence", "PresentationStateCompositorComponentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1806), ElementsDictionaryEntry("Weighting Transfer Function Sequence", "WeightingTransferFunctionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1807), ElementsDictionaryEntry("Weighting Lookup Table Descriptor", "WeightingLookupTableDescriptor", "US", "3")); public_dictionary.emplace(Tag(0x0070, 0x1808), ElementsDictionaryEntry("Weighting Lookup Table Data", "WeightingLookupTableData", "OB", "1")); public_dictionary.emplace(Tag(0x0070, 0x1901), ElementsDictionaryEntry("Volumetric Annotation Sequence", "VolumetricAnnotationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1903), ElementsDictionaryEntry("Referenced Structured Context Sequence", "ReferencedStructuredContextSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1904), ElementsDictionaryEntry("Referenced Content Item", "ReferencedContentItem", "UI", "1")); public_dictionary.emplace(Tag(0x0070, 0x1905), ElementsDictionaryEntry("Volumetric Presentation Input Annotation Sequence", "VolumetricPresentationInputAnnotationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1907), ElementsDictionaryEntry("Annotation Clipping", "AnnotationClipping", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1a01), ElementsDictionaryEntry("Presentation Animation Style", "PresentationAnimationStyle", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1a03), ElementsDictionaryEntry("Recommended Animation Rate", "RecommendedAnimationRate", "FD", "1")); public_dictionary.emplace(Tag(0x0070, 0x1a04), ElementsDictionaryEntry("Animation Curve Sequence", "AnimationCurveSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1a05), ElementsDictionaryEntry("Animation Step Size", "AnimationStepSize", "FD", "1")); public_dictionary.emplace(Tag(0x0070, 0x1a06), ElementsDictionaryEntry("Swivel Range", "SwivelRange", "FD", "1")); public_dictionary.emplace(Tag(0x0070, 0x1a07), ElementsDictionaryEntry("Volumetric Curve Up Directions", "VolumetricCurveUpDirections", "OD", "1")); public_dictionary.emplace(Tag(0x0070, 0x1a08), ElementsDictionaryEntry("Volume Stream Sequence", "VolumeStreamSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1a09), ElementsDictionaryEntry("RGBA Transfer Function Description", "RGBATransferFunctionDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0070, 0x1b01), ElementsDictionaryEntry("Advanced Blending Sequence", "AdvancedBlendingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1b02), ElementsDictionaryEntry("Blending Input Number", "BlendingInputNumber", "US", "1")); public_dictionary.emplace(Tag(0x0070, 0x1b03), ElementsDictionaryEntry("Blending Display Input Sequence", "BlendingDisplayInputSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1b04), ElementsDictionaryEntry("Blending Display Sequence", "BlendingDisplaySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1b06), ElementsDictionaryEntry("Blending Mode", "BlendingMode", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1b07), ElementsDictionaryEntry("Time Series Blending", "TimeSeriesBlending", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1b08), ElementsDictionaryEntry("Geometry for Display", "GeometryForDisplay", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1b11), ElementsDictionaryEntry("Threshold Sequence", "ThresholdSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1b12), ElementsDictionaryEntry("Threshold Value Sequence", "ThresholdValueSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0070, 0x1b13), ElementsDictionaryEntry("Threshold Type", "ThresholdType", "CS", "1")); public_dictionary.emplace(Tag(0x0070, 0x1b14), ElementsDictionaryEntry("Threshold Value", "ThresholdValue", "FD", "1")); public_tags.emplace("GraphicAnnotationSequence", Tag(0x0070, 0x0001)); public_tags.emplace("GraphicLayer", Tag(0x0070, 0x0002)); public_tags.emplace("BoundingBoxAnnotationUnits", Tag(0x0070, 0x0003)); public_tags.emplace("AnchorPointAnnotationUnits", Tag(0x0070, 0x0004)); public_tags.emplace("GraphicAnnotationUnits", Tag(0x0070, 0x0005)); public_tags.emplace("UnformattedTextValue", Tag(0x0070, 0x0006)); public_tags.emplace("TextObjectSequence", Tag(0x0070, 0x0008)); public_tags.emplace("GraphicObjectSequence", Tag(0x0070, 0x0009)); public_tags.emplace("BoundingBoxTopLeftHandCorner", Tag(0x0070, 0x0010)); public_tags.emplace("BoundingBoxBottomRightHandCorner", Tag(0x0070, 0x0011)); public_tags.emplace("BoundingBoxTextHorizontalJustification", Tag(0x0070, 0x0012)); public_tags.emplace("AnchorPoint", Tag(0x0070, 0x0014)); public_tags.emplace("AnchorPointVisibility", Tag(0x0070, 0x0015)); public_tags.emplace("GraphicDimensions", Tag(0x0070, 0x0020)); public_tags.emplace("NumberOfGraphicPoints", Tag(0x0070, 0x0021)); public_tags.emplace("GraphicData", Tag(0x0070, 0x0022)); public_tags.emplace("GraphicType", Tag(0x0070, 0x0023)); public_tags.emplace("GraphicFilled", Tag(0x0070, 0x0024)); public_tags.emplace("ImageRotationRetired", Tag(0x0070, 0x0040)); public_tags.emplace("ImageHorizontalFlip", Tag(0x0070, 0x0041)); public_tags.emplace("ImageRotation", Tag(0x0070, 0x0042)); public_tags.emplace("DisplayedAreaTopLeftHandCornerTrial", Tag(0x0070, 0x0050)); public_tags.emplace("DisplayedAreaBottomRightHandCornerTrial", Tag(0x0070, 0x0051)); public_tags.emplace("DisplayedAreaTopLeftHandCorner", Tag(0x0070, 0x0052)); public_tags.emplace("DisplayedAreaBottomRightHandCorner", Tag(0x0070, 0x0053)); public_tags.emplace("DisplayedAreaSelectionSequence", Tag(0x0070, 0x005a)); public_tags.emplace("GraphicLayerSequence", Tag(0x0070, 0x0060)); public_tags.emplace("GraphicLayerOrder", Tag(0x0070, 0x0062)); public_tags.emplace("GraphicLayerRecommendedDisplayGrayscaleValue", Tag(0x0070, 0x0066)); public_tags.emplace("GraphicLayerRecommendedDisplayRGBValue", Tag(0x0070, 0x0067)); public_tags.emplace("GraphicLayerDescription", Tag(0x0070, 0x0068)); public_tags.emplace("ContentLabel", Tag(0x0070, 0x0080)); public_tags.emplace("ContentDescription", Tag(0x0070, 0x0081)); public_tags.emplace("PresentationCreationDate", Tag(0x0070, 0x0082)); public_tags.emplace("PresentationCreationTime", Tag(0x0070, 0x0083)); public_tags.emplace("ContentCreatorName", Tag(0x0070, 0x0084)); public_tags.emplace("ContentCreatorIdentificationCodeSequence", Tag(0x0070, 0x0086)); public_tags.emplace("AlternateContentDescriptionSequence", Tag(0x0070, 0x0087)); public_tags.emplace("PresentationSizeMode", Tag(0x0070, 0x0100)); public_tags.emplace("PresentationPixelSpacing", Tag(0x0070, 0x0101)); public_tags.emplace("PresentationPixelAspectRatio", Tag(0x0070, 0x0102)); public_tags.emplace("PresentationPixelMagnificationRatio", Tag(0x0070, 0x0103)); public_tags.emplace("GraphicGroupLabel", Tag(0x0070, 0x0207)); public_tags.emplace("GraphicGroupDescription", Tag(0x0070, 0x0208)); public_tags.emplace("CompoundGraphicSequence", Tag(0x0070, 0x0209)); public_tags.emplace("CompoundGraphicInstanceID", Tag(0x0070, 0x0226)); public_tags.emplace("FontName", Tag(0x0070, 0x0227)); public_tags.emplace("FontNameType", Tag(0x0070, 0x0228)); public_tags.emplace("CSSFontName", Tag(0x0070, 0x0229)); public_tags.emplace("RotationAngle", Tag(0x0070, 0x0230)); public_tags.emplace("TextStyleSequence", Tag(0x0070, 0x0231)); public_tags.emplace("LineStyleSequence", Tag(0x0070, 0x0232)); public_tags.emplace("FillStyleSequence", Tag(0x0070, 0x0233)); public_tags.emplace("GraphicGroupSequence", Tag(0x0070, 0x0234)); public_tags.emplace("TextColorCIELabValue", Tag(0x0070, 0x0241)); public_tags.emplace("HorizontalAlignment", Tag(0x0070, 0x0242)); public_tags.emplace("VerticalAlignment", Tag(0x0070, 0x0243)); public_tags.emplace("ShadowStyle", Tag(0x0070, 0x0244)); public_tags.emplace("ShadowOffsetX", Tag(0x0070, 0x0245)); public_tags.emplace("ShadowOffsetY", Tag(0x0070, 0x0246)); public_tags.emplace("ShadowColorCIELabValue", Tag(0x0070, 0x0247)); public_tags.emplace("Underlined", Tag(0x0070, 0x0248)); public_tags.emplace("Bold", Tag(0x0070, 0x0249)); public_tags.emplace("Italic", Tag(0x0070, 0x0250)); public_tags.emplace("PatternOnColorCIELabValue", Tag(0x0070, 0x0251)); public_tags.emplace("PatternOffColorCIELabValue", Tag(0x0070, 0x0252)); public_tags.emplace("LineThickness", Tag(0x0070, 0x0253)); public_tags.emplace("LineDashingStyle", Tag(0x0070, 0x0254)); public_tags.emplace("LinePattern", Tag(0x0070, 0x0255)); public_tags.emplace("FillPattern", Tag(0x0070, 0x0256)); public_tags.emplace("FillMode", Tag(0x0070, 0x0257)); public_tags.emplace("ShadowOpacity", Tag(0x0070, 0x0258)); public_tags.emplace("GapLength", Tag(0x0070, 0x0261)); public_tags.emplace("DiameterOfVisibility", Tag(0x0070, 0x0262)); public_tags.emplace("RotationPoint", Tag(0x0070, 0x0273)); public_tags.emplace("TickAlignment", Tag(0x0070, 0x0274)); public_tags.emplace("ShowTickLabel", Tag(0x0070, 0x0278)); public_tags.emplace("TickLabelAlignment", Tag(0x0070, 0x0279)); public_tags.emplace("CompoundGraphicUnits", Tag(0x0070, 0x0282)); public_tags.emplace("PatternOnOpacity", Tag(0x0070, 0x0284)); public_tags.emplace("PatternOffOpacity", Tag(0x0070, 0x0285)); public_tags.emplace("MajorTicksSequence", Tag(0x0070, 0x0287)); public_tags.emplace("TickPosition", Tag(0x0070, 0x0288)); public_tags.emplace("TickLabel", Tag(0x0070, 0x0289)); public_tags.emplace("CompoundGraphicType", Tag(0x0070, 0x0294)); public_tags.emplace("GraphicGroupID", Tag(0x0070, 0x0295)); public_tags.emplace("ShapeType", Tag(0x0070, 0x0306)); public_tags.emplace("RegistrationSequence", Tag(0x0070, 0x0308)); public_tags.emplace("MatrixRegistrationSequence", Tag(0x0070, 0x0309)); public_tags.emplace("MatrixSequence", Tag(0x0070, 0x030a)); public_tags.emplace("FrameOfReferenceToDisplayedCoordinateSystemTransformationMatrix", Tag(0x0070, 0x030b)); public_tags.emplace("FrameOfReferenceTransformationMatrixType", Tag(0x0070, 0x030c)); public_tags.emplace("RegistrationTypeCodeSequence", Tag(0x0070, 0x030d)); public_tags.emplace("FiducialDescription", Tag(0x0070, 0x030f)); public_tags.emplace("FiducialIdentifier", Tag(0x0070, 0x0310)); public_tags.emplace("FiducialIdentifierCodeSequence", Tag(0x0070, 0x0311)); public_tags.emplace("ContourUncertaintyRadius", Tag(0x0070, 0x0312)); public_tags.emplace("UsedFiducialsSequence", Tag(0x0070, 0x0314)); public_tags.emplace("GraphicCoordinatesDataSequence", Tag(0x0070, 0x0318)); public_tags.emplace("FiducialUID", Tag(0x0070, 0x031a)); public_tags.emplace("ReferencedFiducialUID", Tag(0x0070, 0x031b)); public_tags.emplace("FiducialSetSequence", Tag(0x0070, 0x031c)); public_tags.emplace("FiducialSequence", Tag(0x0070, 0x031e)); public_tags.emplace("FiducialsPropertyCategoryCodeSequence", Tag(0x0070, 0x031f)); public_tags.emplace("GraphicLayerRecommendedDisplayCIELabValue", Tag(0x0070, 0x0401)); public_tags.emplace("BlendingSequence", Tag(0x0070, 0x0402)); public_tags.emplace("RelativeOpacity", Tag(0x0070, 0x0403)); public_tags.emplace("ReferencedSpatialRegistrationSequence", Tag(0x0070, 0x0404)); public_tags.emplace("BlendingPosition", Tag(0x0070, 0x0405)); public_tags.emplace("PresentationDisplayCollectionUID", Tag(0x0070, 0x1101)); public_tags.emplace("PresentationSequenceCollectionUID", Tag(0x0070, 0x1102)); public_tags.emplace("PresentationSequencePositionIndex", Tag(0x0070, 0x1103)); public_tags.emplace("RenderedImageReferenceSequence", Tag(0x0070, 0x1104)); public_tags.emplace("VolumetricPresentationStateInputSequence", Tag(0x0070, 0x1201)); public_tags.emplace("PresentationInputType", Tag(0x0070, 0x1202)); public_tags.emplace("InputSequencePositionIndex", Tag(0x0070, 0x1203)); public_tags.emplace("Crop", Tag(0x0070, 0x1204)); public_tags.emplace("CroppingSpecificationIndex", Tag(0x0070, 0x1205)); public_tags.emplace("CompositingMethod", Tag(0x0070, 0x1206)); public_tags.emplace("VolumetricPresentationInputNumber", Tag(0x0070, 0x1207)); public_tags.emplace("ImageVolumeGeometry", Tag(0x0070, 0x1208)); public_tags.emplace("VolumetricPresentationInputSetUID", Tag(0x0070, 0x1209)); public_tags.emplace("VolumetricPresentationInputSetSequence", Tag(0x0070, 0x120a)); public_tags.emplace("GlobalCrop", Tag(0x0070, 0x120b)); public_tags.emplace("GlobalCroppingSpecificationIndex", Tag(0x0070, 0x120c)); public_tags.emplace("RenderingMethod", Tag(0x0070, 0x120d)); public_tags.emplace("VolumeCroppingSequence", Tag(0x0070, 0x1301)); public_tags.emplace("VolumeCroppingMethod", Tag(0x0070, 0x1302)); public_tags.emplace("BoundingBoxCrop", Tag(0x0070, 0x1303)); public_tags.emplace("ObliqueCroppingPlaneSequence", Tag(0x0070, 0x1304)); public_tags.emplace("Plane", Tag(0x0070, 0x1305)); public_tags.emplace("PlaneNormal", Tag(0x0070, 0x1306)); public_tags.emplace("CroppingSpecificationNumber", Tag(0x0070, 0x1309)); public_tags.emplace("MultiPlanarReconstructionStyle", Tag(0x0070, 0x1501)); public_tags.emplace("MPRThicknessType", Tag(0x0070, 0x1502)); public_tags.emplace("MPRSlabThickness", Tag(0x0070, 0x1503)); public_tags.emplace("MPRTopLeftHandCorner", Tag(0x0070, 0x1505)); public_tags.emplace("MPRViewWidthDirection", Tag(0x0070, 0x1507)); public_tags.emplace("MPRViewWidth", Tag(0x0070, 0x1508)); public_tags.emplace("NumberOfVolumetricCurvePoints", Tag(0x0070, 0x150c)); public_tags.emplace("VolumetricCurvePoints", Tag(0x0070, 0x150d)); public_tags.emplace("MPRViewHeightDirection", Tag(0x0070, 0x1511)); public_tags.emplace("MPRViewHeight", Tag(0x0070, 0x1512)); public_tags.emplace("RenderProjection", Tag(0x0070, 0x1602)); public_tags.emplace("ViewpointPosition", Tag(0x0070, 0x1603)); public_tags.emplace("ViewpointLookAtPoint", Tag(0x0070, 0x1604)); public_tags.emplace("ViewpointUpDirection", Tag(0x0070, 0x1605)); public_tags.emplace("RenderFieldOfView", Tag(0x0070, 0x1606)); public_tags.emplace("SamplingStepSize", Tag(0x0070, 0x1607)); public_tags.emplace("ShadingStyle", Tag(0x0070, 0x1701)); public_tags.emplace("AmbientReflectionIntensity", Tag(0x0070, 0x1702)); public_tags.emplace("LightDirection", Tag(0x0070, 0x1703)); public_tags.emplace("DiffuseReflectionIntensity", Tag(0x0070, 0x1704)); public_tags.emplace("SpecularReflectionIntensity", Tag(0x0070, 0x1705)); public_tags.emplace("Shininess", Tag(0x0070, 0x1706)); public_tags.emplace("PresentationStateClassificationComponentSequence", Tag(0x0070, 0x1801)); public_tags.emplace("ComponentType", Tag(0x0070, 0x1802)); public_tags.emplace("ComponentInputSequence", Tag(0x0070, 0x1803)); public_tags.emplace("VolumetricPresentationInputIndex", Tag(0x0070, 0x1804)); public_tags.emplace("PresentationStateCompositorComponentSequence", Tag(0x0070, 0x1805)); public_tags.emplace("WeightingTransferFunctionSequence", Tag(0x0070, 0x1806)); public_tags.emplace("WeightingLookupTableDescriptor", Tag(0x0070, 0x1807)); public_tags.emplace("WeightingLookupTableData", Tag(0x0070, 0x1808)); public_tags.emplace("VolumetricAnnotationSequence", Tag(0x0070, 0x1901)); public_tags.emplace("ReferencedStructuredContextSequence", Tag(0x0070, 0x1903)); public_tags.emplace("ReferencedContentItem", Tag(0x0070, 0x1904)); public_tags.emplace("VolumetricPresentationInputAnnotationSequence", Tag(0x0070, 0x1905)); public_tags.emplace("AnnotationClipping", Tag(0x0070, 0x1907)); public_tags.emplace("PresentationAnimationStyle", Tag(0x0070, 0x1a01)); public_tags.emplace("RecommendedAnimationRate", Tag(0x0070, 0x1a03)); public_tags.emplace("AnimationCurveSequence", Tag(0x0070, 0x1a04)); public_tags.emplace("AnimationStepSize", Tag(0x0070, 0x1a05)); public_tags.emplace("SwivelRange", Tag(0x0070, 0x1a06)); public_tags.emplace("VolumetricCurveUpDirections", Tag(0x0070, 0x1a07)); public_tags.emplace("VolumeStreamSequence", Tag(0x0070, 0x1a08)); public_tags.emplace("RGBATransferFunctionDescription", Tag(0x0070, 0x1a09)); public_tags.emplace("AdvancedBlendingSequence", Tag(0x0070, 0x1b01)); public_tags.emplace("BlendingInputNumber", Tag(0x0070, 0x1b02)); public_tags.emplace("BlendingDisplayInputSequence", Tag(0x0070, 0x1b03)); public_tags.emplace("BlendingDisplaySequence", Tag(0x0070, 0x1b04)); public_tags.emplace("BlendingMode", Tag(0x0070, 0x1b06)); public_tags.emplace("TimeSeriesBlending", Tag(0x0070, 0x1b07)); public_tags.emplace("GeometryForDisplay", Tag(0x0070, 0x1b08)); public_tags.emplace("ThresholdSequence", Tag(0x0070, 0x1b11)); public_tags.emplace("ThresholdValueSequence", Tag(0x0070, 0x1b12)); public_tags.emplace("ThresholdType", Tag(0x0070, 0x1b13)); public_tags.emplace("ThresholdValue", Tag(0x0070, 0x1b14)); } } }odil-0.11.0/src/odil/registry_0070.h000066400000000000000000000233341362244656000167420ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0070 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0070 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const GraphicAnnotationSequence(0x0070, 0x0001); Tag const GraphicLayer(0x0070, 0x0002); Tag const BoundingBoxAnnotationUnits(0x0070, 0x0003); Tag const AnchorPointAnnotationUnits(0x0070, 0x0004); Tag const GraphicAnnotationUnits(0x0070, 0x0005); Tag const UnformattedTextValue(0x0070, 0x0006); Tag const TextObjectSequence(0x0070, 0x0008); Tag const GraphicObjectSequence(0x0070, 0x0009); Tag const BoundingBoxTopLeftHandCorner(0x0070, 0x0010); Tag const BoundingBoxBottomRightHandCorner(0x0070, 0x0011); Tag const BoundingBoxTextHorizontalJustification(0x0070, 0x0012); Tag const AnchorPoint(0x0070, 0x0014); Tag const AnchorPointVisibility(0x0070, 0x0015); Tag const GraphicDimensions(0x0070, 0x0020); Tag const NumberOfGraphicPoints(0x0070, 0x0021); Tag const GraphicData(0x0070, 0x0022); Tag const GraphicType(0x0070, 0x0023); Tag const GraphicFilled(0x0070, 0x0024); Tag const ImageRotationRetired(0x0070, 0x0040); Tag const ImageHorizontalFlip(0x0070, 0x0041); Tag const ImageRotation(0x0070, 0x0042); Tag const DisplayedAreaTopLeftHandCornerTrial(0x0070, 0x0050); Tag const DisplayedAreaBottomRightHandCornerTrial(0x0070, 0x0051); Tag const DisplayedAreaTopLeftHandCorner(0x0070, 0x0052); Tag const DisplayedAreaBottomRightHandCorner(0x0070, 0x0053); Tag const DisplayedAreaSelectionSequence(0x0070, 0x005a); Tag const GraphicLayerSequence(0x0070, 0x0060); Tag const GraphicLayerOrder(0x0070, 0x0062); Tag const GraphicLayerRecommendedDisplayGrayscaleValue(0x0070, 0x0066); Tag const GraphicLayerRecommendedDisplayRGBValue(0x0070, 0x0067); Tag const GraphicLayerDescription(0x0070, 0x0068); Tag const ContentLabel(0x0070, 0x0080); Tag const ContentDescription(0x0070, 0x0081); Tag const PresentationCreationDate(0x0070, 0x0082); Tag const PresentationCreationTime(0x0070, 0x0083); Tag const ContentCreatorName(0x0070, 0x0084); Tag const ContentCreatorIdentificationCodeSequence(0x0070, 0x0086); Tag const AlternateContentDescriptionSequence(0x0070, 0x0087); Tag const PresentationSizeMode(0x0070, 0x0100); Tag const PresentationPixelSpacing(0x0070, 0x0101); Tag const PresentationPixelAspectRatio(0x0070, 0x0102); Tag const PresentationPixelMagnificationRatio(0x0070, 0x0103); Tag const GraphicGroupLabel(0x0070, 0x0207); Tag const GraphicGroupDescription(0x0070, 0x0208); Tag const CompoundGraphicSequence(0x0070, 0x0209); Tag const CompoundGraphicInstanceID(0x0070, 0x0226); Tag const FontName(0x0070, 0x0227); Tag const FontNameType(0x0070, 0x0228); Tag const CSSFontName(0x0070, 0x0229); Tag const RotationAngle(0x0070, 0x0230); Tag const TextStyleSequence(0x0070, 0x0231); Tag const LineStyleSequence(0x0070, 0x0232); Tag const FillStyleSequence(0x0070, 0x0233); Tag const GraphicGroupSequence(0x0070, 0x0234); Tag const TextColorCIELabValue(0x0070, 0x0241); Tag const HorizontalAlignment(0x0070, 0x0242); Tag const VerticalAlignment(0x0070, 0x0243); Tag const ShadowStyle(0x0070, 0x0244); Tag const ShadowOffsetX(0x0070, 0x0245); Tag const ShadowOffsetY(0x0070, 0x0246); Tag const ShadowColorCIELabValue(0x0070, 0x0247); Tag const Underlined(0x0070, 0x0248); Tag const Bold(0x0070, 0x0249); Tag const Italic(0x0070, 0x0250); Tag const PatternOnColorCIELabValue(0x0070, 0x0251); Tag const PatternOffColorCIELabValue(0x0070, 0x0252); Tag const LineThickness(0x0070, 0x0253); Tag const LineDashingStyle(0x0070, 0x0254); Tag const LinePattern(0x0070, 0x0255); Tag const FillPattern(0x0070, 0x0256); Tag const FillMode(0x0070, 0x0257); Tag const ShadowOpacity(0x0070, 0x0258); Tag const GapLength(0x0070, 0x0261); Tag const DiameterOfVisibility(0x0070, 0x0262); Tag const RotationPoint(0x0070, 0x0273); Tag const TickAlignment(0x0070, 0x0274); Tag const ShowTickLabel(0x0070, 0x0278); Tag const TickLabelAlignment(0x0070, 0x0279); Tag const CompoundGraphicUnits(0x0070, 0x0282); Tag const PatternOnOpacity(0x0070, 0x0284); Tag const PatternOffOpacity(0x0070, 0x0285); Tag const MajorTicksSequence(0x0070, 0x0287); Tag const TickPosition(0x0070, 0x0288); Tag const TickLabel(0x0070, 0x0289); Tag const CompoundGraphicType(0x0070, 0x0294); Tag const GraphicGroupID(0x0070, 0x0295); Tag const ShapeType(0x0070, 0x0306); Tag const RegistrationSequence(0x0070, 0x0308); Tag const MatrixRegistrationSequence(0x0070, 0x0309); Tag const MatrixSequence(0x0070, 0x030a); Tag const FrameOfReferenceToDisplayedCoordinateSystemTransformationMatrix(0x0070, 0x030b); Tag const FrameOfReferenceTransformationMatrixType(0x0070, 0x030c); Tag const RegistrationTypeCodeSequence(0x0070, 0x030d); Tag const FiducialDescription(0x0070, 0x030f); Tag const FiducialIdentifier(0x0070, 0x0310); Tag const FiducialIdentifierCodeSequence(0x0070, 0x0311); Tag const ContourUncertaintyRadius(0x0070, 0x0312); Tag const UsedFiducialsSequence(0x0070, 0x0314); Tag const GraphicCoordinatesDataSequence(0x0070, 0x0318); Tag const FiducialUID(0x0070, 0x031a); Tag const ReferencedFiducialUID(0x0070, 0x031b); Tag const FiducialSetSequence(0x0070, 0x031c); Tag const FiducialSequence(0x0070, 0x031e); Tag const FiducialsPropertyCategoryCodeSequence(0x0070, 0x031f); Tag const GraphicLayerRecommendedDisplayCIELabValue(0x0070, 0x0401); Tag const BlendingSequence(0x0070, 0x0402); Tag const RelativeOpacity(0x0070, 0x0403); Tag const ReferencedSpatialRegistrationSequence(0x0070, 0x0404); Tag const BlendingPosition(0x0070, 0x0405); Tag const PresentationDisplayCollectionUID(0x0070, 0x1101); Tag const PresentationSequenceCollectionUID(0x0070, 0x1102); Tag const PresentationSequencePositionIndex(0x0070, 0x1103); Tag const RenderedImageReferenceSequence(0x0070, 0x1104); Tag const VolumetricPresentationStateInputSequence(0x0070, 0x1201); Tag const PresentationInputType(0x0070, 0x1202); Tag const InputSequencePositionIndex(0x0070, 0x1203); Tag const Crop(0x0070, 0x1204); Tag const CroppingSpecificationIndex(0x0070, 0x1205); Tag const CompositingMethod(0x0070, 0x1206); Tag const VolumetricPresentationInputNumber(0x0070, 0x1207); Tag const ImageVolumeGeometry(0x0070, 0x1208); Tag const VolumetricPresentationInputSetUID(0x0070, 0x1209); Tag const VolumetricPresentationInputSetSequence(0x0070, 0x120a); Tag const GlobalCrop(0x0070, 0x120b); Tag const GlobalCroppingSpecificationIndex(0x0070, 0x120c); Tag const RenderingMethod(0x0070, 0x120d); Tag const VolumeCroppingSequence(0x0070, 0x1301); Tag const VolumeCroppingMethod(0x0070, 0x1302); Tag const BoundingBoxCrop(0x0070, 0x1303); Tag const ObliqueCroppingPlaneSequence(0x0070, 0x1304); Tag const Plane(0x0070, 0x1305); Tag const PlaneNormal(0x0070, 0x1306); Tag const CroppingSpecificationNumber(0x0070, 0x1309); Tag const MultiPlanarReconstructionStyle(0x0070, 0x1501); Tag const MPRThicknessType(0x0070, 0x1502); Tag const MPRSlabThickness(0x0070, 0x1503); Tag const MPRTopLeftHandCorner(0x0070, 0x1505); Tag const MPRViewWidthDirection(0x0070, 0x1507); Tag const MPRViewWidth(0x0070, 0x1508); Tag const NumberOfVolumetricCurvePoints(0x0070, 0x150c); Tag const VolumetricCurvePoints(0x0070, 0x150d); Tag const MPRViewHeightDirection(0x0070, 0x1511); Tag const MPRViewHeight(0x0070, 0x1512); Tag const RenderProjection(0x0070, 0x1602); Tag const ViewpointPosition(0x0070, 0x1603); Tag const ViewpointLookAtPoint(0x0070, 0x1604); Tag const ViewpointUpDirection(0x0070, 0x1605); Tag const RenderFieldOfView(0x0070, 0x1606); Tag const SamplingStepSize(0x0070, 0x1607); Tag const ShadingStyle(0x0070, 0x1701); Tag const AmbientReflectionIntensity(0x0070, 0x1702); Tag const LightDirection(0x0070, 0x1703); Tag const DiffuseReflectionIntensity(0x0070, 0x1704); Tag const SpecularReflectionIntensity(0x0070, 0x1705); Tag const Shininess(0x0070, 0x1706); Tag const PresentationStateClassificationComponentSequence(0x0070, 0x1801); Tag const ComponentType(0x0070, 0x1802); Tag const ComponentInputSequence(0x0070, 0x1803); Tag const VolumetricPresentationInputIndex(0x0070, 0x1804); Tag const PresentationStateCompositorComponentSequence(0x0070, 0x1805); Tag const WeightingTransferFunctionSequence(0x0070, 0x1806); Tag const WeightingLookupTableDescriptor(0x0070, 0x1807); Tag const WeightingLookupTableData(0x0070, 0x1808); Tag const VolumetricAnnotationSequence(0x0070, 0x1901); Tag const ReferencedStructuredContextSequence(0x0070, 0x1903); Tag const ReferencedContentItem(0x0070, 0x1904); Tag const VolumetricPresentationInputAnnotationSequence(0x0070, 0x1905); Tag const AnnotationClipping(0x0070, 0x1907); Tag const PresentationAnimationStyle(0x0070, 0x1a01); Tag const RecommendedAnimationRate(0x0070, 0x1a03); Tag const AnimationCurveSequence(0x0070, 0x1a04); Tag const AnimationStepSize(0x0070, 0x1a05); Tag const SwivelRange(0x0070, 0x1a06); Tag const VolumetricCurveUpDirections(0x0070, 0x1a07); Tag const VolumeStreamSequence(0x0070, 0x1a08); Tag const RGBATransferFunctionDescription(0x0070, 0x1a09); Tag const AdvancedBlendingSequence(0x0070, 0x1b01); Tag const BlendingInputNumber(0x0070, 0x1b02); Tag const BlendingDisplayInputSequence(0x0070, 0x1b03); Tag const BlendingDisplaySequence(0x0070, 0x1b04); Tag const BlendingMode(0x0070, 0x1b06); Tag const TimeSeriesBlending(0x0070, 0x1b07); Tag const GeometryForDisplay(0x0070, 0x1b08); Tag const ThresholdSequence(0x0070, 0x1b11); Tag const ThresholdValueSequence(0x0070, 0x1b12); Tag const ThresholdType(0x0070, 0x1b13); Tag const ThresholdValue(0x0070, 0x1b14); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0070odil-0.11.0/src/odil/registry_0072.cpp000066400000000000000000000642411362244656000173010ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0072( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0072, 0x0002), ElementsDictionaryEntry("Hanging Protocol Name", "HangingProtocolName", "SH", "1")); public_dictionary.emplace(Tag(0x0072, 0x0004), ElementsDictionaryEntry("Hanging Protocol Description", "HangingProtocolDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0072, 0x0006), ElementsDictionaryEntry("Hanging Protocol Level", "HangingProtocolLevel", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0008), ElementsDictionaryEntry("Hanging Protocol Creator", "HangingProtocolCreator", "LO", "1")); public_dictionary.emplace(Tag(0x0072, 0x000a), ElementsDictionaryEntry("Hanging Protocol Creation DateTime", "HangingProtocolCreationDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0072, 0x000c), ElementsDictionaryEntry("Hanging Protocol Definition Sequence", "HangingProtocolDefinitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x000e), ElementsDictionaryEntry("Hanging Protocol User Identification Code Sequence", "HangingProtocolUserIdentificationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0010), ElementsDictionaryEntry("Hanging Protocol User Group Name", "HangingProtocolUserGroupName", "LO", "1")); public_dictionary.emplace(Tag(0x0072, 0x0012), ElementsDictionaryEntry("Source Hanging Protocol Sequence", "SourceHangingProtocolSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0014), ElementsDictionaryEntry("Number of Priors Referenced", "NumberOfPriorsReferenced", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0020), ElementsDictionaryEntry("Image Sets Sequence", "ImageSetsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0022), ElementsDictionaryEntry("Image Set Selector Sequence", "ImageSetSelectorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0024), ElementsDictionaryEntry("Image Set Selector Usage Flag", "ImageSetSelectorUsageFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0026), ElementsDictionaryEntry("Selector Attribute", "SelectorAttribute", "AT", "1")); public_dictionary.emplace(Tag(0x0072, 0x0028), ElementsDictionaryEntry("Selector Value Number", "SelectorValueNumber", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0030), ElementsDictionaryEntry("Time Based Image Sets Sequence", "TimeBasedImageSetsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0032), ElementsDictionaryEntry("Image Set Number", "ImageSetNumber", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0034), ElementsDictionaryEntry("Image Set Selector Category", "ImageSetSelectorCategory", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0038), ElementsDictionaryEntry("Relative Time", "RelativeTime", "US", "2")); public_dictionary.emplace(Tag(0x0072, 0x003a), ElementsDictionaryEntry("Relative Time Units", "RelativeTimeUnits", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x003c), ElementsDictionaryEntry("Abstract Prior Value", "AbstractPriorValue", "SS", "2")); public_dictionary.emplace(Tag(0x0072, 0x003e), ElementsDictionaryEntry("Abstract Prior Code Sequence", "AbstractPriorCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0040), ElementsDictionaryEntry("Image Set Label", "ImageSetLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0072, 0x0050), ElementsDictionaryEntry("Selector Attribute VR", "SelectorAttributeVR", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0052), ElementsDictionaryEntry("Selector Sequence Pointer", "SelectorSequencePointer", "AT", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0054), ElementsDictionaryEntry("Selector Sequence Pointer Private Creator", "SelectorSequencePointerPrivateCreator", "LO", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0056), ElementsDictionaryEntry("Selector Attribute Private Creator", "SelectorAttributePrivateCreator", "LO", "1")); public_dictionary.emplace(Tag(0x0072, 0x005e), ElementsDictionaryEntry("Selector AE Value", "SelectorAEValue", "AE", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x005f), ElementsDictionaryEntry("Selector AS Value", "SelectorASValue", "AS", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0060), ElementsDictionaryEntry("Selector AT Value", "SelectorATValue", "AT", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0061), ElementsDictionaryEntry("Selector DA Value", "SelectorDAValue", "DA", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0062), ElementsDictionaryEntry("Selector CS Value", "SelectorCSValue", "CS", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0063), ElementsDictionaryEntry("Selector DT Value", "SelectorDTValue", "DT", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0064), ElementsDictionaryEntry("Selector IS Value", "SelectorISValue", "IS", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0065), ElementsDictionaryEntry("Selector OB Value", "SelectorOBValue", "OB", "1")); public_dictionary.emplace(Tag(0x0072, 0x0066), ElementsDictionaryEntry("Selector LO Value", "SelectorLOValue", "LO", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0067), ElementsDictionaryEntry("Selector OF Value", "SelectorOFValue", "OF", "1")); public_dictionary.emplace(Tag(0x0072, 0x0068), ElementsDictionaryEntry("Selector LT Value", "SelectorLTValue", "LT", "1")); public_dictionary.emplace(Tag(0x0072, 0x0069), ElementsDictionaryEntry("Selector OW Value", "SelectorOWValue", "OW", "1")); public_dictionary.emplace(Tag(0x0072, 0x006a), ElementsDictionaryEntry("Selector PN Value", "SelectorPNValue", "PN", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x006b), ElementsDictionaryEntry("Selector TM Value", "SelectorTMValue", "TM", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x006c), ElementsDictionaryEntry("Selector SH Value", "SelectorSHValue", "SH", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x006d), ElementsDictionaryEntry("Selector UN Value", "SelectorUNValue", "UN", "1")); public_dictionary.emplace(Tag(0x0072, 0x006e), ElementsDictionaryEntry("Selector ST Value", "SelectorSTValue", "ST", "1")); public_dictionary.emplace(Tag(0x0072, 0x006f), ElementsDictionaryEntry("Selector UC Value", "SelectorUCValue", "UC", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0070), ElementsDictionaryEntry("Selector UT Value", "SelectorUTValue", "UT", "1")); public_dictionary.emplace(Tag(0x0072, 0x0071), ElementsDictionaryEntry("Selector UR Value", "SelectorURValue", "UR", "1")); public_dictionary.emplace(Tag(0x0072, 0x0072), ElementsDictionaryEntry("Selector DS Value", "SelectorDSValue", "DS", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0073), ElementsDictionaryEntry("Selector OD Value", "SelectorODValue", "OD", "1")); public_dictionary.emplace(Tag(0x0072, 0x0074), ElementsDictionaryEntry("Selector FD Value", "SelectorFDValue", "FD", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0075), ElementsDictionaryEntry("Selector OL Value", "SelectorOLValue", "OL", "1")); public_dictionary.emplace(Tag(0x0072, 0x0076), ElementsDictionaryEntry("Selector FL Value", "SelectorFLValue", "FL", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0078), ElementsDictionaryEntry("Selector UL Value", "SelectorULValue", "UL", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x007a), ElementsDictionaryEntry("Selector US Value", "SelectorUSValue", "US", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x007c), ElementsDictionaryEntry("Selector SL Value", "SelectorSLValue", "SL", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x007e), ElementsDictionaryEntry("Selector SS Value", "SelectorSSValue", "SS", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x007f), ElementsDictionaryEntry("Selector UI Value", "SelectorUIValue", "UI", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0080), ElementsDictionaryEntry("Selector Code Sequence Value", "SelectorCodeSequenceValue", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0100), ElementsDictionaryEntry("Number of Screens", "NumberOfScreens", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0102), ElementsDictionaryEntry("Nominal Screen Definition Sequence", "NominalScreenDefinitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0104), ElementsDictionaryEntry("Number of Vertical Pixels", "NumberOfVerticalPixels", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0106), ElementsDictionaryEntry("Number of Horizontal Pixels", "NumberOfHorizontalPixels", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0108), ElementsDictionaryEntry("Display Environment Spatial Position", "DisplayEnvironmentSpatialPosition", "FD", "4")); public_dictionary.emplace(Tag(0x0072, 0x010a), ElementsDictionaryEntry("Screen Minimum Grayscale Bit Depth", "ScreenMinimumGrayscaleBitDepth", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x010c), ElementsDictionaryEntry("Screen Minimum Color Bit Depth", "ScreenMinimumColorBitDepth", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x010e), ElementsDictionaryEntry("Application Maximum Repaint Time", "ApplicationMaximumRepaintTime", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0200), ElementsDictionaryEntry("Display Sets Sequence", "DisplaySetsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0202), ElementsDictionaryEntry("Display Set Number", "DisplaySetNumber", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0203), ElementsDictionaryEntry("Display Set Label", "DisplaySetLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0072, 0x0204), ElementsDictionaryEntry("Display Set Presentation Group", "DisplaySetPresentationGroup", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0206), ElementsDictionaryEntry("Display Set Presentation Group Description", "DisplaySetPresentationGroupDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0072, 0x0208), ElementsDictionaryEntry("Partial Data Display Handling", "PartialDataDisplayHandling", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0210), ElementsDictionaryEntry("Synchronized Scrolling Sequence", "SynchronizedScrollingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0212), ElementsDictionaryEntry("Display Set Scrolling Group", "DisplaySetScrollingGroup", "US", "2-n")); public_dictionary.emplace(Tag(0x0072, 0x0214), ElementsDictionaryEntry("Navigation Indicator Sequence", "NavigationIndicatorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0216), ElementsDictionaryEntry("Navigation Display Set", "NavigationDisplaySet", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0218), ElementsDictionaryEntry("Reference Display Sets", "ReferenceDisplaySets", "US", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0300), ElementsDictionaryEntry("Image Boxes Sequence", "ImageBoxesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0302), ElementsDictionaryEntry("Image Box Number", "ImageBoxNumber", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0304), ElementsDictionaryEntry("Image Box Layout Type", "ImageBoxLayoutType", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0306), ElementsDictionaryEntry("Image Box Tile Horizontal Dimension", "ImageBoxTileHorizontalDimension", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0308), ElementsDictionaryEntry("Image Box Tile Vertical Dimension", "ImageBoxTileVerticalDimension", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0310), ElementsDictionaryEntry("Image Box Scroll Direction", "ImageBoxScrollDirection", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0312), ElementsDictionaryEntry("Image Box Small Scroll Type", "ImageBoxSmallScrollType", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0314), ElementsDictionaryEntry("Image Box Small Scroll Amount", "ImageBoxSmallScrollAmount", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0316), ElementsDictionaryEntry("Image Box Large Scroll Type", "ImageBoxLargeScrollType", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0318), ElementsDictionaryEntry("Image Box Large Scroll Amount", "ImageBoxLargeScrollAmount", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0320), ElementsDictionaryEntry("Image Box Overlap Priority", "ImageBoxOverlapPriority", "US", "1")); public_dictionary.emplace(Tag(0x0072, 0x0330), ElementsDictionaryEntry("Cine Relative to Real-Time", "CineRelativeToRealTime", "FD", "1")); public_dictionary.emplace(Tag(0x0072, 0x0400), ElementsDictionaryEntry("Filter Operations Sequence", "FilterOperationsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0402), ElementsDictionaryEntry("Filter-by Category", "FilterByCategory", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0404), ElementsDictionaryEntry("Filter-by Attribute Presence", "FilterByAttributePresence", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0406), ElementsDictionaryEntry("Filter-by Operator", "FilterByOperator", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0420), ElementsDictionaryEntry("Structured Display Background CIELab Value", "StructuredDisplayBackgroundCIELabValue", "US", "3")); public_dictionary.emplace(Tag(0x0072, 0x0421), ElementsDictionaryEntry("Empty Image Box CIELab Value", "EmptyImageBoxCIELabValue", "US", "3")); public_dictionary.emplace(Tag(0x0072, 0x0422), ElementsDictionaryEntry("Structured Display Image Box Sequence", "StructuredDisplayImageBoxSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0424), ElementsDictionaryEntry("Structured Display Text Box Sequence", "StructuredDisplayTextBoxSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0427), ElementsDictionaryEntry("Referenced First Frame Sequence", "ReferencedFirstFrameSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0430), ElementsDictionaryEntry("Image Box Synchronization Sequence", "ImageBoxSynchronizationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0432), ElementsDictionaryEntry("Synchronized Image Box List", "SynchronizedImageBoxList", "US", "2-n")); public_dictionary.emplace(Tag(0x0072, 0x0434), ElementsDictionaryEntry("Type of Synchronization", "TypeOfSynchronization", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0500), ElementsDictionaryEntry("Blending Operation Type", "BlendingOperationType", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0510), ElementsDictionaryEntry("Reformatting Operation Type", "ReformattingOperationType", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0512), ElementsDictionaryEntry("Reformatting Thickness", "ReformattingThickness", "FD", "1")); public_dictionary.emplace(Tag(0x0072, 0x0514), ElementsDictionaryEntry("Reformatting Interval", "ReformattingInterval", "FD", "1")); public_dictionary.emplace(Tag(0x0072, 0x0516), ElementsDictionaryEntry("Reformatting Operation Initial View Direction", "ReformattingOperationInitialViewDirection", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0520), ElementsDictionaryEntry("3D Rendering Type", "ThreeDRenderingType", "CS", "1-n")); public_dictionary.emplace(Tag(0x0072, 0x0600), ElementsDictionaryEntry("Sorting Operations Sequence", "SortingOperationsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0602), ElementsDictionaryEntry("Sort-by Category", "SortByCategory", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0604), ElementsDictionaryEntry("Sorting Direction", "SortingDirection", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0700), ElementsDictionaryEntry("Display Set Patient Orientation", "DisplaySetPatientOrientation", "CS", "2")); public_dictionary.emplace(Tag(0x0072, 0x0702), ElementsDictionaryEntry("VOI Type", "VOIType", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0704), ElementsDictionaryEntry("Pseudo-Color Type", "PseudoColorType", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0705), ElementsDictionaryEntry("Pseudo-Color Palette Instance Reference Sequence", "PseudoColorPaletteInstanceReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0072, 0x0706), ElementsDictionaryEntry("Show Grayscale Inverted", "ShowGrayscaleInverted", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0710), ElementsDictionaryEntry("Show Image True Size Flag", "ShowImageTrueSizeFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0712), ElementsDictionaryEntry("Show Graphic Annotation Flag", "ShowGraphicAnnotationFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0714), ElementsDictionaryEntry("Show Patient Demographics Flag", "ShowPatientDemographicsFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0716), ElementsDictionaryEntry("Show Acquisition Techniques Flag", "ShowAcquisitionTechniquesFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0717), ElementsDictionaryEntry("Display Set Horizontal Justification", "DisplaySetHorizontalJustification", "CS", "1")); public_dictionary.emplace(Tag(0x0072, 0x0718), ElementsDictionaryEntry("Display Set Vertical Justification", "DisplaySetVerticalJustification", "CS", "1")); public_tags.emplace("HangingProtocolName", Tag(0x0072, 0x0002)); public_tags.emplace("HangingProtocolDescription", Tag(0x0072, 0x0004)); public_tags.emplace("HangingProtocolLevel", Tag(0x0072, 0x0006)); public_tags.emplace("HangingProtocolCreator", Tag(0x0072, 0x0008)); public_tags.emplace("HangingProtocolCreationDateTime", Tag(0x0072, 0x000a)); public_tags.emplace("HangingProtocolDefinitionSequence", Tag(0x0072, 0x000c)); public_tags.emplace("HangingProtocolUserIdentificationCodeSequence", Tag(0x0072, 0x000e)); public_tags.emplace("HangingProtocolUserGroupName", Tag(0x0072, 0x0010)); public_tags.emplace("SourceHangingProtocolSequence", Tag(0x0072, 0x0012)); public_tags.emplace("NumberOfPriorsReferenced", Tag(0x0072, 0x0014)); public_tags.emplace("ImageSetsSequence", Tag(0x0072, 0x0020)); public_tags.emplace("ImageSetSelectorSequence", Tag(0x0072, 0x0022)); public_tags.emplace("ImageSetSelectorUsageFlag", Tag(0x0072, 0x0024)); public_tags.emplace("SelectorAttribute", Tag(0x0072, 0x0026)); public_tags.emplace("SelectorValueNumber", Tag(0x0072, 0x0028)); public_tags.emplace("TimeBasedImageSetsSequence", Tag(0x0072, 0x0030)); public_tags.emplace("ImageSetNumber", Tag(0x0072, 0x0032)); public_tags.emplace("ImageSetSelectorCategory", Tag(0x0072, 0x0034)); public_tags.emplace("RelativeTime", Tag(0x0072, 0x0038)); public_tags.emplace("RelativeTimeUnits", Tag(0x0072, 0x003a)); public_tags.emplace("AbstractPriorValue", Tag(0x0072, 0x003c)); public_tags.emplace("AbstractPriorCodeSequence", Tag(0x0072, 0x003e)); public_tags.emplace("ImageSetLabel", Tag(0x0072, 0x0040)); public_tags.emplace("SelectorAttributeVR", Tag(0x0072, 0x0050)); public_tags.emplace("SelectorSequencePointer", Tag(0x0072, 0x0052)); public_tags.emplace("SelectorSequencePointerPrivateCreator", Tag(0x0072, 0x0054)); public_tags.emplace("SelectorAttributePrivateCreator", Tag(0x0072, 0x0056)); public_tags.emplace("SelectorAEValue", Tag(0x0072, 0x005e)); public_tags.emplace("SelectorASValue", Tag(0x0072, 0x005f)); public_tags.emplace("SelectorATValue", Tag(0x0072, 0x0060)); public_tags.emplace("SelectorDAValue", Tag(0x0072, 0x0061)); public_tags.emplace("SelectorCSValue", Tag(0x0072, 0x0062)); public_tags.emplace("SelectorDTValue", Tag(0x0072, 0x0063)); public_tags.emplace("SelectorISValue", Tag(0x0072, 0x0064)); public_tags.emplace("SelectorOBValue", Tag(0x0072, 0x0065)); public_tags.emplace("SelectorLOValue", Tag(0x0072, 0x0066)); public_tags.emplace("SelectorOFValue", Tag(0x0072, 0x0067)); public_tags.emplace("SelectorLTValue", Tag(0x0072, 0x0068)); public_tags.emplace("SelectorOWValue", Tag(0x0072, 0x0069)); public_tags.emplace("SelectorPNValue", Tag(0x0072, 0x006a)); public_tags.emplace("SelectorTMValue", Tag(0x0072, 0x006b)); public_tags.emplace("SelectorSHValue", Tag(0x0072, 0x006c)); public_tags.emplace("SelectorUNValue", Tag(0x0072, 0x006d)); public_tags.emplace("SelectorSTValue", Tag(0x0072, 0x006e)); public_tags.emplace("SelectorUCValue", Tag(0x0072, 0x006f)); public_tags.emplace("SelectorUTValue", Tag(0x0072, 0x0070)); public_tags.emplace("SelectorURValue", Tag(0x0072, 0x0071)); public_tags.emplace("SelectorDSValue", Tag(0x0072, 0x0072)); public_tags.emplace("SelectorODValue", Tag(0x0072, 0x0073)); public_tags.emplace("SelectorFDValue", Tag(0x0072, 0x0074)); public_tags.emplace("SelectorOLValue", Tag(0x0072, 0x0075)); public_tags.emplace("SelectorFLValue", Tag(0x0072, 0x0076)); public_tags.emplace("SelectorULValue", Tag(0x0072, 0x0078)); public_tags.emplace("SelectorUSValue", Tag(0x0072, 0x007a)); public_tags.emplace("SelectorSLValue", Tag(0x0072, 0x007c)); public_tags.emplace("SelectorSSValue", Tag(0x0072, 0x007e)); public_tags.emplace("SelectorUIValue", Tag(0x0072, 0x007f)); public_tags.emplace("SelectorCodeSequenceValue", Tag(0x0072, 0x0080)); public_tags.emplace("NumberOfScreens", Tag(0x0072, 0x0100)); public_tags.emplace("NominalScreenDefinitionSequence", Tag(0x0072, 0x0102)); public_tags.emplace("NumberOfVerticalPixels", Tag(0x0072, 0x0104)); public_tags.emplace("NumberOfHorizontalPixels", Tag(0x0072, 0x0106)); public_tags.emplace("DisplayEnvironmentSpatialPosition", Tag(0x0072, 0x0108)); public_tags.emplace("ScreenMinimumGrayscaleBitDepth", Tag(0x0072, 0x010a)); public_tags.emplace("ScreenMinimumColorBitDepth", Tag(0x0072, 0x010c)); public_tags.emplace("ApplicationMaximumRepaintTime", Tag(0x0072, 0x010e)); public_tags.emplace("DisplaySetsSequence", Tag(0x0072, 0x0200)); public_tags.emplace("DisplaySetNumber", Tag(0x0072, 0x0202)); public_tags.emplace("DisplaySetLabel", Tag(0x0072, 0x0203)); public_tags.emplace("DisplaySetPresentationGroup", Tag(0x0072, 0x0204)); public_tags.emplace("DisplaySetPresentationGroupDescription", Tag(0x0072, 0x0206)); public_tags.emplace("PartialDataDisplayHandling", Tag(0x0072, 0x0208)); public_tags.emplace("SynchronizedScrollingSequence", Tag(0x0072, 0x0210)); public_tags.emplace("DisplaySetScrollingGroup", Tag(0x0072, 0x0212)); public_tags.emplace("NavigationIndicatorSequence", Tag(0x0072, 0x0214)); public_tags.emplace("NavigationDisplaySet", Tag(0x0072, 0x0216)); public_tags.emplace("ReferenceDisplaySets", Tag(0x0072, 0x0218)); public_tags.emplace("ImageBoxesSequence", Tag(0x0072, 0x0300)); public_tags.emplace("ImageBoxNumber", Tag(0x0072, 0x0302)); public_tags.emplace("ImageBoxLayoutType", Tag(0x0072, 0x0304)); public_tags.emplace("ImageBoxTileHorizontalDimension", Tag(0x0072, 0x0306)); public_tags.emplace("ImageBoxTileVerticalDimension", Tag(0x0072, 0x0308)); public_tags.emplace("ImageBoxScrollDirection", Tag(0x0072, 0x0310)); public_tags.emplace("ImageBoxSmallScrollType", Tag(0x0072, 0x0312)); public_tags.emplace("ImageBoxSmallScrollAmount", Tag(0x0072, 0x0314)); public_tags.emplace("ImageBoxLargeScrollType", Tag(0x0072, 0x0316)); public_tags.emplace("ImageBoxLargeScrollAmount", Tag(0x0072, 0x0318)); public_tags.emplace("ImageBoxOverlapPriority", Tag(0x0072, 0x0320)); public_tags.emplace("CineRelativeToRealTime", Tag(0x0072, 0x0330)); public_tags.emplace("FilterOperationsSequence", Tag(0x0072, 0x0400)); public_tags.emplace("FilterByCategory", Tag(0x0072, 0x0402)); public_tags.emplace("FilterByAttributePresence", Tag(0x0072, 0x0404)); public_tags.emplace("FilterByOperator", Tag(0x0072, 0x0406)); public_tags.emplace("StructuredDisplayBackgroundCIELabValue", Tag(0x0072, 0x0420)); public_tags.emplace("EmptyImageBoxCIELabValue", Tag(0x0072, 0x0421)); public_tags.emplace("StructuredDisplayImageBoxSequence", Tag(0x0072, 0x0422)); public_tags.emplace("StructuredDisplayTextBoxSequence", Tag(0x0072, 0x0424)); public_tags.emplace("ReferencedFirstFrameSequence", Tag(0x0072, 0x0427)); public_tags.emplace("ImageBoxSynchronizationSequence", Tag(0x0072, 0x0430)); public_tags.emplace("SynchronizedImageBoxList", Tag(0x0072, 0x0432)); public_tags.emplace("TypeOfSynchronization", Tag(0x0072, 0x0434)); public_tags.emplace("BlendingOperationType", Tag(0x0072, 0x0500)); public_tags.emplace("ReformattingOperationType", Tag(0x0072, 0x0510)); public_tags.emplace("ReformattingThickness", Tag(0x0072, 0x0512)); public_tags.emplace("ReformattingInterval", Tag(0x0072, 0x0514)); public_tags.emplace("ReformattingOperationInitialViewDirection", Tag(0x0072, 0x0516)); public_tags.emplace("ThreeDRenderingType", Tag(0x0072, 0x0520)); public_tags.emplace("SortingOperationsSequence", Tag(0x0072, 0x0600)); public_tags.emplace("SortByCategory", Tag(0x0072, 0x0602)); public_tags.emplace("SortingDirection", Tag(0x0072, 0x0604)); public_tags.emplace("DisplaySetPatientOrientation", Tag(0x0072, 0x0700)); public_tags.emplace("VOIType", Tag(0x0072, 0x0702)); public_tags.emplace("PseudoColorType", Tag(0x0072, 0x0704)); public_tags.emplace("PseudoColorPaletteInstanceReferenceSequence", Tag(0x0072, 0x0705)); public_tags.emplace("ShowGrayscaleInverted", Tag(0x0072, 0x0706)); public_tags.emplace("ShowImageTrueSizeFlag", Tag(0x0072, 0x0710)); public_tags.emplace("ShowGraphicAnnotationFlag", Tag(0x0072, 0x0712)); public_tags.emplace("ShowPatientDemographicsFlag", Tag(0x0072, 0x0714)); public_tags.emplace("ShowAcquisitionTechniquesFlag", Tag(0x0072, 0x0716)); public_tags.emplace("DisplaySetHorizontalJustification", Tag(0x0072, 0x0717)); public_tags.emplace("DisplaySetVerticalJustification", Tag(0x0072, 0x0718)); } } }odil-0.11.0/src/odil/registry_0072.h000066400000000000000000000151071362244656000167430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0072 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0072 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const HangingProtocolName(0x0072, 0x0002); Tag const HangingProtocolDescription(0x0072, 0x0004); Tag const HangingProtocolLevel(0x0072, 0x0006); Tag const HangingProtocolCreator(0x0072, 0x0008); Tag const HangingProtocolCreationDateTime(0x0072, 0x000a); Tag const HangingProtocolDefinitionSequence(0x0072, 0x000c); Tag const HangingProtocolUserIdentificationCodeSequence(0x0072, 0x000e); Tag const HangingProtocolUserGroupName(0x0072, 0x0010); Tag const SourceHangingProtocolSequence(0x0072, 0x0012); Tag const NumberOfPriorsReferenced(0x0072, 0x0014); Tag const ImageSetsSequence(0x0072, 0x0020); Tag const ImageSetSelectorSequence(0x0072, 0x0022); Tag const ImageSetSelectorUsageFlag(0x0072, 0x0024); Tag const SelectorAttribute(0x0072, 0x0026); Tag const SelectorValueNumber(0x0072, 0x0028); Tag const TimeBasedImageSetsSequence(0x0072, 0x0030); Tag const ImageSetNumber(0x0072, 0x0032); Tag const ImageSetSelectorCategory(0x0072, 0x0034); Tag const RelativeTime(0x0072, 0x0038); Tag const RelativeTimeUnits(0x0072, 0x003a); Tag const AbstractPriorValue(0x0072, 0x003c); Tag const AbstractPriorCodeSequence(0x0072, 0x003e); Tag const ImageSetLabel(0x0072, 0x0040); Tag const SelectorAttributeVR(0x0072, 0x0050); Tag const SelectorSequencePointer(0x0072, 0x0052); Tag const SelectorSequencePointerPrivateCreator(0x0072, 0x0054); Tag const SelectorAttributePrivateCreator(0x0072, 0x0056); Tag const SelectorAEValue(0x0072, 0x005e); Tag const SelectorASValue(0x0072, 0x005f); Tag const SelectorATValue(0x0072, 0x0060); Tag const SelectorDAValue(0x0072, 0x0061); Tag const SelectorCSValue(0x0072, 0x0062); Tag const SelectorDTValue(0x0072, 0x0063); Tag const SelectorISValue(0x0072, 0x0064); Tag const SelectorOBValue(0x0072, 0x0065); Tag const SelectorLOValue(0x0072, 0x0066); Tag const SelectorOFValue(0x0072, 0x0067); Tag const SelectorLTValue(0x0072, 0x0068); Tag const SelectorOWValue(0x0072, 0x0069); Tag const SelectorPNValue(0x0072, 0x006a); Tag const SelectorTMValue(0x0072, 0x006b); Tag const SelectorSHValue(0x0072, 0x006c); Tag const SelectorUNValue(0x0072, 0x006d); Tag const SelectorSTValue(0x0072, 0x006e); Tag const SelectorUCValue(0x0072, 0x006f); Tag const SelectorUTValue(0x0072, 0x0070); Tag const SelectorURValue(0x0072, 0x0071); Tag const SelectorDSValue(0x0072, 0x0072); Tag const SelectorODValue(0x0072, 0x0073); Tag const SelectorFDValue(0x0072, 0x0074); Tag const SelectorOLValue(0x0072, 0x0075); Tag const SelectorFLValue(0x0072, 0x0076); Tag const SelectorULValue(0x0072, 0x0078); Tag const SelectorUSValue(0x0072, 0x007a); Tag const SelectorSLValue(0x0072, 0x007c); Tag const SelectorSSValue(0x0072, 0x007e); Tag const SelectorUIValue(0x0072, 0x007f); Tag const SelectorCodeSequenceValue(0x0072, 0x0080); Tag const NumberOfScreens(0x0072, 0x0100); Tag const NominalScreenDefinitionSequence(0x0072, 0x0102); Tag const NumberOfVerticalPixels(0x0072, 0x0104); Tag const NumberOfHorizontalPixels(0x0072, 0x0106); Tag const DisplayEnvironmentSpatialPosition(0x0072, 0x0108); Tag const ScreenMinimumGrayscaleBitDepth(0x0072, 0x010a); Tag const ScreenMinimumColorBitDepth(0x0072, 0x010c); Tag const ApplicationMaximumRepaintTime(0x0072, 0x010e); Tag const DisplaySetsSequence(0x0072, 0x0200); Tag const DisplaySetNumber(0x0072, 0x0202); Tag const DisplaySetLabel(0x0072, 0x0203); Tag const DisplaySetPresentationGroup(0x0072, 0x0204); Tag const DisplaySetPresentationGroupDescription(0x0072, 0x0206); Tag const PartialDataDisplayHandling(0x0072, 0x0208); Tag const SynchronizedScrollingSequence(0x0072, 0x0210); Tag const DisplaySetScrollingGroup(0x0072, 0x0212); Tag const NavigationIndicatorSequence(0x0072, 0x0214); Tag const NavigationDisplaySet(0x0072, 0x0216); Tag const ReferenceDisplaySets(0x0072, 0x0218); Tag const ImageBoxesSequence(0x0072, 0x0300); Tag const ImageBoxNumber(0x0072, 0x0302); Tag const ImageBoxLayoutType(0x0072, 0x0304); Tag const ImageBoxTileHorizontalDimension(0x0072, 0x0306); Tag const ImageBoxTileVerticalDimension(0x0072, 0x0308); Tag const ImageBoxScrollDirection(0x0072, 0x0310); Tag const ImageBoxSmallScrollType(0x0072, 0x0312); Tag const ImageBoxSmallScrollAmount(0x0072, 0x0314); Tag const ImageBoxLargeScrollType(0x0072, 0x0316); Tag const ImageBoxLargeScrollAmount(0x0072, 0x0318); Tag const ImageBoxOverlapPriority(0x0072, 0x0320); Tag const CineRelativeToRealTime(0x0072, 0x0330); Tag const FilterOperationsSequence(0x0072, 0x0400); Tag const FilterByCategory(0x0072, 0x0402); Tag const FilterByAttributePresence(0x0072, 0x0404); Tag const FilterByOperator(0x0072, 0x0406); Tag const StructuredDisplayBackgroundCIELabValue(0x0072, 0x0420); Tag const EmptyImageBoxCIELabValue(0x0072, 0x0421); Tag const StructuredDisplayImageBoxSequence(0x0072, 0x0422); Tag const StructuredDisplayTextBoxSequence(0x0072, 0x0424); Tag const ReferencedFirstFrameSequence(0x0072, 0x0427); Tag const ImageBoxSynchronizationSequence(0x0072, 0x0430); Tag const SynchronizedImageBoxList(0x0072, 0x0432); Tag const TypeOfSynchronization(0x0072, 0x0434); Tag const BlendingOperationType(0x0072, 0x0500); Tag const ReformattingOperationType(0x0072, 0x0510); Tag const ReformattingThickness(0x0072, 0x0512); Tag const ReformattingInterval(0x0072, 0x0514); Tag const ReformattingOperationInitialViewDirection(0x0072, 0x0516); Tag const ThreeDRenderingType(0x0072, 0x0520); Tag const SortingOperationsSequence(0x0072, 0x0600); Tag const SortByCategory(0x0072, 0x0602); Tag const SortingDirection(0x0072, 0x0604); Tag const DisplaySetPatientOrientation(0x0072, 0x0700); Tag const VOIType(0x0072, 0x0702); Tag const PseudoColorType(0x0072, 0x0704); Tag const PseudoColorPaletteInstanceReferenceSequence(0x0072, 0x0705); Tag const ShowGrayscaleInverted(0x0072, 0x0706); Tag const ShowImageTrueSizeFlag(0x0072, 0x0710); Tag const ShowGraphicAnnotationFlag(0x0072, 0x0712); Tag const ShowPatientDemographicsFlag(0x0072, 0x0714); Tag const ShowAcquisitionTechniquesFlag(0x0072, 0x0716); Tag const DisplaySetHorizontalJustification(0x0072, 0x0717); Tag const DisplaySetVerticalJustification(0x0072, 0x0718); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0072odil-0.11.0/src/odil/registry_0074.cpp000066400000000000000000000424031362244656000172770ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0074( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0074, 0x0120), ElementsDictionaryEntry("Continuation Start Meterset", "ContinuationStartMeterset", "FD", "1")); public_dictionary.emplace(Tag(0x0074, 0x0121), ElementsDictionaryEntry("Continuation End Meterset", "ContinuationEndMeterset", "FD", "1")); public_dictionary.emplace(Tag(0x0074, 0x1000), ElementsDictionaryEntry("Procedure Step State", "ProcedureStepState", "CS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1002), ElementsDictionaryEntry("Procedure Step Progress Information Sequence", "ProcedureStepProgressInformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1004), ElementsDictionaryEntry("Procedure Step Progress", "ProcedureStepProgress", "DS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1006), ElementsDictionaryEntry("Procedure Step Progress Description", "ProcedureStepProgressDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0074, 0x1007), ElementsDictionaryEntry("Procedure Step Progress Parameters Sequence", "ProcedureStepProgressParametersSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1008), ElementsDictionaryEntry("Procedure Step Communications URI Sequence", "ProcedureStepCommunicationsURISequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x100a), ElementsDictionaryEntry("Contact URI", "ContactURI", "UR", "1")); public_dictionary.emplace(Tag(0x0074, 0x100c), ElementsDictionaryEntry("Contact Display Name", "ContactDisplayName", "LO", "1")); public_dictionary.emplace(Tag(0x0074, 0x100e), ElementsDictionaryEntry("Procedure Step Discontinuation Reason Code Sequence", "ProcedureStepDiscontinuationReasonCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1020), ElementsDictionaryEntry("Beam Task Sequence", "BeamTaskSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1022), ElementsDictionaryEntry("Beam Task Type", "BeamTaskType", "CS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1024), ElementsDictionaryEntry("Beam Order Index (Trial)", "BeamOrderIndexTrial", "IS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1025), ElementsDictionaryEntry("Autosequence Flag", "AutosequenceFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1026), ElementsDictionaryEntry("Table Top Vertical Adjusted Position", "TableTopVerticalAdjustedPosition", "FD", "1")); public_dictionary.emplace(Tag(0x0074, 0x1027), ElementsDictionaryEntry("Table Top Longitudinal Adjusted Position", "TableTopLongitudinalAdjustedPosition", "FD", "1")); public_dictionary.emplace(Tag(0x0074, 0x1028), ElementsDictionaryEntry("Table Top Lateral Adjusted Position", "TableTopLateralAdjustedPosition", "FD", "1")); public_dictionary.emplace(Tag(0x0074, 0x102a), ElementsDictionaryEntry("Patient Support Adjusted Angle", "PatientSupportAdjustedAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0074, 0x102b), ElementsDictionaryEntry("Table Top Eccentric Adjusted Angle", "TableTopEccentricAdjustedAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0074, 0x102c), ElementsDictionaryEntry("Table Top Pitch Adjusted Angle", "TableTopPitchAdjustedAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0074, 0x102d), ElementsDictionaryEntry("Table Top Roll Adjusted Angle", "TableTopRollAdjustedAngle", "FD", "1")); public_dictionary.emplace(Tag(0x0074, 0x1030), ElementsDictionaryEntry("Delivery Verification Image Sequence", "DeliveryVerificationImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1032), ElementsDictionaryEntry("Verification Image Timing", "VerificationImageTiming", "CS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1034), ElementsDictionaryEntry("Double Exposure Flag", "DoubleExposureFlag", "CS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1036), ElementsDictionaryEntry("Double Exposure Ordering", "DoubleExposureOrdering", "CS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1038), ElementsDictionaryEntry("Double Exposure Meterset (Trial)", "DoubleExposureMetersetTrial", "DS", "1")); public_dictionary.emplace(Tag(0x0074, 0x103a), ElementsDictionaryEntry("Double Exposure Field Delta (Trial)", "DoubleExposureFieldDeltaTrial", "DS", "4")); public_dictionary.emplace(Tag(0x0074, 0x1040), ElementsDictionaryEntry("Related Reference RT Image Sequence", "RelatedReferenceRTImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1042), ElementsDictionaryEntry("General Machine Verification Sequence", "GeneralMachineVerificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1044), ElementsDictionaryEntry("Conventional Machine Verification Sequence", "ConventionalMachineVerificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1046), ElementsDictionaryEntry("Ion Machine Verification Sequence", "IonMachineVerificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1048), ElementsDictionaryEntry("Failed Attributes Sequence", "FailedAttributesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x104a), ElementsDictionaryEntry("Overridden Attributes Sequence", "OverriddenAttributesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x104c), ElementsDictionaryEntry("Conventional Control Point Verification Sequence", "ConventionalControlPointVerificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x104e), ElementsDictionaryEntry("Ion Control Point Verification Sequence", "IonControlPointVerificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1050), ElementsDictionaryEntry("Attribute Occurrence Sequence", "AttributeOccurrenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1052), ElementsDictionaryEntry("Attribute Occurrence Pointer", "AttributeOccurrencePointer", "AT", "1")); public_dictionary.emplace(Tag(0x0074, 0x1054), ElementsDictionaryEntry("Attribute Item Selector", "AttributeItemSelector", "UL", "1")); public_dictionary.emplace(Tag(0x0074, 0x1056), ElementsDictionaryEntry("Attribute Occurrence Private Creator", "AttributeOccurrencePrivateCreator", "LO", "1")); public_dictionary.emplace(Tag(0x0074, 0x1057), ElementsDictionaryEntry("Selector Sequence Pointer Items", "SelectorSequencePointerItems", "IS", "1-n")); public_dictionary.emplace(Tag(0x0074, 0x1200), ElementsDictionaryEntry("Scheduled Procedure Step Priority", "ScheduledProcedureStepPriority", "CS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1202), ElementsDictionaryEntry("Worklist Label", "WorklistLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0074, 0x1204), ElementsDictionaryEntry("Procedure Step Label", "ProcedureStepLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0074, 0x1210), ElementsDictionaryEntry("Scheduled Processing Parameters Sequence", "ScheduledProcessingParametersSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1212), ElementsDictionaryEntry("Performed Processing Parameters Sequence", "PerformedProcessingParametersSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1216), ElementsDictionaryEntry("Unified Procedure Step Performed Procedure Sequence", "UnifiedProcedureStepPerformedProcedureSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1220), ElementsDictionaryEntry("Related Procedure Step Sequence", "RelatedProcedureStepSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1222), ElementsDictionaryEntry("Procedure Step Relationship Type", "ProcedureStepRelationshipType", "LO", "1")); public_dictionary.emplace(Tag(0x0074, 0x1224), ElementsDictionaryEntry("Replaced Procedure Step Sequence", "ReplacedProcedureStepSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1230), ElementsDictionaryEntry("Deletion Lock", "DeletionLock", "LO", "1")); public_dictionary.emplace(Tag(0x0074, 0x1234), ElementsDictionaryEntry("Receiving AE", "ReceivingAE", "AE", "1")); public_dictionary.emplace(Tag(0x0074, 0x1236), ElementsDictionaryEntry("Requesting AE", "RequestingAE", "AE", "1")); public_dictionary.emplace(Tag(0x0074, 0x1238), ElementsDictionaryEntry("Reason for Cancellation", "ReasonForCancellation", "LT", "1")); public_dictionary.emplace(Tag(0x0074, 0x1242), ElementsDictionaryEntry("SCP Status", "SCPStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1244), ElementsDictionaryEntry("Subscription List Status", "SubscriptionListStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1246), ElementsDictionaryEntry("Unified Procedure Step List Status", "UnifiedProcedureStepListStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1324), ElementsDictionaryEntry("Beam Order Index", "BeamOrderIndex", "UL", "1")); public_dictionary.emplace(Tag(0x0074, 0x1338), ElementsDictionaryEntry("Double Exposure Meterset", "DoubleExposureMeterset", "FD", "1")); public_dictionary.emplace(Tag(0x0074, 0x133a), ElementsDictionaryEntry("Double Exposure Field Delta", "DoubleExposureFieldDelta", "FD", "4")); public_dictionary.emplace(Tag(0x0074, 0x1401), ElementsDictionaryEntry("Brachy Task Sequence", "BrachyTaskSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1402), ElementsDictionaryEntry("Continuation Start Total Reference Air Kerma", "ContinuationStartTotalReferenceAirKerma", "DS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1403), ElementsDictionaryEntry("Continuation End Total Reference Air Kerma", "ContinuationEndTotalReferenceAirKerma", "DS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1404), ElementsDictionaryEntry("Continuation Pulse Number", "ContinuationPulseNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1405), ElementsDictionaryEntry("Channel Delivery Order Sequence", "ChannelDeliveryOrderSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x1406), ElementsDictionaryEntry("Referenced Channel Number", "ReferencedChannelNumber", "IS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1407), ElementsDictionaryEntry("Start Cumulative Time Weight", "StartCumulativeTimeWeight", "DS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1408), ElementsDictionaryEntry("End Cumulative Time Weight", "EndCumulativeTimeWeight", "DS", "1")); public_dictionary.emplace(Tag(0x0074, 0x1409), ElementsDictionaryEntry("Omitted Channel Sequence", "OmittedChannelSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x140a), ElementsDictionaryEntry("Reason for Channel Omission", "ReasonForChannelOmission", "CS", "1")); public_dictionary.emplace(Tag(0x0074, 0x140b), ElementsDictionaryEntry("Reason for Channel Omission Description", "ReasonForChannelOmissionDescription", "LO", "1")); public_dictionary.emplace(Tag(0x0074, 0x140c), ElementsDictionaryEntry("Channel Delivery Order Index", "ChannelDeliveryOrderIndex", "IS", "1")); public_dictionary.emplace(Tag(0x0074, 0x140d), ElementsDictionaryEntry("Channel Delivery Continuation Sequence", "ChannelDeliveryContinuationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0074, 0x140e), ElementsDictionaryEntry("Omitted Application Setup Sequence", "OmittedApplicationSetupSequence", "SQ", "1")); public_tags.emplace("ContinuationStartMeterset", Tag(0x0074, 0x0120)); public_tags.emplace("ContinuationEndMeterset", Tag(0x0074, 0x0121)); public_tags.emplace("ProcedureStepState", Tag(0x0074, 0x1000)); public_tags.emplace("ProcedureStepProgressInformationSequence", Tag(0x0074, 0x1002)); public_tags.emplace("ProcedureStepProgress", Tag(0x0074, 0x1004)); public_tags.emplace("ProcedureStepProgressDescription", Tag(0x0074, 0x1006)); public_tags.emplace("ProcedureStepProgressParametersSequence", Tag(0x0074, 0x1007)); public_tags.emplace("ProcedureStepCommunicationsURISequence", Tag(0x0074, 0x1008)); public_tags.emplace("ContactURI", Tag(0x0074, 0x100a)); public_tags.emplace("ContactDisplayName", Tag(0x0074, 0x100c)); public_tags.emplace("ProcedureStepDiscontinuationReasonCodeSequence", Tag(0x0074, 0x100e)); public_tags.emplace("BeamTaskSequence", Tag(0x0074, 0x1020)); public_tags.emplace("BeamTaskType", Tag(0x0074, 0x1022)); public_tags.emplace("BeamOrderIndexTrial", Tag(0x0074, 0x1024)); public_tags.emplace("AutosequenceFlag", Tag(0x0074, 0x1025)); public_tags.emplace("TableTopVerticalAdjustedPosition", Tag(0x0074, 0x1026)); public_tags.emplace("TableTopLongitudinalAdjustedPosition", Tag(0x0074, 0x1027)); public_tags.emplace("TableTopLateralAdjustedPosition", Tag(0x0074, 0x1028)); public_tags.emplace("PatientSupportAdjustedAngle", Tag(0x0074, 0x102a)); public_tags.emplace("TableTopEccentricAdjustedAngle", Tag(0x0074, 0x102b)); public_tags.emplace("TableTopPitchAdjustedAngle", Tag(0x0074, 0x102c)); public_tags.emplace("TableTopRollAdjustedAngle", Tag(0x0074, 0x102d)); public_tags.emplace("DeliveryVerificationImageSequence", Tag(0x0074, 0x1030)); public_tags.emplace("VerificationImageTiming", Tag(0x0074, 0x1032)); public_tags.emplace("DoubleExposureFlag", Tag(0x0074, 0x1034)); public_tags.emplace("DoubleExposureOrdering", Tag(0x0074, 0x1036)); public_tags.emplace("DoubleExposureMetersetTrial", Tag(0x0074, 0x1038)); public_tags.emplace("DoubleExposureFieldDeltaTrial", Tag(0x0074, 0x103a)); public_tags.emplace("RelatedReferenceRTImageSequence", Tag(0x0074, 0x1040)); public_tags.emplace("GeneralMachineVerificationSequence", Tag(0x0074, 0x1042)); public_tags.emplace("ConventionalMachineVerificationSequence", Tag(0x0074, 0x1044)); public_tags.emplace("IonMachineVerificationSequence", Tag(0x0074, 0x1046)); public_tags.emplace("FailedAttributesSequence", Tag(0x0074, 0x1048)); public_tags.emplace("OverriddenAttributesSequence", Tag(0x0074, 0x104a)); public_tags.emplace("ConventionalControlPointVerificationSequence", Tag(0x0074, 0x104c)); public_tags.emplace("IonControlPointVerificationSequence", Tag(0x0074, 0x104e)); public_tags.emplace("AttributeOccurrenceSequence", Tag(0x0074, 0x1050)); public_tags.emplace("AttributeOccurrencePointer", Tag(0x0074, 0x1052)); public_tags.emplace("AttributeItemSelector", Tag(0x0074, 0x1054)); public_tags.emplace("AttributeOccurrencePrivateCreator", Tag(0x0074, 0x1056)); public_tags.emplace("SelectorSequencePointerItems", Tag(0x0074, 0x1057)); public_tags.emplace("ScheduledProcedureStepPriority", Tag(0x0074, 0x1200)); public_tags.emplace("WorklistLabel", Tag(0x0074, 0x1202)); public_tags.emplace("ProcedureStepLabel", Tag(0x0074, 0x1204)); public_tags.emplace("ScheduledProcessingParametersSequence", Tag(0x0074, 0x1210)); public_tags.emplace("PerformedProcessingParametersSequence", Tag(0x0074, 0x1212)); public_tags.emplace("UnifiedProcedureStepPerformedProcedureSequence", Tag(0x0074, 0x1216)); public_tags.emplace("RelatedProcedureStepSequence", Tag(0x0074, 0x1220)); public_tags.emplace("ProcedureStepRelationshipType", Tag(0x0074, 0x1222)); public_tags.emplace("ReplacedProcedureStepSequence", Tag(0x0074, 0x1224)); public_tags.emplace("DeletionLock", Tag(0x0074, 0x1230)); public_tags.emplace("ReceivingAE", Tag(0x0074, 0x1234)); public_tags.emplace("RequestingAE", Tag(0x0074, 0x1236)); public_tags.emplace("ReasonForCancellation", Tag(0x0074, 0x1238)); public_tags.emplace("SCPStatus", Tag(0x0074, 0x1242)); public_tags.emplace("SubscriptionListStatus", Tag(0x0074, 0x1244)); public_tags.emplace("UnifiedProcedureStepListStatus", Tag(0x0074, 0x1246)); public_tags.emplace("BeamOrderIndex", Tag(0x0074, 0x1324)); public_tags.emplace("DoubleExposureMeterset", Tag(0x0074, 0x1338)); public_tags.emplace("DoubleExposureFieldDelta", Tag(0x0074, 0x133a)); public_tags.emplace("BrachyTaskSequence", Tag(0x0074, 0x1401)); public_tags.emplace("ContinuationStartTotalReferenceAirKerma", Tag(0x0074, 0x1402)); public_tags.emplace("ContinuationEndTotalReferenceAirKerma", Tag(0x0074, 0x1403)); public_tags.emplace("ContinuationPulseNumber", Tag(0x0074, 0x1404)); public_tags.emplace("ChannelDeliveryOrderSequence", Tag(0x0074, 0x1405)); public_tags.emplace("ReferencedChannelNumber", Tag(0x0074, 0x1406)); public_tags.emplace("StartCumulativeTimeWeight", Tag(0x0074, 0x1407)); public_tags.emplace("EndCumulativeTimeWeight", Tag(0x0074, 0x1408)); public_tags.emplace("OmittedChannelSequence", Tag(0x0074, 0x1409)); public_tags.emplace("ReasonForChannelOmission", Tag(0x0074, 0x140a)); public_tags.emplace("ReasonForChannelOmissionDescription", Tag(0x0074, 0x140b)); public_tags.emplace("ChannelDeliveryOrderIndex", Tag(0x0074, 0x140c)); public_tags.emplace("ChannelDeliveryContinuationSequence", Tag(0x0074, 0x140d)); public_tags.emplace("OmittedApplicationSetupSequence", Tag(0x0074, 0x140e)); } } }odil-0.11.0/src/odil/registry_0074.h000066400000000000000000000111631362244656000167430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0074 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0074 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ContinuationStartMeterset(0x0074, 0x0120); Tag const ContinuationEndMeterset(0x0074, 0x0121); Tag const ProcedureStepState(0x0074, 0x1000); Tag const ProcedureStepProgressInformationSequence(0x0074, 0x1002); Tag const ProcedureStepProgress(0x0074, 0x1004); Tag const ProcedureStepProgressDescription(0x0074, 0x1006); Tag const ProcedureStepProgressParametersSequence(0x0074, 0x1007); Tag const ProcedureStepCommunicationsURISequence(0x0074, 0x1008); Tag const ContactURI(0x0074, 0x100a); Tag const ContactDisplayName(0x0074, 0x100c); Tag const ProcedureStepDiscontinuationReasonCodeSequence(0x0074, 0x100e); Tag const BeamTaskSequence(0x0074, 0x1020); Tag const BeamTaskType(0x0074, 0x1022); Tag const BeamOrderIndexTrial(0x0074, 0x1024); Tag const AutosequenceFlag(0x0074, 0x1025); Tag const TableTopVerticalAdjustedPosition(0x0074, 0x1026); Tag const TableTopLongitudinalAdjustedPosition(0x0074, 0x1027); Tag const TableTopLateralAdjustedPosition(0x0074, 0x1028); Tag const PatientSupportAdjustedAngle(0x0074, 0x102a); Tag const TableTopEccentricAdjustedAngle(0x0074, 0x102b); Tag const TableTopPitchAdjustedAngle(0x0074, 0x102c); Tag const TableTopRollAdjustedAngle(0x0074, 0x102d); Tag const DeliveryVerificationImageSequence(0x0074, 0x1030); Tag const VerificationImageTiming(0x0074, 0x1032); Tag const DoubleExposureFlag(0x0074, 0x1034); Tag const DoubleExposureOrdering(0x0074, 0x1036); Tag const DoubleExposureMetersetTrial(0x0074, 0x1038); Tag const DoubleExposureFieldDeltaTrial(0x0074, 0x103a); Tag const RelatedReferenceRTImageSequence(0x0074, 0x1040); Tag const GeneralMachineVerificationSequence(0x0074, 0x1042); Tag const ConventionalMachineVerificationSequence(0x0074, 0x1044); Tag const IonMachineVerificationSequence(0x0074, 0x1046); Tag const FailedAttributesSequence(0x0074, 0x1048); Tag const OverriddenAttributesSequence(0x0074, 0x104a); Tag const ConventionalControlPointVerificationSequence(0x0074, 0x104c); Tag const IonControlPointVerificationSequence(0x0074, 0x104e); Tag const AttributeOccurrenceSequence(0x0074, 0x1050); Tag const AttributeOccurrencePointer(0x0074, 0x1052); Tag const AttributeItemSelector(0x0074, 0x1054); Tag const AttributeOccurrencePrivateCreator(0x0074, 0x1056); Tag const SelectorSequencePointerItems(0x0074, 0x1057); Tag const ScheduledProcedureStepPriority(0x0074, 0x1200); Tag const WorklistLabel(0x0074, 0x1202); Tag const ProcedureStepLabel(0x0074, 0x1204); Tag const ScheduledProcessingParametersSequence(0x0074, 0x1210); Tag const PerformedProcessingParametersSequence(0x0074, 0x1212); Tag const UnifiedProcedureStepPerformedProcedureSequence(0x0074, 0x1216); Tag const RelatedProcedureStepSequence(0x0074, 0x1220); Tag const ProcedureStepRelationshipType(0x0074, 0x1222); Tag const ReplacedProcedureStepSequence(0x0074, 0x1224); Tag const DeletionLock(0x0074, 0x1230); Tag const ReceivingAE(0x0074, 0x1234); Tag const RequestingAE(0x0074, 0x1236); Tag const ReasonForCancellation(0x0074, 0x1238); Tag const SCPStatus(0x0074, 0x1242); Tag const SubscriptionListStatus(0x0074, 0x1244); Tag const UnifiedProcedureStepListStatus(0x0074, 0x1246); Tag const BeamOrderIndex(0x0074, 0x1324); Tag const DoubleExposureMeterset(0x0074, 0x1338); Tag const DoubleExposureFieldDelta(0x0074, 0x133a); Tag const BrachyTaskSequence(0x0074, 0x1401); Tag const ContinuationStartTotalReferenceAirKerma(0x0074, 0x1402); Tag const ContinuationEndTotalReferenceAirKerma(0x0074, 0x1403); Tag const ContinuationPulseNumber(0x0074, 0x1404); Tag const ChannelDeliveryOrderSequence(0x0074, 0x1405); Tag const ReferencedChannelNumber(0x0074, 0x1406); Tag const StartCumulativeTimeWeight(0x0074, 0x1407); Tag const EndCumulativeTimeWeight(0x0074, 0x1408); Tag const OmittedChannelSequence(0x0074, 0x1409); Tag const ReasonForChannelOmission(0x0074, 0x140a); Tag const ReasonForChannelOmissionDescription(0x0074, 0x140b); Tag const ChannelDeliveryOrderIndex(0x0074, 0x140c); Tag const ChannelDeliveryContinuationSequence(0x0074, 0x140d); Tag const OmittedApplicationSetupSequence(0x0074, 0x140e); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0074odil-0.11.0/src/odil/registry_0076.cpp000066400000000000000000000137151362244656000173050ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0076( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0076, 0x0001), ElementsDictionaryEntry("Implant Assembly Template Name", "ImplantAssemblyTemplateName", "LO", "1")); public_dictionary.emplace(Tag(0x0076, 0x0003), ElementsDictionaryEntry("Implant Assembly Template Issuer", "ImplantAssemblyTemplateIssuer", "LO", "1")); public_dictionary.emplace(Tag(0x0076, 0x0006), ElementsDictionaryEntry("Implant Assembly Template Version", "ImplantAssemblyTemplateVersion", "LO", "1")); public_dictionary.emplace(Tag(0x0076, 0x0008), ElementsDictionaryEntry("Replaced Implant Assembly Template Sequence", "ReplacedImplantAssemblyTemplateSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0076, 0x000a), ElementsDictionaryEntry("Implant Assembly Template Type", "ImplantAssemblyTemplateType", "CS", "1")); public_dictionary.emplace(Tag(0x0076, 0x000c), ElementsDictionaryEntry("Original Implant Assembly Template Sequence", "OriginalImplantAssemblyTemplateSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0076, 0x000e), ElementsDictionaryEntry("Derivation Implant Assembly Template Sequence", "DerivationImplantAssemblyTemplateSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0076, 0x0010), ElementsDictionaryEntry("Implant Assembly Template Target Anatomy Sequence", "ImplantAssemblyTemplateTargetAnatomySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0076, 0x0020), ElementsDictionaryEntry("Procedure Type Code Sequence", "ProcedureTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0076, 0x0030), ElementsDictionaryEntry("Surgical Technique", "SurgicalTechnique", "LO", "1")); public_dictionary.emplace(Tag(0x0076, 0x0032), ElementsDictionaryEntry("Component Types Sequence", "ComponentTypesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0076, 0x0034), ElementsDictionaryEntry("Component Type Code Sequence", "ComponentTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0076, 0x0036), ElementsDictionaryEntry("Exclusive Component Type", "ExclusiveComponentType", "CS", "1")); public_dictionary.emplace(Tag(0x0076, 0x0038), ElementsDictionaryEntry("Mandatory Component Type", "MandatoryComponentType", "CS", "1")); public_dictionary.emplace(Tag(0x0076, 0x0040), ElementsDictionaryEntry("Component Sequence", "ComponentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0076, 0x0055), ElementsDictionaryEntry("Component ID", "ComponentID", "US", "1")); public_dictionary.emplace(Tag(0x0076, 0x0060), ElementsDictionaryEntry("Component Assembly Sequence", "ComponentAssemblySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0076, 0x0070), ElementsDictionaryEntry("Component 1 Referenced ID", "Component1ReferencedID", "US", "1")); public_dictionary.emplace(Tag(0x0076, 0x0080), ElementsDictionaryEntry("Component 1 Referenced Mating Feature Set ID", "Component1ReferencedMatingFeatureSetID", "US", "1")); public_dictionary.emplace(Tag(0x0076, 0x0090), ElementsDictionaryEntry("Component 1 Referenced Mating Feature ID", "Component1ReferencedMatingFeatureID", "US", "1")); public_dictionary.emplace(Tag(0x0076, 0x00a0), ElementsDictionaryEntry("Component 2 Referenced ID", "Component2ReferencedID", "US", "1")); public_dictionary.emplace(Tag(0x0076, 0x00b0), ElementsDictionaryEntry("Component 2 Referenced Mating Feature Set ID", "Component2ReferencedMatingFeatureSetID", "US", "1")); public_dictionary.emplace(Tag(0x0076, 0x00c0), ElementsDictionaryEntry("Component 2 Referenced Mating Feature ID", "Component2ReferencedMatingFeatureID", "US", "1")); public_tags.emplace("ImplantAssemblyTemplateName", Tag(0x0076, 0x0001)); public_tags.emplace("ImplantAssemblyTemplateIssuer", Tag(0x0076, 0x0003)); public_tags.emplace("ImplantAssemblyTemplateVersion", Tag(0x0076, 0x0006)); public_tags.emplace("ReplacedImplantAssemblyTemplateSequence", Tag(0x0076, 0x0008)); public_tags.emplace("ImplantAssemblyTemplateType", Tag(0x0076, 0x000a)); public_tags.emplace("OriginalImplantAssemblyTemplateSequence", Tag(0x0076, 0x000c)); public_tags.emplace("DerivationImplantAssemblyTemplateSequence", Tag(0x0076, 0x000e)); public_tags.emplace("ImplantAssemblyTemplateTargetAnatomySequence", Tag(0x0076, 0x0010)); public_tags.emplace("ProcedureTypeCodeSequence", Tag(0x0076, 0x0020)); public_tags.emplace("SurgicalTechnique", Tag(0x0076, 0x0030)); public_tags.emplace("ComponentTypesSequence", Tag(0x0076, 0x0032)); public_tags.emplace("ComponentTypeCodeSequence", Tag(0x0076, 0x0034)); public_tags.emplace("ExclusiveComponentType", Tag(0x0076, 0x0036)); public_tags.emplace("MandatoryComponentType", Tag(0x0076, 0x0038)); public_tags.emplace("ComponentSequence", Tag(0x0076, 0x0040)); public_tags.emplace("ComponentID", Tag(0x0076, 0x0055)); public_tags.emplace("ComponentAssemblySequence", Tag(0x0076, 0x0060)); public_tags.emplace("Component1ReferencedID", Tag(0x0076, 0x0070)); public_tags.emplace("Component1ReferencedMatingFeatureSetID", Tag(0x0076, 0x0080)); public_tags.emplace("Component1ReferencedMatingFeatureID", Tag(0x0076, 0x0090)); public_tags.emplace("Component2ReferencedID", Tag(0x0076, 0x00a0)); public_tags.emplace("Component2ReferencedMatingFeatureSetID", Tag(0x0076, 0x00b0)); public_tags.emplace("Component2ReferencedMatingFeatureID", Tag(0x0076, 0x00c0)); } } }odil-0.11.0/src/odil/registry_0076.h000066400000000000000000000036771362244656000167600ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0076 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0076 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ImplantAssemblyTemplateName(0x0076, 0x0001); Tag const ImplantAssemblyTemplateIssuer(0x0076, 0x0003); Tag const ImplantAssemblyTemplateVersion(0x0076, 0x0006); Tag const ReplacedImplantAssemblyTemplateSequence(0x0076, 0x0008); Tag const ImplantAssemblyTemplateType(0x0076, 0x000a); Tag const OriginalImplantAssemblyTemplateSequence(0x0076, 0x000c); Tag const DerivationImplantAssemblyTemplateSequence(0x0076, 0x000e); Tag const ImplantAssemblyTemplateTargetAnatomySequence(0x0076, 0x0010); Tag const ProcedureTypeCodeSequence(0x0076, 0x0020); Tag const SurgicalTechnique(0x0076, 0x0030); Tag const ComponentTypesSequence(0x0076, 0x0032); Tag const ComponentTypeCodeSequence(0x0076, 0x0034); Tag const ExclusiveComponentType(0x0076, 0x0036); Tag const MandatoryComponentType(0x0076, 0x0038); Tag const ComponentSequence(0x0076, 0x0040); Tag const ComponentID(0x0076, 0x0055); Tag const ComponentAssemblySequence(0x0076, 0x0060); Tag const Component1ReferencedID(0x0076, 0x0070); Tag const Component1ReferencedMatingFeatureSetID(0x0076, 0x0080); Tag const Component1ReferencedMatingFeatureID(0x0076, 0x0090); Tag const Component2ReferencedID(0x0076, 0x00a0); Tag const Component2ReferencedMatingFeatureSetID(0x0076, 0x00b0); Tag const Component2ReferencedMatingFeatureID(0x0076, 0x00c0); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0076odil-0.11.0/src/odil/registry_0078.cpp000066400000000000000000000125571362244656000173120ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0078( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0078, 0x0001), ElementsDictionaryEntry("Implant Template Group Name", "ImplantTemplateGroupName", "LO", "1")); public_dictionary.emplace(Tag(0x0078, 0x0010), ElementsDictionaryEntry("Implant Template Group Description", "ImplantTemplateGroupDescription", "ST", "1")); public_dictionary.emplace(Tag(0x0078, 0x0020), ElementsDictionaryEntry("Implant Template Group Issuer", "ImplantTemplateGroupIssuer", "LO", "1")); public_dictionary.emplace(Tag(0x0078, 0x0024), ElementsDictionaryEntry("Implant Template Group Version", "ImplantTemplateGroupVersion", "LO", "1")); public_dictionary.emplace(Tag(0x0078, 0x0026), ElementsDictionaryEntry("Replaced Implant Template Group Sequence", "ReplacedImplantTemplateGroupSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0078, 0x0028), ElementsDictionaryEntry("Implant Template Group Target Anatomy Sequence", "ImplantTemplateGroupTargetAnatomySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0078, 0x002a), ElementsDictionaryEntry("Implant Template Group Members Sequence", "ImplantTemplateGroupMembersSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0078, 0x002e), ElementsDictionaryEntry("Implant Template Group Member ID", "ImplantTemplateGroupMemberID", "US", "1")); public_dictionary.emplace(Tag(0x0078, 0x0050), ElementsDictionaryEntry("3D Implant Template Group Member Matching Point", "ThreeDImplantTemplateGroupMemberMatchingPoint", "FD", "3")); public_dictionary.emplace(Tag(0x0078, 0x0060), ElementsDictionaryEntry("3D Implant Template Group Member Matching Axes", "ThreeDImplantTemplateGroupMemberMatchingAxes", "FD", "9")); public_dictionary.emplace(Tag(0x0078, 0x0070), ElementsDictionaryEntry("Implant Template Group Member Matching 2D Coordinates Sequence", "ImplantTemplateGroupMemberMatching2DCoordinatesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0078, 0x0090), ElementsDictionaryEntry("2D Implant Template Group Member Matching Point", "TwoDImplantTemplateGroupMemberMatchingPoint", "FD", "2")); public_dictionary.emplace(Tag(0x0078, 0x00a0), ElementsDictionaryEntry("2D Implant Template Group Member Matching Axes", "TwoDImplantTemplateGroupMemberMatchingAxes", "FD", "4")); public_dictionary.emplace(Tag(0x0078, 0x00b0), ElementsDictionaryEntry("Implant Template Group Variation Dimension Sequence", "ImplantTemplateGroupVariationDimensionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0078, 0x00b2), ElementsDictionaryEntry("Implant Template Group Variation Dimension Name", "ImplantTemplateGroupVariationDimensionName", "LO", "1")); public_dictionary.emplace(Tag(0x0078, 0x00b4), ElementsDictionaryEntry("Implant Template Group Variation Dimension Rank Sequence", "ImplantTemplateGroupVariationDimensionRankSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0078, 0x00b6), ElementsDictionaryEntry("Referenced Implant Template Group Member ID", "ReferencedImplantTemplateGroupMemberID", "US", "1")); public_dictionary.emplace(Tag(0x0078, 0x00b8), ElementsDictionaryEntry("Implant Template Group Variation Dimension Rank", "ImplantTemplateGroupVariationDimensionRank", "US", "1")); public_tags.emplace("ImplantTemplateGroupName", Tag(0x0078, 0x0001)); public_tags.emplace("ImplantTemplateGroupDescription", Tag(0x0078, 0x0010)); public_tags.emplace("ImplantTemplateGroupIssuer", Tag(0x0078, 0x0020)); public_tags.emplace("ImplantTemplateGroupVersion", Tag(0x0078, 0x0024)); public_tags.emplace("ReplacedImplantTemplateGroupSequence", Tag(0x0078, 0x0026)); public_tags.emplace("ImplantTemplateGroupTargetAnatomySequence", Tag(0x0078, 0x0028)); public_tags.emplace("ImplantTemplateGroupMembersSequence", Tag(0x0078, 0x002a)); public_tags.emplace("ImplantTemplateGroupMemberID", Tag(0x0078, 0x002e)); public_tags.emplace("ThreeDImplantTemplateGroupMemberMatchingPoint", Tag(0x0078, 0x0050)); public_tags.emplace("ThreeDImplantTemplateGroupMemberMatchingAxes", Tag(0x0078, 0x0060)); public_tags.emplace("ImplantTemplateGroupMemberMatching2DCoordinatesSequence", Tag(0x0078, 0x0070)); public_tags.emplace("TwoDImplantTemplateGroupMemberMatchingPoint", Tag(0x0078, 0x0090)); public_tags.emplace("TwoDImplantTemplateGroupMemberMatchingAxes", Tag(0x0078, 0x00a0)); public_tags.emplace("ImplantTemplateGroupVariationDimensionSequence", Tag(0x0078, 0x00b0)); public_tags.emplace("ImplantTemplateGroupVariationDimensionName", Tag(0x0078, 0x00b2)); public_tags.emplace("ImplantTemplateGroupVariationDimensionRankSequence", Tag(0x0078, 0x00b4)); public_tags.emplace("ReferencedImplantTemplateGroupMemberID", Tag(0x0078, 0x00b6)); public_tags.emplace("ImplantTemplateGroupVariationDimensionRank", Tag(0x0078, 0x00b8)); } } }odil-0.11.0/src/odil/registry_0078.h000066400000000000000000000035361362244656000167540ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0078 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0078 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ImplantTemplateGroupName(0x0078, 0x0001); Tag const ImplantTemplateGroupDescription(0x0078, 0x0010); Tag const ImplantTemplateGroupIssuer(0x0078, 0x0020); Tag const ImplantTemplateGroupVersion(0x0078, 0x0024); Tag const ReplacedImplantTemplateGroupSequence(0x0078, 0x0026); Tag const ImplantTemplateGroupTargetAnatomySequence(0x0078, 0x0028); Tag const ImplantTemplateGroupMembersSequence(0x0078, 0x002a); Tag const ImplantTemplateGroupMemberID(0x0078, 0x002e); Tag const ThreeDImplantTemplateGroupMemberMatchingPoint(0x0078, 0x0050); Tag const ThreeDImplantTemplateGroupMemberMatchingAxes(0x0078, 0x0060); Tag const ImplantTemplateGroupMemberMatching2DCoordinatesSequence(0x0078, 0x0070); Tag const TwoDImplantTemplateGroupMemberMatchingPoint(0x0078, 0x0090); Tag const TwoDImplantTemplateGroupMemberMatchingAxes(0x0078, 0x00a0); Tag const ImplantTemplateGroupVariationDimensionSequence(0x0078, 0x00b0); Tag const ImplantTemplateGroupVariationDimensionName(0x0078, 0x00b2); Tag const ImplantTemplateGroupVariationDimensionRankSequence(0x0078, 0x00b4); Tag const ReferencedImplantTemplateGroupMemberID(0x0078, 0x00b6); Tag const ImplantTemplateGroupVariationDimensionRank(0x0078, 0x00b8); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0078odil-0.11.0/src/odil/registry_0080.cpp000066400000000000000000000066721362244656000173040ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0080( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0080, 0x0001), ElementsDictionaryEntry("Surface Scan Acquisition Type Code Sequence", "SurfaceScanAcquisitionTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0080, 0x0002), ElementsDictionaryEntry("Surface Scan Mode Code Sequence", "SurfaceScanModeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0080, 0x0003), ElementsDictionaryEntry("Registration Method Code Sequence", "RegistrationMethodCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0080, 0x0004), ElementsDictionaryEntry("Shot Duration Time", "ShotDurationTime", "FD", "1")); public_dictionary.emplace(Tag(0x0080, 0x0005), ElementsDictionaryEntry("Shot Offset Time", "ShotOffsetTime", "FD", "1")); public_dictionary.emplace(Tag(0x0080, 0x0006), ElementsDictionaryEntry("Surface Point Presentation Value Data", "SurfacePointPresentationValueData", "US", "1-n")); public_dictionary.emplace(Tag(0x0080, 0x0007), ElementsDictionaryEntry("Surface Point Color CIELab Value Data", "SurfacePointColorCIELabValueData", "US", "3-3n")); public_dictionary.emplace(Tag(0x0080, 0x0008), ElementsDictionaryEntry("UV Mapping Sequence", "UVMappingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0080, 0x0009), ElementsDictionaryEntry("Texture Label", "TextureLabel", "SH", "1")); public_dictionary.emplace(Tag(0x0080, 0x0010), ElementsDictionaryEntry("U Value Data", "UValueData", "OF", "1")); public_dictionary.emplace(Tag(0x0080, 0x0011), ElementsDictionaryEntry("V Value Data", "VValueData", "OF", "1")); public_dictionary.emplace(Tag(0x0080, 0x0012), ElementsDictionaryEntry("Referenced Texture Sequence", "ReferencedTextureSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0080, 0x0013), ElementsDictionaryEntry("Referenced Surface Data Sequence", "ReferencedSurfaceDataSequence", "SQ", "1")); public_tags.emplace("SurfaceScanAcquisitionTypeCodeSequence", Tag(0x0080, 0x0001)); public_tags.emplace("SurfaceScanModeCodeSequence", Tag(0x0080, 0x0002)); public_tags.emplace("RegistrationMethodCodeSequence", Tag(0x0080, 0x0003)); public_tags.emplace("ShotDurationTime", Tag(0x0080, 0x0004)); public_tags.emplace("ShotOffsetTime", Tag(0x0080, 0x0005)); public_tags.emplace("SurfacePointPresentationValueData", Tag(0x0080, 0x0006)); public_tags.emplace("SurfacePointColorCIELabValueData", Tag(0x0080, 0x0007)); public_tags.emplace("UVMappingSequence", Tag(0x0080, 0x0008)); public_tags.emplace("TextureLabel", Tag(0x0080, 0x0009)); public_tags.emplace("UValueData", Tag(0x0080, 0x0010)); public_tags.emplace("VValueData", Tag(0x0080, 0x0011)); public_tags.emplace("ReferencedTextureSequence", Tag(0x0080, 0x0012)); public_tags.emplace("ReferencedSurfaceDataSequence", Tag(0x0080, 0x0013)); } } }odil-0.11.0/src/odil/registry_0080.h000066400000000000000000000025001362244656000167330ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0080 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0080 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const SurfaceScanAcquisitionTypeCodeSequence(0x0080, 0x0001); Tag const SurfaceScanModeCodeSequence(0x0080, 0x0002); Tag const RegistrationMethodCodeSequence(0x0080, 0x0003); Tag const ShotDurationTime(0x0080, 0x0004); Tag const ShotOffsetTime(0x0080, 0x0005); Tag const SurfacePointPresentationValueData(0x0080, 0x0006); Tag const SurfacePointColorCIELabValueData(0x0080, 0x0007); Tag const UVMappingSequence(0x0080, 0x0008); Tag const TextureLabel(0x0080, 0x0009); Tag const UValueData(0x0080, 0x0010); Tag const VValueData(0x0080, 0x0011); Tag const ReferencedTextureSequence(0x0080, 0x0012); Tag const ReferencedSurfaceDataSequence(0x0080, 0x0013); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0080odil-0.11.0/src/odil/registry_0082.cpp000066400000000000000000000137601362244656000173020ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0082( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0082, 0x0001), ElementsDictionaryEntry("Assessment Summary", "AssessmentSummary", "CS", "1")); public_dictionary.emplace(Tag(0x0082, 0x0003), ElementsDictionaryEntry("Assessment Summary Description", "AssessmentSummaryDescription", "UT", "1")); public_dictionary.emplace(Tag(0x0082, 0x0004), ElementsDictionaryEntry("Assessed SOP Instance Sequence", "AssessedSOPInstanceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0082, 0x0005), ElementsDictionaryEntry("Referenced Comparison SOP Instance Sequence", "ReferencedComparisonSOPInstanceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0082, 0x0006), ElementsDictionaryEntry("Number of Assessment Observations", "NumberOfAssessmentObservations", "UL", "1")); public_dictionary.emplace(Tag(0x0082, 0x0007), ElementsDictionaryEntry("Assessment Observations Sequence", "AssessmentObservationsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0082, 0x0008), ElementsDictionaryEntry("Observation Significance", "ObservationSignificance", "CS", "1")); public_dictionary.emplace(Tag(0x0082, 0x000a), ElementsDictionaryEntry("Observation Description", "ObservationDescription", "UT", "1")); public_dictionary.emplace(Tag(0x0082, 0x000c), ElementsDictionaryEntry("Structured Constraint Observation Sequence", "StructuredConstraintObservationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0082, 0x0010), ElementsDictionaryEntry("Assessed Attribute Value Sequence", "AssessedAttributeValueSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0082, 0x0016), ElementsDictionaryEntry("Assessment Set ID", "AssessmentSetID", "LO", "1")); public_dictionary.emplace(Tag(0x0082, 0x0017), ElementsDictionaryEntry("Assessment Requester Sequence", "AssessmentRequesterSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0082, 0x0018), ElementsDictionaryEntry("Selector Attribute Name", "SelectorAttributeName", "LO", "1")); public_dictionary.emplace(Tag(0x0082, 0x0019), ElementsDictionaryEntry("Selector Attribute Keyword", "SelectorAttributeKeyword", "LO", "1")); public_dictionary.emplace(Tag(0x0082, 0x0021), ElementsDictionaryEntry("Assessment Type Code Sequence", "AssessmentTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0082, 0x0022), ElementsDictionaryEntry("Observation Basis Code Sequence", "ObservationBasisCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0082, 0x0023), ElementsDictionaryEntry("Assessment Label", "AssessmentLabel", "LO", "1")); public_dictionary.emplace(Tag(0x0082, 0x0032), ElementsDictionaryEntry("Constraint Type", "ConstraintType", "CS", "1")); public_dictionary.emplace(Tag(0x0082, 0x0033), ElementsDictionaryEntry("Specification Selection Guidance", "SpecificationSelectionGuidance", "UT", "1")); public_dictionary.emplace(Tag(0x0082, 0x0034), ElementsDictionaryEntry("Constraint Value Sequence", "ConstraintValueSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0082, 0x0035), ElementsDictionaryEntry("Recommended Default Value Sequence", "RecommendedDefaultValueSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0082, 0x0036), ElementsDictionaryEntry("Constraint Violation Significance", "ConstraintViolationSignificance", "CS", "1")); public_dictionary.emplace(Tag(0x0082, 0x0037), ElementsDictionaryEntry("Constraint Violation Condition", "ConstraintViolationCondition", "UT", "1")); public_dictionary.emplace(Tag(0x0082, 0x0038), ElementsDictionaryEntry("Modifiable Constraint Flag", "ModifiableConstraintFlag", "CS", "1")); public_tags.emplace("AssessmentSummary", Tag(0x0082, 0x0001)); public_tags.emplace("AssessmentSummaryDescription", Tag(0x0082, 0x0003)); public_tags.emplace("AssessedSOPInstanceSequence", Tag(0x0082, 0x0004)); public_tags.emplace("ReferencedComparisonSOPInstanceSequence", Tag(0x0082, 0x0005)); public_tags.emplace("NumberOfAssessmentObservations", Tag(0x0082, 0x0006)); public_tags.emplace("AssessmentObservationsSequence", Tag(0x0082, 0x0007)); public_tags.emplace("ObservationSignificance", Tag(0x0082, 0x0008)); public_tags.emplace("ObservationDescription", Tag(0x0082, 0x000a)); public_tags.emplace("StructuredConstraintObservationSequence", Tag(0x0082, 0x000c)); public_tags.emplace("AssessedAttributeValueSequence", Tag(0x0082, 0x0010)); public_tags.emplace("AssessmentSetID", Tag(0x0082, 0x0016)); public_tags.emplace("AssessmentRequesterSequence", Tag(0x0082, 0x0017)); public_tags.emplace("SelectorAttributeName", Tag(0x0082, 0x0018)); public_tags.emplace("SelectorAttributeKeyword", Tag(0x0082, 0x0019)); public_tags.emplace("AssessmentTypeCodeSequence", Tag(0x0082, 0x0021)); public_tags.emplace("ObservationBasisCodeSequence", Tag(0x0082, 0x0022)); public_tags.emplace("AssessmentLabel", Tag(0x0082, 0x0023)); public_tags.emplace("ConstraintType", Tag(0x0082, 0x0032)); public_tags.emplace("SpecificationSelectionGuidance", Tag(0x0082, 0x0033)); public_tags.emplace("ConstraintValueSequence", Tag(0x0082, 0x0034)); public_tags.emplace("RecommendedDefaultValueSequence", Tag(0x0082, 0x0035)); public_tags.emplace("ConstraintViolationSignificance", Tag(0x0082, 0x0036)); public_tags.emplace("ConstraintViolationCondition", Tag(0x0082, 0x0037)); public_tags.emplace("ModifiableConstraintFlag", Tag(0x0082, 0x0038)); } } }odil-0.11.0/src/odil/registry_0082.h000066400000000000000000000036751362244656000167530ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0082 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0082 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const AssessmentSummary(0x0082, 0x0001); Tag const AssessmentSummaryDescription(0x0082, 0x0003); Tag const AssessedSOPInstanceSequence(0x0082, 0x0004); Tag const ReferencedComparisonSOPInstanceSequence(0x0082, 0x0005); Tag const NumberOfAssessmentObservations(0x0082, 0x0006); Tag const AssessmentObservationsSequence(0x0082, 0x0007); Tag const ObservationSignificance(0x0082, 0x0008); Tag const ObservationDescription(0x0082, 0x000a); Tag const StructuredConstraintObservationSequence(0x0082, 0x000c); Tag const AssessedAttributeValueSequence(0x0082, 0x0010); Tag const AssessmentSetID(0x0082, 0x0016); Tag const AssessmentRequesterSequence(0x0082, 0x0017); Tag const SelectorAttributeName(0x0082, 0x0018); Tag const SelectorAttributeKeyword(0x0082, 0x0019); Tag const AssessmentTypeCodeSequence(0x0082, 0x0021); Tag const ObservationBasisCodeSequence(0x0082, 0x0022); Tag const AssessmentLabel(0x0082, 0x0023); Tag const ConstraintType(0x0082, 0x0032); Tag const SpecificationSelectionGuidance(0x0082, 0x0033); Tag const ConstraintValueSequence(0x0082, 0x0034); Tag const RecommendedDefaultValueSequence(0x0082, 0x0035); Tag const ConstraintViolationSignificance(0x0082, 0x0036); Tag const ConstraintViolationCondition(0x0082, 0x0037); Tag const ModifiableConstraintFlag(0x0082, 0x0038); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0082odil-0.11.0/src/odil/registry_0088.cpp000066400000000000000000000037761362244656000173160ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0088( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0088, 0x0130), ElementsDictionaryEntry("Storage Media File-set ID", "StorageMediaFileSetID", "SH", "1")); public_dictionary.emplace(Tag(0x0088, 0x0140), ElementsDictionaryEntry("Storage Media File-set UID", "StorageMediaFileSetUID", "UI", "1")); public_dictionary.emplace(Tag(0x0088, 0x0200), ElementsDictionaryEntry("Icon Image Sequence", "IconImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0088, 0x0904), ElementsDictionaryEntry("Topic Title", "TopicTitle", "LO", "1")); public_dictionary.emplace(Tag(0x0088, 0x0906), ElementsDictionaryEntry("Topic Subject", "TopicSubject", "ST", "1")); public_dictionary.emplace(Tag(0x0088, 0x0910), ElementsDictionaryEntry("Topic Author", "TopicAuthor", "LO", "1")); public_dictionary.emplace(Tag(0x0088, 0x0912), ElementsDictionaryEntry("Topic Keywords", "TopicKeywords", "LO", "1-32")); public_tags.emplace("StorageMediaFileSetID", Tag(0x0088, 0x0130)); public_tags.emplace("StorageMediaFileSetUID", Tag(0x0088, 0x0140)); public_tags.emplace("IconImageSequence", Tag(0x0088, 0x0200)); public_tags.emplace("TopicTitle", Tag(0x0088, 0x0904)); public_tags.emplace("TopicSubject", Tag(0x0088, 0x0906)); public_tags.emplace("TopicAuthor", Tag(0x0088, 0x0910)); public_tags.emplace("TopicKeywords", Tag(0x0088, 0x0912)); } } }odil-0.11.0/src/odil/registry_0088.h000066400000000000000000000017351362244656000167540ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0088 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0088 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const StorageMediaFileSetID(0x0088, 0x0130); Tag const StorageMediaFileSetUID(0x0088, 0x0140); Tag const IconImageSequence(0x0088, 0x0200); Tag const TopicTitle(0x0088, 0x0904); Tag const TopicSubject(0x0088, 0x0906); Tag const TopicAuthor(0x0088, 0x0910); Tag const TopicKeywords(0x0088, 0x0912); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0088odil-0.11.0/src/odil/registry_0100.cpp000066400000000000000000000030721362244656000172640ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0100( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0100, 0x0410), ElementsDictionaryEntry("SOP Instance Status", "SOPInstanceStatus", "CS", "1")); public_dictionary.emplace(Tag(0x0100, 0x0420), ElementsDictionaryEntry("SOP Authorization DateTime", "SOPAuthorizationDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0100, 0x0424), ElementsDictionaryEntry("SOP Authorization Comment", "SOPAuthorizationComment", "LT", "1")); public_dictionary.emplace(Tag(0x0100, 0x0426), ElementsDictionaryEntry("Authorization Equipment Certification Number", "AuthorizationEquipmentCertificationNumber", "LO", "1")); public_tags.emplace("SOPInstanceStatus", Tag(0x0100, 0x0410)); public_tags.emplace("SOPAuthorizationDateTime", Tag(0x0100, 0x0420)); public_tags.emplace("SOPAuthorizationComment", Tag(0x0100, 0x0424)); public_tags.emplace("AuthorizationEquipmentCertificationNumber", Tag(0x0100, 0x0426)); } } }odil-0.11.0/src/odil/registry_0100.h000066400000000000000000000016101362244656000167250ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0100 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0100 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const SOPInstanceStatus(0x0100, 0x0410); Tag const SOPAuthorizationDateTime(0x0100, 0x0420); Tag const SOPAuthorizationComment(0x0100, 0x0424); Tag const AuthorizationEquipmentCertificationNumber(0x0100, 0x0426); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0100odil-0.11.0/src/odil/registry_0400.cpp000066400000000000000000000146431362244656000172750ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_0400( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x0400, 0x0005), ElementsDictionaryEntry("MAC ID Number", "MACIDNumber", "US", "1")); public_dictionary.emplace(Tag(0x0400, 0x0010), ElementsDictionaryEntry("MAC Calculation Transfer Syntax UID", "MACCalculationTransferSyntaxUID", "UI", "1")); public_dictionary.emplace(Tag(0x0400, 0x0015), ElementsDictionaryEntry("MAC Algorithm", "MACAlgorithm", "CS", "1")); public_dictionary.emplace(Tag(0x0400, 0x0020), ElementsDictionaryEntry("Data Elements Signed", "DataElementsSigned", "AT", "1-n")); public_dictionary.emplace(Tag(0x0400, 0x0100), ElementsDictionaryEntry("Digital Signature UID", "DigitalSignatureUID", "UI", "1")); public_dictionary.emplace(Tag(0x0400, 0x0105), ElementsDictionaryEntry("Digital Signature DateTime", "DigitalSignatureDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0400, 0x0110), ElementsDictionaryEntry("Certificate Type", "CertificateType", "CS", "1")); public_dictionary.emplace(Tag(0x0400, 0x0115), ElementsDictionaryEntry("Certificate of Signer", "CertificateOfSigner", "OB", "1")); public_dictionary.emplace(Tag(0x0400, 0x0120), ElementsDictionaryEntry("Signature", "Signature", "OB", "1")); public_dictionary.emplace(Tag(0x0400, 0x0305), ElementsDictionaryEntry("Certified Timestamp Type", "CertifiedTimestampType", "CS", "1")); public_dictionary.emplace(Tag(0x0400, 0x0310), ElementsDictionaryEntry("Certified Timestamp", "CertifiedTimestamp", "OB", "1")); public_dictionary.emplace(Tag(0x0400, 0x0401), ElementsDictionaryEntry("Digital Signature Purpose Code Sequence", "DigitalSignaturePurposeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0400, 0x0402), ElementsDictionaryEntry("Referenced Digital Signature Sequence", "ReferencedDigitalSignatureSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0400, 0x0403), ElementsDictionaryEntry("Referenced SOP Instance MAC Sequence", "ReferencedSOPInstanceMACSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0400, 0x0404), ElementsDictionaryEntry("MAC", "MAC", "OB", "1")); public_dictionary.emplace(Tag(0x0400, 0x0500), ElementsDictionaryEntry("Encrypted Attributes Sequence", "EncryptedAttributesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0400, 0x0510), ElementsDictionaryEntry("Encrypted Content Transfer Syntax UID", "EncryptedContentTransferSyntaxUID", "UI", "1")); public_dictionary.emplace(Tag(0x0400, 0x0520), ElementsDictionaryEntry("Encrypted Content", "EncryptedContent", "OB", "1")); public_dictionary.emplace(Tag(0x0400, 0x0550), ElementsDictionaryEntry("Modified Attributes Sequence", "ModifiedAttributesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0400, 0x0551), ElementsDictionaryEntry("Nonconforming Modified Attributes Sequence", "NonconformingModifiedAttributesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0400, 0x0552), ElementsDictionaryEntry("Nonconforming Data Element Value", "NonconformingDataElementValue", "OB", "1")); public_dictionary.emplace(Tag(0x0400, 0x0561), ElementsDictionaryEntry("Original Attributes Sequence", "OriginalAttributesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x0400, 0x0562), ElementsDictionaryEntry("Attribute Modification DateTime", "AttributeModificationDateTime", "DT", "1")); public_dictionary.emplace(Tag(0x0400, 0x0563), ElementsDictionaryEntry("Modifying System", "ModifyingSystem", "LO", "1")); public_dictionary.emplace(Tag(0x0400, 0x0564), ElementsDictionaryEntry("Source of Previous Values", "SourceOfPreviousValues", "LO", "1")); public_dictionary.emplace(Tag(0x0400, 0x0565), ElementsDictionaryEntry("Reason for the Attribute Modification", "ReasonForTheAttributeModification", "CS", "1")); public_dictionary.emplace(Tag(0x0400, 0x0600), ElementsDictionaryEntry("Instance Origin Status", "InstanceOriginStatus", "CS", "1")); public_tags.emplace("MACIDNumber", Tag(0x0400, 0x0005)); public_tags.emplace("MACCalculationTransferSyntaxUID", Tag(0x0400, 0x0010)); public_tags.emplace("MACAlgorithm", Tag(0x0400, 0x0015)); public_tags.emplace("DataElementsSigned", Tag(0x0400, 0x0020)); public_tags.emplace("DigitalSignatureUID", Tag(0x0400, 0x0100)); public_tags.emplace("DigitalSignatureDateTime", Tag(0x0400, 0x0105)); public_tags.emplace("CertificateType", Tag(0x0400, 0x0110)); public_tags.emplace("CertificateOfSigner", Tag(0x0400, 0x0115)); public_tags.emplace("Signature", Tag(0x0400, 0x0120)); public_tags.emplace("CertifiedTimestampType", Tag(0x0400, 0x0305)); public_tags.emplace("CertifiedTimestamp", Tag(0x0400, 0x0310)); public_tags.emplace("DigitalSignaturePurposeCodeSequence", Tag(0x0400, 0x0401)); public_tags.emplace("ReferencedDigitalSignatureSequence", Tag(0x0400, 0x0402)); public_tags.emplace("ReferencedSOPInstanceMACSequence", Tag(0x0400, 0x0403)); public_tags.emplace("MAC", Tag(0x0400, 0x0404)); public_tags.emplace("EncryptedAttributesSequence", Tag(0x0400, 0x0500)); public_tags.emplace("EncryptedContentTransferSyntaxUID", Tag(0x0400, 0x0510)); public_tags.emplace("EncryptedContent", Tag(0x0400, 0x0520)); public_tags.emplace("ModifiedAttributesSequence", Tag(0x0400, 0x0550)); public_tags.emplace("NonconformingModifiedAttributesSequence", Tag(0x0400, 0x0551)); public_tags.emplace("NonconformingDataElementValue", Tag(0x0400, 0x0552)); public_tags.emplace("OriginalAttributesSequence", Tag(0x0400, 0x0561)); public_tags.emplace("AttributeModificationDateTime", Tag(0x0400, 0x0562)); public_tags.emplace("ModifyingSystem", Tag(0x0400, 0x0563)); public_tags.emplace("SourceOfPreviousValues", Tag(0x0400, 0x0564)); public_tags.emplace("ReasonForTheAttributeModification", Tag(0x0400, 0x0565)); public_tags.emplace("InstanceOriginStatus", Tag(0x0400, 0x0600)); } } }odil-0.11.0/src/odil/registry_0400.h000066400000000000000000000040141362244656000167310ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0400 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0400 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const MACIDNumber(0x0400, 0x0005); Tag const MACCalculationTransferSyntaxUID(0x0400, 0x0010); Tag const MACAlgorithm(0x0400, 0x0015); Tag const DataElementsSigned(0x0400, 0x0020); Tag const DigitalSignatureUID(0x0400, 0x0100); Tag const DigitalSignatureDateTime(0x0400, 0x0105); Tag const CertificateType(0x0400, 0x0110); Tag const CertificateOfSigner(0x0400, 0x0115); Tag const Signature(0x0400, 0x0120); Tag const CertifiedTimestampType(0x0400, 0x0305); Tag const CertifiedTimestamp(0x0400, 0x0310); Tag const DigitalSignaturePurposeCodeSequence(0x0400, 0x0401); Tag const ReferencedDigitalSignatureSequence(0x0400, 0x0402); Tag const ReferencedSOPInstanceMACSequence(0x0400, 0x0403); Tag const MAC(0x0400, 0x0404); Tag const EncryptedAttributesSequence(0x0400, 0x0500); Tag const EncryptedContentTransferSyntaxUID(0x0400, 0x0510); Tag const EncryptedContent(0x0400, 0x0520); Tag const ModifiedAttributesSequence(0x0400, 0x0550); Tag const NonconformingModifiedAttributesSequence(0x0400, 0x0551); Tag const NonconformingDataElementValue(0x0400, 0x0552); Tag const OriginalAttributesSequence(0x0400, 0x0561); Tag const AttributeModificationDateTime(0x0400, 0x0562); Tag const ModifyingSystem(0x0400, 0x0563); Tag const SourceOfPreviousValues(0x0400, 0x0564); Tag const ReasonForTheAttributeModification(0x0400, 0x0565); Tag const InstanceOriginStatus(0x0400, 0x0600); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_0400odil-0.11.0/src/odil/registry_2000.cpp000066400000000000000000000117021362244656000172640ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_2000( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x2000, 0x0010), ElementsDictionaryEntry("Number of Copies", "NumberOfCopies", "IS", "1")); public_dictionary.emplace(Tag(0x2000, 0x001e), ElementsDictionaryEntry("Printer Configuration Sequence", "PrinterConfigurationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2000, 0x0020), ElementsDictionaryEntry("Print Priority", "PrintPriority", "CS", "1")); public_dictionary.emplace(Tag(0x2000, 0x0030), ElementsDictionaryEntry("Medium Type", "MediumType", "CS", "1")); public_dictionary.emplace(Tag(0x2000, 0x0040), ElementsDictionaryEntry("Film Destination", "FilmDestination", "CS", "1")); public_dictionary.emplace(Tag(0x2000, 0x0050), ElementsDictionaryEntry("Film Session Label", "FilmSessionLabel", "LO", "1")); public_dictionary.emplace(Tag(0x2000, 0x0060), ElementsDictionaryEntry("Memory Allocation", "MemoryAllocation", "IS", "1")); public_dictionary.emplace(Tag(0x2000, 0x0061), ElementsDictionaryEntry("Maximum Memory Allocation", "MaximumMemoryAllocation", "IS", "1")); public_dictionary.emplace(Tag(0x2000, 0x0062), ElementsDictionaryEntry("Color Image Printing Flag", "ColorImagePrintingFlag", "CS", "1")); public_dictionary.emplace(Tag(0x2000, 0x0063), ElementsDictionaryEntry("Collation Flag", "CollationFlag", "CS", "1")); public_dictionary.emplace(Tag(0x2000, 0x0065), ElementsDictionaryEntry("Annotation Flag", "AnnotationFlag", "CS", "1")); public_dictionary.emplace(Tag(0x2000, 0x0067), ElementsDictionaryEntry("Image Overlay Flag", "ImageOverlayFlag", "CS", "1")); public_dictionary.emplace(Tag(0x2000, 0x0069), ElementsDictionaryEntry("Presentation LUT Flag", "PresentationLUTFlag", "CS", "1")); public_dictionary.emplace(Tag(0x2000, 0x006a), ElementsDictionaryEntry("Image Box Presentation LUT Flag", "ImageBoxPresentationLUTFlag", "CS", "1")); public_dictionary.emplace(Tag(0x2000, 0x00a0), ElementsDictionaryEntry("Memory Bit Depth", "MemoryBitDepth", "US", "1")); public_dictionary.emplace(Tag(0x2000, 0x00a1), ElementsDictionaryEntry("Printing Bit Depth", "PrintingBitDepth", "US", "1")); public_dictionary.emplace(Tag(0x2000, 0x00a2), ElementsDictionaryEntry("Media Installed Sequence", "MediaInstalledSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2000, 0x00a4), ElementsDictionaryEntry("Other Media Available Sequence", "OtherMediaAvailableSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2000, 0x00a8), ElementsDictionaryEntry("Supported Image Display Formats Sequence", "SupportedImageDisplayFormatsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2000, 0x0500), ElementsDictionaryEntry("Referenced Film Box Sequence", "ReferencedFilmBoxSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2000, 0x0510), ElementsDictionaryEntry("Referenced Stored Print Sequence", "ReferencedStoredPrintSequence", "SQ", "1")); public_tags.emplace("NumberOfCopies", Tag(0x2000, 0x0010)); public_tags.emplace("PrinterConfigurationSequence", Tag(0x2000, 0x001e)); public_tags.emplace("PrintPriority", Tag(0x2000, 0x0020)); public_tags.emplace("MediumType", Tag(0x2000, 0x0030)); public_tags.emplace("FilmDestination", Tag(0x2000, 0x0040)); public_tags.emplace("FilmSessionLabel", Tag(0x2000, 0x0050)); public_tags.emplace("MemoryAllocation", Tag(0x2000, 0x0060)); public_tags.emplace("MaximumMemoryAllocation", Tag(0x2000, 0x0061)); public_tags.emplace("ColorImagePrintingFlag", Tag(0x2000, 0x0062)); public_tags.emplace("CollationFlag", Tag(0x2000, 0x0063)); public_tags.emplace("AnnotationFlag", Tag(0x2000, 0x0065)); public_tags.emplace("ImageOverlayFlag", Tag(0x2000, 0x0067)); public_tags.emplace("PresentationLUTFlag", Tag(0x2000, 0x0069)); public_tags.emplace("ImageBoxPresentationLUTFlag", Tag(0x2000, 0x006a)); public_tags.emplace("MemoryBitDepth", Tag(0x2000, 0x00a0)); public_tags.emplace("PrintingBitDepth", Tag(0x2000, 0x00a1)); public_tags.emplace("MediaInstalledSequence", Tag(0x2000, 0x00a2)); public_tags.emplace("OtherMediaAvailableSequence", Tag(0x2000, 0x00a4)); public_tags.emplace("SupportedImageDisplayFormatsSequence", Tag(0x2000, 0x00a8)); public_tags.emplace("ReferencedFilmBoxSequence", Tag(0x2000, 0x0500)); public_tags.emplace("ReferencedStoredPrintSequence", Tag(0x2000, 0x0510)); } } }odil-0.11.0/src/odil/registry_2000.h000066400000000000000000000032321362244656000167300ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2000 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2000 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const NumberOfCopies(0x2000, 0x0010); Tag const PrinterConfigurationSequence(0x2000, 0x001e); Tag const PrintPriority(0x2000, 0x0020); Tag const MediumType(0x2000, 0x0030); Tag const FilmDestination(0x2000, 0x0040); Tag const FilmSessionLabel(0x2000, 0x0050); Tag const MemoryAllocation(0x2000, 0x0060); Tag const MaximumMemoryAllocation(0x2000, 0x0061); Tag const ColorImagePrintingFlag(0x2000, 0x0062); Tag const CollationFlag(0x2000, 0x0063); Tag const AnnotationFlag(0x2000, 0x0065); Tag const ImageOverlayFlag(0x2000, 0x0067); Tag const PresentationLUTFlag(0x2000, 0x0069); Tag const ImageBoxPresentationLUTFlag(0x2000, 0x006a); Tag const MemoryBitDepth(0x2000, 0x00a0); Tag const PrintingBitDepth(0x2000, 0x00a1); Tag const MediaInstalledSequence(0x2000, 0x00a2); Tag const OtherMediaAvailableSequence(0x2000, 0x00a4); Tag const SupportedImageDisplayFormatsSequence(0x2000, 0x00a8); Tag const ReferencedFilmBoxSequence(0x2000, 0x0500); Tag const ReferencedStoredPrintSequence(0x2000, 0x0510); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2000odil-0.11.0/src/odil/registry_2010.cpp000066400000000000000000000137561362244656000173000ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_2010( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x2010, 0x0010), ElementsDictionaryEntry("Image Display Format", "ImageDisplayFormat", "ST", "1")); public_dictionary.emplace(Tag(0x2010, 0x0030), ElementsDictionaryEntry("Annotation Display Format ID", "AnnotationDisplayFormatID", "CS", "1")); public_dictionary.emplace(Tag(0x2010, 0x0040), ElementsDictionaryEntry("Film Orientation", "FilmOrientation", "CS", "1")); public_dictionary.emplace(Tag(0x2010, 0x0050), ElementsDictionaryEntry("Film Size ID", "FilmSizeID", "CS", "1")); public_dictionary.emplace(Tag(0x2010, 0x0052), ElementsDictionaryEntry("Printer Resolution ID", "PrinterResolutionID", "CS", "1")); public_dictionary.emplace(Tag(0x2010, 0x0054), ElementsDictionaryEntry("Default Printer Resolution ID", "DefaultPrinterResolutionID", "CS", "1")); public_dictionary.emplace(Tag(0x2010, 0x0060), ElementsDictionaryEntry("Magnification Type", "MagnificationType", "CS", "1")); public_dictionary.emplace(Tag(0x2010, 0x0080), ElementsDictionaryEntry("Smoothing Type", "SmoothingType", "CS", "1")); public_dictionary.emplace(Tag(0x2010, 0x00a6), ElementsDictionaryEntry("Default Magnification Type", "DefaultMagnificationType", "CS", "1")); public_dictionary.emplace(Tag(0x2010, 0x00a7), ElementsDictionaryEntry("Other Magnification Types Available", "OtherMagnificationTypesAvailable", "CS", "1-n")); public_dictionary.emplace(Tag(0x2010, 0x00a8), ElementsDictionaryEntry("Default Smoothing Type", "DefaultSmoothingType", "CS", "1")); public_dictionary.emplace(Tag(0x2010, 0x00a9), ElementsDictionaryEntry("Other Smoothing Types Available", "OtherSmoothingTypesAvailable", "CS", "1-n")); public_dictionary.emplace(Tag(0x2010, 0x0100), ElementsDictionaryEntry("Border Density", "BorderDensity", "CS", "1")); public_dictionary.emplace(Tag(0x2010, 0x0110), ElementsDictionaryEntry("Empty Image Density", "EmptyImageDensity", "CS", "1")); public_dictionary.emplace(Tag(0x2010, 0x0120), ElementsDictionaryEntry("Min Density", "MinDensity", "US", "1")); public_dictionary.emplace(Tag(0x2010, 0x0130), ElementsDictionaryEntry("Max Density", "MaxDensity", "US", "1")); public_dictionary.emplace(Tag(0x2010, 0x0140), ElementsDictionaryEntry("Trim", "Trim", "CS", "1")); public_dictionary.emplace(Tag(0x2010, 0x0150), ElementsDictionaryEntry("Configuration Information", "ConfigurationInformation", "ST", "1")); public_dictionary.emplace(Tag(0x2010, 0x0152), ElementsDictionaryEntry("Configuration Information Description", "ConfigurationInformationDescription", "LT", "1")); public_dictionary.emplace(Tag(0x2010, 0x0154), ElementsDictionaryEntry("Maximum Collated Films", "MaximumCollatedFilms", "IS", "1")); public_dictionary.emplace(Tag(0x2010, 0x015e), ElementsDictionaryEntry("Illumination", "Illumination", "US", "1")); public_dictionary.emplace(Tag(0x2010, 0x0160), ElementsDictionaryEntry("Reflected Ambient Light", "ReflectedAmbientLight", "US", "1")); public_dictionary.emplace(Tag(0x2010, 0x0376), ElementsDictionaryEntry("Printer Pixel Spacing", "PrinterPixelSpacing", "DS", "2")); public_dictionary.emplace(Tag(0x2010, 0x0500), ElementsDictionaryEntry("Referenced Film Session Sequence", "ReferencedFilmSessionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2010, 0x0510), ElementsDictionaryEntry("Referenced Image Box Sequence", "ReferencedImageBoxSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2010, 0x0520), ElementsDictionaryEntry("Referenced Basic Annotation Box Sequence", "ReferencedBasicAnnotationBoxSequence", "SQ", "1")); public_tags.emplace("ImageDisplayFormat", Tag(0x2010, 0x0010)); public_tags.emplace("AnnotationDisplayFormatID", Tag(0x2010, 0x0030)); public_tags.emplace("FilmOrientation", Tag(0x2010, 0x0040)); public_tags.emplace("FilmSizeID", Tag(0x2010, 0x0050)); public_tags.emplace("PrinterResolutionID", Tag(0x2010, 0x0052)); public_tags.emplace("DefaultPrinterResolutionID", Tag(0x2010, 0x0054)); public_tags.emplace("MagnificationType", Tag(0x2010, 0x0060)); public_tags.emplace("SmoothingType", Tag(0x2010, 0x0080)); public_tags.emplace("DefaultMagnificationType", Tag(0x2010, 0x00a6)); public_tags.emplace("OtherMagnificationTypesAvailable", Tag(0x2010, 0x00a7)); public_tags.emplace("DefaultSmoothingType", Tag(0x2010, 0x00a8)); public_tags.emplace("OtherSmoothingTypesAvailable", Tag(0x2010, 0x00a9)); public_tags.emplace("BorderDensity", Tag(0x2010, 0x0100)); public_tags.emplace("EmptyImageDensity", Tag(0x2010, 0x0110)); public_tags.emplace("MinDensity", Tag(0x2010, 0x0120)); public_tags.emplace("MaxDensity", Tag(0x2010, 0x0130)); public_tags.emplace("Trim", Tag(0x2010, 0x0140)); public_tags.emplace("ConfigurationInformation", Tag(0x2010, 0x0150)); public_tags.emplace("ConfigurationInformationDescription", Tag(0x2010, 0x0152)); public_tags.emplace("MaximumCollatedFilms", Tag(0x2010, 0x0154)); public_tags.emplace("Illumination", Tag(0x2010, 0x015e)); public_tags.emplace("ReflectedAmbientLight", Tag(0x2010, 0x0160)); public_tags.emplace("PrinterPixelSpacing", Tag(0x2010, 0x0376)); public_tags.emplace("ReferencedFilmSessionSequence", Tag(0x2010, 0x0500)); public_tags.emplace("ReferencedImageBoxSequence", Tag(0x2010, 0x0510)); public_tags.emplace("ReferencedBasicAnnotationBoxSequence", Tag(0x2010, 0x0520)); } } }odil-0.11.0/src/odil/registry_2010.h000066400000000000000000000036221362244656000167340ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2010 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2010 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ImageDisplayFormat(0x2010, 0x0010); Tag const AnnotationDisplayFormatID(0x2010, 0x0030); Tag const FilmOrientation(0x2010, 0x0040); Tag const FilmSizeID(0x2010, 0x0050); Tag const PrinterResolutionID(0x2010, 0x0052); Tag const DefaultPrinterResolutionID(0x2010, 0x0054); Tag const MagnificationType(0x2010, 0x0060); Tag const SmoothingType(0x2010, 0x0080); Tag const DefaultMagnificationType(0x2010, 0x00a6); Tag const OtherMagnificationTypesAvailable(0x2010, 0x00a7); Tag const DefaultSmoothingType(0x2010, 0x00a8); Tag const OtherSmoothingTypesAvailable(0x2010, 0x00a9); Tag const BorderDensity(0x2010, 0x0100); Tag const EmptyImageDensity(0x2010, 0x0110); Tag const MinDensity(0x2010, 0x0120); Tag const MaxDensity(0x2010, 0x0130); Tag const Trim(0x2010, 0x0140); Tag const ConfigurationInformation(0x2010, 0x0150); Tag const ConfigurationInformationDescription(0x2010, 0x0152); Tag const MaximumCollatedFilms(0x2010, 0x0154); Tag const Illumination(0x2010, 0x015e); Tag const ReflectedAmbientLight(0x2010, 0x0160); Tag const PrinterPixelSpacing(0x2010, 0x0376); Tag const ReferencedFilmSessionSequence(0x2010, 0x0500); Tag const ReferencedImageBoxSequence(0x2010, 0x0510); Tag const ReferencedBasicAnnotationBoxSequence(0x2010, 0x0520); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2010odil-0.11.0/src/odil/registry_2020.cpp000066400000000000000000000057551362244656000173010ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_2020( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x2020, 0x0010), ElementsDictionaryEntry("Image Box Position", "ImageBoxPosition", "US", "1")); public_dictionary.emplace(Tag(0x2020, 0x0020), ElementsDictionaryEntry("Polarity", "Polarity", "CS", "1")); public_dictionary.emplace(Tag(0x2020, 0x0030), ElementsDictionaryEntry("Requested Image Size", "RequestedImageSize", "DS", "1")); public_dictionary.emplace(Tag(0x2020, 0x0040), ElementsDictionaryEntry("Requested Decimate/Crop Behavior", "RequestedDecimateCropBehavior", "CS", "1")); public_dictionary.emplace(Tag(0x2020, 0x0050), ElementsDictionaryEntry("Requested Resolution ID", "RequestedResolutionID", "CS", "1")); public_dictionary.emplace(Tag(0x2020, 0x00a0), ElementsDictionaryEntry("Requested Image Size Flag", "RequestedImageSizeFlag", "CS", "1")); public_dictionary.emplace(Tag(0x2020, 0x00a2), ElementsDictionaryEntry("Decimate/Crop Result", "DecimateCropResult", "CS", "1")); public_dictionary.emplace(Tag(0x2020, 0x0110), ElementsDictionaryEntry("Basic Grayscale Image Sequence", "BasicGrayscaleImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2020, 0x0111), ElementsDictionaryEntry("Basic Color Image Sequence", "BasicColorImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2020, 0x0130), ElementsDictionaryEntry("Referenced Image Overlay Box Sequence", "ReferencedImageOverlayBoxSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2020, 0x0140), ElementsDictionaryEntry("Referenced VOI LUT Box Sequence", "ReferencedVOILUTBoxSequence", "SQ", "1")); public_tags.emplace("ImageBoxPosition", Tag(0x2020, 0x0010)); public_tags.emplace("Polarity", Tag(0x2020, 0x0020)); public_tags.emplace("RequestedImageSize", Tag(0x2020, 0x0030)); public_tags.emplace("RequestedDecimateCropBehavior", Tag(0x2020, 0x0040)); public_tags.emplace("RequestedResolutionID", Tag(0x2020, 0x0050)); public_tags.emplace("RequestedImageSizeFlag", Tag(0x2020, 0x00a0)); public_tags.emplace("DecimateCropResult", Tag(0x2020, 0x00a2)); public_tags.emplace("BasicGrayscaleImageSequence", Tag(0x2020, 0x0110)); public_tags.emplace("BasicColorImageSequence", Tag(0x2020, 0x0111)); public_tags.emplace("ReferencedImageOverlayBoxSequence", Tag(0x2020, 0x0130)); public_tags.emplace("ReferencedVOILUTBoxSequence", Tag(0x2020, 0x0140)); } } }odil-0.11.0/src/odil/registry_2020.h000066400000000000000000000023251362244656000167340ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2020 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2020 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ImageBoxPosition(0x2020, 0x0010); Tag const Polarity(0x2020, 0x0020); Tag const RequestedImageSize(0x2020, 0x0030); Tag const RequestedDecimateCropBehavior(0x2020, 0x0040); Tag const RequestedResolutionID(0x2020, 0x0050); Tag const RequestedImageSizeFlag(0x2020, 0x00a0); Tag const DecimateCropResult(0x2020, 0x00a2); Tag const BasicGrayscaleImageSequence(0x2020, 0x0110); Tag const BasicColorImageSequence(0x2020, 0x0111); Tag const ReferencedImageOverlayBoxSequence(0x2020, 0x0130); Tag const ReferencedVOILUTBoxSequence(0x2020, 0x0140); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2020odil-0.11.0/src/odil/registry_2030.cpp000066400000000000000000000020461362244656000172700ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_2030( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x2030, 0x0010), ElementsDictionaryEntry("Annotation Position", "AnnotationPosition", "US", "1")); public_dictionary.emplace(Tag(0x2030, 0x0020), ElementsDictionaryEntry("Text String", "TextString", "LO", "1")); public_tags.emplace("AnnotationPosition", Tag(0x2030, 0x0010)); public_tags.emplace("TextString", Tag(0x2030, 0x0020)); } } }odil-0.11.0/src/odil/registry_2030.h000066400000000000000000000014031362244656000167310ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2030 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2030 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const AnnotationPosition(0x2030, 0x0010); Tag const TextString(0x2030, 0x0020); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2030odil-0.11.0/src/odil/registry_2040.cpp000066400000000000000000000064101362244656000172700ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_2040( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x2040, 0x0010), ElementsDictionaryEntry("Referenced Overlay Plane Sequence", "ReferencedOverlayPlaneSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2040, 0x0011), ElementsDictionaryEntry("Referenced Overlay Plane Groups", "ReferencedOverlayPlaneGroups", "US", "1-99")); public_dictionary.emplace(Tag(0x2040, 0x0020), ElementsDictionaryEntry("Overlay Pixel Data Sequence", "OverlayPixelDataSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2040, 0x0060), ElementsDictionaryEntry("Overlay Magnification Type", "OverlayMagnificationType", "CS", "1")); public_dictionary.emplace(Tag(0x2040, 0x0070), ElementsDictionaryEntry("Overlay Smoothing Type", "OverlaySmoothingType", "CS", "1")); public_dictionary.emplace(Tag(0x2040, 0x0072), ElementsDictionaryEntry("Overlay or Image Magnification", "OverlayOrImageMagnification", "CS", "1")); public_dictionary.emplace(Tag(0x2040, 0x0074), ElementsDictionaryEntry("Magnify to Number of Columns", "MagnifyToNumberOfColumns", "US", "1")); public_dictionary.emplace(Tag(0x2040, 0x0080), ElementsDictionaryEntry("Overlay Foreground Density", "OverlayForegroundDensity", "CS", "1")); public_dictionary.emplace(Tag(0x2040, 0x0082), ElementsDictionaryEntry("Overlay Background Density", "OverlayBackgroundDensity", "CS", "1")); public_dictionary.emplace(Tag(0x2040, 0x0090), ElementsDictionaryEntry("Overlay Mode", "OverlayMode", "CS", "1")); public_dictionary.emplace(Tag(0x2040, 0x0100), ElementsDictionaryEntry("Threshold Density", "ThresholdDensity", "CS", "1")); public_dictionary.emplace(Tag(0x2040, 0x0500), ElementsDictionaryEntry("Referenced Image Box Sequence (Retired)", "ReferencedImageBoxSequenceRetired", "SQ", "1")); public_tags.emplace("ReferencedOverlayPlaneSequence", Tag(0x2040, 0x0010)); public_tags.emplace("ReferencedOverlayPlaneGroups", Tag(0x2040, 0x0011)); public_tags.emplace("OverlayPixelDataSequence", Tag(0x2040, 0x0020)); public_tags.emplace("OverlayMagnificationType", Tag(0x2040, 0x0060)); public_tags.emplace("OverlaySmoothingType", Tag(0x2040, 0x0070)); public_tags.emplace("OverlayOrImageMagnification", Tag(0x2040, 0x0072)); public_tags.emplace("MagnifyToNumberOfColumns", Tag(0x2040, 0x0074)); public_tags.emplace("OverlayForegroundDensity", Tag(0x2040, 0x0080)); public_tags.emplace("OverlayBackgroundDensity", Tag(0x2040, 0x0082)); public_tags.emplace("OverlayMode", Tag(0x2040, 0x0090)); public_tags.emplace("ThresholdDensity", Tag(0x2040, 0x0100)); public_tags.emplace("ReferencedImageBoxSequenceRetired", Tag(0x2040, 0x0500)); } } }odil-0.11.0/src/odil/registry_2040.h000066400000000000000000000024341362244656000167370ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2040 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2040 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ReferencedOverlayPlaneSequence(0x2040, 0x0010); Tag const ReferencedOverlayPlaneGroups(0x2040, 0x0011); Tag const OverlayPixelDataSequence(0x2040, 0x0020); Tag const OverlayMagnificationType(0x2040, 0x0060); Tag const OverlaySmoothingType(0x2040, 0x0070); Tag const OverlayOrImageMagnification(0x2040, 0x0072); Tag const MagnifyToNumberOfColumns(0x2040, 0x0074); Tag const OverlayForegroundDensity(0x2040, 0x0080); Tag const OverlayBackgroundDensity(0x2040, 0x0082); Tag const OverlayMode(0x2040, 0x0090); Tag const ThresholdDensity(0x2040, 0x0100); Tag const ReferencedImageBoxSequenceRetired(0x2040, 0x0500); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2040odil-0.11.0/src/odil/registry_2050.cpp000066400000000000000000000025161362244656000172740ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_2050( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x2050, 0x0010), ElementsDictionaryEntry("Presentation LUT Sequence", "PresentationLUTSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2050, 0x0020), ElementsDictionaryEntry("Presentation LUT Shape", "PresentationLUTShape", "CS", "1")); public_dictionary.emplace(Tag(0x2050, 0x0500), ElementsDictionaryEntry("Referenced Presentation LUT Sequence", "ReferencedPresentationLUTSequence", "SQ", "1")); public_tags.emplace("PresentationLUTSequence", Tag(0x2050, 0x0010)); public_tags.emplace("PresentationLUTShape", Tag(0x2050, 0x0020)); public_tags.emplace("ReferencedPresentationLUTSequence", Tag(0x2050, 0x0500)); } } }odil-0.11.0/src/odil/registry_2050.h000066400000000000000000000015171362244656000167410ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2050 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2050 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const PresentationLUTSequence(0x2050, 0x0010); Tag const PresentationLUTShape(0x2050, 0x0020); Tag const ReferencedPresentationLUTSequence(0x2050, 0x0500); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2050odil-0.11.0/src/odil/registry_2100.cpp000066400000000000000000000051031362244656000172630ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_2100( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x2100, 0x0010), ElementsDictionaryEntry("Print Job ID", "PrintJobID", "SH", "1")); public_dictionary.emplace(Tag(0x2100, 0x0020), ElementsDictionaryEntry("Execution Status", "ExecutionStatus", "CS", "1")); public_dictionary.emplace(Tag(0x2100, 0x0030), ElementsDictionaryEntry("Execution Status Info", "ExecutionStatusInfo", "CS", "1")); public_dictionary.emplace(Tag(0x2100, 0x0040), ElementsDictionaryEntry("Creation Date", "CreationDate", "DA", "1")); public_dictionary.emplace(Tag(0x2100, 0x0050), ElementsDictionaryEntry("Creation Time", "CreationTime", "TM", "1")); public_dictionary.emplace(Tag(0x2100, 0x0070), ElementsDictionaryEntry("Originator", "Originator", "AE", "1")); public_dictionary.emplace(Tag(0x2100, 0x0140), ElementsDictionaryEntry("Destination AE", "DestinationAE", "AE", "1")); public_dictionary.emplace(Tag(0x2100, 0x0160), ElementsDictionaryEntry("Owner ID", "OwnerID", "SH", "1")); public_dictionary.emplace(Tag(0x2100, 0x0170), ElementsDictionaryEntry("Number of Films", "NumberOfFilms", "IS", "1")); public_dictionary.emplace(Tag(0x2100, 0x0500), ElementsDictionaryEntry("Referenced Print Job Sequence (Pull Stored Print)", "ReferencedPrintJobSequencePullStoredPrint", "SQ", "1")); public_tags.emplace("PrintJobID", Tag(0x2100, 0x0010)); public_tags.emplace("ExecutionStatus", Tag(0x2100, 0x0020)); public_tags.emplace("ExecutionStatusInfo", Tag(0x2100, 0x0030)); public_tags.emplace("CreationDate", Tag(0x2100, 0x0040)); public_tags.emplace("CreationTime", Tag(0x2100, 0x0050)); public_tags.emplace("Originator", Tag(0x2100, 0x0070)); public_tags.emplace("DestinationAE", Tag(0x2100, 0x0140)); public_tags.emplace("OwnerID", Tag(0x2100, 0x0160)); public_tags.emplace("NumberOfFilms", Tag(0x2100, 0x0170)); public_tags.emplace("ReferencedPrintJobSequencePullStoredPrint", Tag(0x2100, 0x0500)); } } }odil-0.11.0/src/odil/registry_2100.h000066400000000000000000000021371362244656000167340ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2100 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2100 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const PrintJobID(0x2100, 0x0010); Tag const ExecutionStatus(0x2100, 0x0020); Tag const ExecutionStatusInfo(0x2100, 0x0030); Tag const CreationDate(0x2100, 0x0040); Tag const CreationTime(0x2100, 0x0050); Tag const Originator(0x2100, 0x0070); Tag const DestinationAE(0x2100, 0x0140); Tag const OwnerID(0x2100, 0x0160); Tag const NumberOfFilms(0x2100, 0x0170); Tag const ReferencedPrintJobSequencePullStoredPrint(0x2100, 0x0500); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2100odil-0.11.0/src/odil/registry_2110.cpp000066400000000000000000000026331362244656000172710ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_2110( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x2110, 0x0010), ElementsDictionaryEntry("Printer Status", "PrinterStatus", "CS", "1")); public_dictionary.emplace(Tag(0x2110, 0x0020), ElementsDictionaryEntry("Printer Status Info", "PrinterStatusInfo", "CS", "1")); public_dictionary.emplace(Tag(0x2110, 0x0030), ElementsDictionaryEntry("Printer Name", "PrinterName", "LO", "1")); public_dictionary.emplace(Tag(0x2110, 0x0099), ElementsDictionaryEntry("Print Queue ID", "PrintQueueID", "SH", "1")); public_tags.emplace("PrinterStatus", Tag(0x2110, 0x0010)); public_tags.emplace("PrinterStatusInfo", Tag(0x2110, 0x0020)); public_tags.emplace("PrinterName", Tag(0x2110, 0x0030)); public_tags.emplace("PrintQueueID", Tag(0x2110, 0x0099)); } } }odil-0.11.0/src/odil/registry_2110.h000066400000000000000000000015241362244656000167340ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2110 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2110 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const PrinterStatus(0x2110, 0x0010); Tag const PrinterStatusInfo(0x2110, 0x0020); Tag const PrinterName(0x2110, 0x0030); Tag const PrintQueueID(0x2110, 0x0099); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2110odil-0.11.0/src/odil/registry_2120.cpp000066400000000000000000000024521362244656000172710ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_2120( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x2120, 0x0010), ElementsDictionaryEntry("Queue Status", "QueueStatus", "CS", "1")); public_dictionary.emplace(Tag(0x2120, 0x0050), ElementsDictionaryEntry("Print Job Description Sequence", "PrintJobDescriptionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2120, 0x0070), ElementsDictionaryEntry("Referenced Print Job Sequence", "ReferencedPrintJobSequence", "SQ", "1")); public_tags.emplace("QueueStatus", Tag(0x2120, 0x0010)); public_tags.emplace("PrintJobDescriptionSequence", Tag(0x2120, 0x0050)); public_tags.emplace("ReferencedPrintJobSequence", Tag(0x2120, 0x0070)); } } }odil-0.11.0/src/odil/registry_2120.h000066400000000000000000000015031362244656000167320ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2120 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2120 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const QueueStatus(0x2120, 0x0010); Tag const PrintJobDescriptionSequence(0x2120, 0x0050); Tag const ReferencedPrintJobSequence(0x2120, 0x0070); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2120odil-0.11.0/src/odil/registry_2130.cpp000066400000000000000000000052641362244656000172760ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_2130( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x2130, 0x0010), ElementsDictionaryEntry("Print Management Capabilities Sequence", "PrintManagementCapabilitiesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2130, 0x0015), ElementsDictionaryEntry("Printer Characteristics Sequence", "PrinterCharacteristicsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2130, 0x0030), ElementsDictionaryEntry("Film Box Content Sequence", "FilmBoxContentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2130, 0x0040), ElementsDictionaryEntry("Image Box Content Sequence", "ImageBoxContentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2130, 0x0050), ElementsDictionaryEntry("Annotation Content Sequence", "AnnotationContentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2130, 0x0060), ElementsDictionaryEntry("Image Overlay Box Content Sequence", "ImageOverlayBoxContentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2130, 0x0080), ElementsDictionaryEntry("Presentation LUT Content Sequence", "PresentationLUTContentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2130, 0x00a0), ElementsDictionaryEntry("Proposed Study Sequence", "ProposedStudySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2130, 0x00c0), ElementsDictionaryEntry("Original Image Sequence", "OriginalImageSequence", "SQ", "1")); public_tags.emplace("PrintManagementCapabilitiesSequence", Tag(0x2130, 0x0010)); public_tags.emplace("PrinterCharacteristicsSequence", Tag(0x2130, 0x0015)); public_tags.emplace("FilmBoxContentSequence", Tag(0x2130, 0x0030)); public_tags.emplace("ImageBoxContentSequence", Tag(0x2130, 0x0040)); public_tags.emplace("AnnotationContentSequence", Tag(0x2130, 0x0050)); public_tags.emplace("ImageOverlayBoxContentSequence", Tag(0x2130, 0x0060)); public_tags.emplace("PresentationLUTContentSequence", Tag(0x2130, 0x0080)); public_tags.emplace("ProposedStudySequence", Tag(0x2130, 0x00a0)); public_tags.emplace("OriginalImageSequence", Tag(0x2130, 0x00c0)); } } }odil-0.11.0/src/odil/registry_2130.h000066400000000000000000000022301362244656000167310ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2130 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2130 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const PrintManagementCapabilitiesSequence(0x2130, 0x0010); Tag const PrinterCharacteristicsSequence(0x2130, 0x0015); Tag const FilmBoxContentSequence(0x2130, 0x0030); Tag const ImageBoxContentSequence(0x2130, 0x0040); Tag const AnnotationContentSequence(0x2130, 0x0050); Tag const ImageOverlayBoxContentSequence(0x2130, 0x0060); Tag const PresentationLUTContentSequence(0x2130, 0x0080); Tag const ProposedStudySequence(0x2130, 0x00a0); Tag const OriginalImageSequence(0x2130, 0x00c0); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2130odil-0.11.0/src/odil/registry_2200.cpp000066400000000000000000000101421362244656000172630ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_2200( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x2200, 0x0001), ElementsDictionaryEntry("Label Using Information Extracted From Instances", "LabelUsingInformationExtractedFromInstances", "CS", "1")); public_dictionary.emplace(Tag(0x2200, 0x0002), ElementsDictionaryEntry("Label Text", "LabelText", "UT", "1")); public_dictionary.emplace(Tag(0x2200, 0x0003), ElementsDictionaryEntry("Label Style Selection", "LabelStyleSelection", "CS", "1")); public_dictionary.emplace(Tag(0x2200, 0x0004), ElementsDictionaryEntry("Media Disposition", "MediaDisposition", "LT", "1")); public_dictionary.emplace(Tag(0x2200, 0x0005), ElementsDictionaryEntry("Barcode Value", "BarcodeValue", "LT", "1")); public_dictionary.emplace(Tag(0x2200, 0x0006), ElementsDictionaryEntry("Barcode Symbology", "BarcodeSymbology", "CS", "1")); public_dictionary.emplace(Tag(0x2200, 0x0007), ElementsDictionaryEntry("Allow Media Splitting", "AllowMediaSplitting", "CS", "1")); public_dictionary.emplace(Tag(0x2200, 0x0008), ElementsDictionaryEntry("Include Non-DICOM Objects", "IncludeNonDICOMObjects", "CS", "1")); public_dictionary.emplace(Tag(0x2200, 0x0009), ElementsDictionaryEntry("Include Display Application", "IncludeDisplayApplication", "CS", "1")); public_dictionary.emplace(Tag(0x2200, 0x000a), ElementsDictionaryEntry("Preserve Composite Instances After Media Creation", "PreserveCompositeInstancesAfterMediaCreation", "CS", "1")); public_dictionary.emplace(Tag(0x2200, 0x000b), ElementsDictionaryEntry("Total Number of Pieces of Media Created", "TotalNumberOfPiecesOfMediaCreated", "US", "1")); public_dictionary.emplace(Tag(0x2200, 0x000c), ElementsDictionaryEntry("Requested Media Application Profile", "RequestedMediaApplicationProfile", "LO", "1")); public_dictionary.emplace(Tag(0x2200, 0x000d), ElementsDictionaryEntry("Referenced Storage Media Sequence", "ReferencedStorageMediaSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x2200, 0x000e), ElementsDictionaryEntry("Failure Attributes", "FailureAttributes", "AT", "1-n")); public_dictionary.emplace(Tag(0x2200, 0x000f), ElementsDictionaryEntry("Allow Lossy Compression", "AllowLossyCompression", "CS", "1")); public_dictionary.emplace(Tag(0x2200, 0x0020), ElementsDictionaryEntry("Request Priority", "RequestPriority", "CS", "1")); public_tags.emplace("LabelUsingInformationExtractedFromInstances", Tag(0x2200, 0x0001)); public_tags.emplace("LabelText", Tag(0x2200, 0x0002)); public_tags.emplace("LabelStyleSelection", Tag(0x2200, 0x0003)); public_tags.emplace("MediaDisposition", Tag(0x2200, 0x0004)); public_tags.emplace("BarcodeValue", Tag(0x2200, 0x0005)); public_tags.emplace("BarcodeSymbology", Tag(0x2200, 0x0006)); public_tags.emplace("AllowMediaSplitting", Tag(0x2200, 0x0007)); public_tags.emplace("IncludeNonDICOMObjects", Tag(0x2200, 0x0008)); public_tags.emplace("IncludeDisplayApplication", Tag(0x2200, 0x0009)); public_tags.emplace("PreserveCompositeInstancesAfterMediaCreation", Tag(0x2200, 0x000a)); public_tags.emplace("TotalNumberOfPiecesOfMediaCreated", Tag(0x2200, 0x000b)); public_tags.emplace("RequestedMediaApplicationProfile", Tag(0x2200, 0x000c)); public_tags.emplace("ReferencedStorageMediaSequence", Tag(0x2200, 0x000d)); public_tags.emplace("FailureAttributes", Tag(0x2200, 0x000e)); public_tags.emplace("AllowLossyCompression", Tag(0x2200, 0x000f)); public_tags.emplace("RequestPriority", Tag(0x2200, 0x0020)); } } }odil-0.11.0/src/odil/registry_2200.h000066400000000000000000000027441362244656000167410ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2200 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2200 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const LabelUsingInformationExtractedFromInstances(0x2200, 0x0001); Tag const LabelText(0x2200, 0x0002); Tag const LabelStyleSelection(0x2200, 0x0003); Tag const MediaDisposition(0x2200, 0x0004); Tag const BarcodeValue(0x2200, 0x0005); Tag const BarcodeSymbology(0x2200, 0x0006); Tag const AllowMediaSplitting(0x2200, 0x0007); Tag const IncludeNonDICOMObjects(0x2200, 0x0008); Tag const IncludeDisplayApplication(0x2200, 0x0009); Tag const PreserveCompositeInstancesAfterMediaCreation(0x2200, 0x000a); Tag const TotalNumberOfPiecesOfMediaCreated(0x2200, 0x000b); Tag const RequestedMediaApplicationProfile(0x2200, 0x000c); Tag const ReferencedStorageMediaSequence(0x2200, 0x000d); Tag const FailureAttributes(0x2200, 0x000e); Tag const AllowLossyCompression(0x2200, 0x000f); Tag const RequestPriority(0x2200, 0x0020); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_2200odil-0.11.0/src/odil/registry_3002.cpp000066400000000000000000000131451362244656000172720ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_3002( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x3002, 0x0002), ElementsDictionaryEntry("RT Image Label", "RTImageLabel", "SH", "1")); public_dictionary.emplace(Tag(0x3002, 0x0003), ElementsDictionaryEntry("RT Image Name", "RTImageName", "LO", "1")); public_dictionary.emplace(Tag(0x3002, 0x0004), ElementsDictionaryEntry("RT Image Description", "RTImageDescription", "ST", "1")); public_dictionary.emplace(Tag(0x3002, 0x000a), ElementsDictionaryEntry("Reported Values Origin", "ReportedValuesOrigin", "CS", "1")); public_dictionary.emplace(Tag(0x3002, 0x000c), ElementsDictionaryEntry("RT Image Plane", "RTImagePlane", "CS", "1")); public_dictionary.emplace(Tag(0x3002, 0x000d), ElementsDictionaryEntry("X-Ray Image Receptor Translation", "XRayImageReceptorTranslation", "DS", "3")); public_dictionary.emplace(Tag(0x3002, 0x000e), ElementsDictionaryEntry("X-Ray Image Receptor Angle", "XRayImageReceptorAngle", "DS", "1")); public_dictionary.emplace(Tag(0x3002, 0x0010), ElementsDictionaryEntry("RT Image Orientation", "RTImageOrientation", "DS", "6")); public_dictionary.emplace(Tag(0x3002, 0x0011), ElementsDictionaryEntry("Image Plane Pixel Spacing", "ImagePlanePixelSpacing", "DS", "2")); public_dictionary.emplace(Tag(0x3002, 0x0012), ElementsDictionaryEntry("RT Image Position", "RTImagePosition", "DS", "2")); public_dictionary.emplace(Tag(0x3002, 0x0020), ElementsDictionaryEntry("Radiation Machine Name", "RadiationMachineName", "SH", "1")); public_dictionary.emplace(Tag(0x3002, 0x0022), ElementsDictionaryEntry("Radiation Machine SAD", "RadiationMachineSAD", "DS", "1")); public_dictionary.emplace(Tag(0x3002, 0x0024), ElementsDictionaryEntry("Radiation Machine SSD", "RadiationMachineSSD", "DS", "1")); public_dictionary.emplace(Tag(0x3002, 0x0026), ElementsDictionaryEntry("RT Image SID", "RTImageSID", "DS", "1")); public_dictionary.emplace(Tag(0x3002, 0x0028), ElementsDictionaryEntry("Source to Reference Object Distance", "SourceToReferenceObjectDistance", "DS", "1")); public_dictionary.emplace(Tag(0x3002, 0x0029), ElementsDictionaryEntry("Fraction Number", "FractionNumber", "IS", "1")); public_dictionary.emplace(Tag(0x3002, 0x0030), ElementsDictionaryEntry("Exposure Sequence", "ExposureSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3002, 0x0032), ElementsDictionaryEntry("Meterset Exposure", "MetersetExposure", "DS", "1")); public_dictionary.emplace(Tag(0x3002, 0x0034), ElementsDictionaryEntry("Diaphragm Position", "DiaphragmPosition", "DS", "4")); public_dictionary.emplace(Tag(0x3002, 0x0040), ElementsDictionaryEntry("Fluence Map Sequence", "FluenceMapSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3002, 0x0041), ElementsDictionaryEntry("Fluence Data Source", "FluenceDataSource", "CS", "1")); public_dictionary.emplace(Tag(0x3002, 0x0042), ElementsDictionaryEntry("Fluence Data Scale", "FluenceDataScale", "DS", "1")); public_dictionary.emplace(Tag(0x3002, 0x0050), ElementsDictionaryEntry("Primary Fluence Mode Sequence", "PrimaryFluenceModeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3002, 0x0051), ElementsDictionaryEntry("Fluence Mode", "FluenceMode", "CS", "1")); public_dictionary.emplace(Tag(0x3002, 0x0052), ElementsDictionaryEntry("Fluence Mode ID", "FluenceModeID", "SH", "1")); public_tags.emplace("RTImageLabel", Tag(0x3002, 0x0002)); public_tags.emplace("RTImageName", Tag(0x3002, 0x0003)); public_tags.emplace("RTImageDescription", Tag(0x3002, 0x0004)); public_tags.emplace("ReportedValuesOrigin", Tag(0x3002, 0x000a)); public_tags.emplace("RTImagePlane", Tag(0x3002, 0x000c)); public_tags.emplace("XRayImageReceptorTranslation", Tag(0x3002, 0x000d)); public_tags.emplace("XRayImageReceptorAngle", Tag(0x3002, 0x000e)); public_tags.emplace("RTImageOrientation", Tag(0x3002, 0x0010)); public_tags.emplace("ImagePlanePixelSpacing", Tag(0x3002, 0x0011)); public_tags.emplace("RTImagePosition", Tag(0x3002, 0x0012)); public_tags.emplace("RadiationMachineName", Tag(0x3002, 0x0020)); public_tags.emplace("RadiationMachineSAD", Tag(0x3002, 0x0022)); public_tags.emplace("RadiationMachineSSD", Tag(0x3002, 0x0024)); public_tags.emplace("RTImageSID", Tag(0x3002, 0x0026)); public_tags.emplace("SourceToReferenceObjectDistance", Tag(0x3002, 0x0028)); public_tags.emplace("FractionNumber", Tag(0x3002, 0x0029)); public_tags.emplace("ExposureSequence", Tag(0x3002, 0x0030)); public_tags.emplace("MetersetExposure", Tag(0x3002, 0x0032)); public_tags.emplace("DiaphragmPosition", Tag(0x3002, 0x0034)); public_tags.emplace("FluenceMapSequence", Tag(0x3002, 0x0040)); public_tags.emplace("FluenceDataSource", Tag(0x3002, 0x0041)); public_tags.emplace("FluenceDataScale", Tag(0x3002, 0x0042)); public_tags.emplace("PrimaryFluenceModeSequence", Tag(0x3002, 0x0050)); public_tags.emplace("FluenceMode", Tag(0x3002, 0x0051)); public_tags.emplace("FluenceModeID", Tag(0x3002, 0x0052)); } } }odil-0.11.0/src/odil/registry_3002.h000066400000000000000000000034441362244656000167400ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3002 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3002 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const RTImageLabel(0x3002, 0x0002); Tag const RTImageName(0x3002, 0x0003); Tag const RTImageDescription(0x3002, 0x0004); Tag const ReportedValuesOrigin(0x3002, 0x000a); Tag const RTImagePlane(0x3002, 0x000c); Tag const XRayImageReceptorTranslation(0x3002, 0x000d); Tag const XRayImageReceptorAngle(0x3002, 0x000e); Tag const RTImageOrientation(0x3002, 0x0010); Tag const ImagePlanePixelSpacing(0x3002, 0x0011); Tag const RTImagePosition(0x3002, 0x0012); Tag const RadiationMachineName(0x3002, 0x0020); Tag const RadiationMachineSAD(0x3002, 0x0022); Tag const RadiationMachineSSD(0x3002, 0x0024); Tag const RTImageSID(0x3002, 0x0026); Tag const SourceToReferenceObjectDistance(0x3002, 0x0028); Tag const FractionNumber(0x3002, 0x0029); Tag const ExposureSequence(0x3002, 0x0030); Tag const MetersetExposure(0x3002, 0x0032); Tag const DiaphragmPosition(0x3002, 0x0034); Tag const FluenceMapSequence(0x3002, 0x0040); Tag const FluenceDataSource(0x3002, 0x0041); Tag const FluenceDataScale(0x3002, 0x0042); Tag const PrimaryFluenceModeSequence(0x3002, 0x0050); Tag const FluenceMode(0x3002, 0x0051); Tag const FluenceModeID(0x3002, 0x0052); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3002odil-0.11.0/src/odil/registry_3004.cpp000066400000000000000000000124151362244656000172730ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_3004( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x3004, 0x0001), ElementsDictionaryEntry("DVH Type", "DVHType", "CS", "1")); public_dictionary.emplace(Tag(0x3004, 0x0002), ElementsDictionaryEntry("Dose Units", "DoseUnits", "CS", "1")); public_dictionary.emplace(Tag(0x3004, 0x0004), ElementsDictionaryEntry("Dose Type", "DoseType", "CS", "1")); public_dictionary.emplace(Tag(0x3004, 0x0005), ElementsDictionaryEntry("Spatial Transform of Dose", "SpatialTransformOfDose", "CS", "1")); public_dictionary.emplace(Tag(0x3004, 0x0006), ElementsDictionaryEntry("Dose Comment", "DoseComment", "LO", "1")); public_dictionary.emplace(Tag(0x3004, 0x0008), ElementsDictionaryEntry("Normalization Point", "NormalizationPoint", "DS", "3")); public_dictionary.emplace(Tag(0x3004, 0x000a), ElementsDictionaryEntry("Dose Summation Type", "DoseSummationType", "CS", "1")); public_dictionary.emplace(Tag(0x3004, 0x000c), ElementsDictionaryEntry("Grid Frame Offset Vector", "GridFrameOffsetVector", "DS", "2-n")); public_dictionary.emplace(Tag(0x3004, 0x000e), ElementsDictionaryEntry("Dose Grid Scaling", "DoseGridScaling", "DS", "1")); public_dictionary.emplace(Tag(0x3004, 0x0010), ElementsDictionaryEntry("RT Dose ROI Sequence", "RTDoseROISequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3004, 0x0012), ElementsDictionaryEntry("Dose Value", "DoseValue", "DS", "1")); public_dictionary.emplace(Tag(0x3004, 0x0014), ElementsDictionaryEntry("Tissue Heterogeneity Correction", "TissueHeterogeneityCorrection", "CS", "1-3")); public_dictionary.emplace(Tag(0x3004, 0x0040), ElementsDictionaryEntry("DVH Normalization Point", "DVHNormalizationPoint", "DS", "3")); public_dictionary.emplace(Tag(0x3004, 0x0042), ElementsDictionaryEntry("DVH Normalization Dose Value", "DVHNormalizationDoseValue", "DS", "1")); public_dictionary.emplace(Tag(0x3004, 0x0050), ElementsDictionaryEntry("DVH Sequence", "DVHSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3004, 0x0052), ElementsDictionaryEntry("DVH Dose Scaling", "DVHDoseScaling", "DS", "1")); public_dictionary.emplace(Tag(0x3004, 0x0054), ElementsDictionaryEntry("DVH Volume Units", "DVHVolumeUnits", "CS", "1")); public_dictionary.emplace(Tag(0x3004, 0x0056), ElementsDictionaryEntry("DVH Number of Bins", "DVHNumberOfBins", "IS", "1")); public_dictionary.emplace(Tag(0x3004, 0x0058), ElementsDictionaryEntry("DVH Data", "DVHData", "DS", "2-2n")); public_dictionary.emplace(Tag(0x3004, 0x0060), ElementsDictionaryEntry("DVH Referenced ROI Sequence", "DVHReferencedROISequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3004, 0x0062), ElementsDictionaryEntry("DVH ROI Contribution Type", "DVHROIContributionType", "CS", "1")); public_dictionary.emplace(Tag(0x3004, 0x0070), ElementsDictionaryEntry("DVH Minimum Dose", "DVHMinimumDose", "DS", "1")); public_dictionary.emplace(Tag(0x3004, 0x0072), ElementsDictionaryEntry("DVH Maximum Dose", "DVHMaximumDose", "DS", "1")); public_dictionary.emplace(Tag(0x3004, 0x0074), ElementsDictionaryEntry("DVH Mean Dose", "DVHMeanDose", "DS", "1")); public_tags.emplace("DVHType", Tag(0x3004, 0x0001)); public_tags.emplace("DoseUnits", Tag(0x3004, 0x0002)); public_tags.emplace("DoseType", Tag(0x3004, 0x0004)); public_tags.emplace("SpatialTransformOfDose", Tag(0x3004, 0x0005)); public_tags.emplace("DoseComment", Tag(0x3004, 0x0006)); public_tags.emplace("NormalizationPoint", Tag(0x3004, 0x0008)); public_tags.emplace("DoseSummationType", Tag(0x3004, 0x000a)); public_tags.emplace("GridFrameOffsetVector", Tag(0x3004, 0x000c)); public_tags.emplace("DoseGridScaling", Tag(0x3004, 0x000e)); public_tags.emplace("RTDoseROISequence", Tag(0x3004, 0x0010)); public_tags.emplace("DoseValue", Tag(0x3004, 0x0012)); public_tags.emplace("TissueHeterogeneityCorrection", Tag(0x3004, 0x0014)); public_tags.emplace("DVHNormalizationPoint", Tag(0x3004, 0x0040)); public_tags.emplace("DVHNormalizationDoseValue", Tag(0x3004, 0x0042)); public_tags.emplace("DVHSequence", Tag(0x3004, 0x0050)); public_tags.emplace("DVHDoseScaling", Tag(0x3004, 0x0052)); public_tags.emplace("DVHVolumeUnits", Tag(0x3004, 0x0054)); public_tags.emplace("DVHNumberOfBins", Tag(0x3004, 0x0056)); public_tags.emplace("DVHData", Tag(0x3004, 0x0058)); public_tags.emplace("DVHReferencedROISequence", Tag(0x3004, 0x0060)); public_tags.emplace("DVHROIContributionType", Tag(0x3004, 0x0062)); public_tags.emplace("DVHMinimumDose", Tag(0x3004, 0x0070)); public_tags.emplace("DVHMaximumDose", Tag(0x3004, 0x0072)); public_tags.emplace("DVHMeanDose", Tag(0x3004, 0x0074)); } } }odil-0.11.0/src/odil/registry_3004.h000066400000000000000000000033061362244656000167370ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3004 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3004 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const DVHType(0x3004, 0x0001); Tag const DoseUnits(0x3004, 0x0002); Tag const DoseType(0x3004, 0x0004); Tag const SpatialTransformOfDose(0x3004, 0x0005); Tag const DoseComment(0x3004, 0x0006); Tag const NormalizationPoint(0x3004, 0x0008); Tag const DoseSummationType(0x3004, 0x000a); Tag const GridFrameOffsetVector(0x3004, 0x000c); Tag const DoseGridScaling(0x3004, 0x000e); Tag const RTDoseROISequence(0x3004, 0x0010); Tag const DoseValue(0x3004, 0x0012); Tag const TissueHeterogeneityCorrection(0x3004, 0x0014); Tag const DVHNormalizationPoint(0x3004, 0x0040); Tag const DVHNormalizationDoseValue(0x3004, 0x0042); Tag const DVHSequence(0x3004, 0x0050); Tag const DVHDoseScaling(0x3004, 0x0052); Tag const DVHVolumeUnits(0x3004, 0x0054); Tag const DVHNumberOfBins(0x3004, 0x0056); Tag const DVHData(0x3004, 0x0058); Tag const DVHReferencedROISequence(0x3004, 0x0060); Tag const DVHROIContributionType(0x3004, 0x0062); Tag const DVHMinimumDose(0x3004, 0x0070); Tag const DVHMaximumDose(0x3004, 0x0072); Tag const DVHMeanDose(0x3004, 0x0074); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3004odil-0.11.0/src/odil/registry_3006.cpp000066400000000000000000000310311362244656000172700ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_3006( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x3006, 0x0002), ElementsDictionaryEntry("Structure Set Label", "StructureSetLabel", "SH", "1")); public_dictionary.emplace(Tag(0x3006, 0x0004), ElementsDictionaryEntry("Structure Set Name", "StructureSetName", "LO", "1")); public_dictionary.emplace(Tag(0x3006, 0x0006), ElementsDictionaryEntry("Structure Set Description", "StructureSetDescription", "ST", "1")); public_dictionary.emplace(Tag(0x3006, 0x0008), ElementsDictionaryEntry("Structure Set Date", "StructureSetDate", "DA", "1")); public_dictionary.emplace(Tag(0x3006, 0x0009), ElementsDictionaryEntry("Structure Set Time", "StructureSetTime", "TM", "1")); public_dictionary.emplace(Tag(0x3006, 0x0010), ElementsDictionaryEntry("Referenced Frame of Reference Sequence", "ReferencedFrameOfReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x0012), ElementsDictionaryEntry("RT Referenced Study Sequence", "RTReferencedStudySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x0014), ElementsDictionaryEntry("RT Referenced Series Sequence", "RTReferencedSeriesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x0016), ElementsDictionaryEntry("Contour Image Sequence", "ContourImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x0018), ElementsDictionaryEntry("Predecessor Structure Set Sequence", "PredecessorStructureSetSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x0020), ElementsDictionaryEntry("Structure Set ROI Sequence", "StructureSetROISequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x0022), ElementsDictionaryEntry("ROI Number", "ROINumber", "IS", "1")); public_dictionary.emplace(Tag(0x3006, 0x0024), ElementsDictionaryEntry("Referenced Frame of Reference UID", "ReferencedFrameOfReferenceUID", "UI", "1")); public_dictionary.emplace(Tag(0x3006, 0x0026), ElementsDictionaryEntry("ROI Name", "ROIName", "LO", "1")); public_dictionary.emplace(Tag(0x3006, 0x0028), ElementsDictionaryEntry("ROI Description", "ROIDescription", "ST", "1")); public_dictionary.emplace(Tag(0x3006, 0x002a), ElementsDictionaryEntry("ROI Display Color", "ROIDisplayColor", "IS", "3")); public_dictionary.emplace(Tag(0x3006, 0x002c), ElementsDictionaryEntry("ROI Volume", "ROIVolume", "DS", "1")); public_dictionary.emplace(Tag(0x3006, 0x0030), ElementsDictionaryEntry("RT Related ROI Sequence", "RTRelatedROISequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x0033), ElementsDictionaryEntry("RT ROI Relationship", "RTROIRelationship", "CS", "1")); public_dictionary.emplace(Tag(0x3006, 0x0036), ElementsDictionaryEntry("ROI Generation Algorithm", "ROIGenerationAlgorithm", "CS", "1")); public_dictionary.emplace(Tag(0x3006, 0x0037), ElementsDictionaryEntry("ROI Derivation Algorithm Identification Sequence", "ROIDerivationAlgorithmIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x0038), ElementsDictionaryEntry("ROI Generation Description", "ROIGenerationDescription", "LO", "1")); public_dictionary.emplace(Tag(0x3006, 0x0039), ElementsDictionaryEntry("ROI Contour Sequence", "ROIContourSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x0040), ElementsDictionaryEntry("Contour Sequence", "ContourSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x0042), ElementsDictionaryEntry("Contour Geometric Type", "ContourGeometricType", "CS", "1")); public_dictionary.emplace(Tag(0x3006, 0x0044), ElementsDictionaryEntry("Contour Slab Thickness", "ContourSlabThickness", "DS", "1")); public_dictionary.emplace(Tag(0x3006, 0x0045), ElementsDictionaryEntry("Contour Offset Vector", "ContourOffsetVector", "DS", "3")); public_dictionary.emplace(Tag(0x3006, 0x0046), ElementsDictionaryEntry("Number of Contour Points", "NumberOfContourPoints", "IS", "1")); public_dictionary.emplace(Tag(0x3006, 0x0048), ElementsDictionaryEntry("Contour Number", "ContourNumber", "IS", "1")); public_dictionary.emplace(Tag(0x3006, 0x0049), ElementsDictionaryEntry("Attached Contours", "AttachedContours", "IS", "1-n")); public_dictionary.emplace(Tag(0x3006, 0x0050), ElementsDictionaryEntry("Contour Data", "ContourData", "DS", "3-3n")); public_dictionary.emplace(Tag(0x3006, 0x0080), ElementsDictionaryEntry("RT ROI Observations Sequence", "RTROIObservationsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x0082), ElementsDictionaryEntry("Observation Number", "ObservationNumber", "IS", "1")); public_dictionary.emplace(Tag(0x3006, 0x0084), ElementsDictionaryEntry("Referenced ROI Number", "ReferencedROINumber", "IS", "1")); public_dictionary.emplace(Tag(0x3006, 0x0085), ElementsDictionaryEntry("ROI Observation Label", "ROIObservationLabel", "SH", "1")); public_dictionary.emplace(Tag(0x3006, 0x0086), ElementsDictionaryEntry("RT ROI Identification Code Sequence", "RTROIIdentificationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x0088), ElementsDictionaryEntry("ROI Observation Description", "ROIObservationDescription", "ST", "1")); public_dictionary.emplace(Tag(0x3006, 0x00a0), ElementsDictionaryEntry("Related RT ROI Observations Sequence", "RelatedRTROIObservationsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x00a4), ElementsDictionaryEntry("RT ROI Interpreted Type", "RTROIInterpretedType", "CS", "1")); public_dictionary.emplace(Tag(0x3006, 0x00a6), ElementsDictionaryEntry("ROI Interpreter", "ROIInterpreter", "PN", "1")); public_dictionary.emplace(Tag(0x3006, 0x00b0), ElementsDictionaryEntry("ROI Physical Properties Sequence", "ROIPhysicalPropertiesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x00b2), ElementsDictionaryEntry("ROI Physical Property", "ROIPhysicalProperty", "CS", "1")); public_dictionary.emplace(Tag(0x3006, 0x00b4), ElementsDictionaryEntry("ROI Physical Property Value", "ROIPhysicalPropertyValue", "DS", "1")); public_dictionary.emplace(Tag(0x3006, 0x00b6), ElementsDictionaryEntry("ROI Elemental Composition Sequence", "ROIElementalCompositionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x00b7), ElementsDictionaryEntry("ROI Elemental Composition Atomic Number", "ROIElementalCompositionAtomicNumber", "US", "1")); public_dictionary.emplace(Tag(0x3006, 0x00b8), ElementsDictionaryEntry("ROI Elemental Composition Atomic Mass Fraction", "ROIElementalCompositionAtomicMassFraction", "FL", "1")); public_dictionary.emplace(Tag(0x3006, 0x00b9), ElementsDictionaryEntry("Additional RT ROI Identification Code Sequence", "AdditionalRTROIIdentificationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x00c0), ElementsDictionaryEntry("Frame of Reference Relationship Sequence", "FrameOfReferenceRelationshipSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x00c2), ElementsDictionaryEntry("Related Frame of Reference UID", "RelatedFrameOfReferenceUID", "UI", "1")); public_dictionary.emplace(Tag(0x3006, 0x00c4), ElementsDictionaryEntry("Frame of Reference Transformation Type", "FrameOfReferenceTransformationType", "CS", "1")); public_dictionary.emplace(Tag(0x3006, 0x00c6), ElementsDictionaryEntry("Frame of Reference Transformation Matrix", "FrameOfReferenceTransformationMatrix", "DS", "16")); public_dictionary.emplace(Tag(0x3006, 0x00c8), ElementsDictionaryEntry("Frame of Reference Transformation Comment", "FrameOfReferenceTransformationComment", "LO", "1")); public_dictionary.emplace(Tag(0x3006, 0x00c9), ElementsDictionaryEntry("Patient Location Coordinates Sequence", "PatientLocationCoordinatesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x00ca), ElementsDictionaryEntry("Patient Location Coordinates Code Sequence", "PatientLocationCoordinatesCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3006, 0x00cb), ElementsDictionaryEntry("Patient Support Position Sequence", "PatientSupportPositionSequence", "SQ", "1")); public_tags.emplace("StructureSetLabel", Tag(0x3006, 0x0002)); public_tags.emplace("StructureSetName", Tag(0x3006, 0x0004)); public_tags.emplace("StructureSetDescription", Tag(0x3006, 0x0006)); public_tags.emplace("StructureSetDate", Tag(0x3006, 0x0008)); public_tags.emplace("StructureSetTime", Tag(0x3006, 0x0009)); public_tags.emplace("ReferencedFrameOfReferenceSequence", Tag(0x3006, 0x0010)); public_tags.emplace("RTReferencedStudySequence", Tag(0x3006, 0x0012)); public_tags.emplace("RTReferencedSeriesSequence", Tag(0x3006, 0x0014)); public_tags.emplace("ContourImageSequence", Tag(0x3006, 0x0016)); public_tags.emplace("PredecessorStructureSetSequence", Tag(0x3006, 0x0018)); public_tags.emplace("StructureSetROISequence", Tag(0x3006, 0x0020)); public_tags.emplace("ROINumber", Tag(0x3006, 0x0022)); public_tags.emplace("ReferencedFrameOfReferenceUID", Tag(0x3006, 0x0024)); public_tags.emplace("ROIName", Tag(0x3006, 0x0026)); public_tags.emplace("ROIDescription", Tag(0x3006, 0x0028)); public_tags.emplace("ROIDisplayColor", Tag(0x3006, 0x002a)); public_tags.emplace("ROIVolume", Tag(0x3006, 0x002c)); public_tags.emplace("RTRelatedROISequence", Tag(0x3006, 0x0030)); public_tags.emplace("RTROIRelationship", Tag(0x3006, 0x0033)); public_tags.emplace("ROIGenerationAlgorithm", Tag(0x3006, 0x0036)); public_tags.emplace("ROIDerivationAlgorithmIdentificationSequence", Tag(0x3006, 0x0037)); public_tags.emplace("ROIGenerationDescription", Tag(0x3006, 0x0038)); public_tags.emplace("ROIContourSequence", Tag(0x3006, 0x0039)); public_tags.emplace("ContourSequence", Tag(0x3006, 0x0040)); public_tags.emplace("ContourGeometricType", Tag(0x3006, 0x0042)); public_tags.emplace("ContourSlabThickness", Tag(0x3006, 0x0044)); public_tags.emplace("ContourOffsetVector", Tag(0x3006, 0x0045)); public_tags.emplace("NumberOfContourPoints", Tag(0x3006, 0x0046)); public_tags.emplace("ContourNumber", Tag(0x3006, 0x0048)); public_tags.emplace("AttachedContours", Tag(0x3006, 0x0049)); public_tags.emplace("ContourData", Tag(0x3006, 0x0050)); public_tags.emplace("RTROIObservationsSequence", Tag(0x3006, 0x0080)); public_tags.emplace("ObservationNumber", Tag(0x3006, 0x0082)); public_tags.emplace("ReferencedROINumber", Tag(0x3006, 0x0084)); public_tags.emplace("ROIObservationLabel", Tag(0x3006, 0x0085)); public_tags.emplace("RTROIIdentificationCodeSequence", Tag(0x3006, 0x0086)); public_tags.emplace("ROIObservationDescription", Tag(0x3006, 0x0088)); public_tags.emplace("RelatedRTROIObservationsSequence", Tag(0x3006, 0x00a0)); public_tags.emplace("RTROIInterpretedType", Tag(0x3006, 0x00a4)); public_tags.emplace("ROIInterpreter", Tag(0x3006, 0x00a6)); public_tags.emplace("ROIPhysicalPropertiesSequence", Tag(0x3006, 0x00b0)); public_tags.emplace("ROIPhysicalProperty", Tag(0x3006, 0x00b2)); public_tags.emplace("ROIPhysicalPropertyValue", Tag(0x3006, 0x00b4)); public_tags.emplace("ROIElementalCompositionSequence", Tag(0x3006, 0x00b6)); public_tags.emplace("ROIElementalCompositionAtomicNumber", Tag(0x3006, 0x00b7)); public_tags.emplace("ROIElementalCompositionAtomicMassFraction", Tag(0x3006, 0x00b8)); public_tags.emplace("AdditionalRTROIIdentificationCodeSequence", Tag(0x3006, 0x00b9)); public_tags.emplace("FrameOfReferenceRelationshipSequence", Tag(0x3006, 0x00c0)); public_tags.emplace("RelatedFrameOfReferenceUID", Tag(0x3006, 0x00c2)); public_tags.emplace("FrameOfReferenceTransformationType", Tag(0x3006, 0x00c4)); public_tags.emplace("FrameOfReferenceTransformationMatrix", Tag(0x3006, 0x00c6)); public_tags.emplace("FrameOfReferenceTransformationComment", Tag(0x3006, 0x00c8)); public_tags.emplace("PatientLocationCoordinatesSequence", Tag(0x3006, 0x00c9)); public_tags.emplace("PatientLocationCoordinatesCodeSequence", Tag(0x3006, 0x00ca)); public_tags.emplace("PatientSupportPositionSequence", Tag(0x3006, 0x00cb)); } } }odil-0.11.0/src/odil/registry_3006.h000066400000000000000000000067121362244656000167450ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3006 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3006 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const StructureSetLabel(0x3006, 0x0002); Tag const StructureSetName(0x3006, 0x0004); Tag const StructureSetDescription(0x3006, 0x0006); Tag const StructureSetDate(0x3006, 0x0008); Tag const StructureSetTime(0x3006, 0x0009); Tag const ReferencedFrameOfReferenceSequence(0x3006, 0x0010); Tag const RTReferencedStudySequence(0x3006, 0x0012); Tag const RTReferencedSeriesSequence(0x3006, 0x0014); Tag const ContourImageSequence(0x3006, 0x0016); Tag const PredecessorStructureSetSequence(0x3006, 0x0018); Tag const StructureSetROISequence(0x3006, 0x0020); Tag const ROINumber(0x3006, 0x0022); Tag const ReferencedFrameOfReferenceUID(0x3006, 0x0024); Tag const ROIName(0x3006, 0x0026); Tag const ROIDescription(0x3006, 0x0028); Tag const ROIDisplayColor(0x3006, 0x002a); Tag const ROIVolume(0x3006, 0x002c); Tag const RTRelatedROISequence(0x3006, 0x0030); Tag const RTROIRelationship(0x3006, 0x0033); Tag const ROIGenerationAlgorithm(0x3006, 0x0036); Tag const ROIDerivationAlgorithmIdentificationSequence(0x3006, 0x0037); Tag const ROIGenerationDescription(0x3006, 0x0038); Tag const ROIContourSequence(0x3006, 0x0039); Tag const ContourSequence(0x3006, 0x0040); Tag const ContourGeometricType(0x3006, 0x0042); Tag const ContourSlabThickness(0x3006, 0x0044); Tag const ContourOffsetVector(0x3006, 0x0045); Tag const NumberOfContourPoints(0x3006, 0x0046); Tag const ContourNumber(0x3006, 0x0048); Tag const AttachedContours(0x3006, 0x0049); Tag const ContourData(0x3006, 0x0050); Tag const RTROIObservationsSequence(0x3006, 0x0080); Tag const ObservationNumber(0x3006, 0x0082); Tag const ReferencedROINumber(0x3006, 0x0084); Tag const ROIObservationLabel(0x3006, 0x0085); Tag const RTROIIdentificationCodeSequence(0x3006, 0x0086); Tag const ROIObservationDescription(0x3006, 0x0088); Tag const RelatedRTROIObservationsSequence(0x3006, 0x00a0); Tag const RTROIInterpretedType(0x3006, 0x00a4); Tag const ROIInterpreter(0x3006, 0x00a6); Tag const ROIPhysicalPropertiesSequence(0x3006, 0x00b0); Tag const ROIPhysicalProperty(0x3006, 0x00b2); Tag const ROIPhysicalPropertyValue(0x3006, 0x00b4); Tag const ROIElementalCompositionSequence(0x3006, 0x00b6); Tag const ROIElementalCompositionAtomicNumber(0x3006, 0x00b7); Tag const ROIElementalCompositionAtomicMassFraction(0x3006, 0x00b8); Tag const AdditionalRTROIIdentificationCodeSequence(0x3006, 0x00b9); Tag const FrameOfReferenceRelationshipSequence(0x3006, 0x00c0); Tag const RelatedFrameOfReferenceUID(0x3006, 0x00c2); Tag const FrameOfReferenceTransformationType(0x3006, 0x00c4); Tag const FrameOfReferenceTransformationMatrix(0x3006, 0x00c6); Tag const FrameOfReferenceTransformationComment(0x3006, 0x00c8); Tag const PatientLocationCoordinatesSequence(0x3006, 0x00c9); Tag const PatientLocationCoordinatesCodeSequence(0x3006, 0x00ca); Tag const PatientSupportPositionSequence(0x3006, 0x00cb); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3006odil-0.11.0/src/odil/registry_3008.cpp000066400000000000000000000533201362244656000172770ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_3008( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x3008, 0x0010), ElementsDictionaryEntry("Measured Dose Reference Sequence", "MeasuredDoseReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0012), ElementsDictionaryEntry("Measured Dose Description", "MeasuredDoseDescription", "ST", "1")); public_dictionary.emplace(Tag(0x3008, 0x0014), ElementsDictionaryEntry("Measured Dose Type", "MeasuredDoseType", "CS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0016), ElementsDictionaryEntry("Measured Dose Value", "MeasuredDoseValue", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0020), ElementsDictionaryEntry("Treatment Session Beam Sequence", "TreatmentSessionBeamSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0021), ElementsDictionaryEntry("Treatment Session Ion Beam Sequence", "TreatmentSessionIonBeamSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0022), ElementsDictionaryEntry("Current Fraction Number", "CurrentFractionNumber", "IS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0024), ElementsDictionaryEntry("Treatment Control Point Date", "TreatmentControlPointDate", "DA", "1")); public_dictionary.emplace(Tag(0x3008, 0x0025), ElementsDictionaryEntry("Treatment Control Point Time", "TreatmentControlPointTime", "TM", "1")); public_dictionary.emplace(Tag(0x3008, 0x002a), ElementsDictionaryEntry("Treatment Termination Status", "TreatmentTerminationStatus", "CS", "1")); public_dictionary.emplace(Tag(0x3008, 0x002b), ElementsDictionaryEntry("Treatment Termination Code", "TreatmentTerminationCode", "SH", "1")); public_dictionary.emplace(Tag(0x3008, 0x002c), ElementsDictionaryEntry("Treatment Verification Status", "TreatmentVerificationStatus", "CS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0030), ElementsDictionaryEntry("Referenced Treatment Record Sequence", "ReferencedTreatmentRecordSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0032), ElementsDictionaryEntry("Specified Primary Meterset", "SpecifiedPrimaryMeterset", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0033), ElementsDictionaryEntry("Specified Secondary Meterset", "SpecifiedSecondaryMeterset", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0036), ElementsDictionaryEntry("Delivered Primary Meterset", "DeliveredPrimaryMeterset", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0037), ElementsDictionaryEntry("Delivered Secondary Meterset", "DeliveredSecondaryMeterset", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x003a), ElementsDictionaryEntry("Specified Treatment Time", "SpecifiedTreatmentTime", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x003b), ElementsDictionaryEntry("Delivered Treatment Time", "DeliveredTreatmentTime", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0040), ElementsDictionaryEntry("Control Point Delivery Sequence", "ControlPointDeliverySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0041), ElementsDictionaryEntry("Ion Control Point Delivery Sequence", "IonControlPointDeliverySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0042), ElementsDictionaryEntry("Specified Meterset", "SpecifiedMeterset", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0044), ElementsDictionaryEntry("Delivered Meterset", "DeliveredMeterset", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0045), ElementsDictionaryEntry("Meterset Rate Set", "MetersetRateSet", "FL", "1")); public_dictionary.emplace(Tag(0x3008, 0x0046), ElementsDictionaryEntry("Meterset Rate Delivered", "MetersetRateDelivered", "FL", "1")); public_dictionary.emplace(Tag(0x3008, 0x0047), ElementsDictionaryEntry("Scan Spot Metersets Delivered", "ScanSpotMetersetsDelivered", "FL", "1-n")); public_dictionary.emplace(Tag(0x3008, 0x0048), ElementsDictionaryEntry("Dose Rate Delivered", "DoseRateDelivered", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0050), ElementsDictionaryEntry("Treatment Summary Calculated Dose Reference Sequence", "TreatmentSummaryCalculatedDoseReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0052), ElementsDictionaryEntry("Cumulative Dose to Dose Reference", "CumulativeDoseToDoseReference", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0054), ElementsDictionaryEntry("First Treatment Date", "FirstTreatmentDate", "DA", "1")); public_dictionary.emplace(Tag(0x3008, 0x0056), ElementsDictionaryEntry("Most Recent Treatment Date", "MostRecentTreatmentDate", "DA", "1")); public_dictionary.emplace(Tag(0x3008, 0x005a), ElementsDictionaryEntry("Number of Fractions Delivered", "NumberOfFractionsDelivered", "IS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0060), ElementsDictionaryEntry("Override Sequence", "OverrideSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0061), ElementsDictionaryEntry("Parameter Sequence Pointer", "ParameterSequencePointer", "AT", "1")); public_dictionary.emplace(Tag(0x3008, 0x0062), ElementsDictionaryEntry("Override Parameter Pointer", "OverrideParameterPointer", "AT", "1")); public_dictionary.emplace(Tag(0x3008, 0x0063), ElementsDictionaryEntry("Parameter Item Index", "ParameterItemIndex", "IS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0064), ElementsDictionaryEntry("Measured Dose Reference Number", "MeasuredDoseReferenceNumber", "IS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0065), ElementsDictionaryEntry("Parameter Pointer", "ParameterPointer", "AT", "1")); public_dictionary.emplace(Tag(0x3008, 0x0066), ElementsDictionaryEntry("Override Reason", "OverrideReason", "ST", "1")); public_dictionary.emplace(Tag(0x3008, 0x0067), ElementsDictionaryEntry("Parameter Value Number", "ParameterValueNumber", "US", "1")); public_dictionary.emplace(Tag(0x3008, 0x0068), ElementsDictionaryEntry("Corrected Parameter Sequence", "CorrectedParameterSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x006a), ElementsDictionaryEntry("Correction Value", "CorrectionValue", "FL", "1")); public_dictionary.emplace(Tag(0x3008, 0x0070), ElementsDictionaryEntry("Calculated Dose Reference Sequence", "CalculatedDoseReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0072), ElementsDictionaryEntry("Calculated Dose Reference Number", "CalculatedDoseReferenceNumber", "IS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0074), ElementsDictionaryEntry("Calculated Dose Reference Description", "CalculatedDoseReferenceDescription", "ST", "1")); public_dictionary.emplace(Tag(0x3008, 0x0076), ElementsDictionaryEntry("Calculated Dose Reference Dose Value", "CalculatedDoseReferenceDoseValue", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0078), ElementsDictionaryEntry("Start Meterset", "StartMeterset", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x007a), ElementsDictionaryEntry("End Meterset", "EndMeterset", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0080), ElementsDictionaryEntry("Referenced Measured Dose Reference Sequence", "ReferencedMeasuredDoseReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0082), ElementsDictionaryEntry("Referenced Measured Dose Reference Number", "ReferencedMeasuredDoseReferenceNumber", "IS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0090), ElementsDictionaryEntry("Referenced Calculated Dose Reference Sequence", "ReferencedCalculatedDoseReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0092), ElementsDictionaryEntry("Referenced Calculated Dose Reference Number", "ReferencedCalculatedDoseReferenceNumber", "IS", "1")); public_dictionary.emplace(Tag(0x3008, 0x00a0), ElementsDictionaryEntry("Beam Limiting Device Leaf Pairs Sequence", "BeamLimitingDeviceLeafPairsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x00b0), ElementsDictionaryEntry("Recorded Wedge Sequence", "RecordedWedgeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x00c0), ElementsDictionaryEntry("Recorded Compensator Sequence", "RecordedCompensatorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x00d0), ElementsDictionaryEntry("Recorded Block Sequence", "RecordedBlockSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x00e0), ElementsDictionaryEntry("Treatment Summary Measured Dose Reference Sequence", "TreatmentSummaryMeasuredDoseReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x00f0), ElementsDictionaryEntry("Recorded Snout Sequence", "RecordedSnoutSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x00f2), ElementsDictionaryEntry("Recorded Range Shifter Sequence", "RecordedRangeShifterSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x00f4), ElementsDictionaryEntry("Recorded Lateral Spreading Device Sequence", "RecordedLateralSpreadingDeviceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x00f6), ElementsDictionaryEntry("Recorded Range Modulator Sequence", "RecordedRangeModulatorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0100), ElementsDictionaryEntry("Recorded Source Sequence", "RecordedSourceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0105), ElementsDictionaryEntry("Source Serial Number", "SourceSerialNumber", "LO", "1")); public_dictionary.emplace(Tag(0x3008, 0x0110), ElementsDictionaryEntry("Treatment Session Application Setup Sequence", "TreatmentSessionApplicationSetupSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0116), ElementsDictionaryEntry("Application Setup Check", "ApplicationSetupCheck", "CS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0120), ElementsDictionaryEntry("Recorded Brachy Accessory Device Sequence", "RecordedBrachyAccessoryDeviceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0122), ElementsDictionaryEntry("Referenced Brachy Accessory Device Number", "ReferencedBrachyAccessoryDeviceNumber", "IS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0130), ElementsDictionaryEntry("Recorded Channel Sequence", "RecordedChannelSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0132), ElementsDictionaryEntry("Specified Channel Total Time", "SpecifiedChannelTotalTime", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0134), ElementsDictionaryEntry("Delivered Channel Total Time", "DeliveredChannelTotalTime", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0136), ElementsDictionaryEntry("Specified Number of Pulses", "SpecifiedNumberOfPulses", "IS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0138), ElementsDictionaryEntry("Delivered Number of Pulses", "DeliveredNumberOfPulses", "IS", "1")); public_dictionary.emplace(Tag(0x3008, 0x013a), ElementsDictionaryEntry("Specified Pulse Repetition Interval", "SpecifiedPulseRepetitionInterval", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x013c), ElementsDictionaryEntry("Delivered Pulse Repetition Interval", "DeliveredPulseRepetitionInterval", "DS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0140), ElementsDictionaryEntry("Recorded Source Applicator Sequence", "RecordedSourceApplicatorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0142), ElementsDictionaryEntry("Referenced Source Applicator Number", "ReferencedSourceApplicatorNumber", "IS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0150), ElementsDictionaryEntry("Recorded Channel Shield Sequence", "RecordedChannelShieldSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0152), ElementsDictionaryEntry("Referenced Channel Shield Number", "ReferencedChannelShieldNumber", "IS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0160), ElementsDictionaryEntry("Brachy Control Point Delivered Sequence", "BrachyControlPointDeliveredSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0162), ElementsDictionaryEntry("Safe Position Exit Date", "SafePositionExitDate", "DA", "1")); public_dictionary.emplace(Tag(0x3008, 0x0164), ElementsDictionaryEntry("Safe Position Exit Time", "SafePositionExitTime", "TM", "1")); public_dictionary.emplace(Tag(0x3008, 0x0166), ElementsDictionaryEntry("Safe Position Return Date", "SafePositionReturnDate", "DA", "1")); public_dictionary.emplace(Tag(0x3008, 0x0168), ElementsDictionaryEntry("Safe Position Return Time", "SafePositionReturnTime", "TM", "1")); public_dictionary.emplace(Tag(0x3008, 0x0171), ElementsDictionaryEntry("Pulse Specific Brachy Control Point Delivered Sequence", "PulseSpecificBrachyControlPointDeliveredSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0172), ElementsDictionaryEntry("Pulse Number", "PulseNumber", "US", "1")); public_dictionary.emplace(Tag(0x3008, 0x0173), ElementsDictionaryEntry("Brachy Pulse Control Point Delivered Sequence", "BrachyPulseControlPointDeliveredSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0200), ElementsDictionaryEntry("Current Treatment Status", "CurrentTreatmentStatus", "CS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0202), ElementsDictionaryEntry("Treatment Status Comment", "TreatmentStatusComment", "ST", "1")); public_dictionary.emplace(Tag(0x3008, 0x0220), ElementsDictionaryEntry("Fraction Group Summary Sequence", "FractionGroupSummarySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0223), ElementsDictionaryEntry("Referenced Fraction Number", "ReferencedFractionNumber", "IS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0224), ElementsDictionaryEntry("Fraction Group Type", "FractionGroupType", "CS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0230), ElementsDictionaryEntry("Beam Stopper Position", "BeamStopperPosition", "CS", "1")); public_dictionary.emplace(Tag(0x3008, 0x0240), ElementsDictionaryEntry("Fraction Status Summary Sequence", "FractionStatusSummarySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3008, 0x0250), ElementsDictionaryEntry("Treatment Date", "TreatmentDate", "DA", "1")); public_dictionary.emplace(Tag(0x3008, 0x0251), ElementsDictionaryEntry("Treatment Time", "TreatmentTime", "TM", "1")); public_tags.emplace("MeasuredDoseReferenceSequence", Tag(0x3008, 0x0010)); public_tags.emplace("MeasuredDoseDescription", Tag(0x3008, 0x0012)); public_tags.emplace("MeasuredDoseType", Tag(0x3008, 0x0014)); public_tags.emplace("MeasuredDoseValue", Tag(0x3008, 0x0016)); public_tags.emplace("TreatmentSessionBeamSequence", Tag(0x3008, 0x0020)); public_tags.emplace("TreatmentSessionIonBeamSequence", Tag(0x3008, 0x0021)); public_tags.emplace("CurrentFractionNumber", Tag(0x3008, 0x0022)); public_tags.emplace("TreatmentControlPointDate", Tag(0x3008, 0x0024)); public_tags.emplace("TreatmentControlPointTime", Tag(0x3008, 0x0025)); public_tags.emplace("TreatmentTerminationStatus", Tag(0x3008, 0x002a)); public_tags.emplace("TreatmentTerminationCode", Tag(0x3008, 0x002b)); public_tags.emplace("TreatmentVerificationStatus", Tag(0x3008, 0x002c)); public_tags.emplace("ReferencedTreatmentRecordSequence", Tag(0x3008, 0x0030)); public_tags.emplace("SpecifiedPrimaryMeterset", Tag(0x3008, 0x0032)); public_tags.emplace("SpecifiedSecondaryMeterset", Tag(0x3008, 0x0033)); public_tags.emplace("DeliveredPrimaryMeterset", Tag(0x3008, 0x0036)); public_tags.emplace("DeliveredSecondaryMeterset", Tag(0x3008, 0x0037)); public_tags.emplace("SpecifiedTreatmentTime", Tag(0x3008, 0x003a)); public_tags.emplace("DeliveredTreatmentTime", Tag(0x3008, 0x003b)); public_tags.emplace("ControlPointDeliverySequence", Tag(0x3008, 0x0040)); public_tags.emplace("IonControlPointDeliverySequence", Tag(0x3008, 0x0041)); public_tags.emplace("SpecifiedMeterset", Tag(0x3008, 0x0042)); public_tags.emplace("DeliveredMeterset", Tag(0x3008, 0x0044)); public_tags.emplace("MetersetRateSet", Tag(0x3008, 0x0045)); public_tags.emplace("MetersetRateDelivered", Tag(0x3008, 0x0046)); public_tags.emplace("ScanSpotMetersetsDelivered", Tag(0x3008, 0x0047)); public_tags.emplace("DoseRateDelivered", Tag(0x3008, 0x0048)); public_tags.emplace("TreatmentSummaryCalculatedDoseReferenceSequence", Tag(0x3008, 0x0050)); public_tags.emplace("CumulativeDoseToDoseReference", Tag(0x3008, 0x0052)); public_tags.emplace("FirstTreatmentDate", Tag(0x3008, 0x0054)); public_tags.emplace("MostRecentTreatmentDate", Tag(0x3008, 0x0056)); public_tags.emplace("NumberOfFractionsDelivered", Tag(0x3008, 0x005a)); public_tags.emplace("OverrideSequence", Tag(0x3008, 0x0060)); public_tags.emplace("ParameterSequencePointer", Tag(0x3008, 0x0061)); public_tags.emplace("OverrideParameterPointer", Tag(0x3008, 0x0062)); public_tags.emplace("ParameterItemIndex", Tag(0x3008, 0x0063)); public_tags.emplace("MeasuredDoseReferenceNumber", Tag(0x3008, 0x0064)); public_tags.emplace("ParameterPointer", Tag(0x3008, 0x0065)); public_tags.emplace("OverrideReason", Tag(0x3008, 0x0066)); public_tags.emplace("ParameterValueNumber", Tag(0x3008, 0x0067)); public_tags.emplace("CorrectedParameterSequence", Tag(0x3008, 0x0068)); public_tags.emplace("CorrectionValue", Tag(0x3008, 0x006a)); public_tags.emplace("CalculatedDoseReferenceSequence", Tag(0x3008, 0x0070)); public_tags.emplace("CalculatedDoseReferenceNumber", Tag(0x3008, 0x0072)); public_tags.emplace("CalculatedDoseReferenceDescription", Tag(0x3008, 0x0074)); public_tags.emplace("CalculatedDoseReferenceDoseValue", Tag(0x3008, 0x0076)); public_tags.emplace("StartMeterset", Tag(0x3008, 0x0078)); public_tags.emplace("EndMeterset", Tag(0x3008, 0x007a)); public_tags.emplace("ReferencedMeasuredDoseReferenceSequence", Tag(0x3008, 0x0080)); public_tags.emplace("ReferencedMeasuredDoseReferenceNumber", Tag(0x3008, 0x0082)); public_tags.emplace("ReferencedCalculatedDoseReferenceSequence", Tag(0x3008, 0x0090)); public_tags.emplace("ReferencedCalculatedDoseReferenceNumber", Tag(0x3008, 0x0092)); public_tags.emplace("BeamLimitingDeviceLeafPairsSequence", Tag(0x3008, 0x00a0)); public_tags.emplace("RecordedWedgeSequence", Tag(0x3008, 0x00b0)); public_tags.emplace("RecordedCompensatorSequence", Tag(0x3008, 0x00c0)); public_tags.emplace("RecordedBlockSequence", Tag(0x3008, 0x00d0)); public_tags.emplace("TreatmentSummaryMeasuredDoseReferenceSequence", Tag(0x3008, 0x00e0)); public_tags.emplace("RecordedSnoutSequence", Tag(0x3008, 0x00f0)); public_tags.emplace("RecordedRangeShifterSequence", Tag(0x3008, 0x00f2)); public_tags.emplace("RecordedLateralSpreadingDeviceSequence", Tag(0x3008, 0x00f4)); public_tags.emplace("RecordedRangeModulatorSequence", Tag(0x3008, 0x00f6)); public_tags.emplace("RecordedSourceSequence", Tag(0x3008, 0x0100)); public_tags.emplace("SourceSerialNumber", Tag(0x3008, 0x0105)); public_tags.emplace("TreatmentSessionApplicationSetupSequence", Tag(0x3008, 0x0110)); public_tags.emplace("ApplicationSetupCheck", Tag(0x3008, 0x0116)); public_tags.emplace("RecordedBrachyAccessoryDeviceSequence", Tag(0x3008, 0x0120)); public_tags.emplace("ReferencedBrachyAccessoryDeviceNumber", Tag(0x3008, 0x0122)); public_tags.emplace("RecordedChannelSequence", Tag(0x3008, 0x0130)); public_tags.emplace("SpecifiedChannelTotalTime", Tag(0x3008, 0x0132)); public_tags.emplace("DeliveredChannelTotalTime", Tag(0x3008, 0x0134)); public_tags.emplace("SpecifiedNumberOfPulses", Tag(0x3008, 0x0136)); public_tags.emplace("DeliveredNumberOfPulses", Tag(0x3008, 0x0138)); public_tags.emplace("SpecifiedPulseRepetitionInterval", Tag(0x3008, 0x013a)); public_tags.emplace("DeliveredPulseRepetitionInterval", Tag(0x3008, 0x013c)); public_tags.emplace("RecordedSourceApplicatorSequence", Tag(0x3008, 0x0140)); public_tags.emplace("ReferencedSourceApplicatorNumber", Tag(0x3008, 0x0142)); public_tags.emplace("RecordedChannelShieldSequence", Tag(0x3008, 0x0150)); public_tags.emplace("ReferencedChannelShieldNumber", Tag(0x3008, 0x0152)); public_tags.emplace("BrachyControlPointDeliveredSequence", Tag(0x3008, 0x0160)); public_tags.emplace("SafePositionExitDate", Tag(0x3008, 0x0162)); public_tags.emplace("SafePositionExitTime", Tag(0x3008, 0x0164)); public_tags.emplace("SafePositionReturnDate", Tag(0x3008, 0x0166)); public_tags.emplace("SafePositionReturnTime", Tag(0x3008, 0x0168)); public_tags.emplace("PulseSpecificBrachyControlPointDeliveredSequence", Tag(0x3008, 0x0171)); public_tags.emplace("PulseNumber", Tag(0x3008, 0x0172)); public_tags.emplace("BrachyPulseControlPointDeliveredSequence", Tag(0x3008, 0x0173)); public_tags.emplace("CurrentTreatmentStatus", Tag(0x3008, 0x0200)); public_tags.emplace("TreatmentStatusComment", Tag(0x3008, 0x0202)); public_tags.emplace("FractionGroupSummarySequence", Tag(0x3008, 0x0220)); public_tags.emplace("ReferencedFractionNumber", Tag(0x3008, 0x0223)); public_tags.emplace("FractionGroupType", Tag(0x3008, 0x0224)); public_tags.emplace("BeamStopperPosition", Tag(0x3008, 0x0230)); public_tags.emplace("FractionStatusSummarySequence", Tag(0x3008, 0x0240)); public_tags.emplace("TreatmentDate", Tag(0x3008, 0x0250)); public_tags.emplace("TreatmentTime", Tag(0x3008, 0x0251)); } } }odil-0.11.0/src/odil/registry_3008.h000066400000000000000000000132341362244656000167440ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3008 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3008 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const MeasuredDoseReferenceSequence(0x3008, 0x0010); Tag const MeasuredDoseDescription(0x3008, 0x0012); Tag const MeasuredDoseType(0x3008, 0x0014); Tag const MeasuredDoseValue(0x3008, 0x0016); Tag const TreatmentSessionBeamSequence(0x3008, 0x0020); Tag const TreatmentSessionIonBeamSequence(0x3008, 0x0021); Tag const CurrentFractionNumber(0x3008, 0x0022); Tag const TreatmentControlPointDate(0x3008, 0x0024); Tag const TreatmentControlPointTime(0x3008, 0x0025); Tag const TreatmentTerminationStatus(0x3008, 0x002a); Tag const TreatmentTerminationCode(0x3008, 0x002b); Tag const TreatmentVerificationStatus(0x3008, 0x002c); Tag const ReferencedTreatmentRecordSequence(0x3008, 0x0030); Tag const SpecifiedPrimaryMeterset(0x3008, 0x0032); Tag const SpecifiedSecondaryMeterset(0x3008, 0x0033); Tag const DeliveredPrimaryMeterset(0x3008, 0x0036); Tag const DeliveredSecondaryMeterset(0x3008, 0x0037); Tag const SpecifiedTreatmentTime(0x3008, 0x003a); Tag const DeliveredTreatmentTime(0x3008, 0x003b); Tag const ControlPointDeliverySequence(0x3008, 0x0040); Tag const IonControlPointDeliverySequence(0x3008, 0x0041); Tag const SpecifiedMeterset(0x3008, 0x0042); Tag const DeliveredMeterset(0x3008, 0x0044); Tag const MetersetRateSet(0x3008, 0x0045); Tag const MetersetRateDelivered(0x3008, 0x0046); Tag const ScanSpotMetersetsDelivered(0x3008, 0x0047); Tag const DoseRateDelivered(0x3008, 0x0048); Tag const TreatmentSummaryCalculatedDoseReferenceSequence(0x3008, 0x0050); Tag const CumulativeDoseToDoseReference(0x3008, 0x0052); Tag const FirstTreatmentDate(0x3008, 0x0054); Tag const MostRecentTreatmentDate(0x3008, 0x0056); Tag const NumberOfFractionsDelivered(0x3008, 0x005a); Tag const OverrideSequence(0x3008, 0x0060); Tag const ParameterSequencePointer(0x3008, 0x0061); Tag const OverrideParameterPointer(0x3008, 0x0062); Tag const ParameterItemIndex(0x3008, 0x0063); Tag const MeasuredDoseReferenceNumber(0x3008, 0x0064); Tag const ParameterPointer(0x3008, 0x0065); Tag const OverrideReason(0x3008, 0x0066); Tag const ParameterValueNumber(0x3008, 0x0067); Tag const CorrectedParameterSequence(0x3008, 0x0068); Tag const CorrectionValue(0x3008, 0x006a); Tag const CalculatedDoseReferenceSequence(0x3008, 0x0070); Tag const CalculatedDoseReferenceNumber(0x3008, 0x0072); Tag const CalculatedDoseReferenceDescription(0x3008, 0x0074); Tag const CalculatedDoseReferenceDoseValue(0x3008, 0x0076); Tag const StartMeterset(0x3008, 0x0078); Tag const EndMeterset(0x3008, 0x007a); Tag const ReferencedMeasuredDoseReferenceSequence(0x3008, 0x0080); Tag const ReferencedMeasuredDoseReferenceNumber(0x3008, 0x0082); Tag const ReferencedCalculatedDoseReferenceSequence(0x3008, 0x0090); Tag const ReferencedCalculatedDoseReferenceNumber(0x3008, 0x0092); Tag const BeamLimitingDeviceLeafPairsSequence(0x3008, 0x00a0); Tag const RecordedWedgeSequence(0x3008, 0x00b0); Tag const RecordedCompensatorSequence(0x3008, 0x00c0); Tag const RecordedBlockSequence(0x3008, 0x00d0); Tag const TreatmentSummaryMeasuredDoseReferenceSequence(0x3008, 0x00e0); Tag const RecordedSnoutSequence(0x3008, 0x00f0); Tag const RecordedRangeShifterSequence(0x3008, 0x00f2); Tag const RecordedLateralSpreadingDeviceSequence(0x3008, 0x00f4); Tag const RecordedRangeModulatorSequence(0x3008, 0x00f6); Tag const RecordedSourceSequence(0x3008, 0x0100); Tag const SourceSerialNumber(0x3008, 0x0105); Tag const TreatmentSessionApplicationSetupSequence(0x3008, 0x0110); Tag const ApplicationSetupCheck(0x3008, 0x0116); Tag const RecordedBrachyAccessoryDeviceSequence(0x3008, 0x0120); Tag const ReferencedBrachyAccessoryDeviceNumber(0x3008, 0x0122); Tag const RecordedChannelSequence(0x3008, 0x0130); Tag const SpecifiedChannelTotalTime(0x3008, 0x0132); Tag const DeliveredChannelTotalTime(0x3008, 0x0134); Tag const SpecifiedNumberOfPulses(0x3008, 0x0136); Tag const DeliveredNumberOfPulses(0x3008, 0x0138); Tag const SpecifiedPulseRepetitionInterval(0x3008, 0x013a); Tag const DeliveredPulseRepetitionInterval(0x3008, 0x013c); Tag const RecordedSourceApplicatorSequence(0x3008, 0x0140); Tag const ReferencedSourceApplicatorNumber(0x3008, 0x0142); Tag const RecordedChannelShieldSequence(0x3008, 0x0150); Tag const ReferencedChannelShieldNumber(0x3008, 0x0152); Tag const BrachyControlPointDeliveredSequence(0x3008, 0x0160); Tag const SafePositionExitDate(0x3008, 0x0162); Tag const SafePositionExitTime(0x3008, 0x0164); Tag const SafePositionReturnDate(0x3008, 0x0166); Tag const SafePositionReturnTime(0x3008, 0x0168); Tag const PulseSpecificBrachyControlPointDeliveredSequence(0x3008, 0x0171); Tag const PulseNumber(0x3008, 0x0172); Tag const BrachyPulseControlPointDeliveredSequence(0x3008, 0x0173); Tag const CurrentTreatmentStatus(0x3008, 0x0200); Tag const TreatmentStatusComment(0x3008, 0x0202); Tag const FractionGroupSummarySequence(0x3008, 0x0220); Tag const ReferencedFractionNumber(0x3008, 0x0223); Tag const FractionGroupType(0x3008, 0x0224); Tag const BeamStopperPosition(0x3008, 0x0230); Tag const FractionStatusSummarySequence(0x3008, 0x0240); Tag const TreatmentDate(0x3008, 0x0250); Tag const TreatmentTime(0x3008, 0x0251); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3008odil-0.11.0/src/odil/registry_300a.cpp000066400000000000000000003536361362244656000173650ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_300a( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x300a, 0x0002), ElementsDictionaryEntry("RT Plan Label", "RTPlanLabel", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0003), ElementsDictionaryEntry("RT Plan Name", "RTPlanName", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0004), ElementsDictionaryEntry("RT Plan Description", "RTPlanDescription", "ST", "1")); public_dictionary.emplace(Tag(0x300a, 0x0006), ElementsDictionaryEntry("RT Plan Date", "RTPlanDate", "DA", "1")); public_dictionary.emplace(Tag(0x300a, 0x0007), ElementsDictionaryEntry("RT Plan Time", "RTPlanTime", "TM", "1")); public_dictionary.emplace(Tag(0x300a, 0x0009), ElementsDictionaryEntry("Treatment Protocols", "TreatmentProtocols", "LO", "1-n")); public_dictionary.emplace(Tag(0x300a, 0x000a), ElementsDictionaryEntry("Plan Intent", "PlanIntent", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x000b), ElementsDictionaryEntry("Treatment Sites", "TreatmentSites", "LO", "1-n")); public_dictionary.emplace(Tag(0x300a, 0x000c), ElementsDictionaryEntry("RT Plan Geometry", "RTPlanGeometry", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x000e), ElementsDictionaryEntry("Prescription Description", "PrescriptionDescription", "ST", "1")); public_dictionary.emplace(Tag(0x300a, 0x0010), ElementsDictionaryEntry("Dose Reference Sequence", "DoseReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0012), ElementsDictionaryEntry("Dose Reference Number", "DoseReferenceNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0013), ElementsDictionaryEntry("Dose Reference UID", "DoseReferenceUID", "UI", "1")); public_dictionary.emplace(Tag(0x300a, 0x0014), ElementsDictionaryEntry("Dose Reference Structure Type", "DoseReferenceStructureType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0015), ElementsDictionaryEntry("Nominal Beam Energy Unit", "NominalBeamEnergyUnit", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0016), ElementsDictionaryEntry("Dose Reference Description", "DoseReferenceDescription", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0018), ElementsDictionaryEntry("Dose Reference Point Coordinates", "DoseReferencePointCoordinates", "DS", "3")); public_dictionary.emplace(Tag(0x300a, 0x001a), ElementsDictionaryEntry("Nominal Prior Dose", "NominalPriorDose", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0020), ElementsDictionaryEntry("Dose Reference Type", "DoseReferenceType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0021), ElementsDictionaryEntry("Constraint Weight", "ConstraintWeight", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0022), ElementsDictionaryEntry("Delivery Warning Dose", "DeliveryWarningDose", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0023), ElementsDictionaryEntry("Delivery Maximum Dose", "DeliveryMaximumDose", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0025), ElementsDictionaryEntry("Target Minimum Dose", "TargetMinimumDose", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0026), ElementsDictionaryEntry("Target Prescription Dose", "TargetPrescriptionDose", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0027), ElementsDictionaryEntry("Target Maximum Dose", "TargetMaximumDose", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0028), ElementsDictionaryEntry("Target Underdose Volume Fraction", "TargetUnderdoseVolumeFraction", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x002a), ElementsDictionaryEntry("Organ at Risk Full-volume Dose", "OrganAtRiskFullVolumeDose", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x002b), ElementsDictionaryEntry("Organ at Risk Limit Dose", "OrganAtRiskLimitDose", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x002c), ElementsDictionaryEntry("Organ at Risk Maximum Dose", "OrganAtRiskMaximumDose", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x002d), ElementsDictionaryEntry("Organ at Risk Overdose Volume Fraction", "OrganAtRiskOverdoseVolumeFraction", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0040), ElementsDictionaryEntry("Tolerance Table Sequence", "ToleranceTableSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0042), ElementsDictionaryEntry("Tolerance Table Number", "ToleranceTableNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0043), ElementsDictionaryEntry("Tolerance Table Label", "ToleranceTableLabel", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0044), ElementsDictionaryEntry("Gantry Angle Tolerance", "GantryAngleTolerance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0046), ElementsDictionaryEntry("Beam Limiting Device Angle Tolerance", "BeamLimitingDeviceAngleTolerance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0048), ElementsDictionaryEntry("Beam Limiting Device Tolerance Sequence", "BeamLimitingDeviceToleranceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x004a), ElementsDictionaryEntry("Beam Limiting Device Position Tolerance", "BeamLimitingDevicePositionTolerance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x004b), ElementsDictionaryEntry("Snout Position Tolerance", "SnoutPositionTolerance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x004c), ElementsDictionaryEntry("Patient Support Angle Tolerance", "PatientSupportAngleTolerance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x004e), ElementsDictionaryEntry("Table Top Eccentric Angle Tolerance", "TableTopEccentricAngleTolerance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x004f), ElementsDictionaryEntry("Table Top Pitch Angle Tolerance", "TableTopPitchAngleTolerance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0050), ElementsDictionaryEntry("Table Top Roll Angle Tolerance", "TableTopRollAngleTolerance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0051), ElementsDictionaryEntry("Table Top Vertical Position Tolerance", "TableTopVerticalPositionTolerance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0052), ElementsDictionaryEntry("Table Top Longitudinal Position Tolerance", "TableTopLongitudinalPositionTolerance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0053), ElementsDictionaryEntry("Table Top Lateral Position Tolerance", "TableTopLateralPositionTolerance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0055), ElementsDictionaryEntry("RT Plan Relationship", "RTPlanRelationship", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0070), ElementsDictionaryEntry("Fraction Group Sequence", "FractionGroupSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0071), ElementsDictionaryEntry("Fraction Group Number", "FractionGroupNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0072), ElementsDictionaryEntry("Fraction Group Description", "FractionGroupDescription", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0078), ElementsDictionaryEntry("Number of Fractions Planned", "NumberOfFractionsPlanned", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0079), ElementsDictionaryEntry("Number of Fraction Pattern Digits Per Day", "NumberOfFractionPatternDigitsPerDay", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x007a), ElementsDictionaryEntry("Repeat Fraction Cycle Length", "RepeatFractionCycleLength", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x007b), ElementsDictionaryEntry("Fraction Pattern", "FractionPattern", "LT", "1")); public_dictionary.emplace(Tag(0x300a, 0x0080), ElementsDictionaryEntry("Number of Beams", "NumberOfBeams", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0082), ElementsDictionaryEntry("Beam Dose Specification Point", "BeamDoseSpecificationPoint", "DS", "3")); public_dictionary.emplace(Tag(0x300a, 0x0083), ElementsDictionaryEntry("Referenced Dose Reference UID", "ReferencedDoseReferenceUID", "UI", "1")); public_dictionary.emplace(Tag(0x300a, 0x0084), ElementsDictionaryEntry("Beam Dose", "BeamDose", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0086), ElementsDictionaryEntry("Beam Meterset", "BeamMeterset", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0088), ElementsDictionaryEntry("Beam Dose Point Depth", "BeamDosePointDepth", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0089), ElementsDictionaryEntry("Beam Dose Point Equivalent Depth", "BeamDosePointEquivalentDepth", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x008a), ElementsDictionaryEntry("Beam Dose Point SSD", "BeamDosePointSSD", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x008b), ElementsDictionaryEntry("Beam Dose Meaning", "BeamDoseMeaning", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x008c), ElementsDictionaryEntry("Beam Dose Verification Control Point Sequence", "BeamDoseVerificationControlPointSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x008d), ElementsDictionaryEntry("Average Beam Dose Point Depth", "AverageBeamDosePointDepth", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x008e), ElementsDictionaryEntry("Average Beam Dose Point Equivalent Depth", "AverageBeamDosePointEquivalentDepth", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x008f), ElementsDictionaryEntry("Average Beam Dose Point SSD", "AverageBeamDosePointSSD", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0090), ElementsDictionaryEntry("Beam Dose Type", "BeamDoseType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0091), ElementsDictionaryEntry("Alternate Beam Dose", "AlternateBeamDose", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0092), ElementsDictionaryEntry("Alternate Beam Dose Type", "AlternateBeamDoseType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0093), ElementsDictionaryEntry("Depth Value Averaging Flag", "DepthValueAveragingFlag", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0094), ElementsDictionaryEntry("Beam Dose Point Source to External Contour Distance", "BeamDosePointSourceToExternalContourDistance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00a0), ElementsDictionaryEntry("Number of Brachy Application Setups", "NumberOfBrachyApplicationSetups", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00a2), ElementsDictionaryEntry("Brachy Application Setup Dose Specification Point", "BrachyApplicationSetupDoseSpecificationPoint", "DS", "3")); public_dictionary.emplace(Tag(0x300a, 0x00a4), ElementsDictionaryEntry("Brachy Application Setup Dose", "BrachyApplicationSetupDose", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00b0), ElementsDictionaryEntry("Beam Sequence", "BeamSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x00b2), ElementsDictionaryEntry("Treatment Machine Name", "TreatmentMachineName", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x00b3), ElementsDictionaryEntry("Primary Dosimeter Unit", "PrimaryDosimeterUnit", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00b4), ElementsDictionaryEntry("Source-Axis Distance", "SourceAxisDistance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00b6), ElementsDictionaryEntry("Beam Limiting Device Sequence", "BeamLimitingDeviceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x00b8), ElementsDictionaryEntry("RT Beam Limiting Device Type", "RTBeamLimitingDeviceType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00ba), ElementsDictionaryEntry("Source to Beam Limiting Device Distance", "SourceToBeamLimitingDeviceDistance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00bb), ElementsDictionaryEntry("Isocenter to Beam Limiting Device Distance", "IsocenterToBeamLimitingDeviceDistance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x00bc), ElementsDictionaryEntry("Number of Leaf/Jaw Pairs", "NumberOfLeafJawPairs", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00be), ElementsDictionaryEntry("Leaf Position Boundaries", "LeafPositionBoundaries", "DS", "3-n")); public_dictionary.emplace(Tag(0x300a, 0x00c0), ElementsDictionaryEntry("Beam Number", "BeamNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00c2), ElementsDictionaryEntry("Beam Name", "BeamName", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x00c3), ElementsDictionaryEntry("Beam Description", "BeamDescription", "ST", "1")); public_dictionary.emplace(Tag(0x300a, 0x00c4), ElementsDictionaryEntry("Beam Type", "BeamType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00c5), ElementsDictionaryEntry("Beam Delivery Duration Limit", "BeamDeliveryDurationLimit", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x00c6), ElementsDictionaryEntry("Radiation Type", "RadiationType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00c7), ElementsDictionaryEntry("High-Dose Technique Type", "HighDoseTechniqueType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00c8), ElementsDictionaryEntry("Reference Image Number", "ReferenceImageNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00ca), ElementsDictionaryEntry("Planned Verification Image Sequence", "PlannedVerificationImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x00cc), ElementsDictionaryEntry("Imaging Device-Specific Acquisition Parameters", "ImagingDeviceSpecificAcquisitionParameters", "LO", "1-n")); public_dictionary.emplace(Tag(0x300a, 0x00ce), ElementsDictionaryEntry("Treatment Delivery Type", "TreatmentDeliveryType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00d0), ElementsDictionaryEntry("Number of Wedges", "NumberOfWedges", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00d1), ElementsDictionaryEntry("Wedge Sequence", "WedgeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x00d2), ElementsDictionaryEntry("Wedge Number", "WedgeNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00d3), ElementsDictionaryEntry("Wedge Type", "WedgeType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00d4), ElementsDictionaryEntry("Wedge ID", "WedgeID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x00d5), ElementsDictionaryEntry("Wedge Angle", "WedgeAngle", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00d6), ElementsDictionaryEntry("Wedge Factor", "WedgeFactor", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00d7), ElementsDictionaryEntry("Total Wedge Tray Water-Equivalent Thickness", "TotalWedgeTrayWaterEquivalentThickness", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x00d8), ElementsDictionaryEntry("Wedge Orientation", "WedgeOrientation", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00d9), ElementsDictionaryEntry("Isocenter to Wedge Tray Distance", "IsocenterToWedgeTrayDistance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x00da), ElementsDictionaryEntry("Source to Wedge Tray Distance", "SourceToWedgeTrayDistance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00db), ElementsDictionaryEntry("Wedge Thin Edge Position", "WedgeThinEdgePosition", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x00dc), ElementsDictionaryEntry("Bolus ID", "BolusID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x00dd), ElementsDictionaryEntry("Bolus Description", "BolusDescription", "ST", "1")); public_dictionary.emplace(Tag(0x300a, 0x00de), ElementsDictionaryEntry("Effective Wedge Angle", "EffectiveWedgeAngle", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00e0), ElementsDictionaryEntry("Number of Compensators", "NumberOfCompensators", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00e1), ElementsDictionaryEntry("Material ID", "MaterialID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x00e2), ElementsDictionaryEntry("Total Compensator Tray Factor", "TotalCompensatorTrayFactor", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00e3), ElementsDictionaryEntry("Compensator Sequence", "CompensatorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x00e4), ElementsDictionaryEntry("Compensator Number", "CompensatorNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00e5), ElementsDictionaryEntry("Compensator ID", "CompensatorID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x00e6), ElementsDictionaryEntry("Source to Compensator Tray Distance", "SourceToCompensatorTrayDistance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00e7), ElementsDictionaryEntry("Compensator Rows", "CompensatorRows", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00e8), ElementsDictionaryEntry("Compensator Columns", "CompensatorColumns", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00e9), ElementsDictionaryEntry("Compensator Pixel Spacing", "CompensatorPixelSpacing", "DS", "2")); public_dictionary.emplace(Tag(0x300a, 0x00ea), ElementsDictionaryEntry("Compensator Position", "CompensatorPosition", "DS", "2")); public_dictionary.emplace(Tag(0x300a, 0x00eb), ElementsDictionaryEntry("Compensator Transmission Data", "CompensatorTransmissionData", "DS", "1-n")); public_dictionary.emplace(Tag(0x300a, 0x00ec), ElementsDictionaryEntry("Compensator Thickness Data", "CompensatorThicknessData", "DS", "1-n")); public_dictionary.emplace(Tag(0x300a, 0x00ed), ElementsDictionaryEntry("Number of Boli", "NumberOfBoli", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00ee), ElementsDictionaryEntry("Compensator Type", "CompensatorType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00ef), ElementsDictionaryEntry("Compensator Tray ID", "CompensatorTrayID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x00f0), ElementsDictionaryEntry("Number of Blocks", "NumberOfBlocks", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00f2), ElementsDictionaryEntry("Total Block Tray Factor", "TotalBlockTrayFactor", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00f3), ElementsDictionaryEntry("Total Block Tray Water-Equivalent Thickness", "TotalBlockTrayWaterEquivalentThickness", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x00f4), ElementsDictionaryEntry("Block Sequence", "BlockSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x00f5), ElementsDictionaryEntry("Block Tray ID", "BlockTrayID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x00f6), ElementsDictionaryEntry("Source to Block Tray Distance", "SourceToBlockTrayDistance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00f7), ElementsDictionaryEntry("Isocenter to Block Tray Distance", "IsocenterToBlockTrayDistance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x00f8), ElementsDictionaryEntry("Block Type", "BlockType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00f9), ElementsDictionaryEntry("Accessory Code", "AccessoryCode", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x00fa), ElementsDictionaryEntry("Block Divergence", "BlockDivergence", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00fb), ElementsDictionaryEntry("Block Mounting Position", "BlockMountingPosition", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00fc), ElementsDictionaryEntry("Block Number", "BlockNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x00fe), ElementsDictionaryEntry("Block Name", "BlockName", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0100), ElementsDictionaryEntry("Block Thickness", "BlockThickness", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0102), ElementsDictionaryEntry("Block Transmission", "BlockTransmission", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0104), ElementsDictionaryEntry("Block Number of Points", "BlockNumberOfPoints", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0106), ElementsDictionaryEntry("Block Data", "BlockData", "DS", "2-2n")); public_dictionary.emplace(Tag(0x300a, 0x0107), ElementsDictionaryEntry("Applicator Sequence", "ApplicatorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0108), ElementsDictionaryEntry("Applicator ID", "ApplicatorID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0109), ElementsDictionaryEntry("Applicator Type", "ApplicatorType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x010a), ElementsDictionaryEntry("Applicator Description", "ApplicatorDescription", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x010c), ElementsDictionaryEntry("Cumulative Dose Reference Coefficient", "CumulativeDoseReferenceCoefficient", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x010e), ElementsDictionaryEntry("Final Cumulative Meterset Weight", "FinalCumulativeMetersetWeight", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0110), ElementsDictionaryEntry("Number of Control Points", "NumberOfControlPoints", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0111), ElementsDictionaryEntry("Control Point Sequence", "ControlPointSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0112), ElementsDictionaryEntry("Control Point Index", "ControlPointIndex", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0114), ElementsDictionaryEntry("Nominal Beam Energy", "NominalBeamEnergy", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0115), ElementsDictionaryEntry("Dose Rate Set", "DoseRateSet", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0116), ElementsDictionaryEntry("Wedge Position Sequence", "WedgePositionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0118), ElementsDictionaryEntry("Wedge Position", "WedgePosition", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x011a), ElementsDictionaryEntry("Beam Limiting Device Position Sequence", "BeamLimitingDevicePositionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x011c), ElementsDictionaryEntry("Leaf/Jaw Positions", "LeafJawPositions", "DS", "2-2n")); public_dictionary.emplace(Tag(0x300a, 0x011e), ElementsDictionaryEntry("Gantry Angle", "GantryAngle", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x011f), ElementsDictionaryEntry("Gantry Rotation Direction", "GantryRotationDirection", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0120), ElementsDictionaryEntry("Beam Limiting Device Angle", "BeamLimitingDeviceAngle", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0121), ElementsDictionaryEntry("Beam Limiting Device Rotation Direction", "BeamLimitingDeviceRotationDirection", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0122), ElementsDictionaryEntry("Patient Support Angle", "PatientSupportAngle", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0123), ElementsDictionaryEntry("Patient Support Rotation Direction", "PatientSupportRotationDirection", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0124), ElementsDictionaryEntry("Table Top Eccentric Axis Distance", "TableTopEccentricAxisDistance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0125), ElementsDictionaryEntry("Table Top Eccentric Angle", "TableTopEccentricAngle", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0126), ElementsDictionaryEntry("Table Top Eccentric Rotation Direction", "TableTopEccentricRotationDirection", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0128), ElementsDictionaryEntry("Table Top Vertical Position", "TableTopVerticalPosition", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0129), ElementsDictionaryEntry("Table Top Longitudinal Position", "TableTopLongitudinalPosition", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x012a), ElementsDictionaryEntry("Table Top Lateral Position", "TableTopLateralPosition", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x012c), ElementsDictionaryEntry("Isocenter Position", "IsocenterPosition", "DS", "3")); public_dictionary.emplace(Tag(0x300a, 0x012e), ElementsDictionaryEntry("Surface Entry Point", "SurfaceEntryPoint", "DS", "3")); public_dictionary.emplace(Tag(0x300a, 0x0130), ElementsDictionaryEntry("Source to Surface Distance", "SourceToSurfaceDistance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0131), ElementsDictionaryEntry("Average Beam Dose Point Source to External Contour Distance", "AverageBeamDosePointSourceToExternalContourDistance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0132), ElementsDictionaryEntry("Source to External Contour Distance", "SourceToExternalContourDistance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0133), ElementsDictionaryEntry("External Contour Entry Point", "ExternalContourEntryPoint", "FL", "3")); public_dictionary.emplace(Tag(0x300a, 0x0134), ElementsDictionaryEntry("Cumulative Meterset Weight", "CumulativeMetersetWeight", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0140), ElementsDictionaryEntry("Table Top Pitch Angle", "TableTopPitchAngle", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0142), ElementsDictionaryEntry("Table Top Pitch Rotation Direction", "TableTopPitchRotationDirection", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0144), ElementsDictionaryEntry("Table Top Roll Angle", "TableTopRollAngle", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0146), ElementsDictionaryEntry("Table Top Roll Rotation Direction", "TableTopRollRotationDirection", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0148), ElementsDictionaryEntry("Head Fixation Angle", "HeadFixationAngle", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x014a), ElementsDictionaryEntry("Gantry Pitch Angle", "GantryPitchAngle", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x014c), ElementsDictionaryEntry("Gantry Pitch Rotation Direction", "GantryPitchRotationDirection", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x014e), ElementsDictionaryEntry("Gantry Pitch Angle Tolerance", "GantryPitchAngleTolerance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0150), ElementsDictionaryEntry("Fixation Eye", "FixationEye", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0151), ElementsDictionaryEntry("Chair Head Frame Position", "ChairHeadFramePosition", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0152), ElementsDictionaryEntry("Head Fixation Angle Tolerance", "HeadFixationAngleTolerance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0153), ElementsDictionaryEntry("Chair Head Frame Position Tolerance", "ChairHeadFramePositionTolerance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0154), ElementsDictionaryEntry("Fixation Light Azimuthal Angle Tolerance", "FixationLightAzimuthalAngleTolerance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0155), ElementsDictionaryEntry("Fixation Light Polar Angle Tolerance", "FixationLightPolarAngleTolerance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0180), ElementsDictionaryEntry("Patient Setup Sequence", "PatientSetupSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0182), ElementsDictionaryEntry("Patient Setup Number", "PatientSetupNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0183), ElementsDictionaryEntry("Patient Setup Label", "PatientSetupLabel", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0184), ElementsDictionaryEntry("Patient Additional Position", "PatientAdditionalPosition", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0190), ElementsDictionaryEntry("Fixation Device Sequence", "FixationDeviceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0192), ElementsDictionaryEntry("Fixation Device Type", "FixationDeviceType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0194), ElementsDictionaryEntry("Fixation Device Label", "FixationDeviceLabel", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0196), ElementsDictionaryEntry("Fixation Device Description", "FixationDeviceDescription", "ST", "1")); public_dictionary.emplace(Tag(0x300a, 0x0198), ElementsDictionaryEntry("Fixation Device Position", "FixationDevicePosition", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0199), ElementsDictionaryEntry("Fixation Device Pitch Angle", "FixationDevicePitchAngle", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x019a), ElementsDictionaryEntry("Fixation Device Roll Angle", "FixationDeviceRollAngle", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x01a0), ElementsDictionaryEntry("Shielding Device Sequence", "ShieldingDeviceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x01a2), ElementsDictionaryEntry("Shielding Device Type", "ShieldingDeviceType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x01a4), ElementsDictionaryEntry("Shielding Device Label", "ShieldingDeviceLabel", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x01a6), ElementsDictionaryEntry("Shielding Device Description", "ShieldingDeviceDescription", "ST", "1")); public_dictionary.emplace(Tag(0x300a, 0x01a8), ElementsDictionaryEntry("Shielding Device Position", "ShieldingDevicePosition", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x01b0), ElementsDictionaryEntry("Setup Technique", "SetupTechnique", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x01b2), ElementsDictionaryEntry("Setup Technique Description", "SetupTechniqueDescription", "ST", "1")); public_dictionary.emplace(Tag(0x300a, 0x01b4), ElementsDictionaryEntry("Setup Device Sequence", "SetupDeviceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x01b6), ElementsDictionaryEntry("Setup Device Type", "SetupDeviceType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x01b8), ElementsDictionaryEntry("Setup Device Label", "SetupDeviceLabel", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x01ba), ElementsDictionaryEntry("Setup Device Description", "SetupDeviceDescription", "ST", "1")); public_dictionary.emplace(Tag(0x300a, 0x01bc), ElementsDictionaryEntry("Setup Device Parameter", "SetupDeviceParameter", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x01d0), ElementsDictionaryEntry("Setup Reference Description", "SetupReferenceDescription", "ST", "1")); public_dictionary.emplace(Tag(0x300a, 0x01d2), ElementsDictionaryEntry("Table Top Vertical Setup Displacement", "TableTopVerticalSetupDisplacement", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x01d4), ElementsDictionaryEntry("Table Top Longitudinal Setup Displacement", "TableTopLongitudinalSetupDisplacement", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x01d6), ElementsDictionaryEntry("Table Top Lateral Setup Displacement", "TableTopLateralSetupDisplacement", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0200), ElementsDictionaryEntry("Brachy Treatment Technique", "BrachyTreatmentTechnique", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0202), ElementsDictionaryEntry("Brachy Treatment Type", "BrachyTreatmentType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0206), ElementsDictionaryEntry("Treatment Machine Sequence", "TreatmentMachineSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0210), ElementsDictionaryEntry("Source Sequence", "SourceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0212), ElementsDictionaryEntry("Source Number", "SourceNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0214), ElementsDictionaryEntry("Source Type", "SourceType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0216), ElementsDictionaryEntry("Source Manufacturer", "SourceManufacturer", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0218), ElementsDictionaryEntry("Active Source Diameter", "ActiveSourceDiameter", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x021a), ElementsDictionaryEntry("Active Source Length", "ActiveSourceLength", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x021b), ElementsDictionaryEntry("Source Model ID", "SourceModelID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x021c), ElementsDictionaryEntry("Source Description", "SourceDescription", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0222), ElementsDictionaryEntry("Source Encapsulation Nominal Thickness", "SourceEncapsulationNominalThickness", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0224), ElementsDictionaryEntry("Source Encapsulation Nominal Transmission", "SourceEncapsulationNominalTransmission", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0226), ElementsDictionaryEntry("Source Isotope Name", "SourceIsotopeName", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0228), ElementsDictionaryEntry("Source Isotope Half Life", "SourceIsotopeHalfLife", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0229), ElementsDictionaryEntry("Source Strength Units", "SourceStrengthUnits", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x022a), ElementsDictionaryEntry("Reference Air Kerma Rate", "ReferenceAirKermaRate", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x022b), ElementsDictionaryEntry("Source Strength", "SourceStrength", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x022c), ElementsDictionaryEntry("Source Strength Reference Date", "SourceStrengthReferenceDate", "DA", "1")); public_dictionary.emplace(Tag(0x300a, 0x022e), ElementsDictionaryEntry("Source Strength Reference Time", "SourceStrengthReferenceTime", "TM", "1")); public_dictionary.emplace(Tag(0x300a, 0x0230), ElementsDictionaryEntry("Application Setup Sequence", "ApplicationSetupSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0232), ElementsDictionaryEntry("Application Setup Type", "ApplicationSetupType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0234), ElementsDictionaryEntry("Application Setup Number", "ApplicationSetupNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0236), ElementsDictionaryEntry("Application Setup Name", "ApplicationSetupName", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0238), ElementsDictionaryEntry("Application Setup Manufacturer", "ApplicationSetupManufacturer", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0240), ElementsDictionaryEntry("Template Number", "TemplateNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0242), ElementsDictionaryEntry("Template Type", "TemplateType", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0244), ElementsDictionaryEntry("Template Name", "TemplateName", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0250), ElementsDictionaryEntry("Total Reference Air Kerma", "TotalReferenceAirKerma", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0260), ElementsDictionaryEntry("Brachy Accessory Device Sequence", "BrachyAccessoryDeviceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0262), ElementsDictionaryEntry("Brachy Accessory Device Number", "BrachyAccessoryDeviceNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0263), ElementsDictionaryEntry("Brachy Accessory Device ID", "BrachyAccessoryDeviceID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0264), ElementsDictionaryEntry("Brachy Accessory Device Type", "BrachyAccessoryDeviceType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0266), ElementsDictionaryEntry("Brachy Accessory Device Name", "BrachyAccessoryDeviceName", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x026a), ElementsDictionaryEntry("Brachy Accessory Device Nominal Thickness", "BrachyAccessoryDeviceNominalThickness", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x026c), ElementsDictionaryEntry("Brachy Accessory Device Nominal Transmission", "BrachyAccessoryDeviceNominalTransmission", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0271), ElementsDictionaryEntry("Channel Effective Length", "ChannelEffectiveLength", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0272), ElementsDictionaryEntry("Channel Inner Length", "ChannelInnerLength", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0273), ElementsDictionaryEntry("Afterloader Channel ID", "AfterloaderChannelID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0274), ElementsDictionaryEntry("Source Applicator Tip Length", "SourceApplicatorTipLength", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0280), ElementsDictionaryEntry("Channel Sequence", "ChannelSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0282), ElementsDictionaryEntry("Channel Number", "ChannelNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0284), ElementsDictionaryEntry("Channel Length", "ChannelLength", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0286), ElementsDictionaryEntry("Channel Total Time", "ChannelTotalTime", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0288), ElementsDictionaryEntry("Source Movement Type", "SourceMovementType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x028a), ElementsDictionaryEntry("Number of Pulses", "NumberOfPulses", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x028c), ElementsDictionaryEntry("Pulse Repetition Interval", "PulseRepetitionInterval", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0290), ElementsDictionaryEntry("Source Applicator Number", "SourceApplicatorNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0291), ElementsDictionaryEntry("Source Applicator ID", "SourceApplicatorID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0292), ElementsDictionaryEntry("Source Applicator Type", "SourceApplicatorType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0294), ElementsDictionaryEntry("Source Applicator Name", "SourceApplicatorName", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0296), ElementsDictionaryEntry("Source Applicator Length", "SourceApplicatorLength", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0298), ElementsDictionaryEntry("Source Applicator Manufacturer", "SourceApplicatorManufacturer", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x029c), ElementsDictionaryEntry("Source Applicator Wall Nominal Thickness", "SourceApplicatorWallNominalThickness", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x029e), ElementsDictionaryEntry("Source Applicator Wall Nominal Transmission", "SourceApplicatorWallNominalTransmission", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x02a0), ElementsDictionaryEntry("Source Applicator Step Size", "SourceApplicatorStepSize", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x02a2), ElementsDictionaryEntry("Transfer Tube Number", "TransferTubeNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x02a4), ElementsDictionaryEntry("Transfer Tube Length", "TransferTubeLength", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x02b0), ElementsDictionaryEntry("Channel Shield Sequence", "ChannelShieldSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x02b2), ElementsDictionaryEntry("Channel Shield Number", "ChannelShieldNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x02b3), ElementsDictionaryEntry("Channel Shield ID", "ChannelShieldID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x02b4), ElementsDictionaryEntry("Channel Shield Name", "ChannelShieldName", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x02b8), ElementsDictionaryEntry("Channel Shield Nominal Thickness", "ChannelShieldNominalThickness", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x02ba), ElementsDictionaryEntry("Channel Shield Nominal Transmission", "ChannelShieldNominalTransmission", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x02c8), ElementsDictionaryEntry("Final Cumulative Time Weight", "FinalCumulativeTimeWeight", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x02d0), ElementsDictionaryEntry("Brachy Control Point Sequence", "BrachyControlPointSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x02d2), ElementsDictionaryEntry("Control Point Relative Position", "ControlPointRelativePosition", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x02d4), ElementsDictionaryEntry("Control Point 3D Position", "ControlPoint3DPosition", "DS", "3")); public_dictionary.emplace(Tag(0x300a, 0x02d6), ElementsDictionaryEntry("Cumulative Time Weight", "CumulativeTimeWeight", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x02e0), ElementsDictionaryEntry("Compensator Divergence", "CompensatorDivergence", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x02e1), ElementsDictionaryEntry("Compensator Mounting Position", "CompensatorMountingPosition", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x02e2), ElementsDictionaryEntry("Source to Compensator Distance", "SourceToCompensatorDistance", "DS", "1-n")); public_dictionary.emplace(Tag(0x300a, 0x02e3), ElementsDictionaryEntry("Total Compensator Tray Water-Equivalent Thickness", "TotalCompensatorTrayWaterEquivalentThickness", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x02e4), ElementsDictionaryEntry("Isocenter to Compensator Tray Distance", "IsocenterToCompensatorTrayDistance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x02e5), ElementsDictionaryEntry("Compensator Column Offset", "CompensatorColumnOffset", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x02e6), ElementsDictionaryEntry("Isocenter to Compensator Distances", "IsocenterToCompensatorDistances", "FL", "1-n")); public_dictionary.emplace(Tag(0x300a, 0x02e7), ElementsDictionaryEntry("Compensator Relative Stopping Power Ratio", "CompensatorRelativeStoppingPowerRatio", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x02e8), ElementsDictionaryEntry("Compensator Milling Tool Diameter", "CompensatorMillingToolDiameter", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x02ea), ElementsDictionaryEntry("Ion Range Compensator Sequence", "IonRangeCompensatorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x02eb), ElementsDictionaryEntry("Compensator Description", "CompensatorDescription", "LT", "1")); public_dictionary.emplace(Tag(0x300a, 0x0302), ElementsDictionaryEntry("Radiation Mass Number", "RadiationMassNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0304), ElementsDictionaryEntry("Radiation Atomic Number", "RadiationAtomicNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0306), ElementsDictionaryEntry("Radiation Charge State", "RadiationChargeState", "SS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0308), ElementsDictionaryEntry("Scan Mode", "ScanMode", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0309), ElementsDictionaryEntry("Modulated Scan Mode Type", "ModulatedScanModeType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x030a), ElementsDictionaryEntry("Virtual Source-Axis Distances", "VirtualSourceAxisDistances", "FL", "2")); public_dictionary.emplace(Tag(0x300a, 0x030c), ElementsDictionaryEntry("Snout Sequence", "SnoutSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x030d), ElementsDictionaryEntry("Snout Position", "SnoutPosition", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x030f), ElementsDictionaryEntry("Snout ID", "SnoutID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0312), ElementsDictionaryEntry("Number of Range Shifters", "NumberOfRangeShifters", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0314), ElementsDictionaryEntry("Range Shifter Sequence", "RangeShifterSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0316), ElementsDictionaryEntry("Range Shifter Number", "RangeShifterNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0318), ElementsDictionaryEntry("Range Shifter ID", "RangeShifterID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0320), ElementsDictionaryEntry("Range Shifter Type", "RangeShifterType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0322), ElementsDictionaryEntry("Range Shifter Description", "RangeShifterDescription", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0330), ElementsDictionaryEntry("Number of Lateral Spreading Devices", "NumberOfLateralSpreadingDevices", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0332), ElementsDictionaryEntry("Lateral Spreading Device Sequence", "LateralSpreadingDeviceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0334), ElementsDictionaryEntry("Lateral Spreading Device Number", "LateralSpreadingDeviceNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0336), ElementsDictionaryEntry("Lateral Spreading Device ID", "LateralSpreadingDeviceID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0338), ElementsDictionaryEntry("Lateral Spreading Device Type", "LateralSpreadingDeviceType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x033a), ElementsDictionaryEntry("Lateral Spreading Device Description", "LateralSpreadingDeviceDescription", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x033c), ElementsDictionaryEntry("Lateral Spreading Device Water Equivalent Thickness", "LateralSpreadingDeviceWaterEquivalentThickness", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0340), ElementsDictionaryEntry("Number of Range Modulators", "NumberOfRangeModulators", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0342), ElementsDictionaryEntry("Range Modulator Sequence", "RangeModulatorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0344), ElementsDictionaryEntry("Range Modulator Number", "RangeModulatorNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0346), ElementsDictionaryEntry("Range Modulator ID", "RangeModulatorID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0348), ElementsDictionaryEntry("Range Modulator Type", "RangeModulatorType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x034a), ElementsDictionaryEntry("Range Modulator Description", "RangeModulatorDescription", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x034c), ElementsDictionaryEntry("Beam Current Modulation ID", "BeamCurrentModulationID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0350), ElementsDictionaryEntry("Patient Support Type", "PatientSupportType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0352), ElementsDictionaryEntry("Patient Support ID", "PatientSupportID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0354), ElementsDictionaryEntry("Patient Support Accessory Code", "PatientSupportAccessoryCode", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0355), ElementsDictionaryEntry("Tray Accessory Code", "TrayAccessoryCode", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0356), ElementsDictionaryEntry("Fixation Light Azimuthal Angle", "FixationLightAzimuthalAngle", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0358), ElementsDictionaryEntry("Fixation Light Polar Angle", "FixationLightPolarAngle", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x035a), ElementsDictionaryEntry("Meterset Rate", "MetersetRate", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0360), ElementsDictionaryEntry("Range Shifter Settings Sequence", "RangeShifterSettingsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0362), ElementsDictionaryEntry("Range Shifter Setting", "RangeShifterSetting", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0364), ElementsDictionaryEntry("Isocenter to Range Shifter Distance", "IsocenterToRangeShifterDistance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0366), ElementsDictionaryEntry("Range Shifter Water Equivalent Thickness", "RangeShifterWaterEquivalentThickness", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0370), ElementsDictionaryEntry("Lateral Spreading Device Settings Sequence", "LateralSpreadingDeviceSettingsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0372), ElementsDictionaryEntry("Lateral Spreading Device Setting", "LateralSpreadingDeviceSetting", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0374), ElementsDictionaryEntry("Isocenter to Lateral Spreading Device Distance", "IsocenterToLateralSpreadingDeviceDistance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0380), ElementsDictionaryEntry("Range Modulator Settings Sequence", "RangeModulatorSettingsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0382), ElementsDictionaryEntry("Range Modulator Gating Start Value", "RangeModulatorGatingStartValue", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0384), ElementsDictionaryEntry("Range Modulator Gating Stop Value", "RangeModulatorGatingStopValue", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0386), ElementsDictionaryEntry("Range Modulator Gating Start Water Equivalent Thickness", "RangeModulatorGatingStartWaterEquivalentThickness", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0388), ElementsDictionaryEntry("Range Modulator Gating Stop Water Equivalent Thickness", "RangeModulatorGatingStopWaterEquivalentThickness", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x038a), ElementsDictionaryEntry("Isocenter to Range Modulator Distance", "IsocenterToRangeModulatorDistance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x038f), ElementsDictionaryEntry("Scan Spot Time Offset", "ScanSpotTimeOffset", "FL", "1-n")); public_dictionary.emplace(Tag(0x300a, 0x0390), ElementsDictionaryEntry("Scan Spot Tune ID", "ScanSpotTuneID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0391), ElementsDictionaryEntry("Scan Spot Prescribed Indices", "ScanSpotPrescribedIndices", "IS", "1-n")); public_dictionary.emplace(Tag(0x300a, 0x0392), ElementsDictionaryEntry("Number of Scan Spot Positions", "NumberOfScanSpotPositions", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0393), ElementsDictionaryEntry("Scan Spot Reordered", "ScanSpotReordered", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0394), ElementsDictionaryEntry("Scan Spot Position Map", "ScanSpotPositionMap", "FL", "1-n")); public_dictionary.emplace(Tag(0x300a, 0x0395), ElementsDictionaryEntry("Scan Spot Reordering Allowed", "ScanSpotReorderingAllowed", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0396), ElementsDictionaryEntry("Scan Spot Meterset Weights", "ScanSpotMetersetWeights", "FL", "1-n")); public_dictionary.emplace(Tag(0x300a, 0x0398), ElementsDictionaryEntry("Scanning Spot Size", "ScanningSpotSize", "FL", "2")); public_dictionary.emplace(Tag(0x300a, 0x039a), ElementsDictionaryEntry("Number of Paintings", "NumberOfPaintings", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x03a0), ElementsDictionaryEntry("Ion Tolerance Table Sequence", "IonToleranceTableSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x03a2), ElementsDictionaryEntry("Ion Beam Sequence", "IonBeamSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x03a4), ElementsDictionaryEntry("Ion Beam Limiting Device Sequence", "IonBeamLimitingDeviceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x03a6), ElementsDictionaryEntry("Ion Block Sequence", "IonBlockSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x03a8), ElementsDictionaryEntry("Ion Control Point Sequence", "IonControlPointSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x03aa), ElementsDictionaryEntry("Ion Wedge Sequence", "IonWedgeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x03ac), ElementsDictionaryEntry("Ion Wedge Position Sequence", "IonWedgePositionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0401), ElementsDictionaryEntry("Referenced Setup Image Sequence", "ReferencedSetupImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0402), ElementsDictionaryEntry("Setup Image Comment", "SetupImageComment", "ST", "1")); public_dictionary.emplace(Tag(0x300a, 0x0410), ElementsDictionaryEntry("Motion Synchronization Sequence", "MotionSynchronizationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0412), ElementsDictionaryEntry("Control Point Orientation", "ControlPointOrientation", "FL", "3")); public_dictionary.emplace(Tag(0x300a, 0x0420), ElementsDictionaryEntry("General Accessory Sequence", "GeneralAccessorySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0421), ElementsDictionaryEntry("General Accessory ID", "GeneralAccessoryID", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x0422), ElementsDictionaryEntry("General Accessory Description", "GeneralAccessoryDescription", "ST", "1")); public_dictionary.emplace(Tag(0x300a, 0x0423), ElementsDictionaryEntry("General Accessory Type", "GeneralAccessoryType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0424), ElementsDictionaryEntry("General Accessory Number", "GeneralAccessoryNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0425), ElementsDictionaryEntry("Source to General Accessory Distance", "SourceToGeneralAccessoryDistance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0426), ElementsDictionaryEntry("Isocenter to General Accessory Distance", "IsocenterToGeneralAccessoryDistance", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0431), ElementsDictionaryEntry("Applicator Geometry Sequence", "ApplicatorGeometrySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0432), ElementsDictionaryEntry("Applicator Aperture Shape", "ApplicatorApertureShape", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0433), ElementsDictionaryEntry("Applicator Opening", "ApplicatorOpening", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0434), ElementsDictionaryEntry("Applicator Opening X", "ApplicatorOpeningX", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0435), ElementsDictionaryEntry("Applicator Opening Y", "ApplicatorOpeningY", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0436), ElementsDictionaryEntry("Source to Applicator Mounting Position Distance", "SourceToApplicatorMountingPositionDistance", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0440), ElementsDictionaryEntry("Number of Block Slab Items", "NumberOfBlockSlabItems", "IS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0441), ElementsDictionaryEntry("Block Slab Sequence", "BlockSlabSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0442), ElementsDictionaryEntry("Block Slab Thickness", "BlockSlabThickness", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0443), ElementsDictionaryEntry("Block Slab Number", "BlockSlabNumber", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0450), ElementsDictionaryEntry("Device Motion Control Sequence", "DeviceMotionControlSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0451), ElementsDictionaryEntry("Device Motion Execution Mode", "DeviceMotionExecutionMode", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0452), ElementsDictionaryEntry("Device Motion Observation Mode", "DeviceMotionObservationMode", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0453), ElementsDictionaryEntry("Device Motion Parameter Code Sequence", "DeviceMotionParameterCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0501), ElementsDictionaryEntry("Distal Depth Fraction", "DistalDepthFraction", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0502), ElementsDictionaryEntry("Distal Depth", "DistalDepth", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0503), ElementsDictionaryEntry("Nominal Range Modulation Fractions", "NominalRangeModulationFractions", "FL", "2")); public_dictionary.emplace(Tag(0x300a, 0x0504), ElementsDictionaryEntry("Nominal Range Modulated Region Depths", "NominalRangeModulatedRegionDepths", "FL", "2")); public_dictionary.emplace(Tag(0x300a, 0x0505), ElementsDictionaryEntry("Depth Dose Parameters Sequence", "DepthDoseParametersSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0506), ElementsDictionaryEntry("Delivered Depth Dose Parameters Sequence", "DeliveredDepthDoseParametersSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0507), ElementsDictionaryEntry("Delivered Distal Depth Fraction", "DeliveredDistalDepthFraction", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0508), ElementsDictionaryEntry("Delivered Distal Depth", "DeliveredDistalDepth", "FL", "1")); public_dictionary.emplace(Tag(0x300a, 0x0509), ElementsDictionaryEntry("Delivered Nominal Range Modulation Fractions", "DeliveredNominalRangeModulationFractions", "FL", "2")); public_dictionary.emplace(Tag(0x300a, 0x0510), ElementsDictionaryEntry("Delivered Nominal Range Modulated Region Depths", "DeliveredNominalRangeModulatedRegionDepths", "FL", "2")); public_dictionary.emplace(Tag(0x300a, 0x0511), ElementsDictionaryEntry("Delivered Reference Dose Definition", "DeliveredReferenceDoseDefinition", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0512), ElementsDictionaryEntry("Reference Dose Definition", "ReferenceDoseDefinition", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0600), ElementsDictionaryEntry("RT Control Point Index", "RTControlPointIndex", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0601), ElementsDictionaryEntry("Radiation Generation Mode Index", "RadiationGenerationModeIndex", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0602), ElementsDictionaryEntry("Referenced Defined Device Index", "ReferencedDefinedDeviceIndex", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0603), ElementsDictionaryEntry("Radiation Dose Identification Index", "RadiationDoseIdentificationIndex", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0604), ElementsDictionaryEntry("Number of RT Control Points", "NumberOfRTControlPoints", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0605), ElementsDictionaryEntry("Referenced Radiation Generation Mode Index", "ReferencedRadiationGenerationModeIndex", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0606), ElementsDictionaryEntry("Treatment Position Index", "TreatmentPositionIndex", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0607), ElementsDictionaryEntry("Referenced Device Index", "ReferencedDeviceIndex", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0608), ElementsDictionaryEntry("Treatment Position Group Label", "TreatmentPositionGroupLabel", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0609), ElementsDictionaryEntry("Treatment Position Group UID", "TreatmentPositionGroupUID", "UI", "1")); public_dictionary.emplace(Tag(0x300a, 0x060a), ElementsDictionaryEntry("Treatment Position Group Sequence", "TreatmentPositionGroupSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x060b), ElementsDictionaryEntry("Referenced Treatment Position Index", "ReferencedTreatmentPositionIndex", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x060c), ElementsDictionaryEntry("Referenced Radiation Dose Identification Index", "ReferencedRadiationDoseIdentificationIndex", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x060d), ElementsDictionaryEntry("RT Accessory Holder Water-Equivalent Thickness", "RTAccessoryHolderWaterEquivalentThickness", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x060e), ElementsDictionaryEntry("Referenced RT Accessory Holder Device Index", "ReferencedRTAccessoryHolderDeviceIndex", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x060f), ElementsDictionaryEntry("RT Accessory Holder Slot Existence Flag", "RTAccessoryHolderSlotExistenceFlag", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0610), ElementsDictionaryEntry("RT Accessory Holder Slot Sequence", "RTAccessoryHolderSlotSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0611), ElementsDictionaryEntry("RT Accessory Holder Slot ID", "RTAccessoryHolderSlotID", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0612), ElementsDictionaryEntry("RT Accessory Holder Slot Distance", "RTAccessoryHolderSlotDistance", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0613), ElementsDictionaryEntry("RT Accessory Slot Distance", "RTAccessorySlotDistance", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0614), ElementsDictionaryEntry("RT Accessory Holder Definition Sequence", "RTAccessoryHolderDefinitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0615), ElementsDictionaryEntry("RT Accessory Device Slot ID", "RTAccessoryDeviceSlotID", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0616), ElementsDictionaryEntry("RT Radiation Sequence", "RTRadiationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0617), ElementsDictionaryEntry("Radiation Dose Sequence", "RadiationDoseSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0618), ElementsDictionaryEntry("Radiation Dose Identification Sequence", "RadiationDoseIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0619), ElementsDictionaryEntry("Radiation Dose Identification Label", "RadiationDoseIdentificationLabel", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x061a), ElementsDictionaryEntry("Reference Dose Type", "ReferenceDoseType", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x061b), ElementsDictionaryEntry("Primary Dose Value Indicator", "PrimaryDoseValueIndicator", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x061c), ElementsDictionaryEntry("Dose Values Sequence", "DoseValuesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x061d), ElementsDictionaryEntry("Dose Value Purpose", "DoseValuePurpose", "CS", "1-n")); public_dictionary.emplace(Tag(0x300a, 0x061e), ElementsDictionaryEntry("Reference Dose Point Coordinates", "ReferenceDosePointCoordinates", "FD", "3")); public_dictionary.emplace(Tag(0x300a, 0x061f), ElementsDictionaryEntry("Radiation Dose Values Parameters Sequence", "RadiationDoseValuesParametersSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0620), ElementsDictionaryEntry("Meterset to Dose Mapping Sequence", "MetersetToDoseMappingSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0621), ElementsDictionaryEntry("Expected In-Vivo Measurement Values Sequence", "ExpectedInVivoMeasurementValuesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0622), ElementsDictionaryEntry("Expected In-Vivo Measurement Value Index", "ExpectedInVivoMeasurementValueIndex", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0623), ElementsDictionaryEntry("Radiation Dose In-Vivo Measurement Label", "RadiationDoseInVivoMeasurementLabel", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x0624), ElementsDictionaryEntry("Radiation Dose Central Axis Displacement", "RadiationDoseCentralAxisDisplacement", "FD", "2")); public_dictionary.emplace(Tag(0x300a, 0x0625), ElementsDictionaryEntry("Radiation Dose Value", "RadiationDoseValue", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0626), ElementsDictionaryEntry("Radiation Dose Source to Skin Distance", "RadiationDoseSourceToSkinDistance", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0627), ElementsDictionaryEntry("Radiation Dose Measurement Point Coordinates", "RadiationDoseMeasurementPointCoordinates", "FD", "3")); public_dictionary.emplace(Tag(0x300a, 0x0628), ElementsDictionaryEntry("Radiation Dose Source to External Contour Distance", "RadiationDoseSourceToExternalContourDistance", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0629), ElementsDictionaryEntry("RT Tolerance Set Sequence", "RTToleranceSetSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x062a), ElementsDictionaryEntry("RT Tolerance Set Label", "RTToleranceSetLabel", "LO", "1")); public_dictionary.emplace(Tag(0x300a, 0x062b), ElementsDictionaryEntry("Attribute Tolerance Values Sequence", "AttributeToleranceValuesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x062c), ElementsDictionaryEntry("Tolerance Value", "ToleranceValue", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x062d), ElementsDictionaryEntry("Patient Support Position Tolerance Sequence", "PatientSupportPositionToleranceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x062e), ElementsDictionaryEntry("Treatment Time Limit", "TreatmentTimeLimit", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x062f), ElementsDictionaryEntry("C-Arm Photon-Electron Control Point Sequence", "CArmPhotonElectronControlPointSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0630), ElementsDictionaryEntry("Referenced RT Radiation Sequence", "ReferencedRTRadiationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0631), ElementsDictionaryEntry("Referenced RT Instance Sequence", "ReferencedRTInstanceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0632), ElementsDictionaryEntry("Referenced RT Patient Setup Sequence", "ReferencedRTPatientSetupSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0634), ElementsDictionaryEntry("Source to Patient Surface Distance", "SourceToPatientSurfaceDistance", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0635), ElementsDictionaryEntry("Treatment Machine Special Mode Code Sequence", "TreatmentMachineSpecialModeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0636), ElementsDictionaryEntry("Intended Number of Fractions", "IntendedNumberOfFractions", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0637), ElementsDictionaryEntry("RT Radiation Set Intent", "RTRadiationSetIntent", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0638), ElementsDictionaryEntry("RT Radiation Physical and Geometric Content Detail Flag", "RTRadiationPhysicalAndGeometricContentDetailFlag", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0639), ElementsDictionaryEntry("RT Record Flag", "RTRecordFlag", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x063a), ElementsDictionaryEntry("Treatment Device Identification Sequence", "TreatmentDeviceIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x063b), ElementsDictionaryEntry("Referenced RT Physician Intent Sequence", "ReferencedRTPhysicianIntentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x063c), ElementsDictionaryEntry("Cumulative Meterset", "CumulativeMeterset", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x063d), ElementsDictionaryEntry("Delivery Rate", "DeliveryRate", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x063e), ElementsDictionaryEntry("Delivery Rate Unit Sequence", "DeliveryRateUnitSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x063f), ElementsDictionaryEntry("Treatment Position Sequence", "TreatmentPositionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0640), ElementsDictionaryEntry("Radiation Source-Axis Distance", "RadiationSourceAxisDistance", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0641), ElementsDictionaryEntry("Number of RT Beam Limiting Devices", "NumberOfRTBeamLimitingDevices", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0642), ElementsDictionaryEntry("RT Beam Limiting Device Proximal Distance", "RTBeamLimitingDeviceProximalDistance", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0643), ElementsDictionaryEntry("RT Beam Limiting Device Distal Distance", "RTBeamLimitingDeviceDistalDistance", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0644), ElementsDictionaryEntry("Parallel RT Beam Delimiter Device Orientation Label Code Sequence", "ParallelRTBeamDelimiterDeviceOrientationLabelCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0645), ElementsDictionaryEntry("Beam Modifier Orientation Angle", "BeamModifierOrientationAngle", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0646), ElementsDictionaryEntry("Fixed RT Beam Delimiter Device Sequence", "FixedRTBeamDelimiterDeviceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0647), ElementsDictionaryEntry("Parallel RT Beam Delimiter Device Sequence", "ParallelRTBeamDelimiterDeviceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0648), ElementsDictionaryEntry("Number of Parallel RT Beam Delimiters", "NumberOfParallelRTBeamDelimiters", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0649), ElementsDictionaryEntry("Parallel RT Beam Delimiter Boundaries", "ParallelRTBeamDelimiterBoundaries", "FD", "2-n")); public_dictionary.emplace(Tag(0x300a, 0x064a), ElementsDictionaryEntry("Parallel RT Beam Delimiter Positions", "ParallelRTBeamDelimiterPositions", "FD", "2-n")); public_dictionary.emplace(Tag(0x300a, 0x064b), ElementsDictionaryEntry("RT Beam Limiting Device Offset", "RTBeamLimitingDeviceOffset", "FD", "2")); public_dictionary.emplace(Tag(0x300a, 0x064c), ElementsDictionaryEntry("RT Beam Delimiter Geometry Sequence", "RTBeamDelimiterGeometrySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x064d), ElementsDictionaryEntry("RT Beam Limiting Device Definition Sequence", "RTBeamLimitingDeviceDefinitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x064e), ElementsDictionaryEntry("Parallel RT Beam Delimiter Opening Mode", "ParallelRTBeamDelimiterOpeningMode", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x064f), ElementsDictionaryEntry("Parallel RT Beam Delimiter Leaf Mounting Side", "ParallelRTBeamDelimiterLeafMountingSide", "CS", "1-n")); public_dictionary.emplace(Tag(0x300a, 0x0650), ElementsDictionaryEntry("Patient Setup UID", "PatientSetupUID", "UI", "1")); public_dictionary.emplace(Tag(0x300a, 0x0651), ElementsDictionaryEntry("Wedge Definition Sequence", "WedgeDefinitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0652), ElementsDictionaryEntry("Radiation Beam Wedge Angle", "RadiationBeamWedgeAngle", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0653), ElementsDictionaryEntry("Radiation Beam Wedge Thin Edge Distance", "RadiationBeamWedgeThinEdgeDistance", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0654), ElementsDictionaryEntry("Radiation Beam Effective Wedge Angle", "RadiationBeamEffectiveWedgeAngle", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0655), ElementsDictionaryEntry("Number of Wedge Positions", "NumberOfWedgePositions", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0656), ElementsDictionaryEntry("RT Beam Limiting Device Opening Sequence", "RTBeamLimitingDeviceOpeningSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0657), ElementsDictionaryEntry("Number of RT Beam Limiting Device Openings", "NumberOfRTBeamLimitingDeviceOpenings", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0658), ElementsDictionaryEntry("Radiation Dosimeter Unit Sequence", "RadiationDosimeterUnitSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0659), ElementsDictionaryEntry("RT Device Distance Reference Location Code Sequence", "RTDeviceDistanceReferenceLocationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x065a), ElementsDictionaryEntry("Radiation Device Configuration and Commissioning Key Sequence", "RadiationDeviceConfigurationAndCommissioningKeySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x065b), ElementsDictionaryEntry("Patient Support Position Parameter Sequence", "PatientSupportPositionParameterSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x065c), ElementsDictionaryEntry("Patient Support Position Specification Method", "PatientSupportPositionSpecificationMethod", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x065d), ElementsDictionaryEntry("Patient Support Position Device Parameter Sequence", "PatientSupportPositionDeviceParameterSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x065e), ElementsDictionaryEntry("Device Order Index", "DeviceOrderIndex", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x065f), ElementsDictionaryEntry("Patient Support Position Parameter Order Index", "PatientSupportPositionParameterOrderIndex", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0660), ElementsDictionaryEntry("Patient Support Position Device Tolerance Sequence", "PatientSupportPositionDeviceToleranceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0661), ElementsDictionaryEntry("Patient Support Position Tolerance Order Index", "PatientSupportPositionToleranceOrderIndex", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0662), ElementsDictionaryEntry("Compensator Definition Sequence", "CompensatorDefinitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0663), ElementsDictionaryEntry("Compensator Map Orientation", "CompensatorMapOrientation", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0664), ElementsDictionaryEntry("Compensator Proximal Thickness Map", "CompensatorProximalThicknessMap", "OF", "1")); public_dictionary.emplace(Tag(0x300a, 0x0665), ElementsDictionaryEntry("Compensator Distal Thickness Map", "CompensatorDistalThicknessMap", "OF", "1")); public_dictionary.emplace(Tag(0x300a, 0x0666), ElementsDictionaryEntry("Compensator Base Plane Offset", "CompensatorBasePlaneOffset", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0667), ElementsDictionaryEntry("Compensator Shape Fabrication Code Sequence", "CompensatorShapeFabricationCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0668), ElementsDictionaryEntry("Compensator Shape Sequence", "CompensatorShapeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0669), ElementsDictionaryEntry("Radiation Beam Compensator Milling Tool Diameter", "RadiationBeamCompensatorMillingToolDiameter", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x066a), ElementsDictionaryEntry("Block Definition Sequence", "BlockDefinitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x066b), ElementsDictionaryEntry("Block Edge Data", "BlockEdgeData", "OF", "1")); public_dictionary.emplace(Tag(0x300a, 0x066c), ElementsDictionaryEntry("Block Orientation", "BlockOrientation", "CS", "1")); public_dictionary.emplace(Tag(0x300a, 0x066d), ElementsDictionaryEntry("Radiation Beam Block Thickness", "RadiationBeamBlockThickness", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x066e), ElementsDictionaryEntry("Radiation Beam Block Slab Thickness", "RadiationBeamBlockSlabThickness", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x066f), ElementsDictionaryEntry("Block Edge Data Sequence", "BlockEdgeDataSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0670), ElementsDictionaryEntry("Number of RT Accessory Holders", "NumberOfRTAccessoryHolders", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0671), ElementsDictionaryEntry("General Accessory Definition Sequence", "GeneralAccessoryDefinitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0672), ElementsDictionaryEntry("Number of General Accessories", "NumberOfGeneralAccessories", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0673), ElementsDictionaryEntry("Bolus Definition Sequence", "BolusDefinitionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0674), ElementsDictionaryEntry("Number of Boluses", "NumberOfBoluses", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0675), ElementsDictionaryEntry("Equipment Frame of Reference UID", "EquipmentFrameOfReferenceUID", "UI", "1")); public_dictionary.emplace(Tag(0x300a, 0x0676), ElementsDictionaryEntry("Equipment Frame of Reference Description", "EquipmentFrameOfReferenceDescription", "ST", "1")); public_dictionary.emplace(Tag(0x300a, 0x0677), ElementsDictionaryEntry("Equipment Reference Point Coordinates Sequence", "EquipmentReferencePointCoordinatesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0678), ElementsDictionaryEntry("Equipment Reference Point Code Sequence", "EquipmentReferencePointCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0679), ElementsDictionaryEntry("RT Beam Limiting Device Angle", "RTBeamLimitingDeviceAngle", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x067a), ElementsDictionaryEntry("Source Roll Angle", "SourceRollAngle", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x067b), ElementsDictionaryEntry("Radiation GenerationMode Sequence", "RadiationGenerationModeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x067c), ElementsDictionaryEntry("Radiation GenerationMode Label", "RadiationGenerationModeLabel", "SH", "1")); public_dictionary.emplace(Tag(0x300a, 0x067d), ElementsDictionaryEntry("Radiation GenerationMode Description", "RadiationGenerationModeDescription", "ST", "1")); public_dictionary.emplace(Tag(0x300a, 0x067e), ElementsDictionaryEntry("Radiation GenerationMode Machine Code Sequence", "RadiationGenerationModeMachineCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x067f), ElementsDictionaryEntry("Radiation Type Code Sequence", "RadiationTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0680), ElementsDictionaryEntry("Nominal Energy", "NominalEnergy", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0681), ElementsDictionaryEntry("Minimum Nominal Energy", "MinimumNominalEnergy", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0682), ElementsDictionaryEntry("Maximum Nominal Energy", "MaximumNominalEnergy", "DS", "1")); public_dictionary.emplace(Tag(0x300a, 0x0683), ElementsDictionaryEntry("Radiation Fluence Modifier Code Sequence", "RadiationFluenceModifierCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0684), ElementsDictionaryEntry("Energy Unit Code Sequence", "EnergyUnitCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0685), ElementsDictionaryEntry("Number of Radiation GenerationModes", "NumberOfRadiationGenerationModes", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0686), ElementsDictionaryEntry("Patient Support Devices Sequence", "PatientSupportDevicesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x0687), ElementsDictionaryEntry("Number of Patient Support Devices", "NumberOfPatientSupportDevices", "US", "1")); public_dictionary.emplace(Tag(0x300a, 0x0688), ElementsDictionaryEntry("RT Beam Modifier Definition Distance", "RTBeamModifierDefinitionDistance", "FD", "1")); public_dictionary.emplace(Tag(0x300a, 0x0689), ElementsDictionaryEntry("Beam Area Limit Sequence", "BeamAreaLimitSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300a, 0x068a), ElementsDictionaryEntry("Referenced RT Prescription Sequence", "ReferencedRTPrescriptionSequence", "SQ", "1")); public_tags.emplace("RTPlanLabel", Tag(0x300a, 0x0002)); public_tags.emplace("RTPlanName", Tag(0x300a, 0x0003)); public_tags.emplace("RTPlanDescription", Tag(0x300a, 0x0004)); public_tags.emplace("RTPlanDate", Tag(0x300a, 0x0006)); public_tags.emplace("RTPlanTime", Tag(0x300a, 0x0007)); public_tags.emplace("TreatmentProtocols", Tag(0x300a, 0x0009)); public_tags.emplace("PlanIntent", Tag(0x300a, 0x000a)); public_tags.emplace("TreatmentSites", Tag(0x300a, 0x000b)); public_tags.emplace("RTPlanGeometry", Tag(0x300a, 0x000c)); public_tags.emplace("PrescriptionDescription", Tag(0x300a, 0x000e)); public_tags.emplace("DoseReferenceSequence", Tag(0x300a, 0x0010)); public_tags.emplace("DoseReferenceNumber", Tag(0x300a, 0x0012)); public_tags.emplace("DoseReferenceUID", Tag(0x300a, 0x0013)); public_tags.emplace("DoseReferenceStructureType", Tag(0x300a, 0x0014)); public_tags.emplace("NominalBeamEnergyUnit", Tag(0x300a, 0x0015)); public_tags.emplace("DoseReferenceDescription", Tag(0x300a, 0x0016)); public_tags.emplace("DoseReferencePointCoordinates", Tag(0x300a, 0x0018)); public_tags.emplace("NominalPriorDose", Tag(0x300a, 0x001a)); public_tags.emplace("DoseReferenceType", Tag(0x300a, 0x0020)); public_tags.emplace("ConstraintWeight", Tag(0x300a, 0x0021)); public_tags.emplace("DeliveryWarningDose", Tag(0x300a, 0x0022)); public_tags.emplace("DeliveryMaximumDose", Tag(0x300a, 0x0023)); public_tags.emplace("TargetMinimumDose", Tag(0x300a, 0x0025)); public_tags.emplace("TargetPrescriptionDose", Tag(0x300a, 0x0026)); public_tags.emplace("TargetMaximumDose", Tag(0x300a, 0x0027)); public_tags.emplace("TargetUnderdoseVolumeFraction", Tag(0x300a, 0x0028)); public_tags.emplace("OrganAtRiskFullVolumeDose", Tag(0x300a, 0x002a)); public_tags.emplace("OrganAtRiskLimitDose", Tag(0x300a, 0x002b)); public_tags.emplace("OrganAtRiskMaximumDose", Tag(0x300a, 0x002c)); public_tags.emplace("OrganAtRiskOverdoseVolumeFraction", Tag(0x300a, 0x002d)); public_tags.emplace("ToleranceTableSequence", Tag(0x300a, 0x0040)); public_tags.emplace("ToleranceTableNumber", Tag(0x300a, 0x0042)); public_tags.emplace("ToleranceTableLabel", Tag(0x300a, 0x0043)); public_tags.emplace("GantryAngleTolerance", Tag(0x300a, 0x0044)); public_tags.emplace("BeamLimitingDeviceAngleTolerance", Tag(0x300a, 0x0046)); public_tags.emplace("BeamLimitingDeviceToleranceSequence", Tag(0x300a, 0x0048)); public_tags.emplace("BeamLimitingDevicePositionTolerance", Tag(0x300a, 0x004a)); public_tags.emplace("SnoutPositionTolerance", Tag(0x300a, 0x004b)); public_tags.emplace("PatientSupportAngleTolerance", Tag(0x300a, 0x004c)); public_tags.emplace("TableTopEccentricAngleTolerance", Tag(0x300a, 0x004e)); public_tags.emplace("TableTopPitchAngleTolerance", Tag(0x300a, 0x004f)); public_tags.emplace("TableTopRollAngleTolerance", Tag(0x300a, 0x0050)); public_tags.emplace("TableTopVerticalPositionTolerance", Tag(0x300a, 0x0051)); public_tags.emplace("TableTopLongitudinalPositionTolerance", Tag(0x300a, 0x0052)); public_tags.emplace("TableTopLateralPositionTolerance", Tag(0x300a, 0x0053)); public_tags.emplace("RTPlanRelationship", Tag(0x300a, 0x0055)); public_tags.emplace("FractionGroupSequence", Tag(0x300a, 0x0070)); public_tags.emplace("FractionGroupNumber", Tag(0x300a, 0x0071)); public_tags.emplace("FractionGroupDescription", Tag(0x300a, 0x0072)); public_tags.emplace("NumberOfFractionsPlanned", Tag(0x300a, 0x0078)); public_tags.emplace("NumberOfFractionPatternDigitsPerDay", Tag(0x300a, 0x0079)); public_tags.emplace("RepeatFractionCycleLength", Tag(0x300a, 0x007a)); public_tags.emplace("FractionPattern", Tag(0x300a, 0x007b)); public_tags.emplace("NumberOfBeams", Tag(0x300a, 0x0080)); public_tags.emplace("BeamDoseSpecificationPoint", Tag(0x300a, 0x0082)); public_tags.emplace("ReferencedDoseReferenceUID", Tag(0x300a, 0x0083)); public_tags.emplace("BeamDose", Tag(0x300a, 0x0084)); public_tags.emplace("BeamMeterset", Tag(0x300a, 0x0086)); public_tags.emplace("BeamDosePointDepth", Tag(0x300a, 0x0088)); public_tags.emplace("BeamDosePointEquivalentDepth", Tag(0x300a, 0x0089)); public_tags.emplace("BeamDosePointSSD", Tag(0x300a, 0x008a)); public_tags.emplace("BeamDoseMeaning", Tag(0x300a, 0x008b)); public_tags.emplace("BeamDoseVerificationControlPointSequence", Tag(0x300a, 0x008c)); public_tags.emplace("AverageBeamDosePointDepth", Tag(0x300a, 0x008d)); public_tags.emplace("AverageBeamDosePointEquivalentDepth", Tag(0x300a, 0x008e)); public_tags.emplace("AverageBeamDosePointSSD", Tag(0x300a, 0x008f)); public_tags.emplace("BeamDoseType", Tag(0x300a, 0x0090)); public_tags.emplace("AlternateBeamDose", Tag(0x300a, 0x0091)); public_tags.emplace("AlternateBeamDoseType", Tag(0x300a, 0x0092)); public_tags.emplace("DepthValueAveragingFlag", Tag(0x300a, 0x0093)); public_tags.emplace("BeamDosePointSourceToExternalContourDistance", Tag(0x300a, 0x0094)); public_tags.emplace("NumberOfBrachyApplicationSetups", Tag(0x300a, 0x00a0)); public_tags.emplace("BrachyApplicationSetupDoseSpecificationPoint", Tag(0x300a, 0x00a2)); public_tags.emplace("BrachyApplicationSetupDose", Tag(0x300a, 0x00a4)); public_tags.emplace("BeamSequence", Tag(0x300a, 0x00b0)); public_tags.emplace("TreatmentMachineName", Tag(0x300a, 0x00b2)); public_tags.emplace("PrimaryDosimeterUnit", Tag(0x300a, 0x00b3)); public_tags.emplace("SourceAxisDistance", Tag(0x300a, 0x00b4)); public_tags.emplace("BeamLimitingDeviceSequence", Tag(0x300a, 0x00b6)); public_tags.emplace("RTBeamLimitingDeviceType", Tag(0x300a, 0x00b8)); public_tags.emplace("SourceToBeamLimitingDeviceDistance", Tag(0x300a, 0x00ba)); public_tags.emplace("IsocenterToBeamLimitingDeviceDistance", Tag(0x300a, 0x00bb)); public_tags.emplace("NumberOfLeafJawPairs", Tag(0x300a, 0x00bc)); public_tags.emplace("LeafPositionBoundaries", Tag(0x300a, 0x00be)); public_tags.emplace("BeamNumber", Tag(0x300a, 0x00c0)); public_tags.emplace("BeamName", Tag(0x300a, 0x00c2)); public_tags.emplace("BeamDescription", Tag(0x300a, 0x00c3)); public_tags.emplace("BeamType", Tag(0x300a, 0x00c4)); public_tags.emplace("BeamDeliveryDurationLimit", Tag(0x300a, 0x00c5)); public_tags.emplace("RadiationType", Tag(0x300a, 0x00c6)); public_tags.emplace("HighDoseTechniqueType", Tag(0x300a, 0x00c7)); public_tags.emplace("ReferenceImageNumber", Tag(0x300a, 0x00c8)); public_tags.emplace("PlannedVerificationImageSequence", Tag(0x300a, 0x00ca)); public_tags.emplace("ImagingDeviceSpecificAcquisitionParameters", Tag(0x300a, 0x00cc)); public_tags.emplace("TreatmentDeliveryType", Tag(0x300a, 0x00ce)); public_tags.emplace("NumberOfWedges", Tag(0x300a, 0x00d0)); public_tags.emplace("WedgeSequence", Tag(0x300a, 0x00d1)); public_tags.emplace("WedgeNumber", Tag(0x300a, 0x00d2)); public_tags.emplace("WedgeType", Tag(0x300a, 0x00d3)); public_tags.emplace("WedgeID", Tag(0x300a, 0x00d4)); public_tags.emplace("WedgeAngle", Tag(0x300a, 0x00d5)); public_tags.emplace("WedgeFactor", Tag(0x300a, 0x00d6)); public_tags.emplace("TotalWedgeTrayWaterEquivalentThickness", Tag(0x300a, 0x00d7)); public_tags.emplace("WedgeOrientation", Tag(0x300a, 0x00d8)); public_tags.emplace("IsocenterToWedgeTrayDistance", Tag(0x300a, 0x00d9)); public_tags.emplace("SourceToWedgeTrayDistance", Tag(0x300a, 0x00da)); public_tags.emplace("WedgeThinEdgePosition", Tag(0x300a, 0x00db)); public_tags.emplace("BolusID", Tag(0x300a, 0x00dc)); public_tags.emplace("BolusDescription", Tag(0x300a, 0x00dd)); public_tags.emplace("EffectiveWedgeAngle", Tag(0x300a, 0x00de)); public_tags.emplace("NumberOfCompensators", Tag(0x300a, 0x00e0)); public_tags.emplace("MaterialID", Tag(0x300a, 0x00e1)); public_tags.emplace("TotalCompensatorTrayFactor", Tag(0x300a, 0x00e2)); public_tags.emplace("CompensatorSequence", Tag(0x300a, 0x00e3)); public_tags.emplace("CompensatorNumber", Tag(0x300a, 0x00e4)); public_tags.emplace("CompensatorID", Tag(0x300a, 0x00e5)); public_tags.emplace("SourceToCompensatorTrayDistance", Tag(0x300a, 0x00e6)); public_tags.emplace("CompensatorRows", Tag(0x300a, 0x00e7)); public_tags.emplace("CompensatorColumns", Tag(0x300a, 0x00e8)); public_tags.emplace("CompensatorPixelSpacing", Tag(0x300a, 0x00e9)); public_tags.emplace("CompensatorPosition", Tag(0x300a, 0x00ea)); public_tags.emplace("CompensatorTransmissionData", Tag(0x300a, 0x00eb)); public_tags.emplace("CompensatorThicknessData", Tag(0x300a, 0x00ec)); public_tags.emplace("NumberOfBoli", Tag(0x300a, 0x00ed)); public_tags.emplace("CompensatorType", Tag(0x300a, 0x00ee)); public_tags.emplace("CompensatorTrayID", Tag(0x300a, 0x00ef)); public_tags.emplace("NumberOfBlocks", Tag(0x300a, 0x00f0)); public_tags.emplace("TotalBlockTrayFactor", Tag(0x300a, 0x00f2)); public_tags.emplace("TotalBlockTrayWaterEquivalentThickness", Tag(0x300a, 0x00f3)); public_tags.emplace("BlockSequence", Tag(0x300a, 0x00f4)); public_tags.emplace("BlockTrayID", Tag(0x300a, 0x00f5)); public_tags.emplace("SourceToBlockTrayDistance", Tag(0x300a, 0x00f6)); public_tags.emplace("IsocenterToBlockTrayDistance", Tag(0x300a, 0x00f7)); public_tags.emplace("BlockType", Tag(0x300a, 0x00f8)); public_tags.emplace("AccessoryCode", Tag(0x300a, 0x00f9)); public_tags.emplace("BlockDivergence", Tag(0x300a, 0x00fa)); public_tags.emplace("BlockMountingPosition", Tag(0x300a, 0x00fb)); public_tags.emplace("BlockNumber", Tag(0x300a, 0x00fc)); public_tags.emplace("BlockName", Tag(0x300a, 0x00fe)); public_tags.emplace("BlockThickness", Tag(0x300a, 0x0100)); public_tags.emplace("BlockTransmission", Tag(0x300a, 0x0102)); public_tags.emplace("BlockNumberOfPoints", Tag(0x300a, 0x0104)); public_tags.emplace("BlockData", Tag(0x300a, 0x0106)); public_tags.emplace("ApplicatorSequence", Tag(0x300a, 0x0107)); public_tags.emplace("ApplicatorID", Tag(0x300a, 0x0108)); public_tags.emplace("ApplicatorType", Tag(0x300a, 0x0109)); public_tags.emplace("ApplicatorDescription", Tag(0x300a, 0x010a)); public_tags.emplace("CumulativeDoseReferenceCoefficient", Tag(0x300a, 0x010c)); public_tags.emplace("FinalCumulativeMetersetWeight", Tag(0x300a, 0x010e)); public_tags.emplace("NumberOfControlPoints", Tag(0x300a, 0x0110)); public_tags.emplace("ControlPointSequence", Tag(0x300a, 0x0111)); public_tags.emplace("ControlPointIndex", Tag(0x300a, 0x0112)); public_tags.emplace("NominalBeamEnergy", Tag(0x300a, 0x0114)); public_tags.emplace("DoseRateSet", Tag(0x300a, 0x0115)); public_tags.emplace("WedgePositionSequence", Tag(0x300a, 0x0116)); public_tags.emplace("WedgePosition", Tag(0x300a, 0x0118)); public_tags.emplace("BeamLimitingDevicePositionSequence", Tag(0x300a, 0x011a)); public_tags.emplace("LeafJawPositions", Tag(0x300a, 0x011c)); public_tags.emplace("GantryAngle", Tag(0x300a, 0x011e)); public_tags.emplace("GantryRotationDirection", Tag(0x300a, 0x011f)); public_tags.emplace("BeamLimitingDeviceAngle", Tag(0x300a, 0x0120)); public_tags.emplace("BeamLimitingDeviceRotationDirection", Tag(0x300a, 0x0121)); public_tags.emplace("PatientSupportAngle", Tag(0x300a, 0x0122)); public_tags.emplace("PatientSupportRotationDirection", Tag(0x300a, 0x0123)); public_tags.emplace("TableTopEccentricAxisDistance", Tag(0x300a, 0x0124)); public_tags.emplace("TableTopEccentricAngle", Tag(0x300a, 0x0125)); public_tags.emplace("TableTopEccentricRotationDirection", Tag(0x300a, 0x0126)); public_tags.emplace("TableTopVerticalPosition", Tag(0x300a, 0x0128)); public_tags.emplace("TableTopLongitudinalPosition", Tag(0x300a, 0x0129)); public_tags.emplace("TableTopLateralPosition", Tag(0x300a, 0x012a)); public_tags.emplace("IsocenterPosition", Tag(0x300a, 0x012c)); public_tags.emplace("SurfaceEntryPoint", Tag(0x300a, 0x012e)); public_tags.emplace("SourceToSurfaceDistance", Tag(0x300a, 0x0130)); public_tags.emplace("AverageBeamDosePointSourceToExternalContourDistance", Tag(0x300a, 0x0131)); public_tags.emplace("SourceToExternalContourDistance", Tag(0x300a, 0x0132)); public_tags.emplace("ExternalContourEntryPoint", Tag(0x300a, 0x0133)); public_tags.emplace("CumulativeMetersetWeight", Tag(0x300a, 0x0134)); public_tags.emplace("TableTopPitchAngle", Tag(0x300a, 0x0140)); public_tags.emplace("TableTopPitchRotationDirection", Tag(0x300a, 0x0142)); public_tags.emplace("TableTopRollAngle", Tag(0x300a, 0x0144)); public_tags.emplace("TableTopRollRotationDirection", Tag(0x300a, 0x0146)); public_tags.emplace("HeadFixationAngle", Tag(0x300a, 0x0148)); public_tags.emplace("GantryPitchAngle", Tag(0x300a, 0x014a)); public_tags.emplace("GantryPitchRotationDirection", Tag(0x300a, 0x014c)); public_tags.emplace("GantryPitchAngleTolerance", Tag(0x300a, 0x014e)); public_tags.emplace("FixationEye", Tag(0x300a, 0x0150)); public_tags.emplace("ChairHeadFramePosition", Tag(0x300a, 0x0151)); public_tags.emplace("HeadFixationAngleTolerance", Tag(0x300a, 0x0152)); public_tags.emplace("ChairHeadFramePositionTolerance", Tag(0x300a, 0x0153)); public_tags.emplace("FixationLightAzimuthalAngleTolerance", Tag(0x300a, 0x0154)); public_tags.emplace("FixationLightPolarAngleTolerance", Tag(0x300a, 0x0155)); public_tags.emplace("PatientSetupSequence", Tag(0x300a, 0x0180)); public_tags.emplace("PatientSetupNumber", Tag(0x300a, 0x0182)); public_tags.emplace("PatientSetupLabel", Tag(0x300a, 0x0183)); public_tags.emplace("PatientAdditionalPosition", Tag(0x300a, 0x0184)); public_tags.emplace("FixationDeviceSequence", Tag(0x300a, 0x0190)); public_tags.emplace("FixationDeviceType", Tag(0x300a, 0x0192)); public_tags.emplace("FixationDeviceLabel", Tag(0x300a, 0x0194)); public_tags.emplace("FixationDeviceDescription", Tag(0x300a, 0x0196)); public_tags.emplace("FixationDevicePosition", Tag(0x300a, 0x0198)); public_tags.emplace("FixationDevicePitchAngle", Tag(0x300a, 0x0199)); public_tags.emplace("FixationDeviceRollAngle", Tag(0x300a, 0x019a)); public_tags.emplace("ShieldingDeviceSequence", Tag(0x300a, 0x01a0)); public_tags.emplace("ShieldingDeviceType", Tag(0x300a, 0x01a2)); public_tags.emplace("ShieldingDeviceLabel", Tag(0x300a, 0x01a4)); public_tags.emplace("ShieldingDeviceDescription", Tag(0x300a, 0x01a6)); public_tags.emplace("ShieldingDevicePosition", Tag(0x300a, 0x01a8)); public_tags.emplace("SetupTechnique", Tag(0x300a, 0x01b0)); public_tags.emplace("SetupTechniqueDescription", Tag(0x300a, 0x01b2)); public_tags.emplace("SetupDeviceSequence", Tag(0x300a, 0x01b4)); public_tags.emplace("SetupDeviceType", Tag(0x300a, 0x01b6)); public_tags.emplace("SetupDeviceLabel", Tag(0x300a, 0x01b8)); public_tags.emplace("SetupDeviceDescription", Tag(0x300a, 0x01ba)); public_tags.emplace("SetupDeviceParameter", Tag(0x300a, 0x01bc)); public_tags.emplace("SetupReferenceDescription", Tag(0x300a, 0x01d0)); public_tags.emplace("TableTopVerticalSetupDisplacement", Tag(0x300a, 0x01d2)); public_tags.emplace("TableTopLongitudinalSetupDisplacement", Tag(0x300a, 0x01d4)); public_tags.emplace("TableTopLateralSetupDisplacement", Tag(0x300a, 0x01d6)); public_tags.emplace("BrachyTreatmentTechnique", Tag(0x300a, 0x0200)); public_tags.emplace("BrachyTreatmentType", Tag(0x300a, 0x0202)); public_tags.emplace("TreatmentMachineSequence", Tag(0x300a, 0x0206)); public_tags.emplace("SourceSequence", Tag(0x300a, 0x0210)); public_tags.emplace("SourceNumber", Tag(0x300a, 0x0212)); public_tags.emplace("SourceType", Tag(0x300a, 0x0214)); public_tags.emplace("SourceManufacturer", Tag(0x300a, 0x0216)); public_tags.emplace("ActiveSourceDiameter", Tag(0x300a, 0x0218)); public_tags.emplace("ActiveSourceLength", Tag(0x300a, 0x021a)); public_tags.emplace("SourceModelID", Tag(0x300a, 0x021b)); public_tags.emplace("SourceDescription", Tag(0x300a, 0x021c)); public_tags.emplace("SourceEncapsulationNominalThickness", Tag(0x300a, 0x0222)); public_tags.emplace("SourceEncapsulationNominalTransmission", Tag(0x300a, 0x0224)); public_tags.emplace("SourceIsotopeName", Tag(0x300a, 0x0226)); public_tags.emplace("SourceIsotopeHalfLife", Tag(0x300a, 0x0228)); public_tags.emplace("SourceStrengthUnits", Tag(0x300a, 0x0229)); public_tags.emplace("ReferenceAirKermaRate", Tag(0x300a, 0x022a)); public_tags.emplace("SourceStrength", Tag(0x300a, 0x022b)); public_tags.emplace("SourceStrengthReferenceDate", Tag(0x300a, 0x022c)); public_tags.emplace("SourceStrengthReferenceTime", Tag(0x300a, 0x022e)); public_tags.emplace("ApplicationSetupSequence", Tag(0x300a, 0x0230)); public_tags.emplace("ApplicationSetupType", Tag(0x300a, 0x0232)); public_tags.emplace("ApplicationSetupNumber", Tag(0x300a, 0x0234)); public_tags.emplace("ApplicationSetupName", Tag(0x300a, 0x0236)); public_tags.emplace("ApplicationSetupManufacturer", Tag(0x300a, 0x0238)); public_tags.emplace("TemplateNumber", Tag(0x300a, 0x0240)); public_tags.emplace("TemplateType", Tag(0x300a, 0x0242)); public_tags.emplace("TemplateName", Tag(0x300a, 0x0244)); public_tags.emplace("TotalReferenceAirKerma", Tag(0x300a, 0x0250)); public_tags.emplace("BrachyAccessoryDeviceSequence", Tag(0x300a, 0x0260)); public_tags.emplace("BrachyAccessoryDeviceNumber", Tag(0x300a, 0x0262)); public_tags.emplace("BrachyAccessoryDeviceID", Tag(0x300a, 0x0263)); public_tags.emplace("BrachyAccessoryDeviceType", Tag(0x300a, 0x0264)); public_tags.emplace("BrachyAccessoryDeviceName", Tag(0x300a, 0x0266)); public_tags.emplace("BrachyAccessoryDeviceNominalThickness", Tag(0x300a, 0x026a)); public_tags.emplace("BrachyAccessoryDeviceNominalTransmission", Tag(0x300a, 0x026c)); public_tags.emplace("ChannelEffectiveLength", Tag(0x300a, 0x0271)); public_tags.emplace("ChannelInnerLength", Tag(0x300a, 0x0272)); public_tags.emplace("AfterloaderChannelID", Tag(0x300a, 0x0273)); public_tags.emplace("SourceApplicatorTipLength", Tag(0x300a, 0x0274)); public_tags.emplace("ChannelSequence", Tag(0x300a, 0x0280)); public_tags.emplace("ChannelNumber", Tag(0x300a, 0x0282)); public_tags.emplace("ChannelLength", Tag(0x300a, 0x0284)); public_tags.emplace("ChannelTotalTime", Tag(0x300a, 0x0286)); public_tags.emplace("SourceMovementType", Tag(0x300a, 0x0288)); public_tags.emplace("NumberOfPulses", Tag(0x300a, 0x028a)); public_tags.emplace("PulseRepetitionInterval", Tag(0x300a, 0x028c)); public_tags.emplace("SourceApplicatorNumber", Tag(0x300a, 0x0290)); public_tags.emplace("SourceApplicatorID", Tag(0x300a, 0x0291)); public_tags.emplace("SourceApplicatorType", Tag(0x300a, 0x0292)); public_tags.emplace("SourceApplicatorName", Tag(0x300a, 0x0294)); public_tags.emplace("SourceApplicatorLength", Tag(0x300a, 0x0296)); public_tags.emplace("SourceApplicatorManufacturer", Tag(0x300a, 0x0298)); public_tags.emplace("SourceApplicatorWallNominalThickness", Tag(0x300a, 0x029c)); public_tags.emplace("SourceApplicatorWallNominalTransmission", Tag(0x300a, 0x029e)); public_tags.emplace("SourceApplicatorStepSize", Tag(0x300a, 0x02a0)); public_tags.emplace("TransferTubeNumber", Tag(0x300a, 0x02a2)); public_tags.emplace("TransferTubeLength", Tag(0x300a, 0x02a4)); public_tags.emplace("ChannelShieldSequence", Tag(0x300a, 0x02b0)); public_tags.emplace("ChannelShieldNumber", Tag(0x300a, 0x02b2)); public_tags.emplace("ChannelShieldID", Tag(0x300a, 0x02b3)); public_tags.emplace("ChannelShieldName", Tag(0x300a, 0x02b4)); public_tags.emplace("ChannelShieldNominalThickness", Tag(0x300a, 0x02b8)); public_tags.emplace("ChannelShieldNominalTransmission", Tag(0x300a, 0x02ba)); public_tags.emplace("FinalCumulativeTimeWeight", Tag(0x300a, 0x02c8)); public_tags.emplace("BrachyControlPointSequence", Tag(0x300a, 0x02d0)); public_tags.emplace("ControlPointRelativePosition", Tag(0x300a, 0x02d2)); public_tags.emplace("ControlPoint3DPosition", Tag(0x300a, 0x02d4)); public_tags.emplace("CumulativeTimeWeight", Tag(0x300a, 0x02d6)); public_tags.emplace("CompensatorDivergence", Tag(0x300a, 0x02e0)); public_tags.emplace("CompensatorMountingPosition", Tag(0x300a, 0x02e1)); public_tags.emplace("SourceToCompensatorDistance", Tag(0x300a, 0x02e2)); public_tags.emplace("TotalCompensatorTrayWaterEquivalentThickness", Tag(0x300a, 0x02e3)); public_tags.emplace("IsocenterToCompensatorTrayDistance", Tag(0x300a, 0x02e4)); public_tags.emplace("CompensatorColumnOffset", Tag(0x300a, 0x02e5)); public_tags.emplace("IsocenterToCompensatorDistances", Tag(0x300a, 0x02e6)); public_tags.emplace("CompensatorRelativeStoppingPowerRatio", Tag(0x300a, 0x02e7)); public_tags.emplace("CompensatorMillingToolDiameter", Tag(0x300a, 0x02e8)); public_tags.emplace("IonRangeCompensatorSequence", Tag(0x300a, 0x02ea)); public_tags.emplace("CompensatorDescription", Tag(0x300a, 0x02eb)); public_tags.emplace("RadiationMassNumber", Tag(0x300a, 0x0302)); public_tags.emplace("RadiationAtomicNumber", Tag(0x300a, 0x0304)); public_tags.emplace("RadiationChargeState", Tag(0x300a, 0x0306)); public_tags.emplace("ScanMode", Tag(0x300a, 0x0308)); public_tags.emplace("ModulatedScanModeType", Tag(0x300a, 0x0309)); public_tags.emplace("VirtualSourceAxisDistances", Tag(0x300a, 0x030a)); public_tags.emplace("SnoutSequence", Tag(0x300a, 0x030c)); public_tags.emplace("SnoutPosition", Tag(0x300a, 0x030d)); public_tags.emplace("SnoutID", Tag(0x300a, 0x030f)); public_tags.emplace("NumberOfRangeShifters", Tag(0x300a, 0x0312)); public_tags.emplace("RangeShifterSequence", Tag(0x300a, 0x0314)); public_tags.emplace("RangeShifterNumber", Tag(0x300a, 0x0316)); public_tags.emplace("RangeShifterID", Tag(0x300a, 0x0318)); public_tags.emplace("RangeShifterType", Tag(0x300a, 0x0320)); public_tags.emplace("RangeShifterDescription", Tag(0x300a, 0x0322)); public_tags.emplace("NumberOfLateralSpreadingDevices", Tag(0x300a, 0x0330)); public_tags.emplace("LateralSpreadingDeviceSequence", Tag(0x300a, 0x0332)); public_tags.emplace("LateralSpreadingDeviceNumber", Tag(0x300a, 0x0334)); public_tags.emplace("LateralSpreadingDeviceID", Tag(0x300a, 0x0336)); public_tags.emplace("LateralSpreadingDeviceType", Tag(0x300a, 0x0338)); public_tags.emplace("LateralSpreadingDeviceDescription", Tag(0x300a, 0x033a)); public_tags.emplace("LateralSpreadingDeviceWaterEquivalentThickness", Tag(0x300a, 0x033c)); public_tags.emplace("NumberOfRangeModulators", Tag(0x300a, 0x0340)); public_tags.emplace("RangeModulatorSequence", Tag(0x300a, 0x0342)); public_tags.emplace("RangeModulatorNumber", Tag(0x300a, 0x0344)); public_tags.emplace("RangeModulatorID", Tag(0x300a, 0x0346)); public_tags.emplace("RangeModulatorType", Tag(0x300a, 0x0348)); public_tags.emplace("RangeModulatorDescription", Tag(0x300a, 0x034a)); public_tags.emplace("BeamCurrentModulationID", Tag(0x300a, 0x034c)); public_tags.emplace("PatientSupportType", Tag(0x300a, 0x0350)); public_tags.emplace("PatientSupportID", Tag(0x300a, 0x0352)); public_tags.emplace("PatientSupportAccessoryCode", Tag(0x300a, 0x0354)); public_tags.emplace("TrayAccessoryCode", Tag(0x300a, 0x0355)); public_tags.emplace("FixationLightAzimuthalAngle", Tag(0x300a, 0x0356)); public_tags.emplace("FixationLightPolarAngle", Tag(0x300a, 0x0358)); public_tags.emplace("MetersetRate", Tag(0x300a, 0x035a)); public_tags.emplace("RangeShifterSettingsSequence", Tag(0x300a, 0x0360)); public_tags.emplace("RangeShifterSetting", Tag(0x300a, 0x0362)); public_tags.emplace("IsocenterToRangeShifterDistance", Tag(0x300a, 0x0364)); public_tags.emplace("RangeShifterWaterEquivalentThickness", Tag(0x300a, 0x0366)); public_tags.emplace("LateralSpreadingDeviceSettingsSequence", Tag(0x300a, 0x0370)); public_tags.emplace("LateralSpreadingDeviceSetting", Tag(0x300a, 0x0372)); public_tags.emplace("IsocenterToLateralSpreadingDeviceDistance", Tag(0x300a, 0x0374)); public_tags.emplace("RangeModulatorSettingsSequence", Tag(0x300a, 0x0380)); public_tags.emplace("RangeModulatorGatingStartValue", Tag(0x300a, 0x0382)); public_tags.emplace("RangeModulatorGatingStopValue", Tag(0x300a, 0x0384)); public_tags.emplace("RangeModulatorGatingStartWaterEquivalentThickness", Tag(0x300a, 0x0386)); public_tags.emplace("RangeModulatorGatingStopWaterEquivalentThickness", Tag(0x300a, 0x0388)); public_tags.emplace("IsocenterToRangeModulatorDistance", Tag(0x300a, 0x038a)); public_tags.emplace("ScanSpotTimeOffset", Tag(0x300a, 0x038f)); public_tags.emplace("ScanSpotTuneID", Tag(0x300a, 0x0390)); public_tags.emplace("ScanSpotPrescribedIndices", Tag(0x300a, 0x0391)); public_tags.emplace("NumberOfScanSpotPositions", Tag(0x300a, 0x0392)); public_tags.emplace("ScanSpotReordered", Tag(0x300a, 0x0393)); public_tags.emplace("ScanSpotPositionMap", Tag(0x300a, 0x0394)); public_tags.emplace("ScanSpotReorderingAllowed", Tag(0x300a, 0x0395)); public_tags.emplace("ScanSpotMetersetWeights", Tag(0x300a, 0x0396)); public_tags.emplace("ScanningSpotSize", Tag(0x300a, 0x0398)); public_tags.emplace("NumberOfPaintings", Tag(0x300a, 0x039a)); public_tags.emplace("IonToleranceTableSequence", Tag(0x300a, 0x03a0)); public_tags.emplace("IonBeamSequence", Tag(0x300a, 0x03a2)); public_tags.emplace("IonBeamLimitingDeviceSequence", Tag(0x300a, 0x03a4)); public_tags.emplace("IonBlockSequence", Tag(0x300a, 0x03a6)); public_tags.emplace("IonControlPointSequence", Tag(0x300a, 0x03a8)); public_tags.emplace("IonWedgeSequence", Tag(0x300a, 0x03aa)); public_tags.emplace("IonWedgePositionSequence", Tag(0x300a, 0x03ac)); public_tags.emplace("ReferencedSetupImageSequence", Tag(0x300a, 0x0401)); public_tags.emplace("SetupImageComment", Tag(0x300a, 0x0402)); public_tags.emplace("MotionSynchronizationSequence", Tag(0x300a, 0x0410)); public_tags.emplace("ControlPointOrientation", Tag(0x300a, 0x0412)); public_tags.emplace("GeneralAccessorySequence", Tag(0x300a, 0x0420)); public_tags.emplace("GeneralAccessoryID", Tag(0x300a, 0x0421)); public_tags.emplace("GeneralAccessoryDescription", Tag(0x300a, 0x0422)); public_tags.emplace("GeneralAccessoryType", Tag(0x300a, 0x0423)); public_tags.emplace("GeneralAccessoryNumber", Tag(0x300a, 0x0424)); public_tags.emplace("SourceToGeneralAccessoryDistance", Tag(0x300a, 0x0425)); public_tags.emplace("IsocenterToGeneralAccessoryDistance", Tag(0x300a, 0x0426)); public_tags.emplace("ApplicatorGeometrySequence", Tag(0x300a, 0x0431)); public_tags.emplace("ApplicatorApertureShape", Tag(0x300a, 0x0432)); public_tags.emplace("ApplicatorOpening", Tag(0x300a, 0x0433)); public_tags.emplace("ApplicatorOpeningX", Tag(0x300a, 0x0434)); public_tags.emplace("ApplicatorOpeningY", Tag(0x300a, 0x0435)); public_tags.emplace("SourceToApplicatorMountingPositionDistance", Tag(0x300a, 0x0436)); public_tags.emplace("NumberOfBlockSlabItems", Tag(0x300a, 0x0440)); public_tags.emplace("BlockSlabSequence", Tag(0x300a, 0x0441)); public_tags.emplace("BlockSlabThickness", Tag(0x300a, 0x0442)); public_tags.emplace("BlockSlabNumber", Tag(0x300a, 0x0443)); public_tags.emplace("DeviceMotionControlSequence", Tag(0x300a, 0x0450)); public_tags.emplace("DeviceMotionExecutionMode", Tag(0x300a, 0x0451)); public_tags.emplace("DeviceMotionObservationMode", Tag(0x300a, 0x0452)); public_tags.emplace("DeviceMotionParameterCodeSequence", Tag(0x300a, 0x0453)); public_tags.emplace("DistalDepthFraction", Tag(0x300a, 0x0501)); public_tags.emplace("DistalDepth", Tag(0x300a, 0x0502)); public_tags.emplace("NominalRangeModulationFractions", Tag(0x300a, 0x0503)); public_tags.emplace("NominalRangeModulatedRegionDepths", Tag(0x300a, 0x0504)); public_tags.emplace("DepthDoseParametersSequence", Tag(0x300a, 0x0505)); public_tags.emplace("DeliveredDepthDoseParametersSequence", Tag(0x300a, 0x0506)); public_tags.emplace("DeliveredDistalDepthFraction", Tag(0x300a, 0x0507)); public_tags.emplace("DeliveredDistalDepth", Tag(0x300a, 0x0508)); public_tags.emplace("DeliveredNominalRangeModulationFractions", Tag(0x300a, 0x0509)); public_tags.emplace("DeliveredNominalRangeModulatedRegionDepths", Tag(0x300a, 0x0510)); public_tags.emplace("DeliveredReferenceDoseDefinition", Tag(0x300a, 0x0511)); public_tags.emplace("ReferenceDoseDefinition", Tag(0x300a, 0x0512)); public_tags.emplace("RTControlPointIndex", Tag(0x300a, 0x0600)); public_tags.emplace("RadiationGenerationModeIndex", Tag(0x300a, 0x0601)); public_tags.emplace("ReferencedDefinedDeviceIndex", Tag(0x300a, 0x0602)); public_tags.emplace("RadiationDoseIdentificationIndex", Tag(0x300a, 0x0603)); public_tags.emplace("NumberOfRTControlPoints", Tag(0x300a, 0x0604)); public_tags.emplace("ReferencedRadiationGenerationModeIndex", Tag(0x300a, 0x0605)); public_tags.emplace("TreatmentPositionIndex", Tag(0x300a, 0x0606)); public_tags.emplace("ReferencedDeviceIndex", Tag(0x300a, 0x0607)); public_tags.emplace("TreatmentPositionGroupLabel", Tag(0x300a, 0x0608)); public_tags.emplace("TreatmentPositionGroupUID", Tag(0x300a, 0x0609)); public_tags.emplace("TreatmentPositionGroupSequence", Tag(0x300a, 0x060a)); public_tags.emplace("ReferencedTreatmentPositionIndex", Tag(0x300a, 0x060b)); public_tags.emplace("ReferencedRadiationDoseIdentificationIndex", Tag(0x300a, 0x060c)); public_tags.emplace("RTAccessoryHolderWaterEquivalentThickness", Tag(0x300a, 0x060d)); public_tags.emplace("ReferencedRTAccessoryHolderDeviceIndex", Tag(0x300a, 0x060e)); public_tags.emplace("RTAccessoryHolderSlotExistenceFlag", Tag(0x300a, 0x060f)); public_tags.emplace("RTAccessoryHolderSlotSequence", Tag(0x300a, 0x0610)); public_tags.emplace("RTAccessoryHolderSlotID", Tag(0x300a, 0x0611)); public_tags.emplace("RTAccessoryHolderSlotDistance", Tag(0x300a, 0x0612)); public_tags.emplace("RTAccessorySlotDistance", Tag(0x300a, 0x0613)); public_tags.emplace("RTAccessoryHolderDefinitionSequence", Tag(0x300a, 0x0614)); public_tags.emplace("RTAccessoryDeviceSlotID", Tag(0x300a, 0x0615)); public_tags.emplace("RTRadiationSequence", Tag(0x300a, 0x0616)); public_tags.emplace("RadiationDoseSequence", Tag(0x300a, 0x0617)); public_tags.emplace("RadiationDoseIdentificationSequence", Tag(0x300a, 0x0618)); public_tags.emplace("RadiationDoseIdentificationLabel", Tag(0x300a, 0x0619)); public_tags.emplace("ReferenceDoseType", Tag(0x300a, 0x061a)); public_tags.emplace("PrimaryDoseValueIndicator", Tag(0x300a, 0x061b)); public_tags.emplace("DoseValuesSequence", Tag(0x300a, 0x061c)); public_tags.emplace("DoseValuePurpose", Tag(0x300a, 0x061d)); public_tags.emplace("ReferenceDosePointCoordinates", Tag(0x300a, 0x061e)); public_tags.emplace("RadiationDoseValuesParametersSequence", Tag(0x300a, 0x061f)); public_tags.emplace("MetersetToDoseMappingSequence", Tag(0x300a, 0x0620)); public_tags.emplace("ExpectedInVivoMeasurementValuesSequence", Tag(0x300a, 0x0621)); public_tags.emplace("ExpectedInVivoMeasurementValueIndex", Tag(0x300a, 0x0622)); public_tags.emplace("RadiationDoseInVivoMeasurementLabel", Tag(0x300a, 0x0623)); public_tags.emplace("RadiationDoseCentralAxisDisplacement", Tag(0x300a, 0x0624)); public_tags.emplace("RadiationDoseValue", Tag(0x300a, 0x0625)); public_tags.emplace("RadiationDoseSourceToSkinDistance", Tag(0x300a, 0x0626)); public_tags.emplace("RadiationDoseMeasurementPointCoordinates", Tag(0x300a, 0x0627)); public_tags.emplace("RadiationDoseSourceToExternalContourDistance", Tag(0x300a, 0x0628)); public_tags.emplace("RTToleranceSetSequence", Tag(0x300a, 0x0629)); public_tags.emplace("RTToleranceSetLabel", Tag(0x300a, 0x062a)); public_tags.emplace("AttributeToleranceValuesSequence", Tag(0x300a, 0x062b)); public_tags.emplace("ToleranceValue", Tag(0x300a, 0x062c)); public_tags.emplace("PatientSupportPositionToleranceSequence", Tag(0x300a, 0x062d)); public_tags.emplace("TreatmentTimeLimit", Tag(0x300a, 0x062e)); public_tags.emplace("CArmPhotonElectronControlPointSequence", Tag(0x300a, 0x062f)); public_tags.emplace("ReferencedRTRadiationSequence", Tag(0x300a, 0x0630)); public_tags.emplace("ReferencedRTInstanceSequence", Tag(0x300a, 0x0631)); public_tags.emplace("ReferencedRTPatientSetupSequence", Tag(0x300a, 0x0632)); public_tags.emplace("SourceToPatientSurfaceDistance", Tag(0x300a, 0x0634)); public_tags.emplace("TreatmentMachineSpecialModeCodeSequence", Tag(0x300a, 0x0635)); public_tags.emplace("IntendedNumberOfFractions", Tag(0x300a, 0x0636)); public_tags.emplace("RTRadiationSetIntent", Tag(0x300a, 0x0637)); public_tags.emplace("RTRadiationPhysicalAndGeometricContentDetailFlag", Tag(0x300a, 0x0638)); public_tags.emplace("RTRecordFlag", Tag(0x300a, 0x0639)); public_tags.emplace("TreatmentDeviceIdentificationSequence", Tag(0x300a, 0x063a)); public_tags.emplace("ReferencedRTPhysicianIntentSequence", Tag(0x300a, 0x063b)); public_tags.emplace("CumulativeMeterset", Tag(0x300a, 0x063c)); public_tags.emplace("DeliveryRate", Tag(0x300a, 0x063d)); public_tags.emplace("DeliveryRateUnitSequence", Tag(0x300a, 0x063e)); public_tags.emplace("TreatmentPositionSequence", Tag(0x300a, 0x063f)); public_tags.emplace("RadiationSourceAxisDistance", Tag(0x300a, 0x0640)); public_tags.emplace("NumberOfRTBeamLimitingDevices", Tag(0x300a, 0x0641)); public_tags.emplace("RTBeamLimitingDeviceProximalDistance", Tag(0x300a, 0x0642)); public_tags.emplace("RTBeamLimitingDeviceDistalDistance", Tag(0x300a, 0x0643)); public_tags.emplace("ParallelRTBeamDelimiterDeviceOrientationLabelCodeSequence", Tag(0x300a, 0x0644)); public_tags.emplace("BeamModifierOrientationAngle", Tag(0x300a, 0x0645)); public_tags.emplace("FixedRTBeamDelimiterDeviceSequence", Tag(0x300a, 0x0646)); public_tags.emplace("ParallelRTBeamDelimiterDeviceSequence", Tag(0x300a, 0x0647)); public_tags.emplace("NumberOfParallelRTBeamDelimiters", Tag(0x300a, 0x0648)); public_tags.emplace("ParallelRTBeamDelimiterBoundaries", Tag(0x300a, 0x0649)); public_tags.emplace("ParallelRTBeamDelimiterPositions", Tag(0x300a, 0x064a)); public_tags.emplace("RTBeamLimitingDeviceOffset", Tag(0x300a, 0x064b)); public_tags.emplace("RTBeamDelimiterGeometrySequence", Tag(0x300a, 0x064c)); public_tags.emplace("RTBeamLimitingDeviceDefinitionSequence", Tag(0x300a, 0x064d)); public_tags.emplace("ParallelRTBeamDelimiterOpeningMode", Tag(0x300a, 0x064e)); public_tags.emplace("ParallelRTBeamDelimiterLeafMountingSide", Tag(0x300a, 0x064f)); public_tags.emplace("PatientSetupUID", Tag(0x300a, 0x0650)); public_tags.emplace("WedgeDefinitionSequence", Tag(0x300a, 0x0651)); public_tags.emplace("RadiationBeamWedgeAngle", Tag(0x300a, 0x0652)); public_tags.emplace("RadiationBeamWedgeThinEdgeDistance", Tag(0x300a, 0x0653)); public_tags.emplace("RadiationBeamEffectiveWedgeAngle", Tag(0x300a, 0x0654)); public_tags.emplace("NumberOfWedgePositions", Tag(0x300a, 0x0655)); public_tags.emplace("RTBeamLimitingDeviceOpeningSequence", Tag(0x300a, 0x0656)); public_tags.emplace("NumberOfRTBeamLimitingDeviceOpenings", Tag(0x300a, 0x0657)); public_tags.emplace("RadiationDosimeterUnitSequence", Tag(0x300a, 0x0658)); public_tags.emplace("RTDeviceDistanceReferenceLocationCodeSequence", Tag(0x300a, 0x0659)); public_tags.emplace("RadiationDeviceConfigurationAndCommissioningKeySequence", Tag(0x300a, 0x065a)); public_tags.emplace("PatientSupportPositionParameterSequence", Tag(0x300a, 0x065b)); public_tags.emplace("PatientSupportPositionSpecificationMethod", Tag(0x300a, 0x065c)); public_tags.emplace("PatientSupportPositionDeviceParameterSequence", Tag(0x300a, 0x065d)); public_tags.emplace("DeviceOrderIndex", Tag(0x300a, 0x065e)); public_tags.emplace("PatientSupportPositionParameterOrderIndex", Tag(0x300a, 0x065f)); public_tags.emplace("PatientSupportPositionDeviceToleranceSequence", Tag(0x300a, 0x0660)); public_tags.emplace("PatientSupportPositionToleranceOrderIndex", Tag(0x300a, 0x0661)); public_tags.emplace("CompensatorDefinitionSequence", Tag(0x300a, 0x0662)); public_tags.emplace("CompensatorMapOrientation", Tag(0x300a, 0x0663)); public_tags.emplace("CompensatorProximalThicknessMap", Tag(0x300a, 0x0664)); public_tags.emplace("CompensatorDistalThicknessMap", Tag(0x300a, 0x0665)); public_tags.emplace("CompensatorBasePlaneOffset", Tag(0x300a, 0x0666)); public_tags.emplace("CompensatorShapeFabricationCodeSequence", Tag(0x300a, 0x0667)); public_tags.emplace("CompensatorShapeSequence", Tag(0x300a, 0x0668)); public_tags.emplace("RadiationBeamCompensatorMillingToolDiameter", Tag(0x300a, 0x0669)); public_tags.emplace("BlockDefinitionSequence", Tag(0x300a, 0x066a)); public_tags.emplace("BlockEdgeData", Tag(0x300a, 0x066b)); public_tags.emplace("BlockOrientation", Tag(0x300a, 0x066c)); public_tags.emplace("RadiationBeamBlockThickness", Tag(0x300a, 0x066d)); public_tags.emplace("RadiationBeamBlockSlabThickness", Tag(0x300a, 0x066e)); public_tags.emplace("BlockEdgeDataSequence", Tag(0x300a, 0x066f)); public_tags.emplace("NumberOfRTAccessoryHolders", Tag(0x300a, 0x0670)); public_tags.emplace("GeneralAccessoryDefinitionSequence", Tag(0x300a, 0x0671)); public_tags.emplace("NumberOfGeneralAccessories", Tag(0x300a, 0x0672)); public_tags.emplace("BolusDefinitionSequence", Tag(0x300a, 0x0673)); public_tags.emplace("NumberOfBoluses", Tag(0x300a, 0x0674)); public_tags.emplace("EquipmentFrameOfReferenceUID", Tag(0x300a, 0x0675)); public_tags.emplace("EquipmentFrameOfReferenceDescription", Tag(0x300a, 0x0676)); public_tags.emplace("EquipmentReferencePointCoordinatesSequence", Tag(0x300a, 0x0677)); public_tags.emplace("EquipmentReferencePointCodeSequence", Tag(0x300a, 0x0678)); public_tags.emplace("RTBeamLimitingDeviceAngle", Tag(0x300a, 0x0679)); public_tags.emplace("SourceRollAngle", Tag(0x300a, 0x067a)); public_tags.emplace("RadiationGenerationModeSequence", Tag(0x300a, 0x067b)); public_tags.emplace("RadiationGenerationModeLabel", Tag(0x300a, 0x067c)); public_tags.emplace("RadiationGenerationModeDescription", Tag(0x300a, 0x067d)); public_tags.emplace("RadiationGenerationModeMachineCodeSequence", Tag(0x300a, 0x067e)); public_tags.emplace("RadiationTypeCodeSequence", Tag(0x300a, 0x067f)); public_tags.emplace("NominalEnergy", Tag(0x300a, 0x0680)); public_tags.emplace("MinimumNominalEnergy", Tag(0x300a, 0x0681)); public_tags.emplace("MaximumNominalEnergy", Tag(0x300a, 0x0682)); public_tags.emplace("RadiationFluenceModifierCodeSequence", Tag(0x300a, 0x0683)); public_tags.emplace("EnergyUnitCodeSequence", Tag(0x300a, 0x0684)); public_tags.emplace("NumberOfRadiationGenerationModes", Tag(0x300a, 0x0685)); public_tags.emplace("PatientSupportDevicesSequence", Tag(0x300a, 0x0686)); public_tags.emplace("NumberOfPatientSupportDevices", Tag(0x300a, 0x0687)); public_tags.emplace("RTBeamModifierDefinitionDistance", Tag(0x300a, 0x0688)); public_tags.emplace("BeamAreaLimitSequence", Tag(0x300a, 0x0689)); public_tags.emplace("ReferencedRTPrescriptionSequence", Tag(0x300a, 0x068a)); } } }odil-0.11.0/src/odil/registry_300a.h000066400000000000000000000703121362244656000170150ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_300a #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_300a #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const RTPlanLabel(0x300a, 0x0002); Tag const RTPlanName(0x300a, 0x0003); Tag const RTPlanDescription(0x300a, 0x0004); Tag const RTPlanDate(0x300a, 0x0006); Tag const RTPlanTime(0x300a, 0x0007); Tag const TreatmentProtocols(0x300a, 0x0009); Tag const PlanIntent(0x300a, 0x000a); Tag const TreatmentSites(0x300a, 0x000b); Tag const RTPlanGeometry(0x300a, 0x000c); Tag const PrescriptionDescription(0x300a, 0x000e); Tag const DoseReferenceSequence(0x300a, 0x0010); Tag const DoseReferenceNumber(0x300a, 0x0012); Tag const DoseReferenceUID(0x300a, 0x0013); Tag const DoseReferenceStructureType(0x300a, 0x0014); Tag const NominalBeamEnergyUnit(0x300a, 0x0015); Tag const DoseReferenceDescription(0x300a, 0x0016); Tag const DoseReferencePointCoordinates(0x300a, 0x0018); Tag const NominalPriorDose(0x300a, 0x001a); Tag const DoseReferenceType(0x300a, 0x0020); Tag const ConstraintWeight(0x300a, 0x0021); Tag const DeliveryWarningDose(0x300a, 0x0022); Tag const DeliveryMaximumDose(0x300a, 0x0023); Tag const TargetMinimumDose(0x300a, 0x0025); Tag const TargetPrescriptionDose(0x300a, 0x0026); Tag const TargetMaximumDose(0x300a, 0x0027); Tag const TargetUnderdoseVolumeFraction(0x300a, 0x0028); Tag const OrganAtRiskFullVolumeDose(0x300a, 0x002a); Tag const OrganAtRiskLimitDose(0x300a, 0x002b); Tag const OrganAtRiskMaximumDose(0x300a, 0x002c); Tag const OrganAtRiskOverdoseVolumeFraction(0x300a, 0x002d); Tag const ToleranceTableSequence(0x300a, 0x0040); Tag const ToleranceTableNumber(0x300a, 0x0042); Tag const ToleranceTableLabel(0x300a, 0x0043); Tag const GantryAngleTolerance(0x300a, 0x0044); Tag const BeamLimitingDeviceAngleTolerance(0x300a, 0x0046); Tag const BeamLimitingDeviceToleranceSequence(0x300a, 0x0048); Tag const BeamLimitingDevicePositionTolerance(0x300a, 0x004a); Tag const SnoutPositionTolerance(0x300a, 0x004b); Tag const PatientSupportAngleTolerance(0x300a, 0x004c); Tag const TableTopEccentricAngleTolerance(0x300a, 0x004e); Tag const TableTopPitchAngleTolerance(0x300a, 0x004f); Tag const TableTopRollAngleTolerance(0x300a, 0x0050); Tag const TableTopVerticalPositionTolerance(0x300a, 0x0051); Tag const TableTopLongitudinalPositionTolerance(0x300a, 0x0052); Tag const TableTopLateralPositionTolerance(0x300a, 0x0053); Tag const RTPlanRelationship(0x300a, 0x0055); Tag const FractionGroupSequence(0x300a, 0x0070); Tag const FractionGroupNumber(0x300a, 0x0071); Tag const FractionGroupDescription(0x300a, 0x0072); Tag const NumberOfFractionsPlanned(0x300a, 0x0078); Tag const NumberOfFractionPatternDigitsPerDay(0x300a, 0x0079); Tag const RepeatFractionCycleLength(0x300a, 0x007a); Tag const FractionPattern(0x300a, 0x007b); Tag const NumberOfBeams(0x300a, 0x0080); Tag const BeamDoseSpecificationPoint(0x300a, 0x0082); Tag const ReferencedDoseReferenceUID(0x300a, 0x0083); Tag const BeamDose(0x300a, 0x0084); Tag const BeamMeterset(0x300a, 0x0086); Tag const BeamDosePointDepth(0x300a, 0x0088); Tag const BeamDosePointEquivalentDepth(0x300a, 0x0089); Tag const BeamDosePointSSD(0x300a, 0x008a); Tag const BeamDoseMeaning(0x300a, 0x008b); Tag const BeamDoseVerificationControlPointSequence(0x300a, 0x008c); Tag const AverageBeamDosePointDepth(0x300a, 0x008d); Tag const AverageBeamDosePointEquivalentDepth(0x300a, 0x008e); Tag const AverageBeamDosePointSSD(0x300a, 0x008f); Tag const BeamDoseType(0x300a, 0x0090); Tag const AlternateBeamDose(0x300a, 0x0091); Tag const AlternateBeamDoseType(0x300a, 0x0092); Tag const DepthValueAveragingFlag(0x300a, 0x0093); Tag const BeamDosePointSourceToExternalContourDistance(0x300a, 0x0094); Tag const NumberOfBrachyApplicationSetups(0x300a, 0x00a0); Tag const BrachyApplicationSetupDoseSpecificationPoint(0x300a, 0x00a2); Tag const BrachyApplicationSetupDose(0x300a, 0x00a4); Tag const BeamSequence(0x300a, 0x00b0); Tag const TreatmentMachineName(0x300a, 0x00b2); Tag const PrimaryDosimeterUnit(0x300a, 0x00b3); Tag const SourceAxisDistance(0x300a, 0x00b4); Tag const BeamLimitingDeviceSequence(0x300a, 0x00b6); Tag const RTBeamLimitingDeviceType(0x300a, 0x00b8); Tag const SourceToBeamLimitingDeviceDistance(0x300a, 0x00ba); Tag const IsocenterToBeamLimitingDeviceDistance(0x300a, 0x00bb); Tag const NumberOfLeafJawPairs(0x300a, 0x00bc); Tag const LeafPositionBoundaries(0x300a, 0x00be); Tag const BeamNumber(0x300a, 0x00c0); Tag const BeamName(0x300a, 0x00c2); Tag const BeamDescription(0x300a, 0x00c3); Tag const BeamType(0x300a, 0x00c4); Tag const BeamDeliveryDurationLimit(0x300a, 0x00c5); Tag const RadiationType(0x300a, 0x00c6); Tag const HighDoseTechniqueType(0x300a, 0x00c7); Tag const ReferenceImageNumber(0x300a, 0x00c8); Tag const PlannedVerificationImageSequence(0x300a, 0x00ca); Tag const ImagingDeviceSpecificAcquisitionParameters(0x300a, 0x00cc); Tag const TreatmentDeliveryType(0x300a, 0x00ce); Tag const NumberOfWedges(0x300a, 0x00d0); Tag const WedgeSequence(0x300a, 0x00d1); Tag const WedgeNumber(0x300a, 0x00d2); Tag const WedgeType(0x300a, 0x00d3); Tag const WedgeID(0x300a, 0x00d4); Tag const WedgeAngle(0x300a, 0x00d5); Tag const WedgeFactor(0x300a, 0x00d6); Tag const TotalWedgeTrayWaterEquivalentThickness(0x300a, 0x00d7); Tag const WedgeOrientation(0x300a, 0x00d8); Tag const IsocenterToWedgeTrayDistance(0x300a, 0x00d9); Tag const SourceToWedgeTrayDistance(0x300a, 0x00da); Tag const WedgeThinEdgePosition(0x300a, 0x00db); Tag const BolusID(0x300a, 0x00dc); Tag const BolusDescription(0x300a, 0x00dd); Tag const EffectiveWedgeAngle(0x300a, 0x00de); Tag const NumberOfCompensators(0x300a, 0x00e0); Tag const MaterialID(0x300a, 0x00e1); Tag const TotalCompensatorTrayFactor(0x300a, 0x00e2); Tag const CompensatorSequence(0x300a, 0x00e3); Tag const CompensatorNumber(0x300a, 0x00e4); Tag const CompensatorID(0x300a, 0x00e5); Tag const SourceToCompensatorTrayDistance(0x300a, 0x00e6); Tag const CompensatorRows(0x300a, 0x00e7); Tag const CompensatorColumns(0x300a, 0x00e8); Tag const CompensatorPixelSpacing(0x300a, 0x00e9); Tag const CompensatorPosition(0x300a, 0x00ea); Tag const CompensatorTransmissionData(0x300a, 0x00eb); Tag const CompensatorThicknessData(0x300a, 0x00ec); Tag const NumberOfBoli(0x300a, 0x00ed); Tag const CompensatorType(0x300a, 0x00ee); Tag const CompensatorTrayID(0x300a, 0x00ef); Tag const NumberOfBlocks(0x300a, 0x00f0); Tag const TotalBlockTrayFactor(0x300a, 0x00f2); Tag const TotalBlockTrayWaterEquivalentThickness(0x300a, 0x00f3); Tag const BlockSequence(0x300a, 0x00f4); Tag const BlockTrayID(0x300a, 0x00f5); Tag const SourceToBlockTrayDistance(0x300a, 0x00f6); Tag const IsocenterToBlockTrayDistance(0x300a, 0x00f7); Tag const BlockType(0x300a, 0x00f8); Tag const AccessoryCode(0x300a, 0x00f9); Tag const BlockDivergence(0x300a, 0x00fa); Tag const BlockMountingPosition(0x300a, 0x00fb); Tag const BlockNumber(0x300a, 0x00fc); Tag const BlockName(0x300a, 0x00fe); Tag const BlockThickness(0x300a, 0x0100); Tag const BlockTransmission(0x300a, 0x0102); Tag const BlockNumberOfPoints(0x300a, 0x0104); Tag const BlockData(0x300a, 0x0106); Tag const ApplicatorSequence(0x300a, 0x0107); Tag const ApplicatorID(0x300a, 0x0108); Tag const ApplicatorType(0x300a, 0x0109); Tag const ApplicatorDescription(0x300a, 0x010a); Tag const CumulativeDoseReferenceCoefficient(0x300a, 0x010c); Tag const FinalCumulativeMetersetWeight(0x300a, 0x010e); Tag const NumberOfControlPoints(0x300a, 0x0110); Tag const ControlPointSequence(0x300a, 0x0111); Tag const ControlPointIndex(0x300a, 0x0112); Tag const NominalBeamEnergy(0x300a, 0x0114); Tag const DoseRateSet(0x300a, 0x0115); Tag const WedgePositionSequence(0x300a, 0x0116); Tag const WedgePosition(0x300a, 0x0118); Tag const BeamLimitingDevicePositionSequence(0x300a, 0x011a); Tag const LeafJawPositions(0x300a, 0x011c); Tag const GantryAngle(0x300a, 0x011e); Tag const GantryRotationDirection(0x300a, 0x011f); Tag const BeamLimitingDeviceAngle(0x300a, 0x0120); Tag const BeamLimitingDeviceRotationDirection(0x300a, 0x0121); Tag const PatientSupportAngle(0x300a, 0x0122); Tag const PatientSupportRotationDirection(0x300a, 0x0123); Tag const TableTopEccentricAxisDistance(0x300a, 0x0124); Tag const TableTopEccentricAngle(0x300a, 0x0125); Tag const TableTopEccentricRotationDirection(0x300a, 0x0126); Tag const TableTopVerticalPosition(0x300a, 0x0128); Tag const TableTopLongitudinalPosition(0x300a, 0x0129); Tag const TableTopLateralPosition(0x300a, 0x012a); Tag const IsocenterPosition(0x300a, 0x012c); Tag const SurfaceEntryPoint(0x300a, 0x012e); Tag const SourceToSurfaceDistance(0x300a, 0x0130); Tag const AverageBeamDosePointSourceToExternalContourDistance(0x300a, 0x0131); Tag const SourceToExternalContourDistance(0x300a, 0x0132); Tag const ExternalContourEntryPoint(0x300a, 0x0133); Tag const CumulativeMetersetWeight(0x300a, 0x0134); Tag const TableTopPitchAngle(0x300a, 0x0140); Tag const TableTopPitchRotationDirection(0x300a, 0x0142); Tag const TableTopRollAngle(0x300a, 0x0144); Tag const TableTopRollRotationDirection(0x300a, 0x0146); Tag const HeadFixationAngle(0x300a, 0x0148); Tag const GantryPitchAngle(0x300a, 0x014a); Tag const GantryPitchRotationDirection(0x300a, 0x014c); Tag const GantryPitchAngleTolerance(0x300a, 0x014e); Tag const FixationEye(0x300a, 0x0150); Tag const ChairHeadFramePosition(0x300a, 0x0151); Tag const HeadFixationAngleTolerance(0x300a, 0x0152); Tag const ChairHeadFramePositionTolerance(0x300a, 0x0153); Tag const FixationLightAzimuthalAngleTolerance(0x300a, 0x0154); Tag const FixationLightPolarAngleTolerance(0x300a, 0x0155); Tag const PatientSetupSequence(0x300a, 0x0180); Tag const PatientSetupNumber(0x300a, 0x0182); Tag const PatientSetupLabel(0x300a, 0x0183); Tag const PatientAdditionalPosition(0x300a, 0x0184); Tag const FixationDeviceSequence(0x300a, 0x0190); Tag const FixationDeviceType(0x300a, 0x0192); Tag const FixationDeviceLabel(0x300a, 0x0194); Tag const FixationDeviceDescription(0x300a, 0x0196); Tag const FixationDevicePosition(0x300a, 0x0198); Tag const FixationDevicePitchAngle(0x300a, 0x0199); Tag const FixationDeviceRollAngle(0x300a, 0x019a); Tag const ShieldingDeviceSequence(0x300a, 0x01a0); Tag const ShieldingDeviceType(0x300a, 0x01a2); Tag const ShieldingDeviceLabel(0x300a, 0x01a4); Tag const ShieldingDeviceDescription(0x300a, 0x01a6); Tag const ShieldingDevicePosition(0x300a, 0x01a8); Tag const SetupTechnique(0x300a, 0x01b0); Tag const SetupTechniqueDescription(0x300a, 0x01b2); Tag const SetupDeviceSequence(0x300a, 0x01b4); Tag const SetupDeviceType(0x300a, 0x01b6); Tag const SetupDeviceLabel(0x300a, 0x01b8); Tag const SetupDeviceDescription(0x300a, 0x01ba); Tag const SetupDeviceParameter(0x300a, 0x01bc); Tag const SetupReferenceDescription(0x300a, 0x01d0); Tag const TableTopVerticalSetupDisplacement(0x300a, 0x01d2); Tag const TableTopLongitudinalSetupDisplacement(0x300a, 0x01d4); Tag const TableTopLateralSetupDisplacement(0x300a, 0x01d6); Tag const BrachyTreatmentTechnique(0x300a, 0x0200); Tag const BrachyTreatmentType(0x300a, 0x0202); Tag const TreatmentMachineSequence(0x300a, 0x0206); Tag const SourceSequence(0x300a, 0x0210); Tag const SourceNumber(0x300a, 0x0212); Tag const SourceType(0x300a, 0x0214); Tag const SourceManufacturer(0x300a, 0x0216); Tag const ActiveSourceDiameter(0x300a, 0x0218); Tag const ActiveSourceLength(0x300a, 0x021a); Tag const SourceModelID(0x300a, 0x021b); Tag const SourceDescription(0x300a, 0x021c); Tag const SourceEncapsulationNominalThickness(0x300a, 0x0222); Tag const SourceEncapsulationNominalTransmission(0x300a, 0x0224); Tag const SourceIsotopeName(0x300a, 0x0226); Tag const SourceIsotopeHalfLife(0x300a, 0x0228); Tag const SourceStrengthUnits(0x300a, 0x0229); Tag const ReferenceAirKermaRate(0x300a, 0x022a); Tag const SourceStrength(0x300a, 0x022b); Tag const SourceStrengthReferenceDate(0x300a, 0x022c); Tag const SourceStrengthReferenceTime(0x300a, 0x022e); Tag const ApplicationSetupSequence(0x300a, 0x0230); Tag const ApplicationSetupType(0x300a, 0x0232); Tag const ApplicationSetupNumber(0x300a, 0x0234); Tag const ApplicationSetupName(0x300a, 0x0236); Tag const ApplicationSetupManufacturer(0x300a, 0x0238); Tag const TemplateNumber(0x300a, 0x0240); Tag const TemplateType(0x300a, 0x0242); Tag const TemplateName(0x300a, 0x0244); Tag const TotalReferenceAirKerma(0x300a, 0x0250); Tag const BrachyAccessoryDeviceSequence(0x300a, 0x0260); Tag const BrachyAccessoryDeviceNumber(0x300a, 0x0262); Tag const BrachyAccessoryDeviceID(0x300a, 0x0263); Tag const BrachyAccessoryDeviceType(0x300a, 0x0264); Tag const BrachyAccessoryDeviceName(0x300a, 0x0266); Tag const BrachyAccessoryDeviceNominalThickness(0x300a, 0x026a); Tag const BrachyAccessoryDeviceNominalTransmission(0x300a, 0x026c); Tag const ChannelEffectiveLength(0x300a, 0x0271); Tag const ChannelInnerLength(0x300a, 0x0272); Tag const AfterloaderChannelID(0x300a, 0x0273); Tag const SourceApplicatorTipLength(0x300a, 0x0274); Tag const ChannelSequence(0x300a, 0x0280); Tag const ChannelNumber(0x300a, 0x0282); Tag const ChannelLength(0x300a, 0x0284); Tag const ChannelTotalTime(0x300a, 0x0286); Tag const SourceMovementType(0x300a, 0x0288); Tag const NumberOfPulses(0x300a, 0x028a); Tag const PulseRepetitionInterval(0x300a, 0x028c); Tag const SourceApplicatorNumber(0x300a, 0x0290); Tag const SourceApplicatorID(0x300a, 0x0291); Tag const SourceApplicatorType(0x300a, 0x0292); Tag const SourceApplicatorName(0x300a, 0x0294); Tag const SourceApplicatorLength(0x300a, 0x0296); Tag const SourceApplicatorManufacturer(0x300a, 0x0298); Tag const SourceApplicatorWallNominalThickness(0x300a, 0x029c); Tag const SourceApplicatorWallNominalTransmission(0x300a, 0x029e); Tag const SourceApplicatorStepSize(0x300a, 0x02a0); Tag const TransferTubeNumber(0x300a, 0x02a2); Tag const TransferTubeLength(0x300a, 0x02a4); Tag const ChannelShieldSequence(0x300a, 0x02b0); Tag const ChannelShieldNumber(0x300a, 0x02b2); Tag const ChannelShieldID(0x300a, 0x02b3); Tag const ChannelShieldName(0x300a, 0x02b4); Tag const ChannelShieldNominalThickness(0x300a, 0x02b8); Tag const ChannelShieldNominalTransmission(0x300a, 0x02ba); Tag const FinalCumulativeTimeWeight(0x300a, 0x02c8); Tag const BrachyControlPointSequence(0x300a, 0x02d0); Tag const ControlPointRelativePosition(0x300a, 0x02d2); Tag const ControlPoint3DPosition(0x300a, 0x02d4); Tag const CumulativeTimeWeight(0x300a, 0x02d6); Tag const CompensatorDivergence(0x300a, 0x02e0); Tag const CompensatorMountingPosition(0x300a, 0x02e1); Tag const SourceToCompensatorDistance(0x300a, 0x02e2); Tag const TotalCompensatorTrayWaterEquivalentThickness(0x300a, 0x02e3); Tag const IsocenterToCompensatorTrayDistance(0x300a, 0x02e4); Tag const CompensatorColumnOffset(0x300a, 0x02e5); Tag const IsocenterToCompensatorDistances(0x300a, 0x02e6); Tag const CompensatorRelativeStoppingPowerRatio(0x300a, 0x02e7); Tag const CompensatorMillingToolDiameter(0x300a, 0x02e8); Tag const IonRangeCompensatorSequence(0x300a, 0x02ea); Tag const CompensatorDescription(0x300a, 0x02eb); Tag const RadiationMassNumber(0x300a, 0x0302); Tag const RadiationAtomicNumber(0x300a, 0x0304); Tag const RadiationChargeState(0x300a, 0x0306); Tag const ScanMode(0x300a, 0x0308); Tag const ModulatedScanModeType(0x300a, 0x0309); Tag const VirtualSourceAxisDistances(0x300a, 0x030a); Tag const SnoutSequence(0x300a, 0x030c); Tag const SnoutPosition(0x300a, 0x030d); Tag const SnoutID(0x300a, 0x030f); Tag const NumberOfRangeShifters(0x300a, 0x0312); Tag const RangeShifterSequence(0x300a, 0x0314); Tag const RangeShifterNumber(0x300a, 0x0316); Tag const RangeShifterID(0x300a, 0x0318); Tag const RangeShifterType(0x300a, 0x0320); Tag const RangeShifterDescription(0x300a, 0x0322); Tag const NumberOfLateralSpreadingDevices(0x300a, 0x0330); Tag const LateralSpreadingDeviceSequence(0x300a, 0x0332); Tag const LateralSpreadingDeviceNumber(0x300a, 0x0334); Tag const LateralSpreadingDeviceID(0x300a, 0x0336); Tag const LateralSpreadingDeviceType(0x300a, 0x0338); Tag const LateralSpreadingDeviceDescription(0x300a, 0x033a); Tag const LateralSpreadingDeviceWaterEquivalentThickness(0x300a, 0x033c); Tag const NumberOfRangeModulators(0x300a, 0x0340); Tag const RangeModulatorSequence(0x300a, 0x0342); Tag const RangeModulatorNumber(0x300a, 0x0344); Tag const RangeModulatorID(0x300a, 0x0346); Tag const RangeModulatorType(0x300a, 0x0348); Tag const RangeModulatorDescription(0x300a, 0x034a); Tag const BeamCurrentModulationID(0x300a, 0x034c); Tag const PatientSupportType(0x300a, 0x0350); Tag const PatientSupportID(0x300a, 0x0352); Tag const PatientSupportAccessoryCode(0x300a, 0x0354); Tag const TrayAccessoryCode(0x300a, 0x0355); Tag const FixationLightAzimuthalAngle(0x300a, 0x0356); Tag const FixationLightPolarAngle(0x300a, 0x0358); Tag const MetersetRate(0x300a, 0x035a); Tag const RangeShifterSettingsSequence(0x300a, 0x0360); Tag const RangeShifterSetting(0x300a, 0x0362); Tag const IsocenterToRangeShifterDistance(0x300a, 0x0364); Tag const RangeShifterWaterEquivalentThickness(0x300a, 0x0366); Tag const LateralSpreadingDeviceSettingsSequence(0x300a, 0x0370); Tag const LateralSpreadingDeviceSetting(0x300a, 0x0372); Tag const IsocenterToLateralSpreadingDeviceDistance(0x300a, 0x0374); Tag const RangeModulatorSettingsSequence(0x300a, 0x0380); Tag const RangeModulatorGatingStartValue(0x300a, 0x0382); Tag const RangeModulatorGatingStopValue(0x300a, 0x0384); Tag const RangeModulatorGatingStartWaterEquivalentThickness(0x300a, 0x0386); Tag const RangeModulatorGatingStopWaterEquivalentThickness(0x300a, 0x0388); Tag const IsocenterToRangeModulatorDistance(0x300a, 0x038a); Tag const ScanSpotTimeOffset(0x300a, 0x038f); Tag const ScanSpotTuneID(0x300a, 0x0390); Tag const ScanSpotPrescribedIndices(0x300a, 0x0391); Tag const NumberOfScanSpotPositions(0x300a, 0x0392); Tag const ScanSpotReordered(0x300a, 0x0393); Tag const ScanSpotPositionMap(0x300a, 0x0394); Tag const ScanSpotReorderingAllowed(0x300a, 0x0395); Tag const ScanSpotMetersetWeights(0x300a, 0x0396); Tag const ScanningSpotSize(0x300a, 0x0398); Tag const NumberOfPaintings(0x300a, 0x039a); Tag const IonToleranceTableSequence(0x300a, 0x03a0); Tag const IonBeamSequence(0x300a, 0x03a2); Tag const IonBeamLimitingDeviceSequence(0x300a, 0x03a4); Tag const IonBlockSequence(0x300a, 0x03a6); Tag const IonControlPointSequence(0x300a, 0x03a8); Tag const IonWedgeSequence(0x300a, 0x03aa); Tag const IonWedgePositionSequence(0x300a, 0x03ac); Tag const ReferencedSetupImageSequence(0x300a, 0x0401); Tag const SetupImageComment(0x300a, 0x0402); Tag const MotionSynchronizationSequence(0x300a, 0x0410); Tag const ControlPointOrientation(0x300a, 0x0412); Tag const GeneralAccessorySequence(0x300a, 0x0420); Tag const GeneralAccessoryID(0x300a, 0x0421); Tag const GeneralAccessoryDescription(0x300a, 0x0422); Tag const GeneralAccessoryType(0x300a, 0x0423); Tag const GeneralAccessoryNumber(0x300a, 0x0424); Tag const SourceToGeneralAccessoryDistance(0x300a, 0x0425); Tag const IsocenterToGeneralAccessoryDistance(0x300a, 0x0426); Tag const ApplicatorGeometrySequence(0x300a, 0x0431); Tag const ApplicatorApertureShape(0x300a, 0x0432); Tag const ApplicatorOpening(0x300a, 0x0433); Tag const ApplicatorOpeningX(0x300a, 0x0434); Tag const ApplicatorOpeningY(0x300a, 0x0435); Tag const SourceToApplicatorMountingPositionDistance(0x300a, 0x0436); Tag const NumberOfBlockSlabItems(0x300a, 0x0440); Tag const BlockSlabSequence(0x300a, 0x0441); Tag const BlockSlabThickness(0x300a, 0x0442); Tag const BlockSlabNumber(0x300a, 0x0443); Tag const DeviceMotionControlSequence(0x300a, 0x0450); Tag const DeviceMotionExecutionMode(0x300a, 0x0451); Tag const DeviceMotionObservationMode(0x300a, 0x0452); Tag const DeviceMotionParameterCodeSequence(0x300a, 0x0453); Tag const DistalDepthFraction(0x300a, 0x0501); Tag const DistalDepth(0x300a, 0x0502); Tag const NominalRangeModulationFractions(0x300a, 0x0503); Tag const NominalRangeModulatedRegionDepths(0x300a, 0x0504); Tag const DepthDoseParametersSequence(0x300a, 0x0505); Tag const DeliveredDepthDoseParametersSequence(0x300a, 0x0506); Tag const DeliveredDistalDepthFraction(0x300a, 0x0507); Tag const DeliveredDistalDepth(0x300a, 0x0508); Tag const DeliveredNominalRangeModulationFractions(0x300a, 0x0509); Tag const DeliveredNominalRangeModulatedRegionDepths(0x300a, 0x0510); Tag const DeliveredReferenceDoseDefinition(0x300a, 0x0511); Tag const ReferenceDoseDefinition(0x300a, 0x0512); Tag const RTControlPointIndex(0x300a, 0x0600); Tag const RadiationGenerationModeIndex(0x300a, 0x0601); Tag const ReferencedDefinedDeviceIndex(0x300a, 0x0602); Tag const RadiationDoseIdentificationIndex(0x300a, 0x0603); Tag const NumberOfRTControlPoints(0x300a, 0x0604); Tag const ReferencedRadiationGenerationModeIndex(0x300a, 0x0605); Tag const TreatmentPositionIndex(0x300a, 0x0606); Tag const ReferencedDeviceIndex(0x300a, 0x0607); Tag const TreatmentPositionGroupLabel(0x300a, 0x0608); Tag const TreatmentPositionGroupUID(0x300a, 0x0609); Tag const TreatmentPositionGroupSequence(0x300a, 0x060a); Tag const ReferencedTreatmentPositionIndex(0x300a, 0x060b); Tag const ReferencedRadiationDoseIdentificationIndex(0x300a, 0x060c); Tag const RTAccessoryHolderWaterEquivalentThickness(0x300a, 0x060d); Tag const ReferencedRTAccessoryHolderDeviceIndex(0x300a, 0x060e); Tag const RTAccessoryHolderSlotExistenceFlag(0x300a, 0x060f); Tag const RTAccessoryHolderSlotSequence(0x300a, 0x0610); Tag const RTAccessoryHolderSlotID(0x300a, 0x0611); Tag const RTAccessoryHolderSlotDistance(0x300a, 0x0612); Tag const RTAccessorySlotDistance(0x300a, 0x0613); Tag const RTAccessoryHolderDefinitionSequence(0x300a, 0x0614); Tag const RTAccessoryDeviceSlotID(0x300a, 0x0615); Tag const RTRadiationSequence(0x300a, 0x0616); Tag const RadiationDoseSequence(0x300a, 0x0617); Tag const RadiationDoseIdentificationSequence(0x300a, 0x0618); Tag const RadiationDoseIdentificationLabel(0x300a, 0x0619); Tag const ReferenceDoseType(0x300a, 0x061a); Tag const PrimaryDoseValueIndicator(0x300a, 0x061b); Tag const DoseValuesSequence(0x300a, 0x061c); Tag const DoseValuePurpose(0x300a, 0x061d); Tag const ReferenceDosePointCoordinates(0x300a, 0x061e); Tag const RadiationDoseValuesParametersSequence(0x300a, 0x061f); Tag const MetersetToDoseMappingSequence(0x300a, 0x0620); Tag const ExpectedInVivoMeasurementValuesSequence(0x300a, 0x0621); Tag const ExpectedInVivoMeasurementValueIndex(0x300a, 0x0622); Tag const RadiationDoseInVivoMeasurementLabel(0x300a, 0x0623); Tag const RadiationDoseCentralAxisDisplacement(0x300a, 0x0624); Tag const RadiationDoseValue(0x300a, 0x0625); Tag const RadiationDoseSourceToSkinDistance(0x300a, 0x0626); Tag const RadiationDoseMeasurementPointCoordinates(0x300a, 0x0627); Tag const RadiationDoseSourceToExternalContourDistance(0x300a, 0x0628); Tag const RTToleranceSetSequence(0x300a, 0x0629); Tag const RTToleranceSetLabel(0x300a, 0x062a); Tag const AttributeToleranceValuesSequence(0x300a, 0x062b); Tag const ToleranceValue(0x300a, 0x062c); Tag const PatientSupportPositionToleranceSequence(0x300a, 0x062d); Tag const TreatmentTimeLimit(0x300a, 0x062e); Tag const CArmPhotonElectronControlPointSequence(0x300a, 0x062f); Tag const ReferencedRTRadiationSequence(0x300a, 0x0630); Tag const ReferencedRTInstanceSequence(0x300a, 0x0631); Tag const ReferencedRTPatientSetupSequence(0x300a, 0x0632); Tag const SourceToPatientSurfaceDistance(0x300a, 0x0634); Tag const TreatmentMachineSpecialModeCodeSequence(0x300a, 0x0635); Tag const IntendedNumberOfFractions(0x300a, 0x0636); Tag const RTRadiationSetIntent(0x300a, 0x0637); Tag const RTRadiationPhysicalAndGeometricContentDetailFlag(0x300a, 0x0638); Tag const RTRecordFlag(0x300a, 0x0639); Tag const TreatmentDeviceIdentificationSequence(0x300a, 0x063a); Tag const ReferencedRTPhysicianIntentSequence(0x300a, 0x063b); Tag const CumulativeMeterset(0x300a, 0x063c); Tag const DeliveryRate(0x300a, 0x063d); Tag const DeliveryRateUnitSequence(0x300a, 0x063e); Tag const TreatmentPositionSequence(0x300a, 0x063f); Tag const RadiationSourceAxisDistance(0x300a, 0x0640); Tag const NumberOfRTBeamLimitingDevices(0x300a, 0x0641); Tag const RTBeamLimitingDeviceProximalDistance(0x300a, 0x0642); Tag const RTBeamLimitingDeviceDistalDistance(0x300a, 0x0643); Tag const ParallelRTBeamDelimiterDeviceOrientationLabelCodeSequence(0x300a, 0x0644); Tag const BeamModifierOrientationAngle(0x300a, 0x0645); Tag const FixedRTBeamDelimiterDeviceSequence(0x300a, 0x0646); Tag const ParallelRTBeamDelimiterDeviceSequence(0x300a, 0x0647); Tag const NumberOfParallelRTBeamDelimiters(0x300a, 0x0648); Tag const ParallelRTBeamDelimiterBoundaries(0x300a, 0x0649); Tag const ParallelRTBeamDelimiterPositions(0x300a, 0x064a); Tag const RTBeamLimitingDeviceOffset(0x300a, 0x064b); Tag const RTBeamDelimiterGeometrySequence(0x300a, 0x064c); Tag const RTBeamLimitingDeviceDefinitionSequence(0x300a, 0x064d); Tag const ParallelRTBeamDelimiterOpeningMode(0x300a, 0x064e); Tag const ParallelRTBeamDelimiterLeafMountingSide(0x300a, 0x064f); Tag const PatientSetupUID(0x300a, 0x0650); Tag const WedgeDefinitionSequence(0x300a, 0x0651); Tag const RadiationBeamWedgeAngle(0x300a, 0x0652); Tag const RadiationBeamWedgeThinEdgeDistance(0x300a, 0x0653); Tag const RadiationBeamEffectiveWedgeAngle(0x300a, 0x0654); Tag const NumberOfWedgePositions(0x300a, 0x0655); Tag const RTBeamLimitingDeviceOpeningSequence(0x300a, 0x0656); Tag const NumberOfRTBeamLimitingDeviceOpenings(0x300a, 0x0657); Tag const RadiationDosimeterUnitSequence(0x300a, 0x0658); Tag const RTDeviceDistanceReferenceLocationCodeSequence(0x300a, 0x0659); Tag const RadiationDeviceConfigurationAndCommissioningKeySequence(0x300a, 0x065a); Tag const PatientSupportPositionParameterSequence(0x300a, 0x065b); Tag const PatientSupportPositionSpecificationMethod(0x300a, 0x065c); Tag const PatientSupportPositionDeviceParameterSequence(0x300a, 0x065d); Tag const DeviceOrderIndex(0x300a, 0x065e); Tag const PatientSupportPositionParameterOrderIndex(0x300a, 0x065f); Tag const PatientSupportPositionDeviceToleranceSequence(0x300a, 0x0660); Tag const PatientSupportPositionToleranceOrderIndex(0x300a, 0x0661); Tag const CompensatorDefinitionSequence(0x300a, 0x0662); Tag const CompensatorMapOrientation(0x300a, 0x0663); Tag const CompensatorProximalThicknessMap(0x300a, 0x0664); Tag const CompensatorDistalThicknessMap(0x300a, 0x0665); Tag const CompensatorBasePlaneOffset(0x300a, 0x0666); Tag const CompensatorShapeFabricationCodeSequence(0x300a, 0x0667); Tag const CompensatorShapeSequence(0x300a, 0x0668); Tag const RadiationBeamCompensatorMillingToolDiameter(0x300a, 0x0669); Tag const BlockDefinitionSequence(0x300a, 0x066a); Tag const BlockEdgeData(0x300a, 0x066b); Tag const BlockOrientation(0x300a, 0x066c); Tag const RadiationBeamBlockThickness(0x300a, 0x066d); Tag const RadiationBeamBlockSlabThickness(0x300a, 0x066e); Tag const BlockEdgeDataSequence(0x300a, 0x066f); Tag const NumberOfRTAccessoryHolders(0x300a, 0x0670); Tag const GeneralAccessoryDefinitionSequence(0x300a, 0x0671); Tag const NumberOfGeneralAccessories(0x300a, 0x0672); Tag const BolusDefinitionSequence(0x300a, 0x0673); Tag const NumberOfBoluses(0x300a, 0x0674); Tag const EquipmentFrameOfReferenceUID(0x300a, 0x0675); Tag const EquipmentFrameOfReferenceDescription(0x300a, 0x0676); Tag const EquipmentReferencePointCoordinatesSequence(0x300a, 0x0677); Tag const EquipmentReferencePointCodeSequence(0x300a, 0x0678); Tag const RTBeamLimitingDeviceAngle(0x300a, 0x0679); Tag const SourceRollAngle(0x300a, 0x067a); Tag const RadiationGenerationModeSequence(0x300a, 0x067b); Tag const RadiationGenerationModeLabel(0x300a, 0x067c); Tag const RadiationGenerationModeDescription(0x300a, 0x067d); Tag const RadiationGenerationModeMachineCodeSequence(0x300a, 0x067e); Tag const RadiationTypeCodeSequence(0x300a, 0x067f); Tag const NominalEnergy(0x300a, 0x0680); Tag const MinimumNominalEnergy(0x300a, 0x0681); Tag const MaximumNominalEnergy(0x300a, 0x0682); Tag const RadiationFluenceModifierCodeSequence(0x300a, 0x0683); Tag const EnergyUnitCodeSequence(0x300a, 0x0684); Tag const NumberOfRadiationGenerationModes(0x300a, 0x0685); Tag const PatientSupportDevicesSequence(0x300a, 0x0686); Tag const NumberOfPatientSupportDevices(0x300a, 0x0687); Tag const RTBeamModifierDefinitionDistance(0x300a, 0x0688); Tag const BeamAreaLimitSequence(0x300a, 0x0689); Tag const ReferencedRTPrescriptionSequence(0x300a, 0x068a); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_300aodil-0.11.0/src/odil/registry_300c.cpp000066400000000000000000000207311362244656000173520ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_300c( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x300c, 0x0002), ElementsDictionaryEntry("Referenced RT Plan Sequence", "ReferencedRTPlanSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300c, 0x0004), ElementsDictionaryEntry("Referenced Beam Sequence", "ReferencedBeamSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300c, 0x0006), ElementsDictionaryEntry("Referenced Beam Number", "ReferencedBeamNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x0007), ElementsDictionaryEntry("Referenced Reference Image Number", "ReferencedReferenceImageNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x0008), ElementsDictionaryEntry("Start Cumulative Meterset Weight", "StartCumulativeMetersetWeight", "DS", "1")); public_dictionary.emplace(Tag(0x300c, 0x0009), ElementsDictionaryEntry("End Cumulative Meterset Weight", "EndCumulativeMetersetWeight", "DS", "1")); public_dictionary.emplace(Tag(0x300c, 0x000a), ElementsDictionaryEntry("Referenced Brachy Application Setup Sequence", "ReferencedBrachyApplicationSetupSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300c, 0x000c), ElementsDictionaryEntry("Referenced Brachy Application Setup Number", "ReferencedBrachyApplicationSetupNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x000e), ElementsDictionaryEntry("Referenced Source Number", "ReferencedSourceNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x0020), ElementsDictionaryEntry("Referenced Fraction Group Sequence", "ReferencedFractionGroupSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300c, 0x0022), ElementsDictionaryEntry("Referenced Fraction Group Number", "ReferencedFractionGroupNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x0040), ElementsDictionaryEntry("Referenced Verification Image Sequence", "ReferencedVerificationImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300c, 0x0042), ElementsDictionaryEntry("Referenced Reference Image Sequence", "ReferencedReferenceImageSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300c, 0x0050), ElementsDictionaryEntry("Referenced Dose Reference Sequence", "ReferencedDoseReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300c, 0x0051), ElementsDictionaryEntry("Referenced Dose Reference Number", "ReferencedDoseReferenceNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x0055), ElementsDictionaryEntry("Brachy Referenced Dose Reference Sequence", "BrachyReferencedDoseReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300c, 0x0060), ElementsDictionaryEntry("Referenced Structure Set Sequence", "ReferencedStructureSetSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300c, 0x006a), ElementsDictionaryEntry("Referenced Patient Setup Number", "ReferencedPatientSetupNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x0080), ElementsDictionaryEntry("Referenced Dose Sequence", "ReferencedDoseSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300c, 0x00a0), ElementsDictionaryEntry("Referenced Tolerance Table Number", "ReferencedToleranceTableNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x00b0), ElementsDictionaryEntry("Referenced Bolus Sequence", "ReferencedBolusSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300c, 0x00c0), ElementsDictionaryEntry("Referenced Wedge Number", "ReferencedWedgeNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x00d0), ElementsDictionaryEntry("Referenced Compensator Number", "ReferencedCompensatorNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x00e0), ElementsDictionaryEntry("Referenced Block Number", "ReferencedBlockNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x00f0), ElementsDictionaryEntry("Referenced Control Point Index", "ReferencedControlPointIndex", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x00f2), ElementsDictionaryEntry("Referenced Control Point Sequence", "ReferencedControlPointSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300c, 0x00f4), ElementsDictionaryEntry("Referenced Start Control Point Index", "ReferencedStartControlPointIndex", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x00f6), ElementsDictionaryEntry("Referenced Stop Control Point Index", "ReferencedStopControlPointIndex", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x0100), ElementsDictionaryEntry("Referenced Range Shifter Number", "ReferencedRangeShifterNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x0102), ElementsDictionaryEntry("Referenced Lateral Spreading Device Number", "ReferencedLateralSpreadingDeviceNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x0104), ElementsDictionaryEntry("Referenced Range Modulator Number", "ReferencedRangeModulatorNumber", "IS", "1")); public_dictionary.emplace(Tag(0x300c, 0x0111), ElementsDictionaryEntry("Omitted Beam Task Sequence", "OmittedBeamTaskSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x300c, 0x0112), ElementsDictionaryEntry("Reason for Omission", "ReasonForOmission", "CS", "1")); public_dictionary.emplace(Tag(0x300c, 0x0113), ElementsDictionaryEntry("Reason for Omission Description", "ReasonForOmissionDescription", "LO", "1")); public_tags.emplace("ReferencedRTPlanSequence", Tag(0x300c, 0x0002)); public_tags.emplace("ReferencedBeamSequence", Tag(0x300c, 0x0004)); public_tags.emplace("ReferencedBeamNumber", Tag(0x300c, 0x0006)); public_tags.emplace("ReferencedReferenceImageNumber", Tag(0x300c, 0x0007)); public_tags.emplace("StartCumulativeMetersetWeight", Tag(0x300c, 0x0008)); public_tags.emplace("EndCumulativeMetersetWeight", Tag(0x300c, 0x0009)); public_tags.emplace("ReferencedBrachyApplicationSetupSequence", Tag(0x300c, 0x000a)); public_tags.emplace("ReferencedBrachyApplicationSetupNumber", Tag(0x300c, 0x000c)); public_tags.emplace("ReferencedSourceNumber", Tag(0x300c, 0x000e)); public_tags.emplace("ReferencedFractionGroupSequence", Tag(0x300c, 0x0020)); public_tags.emplace("ReferencedFractionGroupNumber", Tag(0x300c, 0x0022)); public_tags.emplace("ReferencedVerificationImageSequence", Tag(0x300c, 0x0040)); public_tags.emplace("ReferencedReferenceImageSequence", Tag(0x300c, 0x0042)); public_tags.emplace("ReferencedDoseReferenceSequence", Tag(0x300c, 0x0050)); public_tags.emplace("ReferencedDoseReferenceNumber", Tag(0x300c, 0x0051)); public_tags.emplace("BrachyReferencedDoseReferenceSequence", Tag(0x300c, 0x0055)); public_tags.emplace("ReferencedStructureSetSequence", Tag(0x300c, 0x0060)); public_tags.emplace("ReferencedPatientSetupNumber", Tag(0x300c, 0x006a)); public_tags.emplace("ReferencedDoseSequence", Tag(0x300c, 0x0080)); public_tags.emplace("ReferencedToleranceTableNumber", Tag(0x300c, 0x00a0)); public_tags.emplace("ReferencedBolusSequence", Tag(0x300c, 0x00b0)); public_tags.emplace("ReferencedWedgeNumber", Tag(0x300c, 0x00c0)); public_tags.emplace("ReferencedCompensatorNumber", Tag(0x300c, 0x00d0)); public_tags.emplace("ReferencedBlockNumber", Tag(0x300c, 0x00e0)); public_tags.emplace("ReferencedControlPointIndex", Tag(0x300c, 0x00f0)); public_tags.emplace("ReferencedControlPointSequence", Tag(0x300c, 0x00f2)); public_tags.emplace("ReferencedStartControlPointIndex", Tag(0x300c, 0x00f4)); public_tags.emplace("ReferencedStopControlPointIndex", Tag(0x300c, 0x00f6)); public_tags.emplace("ReferencedRangeShifterNumber", Tag(0x300c, 0x0100)); public_tags.emplace("ReferencedLateralSpreadingDeviceNumber", Tag(0x300c, 0x0102)); public_tags.emplace("ReferencedRangeModulatorNumber", Tag(0x300c, 0x0104)); public_tags.emplace("OmittedBeamTaskSequence", Tag(0x300c, 0x0111)); public_tags.emplace("ReasonForOmission", Tag(0x300c, 0x0112)); public_tags.emplace("ReasonForOmissionDescription", Tag(0x300c, 0x0113)); } } }odil-0.11.0/src/odil/registry_300c.h000066400000000000000000000050511362244656000170150ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_300c #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_300c #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ReferencedRTPlanSequence(0x300c, 0x0002); Tag const ReferencedBeamSequence(0x300c, 0x0004); Tag const ReferencedBeamNumber(0x300c, 0x0006); Tag const ReferencedReferenceImageNumber(0x300c, 0x0007); Tag const StartCumulativeMetersetWeight(0x300c, 0x0008); Tag const EndCumulativeMetersetWeight(0x300c, 0x0009); Tag const ReferencedBrachyApplicationSetupSequence(0x300c, 0x000a); Tag const ReferencedBrachyApplicationSetupNumber(0x300c, 0x000c); Tag const ReferencedSourceNumber(0x300c, 0x000e); Tag const ReferencedFractionGroupSequence(0x300c, 0x0020); Tag const ReferencedFractionGroupNumber(0x300c, 0x0022); Tag const ReferencedVerificationImageSequence(0x300c, 0x0040); Tag const ReferencedReferenceImageSequence(0x300c, 0x0042); Tag const ReferencedDoseReferenceSequence(0x300c, 0x0050); Tag const ReferencedDoseReferenceNumber(0x300c, 0x0051); Tag const BrachyReferencedDoseReferenceSequence(0x300c, 0x0055); Tag const ReferencedStructureSetSequence(0x300c, 0x0060); Tag const ReferencedPatientSetupNumber(0x300c, 0x006a); Tag const ReferencedDoseSequence(0x300c, 0x0080); Tag const ReferencedToleranceTableNumber(0x300c, 0x00a0); Tag const ReferencedBolusSequence(0x300c, 0x00b0); Tag const ReferencedWedgeNumber(0x300c, 0x00c0); Tag const ReferencedCompensatorNumber(0x300c, 0x00d0); Tag const ReferencedBlockNumber(0x300c, 0x00e0); Tag const ReferencedControlPointIndex(0x300c, 0x00f0); Tag const ReferencedControlPointSequence(0x300c, 0x00f2); Tag const ReferencedStartControlPointIndex(0x300c, 0x00f4); Tag const ReferencedStopControlPointIndex(0x300c, 0x00f6); Tag const ReferencedRangeShifterNumber(0x300c, 0x0100); Tag const ReferencedLateralSpreadingDeviceNumber(0x300c, 0x0102); Tag const ReferencedRangeModulatorNumber(0x300c, 0x0104); Tag const OmittedBeamTaskSequence(0x300c, 0x0111); Tag const ReasonForOmission(0x300c, 0x0112); Tag const ReasonForOmissionDescription(0x300c, 0x0113); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_300codil-0.11.0/src/odil/registry_300e.cpp000066400000000000000000000026041362244656000173530ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_300e( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x300e, 0x0002), ElementsDictionaryEntry("Approval Status", "ApprovalStatus", "CS", "1")); public_dictionary.emplace(Tag(0x300e, 0x0004), ElementsDictionaryEntry("Review Date", "ReviewDate", "DA", "1")); public_dictionary.emplace(Tag(0x300e, 0x0005), ElementsDictionaryEntry("Review Time", "ReviewTime", "TM", "1")); public_dictionary.emplace(Tag(0x300e, 0x0008), ElementsDictionaryEntry("Reviewer Name", "ReviewerName", "PN", "1")); public_tags.emplace("ApprovalStatus", Tag(0x300e, 0x0002)); public_tags.emplace("ReviewDate", Tag(0x300e, 0x0004)); public_tags.emplace("ReviewTime", Tag(0x300e, 0x0005)); public_tags.emplace("ReviewerName", Tag(0x300e, 0x0008)); } } }odil-0.11.0/src/odil/registry_300e.h000066400000000000000000000015151362244656000170200ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_300e #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_300e #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ApprovalStatus(0x300e, 0x0002); Tag const ReviewDate(0x300e, 0x0004); Tag const ReviewTime(0x300e, 0x0005); Tag const ReviewerName(0x300e, 0x0008); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_300eodil-0.11.0/src/odil/registry_3010.cpp000066400000000000000000001056231362244656000172740ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_3010( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x3010, 0x0001), ElementsDictionaryEntry("Radiobiological Dose Effect Sequence", "RadiobiologicalDoseEffectSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0002), ElementsDictionaryEntry("Radiobiological Dose Effect Flag", "RadiobiologicalDoseEffectFlag", "CS", "1")); public_dictionary.emplace(Tag(0x3010, 0x0003), ElementsDictionaryEntry("Effective Dose Calculation Method Category Code Sequence", "EffectiveDoseCalculationMethodCategoryCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0004), ElementsDictionaryEntry("Effective Dose Calculation Method Code Sequence", "EffectiveDoseCalculationMethodCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0005), ElementsDictionaryEntry("Effective Dose Calculation Method Description", "EffectiveDoseCalculationMethodDescription", "LO", "1")); public_dictionary.emplace(Tag(0x3010, 0x0006), ElementsDictionaryEntry("Conceptual Volume UID", "ConceptualVolumeUID", "UI", "1")); public_dictionary.emplace(Tag(0x3010, 0x0007), ElementsDictionaryEntry("Originating SOP Instance Reference Sequence", "OriginatingSOPInstanceReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0008), ElementsDictionaryEntry("Conceptual Volume Constituent Sequence", "ConceptualVolumeConstituentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0009), ElementsDictionaryEntry("Equivalent Conceptual Volume Instance Reference Sequence", "EquivalentConceptualVolumeInstanceReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x000a), ElementsDictionaryEntry("Equivalent Conceptual Volumes Sequence", "EquivalentConceptualVolumesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x000b), ElementsDictionaryEntry("Referenced Conceptual Volume UID", "ReferencedConceptualVolumeUID", "UI", "1")); public_dictionary.emplace(Tag(0x3010, 0x000c), ElementsDictionaryEntry("Conceptual Volume Combination Expression", "ConceptualVolumeCombinationExpression", "UT", "1")); public_dictionary.emplace(Tag(0x3010, 0x000d), ElementsDictionaryEntry("Conceptual Volume Constituent Index", "ConceptualVolumeConstituentIndex", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x000e), ElementsDictionaryEntry("Conceptual Volume Combination Flag", "ConceptualVolumeCombinationFlag", "CS", "1")); public_dictionary.emplace(Tag(0x3010, 0x000f), ElementsDictionaryEntry("Conceptual Volume Combination Description", "ConceptualVolumeCombinationDescription", "ST", "1")); public_dictionary.emplace(Tag(0x3010, 0x0010), ElementsDictionaryEntry("Conceptual Volume Segmentation Defined Flag", "ConceptualVolumeSegmentationDefinedFlag", "CS", "1")); public_dictionary.emplace(Tag(0x3010, 0x0011), ElementsDictionaryEntry("Conceptual Volume Segmentation Reference Sequence", "ConceptualVolumeSegmentationReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0012), ElementsDictionaryEntry("Conceptual Volume Constituent Segmentation Reference Sequence", "ConceptualVolumeConstituentSegmentationReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0013), ElementsDictionaryEntry("Constituent Conceptual Volume UID", "ConstituentConceptualVolumeUID", "UI", "1")); public_dictionary.emplace(Tag(0x3010, 0x0014), ElementsDictionaryEntry("Derivation Conceptual Volume Sequence", "DerivationConceptualVolumeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0015), ElementsDictionaryEntry("Source Conceptual Volume UID", "SourceConceptualVolumeUID", "UI", "1")); public_dictionary.emplace(Tag(0x3010, 0x0016), ElementsDictionaryEntry("Conceptual Volume Derivation Algorithm Sequence", "ConceptualVolumeDerivationAlgorithmSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0017), ElementsDictionaryEntry("Conceptual Volume Description", "ConceptualVolumeDescription", "ST", "1")); public_dictionary.emplace(Tag(0x3010, 0x0018), ElementsDictionaryEntry("Source Conceptual Volume Sequence", "SourceConceptualVolumeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0019), ElementsDictionaryEntry("Author Identification Sequence", "AuthorIdentificationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x001a), ElementsDictionaryEntry("Manufacturer's Model Version", "ManufacturerModelVersion", "LO", "1")); public_dictionary.emplace(Tag(0x3010, 0x001b), ElementsDictionaryEntry("Device Alternate Identifier", "DeviceAlternateIdentifier", "UC", "1")); public_dictionary.emplace(Tag(0x3010, 0x001c), ElementsDictionaryEntry("Device Alternate Identifier Type", "DeviceAlternateIdentifierType", "CS", "1")); public_dictionary.emplace(Tag(0x3010, 0x001d), ElementsDictionaryEntry("Device Alternate Identifier Format", "DeviceAlternateIdentifierFormat", "LT", "1")); public_dictionary.emplace(Tag(0x3010, 0x001e), ElementsDictionaryEntry("Segmentation Creation Template Label", "SegmentationCreationTemplateLabel", "LO", "1")); public_dictionary.emplace(Tag(0x3010, 0x001f), ElementsDictionaryEntry("Segmentation Template UID", "SegmentationTemplateUID", "UI", "1")); public_dictionary.emplace(Tag(0x3010, 0x0020), ElementsDictionaryEntry("Referenced Segment Reference Index", "ReferencedSegmentReferenceIndex", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x0021), ElementsDictionaryEntry("Segment Reference Sequence", "SegmentReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0022), ElementsDictionaryEntry("Segment Reference Index", "SegmentReferenceIndex", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x0023), ElementsDictionaryEntry("Direct Segment Reference Sequence", "DirectSegmentReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0024), ElementsDictionaryEntry("Combination Segment Reference Sequence", "CombinationSegmentReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0025), ElementsDictionaryEntry("Conceptual Volume Sequence", "ConceptualVolumeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0026), ElementsDictionaryEntry("Segmented RT Accessory Device Sequence", "SegmentedRTAccessoryDeviceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0027), ElementsDictionaryEntry("Segment Characteristics Sequence", "SegmentCharacteristicsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0028), ElementsDictionaryEntry("Related Segment Characteristics Sequence", "RelatedSegmentCharacteristicsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0029), ElementsDictionaryEntry("Segment Characteristics Precedence", "SegmentCharacteristicsPrecedence", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x002a), ElementsDictionaryEntry("RT Segment Annotation Sequence", "RTSegmentAnnotationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x002b), ElementsDictionaryEntry("Segment Annotation Category Code Sequence", "SegmentAnnotationCategoryCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x002c), ElementsDictionaryEntry("Segment Annotation Type Code Sequence", "SegmentAnnotationTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x002d), ElementsDictionaryEntry("Device Label", "DeviceLabel", "LO", "1")); public_dictionary.emplace(Tag(0x3010, 0x002e), ElementsDictionaryEntry("Device Type Code Sequence", "DeviceTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x002f), ElementsDictionaryEntry("Segment Annotation Type Modifier Code Sequence", "SegmentAnnotationTypeModifierCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0030), ElementsDictionaryEntry("Patient Equipment Relationship Code Sequence", "PatientEquipmentRelationshipCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0031), ElementsDictionaryEntry("Referenced Fiducials UID", "ReferencedFiducialsUID", "UI", "1")); public_dictionary.emplace(Tag(0x3010, 0x0032), ElementsDictionaryEntry("Patient Treatment Orientation Sequence", "PatientTreatmentOrientationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0033), ElementsDictionaryEntry("User Content Label", "UserContentLabel", "SH", "1")); public_dictionary.emplace(Tag(0x3010, 0x0034), ElementsDictionaryEntry("User Content Long Label", "UserContentLongLabel", "LO", "1")); public_dictionary.emplace(Tag(0x3010, 0x0035), ElementsDictionaryEntry("Entity Label", "EntityLabel", "SH", "1")); public_dictionary.emplace(Tag(0x3010, 0x0036), ElementsDictionaryEntry("Entity Name", "EntityName", "LO", "1")); public_dictionary.emplace(Tag(0x3010, 0x0037), ElementsDictionaryEntry("Entity Description", "EntityDescription", "ST", "1")); public_dictionary.emplace(Tag(0x3010, 0x0038), ElementsDictionaryEntry("Entity Long Label", "EntityLongLabel", "LO", "1")); public_dictionary.emplace(Tag(0x3010, 0x0039), ElementsDictionaryEntry("Device Index", "DeviceIndex", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x003a), ElementsDictionaryEntry("RT Treatment Phase Index", "RTTreatmentPhaseIndex", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x003b), ElementsDictionaryEntry("RT Treatment Phase UID", "RTTreatmentPhaseUID", "UI", "1")); public_dictionary.emplace(Tag(0x3010, 0x003c), ElementsDictionaryEntry("RT Prescription Index", "RTPrescriptionIndex", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x003d), ElementsDictionaryEntry("RT Segment Annotation Index", "RTSegmentAnnotationIndex", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x003e), ElementsDictionaryEntry("Basis RT Treatment Phase Index", "BasisRTTreatmentPhaseIndex", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x003f), ElementsDictionaryEntry("Related RT Treatment Phase Index", "RelatedRTTreatmentPhaseIndex", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x0040), ElementsDictionaryEntry("Referenced RT Treatment Phase Index", "ReferencedRTTreatmentPhaseIndex", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x0041), ElementsDictionaryEntry("Referenced RT Prescription Index", "ReferencedRTPrescriptionIndex", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x0042), ElementsDictionaryEntry("Referenced Parent RT Prescription Index", "ReferencedParentRTPrescriptionIndex", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x0043), ElementsDictionaryEntry("Manufacturer's Device Identifier", "ManufacturerDeviceIdentifier", "ST", "1")); public_dictionary.emplace(Tag(0x3010, 0x0044), ElementsDictionaryEntry("Instance-Level Referenced Performed Procedure Step Sequence", "InstanceLevelReferencedPerformedProcedureStepSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0045), ElementsDictionaryEntry("RT Treatment Phase Intent Presence Flag", "RTTreatmentPhaseIntentPresenceFlag", "CS", "1")); public_dictionary.emplace(Tag(0x3010, 0x0046), ElementsDictionaryEntry("Radiotherapy Treatment Type", "RadiotherapyTreatmentType", "CS", "1")); public_dictionary.emplace(Tag(0x3010, 0x0047), ElementsDictionaryEntry("Teletherapy Radiation Type", "TeletherapyRadiationType", "CS", "1-n")); public_dictionary.emplace(Tag(0x3010, 0x0048), ElementsDictionaryEntry("Brachytherapy Source Type", "BrachytherapySourceType", "CS", "1-n")); public_dictionary.emplace(Tag(0x3010, 0x0049), ElementsDictionaryEntry("Referenced RT Treatment Phase Sequence", "ReferencedRTTreatmentPhaseSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x004a), ElementsDictionaryEntry("Referenced Direct Segment Instance Sequence", "ReferencedDirectSegmentInstanceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x004b), ElementsDictionaryEntry("Intended RT Treatment Phase Sequence", "IntendedRTTreatmentPhaseSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x004c), ElementsDictionaryEntry("Intended Phase Start Date", "IntendedPhaseStartDate", "DA", "1")); public_dictionary.emplace(Tag(0x3010, 0x004d), ElementsDictionaryEntry("Intended Phase End Date", "IntendedPhaseEndDate", "DA", "1")); public_dictionary.emplace(Tag(0x3010, 0x004e), ElementsDictionaryEntry("RT Treatment Phase Interval Sequence", "RTTreatmentPhaseIntervalSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x004f), ElementsDictionaryEntry("Temporal Relationship Interval Anchor", "TemporalRelationshipIntervalAnchor", "CS", "1")); public_dictionary.emplace(Tag(0x3010, 0x0050), ElementsDictionaryEntry("Minimum Number of Interval Days", "MinimumNumberOfIntervalDays", "FD", "1")); public_dictionary.emplace(Tag(0x3010, 0x0051), ElementsDictionaryEntry("Maximum Number of Interval Days", "MaximumNumberOfIntervalDays", "FD", "1")); public_dictionary.emplace(Tag(0x3010, 0x0052), ElementsDictionaryEntry("Pertinent SOP Classes in Study", "PertinentSOPClassesInStudy", "UI", "1-n")); public_dictionary.emplace(Tag(0x3010, 0x0053), ElementsDictionaryEntry("Pertinent SOP Classes in Series", "PertinentSOPClassesInSeries", "UI", "1-n")); public_dictionary.emplace(Tag(0x3010, 0x0054), ElementsDictionaryEntry("RT Prescription Label", "RTPrescriptionLabel", "LO", "1")); public_dictionary.emplace(Tag(0x3010, 0x0055), ElementsDictionaryEntry("RT Physician Intent Predecessor Sequence", "RTPhysicianIntentPredecessorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0056), ElementsDictionaryEntry("RT Treatment Approach Label", "RTTreatmentApproachLabel", "LO", "1")); public_dictionary.emplace(Tag(0x3010, 0x0057), ElementsDictionaryEntry("RT Physician Intent Sequence", "RTPhysicianIntentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0058), ElementsDictionaryEntry("RT Physician Intent Index", "RTPhysicianIntentIndex", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x0059), ElementsDictionaryEntry("RT Treatment Intent Type", "RTTreatmentIntentType", "CS", "1")); public_dictionary.emplace(Tag(0x3010, 0x005a), ElementsDictionaryEntry("RT Physician Intent Narrative", "RTPhysicianIntentNarrative", "UT", "1")); public_dictionary.emplace(Tag(0x3010, 0x005b), ElementsDictionaryEntry("RT Protocol Code Sequence", "RTProtocolCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x005c), ElementsDictionaryEntry("Reason for Superseding", "ReasonForSuperseding", "ST", "1")); public_dictionary.emplace(Tag(0x3010, 0x005d), ElementsDictionaryEntry("RT Diagnosis Code Sequence", "RTDiagnosisCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x005e), ElementsDictionaryEntry("Referenced RT Physician Intent Index", "ReferencedRTPhysicianIntentIndex", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x005f), ElementsDictionaryEntry("RT Physician Intent Input Instance Sequence", "RTPhysicianIntentInputInstanceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0060), ElementsDictionaryEntry("RT Anatomic Prescription Sequence", "RTAnatomicPrescriptionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0061), ElementsDictionaryEntry("Prior Treatment Dose Description", "PriorTreatmentDoseDescription", "UT", "1")); public_dictionary.emplace(Tag(0x3010, 0x0062), ElementsDictionaryEntry("Prior Treatment Reference Sequence", "PriorTreatmentReferenceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0063), ElementsDictionaryEntry("Dosimetric Objective Evaluation Scope", "DosimetricObjectiveEvaluationScope", "CS", "1")); public_dictionary.emplace(Tag(0x3010, 0x0064), ElementsDictionaryEntry("Therapeutic Role Category Code Sequence", "TherapeuticRoleCategoryCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0065), ElementsDictionaryEntry("Therapeutic Role Type Code Sequence", "TherapeuticRoleTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0066), ElementsDictionaryEntry("Conceptual Volume Optimization Precedence", "ConceptualVolumeOptimizationPrecedence", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x0067), ElementsDictionaryEntry("Conceptual Volume Category Code Sequence", "ConceptualVolumeCategoryCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0068), ElementsDictionaryEntry("Conceptual Volume Blocking Constraint", "ConceptualVolumeBlockingConstraint", "CS", "1")); public_dictionary.emplace(Tag(0x3010, 0x0069), ElementsDictionaryEntry("Conceptual Volume Type Code Sequence", "ConceptualVolumeTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x006a), ElementsDictionaryEntry("Conceptual Volume Type Modifier Code Sequence", "ConceptualVolumeTypeModifierCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x006b), ElementsDictionaryEntry("RT Prescription Sequence", "RTPrescriptionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x006c), ElementsDictionaryEntry("Dosimetric Objective Sequence", "DosimetricObjectiveSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x006d), ElementsDictionaryEntry("Dosimetric Objective Type Code Sequence", "DosimetricObjectiveTypeCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x006e), ElementsDictionaryEntry("Dosimetric Objective UID", "DosimetricObjectiveUID", "UI", "1")); public_dictionary.emplace(Tag(0x3010, 0x006f), ElementsDictionaryEntry("Referenced Dosimetric Objective UID", "ReferencedDosimetricObjectiveUID", "UI", "1")); public_dictionary.emplace(Tag(0x3010, 0x0070), ElementsDictionaryEntry("Dosimetric Objective Parameter Sequence", "DosimetricObjectiveParameterSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0071), ElementsDictionaryEntry("Referenced Dosimetric Objectives Sequence", "ReferencedDosimetricObjectivesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0073), ElementsDictionaryEntry("Absolute Dosimetric Objective Flag", "AbsoluteDosimetricObjectiveFlag", "CS", "1")); public_dictionary.emplace(Tag(0x3010, 0x0074), ElementsDictionaryEntry("Dosimetric Objective Weight", "DosimetricObjectiveWeight", "FD", "1")); public_dictionary.emplace(Tag(0x3010, 0x0075), ElementsDictionaryEntry("Dosimetric Objective Purpose", "DosimetricObjectivePurpose", "CS", "1")); public_dictionary.emplace(Tag(0x3010, 0x0076), ElementsDictionaryEntry("Planning Input Information Sequence", "PlanningInputInformationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0077), ElementsDictionaryEntry("Treatment Site", "TreatmentSite", "LO", "1")); public_dictionary.emplace(Tag(0x3010, 0x0078), ElementsDictionaryEntry("Treatment Site Code Sequence", "TreatmentSiteCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0079), ElementsDictionaryEntry("Fraction Pattern Sequence", "FractionPatternSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x007a), ElementsDictionaryEntry("Treatment Technique Notes", "TreatmentTechniqueNotes", "UT", "1")); public_dictionary.emplace(Tag(0x3010, 0x007b), ElementsDictionaryEntry("Prescription Notes", "PrescriptionNotes", "UT", "1")); public_dictionary.emplace(Tag(0x3010, 0x007c), ElementsDictionaryEntry("Number of Interval Fractions", "NumberOfIntervalFractions", "IS", "1")); public_dictionary.emplace(Tag(0x3010, 0x007d), ElementsDictionaryEntry("Number of Fractions", "NumberOfFractions", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x007e), ElementsDictionaryEntry("Intended Delivery Duration", "IntendedDeliveryDuration", "US", "1")); public_dictionary.emplace(Tag(0x3010, 0x007f), ElementsDictionaryEntry("Fractionation Notes", "FractionationNotes", "UT", "1")); public_dictionary.emplace(Tag(0x3010, 0x0080), ElementsDictionaryEntry("RT Treatment Technique Code Sequence", "RTTreatmentTechniqueCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0081), ElementsDictionaryEntry("Prescription Notes Sequence", "PrescriptionNotesSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0082), ElementsDictionaryEntry("Fraction-Based Relationship Sequence", "FractionBasedRelationshipSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0083), ElementsDictionaryEntry("Fraction-Based Relationship Interval Anchor", "FractionBasedRelationshipIntervalAnchor", "CS", "1")); public_dictionary.emplace(Tag(0x3010, 0x0084), ElementsDictionaryEntry("Minimum Hours between Fractions", "MinimumHoursBetweenFractions", "FD", "1")); public_dictionary.emplace(Tag(0x3010, 0x0085), ElementsDictionaryEntry("Intended Fraction Start Time", "IntendedFractionStartTime", "TM", "1-n")); public_dictionary.emplace(Tag(0x3010, 0x0086), ElementsDictionaryEntry("Intended Start Day of Week", "IntendedStartDayOfWeek", "LT", "1")); public_dictionary.emplace(Tag(0x3010, 0x0087), ElementsDictionaryEntry("Weekday Fraction Pattern Sequence", "WeekdayFractionPatternSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0088), ElementsDictionaryEntry("Delivery Time Structure Code Sequence", "DeliveryTimeStructureCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0089), ElementsDictionaryEntry("Treatment Site Modifier Code Sequence", "TreatmentSiteModifierCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0090), ElementsDictionaryEntry("Robotic Base Location Indicator", "RoboticBaseLocationIndicator", "CS", "1")); public_dictionary.emplace(Tag(0x3010, 0x0091), ElementsDictionaryEntry("Robotic Path Node Set Code Sequence", "RoboticPathNodeSetCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0092), ElementsDictionaryEntry("Robotic Node Identifier", "RoboticNodeIdentifier", "UL", "1")); public_dictionary.emplace(Tag(0x3010, 0x0093), ElementsDictionaryEntry("RT Treatment Source Coordinates", "RTTreatmentSourceCoordinates", "FD", "3")); public_dictionary.emplace(Tag(0x3010, 0x0094), ElementsDictionaryEntry("Radiation Source Coordinate SystemYaw Angle", "RadiationSourceCoordinateSystemYawAngle", "FD", "1")); public_dictionary.emplace(Tag(0x3010, 0x0095), ElementsDictionaryEntry("Radiation Source Coordinate SystemRoll Angle", "RadiationSourceCoordinateSystemRollAngle", "FD", "1")); public_dictionary.emplace(Tag(0x3010, 0x0096), ElementsDictionaryEntry("Radiation Source Coordinate SystemPitch Angle", "RadiationSourceCoordinateSystemPitchAngle", "FD", "1")); public_dictionary.emplace(Tag(0x3010, 0x0097), ElementsDictionaryEntry("Robotic Path Control Point Sequence", "RoboticPathControlPointSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0098), ElementsDictionaryEntry("Tomotherapeutic Control Point Sequence", "TomotherapeuticControlPointSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x3010, 0x0099), ElementsDictionaryEntry("Tomotherapeutic Leaf Open Durations", "TomotherapeuticLeafOpenDurations", "FD", "1-n")); public_dictionary.emplace(Tag(0x3010, 0x009a), ElementsDictionaryEntry("Tomotherapeutic Leaf Initial Closed Durations", "TomotherapeuticLeafInitialClosedDurations", "FD", "1-n")); public_tags.emplace("RadiobiologicalDoseEffectSequence", Tag(0x3010, 0x0001)); public_tags.emplace("RadiobiologicalDoseEffectFlag", Tag(0x3010, 0x0002)); public_tags.emplace("EffectiveDoseCalculationMethodCategoryCodeSequence", Tag(0x3010, 0x0003)); public_tags.emplace("EffectiveDoseCalculationMethodCodeSequence", Tag(0x3010, 0x0004)); public_tags.emplace("EffectiveDoseCalculationMethodDescription", Tag(0x3010, 0x0005)); public_tags.emplace("ConceptualVolumeUID", Tag(0x3010, 0x0006)); public_tags.emplace("OriginatingSOPInstanceReferenceSequence", Tag(0x3010, 0x0007)); public_tags.emplace("ConceptualVolumeConstituentSequence", Tag(0x3010, 0x0008)); public_tags.emplace("EquivalentConceptualVolumeInstanceReferenceSequence", Tag(0x3010, 0x0009)); public_tags.emplace("EquivalentConceptualVolumesSequence", Tag(0x3010, 0x000a)); public_tags.emplace("ReferencedConceptualVolumeUID", Tag(0x3010, 0x000b)); public_tags.emplace("ConceptualVolumeCombinationExpression", Tag(0x3010, 0x000c)); public_tags.emplace("ConceptualVolumeConstituentIndex", Tag(0x3010, 0x000d)); public_tags.emplace("ConceptualVolumeCombinationFlag", Tag(0x3010, 0x000e)); public_tags.emplace("ConceptualVolumeCombinationDescription", Tag(0x3010, 0x000f)); public_tags.emplace("ConceptualVolumeSegmentationDefinedFlag", Tag(0x3010, 0x0010)); public_tags.emplace("ConceptualVolumeSegmentationReferenceSequence", Tag(0x3010, 0x0011)); public_tags.emplace("ConceptualVolumeConstituentSegmentationReferenceSequence", Tag(0x3010, 0x0012)); public_tags.emplace("ConstituentConceptualVolumeUID", Tag(0x3010, 0x0013)); public_tags.emplace("DerivationConceptualVolumeSequence", Tag(0x3010, 0x0014)); public_tags.emplace("SourceConceptualVolumeUID", Tag(0x3010, 0x0015)); public_tags.emplace("ConceptualVolumeDerivationAlgorithmSequence", Tag(0x3010, 0x0016)); public_tags.emplace("ConceptualVolumeDescription", Tag(0x3010, 0x0017)); public_tags.emplace("SourceConceptualVolumeSequence", Tag(0x3010, 0x0018)); public_tags.emplace("AuthorIdentificationSequence", Tag(0x3010, 0x0019)); public_tags.emplace("ManufacturerModelVersion", Tag(0x3010, 0x001a)); public_tags.emplace("DeviceAlternateIdentifier", Tag(0x3010, 0x001b)); public_tags.emplace("DeviceAlternateIdentifierType", Tag(0x3010, 0x001c)); public_tags.emplace("DeviceAlternateIdentifierFormat", Tag(0x3010, 0x001d)); public_tags.emplace("SegmentationCreationTemplateLabel", Tag(0x3010, 0x001e)); public_tags.emplace("SegmentationTemplateUID", Tag(0x3010, 0x001f)); public_tags.emplace("ReferencedSegmentReferenceIndex", Tag(0x3010, 0x0020)); public_tags.emplace("SegmentReferenceSequence", Tag(0x3010, 0x0021)); public_tags.emplace("SegmentReferenceIndex", Tag(0x3010, 0x0022)); public_tags.emplace("DirectSegmentReferenceSequence", Tag(0x3010, 0x0023)); public_tags.emplace("CombinationSegmentReferenceSequence", Tag(0x3010, 0x0024)); public_tags.emplace("ConceptualVolumeSequence", Tag(0x3010, 0x0025)); public_tags.emplace("SegmentedRTAccessoryDeviceSequence", Tag(0x3010, 0x0026)); public_tags.emplace("SegmentCharacteristicsSequence", Tag(0x3010, 0x0027)); public_tags.emplace("RelatedSegmentCharacteristicsSequence", Tag(0x3010, 0x0028)); public_tags.emplace("SegmentCharacteristicsPrecedence", Tag(0x3010, 0x0029)); public_tags.emplace("RTSegmentAnnotationSequence", Tag(0x3010, 0x002a)); public_tags.emplace("SegmentAnnotationCategoryCodeSequence", Tag(0x3010, 0x002b)); public_tags.emplace("SegmentAnnotationTypeCodeSequence", Tag(0x3010, 0x002c)); public_tags.emplace("DeviceLabel", Tag(0x3010, 0x002d)); public_tags.emplace("DeviceTypeCodeSequence", Tag(0x3010, 0x002e)); public_tags.emplace("SegmentAnnotationTypeModifierCodeSequence", Tag(0x3010, 0x002f)); public_tags.emplace("PatientEquipmentRelationshipCodeSequence", Tag(0x3010, 0x0030)); public_tags.emplace("ReferencedFiducialsUID", Tag(0x3010, 0x0031)); public_tags.emplace("PatientTreatmentOrientationSequence", Tag(0x3010, 0x0032)); public_tags.emplace("UserContentLabel", Tag(0x3010, 0x0033)); public_tags.emplace("UserContentLongLabel", Tag(0x3010, 0x0034)); public_tags.emplace("EntityLabel", Tag(0x3010, 0x0035)); public_tags.emplace("EntityName", Tag(0x3010, 0x0036)); public_tags.emplace("EntityDescription", Tag(0x3010, 0x0037)); public_tags.emplace("EntityLongLabel", Tag(0x3010, 0x0038)); public_tags.emplace("DeviceIndex", Tag(0x3010, 0x0039)); public_tags.emplace("RTTreatmentPhaseIndex", Tag(0x3010, 0x003a)); public_tags.emplace("RTTreatmentPhaseUID", Tag(0x3010, 0x003b)); public_tags.emplace("RTPrescriptionIndex", Tag(0x3010, 0x003c)); public_tags.emplace("RTSegmentAnnotationIndex", Tag(0x3010, 0x003d)); public_tags.emplace("BasisRTTreatmentPhaseIndex", Tag(0x3010, 0x003e)); public_tags.emplace("RelatedRTTreatmentPhaseIndex", Tag(0x3010, 0x003f)); public_tags.emplace("ReferencedRTTreatmentPhaseIndex", Tag(0x3010, 0x0040)); public_tags.emplace("ReferencedRTPrescriptionIndex", Tag(0x3010, 0x0041)); public_tags.emplace("ReferencedParentRTPrescriptionIndex", Tag(0x3010, 0x0042)); public_tags.emplace("ManufacturerDeviceIdentifier", Tag(0x3010, 0x0043)); public_tags.emplace("InstanceLevelReferencedPerformedProcedureStepSequence", Tag(0x3010, 0x0044)); public_tags.emplace("RTTreatmentPhaseIntentPresenceFlag", Tag(0x3010, 0x0045)); public_tags.emplace("RadiotherapyTreatmentType", Tag(0x3010, 0x0046)); public_tags.emplace("TeletherapyRadiationType", Tag(0x3010, 0x0047)); public_tags.emplace("BrachytherapySourceType", Tag(0x3010, 0x0048)); public_tags.emplace("ReferencedRTTreatmentPhaseSequence", Tag(0x3010, 0x0049)); public_tags.emplace("ReferencedDirectSegmentInstanceSequence", Tag(0x3010, 0x004a)); public_tags.emplace("IntendedRTTreatmentPhaseSequence", Tag(0x3010, 0x004b)); public_tags.emplace("IntendedPhaseStartDate", Tag(0x3010, 0x004c)); public_tags.emplace("IntendedPhaseEndDate", Tag(0x3010, 0x004d)); public_tags.emplace("RTTreatmentPhaseIntervalSequence", Tag(0x3010, 0x004e)); public_tags.emplace("TemporalRelationshipIntervalAnchor", Tag(0x3010, 0x004f)); public_tags.emplace("MinimumNumberOfIntervalDays", Tag(0x3010, 0x0050)); public_tags.emplace("MaximumNumberOfIntervalDays", Tag(0x3010, 0x0051)); public_tags.emplace("PertinentSOPClassesInStudy", Tag(0x3010, 0x0052)); public_tags.emplace("PertinentSOPClassesInSeries", Tag(0x3010, 0x0053)); public_tags.emplace("RTPrescriptionLabel", Tag(0x3010, 0x0054)); public_tags.emplace("RTPhysicianIntentPredecessorSequence", Tag(0x3010, 0x0055)); public_tags.emplace("RTTreatmentApproachLabel", Tag(0x3010, 0x0056)); public_tags.emplace("RTPhysicianIntentSequence", Tag(0x3010, 0x0057)); public_tags.emplace("RTPhysicianIntentIndex", Tag(0x3010, 0x0058)); public_tags.emplace("RTTreatmentIntentType", Tag(0x3010, 0x0059)); public_tags.emplace("RTPhysicianIntentNarrative", Tag(0x3010, 0x005a)); public_tags.emplace("RTProtocolCodeSequence", Tag(0x3010, 0x005b)); public_tags.emplace("ReasonForSuperseding", Tag(0x3010, 0x005c)); public_tags.emplace("RTDiagnosisCodeSequence", Tag(0x3010, 0x005d)); public_tags.emplace("ReferencedRTPhysicianIntentIndex", Tag(0x3010, 0x005e)); public_tags.emplace("RTPhysicianIntentInputInstanceSequence", Tag(0x3010, 0x005f)); public_tags.emplace("RTAnatomicPrescriptionSequence", Tag(0x3010, 0x0060)); public_tags.emplace("PriorTreatmentDoseDescription", Tag(0x3010, 0x0061)); public_tags.emplace("PriorTreatmentReferenceSequence", Tag(0x3010, 0x0062)); public_tags.emplace("DosimetricObjectiveEvaluationScope", Tag(0x3010, 0x0063)); public_tags.emplace("TherapeuticRoleCategoryCodeSequence", Tag(0x3010, 0x0064)); public_tags.emplace("TherapeuticRoleTypeCodeSequence", Tag(0x3010, 0x0065)); public_tags.emplace("ConceptualVolumeOptimizationPrecedence", Tag(0x3010, 0x0066)); public_tags.emplace("ConceptualVolumeCategoryCodeSequence", Tag(0x3010, 0x0067)); public_tags.emplace("ConceptualVolumeBlockingConstraint", Tag(0x3010, 0x0068)); public_tags.emplace("ConceptualVolumeTypeCodeSequence", Tag(0x3010, 0x0069)); public_tags.emplace("ConceptualVolumeTypeModifierCodeSequence", Tag(0x3010, 0x006a)); public_tags.emplace("RTPrescriptionSequence", Tag(0x3010, 0x006b)); public_tags.emplace("DosimetricObjectiveSequence", Tag(0x3010, 0x006c)); public_tags.emplace("DosimetricObjectiveTypeCodeSequence", Tag(0x3010, 0x006d)); public_tags.emplace("DosimetricObjectiveUID", Tag(0x3010, 0x006e)); public_tags.emplace("ReferencedDosimetricObjectiveUID", Tag(0x3010, 0x006f)); public_tags.emplace("DosimetricObjectiveParameterSequence", Tag(0x3010, 0x0070)); public_tags.emplace("ReferencedDosimetricObjectivesSequence", Tag(0x3010, 0x0071)); public_tags.emplace("AbsoluteDosimetricObjectiveFlag", Tag(0x3010, 0x0073)); public_tags.emplace("DosimetricObjectiveWeight", Tag(0x3010, 0x0074)); public_tags.emplace("DosimetricObjectivePurpose", Tag(0x3010, 0x0075)); public_tags.emplace("PlanningInputInformationSequence", Tag(0x3010, 0x0076)); public_tags.emplace("TreatmentSite", Tag(0x3010, 0x0077)); public_tags.emplace("TreatmentSiteCodeSequence", Tag(0x3010, 0x0078)); public_tags.emplace("FractionPatternSequence", Tag(0x3010, 0x0079)); public_tags.emplace("TreatmentTechniqueNotes", Tag(0x3010, 0x007a)); public_tags.emplace("PrescriptionNotes", Tag(0x3010, 0x007b)); public_tags.emplace("NumberOfIntervalFractions", Tag(0x3010, 0x007c)); public_tags.emplace("NumberOfFractions", Tag(0x3010, 0x007d)); public_tags.emplace("IntendedDeliveryDuration", Tag(0x3010, 0x007e)); public_tags.emplace("FractionationNotes", Tag(0x3010, 0x007f)); public_tags.emplace("RTTreatmentTechniqueCodeSequence", Tag(0x3010, 0x0080)); public_tags.emplace("PrescriptionNotesSequence", Tag(0x3010, 0x0081)); public_tags.emplace("FractionBasedRelationshipSequence", Tag(0x3010, 0x0082)); public_tags.emplace("FractionBasedRelationshipIntervalAnchor", Tag(0x3010, 0x0083)); public_tags.emplace("MinimumHoursBetweenFractions", Tag(0x3010, 0x0084)); public_tags.emplace("IntendedFractionStartTime", Tag(0x3010, 0x0085)); public_tags.emplace("IntendedStartDayOfWeek", Tag(0x3010, 0x0086)); public_tags.emplace("WeekdayFractionPatternSequence", Tag(0x3010, 0x0087)); public_tags.emplace("DeliveryTimeStructureCodeSequence", Tag(0x3010, 0x0088)); public_tags.emplace("TreatmentSiteModifierCodeSequence", Tag(0x3010, 0x0089)); public_tags.emplace("RoboticBaseLocationIndicator", Tag(0x3010, 0x0090)); public_tags.emplace("RoboticPathNodeSetCodeSequence", Tag(0x3010, 0x0091)); public_tags.emplace("RoboticNodeIdentifier", Tag(0x3010, 0x0092)); public_tags.emplace("RTTreatmentSourceCoordinates", Tag(0x3010, 0x0093)); public_tags.emplace("RadiationSourceCoordinateSystemYawAngle", Tag(0x3010, 0x0094)); public_tags.emplace("RadiationSourceCoordinateSystemRollAngle", Tag(0x3010, 0x0095)); public_tags.emplace("RadiationSourceCoordinateSystemPitchAngle", Tag(0x3010, 0x0096)); public_tags.emplace("RoboticPathControlPointSequence", Tag(0x3010, 0x0097)); public_tags.emplace("TomotherapeuticControlPointSequence", Tag(0x3010, 0x0098)); public_tags.emplace("TomotherapeuticLeafOpenDurations", Tag(0x3010, 0x0099)); public_tags.emplace("TomotherapeuticLeafInitialClosedDurations", Tag(0x3010, 0x009a)); } } }odil-0.11.0/src/odil/registry_3010.h000066400000000000000000000216461362244656000167430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3010 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3010 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const RadiobiologicalDoseEffectSequence(0x3010, 0x0001); Tag const RadiobiologicalDoseEffectFlag(0x3010, 0x0002); Tag const EffectiveDoseCalculationMethodCategoryCodeSequence(0x3010, 0x0003); Tag const EffectiveDoseCalculationMethodCodeSequence(0x3010, 0x0004); Tag const EffectiveDoseCalculationMethodDescription(0x3010, 0x0005); Tag const ConceptualVolumeUID(0x3010, 0x0006); Tag const OriginatingSOPInstanceReferenceSequence(0x3010, 0x0007); Tag const ConceptualVolumeConstituentSequence(0x3010, 0x0008); Tag const EquivalentConceptualVolumeInstanceReferenceSequence(0x3010, 0x0009); Tag const EquivalentConceptualVolumesSequence(0x3010, 0x000a); Tag const ReferencedConceptualVolumeUID(0x3010, 0x000b); Tag const ConceptualVolumeCombinationExpression(0x3010, 0x000c); Tag const ConceptualVolumeConstituentIndex(0x3010, 0x000d); Tag const ConceptualVolumeCombinationFlag(0x3010, 0x000e); Tag const ConceptualVolumeCombinationDescription(0x3010, 0x000f); Tag const ConceptualVolumeSegmentationDefinedFlag(0x3010, 0x0010); Tag const ConceptualVolumeSegmentationReferenceSequence(0x3010, 0x0011); Tag const ConceptualVolumeConstituentSegmentationReferenceSequence(0x3010, 0x0012); Tag const ConstituentConceptualVolumeUID(0x3010, 0x0013); Tag const DerivationConceptualVolumeSequence(0x3010, 0x0014); Tag const SourceConceptualVolumeUID(0x3010, 0x0015); Tag const ConceptualVolumeDerivationAlgorithmSequence(0x3010, 0x0016); Tag const ConceptualVolumeDescription(0x3010, 0x0017); Tag const SourceConceptualVolumeSequence(0x3010, 0x0018); Tag const AuthorIdentificationSequence(0x3010, 0x0019); Tag const ManufacturerModelVersion(0x3010, 0x001a); Tag const DeviceAlternateIdentifier(0x3010, 0x001b); Tag const DeviceAlternateIdentifierType(0x3010, 0x001c); Tag const DeviceAlternateIdentifierFormat(0x3010, 0x001d); Tag const SegmentationCreationTemplateLabel(0x3010, 0x001e); Tag const SegmentationTemplateUID(0x3010, 0x001f); Tag const ReferencedSegmentReferenceIndex(0x3010, 0x0020); Tag const SegmentReferenceSequence(0x3010, 0x0021); Tag const SegmentReferenceIndex(0x3010, 0x0022); Tag const DirectSegmentReferenceSequence(0x3010, 0x0023); Tag const CombinationSegmentReferenceSequence(0x3010, 0x0024); Tag const ConceptualVolumeSequence(0x3010, 0x0025); Tag const SegmentedRTAccessoryDeviceSequence(0x3010, 0x0026); Tag const SegmentCharacteristicsSequence(0x3010, 0x0027); Tag const RelatedSegmentCharacteristicsSequence(0x3010, 0x0028); Tag const SegmentCharacteristicsPrecedence(0x3010, 0x0029); Tag const RTSegmentAnnotationSequence(0x3010, 0x002a); Tag const SegmentAnnotationCategoryCodeSequence(0x3010, 0x002b); Tag const SegmentAnnotationTypeCodeSequence(0x3010, 0x002c); Tag const DeviceLabel(0x3010, 0x002d); Tag const DeviceTypeCodeSequence(0x3010, 0x002e); Tag const SegmentAnnotationTypeModifierCodeSequence(0x3010, 0x002f); Tag const PatientEquipmentRelationshipCodeSequence(0x3010, 0x0030); Tag const ReferencedFiducialsUID(0x3010, 0x0031); Tag const PatientTreatmentOrientationSequence(0x3010, 0x0032); Tag const UserContentLabel(0x3010, 0x0033); Tag const UserContentLongLabel(0x3010, 0x0034); Tag const EntityLabel(0x3010, 0x0035); Tag const EntityName(0x3010, 0x0036); Tag const EntityDescription(0x3010, 0x0037); Tag const EntityLongLabel(0x3010, 0x0038); Tag const DeviceIndex(0x3010, 0x0039); Tag const RTTreatmentPhaseIndex(0x3010, 0x003a); Tag const RTTreatmentPhaseUID(0x3010, 0x003b); Tag const RTPrescriptionIndex(0x3010, 0x003c); Tag const RTSegmentAnnotationIndex(0x3010, 0x003d); Tag const BasisRTTreatmentPhaseIndex(0x3010, 0x003e); Tag const RelatedRTTreatmentPhaseIndex(0x3010, 0x003f); Tag const ReferencedRTTreatmentPhaseIndex(0x3010, 0x0040); Tag const ReferencedRTPrescriptionIndex(0x3010, 0x0041); Tag const ReferencedParentRTPrescriptionIndex(0x3010, 0x0042); Tag const ManufacturerDeviceIdentifier(0x3010, 0x0043); Tag const InstanceLevelReferencedPerformedProcedureStepSequence(0x3010, 0x0044); Tag const RTTreatmentPhaseIntentPresenceFlag(0x3010, 0x0045); Tag const RadiotherapyTreatmentType(0x3010, 0x0046); Tag const TeletherapyRadiationType(0x3010, 0x0047); Tag const BrachytherapySourceType(0x3010, 0x0048); Tag const ReferencedRTTreatmentPhaseSequence(0x3010, 0x0049); Tag const ReferencedDirectSegmentInstanceSequence(0x3010, 0x004a); Tag const IntendedRTTreatmentPhaseSequence(0x3010, 0x004b); Tag const IntendedPhaseStartDate(0x3010, 0x004c); Tag const IntendedPhaseEndDate(0x3010, 0x004d); Tag const RTTreatmentPhaseIntervalSequence(0x3010, 0x004e); Tag const TemporalRelationshipIntervalAnchor(0x3010, 0x004f); Tag const MinimumNumberOfIntervalDays(0x3010, 0x0050); Tag const MaximumNumberOfIntervalDays(0x3010, 0x0051); Tag const PertinentSOPClassesInStudy(0x3010, 0x0052); Tag const PertinentSOPClassesInSeries(0x3010, 0x0053); Tag const RTPrescriptionLabel(0x3010, 0x0054); Tag const RTPhysicianIntentPredecessorSequence(0x3010, 0x0055); Tag const RTTreatmentApproachLabel(0x3010, 0x0056); Tag const RTPhysicianIntentSequence(0x3010, 0x0057); Tag const RTPhysicianIntentIndex(0x3010, 0x0058); Tag const RTTreatmentIntentType(0x3010, 0x0059); Tag const RTPhysicianIntentNarrative(0x3010, 0x005a); Tag const RTProtocolCodeSequence(0x3010, 0x005b); Tag const ReasonForSuperseding(0x3010, 0x005c); Tag const RTDiagnosisCodeSequence(0x3010, 0x005d); Tag const ReferencedRTPhysicianIntentIndex(0x3010, 0x005e); Tag const RTPhysicianIntentInputInstanceSequence(0x3010, 0x005f); Tag const RTAnatomicPrescriptionSequence(0x3010, 0x0060); Tag const PriorTreatmentDoseDescription(0x3010, 0x0061); Tag const PriorTreatmentReferenceSequence(0x3010, 0x0062); Tag const DosimetricObjectiveEvaluationScope(0x3010, 0x0063); Tag const TherapeuticRoleCategoryCodeSequence(0x3010, 0x0064); Tag const TherapeuticRoleTypeCodeSequence(0x3010, 0x0065); Tag const ConceptualVolumeOptimizationPrecedence(0x3010, 0x0066); Tag const ConceptualVolumeCategoryCodeSequence(0x3010, 0x0067); Tag const ConceptualVolumeBlockingConstraint(0x3010, 0x0068); Tag const ConceptualVolumeTypeCodeSequence(0x3010, 0x0069); Tag const ConceptualVolumeTypeModifierCodeSequence(0x3010, 0x006a); Tag const RTPrescriptionSequence(0x3010, 0x006b); Tag const DosimetricObjectiveSequence(0x3010, 0x006c); Tag const DosimetricObjectiveTypeCodeSequence(0x3010, 0x006d); Tag const DosimetricObjectiveUID(0x3010, 0x006e); Tag const ReferencedDosimetricObjectiveUID(0x3010, 0x006f); Tag const DosimetricObjectiveParameterSequence(0x3010, 0x0070); Tag const ReferencedDosimetricObjectivesSequence(0x3010, 0x0071); Tag const AbsoluteDosimetricObjectiveFlag(0x3010, 0x0073); Tag const DosimetricObjectiveWeight(0x3010, 0x0074); Tag const DosimetricObjectivePurpose(0x3010, 0x0075); Tag const PlanningInputInformationSequence(0x3010, 0x0076); Tag const TreatmentSite(0x3010, 0x0077); Tag const TreatmentSiteCodeSequence(0x3010, 0x0078); Tag const FractionPatternSequence(0x3010, 0x0079); Tag const TreatmentTechniqueNotes(0x3010, 0x007a); Tag const PrescriptionNotes(0x3010, 0x007b); Tag const NumberOfIntervalFractions(0x3010, 0x007c); Tag const NumberOfFractions(0x3010, 0x007d); Tag const IntendedDeliveryDuration(0x3010, 0x007e); Tag const FractionationNotes(0x3010, 0x007f); Tag const RTTreatmentTechniqueCodeSequence(0x3010, 0x0080); Tag const PrescriptionNotesSequence(0x3010, 0x0081); Tag const FractionBasedRelationshipSequence(0x3010, 0x0082); Tag const FractionBasedRelationshipIntervalAnchor(0x3010, 0x0083); Tag const MinimumHoursBetweenFractions(0x3010, 0x0084); Tag const IntendedFractionStartTime(0x3010, 0x0085); Tag const IntendedStartDayOfWeek(0x3010, 0x0086); Tag const WeekdayFractionPatternSequence(0x3010, 0x0087); Tag const DeliveryTimeStructureCodeSequence(0x3010, 0x0088); Tag const TreatmentSiteModifierCodeSequence(0x3010, 0x0089); Tag const RoboticBaseLocationIndicator(0x3010, 0x0090); Tag const RoboticPathNodeSetCodeSequence(0x3010, 0x0091); Tag const RoboticNodeIdentifier(0x3010, 0x0092); Tag const RTTreatmentSourceCoordinates(0x3010, 0x0093); Tag const RadiationSourceCoordinateSystemYawAngle(0x3010, 0x0094); Tag const RadiationSourceCoordinateSystemRollAngle(0x3010, 0x0095); Tag const RadiationSourceCoordinateSystemPitchAngle(0x3010, 0x0096); Tag const RoboticPathControlPointSequence(0x3010, 0x0097); Tag const TomotherapeuticControlPointSequence(0x3010, 0x0098); Tag const TomotherapeuticLeafOpenDurations(0x3010, 0x0099); Tag const TomotherapeuticLeafInitialClosedDurations(0x3010, 0x009a); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_3010odil-0.11.0/src/odil/registry_4000.cpp000066400000000000000000000020201362244656000172570ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_4000( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x4000, 0x0010), ElementsDictionaryEntry("Arbitrary", "Arbitrary", "LT", "1")); public_dictionary.emplace(Tag(0x4000, 0x4000), ElementsDictionaryEntry("Text Comments", "TextComments", "LT", "1")); public_tags.emplace("Arbitrary", Tag(0x4000, 0x0010)); public_tags.emplace("TextComments", Tag(0x4000, 0x4000)); } } }odil-0.11.0/src/odil/registry_4000.h000066400000000000000000000013741362244656000167370ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_4000 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_4000 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const Arbitrary(0x4000, 0x0010); Tag const TextComments(0x4000, 0x4000); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_4000odil-0.11.0/src/odil/registry_4008.cpp000066400000000000000000000152601362244656000173010ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_4008( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x4008, 0x0040), ElementsDictionaryEntry("Results ID", "ResultsID", "SH", "1")); public_dictionary.emplace(Tag(0x4008, 0x0042), ElementsDictionaryEntry("Results ID Issuer", "ResultsIDIssuer", "LO", "1")); public_dictionary.emplace(Tag(0x4008, 0x0050), ElementsDictionaryEntry("Referenced Interpretation Sequence", "ReferencedInterpretationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4008, 0x00ff), ElementsDictionaryEntry("Report Production Status (Trial)", "ReportProductionStatusTrial", "CS", "1")); public_dictionary.emplace(Tag(0x4008, 0x0100), ElementsDictionaryEntry("Interpretation Recorded Date", "InterpretationRecordedDate", "DA", "1")); public_dictionary.emplace(Tag(0x4008, 0x0101), ElementsDictionaryEntry("Interpretation Recorded Time", "InterpretationRecordedTime", "TM", "1")); public_dictionary.emplace(Tag(0x4008, 0x0102), ElementsDictionaryEntry("Interpretation Recorder", "InterpretationRecorder", "PN", "1")); public_dictionary.emplace(Tag(0x4008, 0x0103), ElementsDictionaryEntry("Reference to Recorded Sound", "ReferenceToRecordedSound", "LO", "1")); public_dictionary.emplace(Tag(0x4008, 0x0108), ElementsDictionaryEntry("Interpretation Transcription Date", "InterpretationTranscriptionDate", "DA", "1")); public_dictionary.emplace(Tag(0x4008, 0x0109), ElementsDictionaryEntry("Interpretation Transcription Time", "InterpretationTranscriptionTime", "TM", "1")); public_dictionary.emplace(Tag(0x4008, 0x010a), ElementsDictionaryEntry("Interpretation Transcriber", "InterpretationTranscriber", "PN", "1")); public_dictionary.emplace(Tag(0x4008, 0x010b), ElementsDictionaryEntry("Interpretation Text", "InterpretationText", "ST", "1")); public_dictionary.emplace(Tag(0x4008, 0x010c), ElementsDictionaryEntry("Interpretation Author", "InterpretationAuthor", "PN", "1")); public_dictionary.emplace(Tag(0x4008, 0x0111), ElementsDictionaryEntry("Interpretation Approver Sequence", "InterpretationApproverSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4008, 0x0112), ElementsDictionaryEntry("Interpretation Approval Date", "InterpretationApprovalDate", "DA", "1")); public_dictionary.emplace(Tag(0x4008, 0x0113), ElementsDictionaryEntry("Interpretation Approval Time", "InterpretationApprovalTime", "TM", "1")); public_dictionary.emplace(Tag(0x4008, 0x0114), ElementsDictionaryEntry("Physician Approving Interpretation", "PhysicianApprovingInterpretation", "PN", "1")); public_dictionary.emplace(Tag(0x4008, 0x0115), ElementsDictionaryEntry("Interpretation Diagnosis Description", "InterpretationDiagnosisDescription", "LT", "1")); public_dictionary.emplace(Tag(0x4008, 0x0117), ElementsDictionaryEntry("Interpretation Diagnosis Code Sequence", "InterpretationDiagnosisCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4008, 0x0118), ElementsDictionaryEntry("Results Distribution List Sequence", "ResultsDistributionListSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4008, 0x0119), ElementsDictionaryEntry("Distribution Name", "DistributionName", "PN", "1")); public_dictionary.emplace(Tag(0x4008, 0x011a), ElementsDictionaryEntry("Distribution Address", "DistributionAddress", "LO", "1")); public_dictionary.emplace(Tag(0x4008, 0x0200), ElementsDictionaryEntry("Interpretation ID", "InterpretationID", "SH", "1")); public_dictionary.emplace(Tag(0x4008, 0x0202), ElementsDictionaryEntry("Interpretation ID Issuer", "InterpretationIDIssuer", "LO", "1")); public_dictionary.emplace(Tag(0x4008, 0x0210), ElementsDictionaryEntry("Interpretation Type ID", "InterpretationTypeID", "CS", "1")); public_dictionary.emplace(Tag(0x4008, 0x0212), ElementsDictionaryEntry("Interpretation Status ID", "InterpretationStatusID", "CS", "1")); public_dictionary.emplace(Tag(0x4008, 0x0300), ElementsDictionaryEntry("Impressions", "Impressions", "ST", "1")); public_dictionary.emplace(Tag(0x4008, 0x4000), ElementsDictionaryEntry("Results Comments", "ResultsComments", "ST", "1")); public_tags.emplace("ResultsID", Tag(0x4008, 0x0040)); public_tags.emplace("ResultsIDIssuer", Tag(0x4008, 0x0042)); public_tags.emplace("ReferencedInterpretationSequence", Tag(0x4008, 0x0050)); public_tags.emplace("ReportProductionStatusTrial", Tag(0x4008, 0x00ff)); public_tags.emplace("InterpretationRecordedDate", Tag(0x4008, 0x0100)); public_tags.emplace("InterpretationRecordedTime", Tag(0x4008, 0x0101)); public_tags.emplace("InterpretationRecorder", Tag(0x4008, 0x0102)); public_tags.emplace("ReferenceToRecordedSound", Tag(0x4008, 0x0103)); public_tags.emplace("InterpretationTranscriptionDate", Tag(0x4008, 0x0108)); public_tags.emplace("InterpretationTranscriptionTime", Tag(0x4008, 0x0109)); public_tags.emplace("InterpretationTranscriber", Tag(0x4008, 0x010a)); public_tags.emplace("InterpretationText", Tag(0x4008, 0x010b)); public_tags.emplace("InterpretationAuthor", Tag(0x4008, 0x010c)); public_tags.emplace("InterpretationApproverSequence", Tag(0x4008, 0x0111)); public_tags.emplace("InterpretationApprovalDate", Tag(0x4008, 0x0112)); public_tags.emplace("InterpretationApprovalTime", Tag(0x4008, 0x0113)); public_tags.emplace("PhysicianApprovingInterpretation", Tag(0x4008, 0x0114)); public_tags.emplace("InterpretationDiagnosisDescription", Tag(0x4008, 0x0115)); public_tags.emplace("InterpretationDiagnosisCodeSequence", Tag(0x4008, 0x0117)); public_tags.emplace("ResultsDistributionListSequence", Tag(0x4008, 0x0118)); public_tags.emplace("DistributionName", Tag(0x4008, 0x0119)); public_tags.emplace("DistributionAddress", Tag(0x4008, 0x011a)); public_tags.emplace("InterpretationID", Tag(0x4008, 0x0200)); public_tags.emplace("InterpretationIDIssuer", Tag(0x4008, 0x0202)); public_tags.emplace("InterpretationTypeID", Tag(0x4008, 0x0210)); public_tags.emplace("InterpretationStatusID", Tag(0x4008, 0x0212)); public_tags.emplace("Impressions", Tag(0x4008, 0x0300)); public_tags.emplace("ResultsComments", Tag(0x4008, 0x4000)); } } }odil-0.11.0/src/odil/registry_4008.h000066400000000000000000000041241362244656000167430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_4008 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_4008 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ResultsID(0x4008, 0x0040); Tag const ResultsIDIssuer(0x4008, 0x0042); Tag const ReferencedInterpretationSequence(0x4008, 0x0050); Tag const ReportProductionStatusTrial(0x4008, 0x00ff); Tag const InterpretationRecordedDate(0x4008, 0x0100); Tag const InterpretationRecordedTime(0x4008, 0x0101); Tag const InterpretationRecorder(0x4008, 0x0102); Tag const ReferenceToRecordedSound(0x4008, 0x0103); Tag const InterpretationTranscriptionDate(0x4008, 0x0108); Tag const InterpretationTranscriptionTime(0x4008, 0x0109); Tag const InterpretationTranscriber(0x4008, 0x010a); Tag const InterpretationText(0x4008, 0x010b); Tag const InterpretationAuthor(0x4008, 0x010c); Tag const InterpretationApproverSequence(0x4008, 0x0111); Tag const InterpretationApprovalDate(0x4008, 0x0112); Tag const InterpretationApprovalTime(0x4008, 0x0113); Tag const PhysicianApprovingInterpretation(0x4008, 0x0114); Tag const InterpretationDiagnosisDescription(0x4008, 0x0115); Tag const InterpretationDiagnosisCodeSequence(0x4008, 0x0117); Tag const ResultsDistributionListSequence(0x4008, 0x0118); Tag const DistributionName(0x4008, 0x0119); Tag const DistributionAddress(0x4008, 0x011a); Tag const InterpretationID(0x4008, 0x0200); Tag const InterpretationIDIssuer(0x4008, 0x0202); Tag const InterpretationTypeID(0x4008, 0x0210); Tag const InterpretationStatusID(0x4008, 0x0212); Tag const Impressions(0x4008, 0x0300); Tag const ResultsComments(0x4008, 0x4000); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_4008odil-0.11.0/src/odil/registry_4010.cpp000066400000000000000000000434711362244656000172770ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_4010( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x4010, 0x0001), ElementsDictionaryEntry("Low Energy Detectors", "LowEnergyDetectors", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x0002), ElementsDictionaryEntry("High Energy Detectors", "HighEnergyDetectors", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x0004), ElementsDictionaryEntry("Detector Geometry Sequence", "DetectorGeometrySequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x1001), ElementsDictionaryEntry("Threat ROI Voxel Sequence", "ThreatROIVoxelSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x1004), ElementsDictionaryEntry("Threat ROI Base", "ThreatROIBase", "FL", "3")); public_dictionary.emplace(Tag(0x4010, 0x1005), ElementsDictionaryEntry("Threat ROI Extents", "ThreatROIExtents", "FL", "3")); public_dictionary.emplace(Tag(0x4010, 0x1006), ElementsDictionaryEntry("Threat ROI Bitmap", "ThreatROIBitmap", "OB", "1")); public_dictionary.emplace(Tag(0x4010, 0x1007), ElementsDictionaryEntry("Route Segment ID", "RouteSegmentID", "SH", "1")); public_dictionary.emplace(Tag(0x4010, 0x1008), ElementsDictionaryEntry("Gantry Type", "GantryType", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1009), ElementsDictionaryEntry("OOI Owner Type", "OOIOwnerType", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x100a), ElementsDictionaryEntry("Route Segment Sequence", "RouteSegmentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x1010), ElementsDictionaryEntry("Potential Threat Object ID", "PotentialThreatObjectID", "US", "1")); public_dictionary.emplace(Tag(0x4010, 0x1011), ElementsDictionaryEntry("Threat Sequence", "ThreatSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x1012), ElementsDictionaryEntry("Threat Category", "ThreatCategory", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1013), ElementsDictionaryEntry("Threat Category Description", "ThreatCategoryDescription", "LT", "1")); public_dictionary.emplace(Tag(0x4010, 0x1014), ElementsDictionaryEntry("ATD Ability Assessment", "ATDAbilityAssessment", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1015), ElementsDictionaryEntry("ATD Assessment Flag", "ATDAssessmentFlag", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1016), ElementsDictionaryEntry("ATD Assessment Probability", "ATDAssessmentProbability", "FL", "1")); public_dictionary.emplace(Tag(0x4010, 0x1017), ElementsDictionaryEntry("Mass", "Mass", "FL", "1")); public_dictionary.emplace(Tag(0x4010, 0x1018), ElementsDictionaryEntry("Density", "Density", "FL", "1")); public_dictionary.emplace(Tag(0x4010, 0x1019), ElementsDictionaryEntry("Z Effective", "ZEffective", "FL", "1")); public_dictionary.emplace(Tag(0x4010, 0x101a), ElementsDictionaryEntry("Boarding Pass ID", "BoardingPassID", "SH", "1")); public_dictionary.emplace(Tag(0x4010, 0x101b), ElementsDictionaryEntry("Center of Mass", "CenterOfMass", "FL", "3")); public_dictionary.emplace(Tag(0x4010, 0x101c), ElementsDictionaryEntry("Center of PTO", "CenterOfPTO", "FL", "3")); public_dictionary.emplace(Tag(0x4010, 0x101d), ElementsDictionaryEntry("Bounding Polygon", "BoundingPolygon", "FL", "6-n")); public_dictionary.emplace(Tag(0x4010, 0x101e), ElementsDictionaryEntry("Route Segment Start Location ID", "RouteSegmentStartLocationID", "SH", "1")); public_dictionary.emplace(Tag(0x4010, 0x101f), ElementsDictionaryEntry("Route Segment End Location ID", "RouteSegmentEndLocationID", "SH", "1")); public_dictionary.emplace(Tag(0x4010, 0x1020), ElementsDictionaryEntry("Route Segment Location ID Type", "RouteSegmentLocationIDType", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1021), ElementsDictionaryEntry("Abort Reason", "AbortReason", "CS", "1-n")); public_dictionary.emplace(Tag(0x4010, 0x1023), ElementsDictionaryEntry("Volume of PTO", "VolumeOfPTO", "FL", "1")); public_dictionary.emplace(Tag(0x4010, 0x1024), ElementsDictionaryEntry("Abort Flag", "AbortFlag", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1025), ElementsDictionaryEntry("Route Segment Start Time", "RouteSegmentStartTime", "DT", "1")); public_dictionary.emplace(Tag(0x4010, 0x1026), ElementsDictionaryEntry("Route Segment End Time", "RouteSegmentEndTime", "DT", "1")); public_dictionary.emplace(Tag(0x4010, 0x1027), ElementsDictionaryEntry("TDR Type", "TDRType", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1028), ElementsDictionaryEntry("International Route Segment", "InternationalRouteSegment", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1029), ElementsDictionaryEntry("Threat Detection Algorithm and Version", "ThreatDetectionAlgorithmandVersion", "LO", "1-n")); public_dictionary.emplace(Tag(0x4010, 0x102a), ElementsDictionaryEntry("Assigned Location", "AssignedLocation", "SH", "1")); public_dictionary.emplace(Tag(0x4010, 0x102b), ElementsDictionaryEntry("Alarm Decision Time", "AlarmDecisionTime", "DT", "1")); public_dictionary.emplace(Tag(0x4010, 0x1031), ElementsDictionaryEntry("Alarm Decision", "AlarmDecision", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1033), ElementsDictionaryEntry("Number of Total Objects", "NumberOfTotalObjects", "US", "1")); public_dictionary.emplace(Tag(0x4010, 0x1034), ElementsDictionaryEntry("Number of Alarm Objects", "NumberOfAlarmObjects", "US", "1")); public_dictionary.emplace(Tag(0x4010, 0x1037), ElementsDictionaryEntry("PTO Representation Sequence", "PTORepresentationSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x1038), ElementsDictionaryEntry("ATD Assessment Sequence", "ATDAssessmentSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x1039), ElementsDictionaryEntry("TIP Type", "TIPType", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x103a), ElementsDictionaryEntry("DICOS Version", "DICOSVersion", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1041), ElementsDictionaryEntry("OOI Owner Creation Time", "OOIOwnerCreationTime", "DT", "1")); public_dictionary.emplace(Tag(0x4010, 0x1042), ElementsDictionaryEntry("OOI Type", "OOIType", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1043), ElementsDictionaryEntry("OOI Size", "OOISize", "FL", "3")); public_dictionary.emplace(Tag(0x4010, 0x1044), ElementsDictionaryEntry("Acquisition Status", "AcquisitionStatus", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1045), ElementsDictionaryEntry("Basis Materials Code Sequence", "BasisMaterialsCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x1046), ElementsDictionaryEntry("Phantom Type", "PhantomType", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1047), ElementsDictionaryEntry("OOI Owner Sequence", "OOIOwnerSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x1048), ElementsDictionaryEntry("Scan Type", "ScanType", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1051), ElementsDictionaryEntry("Itinerary ID", "ItineraryID", "LO", "1")); public_dictionary.emplace(Tag(0x4010, 0x1052), ElementsDictionaryEntry("Itinerary ID Type", "ItineraryIDType", "SH", "1")); public_dictionary.emplace(Tag(0x4010, 0x1053), ElementsDictionaryEntry("Itinerary ID Assigning Authority", "ItineraryIDAssigningAuthority", "LO", "1")); public_dictionary.emplace(Tag(0x4010, 0x1054), ElementsDictionaryEntry("Route ID", "RouteID", "SH", "1")); public_dictionary.emplace(Tag(0x4010, 0x1055), ElementsDictionaryEntry("Route ID Assigning Authority", "RouteIDAssigningAuthority", "SH", "1")); public_dictionary.emplace(Tag(0x4010, 0x1056), ElementsDictionaryEntry("Inbound Arrival Type", "InboundArrivalType", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1058), ElementsDictionaryEntry("Carrier ID", "CarrierID", "SH", "1")); public_dictionary.emplace(Tag(0x4010, 0x1059), ElementsDictionaryEntry("Carrier ID Assigning Authority", "CarrierIDAssigningAuthority", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1060), ElementsDictionaryEntry("Source Orientation", "SourceOrientation", "FL", "3")); public_dictionary.emplace(Tag(0x4010, 0x1061), ElementsDictionaryEntry("Source Position", "SourcePosition", "FL", "3")); public_dictionary.emplace(Tag(0x4010, 0x1062), ElementsDictionaryEntry("Belt Height", "BeltHeight", "FL", "1")); public_dictionary.emplace(Tag(0x4010, 0x1064), ElementsDictionaryEntry("Algorithm Routing Code Sequence", "AlgorithmRoutingCodeSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x1067), ElementsDictionaryEntry("Transport Classification", "TransportClassification", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1068), ElementsDictionaryEntry("OOI Type Descriptor", "OOITypeDescriptor", "LT", "1")); public_dictionary.emplace(Tag(0x4010, 0x1069), ElementsDictionaryEntry("Total Processing Time", "TotalProcessingTime", "FL", "1")); public_dictionary.emplace(Tag(0x4010, 0x106c), ElementsDictionaryEntry("Detector Calibration Data", "DetectorCalibrationData", "OB", "1")); public_dictionary.emplace(Tag(0x4010, 0x106d), ElementsDictionaryEntry("Additional Screening Performed", "AdditionalScreeningPerformed", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x106e), ElementsDictionaryEntry("Additional Inspection Selection Criteria", "AdditionalInspectionSelectionCriteria", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x106f), ElementsDictionaryEntry("Additional Inspection Method Sequence", "AdditionalInspectionMethodSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x1070), ElementsDictionaryEntry("AIT Device Type", "AITDeviceType", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1071), ElementsDictionaryEntry("QR Measurements Sequence", "QRMeasurementsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x1072), ElementsDictionaryEntry("Target Material Sequence", "TargetMaterialSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x1073), ElementsDictionaryEntry("SNR Threshold", "SNRThreshold", "FD", "1")); public_dictionary.emplace(Tag(0x4010, 0x1075), ElementsDictionaryEntry("Image Scale Representation", "ImageScaleRepresentation", "DS", "1")); public_dictionary.emplace(Tag(0x4010, 0x1076), ElementsDictionaryEntry("Referenced PTO Sequence", "ReferencedPTOSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x1077), ElementsDictionaryEntry("Referenced TDR Instance Sequence", "ReferencedTDRInstanceSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x1078), ElementsDictionaryEntry("PTO Location Description", "PTOLocationDescription", "ST", "1")); public_dictionary.emplace(Tag(0x4010, 0x1079), ElementsDictionaryEntry("Anomaly Locator Indicator Sequence", "AnomalyLocatorIndicatorSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x107a), ElementsDictionaryEntry("Anomaly Locator Indicator", "AnomalyLocatorIndicator", "FL", "3")); public_dictionary.emplace(Tag(0x4010, 0x107b), ElementsDictionaryEntry("PTO Region Sequence", "PTORegionSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x107c), ElementsDictionaryEntry("Inspection Selection Criteria", "InspectionSelectionCriteria", "CS", "1")); public_dictionary.emplace(Tag(0x4010, 0x107d), ElementsDictionaryEntry("Secondary Inspection Method Sequence", "SecondaryInspectionMethodSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x4010, 0x107e), ElementsDictionaryEntry("PRCS to RCS Orientation", "PRCSToRCSOrientation", "DS", "6")); public_tags.emplace("LowEnergyDetectors", Tag(0x4010, 0x0001)); public_tags.emplace("HighEnergyDetectors", Tag(0x4010, 0x0002)); public_tags.emplace("DetectorGeometrySequence", Tag(0x4010, 0x0004)); public_tags.emplace("ThreatROIVoxelSequence", Tag(0x4010, 0x1001)); public_tags.emplace("ThreatROIBase", Tag(0x4010, 0x1004)); public_tags.emplace("ThreatROIExtents", Tag(0x4010, 0x1005)); public_tags.emplace("ThreatROIBitmap", Tag(0x4010, 0x1006)); public_tags.emplace("RouteSegmentID", Tag(0x4010, 0x1007)); public_tags.emplace("GantryType", Tag(0x4010, 0x1008)); public_tags.emplace("OOIOwnerType", Tag(0x4010, 0x1009)); public_tags.emplace("RouteSegmentSequence", Tag(0x4010, 0x100a)); public_tags.emplace("PotentialThreatObjectID", Tag(0x4010, 0x1010)); public_tags.emplace("ThreatSequence", Tag(0x4010, 0x1011)); public_tags.emplace("ThreatCategory", Tag(0x4010, 0x1012)); public_tags.emplace("ThreatCategoryDescription", Tag(0x4010, 0x1013)); public_tags.emplace("ATDAbilityAssessment", Tag(0x4010, 0x1014)); public_tags.emplace("ATDAssessmentFlag", Tag(0x4010, 0x1015)); public_tags.emplace("ATDAssessmentProbability", Tag(0x4010, 0x1016)); public_tags.emplace("Mass", Tag(0x4010, 0x1017)); public_tags.emplace("Density", Tag(0x4010, 0x1018)); public_tags.emplace("ZEffective", Tag(0x4010, 0x1019)); public_tags.emplace("BoardingPassID", Tag(0x4010, 0x101a)); public_tags.emplace("CenterOfMass", Tag(0x4010, 0x101b)); public_tags.emplace("CenterOfPTO", Tag(0x4010, 0x101c)); public_tags.emplace("BoundingPolygon", Tag(0x4010, 0x101d)); public_tags.emplace("RouteSegmentStartLocationID", Tag(0x4010, 0x101e)); public_tags.emplace("RouteSegmentEndLocationID", Tag(0x4010, 0x101f)); public_tags.emplace("RouteSegmentLocationIDType", Tag(0x4010, 0x1020)); public_tags.emplace("AbortReason", Tag(0x4010, 0x1021)); public_tags.emplace("VolumeOfPTO", Tag(0x4010, 0x1023)); public_tags.emplace("AbortFlag", Tag(0x4010, 0x1024)); public_tags.emplace("RouteSegmentStartTime", Tag(0x4010, 0x1025)); public_tags.emplace("RouteSegmentEndTime", Tag(0x4010, 0x1026)); public_tags.emplace("TDRType", Tag(0x4010, 0x1027)); public_tags.emplace("InternationalRouteSegment", Tag(0x4010, 0x1028)); public_tags.emplace("ThreatDetectionAlgorithmandVersion", Tag(0x4010, 0x1029)); public_tags.emplace("AssignedLocation", Tag(0x4010, 0x102a)); public_tags.emplace("AlarmDecisionTime", Tag(0x4010, 0x102b)); public_tags.emplace("AlarmDecision", Tag(0x4010, 0x1031)); public_tags.emplace("NumberOfTotalObjects", Tag(0x4010, 0x1033)); public_tags.emplace("NumberOfAlarmObjects", Tag(0x4010, 0x1034)); public_tags.emplace("PTORepresentationSequence", Tag(0x4010, 0x1037)); public_tags.emplace("ATDAssessmentSequence", Tag(0x4010, 0x1038)); public_tags.emplace("TIPType", Tag(0x4010, 0x1039)); public_tags.emplace("DICOSVersion", Tag(0x4010, 0x103a)); public_tags.emplace("OOIOwnerCreationTime", Tag(0x4010, 0x1041)); public_tags.emplace("OOIType", Tag(0x4010, 0x1042)); public_tags.emplace("OOISize", Tag(0x4010, 0x1043)); public_tags.emplace("AcquisitionStatus", Tag(0x4010, 0x1044)); public_tags.emplace("BasisMaterialsCodeSequence", Tag(0x4010, 0x1045)); public_tags.emplace("PhantomType", Tag(0x4010, 0x1046)); public_tags.emplace("OOIOwnerSequence", Tag(0x4010, 0x1047)); public_tags.emplace("ScanType", Tag(0x4010, 0x1048)); public_tags.emplace("ItineraryID", Tag(0x4010, 0x1051)); public_tags.emplace("ItineraryIDType", Tag(0x4010, 0x1052)); public_tags.emplace("ItineraryIDAssigningAuthority", Tag(0x4010, 0x1053)); public_tags.emplace("RouteID", Tag(0x4010, 0x1054)); public_tags.emplace("RouteIDAssigningAuthority", Tag(0x4010, 0x1055)); public_tags.emplace("InboundArrivalType", Tag(0x4010, 0x1056)); public_tags.emplace("CarrierID", Tag(0x4010, 0x1058)); public_tags.emplace("CarrierIDAssigningAuthority", Tag(0x4010, 0x1059)); public_tags.emplace("SourceOrientation", Tag(0x4010, 0x1060)); public_tags.emplace("SourcePosition", Tag(0x4010, 0x1061)); public_tags.emplace("BeltHeight", Tag(0x4010, 0x1062)); public_tags.emplace("AlgorithmRoutingCodeSequence", Tag(0x4010, 0x1064)); public_tags.emplace("TransportClassification", Tag(0x4010, 0x1067)); public_tags.emplace("OOITypeDescriptor", Tag(0x4010, 0x1068)); public_tags.emplace("TotalProcessingTime", Tag(0x4010, 0x1069)); public_tags.emplace("DetectorCalibrationData", Tag(0x4010, 0x106c)); public_tags.emplace("AdditionalScreeningPerformed", Tag(0x4010, 0x106d)); public_tags.emplace("AdditionalInspectionSelectionCriteria", Tag(0x4010, 0x106e)); public_tags.emplace("AdditionalInspectionMethodSequence", Tag(0x4010, 0x106f)); public_tags.emplace("AITDeviceType", Tag(0x4010, 0x1070)); public_tags.emplace("QRMeasurementsSequence", Tag(0x4010, 0x1071)); public_tags.emplace("TargetMaterialSequence", Tag(0x4010, 0x1072)); public_tags.emplace("SNRThreshold", Tag(0x4010, 0x1073)); public_tags.emplace("ImageScaleRepresentation", Tag(0x4010, 0x1075)); public_tags.emplace("ReferencedPTOSequence", Tag(0x4010, 0x1076)); public_tags.emplace("ReferencedTDRInstanceSequence", Tag(0x4010, 0x1077)); public_tags.emplace("PTOLocationDescription", Tag(0x4010, 0x1078)); public_tags.emplace("AnomalyLocatorIndicatorSequence", Tag(0x4010, 0x1079)); public_tags.emplace("AnomalyLocatorIndicator", Tag(0x4010, 0x107a)); public_tags.emplace("PTORegionSequence", Tag(0x4010, 0x107b)); public_tags.emplace("InspectionSelectionCriteria", Tag(0x4010, 0x107c)); public_tags.emplace("SecondaryInspectionMethodSequence", Tag(0x4010, 0x107d)); public_tags.emplace("PRCSToRCSOrientation", Tag(0x4010, 0x107e)); } } }odil-0.11.0/src/odil/registry_4010.h000066400000000000000000000111011362244656000167250ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_4010 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_4010 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const LowEnergyDetectors(0x4010, 0x0001); Tag const HighEnergyDetectors(0x4010, 0x0002); Tag const DetectorGeometrySequence(0x4010, 0x0004); Tag const ThreatROIVoxelSequence(0x4010, 0x1001); Tag const ThreatROIBase(0x4010, 0x1004); Tag const ThreatROIExtents(0x4010, 0x1005); Tag const ThreatROIBitmap(0x4010, 0x1006); Tag const RouteSegmentID(0x4010, 0x1007); Tag const GantryType(0x4010, 0x1008); Tag const OOIOwnerType(0x4010, 0x1009); Tag const RouteSegmentSequence(0x4010, 0x100a); Tag const PotentialThreatObjectID(0x4010, 0x1010); Tag const ThreatSequence(0x4010, 0x1011); Tag const ThreatCategory(0x4010, 0x1012); Tag const ThreatCategoryDescription(0x4010, 0x1013); Tag const ATDAbilityAssessment(0x4010, 0x1014); Tag const ATDAssessmentFlag(0x4010, 0x1015); Tag const ATDAssessmentProbability(0x4010, 0x1016); Tag const Mass(0x4010, 0x1017); Tag const Density(0x4010, 0x1018); Tag const ZEffective(0x4010, 0x1019); Tag const BoardingPassID(0x4010, 0x101a); Tag const CenterOfMass(0x4010, 0x101b); Tag const CenterOfPTO(0x4010, 0x101c); Tag const BoundingPolygon(0x4010, 0x101d); Tag const RouteSegmentStartLocationID(0x4010, 0x101e); Tag const RouteSegmentEndLocationID(0x4010, 0x101f); Tag const RouteSegmentLocationIDType(0x4010, 0x1020); Tag const AbortReason(0x4010, 0x1021); Tag const VolumeOfPTO(0x4010, 0x1023); Tag const AbortFlag(0x4010, 0x1024); Tag const RouteSegmentStartTime(0x4010, 0x1025); Tag const RouteSegmentEndTime(0x4010, 0x1026); Tag const TDRType(0x4010, 0x1027); Tag const InternationalRouteSegment(0x4010, 0x1028); Tag const ThreatDetectionAlgorithmandVersion(0x4010, 0x1029); Tag const AssignedLocation(0x4010, 0x102a); Tag const AlarmDecisionTime(0x4010, 0x102b); Tag const AlarmDecision(0x4010, 0x1031); Tag const NumberOfTotalObjects(0x4010, 0x1033); Tag const NumberOfAlarmObjects(0x4010, 0x1034); Tag const PTORepresentationSequence(0x4010, 0x1037); Tag const ATDAssessmentSequence(0x4010, 0x1038); Tag const TIPType(0x4010, 0x1039); Tag const DICOSVersion(0x4010, 0x103a); Tag const OOIOwnerCreationTime(0x4010, 0x1041); Tag const OOIType(0x4010, 0x1042); Tag const OOISize(0x4010, 0x1043); Tag const AcquisitionStatus(0x4010, 0x1044); Tag const BasisMaterialsCodeSequence(0x4010, 0x1045); Tag const PhantomType(0x4010, 0x1046); Tag const OOIOwnerSequence(0x4010, 0x1047); Tag const ScanType(0x4010, 0x1048); Tag const ItineraryID(0x4010, 0x1051); Tag const ItineraryIDType(0x4010, 0x1052); Tag const ItineraryIDAssigningAuthority(0x4010, 0x1053); Tag const RouteID(0x4010, 0x1054); Tag const RouteIDAssigningAuthority(0x4010, 0x1055); Tag const InboundArrivalType(0x4010, 0x1056); Tag const CarrierID(0x4010, 0x1058); Tag const CarrierIDAssigningAuthority(0x4010, 0x1059); Tag const SourceOrientation(0x4010, 0x1060); Tag const SourcePosition(0x4010, 0x1061); Tag const BeltHeight(0x4010, 0x1062); Tag const AlgorithmRoutingCodeSequence(0x4010, 0x1064); Tag const TransportClassification(0x4010, 0x1067); Tag const OOITypeDescriptor(0x4010, 0x1068); Tag const TotalProcessingTime(0x4010, 0x1069); Tag const DetectorCalibrationData(0x4010, 0x106c); Tag const AdditionalScreeningPerformed(0x4010, 0x106d); Tag const AdditionalInspectionSelectionCriteria(0x4010, 0x106e); Tag const AdditionalInspectionMethodSequence(0x4010, 0x106f); Tag const AITDeviceType(0x4010, 0x1070); Tag const QRMeasurementsSequence(0x4010, 0x1071); Tag const TargetMaterialSequence(0x4010, 0x1072); Tag const SNRThreshold(0x4010, 0x1073); Tag const ImageScaleRepresentation(0x4010, 0x1075); Tag const ReferencedPTOSequence(0x4010, 0x1076); Tag const ReferencedTDRInstanceSequence(0x4010, 0x1077); Tag const PTOLocationDescription(0x4010, 0x1078); Tag const AnomalyLocatorIndicatorSequence(0x4010, 0x1079); Tag const AnomalyLocatorIndicator(0x4010, 0x107a); Tag const PTORegionSequence(0x4010, 0x107b); Tag const InspectionSelectionCriteria(0x4010, 0x107c); Tag const SecondaryInspectionMethodSequence(0x4010, 0x107d); Tag const PRCSToRCSOrientation(0x4010, 0x107e); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_4010odil-0.11.0/src/odil/registry_4ffe.cpp000066400000000000000000000015761362244656000175370ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_4ffe( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x4ffe, 0x0001), ElementsDictionaryEntry("MAC Parameters Sequence", "MACParametersSequence", "SQ", "1")); public_tags.emplace("MACParametersSequence", Tag(0x4ffe, 0x0001)); } } }odil-0.11.0/src/odil/registry_4ffe.h000066400000000000000000000013401362244656000171710ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_4ffe #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_4ffe #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const MACParametersSequence(0x4ffe, 0x0001); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_4ffeodil-0.11.0/src/odil/registry_5200.cpp000066400000000000000000000022211362244656000172650ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_5200( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x5200, 0x9229), ElementsDictionaryEntry("Shared Functional Groups Sequence", "SharedFunctionalGroupsSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x5200, 0x9230), ElementsDictionaryEntry("Per-frame Functional Groups Sequence", "PerFrameFunctionalGroupsSequence", "SQ", "1")); public_tags.emplace("SharedFunctionalGroupsSequence", Tag(0x5200, 0x9229)); public_tags.emplace("PerFrameFunctionalGroupsSequence", Tag(0x5200, 0x9230)); } } }odil-0.11.0/src/odil/registry_5200.h000066400000000000000000000014451362244656000167410ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_5200 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_5200 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const SharedFunctionalGroupsSequence(0x5200, 0x9229); Tag const PerFrameFunctionalGroupsSequence(0x5200, 0x9230); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_5200odil-0.11.0/src/odil/registry_5400.cpp000066400000000000000000000041501362244656000172720ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_5400( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x5400, 0x0100), ElementsDictionaryEntry("Waveform Sequence", "WaveformSequence", "SQ", "1")); public_dictionary.emplace(Tag(0x5400, 0x0110), ElementsDictionaryEntry("Channel Minimum Value", "ChannelMinimumValue", "OB or OW", "1")); public_dictionary.emplace(Tag(0x5400, 0x0112), ElementsDictionaryEntry("Channel Maximum Value", "ChannelMaximumValue", "OB or OW", "1")); public_dictionary.emplace(Tag(0x5400, 0x1004), ElementsDictionaryEntry("Waveform Bits Allocated", "WaveformBitsAllocated", "US", "1")); public_dictionary.emplace(Tag(0x5400, 0x1006), ElementsDictionaryEntry("Waveform Sample Interpretation", "WaveformSampleInterpretation", "CS", "1")); public_dictionary.emplace(Tag(0x5400, 0x100a), ElementsDictionaryEntry("Waveform Padding Value", "WaveformPaddingValue", "OB or OW", "1")); public_dictionary.emplace(Tag(0x5400, 0x1010), ElementsDictionaryEntry("Waveform Data", "WaveformData", "OB or OW", "1")); public_tags.emplace("WaveformSequence", Tag(0x5400, 0x0100)); public_tags.emplace("ChannelMinimumValue", Tag(0x5400, 0x0110)); public_tags.emplace("ChannelMaximumValue", Tag(0x5400, 0x0112)); public_tags.emplace("WaveformBitsAllocated", Tag(0x5400, 0x1004)); public_tags.emplace("WaveformSampleInterpretation", Tag(0x5400, 0x1006)); public_tags.emplace("WaveformPaddingValue", Tag(0x5400, 0x100a)); public_tags.emplace("WaveformData", Tag(0x5400, 0x1010)); } } }odil-0.11.0/src/odil/registry_5400.h000066400000000000000000000017721362244656000167460ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_5400 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_5400 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const WaveformSequence(0x5400, 0x0100); Tag const ChannelMinimumValue(0x5400, 0x0110); Tag const ChannelMaximumValue(0x5400, 0x0112); Tag const WaveformBitsAllocated(0x5400, 0x1004); Tag const WaveformSampleInterpretation(0x5400, 0x1006); Tag const WaveformPaddingValue(0x5400, 0x100a); Tag const WaveformData(0x5400, 0x1010); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_5400odil-0.11.0/src/odil/registry_5600.cpp000066400000000000000000000021371362244656000172770ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_5600( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x5600, 0x0010), ElementsDictionaryEntry("First Order Phase Correction Angle", "FirstOrderPhaseCorrectionAngle", "OF", "1")); public_dictionary.emplace(Tag(0x5600, 0x0020), ElementsDictionaryEntry("Spectroscopy Data", "SpectroscopyData", "OF", "1")); public_tags.emplace("FirstOrderPhaseCorrectionAngle", Tag(0x5600, 0x0010)); public_tags.emplace("SpectroscopyData", Tag(0x5600, 0x0020)); } } }odil-0.11.0/src/odil/registry_5600.h000066400000000000000000000014251362244656000167430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_5600 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_5600 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const FirstOrderPhaseCorrectionAngle(0x5600, 0x0010); Tag const SpectroscopyData(0x5600, 0x0020); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_5600odil-0.11.0/src/odil/registry_7fe0.cpp000066400000000000000000000043561362244656000174530ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_7fe0( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0x7fe0, 0x0001), ElementsDictionaryEntry("Extended Offset Table", "ExtendedOffsetTable", "OV", "1")); public_dictionary.emplace(Tag(0x7fe0, 0x0002), ElementsDictionaryEntry("Extended Offset Table Lengths", "ExtendedOffsetTableLengths", "OV", "1")); public_dictionary.emplace(Tag(0x7fe0, 0x0008), ElementsDictionaryEntry("Float Pixel Data", "FloatPixelData", "OF", "1")); public_dictionary.emplace(Tag(0x7fe0, 0x0009), ElementsDictionaryEntry("Double Float Pixel Data", "DoubleFloatPixelData", "OD", "1")); public_dictionary.emplace(Tag(0x7fe0, 0x0010), ElementsDictionaryEntry("Pixel Data", "PixelData", "OB or OW", "1")); public_dictionary.emplace(Tag(0x7fe0, 0x0020), ElementsDictionaryEntry("Coefficients SDVN", "CoefficientsSDVN", "OW", "1")); public_dictionary.emplace(Tag(0x7fe0, 0x0030), ElementsDictionaryEntry("Coefficients SDHN", "CoefficientsSDHN", "OW", "1")); public_dictionary.emplace(Tag(0x7fe0, 0x0040), ElementsDictionaryEntry("Coefficients SDDN", "CoefficientsSDDN", "OW", "1")); public_tags.emplace("ExtendedOffsetTable", Tag(0x7fe0, 0x0001)); public_tags.emplace("ExtendedOffsetTableLengths", Tag(0x7fe0, 0x0002)); public_tags.emplace("FloatPixelData", Tag(0x7fe0, 0x0008)); public_tags.emplace("DoubleFloatPixelData", Tag(0x7fe0, 0x0009)); public_tags.emplace("PixelData", Tag(0x7fe0, 0x0010)); public_tags.emplace("CoefficientsSDVN", Tag(0x7fe0, 0x0020)); public_tags.emplace("CoefficientsSDHN", Tag(0x7fe0, 0x0030)); public_tags.emplace("CoefficientsSDDN", Tag(0x7fe0, 0x0040)); } } }odil-0.11.0/src/odil/registry_7fe0.h000066400000000000000000000020271362244656000171110ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_7fe0 #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_7fe0 #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const ExtendedOffsetTable(0x7fe0, 0x0001); Tag const ExtendedOffsetTableLengths(0x7fe0, 0x0002); Tag const FloatPixelData(0x7fe0, 0x0008); Tag const DoubleFloatPixelData(0x7fe0, 0x0009); Tag const PixelData(0x7fe0, 0x0010); Tag const CoefficientsSDVN(0x7fe0, 0x0020); Tag const CoefficientsSDHN(0x7fe0, 0x0030); Tag const CoefficientsSDDN(0x7fe0, 0x0040); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_7fe0odil-0.11.0/src/odil/registry_fffa.cpp000066400000000000000000000016121362244656000176040ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_fffa( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0xfffa, 0xfffa), ElementsDictionaryEntry("Digital Signatures Sequence", "DigitalSignaturesSequence", "SQ", "1")); public_tags.emplace("DigitalSignaturesSequence", Tag(0xfffa, 0xfffa)); } } }odil-0.11.0/src/odil/registry_fffa.h000066400000000000000000000013441362244656000172530ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_fffa #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_fffa #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const DigitalSignaturesSequence(0xfffa, 0xfffa); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_fffaodil-0.11.0/src/odil/registry_fffc.cpp000066400000000000000000000016021362244656000176050ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_fffc( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0xfffc, 0xfffc), ElementsDictionaryEntry("Data Set Trailing Padding", "DataSetTrailingPadding", "OB", "1")); public_tags.emplace("DataSetTrailingPadding", Tag(0xfffc, 0xfffc)); } } }odil-0.11.0/src/odil/registry_fffc.h000066400000000000000000000013411362244656000172520ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_fffc #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_fffc #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const DataSetTrailingPadding(0xfffc, 0xfffc); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_fffcodil-0.11.0/src/odil/registry_fffe.cpp000066400000000000000000000024141362244656000176110ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_fffe( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(Tag(0xfffe, 0xe000), ElementsDictionaryEntry("Item", "Item", "See Note ", "1")); public_dictionary.emplace(Tag(0xfffe, 0xe00d), ElementsDictionaryEntry("Item Delimitation Item", "ItemDelimitationItem", "See Note ", "1")); public_dictionary.emplace(Tag(0xfffe, 0xe0dd), ElementsDictionaryEntry("Sequence Delimitation Item", "SequenceDelimitationItem", "See Note ", "1")); public_tags.emplace("Item", Tag(0xfffe, 0xe000)); public_tags.emplace("ItemDelimitationItem", Tag(0xfffe, 0xe00d)); public_tags.emplace("SequenceDelimitationItem", Tag(0xfffe, 0xe0dd)); } } }odil-0.11.0/src/odil/registry_fffe.h000066400000000000000000000014631362244656000172610ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_fffe #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_fffe #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { Tag const Item(0xfffe, 0xe000); Tag const ItemDelimitationItem(0xfffe, 0xe00d); Tag const SequenceDelimitationItem(0xfffe, 0xe0dd); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_fffeodil-0.11.0/src/odil/registry_misc.cpp000066400000000000000000000310241362244656000176350ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/ElementsDictionary.h" #include "odil/Tag.h" namespace odil { namespace registry { void update_misc( ElementsDictionary & public_dictionary, std::map & public_tags) { public_dictionary.emplace(std::string("002031xx"), ElementsDictionaryEntry("Source Image IDs", "SourceImageIDs", "CS", "1-n")); public_dictionary.emplace(std::string("002804x0"), ElementsDictionaryEntry("Rows For Nth Order Coefficients", "RowsForNthOrderCoefficients", "US", "1")); public_dictionary.emplace(std::string("002804x1"), ElementsDictionaryEntry("Columns For Nth Order Coefficients", "ColumnsForNthOrderCoefficients", "US", "1")); public_dictionary.emplace(std::string("002804x2"), ElementsDictionaryEntry("Coefficient Coding", "CoefficientCoding", "LO", "1-n")); public_dictionary.emplace(std::string("002804x3"), ElementsDictionaryEntry("Coefficient Coding Pointers", "CoefficientCodingPointers", "AT", "1-n")); public_dictionary.emplace(std::string("002808x0"), ElementsDictionaryEntry("Code Label", "CodeLabel", "CS", "1-n")); public_dictionary.emplace(std::string("002808x2"), ElementsDictionaryEntry("Number of Tables", "NumberOfTables", "US", "1")); public_dictionary.emplace(std::string("002808x3"), ElementsDictionaryEntry("Code Table Location", "CodeTableLocation", "AT", "1-n")); public_dictionary.emplace(std::string("002808x4"), ElementsDictionaryEntry("Bits For Code Word", "BitsForCodeWord", "US", "1")); public_dictionary.emplace(std::string("002808x8"), ElementsDictionaryEntry("Image Data Location", "ImageDataLocation", "AT", "1-n")); public_dictionary.emplace(std::string("1000xxx0"), ElementsDictionaryEntry("Escape Triplet", "EscapeTriplet", "US", "3")); public_dictionary.emplace(std::string("1000xxx1"), ElementsDictionaryEntry("Run Length Triplet", "RunLengthTriplet", "US", "3")); public_dictionary.emplace(std::string("1000xxx2"), ElementsDictionaryEntry("Huffman Table Size", "HuffmanTableSize", "US", "1")); public_dictionary.emplace(std::string("1000xxx3"), ElementsDictionaryEntry("Huffman Table Triplet", "HuffmanTableTriplet", "US", "3")); public_dictionary.emplace(std::string("1000xxx4"), ElementsDictionaryEntry("Shift Table Size", "ShiftTableSize", "US", "1")); public_dictionary.emplace(std::string("1000xxx5"), ElementsDictionaryEntry("Shift Table Triplet", "ShiftTableTriplet", "US", "3")); public_dictionary.emplace(std::string("1010xxxx"), ElementsDictionaryEntry("Zonal Map", "ZonalMap", "US", "1-n")); public_dictionary.emplace(std::string("50xx0005"), ElementsDictionaryEntry("Curve Dimensions", "CurveDimensions", "US", "1")); public_dictionary.emplace(std::string("50xx0010"), ElementsDictionaryEntry("Number of Points", "NumberOfPoints", "US", "1")); public_dictionary.emplace(std::string("50xx0020"), ElementsDictionaryEntry("Type of Data", "TypeOfData", "CS", "1")); public_dictionary.emplace(std::string("50xx0022"), ElementsDictionaryEntry("Curve Description", "CurveDescription", "LO", "1")); public_dictionary.emplace(std::string("50xx0030"), ElementsDictionaryEntry("Axis Units", "AxisUnits", "SH", "1-n")); public_dictionary.emplace(std::string("50xx0040"), ElementsDictionaryEntry("Axis Labels", "AxisLabels", "SH", "1-n")); public_dictionary.emplace(std::string("50xx0103"), ElementsDictionaryEntry("Data Value Representation", "DataValueRepresentation", "US", "1")); public_dictionary.emplace(std::string("50xx0104"), ElementsDictionaryEntry("Minimum Coordinate Value", "MinimumCoordinateValue", "US", "1-n")); public_dictionary.emplace(std::string("50xx0105"), ElementsDictionaryEntry("Maximum Coordinate Value", "MaximumCoordinateValue", "US", "1-n")); public_dictionary.emplace(std::string("50xx0106"), ElementsDictionaryEntry("Curve Range", "CurveRange", "SH", "1-n")); public_dictionary.emplace(std::string("50xx0110"), ElementsDictionaryEntry("Curve Data Descriptor", "CurveDataDescriptor", "US", "1-n")); public_dictionary.emplace(std::string("50xx0112"), ElementsDictionaryEntry("Coordinate Start Value", "CoordinateStartValue", "US", "1-n")); public_dictionary.emplace(std::string("50xx0114"), ElementsDictionaryEntry("Coordinate Step Value", "CoordinateStepValue", "US", "1-n")); public_dictionary.emplace(std::string("50xx1001"), ElementsDictionaryEntry("Curve Activation Layer", "CurveActivationLayer", "CS", "1")); public_dictionary.emplace(std::string("50xx2000"), ElementsDictionaryEntry("Audio Type", "AudioType", "US", "1")); public_dictionary.emplace(std::string("50xx2002"), ElementsDictionaryEntry("Audio Sample Format", "AudioSampleFormat", "US", "1")); public_dictionary.emplace(std::string("50xx2004"), ElementsDictionaryEntry("Number of Channels", "NumberOfChannels", "US", "1")); public_dictionary.emplace(std::string("50xx2006"), ElementsDictionaryEntry("Number of Samples", "NumberOfSamples", "UL", "1")); public_dictionary.emplace(std::string("50xx2008"), ElementsDictionaryEntry("Sample Rate", "SampleRate", "UL", "1")); public_dictionary.emplace(std::string("50xx200A"), ElementsDictionaryEntry("Total Time", "TotalTime", "UL", "1")); public_dictionary.emplace(std::string("50xx200C"), ElementsDictionaryEntry("Audio Sample Data", "AudioSampleData", "OB or OW", "1")); public_dictionary.emplace(std::string("50xx200E"), ElementsDictionaryEntry("Audio Comments", "AudioComments", "LT", "1")); public_dictionary.emplace(std::string("50xx2500"), ElementsDictionaryEntry("Curve Label", "CurveLabel", "LO", "1")); public_dictionary.emplace(std::string("50xx2600"), ElementsDictionaryEntry("Curve Referenced Overlay Sequence", "CurveReferencedOverlaySequence", "SQ", "1")); public_dictionary.emplace(std::string("50xx2610"), ElementsDictionaryEntry("Curve Referenced Overlay Group", "CurveReferencedOverlayGroup", "US", "1")); public_dictionary.emplace(std::string("50xx3000"), ElementsDictionaryEntry("Curve Data", "CurveData", "OB or OW", "1")); public_dictionary.emplace(std::string("60xx0010"), ElementsDictionaryEntry("Overlay Rows", "OverlayRows", "US", "1")); public_dictionary.emplace(std::string("60xx0011"), ElementsDictionaryEntry("Overlay Columns", "OverlayColumns", "US", "1")); public_dictionary.emplace(std::string("60xx0012"), ElementsDictionaryEntry("Overlay Planes", "OverlayPlanes", "US", "1")); public_dictionary.emplace(std::string("60xx0015"), ElementsDictionaryEntry("Number of Frames in Overlay", "NumberOfFramesInOverlay", "IS", "1")); public_dictionary.emplace(std::string("60xx0022"), ElementsDictionaryEntry("Overlay Description", "OverlayDescription", "LO", "1")); public_dictionary.emplace(std::string("60xx0040"), ElementsDictionaryEntry("Overlay Type", "OverlayType", "CS", "1")); public_dictionary.emplace(std::string("60xx0045"), ElementsDictionaryEntry("Overlay Subtype", "OverlaySubtype", "LO", "1")); public_dictionary.emplace(std::string("60xx0050"), ElementsDictionaryEntry("Overlay Origin", "OverlayOrigin", "SS", "2")); public_dictionary.emplace(std::string("60xx0051"), ElementsDictionaryEntry("Image Frame Origin", "ImageFrameOrigin", "US", "1")); public_dictionary.emplace(std::string("60xx0052"), ElementsDictionaryEntry("Overlay Plane Origin", "OverlayPlaneOrigin", "US", "1")); public_dictionary.emplace(std::string("60xx0060"), ElementsDictionaryEntry("Overlay Compression Code", "OverlayCompressionCode", "CS", "1")); public_dictionary.emplace(std::string("60xx0061"), ElementsDictionaryEntry("Overlay Compression Originator", "OverlayCompressionOriginator", "SH", "1")); public_dictionary.emplace(std::string("60xx0062"), ElementsDictionaryEntry("Overlay Compression Label", "OverlayCompressionLabel", "SH", "1")); public_dictionary.emplace(std::string("60xx0063"), ElementsDictionaryEntry("Overlay Compression Description", "OverlayCompressionDescription", "CS", "1")); public_dictionary.emplace(std::string("60xx0066"), ElementsDictionaryEntry("Overlay Compression Step Pointers", "OverlayCompressionStepPointers", "AT", "1-n")); public_dictionary.emplace(std::string("60xx0068"), ElementsDictionaryEntry("Overlay Repeat Interval", "OverlayRepeatInterval", "US", "1")); public_dictionary.emplace(std::string("60xx0069"), ElementsDictionaryEntry("Overlay Bits Grouped", "OverlayBitsGrouped", "US", "1")); public_dictionary.emplace(std::string("60xx0100"), ElementsDictionaryEntry("Overlay Bits Allocated", "OverlayBitsAllocated", "US", "1")); public_dictionary.emplace(std::string("60xx0102"), ElementsDictionaryEntry("Overlay Bit Position", "OverlayBitPosition", "US", "1")); public_dictionary.emplace(std::string("60xx0110"), ElementsDictionaryEntry("Overlay Format", "OverlayFormat", "CS", "1")); public_dictionary.emplace(std::string("60xx0200"), ElementsDictionaryEntry("Overlay Location", "OverlayLocation", "US", "1")); public_dictionary.emplace(std::string("60xx0800"), ElementsDictionaryEntry("Overlay Code Label", "OverlayCodeLabel", "CS", "1-n")); public_dictionary.emplace(std::string("60xx0802"), ElementsDictionaryEntry("Overlay Number of Tables", "OverlayNumberOfTables", "US", "1")); public_dictionary.emplace(std::string("60xx0803"), ElementsDictionaryEntry("Overlay Code Table Location", "OverlayCodeTableLocation", "AT", "1-n")); public_dictionary.emplace(std::string("60xx0804"), ElementsDictionaryEntry("Overlay Bits For Code Word", "OverlayBitsForCodeWord", "US", "1")); public_dictionary.emplace(std::string("60xx1001"), ElementsDictionaryEntry("Overlay Activation Layer", "OverlayActivationLayer", "CS", "1")); public_dictionary.emplace(std::string("60xx1100"), ElementsDictionaryEntry("Overlay Descriptor - Gray", "OverlayDescriptorGray", "US", "1")); public_dictionary.emplace(std::string("60xx1101"), ElementsDictionaryEntry("Overlay Descriptor - Red", "OverlayDescriptorRed", "US", "1")); public_dictionary.emplace(std::string("60xx1102"), ElementsDictionaryEntry("Overlay Descriptor - Green", "OverlayDescriptorGreen", "US", "1")); public_dictionary.emplace(std::string("60xx1103"), ElementsDictionaryEntry("Overlay Descriptor - Blue", "OverlayDescriptorBlue", "US", "1")); public_dictionary.emplace(std::string("60xx1200"), ElementsDictionaryEntry("Overlays - Gray", "OverlaysGray", "US", "1-n")); public_dictionary.emplace(std::string("60xx1201"), ElementsDictionaryEntry("Overlays - Red", "OverlaysRed", "US", "1-n")); public_dictionary.emplace(std::string("60xx1202"), ElementsDictionaryEntry("Overlays - Green", "OverlaysGreen", "US", "1-n")); public_dictionary.emplace(std::string("60xx1203"), ElementsDictionaryEntry("Overlays - Blue", "OverlaysBlue", "US", "1-n")); public_dictionary.emplace(std::string("60xx1301"), ElementsDictionaryEntry("ROI Area", "ROIArea", "IS", "1")); public_dictionary.emplace(std::string("60xx1302"), ElementsDictionaryEntry("ROI Mean", "ROIMean", "DS", "1")); public_dictionary.emplace(std::string("60xx1303"), ElementsDictionaryEntry("ROI Standard Deviation", "ROIStandardDeviation", "DS", "1")); public_dictionary.emplace(std::string("60xx1500"), ElementsDictionaryEntry("Overlay Label", "OverlayLabel", "LO", "1")); public_dictionary.emplace(std::string("60xx3000"), ElementsDictionaryEntry("Overlay Data", "OverlayData", "OB or OW", "1")); public_dictionary.emplace(std::string("60xx4000"), ElementsDictionaryEntry("Overlay Comments", "OverlayComments", "LT", "1")); public_dictionary.emplace(std::string("7Fxx0010"), ElementsDictionaryEntry("Variable Pixel Data", "VariablePixelData", "OB or OW", "1")); public_dictionary.emplace(std::string("7Fxx0011"), ElementsDictionaryEntry("Variable Next Data Group", "VariableNextDataGroup", "US", "1")); public_dictionary.emplace(std::string("7Fxx0020"), ElementsDictionaryEntry("Variable Coefficients SDVN", "VariableCoefficientsSDVN", "OW", "1")); public_dictionary.emplace(std::string("7Fxx0030"), ElementsDictionaryEntry("Variable Coefficients SDHN", "VariableCoefficientsSDHN", "OW", "1")); public_dictionary.emplace(std::string("7Fxx0040"), ElementsDictionaryEntry("Variable Coefficients SDDN", "VariableCoefficientsSDDN", "OW", "1")); } } }odil-0.11.0/src/odil/registry_misc.h000066400000000000000000000116171362244656000173100ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_misc #define _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_misc #include #include #include "odil/odil.h" #include "odil/Tag.h" namespace odil { namespace registry { std::string const SourceImageIDs("002031xx"); std::string const RowsForNthOrderCoefficients("002804x0"); std::string const ColumnsForNthOrderCoefficients("002804x1"); std::string const CoefficientCoding("002804x2"); std::string const CoefficientCodingPointers("002804x3"); std::string const CodeLabel("002808x0"); std::string const NumberOfTables("002808x2"); std::string const CodeTableLocation("002808x3"); std::string const BitsForCodeWord("002808x4"); std::string const ImageDataLocation("002808x8"); std::string const EscapeTriplet("1000xxx0"); std::string const RunLengthTriplet("1000xxx1"); std::string const HuffmanTableSize("1000xxx2"); std::string const HuffmanTableTriplet("1000xxx3"); std::string const ShiftTableSize("1000xxx4"); std::string const ShiftTableTriplet("1000xxx5"); std::string const ZonalMap("1010xxxx"); std::string const CurveDimensions("50xx0005"); std::string const NumberOfPoints("50xx0010"); std::string const TypeOfData("50xx0020"); std::string const CurveDescription("50xx0022"); std::string const AxisUnits("50xx0030"); std::string const AxisLabels("50xx0040"); std::string const DataValueRepresentation("50xx0103"); std::string const MinimumCoordinateValue("50xx0104"); std::string const MaximumCoordinateValue("50xx0105"); std::string const CurveRange("50xx0106"); std::string const CurveDataDescriptor("50xx0110"); std::string const CoordinateStartValue("50xx0112"); std::string const CoordinateStepValue("50xx0114"); std::string const CurveActivationLayer("50xx1001"); std::string const AudioType("50xx2000"); std::string const AudioSampleFormat("50xx2002"); std::string const NumberOfChannels("50xx2004"); std::string const NumberOfSamples("50xx2006"); std::string const SampleRate("50xx2008"); std::string const TotalTime("50xx200A"); std::string const AudioSampleData("50xx200C"); std::string const AudioComments("50xx200E"); std::string const CurveLabel("50xx2500"); std::string const CurveReferencedOverlaySequence("50xx2600"); std::string const CurveReferencedOverlayGroup("50xx2610"); std::string const CurveData("50xx3000"); std::string const OverlayRows("60xx0010"); std::string const OverlayColumns("60xx0011"); std::string const OverlayPlanes("60xx0012"); std::string const NumberOfFramesInOverlay("60xx0015"); std::string const OverlayDescription("60xx0022"); std::string const OverlayType("60xx0040"); std::string const OverlaySubtype("60xx0045"); std::string const OverlayOrigin("60xx0050"); std::string const ImageFrameOrigin("60xx0051"); std::string const OverlayPlaneOrigin("60xx0052"); std::string const OverlayCompressionCode("60xx0060"); std::string const OverlayCompressionOriginator("60xx0061"); std::string const OverlayCompressionLabel("60xx0062"); std::string const OverlayCompressionDescription("60xx0063"); std::string const OverlayCompressionStepPointers("60xx0066"); std::string const OverlayRepeatInterval("60xx0068"); std::string const OverlayBitsGrouped("60xx0069"); std::string const OverlayBitsAllocated("60xx0100"); std::string const OverlayBitPosition("60xx0102"); std::string const OverlayFormat("60xx0110"); std::string const OverlayLocation("60xx0200"); std::string const OverlayCodeLabel("60xx0800"); std::string const OverlayNumberOfTables("60xx0802"); std::string const OverlayCodeTableLocation("60xx0803"); std::string const OverlayBitsForCodeWord("60xx0804"); std::string const OverlayActivationLayer("60xx1001"); std::string const OverlayDescriptorGray("60xx1100"); std::string const OverlayDescriptorRed("60xx1101"); std::string const OverlayDescriptorGreen("60xx1102"); std::string const OverlayDescriptorBlue("60xx1103"); std::string const OverlaysGray("60xx1200"); std::string const OverlaysRed("60xx1201"); std::string const OverlaysGreen("60xx1202"); std::string const OverlaysBlue("60xx1203"); std::string const ROIArea("60xx1301"); std::string const ROIMean("60xx1302"); std::string const ROIStandardDeviation("60xx1303"); std::string const OverlayLabel("60xx1500"); std::string const OverlayData("60xx3000"); std::string const OverlayComments("60xx4000"); std::string const VariablePixelData("7Fxx0010"); std::string const VariableNextDataGroup("7Fxx0011"); std::string const VariableCoefficientsSDVN("7Fxx0020"); std::string const VariableCoefficientsSDHN("7Fxx0030"); std::string const VariableCoefficientsSDDN("7Fxx0040"); } } #endif // _afc7b2d7_0869_4fea_9a9b_7fe6228baca9_miscodil-0.11.0/src/odil/uid.cpp000066400000000000000000000023131362244656000155320ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/uid.h" #include #include #include "odil/Exception.h" #define ODIL_STRINGIFY_HELPER(s) #s #define ODIL_STRINGIFY(s) ODIL_STRINGIFY_HELPER(s) namespace odil { #ifdef ODIL_MAJOR_VERSION std::string implementation_class_uid=uid_prefix+"0." ODIL_STRINGIFY(ODIL_MAJOR_VERSION); std::string implementation_version_name="Odil " ODIL_STRINGIFY(ODIL_MAJOR_VERSION); #else #error ODIL_MAJOR_VERSION must be defined #endif std::string generate_uid() { static std::random_device generator; std::uniform_int_distribution<> non_zero(1, 9); std::uniform_int_distribution<> digits(0, 9); std::string result = uid_prefix + "." + std::to_string(non_zero(generator)); while(result.size()<64) { result += std::to_string(digits(generator)); } return result; } } odil-0.11.0/src/odil/uid.h000066400000000000000000000017421362244656000152040ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _d8ae0008_075b_4a28_a241_1c6fb1a6c79b #define _d8ae0008_075b_4a28_a241_1c6fb1a6c79b #include #include "odil/odil.h" namespace odil { /// @brief UID prefix of Odil. std::string const uid_prefix="1.2.826.0.1.3680043.9.5560"; /// @brief Implementation class UID of Odil. extern ODIL_API std::string implementation_class_uid; /// @brief Implementation version name of Odil. extern ODIL_API std::string implementation_version_name; /// @brief Generate a UID under the UID prefix. std::string ODIL_API generate_uid(); } #endif // _d8ae0008_075b_4a28_a241_1c6fb1a6c79b odil-0.11.0/src/odil/unicode.cpp000066400000000000000000000351621362244656000164070ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/unicode.h" #include #include #include #include #include #include #include #include #include #include "odil/Exception.h" #include "odil/Value.h" namespace odil { std::map const icu_encodings = { { "", "" }, // Single-Byte Character Sets Without Code Extensions { "ISO_IR 100", "iso-ir-100" }, { "ISO_IR 101", "iso-ir-101" }, { "ISO_IR 109", "iso-ir-109" }, { "ISO_IR 110", "iso-ir-110" }, { "ISO_IR 144", "iso-ir-144" }, { "ISO_IR 127", "iso-ir-127" }, { "ISO_IR 126", "iso-ir-126" }, { "ISO_IR 138", "iso-ir-138" }, { "ISO_IR 148", "iso-ir-148" }, { "ISO_IR 13", "Shift_JIS" }, // Since the 0x00 to 0x7f characters // match ASCII (i.e. Romaji) and the 0xa1 to 0xdf map to half-width // katakana of JIS X 0201. cf. https://en.wikipedia.org/wiki/Shift_JIS { "ISO_IR 166", "TIS-620" }, // Single-Byte Character Sets with Code Extensions { "ISO 2022 IR 6", "" }, { "ISO 2022 IR 100", "iso-ir-100" }, { "ISO 2022 IR 101", "iso-ir-101" }, { "ISO 2022 IR 109", "iso-ir-109" }, { "ISO 2022 IR 110", "iso-ir-110" }, { "ISO 2022 IR 144", "iso-ir-144" }, { "ISO 2022 IR 127", "iso-ir-127" }, { "ISO 2022 IR 126", "iso-ir-126" }, { "ISO 2022 IR 138", "iso-ir-138" }, { "ISO 2022 IR 148", "iso-ir-148" }, { "ISO 2022 IR 13", "Shift_JIS" }, { "ISO 2022 IR 166", "TIS-620" }, { "\x1B\x28\x42", "" }, { "\x1B\x2D\x41", "iso-ir-100" }, { "\x1B\x2D\x42", "iso-ir-101" }, { "\x1B\x2D\x43", "iso-ir-109" }, { "\x1B\x2D\x44", "iso-ir-110" }, { "\x1B\x2D\x4C", "iso-ir-144" }, { "\x1B\x2D\x47", "iso-ir-127" }, { "\x1B\x2D\x46", "iso-ir-126" }, { "\x1B\x2D\x48", "iso-ir-138" }, { "\x1B\x2D\x4D", "iso-ir-148" }, { "\x1B\x29\x49", "ISO-2022-JP" }, { "\x1B\x28\x4A", "ISO-2022-JP" }, { "\x1B\x2D\x54", "TIS-620" }, // Multi-Byte Character Sets with Code Extensions { "ISO 2022 IR 87", "ISO-2022-JP" }, { "ISO 2022 IR 149", "EUC-KR" }, { "ISO 2022 IR 58", "ISO-2022-CN" }, { "\x1B\x24\x42", "ISO-2022-JP" }, { "\x1B\x24\x28\x44", "ISO-2022-JP" }, { "\x1B\x24\x29\x43", "iso-ir-149" }, { "\x1B\x24\x29\x41", "iso-ir-58" }, // Multi-Byte Character Sets Without Code Extensions { "ISO_IR 192", "UTF-8" }, { "GB18030", "GB18030" }, // GBK }; std::map> const escape_sequences = { { "", { "\x1B\x28\x42" } }, { "ISO 2022 IR 6", { "\x1B\x28\x42" } }, { "ISO 2022 IR 100", { "\x1B\x2D\x41", "\x1B\x28\x42" } }, { "ISO 2022 IR 101", { "\x1B\x2D\x42", "\x1B\x28\x42" } }, { "ISO 2022 IR 109", { "\x1B\x2D\x43", "\x1B\x28\x42" } }, { "ISO 2022 IR 110", { "\x1B\x2D\x44", "\x1B\x28\x42" } }, { "ISO 2022 IR 144", { "\x1B\x2D\x4C", "\x1B\x28\x42" } }, { "ISO 2022 IR 127", { "\x1B\x2D\x47", "\x1B\x28\x42" } }, { "ISO 2022 IR 126", { "\x1B\x2D\x46", "\x1B\x28\x42" } }, { "ISO 2022 IR 138", { "\x1B\x2D\x48", "\x1B\x28\x42" } }, { "ISO 2022 IR 148", { "\x1B\x2D\x4D", "\x1B\x28\x42" } }, { "ISO 2022 IR 13", { "\x1B\x29\x49", "\x1B\x28\x4A" } }, { "ISO 2022 IR 166", { "\x1B\x2D\x54", "\x1B\x28\x42" } }, { "ISO 2022 IR 87", { "\x1B\x24\x42", "\x1B\x28\x42" } }, { "ISO 2022 IR 159", { "\x1B\x24\x28\x44" } }, { "ISO 2022 IR 149", { "\x1B\x24\x29\x43" } }, { "ISO 2022 IR 58", { "\x1B\x24\x29\x41" } }, }; std::string find_encoder(std::string const & specific_character_set) { std::string encoder; auto const it = icu_encodings.find(specific_character_set); if(it == icu_encodings.end()) { throw Exception("Unknown encoding: "+specific_character_set); } encoder = it->second; return encoder; } std::string as_utf8( std::string::const_iterator const begin, std::string::const_iterator const end, std::string const & encoding) { icu::UnicodeString unicode(&(*begin), end-begin, encoding.c_str()); std::string result; unicode.toUTF8String(result); return result; } std::string as_utf8( std::string::const_iterator const begin, std::string::const_iterator const end, std::string const & initial_encoder, std::vector const & active_escape_sequences) { std::string encoded; auto encoder = initial_encoder; auto item_begin = begin; while(item_begin != end) { auto const item_end = std::find(item_begin+1, end, '\x1B'); if(*item_begin == '\x1B') { std::string escape_sequence(item_begin, item_begin+3); // Find an encoder for the escape sequence if( std::find( active_escape_sequences.begin(), active_escape_sequences.end(), escape_sequence) != active_escape_sequences.end()) { encoder = find_encoder(escape_sequence); } else { escape_sequence += *(item_begin+3); if( std::find( active_escape_sequences.begin(), active_escape_sequences.end(), escape_sequence) != active_escape_sequences.end()) { encoder = find_encoder(escape_sequence); } else { // Unknown escape sequence: do not update the encoder, // hope for the best. } } if(encoder != "ISO-2022-JP") { // The ISO-2022-JP encoder of ICU must have the escape // sequences item_begin += escape_sequence.size(); } } encoded += as_utf8(item_begin, item_end, encoder); item_begin = item_end; } return encoded; } std::string as_specific_character_set( std::string::const_iterator const begin, std::string::const_iterator const end, std::string const & encoding) { UErrorCode error_code=U_ZERO_ERROR; UConverter * converter = ucnv_open( encoding.empty()?"ascii":encoding.c_str(), &error_code); if(U_FAILURE(error_code)) { throw Exception( "Could not open converter '"+encoding+"': "+u_errorName(error_code)); } auto const source_size = end-begin; auto const target_capacity = 4*source_size; char * target = new char[target_capacity]; auto const target_size = ucnv_fromAlgorithmic( converter, UCNV_UTF8, target, target_capacity, &(*begin), source_size, &error_code ); if(U_FAILURE(error_code)) { delete[] target; throw Exception( "Could not convert '"+encoding+"': "+u_errorName(error_code)); } ucnv_close(converter); std::string const result(target, target_size); delete[] target; return result; } enum class Group { Alphabetic, Ideographic, Phonetic }; std::vector get_active_escape_sequences( Value::Strings const & specific_character_set, Group const & group) { std::vector active_escape_sequences; if(specific_character_set.size() >= 2) { auto const escape_sequences_it = escape_sequences.find(specific_character_set[1]); if(escape_sequences_it == escape_sequences.end()) { throw Exception("Unknown specific character set: "+specific_character_set[1]); } std::copy( escape_sequences_it->second.begin(), escape_sequences_it->second.end(), std::back_inserter(active_escape_sequences)); } if(group == Group::Phonetic) { auto const escape_sequences_it = escape_sequences.find(specific_character_set[0]); if(escape_sequences_it != escape_sequences.end()) { std::copy( escape_sequences_it->second.begin(), escape_sequences_it->second.end(), std::back_inserter(active_escape_sequences)); } if(specific_character_set.size() >= 3) { auto const escape_sequences_it = escape_sequences.find(specific_character_set[2]); if(escape_sequences_it == escape_sequences.end()) { throw Exception("Unknown specific character set: "+specific_character_set[2]); } std::copy( escape_sequences_it->second.begin(), escape_sequences_it->second.end(), std::back_inserter(active_escape_sequences)); } } return active_escape_sequences; } std::string as_utf8( std::string const & input, Value::Strings const & specific_character_set, bool is_pn) { // Control characters: line feed, carriage return, form feed and tabulation // For Person Name, add the group splitters std::string splitters = "\n\r\f\t"; if(is_pn) { if( std::find( specific_character_set.begin(), specific_character_set.end(), "ISO 2022 IR 13") != specific_character_set.end() || std::find( specific_character_set.begin(), specific_character_set.end(), "ISO 2022 IR 87") != specific_character_set.end()) { // The ISO-2022-JP encoder of ICU is stateful, whereas all other // ISO 2022 encoders seem to be only codepages (i.e. stateless) splitters.append("="); } else { splitters.append("^="); } } std::string result; Group group=Group::Alphabetic; auto begin = input.begin(); while(begin != input.end()) { // Active character set resets to default before any of the splitters // cf. PS 3.5, 6.1.2.5.3 auto const end = std::find_first_of( begin, input.end(), splitters.begin(), splitters.end()); std::string encoded; if(specific_character_set.empty()) { encoded = std::string(begin, end); } else if(is_pn && group != Group::Alphabetic) { auto const initial_encoder = find_encoder(specific_character_set[0]); auto const active_escape_sequences = get_active_escape_sequences(specific_character_set, group); encoded = as_utf8(begin, end, initial_encoder, active_escape_sequences); } else { auto const encoder = find_encoder(specific_character_set[0]); encoded = as_utf8(begin, end, encoder); } result.append(encoded); // If present, add the splitter to the UTF-8 string. if(end != input.end()) { result.push_back(*end); begin = end+1; if(is_pn && *end == '=') { if(group == Group::Alphabetic) { group = Group::Ideographic; } else if(group == Group::Ideographic) { group = Group::Phonetic; } else { throw Exception("Too many groups"); } } } else { begin = end; } } return result; } std::string as_specific_character_set( std::string const & input, Value::Strings const & specific_character_set, bool is_pn) { // Control characters: line feed, carriage return, form feed and tabulation // For Person Name, add the group splitters std::string splitters = "\n\r\f\t"; if(is_pn) { splitters.append("^="); } std::string result; Group group=Group::Alphabetic; auto begin = input.begin(); while(begin != input.end()) { // Active character set resets to default before any of the splitters // cf. PS 3.5, 6.1.2.5.3 auto const end = std::find_first_of( begin, input.end(), splitters.begin(), splitters.end()); std::string encoded; if(specific_character_set.empty()) { encoded = std::string(begin, end); } else if(is_pn && group != Group::Alphabetic && specific_character_set.size() > 1) { // Encode using specific_character_set[1], using escape sequences auto const encoder = find_encoder(specific_character_set[1]); auto const it = escape_sequences.find(specific_character_set[1]); auto const specific_escape_sequences = (it!=escape_sequences.end())?it->second:std::vector(); // The ISO-2022-JP encoder of ICU already includes the escape sequences if(encoder != "ISO-2022-JP" && specific_escape_sequences.size() > 0) { encoded += specific_escape_sequences[0]; } encoded += as_specific_character_set(begin, end, encoder); if(encoder != "ISO-2022-JP" && specific_escape_sequences.size() > 1) { encoded += specific_escape_sequences[1]; } if( specific_character_set[0] == "ISO 2022 IR 13" && encoder == "ISO-2022-JP") { // ICU switches back to ASCII (1B 28 42), while the examples // from D. Clunie switch back to JIS X 0201-1976 (Romaji) // (1B 28 4A) encoded[encoded.size()-1] = 0x4a; } } else { auto const encoder = find_encoder(specific_character_set[0]); encoded = as_specific_character_set(begin, end, encoder); } result.append(encoded); // If present, add the splitter to the UTF-8 string. if(end != input.end()) { result.push_back(*end); begin = end+1; if(is_pn && *end == '=') { if(group == Group::Alphabetic) { group = Group::Ideographic; } else if(group == Group::Ideographic) { group = Group::Phonetic; } else { throw Exception("Too many groups"); } } } else { begin = end; } } return result; } } odil-0.11.0/src/odil/unicode.h000066400000000000000000000020151362244656000160430ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _4a178325_e3d6_4f6f_9a18_ba6a983ee396 #define _4a178325_e3d6_4f6f_9a18_ba6a983ee396 #include #include "odil/odil.h" #include "odil/Value.h" namespace odil { /// @brief Convert a string to its UTF-8 representation ODIL_API std::string as_utf8( std::string const & input, Value::Strings const & specific_character_set, bool is_pn=false); /// @brief Convert an UTF-8 string to a specific representation ODIL_API std::string as_specific_character_set( std::string const & input, Value::Strings const & specific_character_set, bool is_pn=false); } #endif // _4a178325_e3d6_4f6f_9a18_ba6a983ee396 odil-0.11.0/src/odil/webservices/000077500000000000000000000000001362244656000165675ustar00rootroot00000000000000odil-0.11.0/src/odil/webservices/BulkData.h000066400000000000000000000014701362244656000204310ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _a63ad009_f45b_4e22_b750_ad1b12ba7f13 #define _a63ad009_f45b_4e22_b750_ad1b12ba7f13 #include #include #include namespace odil { namespace webservices { /// @brief Bulk data transmitted by web services (WADO-RS, STOW, etc.) struct BulkData { std::vector data; std::string type; std::string location; }; } } #endif // _a63ad009_f45b_4e22_b750_ad1b12ba7f13 odil-0.11.0/src/odil/webservices/HTTPRequest.cpp000066400000000000000000000076501362244656000214330ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/webservices/HTTPRequest.h" #include #include #include "odil/Exception.h" #include "odil/webservices/Message.h" #include "odil/webservices/URL.h" namespace odil { namespace webservices { HTTPRequest ::HTTPRequest( std::string const & method, URL const & target, std::string const & http_version, Headers const & headers, std::string const & body) : Message(headers, body), _method(method), _target(target), _http_version(http_version) { // Nothing else. } std::string const & HTTPRequest ::get_method() const { return this->_method; } void HTTPRequest ::set_method(std::string const & method) { this->_method = method; } URL const & HTTPRequest ::get_target() const { return this->_target; } void HTTPRequest ::set_target(URL const & target) { this->_target = target; } std::string const & HTTPRequest ::get_http_version() const { return this->_http_version; } void HTTPRequest ::set_http_version(std::string const & http_version) { this->_http_version = http_version; } std::istream & operator>>(std::istream & stream, HTTPRequest & request) { typedef boost::spirit::istream_iterator Iterator; namespace qi = boost::spirit::qi; using boost::spirit::qi::as_string; using boost::spirit::qi::char_; using boost::spirit::qi::digit; using boost::spirit::qi::lit; using boost::spirit::qi::string; using boost::spirit::qi::omit; using boost::spirit::ascii::space; qi::rule crlf = -lit("\r") >> lit("\n"); qi::rule method = +~char_(" "); qi::rule target = +~char_(" "); qi::rule http_version = as_string[string("HTTP/") >> digit >> string(".") >> digit]; qi::rule()> start_line = method >> omit[space] >> target >> omit[space] >> http_version >> omit[crlf]; // CAUTION: if the stream skips white space, disable it and restore it // after parsing. bool reset_skipws = false; if(stream.flags() & std::ios::skipws) { stream.unsetf(std::ios::skipws); reset_skipws = true; } Iterator begin(stream); Iterator end; boost::fusion::vector start_line_value; auto const ok = boost::spirit::qi::phrase_parse( begin, end, start_line, boost::spirit::ascii::space, start_line_value ); if(reset_skipws) { stream.setf(std::ios::skipws); } if(!ok) { throw Exception("Could not parse HTTPRequest"); } // begin is too far and has already eaten the first character of headers stream.putback(*begin); request.set_method(boost::fusion::at_c<0>(start_line_value)); request.set_target(URL::parse(boost::fusion::at_c<1>(start_line_value))); request.set_http_version(boost::fusion::at_c<2>(start_line_value)); stream >> static_cast(request); return stream; } std::ostream & operator<<(std::ostream & stream, HTTPRequest const & request) { stream << request.get_method() << " "; stream << request.get_target().path; if(!request.get_target().query.empty()) { stream << "?" << request.get_target().query; } // RFC 7230, 5.1: the target URI excludes the reference's fragment component stream << " " << request.get_http_version() << "\r\n"; stream << static_cast(request); return stream; } } } odil-0.11.0/src/odil/webservices/HTTPRequest.h000066400000000000000000000042541362244656000210750ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _a927d586_9154_4f1e_bd56_82f2b6f0450d #define _a927d586_9154_4f1e_bd56_82f2b6f0450d #include #include "odil/odil.h" #include "odil/webservices/Message.h" #include "odil/webservices/URL.h" namespace odil { namespace webservices { /// @brief HTTP request class ODIL_API HTTPRequest: public Message { public: /** * @brief Constructor * * By default, method, target are empty, and HTTP version default to * "HTTP/1.0". */ HTTPRequest( std::string const & method="", URL const & target={}, std::string const & http_version="HTTP/1.0", Headers const & headers={}, std::string const & body=""); HTTPRequest(HTTPRequest const &) = default; HTTPRequest(HTTPRequest &&) = default; HTTPRequest & operator=(HTTPRequest const &) = default; HTTPRequest & operator=(HTTPRequest &&) = default; virtual ~HTTPRequest() = default; /// @brief Return the method. std::string const & get_method() const; /// @brief Set the method. void set_method(std::string const & method); /// @brief Return the target. URL const & get_target() const; /// @brief Set the target. void set_target(URL const & target); /// @brief Return the HTTP version. std::string const & get_http_version() const; /// @brief Set the HTTP version. void set_http_version(std::string const & http_version); private: std::string _method; URL _target; std::string _http_version; }; /// @brief Input an HTTP request from a stream. ODIL_API std::istream & operator>>(std::istream & stream, HTTPRequest & request); /// @brief Output an HTTP request to a stream. ODIL_API std::ostream & operator<<(std::ostream & stream, HTTPRequest const & request); } } #endif // _a927d586_9154_4f1e_bd56_82f2b6f0450d odil-0.11.0/src/odil/webservices/HTTPResponse.cpp000066400000000000000000000073621362244656000216010ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/webservices/HTTPResponse.h" #include #include #include "odil/Exception.h" #include "odil/webservices/Message.h" namespace odil { namespace webservices { HTTPResponse ::HTTPResponse( std::string const & http_version, unsigned int status, std::string const & reason, Headers const & headers, std::string const & body) : Message(headers, body), _http_version(http_version), _status(status), _reason(reason) { // Nothing else. } std::string const & HTTPResponse ::get_http_version() const { return this->_http_version; } void HTTPResponse ::set_http_version(std::string const & http_version) { this->_http_version = http_version; } unsigned int HTTPResponse ::get_status() const { return this->_status; } void HTTPResponse ::set_status(unsigned int status) { this->_status = status; } std::string const & HTTPResponse ::get_reason() const { return this->_reason; } void HTTPResponse ::set_reason(std::string const & reason) { this->_reason = reason; } std::istream & operator>>(std::istream & stream, HTTPResponse & response) { typedef boost::spirit::istream_iterator Iterator; namespace qi = boost::spirit::qi; using boost::spirit::qi::as_string; using boost::spirit::qi::char_; using boost::spirit::qi::digit; using boost::spirit::qi::int_; using boost::spirit::qi::lit; using boost::spirit::qi::string; using boost::spirit::qi::omit; using boost::spirit::ascii::space; qi::rule crlf = -lit("\r") >> lit("\n"); qi::rule http_version = as_string[string("HTTP/") >> digit >> string(".") >> digit]; qi::rule status = int_; qi::rule reason = +~char_("\n\r"); qi::rule()> start_line = http_version >> omit[space] >> status >> omit[space] >> reason >> omit[crlf]; // CAUTION: if the stream skips white space, disable it and restore it // after parsing. bool reset_skipws = false; if(stream.flags() & std::ios::skipws) { stream.unsetf(std::ios::skipws); reset_skipws = true; } Iterator begin(stream); Iterator end; boost::fusion::vector start_line_value; auto const ok = boost::spirit::qi::phrase_parse( begin, end, start_line, boost::spirit::ascii::space, start_line_value ); if(reset_skipws) { stream.setf(std::ios::skipws); } if(!ok) { throw Exception("Could not parse HTTPResponse"); } // begin is too far and has already eaten the first character of headers stream.putback(*begin); response.set_http_version(boost::fusion::at_c<0>(start_line_value)); response.set_status(boost::fusion::at_c<1>(start_line_value)); response.set_reason(boost::fusion::at_c<2>(start_line_value)); stream >> static_cast(response); return stream; } std::ostream & operator<<(std::ostream & stream, HTTPResponse const & response) { stream << response.get_http_version() << " " << response.get_status() << " " << response.get_reason() << "\r\n"; stream << static_cast(response); return stream; } } } odil-0.11.0/src/odil/webservices/HTTPResponse.h000066400000000000000000000042371362244656000212440ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _c08db816_ac02_484c_8e9a_ab816c5198c7 #define _c08db816_ac02_484c_8e9a_ab816c5198c7 #include #include "odil/odil.h" #include "odil/webservices/Message.h" namespace odil { namespace webservices { /// @brief HTTP Response class ODIL_API HTTPResponse: public Message { public: /** * @brief Constructor * * By default, HTTP version and reason default to "" and status to 0 * "HTTP/1.0". */ HTTPResponse( std::string const & http_version="", unsigned int status=0, std::string const & reason="", Headers const & headers={}, std::string const & body=""); HTTPResponse(HTTPResponse const &) = default; HTTPResponse(HTTPResponse &&) = default; HTTPResponse & operator=(HTTPResponse const &) = default; HTTPResponse & operator=(HTTPResponse &&) = default; virtual ~HTTPResponse() = default; /// @brief Return the HTTP version. std::string const & get_http_version() const; /// @brief Set the HTTP version. void set_http_version(std::string const & http_version); /// @brief Return the status. unsigned int get_status() const; /// @brief Set the status. void set_status(unsigned int status); /// @brief Return the reason. std::string const & get_reason() const; /// @brief Set the reason. void set_reason(std::string const & target); private: std::string _http_version; unsigned int _status; std::string _reason; }; /// @brief Input an HTTP response from a stream. ODIL_API std::istream & operator>>(std::istream & stream, HTTPResponse & Response); /// @brief Output an HTTP response to a stream. ODIL_API std::ostream & operator<<(std::ostream & stream, HTTPResponse const & Response); } } #endif // _c08db816_ac02_484c_8e9a_ab816c5198c7 odil-0.11.0/src/odil/webservices/ItemWithParameters.cpp000066400000000000000000000071671362244656000230640ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/webservices/ItemWithParameters.h" #include #include #include #include #include #include #include #include #include #include "odil/Exception.h" namespace odil { namespace webservices { ItemWithParameters ::ItemWithParameters( std::string const & name, std::map const & name_parameters, std::map const & extension_parameters) : name(name), name_parameters(name_parameters), extension_parameters(extension_parameters) { // Nothing else } ItemWithParameters ::operator std::string() const { std::ostringstream stream; stream << *this; return stream.str(); } std::istream & operator>>(std::istream & stream, ItemWithParameters & item) { typedef boost::spirit::istream_iterator Iterator; namespace qi = boost::spirit::qi; using boost::spirit::qi::char_; using boost::spirit::qi::omit; using boost::spirit::ascii::space; typedef std::map Map; typedef boost::fusion::vector Value; qi::rule token = +char_("\"/!#$%&'*+-.^_`|~0-9a-zA-Z"); qi::rule non_q = token-"q"; qi::rule separator = omit[-space] >> ";" >> omit[-space]; qi::rule name_parameters = (non_q >> "=" >> token)%separator; qi::rule extension_parameters = (token >> "=" >> token)%separator; qi::rule item_rule = token >> -(separator >> name_parameters) >> -(separator >> extension_parameters); // CAUTION: if the stream skips white space, disable it and restore it // after parsing. bool reset_skipws = false; if(stream.flags() & std::ios::skipws) { stream.unsetf(std::ios::skipws); reset_skipws = true; } Iterator begin(stream); Iterator end; Value item_value; auto const ok = boost::spirit::qi::phrase_parse( begin, end, item_rule, boost::spirit::ascii::space, item_value); if(reset_skipws) { stream.setf(std::ios::skipws); } if(!ok) { throw Exception("Could not parse Message"); } item.name = boost::fusion::at_c<0>(item_value); item.name_parameters = boost::fusion::at_c<1>(item_value); item.extension_parameters = boost::fusion::at_c<2>(item_value); return stream; } std::ostream & operator<<(std::ostream & stream, ItemWithParameters const & item) { stream << item.name; for(auto const & it: item.name_parameters) { stream << ";" << it.first << "=" << it.second; } auto const weight_iterator = item.extension_parameters.find("q"); if(weight_iterator != item.extension_parameters.end()) { stream << ";" << weight_iterator->first << "=" << weight_iterator->second; } for(auto const & it: item.extension_parameters) { if(it.first != "q") { stream << ";" << it.first << "=" << it.second; } } return stream; } } } odil-0.11.0/src/odil/webservices/ItemWithParameters.h000066400000000000000000000040341362244656000225170ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _64665a37_223c_4b0c_b0c2_7be9111d9bdd #define _64665a37_223c_4b0c_b0c2_7be9111d9bdd #include #include #include #include #include "odil/odil.h" namespace odil { namespace webservices { /** * @brief This container encapsulates the item with parameters as found in * varied HTTP headers (Accept, Accept-Charset, Accept-Encoding, * Accept-Language, Content-Type). * * name_parameters are used to store the parameters up to and excluding "q" (the * weight of this item), while extension_parameters will store the optional * weight and subsequent parameters. */ struct ODIL_API ItemWithParameters { std::string name; std::map name_parameters; std::map extension_parameters; ItemWithParameters( std::string const & name="", std::map const & name_parameters={}, std::map const & extension_parameters={}); ItemWithParameters(ItemWithParameters const &) = default; ItemWithParameters(ItemWithParameters &&) = default; ItemWithParameters & operator=(ItemWithParameters const &) = default; ItemWithParameters & operator=(ItemWithParameters &&) = default; ~ItemWithParameters() = default; operator std::string() const; }; /// @brief Input an AcceptableItem from a stream. ODIL_API std::istream & operator>>(std::istream & stream, ItemWithParameters & item); /// @brief Output an AcceptableItem to a stream. ODIL_API std::ostream & operator<<(std::ostream & stream, ItemWithParameters const & item); } } #endif // _64665a37_223c_4b0c_b0c2_7be9111d9bdd odil-0.11.0/src/odil/webservices/Message.cpp000066400000000000000000000107431362244656000206640ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/webservices/Message.h" #include #include #include #include #include #include #include #include #include #include #include "odil/Exception.h" namespace odil { namespace webservices { Message ::Message(Headers const & headers, std::string const & body) : _headers(headers), _body(body) { // Nothing else. } Message::Headers const & Message ::get_headers() const { return this->_headers; } void Message ::set_headers(Headers const & headers) { this->_headers = headers; } bool Message ::has_header(std::string const & name) const { auto const iterator = this->_find_header(name); return (iterator != this->_headers.end()); } std::string const & Message ::get_header(std::string const & name) const { auto const iterator = this->_find_header(name); if(iterator == this->_headers.end()) { throw Exception("No such header: "+name); } return iterator->second; } void Message ::set_header(std::string const & name, std::string const & value) { this->_headers[name] = value; } std::string const & Message ::get_body() const { return this->_body; } void Message ::set_body(std::string const & body) { this->_body = body; } Message::Headers::const_iterator Message ::_find_header(std::string const & name) const { auto const iterator = std::find_if( this->_headers.begin(), this->_headers.end(), [&name](Headers::value_type const & x) { std::string name_lower(name.size(), ' '); std::transform(name.begin(), name.end(), name_lower.begin(), ::tolower); std::string x_lower(x.first.size(), ' '); std::transform(x.first.begin(), x.first.end(), x_lower.begin(), ::tolower); return (name_lower == x_lower); } ); return iterator; } std::istream & operator>>(std::istream & stream, Message & message) { typedef boost::spirit::istream_iterator Iterator; namespace qi = boost::spirit::qi; using boost::spirit::qi::char_; using boost::spirit::qi::lit; using boost::spirit::qi::string; using boost::spirit::qi::omit; using boost::spirit::ascii::space; qi::rule token = +char_("!#$%&'*+-.^_`|~0-9a-zA-Z"); qi::rule crlf = -lit("\r") >> lit("\n"); qi::rule field_name = token; qi::rule field_value = +~char_("\r\n"); qi::rule headers = *(field_name >> omit[-space >> ":" >> -space] >> field_value >> omit[crlf]); qi::rule body = +char_; qi::rule()> message_rule = headers >> -(omit[crlf] >> body); // CAUTION: if the stream skips white space, disable it and restore it // after parsing. bool reset_skipws = false; if(stream.flags() & std::ios::skipws) { stream.unsetf(std::ios::skipws); reset_skipws = true; } Iterator begin(stream); Iterator end; boost::fusion::vector message_value; auto const ok = boost::spirit::qi::phrase_parse( begin, end, message_rule, boost::spirit::ascii::space, message_value ); if(reset_skipws) { stream.setf(std::ios::skipws); } if(!ok) { throw Exception("Could not parse Message"); } else if(begin != end) { throw Exception("Incomplete parsing"); } message.set_headers(boost::fusion::at_c<0>(message_value)); message.set_body(boost::fusion::at_c<1>(message_value)); return stream; } std::ostream & operator<<(std::ostream & stream, Message const & message) { for(auto const & header: message.get_headers()) { stream << header.first << ": " << header.second << "\r\n"; } stream << "\r\n"; stream << message.get_body(); return stream; } } } odil-0.11.0/src/odil/webservices/Message.h000066400000000000000000000050041362244656000203230ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _d7a272d7_9beb_43c1_a5a1_fce4c0245c80 #define _d7a272d7_9beb_43c1_a5a1_fce4c0245c80 #include #include #include #include #include "odil/odil.h" namespace odil { namespace webservices { /// @brief RFC 5322 Message (i.e. headers with body). class ODIL_API Message { public: /// @brief Associative container for headers. typedef std::map Headers; /** * @brief Constructor. * * By default, headers and body will be empty. */ Message(Headers const & headers={}, std::string const & body=""); Message(Message const &) = default; Message(Message &&) = default; Message & operator=(Message const &) = default; Message & operator=(Message &&) = default; virtual ~Message() = default; /// @brief Return the headers Headers const & get_headers() const; /// @brief Set the headers. void set_headers(Headers const & headers); /** * @brief Test whether the given header exists. * * According to RFC 5322 1.2.2 and RFC 5234 2.3, the name is * case-insensitive. */ bool has_header(std::string const & name) const; /** * @brief Return a header value or throw an exception if the required * header is missing. * * According to RFC 5322 1.2.2 and RFC 5234 2.3, the name is * case-insensitive. */ std::string const & get_header(std::string const & name) const; /// @brief Set a header value. void set_header(std::string const & name, std::string const & value); /// @brief Return the body. std::string const & get_body() const; /// @brief Set the body. void set_body(std::string const & body); private: Headers _headers; std::string _body; Headers::const_iterator _find_header(std::string const & name) const; }; /// @brief Input a Message from a stream. ODIL_API std::istream & operator>>(std::istream & stream, Message & message); /// @brief Output a Message to a stream. ODIL_API std::ostream & operator<<(std::ostream & stream, Message const & message); } } #endif // _d7a272d7_9beb_43c1_a5a1_fce4c0245c80 odil-0.11.0/src/odil/webservices/QIDORSRequest.cpp000066400000000000000000000365661362244656000216650ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/webservices/QIDORSRequest.h" #include #include #include #include #include "odil/StringStream.h" #include "odil/VR.h" #include "odil/webservices/ItemWithParameters.h" namespace odil { namespace webservices { QIDORSRequest ::QIDORSRequest(const URL &base_url) : _base_url(base_url), _media_type(), _representation(Representation::DICOM_JSON), _url(), _selector(), _query_data_set(), _fuzzymatching(false), _limit(-1), _offset(0) { // Nothing else } QIDORSRequest ::QIDORSRequest(HTTPRequest const & request) : _base_url(), _media_type(), _representation(), _url(), _selector(), _query_data_set(), _fuzzymatching(false), _limit(-1), _offset(0) { if(request.has_header("Host")) { this->_url.authority = request.get_header("Host"); } // Find the media type. auto const accept = as(request.get_header("Accept")); // if we have multipart/related, we will have then have application/dicom+xml // otherwise we will have application/dicom+json if(accept.name == "multipart/related") { auto const it = accept.name_parameters.find("type"); // check if the type is not found if(it == accept.name_parameters.end()) { std::ostringstream message; message << "Missing type in Accept header: " << request.get_header("Accept"); throw Exception(message.str()); } // check if type is different from the only available type if(it->second != "application/dicom+xml") { throw Exception("The only available type with multipart option is dicom+xml"); } this->_media_type = it->second; this->_representation = Representation::DICOM_XML; } else { if(accept.name != "application/dicom+json") { throw Exception("The type cannot be different from dicom+json"); } this->_media_type = accept.name; this->_representation = Representation::DICOM_JSON; } this->_from_url(request.get_target()); } bool QIDORSRequest ::operator==(QIDORSRequest const & other) const { return( this->_base_url == other._base_url && this->_media_type == other._media_type && this->_representation == other._representation && this->_url == other._url && this->_selector == other._selector && *this->_query_data_set == *other._query_data_set && this->_fuzzymatching == other._fuzzymatching && this->_limit == other._limit && this->_offset == other._offset ); } bool QIDORSRequest ::operator!=(QIDORSRequest const & other) const { return !(*this == other); } URL const & QIDORSRequest ::get_base_url() const { return this->_base_url; } void QIDORSRequest ::set_base_url(const URL &url) { this->_base_url = url; } std::string const & QIDORSRequest ::get_media_type() const { return this->_media_type; } Representation const & QIDORSRequest ::get_representation() const { return this->_representation; } URL const & QIDORSRequest ::get_url() const { return this->_url; } Selector const & QIDORSRequest ::get_selector() const { return this->_selector; } std::shared_ptr QIDORSRequest ::get_query_data_set() const { return this->_query_data_set; } bool QIDORSRequest ::get_fuzzymatching() const { return this->_fuzzymatching; } int QIDORSRequest ::get_limit() const { return this->_limit; } int QIDORSRequest ::get_offset() const { return this->_offset; } void QIDORSRequest ::request_datasets( Representation representation, Selector const & selector, std::shared_ptr query_data_set, bool fuzzymatching, int limit, int offset, bool numerical_tags) { if( representation != Representation::DICOM_JSON && representation != Representation::DICOM_XML) { throw Exception("Given representation is not available for QIDO-RS"); } this->_representation = representation; this->_selector = selector; this->_query_data_set = query_data_set; this->_fuzzymatching = fuzzymatching; this->_limit = limit; this->_offset = offset; if(!QIDORSRequest::_is_selector_valid(selector)) { throw Exception("Invalid selector"); } this->_url = this->_generate_url(numerical_tags); } template Element & add_qido_element( Iterator begin, Iterator end, std::shared_ptr data_set) { namespace qi = boost::spirit::qi; qi::rule tag = +qi::alnum; qi::rule()> attribute_id = tag % "."; std::vector tags; auto const is_parsed = qi::phrase_parse( begin, end, attribute_id, qi::ascii::space, tags); if(!is_parsed) { throw Exception("Could not parse attribute id"); } else if(begin != end) { throw Exception("Attribute id was only partially parsed"); } auto current_ds = data_set; if(!tags.empty()) { auto const last = --tags.end(); for(auto it = tags.begin(); it != last; ++it) { Tag const tag(*it); if(!current_ds->has(tag)) { current_ds->add(tag, {std::make_shared()}); } current_ds = current_ds->as_data_set(tag)[0]; } } else { throw Exception("No tag in attribute list"); } Tag const last(*tags.rbegin()); if(!current_ds->has(last)) { current_ds->add(last); } return (*current_ds)[last]; } void QIDORSRequest ::_from_url(const URL &url) { this->_base_url.scheme = url.scheme; this->_base_url.authority = url.authority; std::tie(this->_base_url.path, this->_selector) = Selector::from_path(url.path); if (!QIDORSRequest::_is_selector_valid(this->_selector)) { throw Exception( "Selector not correctly constructed (" + this->_selector.get_path(false) + ")"); } auto const query_items = url.parse_query(); // std::set> includefields; bool include_all = true; this->_query_data_set = std::make_shared(); for(auto const & item: query_items) { if(item.first == "fuzzymatching") { if(item.second == "true") { this->_fuzzymatching = true; } else if(item.second == "false") { this->_fuzzymatching = false; } else { throw Exception("Fuzzymatching is not a boolean"); } } else if(item.first == "limit") { try { this->_limit = std::stoi(item.second); } catch(std::invalid_argument const &) { throw Exception("Limit value is not an integer"); } } else if(item.first == "offset") { try { this->_offset = std::stoi(item.second); } catch (std::invalid_argument const &) { throw Exception("Offset value is not an integer"); } } else { if (item.first == "includefield") { if (item.second == "all") { include_all = true; } else { add_qido_element( item.second.begin(), item.second.end(), this->_query_data_set); } } else { // {AttributeID} = {value} auto & element = add_qido_element( item.first.begin(), item.first.end(), this->_query_data_set); if(element.is_int()) { try { element.as_int() = {std::stol(item.second)}; } catch(std::invalid_argument const &) { throw Exception("Value must be an integer"); } } else if(element.is_real()) { try { element.as_real() = {std::stod(item.second)}; } catch(std::invalid_argument const &) { throw Exception("Value must be a real"); } } else if(element.is_string()) { element.as_string() = {item.second}; } else { throw Exception("Invalid VR for value"); } } } } // TODO : Fix includefields = all -> need to look for all includefields in the query_dataset (query[tag] = empty // with tag that can be a sequence // if (include_all) // { // includefields.clear(); // } this->_url = this->_generate_url(false); } HTTPRequest QIDORSRequest ::get_http_request() const { ItemWithParameters accept; if (this->_representation == Representation::DICOM_JSON) { accept.name = "application/dicom+json"; } else { accept.name = "multipart/related"; accept.name_parameters["type"] = "application/dicom+xml"; } std::string accept_string; OStringStream stream(accept_string); stream << accept; HTTPRequest::Headers const headers{ {"Accept", accept_string } }; return HTTPRequest("GET", this->_url, "HTTP/1.0", headers); } bool QIDORSRequest ::_is_selector_valid(Selector const & selector) { if (!selector.get_frames().empty() || !selector.get_instance().empty()) { return false; } else { return ( // /studies ( selector.is_study_present() && selector.get_study().empty() && !selector.is_series_present() && !selector.is_instance_present()) // /studies/1.2/series || ( selector.is_study_present() && !selector.get_study().empty() && selector.is_series_present() && selector.get_series().empty() && !selector.is_instance_present()) // /series || ( !selector.is_study_present() && selector.is_series_present() && selector.get_series().empty() && !selector.is_instance_present()) // /studies/1.2/series/3.4/instances || ( selector.is_study_present() && !selector.get_study().empty() && selector.is_series_present() && !selector.get_series().empty() && selector.is_instance_present()) // /studies/1.2/instances || ( selector.is_study_present() && !selector.get_study().empty() && !selector.is_series_present() && selector.is_instance_present()) // /instances || ( !selector.is_study_present() && !selector.is_series_present() && selector.is_instance_present()) ); } } std::string QIDORSRequest ::_tag_to_string(Tag const & tag, bool numerical_tag) { if(numerical_tag) { return std::string(tag); } else { try { return tag.get_name(); } catch(Exception const &) { return std::string(tag); } } } URL QIDORSRequest ::_generate_url(bool numerical_tags) { // Breadth-first walk of the query data set to generate the query terms // (e.g. PatientName=Doe) and the include fields std::queue, std::string>> queue; queue.emplace(std::make_pair(this->_query_data_set, "")); std::vector terms; std::vector include_fields; while(!queue.empty()) { auto const & front = queue.front(); auto const & parent_data_set = front.first; auto const & parent_path = front.second; for(auto const & item: *parent_data_set) { auto const & tag = item.first; auto const & element = item.second; std::string child_path = parent_path; child_path += (child_path.empty() ? "" : "."); child_path += QIDORSRequest::_tag_to_string(tag, numerical_tags); if(element.is_data_set()) { queue.emplace( std::make_pair(element.as_data_set()[0], child_path)); } else { if(element.empty()) { include_fields.push_back(child_path); } else { std::ostringstream term_stream; term_stream << child_path << "="; if(element.is_int()) { term_stream << element.as_int()[0]; } else if(element.is_real()) { term_stream << element.as_real()[0]; } else if(element.is_string()) { term_stream << element.as_string()[0]; } else { throw Exception( "Query element cannot have VR " + as_string(element.vr)); } terms.push_back(term_stream.str()); } } } queue.pop(); } // Build the query string: search terms (with value), include fields // (without value), fuzzy matching, limit and offset std::ostringstream query_string_stream; for(auto const & term: terms) { query_string_stream << (query_string_stream.tellp()>0 ? "&" : "") << term; } for(auto const & field: include_fields) { query_string_stream << (query_string_stream.tellp()>0 ? "&" : "") << "includefield=" << field; } query_string_stream << (query_string_stream.tellp()>0 ? "&" : "") << "fuzzymatching=" << std::boolalpha << this->_fuzzymatching; if(this->_limit != -1) { query_string_stream << (query_string_stream.tellp()>0 ? "&" : "") << "limit=" << this->_limit; if(this->_offset != 0) { query_string_stream << (query_string_stream.tellp()>0 ? "&" : "") << "offset=" << this->_offset; } } return { this->_base_url.scheme, this->_base_url.authority, // Frames are never included in QIDO this->_base_url.path + this->_selector.get_path(false), query_string_stream.str() }; } } } odil-0.11.0/src/odil/webservices/QIDORSRequest.h000066400000000000000000000067341362244656000213240ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _1cd2d27d_2d97_405b_b9d5_4104210e543a #define _1cd2d27d_2d97_405b_b9d5_4104210e543a #include #include #include #include #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/Tag.h" #include "odil/webservices/HTTPRequest.h" #include "odil/webservices/Utils.h" #include "odil/webservices/Selector.h" #include "odil/webservices/URL.h" namespace odil { namespace webservices { /// @brief QIDO-RS request generator and parser class ODIL_API QIDORSRequest { public: /// @brief Constructor. QIDORSRequest(URL const & base_url); /// @brief Constructor. QIDORSRequest(HTTPRequest const & request); /// @brief Equality operator. bool operator==(QIDORSRequest const & other) const; /// @brief Difference operator. bool operator!=(QIDORSRequest const & other) const; /// @brief Return base_url. URL const & get_base_url() const; /// @brief Set the base URL; the query and fragment must be empty void set_base_url(URL const & url); /// @brief Return the media type. std::string const & get_media_type() const; /// @brief Return the representation. Representation const & get_representation() const; /// @brief Return the url. URL const & get_url () const; /// brief Return the selector. Selector const & get_selector() const; /// @brief Return the dataSet containing the wanted attribute values. std::shared_ptr get_query_data_set() const; /// @brief Return the wanted fields. std::set> const & get_includefields() const; /// @brief Return whether fuzzymatching is wanted or not. bool get_fuzzymatching() const; /// @brief Return the wanted limit. int get_limit() const; /// @brief Return the wanted offset. int get_offset() const; /// @brief Generate the associated HTTP request. HTTPRequest get_http_request() const; /// @brief Prepare a qido request void request_datasets( Representation representation, Selector const & selector, std::shared_ptr query, bool fuzzymatching=false, int limit=-1, int offset=0, bool numerical_tags=false); private: URL _base_url; std::string _media_type; Representation _representation; URL _url; Selector _selector; std::shared_ptr _query_data_set; bool _fuzzymatching; /// @brief Maximum number of results the origin server shall return. int _limit; /** * @brief Number of results the origin server shall skip before the first * returned result. */ int _offset; /// @brief Return if the selector is valid or not static bool _is_selector_valid (Selector const & selector); /// @brief Return the tag as a numerical string or as a "string" static std::string _tag_to_string(Tag const & tag, bool numerical_tag); /// @brief Split an URL into a tuple void _from_url(URL const & url); /// @brief Generate a generic URL from class information URL _generate_url(bool numerical_tags=false); }; } } #endif // _1cd2d27d_2d97_405b_b9d5_4104210e543a odil-0.11.0/src/odil/webservices/QIDORSResponse.cpp000066400000000000000000000153011362244656000220130ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/webservices/QIDORSResponse.h" #include #include #include #include #include #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/StringStream.h" #include "odil/json_converter.h" #include "odil/webservices/HTTPResponse.h" #include "odil/webservices/ItemWithParameters.h" #include "odil/webservices/multipart_related.h" #include "odil/webservices/Utils.h" #include "odil/Writer.h" #include "odil/xml_converter.h" namespace odil { namespace webservices { QIDORSResponse ::QIDORSResponse() :_data_sets(), _representation(Representation::DICOM_XML), _media_type("") { // Nothing else. } QIDORSResponse ::QIDORSResponse(HTTPResponse const & response) :_data_sets(), _representation(Representation::DICOM_XML), _media_type("") { // Manage response status if(response.get_status() == 200) { // Query is ok and matching results are returned in the message body } else if(response.get_status() == 204) { // No matches found return; } else { throw Exception( "Invalid status: "+std::to_string(response.get_status())); } // Find the media type. auto const content_type = as( response.get_header("Content-Type")); if(content_type.name == "multipart/related") { auto const it = content_type.name_parameters.find("type"); if( it == content_type.name_parameters.end() || it->second != "application/dicom+xml") { throw Exception("Invalid content type"); } this->_media_type = it->second; this->_representation = Representation::DICOM_XML; } else if(content_type.name == "application/dicom+json") { this->_media_type = content_type.name; this->_representation = Representation::DICOM_JSON; } else { throw Exception("Unrecognized response representation"); } if(this->_representation == Representation::DICOM_XML) { transform_parts( response, std::back_inserter(this->get_data_sets()), [](Message const & part) { IStringStream stream( &part.get_body()[0], part.get_body().size()); boost::property_tree::ptree xml; boost::property_tree::read_xml(stream, xml); return as_dataset(xml); }); } else { IStringStream stream( &response.get_body()[0], response.get_body().size()); Json::Value array; stream >> array; if(!array.isArray()) { throw Exception("Body must be an array"); } this->get_data_sets().reserve(array.size()); std::transform( array.begin(), array.end(), std::back_inserter(this->get_data_sets()), static_cast(*)(Json::Value const &)>(as_dataset)); } } bool QIDORSResponse ::operator==(QIDORSResponse const & other) const { return( this->_data_sets == other._data_sets && this->_representation == other._representation && this->_media_type == other._media_type); } bool QIDORSResponse ::operator!=(QIDORSResponse const & other) const { return !(*this == other); } Value::DataSets const & QIDORSResponse ::get_data_sets() const { return this->_data_sets; } Value::DataSets & QIDORSResponse ::get_data_sets() { return this->_data_sets; } void QIDORSResponse ::set_data_sets(Value::DataSets const & data_sets) { this->_data_sets = data_sets; } Representation const & QIDORSResponse ::get_representation() const { return this->_representation; } void QIDORSResponse ::set_representation(Representation const & representation) { if(representation == Representation::DICOM_JSON) { this->_representation = representation; this->_media_type = "application/dicom+json"; } else if(representation == Representation::DICOM_XML) { this->_representation = representation; this->_media_type = "application/dicom+xml"; } else { throw Exception("Unknown representation"); } } std::string const & QIDORSResponse ::get_media_type() const { return this->_media_type; } HTTPResponse QIDORSResponse ::get_http_response() const { HTTPResponse response; response.set_status(this->_data_sets.empty()?204:200); response.set_reason(this->_data_sets.empty()?"No Content":"OK"); if(this->_representation == Representation::DICOM_XML) { auto const accumulator = [](std::shared_ptr data_set) { auto const xml = data_set?as_xml(data_set):boost::property_tree::ptree(); std::string body; OStringStream stream(body); boost::property_tree::write_xml( stream, xml, #if BOOST_VERSION >= 105600 boost::property_tree::xml_writer_settings() #else boost::property_tree::xml_writer_settings() #endif ); stream.flush(); return Message( { { "Content-Type", "application/dicom+xml" } }, body); }; auto const boundary = random_boundary(); std::ostringstream body; accumulate_parts( this->get_data_sets().begin(), this->get_data_sets().end(), accumulator, body, boundary); response.set_body(body.str()); response.set_header( "Content-Type", ItemWithParameters( "multipart/related", { {"type", "application/dicom+xml"}, {"boundary", boundary}})); } else if(this->_representation == Representation::DICOM_JSON) { Json::Value json; json.resize(this->_data_sets.size()); for(unsigned int i=0; i_data_sets.size(); ++i) { json[i] = as_json(this->_data_sets[i]); } Json::FastWriter writer; response.set_body(writer.write(json)); response.set_header("Content-Type", "application/dicom+json"); } else { throw Exception("Unknown representation"); } return response; } } } odil-0.11.0/src/odil/webservices/QIDORSResponse.h000066400000000000000000000042661362244656000214700ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _14da8fe6_71a3_4c0b_91bf_9c518393a641 #define _14da8fe6_71a3_4c0b_91bf_9c518393a641 #include #include #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/webservices/HTTPResponse.h" #include "odil/webservices/Utils.h" namespace odil { namespace webservices { /// @brief QIDO-RS response generator and parser. class ODIL_API QIDORSResponse { public: /// @brief Constructor. QIDORSResponse(); /// @brief Parse an HTTPResponse as a WADORSResponse. QIDORSResponse(HTTPResponse const & response); QIDORSResponse(QIDORSResponse const &) = default; QIDORSResponse(QIDORSResponse &&) = default; QIDORSResponse & operator=(QIDORSResponse const &) = default; QIDORSResponse & operator=(QIDORSResponse &&) = default; ~QIDORSResponse() = default; /// @brief Equality operator. bool operator==(QIDORSResponse const & other) const; /// @brief Difference operator. bool operator!=(QIDORSResponse const & other) const; /// @brief Get the response items Value::DataSets const & get_data_sets() const; /// @brief Modify the response items Value::DataSets & get_data_sets(); /// @brief Set the response items void set_data_sets(Value::DataSets const & data_sets); /// @brief Return the representation Representation const & get_representation() const; /// @brief Set the representation void set_representation(Representation const & representation); /// @brief Return the media type std::string const & get_media_type() const; /// @brief Generate the associated HTTP response HTTPResponse get_http_response() const; private: Value::DataSets _data_sets; Representation _representation; std::string _media_type; }; } } #endif //_14da8fe6_71a3_4c0b_91bf_9c518393a641 odil-0.11.0/src/odil/webservices/STOWRSRequest.cpp000066400000000000000000000473601362244656000217170ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/webservices/STOWRSRequest.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "odil/DataSet.h" #include "odil/json_converter.h" #include "odil/Reader.h" #include "odil/StringStream.h" #include "odil/VRFinder.h" #include "odil/Writer.h" #include "odil/webservices/ItemWithParameters.h" #include "odil/webservices/multipart_related.h" #include "odil/webservices/Selector.h" #include "odil/webservices/Utils.h" #include "odil/webservices/URL.h" #include "odil/xml_converter.h" namespace odil { namespace webservices { STOWRSRequest ::STOWRSRequest(URL const & base_url) : _base_url(base_url), _transfer_syntax(""), _selector(), _url(), _media_type(""), _representation(), _data_sets() { // Nothing else. } STOWRSRequest ::STOWRSRequest(HTTPRequest const & request) { this->_url = request.get_target(); if(request.has_header("Host")) { this->_url.authority = request.get_header("Host"); } auto const content_type = as( request.get_header("Content-Type")); if(content_type.name == "multipart/related") { this->_media_type = content_type.name_parameters.at("type"); } else { throw Exception("Malformed Content-Type header"); } if(this->_media_type == "application/dicom") { this->_representation = Representation::DICOM; transform_parts( request, std::back_inserter(this->get_data_sets()), [](Message const & part) { IStringStream stream( &part.get_body()[0], part.get_body().size()); Reader reader(stream, registry::ExplicitVRLittleEndian); auto const ds = reader.read_file(stream); return ds.second; }); } else if(this->_media_type == "application/dicom+xml") { this->_representation = Representation::DICOM_XML; // Get data sets and bulk data from parts BulkMap bulk_map; for_each_part( request, [&bulk_map, this](Message const & part) { auto const content_type = as( part.get_header("Content-Type")); if(content_type.name == "application/dicom+xml") { this->_transfer_syntax = content_type.name_parameters.at( "transfer-syntax"); IStringStream stream( &part.get_body()[0], part.get_body().size()); boost::property_tree::ptree xml; boost::property_tree::read_xml(stream, xml); this->get_data_sets().push_back(as_dataset(xml)); } else { auto const location = part.get_header("Content-Location"); Value::Binary::value_type const data( part.get_body().begin(), part.get_body().end()); bulk_map.insert({location, data}); } }); // Restore bulk data items to data sets for(auto & data_set : this->get_data_sets()) { STOWRSRequest::_restore_data_set(data_set, bulk_map); } } else if (this->_media_type == "application/dicom+json") { this->_representation = Representation::DICOM_JSON; // Get data sets and bulk data from parts BulkMap bulk_map; for_each_part( request, [&bulk_map, this](Message const & part) { auto const content_type = as( part.get_header("Content-Type")); if(content_type.name == "application/dicom+json") { this->_transfer_syntax = content_type.name_parameters.at( "transfer-syntax"); IStringStream stream( &part.get_body()[0], part.get_body().size()); Json::Value array; stream >> array; if(!array.isArray()) { throw Exception("Body must be an array"); } for(auto const & json: array) { this->get_data_sets().push_back(as_dataset(json)); } } else { auto const location = part.get_header("Content-Location"); Value::Binary::value_type const data{ part.get_body().begin(), part.get_body().end()}; bulk_map.insert({location, data}); } }); // Restore bulk data items to data sets for(auto & data_set: this->get_data_sets()) { STOWRSRequest::_restore_data_set(data_set, bulk_map); } } else { throw Exception("Unknown media type: " + this->_media_type); } this->_base_url.scheme = request.get_target().scheme; this->_base_url.authority = request.get_target().authority; std::tie(this->_base_url.path, this->_selector) = Selector::from_path( request.get_target().path); if(!STOWRSRequest::_is_selector_valid(this->_selector)) { throw Exception("Invalid selector"); } } bool STOWRSRequest ::operator==(STOWRSRequest const & other) const { return( this->_base_url == other._base_url && this->_transfer_syntax == other._transfer_syntax && this->_selector == other._selector && this->_url == other._url && this->_data_sets == other._data_sets && this->_representation == other._representation && this->_media_type == other._media_type); } bool STOWRSRequest ::operator!=(STOWRSRequest const & other) const { return !(*this == other); } bool STOWRSRequest ::_is_selector_valid(Selector const & selector) { return ( selector.is_study_present() && !selector.is_series_present() && !selector.is_instance_present() && selector.get_frames().empty()); } void STOWRSRequest ::request_dicom( Value::DataSets const & data_sets, Selector const & selector, Representation const & representation, std::string const & transfer_syntax) { this->_representation = representation; if(representation == Representation::DICOM) { this->_media_type = "application/dicom"; } else if(representation == Representation::DICOM_XML) { this->_media_type = "application/dicom+xml"; this->_transfer_syntax = transfer_syntax; } else if(representation == Representation::DICOM_JSON) { this->_media_type = "application/dicom+json"; this->_transfer_syntax = transfer_syntax; } else { throw Exception("Invalid representation"); } this->_data_sets = data_sets; if(!STOWRSRequest::_is_selector_valid(selector)) { throw Exception("Invalid selector"); } this->_selector = selector; auto path = this->_base_url.path + selector.get_path(false); this->_url = { this->_base_url.scheme, this->_base_url.authority, path, "", ""}; } Value::DataSets const & STOWRSRequest ::get_data_sets() const { return this->_data_sets; } Value::DataSets & STOWRSRequest ::get_data_sets() { return this->_data_sets; } URL const & STOWRSRequest ::get_base_url() const { return this->_base_url; } void STOWRSRequest ::set_base_url(URL const & url) { this->_base_url = url; } std::string const & STOWRSRequest ::get_transfer_syntax() const { return this->_transfer_syntax; } void STOWRSRequest ::set_transfer_syntax(std::string const & transfer_syntax) { this->_transfer_syntax = transfer_syntax; } std::string const & STOWRSRequest ::get_media_type() const { return this->_media_type; } Representation const & STOWRSRequest ::get_representation() const { return this->_representation; } URL const & STOWRSRequest ::get_url() const { return this->_url; } Selector const & STOWRSRequest ::get_selector() const { return this->_selector; } HTTPRequest STOWRSRequest ::get_http_request() const { HTTPRequest request; if(this->_representation == Representation::DICOM) { auto const boundary = random_boundary(); std::string body; OStringStream stream(body); accumulate_parts( this->get_data_sets().begin(), this->get_data_sets().end(), [](std::shared_ptr data_set) { std::string buffer; OStringStream stream(buffer); Writer::write_file(data_set, stream); stream.flush(); return Message( { { "Content-Type", ItemWithParameters("application/dicom") } }, buffer ); }, stream, boundary); stream.flush(); request.set_body(body); request.set_header( "Content-Type", ItemWithParameters( "multipart/related", { {"type", "application/dicom"}, {"boundary", boundary} })); } else if(this->_representation == Representation::DICOM_JSON) { // Copy the dataSets in order to let them unchanged Value::DataSets copy; for(auto const & data_set: this->_data_sets) { copy.push_back(std::make_shared(*data_set)); } std::vector bulk_data; for(auto & ds: copy) { STOWRSRequest::_extract_bulk_data(ds, bulk_data); } Json::Value json; json.resize(this->_data_sets.size()); for(int i=0; i const json_vector{{json}}; auto const boundary = random_boundary(); std::ostringstream body; // Add data sets accumulate_parts( json_vector.begin(), json_vector.end(), [this](Json::Value const & json) { Json::FastWriter writer; return Message( {{ "Content-Type", ItemWithParameters( "application/dicom+json", {{"transfer-syntax", this->_transfer_syntax}}) }}, writer.write(json) ); }, body, boundary); // add then the bulk data if(!bulk_data.empty()) { // Remove the last boundary of the message auto body_content = body.str(); body_content = body_content.substr( 0, body_content.size()-boundary.size()-6); body.str(std::string()); // clear the content body << body_content; accumulate_parts( bulk_data.begin(), bulk_data.end(), [](BulkData const & bulk_data) { return Message( { { "Content-Type", bulk_data.type }, { "Content-Location", bulk_data.location } }, { bulk_data.data.begin(), bulk_data.data.end() } ); }, body, boundary); } request.set_body(body.str()); request.set_header( "Content-Type", ItemWithParameters( "multipart/related", { {"type", "application/dicom+json"}, {"boundary", boundary}})); } else if(this->_representation == Representation::DICOM_XML) { // Copy the dataSets in order to let them unchanged Value::DataSets copy; for(auto const & data_set: this->_data_sets) { copy.push_back(std::make_shared(*data_set)); } std::vector bulk_data; for (auto & ds: copy) { STOWRSRequest::_extract_bulk_data(ds, bulk_data); } auto const accumulator_bulk_data = [](BulkData const & bulk_data) { return Message( { { "Content-Type", bulk_data.type }, { "Content-Location", bulk_data.location } }, { bulk_data.data.begin(), bulk_data.data.end() } ); }; auto const boundary = random_boundary(); std::ostringstream body; // Add the data sets accumulate_parts( copy.begin(), copy.end(), [this](std::shared_ptr data_set) { auto const xml = as_xml(data_set); std::ostringstream stream; #if BOOST_VERSION >= 105600 typedef boost::property_tree::xml_writer_settings SettingsType; #else typedef boost::property_tree::xml_writer_settings SettingsType; #endif boost::property_tree::write_xml(stream, xml, SettingsType()); return Message( {{ "Content-Type", ItemWithParameters( "application/dicom+xml", {{"transfer-syntax", this->_transfer_syntax}}) }}, stream.str() ); }, body, boundary); // add then the bulk data if (!bulk_data.empty()) { // Remove the last boundary of the message auto body_content = body.str(); body_content = body_content.substr( 0, body_content.size()-boundary.size()-6); body.str(std::string()); // clear the content body << body_content; accumulate_parts( bulk_data.begin(), bulk_data.end(), [](BulkData const & bulk_data) { return Message( { { "Content-Type", bulk_data.type }, { "Content-Location", bulk_data.location } }, { bulk_data.data.begin(), bulk_data.data.end() } ); }, body, boundary); } request.set_body(body.str()); request.set_header( "Content-Type", ItemWithParameters( "multipart/related", { {"type", "application/dicom+xml"}, {"boundary", boundary}})); } else { throw Exception("Unknown type"); } request.set_method("POST"); request.set_target(this->_url); request.set_http_version("HTTP/1.0"); return request; } void STOWRSRequest ::_extract_bulk_data( std::shared_ptr data_set, std::vector & bulk_data) { for(auto & it: *data_set) { auto & tag = it.first; auto & element = it.second; if(element.is_binary()) { // 1. generate uuid boost::uuids::random_generator gen; boost::uuids::uuid uuid = gen(); std::string uuid_string = boost::uuids::to_string(uuid); // 2. Get Transfer Syntax from dataSet std::string const & transfer_syntax = data_set->get_transfer_syntax().empty() ?registry::ExplicitVRLittleEndian :data_set->get_transfer_syntax(); // 3. Create a new BulkData BulkData data; data.data = *element.as_binary().data(); data.location = uuid_string; if(tag == registry::PixelData) { data.type = STOWRSRequest::_media_type_from_transfer_syntax(transfer_syntax); } else { data.type = "application/octet-stream"; } // 4. add an entry to uuid_to_bulk bulk_data.push_back(data); // 5. Update the data_set giving in parameter data_set->add(tag, {uuid_string}, VR::UR); } else if (data_set->is_data_set(tag)) { // Case of sequence with multiple sub-elements for(auto & item: element.as_data_set()) { STOWRSRequest::_extract_bulk_data(item, bulk_data); } } else { // Do nothing } } } void STOWRSRequest ::_restore_data_set(std::shared_ptr data_set, BulkMap & bulk_map) { for(auto & it: *data_set) { auto & tag = it.first; auto & element = it.second; if(element.vr == VR::UR) { auto const bulk_map_it = bulk_map.find(element.as_string()[0]); if(bulk_map_it != bulk_map.end()) { std::string const & transfer_syntax = data_set->get_transfer_syntax().empty() ?registry::ExplicitVRLittleEndian :data_set->get_transfer_syntax(); VRFinder vr_finder; auto const vr = vr_finder(tag, data_set, transfer_syntax); data_set->add(tag, Value::Binary({bulk_map_it->second}), vr); } else { // Do nothing: not a bulk data element } } else if(element.is_data_set()) { for(auto & item: element.as_data_set()) { STOWRSRequest::_restore_data_set(item, bulk_map); } } else { // Do nothing } } } std::string STOWRSRequest ::_media_type_from_transfer_syntax(std::string const & transfer_syntax) { std::map transfer_syntax_media_type = { {"1.2.840.10008.1.2.1" , "application/octet-stream"}, {"1.2.840.10008.1.2.4.70" , "image/jpeg"}, {"1.2.840.10008.1.2.4.50" , "image/jpeg"}, {"1.2.840.10008.1.2.4.51" , "image/jpeg"}, {"1.2.840.10008.1.2.4.57" , "image/jpeg"}, {"1.2.840.10008.1.2.5" , "image/x-dicom-rle"}, {"1.2.840.10008.1.2.4.80" , "image/x-jls"}, {"1.2.840.10008.1.2.4.81" , "image/x-jls"}, {"1.2.840.10008.1.2.4.90" , "image/jp2"}, {"1.2.840.10008.1.2.4.91" , "image/jp2"}, {"1.2.840.10008.1.2.4.92" , "image/jpx"}, {"1.2.840.10008.1.2.4.93" , "image/jpx"}, {"1.2.840.10008.1.2.4.100" , "video/mpeg2"}, {"1.2.840.10008.1.2.4.101" , "video/mpeg2"}, {"1.2.840.10008.1.2.4.102" , "video/mp4"}, {"1.2.840.10008.1.2.4.103" , "video/mp4"}, {"1.2.840.10008.1.2.4.104" , "video/mp4"}, {"1.2.840.10008.1.2.4.105" , "video/mp4"}, {"1.2.840.10008.1.2.4.106" , "video/mp4"}, }; return transfer_syntax_media_type.at(transfer_syntax); } } } odil-0.11.0/src/odil/webservices/STOWRSRequest.h000066400000000000000000000101641362244656000213540ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _920fb954_a579_47a3_8288_21ea1a01f81d #define _920fb954_a579_47a3_8288_21ea1a01f81d #include #include #include #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/registry.h" #include "odil/webservices/BulkData.h" #include "odil/webservices/HTTPRequest.h" #include "odil/webservices/Selector.h" #include "odil/webservices/Utils.h" #include "odil/webservices/URL.h" namespace odil { namespace webservices { /// @brief STOW-RS request generator and parser. class ODIL_API STOWRSRequest { public: /// @brief Constructor which takes an URL as argument. STOWRSRequest(URL const & base_url); /// @brief Constructor which takes an HTTPRequest as argument. STOWRSRequest(HTTPRequest const & request); /// @brief Equality operator. bool operator==(STOWRSRequest const & other) const; /// @brief Difference operator. bool operator!=(STOWRSRequest const & other) const; /// @brief Destructor. ~STOWRSRequest()=default; /// @brief Return base_url. URL const & get_base_url() const; /// @brief Set the base url. void set_base_url(URL const & url); /// @brief Return the transfer syntax. std::string const & get_transfer_syntax() const; /// @brief Set the transfer syntax. void set_transfer_syntax(std::string const & transfer_syntax); /// @brief Return the media type. std::string const & get_media_type() const; /// @brief Return the representation. Representation const & get_representation() const; /// @brief Return the url. URL const & get_url() const; /// @brief Return the selector. Selector const & get_selector() const; /// @brief Get the response items. Value::DataSets const & get_data_sets() const; /// @brief Modify the response items. Value::DataSets & get_data_sets(); /** * @brief Prepare a dicom request * * with a vector of datasets to store (each one will be used in a part of the request) * A selector corresponding to the location where the instance will be stored * and a representation corresponding to the way the request will be encoded */ void request_dicom( Value::DataSets const & data_sets, Selector const & selector, Representation const & representation, std::string const & transfer_syntax=registry::ExplicitVRLittleEndian); /// @brief Generate the associated HTTP request. HTTPRequest get_http_request() const; private: /// @brief Map an UUID to its bulk content. typedef std::map BulkMap; URL _base_url; std::string _transfer_syntax; Selector _selector; URL _url; std::string _media_type; Representation _representation; // Available request representations : DICOM - DICOM_XML - DICOM_JSON Value::DataSets _data_sets; /// @brief Return if the selector is valid or not static bool _is_selector_valid (Selector const & selector); /// @brief Return the media-type deduced from the transfer-syntax of the dataSet static std::string _media_type_from_transfer_syntax( std::string const & transfer_syntax); /// @brief Function that extracts bulk data from a data_set and store them into the uuid_to_bulk vector static void _extract_bulk_data( std::shared_ptr data_set, std::vector & bulk_data); /** * @brief Function used to restore the dataSet to its initial state (With bulk data at the correct location) * In this function we also change the content of uuid_to_bulk map */ static void _restore_data_set( std::shared_ptr data_set, BulkMap & bulk_map); }; } } #endif // _920fb954_a579_47a3_8288_21ea1a01f81d odil-0.11.0/src/odil/webservices/STOWRSResponse.cpp000066400000000000000000000160561362244656000220630ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/webservices/STOWRSResponse.h" #include #include #include #include #include #include #include "odil/DataSet.h" #include "odil/json_converter.h" #include "odil/StringStream.h" #include "odil/webservices/HTTPResponse.h" #include "odil/webservices/multipart_related.h" #include "odil/webservices/Utils.h" #include "odil/xml_converter.h" namespace odil { namespace webservices { STOWRSResponse ::STOWRSResponse() : _store_instance_responses(std::make_shared()), _representation(Representation::DICOM_XML), _reason(""), _warning(false), _failure_code(0), _media_type("") { // Nothing else. } STOWRSResponse ::STOWRSResponse(HTTPResponse const &response) : _store_instance_responses(std::make_shared()), _representation(Representation::DICOM_XML), _reason(""), _warning(false), _failure_code(0), _media_type("") { if(response.get_status() == 200) { this->set_reason("OK"); // query is ok } else if(response.get_status() == 202) { this->set_reason("Accepted"); this->_warning = true; // The Service stored some of the instances but warnings or failures exist for the others } else if( response.get_status() == 400 || response.get_status() == 401 || response.get_status() == 403 || response.get_status() == 409 || response.get_status() == 415 || response.get_status() == 503) { // Failure found this->set_failure_code(response.get_status()); this->set_reason(response.get_reason()); return; } else { throw Exception("Invalid status : "+ std::to_string(response.get_status())); } // Find the media type. auto const & content_type = as( response.get_header("Content-Type")); this->_media_type = content_type.name; if(content_type.name == "application/dicom+xml") { this->_representation = Representation::DICOM_XML; } else if (content_type.name == "application/dicom+json") { this->_representation = Representation::DICOM_JSON; } else { throw Exception("Unrecognized response representation"); } if(this->_media_type == "application/dicom+xml") { IStringStream stream( &response.get_body()[0], response.get_body().size()); boost::property_tree::ptree xml; boost::property_tree::read_xml(stream, xml); this->_store_instance_responses = as_dataset(xml); } else // if (this->_media_type == "application/dicom+json") { IStringStream stream( &response.get_body()[0], response.get_body().size()); Json::Value array; stream >> array; if (!array.isArray()) { throw Exception("Body must be an array"); } this->_store_instance_responses = as_dataset(array); } } bool STOWRSResponse ::operator==(STOWRSResponse const & other) const { return ( this->_failure_code == other._failure_code && this->_media_type == other._media_type && this->_reason == other._reason && this->_representation == other._representation && this->_warning == other._warning && *this->_store_instance_responses == *other._store_instance_responses); } bool STOWRSResponse ::operator!=(STOWRSResponse const & other) const { return !(*this == other); } void STOWRSResponse ::set_store_instance_responses(std::shared_ptr responses) { this->_store_instance_responses = responses; } std::shared_ptr STOWRSResponse ::get_store_instance_responses() const { return this->_store_instance_responses; } std::string const & STOWRSResponse ::get_media_type() const { return this->_media_type; } void STOWRSResponse ::set_representation(Representation const &representation) { this->_representation = representation; if(representation == Representation::DICOM_JSON) { this->_media_type = "application/dicom+json"; } else if(representation == Representation::DICOM_XML) { this->_media_type = "application/dicom+xml"; } else { throw Exception("Invalid representation"); } } Representation const & STOWRSResponse ::get_representation() const { return this->_representation; } void STOWRSResponse ::set_warning(bool warn) { this->_warning = warn; } bool STOWRSResponse ::is_status_warning() const { return this->_warning; } void STOWRSResponse ::set_failure_code(unsigned int failure_code) { std::array const failures = {400, 401, 403, 409, 415, 503}; if(std::find(failures.begin(), failures.end(), failure_code) != failures.end()) { this->_failure_code = failure_code; } else { throw Exception("Unknown reason"); } } unsigned int STOWRSResponse ::get_failure_code() const { return this->_failure_code; } void STOWRSResponse ::set_reason(std::string reason) { std::array const reasons = { "OK", "Bad Request", "Unauthorized", "Forbidden", "Conflict", "Unsupported Media Type", "Busy", "Accepted"}; if (std::find(reasons.begin(), reasons.end(), reason) != reasons.end()) { this->_reason = reason; } else { throw Exception("Unknown reason"); } } std::string const & STOWRSResponse ::get_reason() const { return this->_reason; } HTTPResponse STOWRSResponse ::get_http_response() const { HTTPResponse response; response.set_status( this->_failure_code==0 ?(this->is_status_warning()?202:200) :this->_failure_code); response.set_reason(this->_reason); if(this->_representation == Representation::DICOM_XML) { auto const xml = as_xml(this->get_store_instance_responses()); std::ostringstream body; #if BOOST_VERSION >= 105600 typedef boost::property_tree::xml_writer_settings SettingsType; #else typedef boost::property_tree::xml_writer_settings SettingsType; #endif boost::property_tree::write_xml(body, xml, SettingsType()); response.set_body(body.str()); response.set_header("Content-Type","application/dicom+xml"); } else if(this->_representation == Representation::DICOM_JSON) { Json::Value json; json.resize(1); json[0] = as_json(this->get_store_instance_responses()); Json::FastWriter writer; response.set_body(writer.write(json)); response.set_header("Content-Type","application/dicom+json"); } else { throw Exception("Unknown representation"); } return response; } } } odil-0.11.0/src/odil/webservices/STOWRSResponse.h000066400000000000000000000055141362244656000215250ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _0523d1f2_656d_47a9_b5e9_867dad172f31 #define _0523d1f2_656d_47a9_b5e9_867dad172f31 #include #include #include "odil/DataSet.h" #include "odil/odil.h" #include "odil/webservices/HTTPResponse.h" #include "odil/webservices/Utils.h" namespace odil { namespace webservices { /// @brief STOW-RS request generator and parser. class ODIL_API STOWRSResponse { public: /// @brief Constructor. STOWRSResponse(); /// @brief Parse an HTTPResponse as a STOWRSResponse. STOWRSResponse(HTTPResponse const & response); STOWRSResponse(STOWRSResponse const &) = default; STOWRSResponse(STOWRSResponse &&) = default; STOWRSResponse & operator=(STOWRSResponse const &) = default; STOWRSResponse & operator=(STOWRSResponse &&) = default; ~STOWRSResponse() = default; /// @brief Equality operator bool operator==(STOWRSResponse const & other) const; /// @brief Difference operator bool operator!=(STOWRSResponse const & other) const; /// @brief Set store instance responses void set_store_instance_responses(std::shared_ptr responses); /// @brief Get store instance responses std::shared_ptr get_store_instance_responses() const; /// @brief Get the media type std::string const & get_media_type() const; /// @brief Set the representation void set_representation(Representation const & representation); /// @brief Get the representation Representation const & get_representation() const; /// @brief Set whether there is a warning in the response or not void set_warning(bool warn); /// @brief Return whether there is a warning in the response or not bool is_status_warning() const; /// @brief Set the failure code void set_failure_code(unsigned int failure_code); /// @brief Return the failure code unsigned int get_failure_code() const; /// @brief Set the reason void set_reason(std::string reason); /// @brief Get the reason std::string const & get_reason() const; /// @brief Generate the associated HTTP Response HTTPResponse get_http_response() const; private: std::shared_ptr _store_instance_responses; Representation _representation; // either DICOM+XML or DICOM+JSON std::string _reason; bool _warning; unsigned int _failure_code; std::string _media_type; // either DICOM+XML or DICOM+JSON }; } } #endif // _0523d1f2_656d_47a9_b5e9_867dad172f31 odil-0.11.0/src/odil/webservices/Selector.cpp000066400000000000000000000135211362244656000210550ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/webservices/Selector.h" #include #include #include #include #include #include #include "odil/Exception.h" #include "odil/odil.h" namespace odil { namespace webservices { Selector ::Selector( std::map const & selector, std::vector const & frames) : _frames(frames), _study_present(false), _series_present(false), _instance_present(false) { for(auto const & pair: selector) { if (pair.first == "studies") { this->_study_present = true; this->_study = pair.second; } else if (pair.first == "series") { this->_series_present = true; this->_series = pair.second; } else if (pair.first == "instances") { this->_instance_present = true; this->_instance = pair.second; } else { throw Exception("Unknown option " + pair.first); } } } template struct Grammar: boost::spirit::qi::grammar< Iterator, std::pair, std::vector>()> { Grammar() : Grammar::base_type(selector) { namespace qi = boost::spirit::qi; level %= qi::string("studies") | qi::string("series") | qi::string("instances"); value %= +(~qi::char_("/")); objects %= (level >> -(qi::omit["/"] >> value)) % "/"; frames %= qi::lit("/frames/") >> qi::int_ % ","; selector %= objects >> -frames; } boost::spirit::qi::rule level; boost::spirit::qi::rule value; boost::spirit::qi::rule< Iterator, std::map() > objects; boost::spirit::qi::rule()> frames; boost::spirit::qi::rule< Iterator, std::pair, std::vector>() > selector; }; std::pair Selector ::from_path(std::string const & path) { auto const positions = { path.rfind("/instances"), path.rfind("/series"), path.rfind("/studies") }; auto const position = std::min(positions); auto const service = path.substr(0, position); auto const resource = path.substr(position+1); Grammar grammar; std::pair, std::vector> parsed_value; auto iterator = resource.begin(); auto const is_parsed = boost::spirit::qi::phrase_parse( iterator, resource.end(), grammar, boost::spirit::qi::ascii::space, parsed_value); if(!is_parsed) { throw Exception("Could not parse path"); } return std::make_pair( std::move(service), Selector(parsed_value.first, parsed_value.second)); } bool Selector ::operator==(Selector const & other) const { return ( this->_study == other._study && this->_study_present == other._study_present && this->_series == other._series && this->_series_present == other._series_present && this->_instance == other._instance && this->_instance_present == other._instance_present && this->_frames == other._frames ); } bool Selector ::operator!=(Selector const & other) const { return !(*this == other); } bool Selector ::is_study_present() const { return this->_study_present; } bool Selector ::is_series_present() const { return this->_series_present; } bool Selector ::is_instance_present() const { return this->_instance_present; } std::string const & Selector ::get_study() const { return this->_study; } std::string const & Selector ::get_series() const { return this->_series; } std::string const & Selector ::get_instance() const { return this->_instance; } std::vector const & Selector ::get_frames() const { return this->_frames; } Selector & Selector ::set_study(std::string const & study) { this->_study = study; this->_study_present = true; return *this; } Selector & Selector ::set_series(std::string const & series) { this->_series = series; this->_series_present = true; return *this; } Selector & Selector ::set_instance(std::string const & instance) { this->_instance = instance; this->_instance_present = true; return *this; } Selector & Selector ::set_frames(std::vector const & frames) { this->_frames = frames; return *this; } std::string Selector ::get_path(bool include_frames) const { std::string path; if(this->_study_present) { path = "/studies"; if (!this->_study.empty()) { path += "/" + this->_study; } } if(this->_series_present) { path += "/series"; if(!this->_series.empty()) { path += "/" + this->_series; } } if(this->_instance_present) { path += "/instances"; if (!this->_instance.empty()) { path += "/" + this->_instance; } } if(include_frames && !this->_frames.empty()) { path += "/frames/"; auto const last = --this->_frames.end(); auto it = this->_frames.begin(); while(it != last) { path += std::to_string(*it) + ","; ++it; } path += std::to_string(*last); } return path; } } } odil-0.11.0/src/odil/webservices/Selector.h000066400000000000000000000054751362244656000205330ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _b1a6d333_684d_4b50_a9b9_68af24027a10 #define _b1a6d333_684d_4b50_a9b9_68af24027a10 #include #include #include #include #include "odil/odil.h" namespace odil { namespace webservices { /// @brief Target (in the DICOM data model) of the request. class ODIL_API Selector { public: /// @brief Default constructor. Selector( std::map const & selector={}, std::vector const & frames={}); Selector(Selector const &) = default; Selector(Selector &&) = default; Selector & operator=(Selector const &) = default; Selector & operator=(Selector &&) = default; ~Selector() = default; /// @brief Build selector from URL path, return service path and selector. static std::pair from_path(std::string const & path); /// @brief Equality operator. bool operator==(Selector const & other) const; /// @brief Difference operator. bool operator!=(Selector const & other) const; /** * @brief Return the associated URL path, with the optional "frames" * component. */ std::string get_path(bool include_frames) const; /// @brief return if study field is present in the selector bool is_study_present() const; /// @brief return if series field is present in the selector bool is_series_present() const; /// @brief return if instance field is present in the selector bool is_instance_present() const; /// @brief return the wanted study std::string const & get_study() const; /// @brief return the wanted series std::string const & get_series() const; /// @brief return the wanted instance std::string const & get_instance() const; /// @brief return the wanted frames std::vector const & get_frames() const; /// @brief set the wanted study Selector & set_study(std::string const & study); /// @brief set the wanted series Selector & set_series(std::string const & series); /// @brief set the wanted instance Selector & set_instance(std::string const & instance); /// @brief set the wanted frames Selector & set_frames(std::vector const & frames); private: std::string _study; std::string _series; std::string _instance; std::vector _frames; bool _study_present; bool _series_present; bool _instance_present; }; } } #endif // _b1a6d333_684d_4b50_a9b9_68af24027a10 odil-0.11.0/src/odil/webservices/URL.cpp000066400000000000000000000071421362244656000177410ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/webservices/URL.h" #include #include #include #include #include #include #include #include "odil/Exception.h" #include "odil/StringStream.h" namespace odil { namespace webservices { bool URL ::operator==(URL const & other) const { return ( this->scheme == other.scheme && this->authority == other.authority && this->path == other.path && this->query == other.query && this->fragment == other.fragment); } bool URL ::operator!=(URL const & other) const { return !(*this == other); } URL ::operator std::string() const { std::string result; OStringStream stream(result); if(!this->scheme.empty()) { stream << this->scheme << ":"; } if(!this->authority.empty()) { stream << "//" << this->authority; } stream << this->path; if(!this->query.empty()) { stream << "?" << this->query; } if(!this->fragment.empty()) { stream << "#" << this->fragment; } return result; } std::vector> URL ::parse_query(std::string const & separator) const { namespace qi = boost::spirit::qi; typedef std::string::const_iterator Iterator; typedef std::vector> PairContainer; qi::rule name = +~qi::char_("="+separator); qi::rule value = +~qi::char_(separator); qi::rule retrieve_key_val = (name >> qi::omit["="] >> value)%separator; auto iterator = this->query.begin(); PairContainer pair_container; auto const parsed = qi::phrase_parse( iterator, this->query.end(), retrieve_key_val, qi::ascii::space, pair_container); if(!this->query.empty() && (!parsed || iterator != this->query.end())) { throw Exception("Could not parse query string"); } return pair_container; } URL URL ::parse(std::string const & string) { namespace qi = boost::spirit::qi; typedef std::string::const_iterator Iterator; qi::rule scheme = +~qi::char_(":/?#"); qi::rule authority = +~qi::char_("/?#"); qi::rule path = *~qi::char_("?#"); qi::rule query = +~qi::char_("#"); qi::rule fragment = +qi::char_; // RFC 3986, Appendix B boost::fusion::vector< std::string, std::string, std::string, std::string, std::string> url_value; auto const ok = qi::parse( string.begin(), string.end(), -(scheme >> ":") >> -("//" >> authority) >> path >> -( "?" >> query) >> -( "#" >> fragment), url_value); if(!ok) { throw Exception("Could not parse URL"); } return URL{ boost::fusion::at_c<0>(url_value), boost::fusion::at_c<1>(url_value), boost::fusion::at_c<2>(url_value), boost::fusion::at_c<3>(url_value), boost::fusion::at_c<4>(url_value) }; } } } odil-0.11.0/src/odil/webservices/URL.h000066400000000000000000000024311362244656000174020ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _37346dec_0ab4_46d2_a54f_e349e79cd27d #define _37346dec_0ab4_46d2_a54f_e349e79cd27d #include #include #include #include "odil/odil.h" namespace odil { namespace webservices { /// @brief Uniform resource locator struct ODIL_API URL { std::string scheme; std::string authority; std::string path; std::string query; std::string fragment; bool operator==(URL const & other) const; bool operator!=(URL const & other) const; /// @brief Recompose the components. operator std::string() const; /// @brief Parse attribute-value pairs in query string std::vector> parse_query(std::string const & separator="&") const; /// @brief Parse an URL into its five components. static URL parse(std::string const & string); }; } } #endif // _37346dec_0ab4_46d2_a54f_e349e79cd27d odil-0.11.0/src/odil/webservices/Utils.h000066400000000000000000000021501362244656000200360ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _6df14dad_16fc_486d_b7e0_728127e7c579 #define _6df14dad_16fc_486d_b7e0_728127e7c579 namespace odil { namespace webservices { /** * @brief Type of the request or response (use for WADO & QIDO). * * DICOM means DICOM data, either in binary, XML or JSON format; bulk data * is large (application-defined) data in binary format; pixel data is * the pixel data stored in instances or frames, either in uncompressed or * compressed format. */ enum class Type { None, DICOM, BulkData, PixelData, }; /// @brief Data representation for DICOM requests and responses. enum class Representation { DICOM, DICOM_XML, DICOM_JSON, }; } } #endif // _6df14dad_16fc_486d_b7e0_728127e7c579 odil-0.11.0/src/odil/webservices/WADORSRequest.cpp000066400000000000000000000265441362244656000216560ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/webservices/WADORSRequest.h" #include #include #include #include #include #include #include #include #include "odil/Exception.h" #include "odil/registry.h" #include "odil/StringStream.h" #include "odil/webservices/HTTPRequest.h" #include "odil/webservices/ItemWithParameters.h" #include "odil/webservices/URL.h" #include "odil/webservices/Utils.h" namespace odil { namespace webservices { WADORSRequest ::WADORSRequest( URL const & base_url, std::string const & transfer_syntax, std::string const & character_set, bool include_media_type_in_query, bool include_character_set_in_query) : _base_url(base_url), _transfer_syntax(transfer_syntax), _character_set(character_set), _include_media_type_in_query(include_media_type_in_query), _include_character_set_in_query(include_character_set_in_query), _url(), _media_type(), _type(Type::None) { // Nothing else } WADORSRequest ::WADORSRequest(HTTPRequest const & request) { // Build URL from target and "Host" header this->_url = URL::parse(request.get_target()); if(request.has_header("Host")) { this->_url.authority = request.get_header("Host"); } // Find the media type. auto const header_accept = as( request.get_header("Accept")); if(header_accept.name == "multipart/related") { this->_media_type = header_accept.name_parameters.at("type"); } else { this->_media_type = header_accept.name; } // Parse the query string, look for "accept" and "charset" fields auto const query = this->_url.parse_query(); std::string query_accept; std::string query_charset; std::for_each( query.begin(), query.end(), [&](std::pair const & item) { if(item.first == "accept") { query_accept = item.second; } if(item.first == "charset") { query_charset = item.second; } }); // PS 3.18, 6.1.1.8 and 6.1.1.8.4 this->_transfer_syntax = registry::ExplicitVRLittleEndian; if(!query_accept.empty()) { this->_include_media_type_in_query = true; auto const item = as(query_accept); auto const it = item.name_parameters.find("transfer-syntax"); if(it != item.name_parameters.end()) { this->_transfer_syntax = it->second; } } else { this->_include_media_type_in_query = false; } auto const transfer_syntax_it = header_accept.name_parameters.find( "transfer-syntax"); if(transfer_syntax_it != header_accept.name_parameters.end()) { this->_transfer_syntax = transfer_syntax_it->second; } this->_character_set = "UTF-8"; if(request.has_header("AcceptCharset")) { this->_character_set = request.get_header("AcceptCharset"); } if(!query_charset.empty()) { this->_include_character_set_in_query = true; this->_character_set = query_charset; } else { this->_include_character_set_in_query = false; } auto const charset_it = header_accept.name_parameters.find("charset"); if(charset_it != header_accept.name_parameters.end()) { this->_character_set = charset_it->second; } this->_base_url.scheme = this->_url.scheme; this->_base_url.authority = this->_url.authority; std::tie(this->_base_url.path, this->_selector) = Selector::from_path( this->_url.path); if(!WADORSRequest::_is_selector_valid(this->_selector)) { throw Exception("Invalid selector"); } if(!this->_selector.get_study().empty()) { if(this->_media_type == "application/dicom") { this->_type = Type::DICOM; this->_representation = Representation::DICOM; } else if(this->_media_type == "application/dicom+xml") { this->_type = Type::DICOM; this->_representation = Representation::DICOM_XML; } else if(this->_media_type == "application/dicom+json") { this->_type = Type::DICOM; this->_representation = Representation::DICOM_JSON; } else if(this->_media_type == "application/octet-stream") { // This could be a non-compressed pixel data or a non-pixel // bulk data. Since we cannot distinguish, assume the most generic // one this->_type = Type::BulkData; } else { // Specific media type: compressed pixel data this->_type = Type::PixelData; } } else { this->_type = Type::BulkData; } } bool WADORSRequest ::operator==(WADORSRequest const & other) const { return ( this->_base_url == other._base_url && this->_transfer_syntax == other._transfer_syntax && this->_character_set == other._character_set && this->_include_media_type_in_query == other._include_media_type_in_query && this->_include_character_set_in_query == other._include_media_type_in_query && this->_url == other._url && this->_media_type == other._media_type && this->_type == other._type ); } bool WADORSRequest ::operator!=(WADORSRequest const & other) const { return !(*this == other); } URL const & WADORSRequest ::get_base_url() const { return this->_base_url; } void WADORSRequest ::set_base_url(URL const & url) { this->_base_url = url; } std::string const & WADORSRequest ::get_transfer_syntax() const { return this->_transfer_syntax; } void WADORSRequest ::set_transfer_syntax(std::string const & transfer_syntax) { this->_transfer_syntax = transfer_syntax; } std::string const & WADORSRequest ::get_character_set() const { return this->_character_set; } void WADORSRequest ::set_character_set(std::string const & character_set) { this->_character_set = character_set; } bool WADORSRequest ::get_include_media_type_in_query() const { return this->_include_media_type_in_query; } void WADORSRequest ::set_include_media_type_in_query(bool include_media_type_in_query) { this->_include_media_type_in_query = include_media_type_in_query; } bool WADORSRequest ::get_include_character_set_in_query() const { return this->_include_character_set_in_query; } void WADORSRequest ::set_include_character_set_in_query(bool include_charcter_set_in_query) { this->_include_character_set_in_query = include_charcter_set_in_query; } Type WADORSRequest ::get_type() const { return this->_type; } Selector const & WADORSRequest ::get_selector() const { return this->_selector; } bool WADORSRequest ::_is_selector_valid(Selector const & selector) { return ( // /studies/1.2 ( selector.is_study_present() && !selector.get_study().empty() && !selector.is_series_present() && !selector.is_instance_present() && selector.get_frames().empty()) // /studies/1.2/series/3.4 || ( selector.is_study_present() && !selector.get_study().empty() && selector.is_series_present() && !selector.get_series().empty() && !selector.is_instance_present() && selector.get_frames().empty()) // /studies/1.2/series/3.4/instances/5.6/ // /studies/1.2/series/3.4/instances/5.6/frames/7,8,9 || ( selector.is_study_present() && !selector.get_study().empty() && selector.is_series_present() && !selector.get_series().empty() && selector.is_instance_present() && !selector.get_instance().empty()) ); } URL const & WADORSRequest ::get_url() const { return this->_url; } std::string const & WADORSRequest ::get_media_type() const { return this->_media_type; } Representation const & WADORSRequest ::get_representation() const { return this->_representation; } void WADORSRequest ::request_dicom(Representation representation, Selector const & selector) { this->_type = Type::DICOM; if(!WADORSRequest::_is_selector_valid(selector)) { throw Exception("Invalid selector"); } this->_selector = selector; this->_representation = representation; // RetrieveFrames may not return DICOM objects, PS 3.18, 6.4.1 // RetrieveMetaData may do so. auto path = this->_base_url.path + selector.get_path( representation != Representation::DICOM); if(representation != Representation::DICOM) { path += "/metadata"; } this->_url = { this->_base_url.scheme, this->_base_url.authority, path, "", ""}; if(representation == Representation::DICOM) { this->_media_type = "application/dicom"; } else if(representation == Representation::DICOM_XML) { this->_media_type = "application/dicom+xml"; } else if(representation == Representation::DICOM_JSON) { this->_media_type = "application/dicom+json"; } else { throw Exception("Unknown accept type"); } } void WADORSRequest ::request_bulk_data(Selector const & selector) { this->_type = Type::BulkData; if(!_is_selector_valid(selector)) { throw Exception("Invalid selector"); } this->_selector = selector; auto path = this->_base_url.path + selector.get_path(true); this->_url = { this->_base_url.scheme, this->_base_url.authority, path, "", ""}; this->_media_type = "application/octet-stream"; } void WADORSRequest ::request_bulk_data(URL const & url) { this->_type = Type::BulkData; this->_url = url; this->_media_type = "application/octet-stream"; } void WADORSRequest ::request_pixel_data(Selector const & selector, std::string const & media_type) { this->_type = Type::PixelData; if (!_is_selector_valid(selector)) { throw Exception("Invalid selector"); } this->_selector = selector; auto path = this->_base_url.path + selector.get_path(true); this->_url = { this->_base_url.scheme, this->_base_url.authority, path, "", ""}; this->_media_type = media_type; } HTTPRequest WADORSRequest ::get_http_request() const { ItemWithParameters accept; if(this->_representation == Representation::DICOM_JSON) { accept.name = this->_media_type; } else { accept.name = "multipart/related"; accept.name_parameters["type"] = this->_media_type; } if(!this->_transfer_syntax.empty()) { accept.name_parameters["transfer-syntax"] = this->_transfer_syntax; } if(!this->_character_set.empty()) { accept.name_parameters["charset"] = this->_character_set; } HTTPRequest::Headers const headers{ { "Accept", boost::lexical_cast(accept) } }; // TODO: accept and accept-charset in URL query return HTTPRequest("GET", this->_url, "HTTP/1.0", headers); } } } odil-0.11.0/src/odil/webservices/WADORSRequest.h000066400000000000000000000076231362244656000213200ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _32b5f072_8ebb_4df1_925d_abd5f0535eb6 #define _32b5f072_8ebb_4df1_925d_abd5f0535eb6 #include #include #include "odil/odil.h" #include "odil/webservices/HTTPRequest.h" #include "odil/webservices/Selector.h" #include "odil/webservices/URL.h" #include "odil/webservices/Utils.h" namespace odil { namespace webservices { /// @brief WADO-RS request generator and parser. class ODIL_API WADORSRequest { public: /// @brief Constructor. WADORSRequest( URL const & base_url, std::string const & transfer_syntax="", std::string const & character_set="", bool include_media_type_in_query=false, bool include_character_set_in_query=false); /// @brief Constructor. WADORSRequest(HTTPRequest const & request); /// @brief Equality operator. bool operator==(WADORSRequest const & other) const; /// @brief Difference operator. bool operator!=(WADORSRequest const & other) const; /// @brief Return the base URL. URL const & get_base_url() const; /// @brief Set the base URL; the query and fragment must be empty. void set_base_url(URL const & url); /// @brief Return the transfer syntax. std::string const & get_transfer_syntax() const; /// @brief Set the transfer syntax. void set_transfer_syntax(std::string const & transfer_syntax); /// @brief Return the transfer syntax. std::string const & get_character_set() const; /// @brief Set the transfer syntax. void set_character_set(std::string const & character_set); /// @brief Return whether to include the media type in the URL query. bool get_include_media_type_in_query() const; /// @brief Set whether to include the media type in the URL query. void set_include_media_type_in_query(bool include_media_type_in_query); /// @brief Return whether to include the character set in the URL query. bool get_include_character_set_in_query() const; /// @brief Set whether to include the character_set in the URL query. void set_include_character_set_in_query(bool include_charcter_set_in_query); /// @brief Return the query type. Type get_type() const; /// @brief Return the selector. Selector const & get_selector() const; /// @brief Return the URL. URL const & get_url() const; /// @brief Return the media type. std::string const & get_media_type() const; /// @brief Return the representation. Representation const & get_representation() const; /// @brief Prepare a DICOM request. void request_dicom( Representation representation, Selector const & selector); /// @brief Prepare a bulk data request. void request_bulk_data(Selector const & selector); /// @brief Prepare a bulk data request. void request_bulk_data(URL const & url); /// @brief Prepare a pixel data request. void request_pixel_data( Selector const & selector, std::string const & media_type="application/octet-stream"); /// @brief Generate the associated HTTP request. HTTPRequest get_http_request() const; private: URL _base_url; std::string _transfer_syntax; std::string _character_set; bool _include_media_type_in_query; bool _include_character_set_in_query; Selector _selector; URL _url; std::string _media_type; Representation _representation; Type _type; /// @brief Return if the given selector is valid or not static bool _is_selector_valid(Selector const & selector); }; } } #endif // _32b5f072_8ebb_4df1_925d_abd5f0535eb6 odil-0.11.0/src/odil/webservices/WADORSResponse.cpp000066400000000000000000000273471362244656000220260ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/webservices/WADORSResponse.h" #include #include #include #include #include #include #include #include #include #include #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/json_converter.h" #include "odil/Reader.h" #include "odil/StringStream.h" #include "odil/webservices/BulkData.h" #include "odil/webservices/HTTPResponse.h" #include "odil/webservices/ItemWithParameters.h" #include "odil/webservices/multipart_related.h" #include "odil/webservices/Utils.h" #include "odil/Writer.h" #include "odil/xml_converter.h" namespace odil { namespace webservices { WADORSResponse ::WADORSResponse() : _data_sets(), _is_partial(false), _type(Type::None), _representation(Representation::DICOM), _media_type("") { // Nothing else. } WADORSResponse ::WADORSResponse(HTTPResponse const & response) { if(response.get_status() == 200) { this->_is_partial = false; } else if(response.get_status() == 206) { this->_is_partial = true; } else { throw Exception( "Invalid status: "+std::to_string(response.get_status())); } // Find media type auto const & content_type = as( response.get_header("Content-Type")); if(content_type.name == "multipart/related") { this->_media_type = content_type.name_parameters.at("type"); } else { this->_media_type = content_type.name; } if(this->_media_type == "application/dicom") { this->_type = Type::DICOM; this->_representation = Representation::DICOM; std::string transfer_syntax = registry::ExplicitVRLittleEndian; auto const transfer_syntax_it = content_type.name_parameters.find( "transfer-syntax"); if(transfer_syntax_it != content_type.name_parameters.end()) { transfer_syntax = transfer_syntax_it->second; } transform_parts( response, std::back_inserter(this->get_data_sets()), [](Message const & part) { IStringStream stream{ &part.get_body()[0], part.get_body().size()}; auto const data_set_and_header = Reader::read_file(stream); return data_set_and_header.second; }); } else if(this->_media_type == "application/dicom+xml") { this->_type = Type::DICOM; this->_representation = Representation::DICOM_XML; transform_parts( response, std::back_inserter(this->get_data_sets()), [](Message const & part) { IStringStream stream{ &part.get_body()[0], part.get_body().size()}; boost::property_tree::ptree xml; boost::property_tree::read_xml(stream, xml); return as_dataset(xml); }); } else if(this->_media_type == "application/dicom+json") { this->_type = Type::DICOM; this->_representation = Representation::DICOM_JSON; IStringStream stream{ &response.get_body()[0], response.get_body().size()}; Json::Value array; stream >> array; if(!array.isArray()) { throw Exception("Body must be an array"); } this->get_data_sets().reserve(array.size()); std::transform( array.begin(), array.end(), std::back_inserter(this->get_data_sets()), static_cast(*)(Json::Value const &)>(as_dataset)); } else if(this->_media_type == "application/octet-stream") { // This could be a non-compressed pixel data or a non-pixel // bulk data. Since we cannot distinguish, assume the most generic // one this->_type = Type::BulkData; transform_parts( response, std::back_inserter(this->get_bulk_data()), [](Message const & part) { auto const & body = part.get_body(); return BulkData{ {body.begin(), body.end()}, part.get_header("Content-Type"), part.get_header("Content-Location")}; }); } else { // Specific media type: compressed pixel data this->_type = Type::PixelData; transform_parts( response, std::back_inserter(this->get_bulk_data()), [](Message const & part) { auto const & body = part.get_body(); return BulkData{ {body.begin(), body.end()}, part.get_header("Content-Type"), part.get_header("Content-Location")}; }); } } bool WADORSResponse ::operator==(WADORSResponse const & other) const { return ( this->_data_sets == other._data_sets && this->_is_partial == other._is_partial && this->_type == other._type && this->_representation == other._representation && this->_media_type == other._media_type); } bool WADORSResponse ::operator!=(WADORSResponse const & other) const { return !(*this == other); } Value::DataSets const & WADORSResponse ::get_data_sets() const { return this->_data_sets; } Value::DataSets & WADORSResponse ::get_data_sets() { return this->_data_sets; } void WADORSResponse ::set_data_sets(Value::DataSets const & data_sets) { this->_data_sets = data_sets; } std::vector const & WADORSResponse ::get_bulk_data() const { return this->_bulk_data; } std::vector & WADORSResponse ::get_bulk_data() { return this->_bulk_data; } void WADORSResponse ::set_bulk_data(std::vector const & bulk_data) { this->_bulk_data = bulk_data; } bool WADORSResponse ::is_partial() const { return this->_is_partial; } void WADORSResponse ::set_partial(bool partial) { this->_is_partial = partial; } Type WADORSResponse ::get_type() const { return this->_type; } Representation const & WADORSResponse ::get_representation() const { return this->_representation; } void WADORSResponse ::respond_dicom(Representation representation) { this->_type = Type::DICOM; this->_representation = representation; } void WADORSResponse ::respond_bulk_data() { this->_type = Type::BulkData; } void WADORSResponse ::respond_pixel_data(std::string const & media_type) { this->_type = Type::PixelData; this->_media_type = media_type; } template void create_multipart( Iterator begin, Iterator end, Accumulator accumulator, std::string const & media_type, HTTPResponse & response) { auto const boundary = random_boundary(); std::string body; OStringStream stream(body); accumulate_parts(begin, end, accumulator, stream, boundary); stream.flush(); response.set_body(body); response.set_header( "Content-Type", ItemWithParameters( "multipart/related", {{"type", media_type}, {"boundary", boundary}} )); } HTTPResponse WADORSResponse ::get_http_response() const { HTTPResponse response; response.set_status(this->_is_partial?206:200); response.set_reason(this->_is_partial?"Partial Content":"OK"); if(this->_type == Type::DICOM) { if(this->_representation == Representation::DICOM) { create_multipart( this->_data_sets.begin(), this->_data_sets.end(), [](std::shared_ptr data_set) { std::string part_body; OStringStream stream(part_body); auto const transfer_syntax = data_set->get_transfer_syntax().empty() // PS 3.18, 6.1.1.8 ?registry::ExplicitVRLittleEndian :data_set->get_transfer_syntax(); Writer::write_file( data_set, stream, std::make_shared(), transfer_syntax); stream.flush(); return Message( { { "Content-Type", ItemWithParameters( "application/dicom", { {"transfer-syntax", transfer_syntax} } )} }, // TODO: character-set part_body ); }, "application/dicom", response); } else if(this->_representation == Representation::DICOM_XML) { create_multipart( this->get_data_sets().begin(), this->get_data_sets().end(), [](std::shared_ptr data_set) { auto const xml = as_xml(data_set); std::string part_body; OStringStream stream(part_body); #if BOOST_VERSION >= 105600 typedef boost::property_tree::xml_writer_settings SettingsType; #else typedef boost::property_tree::xml_writer_settings SettingsType; #endif boost::property_tree::write_xml(stream, xml, SettingsType()); stream.flush(); return Message( { { "Content-Type", "application/dicom+xml" } }, part_body ); }, "application/dicom+xml", response); } else if(this->_representation == Representation::DICOM_JSON) { Json::Value json; json.resize(this->_data_sets.size()); for(unsigned int i=0; i_data_sets.size(); ++i) { json[i] = as_json(this->_data_sets[i]); } Json::FastWriter writer; response.set_body(writer.write(json)); response.set_header("Content-Type", "application/dicom+json"); } else { throw Exception("Unknown representation"); } } else if(this->_type == Type::BulkData) { create_multipart( this->get_bulk_data().begin(), this->get_bulk_data().end(), [](BulkData const & bulk_data) { return Message( { { "Content-Type", bulk_data.type }, { "Content-Location", bulk_data.location } }, { bulk_data.data.begin(), bulk_data.data.end() } ); }, "application/octet-stream", response); } else if(this->_type == Type::PixelData) { create_multipart( this->get_bulk_data().begin(), this->get_bulk_data().end(), [](BulkData const & bulk_data) { return Message( { { "Content-Type", bulk_data.type }, { "Content-Location", bulk_data.location } }, { bulk_data.data.begin(), bulk_data.data.end() } ); }, this->_media_type, response); } else { throw Exception("Unknown type"); } return response; } } } odil-0.11.0/src/odil/webservices/WADORSResponse.h000066400000000000000000000061261362244656000214630ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _91f4f1d4_f2ff_48a2_8918_ade8aa161233 #define _91f4f1d4_f2ff_48a2_8918_ade8aa161233 #include #include #include "odil/DataSet.h" #include "odil/Element.h" #include "odil/odil.h" #include "odil/Value.h" #include "odil/webservices/BulkData.h" #include "odil/webservices/HTTPResponse.h" #include "odil/webservices/Utils.h" namespace odil { namespace webservices { /// @brief WADO-RS response generator and parser. class ODIL_API WADORSResponse { public: /// @brief Constructor. WADORSResponse(); /// @brief Parse an HTTPResponse as a WADORSResponse. WADORSResponse(HTTPResponse const & response); WADORSResponse(WADORSResponse const &) =default; WADORSResponse(WADORSResponse &&) =default; ~WADORSResponse() =default; WADORSResponse & operator=(WADORSResponse &&) =default; /// @brief Equality operator. bool operator==(WADORSResponse const & other) const; // /// @brief Difference operator. bool operator!=(WADORSResponse const & other) const; /// @brief Get the response items. Value::DataSets const & get_data_sets() const; /// @brief Modify the response items. Value::DataSets & get_data_sets(); /// @brief Set the response items. void set_data_sets(Value::DataSets const & data_sets); /// @brief Get the response items. std::vector const & get_bulk_data() const; /// @brief Modify the response items. std::vector & get_bulk_data(); /// @brief Set the response items. void set_bulk_data(std::vector const & bulk_data); /// @brief Return whether the requested content is partially transferred. bool is_partial() const; /// @brief Set whether the requested content is partially transferred. void set_partial(bool partial); /// @brief Return the response type. Type get_type() const; /// @brief Return the representation. Representation const & get_representation() const; /** * @brief Prepare a DICOM response. * * With a DICOM representation, the transfer_syntax of each data set will * be used. */ void respond_dicom(Representation representation); /// @brief Prepare a bulk data response. void respond_bulk_data(); /// @brief Prepare a pixel data response. void respond_pixel_data( std::string const & media_type="application/octet-stream"); /// @brief Generate the associated HTTP response HTTPResponse get_http_response() const; private: Value::DataSets _data_sets; std::vector _bulk_data; bool _is_partial; Type _type; Representation _representation; std::string _media_type; }; } } #endif //_91f4f1d4_f2ff_48a2_8918_ade8aa161233 odil-0.11.0/src/odil/webservices/multipart_related.cpp000066400000000000000000000044351362244656000230220ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/webservices/multipart_related.h" #include #include #include #include #include #include #include "odil/webservices/ItemWithParameters.h" #include "odil/webservices/Message.h" namespace odil { namespace webservices { bool is_multipart_related(Message const & message) { if(!message.has_header("Content-Type")) { return false; } std::stringstream stream(message.get_header("Content-Type")); ItemWithParameters content_type; stream >> content_type; std::string name_lower(content_type.name.size(), ' '); std::transform( content_type.name.begin(), content_type.name.end(), name_lower.begin(), ::tolower); return name_lower == "multipart/related"; } std::size_t count_parts(Message const & message) { if(!is_multipart_related(message)) { return 0; } std::stringstream stream(message.get_header("Content-Type")); ItemWithParameters content_type; stream >> content_type; std::string const & boundary = "--"+content_type.name_parameters["boundary"]+"\r\n"; std::size_t count = 0; std::size_t begin = 0; while(begin != std::string::npos) { auto const end = message.get_body().find(boundary, begin); if(end != std::string::npos) { ++count; begin = end+boundary.size(); } else { begin = end; } } return count; } std::string random_boundary() { static std::random_device generator; static std::string const characters = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; std::uniform_int_distribution<> distribution(0, characters.size()-1); std::string boundary; while(boundary.size()<31) { boundary += characters[distribution(generator)]; } return boundary; } } } odil-0.11.0/src/odil/webservices/multipart_related.h000066400000000000000000000035161362244656000224660ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _9d8fe506_1ea6_448c_8c6c_bcd7375e89de #define _9d8fe506_1ea6_448c_8c6c_bcd7375e89de #include #include #include "odil/webservices/Message.h" namespace odil { namespace webservices { /// @brief Test whether the message is multipart/related. ODIL_API bool is_multipart_related(Message const & message); /** * @brief Return the number of parts in the message, 0 if the message is not * multipart/related. */ ODIL_API std::size_t count_parts(Message const & message); /// @brief Return a random multipart/related boundary. ODIL_API std::string random_boundary(); /// @brief Transform each part of a multipart/related message. template void transform_parts( Message const & message, Iterator destination, UnaryFunctor functor); /// @brief Use to call a functor for each part of a multipart/related message. template void for_each_part(Message const & message, UnaryFunctor functor); /** * @brief Serialize the (begin, end) sequence as a multipart/related message * body in stream as described in the RFC 2046 * https://tools.ietf.org/html/rfc2046#section-5.1.1. */ template std::ostream & accumulate_parts( Iterator begin, Iterator end, UnaryFunction serialize, std::ostream & stream, std::string const & boundary); } } #include "multipart_related.txx" #endif // _9d8fe506_1ea6_448c_8c6c_bcd7375e89de odil-0.11.0/src/odil/webservices/multipart_related.txx000066400000000000000000000067751362244656000230740ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _079f344d_090b_445c_9019_bcd2e5fe503e #define _079f344d_090b_445c_9019_bcd2e5fe503e #include "odil/webservices/multipart_related.h" #include #include #include #include "odil/webservices/ItemWithParameters.h" #include "odil/webservices/Message.h" namespace odil { namespace webservices { template void transform_parts( Message const & message, Iterator destination, UnaryFunctor functor) { if(!is_multipart_related(message)) { return; } std::stringstream stream(message.get_header("Content-Type")); ItemWithParameters content_type; stream >> content_type; std::string const & boundary = content_type.name_parameters["boundary"]; auto const & body = message.get_body(); auto begin = body.find("--"+boundary+"\r\n"); while(begin < body.size() && begin != std::string::npos) { auto end = body.find("\r\n--"+boundary+"\r\n", begin+1); if(end == std::string::npos) { end = body.find("\r\n--"+boundary+"--\r\n", begin+1); } std::string part; if(end != std::string::npos) { auto const part_content = body.substr( begin+boundary.size()+4, end-(begin+boundary.size()+4)); std::istringstream stream(part_content); Message sub_message; stream >> sub_message; *destination = functor(sub_message); ++destination; } begin = end; } } template void for_each_part(Message const & message, UnaryFunctor functor) { if(!is_multipart_related(message)) { return; } std::stringstream stream(message.get_header("Content-Type")); ItemWithParameters content_type; stream >> content_type; std::string const & boundary = content_type.name_parameters["boundary"]; auto const & body = message.get_body(); auto begin = body.find("--"+boundary+"\r\n"); while(begin < body.size() && begin != std::string::npos) { auto end = body.find("\r\n--"+boundary+"\r\n", begin+1); if(end == std::string::npos) { end = body.find("\r\n--"+boundary+"--\r\n", begin+1); } std::string part; if(end != std::string::npos) { auto const part_content = body.substr( begin+boundary.size()+4, end-(begin+boundary.size()+4)); std::istringstream stream(part_content); Message sub_message; stream >> sub_message; functor(sub_message); } begin = end; } } template std::ostream & accumulate_parts( Iterator begin, Iterator end, UnaryFunction serialize, std::ostream & stream, std::string const & boundary) { for(/* no initialization */; begin != end; ++begin) { auto const part = serialize(*begin); stream << "--" << boundary << "\r\n" << part << "\r\n"; } stream << "--" << boundary << "--" << "\r\n"; return stream; } } } #endif // _079f344d_090b_445c_9019_bcd2e5fe503e odil-0.11.0/src/odil/write_ds.cpp000066400000000000000000000113441362244656000165750ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "odil/write_ds.h" #include #include #include #include // Helper functions namespace { /// @brief Remove the trailing zeros of the mantissa. void clean(char * mantissa) { char * it = mantissa + strlen(mantissa) - 1; while(*it == '0' && it > mantissa) { *it = '\0'; --it; } if(*it == '.') { *it = '\0'; } } /** * @brief Add 1 to the integer contained in (buffer[0], buffer[n]) (end included). * @return 1 if a carry was used, 0 otherwise. */ int add1(char * buffer, int n) { if(n < 0) { return 1; } if(buffer[n] == '9') { buffer[n] = '0'; return add1(buffer, n-1); } else { buffer[n] += 1; } return 0; } /** * @brief Round the integer contained in (buffer[0], buffer[n]) (end included) * to the nearest factor of 10. * @return 1 if rounding was carried to next digit, 0 otherwise. */ int doround(char * buffer, unsigned int n) { if(n >= strlen(buffer)) { return 0; } char const c = buffer[n]; buffer[n] = 0; if(c >= '5' && c <= '9') { return add1(buffer, n-1); } return 0; } int roundat(char * buffer, unsigned int i, int exponent) { if(doround(buffer, i) != 0) { exponent += 1; switch(exponent) { case -2: strcpy(buffer, ".01"); break; case -1: strcpy(buffer, ".1"); break; case 0: strcpy(buffer, "1."); break; case 1: strcpy(buffer, "10"); break; case 2: strcpy(buffer, "100"); break; default: sprintf(buffer, "1e%d", exponent); } return 1; } return 0; } } namespace odil { void write_ds(double f, char * buffer, int size) { // Negative number: add initial '-' to buffer and process as positive number if(f < 0) { f = -f; size -= 1; *buffer = '-'; ++buffer; } char line[40]; sprintf(line, "%1.16e", f); if(line[0] == '-') { // Happens in the case of -0, other negative numbers have been already // handled f = -f; size -= 1; *buffer = '-'; ++buffer; sprintf(line, "%1.16e", f); } char * mantissa = line+1; *mantissa = line[0]; auto const end_of_mantissa = strcspn(mantissa, "eE"); mantissa[end_of_mantissa] = '\0'; int const exponent = strtol(mantissa + end_of_mantissa + 1, NULL, 10); if((exponent >= size) || (exponent < -3)) { char exponent_buffer[6]; auto const exponent_length = sprintf(exponent_buffer, "e%d", exponent); auto const i = roundat(mantissa, size - 1 - exponent_length, exponent); if(i == 1) { strcpy(buffer, mantissa); return; } buffer[0] = mantissa[0]; buffer[1] = '.'; strncpy(buffer + i + 2, mantissa + 1, size - 2 - exponent_length); buffer[size-exponent_length] = 0; clean(buffer); strcat(buffer, exponent_buffer); } else if(exponent >= size - 2) { roundat(mantissa, exponent + 1, exponent); strcpy(buffer, mantissa); } else if(exponent >= 0) { auto const i = roundat(mantissa, size - 1, exponent); if(i == 1) { strcpy(buffer, mantissa); return; } strncpy(buffer, mantissa, exponent + 1); buffer[exponent + 1] = '.'; strncpy(buffer + exponent + 2, mantissa + exponent + 1, size - exponent - 1); buffer[size] = 0; clean(buffer); } else { int const i = roundat(mantissa, size + 1 + exponent, exponent); if (i == 1) { strcpy(buffer, mantissa); return; } buffer[0] = '.'; for(int j=0; j< -1 - exponent; j++) { buffer[j+1] = '0'; } if((i == 1) && (exponent != -1)) { buffer[-exponent] = '1'; ++buffer; } strncpy(buffer - exponent, mantissa, size + 1 + exponent); buffer[size] = 0; clean(buffer); } } } odil-0.11.0/src/odil/write_ds.h000066400000000000000000000014121362244656000162350ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _1fe89041_9f3b_4536_a55a_81f045984a62 #define _1fe89041_9f3b_4536_a55a_81f045984a62 #include #include #include #include #include "odil/odil.h" namespace odil { /// @brief Write a double as a DS to the buffer. ODIL_API void write_ds(double f, char * buffer, int size=16); } #endif // _1fe89041_9f3b_4536_a55a_81f045984a62 odil-0.11.0/src/odil/xml_converter.cpp000066400000000000000000000407571362244656000176560ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include #include "odil/base64.h" #include "odil/DataSet.h" #include "odil/registry.h" #include "odil/Value.h" #include "odil/xml_converter.h" namespace { template std::string join(TIterator first, TIterator last, std::string const & separator) { std::string joined; bool is_first=true; while(first != last) { if(!is_first) { joined += separator; } joined += *first; is_first = false; ++first; } return joined; } template void split( std::string const & string, std::string const & separator, TIterator destination) { std::string::size_type begin=0; while(begin < string.size()) { auto end = std::min(string.find(separator, begin), string.size()); *destination = string.substr(begin, end-begin); ++destination; begin = end+1; } } } namespace odil { /// @brief Element visitor converting to XML. struct ToXMLVisitor { BulkDataCreator bulk_data_creator; typedef boost::property_tree::ptree result_type; result_type operator()(VR const vr) const { result_type result; result.put(".vr", as_string(vr)); // Mandatory return result; } template result_type operator()(VR const vr, T const & value) const { result_type result; result.put(".vr", as_string(vr)); // Mandatory unsigned int count = 0; for(auto const & item: value) { ++count; boost::property_tree::ptree tag_value; tag_value.put(".number", count); // Mandatory tag_value.put_value(item); result.add_child("Value", tag_value); } return result; } result_type operator()(VR const vr, Value::Strings const & value) const { result_type result; result.put(".vr", as_string(vr)); // Mandatory if(vr == VR::PN) { std::vector const representation_names{ "Alphabetic", "Ideographic", "Phonetic" }; std::vector const field_names{ "FamilyName", "GivenName", "MiddleName", "NamePrefix", "NameSuffix" }; unsigned int count = 0; for(auto const & item: value) { ++count; boost::property_tree::ptree tag_value; tag_value.put(".number", count); // Mandatory std::vector representations; split(item, "=", std::back_inserter(representations)); for(unsigned int r=0; r fields; split(representations[r], "^", std::back_inserter(fields)); for(unsigned int f=0; f.number", count); // Mandatory tag_value.put_value(item); result.add_child("Value", tag_value); } } return result; } result_type operator()(VR const vr, Value::DataSets const & value) const { result_type result; result.put(".vr", as_string(vr)); // Mandatory unsigned int count = 0; for(auto const & item: value) { ++count; boost::property_tree::ptree tag_value; tag_value.put(".number", count); // Mandatory boost::property_tree::ptree tag_result = as_xml( item, this->bulk_data_creator); tag_value.insert(tag_value.end(), tag_result.front().second.begin(), tag_result.front().second.end()); result.add_child("Item", tag_value); } return result; } result_type operator()(VR const vr, Value::Binary const & value) const { if(value.size() > 1) { // PS3.18 2016b, F.2.7: There is a single InlineBinary value // representing the entire Value Field. // PS3.18 2016b, Figure 6.5-1: Pixel data is not encoded in // JSON/XML, but transfered using a different content type throw Exception("Binary element is multiple-valued"); } result_type result; result.put(".vr", as_string(vr)); // Mandatory boost::property_tree::ptree tag_value; std::string encoded; encoded.reserve(value[0].size()*4/3); base64::encode(value[0].begin(), value[0].end(), std::back_inserter(encoded)); tag_value.put_value(encoded); result.add_child("InlineBinary", tag_value); return result; } }; boost::property_tree::ptree as_xml( std::shared_ptr data_set, BulkDataCreator const & bulk_data_creator) { ToXMLVisitor visitor; visitor.bulk_data_creator = bulk_data_creator; // XML dataset element boost::property_tree::ptree nativedicommodel; if(data_set) { for(auto const & it: *data_set) { auto const & tag = it.first; auto const & element = it.second; boost::property_tree::ptree dicomattribute; auto const bulk_data_info = bulk_data_creator?bulk_data_creator(data_set, tag) :std::make_pair(std::string(), std::string()); if(!bulk_data_info.first.empty()) { boost::property_tree::ptree bulk_data_element; bulk_data_element.put( "."+bulk_data_info.first, bulk_data_info.second); dicomattribute.add_child("BulkData", bulk_data_element); dicomattribute.put(".vr", as_string(element.vr)); } else { dicomattribute = apply_visitor(visitor, element); } // Add Mandatory attribute Tag dicomattribute.put(".tag", std::string(tag)); // Add Optional attribute Keyword auto const dictionary_it = registry::public_dictionary.find(tag); if(dictionary_it != registry::public_dictionary.end()) { dicomattribute.put( ".keyword", dictionary_it->second.keyword); } // Add Optional attribute PrivateCreator //dicomattribute.put(".privateCreator", todo); nativedicommodel.add_child("DicomAttribute", dicomattribute); } } // root element boost::property_tree::ptree dataset_xml; // Add XML dataset into root element dataset_xml.add_child("NativeDicomModel", nativedicommodel); return dataset_xml; } void parse_value( boost::property_tree::ptree const & xml, Element & element) { auto const number = xml.get(".number"); if(element.is_int()) { element.as_int()[number-1] = xml.get_value(); } else if(element.is_real()) { element.as_real()[number-1] = xml.get_value(); } else if(element.is_string()) { // FIXME: Orthanc does not split strings using backslash element.as_string()[number-1] = xml.get_value(); } // SQ is handled by parse_item // Binary is handled by parse_inline_binary else { throw Exception("Cannot parse "+as_string(element.vr)+" as Value"); } } void parse_bulk_data( boost::property_tree::ptree const & xml, Element & element) { try { element.as_string() = {xml.get(".uri")}; } catch(boost::property_tree::ptree_bad_path const &) { element.as_string() = {xml.get(".uuid")}; } } void parse_person_name( boost::property_tree::ptree const & xml, Element & element) { auto const number = xml.get(".number"); std::vector const representations = { "Alphabetic", "Ideographic", "Phonetic" }; std::vector names; for(auto const & representation: representations) { auto const representation_it = xml.find(representation); if(representation_it == xml.not_found()) { names.push_back(""); } else { std::vector name; static auto const components = { "FamilyName", "GivenName", "MiddleName", "NamePrefix", "NameSuffix"}; for(auto const & component: components) { auto const & component_it = representation_it->second.find(component); if(component_it == representation_it->second.not_found()) { name.push_back(""); } else { name.push_back(component_it->second.get_value()); } } while(!name.empty() && name.rbegin()->empty()) { name.pop_back(); } names.push_back(join(name.begin(), name.end(), "^")); } } while(!names.empty() && names.rbegin()->empty()) { names.pop_back(); } element.as_string()[number-1] = join(names.begin(), names.end(), "="); } void parse_attributes( boost::property_tree::ptree const & xml, std::shared_ptr data_set); void parse_item(boost::property_tree::ptree const & xml, Element & element) { auto data_set = std::make_shared(); parse_attributes(xml, data_set); auto const number = xml.get(".number"); element.as_data_set()[number-1] = data_set; } void parse_inline_binary( boost::property_tree::ptree const & xml, Element & element) { auto const & encoded = xml.get_value(); Value::Binary::value_type decoded; decoded.reserve(encoded.size()*3/4); base64::decode(encoded.begin(), encoded.end(), std::back_inserter(decoded)); element.as_binary() = { decoded }; } void parse_attributes( boost::property_tree::ptree const & xml, std::shared_ptr data_set) { auto const attributes = xml.equal_range("DicomAttribute"); for(auto attribute = attributes.first; attribute != attributes.second; ++attribute) { auto const & children = attribute->second; Tag const tag(children.get(".tag")); auto const vr = as_vr(children.get(".vr")); Element element(VR::UN); std::pair< boost::property_tree::ptree::const_assoc_iterator, boost::property_tree::ptree::const_assoc_iterator> range( children.not_found(), children.not_found()); std::function parser; boost::property_tree::ptree normalized; if(children.find("Value") != children.not_found()) { range = children.equal_range("Value"); if(vr != VR::LT && vr != VR::ST && vr != VR::UT) { // Some providers use a wrong representation where multi-valued // elements are joined using \\ instead of using multiple // elements. Be nice to them. bool must_normalize = false; for(auto it=range.first; it != range.second; ++it) { auto const value = it->second.get_value(); if(value.find("\\") != std::string::npos) { must_normalize = true; break; } } if(must_normalize) { int count=0; for(auto it=range.first; it != range.second; ++it) { auto const original_value = it->second.get_value(); std::vector values; split(original_value, "\\", std::back_inserter(values)); for(auto const & value: values) { boost::property_tree::ptree value_node; value_node.put(".number", 1+count); value_node.put_value(value); normalized.add_child("Value", value_node); ++count; } } range = normalized.equal_range("Value"); } // Otherwise, nothing to do: range is OK } // Otherwise, nothing to do: range is OK element = Element(vr); parser = parse_value; } else if(children.find("BulkData") != children.not_found()) { range = children.equal_range("BulkData"); element = Element(VR::UR); parser = parse_bulk_data; } else if(children.find("PersonName") != children.not_found()) { range = children.equal_range("PersonName"); element = Element(VR::PN); parser = parse_person_name; } else if(children.find("Item") != children.not_found()) { range = children.equal_range("Item"); element = Element(VR::SQ); parser = parse_item; } else if(children.find("InlineBinary") != children.not_found()) { range = children.equal_range("InlineBinary"); element = Element(vr); parser = parse_inline_binary; } else { element = Element(vr); parser = [](boost::property_tree::ptree const &, Element &) {}; } auto const size = range.first==children.not_found() ?0 :std::distance(range.first, range.second); if(element.is_int()) { element.as_int().resize(size); } else if(element.is_real()) { element.as_real().resize(size); } else if(element.is_string()) { element.as_string().resize(size); } else if(element.is_data_set()) { element.as_data_set().resize(size); } else if(element.is_binary()) { element.as_binary().resize(size); } else { throw Exception("Cannot resize "+as_string(vr)); } for(auto it = range.first; it != range.second; ++it) { parser(it->second, element); } data_set->add(tag, element); } } std::shared_ptr as_dataset(boost::property_tree::ptree const & xml) { if(xml.size() < 1 || xml.front().first != "NativeDicomModel") { throw Exception("Missing root node NativeDicomModel"); } auto data_set = std::make_shared(); auto const & root = xml.get_child("NativeDicomModel"); parse_attributes(root, data_set); return data_set; } } // namespace odil odil-0.11.0/src/odil/xml_converter.h000066400000000000000000000023071362244656000173100ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _61eb6ed2_447a_43b5_a6ba_ca7c2a5fb492 #define _61eb6ed2_447a_43b5_a6ba_ca7c2a5fb492 #include #include #include #include "odil/DataSet.h" #include "odil/odil.h" namespace odil { typedef std::function< std::pair( std::shared_ptr, Tag const &) > BulkDataCreator; /// @brief Convert a data set to its XML representation. ODIL_API boost::property_tree::ptree as_xml( std::shared_ptr data_set, BulkDataCreator const & bulk_data_creator={}); /// @brief Create a data set from its XML representation. ODIL_API std::shared_ptr as_dataset(boost::property_tree::ptree const & xml); } // namespace odil #endif // _61eb6ed2_447a_43b5_a6ba_ca7c2a5fb492 odil-0.11.0/tests/000077500000000000000000000000001362244656000136725ustar00rootroot00000000000000odil-0.11.0/tests/CMakeLists.txt000066400000000000000000000053021362244656000164320ustar00rootroot00000000000000find_package(Boost COMPONENTS unit_test_framework REQUIRED) find_package(DCMTK REQUIRED) find_package(JsonCpp REQUIRED) add_subdirectory(tools) file(GLOB headers *.h) file(GLOB_RECURSE tests code/*.cpp) if(NOT WITH_DCMTK) list( REMOVE_ITEM tests ${CMAKE_CURRENT_SOURCE_DIR}/code/conversion.cpp ${CMAKE_CURRENT_SOURCE_DIR}/code/DcmtkException.cpp ${CMAKE_CURRENT_SOURCE_DIR}/code/ElementAccessor.cpp) set( extra_files ${CMAKE_SOURCE_DIR}/src/odil/dcmtk/conversion.cpp ${CMAKE_SOURCE_DIR}/src/odil/dcmtk/ElementAccessor.cpp ${CMAKE_SOURCE_DIR}/src/odil/dcmtk/ElementTraits.cpp ${CMAKE_SOURCE_DIR}/src/odil/dcmtk/Exception.cpp) endif() include_directories( ${CMAKE_SOURCE_DIR}/src ${Boost_INCLUDE_DIRS} ${DCMTK_INCLUDE_DIRS} ${JsonCpp_INCLUDE_DIRS}) add_definitions( ${DCMTK_DEFINITIONS} -D ODIL_MAJOR_VERSION=${odil_MAJOR_VERSION} ) if(BUILD_SHARED_LIBS) add_definitions(-D BOOST_ALL_DYN_LINK) endif() link_directories(${Boost_LIBRARY_DIRS} ${DCMTK_LIBRARY_DIRS}) foreach(test_file ${tests}) get_filename_component(unit ${test_file} NAME_WE) get_filename_component(module ${test_file} PATH) get_filename_component(module ${module} NAME) if(NOT "${module}" STREQUAL "code") set(test "${module}_${unit}") else() set(test "${unit}") endif() add_executable(test_${test} ${test_file} ${headers} ${extra_files}) target_link_libraries( test_${test} libodil ${Boost_LIBRARIES} ${DCMTK_LIBRARIES}) if(WIN32) target_link_libraries(test_${test} Ws2_32) endif() set_target_properties(test_${test} PROPERTIES OUTPUT_NAME ${test} FOLDER "Tests") file(READ ${test_file} content) set(pattern "BOOST_(AUTO|FIXTURE)_TEST_CASE\\(([^),]+)") string(REGEX MATCHALL ${pattern} cases ${content}) foreach(case ${cases}) string(REGEX REPLACE ${pattern} "\\2" case ${case}) if(NOT ${case} MATCHES "##") add_test("${test}_${case}" "${test}" "--run_test=${case}") endif() endforeach() set(pattern "ElementTest\\([\n ]+([A-Z]+)") string(REGEX MATCHALL ${pattern} matches ${content}) foreach(match ${matches}) string(REGEX REPLACE ${pattern} "\\1" vr ${match}) set(case "${vr}FromOdil") add_test("${test}_${case}" "${test}" "--run_test=${case}") set(case "${vr}ToOdil") add_test("${test}_${case}" "${test}" "--run_test=${case}") endforeach() endforeach() file(GLOB_RECURSE python_tests *.py) add_custom_target(Runner ${CMAKE_COMMAND} -E echo "Test runner" SOURCES run) add_custom_target( PythonTests ${CMAKE_COMMAND} -E echo "Python tests" SOURCES ${python_tests}) odil-0.11.0/tests/MessageFixtureBase.h000066400000000000000000000040761362244656000176000ustar00rootroot00000000000000#ifndef _779c46d6_b6ea_443a_9642_f1ec5b87d4b3 #define _779c46d6_b6ea_443a_9642_f1ec5b87d4b3 #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/message/Message.h" /// @brief Base class for fixtures of Message-derived classes. template struct MessageFixtureBase { /// @brief Check that a specific message can be constructed from a generic Message. void check_message_constructor(std::shared_ptr command_set) { auto generic_message = std::make_shared(command_set); TMessage const message(generic_message); this->check(message); } /// @brief Check that a specific message can be constructed from a generic Message. void check_message_constructor( std::shared_ptr command_set, std::shared_ptr data_set) { auto generic_message = std::make_shared( command_set, data_set); TMessage const message(generic_message); this->check(message); } /// @brief Check that a specific message cannot be constructed from a generic Message. void check_message_constructor_throw( std::shared_ptr command_set) { auto const generic_message = std::make_shared(command_set); BOOST_CHECK_THROW( TMessage const message(generic_message), odil::Exception); } /// @brief Check that a specific message cannot be constructed from a generic Message. void check_message_constructor_throw( std::shared_ptr command_set, std::shared_ptr data_set) { auto const generic_message = std::make_shared(command_set, data_set); BOOST_CHECK_THROW( TMessage const message(generic_message), odil::Exception); } /// @brief Check that the specific message attributes are set correctly virtual void check(TMessage const & message) =0; }; #endif // _779c46d6_b6ea_443a_9642_f1ec5b87d4b3 odil-0.11.0/tests/PeerFixtureBase.h000066400000000000000000000032701362244656000171020ustar00rootroot00000000000000#ifndef _b21e8d37_0125_4d64_84aa_f91d9d96612b #define _b21e8d37_0125_4d64_84aa_f91d9d96612b #include #include #include #include #include #include "odil/Association.h" #include "odil/AssociationParameters.h" /// @brief Base class for fixtures of requiring a working association. class PeerFixtureBase { public: typedef odil::AssociationParameters::PresentationContext PresentationContext; odil::Association association; PeerFixtureBase(std::vector const & contexts) { this->association.set_peer_host( this->get_environment_variable("ODIL_PEER_HOST_NAME")); this->association.set_peer_port( this->get_environment_variable("ODIL_PEER_PORT")); this->association.update_parameters() .set_calling_ae_title( this->get_environment_variable("ODIL_OWN_AET")) .set_called_ae_title( this->get_environment_variable("ODIL_PEER_AET")) .set_presentation_contexts(contexts); this->association.associate(); } ~PeerFixtureBase() { this->association.release(); } static std::string get_environment_variable(std::string const & name) { char* value = getenv(name.c_str()); if(value == NULL) { BOOST_FAIL(name + " is not defined"); } return value; } template static T get_environment_variable(std::string const & name) { return boost::lexical_cast( PeerFixtureBase::get_environment_variable(name)); } }; #endif // _b21e8d37_0125_4d64_84aa_f91d9d96612b odil-0.11.0/tests/code/000077500000000000000000000000001362244656000146045ustar00rootroot00000000000000odil-0.11.0/tests/code/Association.cpp000066400000000000000000000063071362244656000175720ustar00rootroot00000000000000#define BOOST_TEST_MODULE Association #include #include #include "odil/Association.h" #include "odil/Exception.h" #include "odil/registry.h" #include "../PeerFixtureBase.h" BOOST_AUTO_TEST_CASE(DefaultConstructor) { odil::Association association; BOOST_CHECK_EQUAL(association.get_peer_host(), ""); BOOST_CHECK_EQUAL(association.get_peer_port(), 104); BOOST_CHECK( association.get_parameters() == odil::AssociationParameters() ); BOOST_CHECK(!association.is_associated()); } BOOST_AUTO_TEST_CASE(CopyConstructor) { odil::Association association; association.set_peer_host("pacs.example.com"); association.set_peer_port(11112); association.update_parameters() .set_called_ae_title("remote") .set_user_identity_to_username_and_password("foo", "bar"); odil::Association const other(association); BOOST_CHECK_EQUAL(other.get_peer_host(), association.get_peer_host()); BOOST_CHECK_EQUAL(other.get_peer_port(), association.get_peer_port()); BOOST_CHECK( association.get_parameters() == other.get_parameters() ); } BOOST_AUTO_TEST_CASE(Assignment) { odil::Association association; association.set_peer_host("pacs.example.com"); association.set_peer_port(11112); association.update_parameters() .set_called_ae_title("remote") .set_user_identity_to_username_and_password("foo", "bar"); odil::Association other; other = association; BOOST_CHECK_EQUAL(other.get_peer_host(), association.get_peer_host()); BOOST_CHECK_EQUAL(other.get_peer_port(), association.get_peer_port()); BOOST_CHECK( association.get_parameters() == other.get_parameters() ); } BOOST_AUTO_TEST_CASE(PeerHostName) { odil::Association association; association.set_peer_host("pacs.example.com"); BOOST_CHECK_EQUAL(association.get_peer_host(), "pacs.example.com"); } BOOST_AUTO_TEST_CASE(PeerPort) { odil::Association association; association.set_peer_port(11112); BOOST_CHECK_EQUAL(association.get_peer_port(), 11112); } BOOST_AUTO_TEST_CASE(AssociationParameters) { odil::Association association; odil::AssociationParameters parameters; parameters.set_calling_ae_title("foo"); association.set_parameters(parameters); BOOST_REQUIRE(association.get_parameters() == parameters); } BOOST_AUTO_TEST_CASE(Associate) { PeerFixtureBase fixture({ { 1, odil::registry::VerificationSOPClass, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCU } }); BOOST_CHECK_THROW( fixture.association.set_peer_host("foo"), odil::Exception); BOOST_CHECK_THROW( fixture.association.set_peer_port(1234), odil::Exception); BOOST_CHECK_THROW( fixture.association.update_parameters().set_maximum_length(123), odil::Exception); } BOOST_AUTO_TEST_CASE(Release) { odil::Association association; BOOST_CHECK_THROW(association.release(), odil::Exception); } BOOST_AUTO_TEST_CASE(Abort) { odil::Association association; BOOST_CHECK_THROW(association.abort(2, 4), odil::Exception); } odil-0.11.0/tests/code/AssociationAcceptor.cpp000066400000000000000000000006651362244656000212540ustar00rootroot00000000000000#define BOOST_TEST_MODULE AssociationAcceptor #include #include "odil/AssociationAcceptor.h" BOOST_AUTO_TEST_CASE(AssociationRejected) { odil::AssociationRejected const exception(1, 2, 3, "foo"); BOOST_REQUIRE_EQUAL(exception.get_result(), 1); BOOST_REQUIRE_EQUAL(exception.get_source(), 2); BOOST_REQUIRE_EQUAL(exception.get_reason(), 3); BOOST_REQUIRE_EQUAL(exception.what(), "foo"); } odil-0.11.0/tests/code/AssociationParameters.cpp000066400000000000000000000246661362244656000216260ustar00rootroot00000000000000#define BOOST_TEST_MODULE AssociationParameters #include #include "odil/AssociationParameters.h" #include "odil/Exception.h" BOOST_AUTO_TEST_CASE(Constructor) { odil::AssociationParameters const parameters; BOOST_REQUIRE_EQUAL(parameters.get_called_ae_title(), ""); BOOST_REQUIRE_EQUAL(parameters.get_calling_ae_title(), ""); BOOST_REQUIRE(parameters.get_presentation_contexts().empty()); BOOST_REQUIRE( parameters.get_user_identity().type == odil::AssociationParameters::UserIdentity::Type::None); BOOST_REQUIRE(parameters.get_user_identity().primary_field.empty()); BOOST_REQUIRE(parameters.get_user_identity().secondary_field.empty()); BOOST_REQUIRE_EQUAL(parameters.get_maximum_length(), 16384); BOOST_REQUIRE_EQUAL(parameters.get_maximum_number_operations_invoked(), 1); BOOST_REQUIRE_EQUAL(parameters.get_maximum_number_operations_performed(), 1); } BOOST_AUTO_TEST_CASE(CalledAETITLE) { odil::AssociationParameters parameters; parameters.set_called_ae_title("foo"); BOOST_REQUIRE_EQUAL(parameters.get_called_ae_title(), "foo"); } BOOST_AUTO_TEST_CASE(CalledAETITLETooLong) { odil::AssociationParameters parameters; BOOST_REQUIRE_THROW( parameters.set_called_ae_title("0123456789abcdefTOO_LONG"), odil::Exception); } BOOST_AUTO_TEST_CASE(CallingAETITLE) { odil::AssociationParameters parameters; parameters.set_calling_ae_title("foo"); BOOST_REQUIRE_EQUAL(parameters.get_calling_ae_title(), "foo"); } BOOST_AUTO_TEST_CASE(CallingAETITLETooLong) { odil::AssociationParameters parameters; BOOST_REQUIRE_THROW( parameters.set_calling_ae_title("0123456789abcdefTOO_LONG"), odil::Exception); } BOOST_AUTO_TEST_CASE(PresentationContexts) { odil::AssociationParameters parameters; parameters.set_presentation_contexts({ { 1, "abstract1", { "transfer1", "transfer2" }, odil::AssociationParameters::PresentationContext::Role::SCU }, { 3, "abstract2", { "transfer3" }, odil::AssociationParameters::PresentationContext::Role::SCP } }); BOOST_REQUIRE_EQUAL(parameters.get_presentation_contexts().size(), 2); BOOST_REQUIRE_EQUAL(parameters.get_presentation_contexts()[0].id, 1); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[0].abstract_syntax, "abstract1"); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[0].transfer_syntaxes.size(), 2); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[0].transfer_syntaxes[0], "transfer1"); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[0].transfer_syntaxes[1], "transfer2"); BOOST_REQUIRE( parameters.get_presentation_contexts()[0].role == odil::AssociationParameters::PresentationContext::Role::SCU); BOOST_REQUIRE_EQUAL(parameters.get_presentation_contexts()[1].id, 3); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[1].abstract_syntax, "abstract2"); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[1].transfer_syntaxes.size(), 1); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[1].transfer_syntaxes[0], "transfer3"); BOOST_REQUIRE( parameters.get_presentation_contexts()[1].role == odil::AssociationParameters::PresentationContext::Role::SCP); } BOOST_AUTO_TEST_CASE(SimplifiedPresentationContexts) { odil::AssociationParameters parameters; parameters.set_presentation_contexts({ { 1, "abstract1", { "transfer1", "transfer2" }, odil::AssociationParameters::PresentationContext::Role::SCU}, { "abstract2", { "transfer3", "transfer4" }, odil::AssociationParameters::PresentationContext::Role::SCU }, { 3, "abstract3", { "transfer4" }, odil::AssociationParameters::PresentationContext::Role::SCP } }); BOOST_REQUIRE_EQUAL(parameters.get_presentation_contexts().size(), 3); BOOST_REQUIRE_EQUAL(parameters.get_presentation_contexts()[0].id, 1); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[0].abstract_syntax, "abstract1"); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[0].transfer_syntaxes.size(), 2); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[0].transfer_syntaxes[0], "transfer1"); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[0].transfer_syntaxes[1], "transfer2"); BOOST_REQUIRE( parameters.get_presentation_contexts()[0].role == odil::AssociationParameters::PresentationContext::Role::SCU); // Do not check ID BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[1].abstract_syntax, "abstract2"); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[1].transfer_syntaxes.size(), 2); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[1].transfer_syntaxes[0], "transfer3"); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[1].transfer_syntaxes[1], "transfer4"); BOOST_REQUIRE( parameters.get_presentation_contexts()[1].role == odil::AssociationParameters::PresentationContext::Role::SCU); BOOST_REQUIRE_EQUAL(parameters.get_presentation_contexts()[2].id, 3); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[2].abstract_syntax, "abstract3"); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[2].transfer_syntaxes.size(), 1); BOOST_REQUIRE_EQUAL( parameters.get_presentation_contexts()[2].transfer_syntaxes[0], "transfer4"); BOOST_REQUIRE( parameters.get_presentation_contexts()[2].role == odil::AssociationParameters::PresentationContext::Role::SCP); } BOOST_AUTO_TEST_CASE(UserIdentityDefault) { odil::AssociationParameters parameters; BOOST_REQUIRE( parameters.get_user_identity().type == odil::AssociationParameters::UserIdentity::Type::None); BOOST_REQUIRE(parameters.get_user_identity().primary_field.empty()); BOOST_REQUIRE(parameters.get_user_identity().secondary_field.empty()); } BOOST_AUTO_TEST_CASE(UserIdentityNone) { odil::AssociationParameters parameters; parameters.set_user_identity_to_username_and_password("foo", "bar"); parameters.set_user_identity_to_none(); BOOST_REQUIRE( parameters.get_user_identity().type == odil::AssociationParameters::UserIdentity::Type::None); BOOST_REQUIRE(parameters.get_user_identity().primary_field.empty()); BOOST_REQUIRE(parameters.get_user_identity().secondary_field.empty()); } BOOST_AUTO_TEST_CASE(UserIdentityUsername) { odil::AssociationParameters parameters; parameters.set_user_identity_to_username("foo"); BOOST_REQUIRE( parameters.get_user_identity().type == odil::AssociationParameters::UserIdentity::Type::Username); BOOST_REQUIRE_EQUAL(parameters.get_user_identity().primary_field, "foo"); BOOST_REQUIRE(parameters.get_user_identity().secondary_field.empty()); } BOOST_AUTO_TEST_CASE(UserIdentityUsernameAndPassword) { odil::AssociationParameters parameters; parameters.set_user_identity_to_username_and_password("foo", "bar"); BOOST_REQUIRE( parameters.get_user_identity().type == odil::AssociationParameters::UserIdentity::Type::UsernameAndPassword); BOOST_REQUIRE_EQUAL(parameters.get_user_identity().primary_field, "foo"); BOOST_REQUIRE_EQUAL(parameters.get_user_identity().secondary_field, "bar"); } BOOST_AUTO_TEST_CASE(UserIdentityKerberos) { odil::AssociationParameters parameters; parameters.set_user_identity_to_kerberos("foo"); BOOST_REQUIRE( parameters.get_user_identity().type == odil::AssociationParameters::UserIdentity::Type::Kerberos); BOOST_REQUIRE_EQUAL(parameters.get_user_identity().primary_field, "foo"); BOOST_REQUIRE(parameters.get_user_identity().secondary_field.empty()); } BOOST_AUTO_TEST_CASE(UserIdentitySAML) { odil::AssociationParameters parameters; parameters.set_user_identity_to_saml("foo"); BOOST_REQUIRE( parameters.get_user_identity().type == odil::AssociationParameters::UserIdentity::Type::SAML); BOOST_REQUIRE_EQUAL(parameters.get_user_identity().primary_field, "foo"); BOOST_REQUIRE(parameters.get_user_identity().secondary_field.empty()); } BOOST_AUTO_TEST_CASE(MaximumLength) { odil::AssociationParameters parameters; parameters.set_maximum_length(0x12345678); BOOST_REQUIRE_EQUAL(parameters.get_maximum_length(), 0x12345678); } BOOST_AUTO_TEST_CASE(MaximumNumberOperationsInvoked) { odil::AssociationParameters parameters; parameters.set_maximum_number_operations_invoked(12); BOOST_REQUIRE_EQUAL(parameters.get_maximum_number_operations_invoked(), 12); } BOOST_AUTO_TEST_CASE(MaximumNumberOperationsPerformed) { odil::AssociationParameters parameters; parameters.set_maximum_number_operations_performed(12); BOOST_REQUIRE_EQUAL(parameters.get_maximum_number_operations_performed(), 12); } BOOST_AUTO_TEST_CASE(ChainedSetters) { odil::AssociationParameters parameters; parameters .set_called_ae_title("called") .set_calling_ae_title("calling") .set_presentation_contexts({ { "abstract", { "transfer" }, odil::AssociationParameters::PresentationContext::Role::Both } }) .set_user_identity_to_username_and_password("foo", "bar") .set_maximum_length(0x12345678) .set_maximum_number_operations_invoked(12) .set_maximum_number_operations_performed(34); BOOST_REQUIRE_EQUAL(parameters.get_called_ae_title(), "called"); BOOST_REQUIRE_EQUAL(parameters.get_calling_ae_title(), "calling"); BOOST_REQUIRE_EQUAL(parameters.get_presentation_contexts().size(), 1); BOOST_REQUIRE( parameters.get_user_identity().type == odil::AssociationParameters::UserIdentity::Type::UsernameAndPassword); BOOST_REQUIRE_EQUAL(parameters.get_user_identity().primary_field, "foo"); BOOST_REQUIRE_EQUAL(parameters.get_user_identity().secondary_field, "bar"); BOOST_REQUIRE_EQUAL(parameters.get_maximum_length(), 0x12345678); BOOST_REQUIRE_EQUAL(parameters.get_maximum_number_operations_invoked(), 12); BOOST_REQUIRE_EQUAL(parameters.get_maximum_number_operations_performed(), 34); } odil-0.11.0/tests/code/BasicDirectoryCreator.cpp000066400000000000000000000133521362244656000215420ustar00rootroot00000000000000#define BOOST_TEST_MODULE BasicDirectoryCreator #include #include #include "odil/BasicDirectoryCreator.h" #include "odil/json_converter.h" #include "odil/Reader.h" #include "odil/registry.h" #include "odil/Writer.h" #include #include BOOST_AUTO_TEST_CASE(DefaultConstructor) { odil::BasicDirectoryCreator const creator; BOOST_REQUIRE_EQUAL(creator.root.empty(), true); BOOST_REQUIRE_EQUAL(creator.files.empty(), true); BOOST_REQUIRE_EQUAL(creator.extra_record_keys.empty(), true); BOOST_REQUIRE( creator.item_encoding == odil::Writer::ItemEncoding::ExplicitLength); } BOOST_AUTO_TEST_CASE(Constructor) { odil::BasicDirectoryCreator::RecordKeyMap const extra_records( { { "PATIENT", { {odil::registry::PatientBirthDate, 1}, {odil::registry::OtherPatientIDs, 3}, } } }); odil::BasicDirectoryCreator const creator( "root", {"a.dcm", "b.dcm"}, extra_records, odil::Writer::ItemEncoding::UndefinedLength); BOOST_REQUIRE_EQUAL(creator.root, "root"); BOOST_REQUIRE( creator.files == std::vector({"a.dcm", "b.dcm"})); BOOST_REQUIRE( creator.extra_record_keys == extra_records); BOOST_REQUIRE( creator.item_encoding == odil::Writer::ItemEncoding::UndefinedLength); } BOOST_AUTO_TEST_CASE(BasicDirectory) { { auto data_set = std::make_shared(); data_set->add("PatientID", {"DJ123"}); data_set->add("StudyDate", {"19100110"}); data_set->add("StudyTime", {"1234"}); data_set->add("StudyDescription", {"Study"}); data_set->add("StudyInstanceUID", {"1.2.3.4"}); data_set->add("StudyID", {"FOO"}); data_set->add("Modality", {"OT"}); data_set->add("SeriesInstanceUID", {"1.2.3.4.1"}); data_set->add("SeriesNumber", {1}); data_set->add("SeriesDescription", {"Series"}); data_set->add("InstanceNumber", {1}); data_set->add("SOPInstanceUID", {"1.2.3.4.1.1"}); data_set->add("SOPClassUID", {odil::registry::RawDataStorage}); std::ofstream stream( "a.dcm", std::ofstream::out | std::ofstream::binary); odil::Writer::write_file(data_set, stream); } { auto data_set = std::make_shared(); data_set->add("PatientID", {"DJ123"}); data_set->add("StudyDate", {"19100110"}); data_set->add("StudyTime", {"1234"}); data_set->add("StudyDescription", {"Study"}); data_set->add("StudyInstanceUID", {"1.2.3.4"}); data_set->add("StudyID", {"FOO"}); data_set->add("Modality", {"OT"}); data_set->add("SeriesInstanceUID", {"1.2.3.4.1"}); data_set->add("SeriesNumber", {1}); data_set->add("SeriesDescription", {"Series"}); data_set->add("InstanceNumber", {2}); data_set->add("SOPInstanceUID", {"1.2.3.4.1.2"}); data_set->add("SOPClassUID", {odil::registry::RawDataStorage}); std::ofstream stream( "b.dcm", std::ofstream::out | std::ofstream::binary); odil::Writer::write_file(data_set, stream); } odil::BasicDirectoryCreator::RecordKeyMap const extra_records( { { "SERIES", { {odil::registry::SeriesDescription, 1} } } }); odil::BasicDirectoryCreator const creator( ".", {"a.dcm", "b.dcm"}, extra_records); creator(); boost::filesystem::ifstream stream( boost::filesystem::path(".")/"DICOMDIR", boost::filesystem::ifstream::in | boost::filesystem::ifstream::binary); auto const dicomdir_and_header = odil::Reader::read_file(stream); stream.close(); BOOST_REQUIRE( dicomdir_and_header.first->as_string("MediaStorageSOPClassUID") == odil::Value::Strings({odil::registry::MediaStorageDirectoryStorage})); BOOST_REQUIRE( dicomdir_and_header.first->as_string("TransferSyntaxUID") == odil::Value::Strings({odil::registry::ExplicitVRLittleEndian})); auto const & records = dicomdir_and_header.second->as_data_set("DirectoryRecordSequence"); BOOST_REQUIRE_EQUAL(records.size(), 5); BOOST_REQUIRE( records[0]->as_string("DirectoryRecordType") == odil::Value::Strings({"PATIENT"})); BOOST_REQUIRE( records[0]->as_string("PatientID") == odil::Value::Strings({"DJ123"})); BOOST_REQUIRE( records[1]->as_string("DirectoryRecordType") == odil::Value::Strings({"STUDY"})); BOOST_REQUIRE( records[1]->as_string("StudyInstanceUID") == odil::Value::Strings({"1.2.3.4"})); BOOST_REQUIRE( records[1]->as_string("StudyDescription") == odil::Value::Strings({"Study"})); BOOST_REQUIRE( records[2]->as_string("DirectoryRecordType") == odil::Value::Strings({"SERIES"})); BOOST_REQUIRE( records[2]->as_string("SeriesInstanceUID") == odil::Value::Strings({"1.2.3.4.1"})); BOOST_REQUIRE( records[2]->as_string("SeriesDescription") == odil::Value::Strings({"Series"})); BOOST_REQUIRE( records[3]->as_string("DirectoryRecordType") == odil::Value::Strings({"IMAGE"})); BOOST_REQUIRE( records[3]->as_int("InstanceNumber") == odil::Value::Integers({1})); BOOST_REQUIRE( records[4]->as_string("DirectoryRecordType") == odil::Value::Strings({"IMAGE"})); BOOST_REQUIRE( records[4]->as_int("InstanceNumber") == odil::Value::Integers({2})); boost::filesystem::remove("a.dcm"); boost::filesystem::remove("b.dcm"); boost::filesystem::remove("DICOMDIR"); } odil-0.11.0/tests/code/DataSet.cpp000066400000000000000000000331551362244656000166440ustar00rootroot00000000000000#define BOOST_TEST_MODULE DataSet #include #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/Tag.h" #include "odil/VR.h" #include "odil/registry.h" BOOST_AUTO_TEST_CASE(Empty) { odil::DataSet dataset; BOOST_CHECK(dataset.empty()); BOOST_CHECK_EQUAL(dataset.size(), 0); BOOST_CHECK(!dataset.has(odil::Tag("PatientName"))); BOOST_CHECK(dataset.get_transfer_syntax().empty()); } BOOST_AUTO_TEST_CASE(TransferSyntaxConstructor) { odil::DataSet dataset(odil::registry::ExplicitVRLittleEndian); BOOST_CHECK_EQUAL( dataset.get_transfer_syntax(), odil::registry::ExplicitVRLittleEndian); } BOOST_AUTO_TEST_CASE(TransferSyntax) { odil::DataSet dataset; dataset.set_transfer_syntax(odil::registry::ExplicitVRLittleEndian); BOOST_CHECK_EQUAL( dataset.get_transfer_syntax(), odil::registry::ExplicitVRLittleEndian); } BOOST_AUTO_TEST_CASE(AddExplicitVR) { odil::Tag const tag("PatientName"); odil::DataSet dataset; dataset.add(tag, odil::VR::PN); BOOST_CHECK(!dataset.empty()); BOOST_CHECK_EQUAL(dataset.size(), 1); BOOST_CHECK(dataset.has(tag)); BOOST_CHECK(dataset.get_vr(tag) == odil::VR::PN); } BOOST_AUTO_TEST_CASE(AddImplicitVR) { odil::Tag const tag("PatientName"); odil::DataSet dataset; dataset.add(tag); BOOST_CHECK(!dataset.empty()); BOOST_CHECK_EQUAL(dataset.size(), 1); BOOST_CHECK(dataset.has(tag)); BOOST_CHECK(dataset.get_vr(tag) == odil::VR::PN); } BOOST_AUTO_TEST_CASE(AddValueExplicitVR) { odil::Tag const tag("PatientName"); odil::DataSet dataset; dataset.add(tag, { "Doe^John"}, odil::VR::PN); BOOST_CHECK(!dataset.empty()); BOOST_CHECK_EQUAL(dataset.size(), 1); BOOST_CHECK(dataset.has(tag)); BOOST_CHECK(dataset.get_vr(tag) == odil::VR::PN); BOOST_CHECK(dataset.as_string(tag) == odil::Value::Strings({ "Doe^John" })); } BOOST_AUTO_TEST_CASE(AddValueImplicitVR) { odil::Tag const tag("PatientName"); odil::DataSet dataset; dataset.add(tag, { "Doe^John"}); BOOST_CHECK(!dataset.empty()); BOOST_CHECK_EQUAL(dataset.size(), 1); BOOST_CHECK(dataset.has(tag)); BOOST_CHECK(dataset.get_vr(tag) == odil::VR::PN); BOOST_CHECK(dataset.as_string(tag) == odil::Value::Strings({ "Doe^John" })); } BOOST_AUTO_TEST_CASE(AddInvalidTag) { odil::Tag const tag(0xdead, 0xbeef); odil::DataSet dataset; BOOST_CHECK_THROW(dataset.add(tag), odil::Exception); } template void test_element_value( odil::DataSet const & data_set, odil::Tag const & tag, TContainer const & contents, bool (odil::DataSet::*type_check)(odil::Tag const &) const, TContainer const & (odil::DataSet::*getter)(odil::Tag const &) const, typename TContainer::value_type const & (odil::DataSet::*getter_pos)(odil::Tag const &, unsigned int) const) { BOOST_CHECK(data_set.has(tag)); BOOST_CHECK_EQUAL(data_set.empty(tag), contents.empty()); BOOST_CHECK_EQUAL(data_set.size(tag), contents.size()); BOOST_CHECK((data_set.*type_check)(tag)); BOOST_CHECK((data_set.*getter)(tag) == contents); for(int i=0; i void test_implicit_container( odil::Tag const & tag, bool (odil::DataSet::*type_check)(odil::Tag const &) const, TContainer const & (odil::DataSet::*getter)(odil::Tag const &) const, typename TContainer::value_type const & (odil::DataSet::*getter_pos)(odil::Tag const &, unsigned int) const) { odil::DataSet data_set; data_set.add(tag); test_element_value(data_set, tag, TContainer(), type_check, getter, getter_pos); } template void test_implicit_container( odil::Tag const & tag, odil::VR const & vr, bool (odil::DataSet::*type_check)(odil::Tag const &) const, TContainer const & (odil::DataSet::*getter)(odil::Tag const &) const, typename TContainer::value_type const & (odil::DataSet::*getter_pos)(odil::Tag const &, unsigned int) const) { odil::DataSet data_set; data_set.add(tag, vr); test_element_value(data_set, tag, TContainer(), type_check, getter, getter_pos); } template void test_container( odil::Tag const & tag, TContainer const & contents, bool (odil::DataSet::*type_check)(odil::Tag const &) const, TContainer const & (odil::DataSet::*getter)(odil::Tag const &) const, typename TContainer::value_type const & (odil::DataSet::*getter_pos)(odil::Tag const &, unsigned int) const) { odil::DataSet data_set; data_set.add(tag, contents); test_element_value(data_set, tag, contents, type_check, getter, getter_pos); auto contents_copy(contents); odil::DataSet other_data_set; other_data_set.add(tag, std::move(contents_copy)); BOOST_CHECK(contents_copy.empty()); } template void test_container( odil::Tag const & tag, TContainer const & contents, odil::VR const & vr, bool (odil::DataSet::*type_check)(odil::Tag const &) const, TContainer const & (odil::DataSet::*getter)(odil::Tag const &) const, typename TContainer::value_type const & (odil::DataSet::*getter_pos)(odil::Tag const &, unsigned int) const) { odil::DataSet data_set; data_set.add(tag, contents, vr); test_element_value(data_set, tag, contents, type_check, getter, getter_pos); auto contents_copy(contents); odil::DataSet other_data_set; other_data_set.add(tag, std::move(contents_copy)); BOOST_CHECK(contents_copy.empty()); } template void test_initializer_list( odil::Tag const & tag, std::initializer_list const & contents, bool (odil::DataSet::*type_check)(odil::Tag const &) const, TContainer const & (odil::DataSet::*getter)(odil::Tag const &) const, typename TContainer::value_type const & (odil::DataSet::*getter_pos)(odil::Tag const &, unsigned int) const) { odil::DataSet data_set; data_set.add(tag, contents); test_element_value(data_set, tag, TContainer(contents), type_check, getter, getter_pos); } template void test_initializer_list( odil::Tag const & tag, std::initializer_list const & contents, odil::VR const & vr, bool (odil::DataSet::*type_check)(odil::Tag const &) const, TContainer const & (odil::DataSet::*getter)(odil::Tag const &) const, typename TContainer::value_type const & (odil::DataSet::*getter_pos)(odil::Tag const &, unsigned int) const) { odil::DataSet data_set; data_set.add(tag, contents, vr); test_element_value(data_set, tag, TContainer(contents), type_check, getter, getter_pos); } template void test_modify( odil::Tag const & tag, TContainer const & contents, TContainer const & (odil::DataSet::*getter)(odil::Tag const &) const, TContainer & (odil::DataSet::*setter)(odil::Tag const &)) { odil::DataSet data_set; data_set.add(tag, {contents[0]}); (data_set.*setter)(tag).push_back(contents[1]); BOOST_CHECK((data_set.*getter)(tag) == contents); } template void test_clear( odil::Tag const & tag, TContainer const & contents, bool (odil::DataSet::*type_check)(odil::Tag const &) const) { odil::DataSet data_set; data_set.add(tag, contents); data_set.clear(tag); BOOST_CHECK((data_set.*type_check)(tag)); BOOST_CHECK(data_set.empty(tag)); } template void test_element( odil::Tag const & tag, std::initializer_list const & contents, odil::VR const & vr, bool (odil::DataSet::*type_check)(odil::Tag const &) const, TContainer const & (odil::DataSet::*getter)(odil::Tag const &) const, typename TContainer::value_type const & (odil::DataSet::*getter_pos)(odil::Tag const &, unsigned int) const, TContainer & (odil::DataSet::*setter)(odil::Tag const &)) { test_implicit_container(tag, type_check, getter, getter_pos); test_implicit_container(tag, vr, type_check, getter, getter_pos); TContainer const container(contents); test_container(tag, container, type_check, getter, getter_pos); test_container(tag, container, vr, type_check, getter, getter_pos); test_initializer_list(tag, contents, type_check, getter, getter_pos); test_initializer_list(tag, contents, vr, type_check, getter, getter_pos); test_modify(tag, container, getter, setter); test_clear(tag, container, type_check); } BOOST_AUTO_TEST_CASE(Int) { odil::DataSet data_set; data_set.add(odil::registry::Rows, {1234, 5678}); data_set.is_int(odil::registry::Rows); test_element( odil::registry::Rows, {1234, 5678}, odil::VR::US, &odil::DataSet::is_int, &odil::DataSet::as_int, &odil::DataSet::as_int, &odil::DataSet::as_int); } BOOST_AUTO_TEST_CASE(Real) { odil::DataSet data_set; data_set.add(odil::registry::SpacingBetweenSlices, {12.34, 56.78}); data_set.is_int(odil::registry::SpacingBetweenSlices); test_element( odil::registry::SpacingBetweenSlices, {12.34, 56.78}, odil::VR::FL, &odil::DataSet::is_real, &odil::DataSet::as_real, &odil::DataSet::as_real, &odil::DataSet::as_real); } BOOST_AUTO_TEST_CASE(String) { odil::DataSet data_set; data_set.add(odil::registry::PatientID, {"foo", "bar"}); data_set.is_int(odil::registry::PatientID); test_element( odil::registry::PatientID, {"foo", "bar"}, odil::VR::LT, &odil::DataSet::is_string, &odil::DataSet::as_string, &odil::DataSet::as_string, &odil::DataSet::as_string); } BOOST_AUTO_TEST_CASE(DataSets) { auto data_set_1 = std::make_shared(); data_set_1->add("PatientID", {"DJ1234"}); auto data_set_2 = std::make_shared(); data_set_2->add("EchoTime", {100}); odil::DataSet data_set; data_set.add( odil::registry::ReferencedStudySequence, {data_set_1, data_set_2}); data_set.is_int(odil::registry::ReferencedStudySequence); test_element( odil::registry::ReferencedStudySequence, {data_set_1, data_set_2}, odil::VR::SQ, &odil::DataSet::is_data_set, &odil::DataSet::as_data_set, &odil::DataSet::as_data_set, &odil::DataSet::as_data_set); } BOOST_AUTO_TEST_CASE(Binary) { odil::DataSet data_set; data_set.add(odil::registry::BadPixelImage, {{0x1, 0x2}, {0x3}}); data_set.is_int(odil::registry::BadPixelImage); test_element( odil::registry::BadPixelImage, {{0x1, 0x2}, {0x3}}, odil::VR::OB, &odil::DataSet::is_binary, &odil::DataSet::as_binary, &odil::DataSet::as_binary, &odil::DataSet::as_binary); } BOOST_AUTO_TEST_CASE(ElementAccessor) { odil::Tag const tag("PatientID"); odil::DataSet dataset; dataset.add(tag, {"Foo^Bar"}); BOOST_REQUIRE( dataset[tag].as_string() == odil::Value::Strings({"Foo^Bar"})); BOOST_REQUIRE_THROW( dataset[odil::registry::PatientName], odil::Exception); } BOOST_AUTO_TEST_CASE(GetVRMissing) { odil::Tag const tag("PatientID"); odil::DataSet dataset; BOOST_CHECK_THROW(dataset.get_vr(tag), odil::Exception); } BOOST_AUTO_TEST_CASE(EmptyMissing) { odil::Tag const tag("PatientID"); odil::DataSet dataset; BOOST_CHECK_THROW(dataset.empty(tag), odil::Exception); } BOOST_AUTO_TEST_CASE(SizeMissing) { odil::Tag const tag("PatientID"); odil::DataSet dataset; BOOST_CHECK_THROW(dataset.size(tag), odil::Exception); } BOOST_AUTO_TEST_CASE(ClearMissing) { odil::Tag const tag("PatientID"); odil::DataSet dataset; BOOST_CHECK_THROW(dataset.clear(tag), odil::Exception); } BOOST_AUTO_TEST_CASE(Remove) { odil::Tag const tag("PatientID"); odil::DataSet dataset; dataset.add(tag); dataset.remove(tag); BOOST_CHECK(!dataset.has(tag)); } BOOST_AUTO_TEST_CASE(RemoveMissing) { odil::Tag const tag("PatientID"); odil::DataSet dataset; dataset.add(tag); odil::Tag const other("PatientName"); BOOST_CHECK_THROW( dataset.remove(other), odil::Exception); } BOOST_AUTO_TEST_CASE(Equality) { odil::DataSet dataset1; dataset1.add("PatientID", {"DJ1234"}); odil::DataSet dataset2; dataset2.add("PatientID", {"DJ1234"}); odil::DataSet dataset3; dataset3.add("PatientAge", {"042Y"}); BOOST_CHECK(dataset1 == dataset2); BOOST_CHECK(! (dataset1 == dataset3)); } BOOST_AUTO_TEST_CASE(Difference) { odil::DataSet dataset1; dataset1.add("PatientID", {"DJ1234"}); odil::DataSet dataset2; dataset2.add("PatientID", {"DJ1234"}); odil::DataSet dataset3; dataset3.add("PatientAge", {"042Y"}); BOOST_CHECK(! (dataset1 != dataset2)); BOOST_CHECK(dataset1 != dataset3); } BOOST_AUTO_TEST_CASE(Clear) { odil::DataSet data_set; data_set.add("PatientID", {"DJ1234"}); data_set.clear("PatientID"); BOOST_CHECK(data_set.empty("PatientID")); BOOST_CHECK_THROW(data_set.clear("PatietName"), odil::Exception); } odil-0.11.0/tests/code/DcmtkException.cpp000066400000000000000000000015451362244656000202360ustar00rootroot00000000000000#define BOOST_TEST_MODULE DcmtkException #include #include #include #include "odil/dcmtk/Exception.h" BOOST_AUTO_TEST_CASE(StringConstructor) { odil::dcmtk::Exception const exception("foo"); BOOST_REQUIRE( exception.get_source() == odil::dcmtk::Exception::Source::Message); BOOST_REQUIRE_EQUAL(exception.what(), "foo"); BOOST_REQUIRE_THROW(exception.get_condition(), odil::dcmtk::Exception); } BOOST_AUTO_TEST_CASE(ConditionConstructor) { odil::dcmtk::Exception const exception(EC_IllegalParameter); BOOST_REQUIRE( exception.get_source() == odil::dcmtk::Exception::Source::Condition); BOOST_REQUIRE_EQUAL( exception.what(), OFCondition(EC_IllegalParameter).text()); BOOST_REQUIRE(exception.get_condition() == EC_IllegalParameter); } odil-0.11.0/tests/code/EchoSCP.cpp000066400000000000000000000056411362244656000165420ustar00rootroot00000000000000#define BOOST_TEST_MODULE EchoSCP #include #include #include #include #include #include "odil/Association.h" #include "odil/EchoSCP.h" #include "odil/Exception.h" #include "odil/message/CEchoRequest.h" #include "odil/message/Response.h" struct Status { int client; std::string server; bool called; }; void run_server(Status * status) { odil::Association association; association.set_tcp_timeout(boost::posix_time::seconds(1)); try { association.receive_association(boost::asio::ip::tcp::v4(), 11113); odil::EchoSCP echo_scp(association, [status](std::shared_ptr) { status->called = true; return odil::message::Response::Success; }); // Get echo message auto const message = association.receive_message(); echo_scp(message); // Should throw with peer closing connection association.receive_message(); } catch(odil::AssociationAborted const &) { status->server = "abort"; } catch(odil::AssociationReleased const &) { status->server = "release"; } catch(odil::Exception const &) { status->server = "Other Odil exception"; } catch(...) { status->server = "Other exception"; } } void run_client(Status * status, bool use_abort) { std::string command = "echoscu -ll error"; if(use_abort) { command += " --abort"; } command += " 127.0.0.1 11113"; status->client = system(command.c_str()); } BOOST_AUTO_TEST_CASE(Callback) { odil::Association association; odil::EchoSCP scp(association); bool called = false; auto const callback = [&called](std::shared_ptr) { called = true; return odil::message::Response::Success; }; scp.set_callback(callback); scp.get_callback()(std::make_shared(1, "")); BOOST_REQUIRE_EQUAL(called, true); } BOOST_AUTO_TEST_CASE(Release) { Status status = { -1, "", false }; std::thread server(run_server, &status); std::this_thread::sleep_for(std::chrono::milliseconds(100)); std::thread client(run_client, &status, false); server.join(); client.join(); BOOST_REQUIRE_EQUAL(status.client, 0); BOOST_REQUIRE_EQUAL(status.server, "release"); BOOST_REQUIRE_EQUAL(status.called, true); } BOOST_AUTO_TEST_CASE(Abort) { Status status = { -1, "", false }; std::thread server(run_server, &status); std::this_thread::sleep_for(std::chrono::milliseconds(100)); std::thread client(run_client, &status, true); server.join(); client.join(); BOOST_REQUIRE_EQUAL(status.client, 0); BOOST_REQUIRE_EQUAL(status.server, "abort"); BOOST_REQUIRE_EQUAL(status.called, true); } odil-0.11.0/tests/code/EchoSCU.cpp000066400000000000000000000011111362244656000165330ustar00rootroot00000000000000#define BOOST_TEST_MODULE EchoSCU #include #include "odil/EchoSCU.h" #include "odil/registry.h" #include "../PeerFixtureBase.h" struct Fixture: public PeerFixtureBase { Fixture() : PeerFixtureBase({ { 1, odil::registry::VerificationSOPClass, {odil::registry::ImplicitVRLittleEndian}, odil::AssociationParameters::PresentationContext::Role::SCU } }) { // Nothing else } }; BOOST_FIXTURE_TEST_CASE(Echo, Fixture) { odil::EchoSCU scu(this->association); scu.echo(); } odil-0.11.0/tests/code/Element.cpp000066400000000000000000000251541362244656000167100ustar00rootroot00000000000000#define BOOST_TEST_MODULE Element #include #include #include #include "odil/DataSet.h" #include "odil/Element.h" #include "odil/Exception.h" template void test_value( odil::Element const & element, odil::VR const & vr, TContainer const & contents, bool (odil::Element::*type_check)() const, TContainer const & (odil::Element::*getter)() const) { BOOST_CHECK((element.*type_check)()); BOOST_CHECK_EQUAL(element.empty(), contents.empty()); BOOST_CHECK_EQUAL(element.size(), contents.size()); BOOST_CHECK((element.*getter)() == contents); BOOST_CHECK(element.vr == vr); if(!element.is_int()) { BOOST_CHECK_THROW(element.as_int(), odil::Exception); } if(!element.is_real()) { BOOST_CHECK_THROW(element.as_real(), odil::Exception); } if(!element.is_string()) { BOOST_CHECK_THROW(element.as_string(), odil::Exception); } if(!element.is_data_set()) { BOOST_CHECK_THROW(element.as_data_set(), odil::Exception); } if(!element.is_binary()) { BOOST_CHECK_THROW(element.as_binary(), odil::Exception); } } template void test_implicit_container( odil::VR const & vr, bool (odil::Element::*type_check)() const, TContainer const & (odil::Element::*getter)() const) { odil::Element const element(vr); test_value(element, vr, TContainer(), type_check, getter); } template void test_container( TContainer const & contents, odil::VR const & vr, bool (odil::Element::*type_check)() const, TContainer const & (odil::Element::*getter)() const) { odil::Element const element(contents, vr); test_value(element, vr, contents, type_check, getter); auto contents_copy(contents); odil::Element const other_element(std::move(contents_copy)); BOOST_CHECK(contents_copy.empty()); } template void test_initializer_list( std::initializer_list const & contents, bool (odil::Element::*type_check)() const, TContainer const & (odil::Element::*getter)() const) { odil::Element const element(contents); test_value(element, element.vr, TContainer(contents), type_check, getter); } template void test_modify( TContainer const & contents, TContainer const & (odil::Element::*getter)() const, TContainer & (odil::Element::*setter)()) { odil::Element value(TContainer{{contents[0]}}); (value.*setter)().push_back(contents[1]); BOOST_CHECK((value.*getter)() == contents); } template void test_clear( TContainer const & contents, bool (odil::Element::*type_check)() const) { odil::Element element(contents); element.clear(); BOOST_CHECK((element.*type_check)()); BOOST_CHECK(element.empty()); } template void test_equality( TContainer const & contents_1, TContainer const & contents_2, odil::VR const & vr_1, odil::VR const & vr_2) { odil::Element const value_1(contents_1, vr_1); odil::Element const value_2(contents_1, vr_1); odil::Element const value_3(contents_1, vr_2); odil::Element const value_4(contents_2, vr_1); BOOST_CHECK(value_1 == value_2); BOOST_CHECK( ! (value_1 == value_3)); BOOST_CHECK( ! (value_1 == value_4)); BOOST_CHECK(! (value_1 != value_2)); BOOST_CHECK(value_1 != value_3); BOOST_CHECK(value_1 != value_4); } struct Visitor { typedef std::pair result_type; result_type operator()(odil::VR const & vr) const { return std::make_pair(odil::as_string(vr), std::string()); } template result_type operator()(odil::VR const & vr, T const & container) const { return std::make_pair(odil::as_string(vr), typeid(container).name()); } }; template void test_visitor( TContainer const & contents, odil::VR const & vr) { odil::Element const element(contents, vr); BOOST_REQUIRE( odil::apply_visitor(Visitor(), element) == std::make_pair( odil::as_string(vr), contents.empty()?std::string():typeid(TContainer).name())); } template void test( std::initializer_list const & contents, std::initializer_list const & other_contents, odil::VR const & vr, odil::VR const & other_vr, bool (odil::Element::*type_check)() const, TContainer const & (odil::Element::*getter)() const, TContainer & (odil::Element::*setter)()) { TContainer const container(contents); TContainer const other_container(other_contents); test_container(TContainer(), vr, type_check, getter); test_container(container, vr, type_check, getter); test_initializer_list(contents, type_check, getter); test_modify(container, getter, setter); test_clear(container, type_check); test_equality(container, other_container, vr, other_vr); test_visitor(TContainer(), vr); test_visitor(container, vr); } BOOST_AUTO_TEST_CASE(ImplicitType) { test_implicit_container( odil::VR::AE, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::AS, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::AT, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::CS, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::DA, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::DS, &odil::Element::is_real, &odil::Element::as_real); test_implicit_container( odil::VR::DT, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::FL, &odil::Element::is_real, &odil::Element::as_real); test_implicit_container( odil::VR::FD, &odil::Element::is_real, &odil::Element::as_real); test_implicit_container( odil::VR::IS, &odil::Element::is_int, &odil::Element::as_int); test_implicit_container( odil::VR::LO, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::LT, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::OB, &odil::Element::is_binary, &odil::Element::as_binary); test_implicit_container( odil::VR::OD, &odil::Element::is_binary, &odil::Element::as_binary); test_implicit_container( odil::VR::OF, &odil::Element::is_binary, &odil::Element::as_binary); test_implicit_container( odil::VR::OL, &odil::Element::is_binary, &odil::Element::as_binary); test_implicit_container( odil::VR::OW, &odil::Element::is_binary, &odil::Element::as_binary); test_implicit_container( odil::VR::PN, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::SH, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::SL, &odil::Element::is_int, &odil::Element::as_int); test_implicit_container( odil::VR::SQ, &odil::Element::is_data_set, &odil::Element::as_data_set); test_implicit_container( odil::VR::SS, &odil::Element::is_int, &odil::Element::as_int); test_implicit_container( odil::VR::ST, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::TM, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::UC, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::UI, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::UL, &odil::Element::is_int, &odil::Element::as_int); test_implicit_container( odil::VR::UN, &odil::Element::is_binary, &odil::Element::as_binary); test_implicit_container( odil::VR::UR, &odil::Element::is_string, &odil::Element::as_string); test_implicit_container( odil::VR::US, &odil::Element::is_int, &odil::Element::as_int); test_implicit_container( odil::VR::UT, &odil::Element::is_string, &odil::Element::as_string); } BOOST_AUTO_TEST_CASE(Int) { BOOST_CHECK(odil::Element({1234, 5678}).is_int()); test( {1234, 5678}, {9012, 3456}, odil::VR::US, odil::VR::UL, &odil::Element::is_int, &odil::Element::as_int, &odil::Element::as_int); } BOOST_AUTO_TEST_CASE(Real) { BOOST_CHECK(odil::Element({12.34, 56.78}).is_real()); test( {12.34, 56.78}, {1., 2.}, odil::VR::FD, odil::VR::DS, &odil::Element::is_real, &odil::Element::as_real, &odil::Element::as_real); } BOOST_AUTO_TEST_CASE(String) { BOOST_CHECK(odil::Element({"foo", "bar"}).is_string()); test( {"foo", "bar"}, {"plip", "plop"}, odil::VR::CS, odil::VR::UT, &odil::Element::is_string, &odil::Element::as_string, &odil::Element::as_string); } BOOST_AUTO_TEST_CASE(DataSets) { auto data_set_1 = std::make_shared(); data_set_1->add("PatientID", {"DJ1234"}); auto data_set_2 = std::make_shared(); data_set_2->add("EchoTime", {100}); BOOST_CHECK(odil::Element({data_set_1, data_set_2}).is_data_set()); test( {data_set_1, data_set_2}, {data_set_2, data_set_1}, odil::VR::SQ, odil::VR::UN, &odil::Element::is_data_set, &odil::Element::as_data_set, &odil::Element::as_data_set); } BOOST_AUTO_TEST_CASE(Binary) { BOOST_CHECK(odil::Element({{0x1, 0x2}, {0x3}}).is_binary()); test( {{0x1, 0x2}, {0x3}}, {{0x4}, {0x5, 0x6}}, odil::VR::OB, odil::VR::OW, &odil::Element::is_binary, &odil::Element::as_binary, &odil::Element::as_binary); } odil-0.11.0/tests/code/ElementAccessor.cpp000066400000000000000000000065721362244656000203760ustar00rootroot00000000000000#define BOOST_TEST_MODULE ElementAccessor #include #include #include #include #include #include "odil/dcmtk/ElementAccessor.h" #include "odil/dcmtk/VRTraits.h" struct Fixture { DcmDataset dataset; Fixture() { OFCondition condition; condition = dataset.putAndInsertOFStringArray(DCM_PatientID, "DJ123"); if(condition.bad()) { throw odil::dcmtk::Exception(condition); } condition = dataset.putAndInsertUint16(DCM_MessageID, 1234); if(condition.bad()) { throw odil::dcmtk::Exception(condition); } } }; BOOST_FIXTURE_TEST_CASE(GetCorrectTypeString, Fixture) { BOOST_CHECK_EQUAL( odil::dcmtk::ElementAccessor::get(this->dataset, DCM_PatientID), "DJ123"); } BOOST_FIXTURE_TEST_CASE(GetCorrectVRString, Fixture) { BOOST_CHECK_EQUAL( odil::dcmtk::ElementAccessor< typename odil::dcmtk::VRTraits::ValueType >::get(this->dataset, DCM_PatientID), "DJ123"); } BOOST_FIXTURE_TEST_CASE(GetCorrectTypeNonString, Fixture) { BOOST_CHECK_EQUAL( odil::dcmtk::ElementAccessor::get(this->dataset, DCM_MessageID), 1234); } BOOST_FIXTURE_TEST_CASE(GetCorrectVRNonString, Fixture) { BOOST_CHECK_EQUAL( odil::dcmtk::ElementAccessor< typename odil::dcmtk::VRTraits::ValueType >::get(this->dataset, DCM_MessageID), 1234); } BOOST_FIXTURE_TEST_CASE(GetWrongTypeString, Fixture) { BOOST_CHECK_THROW( odil::dcmtk::ElementAccessor::get(this->dataset, DCM_PatientID), odil::dcmtk::Exception); } BOOST_FIXTURE_TEST_CASE(GetWrongTypeNonString, Fixture) { BOOST_CHECK_THROW( odil::dcmtk::ElementAccessor::get(this->dataset, DCM_MessageID), odil::dcmtk::Exception); } BOOST_FIXTURE_TEST_CASE(SetEmpty, Fixture) { odil::dcmtk::ElementAccessor::set(this->dataset, DCM_PatientName, "FOO"); OFString value; OFCondition const condition = this->dataset.findAndGetOFString(DCM_PatientName, value); BOOST_REQUIRE(condition.good()); BOOST_CHECK_EQUAL(std::string(value.c_str()), "FOO"); } BOOST_FIXTURE_TEST_CASE(SetWrongTypeString, Fixture) { BOOST_CHECK_THROW( odil::dcmtk::ElementAccessor::set( this->dataset, DCM_PatientName, 1.234), odil::dcmtk::Exception); } BOOST_FIXTURE_TEST_CASE(SetWrongTypeNonString, Fixture) { BOOST_CHECK_THROW( odil::dcmtk::ElementAccessor::set( this->dataset, DCM_Status, STATUS_Success), odil::dcmtk::Exception); } BOOST_FIXTURE_TEST_CASE(SetExisting, Fixture) { odil::dcmtk::ElementAccessor::set(this->dataset, DCM_PatientID, "FOO"); OFString value; OFCondition const condition = this->dataset.findAndGetOFString(DCM_PatientID, value); BOOST_REQUIRE(condition.good()); BOOST_CHECK_EQUAL(std::string(value.c_str()), "FOO"); } BOOST_FIXTURE_TEST_CASE(Has, Fixture) { BOOST_CHECK( odil::dcmtk::ElementAccessor::has(this->dataset, DCM_PatientID)); } BOOST_FIXTURE_TEST_CASE(HasNot, Fixture) { BOOST_CHECK( !odil::dcmtk::ElementAccessor::has(this->dataset, DCM_PatientName)); } odil-0.11.0/tests/code/Exception.cpp000066400000000000000000000003501362244656000172440ustar00rootroot00000000000000#define BOOST_TEST_MODULE Exception #include #include "odil/Exception.h" BOOST_AUTO_TEST_CASE(Exception) { odil::Exception const exception("foo"); BOOST_REQUIRE_EQUAL(exception.what(), "foo"); } odil-0.11.0/tests/code/FindSCP.cpp000066400000000000000000000113551362244656000165430ustar00rootroot00000000000000#define BOOST_TEST_MODULE FindSCP #include #include #include #include #include #include #include #include #include #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/FindSCP.h" #include "odil/Exception.h" #include "odil/SCP.h" #include "odil/Reader.h" #include "odil/Value.h" #include "odil/message/Response.h" struct Status { int client; std::string server; odil::Value::DataSets responses; }; class Generator: public odil::SCP::DataSetGenerator { public: Generator() { // Nothing else. } virtual ~Generator() { // Nothing to do. } virtual void initialize(std::shared_ptr) { auto data_set_1 = std::make_shared(); data_set_1->add(odil::registry::PatientName, {"Hello^World"}); data_set_1->add(odil::registry::PatientID, {"1234"}); this->_responses.push_back(data_set_1); auto data_set_2 = std::make_shared(); data_set_2->add(odil::registry::PatientName, {"Doe^John"}); data_set_2->add(odil::registry::PatientID, {"5678"}); this->_responses.push_back(data_set_2); this->_response_iterator = this->_responses.begin(); } virtual bool done() const { return (this->_response_iterator == this->_responses.end()); } virtual std::shared_ptr get() const { return *this->_response_iterator; } virtual void next() { ++this->_response_iterator; } private: mutable odil::Value::DataSets _responses; odil::Value::DataSets::iterator _response_iterator; }; void run_server(Status * status) { odil::Association association; association.set_tcp_timeout(boost::posix_time::seconds(1)); try { association.receive_association(boost::asio::ip::tcp::v4(), 11113); odil::FindSCP find_scp(association); auto const generator = std::make_shared(); find_scp.set_generator(generator); // Get echo message auto message = association.receive_message(); find_scp(std::move(message)); // Should throw with peer closing connection association.receive_message(); } catch(odil::AssociationAborted const &) { status->server = "abort"; } catch(odil::AssociationReleased const &) { status->server = "release"; } catch(odil::Exception const &) { status->server = "Other Odil exception"; } catch(...) { status->server = "Other exception"; } } void run_client(Status * status) { std::string command = "findscu " "-P -k QueryRetrieveLevel=PATIENT " "-k PatientID=* -k PatientName " "-q -X " "127.0.0.1 11113"; status->client = system(command.c_str()); boost::filesystem::directory_iterator end; for(boost::filesystem::directory_iterator it("."); it != end; ++it ) { if(!boost::filesystem::is_regular_file(it->status())) { continue; } auto const filename = it->path().stem().string(); if(filename.substr(0, 3) != "rsp") { continue; } std::ifstream stream(it->path().string()); auto data_set = odil::Reader::read_file(stream).second; status->responses.push_back(data_set); boost::filesystem::remove(it->path()); } std::sort( status->responses.begin(), status->responses.end(), []( std::shared_ptr left, std::shared_ptr right) { auto const & left_uid = left->as_string("PatientID", 0); auto const & right_uid = right->as_string("PatientID", 0); return (left_uid < right_uid); }); } BOOST_AUTO_TEST_CASE(Release) { Status status = { -1, "", {} }; std::thread server(run_server, &status); std::this_thread::sleep_for(std::chrono::milliseconds(100)); std::thread client(run_client, &status); server.join(); client.join(); BOOST_REQUIRE_EQUAL(status.client, 0); BOOST_REQUIRE_EQUAL(status.server, "release"); BOOST_REQUIRE_EQUAL(status.responses.size(), 2); BOOST_REQUIRE_EQUAL(status.responses[0]->size(), 2); BOOST_REQUIRE_EQUAL(status.responses[0]->as_string("PatientName", 0), "Hello^World"); BOOST_REQUIRE_EQUAL(status.responses[0]->as_string("PatientID", 0), "1234"); BOOST_REQUIRE_EQUAL(status.responses[1]->size(), 2); BOOST_REQUIRE_EQUAL(status.responses[1]->as_string("PatientName", 0), "Doe^John"); BOOST_REQUIRE_EQUAL(status.responses[1]->as_string("PatientID", 0), "5678"); } odil-0.11.0/tests/code/FindSCU.cpp000066400000000000000000000032651362244656000165510ustar00rootroot00000000000000#define BOOST_TEST_MODULE FindSCU #include #include "odil/DataSet.h" #include "odil/FindSCU.h" #include "odil/registry.h" #include "../PeerFixtureBase.h" struct Fixture: public PeerFixtureBase { static bool called; std::shared_ptr query; Fixture() : PeerFixtureBase({ { 1, odil::registry::PatientRootQueryRetrieveInformationModelFIND, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCU } }), query(std::make_shared()) { Fixture::called = false; this->query->add("QueryRetrieveLevel", {"PATIENT"}); this->query->add("PatientName", {"Doe^John"}); this->query->add("PatientID"); } static void callback(std::shared_ptr) { Fixture::called = true; } }; bool Fixture::called = false; BOOST_FIXTURE_TEST_CASE(Find, Fixture) { odil::FindSCU scu(this->association); scu.set_affected_sop_class(odil::registry::PatientRootQueryRetrieveInformationModelFIND); auto const results = scu.find(this->query); BOOST_REQUIRE(!this->query->empty()); BOOST_REQUIRE_EQUAL(results.size(), 1); BOOST_CHECK( results[0]->as_string("PatientID") == odil::Value::Strings({"DJ001"})); } BOOST_FIXTURE_TEST_CASE(FindCallback, Fixture) { odil::FindSCU scu(this->association); scu.set_affected_sop_class(odil::registry::PatientRootQueryRetrieveInformationModelFIND); scu.find(this->query, Fixture::callback); BOOST_REQUIRE(!this->query->empty()); BOOST_CHECK(Fixture::called); } odil-0.11.0/tests/code/GetSCP.cpp000066400000000000000000000134111362244656000163750ustar00rootroot00000000000000#define BOOST_TEST_MODULE GetSCP #include #include #include #include #include #include #include #include #include #include "odil/Association.h" #include "odil/DataSet.h" #include "odil/GetSCP.h" #include "odil/Exception.h" #include "odil/SCP.h" #include "odil/uid.h" #include "odil/Reader.h" #include "odil/message/Response.h" struct Status { int client; std::string server; odil::Value::DataSets responses; }; class Generator: public odil::GetSCP::DataSetGenerator { public: Generator() { // Nothing else. } virtual ~Generator() { // Nothing to do. } virtual void initialize(std::shared_ptr) { auto data_set_1 = std::make_shared(); data_set_1->add("SOPClassUID", {odil::registry::RawDataStorage}); data_set_1->add( "SOPInstanceUID", {"1.2.826.0.1.3680043.9.5560.3127449359877365688774406533090568532"}); data_set_1->add("PatientName", {"Hello^World"}); data_set_1->add("PatientID", {"1234"}); this->_responses.push_back(data_set_1); auto data_set_2 = std::make_shared(); data_set_2->add("SOPClassUID", {odil::registry::RawDataStorage}); data_set_2->add( "SOPInstanceUID", {"1.2.826.0.1.3680043.9.5560.3221615743193123463515381981101110692"}); data_set_2->add("PatientName", {"Doe^John"}); data_set_2->add("PatientID", {"5678"}); this->_responses.push_back(data_set_2); this->_response_iterator = this->_responses.begin(); } virtual bool done() const { return (this->_response_iterator == this->_responses.end()); } virtual std::shared_ptr get() const { return *this->_response_iterator; } virtual void next() { ++this->_response_iterator; } virtual unsigned int count() const { return 2; } private: mutable odil::Value::DataSets _responses; odil::Value::DataSets::iterator _response_iterator; }; void run_server(Status * status) { odil::Association association; association.set_tcp_timeout(boost::posix_time::seconds(1)); try { association.receive_association(boost::asio::ip::tcp::v4(), 11113); odil::GetSCP get_scp(association); auto const generator = std::make_shared(); get_scp.set_generator(generator); // Get C-GET message auto message = association.receive_message(); get_scp(message); // Should throw with peer closing connection association.receive_message(); } catch(odil::AssociationAborted const &) { status->server = "abort"; } catch(odil::AssociationReleased const &) { status->server = "release"; } catch(odil::Exception const &) { status->server = "Other Odil exception"; } catch(...) { status->server = "Other exception"; } } void run_client(Status * status) { std::string command = "getscu " "-ll error " "-P -k QueryRetrieveLevel=PATIENT " "-k PatientID=* -k PatientName " "+B " "127.0.0.1 11113"; status->client = system(command.c_str()); boost::filesystem::directory_iterator end; for(boost::filesystem::directory_iterator it("."); it != end; ++it ) { if(!boost::filesystem::is_regular_file(it->status())) { continue; } auto const filename = it->path().stem().string(); if(filename.substr(0, odil::uid_prefix.size()) != odil::uid_prefix) { continue; } std::ifstream stream(it->path().string()); auto data_set = odil::Reader::read_file(stream).second; status->responses.push_back(data_set); boost::filesystem::remove(it->path()); } std::sort( status->responses.begin(), status->responses.end(), []( std::shared_ptr left, std::shared_ptr right) { auto const & left_uid = left->as_string("SOPInstanceUID", 0); auto const & right_uid = right->as_string("SOPInstanceUID", 0); return (left_uid < right_uid); }); } BOOST_AUTO_TEST_CASE(Release) { Status status = { -1, "", {} }; std::thread server(run_server, &status); std::this_thread::sleep_for(std::chrono::milliseconds(100)); std::thread client(run_client, &status); server.join(); client.join(); BOOST_REQUIRE_EQUAL(status.client, 0); BOOST_REQUIRE_EQUAL(status.server, "release"); BOOST_REQUIRE_EQUAL(status.responses.size(), 2); BOOST_REQUIRE_EQUAL(status.responses[0]->size(), 4); BOOST_REQUIRE_EQUAL( status.responses[0]->as_string("SOPInstanceUID", 0), "1.2.826.0.1.3680043.9.5560.3127449359877365688774406533090568532"); BOOST_REQUIRE_EQUAL( status.responses[0]->as_string("SOPClassUID", 0), odil::registry::RawDataStorage); BOOST_REQUIRE_EQUAL(status.responses[0]->as_string("PatientName", 0), "Hello^World"); BOOST_REQUIRE_EQUAL(status.responses[0]->as_string("PatientID", 0), "1234"); BOOST_REQUIRE_EQUAL(status.responses[1]->size(), 4); BOOST_REQUIRE_EQUAL( status.responses[1]->as_string("SOPInstanceUID", 0), "1.2.826.0.1.3680043.9.5560.3221615743193123463515381981101110692"); BOOST_REQUIRE_EQUAL( status.responses[1]->as_string("SOPClassUID", 0), odil::registry::RawDataStorage); BOOST_REQUIRE_EQUAL(status.responses[1]->as_string("PatientName", 0), "Doe^John"); BOOST_REQUIRE_EQUAL(status.responses[1]->as_string("PatientID", 0), "5678"); } odil-0.11.0/tests/code/GetSCU.cpp000066400000000000000000000051441362244656000164060ustar00rootroot00000000000000#define BOOST_TEST_MODULE GetSCU #include #include "odil/DataSet.h" #include "odil/GetSCU.h" #include "odil/registry.h" #include "../PeerFixtureBase.h" struct Fixture: public PeerFixtureBase { static bool store_callback_called; static bool get_callback_called; std::shared_ptr query; Fixture() : PeerFixtureBase({ { 1, odil::registry::PatientRootQueryRetrieveInformationModelGET, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCU }, { 3, odil::registry::RawDataStorage, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCP } }), query(std::make_shared()) { Fixture::store_callback_called = false; Fixture::get_callback_called = false; this->query->add("QueryRetrieveLevel", {"PATIENT"}); this->query->add("PatientName", {"Doe^John"}); } static void store_callback(std::shared_ptr) { Fixture::store_callback_called = true; } static void get_callback(std::shared_ptr) { Fixture::get_callback_called = true; } }; bool Fixture::store_callback_called = false; bool Fixture::get_callback_called = false; BOOST_FIXTURE_TEST_CASE(Get, Fixture) { odil::GetSCU scu(this->association); scu.set_affected_sop_class( odil::registry::PatientRootQueryRetrieveInformationModelGET); auto const results = scu.get(this->query); BOOST_REQUIRE_EQUAL(results.size(), 1); BOOST_CHECK( results[0]->as_string("SOPInstanceUID") == odil::Value::Strings( {"2.25.95090344942250266709587559073467305647"})); } BOOST_FIXTURE_TEST_CASE(GetBothCallbacks, Fixture) { odil::GetSCU scu(this->association); scu.set_affected_sop_class( odil::registry::PatientRootQueryRetrieveInformationModelGET); scu.get(this->query, Fixture::store_callback, Fixture::get_callback); BOOST_CHECK(Fixture::store_callback_called); BOOST_CHECK(Fixture::get_callback_called); } BOOST_FIXTURE_TEST_CASE(GetOnlyStoreCallback, Fixture) { odil::GetSCU scu(this->association); scu.set_affected_sop_class( odil::registry::PatientRootQueryRetrieveInformationModelGET); scu.get(this->query, Fixture::store_callback); BOOST_CHECK(Fixture::store_callback_called); BOOST_CHECK(!Fixture::get_callback_called); } odil-0.11.0/tests/code/MoveSCP.cpp000066400000000000000000000157161362244656000165760ustar00rootroot00000000000000#define BOOST_TEST_MODULE MoveSCP #include #include #include #include #include #include #include #include #include "odil/Association.h" #include "odil/AssociationParameters.h" #include "odil/DataSet.h" #include "odil/MoveSCP.h" #include "odil/Exception.h" #include "odil/SCP.h" #include "odil/uid.h" #include "odil/Reader.h" #include "odil/registry.h" #include "odil/message/Response.h" struct Status { int client; std::string server; odil::Value::DataSets responses; }; class Generator: public odil::MoveSCP::DataSetGenerator { public: Generator(odil::Association & association) : _association(association) { // Nothing else. } virtual ~Generator() { // Nothing to do. } virtual void initialize(std::shared_ptr) { auto data_set_1 = std::make_shared(); data_set_1->add("SOPClassUID", {odil::registry::RawDataStorage}); data_set_1->add( "SOPInstanceUID", {"1.2.826.0.1.3680043.9.5560.3127449359877365688774406533090568532"}); data_set_1->add("PatientName", {"Hello^World"}); data_set_1->add("PatientID", {"1234"}); this->_responses.push_back(data_set_1); auto data_set_2 = std::make_shared(); data_set_2->add("SOPClassUID", {odil::registry::RawDataStorage}); data_set_2->add( "SOPInstanceUID", {"1.2.826.0.1.3680043.9.5560.3221615743193123463515381981101110692"}); data_set_2->add("PatientName", {"Doe^John"}); data_set_2->add("PatientID", {"5678"}); this->_responses.push_back(data_set_2); this->_response_iterator = this->_responses.begin(); } virtual bool done() const { return (this->_response_iterator == this->_responses.end()); } virtual std::shared_ptr get() const { return *this->_response_iterator; } virtual void next() { ++this->_response_iterator; } virtual unsigned int count() const { return 2; } virtual odil::Association get_association( std::shared_ptr request) const { odil::Association move_association; move_association.set_peer_host(this->_association.get_peer_host()); move_association.set_peer_port(11114); // FIXME: max length, user_identity std::vector const presentation_contexts = { { 1, odil::registry::RawDataStorage, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCU } }; move_association.update_parameters() .set_calling_ae_title( this->_association.get_negotiated_parameters().get_called_ae_title()) .set_called_ae_title(request->get_move_destination()) .set_presentation_contexts(presentation_contexts); std::cout << "get_association done" << std::endl; return move_association; } private: mutable odil::Value::DataSets _responses; odil::Value::DataSets::iterator _response_iterator; odil::Association & _association; }; void run_server(Status * status) { odil::Association association; association.set_tcp_timeout(boost::posix_time::seconds(1)); try { association.receive_association(boost::asio::ip::tcp::v4(), 11113); odil::MoveSCP move_scp(association); auto const generator = std::make_shared(association); move_scp.set_generator(generator); // Get move message auto message = association.receive_message(); move_scp(message); // Should throw with peer closing connection association.receive_message(); } catch(odil::AssociationAborted const &) { status->server = "abort"; } catch(odil::AssociationReleased const &) { status->server = "release"; } catch(odil::Exception const &) { status->server = "Other Odil exception"; } catch(...) { status->server = "Other exception"; } } void run_client(Status * status) { std::string command = "movescu " "-ll error " "-P -k QueryRetrieveLevel=PATIENT " "-k PatientID=* -k PatientName " "+P 11114 127.0.0.1 11113"; status->client = system(command.c_str()); boost::filesystem::directory_iterator end; for(boost::filesystem::directory_iterator it("."); it != end; ++it ) { if(!boost::filesystem::is_regular_file(it->status())) { continue; } auto const filename = it->path().stem().string(); if(filename.substr(0, 3) != "RAW") { continue; } std::ifstream stream(it->path().string()); auto data_set = odil::Reader::read_file(stream).second; status->responses.push_back(data_set); boost::filesystem::remove(it->path()); } std::sort( status->responses.begin(), status->responses.end(), []( std::shared_ptr left, std::shared_ptr right) { auto const & left_uid = left->as_string("SOPInstanceUID", 0); auto const & right_uid = right->as_string("SOPInstanceUID", 0); return (left_uid < right_uid); }); } BOOST_AUTO_TEST_CASE(Release) { Status status = { -1, "", {} }; std::thread server(run_server, &status); std::this_thread::sleep_for(std::chrono::milliseconds(100)); std::thread client(run_client, &status); server.join(); client.join(); BOOST_REQUIRE_EQUAL(status.client, 0); BOOST_REQUIRE_EQUAL(status.server, "release"); BOOST_REQUIRE_EQUAL(status.responses.size(), 2); BOOST_REQUIRE_EQUAL(status.responses[0]->size(), 4); BOOST_REQUIRE_EQUAL( status.responses[0]->as_string("SOPInstanceUID", 0), "1.2.826.0.1.3680043.9.5560.3127449359877365688774406533090568532"); BOOST_REQUIRE_EQUAL( status.responses[0]->as_string("SOPClassUID", 0), odil::registry::RawDataStorage); BOOST_REQUIRE_EQUAL(status.responses[0]->as_string("PatientName", 0), "Hello^World"); BOOST_REQUIRE_EQUAL(status.responses[0]->as_string("PatientID", 0), "1234"); BOOST_REQUIRE_EQUAL(status.responses[1]->size(), 4); BOOST_REQUIRE_EQUAL( status.responses[1]->as_string("SOPInstanceUID", 0), "1.2.826.0.1.3680043.9.5560.3221615743193123463515381981101110692"); BOOST_REQUIRE_EQUAL( status.responses[1]->as_string("SOPClassUID", 0), odil::registry::RawDataStorage); BOOST_REQUIRE_EQUAL(status.responses[1]->as_string("PatientName", 0), "Doe^John"); BOOST_REQUIRE_EQUAL(status.responses[1]->as_string("PatientID", 0), "5678"); } odil-0.11.0/tests/code/MoveSCU.cpp000066400000000000000000000066731362244656000166050ustar00rootroot00000000000000#define BOOST_TEST_MODULE MoveSCU #include #include "odil/DataSet.h" #include "odil/MoveSCU.h" #include "odil/registry.h" #include "../PeerFixtureBase.h" struct Fixture: public PeerFixtureBase { static bool store_callback_called; static bool move_callback_called; std::shared_ptr query; Fixture() : PeerFixtureBase({ { 1, odil::registry::PatientRootQueryRetrieveInformationModelMOVE, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCU }, { 3, odil::registry::RawDataStorage, { odil::registry::ImplicitVRLittleEndian }, odil::AssociationParameters::PresentationContext::Role::SCP } }), query(std::make_shared()) { Fixture::store_callback_called = false; Fixture::move_callback_called = false; this->query->add("QueryRetrieveLevel", {"PATIENT"}); this->query->add("PatientName", {"Doe^John"}); } static void store_callback(std::shared_ptr) { Fixture::store_callback_called = true; } static void move_callback(std::shared_ptr) { Fixture::move_callback_called = true; } }; bool Fixture::store_callback_called = false; bool Fixture::move_callback_called = false; BOOST_FIXTURE_TEST_CASE(DefaultConstructor, Fixture) { odil::MoveSCU const scu(this->association); BOOST_CHECK_EQUAL(scu.get_move_destination(), ""); BOOST_CHECK_EQUAL(scu.get_incoming_port(), 0); } BOOST_FIXTURE_TEST_CASE(MoveDestination, Fixture) { odil::MoveSCU scu(this->association); scu.set_move_destination("remote"); BOOST_CHECK_EQUAL(scu.get_move_destination(), "remote"); } BOOST_FIXTURE_TEST_CASE(IncomingPort, Fixture) { odil::MoveSCU scu(this->association); scu.set_incoming_port(11113); BOOST_CHECK_EQUAL(scu.get_incoming_port(), 11113); } BOOST_FIXTURE_TEST_CASE(Move, Fixture) { odil::MoveSCU scu(this->association); scu.set_move_destination("LOCAL"); scu.set_incoming_port(11113); scu.set_affected_sop_class( odil::registry::PatientRootQueryRetrieveInformationModelMOVE); auto const results = scu.move(this->query); BOOST_REQUIRE_EQUAL(results.size(), 1); BOOST_CHECK( results[0]->as_string("SOPInstanceUID") == odil::Value::Strings{"2.25.95090344942250266709587559073467305647"}); } BOOST_FIXTURE_TEST_CASE(MoveBothCallback, Fixture) { odil::MoveSCU scu(this->association); scu.set_move_destination("LOCAL"); scu.set_incoming_port(11113); scu.set_affected_sop_class( odil::registry::PatientRootQueryRetrieveInformationModelMOVE); scu.move(this->query, Fixture::store_callback, Fixture::move_callback); BOOST_CHECK(Fixture::store_callback_called); BOOST_CHECK(Fixture::move_callback_called); } BOOST_FIXTURE_TEST_CASE(MoveOnlyStoreCallback, Fixture) { odil::MoveSCU scu(this->association); scu.set_move_destination("LOCAL"); scu.set_incoming_port(11113); scu.set_affected_sop_class( odil::registry::PatientRootQueryRetrieveInformationModelMOVE); scu.move( this->query, Fixture::store_callback, odil::MoveSCU::MoveCallback()); BOOST_CHECK(Fixture::store_callback_called); BOOST_CHECK(!Fixture::move_callback_called); } odil-0.11.0/tests/code/NCreateSCP.cpp000066400000000000000000000044341362244656000172040ustar00rootroot00000000000000#define BOOST_TEST_MODULE NCreateSCP #include #include #include #include #include #include "odil/Association.h" #include "odil/NCreateSCP.h" #include "odil/Exception.h" #include "odil/message/NCreateRequest.h" #include "odil/message/Response.h" struct Status { int client; std::string server; bool called; }; void run_server(Status * status) { odil::Association association; association.set_tcp_timeout(boost::posix_time::seconds(1)); try { association.receive_association(boost::asio::ip::tcp::v4(), 11113); odil::NCreateSCP NCreate_scp(association, [status](std::shared_ptr) { status->called = true; return odil::message::Response::Success; }); // Get NCreate message auto const message = association.receive_message(); NCreate_scp(message); // Should throw with peer closing connection association.receive_message(); } catch(odil::AssociationAborted const &) { status->server = "abort"; } catch(odil::AssociationReleased const &) { status->server = "release"; } catch(odil::Exception const &) { status->server = "Other Odil exception"; } catch(...) { status->server = "Other exception"; } } // void run_client(Status * status, bool use_abort) // { // std::string command = "NCreatescu -ll error"; // if(use_abort) // { // command += " --abort"; // } // command += " 127.0.0.1 11113"; // status->client = system(command.c_str()); // } BOOST_AUTO_TEST_CASE(Callback) { odil::Association association; odil::NCreateSCP scp(association); bool called = false; auto const callback = [&called](std::shared_ptr) { called = true; return odil::message::Response::Success; }; scp.set_callback(callback); auto data_set = std::make_shared(); data_set->add("PatientName", {"Doe^John"}); scp.get_callback()( std::make_shared(1, "", data_set)); BOOST_REQUIRE_EQUAL(called, true); } odil-0.11.0/tests/code/Reader.cpp000066400000000000000000000265501362244656000165220ustar00rootroot00000000000000#define BOOST_TEST_MODULE Reader #include #include #include #include #include #include #include "odil/endian.h" #include "odil/Element.h" #include "odil/registry.h" #include "odil/Reader.h" #include "odil/VR.h" #include "odil/dcmtk/conversion.h" #include "odil/json_converter.h" BOOST_AUTO_TEST_CASE(Constructor) { std::istringstream stream; odil::Reader const reader(stream, odil::registry::ExplicitVRBigEndian_Retired); BOOST_REQUIRE(reader.byte_ordering == odil::ByteOrdering::BigEndian); BOOST_REQUIRE(reader.explicit_vr == true); } void do_test( std::shared_ptr odil_data_set, std::string transfer_syntax, E_EncodingType item_encoding, E_GrpLenEncoding group_length_encoding) { // Write input data set auto const dcmtk_data_set = dynamic_cast(odil::dcmtk::convert(odil_data_set)); std::string data(1000000, '\0'); DcmOutputBufferStream dcmtk_stream(&data[0], data.size()); dcmtk_data_set->transferInit(); OFCondition const condition = dcmtk_data_set->write( dcmtk_stream, DcmXfer(transfer_syntax.c_str()).getXfer(), item_encoding, NULL, group_length_encoding); BOOST_REQUIRE(condition == EC_Normal); dcmtk_data_set->transferEnd(); // Store data in a stream data = data.substr(0, dcmtk_stream.tell()); std::istringstream stream(data); // Read output data set odil::Reader reader(stream, transfer_syntax); auto const other_odil_data_set = reader.read_data_set(); BOOST_REQUIRE(*other_odil_data_set == *odil_data_set); } void do_test(std::shared_ptr odil_data_set) { std::vector const transfer_syntaxes = { odil::registry::ImplicitVRLittleEndian, odil::registry::ExplicitVRLittleEndian, odil::registry::ExplicitVRBigEndian_Retired }; std::vector item_encodings = { EET_ExplicitLength, EET_UndefinedLength }; std::vector use_group_length_values = { EGL_withoutGL, EGL_withGL }; for(auto const & transfer_syntax: transfer_syntaxes) { for(auto const & item_encoding: item_encodings) { for(auto const & use_group_length: use_group_length_values) { do_test( odil_data_set, transfer_syntax, item_encoding, use_group_length); } } } } template void do_test(odil::Tag const & tag, odil::VR vr, std::initializer_list const & value) { // Empty element { odil::Element element(std::initializer_list(), vr); auto data_set = std::make_shared(); data_set->add(tag, element); do_test(data_set); } // Single value { odil::Element element({ *value.begin() }, vr); auto data_set = std::make_shared(); data_set->add(tag, element); do_test(data_set); } // Multiple values { odil::Element element(value, vr); auto data_set = std::make_shared(); data_set->add(tag, element); do_test(data_set); } } BOOST_AUTO_TEST_CASE(AE) { do_test( odil::registry::SelectorAEValue, odil::VR::AE, {std::string("LOCAL"), std::string("REMOTE")}); } BOOST_AUTO_TEST_CASE(AS) { do_test( odil::registry::SelectorASValue, odil::VR::AS, {std::string("035Y"), std::string("022W")}); } BOOST_AUTO_TEST_CASE(AT) { do_test( odil::registry::SelectorATValue, odil::VR::AT, {std::string("12345678"), std::string("9abcdef0")}); } BOOST_AUTO_TEST_CASE(CS) { do_test( odil::registry::SelectorCSValue, odil::VR::CS, {std::string("ABC"), std::string("DEF")}); } BOOST_AUTO_TEST_CASE(DA) { do_test( odil::registry::SelectorDAValue, odil::VR::DA, {std::string("20160103"), std::string("19700131")}); } BOOST_AUTO_TEST_CASE(DS) { do_test(odil::registry::SelectorDSValue, odil::VR::DS, {1.23, -4.56}); } BOOST_AUTO_TEST_CASE(DT) { do_test( odil::registry::SelectorDTValue, odil::VR::DT, {std::string("20160103112233"), std::string("19700131001122.123456")}); } BOOST_AUTO_TEST_CASE(FD) { do_test(odil::registry::SelectorFDValue, odil::VR::FD, {1.23, -4.56}); } BOOST_AUTO_TEST_CASE(FL) { do_test(odil::registry::SelectorFLValue, odil::VR::FL, {0.5, -0.125}); } BOOST_AUTO_TEST_CASE(IS) { do_test(odil::registry::SelectorISValue, odil::VR::IS, {123, -456}); } BOOST_AUTO_TEST_CASE(LO) { do_test( odil::registry::SelectorLOValue, odil::VR::LO, {std::string("Foo"), std::string("Bar")}); } BOOST_AUTO_TEST_CASE(LT) { do_test( odil::registry::SelectorLTValue, odil::VR::LT, {std::string("Foo\\Bar")}); } BOOST_AUTO_TEST_CASE(OB) { do_test( odil::registry::EncapsulatedDocument, odil::VR::OB, { odil::Value::Binary::value_type{0x01, 0x02, 0x03, 0x04} }); } // OD is not in current DCMTK BOOST_AUTO_TEST_CASE(OF) { do_test( odil::registry::VectorGridData, odil::VR::OF, { odil::Value::Binary::value_type{ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08} }); } // OL is not in current DCMTK BOOST_AUTO_TEST_CASE(OW) { do_test( odil::registry::RedPaletteColorLookupTableData, odil::VR::OW, { odil::Value::Binary::value_type{0x01, 0x02, 0x03, 0x04} }); } BOOST_AUTO_TEST_CASE(PN) { do_test( odil::registry::SelectorPNValue, odil::VR::PN, { std::string("Adams^John Robert Quincy^^Rev.^B.A. M.Div."), std::string("Morrison-Jones^Susan^^^Ph.D., Chief Executive Officer") }); } BOOST_AUTO_TEST_CASE(SH) { do_test( odil::registry::SelectorSHValue, odil::VR::SH, {std::string("Foo"), std::string("Bar")}); } BOOST_AUTO_TEST_CASE(SL) { do_test(odil::registry::SelectorSLValue, odil::VR::SL, {12345678, -8765432}); } BOOST_AUTO_TEST_CASE(SQ) { auto item1 = std::make_shared(); item1->add( odil::registry::SelectorSLValue, odil::Element({12345678, -8765432}, odil::VR::SL)); auto item2 = std::make_shared(); item2->add( odil::registry::SelectorFDValue, odil::Element({1.23, -4.56}, odil::VR::FD)); do_test(odil::registry::FrameExtractionSequence, odil::VR::SQ, {item1, item2}); } BOOST_AUTO_TEST_CASE(SS) { do_test(odil::registry::SelectorSSValue, odil::VR::SS, {1234, -5678}); } BOOST_AUTO_TEST_CASE(ST) { do_test( odil::registry::SelectorSTValue, odil::VR::ST, {std::string("Foo\\Bar")}); } BOOST_AUTO_TEST_CASE(TM) { do_test( odil::registry::SelectorTMValue, odil::VR::TM, {std::string("112233"), std::string("001122.123456")}); } // UC is not in current DCMTK //{ // do_test( // odil::registry::SelectorUCValue, odil::VR::UC, // {std::string("Foo"), std::string("Bar")}); //} BOOST_AUTO_TEST_CASE(UI) { // SelectorUIValue is not in current DCMTK do_test( odil::registry::SOPInstanceUID, odil::VR::UI, {std::string("1.2"), std::string("3.4")}); } BOOST_AUTO_TEST_CASE(UL) { do_test(odil::registry::SelectorULValue, odil::VR::UL, {12345678, 8765432}); } // UR is not in current DCMTK //{ // do_test( // odil::registry::SelectorURValue, odil::VR::UR, // {std::string("https://example.com"), std::string("mailto:me@example.com")}); //} BOOST_AUTO_TEST_CASE(US) { do_test(odil::registry::SelectorUSValue, odil::VR::US, {1234, 5678}); } BOOST_AUTO_TEST_CASE(UT) { do_test( odil::registry::SelectorUTValue, odil::VR::UT, {std::string("Foo\\Bar")}); } void do_file_test( std::shared_ptr odil_data_set, std::string transfer_syntax, E_EncodingType item_encoding, E_GrpLenEncoding group_length_encoding) { // Write input data set auto const dcmtk_data_set = dynamic_cast(odil::dcmtk::convert(odil_data_set)); DcmFileFormat file_format(dcmtk_data_set); file_format.getMetaInfo()->putAndInsertString( DCM_TransferSyntaxUID, transfer_syntax.c_str()); file_format.getMetaInfo()->putAndInsertString( DCM_MediaStorageSOPClassUID, odil_data_set->as_string(odil::registry::SOPClassUID)[0].c_str()); file_format.getMetaInfo()->putAndInsertString( DCM_MediaStorageSOPInstanceUID, odil_data_set->as_string(odil::registry::SOPInstanceUID)[0].c_str()); std::string data(1000000, '\0'); DcmOutputBufferStream dcmtk_stream(&data[0], data.size()); file_format.transferInit(); OFCondition const condition = file_format.write( dcmtk_stream, DcmXfer(transfer_syntax.c_str()).getXfer(), item_encoding, NULL, group_length_encoding); BOOST_REQUIRE(condition == EC_Normal); file_format.transferEnd(); // Store data in a stream data = data.substr(0, dcmtk_stream.tell()); std::istringstream stream(data); // Read output data set std::shared_ptr meta_information, other_odil_data_set; std::tie(meta_information, other_odil_data_set) = odil::Reader::read_file(stream); BOOST_REQUIRE(*other_odil_data_set == *odil_data_set); BOOST_REQUIRE( meta_information->as_string(odil::registry::TransferSyntaxUID) == odil::Value::Strings({transfer_syntax})); BOOST_REQUIRE( meta_information->as_string(odil::registry::MediaStorageSOPClassUID) == other_odil_data_set->as_string(odil::registry::SOPClassUID)); BOOST_REQUIRE( meta_information->as_string(odil::registry::MediaStorageSOPInstanceUID) == other_odil_data_set->as_string(odil::registry::SOPInstanceUID)); } void do_file_test(std::shared_ptr odil_data_set) { std::vector const transfer_syntaxes = { odil::registry::ImplicitVRLittleEndian, odil::registry::ExplicitVRLittleEndian, odil::registry::ExplicitVRBigEndian_Retired }; std::vector item_encodings = { EET_ExplicitLength, EET_UndefinedLength }; std::vector use_group_length_values = { EGL_withoutGL, EGL_withGL }; for(auto const & transfer_syntax: transfer_syntaxes) { for(auto const & item_encoding: item_encodings) { for(auto const & use_group_length: use_group_length_values) { do_file_test( odil_data_set, transfer_syntax, item_encoding, use_group_length); } } } } BOOST_AUTO_TEST_CASE(File) { auto item1 = std::make_shared(); item1->add( odil::registry::SelectorSLValue, odil::Element({12345678, -8765432}, odil::VR::SL)); auto item2 = std::make_shared(); item2->add( odil::registry::SelectorFDValue, odil::Element({1.23, -4.56}, odil::VR::FD)); auto odil_data_set = std::make_shared(); odil_data_set->add( odil::registry::SOPClassUID, {odil::registry::RawDataStorage}, odil::VR::UI); odil_data_set->add( odil::registry::SOPInstanceUID, {"1.2.3.4"}, odil::VR::UI); odil_data_set->add( odil::registry::FrameExtractionSequence, odil::Element({item1, item2}, odil::VR::SQ)); do_file_test(odil_data_set); } odil-0.11.0/tests/code/SCPDispatcher.cpp000066400000000000000000000064251362244656000177530ustar00rootroot00000000000000#define BOOST_TEST_MODULE SCPDispatcher #include #include #include #include #include "odil/Association.h" #include "odil/EchoSCP.h" #include "odil/Exception.h" #include "odil/SCPDispatcher.h" #include "odil/message/Message.h" #include "odil/message/Response.h" struct Status { int client; std::string server; bool called; }; void run_server(Status * status, bool with_echo) { odil::Association association; association.set_tcp_timeout(boost::posix_time::seconds(1)); try { association.receive_association(boost::asio::ip::tcp::v4(), 11113); auto echo_scp = std::make_shared(association, [&status](std::shared_ptr) { status->called = true; return odil::message::Response::Success; }); odil::SCPDispatcher dispatcher(association); if(with_echo) { dispatcher.set_scp( odil::message::Message::Command::C_ECHO_RQ, echo_scp); } dispatcher.dispatch(); // Should throw with peer closing connection association.receive_message(); } catch(odil::AssociationAborted const &) { status->server = "abort"; } catch(odil::AssociationReleased const &) { status->server = "release"; } catch(odil::Exception const & e) { status->server = e.what(); } catch(...) { status->server = "Other exception"; } } void run_echo_client(Status * status) { std::string command = "echoscu -ll error"; command += " 127.0.0.1 11113"; status->client = system(command.c_str()); } BOOST_AUTO_TEST_CASE(Empty) { odil::Association association; odil::SCPDispatcher dispatcher(association); BOOST_REQUIRE_EQUAL( dispatcher.has_scp(odil::message::Message::Command::C_ECHO_RQ), false); BOOST_REQUIRE_THROW( dispatcher.get_scp(odil::message::Message::Command::C_ECHO_RQ), odil::Exception); } BOOST_AUTO_TEST_CASE(SCP) { odil::Association association; odil::SCPDispatcher dispatcher(association); auto scp = std::make_shared(association); dispatcher.set_scp( odil::message::Message::Command::C_ECHO_RQ, scp); BOOST_REQUIRE_NO_THROW( dispatcher.get_scp(odil::message::Message::Command::C_ECHO_RQ)); } BOOST_AUTO_TEST_CASE(DispatchWithEcho) { Status status = { -1, "", false }; std::thread server(run_server, &status, true); std::this_thread::sleep_for(std::chrono::milliseconds(100)); std::thread client(run_echo_client, &status); server.join(); client.join(); BOOST_REQUIRE_EQUAL(status.client, 0); BOOST_REQUIRE_EQUAL(status.server, "release"); BOOST_REQUIRE_EQUAL(status.called, true); } BOOST_AUTO_TEST_CASE(DispatchWithoutEcho) { Status status = { -1, "", false }; std::thread server(run_server, &status, false); std::this_thread::sleep_for(std::chrono::milliseconds(100)); std::thread client(run_echo_client, &status); server.join(); client.join(); BOOST_REQUIRE_EQUAL(status.client, 0); BOOST_REQUIRE_EQUAL(status.server, "No provider for: 0030"); BOOST_REQUIRE_EQUAL(status.called, false); } odil-0.11.0/tests/code/SCU.cpp000066400000000000000000000015021362244656000157400ustar00rootroot00000000000000#define BOOST_TEST_MODULE SCU #include #include "odil/SCU.h" #include "odil/registry.h" #include "../PeerFixtureBase.h" struct Fixture: public PeerFixtureBase { Fixture() : PeerFixtureBase({ { 1, odil::registry::VerificationSOPClass, {odil::registry::ImplicitVRLittleEndian}, odil::AssociationParameters::PresentationContext::Role::SCU } }) { // Nothing else } }; BOOST_FIXTURE_TEST_CASE(DefaultConstructor, Fixture) { odil::SCU const scu(this->association); BOOST_CHECK_EQUAL(scu.get_affected_sop_class(), ""); } BOOST_FIXTURE_TEST_CASE(AffectedSOPClassUID, Fixture) { odil::SCU scu(this->association); scu.set_affected_sop_class("1.2.3"); BOOST_CHECK_EQUAL(scu.get_affected_sop_class(), "1.2.3"); } odil-0.11.0/tests/code/StoreSCU.cpp000066400000000000000000000044761362244656000167720ustar00rootroot00000000000000#define BOOST_TEST_MODULE StoreSCU #include #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/StoreSCU.h" #include "../PeerFixtureBase.h" struct Fixture: public PeerFixtureBase { std::shared_ptr dataset; Fixture() : PeerFixtureBase({ { 1, odil::registry::RawDataStorage, {odil::registry::ImplicitVRLittleEndian}, odil::AssociationParameters::PresentationContext::Role::SCU } }), dataset(std::make_shared()) { this->dataset->add("ImageType", {"ORIGINAL", "PRIMARY", "OTHER"}); this->dataset->add("PatientID", {"1234"}); this->dataset->add("StudyInstanceUID", {"2.25.386726390606491051215227596277040710"}); this->dataset->add("SeriesInstanceUID", {"2.25.235367796740370588607388995952651763168"}); this->dataset->add("SOPClassUID", {odil::registry::RawDataStorage}); this->dataset->add("SOPInstanceUID", {"2.25.294312554735929033890522327215919068328"}); } }; BOOST_FIXTURE_TEST_CASE(AffectedSOPClassUID, Fixture) { auto dataset = std::make_shared(); dataset->add("SOPClassUID", {odil::registry::RawDataStorage}); odil::StoreSCU scu(this->association); scu.set_affected_sop_class(dataset); BOOST_CHECK_EQUAL(scu.get_affected_sop_class(), odil::registry::RawDataStorage); } BOOST_FIXTURE_TEST_CASE(AffectedSOPClassUIDNoSOPClassUID, Fixture) { auto dataset = std::make_shared(); odil::StoreSCU scu(this->association); BOOST_CHECK_THROW(scu.set_affected_sop_class(dataset), odil::Exception); } BOOST_FIXTURE_TEST_CASE(AffectedSOPClassUIDUnknownSOPClassUID, Fixture) { auto dataset = std::make_shared(); dataset->add("SOPClassUID", {"invalid"}); odil::StoreSCU scu(this->association); BOOST_CHECK_THROW(scu.set_affected_sop_class(dataset), odil::Exception); } BOOST_FIXTURE_TEST_CASE(Store, Fixture) { odil::StoreSCU scu(this->association); scu.set_affected_sop_class(this->dataset); scu.store(this->dataset); } BOOST_FIXTURE_TEST_CASE(StoreMove, Fixture) { odil::StoreSCU scu(this->association); scu.set_affected_sop_class(this->dataset); scu.store(std::move(this->dataset)); } odil-0.11.0/tests/code/Tag.cpp000066400000000000000000000110761362244656000160300ustar00rootroot00000000000000#define BOOST_TEST_MODULE Tag #include #include "odil/Exception.h" #include "odil/Tag.h" BOOST_AUTO_TEST_CASE(TwoArgumentsConstructor) { odil::Tag const tag(0xdead, 0xbeef); BOOST_CHECK_EQUAL(tag.group, 0xdead); BOOST_CHECK_EQUAL(tag.element, 0xbeef); } BOOST_AUTO_TEST_CASE(OneArgumentConstructor) { odil::Tag const tag(0xdeadbeef); BOOST_CHECK_EQUAL(tag.group, 0xdead); BOOST_CHECK_EQUAL(tag.element, 0xbeef); } BOOST_AUTO_TEST_CASE(StringConstructor) { odil::Tag const tag(std::string("PixelData")); BOOST_CHECK_EQUAL(tag.group, 0x7fe0); BOOST_CHECK_EQUAL(tag.element, 0x0010); } BOOST_AUTO_TEST_CASE(CharConstructor) { odil::Tag const tag("PixelData"); BOOST_CHECK_EQUAL(tag.group, 0x7fe0); BOOST_CHECK_EQUAL(tag.element, 0x0010); } BOOST_AUTO_TEST_CASE(StringConstructorNumeric) { odil::Tag const tag(std::string("7fe00010")); BOOST_CHECK_EQUAL(tag.group, 0x7fe0); BOOST_CHECK_EQUAL(tag.element, 0x0010); } BOOST_AUTO_TEST_CASE(CharConstructorNumeric) { odil::Tag const tag("7fe00010"); BOOST_CHECK_EQUAL(tag.group, 0x7fe0); BOOST_CHECK_EQUAL(tag.element, 0x0010); } BOOST_AUTO_TEST_CASE(StringConstructorWrong) { BOOST_CHECK_THROW(odil::Tag(std::string("Foobar")), odil::Exception); } BOOST_AUTO_TEST_CASE(CharConstructorWrong) { BOOST_CHECK_THROW(odil::Tag("Foobar"), odil::Exception); } BOOST_AUTO_TEST_CASE(StringConstructorNumericWrong) { BOOST_CHECK_THROW(odil::Tag(std::string("XXXXYYYY")), odil::Exception); } BOOST_AUTO_TEST_CASE(CharConstructorNumericWrong) { BOOST_CHECK_THROW(odil::Tag("XXXXYYYY"), odil::Exception); } BOOST_AUTO_TEST_CASE(CopyConstructor) { odil::Tag const tag(0xdead, 0xbeef); odil::Tag const other(tag); BOOST_CHECK_EQUAL(other.group, 0xdead); BOOST_CHECK_EQUAL(other.element, 0xbeef); } BOOST_AUTO_TEST_CASE(IsPrivate) { odil::Tag const tag1(0xdead, 0xbeef); odil::Tag const tag2(0x7fe0, 0x0010); BOOST_CHECK(tag1.is_private()); BOOST_CHECK(!tag2.is_private()); } BOOST_AUTO_TEST_CASE(Name) { odil::Tag const tag(0x7fe0, 0x0010); std::string const name = tag.get_name(); BOOST_CHECK_EQUAL(name, "PixelData"); } BOOST_AUTO_TEST_CASE(NameRepeatingGroup) { odil::Tag const tag(0x6012, 0x0010); std::string const name = tag.get_name(); BOOST_CHECK_EQUAL(name, "OverlayRows"); } BOOST_AUTO_TEST_CASE(NameWrong) { odil::Tag const tag(0xEEEE, 0xEEEE); BOOST_CHECK_THROW(tag.get_name(), odil::Exception); } BOOST_AUTO_TEST_CASE(Equality) { odil::Tag const tag1(0xdead, 0xbeef); odil::Tag const tag2(0xdead, 0xbeef); odil::Tag const tag3(0xbeef, 0xf00d); BOOST_CHECK(tag1 == tag2); BOOST_CHECK( ! (tag1 == tag3) ); } BOOST_AUTO_TEST_CASE(Difference) { odil::Tag const tag1(0xdead, 0xbeef); odil::Tag const tag2(0xdead, 0xbeef); odil::Tag const tag3(0xbeef, 0xf00d); BOOST_CHECK( ! (tag1 != tag2) ); BOOST_CHECK(tag1 != tag3); } BOOST_AUTO_TEST_CASE(Inferior) { odil::Tag const tag1(0xdead, 0xbeef); odil::Tag const tag2(0xdead, 0xf00d); odil::Tag const tag3(0xbeef, 0xf00d); BOOST_CHECK(tag1 < tag2); BOOST_CHECK(tag3 < tag1); BOOST_CHECK( ! (tag2 < tag1) ); BOOST_CHECK( ! (tag1 < tag3) ); } BOOST_AUTO_TEST_CASE(Superior) { odil::Tag const tag1(0xdead, 0xbeef); odil::Tag const tag2(0xdead, 0xf00d); odil::Tag const tag3(0xbeef, 0xf00d); BOOST_CHECK(tag2 > tag1); BOOST_CHECK(tag1 > tag3); BOOST_CHECK( ! (tag1 > tag2) ); BOOST_CHECK( ! (tag3 > tag1) ); } BOOST_AUTO_TEST_CASE(InferiorOrEqual) { odil::Tag const tag1(0xdead, 0xbeef); odil::Tag const tag2(0xdead, 0xf00d); odil::Tag const tag3(0xbeef, 0xf00d); odil::Tag const tag4(0xdead, 0xbeef); BOOST_CHECK(tag1 <= tag2); BOOST_CHECK(tag3 <= tag1); BOOST_CHECK(tag1 <= tag4); BOOST_CHECK( ! (tag2 <= tag1) ); BOOST_CHECK( ! (tag1 <= tag3) ); } BOOST_AUTO_TEST_CASE(SuperiorOrEqual) { odil::Tag const tag1(0xdead, 0xbeef); odil::Tag const tag2(0xdead, 0xf00d); odil::Tag const tag3(0xbeef, 0xf00d); odil::Tag const tag4(0xdead, 0xbeef); BOOST_CHECK(tag2 >= tag1); BOOST_CHECK(tag1 >= tag3); BOOST_CHECK(tag1 >= tag4); BOOST_CHECK( ! (tag1 >= tag2) ); BOOST_CHECK( ! (tag3 >= tag1) ); } BOOST_AUTO_TEST_CASE(StreamInsertion) { odil::Tag const tag(0xdead, 0xbeef); std::ostringstream stream; stream << tag; BOOST_CHECK_EQUAL(stream.str(), "deadbeef"); } BOOST_AUTO_TEST_CASE(StringConversion) { odil::Tag const tag(0xdead, 0xbeef); BOOST_CHECK_EQUAL(std::string(tag), "deadbeef"); } odil-0.11.0/tests/code/VR.cpp000066400000000000000000000013111362244656000156330ustar00rootroot00000000000000#define BOOST_TEST_MODULE VR #include #include "odil/Exception.h" #include "odil/VR.h" BOOST_AUTO_TEST_CASE(as_string) { odil::VR const vr(odil::VR::AT); std::string const string = odil::as_string(vr); BOOST_CHECK_EQUAL(string, "AT"); } BOOST_AUTO_TEST_CASE(as_string_invalid) { odil::VR const vr(odil::VR::INVALID); BOOST_CHECK_THROW(odil::as_string(vr), odil::Exception); } BOOST_AUTO_TEST_CASE(as_vr) { std::string const string("AT"); odil::VR const vr = odil::as_vr(string); BOOST_CHECK(vr == odil::VR::AT); } BOOST_AUTO_TEST_CASE(as_vr_wrong) { std::string const string("XX"); BOOST_CHECK_THROW(odil::as_vr(string), odil::Exception); } odil-0.11.0/tests/code/VRFinder.cpp000066400000000000000000000132711362244656000167730ustar00rootroot00000000000000#define BOOST_TEST_MODULE VRFinder #include #include #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/registry.h" #include "odil/Tag.h" #include "odil/VR.h" #include "odil/VRFinder.h" odil::VR user_defined_finder( odil::Tag const & tag, std::shared_ptr, std::string const &, bool & called) { if(tag == odil::Tag(0xeeee, 0xeeee)) { called = true; return odil::VR::UR; } else { throw odil::Exception("Not applicable"); } } BOOST_AUTO_TEST_CASE(DefaultConstructor) { odil::VRFinder finder; BOOST_REQUIRE_EQUAL(finder.finders.empty(), true); } BOOST_AUTO_TEST_CASE(PublicDictionary) { auto const vr = odil::VRFinder::public_dictionary( odil::Tag(0x0010, 0x0010), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::PN); } BOOST_AUTO_TEST_CASE(PublicDictionaryRepeatingGroup) { auto const vr = odil::VRFinder::public_dictionary( odil::Tag(0x6012, 0x0010), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::US); } BOOST_AUTO_TEST_CASE(PublicDictionaryNotApplicable) { auto const vr = odil::VRFinder::public_dictionary( odil::Tag(0x0011, 0x0011), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::UNKNOWN); } BOOST_AUTO_TEST_CASE(GroupLength) { auto const vr = odil::VRFinder::group_length( odil::Tag(0x0010, 0x0000), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::UL); } BOOST_AUTO_TEST_CASE(GroupLengthNotApplicable) { auto const vr = odil::VRFinder::group_length( odil::Tag(0x0010, 0x0010), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::UNKNOWN); } BOOST_AUTO_TEST_CASE(PrivateTag) { auto const vr = odil::VRFinder::private_tag( odil::Tag(0x0011, 0x0011), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::UN); } BOOST_AUTO_TEST_CASE(PrivateTagNotApplicable) { auto const vr = odil::VRFinder::private_tag( odil::Tag(0x0010, 0x0010), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::UNKNOWN); } BOOST_AUTO_TEST_CASE(ImplictiVRLittleEndian) { auto const vr = odil::VRFinder::implicit_vr_little_endian( odil::Tag(0x7fe0, 0x0010), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::OW); } BOOST_AUTO_TEST_CASE(ImplictiVRLittleEndianNotApplicableTag) { auto const vr = odil::VRFinder::implicit_vr_little_endian( odil::Tag(0x0010, 0x0010), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::UNKNOWN); } BOOST_AUTO_TEST_CASE(ImplictiVRLittleEndianNotApplicableVR) { auto const vr = odil::VRFinder::implicit_vr_little_endian( odil::Tag(0x7fe0, 0x0010), std::make_shared(), odil::registry::ExplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::UNKNOWN); } BOOST_AUTO_TEST_CASE(PublicElement) { odil::VRFinder finder; auto const vr = finder( odil::Tag(0x0010, 0x0010), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::PN); } BOOST_AUTO_TEST_CASE(GroupLengthElement) { odil::VRFinder finder; auto const vr = finder( odil::Tag(0x0010, 0x0000), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::UL); } BOOST_AUTO_TEST_CASE(PrivateElement) { odil::VRFinder finder; auto const vr = finder( odil::Tag(0x0011, 0x0011), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::UN); } BOOST_AUTO_TEST_CASE(TSDependentElement) { odil::VRFinder finder; auto const vr = finder( odil::Tag(0x7fe0, 0x0010), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::OW); } BOOST_AUTO_TEST_CASE(UserFinder) { bool called = false; auto const my_finder_function = [&called] ( odil::Tag const & tag, std::shared_ptr data_set, std::string const & ts ) { return user_defined_finder(tag, data_set, ts, called); }; odil::VRFinder finder; finder.finders.push_back(my_finder_function); finder( odil::Tag(0xeeee, 0xeeee), std::make_shared(), odil::registry::ImplicitVRLittleEndian ); BOOST_REQUIRE_EQUAL(called, true); } BOOST_AUTO_TEST_CASE(NoVRFoundDefault) { odil::VRFinder finder; auto const vr = finder( odil::Tag(0xcccc, 0xcccc), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::UN); } BOOST_AUTO_TEST_CASE(NoVRFoundNonStrict) { odil::VRFinder finder(false); auto const vr = finder( odil::Tag(0xcccc, 0xcccc), std::make_shared(), odil::registry::ImplicitVRLittleEndian); BOOST_REQUIRE(vr == odil::VR::UN); } BOOST_AUTO_TEST_CASE(NoVRFoundStrict) { odil::VRFinder finder(true); BOOST_REQUIRE_THROW( finder( odil::Tag(0xcccc, 0xcccc), std::make_shared(), odil::registry::ImplicitVRLittleEndian ), odil::Exception); } odil-0.11.0/tests/code/Value.cpp000066400000000000000000000133511362244656000163670ustar00rootroot00000000000000#define BOOST_TEST_MODULE Value #include #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/Value.h" template void test_contents( odil::Value const & value, TContainer const & contents, odil::Value::Type type, TContainer const & (odil::Value::*getter)() const) { BOOST_CHECK(value.get_type() == type); BOOST_CHECK_EQUAL(value.empty(), contents.empty()); BOOST_CHECK_EQUAL(value.size(), contents.size()); BOOST_CHECK((value.*getter)() == contents); if(type != odil::Value::Type::Integers) { BOOST_CHECK_THROW(value.as_integers(), odil::Exception); } if(type != odil::Value::Type::Reals) { BOOST_CHECK_THROW(value.as_reals(), odil::Exception); } if(type != odil::Value::Type::Strings) { BOOST_CHECK_THROW(value.as_strings(), odil::Exception); } if(type != odil::Value::Type::DataSets) { BOOST_CHECK_THROW(value.as_data_sets(), odil::Exception); } if(type != odil::Value::Type::Binary) { BOOST_CHECK_THROW(value.as_binary(), odil::Exception); } } template void test_container( TContainer const & contents, odil::Value::Type type, TContainer const & (odil::Value::*getter)() const) { odil::Value const value(contents); test_contents(value, contents, type, getter); auto contents_copy(contents); odil::Value const other_value(std::move(contents_copy)); BOOST_CHECK(contents_copy.empty()); } template void test_initializer_list( std::initializer_list const & contents, odil::Value::Type type, TContainer const & (odil::Value::*getter)() const) { odil::Value const value(contents); test_contents(value, TContainer(contents), type, getter); } template void test_modify( TContainer const & contents, TContainer const & (odil::Value::*getter)() const, TContainer & (odil::Value::*setter)()) { odil::Value value(TContainer{{contents[0]}}); (value.*setter)().push_back(contents[1]); BOOST_CHECK((value.*getter)() == contents); } template void test_clear(TContainer const & contents, odil::Value::Type type) { odil::Value value(contents); value.clear(); BOOST_CHECK(value.get_type() == type); BOOST_CHECK(value.empty()); } template void test_equality( TContainer const & contents_1, TContainer const & contents_2) { odil::Value const value_1(contents_1); odil::Value const value_2(contents_1); odil::Value const value_3(contents_2); odil::Value const value_4(contents_2); BOOST_CHECK(value_1 == value_2); BOOST_CHECK( ! (value_1 == value_3)); BOOST_CHECK( ! (value_1 == value_4)); BOOST_CHECK(! (value_1 != value_2)); BOOST_CHECK(value_1 != value_3); BOOST_CHECK(value_1 != value_4); } struct Visitor { typedef std::string result_type; template result_type operator()(T const & container) const { return typeid(container).name(); } }; template void test_visitor( TContainer const & contents) { odil::Value const value(contents); BOOST_REQUIRE_EQUAL( odil::apply_visitor(Visitor(), value), typeid(TContainer).name()); } template void test( std::initializer_list const & contents, std::initializer_list const & other_contents, odil::Value::Type type, TContainer const & (odil::Value::*getter)() const, TContainer & (odil::Value::*setter)()) { TContainer const container(contents); TContainer const other_container(other_contents); test_container(TContainer(), type, getter); test_container(container, type, getter); test_initializer_list(contents, type, getter); test_modify(container, getter, setter); test_clear(container, type); test_equality(container, other_container); test_visitor(container); } BOOST_AUTO_TEST_CASE(Integers) { BOOST_CHECK( odil::Value({1234, 5678}).get_type() == odil::Value::Type::Integers); test( {1234, 5678}, {9012, 3456}, odil::Value::Type::Integers, &odil::Value::as_integers, &odil::Value::as_integers); } BOOST_AUTO_TEST_CASE(Reals) { BOOST_CHECK( odil::Value({12.34, 56.78}).get_type() == odil::Value::Type::Reals); test( {12.34, 56.78}, {1., 2.}, odil::Value::Type::Reals, &odil::Value::as_reals, &odil::Value::as_reals); } BOOST_AUTO_TEST_CASE(Strings) { BOOST_CHECK( odil::Value({"foo", "bar"}).get_type() == odil::Value::Type::Strings); test( {"foo", "bar"}, {"plip", "plop"}, odil::Value::Type::Strings, &odil::Value::as_strings, &odil::Value::as_strings); } BOOST_AUTO_TEST_CASE(DataSets) { auto data_set_1 = std::make_shared(); data_set_1->add("PatientID", {"DJ1234"}); auto data_set_2 = std::make_shared(); data_set_2->add("EchoTime", {100}); BOOST_CHECK( odil::Value({data_set_1, data_set_2}).get_type() == odil::Value::Type::DataSets); test( {data_set_1, data_set_2}, {data_set_2, data_set_1}, odil::Value::Type::DataSets, &odil::Value::as_data_sets, &odil::Value::as_data_sets); } BOOST_AUTO_TEST_CASE(Binary) { BOOST_CHECK( odil::Value({{0x1, 0x2}, {0x3}}).get_type() == odil::Value::Type::Binary); test( {{0x1, 0x2}, {0x3}}, {{0x4}, {0x5, 0x6}}, odil::Value::Type::Binary, &odil::Value::as_binary, &odil::Value::as_binary); } odil-0.11.0/tests/code/Writer.cpp000066400000000000000000000250001362244656000165610ustar00rootroot00000000000000#define BOOST_TEST_MODULE Writer #include #include #include #include #include #include "odil/endian.h" #include "odil/Element.h" #include "odil/registry.h" #include "odil/Writer.h" #include "odil/VR.h" #include "odil/dcmtk/conversion.h" BOOST_AUTO_TEST_CASE(Constructor) { std::ostringstream stream; odil::Writer const writer(stream, odil::ByteOrdering::BigEndian, true); BOOST_REQUIRE(writer.byte_ordering == odil::ByteOrdering::BigEndian); BOOST_REQUIRE(writer.explicit_vr == true); } BOOST_AUTO_TEST_CASE(ConstructorTransferSyntax) { std::ostringstream stream; odil::Writer const writer(stream, odil::registry::ExplicitVRBigEndian_Retired); BOOST_REQUIRE(writer.byte_ordering == odil::ByteOrdering::BigEndian); BOOST_REQUIRE(writer.explicit_vr == true); } void do_test( std::shared_ptr odil_data_set, std::string transfer_syntax, odil::Writer::ItemEncoding item_encoding, bool use_group_length) { // Write input data set std::stringstream stream; odil::Writer const writer( stream, transfer_syntax, item_encoding, use_group_length); writer.write_data_set(odil_data_set); // Store data in a DCMTK stream std::string const data = stream.str(); DcmInputBufferStream dcmtk_stream; dcmtk_stream.setBuffer(&data[0], data.size()); // Read output data set DcmDataset dcmtk_data_set; dcmtk_data_set.transferInit(); OFCondition const condition = dcmtk_data_set.read( dcmtk_stream, DcmXfer(transfer_syntax.c_str()).getXfer()); BOOST_REQUIRE(condition == EC_Normal || condition == EC_StreamNotifyClient); BOOST_REQUIRE_EQUAL(dcmtk_stream.avail(), 0); dcmtk_data_set.transferEnd(); auto const other_odil_dataset = odil::dcmtk::convert(&dcmtk_data_set); BOOST_REQUIRE(*odil_data_set == *other_odil_dataset); } void do_test(std::shared_ptr odil_data_set) { std::vector const transfer_syntaxes = { odil::registry::ImplicitVRLittleEndian, odil::registry::ExplicitVRLittleEndian, odil::registry::ExplicitVRBigEndian_Retired }; std::vector item_encodings = { odil::Writer::ItemEncoding::ExplicitLength, odil::Writer::ItemEncoding::UndefinedLength }; std::vector use_group_length_values = {/*true, */false}; for(auto const & transfer_syntax: transfer_syntaxes) { for(auto const & item_encoding: item_encodings) { for(auto const & use_group_length: use_group_length_values) { do_test( odil_data_set, transfer_syntax, item_encoding, use_group_length); } } } } BOOST_AUTO_TEST_CASE(AT) { odil::Element odil_element({"00100020", "0008103e"}, odil::VR::AT); auto odil_data_set = std::make_shared(); odil_data_set->add(odil::registry::SelectorATValue, odil_element); do_test(odil_data_set); } BOOST_AUTO_TEST_CASE(CS) { odil::Element odil_element({"ABC", "DEF"}, odil::VR::CS); auto odil_data_set = std::make_shared(); odil_data_set->add(odil::registry::SelectorCSValue, odil_element); do_test(odil_data_set); } BOOST_AUTO_TEST_CASE(DS) { odil::Element odil_element({24.5282145946261, -4.56}, odil::VR::DS); auto odil_data_set = std::make_shared(); odil_data_set->add(odil::registry::SelectorDSValue, odil_element); do_test(odil_data_set); } BOOST_AUTO_TEST_CASE(FD) { odil::Element odil_element({1.23, -4.56}, odil::VR::FD); auto odil_data_set = std::make_shared(); odil_data_set->add(odil::registry::SelectorFDValue, odil_element); do_test(odil_data_set); } BOOST_AUTO_TEST_CASE(FL) { odil::Element odil_element({0.5, -0.125}, odil::VR::FL); auto odil_data_set = std::make_shared(); odil_data_set->add(odil::registry::SelectorFLValue, odil_element); do_test(odil_data_set); } BOOST_AUTO_TEST_CASE(IS) { odil::Element odil_element({123, -456}, odil::VR::IS); auto odil_data_set = std::make_shared(); odil_data_set->add(odil::registry::SelectorISValue, odil_element); do_test(odil_data_set); } BOOST_AUTO_TEST_CASE(OB) { odil::Element odil_element( odil::Value::Binary({{0x01, 0x02, 0x03, 0x04}}), odil::VR::OB); auto odil_data_set = std::make_shared(); odil_data_set->add(odil::registry::EncapsulatedDocument, odil_element); do_test(odil_data_set); } BOOST_AUTO_TEST_CASE(OF) { odil::Element odil_element( odil::Value::Binary({{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}}), odil::VR::OF); auto odil_data_set = std::make_shared(); odil_data_set->add(odil::registry::VectorGridData, odil_element); do_test(odil_data_set); } BOOST_AUTO_TEST_CASE(OW) { odil::Element odil_element( odil::Value::Binary({{0x01, 0x02, 0x03, 0x04}}), odil::VR::OW); auto odil_data_set = std::make_shared(); odil_data_set->add(odil::registry::RedPaletteColorLookupTableData, odil_element); do_test(odil_data_set); } BOOST_AUTO_TEST_CASE(SL) { odil::Element odil_element({12345678, -8765432}, odil::VR::SL); auto odil_data_set = std::make_shared(); odil_data_set->add(odil::registry::SelectorSLValue, odil_element); do_test(odil_data_set); } BOOST_AUTO_TEST_CASE(SQ) { auto item1 = std::make_shared(); item1->add( odil::registry::SelectorSLValue, odil::Element({12345678, -8765432}, odil::VR::SL)); auto item2 = std::make_shared(); item2->add( odil::registry::SelectorFDValue, odil::Element({1.23, -4.56}, odil::VR::FD)); auto odil_data_set = std::make_shared(); odil_data_set->add(odil::registry::FrameExtractionSequence, odil::Element({item1, item2}, odil::VR::SQ)); do_test(odil_data_set); } BOOST_AUTO_TEST_CASE(SS) { odil::Element odil_element({1234, -5678}, odil::VR::SS); auto odil_data_set = std::make_shared(); odil_data_set->add(odil::registry::SelectorSSValue, odil_element); do_test(odil_data_set); } BOOST_AUTO_TEST_CASE(UI) { odil::Element odil_element({"1.2", "3.4"}, odil::VR::UI); auto odil_data_set = std::make_shared(); // SelectorUIValue is not in current DCMTK odil_data_set->add(odil::registry::SOPInstanceUID, odil_element); do_test(odil_data_set); } BOOST_AUTO_TEST_CASE(UL) { odil::Element odil_element({12345678, 8765432}, odil::VR::UL); auto odil_data_set = std::make_shared(); odil_data_set->add(odil::registry::SelectorULValue, odil_element); do_test(odil_data_set); } BOOST_AUTO_TEST_CASE(US) { odil::Element odil_element({1234, 5678}, odil::VR::US); auto odil_data_set = std::make_shared(); odil_data_set->add(odil::registry::SelectorUSValue, odil_element); do_test(odil_data_set); } void do_file_test( std::shared_ptr odil_data_set, std::string transfer_syntax, odil::Writer::ItemEncoding item_encoding, bool use_group_length) { // Write input data set std::stringstream stream; odil::Writer::write_file( odil_data_set, stream, std::make_shared(), transfer_syntax, item_encoding, use_group_length); // Store data in a DCMTK stream std::string const data = stream.str(); DcmInputBufferStream dcmtk_stream; dcmtk_stream.setBuffer(&data[0], data.size()); // Read output data set DcmFileFormat format; format.transferInit(); OFCondition const condition = format.read(dcmtk_stream); BOOST_REQUIRE(condition == EC_Normal || condition == EC_StreamNotifyClient); BOOST_REQUIRE_EQUAL(dcmtk_stream.avail(), 0); format.transferEnd(); DcmMetaInfo * dcmtk_meta_information = format.getMetaInfo(); auto const odil_meta_information = odil::dcmtk::convert(dcmtk_meta_information); BOOST_REQUIRE( odil_meta_information->as_string(odil::registry::TransferSyntaxUID) == odil::Value::Strings({ transfer_syntax })); DcmDataset * dcmtk_data_set = format.getDataset(); auto const other_odil_dataset = odil::dcmtk::convert(dcmtk_data_set); BOOST_REQUIRE(*odil_data_set == *other_odil_dataset); BOOST_REQUIRE( odil_meta_information->as_string(odil::registry::MediaStorageSOPClassUID) == other_odil_dataset->as_string(odil::registry::SOPClassUID)); BOOST_REQUIRE( odil_meta_information->as_string(odil::registry::MediaStorageSOPInstanceUID) == other_odil_dataset->as_string(odil::registry::SOPInstanceUID)); } void do_file_test(std::shared_ptr odil_data_set) { std::vector const transfer_syntaxes = { odil::registry::ImplicitVRLittleEndian, odil::registry::ExplicitVRLittleEndian, odil::registry::ExplicitVRBigEndian_Retired }; std::vector item_encodings = { odil::Writer::ItemEncoding::ExplicitLength, odil::Writer::ItemEncoding::UndefinedLength }; std::vector use_group_length_values = {/*true, */false}; for(auto const & transfer_syntax: transfer_syntaxes) { for(auto const & item_encoding: item_encodings) { for(auto const & use_group_length: use_group_length_values) { do_file_test( odil_data_set, transfer_syntax, item_encoding, use_group_length); } } } } BOOST_AUTO_TEST_CASE(File) { auto item1 = std::make_shared(); item1->add( odil::registry::SelectorSLValue, odil::Element({12345678, -8765432}, odil::VR::SL)); auto item2 = std::make_shared(); item2->add( odil::registry::SelectorFDValue, odil::Element({1.23, -4.56}, odil::VR::FD)); auto odil_data_set = std::make_shared(); odil_data_set->add( odil::registry::SOPClassUID, {odil::registry::RawDataStorage}, odil::VR::UI); odil_data_set->add( odil::registry::SOPInstanceUID, {"1.2.3.4"}, odil::VR::UI); odil_data_set->add( odil::registry::FrameExtractionSequence, odil::Element({item1, item2}, odil::VR::SQ)); do_file_test(odil_data_set); } odil-0.11.0/tests/code/base64.cpp000066400000000000000000000041471362244656000164020ustar00rootroot00000000000000#define BOOST_TEST_MODULE Base64 #include #include #include #include "odil/base64.h" void test_encode(std::string const & data, std::string const & expected) { std::string encoded; encoded.reserve(data.size()*4/3); odil::base64::encode( data.begin(), data.end(), std::back_inserter(encoded)); BOOST_REQUIRE_EQUAL(encoded, expected); } void test_decode(std::string const & data, std::string const & expected) { std::string decoded; decoded.reserve(data.size()*3/4); odil::base64::decode( data.begin(), data.end(), std::back_inserter(decoded)); BOOST_REQUIRE_EQUAL(decoded, expected); } BOOST_AUTO_TEST_CASE(EncodeEmpty) { test_encode("", ""); } BOOST_AUTO_TEST_CASE(Encode1) { test_encode( "Lorem ipsum dolor sit amet.", "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQu"); } BOOST_AUTO_TEST_CASE(Encode2) { test_encode( "Lorem ipsum dolor sit amet", "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ="); } BOOST_AUTO_TEST_CASE(Encode3) { test_encode( "Lorem ipsum dolor sit ame", "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZQ=="); } BOOST_AUTO_TEST_CASE(DecodeEmpty) { test_decode("", ""); } BOOST_AUTO_TEST_CASE(Decode1) { test_decode( "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQu", "Lorem ipsum dolor sit amet."); } BOOST_AUTO_TEST_CASE(Decode2) { test_decode( "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ=", "Lorem ipsum dolor sit amet"); } BOOST_AUTO_TEST_CASE(Decode3) { test_decode( "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZQ==", "Lorem ipsum dolor sit ame"); } BOOST_AUTO_TEST_CASE(AllStates) { uint8_t data[3]; uint8_t encoded[4]; uint8_t decoded[3]; for(int z=0; z<256; ++z) { for(int y=0; y<256; ++y) { for(int x=0; x<256; ++x) { data[0] = x; data[1] = y; data[2] = z; odil::base64::encode(data, data+3, encoded); odil::base64::decode(encoded, encoded+4, decoded); BOOST_REQUIRE(std::equal(data, data+3, decoded)); } } } } odil-0.11.0/tests/code/conversion.cpp000066400000000000000000000321301362244656000174740ustar00rootroot00000000000000#define BOOST_TEST_MODULE conversion #include #include #include #include "odil/DataSet.h" #include "odil/Tag.h" #include "odil/Value.h" #include "odil/VR.h" #include "odil/dcmtk/VRTraits.h" #include "odil/dcmtk/conversion.h" #include "odil/dcmtk/ElementAccessor.h" BOOST_AUTO_TEST_CASE(TagFromDcmtkpp) { odil::Tag const source(0xdead, 0xbeef); DcmTagKey const destination = odil::dcmtk::convert(source); BOOST_CHECK_EQUAL(destination.getGroup(), 0xdead); BOOST_CHECK_EQUAL(destination.getElement(), 0xbeef); } BOOST_AUTO_TEST_CASE(TagFromDcmtk) { DcmTagKey const source(0xdead, 0xbeef); odil::Tag const destination = odil::dcmtk::convert(source); BOOST_CHECK_EQUAL(destination.group, 0xdead); BOOST_CHECK_EQUAL(destination.element, 0xbeef); } template void compare(TValueType const & t1, TValueType const & t2) { BOOST_CHECK_EQUAL(t1, t2); } template<> void compare( odil::Value::Reals::value_type const & t1, odil::Value::Reals::value_type const & t2) { BOOST_CHECK_CLOSE(t1, t2, 1e-6); } template void test_element_from_odil( TInputType const & source_value, TInputType const & (odil::Element::*getter)() const) { odil::Tag const source_tag(0xdead, 0xbeef); DcmTagKey const destination_tag = odil::dcmtk::convert(source_tag); odil::Element const source(source_value, VVR); DcmElement * destination = odil::dcmtk::convert(source_tag, source); BOOST_CHECK_NE(destination, (DcmElement const *)(NULL)); BOOST_CHECK_EQUAL(destination->getVR(), VEVR); BOOST_CHECK_NE( dynamic_cast(destination), (TOutputType *)(NULL)); BOOST_CHECK_EQUAL(destination->getVM(), source.size()); for(std::size_t i=0; i::ValueType ValueType; if(typeid(TInputType) == typeid(odil::Value::Reals)) { compare( odil::dcmtk::ElementAccessor::element_get(*destination, i), (source.*getter)()[i]); } else { BOOST_CHECK_EQUAL( odil::dcmtk::ElementAccessor::element_get(*destination, i), (source.*getter)()[i]); } } } template void test_element_to_odil( TInputType const & source_value, TInputType const & (odil::Element::*getter)() const) { DcmTag const source_tag(0xdead, 0xbeef, VEVR); TElementType source(source_tag); if(typeid(TInputType) == typeid(odil::Value::Strings) || VEVR == EVR_IS || VEVR == EVR_DS) { OFString value; if(!source_value.empty()) { auto const last_it = --source_value.end(); auto it = source_value.begin(); while(it != last_it) { std::ostringstream stream; stream << *it; value += stream.str().c_str(); value += "\\"; ++it; } std::ostringstream stream; stream << *last_it; value += stream.str().c_str(); } source.putOFStringArray(value); } else { for(unsigned int i=0; i::ValueType>::element_set( source, item, i); } } odil::Element const destination = odil::dcmtk::convert(&source); BOOST_CHECK(VVR == destination.vr); BOOST_CHECK_EQUAL(source.getVM(), destination.size()); for(std::size_t i=0; i::ValueType ValueType; if(typeid(TInputType) == typeid(odil::Value::Reals)) { compare( odil::dcmtk::ElementAccessor::element_get(source, i), (destination.*getter)()[i]); } else { BOOST_CHECK_EQUAL( odil::dcmtk::ElementAccessor::element_get(source, i), (destination.*getter)()[i]); } } } #define ElementTest(vr, InputType, ElementType, value, getter) \ BOOST_AUTO_TEST_CASE(vr##FromOdil) \ { \ test_element_from_odil< \ odil::VR::vr, EVR_##vr, InputType, ElementType>(value, getter); \ } \ BOOST_AUTO_TEST_CASE(vr##ToOdil) \ { \ test_element_to_odil< \ odil::VR::vr, EVR_##vr, InputType, ElementType>(value, getter); \ } ElementTest( AE, odil::Value::Strings, DcmApplicationEntity, odil::Value::Strings({"foo", "bar"}), &odil::Element::as_string); ElementTest( AS, odil::Value::Strings, DcmAgeString, odil::Value::Strings({"012Y", "345D"}), &odil::Element::as_string); ElementTest( CS, odil::Value::Strings, DcmCodeString, odil::Value::Strings({"foo", "bar"}), &odil::Element::as_string); ElementTest( DA, odil::Value::Strings, DcmDate, odil::Value::Strings({"19000101", "20131215"}), &odil::Element::as_string); ElementTest( DS, odil::Value::Reals, DcmDecimalString, odil::Value::Reals({12.34, 56.78}), &odil::Element::as_real); ElementTest( DT, odil::Value::Strings, DcmDateTime, odil::Value::Strings({"19000101123456", "201312150123"}), &odil::Element::as_string); ElementTest( FL, odil::Value::Reals, DcmFloatingPointSingle, odil::Value::Reals({12.34, 56.78}), &odil::Element::as_real); ElementTest( FD, odil::Value::Reals, DcmFloatingPointDouble, odil::Value::Reals({12.34, 56.78}), &odil::Element::as_real); ElementTest( IS, odil::Value::Integers, DcmIntegerString, odil::Value::Integers({34567, -67890}), &odil::Element::as_int); ElementTest( LO, odil::Value::Strings, DcmLongString, odil::Value::Strings({"foo bar", "something else"}), &odil::Element::as_string); ElementTest( LT, odil::Value::Strings, DcmLongText, odil::Value::Strings({"foo\nbar\\something else"}), &odil::Element::as_string); // OB // OF // OW ElementTest( PN, odil::Value::Strings, DcmPersonName, odil::Value::Strings({"Doe^John", "^Bob^Dr."}), &odil::Element::as_string); ElementTest( SH, odil::Value::Strings, DcmShortString, odil::Value::Strings({"foo", "bar"}), &odil::Element::as_string); ElementTest( SL, odil::Value::Integers, DcmSignedLong, odil::Value::Integers({34567, -56789}), &odil::Element::as_int); ElementTest( SS, odil::Value::Integers, DcmSignedShort, odil::Value::Integers({1234, -5678}), &odil::Element::as_int); ElementTest( ST, odil::Value::Strings, DcmShortText, odil::Value::Strings({"foo\nbar\\something else"}), &odil::Element::as_string); ElementTest( TM, odil::Value::Strings, DcmTime, odil::Value::Strings({"123456", "0123"}), &odil::Element::as_string); ElementTest( UI, odil::Value::Strings, DcmUniqueIdentifier, odil::Value::Strings( {"1.2.840.10008.5.1.4.1.1.4", "1.2.840.10008.5.1.4.1.1.4.1"}), &odil::Element::as_string); ElementTest( UL, odil::Value::Integers, DcmUnsignedLong, odil::Value::Integers({123456, 789012}), &odil::Element::as_int); // UN ElementTest( US, odil::Value::Integers, DcmUnsignedShort, odil::Value::Integers({12345, 6789}), &odil::Element::as_int); ElementTest( UT, odil::Value::Strings, DcmUnlimitedText, odil::Value::Strings({"foo\nbar\\something else"}), &odil::Element::as_string); BOOST_AUTO_TEST_CASE(ATFromDcmtkpp) { odil::Element const source( odil::Value::Strings({"deadbeef", "beeff00d"}), odil::VR::AT); DcmElement * destination = odil::dcmtk::convert( odil::Tag(0x1234, 0x5678), source); BOOST_CHECK_NE(destination, (DcmElement const *)(NULL)); BOOST_CHECK_EQUAL(destination->getVR(), odil::dcmtk::convert(source.vr)); BOOST_CHECK_NE( dynamic_cast(destination), (DcmAttributeTag *)(NULL)); BOOST_CHECK_EQUAL(destination->getVM(), source.size()); for(std::size_t i=0; igetTagVal(destination_tag, i); BOOST_CHECK(condition.good()); BOOST_CHECK(source_tag == odil::dcmtk::convert(destination_tag)); } } BOOST_AUTO_TEST_CASE(ATToDcmtkpp) { DcmAttributeTag source(DcmTag(0x1234, 0x5678, EVR_AT)); source.putTagVal(DcmTagKey(0xdead, 0xbeef), 0); source.putTagVal(DcmTagKey(0xbeef, 0xf00d), 1); odil::Element const destination = odil::dcmtk::convert(&source); BOOST_CHECK(destination.vr == odil::dcmtk::convert(source.getVR())); BOOST_CHECK_EQUAL(source.getVM(), destination.size()); for(std::size_t i=0; i(); item->add("PatientID"); item->as_string("PatientID").push_back("DJ1234"); odil::Element const source( odil::Value::DataSets({item}), odil::VR::SQ); odil::Tag const source_tag(0xdead, 0xbeef); DcmElement * destination = odil::dcmtk::convert(source_tag, source); BOOST_CHECK_NE(destination, (DcmElement const *)(NULL)); BOOST_CHECK_EQUAL(destination->getVR(), odil::dcmtk::convert(source.vr)); BOOST_CHECK_NE( dynamic_cast(destination), (DcmSequenceOfItems *)(NULL)); BOOST_CHECK_EQUAL(destination->getVM(), source.size()); for(std::size_t i=0; i(destination)->getItem(i); BOOST_CHECK(*source_item == *odil::dcmtk::convert(destination_item)); } } BOOST_AUTO_TEST_CASE(SQToDcmtkpp) { DcmDataset * item = new DcmDataset; item->putAndInsertOFStringArray(DCM_PatientID, "DJ1234"); DcmSequenceOfItems source(DcmTag(0xdead, 0xbeef, EVR_SQ)); source.append(item); odil::Element const destination = odil::dcmtk::convert(&source); BOOST_CHECK(destination.vr == odil::dcmtk::convert(source.getVR())); BOOST_CHECK_EQUAL(source.getVM(), destination.size()); for(std::size_t i=0; i(item); BOOST_REQUIRE(source_item != NULL); auto const & destination_item = destination.as_data_set()[i]; BOOST_CHECK(*odil::dcmtk::convert(source_item) == *destination_item); } } BOOST_AUTO_TEST_CASE(EmptyDataSetFromDcmtkpp) { auto empty = std::make_shared(); DcmItem * result = odil::dcmtk::convert(empty); BOOST_CHECK_EQUAL(result->card(), 0); } BOOST_AUTO_TEST_CASE(EmptyDataSetFromDcmtk) { DcmDataset empty; auto const result = odil::dcmtk::convert(&empty); BOOST_CHECK(result->empty()); } BOOST_AUTO_TEST_CASE(DataSetFromDcmtkpp) { odil::Element const patient_id_source( odil::Value::Strings({"DJ1234"}), odil::VR::CS); odil::Element const pixel_spacing_source( odil::Value::Reals({1.23, 4.56}), odil::VR::DS); auto source = std::make_shared(); source->add(odil::Tag("PatientID"), patient_id_source); source->add(odil::Tag("PixelSpacing"), pixel_spacing_source); DcmItem * result = odil::dcmtk::convert(source); BOOST_CHECK_EQUAL(result->card(), 2); DcmElement * patient_id; OFCondition const patient_id_ok = result->findAndGetElement(DCM_PatientID, patient_id); BOOST_CHECK(patient_id_ok.good()); BOOST_CHECK( odil::dcmtk::convert(patient_id).as_string() == patient_id_source.as_string()); DcmElement * pixel_spacing; OFCondition const pixel_spacing_ok = result->findAndGetElement(DCM_PixelSpacing, pixel_spacing); BOOST_CHECK(pixel_spacing_ok.good()); BOOST_CHECK( odil::dcmtk::convert(pixel_spacing).as_real() == pixel_spacing_source.as_real()); } BOOST_AUTO_TEST_CASE(DataSetFromDcmtk) { odil::Element const patient_id_source( odil::Value::Strings({"DJ1234"}), odil::VR::CS); odil::Element const pixel_spacing_source( odil::Value::Reals({1.23, 4.56}), odil::VR::DS); DcmDataset source; source.insert(odil::dcmtk::convert(odil::Tag("PatientID"), patient_id_source)); source.insert(odil::dcmtk::convert(odil::Tag("PixelSpacing"), pixel_spacing_source)); auto const result = odil::dcmtk::convert(&source); BOOST_CHECK_EQUAL(result->size(), 2); BOOST_CHECK( result->as_string(odil::Tag("PatientID")) == patient_id_source.as_string()); BOOST_CHECK( result->as_real(odil::Tag("PixelSpacing")) == pixel_spacing_source.as_real()); } odil-0.11.0/tests/code/dul/000077500000000000000000000000001362244656000153705ustar00rootroot00000000000000odil-0.11.0/tests/code/dul/StateMachine.cpp000066400000000000000000000011221362244656000204350ustar00rootroot00000000000000#define BOOST_TEST_MODULE StateMachine #include #include "odil/Exception.h" #include "odil/dul/EventData.h" #include "odil/dul/StateMachine.h" BOOST_AUTO_TEST_CASE(Constructor) { odil::dul::StateMachine state_machine; BOOST_REQUIRE( state_machine.get_state() == odil::dul::StateMachine::State::Sta1); } BOOST_AUTO_TEST_CASE(WrongTransition) { odil::dul::StateMachine state_machine; odil::dul::EventData data; BOOST_REQUIRE_THROW( state_machine.transition(odil::dul::StateMachine::Event::None, data), odil::Exception); } odil-0.11.0/tests/code/dul/Transport.cpp000066400000000000000000000021711362244656000200710ustar00rootroot00000000000000#define BOOST_TEST_MODULE Transport #include #include #include #include "odil/Exception.h" #include "odil/dul/Transport.h" BOOST_AUTO_TEST_CASE(Constructor) { odil::dul::Transport transport; BOOST_REQUIRE(!transport.is_open()); } BOOST_AUTO_TEST_CASE(Connect) { odil::dul::Transport transport; boost::asio::ip::tcp::resolver resolver(transport.get_service()); boost::asio::ip::tcp::resolver::query const query( odil::dul::Transport::Socket::protocol_type::v4(), "www.example.com", "80"); auto const endpoint_it = resolver.resolve(query); transport.connect(*endpoint_it); BOOST_REQUIRE(transport.is_open()); transport.write("HEAD / HTTP/1.1\r\nHost: www.example.com\r\n\r\n"); auto const response = transport.read(128); BOOST_REQUIRE(!response.empty()); transport.close(); BOOST_REQUIRE(!transport.is_open()); } BOOST_AUTO_TEST_CASE(NotConnected) { odil::dul::Transport transport; BOOST_REQUIRE_THROW(transport.write("..."), odil::Exception); BOOST_REQUIRE_THROW(transport.read(1), odil::Exception); } odil-0.11.0/tests/code/endian.cpp000066400000000000000000000043161362244656000165520ustar00rootroot00000000000000#define BOOST_TEST_MODULE endian #include #include #include "odil/endian.h" BOOST_AUTO_TEST_CASE(ToLittleEndian16) { uint16_t const input = 0x1234; std::string const expected("\x34\x12"); BOOST_REQUIRE_EQUAL( odil::host_to_little_endian(input), *reinterpret_cast(&expected[0]) ); } BOOST_AUTO_TEST_CASE(ToLittleEndian32) { uint32_t const input = 0x12345678; std::string const expected("\x78\x56\x34\x12"); BOOST_REQUIRE_EQUAL( odil::host_to_little_endian(input), *reinterpret_cast(&expected[0]) ); } BOOST_AUTO_TEST_CASE(ToBigEndian16) { uint16_t const input = 0x1234; std::string const expected("\x12\x34"); BOOST_REQUIRE_EQUAL( odil::host_to_big_endian(input), *reinterpret_cast(&expected[0]) ); } BOOST_AUTO_TEST_CASE(ToBigEndian32) { uint32_t const input = 0x12345678; std::string const expected("\x12\x34\x56\x78"); BOOST_REQUIRE_EQUAL( odil::host_to_big_endian(input), *reinterpret_cast(&expected[0]) ); } BOOST_AUTO_TEST_CASE(FromLittleEndian16) { std::string const input("\x34\x12"); uint16_t const expected = 0x1234; BOOST_REQUIRE_EQUAL( odil::little_endian_to_host( *reinterpret_cast(&input[0])), expected ); } BOOST_AUTO_TEST_CASE(FromLittleEndian32) { std::string const input("\x78\x56\x34\x12"); uint32_t const expected = 0x12345678; BOOST_REQUIRE_EQUAL( odil::little_endian_to_host( *reinterpret_cast(&input[0])), expected ); } BOOST_AUTO_TEST_CASE(FromBigEndian16) { std::string const input("\x12\x34"); uint16_t const expected = 0x1234; BOOST_REQUIRE_EQUAL( odil::big_endian_to_host( *reinterpret_cast(&input[0])), expected ); } BOOST_AUTO_TEST_CASE(FromBigEndian32) { std::string const input("\x12\x34\x56\x78"); uint32_t const expected = 0x12345678; BOOST_REQUIRE_EQUAL( odil::big_endian_to_host( *reinterpret_cast(&input[0])), expected ); } odil-0.11.0/tests/code/json_converter.cpp000066400000000000000000000267501362244656000203620ustar00rootroot00000000000000#define BOOST_TEST_MODULE json_converter #include #include #include #include #include #include "odil/DataSet.h" #include "odil/Element.h" #include "odil/json_converter.h" #include "odil/registry.h" #include "odil/Value.h" #include "odil/VR.h" BOOST_AUTO_TEST_CASE(AsJSONEmptyDataSet) { auto data_set = std::make_shared(); auto const json = odil::as_json(data_set); BOOST_REQUIRE(json.empty()); } template void check_json_array( Json::Value const & object, TChecker checker, TGetter getter, TValue const & expected) { BOOST_REQUIRE(object.isArray()); BOOST_REQUIRE_EQUAL(object.size(), expected.size()); for(Json::ArrayIndex i=0; i const & expected_members) { BOOST_REQUIRE(object.isObject()); auto const members = object.getMemberNames(); BOOST_REQUIRE( std::set(members.begin(), members.end()) == expected_members); } void check_json_string(Json::Value const & object, std::string const & expected_value) { BOOST_REQUIRE(object.isString()); BOOST_REQUIRE_EQUAL(object.asString(), expected_value); } BOOST_AUTO_TEST_CASE(AsJSONEmptyElement) { auto data_set = std::make_shared(); data_set->add(0xdeadbeef, odil::VR::SS); auto const json = odil::as_json(data_set); check_json_object(json, {"deadbeef"}); check_json_object(json["deadbeef"], {"vr"}); check_json_string(json["deadbeef"]["vr"], "SS"); } BOOST_AUTO_TEST_CASE(AsJSONIntegers) { auto data_set = std::make_shared(); data_set->add(0xdeadbeef, odil::Element(odil::Value::Integers({1, 2}), odil::VR::SS)); auto const json = odil::as_json(data_set); check_json_object(json, {"deadbeef"}); check_json_object(json["deadbeef"], {"vr", "Value"}); check_json_string(json["deadbeef"]["vr"], "SS"); check_json_array(json["deadbeef"]["Value"], &Json::Value::isInt, &Json::Value::asInt, data_set->as_int(0xdeadbeef)); } BOOST_AUTO_TEST_CASE(AsJSONReals) { auto data_set = std::make_shared(); data_set->add(0xdeadbeef, odil::Element(odil::Value::Reals({1.2, 3.4}), odil::VR::FL)); auto const json = odil::as_json(data_set); check_json_object(json, {"deadbeef"}); check_json_object(json["deadbeef"], {"vr", "Value"}); check_json_string(json["deadbeef"]["vr"], "FL"); check_json_array(json["deadbeef"]["Value"], &Json::Value::isDouble, &Json::Value::asDouble, data_set->as_real(0xdeadbeef)); } BOOST_AUTO_TEST_CASE(AsJSONStrings) { auto data_set = std::make_shared(); data_set->add(0xdeadbeef, odil::Element( odil::Value::Strings({"FOO", "BAR"}), odil::VR::CS)); auto const json = odil::as_json(data_set); check_json_object(json, {"deadbeef"}); check_json_object(json["deadbeef"], {"vr", "Value"}); check_json_string(json["deadbeef"]["vr"], "CS"); check_json_array(json["deadbeef"]["Value"], &Json::Value::isString, &Json::Value::asString, data_set->as_string(0xdeadbeef)); } BOOST_AUTO_TEST_CASE(AsJSONStringsUnicode) { auto data_set = std::make_shared(); data_set->add( odil::registry::SpecificCharacterSet, odil::Value::Strings({"ISO_IR 100"}), odil::VR::LO); data_set->add( 0xdeadbeef, odil::Value::Strings({"J\xe9r\xf4me"}), odil::VR::LO); auto const json = odil::as_json(data_set); check_json_object( json, {std::string(odil::registry::SpecificCharacterSet), "deadbeef"}); check_json_object(json["deadbeef"], {"vr", "Value"}); check_json_string(json["deadbeef"]["vr"], "LO"); check_json_array(json["deadbeef"]["Value"], &Json::Value::isString, &Json::Value::asString, odil::Value::Strings{std::string("J\xc3\xa9r\xc3\xb4me")}); } BOOST_AUTO_TEST_CASE(AsJSONPersonName) { auto data_set = std::make_shared(); data_set->add(0xdeadbeef, odil::Element( odil::Value::Strings({"Alpha^Betic=Ideo^Graphic=Pho^Netic"}), odil::VR::PN)); auto const json = odil::as_json(data_set); check_json_object(json, {"deadbeef"}); check_json_object(json["deadbeef"], {"vr", "Value"}); check_json_string(json["deadbeef"]["vr"], "PN"); BOOST_REQUIRE(json["deadbeef"]["Value"].isArray()); BOOST_REQUIRE_EQUAL(json["deadbeef"]["Value"].size(), 1); check_json_object( json["deadbeef"]["Value"][0], {"Alphabetic", "Ideographic", "Phonetic"}); check_json_string(json["deadbeef"]["Value"][0]["Alphabetic"], {"Alpha^Betic"}); check_json_string(json["deadbeef"]["Value"][0]["Ideographic"], {"Ideo^Graphic"}); check_json_string(json["deadbeef"]["Value"][0]["Phonetic"], {"Pho^Netic"}); } BOOST_AUTO_TEST_CASE(AsJSONPersonNameUnicode) { auto data_set = std::make_shared(); data_set->add( odil::registry::SpecificCharacterSet, odil::Value::Strings({"ISO_IR 100"}), odil::VR::LO); data_set->add( 0xdeadbeef, odil::Value::Strings({"Buc^J\xe9r\xf4me"}), odil::VR::PN); auto const json = odil::as_json(data_set); check_json_object( json, {std::string(odil::registry::SpecificCharacterSet), "deadbeef"}); check_json_object(json["deadbeef"], {"vr", "Value"}); check_json_string(json["deadbeef"]["vr"], "PN"); BOOST_REQUIRE(json["deadbeef"]["Value"].isArray()); BOOST_REQUIRE_EQUAL(json["deadbeef"]["Value"].size(), 1); check_json_object(json["deadbeef"]["Value"][0], {"Alphabetic"}); check_json_string( json["deadbeef"]["Value"][0]["Alphabetic"], {"Buc^J\xc3\xa9r\xc3\xb4me"}); } BOOST_AUTO_TEST_CASE(AsJSONDataSets) { auto item = std::make_shared(); item->add(0xbeeff00d, odil::Element(odil::Value::Integers({1,2}), odil::VR::SS)); auto data_set = std::make_shared(); data_set->add(0xdeadbeef, odil::Element( odil::Value::DataSets({item}), odil::VR::SQ)); auto const json = odil::as_json(data_set); check_json_object(json, {"deadbeef"}); check_json_object(json["deadbeef"], {"vr", "Value"}); check_json_string(json["deadbeef"]["vr"], "SQ"); BOOST_REQUIRE(json["deadbeef"]["Value"].isArray()); BOOST_REQUIRE_EQUAL(json["deadbeef"]["Value"].size(), 1); check_json_object(json["deadbeef"]["Value"][0], {"beeff00d"}); check_json_object(json["deadbeef"]["Value"][0]["beeff00d"], {"vr", "Value"}); check_json_string(json["deadbeef"]["Value"][0]["beeff00d"]["vr"], "SS"); check_json_array(json["deadbeef"]["Value"][0]["beeff00d"]["Value"], &Json::Value::isInt, &Json::Value::asInt, item->as_int(0xbeeff00d)); } BOOST_AUTO_TEST_CASE(AsJSONBinary) { auto data_set = std::make_shared(); data_set->add(0xdeadbeef, odil::Element( odil::Value::Binary({{0x1, 0x2, 0x3, 0x4, 0x5}}), odil::VR::OB)); auto const json = odil::as_json(data_set); check_json_object(json, {"deadbeef"}); check_json_object(json["deadbeef"], {"vr", "InlineBinary"}); check_json_string(json["deadbeef"]["vr"], "OB"); check_json_string(json["deadbeef"]["InlineBinary"], "AQIDBAU="); } BOOST_AUTO_TEST_CASE(AsJSONGroupLength) { auto data_set = std::make_shared(); data_set->add(0x00100000, {1234}, odil::VR::UL); data_set->add(odil::registry::PatientID, {"DJ0001"}); auto const json = odil::as_json(data_set); check_json_object(json, {"00100020"}); } BOOST_AUTO_TEST_CASE(AsDataSetEmpty) { std::stringstream data; data << "{ }"; Json::Value json; data >> json; auto const data_set = odil::as_dataset(json); BOOST_REQUIRE(data_set->empty()); } BOOST_AUTO_TEST_CASE(AsDataSetIntegers) { std::stringstream data; data << "{ \"deadbeef\": { \"vr\": \"SS\", \"Value\": [1, 2] } }"; Json::Value json; data >> json; auto const data_set = odil::as_dataset(json); BOOST_REQUIRE_EQUAL(data_set->size(), 1); BOOST_REQUIRE(data_set->has("deadbeef")); BOOST_REQUIRE(data_set->get_vr("deadbeef") == odil::VR::SS); BOOST_REQUIRE(data_set->is_int("deadbeef")); BOOST_REQUIRE(data_set->as_int("deadbeef") == odil::Value::Integers({1, 2})); } BOOST_AUTO_TEST_CASE(AsDataSetReals) { std::stringstream data; data << "{ \"deadbeef\": { \"vr\": \"FL\", \"Value\": [1.2, 3.4] } }"; Json::Value json; data >> json; auto const data_set = odil::as_dataset(json); BOOST_REQUIRE_EQUAL(data_set->size(), 1); BOOST_REQUIRE(data_set->has("deadbeef")); BOOST_REQUIRE(data_set->get_vr("deadbeef") == odil::VR::FL); BOOST_REQUIRE(data_set->is_real("deadbeef")); BOOST_REQUIRE(data_set->as_real("deadbeef") == odil::Value::Reals({1.2, 3.4})); } BOOST_AUTO_TEST_CASE(AsDataSetStrings) { std::stringstream data; data << "{ \"deadbeef\": { \"vr\": \"CS\", \"Value\": [\"FOO\", \"BAR\"] } }"; Json::Value json; data >> json; auto const data_set = odil::as_dataset(json); BOOST_REQUIRE_EQUAL(data_set->size(), 1); BOOST_REQUIRE(data_set->has("deadbeef")); BOOST_REQUIRE(data_set->get_vr("deadbeef") == odil::VR::CS); BOOST_REQUIRE(data_set->is_string("deadbeef")); BOOST_REQUIRE(data_set->as_string("deadbeef") == odil::Value::Strings({"FOO", "BAR"})); } BOOST_AUTO_TEST_CASE(AsDataSetPersonName) { std::stringstream data; data << "{ \"deadbeef\": { \"vr\": \"PN\", \"Value\": [ "; data << "{ \"Alphabetic\": \"Alpha^Betic\" , "; data << "\"Ideographic\": \"Ideo^Graphic\" , "; data << "\"Phonetic\": \"Pho^Netic\" } "; data << " ] } }"; Json::Value json; data >> json; auto const data_set = odil::as_dataset(json); BOOST_REQUIRE_EQUAL(data_set->size(), 1); BOOST_REQUIRE(data_set->has("deadbeef")); BOOST_REQUIRE(data_set->get_vr("deadbeef") == odil::VR::PN); BOOST_REQUIRE(data_set->is_string("deadbeef")); BOOST_REQUIRE(data_set->as_string("deadbeef") == odil::Value::Strings( {"Alpha^Betic=Ideo^Graphic=Pho^Netic"})); } BOOST_AUTO_TEST_CASE(AsDataSetDataSets) { std::stringstream data; data << "{ \"deadbeef\": { \"vr\": \"SQ\", \"Value\": [ "; data << "{ \"beeff00d\": { \"vr\": \"SS\", \"Value\": [1, 2] } }"; data << " ] } }"; Json::Value json; data >> json; auto const data_set = odil::as_dataset(json); BOOST_REQUIRE_EQUAL(data_set->size(), 1); BOOST_REQUIRE(data_set->has("deadbeef")); BOOST_REQUIRE(data_set->get_vr("deadbeef") == odil::VR::SQ); BOOST_REQUIRE(data_set->is_data_set("deadbeef")); auto item = std::make_shared(); item->add(0xbeeff00d, odil::Element(odil::Value::Integers({1,2}), odil::VR::SS)); BOOST_REQUIRE( data_set->as_data_set("deadbeef") == odil::Value::DataSets{{item}}); } BOOST_AUTO_TEST_CASE(AsDataSetBinary) { std::stringstream data; data << "{ \"deadbeef\": { \"vr\": \"OB\", \"InlineBinary\": \"AQIDBAU=\" } }"; Json::Value json; data >> json; auto const data_set = odil::as_dataset(json); BOOST_REQUIRE_EQUAL(data_set->size(), 1); BOOST_REQUIRE(data_set->has("deadbeef")); BOOST_REQUIRE(data_set->get_vr("deadbeef") == odil::VR::OB); BOOST_REQUIRE(data_set->is_binary("deadbeef")); BOOST_REQUIRE(data_set->as_binary("deadbeef") == odil::Value::Binary( {{0x1, 0x2, 0x3, 0x4, 0x5}})); } odil-0.11.0/tests/code/message/000077500000000000000000000000001362244656000162305ustar00rootroot00000000000000odil-0.11.0/tests/code/message/CEchoRequest.cpp000066400000000000000000000035201362244656000212660ustar00rootroot00000000000000#define BOOST_TEST_MODULE CEchoRequest #include #include "odil/message/CEchoRequest.h" #include "odil/DataSet.h" #include "odil/message/Message.h" #include "odil/registry.h" #include "../../MessageFixtureBase.h" struct Fixture: public MessageFixtureBase { std::shared_ptr command_set; Fixture() : command_set(std::make_shared()) { this->command_set->add( "CommandField", {odil::message::Message::Command::C_ECHO_RQ}); this->command_set->add("MessageID", {1234}); this->command_set->add( "AffectedSOPClassUID", {odil::registry::VerificationSOPClass}); } void check(odil::message::CEchoRequest const & message) { BOOST_CHECK_EQUAL( message.get_command_field(), odil::message::Message::Command::C_ECHO_RQ); BOOST_CHECK_EQUAL(message.get_message_id(), 1234); BOOST_CHECK_EQUAL( message.get_affected_sop_class_uid(), odil::registry::VerificationSOPClass); BOOST_CHECK(!message.has_data_set()); } }; BOOST_FIXTURE_TEST_CASE(Constructor, Fixture) { odil::message::CEchoRequest const message( 1234, odil::registry::VerificationSOPClass); this->check(message); } BOOST_FIXTURE_TEST_CASE(MessageConstructor, Fixture) { this->check_message_constructor(this->command_set); } BOOST_FIXTURE_TEST_CASE(MessageConstructorWrongCommandField, Fixture) { this->command_set->as_int("CommandField") = { odil::message::Message::Command::C_ECHO_RSP}; this->check_message_constructor_throw(this->command_set); } BOOST_FIXTURE_TEST_CASE(MessageConstructorMissingAffectSOPClass, Fixture) { this->command_set->remove("AffectedSOPClassUID"); this->check_message_constructor_throw(this->command_set); } odil-0.11.0/tests/code/message/CEchoResponse.cpp000066400000000000000000000041211362244656000214320ustar00rootroot00000000000000#define BOOST_TEST_MODULE CEchoResponse #include #include "odil/message/CEchoResponse.h" #include "odil/DataSet.h" #include "odil/message/Message.h" #include "odil/registry.h" #include "../../MessageFixtureBase.h" struct Fixture: public MessageFixtureBase { std::shared_ptr command_set; Fixture() : command_set(std::make_shared()) { this->command_set->add( "CommandField", {odil::message::Message::Command::C_ECHO_RSP}); this->command_set->add("MessageIDBeingRespondedTo", {1234}); this->command_set->add("Status", {odil::message::Response::Success}); this->command_set->add( "AffectedSOPClassUID", {odil::registry::VerificationSOPClass}); } void check(odil::message::CEchoResponse const & message) { BOOST_CHECK_EQUAL( message.get_command_field(), odil::message::Message::Command::C_ECHO_RSP); BOOST_CHECK_EQUAL(message.get_message_id_being_responded_to(), 1234); BOOST_CHECK_EQUAL( message.get_status(), odil::message::Response::Success); BOOST_CHECK_EQUAL( message.get_affected_sop_class_uid(), odil::registry::VerificationSOPClass); BOOST_CHECK(!message.has_data_set()); } }; BOOST_FIXTURE_TEST_CASE(Constructor, Fixture) { odil::message::CEchoResponse const message( 1234, odil::message::Response::Success, odil::registry::VerificationSOPClass); this->check(message); } BOOST_FIXTURE_TEST_CASE(MessageConstructor, Fixture) { this->check_message_constructor(this->command_set); } BOOST_FIXTURE_TEST_CASE(MessageConstructorWrongCommandField, Fixture) { this->command_set->as_int("CommandField") = { odil::message::Message::Command::C_ECHO_RQ}; this->check_message_constructor_throw(this->command_set); } BOOST_FIXTURE_TEST_CASE(MessageConstructorMissingAffectSOPClass, Fixture) { this->command_set->remove("AffectedSOPClassUID"); this->check_message_constructor_throw(this->command_set); } odil-0.11.0/tests/code/message/CFindRequest.cpp000066400000000000000000000055771362244656000213060ustar00rootroot00000000000000#define BOOST_TEST_MODULE CFindRequest #include #include "odil/message/CFindRequest.h" #include "odil/DataSet.h" #include "odil/message/Message.h" #include "odil/registry.h" #include "../../MessageFixtureBase.h" struct Fixture: public MessageFixtureBase { std::shared_ptr command_set; std::shared_ptr query; Fixture() : command_set(std::make_shared()), query(std::make_shared()) { this->command_set->add( "CommandField", {odil::message::Message::Command::C_FIND_RQ}); this->command_set->add("MessageID", {1234}); this->command_set->add("AffectedSOPClassUID", {odil::registry::PatientRootQueryRetrieveInformationModelFIND}); this->command_set->add( "Priority", {odil::message::Message::Priority::MEDIUM}); this->query->add("PatientName", {"Doe^John"}); this->query->add("StudyDescription", {"Brain"}); this->query->add("QueryRetrieveLevel", {"STUDY"}); } virtual void check(odil::message::CFindRequest const & message) { BOOST_CHECK_EQUAL( message.get_command_field(), odil::message::Message::Command::C_FIND_RQ); BOOST_CHECK_EQUAL(message.get_message_id(), 1234); BOOST_CHECK_EQUAL( message.get_affected_sop_class_uid(), odil::registry::PatientRootQueryRetrieveInformationModelFIND); BOOST_CHECK(*message.get_data_set() == *this->query); } }; BOOST_FIXTURE_TEST_CASE(Constructor, Fixture) { odil::message::CFindRequest const message( 1234, odil::registry::PatientRootQueryRetrieveInformationModelFIND, odil::message::Message::Priority::MEDIUM, this->query); this->check(message); } BOOST_FIXTURE_TEST_CASE(MessageConstructor, Fixture) { this->check_message_constructor(this->command_set, this->query); } BOOST_FIXTURE_TEST_CASE(MessageConstructorWrongCommandField, Fixture) { this->command_set->as_int("CommandField") = { odil::message::Message::Command::C_ECHO_RQ}; this->check_message_constructor_throw(this->command_set, this->query); } BOOST_FIXTURE_TEST_CASE(MessageConstructorMissingAffectSOPClass, Fixture) { this->command_set->remove("AffectedSOPClassUID"); this->check_message_constructor_throw(this->command_set, this->query); } BOOST_FIXTURE_TEST_CASE(MessageConstructorMissingPriority, Fixture) { this->command_set->remove("Priority"); this->check_message_constructor_throw(this->command_set, this->query); } BOOST_FIXTURE_TEST_CASE(MessageConstructorMissingQuery, Fixture) { this->check_message_constructor_throw(this->command_set); } BOOST_FIXTURE_TEST_CASE(MessageConstructorEmptyQuery, Fixture) { auto empty = std::make_shared(); this->check_message_constructor_throw(this->command_set, empty); } odil-0.11.0/tests/code/message/CFindResponse.cpp000066400000000000000000000071111362244656000214360ustar00rootroot00000000000000#define BOOST_TEST_MODULE CFindResponse #include #include "odil/message/CFindResponse.h" #include "odil/DataSet.h" #include "odil/message/Message.h" #include "odil/registry.h" #include "../../MessageFixtureBase.h" struct Fixture: public MessageFixtureBase { std::shared_ptr command_set; std::shared_ptr data_set; Fixture() : command_set(std::make_shared()), data_set(std::make_shared()) { command_set->add( "CommandField", {odil::message::Message::Command::C_FIND_RSP}); command_set->add("MessageIDBeingRespondedTo", {1234}); command_set->add("Status", {odil::message::Response::Success}); command_set->add("MessageID", {5678}); command_set->add("AffectedSOPClassUID", {odil::registry::StudyRootQueryRetrieveInformationModelFIND}); data_set->add("PatientName", {"Doe^John"}); data_set->add("PatientID", {"DJ123"}); data_set->add("StudyDescription", {"Brain"}); data_set->add("StudyInstanceUID", {"1.2.3"}); } virtual void check(odil::message::CFindResponse const & message) { BOOST_CHECK_EQUAL( message.get_command_field(), odil::message::Message::Command::C_FIND_RSP); BOOST_CHECK_EQUAL(message.get_message_id_being_responded_to(), 1234); BOOST_CHECK_EQUAL( message.get_status(), odil::message::Response::Success); BOOST_CHECK(message.has_message_id()); BOOST_CHECK_EQUAL(message.get_message_id(), 5678); BOOST_CHECK(message.has_affected_sop_class_uid()); BOOST_CHECK_EQUAL( message.get_affected_sop_class_uid(), odil::registry::StudyRootQueryRetrieveInformationModelFIND); BOOST_CHECK(message.has_data_set()); BOOST_CHECK(*message.get_data_set() == *this->data_set); } }; BOOST_FIXTURE_TEST_CASE(Constructor, Fixture) { odil::message::CFindResponse message( 1234, odil::message::Response::Success, this->data_set); message.set_message_id(5678); message.set_affected_sop_class_uid( odil::registry::StudyRootQueryRetrieveInformationModelFIND); this->check(message); } BOOST_FIXTURE_TEST_CASE(MessageConstructor, Fixture) { this->check_message_constructor(this->command_set, this->data_set); } BOOST_FIXTURE_TEST_CASE(MessageConstructorWrongCommandField, Fixture) { this->command_set->as_int("CommandField") = { odil::message::Message::Command::C_ECHO_RQ}; this->check_message_constructor_throw(this->command_set, this->data_set); } BOOST_AUTO_TEST_CASE(StatusPending) { std::vector const statuses = { odil::message::CFindResponse::PendingWarningOptionalKeysNotSupported, }; for(auto const status:statuses) { odil::message::CFindResponse response(1234, status); BOOST_REQUIRE(response.is_pending()); BOOST_REQUIRE(!response.is_warning()); BOOST_REQUIRE(!response.is_failure()); } } BOOST_AUTO_TEST_CASE(StatusFailure) { std::vector const statuses = { odil::message::CFindResponse::RefusedOutOfResources, odil::message::CFindResponse::IdentifierDoesNotMatchSOPClass, odil::message::CFindResponse::UnableToProcess }; for(auto const status:statuses) { odil::message::CFindResponse response(1234, status); BOOST_REQUIRE(!response.is_pending()); BOOST_REQUIRE(!response.is_warning()); BOOST_REQUIRE(response.is_failure()); } } odil-0.11.0/tests/code/message/CGetRequest.cpp000066400000000000000000000054701362244656000211350ustar00rootroot00000000000000#define BOOST_TEST_MODULE CGetRequest #include #include "odil/message/CGetRequest.h" #include "odil/DataSet.h" #include "odil/DataSet.h" #include "odil/message/Message.h" #include "odil/registry.h" #include "../../MessageFixtureBase.h" struct Fixture: public MessageFixtureBase { std::shared_ptr command_set; std::shared_ptr query; Fixture() : command_set(std::make_shared()), query(std::make_shared()) { this->command_set->add( "CommandField", {odil::message::Message::Command::C_GET_RQ}); this->command_set->add("MessageID", {1234}); this->command_set->add("AffectedSOPClassUID", {odil::registry::PatientRootQueryRetrieveInformationModelGET}); this->command_set->add( "Priority", {odil::message::Message::Priority::MEDIUM}); this->query->add("PatientName", {"Doe^John"}); this->query->add("StudyDescription", {"Brain"}); this->query->add("QueryRetrieveLevel", {"STUDY"}); } virtual void check(odil::message::CGetRequest const & message) { BOOST_CHECK_EQUAL( message.get_command_field(), odil::message::Message::Command::C_GET_RQ); BOOST_CHECK_EQUAL(message.get_message_id(), 1234); BOOST_CHECK_EQUAL( message.get_affected_sop_class_uid(), odil::registry::PatientRootQueryRetrieveInformationModelGET); BOOST_CHECK(message.has_data_set()); BOOST_CHECK(*message.get_data_set() == *this->query); } }; BOOST_FIXTURE_TEST_CASE(Constructor, Fixture) { odil::message::CGetRequest const message( 1234, odil::registry::PatientRootQueryRetrieveInformationModelGET, odil::message::Message::Priority::MEDIUM, this->query); this->check(message); } BOOST_FIXTURE_TEST_CASE(MessageConstructor, Fixture) { this->check_message_constructor(this->command_set, this->query); } BOOST_FIXTURE_TEST_CASE(MessageConstructorWrongCommandField, Fixture) { this->command_set->as_int("CommandField") = { odil::message::Message::Command::C_ECHO_RQ}; this->check_message_constructor_throw(this->command_set, this->query); } BOOST_FIXTURE_TEST_CASE(MessageConstructorMissingAffectSOPClass, Fixture) { this->command_set->remove("AffectedSOPClassUID"); this->check_message_constructor_throw(this->command_set, this->query); } BOOST_FIXTURE_TEST_CASE(MessageConstructorMissingPriority, Fixture) { this->command_set->remove("Priority"); this->check_message_constructor_throw(this->command_set, this->query); } BOOST_FIXTURE_TEST_CASE(MessageConstructorEmptyQuery, Fixture) { auto empty = std::make_shared(); this->check_message_constructor_throw(this->command_set, empty); } odil-0.11.0/tests/code/message/CGetResponse.cpp000066400000000000000000000115741362244656000213050ustar00rootroot00000000000000#define BOOST_TEST_MODULE CGetResponse #include #include "odil/message/CGetResponse.h" #include "odil/DataSet.h" #include "odil/message/Message.h" #include "odil/registry.h" #include "../../MessageFixtureBase.h" struct Fixture: public MessageFixtureBase { std::shared_ptr command_set; std::shared_ptr data_set; Fixture() : command_set(std::make_shared()), data_set(std::make_shared()) { this->command_set->add( "CommandField", {odil::message::Message::Command::C_GET_RSP}); this->command_set->add("MessageIDBeingRespondedTo", {1234}); this->command_set->add("Status", {odil::message::Response::Success}); this->command_set->add("MessageID", {5678}); this->command_set->add("AffectedSOPClassUID", {odil::registry::StudyRootQueryRetrieveInformationModelGET}); this->command_set->add(odil::registry::NumberOfRemainingSuboperations, {1}); this->command_set->add(odil::registry::NumberOfCompletedSuboperations, {2}); this->command_set->add(odil::registry::NumberOfFailedSuboperations, {3}); this->command_set->add(odil::registry::NumberOfWarningSuboperations, {4}); this->data_set->add("PatientName", {"Doe^John"}); this->data_set->add("PatientID", {"DJ123"}); this->data_set->add("StudyDescription", {"Brain"}); this->data_set->add("StudyInstanceUID", {"1.2.3"}); } virtual void check(odil::message::CGetResponse const & message) { BOOST_CHECK_EQUAL( message.get_command_field(), odil::message::Message::Command::C_GET_RSP); BOOST_CHECK_EQUAL(message.get_message_id_being_responded_to(), 1234); BOOST_CHECK_EQUAL( message.get_status(), odil::message::Response::Success); BOOST_CHECK(message.has_message_id()); BOOST_CHECK_EQUAL(message.get_message_id(), 5678); BOOST_CHECK(message.has_affected_sop_class_uid()); BOOST_CHECK_EQUAL( message.get_affected_sop_class_uid(), odil::registry::StudyRootQueryRetrieveInformationModelGET); BOOST_CHECK(message.has_number_of_remaining_sub_operations()); BOOST_CHECK_EQUAL(message.get_number_of_remaining_sub_operations(), 1); BOOST_CHECK(message.has_number_of_completed_sub_operations()); BOOST_CHECK_EQUAL(message.get_number_of_completed_sub_operations(), 2); BOOST_CHECK(message.has_number_of_failed_sub_operations()); BOOST_CHECK_EQUAL(message.get_number_of_failed_sub_operations(), 3); BOOST_CHECK(message.has_number_of_warning_sub_operations()); BOOST_CHECK_EQUAL(message.get_number_of_warning_sub_operations(), 4); BOOST_CHECK(message.has_data_set()); BOOST_CHECK(*message.get_data_set() == *this->data_set); } }; BOOST_FIXTURE_TEST_CASE(Constructor, Fixture) { odil::message::CGetResponse message( 1234, odil::message::Response::Success, this->data_set); message.set_message_id(5678); message.set_affected_sop_class_uid( odil::registry::StudyRootQueryRetrieveInformationModelGET); message.set_number_of_remaining_sub_operations(1); message.set_number_of_completed_sub_operations(2); message.set_number_of_failed_sub_operations(3); message.set_number_of_warning_sub_operations(4); this->check(message); } BOOST_FIXTURE_TEST_CASE(MessageConstructor, Fixture) { this->check_message_constructor(this->command_set, this->data_set); } BOOST_FIXTURE_TEST_CASE(MessageConstructorWrongCommandField, Fixture) { this->command_set->as_int(odil::registry::CommandField) = { odil::message::Message::Command::C_ECHO_RQ }; this->check_message_constructor_throw(this->command_set, this->data_set); } BOOST_AUTO_TEST_CASE(StatusWarning) { std::vector const statuses = { odil::message::CGetResponse::SubOperationsCompleteOneOrMoreFailuresOrWarnings }; for(auto const status:statuses) { odil::message::CGetResponse response(1234, status); BOOST_REQUIRE(!response.is_pending()); BOOST_REQUIRE(response.is_warning()); BOOST_REQUIRE(!response.is_failure()); } } BOOST_AUTO_TEST_CASE(StatusFailure) { std::vector const statuses = { odil::message::CGetResponse::RefusedOutOfResourcesUnableToCalculateNumberOfMatches, odil::message::CGetResponse::RefusedOutOfResourcesUnableToPerformSubOperations, odil::message::CGetResponse::IdentifierDoesNotMatchSOPClass, odil::message::CGetResponse::UnableToProcess }; for(auto const status:statuses) { odil::message::CGetResponse response(1234, status); BOOST_REQUIRE(!response.is_pending()); BOOST_REQUIRE(!response.is_warning()); BOOST_REQUIRE(response.is_failure()); } } odil-0.11.0/tests/code/message/CMoveRequest.cpp000066400000000000000000000057151362244656000213260ustar00rootroot00000000000000#define BOOST_TEST_MODULE CMoveRequest #include #include "odil/message/CMoveRequest.h" #include "odil/DataSet.h" #include "odil/message/Message.h" #include "odil/registry.h" #include "../../MessageFixtureBase.h" struct Fixture: public MessageFixtureBase { std::shared_ptr command_set; std::shared_ptr query; Fixture() : command_set(std::make_shared()), query(std::make_shared()) { this->command_set->add( "CommandField", {odil::message::Message::Command::C_MOVE_RQ}); this->command_set->add("MessageID", {1234}); this->command_set->add("AffectedSOPClassUID", {odil::registry::PatientRootQueryRetrieveInformationModelMOVE}); this->command_set->add( "Priority", {odil::message::Message::Priority::MEDIUM}); this->command_set->add("MoveDestination", {"destination"}); this->query->add("PatientName", {"Doe^John"}); this->query->add("StudyDescription", {"Brain"}); this->query->add("QueryRetrieveLevel", {"STUDY"}); } virtual void check(odil::message::CMoveRequest const & message) { BOOST_CHECK_EQUAL( message.get_command_field(), odil::message::Message::Command::C_MOVE_RQ); BOOST_CHECK_EQUAL(message.get_message_id(), 1234); BOOST_CHECK_EQUAL( message.get_affected_sop_class_uid(), odil::registry::PatientRootQueryRetrieveInformationModelMOVE); BOOST_CHECK_EQUAL(message.get_move_destination(), "destination"); BOOST_CHECK(message.has_data_set()); BOOST_CHECK(*message.get_data_set() == *this->query); } }; BOOST_FIXTURE_TEST_CASE(Constructor, Fixture) { odil::message::CMoveRequest const message( 1234, odil::registry::PatientRootQueryRetrieveInformationModelMOVE, odil::message::Message::Priority::MEDIUM, "destination", this->query); this->check(message); } BOOST_FIXTURE_TEST_CASE(MessageConstructor, Fixture) { this->check_message_constructor(this->command_set, this->query); } BOOST_FIXTURE_TEST_CASE(MessageConstructorWrongCommandField, Fixture) { this->command_set->as_int("CommandField") = { odil::message::Message::Command::C_ECHO_RQ}; this->check_message_constructor_throw(this->command_set, this->query); } BOOST_FIXTURE_TEST_CASE(MessageConstructorMissingAffectSOPClass, Fixture) { this->command_set->remove("AffectedSOPClassUID"); this->check_message_constructor_throw(this->command_set, this->query); } BOOST_FIXTURE_TEST_CASE(MessageConstructorMissingPriority, Fixture) { this->command_set->remove("Priority"); this->check_message_constructor_throw(this->command_set, this->query); } BOOST_FIXTURE_TEST_CASE(MessageConstructorEmptyQuery, Fixture) { auto empty = std::make_shared(); this->check_message_constructor_throw(this->command_set, empty); } odil-0.11.0/tests/code/message/CMoveResponse.cpp000066400000000000000000000117031362244656000214660ustar00rootroot00000000000000#define BOOST_TEST_MODULE CMoveResponse #include #include "odil/message/CMoveResponse.h" #include "odil/DataSet.h" #include "odil/message/Message.h" #include "odil/registry.h" #include "../../MessageFixtureBase.h" struct Fixture: public MessageFixtureBase { std::shared_ptr command_set; std::shared_ptr data_set; Fixture() : command_set(std::make_shared()), data_set(std::make_shared()) { this->command_set->add( "CommandField", {odil::message::Message::Command::C_MOVE_RSP}); this->command_set->add("MessageIDBeingRespondedTo", {1234}); this->command_set->add("Status", {odil::message::Response::Success}); this->command_set->add("MessageID", {5678}); this->command_set->add("AffectedSOPClassUID", {odil::registry::StudyRootQueryRetrieveInformationModelMOVE}); this->command_set->add(odil::registry::NumberOfRemainingSuboperations, {1}); this->command_set->add(odil::registry::NumberOfCompletedSuboperations, {2}); this->command_set->add(odil::registry::NumberOfFailedSuboperations, {3}); this->command_set->add(odil::registry::NumberOfWarningSuboperations, {4}); this->data_set->add("PatientName", {"Doe^John"}); this->data_set->add("PatientID", {"DJ123"}); this->data_set->add("StudyDescription", {"Brain"}); this->data_set->add("StudyInstanceUID", {"1.2.3"}); } virtual void check(odil::message::CMoveResponse const & message) { BOOST_CHECK_EQUAL( message.get_command_field(), odil::message::Message::Command::C_MOVE_RSP); BOOST_CHECK_EQUAL(message.get_message_id_being_responded_to(), 1234); BOOST_CHECK_EQUAL( message.get_status(), odil::message::Response::Success); BOOST_CHECK(message.has_message_id()); BOOST_CHECK_EQUAL(message.get_message_id(), 5678); BOOST_CHECK(message.has_affected_sop_class_uid()); BOOST_CHECK_EQUAL( message.get_affected_sop_class_uid(), odil::registry::StudyRootQueryRetrieveInformationModelMOVE); BOOST_CHECK(message.has_number_of_remaining_sub_operations()); BOOST_CHECK_EQUAL(message.get_number_of_remaining_sub_operations(), 1); BOOST_CHECK(message.has_number_of_completed_sub_operations()); BOOST_CHECK_EQUAL(message.get_number_of_completed_sub_operations(), 2); BOOST_CHECK(message.has_number_of_failed_sub_operations()); BOOST_CHECK_EQUAL(message.get_number_of_failed_sub_operations(), 3); BOOST_CHECK(message.has_number_of_warning_sub_operations()); BOOST_CHECK_EQUAL(message.get_number_of_warning_sub_operations(), 4); BOOST_CHECK(message.has_data_set()); BOOST_CHECK(*message.get_data_set() == *this->data_set); } }; BOOST_FIXTURE_TEST_CASE(Constructor, Fixture) { odil::message::CMoveResponse message( 1234, odil::message::Response::Success, this->data_set); message.set_message_id(5678); message.set_affected_sop_class_uid( odil::registry::StudyRootQueryRetrieveInformationModelMOVE); message.set_number_of_remaining_sub_operations(1); message.set_number_of_completed_sub_operations(2); message.set_number_of_failed_sub_operations(3); message.set_number_of_warning_sub_operations(4); this->check(message); } BOOST_FIXTURE_TEST_CASE(MessageConstructor, Fixture) { this->check_message_constructor(this->command_set, this->data_set); } BOOST_FIXTURE_TEST_CASE(MessageConstructorWrongCommandField, Fixture) { this->command_set->as_int("CommandField") = { odil::message::Message::Command::C_ECHO_RQ}; this->check_message_constructor_throw(this->command_set, this->data_set); } BOOST_AUTO_TEST_CASE(StatusWarning) { std::vector const statuses = { odil::message::CMoveResponse::SubOperationsCompleteOneOrMoreFailuresOrWarnings }; for(auto const status:statuses) { odil::message::CMoveResponse response(1234, status); BOOST_REQUIRE(!response.is_pending()); BOOST_REQUIRE(response.is_warning()); BOOST_REQUIRE(!response.is_failure()); } } BOOST_AUTO_TEST_CASE(StatusFailure) { std::vector const statuses = { odil::message::CMoveResponse::RefusedOutOfResourcesUnableToCalculateNumberOfMatches, odil::message::CMoveResponse::RefusedOutOfResourcesUnableToPerformSubOperations, odil::message::CMoveResponse::RefusedMoveDestinationUnknown, odil::message::CMoveResponse::IdentifierDoesNotMatchSOPClass, odil::message::CMoveResponse::UnableToProcess }; for(auto const status:statuses) { odil::message::CMoveResponse response(1234, status); BOOST_REQUIRE(!response.is_pending()); BOOST_REQUIRE(!response.is_warning()); BOOST_REQUIRE(response.is_failure()); } } odil-0.11.0/tests/code/message/CStoreRequest.cpp000066400000000000000000000064671362244656000215210ustar00rootroot00000000000000#define BOOST_TEST_MODULE CStoreRequest #include #include "odil/message/CStoreRequest.h" #include "odil/DataSet.h" #include "odil/message/Message.h" #include "odil/registry.h" #include "../../MessageFixtureBase.h" struct Fixture: public MessageFixtureBase { std::shared_ptr command_set; std::shared_ptr data_set; Fixture() : command_set(std::make_shared()), data_set(std::make_shared()) { this->command_set->add( "CommandField", {odil::message::Message::Command::C_STORE_RQ}); this->command_set->add("MessageID", {1234}); this->command_set->add( "AffectedSOPClassUID", {odil::registry::MRImageStorage}); this->command_set->add("AffectedSOPInstanceUID", {"1.2.3.4"}); this->command_set->add( "Priority", {odil::message::Message::Priority::MEDIUM}); this->command_set->add("MoveOriginatorApplicationEntityTitle", {"origin"}); this->command_set->add("MoveOriginatorMessageID", {5678}); this->data_set->add("PatientName", {"Doe^John"}); this->data_set->add("PatientID", {"DJ123"}); this->data_set->add("StudyDescription", {"Brain"}); this->data_set->add("StudyInstanceUID", {"1.2.3"}); } void check(odil::message::CStoreRequest const & message) { BOOST_CHECK_EQUAL( message.get_command_field(), odil::message::Message::Command::C_STORE_RQ); BOOST_CHECK_EQUAL(message.get_message_id(), 1234); BOOST_CHECK_EQUAL( message.get_affected_sop_class_uid(), odil::registry::MRImageStorage); BOOST_CHECK_EQUAL( message.get_affected_sop_instance_uid(), "1.2.3.4"); BOOST_CHECK(message.has_move_originator_ae_title()); BOOST_CHECK_EQUAL(message.get_move_originator_ae_title(), "origin"); BOOST_CHECK(message.has_move_originator_message_id()); BOOST_CHECK_EQUAL(message.get_move_originator_message_id(), 5678); BOOST_CHECK(message.has_data_set()); BOOST_CHECK(*message.get_data_set() == *this->data_set); } }; BOOST_FIXTURE_TEST_CASE(Constructor, Fixture) { odil::message::CStoreRequest message( 1234, odil::registry::MRImageStorage, "1.2.3.4", odil::message::Message::Priority::MEDIUM, this->data_set); message.set_move_originator_ae_title("origin"); message.set_move_originator_message_id(5678); this->check(message); } BOOST_FIXTURE_TEST_CASE(MessageConstructor, Fixture) { this->check_message_constructor(this->command_set, this->data_set); } BOOST_FIXTURE_TEST_CASE(MessageConstructorWrongCommandField, Fixture) { this->command_set->as_int("CommandField") = { odil::message::Message::Command::C_ECHO_RSP}; this->check_message_constructor_throw(this->command_set, this->data_set); } BOOST_FIXTURE_TEST_CASE(MessageConstructorMissingAffectSOPClass, Fixture) { this->command_set->remove("AffectedSOPClassUID"); this->check_message_constructor_throw(this->command_set, this->data_set); } BOOST_FIXTURE_TEST_CASE(MessageConstructorMissingAffectSOPInstance, Fixture) { this->command_set->remove("AffectedSOPInstanceUID"); this->check_message_constructor_throw(this->command_set, this->data_set); } odil-0.11.0/tests/code/message/CStoreResponse.cpp000066400000000000000000000067411362244656000216620ustar00rootroot00000000000000#define BOOST_TEST_MODULE CStoreResponse #include #include "odil/message/CStoreResponse.h" #include "odil/DataSet.h" #include "odil/message/Message.h" #include "odil/registry.h" #include "../../MessageFixtureBase.h" struct Fixture: public MessageFixtureBase { std::shared_ptr command_set; Fixture() : command_set(std::make_shared()) { this->command_set->add( "CommandField", {odil::message::Message::Command::C_STORE_RSP}); this->command_set->add("MessageIDBeingRespondedTo", {1234}); this->command_set->add("Status", {odil::message::Response::Success}); this->command_set->add("MessageID", {5678}); this->command_set->add( "AffectedSOPClassUID", {odil::registry::MRImageStorage}); this->command_set->add("AffectedSOPInstanceUID", {"1.2.3.4"}); } void check(odil::message::CStoreResponse const & message) { BOOST_CHECK_EQUAL( message.get_command_field(), odil::message::Message::Command::C_STORE_RSP); BOOST_CHECK_EQUAL(message.get_message_id_being_responded_to(), 1234); BOOST_CHECK_EQUAL( message.get_status(), odil::message::Response::Success); BOOST_CHECK(!message.has_data_set()); BOOST_CHECK(message.has_message_id()); BOOST_CHECK_EQUAL(message.get_message_id(), 5678); BOOST_CHECK(message.has_affected_sop_class_uid()); BOOST_CHECK_EQUAL( message.get_affected_sop_class_uid(), odil::registry::MRImageStorage); BOOST_CHECK(message.has_affected_sop_instance_uid()); BOOST_CHECK_EQUAL(message.get_affected_sop_instance_uid(), "1.2.3.4"); } }; BOOST_FIXTURE_TEST_CASE(Constructor, Fixture) { odil::message::CStoreResponse message( 1234, odil::message::Response::Success); message.set_message_id(5678); message.set_affected_sop_class_uid(odil::registry::MRImageStorage); message.set_affected_sop_instance_uid("1.2.3.4"); this->check(message); } BOOST_FIXTURE_TEST_CASE(MessageConstructor, Fixture) { this->check_message_constructor(this->command_set); } BOOST_FIXTURE_TEST_CASE(MessageConstructorWrongCommandField, Fixture) { this->command_set->add( "CommandField", {odil::message::Message::Command::C_ECHO_RQ}); this->check_message_constructor_throw(this->command_set); } BOOST_AUTO_TEST_CASE(StatusWarning) { std::vector const statuses = { odil::message::CStoreResponse::CoercionOfDataElements, odil::message::CStoreResponse::DataSetDoesNotMatchSOPClass, odil::message::CStoreResponse::ElementsDiscarded }; for(auto const status:statuses) { odil::message::CStoreResponse response(1234, status); BOOST_REQUIRE(!response.is_pending()); BOOST_REQUIRE(response.is_warning()); BOOST_REQUIRE(!response.is_failure()); } } BOOST_AUTO_TEST_CASE(StatusFailure) { std::vector const statuses = { odil::message::CStoreResponse::RefusedOutOfResources, odil::message::CStoreResponse::ErrorDataSetDoesNotMatchSOPClass, odil::message::CStoreResponse::ErrorCannotUnderstand }; for(auto const status:statuses) { odil::message::CStoreResponse response(1234, status); BOOST_REQUIRE(!response.is_pending()); BOOST_REQUIRE(!response.is_warning()); BOOST_REQUIRE(response.is_failure()); } } odil-0.11.0/tests/code/message/Cancellation.cpp000066400000000000000000000024551362244656000213360ustar00rootroot00000000000000#define BOOST_TEST_MODULE Cancellation #include #include "odil/DataSet.h" #include "odil/message/Cancellation.h" #include "../../MessageFixtureBase.h" struct Fixture: public MessageFixtureBase { std::shared_ptr command_set; Fixture() : command_set(std::make_shared()) { this->command_set->add( "CommandField", {odil::message::Message::Command::C_CANCEL_RQ}); this->command_set->add("MessageIDBeingRespondedTo", {1234}); } void check(odil::message::Cancellation const & message) { BOOST_CHECK_EQUAL( message.get_command_field(), odil::message::Message::Command::C_CANCEL_RQ); BOOST_CHECK_EQUAL(message.get_message_id_being_responded_to(), 1234); } }; BOOST_FIXTURE_TEST_CASE(Constructor, Fixture) { odil::message::Cancellation const message(1234); this->check(message); } BOOST_FIXTURE_TEST_CASE(MessageConstructor, Fixture) { this->check_message_constructor(this->command_set); } BOOST_FIXTURE_TEST_CASE(MessageConstructorWrongCommandField, Fixture) { this->command_set->as_int("CommandField") = { odil::message::Message::Command::C_ECHO_RQ}; this->check_message_constructor_throw(this->command_set); } odil-0.11.0/tests/code/message/Message.cpp000066400000000000000000000033531362244656000203240ustar00rootroot00000000000000#define BOOST_TEST_MODULE Message #include #include "odil/DataSet.h" #include "odil/message/Message.h" BOOST_AUTO_TEST_CASE(DefaultConstructor) { odil::message::Message const message; // Command Set might not be empty (Command Group Length, Data Set Type) BOOST_CHECK(!message.has_data_set()); } BOOST_AUTO_TEST_CASE(Constructor) { auto command_set = std::make_shared(); command_set->add( "CommandField", {odil::message::Message::Command::C_ECHO_RQ}); auto data_set = std::make_shared(); odil::message::Message const message(command_set, data_set); BOOST_CHECK_EQUAL( message.get_command_set()->as_int("CommandField", 0), odil::message::Message::Command::C_ECHO_RQ); BOOST_CHECK(message.has_data_set()); BOOST_CHECK(message.get_data_set()->empty()); BOOST_CHECK_EQUAL( message.get_command_field(), odil::message::Message::Command::C_ECHO_RQ); } BOOST_AUTO_TEST_CASE(CommandField) { odil::message::Message message; message.set_command_field(odil::message::Message::Command::C_FIND_RSP); BOOST_CHECK( message.get_command_set()->as_int("CommandField") == odil::Value::Integers( {odil::message::Message::Command::C_FIND_RSP})); BOOST_CHECK_EQUAL( message.get_command_field(), odil::message::Message::Command::C_FIND_RSP); } BOOST_AUTO_TEST_CASE(DeleteDataSet) { auto command_set = std::make_shared(); auto data_set = std::make_shared(); odil::message::Message message(command_set, data_set); BOOST_CHECK(message.has_data_set()); message.delete_data_set(); BOOST_CHECK(!message.has_data_set()); } odil-0.11.0/tests/code/message/Request.cpp000066400000000000000000000013141362244656000203630ustar00rootroot00000000000000#define BOOST_TEST_MODULE Request #include #include "odil/DataSet.h" #include "odil/message/Message.h" #include "odil/message/Request.h" BOOST_AUTO_TEST_CASE(Constructor) { odil::message::Request const message(1234); BOOST_CHECK_EQUAL(message.get_message_id(), 1234); } BOOST_AUTO_TEST_CASE(MessageConstructor) { auto const command_set = std::make_shared(); command_set->add("MessageID", {1234}); auto generic_message = std::make_shared( command_set); odil::message::Request const message(generic_message); BOOST_CHECK_EQUAL(message.get_message_id(), 1234); BOOST_CHECK(!message.has_data_set()); } odil-0.11.0/tests/code/message/Response.cpp000066400000000000000000000105561362244656000205410ustar00rootroot00000000000000#define BOOST_TEST_MODULE Response #include #include #include "odil/DataSet.h" #include "odil/message/Message.h" #include "odil/message/Response.h" #include "odil/Value.h" BOOST_AUTO_TEST_CASE(Constructor) { odil::message::Response const message( 1234, odil::message::Response::Pending); BOOST_CHECK_EQUAL(message.get_message_id_being_responded_to(), 1234); BOOST_CHECK_EQUAL(message.get_status(), odil::message::Response::Pending); } BOOST_AUTO_TEST_CASE(MessageConstructor) { auto command_set = std::make_shared(); command_set->add("MessageIDBeingRespondedTo", {1234}); command_set->add("Status", {odil::message::Response::Pending}); auto generic_message = std::make_shared(command_set); odil::message::Response const message(generic_message); BOOST_CHECK_EQUAL(message.get_message_id_being_responded_to(), 1234); BOOST_CHECK_EQUAL( message.get_status(), odil::message::Response::Pending); BOOST_CHECK(!message.has_data_set()); } BOOST_AUTO_TEST_CASE(StatusPending) { std::vector const statuses = { odil::message::Response::Pending, }; for(auto const status:statuses) { BOOST_REQUIRE(odil::message::Response::is_pending(status)); BOOST_REQUIRE(!odil::message::Response::is_warning(status)); BOOST_REQUIRE(!odil::message::Response::is_failure(status)); odil::message::Response response(1234, status); BOOST_REQUIRE(response.is_pending()); BOOST_REQUIRE(!response.is_warning()); BOOST_REQUIRE(!response.is_failure()); } } BOOST_AUTO_TEST_CASE(StatusWarning) { std::vector const statuses = { odil::message::Response::AttributeListError, odil::message::Response::AttributeValueOutOfRange }; for(auto const status:statuses) { BOOST_REQUIRE(!odil::message::Response::is_pending(status)); BOOST_REQUIRE(odil::message::Response::is_warning(status)); BOOST_REQUIRE(!odil::message::Response::is_failure(status)); odil::message::Response response(1234, status); BOOST_REQUIRE(!response.is_pending()); BOOST_REQUIRE(response.is_warning()); BOOST_REQUIRE(!response.is_failure()); } } BOOST_AUTO_TEST_CASE(StatusFailure) { std::vector const statuses = { odil::message::Response::SOPClassNotSupported, odil::message::Response::ClassInstanceConflict, odil::message::Response::DuplicateSOPInstance, odil::message::Response::DuplicateInvocation, odil::message::Response::InvalidArgumentValue, odil::message::Response::InvalidAttributeValue, odil::message::Response::InvalidObjectInstance, odil::message::Response::MissingAttribute, odil::message::Response::MissingAttributeValue, odil::message::Response::MistypedArgument, odil::message::Response::NoSuchArgument, odil::message::Response::NoSuchAttribute, odil::message::Response::NoSuchEventType, odil::message::Response::NoSuchSOPInstance, odil::message::Response::NoSuchSOPClass, odil::message::Response::ProcessingFailure, odil::message::Response::ResourceLimitation, odil::message::Response::UnrecognizedOperation, odil::message::Response::NoSuchActionType, odil::message::Response::RefusedNotAuthorized }; for(auto const status:statuses) { BOOST_REQUIRE(!odil::message::Response::is_pending(status)); BOOST_REQUIRE(!odil::message::Response::is_warning(status)); BOOST_REQUIRE(odil::message::Response::is_failure(status)); odil::message::Response response(1234, status); BOOST_REQUIRE(!response.is_pending()); BOOST_REQUIRE(!response.is_warning()); BOOST_REQUIRE(response.is_failure()); } } BOOST_AUTO_TEST_CASE(StatusDetails) { odil::message::Response response( 1234, odil::message::Response::SOPClassNotSupported); auto status_details = std::make_shared(); status_details->add( odil::registry::ErrorComment, {"This is the error comment"}); response.set_status_fields(status_details); BOOST_REQUIRE(response.has_error_comment()); BOOST_REQUIRE_EQUAL( response.get_error_comment(), "This is the error comment"); } odil-0.11.0/tests/code/pdu/000077500000000000000000000000001362244656000153745ustar00rootroot00000000000000odil-0.11.0/tests/code/pdu/AAbort.cpp000066400000000000000000000021111362244656000172430ustar00rootroot00000000000000#define BOOST_TEST_MODULE pdu::AAbort #include #include #include #include "odil/pdu/AAbort.h" #include "odil/Exception.h" std::string const data = { 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x02 }; BOOST_AUTO_TEST_CASE(ConstructorFields) { odil::pdu::AAbort const pdu(1, 2); BOOST_REQUIRE_EQUAL(pdu.get_source(), 1); BOOST_REQUIRE_EQUAL(pdu.get_reason(), 2); } BOOST_AUTO_TEST_CASE(ConstructorStream) { std::istringstream stream(data); odil::pdu::AAbort const pdu(stream); BOOST_REQUIRE_EQUAL(pdu.get_source(), 1); BOOST_REQUIRE_EQUAL(pdu.get_reason(), 2); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::AAbort const pdu(1, 2); std::ostringstream stream; stream << pdu; BOOST_REQUIRE(stream.str() == data); } BOOST_AUTO_TEST_CASE(WrongSource) { odil::pdu::AAbort pdu(1, 2); BOOST_REQUIRE_THROW(pdu.set_source(3), odil::Exception); } BOOST_AUTO_TEST_CASE(WrongReason) { odil::pdu::AAbort pdu(1, 2); BOOST_REQUIRE_THROW(pdu.set_reason(9), odil::Exception); } odil-0.11.0/tests/code/pdu/AAssociateAC.cpp000066400000000000000000000172441362244656000203300ustar00rootroot00000000000000#define BOOST_TEST_MODULE AAssociateAC #include #include #include #include #include #include "odil/pdu/AAssociateAC.h" #include "odil/pdu/ApplicationContext.h" #include "odil/pdu/PresentationContextAC.h" #include "odil/pdu/UserIdentityAC.h" #include "odil/pdu/UserInformation.h" #include "odil/Exception.h" struct Fixture { public: static std::string const read_data; static std::string const write_data; odil::pdu::ApplicationContext application_context; std::vector presentation_contexts; odil::pdu::UserInformation user_information; Fixture() : application_context("foo") { odil::pdu::PresentationContextAC pc1(3, "transfer_syntax", 1); odil::pdu::PresentationContextAC pc2(5, "transfer_syntax_2", 2); this->presentation_contexts = {pc1, pc2}; this->user_information.set_sub_items( { { 0x12345678 } }); this->user_information.set_sub_items( { { "bar" } }); } void check_application_context( odil::pdu::ApplicationContext const & context) const { BOOST_REQUIRE_EQUAL( context.get_name(), this->application_context.get_name()); } void check_presentation_contexts( std::vector const & contexts) { BOOST_REQUIRE_EQUAL(contexts.size(), presentation_contexts.size()); for(int i=0; i().empty()); BOOST_REQUIRE_EQUAL( user_information.get_sub_items()[0].get_maximum_length(), 0x12345678); BOOST_REQUIRE( !user_information.get_sub_items().empty()); BOOST_REQUIRE_EQUAL( user_information.get_sub_items()[0].get_server_response(), "bar"); } }; std::string const Fixture ::read_data( // Header, 6 bytes "\x02\x00" "\x00\x00\x00\x98" // Items: 68 bytes "\x00\x01\x00\x00" " CALLED_AE" "CALLING_AE " "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" // Application Context, 7 bytes "\x10\x00\x00\x03" "foo" // Presentation Contexts, 27+29 bytes "\x21\x00\x00\x17" "\x03\x00\x01\x00" "\x40\x00\x00\x0f""transfer_syntax" "\x21\x00\x00\x19" "\x05\x00\x02\x00" "\x40\x00\x00\x11""transfer_syntax_2" // User Information, 21 bytes "\x50\x00\x00\x11" "\x51\x00\x00\x04" "\x12\x34\x56\x78" "\x59\x00\x00\x05" "\x00\x03" "bar" , 158 ); std::string const Fixture ::write_data( // Header, 6 bytes "\x02\x00" "\x00\x00\x00\x98" // Items: 68 bytes "\x00\x01\x00\x00" "CALLED_AE " "CALLING_AE " "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" // Application Context, 7 bytes "\x10\x00\x00\x03" "foo" // Presentation Contexts, 27+29 bytes "\x21\x00\x00\x17" "\x03\x00\x01\x00" "\x40\x00\x00\x0f""transfer_syntax" "\x21\x00\x00\x19" "\x05\x00\x02\x00" "\x40\x00\x00\x11""transfer_syntax_2" // User Information, 21 bytes "\x50\x00\x00\x11" "\x51\x00\x00\x04" "\x12\x34\x56\x78" "\x59\x00\x00\x05" "\x00\x03" "bar" , 158 ); BOOST_AUTO_TEST_CASE(Constructor) { odil::pdu::AAssociateAC const pdu; BOOST_REQUIRE_EQUAL(pdu.get_called_ae_title(), ""); BOOST_REQUIRE_EQUAL(pdu.get_calling_ae_title(), ""); BOOST_REQUIRE_EQUAL(pdu.get_protocol_version(), 0); BOOST_REQUIRE_THROW(pdu.get_application_context(), odil::Exception); BOOST_REQUIRE(pdu.get_presentation_contexts().empty()); BOOST_REQUIRE_THROW(pdu.get_user_information(), odil::Exception); } BOOST_FIXTURE_TEST_CASE(ConstructorStream, Fixture) { std::istringstream stream(read_data); odil::pdu::AAssociateAC const pdu(stream); BOOST_REQUIRE_EQUAL(pdu.get_called_ae_title(), "CALLED_AE"); BOOST_REQUIRE_EQUAL(pdu.get_calling_ae_title(), "CALLING_AE"); BOOST_REQUIRE_EQUAL(pdu.get_protocol_version(), 1); this->check_application_context(pdu.get_application_context()); this->check_presentation_contexts(pdu.get_presentation_contexts()); this->check_user_information(pdu.get_user_information()); } BOOST_AUTO_TEST_CASE(ProtocolVersion) { odil::pdu::AAssociateAC pdu; BOOST_REQUIRE_EQUAL(pdu.get_protocol_version(), 0); pdu.set_protocol_version(2); BOOST_REQUIRE_EQUAL(pdu.get_protocol_version(), 2); } BOOST_AUTO_TEST_CASE(CalledAETitle) { odil::pdu::AAssociateAC pdu; BOOST_REQUIRE_EQUAL(pdu.get_called_ae_title(), ""); pdu.set_called_ae_title("called"); BOOST_REQUIRE_EQUAL(pdu.get_called_ae_title(), "called"); } BOOST_AUTO_TEST_CASE(CallingAETitle) { odil::pdu::AAssociateAC pdu; BOOST_REQUIRE_EQUAL(pdu.get_calling_ae_title(), ""); pdu.set_calling_ae_title("calling"); BOOST_REQUIRE_EQUAL(pdu.get_calling_ae_title(), "calling"); } BOOST_FIXTURE_TEST_CASE(ApplicationContext, Fixture) { odil::pdu::AAssociateAC pdu; BOOST_REQUIRE_THROW(pdu.get_application_context(), odil::Exception); pdu.set_application_context(application_context); this->check_application_context(pdu.get_application_context()); } BOOST_FIXTURE_TEST_CASE(PresentationContexts, Fixture) { odil::pdu::AAssociateAC pdu; BOOST_REQUIRE(pdu.get_presentation_contexts().empty()); pdu.set_presentation_contexts(presentation_contexts); this->check_presentation_contexts(pdu.get_presentation_contexts()); } BOOST_FIXTURE_TEST_CASE(UserInformation, Fixture) { odil::pdu::AAssociateAC pdu; BOOST_REQUIRE_THROW(pdu.get_user_information(), odil::Exception); pdu.set_user_information(user_information); this->check_user_information(pdu.get_user_information()); } BOOST_FIXTURE_TEST_CASE(Write, Fixture) { odil::pdu::AAssociateAC pdu; pdu.set_protocol_version(1); pdu.set_called_ae_title("CALLED_AE"); pdu.set_calling_ae_title("CALLING_AE"); pdu.set_application_context(application_context); pdu.set_presentation_contexts(presentation_contexts); pdu.set_user_information(user_information); std::ostringstream stream; stream << pdu; BOOST_REQUIRE(stream.str() == write_data); } BOOST_AUTO_TEST_CASE(CalledAETitleEmpty) { odil::pdu::AAssociateAC pdu; BOOST_REQUIRE_THROW(pdu.set_called_ae_title(""), odil::Exception); } BOOST_AUTO_TEST_CASE(CalledAETitleTooLong) { odil::pdu::AAssociateAC pdu; BOOST_REQUIRE_THROW( pdu.set_called_ae_title("123456789abcdef01"), odil::Exception); } BOOST_AUTO_TEST_CASE(CallingAETitleEmpty) { odil::pdu::AAssociateAC pdu; BOOST_REQUIRE_THROW(pdu.set_calling_ae_title(""), odil::Exception); } BOOST_AUTO_TEST_CASE(CallingAETitleTooLong) { odil::pdu::AAssociateAC pdu; BOOST_REQUIRE_THROW( pdu.set_calling_ae_title("123456789abcdef01"), odil::Exception); } odil-0.11.0/tests/code/pdu/AAssociateRJ.cpp000066400000000000000000000025301362244656000203500ustar00rootroot00000000000000#define BOOST_TEST_MODULE pdu::AssociateRJ #include #include #include "odil/pdu/AAssociateRJ.h" #include "odil/Exception.h" std::string const data = { 0x03, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x02, 0x03 }; BOOST_AUTO_TEST_CASE(ConstructorFields) { odil::pdu::AAssociateRJ const pdu(1, 2, 3); BOOST_REQUIRE_EQUAL(pdu.get_result(), 1); BOOST_REQUIRE_EQUAL(pdu.get_source(), 2); BOOST_REQUIRE_EQUAL(pdu.get_reason(), 3); } BOOST_AUTO_TEST_CASE(ConstructorStream) { std::istringstream stream(data); odil::pdu::AAssociateRJ const pdu(stream); BOOST_REQUIRE_EQUAL(pdu.get_result(), 1); BOOST_REQUIRE_EQUAL(pdu.get_source(), 2); BOOST_REQUIRE_EQUAL(pdu.get_reason(), 3); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::AAssociateRJ const pdu(1, 2, 3); std::ostringstream stream; stream << pdu; BOOST_REQUIRE(stream.str() == data); } BOOST_AUTO_TEST_CASE(WrongResult) { odil::pdu::AAssociateRJ pdu(1, 2, 3); BOOST_REQUIRE_THROW(pdu.set_result(4), odil::Exception); } BOOST_AUTO_TEST_CASE(WrongSource) { odil::pdu::AAssociateRJ pdu(1, 2, 3); BOOST_REQUIRE_THROW(pdu.set_source(4), odil::Exception); } BOOST_AUTO_TEST_CASE(WrongReason) { odil::pdu::AAssociateRJ pdu(1, 2, 3); BOOST_REQUIRE_THROW(pdu.set_reason(25), odil::Exception); } odil-0.11.0/tests/code/pdu/AAssociateRQ.cpp000066400000000000000000000203131362244656000203560ustar00rootroot00000000000000#define BOOST_TEST_MODULE AAssociateRQ #include #include #include #include #include #include "odil/pdu/AAssociateRQ.h" #include "odil/pdu/ApplicationContext.h" #include "odil/pdu/PresentationContextRQ.h" #include "odil/pdu/UserIdentityRQ.h" #include "odil/pdu/UserInformation.h" #include "odil/Exception.h" struct Fixture { public: static std::string const read_data; static std::string const write_data; odil::pdu::ApplicationContext application_context; std::vector presentation_contexts; odil::pdu::UserInformation user_information; Fixture() : application_context("foo") { odil::pdu::PresentationContextRQ pc1(3, "abstract_syntax", {"ts1", "ts2"}); this->presentation_contexts = {pc1}; this->user_information.set_sub_items( { { 0x12345678 } }); odil::pdu::UserIdentityRQ user_identity; user_identity.set_username_and_passcode("foo", "bar"); user_identity.set_positive_response_requested(true); this->user_information.set_sub_items( { user_identity }); } void check_application_context( odil::pdu::ApplicationContext const & context) const { BOOST_REQUIRE_EQUAL( context.get_name(), this->application_context.get_name()); } void check_presentation_contexts( std::vector const & contexts) { BOOST_REQUIRE_EQUAL(contexts.size(), presentation_contexts.size()); for(int i=0; i().empty()); BOOST_REQUIRE_EQUAL( user_information.get_sub_items()[0].get_maximum_length(), 0x12345678); BOOST_REQUIRE( !user_information.get_sub_items().empty()); BOOST_REQUIRE_EQUAL( user_information.get_sub_items()[0].get_type(), 2); BOOST_REQUIRE_EQUAL( user_information.get_sub_items()[0].get_positive_response_requested(), true); BOOST_REQUIRE_EQUAL( user_information.get_sub_items()[0].get_primary_field(), "foo"); BOOST_REQUIRE_EQUAL( user_information.get_sub_items()[0].get_secondary_field(), "bar"); } }; std::string const Fixture ::read_data( // Header, 6 bytes "\x01\x00" "\x00\x00\x00\x90" // Items: 68 bytes "\x00\x01\x00\x00" " CALLED_AE" "CALLING_AE " "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" // Application Context, 7 bytes "\x10\x00\x00\x03" "foo" // Presentation Contexts, 41 bytes "\x20\x00\x00\x25" "\x03\x00\x00\x00" "\x30\x00\x00\x0f""abstract_syntax" "\x40\x00\x00\x03""ts1" "\x40\x00\x00\x03""ts2" // User Information, 28 bytes "\x50\x00\x00\x18" "\x51\x00\x00\x04" "\x12\x34\x56\x78" "\x58\x00\x00\x0c" "\x02\x01" "\x00\x03" "foo" "\x00\x03" "bar" , 150 ); std::string const Fixture ::write_data( // Header, 6 bytes "\x01\x00" "\x00\x00\x00\x90" // Items: 68 bytes "\x00\x01\x00\x00" "CALLED_AE " "CALLING_AE " "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" // Application Context, 7 bytes "\x10\x00\x00\x03" "foo" // Presentation Contexts, 41 bytes "\x20\x00\x00\x25" "\x03\x00\x00\x00" "\x30\x00\x00\x0f""abstract_syntax" "\x40\x00\x00\x03""ts1" "\x40\x00\x00\x03""ts2" // User Information, 28 bytes "\x50\x00\x00\x18" "\x51\x00\x00\x04" "\x12\x34\x56\x78" "\x58\x00\x00\x0c" "\x02\x01" "\x00\x03" "foo" "\x00\x03" "bar" , 150 ); BOOST_AUTO_TEST_CASE(Constructor) { odil::pdu::AAssociateRQ const pdu; BOOST_REQUIRE_EQUAL(pdu.get_called_ae_title(), ""); BOOST_REQUIRE_EQUAL(pdu.get_calling_ae_title(), ""); BOOST_REQUIRE_EQUAL(pdu.get_protocol_version(), 0); BOOST_REQUIRE_THROW(pdu.get_application_context(), odil::Exception); BOOST_REQUIRE(pdu.get_presentation_contexts().empty()); BOOST_REQUIRE_THROW(pdu.get_user_information(), odil::Exception); } BOOST_FIXTURE_TEST_CASE(ConstructorStream, Fixture) { std::istringstream stream(read_data); odil::pdu::AAssociateRQ const pdu(stream); BOOST_REQUIRE_EQUAL(pdu.get_called_ae_title(), "CALLED_AE"); BOOST_REQUIRE_EQUAL(pdu.get_calling_ae_title(), "CALLING_AE"); BOOST_REQUIRE_EQUAL(pdu.get_protocol_version(), 1); this->check_application_context(pdu.get_application_context()); this->check_presentation_contexts(pdu.get_presentation_contexts()); this->check_user_information(pdu.get_user_information()); } BOOST_AUTO_TEST_CASE(ProtocolVersion) { odil::pdu::AAssociateRQ pdu; BOOST_REQUIRE_EQUAL(pdu.get_protocol_version(), 0); pdu.set_protocol_version(2); BOOST_REQUIRE_EQUAL(pdu.get_protocol_version(), 2); } BOOST_AUTO_TEST_CASE(CalledAETitle) { odil::pdu::AAssociateRQ pdu; BOOST_REQUIRE_EQUAL(pdu.get_called_ae_title(), ""); pdu.set_called_ae_title("called"); BOOST_REQUIRE_EQUAL(pdu.get_called_ae_title(), "called"); } BOOST_AUTO_TEST_CASE(CallingAETitle) { odil::pdu::AAssociateRQ pdu; BOOST_REQUIRE_EQUAL(pdu.get_calling_ae_title(), ""); pdu.set_calling_ae_title("calling"); BOOST_REQUIRE_EQUAL(pdu.get_calling_ae_title(), "calling"); } BOOST_FIXTURE_TEST_CASE(ApplicationContext, Fixture) { odil::pdu::AAssociateRQ pdu; BOOST_REQUIRE_THROW(pdu.get_application_context(), odil::Exception); pdu.set_application_context(application_context); this->check_application_context(pdu.get_application_context()); } BOOST_FIXTURE_TEST_CASE(PresentationContexts, Fixture) { odil::pdu::AAssociateRQ pdu; BOOST_REQUIRE(pdu.get_presentation_contexts().empty()); pdu.set_presentation_contexts(presentation_contexts); this->check_presentation_contexts(pdu.get_presentation_contexts()); } BOOST_FIXTURE_TEST_CASE(UserInformation, Fixture) { odil::pdu::AAssociateRQ pdu; BOOST_REQUIRE_THROW(pdu.get_user_information(), odil::Exception); pdu.set_user_information(user_information); this->check_user_information(pdu.get_user_information()); } BOOST_FIXTURE_TEST_CASE(Write, Fixture) { odil::pdu::AAssociateRQ pdu; pdu.set_protocol_version(1); pdu.set_called_ae_title("CALLED_AE"); pdu.set_calling_ae_title("CALLING_AE"); pdu.set_application_context(application_context); pdu.set_presentation_contexts(presentation_contexts); pdu.set_user_information(user_information); std::ostringstream stream; stream << pdu; BOOST_REQUIRE(stream.str() == write_data); } BOOST_AUTO_TEST_CASE(CalledAETitleEmpty) { odil::pdu::AAssociateRQ pdu; BOOST_REQUIRE_THROW(pdu.set_called_ae_title(""), odil::Exception); } BOOST_AUTO_TEST_CASE(CalledAETitleTooLong) { odil::pdu::AAssociateRQ pdu; BOOST_REQUIRE_THROW( pdu.set_called_ae_title("123456789abcdef01"), odil::Exception); } BOOST_AUTO_TEST_CASE(CallingAETitleEmpty) { odil::pdu::AAssociateRQ pdu; BOOST_REQUIRE_THROW(pdu.set_calling_ae_title(""), odil::Exception); } BOOST_AUTO_TEST_CASE(CallingAETitleTooLong) { odil::pdu::AAssociateRQ pdu; BOOST_REQUIRE_THROW( pdu.set_calling_ae_title("123456789abcdef01"), odil::Exception); } odil-0.11.0/tests/code/pdu/AReleaseRP.cpp000066400000000000000000000011611362244656000200220ustar00rootroot00000000000000#define BOOST_TEST_MODULE AReleaseRPPDU #include #include #include #include "odil/pdu/AReleaseRP.h" std::string const data = { 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 }; BOOST_AUTO_TEST_CASE(ConstructorFields) { odil::pdu::AReleaseRP const pdu; } BOOST_AUTO_TEST_CASE(ConstructorStream) { std::istringstream stream(data); odil::pdu::AReleaseRP const pdu(stream); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::AReleaseRP const pdu; std::ostringstream stream; stream << pdu; BOOST_REQUIRE(stream.str() == data); } odil-0.11.0/tests/code/pdu/AReleaseRQ.cpp000066400000000000000000000011611362244656000200230ustar00rootroot00000000000000#define BOOST_TEST_MODULE AReleaseRPPDU #include #include #include #include "odil/pdu/AReleaseRQ.h" std::string const data = { 0x05, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00 }; BOOST_AUTO_TEST_CASE(ConstructorFields) { odil::pdu::AReleaseRQ const pdu; } BOOST_AUTO_TEST_CASE(ConstructorStream) { std::istringstream stream(data); odil::pdu::AReleaseRQ const pdu(stream); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::AReleaseRQ const pdu; std::ostringstream stream; stream << pdu; BOOST_REQUIRE(stream.str() == data); } odil-0.11.0/tests/code/pdu/ApplicationContext.cpp000066400000000000000000000016601362244656000217130ustar00rootroot00000000000000#define BOOST_TEST_MODULE ApplicationContext #include #include #include #include "odil/Exception.h" #include "odil/pdu/ApplicationContext.h" std::string const data( "\x10\x00\x00\x03" "foo", 7 ); BOOST_AUTO_TEST_CASE(FromString) { odil::pdu::ApplicationContext const context("foo"); BOOST_REQUIRE_EQUAL(context.get_name(), "foo"); } BOOST_AUTO_TEST_CASE(FromStream) { std::istringstream stream(data); odil::pdu::ApplicationContext const context(stream); BOOST_REQUIRE_EQUAL(context.get_name(), "foo"); } BOOST_AUTO_TEST_CASE(Name) { odil::pdu::ApplicationContext context("foo"); context.set_name("other"); BOOST_REQUIRE_EQUAL(context.get_name(), "other"); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::ApplicationContext const context("foo"); std::ostringstream stream; stream << context; BOOST_REQUIRE_EQUAL(stream.str(), data); } odil-0.11.0/tests/code/pdu/AsynchronousOperationsWindow.cpp000066400000000000000000000032361362244656000240330ustar00rootroot00000000000000#define BOOST_TEST_MODULE AsynchronousOperationsWindow #include #include #include #include "odil/Exception.h" #include "odil/pdu/AsynchronousOperationsWindow.h" BOOST_AUTO_TEST_CASE(Constructor) { odil::pdu::AsynchronousOperationsWindow const window(123, 456); BOOST_REQUIRE_EQUAL(window.get_maximum_number_operations_invoked(), 123); BOOST_REQUIRE_EQUAL(window.get_maximum_number_operations_performed(), 456); } BOOST_AUTO_TEST_CASE(FromStream) { std::string const data( "\x53\x00\x00\x04" "\x12\x34\x56\x78", 8 ); std::istringstream stream(data); odil::pdu::AsynchronousOperationsWindow const window(stream); BOOST_REQUIRE_EQUAL(window.get_maximum_number_operations_invoked(), 0x1234); BOOST_REQUIRE_EQUAL(window.get_maximum_number_operations_performed(), 0x5678); } BOOST_AUTO_TEST_CASE(MaximumNumberOperationsInvoked) { odil::pdu::AsynchronousOperationsWindow window(0, 0); window.set_maximum_number_operations_invoked(123); BOOST_REQUIRE_EQUAL(window.get_maximum_number_operations_invoked(), 123); } BOOST_AUTO_TEST_CASE(MaximumNumberOperationsPerformed) { odil::pdu::AsynchronousOperationsWindow window(0, 0); window.set_maximum_number_operations_performed(123); BOOST_REQUIRE_EQUAL(window.get_maximum_number_operations_performed(), 123); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::AsynchronousOperationsWindow const window(0x1234, 0x5678); std::ostringstream data; data << window; std::string const expected( "\x53\x00\x00\x04" "\x12\x34\x56\x78", 8 ); BOOST_REQUIRE_EQUAL(data.str(), expected); } odil-0.11.0/tests/code/pdu/ImplementationClassUID.cpp000066400000000000000000000017601362244656000224210ustar00rootroot00000000000000#define BOOST_TEST_MODULE ImplementationClassUID #include #include #include #include "odil/pdu/ImplementationClassUID.h" std::string const data( "\x52\x00\x00\x03" "foo", 7 ); BOOST_AUTO_TEST_CASE(Constructor) { odil::pdu::ImplementationClassUID const item("foo"); BOOST_REQUIRE_EQUAL(item.get_implementation_class_uid(), "foo"); } BOOST_AUTO_TEST_CASE(FromStream) { std::istringstream stream(data); odil::pdu::ImplementationClassUID const item(stream); BOOST_REQUIRE_EQUAL(item.get_implementation_class_uid(), "foo"); } BOOST_AUTO_TEST_CASE(ImplementationClassUID) { odil::pdu::ImplementationClassUID item("foo"); item.set_implementation_class_uid("bar"); BOOST_REQUIRE_EQUAL(item.get_implementation_class_uid(), "bar"); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::ImplementationClassUID const item("foo"); std::ostringstream stream; stream << item; BOOST_REQUIRE_EQUAL(stream.str(), data); } odil-0.11.0/tests/code/pdu/ImplementationVersionName.cpp000066400000000000000000000026431362244656000232410ustar00rootroot00000000000000#define BOOST_TEST_MODULE ImplementationVersionName #include #include #include #include "odil/Exception.h" #include "odil/pdu/ImplementationVersionName.h" std::string const data( "\x55\x00\x00\x03" "foo", 7 ); BOOST_AUTO_TEST_CASE(Constructor) { odil::pdu::ImplementationVersionName const item("foo"); BOOST_REQUIRE_EQUAL(item.get_implementation_version_name(), "foo"); } BOOST_AUTO_TEST_CASE(FromStream) { std::istringstream stream(data); odil::pdu::ImplementationVersionName const item(stream); BOOST_REQUIRE_EQUAL(item.get_implementation_version_name(), "foo"); } BOOST_AUTO_TEST_CASE(VersionName) { odil::pdu::ImplementationVersionName item("foo"); item.set_implementation_version_name("bar"); BOOST_REQUIRE_EQUAL(item.get_implementation_version_name(), "bar"); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::ImplementationVersionName const item("foo"); std::ostringstream stream; stream << item; BOOST_REQUIRE_EQUAL(stream.str(), data); } BOOST_AUTO_TEST_CASE(Empty) { odil::pdu::ImplementationVersionName item("foo"); BOOST_REQUIRE_THROW( item.set_implementation_version_name(""), odil::Exception); } BOOST_AUTO_TEST_CASE(TooLong) { odil::pdu::ImplementationVersionName item("foo"); BOOST_REQUIRE_THROW( item.set_implementation_version_name("1234567890abcdef01"), odil::Exception); } odil-0.11.0/tests/code/pdu/Item.cpp000066400000000000000000000071751362244656000170100ustar00rootroot00000000000000#define BOOST_TEST_MODULE pdu::Item #include #include #include "odil/pdu/Item.h" #include "odil/Exception.h" BOOST_AUTO_TEST_CASE(FieldUInt8) { odil::pdu::Item::Field const field(uint8_t(123)); BOOST_REQUIRE( field.get_type() == odil::pdu::Item::Field::Type::unsigned_int_8); BOOST_REQUIRE_EQUAL(field.as_unsigned_int_8(), 123); } BOOST_AUTO_TEST_CASE(FieldUInt16) { odil::pdu::Item::Field const field(uint16_t(1234)); BOOST_REQUIRE( field.get_type() == odil::pdu::Item::Field::Type::unsigned_int_16); BOOST_REQUIRE_EQUAL(field.as_unsigned_int_16(), 1234); } BOOST_AUTO_TEST_CASE(FieldUInt32) { odil::pdu::Item::Field const field(uint32_t(123456)); BOOST_REQUIRE( field.get_type() == odil::pdu::Item::Field::Type::unsigned_int_32); BOOST_REQUIRE_EQUAL(field.as_unsigned_int_32(), 123456); } BOOST_AUTO_TEST_CASE(FieldString) { odil::pdu::Item::Field const field("abcdef"); BOOST_REQUIRE(field.get_type() == odil::pdu::Item::Field::Type::string); BOOST_REQUIRE_EQUAL(field.as_string(), "abcdef"); } BOOST_AUTO_TEST_CASE(FieldItems) { odil::pdu::Item const item_1({{"foo", uint8_t(123)}}); odil::pdu::Item const item_2({{"bar", std::string("abcdef")}}); odil::pdu::Item::Field const field( std::vector({item_1, item_2})); BOOST_REQUIRE(field.get_type() == odil::pdu::Item::Field::Type::items); BOOST_REQUIRE_EQUAL(field.as_items().size(), 2); } BOOST_AUTO_TEST_CASE(DefaultConstructor) { odil::pdu::Item const item; BOOST_REQUIRE(item.empty()); BOOST_REQUIRE_EQUAL(item.size(), 0); } BOOST_AUTO_TEST_CASE(FieldsConstructor) { odil::pdu::Item const item({ {std::string("foo"), uint8_t(123)}, {std::string("bar"), std::string("abcd")} }); BOOST_REQUIRE_EQUAL(item.size(), 2); BOOST_REQUIRE_EQUAL(item.as_unsigned_int_8("foo"), 123); BOOST_REQUIRE_EQUAL(item.as_string("bar"), "abcd"); } BOOST_AUTO_TEST_CASE(UInt8) { odil::pdu::Item item; item.add("foo", uint8_t(123)); BOOST_REQUIRE_EQUAL(item.size(), 1); BOOST_REQUIRE_EQUAL(item.has_field("foo"), true); BOOST_REQUIRE_EQUAL(item.as_unsigned_int_8("foo"), 123); BOOST_REQUIRE_THROW(item.as_unsigned_int_16("foo"), odil::Exception); } BOOST_AUTO_TEST_CASE(UInt16) { odil::pdu::Item item; item.add("foo", uint16_t(1234)); BOOST_REQUIRE_EQUAL(item.size(), 1); BOOST_REQUIRE_EQUAL(item.as_unsigned_int_16("foo"), 1234); BOOST_REQUIRE_THROW(item.as_unsigned_int_32("foo"), odil::Exception); } BOOST_AUTO_TEST_CASE(UInt32) { odil::pdu::Item item; item.add("foo", uint32_t(123456)); BOOST_REQUIRE_EQUAL(item.size(), 1); BOOST_REQUIRE_EQUAL(item.as_unsigned_int_32("foo"), 123456); BOOST_REQUIRE_THROW(item.as_string("foo"), odil::Exception); } BOOST_AUTO_TEST_CASE(String) { odil::pdu::Item item; item.add("foo", std::string("abcd")); BOOST_REQUIRE_EQUAL(item.size(), 1); BOOST_REQUIRE_EQUAL(item.as_string("foo"), "abcd"); BOOST_REQUIRE_THROW(item.as_items("foo"), odil::Exception); } BOOST_AUTO_TEST_CASE(Items) { odil::pdu::Item const sub_item( {{"bar", std::string("abcdef")}}); odil::pdu::Item item; item.add("foo", std::vector({sub_item})); BOOST_REQUIRE_EQUAL(item.size(), 1); BOOST_REQUIRE_EQUAL(item.as_items("foo").size(), 1); BOOST_REQUIRE_THROW(item.as_unsigned_int_8("foo"), odil::Exception); } BOOST_AUTO_TEST_CASE(FieldAccessor) { odil::pdu::Item item; item.add("foo", std::string("abcd")); BOOST_REQUIRE_NO_THROW(item["foo"]); BOOST_REQUIRE_THROW(item["bar"], odil::Exception); } odil-0.11.0/tests/code/pdu/MaximumLength.cpp000066400000000000000000000024471362244656000206660ustar00rootroot00000000000000#define BOOST_TEST_MODULE MaximumLength #include #include #include #include "odil/Exception.h" #include "odil/pdu/MaximumLength.h" BOOST_AUTO_TEST_CASE(ConstructorDefault) { odil::pdu::MaximumLength const maximum_length; BOOST_REQUIRE_EQUAL(maximum_length.get_maximum_length(), 0); } BOOST_AUTO_TEST_CASE(ConstructorInt) { odil::pdu::MaximumLength const maximum_length(123); BOOST_REQUIRE_EQUAL(maximum_length.get_maximum_length(), 123); } BOOST_AUTO_TEST_CASE(FromStream) { std::string const data( "\x51\x00\x00\x04" "\x12\x34\x56\x78", 8 ); std::istringstream stream(data); odil::pdu::MaximumLength const maximum_length(stream); BOOST_REQUIRE_EQUAL(maximum_length.get_maximum_length(), 0x12345678); } BOOST_AUTO_TEST_CASE(MaximumLength) { odil::pdu::MaximumLength maximum_length; maximum_length.set_maximum_length(123); BOOST_REQUIRE_EQUAL(maximum_length.get_maximum_length(), 123); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::MaximumLength const maximum_length(0x12345678); std::ostringstream data; data << maximum_length; std::string const expected( "\x51\x00\x00\x04" "\x12\x34\x56\x78", 8 ); BOOST_REQUIRE_EQUAL(data.str(), expected); } odil-0.11.0/tests/code/pdu/PDataTF.cpp000066400000000000000000000033421362244656000173250ustar00rootroot00000000000000#define BOOST_TEST_MODULE pdu::PDataTF #include #include #include #include #include "odil/Exception.h" #include "odil/pdu/PDataTF.h" std::string const data = { 0x04, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x0a, 0x01, 0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x0c, 0x03, 0x02, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12 }; std::vector const pdv_items = { { 1, 0x01, "\x01\x02\x03\x04\x05\x06\x07\x08" }, { 3, 0x02, "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12" }, }; namespace odil { namespace pdu { bool operator==( PDataTF::PresentationDataValueItem const & lhs, PDataTF::PresentationDataValueItem const & rhs) { return ( lhs.get_presentation_context_id() == rhs.get_presentation_context_id() && lhs.get_control_header() == rhs.get_control_header() && lhs.get_fragment() == rhs.get_fragment()); } } } BOOST_AUTO_TEST_CASE(ConstructorPDV) { odil::pdu::PDataTF const pdu(pdv_items); BOOST_REQUIRE(pdu.get_pdv_items() == pdv_items); } BOOST_AUTO_TEST_CASE(ConstructorStream) { std::istringstream stream(data); odil::pdu::PDataTF const pdu(stream); BOOST_REQUIRE(pdu.get_pdv_items() == pdv_items); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::PDataTF const pdu(pdv_items); std::ostringstream stream; stream << pdu; BOOST_REQUIRE(stream.str() == data); } BOOST_AUTO_TEST_CASE(WrongPresentationContextID) { BOOST_REQUIRE_THROW( odil::pdu::PDataTF::PresentationDataValueItem( 2, pdv_items[0].get_control_header(), pdv_items[0].get_fragment()), odil::Exception); } odil-0.11.0/tests/code/pdu/PresentationContextAC.cpp000066400000000000000000000031621362244656000223260ustar00rootroot00000000000000#define BOOST_TEST_MODULE PresentationContextAC #include #include #include #include #include "odil/Exception.h" #include "odil/pdu/PresentationContextAC.h" std::string const data( "\x21\x00\x00\x17" "\x03\x00\x01\x00" "\x40\x00\x00\x0f""transfer_syntax", 27 ); BOOST_AUTO_TEST_CASE(Constructor) { odil::pdu::PresentationContextAC const context(1, "transfer_syntax", 2); BOOST_REQUIRE_EQUAL(context.get_item_type(), 0x21); BOOST_REQUIRE_EQUAL(context.get_id(), 0x1); BOOST_REQUIRE_EQUAL(context.get_result_reason(), 0x2); BOOST_REQUIRE_EQUAL(context.get_transfer_syntax(), "transfer_syntax"); } BOOST_AUTO_TEST_CASE(Id) { odil::pdu::PresentationContextAC context(1, "transfer_syntax", 1); context.set_id(123); BOOST_REQUIRE_EQUAL(context.get_id(), 123); } BOOST_AUTO_TEST_CASE(TransferSyntax) { odil::pdu::PresentationContextAC context(1, "transfer_syntax", 1); context.set_transfer_syntax("foo"); BOOST_REQUIRE_EQUAL(context.get_transfer_syntax(), "foo"); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::PresentationContextAC context(3, "transfer_syntax", 1); std::ostringstream stream; stream << context; BOOST_REQUIRE_EQUAL(stream.str(), data); } BOOST_AUTO_TEST_CASE(Read) { std::istringstream stream(data); odil::pdu::PresentationContextAC const context(stream); BOOST_REQUIRE_EQUAL(context.get_item_type(), 0x21); BOOST_REQUIRE_EQUAL(context.get_id(), 3); BOOST_REQUIRE_EQUAL(context.get_result_reason(), 1); BOOST_REQUIRE_EQUAL(context.get_transfer_syntax(), "transfer_syntax"); } odil-0.11.0/tests/code/pdu/PresentationContextRQ.cpp000066400000000000000000000042471362244656000223720ustar00rootroot00000000000000#define BOOST_TEST_MODULE PresentationContextRQ #include #include #include #include #include "odil/Exception.h" #include "odil/pdu/PresentationContextRQ.h" std::string const data( "\x20\x00\x00\x25" "\x03\x00\x00\x00" "\x30\x00\x00\x0f""abstract_syntax" "\x40\x00\x00\x03""ts1" "\x40\x00\x00\x03""ts2", 41 ); BOOST_AUTO_TEST_CASE(Constructor) { odil::pdu::PresentationContextRQ const context( 1, "abstract_syntax", {"ts1", "ts2"}); BOOST_REQUIRE_EQUAL(context.get_item_type(), 0x20); BOOST_REQUIRE_EQUAL(context.get_id(), 1); BOOST_REQUIRE_EQUAL(context.get_abstract_syntax(), "abstract_syntax"); BOOST_REQUIRE( context.get_transfer_syntaxes() == std::vector({"ts1", "ts2"})); } BOOST_AUTO_TEST_CASE(Id) { odil::pdu::PresentationContextRQ context( 1, "abstract_syntax", {"ts1", "ts2"}); context.set_id(123); BOOST_REQUIRE_EQUAL(context.get_id(), 123); } BOOST_AUTO_TEST_CASE(AbstractSyntax) { odil::pdu::PresentationContextRQ context( 1, "abstract_syntax", {"ts1", "ts2"}); context.set_abstract_syntax("foo"); BOOST_REQUIRE_EQUAL(context.get_abstract_syntax(), "foo"); } BOOST_AUTO_TEST_CASE(TransferSyntaxes) { odil::pdu::PresentationContextRQ context( 1, "abstract_syntax", {"ts1", "ts2"}); context.set_transfer_syntaxes({"foo", "bar"}); BOOST_REQUIRE( context.get_transfer_syntaxes() == std::vector({"foo", "bar"})); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::PresentationContextRQ context( 3, "abstract_syntax", {"ts1", "ts2"}); std::ostringstream stream; stream << context; BOOST_REQUIRE_EQUAL(stream.str(), data); } BOOST_AUTO_TEST_CASE(Read) { std::istringstream stream(data); odil::pdu::PresentationContextRQ const context(stream); BOOST_REQUIRE_EQUAL(context.get_item_type(), 0x20); BOOST_REQUIRE_EQUAL(context.get_id(), 3); BOOST_REQUIRE_EQUAL(context.get_abstract_syntax(), "abstract_syntax"); BOOST_REQUIRE( context.get_transfer_syntaxes() == std::vector({"ts1", "ts2"})); } odil-0.11.0/tests/code/pdu/RoleSelection.cpp000066400000000000000000000034601362244656000206520ustar00rootroot00000000000000#define BOOST_TEST_MODULE RoleSelection #include #include #include #include "odil/pdu/RoleSelection.h" #include std::string const data( "\x54\x00\x00\x0b" "\x00\x07" "1.2.3.4" "\x01\x01", 15 ); BOOST_AUTO_TEST_CASE(DefaultConstructor) { odil::pdu::RoleSelection const item; BOOST_REQUIRE_EQUAL(item.get_sop_class_uid(), ""); BOOST_REQUIRE_EQUAL(item.get_scu_role_support(), false); BOOST_REQUIRE_EQUAL(item.get_scp_role_support(), false); } BOOST_AUTO_TEST_CASE(Constructor) { odil::pdu::RoleSelection const item("1.2.3.4", true, true); BOOST_REQUIRE_EQUAL(item.get_sop_class_uid(), "1.2.3.4"); BOOST_REQUIRE_EQUAL(item.get_scu_role_support(), true); BOOST_REQUIRE_EQUAL(item.get_scp_role_support(), true); } BOOST_AUTO_TEST_CASE(FromStream) { std::istringstream stream(data); odil::pdu::RoleSelection const item(stream); BOOST_REQUIRE_EQUAL(item.get_sop_class_uid(), "1.2.3.4"); BOOST_REQUIRE_EQUAL(item.get_scu_role_support(), true); BOOST_REQUIRE_EQUAL(item.get_scp_role_support(), true); } BOOST_AUTO_TEST_CASE(SOPClassUID) { odil::pdu::RoleSelection item; item.set_sop_class_uid("1.2.3.4"); BOOST_REQUIRE_EQUAL(item.get_sop_class_uid(), "1.2.3.4"); } BOOST_AUTO_TEST_CASE(SCURoleSupport) { odil::pdu::RoleSelection item; item.set_scu_role_support(true); BOOST_REQUIRE_EQUAL(item.get_scu_role_support(), true); } BOOST_AUTO_TEST_CASE(SCPRoleSupport) { odil::pdu::RoleSelection item; item.set_scp_role_support(true); BOOST_REQUIRE_EQUAL(item.get_scp_role_support(), true); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::RoleSelection item("1.2.3.4", true, true); std::ostringstream stream; stream << item; BOOST_REQUIRE_EQUAL(stream.str(), data); } odil-0.11.0/tests/code/pdu/SOPClassCommonExtendedNegotiation.cpp000066400000000000000000000050311362244656000245610ustar00rootroot00000000000000#define BOOST_TEST_MODULE SOPClassCommonExtendedNegotiation #include #include #include #include "odil/Exception.h" #include "odil/pdu/SOPClassCommonExtendedNegotiation.h" BOOST_AUTO_TEST_CASE(Constructor) { odil::pdu::SOPClassCommonExtendedNegotiation const item( "sop_class", "service_class", {"foo", "bar"}); BOOST_REQUIRE_EQUAL(item.get_sop_class_uid(), "sop_class"); BOOST_REQUIRE_EQUAL(item.get_service_class_uid(), "service_class"); BOOST_REQUIRE( item.get_related_general_sop_class_uids() == std::vector({"foo", "bar"})); } BOOST_AUTO_TEST_CASE(FromStream) { std::string const data( "\x57\x00\x00\x26" "\x00\x09" "sop_class" "\x00\x0d" "service_class" "\x00\x0a" "\x00\x03" "foo" "\x00\x03" "bar", 42 ); std::istringstream stream(data); odil::pdu::SOPClassCommonExtendedNegotiation const item(stream); BOOST_REQUIRE_EQUAL(item.get_sop_class_uid(), "sop_class"); BOOST_REQUIRE_EQUAL(item.get_service_class_uid(), "service_class"); BOOST_REQUIRE( item.get_related_general_sop_class_uids() == std::vector({"foo", "bar"})); } BOOST_AUTO_TEST_CASE(SOPClassUID) { odil::pdu::SOPClassCommonExtendedNegotiation item( "sop_class", "service_class", {"foo", "bar"}); item.set_sop_class_uid("bar"); BOOST_REQUIRE_EQUAL(item.get_sop_class_uid(), "bar"); } BOOST_AUTO_TEST_CASE(ServiceClassUID) { odil::pdu::SOPClassCommonExtendedNegotiation item( "sop_class", "service_class", {"foo", "bar"}); item.set_service_class_uid("bar"); BOOST_REQUIRE_EQUAL(item.get_service_class_uid(), "bar"); } BOOST_AUTO_TEST_CASE(RelatedClasses) { odil::pdu::SOPClassCommonExtendedNegotiation item( "sop_class", "service_class", {"foo", "bar"}); item.set_related_general_sop_class_uids({"plip", "plop", "plup"}); BOOST_REQUIRE( item.get_related_general_sop_class_uids() == std::vector({"plip", "plop", "plup"})); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::SOPClassCommonExtendedNegotiation const item( "sop_class", "service_class", {"foo", "bar"}); std::ostringstream data; data << item; std::string const expected( "\x57\x00\x00\x26" "\x00\x09" "sop_class" "\x00\x0d" "service_class" "\x00\x0a" "\x00\x03" "foo" "\x00\x03" "bar", 42 ); BOOST_REQUIRE_EQUAL(data.str(), expected); } odil-0.11.0/tests/code/pdu/SOPClassExtendedNegotiation.cpp000066400000000000000000000037631362244656000234220ustar00rootroot00000000000000#define BOOST_TEST_MODULE SOPClassExtendedNegotiation #include #include #include #include "odil/Exception.h" #include "odil/pdu/SOPClassExtendedNegotiation.h" BOOST_AUTO_TEST_CASE(Constructor) { odil::pdu::SOPClassExtendedNegotiation const item( "sop_class", {'\x01', '\x02', '\x03', '\x04'}); BOOST_REQUIRE_EQUAL(item.get_sop_class_uid(), "sop_class"); BOOST_REQUIRE( item.get_service_class_application_information() == std::vector({'\x01', '\x02', '\x03', '\x04'})); } BOOST_AUTO_TEST_CASE(FromStream) { std::string const data( "\x56\x00\x00\x0f" "\x00\x09" "sop_class" "\x01\x02\x03\x04", 19 ); std::istringstream stream(data); odil::pdu::SOPClassExtendedNegotiation const item(stream); BOOST_REQUIRE_EQUAL(item.get_sop_class_uid(), "sop_class"); BOOST_REQUIRE( item.get_service_class_application_information() == std::vector({'\x01', '\x02', '\x03', '\x04'})); } BOOST_AUTO_TEST_CASE(SOPClassUID) { odil::pdu::SOPClassExtendedNegotiation item( "sop_class", {'\x01', '\x02', '\x03', '\x04'}); item.set_sop_class_uid("bar"); BOOST_REQUIRE_EQUAL(item.get_sop_class_uid(), "bar"); } BOOST_AUTO_TEST_CASE(ServiceClassApplicationInformation) { odil::pdu::SOPClassExtendedNegotiation item( "sop_class", {'\x01', '\x02', '\x03', '\x04'}); item.set_service_class_application_information({'\x05', '\x06'}); BOOST_REQUIRE( item.get_service_class_application_information() == std::vector({'\x05', '\x06'})); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::SOPClassExtendedNegotiation const item( "sop_class", {'\x01', '\x02', '\x03', '\x04'}); std::ostringstream data; data << item; std::string const expected( "\x56\x00\x00\x0f" "\x00\x09" "sop_class" "\x01\x02\x03\x04", 19 ); BOOST_REQUIRE_EQUAL(data.str(), expected); } odil-0.11.0/tests/code/pdu/UserIdentityAC.cpp000066400000000000000000000024771362244656000207460ustar00rootroot00000000000000#define BOOST_TEST_MODULE UserIdentityAC #include #include #include #include "odil/Exception.h" #include "odil/pdu/UserIdentityAC.h" BOOST_AUTO_TEST_CASE(ConstructorDefault) { odil::pdu::UserIdentityAC const user_identity; BOOST_REQUIRE_EQUAL(user_identity.get_server_response(), ""); } BOOST_AUTO_TEST_CASE(ConstructorString) { odil::pdu::UserIdentityAC const user_identity("foo"); BOOST_REQUIRE_EQUAL(user_identity.get_server_response(), "foo"); } BOOST_AUTO_TEST_CASE(FromStream) { std::string const data( "\x59\x00\x00\x05" "\x00\x03" "foo", 9 ); std::istringstream stream(data); odil::pdu::UserIdentityAC const user_identity(stream); BOOST_REQUIRE_EQUAL(user_identity.get_server_response(), "foo"); } BOOST_AUTO_TEST_CASE(Type) { odil::pdu::UserIdentityAC user_identity; user_identity.set_server_response("foo"); BOOST_REQUIRE_EQUAL(user_identity.get_server_response(), "foo"); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::UserIdentityAC user_identity; user_identity.set_server_response("foo"); std::ostringstream data; data << user_identity; std::string const expected( "\x59\x00\x00\x05" "\x00\x03" "foo", 9 ); BOOST_REQUIRE_EQUAL(data.str(), expected); } odil-0.11.0/tests/code/pdu/UserIdentityRQ.cpp000066400000000000000000000070551362244656000210020ustar00rootroot00000000000000#define BOOST_TEST_MODULE UserIdentityRQ #include #include #include #include "odil/Exception.h" #include "odil/pdu/UserIdentityRQ.h" BOOST_AUTO_TEST_CASE(Constructor) { odil::pdu::UserIdentityRQ const user_identity; BOOST_REQUIRE_EQUAL(user_identity.get_type(), 1); BOOST_REQUIRE_EQUAL(user_identity.get_positive_response_requested(), false); BOOST_REQUIRE_EQUAL(user_identity.get_primary_field(), ""); BOOST_REQUIRE_EQUAL(user_identity.get_secondary_field(), ""); } BOOST_AUTO_TEST_CASE(FromStream) { std::string const data( "\x58\x00\x00\x0c" "\x02\x01" "\x00\x03" "foo" "\x00\x03" "bar", 16 ); std::istringstream stream(data); odil::pdu::UserIdentityRQ const user_identity(stream); BOOST_REQUIRE_EQUAL(user_identity.get_type(), 2); BOOST_REQUIRE_EQUAL(user_identity.get_positive_response_requested(), true); BOOST_REQUIRE_EQUAL(user_identity.get_primary_field(), "foo"); BOOST_REQUIRE_EQUAL(user_identity.get_secondary_field(), "bar"); } BOOST_AUTO_TEST_CASE(Type) { odil::pdu::UserIdentityRQ user_identity; user_identity.set_type(2); BOOST_REQUIRE_EQUAL(user_identity.get_type(), 2); } BOOST_AUTO_TEST_CASE(PositiveResponseRequested) { odil::pdu::UserIdentityRQ user_identity; user_identity.set_positive_response_requested(true); BOOST_REQUIRE_EQUAL(user_identity.get_positive_response_requested(), true); } BOOST_AUTO_TEST_CASE(PrimaryField) { odil::pdu::UserIdentityRQ user_identity; user_identity.set_primary_field("foo"); BOOST_REQUIRE_EQUAL(user_identity.get_primary_field(), "foo"); } BOOST_AUTO_TEST_CASE(SecondaryField) { odil::pdu::UserIdentityRQ user_identity; user_identity.set_secondary_field("foo"); BOOST_REQUIRE_EQUAL(user_identity.get_secondary_field(), "foo"); } BOOST_AUTO_TEST_CASE(Username) { odil::pdu::UserIdentityRQ user_identity; user_identity.set_username("foo"); BOOST_REQUIRE_EQUAL(user_identity.get_type(), 1); BOOST_REQUIRE_EQUAL(user_identity.get_primary_field(), "foo"); BOOST_REQUIRE_EQUAL(user_identity.get_secondary_field(), ""); } BOOST_AUTO_TEST_CASE(UsernameAndPasscode) { odil::pdu::UserIdentityRQ user_identity; user_identity.set_username_and_passcode("foo", "bar"); BOOST_REQUIRE_EQUAL(user_identity.get_type(), 2); BOOST_REQUIRE_EQUAL(user_identity.get_primary_field(), "foo"); BOOST_REQUIRE_EQUAL(user_identity.get_secondary_field(), "bar"); } BOOST_AUTO_TEST_CASE(KerberosTicket) { odil::pdu::UserIdentityRQ user_identity; user_identity.set_kerberos_service_ticket("1234"); BOOST_REQUIRE_EQUAL(user_identity.get_type(), 3); BOOST_REQUIRE_EQUAL(user_identity.get_primary_field(), "1234"); BOOST_REQUIRE_EQUAL(user_identity.get_secondary_field(), ""); } BOOST_AUTO_TEST_CASE(SAMLAssertion) { odil::pdu::UserIdentityRQ user_identity; user_identity.set_saml_assertion("1234"); BOOST_REQUIRE_EQUAL(user_identity.get_type(), 4); BOOST_REQUIRE_EQUAL(user_identity.get_primary_field(), "1234"); BOOST_REQUIRE_EQUAL(user_identity.get_secondary_field(), ""); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::UserIdentityRQ user_identity; user_identity.set_username_and_passcode("foo", "bar"); user_identity.set_positive_response_requested(true); std::ostringstream data; data << user_identity; std::string const expected( "\x58\x00\x00\x0c" "\x02\x01" "\x00\x03" "foo" "\x00\x03" "bar", 16 ); BOOST_REQUIRE_EQUAL(data.str(), expected); } odil-0.11.0/tests/code/pdu/UserInformation.cpp000066400000000000000000000077071362244656000212370ustar00rootroot00000000000000#define BOOST_TEST_MODULE UserInformation #include #include #include "odil/Exception.h" #include "odil/pdu/ImplementationClassUID.h" #include "odil/pdu/ImplementationVersionName.h" #include "odil/pdu/MaximumLength.h" #include "odil/pdu/RoleSelection.h" #include "odil/pdu/UserInformation.h" #include "odil/pdu/UserIdentityAC.h" #include "odil/pdu/UserIdentityRQ.h" BOOST_AUTO_TEST_CASE(ConstructorDefault) { odil::pdu::UserInformation const item; BOOST_REQUIRE(item.get_sub_items().empty()); BOOST_REQUIRE(item.get_sub_items().empty()); } BOOST_AUTO_TEST_CASE(ConstructorStreamMaximumLength) { std::string const data( "\x50\x00\x00\x08" "\x51\x00\x00\x04" "\x12\x34\x56\x78", 12 ); std::istringstream stream(data); odil::pdu::UserInformation const item(stream); BOOST_REQUIRE_EQUAL( item.get_sub_items().size(), 1); } BOOST_AUTO_TEST_CASE(ConstructorStreamImplementationClassUID) { std::string const data( "\x50\x00\x00\x07" "\x52\x00\x00\x03" "foo", 11 ); std::istringstream stream(data); odil::pdu::UserInformation const item(stream); BOOST_REQUIRE_EQUAL( item.get_sub_items().size(), 1); } BOOST_AUTO_TEST_CASE(ConstructorStreamRoleSelection) { std::string const data( "\x50\x00\x00\x0f" "\x54\x00\x00\x0b" "\x00\x07" "1.2.3.4" "\x01\x01", 19 ); std::istringstream stream(data); odil::pdu::UserInformation const item(stream); BOOST_REQUIRE_EQUAL( item.get_sub_items().size(), 1); } BOOST_AUTO_TEST_CASE(ConstructorStreamImplementationVersionName) { std::string const data( "\x50\x00\x00\x07" "\x55\x00\x00\x03" "foo", 11 ); std::istringstream stream(data); odil::pdu::UserInformation const item(stream); BOOST_REQUIRE_EQUAL( item.get_sub_items().size(), 1); } BOOST_AUTO_TEST_CASE(ConstructorStreamUserIdentityRQ) { std::string const data( "\x50\x00\x00\x10" "\x58\x00\x00\x0c" "\x02\x01" "\x00\x03" "foo" "\x00\x03" "bar", 20 ); std::istringstream stream(data); odil::pdu::UserInformation const item(stream); BOOST_REQUIRE_EQUAL( item.get_sub_items().size(), 1); } BOOST_AUTO_TEST_CASE(ConstructorStreamUserIdentityAC) { std::string const data( "\x50\x00\x00\x0a" "\x59\x00\x00\x06" "\x00\x04" "abcd", 14 ); std::istringstream stream(data); odil::pdu::UserInformation const item(stream); BOOST_REQUIRE_EQUAL( item.get_sub_items().size(), 1); } BOOST_AUTO_TEST_CASE(SetSubItems) { odil::pdu::UserInformation item; BOOST_REQUIRE(item.get_sub_items().empty()); item.set_sub_items({{0x12345678}}); BOOST_REQUIRE_EQUAL( item.get_sub_items().size(), 1); } BOOST_AUTO_TEST_CASE(DeleteSubItems) { odil::pdu::UserInformation item; BOOST_REQUIRE(item.get_sub_items().empty()); item.set_sub_items({{0x12345678}}); BOOST_REQUIRE_EQUAL( item.get_sub_items().size(), 1); item.delete_sub_items(); BOOST_REQUIRE(item.get_sub_items().empty()); } BOOST_AUTO_TEST_CASE(Write) { odil::pdu::UserInformation item; item.set_sub_items({{0x12345678}}); std::ostringstream data; data << item; std::string const expected( "\x50\x00\x00\x08" "\x51\x00\x00\x04" "\x12\x34\x56\x78", 12 ); BOOST_REQUIRE_EQUAL(data.str(), expected); } odil-0.11.0/tests/code/registry.cpp000066400000000000000000000026661362244656000171720ustar00rootroot00000000000000#define BOOST_TEST_MODULE registry #include #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"); } odil-0.11.0/tests/code/uid.cpp000066400000000000000000000004651362244656000160760ustar00rootroot00000000000000#define BOOST_TEST_MODULE UID #include #include "odil/uid.h" BOOST_AUTO_TEST_CASE(generate) { std::string const uid = odil::generate_uid(); BOOST_REQUIRE_LE(uid.size(), 64); for(auto const & c: uid) { BOOST_REQUIRE((c>='0' && c<='9') || c == '.'); } } odil-0.11.0/tests/code/unicode.cpp000066400000000000000000000305251362244656000167430ustar00rootroot00000000000000#define BOOST_TEST_MODULE unicode #include #include "odil/DataSet.h" #include "odil/unicode.h" BOOST_AUTO_TEST_CASE(SCSARAB_AsUTF8) { odil::Value::Strings const specific_character_set = { "ISO_IR 127" }; std::string const source = "\xe2\xc8\xc7\xe6\xea" "^" "\xe4\xe6\xd2\xc7\xd1"; std::string const expected = "\xd9\x82\xd8\xa8\xd8\xa7\xd9\x86\xd9\x8a" "^" "\xd9\x84\xd9\x86\xd8\xb2\xd8\xa7\xd8\xb1"; std::string const utf8 = odil::as_utf8( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(utf8, expected); } BOOST_AUTO_TEST_CASE(SCSARAB_AsSCS) { odil::Value::Strings const specific_character_set = { "ISO_IR 127" }; std::string const source = "\xd9\x82\xd8\xa8\xd8\xa7\xd9\x86\xd9\x8a" "^" "\xd9\x84\xd9\x86\xd8\xb2\xd8\xa7\xd8\xb1"; std::string const expected = "\xe2\xc8\xc7\xe6\xea" "^" "\xe4\xe6\xd2\xc7\xd1"; std::string const scs = odil::as_specific_character_set( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(scs, expected); } BOOST_AUTO_TEST_CASE(SCSFREN_AsUTF8) { odil::Value::Strings const specific_character_set = { "ISO_IR 100" }; std::string const source = "Buc" "^" "J\xe9r\xf4me"; std::string const expected = "Buc" "^" "J\xc3\xa9r\xc3\xb4me"; std::string const utf8 = odil::as_utf8( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(utf8, expected); } BOOST_AUTO_TEST_CASE(SCSFREN_AsSCS) { odil::Value::Strings const specific_character_set = { "ISO_IR 100" }; std::string const source = "Buc" "^" "J\xc3\xa9r\xc3\xb4me"; std::string const expected = "Buc" "^" "J\xe9r\xf4me"; std::string const scs = odil::as_specific_character_set( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(scs, expected); } BOOST_AUTO_TEST_CASE(SCSGERM_AsUTF8) { odil::Value::Strings const specific_character_set = { "ISO_IR 100" }; std::string const source = "\xc4neas" "^" "R\xfc" "diger"; std::string const expected = "\xc3\x84neas" "^" "R\xc3\xbc" "diger"; std::string const utf8 = odil::as_utf8( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(utf8, expected); } BOOST_AUTO_TEST_CASE(SCSGERM_AsSCS) { odil::Value::Strings const specific_character_set = { "ISO_IR 100" }; std::string const source = "\xc3\x84neas" "^" "R\xc3\xbc" "diger"; std::string const expected = "\xc4neas" "^" "R\xfc" "diger"; std::string const scs = odil::as_specific_character_set( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(scs, expected); } BOOST_AUTO_TEST_CASE(SCSGREEK_AsUTF8) { odil::Value::Strings const specific_character_set = { "ISO_IR 126" }; std::string const source = "\xc4\xe9\xef\xed\xf5\xf3\xe9\xef\xf2"; std::string const expected = "\xce\x94\xce\xb9\xce\xbf\xce\xbd\xcf\x85\xcf\x83\xce\xb9\xce\xbf\xcf\x82"; std::string const utf8 = odil::as_utf8( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(utf8, expected); } BOOST_AUTO_TEST_CASE(SCSGREEK_AsSCS) { odil::Value::Strings const specific_character_set = { "ISO_IR 126" }; std::string const source = "\xce\x94\xce\xb9\xce\xbf\xce\xbd\xcf\x85\xcf\x83\xce\xb9\xce\xbf\xcf\x82"; std::string const expected = "\xc4\xe9\xef\xed\xf5\xf3\xe9\xef\xf2"; std::string const scs = odil::as_specific_character_set( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(scs, expected); } BOOST_AUTO_TEST_CASE(SCSH31_AsUTF8) { odil::Value::Strings const specific_character_set = { "", "ISO 2022 IR 87" }; std::string const source = "Yamada" "^" "Tarou" "=" "\x1b\x24\x42\x3b\x33\x45\x44\x1b\x28\x42" "^" "\x1b\x24\x42\x42\x40\x4f\x3a\x1b\x28\x42" "=" "\x1b\x24\x42\x24\x64\x24\x5e\x24\x40\x1b\x28\x42" "^" "\x1b\x24\x42\x24\x3f\x24\x6d\x24\x26\x1b\x28\x42"; std::string const expected = "Yamada" "^" "Tarou" "=" "\xe5\xb1\xb1\xe7\x94\xb0" "^" "\xe5\xa4\xaa\xe9\x83\x8e" "=" "\xe3\x82\x84\xe3\x81\xbe\xe3\x81\xa0" "^" "\xe3\x81\x9f\xe3\x82\x8d\xe3\x81\x86"; std::string const utf8 = odil::as_utf8( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(utf8, expected); } BOOST_AUTO_TEST_CASE(SCSH31_AsSCS) { odil::Value::Strings const specific_character_set = { "", "ISO 2022 IR 87" }; std::string const source = "Yamada" "^" "Tarou" "=" "\xe5\xb1\xb1\xe7\x94\xb0" "^" "\xe5\xa4\xaa\xe9\x83\x8e" "=" "\xe3\x82\x84\xe3\x81\xbe\xe3\x81\xa0" "^" "\xe3\x81\x9f\xe3\x82\x8d\xe3\x81\x86"; std::string const expected = "Yamada" "^" "Tarou" "=" "\x1b\x24\x42\x3b\x33\x45\x44\x1b\x28\x42" "^" "\x1b\x24\x42\x42\x40\x4f\x3a\x1b\x28\x42" "=" "\x1b\x24\x42\x24\x64\x24\x5e\x24\x40\x1b\x28\x42" "^" "\x1b\x24\x42\x24\x3f\x24\x6d\x24\x26\x1b\x28\x42"; std::string const scs = odil::as_specific_character_set( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(scs, expected); } BOOST_AUTO_TEST_CASE(SCSH32_AsUTF8) { odil::Value::Strings const specific_character_set = { "ISO 2022 IR 13", "ISO 2022 IR 87" }; std::string const source = "\xd4\xcf\xc0\xde" "^" "\xc0\xdb\xb3" "=" "\x1b\x24\x42\x3b\x33\x45\x44\x1b\x28\x4a" "^" "\x1b\x24\x42\x42\x40\x4f\x3a\x1b\x28\x4a" "=" "\x1b\x24\x42\x24\x64\x24\x5e\x24\x40\x1b\x28\x4a" "\x5e\x1b\x24\x42\x24\x3f\x24\x6d\x24\x26\x1b\x28\x4a"; std::string const expected = "\xef\xbe\x94\xef\xbe\x8f\xef\xbe\x80\xef\xbe\x9e" "^" "\xef\xbe\x80\xef\xbe\x9b\xef\xbd\xb3" "=" "\xe5\xb1\xb1\xe7\x94\xb0" "^" "\xe5\xa4\xaa\xe9\x83\x8e" "=" "\xe3\x82\x84\xe3\x81\xbe\xe3\x81\xa0" "^" "\xe3\x81\x9f\xe3\x82\x8d\xe3\x81\x86"; std::string const utf8 = odil::as_utf8( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(utf8, expected); } BOOST_AUTO_TEST_CASE(SCSH32_AsSCS) { odil::Value::Strings const specific_character_set = { "ISO 2022 IR 13", "ISO 2022 IR 87" }; std::string const source = "\xef\xbe\x94\xef\xbe\x8f\xef\xbe\x80\xef\xbe\x9e" "^" "\xef\xbe\x80\xef\xbe\x9b\xef\xbd\xb3" "=" "\xe5\xb1\xb1\xe7\x94\xb0" "^" "\xe5\xa4\xaa\xe9\x83\x8e" "=" "\xe3\x82\x84\xe3\x81\xbe\xe3\x81\xa0" "^" "\xe3\x81\x9f\xe3\x82\x8d\xe3\x81\x86"; std::string const expected = "\xd4\xcf\xc0\xde" "^" "\xc0\xdb\xb3" "=" "\x1b\x24\x42\x3b\x33\x45\x44\x1b\x28\x4a" "^" "\x1b\x24\x42\x42\x40\x4f\x3a\x1b\x28\x4a" "=" "\x1b\x24\x42\x24\x64\x24\x5e\x24\x40\x1b\x28\x4a" "^" "\x1b\x24\x42\x24\x3f\x24\x6d\x24\x26\x1b\x28\x4a"; std::string const scs = odil::as_specific_character_set( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(scs, expected); } BOOST_AUTO_TEST_CASE(SCSHBRW_AsUTF8) { odil::Value::Strings const specific_character_set = { "ISO_IR 138" }; std::string const source = "\xf9\xf8\xe5\xef" "^" "\xe3\xe1\xe5\xf8\xe4"; std::string const expected = "\xd7\xa9\xd7\xa8\xd7\x95\xd7\x9f" "^" "\xd7\x93\xd7\x91\xd7\x95\xd7\xa8\xd7\x94"; std::string const utf8 = odil::as_utf8( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(utf8, expected); } BOOST_AUTO_TEST_CASE(SCSHBRW_AsSCS) { odil::Value::Strings const specific_character_set = { "ISO_IR 138" }; std::string const source = "\xd7\xa9\xd7\xa8\xd7\x95\xd7\x9f" "^" "\xd7\x93\xd7\x91\xd7\x95\xd7\xa8\xd7\x94"; std::string const expected = "\xf9\xf8\xe5\xef" "^" "\xe3\xe1\xe5\xf8\xe4"; std::string const scs = odil::as_specific_character_set( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(scs, expected); } BOOST_AUTO_TEST_CASE(SCSI2_AsUTF8) { odil::Value::Strings const specific_character_set = { "", "ISO 2022 IR 149" }; std::string const source = "\x48\x6f\x6e\x67" "^" "\x47\x69\x6c\x64\x6f\x6e\x67" "=" "\x1b\x24\x29\x43\xfb\xf3" "^" "\x1b\x24\x29\x43\xd1\xce\xd4\xd7" "=" "\x1b\x24\x29\x43\xc8\xab" "^" "\x1b\x24\x29\x43\xb1\xe6\xb5\xbf"; std::string const expected = "\x48\x6f\x6e\x67" "^" "\x47\x69\x6c\x64\x6f\x6e\x67" "=" "\xe6\xb4\xaa" "^" "\xe5\x90\x89\xe6\xb4\x9e" "=" "\xed\x99\x8d" "^" "\xea\xb8\xb8\xeb\x8f\x99"; std::string const utf8 = odil::as_utf8( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(utf8, expected); } BOOST_AUTO_TEST_CASE(SCSI2_AsSCS) { odil::Value::Strings const specific_character_set = { "", "ISO 2022 IR 149" }; std::string const source = "Hong" "^" "Gildong" "=" "\xe6\xb4\xaa" "^" "\xe5\x90\x89\xe6\xb4\x9e" "=" "\xed\x99\x8d" "^" "\xea\xb8\xb8\xeb\x8f\x99"; std::string const expected = "Hong" "^" "Gildong" "=" "\x1b\x24\x29\x43\xfb\xf3" "^" "\x1b\x24\x29\x43\xd1\xce\xd4\xd7" "=" "\x1b\x24\x29\x43\xc8\xab" "^" "\x1b\x24\x29\x43\xb1\xe6\xb5\xbf"; std::string const scs = odil::as_specific_character_set( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(scs, expected); } BOOST_AUTO_TEST_CASE(SCSRUSS_AsUTF8) { odil::Value::Strings const specific_character_set = { "ISO_IR 144" }; std::string const source = "\xbb\xee\xda\x63\x65\xdc\xd1\x79\x70\xd3"; std::string const expected = "\xd0\x9b\xd1\x8e\xd0\xba\x63\x65\xd0\xbc\xd0\xb1\x79\x70\xd0\xb3"; std::string const utf8 = odil::as_utf8( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(utf8, expected); } BOOST_AUTO_TEST_CASE(SCSRUSS_AsSCS) { odil::Value::Strings const specific_character_set = { "ISO_IR 144" }; std::string const source = "\xd0\x9b\xd1\x8e\xd0\xba\x63\x65\xd0\xbc\xd0\xb1\x79\x70\xd0\xb3"; std::string const expected = "\xbb\xee\xda\x63\x65\xdc\xd1\x79\x70\xd3"; std::string const scs = odil::as_specific_character_set( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(scs, expected); } BOOST_AUTO_TEST_CASE(SCSX1_AsUTF8) { odil::Value::Strings const specific_character_set = { "ISO_IR 192" }; std::string const source = "Wang" "^" "XiaoDong" "=" "\xe7\x8e\x8b" "^" "\xe5\xb0\x8f\xe6\x9d\xb1" "="; std::string const expected = "Wang" "^" "XiaoDong" "=" "\xe7\x8e\x8b" "^" "\xe5\xb0\x8f\xe6\x9d\xb1" "="; std::string const utf8 = odil::as_utf8( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(utf8, expected); } BOOST_AUTO_TEST_CASE(SCSX1_AsSCS) { odil::Value::Strings const specific_character_set = { "ISO_IR 192" }; std::string const source = "Wang" "^" "XiaoDong" "=" "\xe7\x8e\x8b" "^" "\xe5\xb0\x8f\xe6\x9d\xb1" "="; std::string const expected = "Wang" "^" "XiaoDong" "=" "\xe7\x8e\x8b" "^" "\xe5\xb0\x8f\xe6\x9d\xb1" "="; std::string const scs = odil::as_specific_character_set( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(scs, expected); } BOOST_AUTO_TEST_CASE(SCSX2_AsUTF8) { odil::Value::Strings const specific_character_set = { "GB18030" }; std::string const source = "Wang" "^" "XiaoDong" "=" "" "\xcd\xf5" "^" "\xd0\xa1\xb6\xab" "="; std::string const expected = "Wang" "^" "XiaoDong" "=" "\xe7\x8e\x8b" "^" "\xe5\xb0\x8f\xe4\xb8\x9c" "="; std::string const utf8 = odil::as_utf8( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(utf8, expected); } BOOST_AUTO_TEST_CASE(SCSX2_AsSCS) { odil::Value::Strings const specific_character_set = { "GB18030" }; std::string const source = "Wang" "^" "XiaoDong" "=" "\xe7\x8e\x8b" "^" "\xe5\xb0\x8f\xe4\xb8\x9c" "="; std::string const expected = "Wang" "^" "XiaoDong" "=" "" "\xcd\xf5" "^" "\xd0\xa1\xb6\xab" "="; std::string const scs = odil::as_specific_character_set( source, specific_character_set, true); BOOST_REQUIRE_EQUAL(scs, expected); } odil-0.11.0/tests/code/webservices/000077500000000000000000000000001362244656000171255ustar00rootroot00000000000000odil-0.11.0/tests/code/webservices/HTTPRequest.cpp000066400000000000000000000133231362244656000217630ustar00rootroot00000000000000#define BOOST_TEST_MODULE HTTPRequest #include #include #include #include #include odil::webservices::URL const url{"http", "example.com", "/foo", "bar=baz", "quux"}; BOOST_AUTO_TEST_CASE(DefaultConstructor) { odil::webservices::HTTPRequest const request; BOOST_REQUIRE(request.get_method().empty()); BOOST_REQUIRE(request.get_target() == odil::webservices::URL()); BOOST_REQUIRE_EQUAL(request.get_http_version(), "HTTP/1.0"); BOOST_REQUIRE(request.get_headers().empty()); BOOST_REQUIRE(request.get_body().empty()); } BOOST_AUTO_TEST_CASE(OneParameterConstructor) { odil::webservices::HTTPRequest const request("GET"); BOOST_REQUIRE_EQUAL(request.get_method(), "GET"); BOOST_REQUIRE(request.get_target() == odil::webservices::URL()); BOOST_REQUIRE_EQUAL(request.get_http_version(), "HTTP/1.0"); BOOST_REQUIRE(request.get_headers().empty()); BOOST_REQUIRE(request.get_body().empty()); } BOOST_AUTO_TEST_CASE(TwoParameterConstructor) { odil::webservices::HTTPRequest const request("GET", url); BOOST_REQUIRE_EQUAL(request.get_method(), "GET"); BOOST_REQUIRE(request.get_target() == url); BOOST_REQUIRE_EQUAL(request.get_http_version(), "HTTP/1.0"); BOOST_REQUIRE(request.get_headers().empty()); BOOST_REQUIRE(request.get_body().empty()); } BOOST_AUTO_TEST_CASE(ThreeParameterConstructor) { odil::webservices::HTTPRequest const request("GET",url, "HTTP/1.1"); BOOST_REQUIRE_EQUAL(request.get_method(), "GET"); BOOST_REQUIRE(request.get_target() == url); BOOST_REQUIRE_EQUAL(request.get_http_version(), "HTTP/1.1"); BOOST_REQUIRE(request.get_headers().empty()); BOOST_REQUIRE(request.get_body().empty()); } BOOST_AUTO_TEST_CASE(FourParameterConstructor) { odil::webservices::HTTPRequest const request( "GET", url, "HTTP/1.1", {{"foo", "bar"}, {"plip", "plop"}}); BOOST_REQUIRE_EQUAL(request.get_method(), "GET"); BOOST_REQUIRE(request.get_target() == url); BOOST_REQUIRE_EQUAL(request.get_http_version(), "HTTP/1.1"); BOOST_REQUIRE( request.get_headers() == odil::webservices::Message::Headers( {{"foo", "bar"}, {"plip", "plop"}})); BOOST_REQUIRE(request.get_body().empty()); } BOOST_AUTO_TEST_CASE(FiveParametersConstructor) { odil::webservices::HTTPRequest const request( "GET", url, "HTTP/1.1", {{"foo", "bar"}, {"plip", "plop"}}, "body"); BOOST_REQUIRE_EQUAL(request.get_method(), "GET"); BOOST_REQUIRE(request.get_target() == url); BOOST_REQUIRE_EQUAL(request.get_http_version(), "HTTP/1.1"); BOOST_REQUIRE( request.get_headers() == odil::webservices::Message::Headers( {{"foo", "bar"}, {"plip", "plop"}})); BOOST_REQUIRE_EQUAL(request.get_body(), "body"); } BOOST_AUTO_TEST_CASE(Method) { odil::webservices::HTTPRequest request; request.set_method("GET"); BOOST_REQUIRE_EQUAL(request.get_method(), "GET"); } BOOST_AUTO_TEST_CASE(Target) { odil::webservices::HTTPRequest request; request.set_target(url); BOOST_REQUIRE(request.get_target() == url); } BOOST_AUTO_TEST_CASE(HTTPVersion) { odil::webservices::HTTPRequest request; request.set_http_version("HTTP/1.1"); BOOST_REQUIRE_EQUAL(request.get_http_version(), "HTTP/1.1"); } BOOST_AUTO_TEST_CASE(Headers) { odil::webservices::HTTPRequest request; request.set_headers({{"foo", "bar"}, {"plip", "plop"}}); BOOST_REQUIRE( request.get_headers() == odil::webservices::Message::Headers( {{"foo", "bar"}, {"plip", "plop"}})); BOOST_REQUIRE(request.has_header("foo")); BOOST_REQUIRE(request.has_header("FoO")); BOOST_REQUIRE(!request.has_header("bar")); BOOST_REQUIRE_EQUAL(request.get_header("foo"), "bar"); BOOST_REQUIRE_EQUAL(request.get_header("FoO"), "bar"); BOOST_REQUIRE_THROW(request.get_header("bar"), odil::Exception); request.set_header("foo", "other"); BOOST_REQUIRE_EQUAL(request.get_header("foo"), "other"); } BOOST_AUTO_TEST_CASE(Body) { odil::webservices::HTTPRequest request; request.set_body("body"); BOOST_REQUIRE_EQUAL(request.get_body(), "body"); } BOOST_AUTO_TEST_CASE(Input) { std::stringstream stream( "POST /foo HTTP/1.1\r\n" "Host: www.example.com\r\n" "Content-Type: application/json\r\n" "\r\n" "{ }\r\n" "\r\n"); odil::webservices::HTTPRequest request; stream >> request; BOOST_REQUIRE_EQUAL(request.get_method(), "POST"); BOOST_REQUIRE( request.get_target() == odil::webservices::URL({"", "", "/foo", "", ""})); BOOST_REQUIRE_EQUAL(request.get_http_version(), "HTTP/1.1"); BOOST_REQUIRE( request.get_headers() == odil::webservices::Message::Headers({ {"Host", "www.example.com"}, {"Content-Type", "application/json"} })); BOOST_REQUIRE_EQUAL(request.get_body(), "{ }\r\n\r\n"); } BOOST_AUTO_TEST_CASE(Output) { odil::webservices::HTTPRequest const request{ "POST", {"", "", "/foo", "", ""}, "HTTP/1.1", { {"Host", "www.example.com"}, {"Content-Type", "application/json"} }, "{ }\r\n\r\n" }; std::stringstream stream; stream << request; odil::webservices::HTTPRequest result; stream >> result; BOOST_REQUIRE_EQUAL(request.get_method(), result.get_method()); BOOST_REQUIRE(request.get_target() == result.get_target()); BOOST_REQUIRE_EQUAL(request.get_http_version(), result.get_http_version()); BOOST_REQUIRE(request.get_headers() == result.get_headers()); BOOST_REQUIRE_EQUAL(request.get_body(), result.get_body()); } odil-0.11.0/tests/code/webservices/HTTPResponse.cpp000066400000000000000000000131031362244656000221250ustar00rootroot00000000000000#define BOOST_TEST_MODULE Message #include #include #include #include BOOST_AUTO_TEST_CASE(DefaultConstructor) { odil::webservices::HTTPResponse const response; BOOST_REQUIRE_EQUAL(response.get_http_version(), ""); BOOST_REQUIRE_EQUAL(response.get_status(), 0); BOOST_REQUIRE(response.get_reason().empty()); BOOST_REQUIRE(response.get_headers().empty()); BOOST_REQUIRE(response.get_body().empty()); } BOOST_AUTO_TEST_CASE(OneParameterConstructor) { odil::webservices::HTTPResponse const response("HTTP/1.0"); BOOST_REQUIRE_EQUAL(response.get_http_version(), "HTTP/1.0"); BOOST_REQUIRE_EQUAL(response.get_status(), 0); BOOST_REQUIRE(response.get_reason().empty()); BOOST_REQUIRE(response.get_headers().empty()); BOOST_REQUIRE(response.get_body().empty()); } BOOST_AUTO_TEST_CASE(TwoParameterConstructor) { odil::webservices::HTTPResponse const response("HTTP/1.0", 200); BOOST_REQUIRE_EQUAL(response.get_http_version(), "HTTP/1.0"); BOOST_REQUIRE_EQUAL(response.get_status(), 200); BOOST_REQUIRE(response.get_reason().empty()); BOOST_REQUIRE(response.get_headers().empty()); BOOST_REQUIRE(response.get_body().empty()); } BOOST_AUTO_TEST_CASE(ThreeParameterConstructor) { odil::webservices::HTTPResponse const response("HTTP/1.0", 200, "OK"); BOOST_REQUIRE_EQUAL(response.get_http_version(), "HTTP/1.0"); BOOST_REQUIRE_EQUAL(response.get_status(), 200); BOOST_REQUIRE_EQUAL(response.get_reason(), "OK"); BOOST_REQUIRE(response.get_headers().empty()); BOOST_REQUIRE(response.get_body().empty()); } BOOST_AUTO_TEST_CASE(FourParameterConstructor) { odil::webservices::HTTPResponse const response( "HTTP/1.0", 200, "OK", {{"foo", "bar"}, {"plip", "plop"}}); BOOST_REQUIRE_EQUAL(response.get_http_version(), "HTTP/1.0"); BOOST_REQUIRE_EQUAL(response.get_status(), 200); BOOST_REQUIRE_EQUAL(response.get_reason(), "OK"); BOOST_REQUIRE( response.get_headers() == odil::webservices::Message::Headers( {{"foo", "bar"}, {"plip", "plop"}})); BOOST_REQUIRE(response.get_body().empty()); } BOOST_AUTO_TEST_CASE(FiveParametersConstructor) { odil::webservices::HTTPResponse const response( "HTTP/1.0", 200, "OK", {{"foo", "bar"}, {"plip", "plop"}}, "body"); BOOST_REQUIRE_EQUAL(response.get_http_version(), "HTTP/1.0"); BOOST_REQUIRE_EQUAL(response.get_status(), 200); BOOST_REQUIRE_EQUAL(response.get_reason(), "OK"); BOOST_REQUIRE( response.get_headers() == odil::webservices::Message::Headers( {{"foo", "bar"}, {"plip", "plop"}})); BOOST_REQUIRE_EQUAL(response.get_body(), "body"); } BOOST_AUTO_TEST_CASE(HTTPVersion) { odil::webservices::HTTPResponse response; response.set_http_version("HTTP/1.1"); BOOST_REQUIRE_EQUAL(response.get_http_version(), "HTTP/1.1"); } BOOST_AUTO_TEST_CASE(Status) { odil::webservices::HTTPResponse response; response.set_status(200); BOOST_REQUIRE_EQUAL(response.get_status(), 200); } BOOST_AUTO_TEST_CASE(Reason) { odil::webservices::HTTPResponse response; response.set_reason("OK"); BOOST_REQUIRE_EQUAL(response.get_reason(), "OK"); } BOOST_AUTO_TEST_CASE(Headers) { odil::webservices::HTTPResponse response; response.set_headers({{"foo", "bar"}, {"plip", "plop"}}); BOOST_REQUIRE( response.get_headers() == odil::webservices::Message::Headers( {{"foo", "bar"}, {"plip", "plop"}})); BOOST_REQUIRE(response.has_header("foo")); BOOST_REQUIRE(response.has_header("FoO")); BOOST_REQUIRE(!response.has_header("bar")); BOOST_REQUIRE_EQUAL(response.get_header("foo"), "bar"); BOOST_REQUIRE_EQUAL(response.get_header("FoO"), "bar"); BOOST_REQUIRE_THROW(response.get_header("bar"), odil::Exception); response.set_header("foo", "other"); BOOST_REQUIRE_EQUAL(response.get_header("foo"), "other"); } BOOST_AUTO_TEST_CASE(Body) { odil::webservices::HTTPResponse response; response.set_body("body"); BOOST_REQUIRE_EQUAL(response.get_body(), "body"); } BOOST_AUTO_TEST_CASE(Input) { std::stringstream stream( "HTTP/1.1 200 OK\r\n" "Content-Encoding: utf-8\r\n" "Content-Type: application/json\r\n" "\r\n" "{ }\r\n" "\r\n"); odil::webservices::HTTPResponse response; stream >> response; BOOST_REQUIRE_EQUAL(response.get_http_version(), "HTTP/1.1"); BOOST_REQUIRE_EQUAL(response.get_status(), 200); BOOST_REQUIRE_EQUAL(response.get_reason(), "OK"); BOOST_REQUIRE( response.get_headers() == odil::webservices::Message::Headers({ {"Content-Encoding", "utf-8"}, {"Content-Type", "application/json"} })); BOOST_REQUIRE_EQUAL(response.get_body(), "{ }\r\n\r\n"); } BOOST_AUTO_TEST_CASE(Output) { odil::webservices::HTTPResponse const response{ "HTTP/1.1", 200, "OK", { {"Content-Encoding", "utf-8"}, {"Content-Type", "application/json"} }, "{ }\r\n\r\n" }; std::stringstream stream; stream << response; odil::webservices::HTTPResponse result; stream >> result; BOOST_REQUIRE_EQUAL(response.get_http_version(), result.get_http_version()); BOOST_REQUIRE_EQUAL(response.get_status(), result.get_status()); BOOST_REQUIRE_EQUAL(response.get_reason(), result.get_reason()); BOOST_REQUIRE(response.get_headers() == result.get_headers()); BOOST_REQUIRE_EQUAL(response.get_body(), result.get_body()); } odil-0.11.0/tests/code/webservices/ItemWithParameters.cpp000066400000000000000000000036661362244656000234220ustar00rootroot00000000000000#define BOOST_TEST_MODULE ItemWithParameters #include #include #include "odil/webservices/ItemWithParameters.h" BOOST_AUTO_TEST_CASE(NoParameter) { std::stringstream stream("text/plain"); odil::webservices::ItemWithParameters item; stream >> item; BOOST_REQUIRE_EQUAL(item.name, "text/plain"); BOOST_REQUIRE(item.name_parameters.empty()); BOOST_REQUIRE(item.extension_parameters.empty()); } BOOST_AUTO_TEST_CASE(NameParametersOnly) { std::stringstream stream( "text/plain; charset=\"iso-8859-1\"; format=\"flowed\""); odil::webservices::ItemWithParameters item; stream >> item; typedef std::map Map; BOOST_REQUIRE_EQUAL(item.name, "text/plain"); BOOST_REQUIRE( item.name_parameters == Map({ { "charset", "\"iso-8859-1\""}, { "format", "\"flowed\""} })); BOOST_REQUIRE(item.extension_parameters.empty()); } BOOST_AUTO_TEST_CASE(ExtensionParametersOnly) { std::stringstream stream("text/plain; q=0.8;foo=bar"); odil::webservices::ItemWithParameters item; stream >> item; typedef std::map Map; BOOST_REQUIRE_EQUAL(item.name, "text/plain"); BOOST_REQUIRE(item.name_parameters.empty()); BOOST_REQUIRE( item.extension_parameters == Map({ { "q", "0.8"}, { "foo", "bar"} })); } BOOST_AUTO_TEST_CASE(BothParameters) { std::stringstream stream( "text/plain; charset=\"iso-8859-1\"; format=\"flowed\"; q=0.8;foo=bar"); odil::webservices::ItemWithParameters item; stream >> item; typedef std::map Map; BOOST_REQUIRE_EQUAL(item.name, "text/plain"); BOOST_REQUIRE( item.name_parameters == Map({ { "charset", "\"iso-8859-1\""}, { "format", "\"flowed\""} })); BOOST_REQUIRE( item.extension_parameters == Map({ { "q", "0.8"}, { "foo", "bar"} })); } odil-0.11.0/tests/code/webservices/Message.cpp000066400000000000000000000071721362244656000212240ustar00rootroot00000000000000#define BOOST_TEST_MODULE Message #include #include #include #include BOOST_AUTO_TEST_CASE(DefaultConstructor) { odil::webservices::Message const message; BOOST_REQUIRE(message.get_headers().empty()); BOOST_REQUIRE(message.get_body().empty()); } BOOST_AUTO_TEST_CASE(OneParameterConstructor) { odil::webservices::Message const message( odil::webservices::Message::Headers{{"foo", "bar"}, {"plip", "plop"}}); BOOST_REQUIRE( message.get_headers() == odil::webservices::Message::Headers( {{"foo", "bar"}, {"plip", "plop"}})); BOOST_REQUIRE(message.get_body().empty()); } BOOST_AUTO_TEST_CASE(TwoParametersConstructor) { odil::webservices::Message const message( odil::webservices::Message::Headers{{"foo", "bar"}, {"plip", "plop"}}, "body"); BOOST_REQUIRE( message.get_headers() == odil::webservices::Message::Headers( {{"foo", "bar"}, {"plip", "plop"}})); BOOST_REQUIRE_EQUAL(message.get_body(), "body"); } BOOST_AUTO_TEST_CASE(Headers) { odil::webservices::Message message; message.set_headers({{"foo", "bar"}, {"plip", "plop"}}); BOOST_REQUIRE( message.get_headers() == odil::webservices::Message::Headers( {{"foo", "bar"}, {"plip", "plop"}})); BOOST_REQUIRE(message.has_header("foo")); BOOST_REQUIRE(message.has_header("FoO")); BOOST_REQUIRE(!message.has_header("bar")); BOOST_REQUIRE_EQUAL(message.get_header("foo"), "bar"); BOOST_REQUIRE_EQUAL(message.get_header("FoO"), "bar"); BOOST_REQUIRE_THROW(message.get_header("bar"), odil::Exception); message.set_header("foo", "other"); BOOST_REQUIRE_EQUAL(message.get_header("foo"), "other"); } BOOST_AUTO_TEST_CASE(Body) { odil::webservices::Message message; message.set_body("body"); BOOST_REQUIRE_EQUAL(message.get_body(), "body"); } BOOST_AUTO_TEST_CASE(Input) { std::stringstream stream( "From: John Doe \r\n" "To: Mary Smith \r\n" "Subject: Saying Hello\r\n" "Date: Fri, 21 Nov 1997 09:55:06 -0600\r\n" "Message-ID: <1234@local.machine.example>\r\n" "\r\n" "This is a message just to say hello.\r\n" "So, \"Hello\".\r\n"); odil::webservices::Message message; stream >> message; BOOST_REQUIRE( message.get_headers() == odil::webservices::Message::Headers({ {"From", "John Doe "}, {"To", "Mary Smith "}, {"Subject", "Saying Hello"}, {"Date", "Fri, 21 Nov 1997 09:55:06 -0600"}, {"Message-ID", "<1234@local.machine.example>"} })); BOOST_REQUIRE_EQUAL( message.get_body(), "This is a message just to say hello.\r\n" "So, \"Hello\".\r\n"); } BOOST_AUTO_TEST_CASE(Output) { odil::webservices::Message const message{ { {"From", "John Doe "}, {"To", "Mary Smith "}, {"Subject", "Saying Hello"}, {"Date", "Fri, 21 Nov 1997 09:55:06 -0600"}, {"Message-ID", "<1234@local.machine.example>"} }, "This is a message just to say hello.\r\n" "So, \"Hello\".\r\n" }; std::stringstream stream; stream << message; odil::webservices::Message result; stream >> result; BOOST_REQUIRE(message.get_headers() == result.get_headers()); BOOST_REQUIRE_EQUAL(message.get_body(), result.get_body()); } odil-0.11.0/tests/code/webservices/QIDORSRequest.cpp000066400000000000000000000200661362244656000222070ustar00rootroot00000000000000#define BOOST_TEST_MODULE QIDORSRequest #include #include #include "odil/json_converter.h" #include "odil/DataSet.h" #include "odil/Tag.h" #include "odil/webservices/HTTPRequest.h" #include "odil/webservices/Utils.h" #include "odil/webservices/QIDORSRequest.h" #include "odil/webservices/Selector.h" #include "odil/webservices/URL.h" #include odil::webservices::URL const base_url_http{ "http", "example.com", "/dicom", "", ""}; odil::webservices::Selector const instance_selector{ {{"studies", "1.2"}, {"series", "3.4"}, {"instances", ""}} }; odil::webservices::URL const full_url { "http", "example.com", "/dicom/studies/1.2/instances", "PatientName=TOTO&" "SharedFunctionalGroupsSequence.EffectiveEchoTime=10.5&" "includefield=00200020&includefield=52009229.00200035", "" }; BOOST_AUTO_TEST_CASE(ConstructorUrl) { odil::webservices::QIDORSRequest const request(base_url_http); BOOST_REQUIRE(request.get_base_url() == base_url_http); } BOOST_AUTO_TEST_CASE(BaseUrl) { odil::webservices::HTTPRequest http_request("GET", full_url); http_request.set_header("Accept", "application/dicom+json"); odil::webservices::QIDORSRequest const qido_request(http_request); BOOST_REQUIRE(qido_request.get_base_url() == base_url_http); } BOOST_AUTO_TEST_CASE(SetBaseUrl) { odil::webservices::QIDORSRequest request((odil::webservices::URL())); request.set_base_url(base_url_http); BOOST_REQUIRE(request.get_base_url() == base_url_http); } BOOST_AUTO_TEST_CASE(FullUrl) { odil::webservices::HTTPRequest http_request("GET", full_url); http_request.set_header("Accept", "application/dicom+json"); odil::webservices::QIDORSRequest const qido_request(http_request); odil::webservices::URL const full_url_alphabetic { "http", "example.com", "/dicom/studies/1.2/instances", "PatientName=TOTO&" "SharedFunctionalGroupsSequence.EffectiveEchoTime=10.5&" "includefield=PatientOrientation&" "includefield=SharedFunctionalGroupsSequence.ImageOrientation&" "fuzzymatching=false", "" }; BOOST_REQUIRE(qido_request.get_url() == full_url_alphabetic); } BOOST_AUTO_TEST_CASE(Selector) { odil::webservices::HTTPRequest http_request("GET", full_url); http_request.set_header("Accept", "application/dicom+json"); odil::webservices::QIDORSRequest const qido_request(http_request); BOOST_REQUIRE_EQUAL( qido_request.get_selector().get_path(false), "/studies/1.2/instances"); } BOOST_AUTO_TEST_CASE(QueryDataset) { odil::webservices::HTTPRequest http_request("GET", full_url); http_request.set_header("Accept", "application/dicom+json"); odil::webservices::QIDORSRequest const qido_request(http_request); auto dataset = std::make_shared(); dataset->add(odil::Tag("PatientName"), {"TOTO"}); dataset->add(odil::Tag("00200020")); auto shared = std::make_shared(); shared->add(odil::Tag("EffectiveEchoTime"), {10.5}); shared->add(odil::Tag("00200035")); dataset->add(odil::Tag("SharedFunctionalGroupsSequence"), {shared}); BOOST_REQUIRE(*qido_request.get_query_data_set() == *dataset); } BOOST_AUTO_TEST_CASE(FuzzyLimitOffset) { odil::webservices::HTTPRequest http_request("GET", full_url); http_request.set_header("Accept", "application/dicom+json"); odil::webservices::QIDORSRequest const qido_request(http_request); BOOST_REQUIRE(!qido_request.get_fuzzymatching()); BOOST_REQUIRE_EQUAL(qido_request.get_limit(), -1); BOOST_REQUIRE_EQUAL(qido_request.get_offset(), 0); } BOOST_AUTO_TEST_CASE(MediaTypeJson) { odil::webservices::HTTPRequest http_request("GET", full_url); http_request.set_header("Accept", "application/dicom+json"); odil::webservices::QIDORSRequest const qido_request(http_request); BOOST_REQUIRE_EQUAL(qido_request.get_media_type(), "application/dicom+json"); BOOST_REQUIRE( qido_request.get_representation() == odil::webservices::Representation::DICOM_JSON); } BOOST_AUTO_TEST_CASE(MediaTypeXml) { odil::webservices::HTTPRequest http_request("GET", full_url); http_request.set_header("Accept", "multipart/related;type=application/dicom+xml"); odil::webservices::QIDORSRequest const qido_request(http_request); BOOST_REQUIRE_EQUAL(qido_request.get_media_type(), "application/dicom+xml"); BOOST_REQUIRE( qido_request.get_representation() == odil::webservices::Representation::DICOM_XML); } BOOST_AUTO_TEST_CASE(MediaTypeUnrecognized) { odil::webservices::HTTPRequest http_request("GET", full_url); http_request.set_header("Accept", "multipart/related;type=application/dicom+json"); BOOST_REQUIRE_THROW( odil::webservices::QIDORSRequest const request(http_request), odil::Exception); } BOOST_AUTO_TEST_CASE(MediaTypeUnrecognized2) { odil::webservices::HTTPRequest http_request("GET", full_url); http_request.set_header("Accept", "application/dicom+xml"); BOOST_REQUIRE_THROW( odil::webservices::QIDORSRequest const request(http_request), odil::Exception); } BOOST_AUTO_TEST_CASE(RequestDataset) { odil::webservices::Selector const selector{ {{"studies", "1.2"}, {"instances", ""}} }; //-------------------- Query Dataset auto dataset = std::make_shared(); dataset->add(odil::Tag("PatientName"), {"TOTO"}); dataset->add(odil::Tag("00200020")); auto shared = std::make_shared(); shared->add(odil::Tag("StudyDate"), {20130509}); shared->add(odil::Tag("00200035")); dataset->add(odil::Tag("SharedFunctionalGroupsSequence"), {shared}); odil::webservices::QIDORSRequest request(base_url_http); request.request_datasets( odil::webservices::Representation::DICOM_XML, selector, dataset); odil::webservices::URL const full_url_alphabetic_tags { "http", "example.com", "/dicom/studies/1.2/instances", "PatientName=TOTO&" "SharedFunctionalGroupsSequence.StudyDate=20130509&" "includefield=PatientOrientation&" "includefield=SharedFunctionalGroupsSequence.ImageOrientation&" "fuzzymatching=false", "" }; BOOST_REQUIRE( request.get_http_request().get_target() == full_url_alphabetic_tags); BOOST_REQUIRE_EQUAL(request.get_http_request().get_method(), "GET"); } BOOST_AUTO_TEST_CASE(Equality) { odil::webservices::URL const full_url_cpy { "http", "example.com", "/dicom/studies/1.2/instances", "SharedFunctionalGroupsSequence.EffectiveEchoTime=10.5&" "includefield=00200020&includefield=52009229.00200035&" "PatientName=TOTO", "" }; // The element's order within query should not be important, // this url and full_url must lead to the same QIDORSRequest odil::webservices::HTTPRequest http_request_base("GET", full_url); http_request_base.set_header("Accept", "application/dicom+json"); odil::webservices::QIDORSRequest const qido_request(http_request_base); odil::webservices::HTTPRequest http_request_cpy("GET", full_url_cpy); http_request_cpy.set_header("Accept", "application/dicom+json"); odil::webservices::QIDORSRequest const qido_request_cpy(http_request_cpy); BOOST_REQUIRE(qido_request == qido_request_cpy); } BOOST_AUTO_TEST_CASE(Difference) { odil::webservices::URL const full_url_cpy { "http", "example.com", "/dicom/studies/1.2/instances", "SharedFunctionalGroupsSequence.EffectiveEchoTime=10.5&" "includefield=00200020&includefield=52009229.00200035&" "PatientName=TUTU", "" }; odil::webservices::HTTPRequest http_request_base("GET", full_url); http_request_base.set_header("Accept", "application/dicom+json"); odil::webservices::QIDORSRequest const qido_request(http_request_base); odil::webservices::HTTPRequest http_request_cpy("GET", full_url_cpy); http_request_cpy.set_header("Accept", "application/dicom+json"); odil::webservices::QIDORSRequest const request_cpy(http_request_cpy); BOOST_REQUIRE(qido_request != request_cpy); } odil-0.11.0/tests/code/webservices/QIDORSResponse.cpp000066400000000000000000000134731362244656000223610ustar00rootroot00000000000000#define BOOST_TEST_MODULE QIDORSResponse #include #include #include #include #include #include "odil/DataSet.h" #include "odil/json_converter.h" #include "odil/registry.h" #include "odil/StringStream.h" #include "odil/webservices/HTTPResponse.h" #include "odil/webservices/ItemWithParameters.h" #include "odil/webservices/multipart_related.h" #include "odil/webservices/QIDORSResponse.h" #include "odil/webservices/Utils.h" #include "odil/xml_converter.h" #include struct Fixture { odil::Value::DataSets data_sets; Fixture() { auto data_set_1 = std::make_shared(); data_set_1->add("SOPClassUID", {odil::registry::RawDataStorage}); data_set_1->add("SOPInstanceUID", {"1.2.3.4"}); data_set_1->add("PatientID", {"DJ1234"}); data_set_1->add("PixelSpacing", {1.5, 2.5}); auto data_set_2 = std::make_shared(); data_set_2->add("SOPClassUID", {odil::registry::MRImageStorage}); data_set_2->add("SOPInstanceUID", {"1.2.3.5"}); data_set_2->add("PatientName", {"Doe^John"}); data_set_2->add("PatientAge", {"042Y"}); this->data_sets = { data_set_1, data_set_2 }; } }; BOOST_AUTO_TEST_CASE(Constructor) { odil::webservices::QIDORSResponse const response; BOOST_REQUIRE(response.get_data_sets().empty()); } BOOST_AUTO_TEST_CASE(Constructor_HttpReq) { odil::webservices::HTTPResponse http_response; http_response.set_status(200); http_response.set_header("Content-Type", "application/dicom+json"); http_response.set_body("[]"); odil::webservices::QIDORSResponse const response(http_response); BOOST_REQUIRE(response.get_representation() == odil::webservices::Representation::DICOM_JSON); BOOST_REQUIRE(response.get_media_type() == "application/dicom+json"); } BOOST_FIXTURE_TEST_CASE(DataSets, Fixture) { odil::webservices::QIDORSResponse response; response.set_data_sets(data_sets); BOOST_REQUIRE(response.get_data_sets() == data_sets); } BOOST_FIXTURE_TEST_CASE(RespondDICOMJSON, Fixture) { odil::webservices::QIDORSResponse response; response.set_representation(odil::webservices::Representation::DICOM_JSON); response.set_data_sets(data_sets); BOOST_REQUIRE_EQUAL(response.get_media_type(), "application/dicom+json"); BOOST_REQUIRE(response.get_representation() == odil::webservices::Representation::DICOM_JSON); auto const http = response.get_http_response(); BOOST_REQUIRE(!odil::webservices::is_multipart_related(http)); auto const content_type = odil::as( http.get_header("Content-Type")); BOOST_REQUIRE_EQUAL(content_type.name, "application/dicom+json"); std::istringstream stream(http.get_body()); Json::Value array; stream >> array; BOOST_REQUIRE(array.isArray()); odil::Value::DataSets response_data_sets; std::transform( array.begin(), array.end(), std::back_inserter(response_data_sets), static_cast (*)(Json::Value const &)>( odil::as_dataset)); BOOST_REQUIRE(response_data_sets == data_sets); } BOOST_FIXTURE_TEST_CASE(RespondDICOMXML, Fixture) { odil::webservices::QIDORSResponse response; response.set_representation(odil::webservices::Representation::DICOM_XML); response.set_data_sets(data_sets); BOOST_REQUIRE_EQUAL(response.get_media_type(), "application/dicom+xml"); BOOST_REQUIRE(response.get_representation() == odil::webservices::Representation::DICOM_XML); auto const http = response.get_http_response(); BOOST_REQUIRE(odil::webservices::is_multipart_related(http)); BOOST_REQUIRE_EQUAL(odil::webservices::count_parts(http), data_sets.size()); auto const content_type = odil::as( http.get_header("Content-Type")); BOOST_REQUIRE_EQUAL( content_type.name_parameters.at("type"), "application/dicom+xml"); std::vector parts; odil::webservices::transform_parts( http, std::back_inserter(parts), [](odil::webservices::Message const & m) { return m; }); for(unsigned int i=0; iget_transfer_syntax().empty() ?odil::registry::ExplicitVRLittleEndian :data_set->get_transfer_syntax(); auto const & part = parts[i]; auto const content_type = odil::as( part.get_header("Content-Type")); BOOST_REQUIRE_EQUAL(content_type.name, "application/dicom+xml"); std::stringstream stream(part.get_body()); boost::property_tree::ptree xml; boost::property_tree::read_xml(stream, xml); BOOST_REQUIRE(*data_set == *odil::as_dataset(xml)); } } BOOST_AUTO_TEST_CASE(EmptyResponse) { odil::webservices::QIDORSResponse response; auto const http = response.get_http_response(); BOOST_REQUIRE(http.get_status() == 204); BOOST_REQUIRE_EQUAL(http.get_reason(), "No Content"); } BOOST_FIXTURE_TEST_CASE(Equality, Fixture) { odil::webservices::QIDORSResponse response, response2; response.set_representation(odil::webservices::Representation::DICOM_XML); response2.set_representation(odil::webservices::Representation::DICOM_XML); response.set_data_sets(data_sets); response2.set_data_sets(data_sets); BOOST_REQUIRE(response == response2); } BOOST_FIXTURE_TEST_CASE(Difference, Fixture) { odil::webservices::QIDORSResponse response, response2; response.set_representation(odil::webservices::Representation::DICOM_XML); response.set_data_sets(data_sets); BOOST_REQUIRE(response != response2); } odil-0.11.0/tests/code/webservices/STOWRSRequest.cpp000066400000000000000000000126071362244656000222510ustar00rootroot00000000000000#define BOOST_TEST_MODULE STOWRSRequest #include #include "odil/DataSet.h" #include "odil/registry.h" #include "odil/webservices/HTTPRequest.h" #include "odil/webservices/ItemWithParameters.h" #include "odil/webservices/multipart_related.h" #include "odil/webservices/STOWRSRequest.h" #include "odil/webservices/URL.h" #include "odil/webservices/Utils.h" struct Fixture { odil::Value::DataSets data_sets; Fixture() { auto data_set_1 = std::make_shared(); data_set_1->add("SOPClassUID", {odil::registry::RawDataStorage}); data_set_1->add("SOPInstanceUID", {"1.2.3.4"}); data_set_1->add("PatientID", {"DJ1234"}); data_set_1->add("PixelSpacing", {1.5, 2.5}); auto data_set_2 = std::make_shared(); data_set_2->add("SOPClassUID", {odil::registry::MRImageStorage}); data_set_2->add("SOPInstanceUID", {"1.2.3.5"}); data_set_2->add("PatientName", {"Doe^John"}); data_set_2->add("PatientAge", {"042Y"}); data_set_2->add("Signature", odil::Value::Binary({{0x01, 0x02, 0x03, 0x04}})); this->data_sets = { data_set_1, data_set_2 }; } }; odil::webservices::URL const base_url_http{ "http", "example.com", "/dicom", "", ""}; odil::webservices::URL const full_url { "http", "example.com", "/dicom/studies/1.2", "", // query ""// fragment }; odil::webservices::Selector const selector{{{"studies", "1.2"}}}; BOOST_AUTO_TEST_CASE(Constructor_BaseUrl) { odil::webservices::STOWRSRequest const request(base_url_http); BOOST_REQUIRE(request.get_base_url() == base_url_http); } BOOST_AUTO_TEST_CASE(Base_Url) { odil::webservices::STOWRSRequest request(base_url_http); odil::webservices::URL const base_url_http2{ "http", "second_example.com", "/dicom", "", ""}; request.set_base_url(base_url_http2); BOOST_REQUIRE(request.get_base_url() == base_url_http2); } BOOST_AUTO_TEST_CASE(Constructor_Http) { odil::webservices::HTTPRequest http_request("POST", full_url); http_request.set_header( "Content-Type", "multipart/related;type=application/dicom"); odil::webservices::STOWRSRequest const request(http_request); BOOST_REQUIRE(request.get_url() == full_url); BOOST_REQUIRE_EQUAL(request.get_media_type(), "application/dicom"); BOOST_REQUIRE( request.get_representation() == odil::webservices::Representation::DICOM); BOOST_REQUIRE(request.get_selector() == selector); } BOOST_FIXTURE_TEST_CASE(DataSets, Fixture) { odil::webservices::STOWRSRequest request(base_url_http); request.get_data_sets() = data_sets; BOOST_REQUIRE(request.get_data_sets() == data_sets); } BOOST_FIXTURE_TEST_CASE(FailRequestDataSets, Fixture) { odil::webservices::STOWRSRequest request(base_url_http); odil::webservices::Selector const selector{ {{"studies", "1.2"},{"series", "3.4"}} };; //-------------------- Require exception BOOST_REQUIRE_THROW( request.request_dicom( data_sets, selector, odil::webservices::Representation::DICOM), odil::Exception); } BOOST_FIXTURE_TEST_CASE(GetHttpRequest, Fixture) { odil::webservices::STOWRSRequest request(base_url_http); request.request_dicom( data_sets, selector, odil::webservices::Representation::DICOM_XML); odil::webservices::HTTPRequest http_request = request.get_http_request(); BOOST_REQUIRE(http_request.has_header("Content-Type")); BOOST_REQUIRE_EQUAL(http_request.get_method(), "POST"); BOOST_REQUIRE_EQUAL(http_request.get_http_version(), "HTTP/1.0"); // Two part for dataSets & 1 for binary BOOST_REQUIRE_EQUAL(odil::webservices::count_parts(http_request), 3); BOOST_REQUIRE(request.get_base_url() == base_url_http); request.request_dicom( data_sets, selector, odil::webservices::Representation::DICOM); odil::webservices::HTTPRequest http_request_dcm = request.get_http_request(); // only two parts here BOOST_REQUIRE_EQUAL(odil::webservices::count_parts(http_request_dcm), 2); } BOOST_FIXTURE_TEST_CASE(DataSetsEquality, Fixture) { // We use a getHttpRequest function that can change the dataSet internally, // and we check if they remain the sames odil::webservices::STOWRSRequest request(base_url_http); request.request_dicom( {data_sets[0]}, selector, odil::webservices::Representation::DICOM_JSON); odil::webservices::HTTPRequest http_request = request.get_http_request(); BOOST_REQUIRE( request.get_data_sets() == odil::Value::DataSets({data_sets[0]})); } BOOST_FIXTURE_TEST_CASE(Equality, Fixture) { odil::webservices::STOWRSRequest request(base_url_http); request.request_dicom( data_sets, selector, odil::webservices::Representation::DICOM); odil::webservices::HTTPRequest const http_request = request.get_http_request(); odil::webservices::STOWRSRequest second_request(http_request); BOOST_REQUIRE(request == second_request); } BOOST_FIXTURE_TEST_CASE(Equality_2, Fixture) { odil::webservices::STOWRSRequest request(base_url_http); request.request_dicom( data_sets, selector, odil::webservices::Representation::DICOM_XML); odil::webservices::HTTPRequest http_request = request.get_http_request(); odil::webservices::STOWRSRequest request_copy(http_request); BOOST_REQUIRE(request_copy == request); BOOST_REQUIRE(data_sets == request_copy.get_data_sets()); } odil-0.11.0/tests/code/webservices/STOWRSResponse.cpp000066400000000000000000000155311362244656000224160ustar00rootroot00000000000000#define BOOST_TEST_MODULE STOWRSResponse #include #include #include #include #include #include #include "odil/DataSet.h" #include "odil/json_converter.h" #include "odil/registry.h" #include "odil/webservices/ItemWithParameters.h" #include "odil/webservices/STOWRSResponse.h" #include "odil/webservices/multipart_related.h" #include "odil/webservices/Utils.h" #include "odil/xml_converter.h" struct Fixture { std::shared_ptr data_set; Fixture() { this->data_set = std::make_shared(); this->data_set->add( "RetrieveURL", {"http://example.com/dicom/studies/7.8.9"}); this->data_set->add( "FailedSOPSequence", {std::make_shared()}); auto referenceSOPSequence_item1 = std::make_shared(); referenceSOPSequence_item1->add( "ReferencedSOPClassUID", {odil::registry::MRImageStorage}); referenceSOPSequence_item1->add("ReferencedSOPInstanceUID", {"1.2.3.6.1"}); referenceSOPSequence_item1->add("RetrieveURL", {"http://example.com/dicom/studies/7.8.9/series/4.5/instances/1.2.3.6.1"}); auto referenceSOPSequence_item2 = std::make_shared(); referenceSOPSequence_item2->add( "ReferencedSOPClassUID", {odil::registry::RawDataStorage}); referenceSOPSequence_item2->add( "ReferencedSOPInstanceUID", {"1.2.3.6.2"}); referenceSOPSequence_item2->add("RetrieveURL", {"http://example.com/dicom/studies/7.8.9/series/4.5/instances/1.2.3.6.2"}); this->data_set->add( "ReferencedSOPSequence", {referenceSOPSequence_item1, referenceSOPSequence_item2}); } }; BOOST_AUTO_TEST_CASE(Constructor) { odil::webservices::STOWRSResponse const response; BOOST_REQUIRE(response.get_store_instance_responses()->empty()); } BOOST_FIXTURE_TEST_CASE(RespondDICOM_XML, Fixture) { odil::webservices::STOWRSResponse response; response.set_representation(odil::webservices::Representation::DICOM_XML); response.set_store_instance_responses(data_set); BOOST_REQUIRE_EQUAL(response.get_media_type(), "application/dicom+xml"); BOOST_REQUIRE(response.get_representation() == odil::webservices::Representation::DICOM_XML); auto const http = response.get_http_response(); auto const content_type = boost::lexical_cast< odil::webservices::ItemWithParameters>(http.get_header("Content-Type")); BOOST_REQUIRE_EQUAL(content_type.name, "application/dicom+xml"); std::stringstream stream(http.get_body()); boost::property_tree::ptree xml; boost::property_tree::read_xml(stream, xml); BOOST_REQUIRE(*data_set == *odil::as_dataset(xml)); } BOOST_FIXTURE_TEST_CASE(RespondDICOM_JSON, Fixture) { odil::webservices::STOWRSResponse response; response.set_representation(odil::webservices::Representation::DICOM_JSON); response.set_store_instance_responses(data_set); BOOST_REQUIRE_EQUAL(response.get_media_type(), "application/dicom+json"); BOOST_REQUIRE(response.get_representation() == odil::webservices::Representation::DICOM_JSON); auto const http = response.get_http_response(); auto const content_type = boost::lexical_cast< odil::webservices::ItemWithParameters>(http.get_header("Content-Type")); BOOST_REQUIRE_EQUAL(content_type.name, "application/dicom+json"); std::istringstream stream(http.get_body()); Json::Value array; stream >> array; BOOST_REQUIRE(array.isArray()); BOOST_REQUIRE(*data_set == *odil::as_dataset(array[0])); } BOOST_FIXTURE_TEST_CASE(Equality, Fixture) { odil::webservices::HTTPResponse http_response; http_response.set_header("Content-Type", "application/dicom+xml"); http_response.set_status(200); http_response.set_reason("OK"); auto const xml = as_xml(data_set); std::ostringstream body; #if BOOST_VERSION >= 105600 typedef boost::property_tree::xml_writer_settings SettingsType; #else typedef boost::property_tree::xml_writer_settings SettingsType; #endif boost::property_tree::write_xml(body, xml, SettingsType()); http_response.set_body(body.str()); odil::webservices::STOWRSResponse response(http_response); odil::webservices::STOWRSResponse response_2; response_2.set_representation(odil::webservices::Representation::DICOM_XML); response_2.set_store_instance_responses(data_set); response_2.set_warning(false); response_2.set_reason("OK"); BOOST_REQUIRE(response == response_2); } BOOST_FIXTURE_TEST_CASE(Difference, Fixture) { // first http_response odil::webservices::HTTPResponse http_response; http_response.set_header("Content-Type", "application/dicom+xml"); http_response.set_status(200); http_response.set_reason("OK"); auto const xml = as_xml(data_set); std::ostringstream body; #if BOOST_VERSION >= 105600 typedef boost::property_tree::xml_writer_settings SettingsType; #else typedef boost::property_tree::xml_writer_settings SettingsType; #endif boost::property_tree::write_xml(body, xml, SettingsType()); http_response.set_body(body.str()); odil::webservices::STOWRSResponse response(http_response); // second http_response odil::webservices::HTTPResponse http_response_2; http_response_2.set_header("Content-Type", "application/dicom+xml"); http_response_2.set_status(400); http_response_2.set_reason("Bad Request"); auto ds = std::make_shared(); auto const xml_2 = as_xml(ds); std::ostringstream body_2; #if BOOST_VERSION >= 105600 typedef boost::property_tree::xml_writer_settings SettingsType; #else typedef boost::property_tree::xml_writer_settings SettingsType; #endif boost::property_tree::write_xml(body_2, xml_2, SettingsType()); http_response_2.set_body(body_2.str()); odil::webservices::STOWRSResponse response_2(http_response_2); BOOST_REQUIRE(response != response_2); } BOOST_AUTO_TEST_CASE(Reason) { odil::webservices::STOWRSResponse response; response.set_reason("Unauthorized"); BOOST_REQUIRE_EQUAL(response.get_reason(),"Unauthorized"); } BOOST_AUTO_TEST_CASE(InvalidReason) { odil::webservices::STOWRSResponse response; BOOST_REQUIRE_THROW(response.set_reason("Unrecognize"), odil::Exception); } BOOST_AUTO_TEST_CASE(FailureCode) { odil::webservices::STOWRSResponse response; response.set_failure_code(503); BOOST_REQUIRE_EQUAL(response.get_failure_code(), 503); } BOOST_AUTO_TEST_CASE(Representation) { odil::webservices::STOWRSResponse response; response.set_representation(odil::webservices::Representation::DICOM_JSON); BOOST_REQUIRE(response.get_representation() == odil::webservices::Representation::DICOM_JSON); } odil-0.11.0/tests/code/webservices/Selector.cpp000066400000000000000000000107001362244656000214070ustar00rootroot00000000000000#define BOOST_TEST_MODULE Selector #include #include #include "odil/webservices/Selector.h" BOOST_AUTO_TEST_CASE(Constructor_empty) { odil::webservices::Selector const selector; BOOST_REQUIRE(!selector.is_study_present()); BOOST_REQUIRE(!selector.is_series_present()); BOOST_REQUIRE(!selector.is_instance_present()); } BOOST_AUTO_TEST_CASE(Constructor) { odil::webservices::Selector const selector( std::map ({{"studies", "1.2"}, {"series", "3.4"}}) ); BOOST_REQUIRE(selector.is_study_present()); BOOST_REQUIRE_EQUAL(selector.get_study(), "1.2"); BOOST_REQUIRE(selector.is_series_present()); BOOST_REQUIRE_EQUAL(selector.get_series(), "3.4"); BOOST_REQUIRE(!selector.is_instance_present()); BOOST_REQUIRE(selector.get_frames().empty()); } BOOST_AUTO_TEST_CASE(FromPath) { std::string service; odil::webservices::Selector selector; std::tie(service, selector) = odil::webservices::Selector::from_path( "/dicom/studies/1.2/instances"); BOOST_REQUIRE_EQUAL(service, "/dicom"); BOOST_REQUIRE(selector.is_study_present()); BOOST_REQUIRE_EQUAL(selector.get_study(), "1.2"); BOOST_REQUIRE(!selector.is_series_present()); BOOST_REQUIRE(selector.is_instance_present()); BOOST_REQUIRE_EQUAL(selector.get_instance(), ""); BOOST_REQUIRE(selector.get_frames().empty()); } BOOST_AUTO_TEST_CASE(FromPathFrames) { std::string service; odil::webservices::Selector selector; std::tie(service, selector) = odil::webservices::Selector::from_path( "/dicom/studies/1.2/instances/3.4/frames/1,34"); BOOST_REQUIRE_EQUAL(service, "/dicom"); BOOST_REQUIRE(selector.is_study_present()); BOOST_REQUIRE_EQUAL(selector.get_study(), "1.2"); BOOST_REQUIRE(!selector.is_series_present()); BOOST_REQUIRE(selector.is_instance_present()); BOOST_REQUIRE_EQUAL(selector.get_instance(), "3.4"); std::vector const expected_frames{1,34}; BOOST_REQUIRE(selector.get_frames() == expected_frames); } BOOST_AUTO_TEST_CASE(Equal) { odil::webservices::Selector selector; selector.set_study("1.2"); odil::webservices::Selector const selector_( std::map ({{"studies", "1.2"}})); BOOST_REQUIRE(selector == selector_); } BOOST_AUTO_TEST_CASE(Different) { odil::webservices::Selector selector; selector.set_study("1.2").set_series("3.3"); odil::webservices::Selector const selector_( std::map( {{"studies", "1.2"}, {"series", "3.4"}})); BOOST_REQUIRE(selector != selector_); } BOOST_AUTO_TEST_CASE(GetPath) { odil::webservices::Selector selector; selector.set_study("1.2").set_series("3.4").set_instance(""); BOOST_REQUIRE_EQUAL(selector.get_path(false), "/studies/1.2/series/3.4/instances"); odil::webservices::Selector selector_1; selector_1.set_study("1.2").set_series(""); BOOST_REQUIRE_EQUAL(selector_1.get_path(false), "/studies/1.2/series"); odil::webservices::Selector const selector_2( std::map( {{"studies", "1.2"}, {"series", "3.4"}, {"instances", "5.6"}}), {1,2,3}); BOOST_REQUIRE_EQUAL(selector_2.get_path(true), "/studies/1.2/series/3.4/instances/5.6/frames/1,2,3"); odil::webservices::Selector const selector_3( std::map( {{"studies", "1.2"}, {"series", "3.4"}, {"instances", ""}})); BOOST_REQUIRE_EQUAL(selector_3.get_path(false), "/studies/1.2/series/3.4/instances"); } BOOST_AUTO_TEST_CASE(Is_XXX_present) { odil::webservices::Selector selector; selector.set_instance("5.6"); BOOST_REQUIRE(selector.is_instance_present()); } BOOST_AUTO_TEST_CASE(Get_XXX) { odil::webservices::Selector const selector( std::map( {{"studies", "1.2"}, {"series", "3.4"}, {"instances", "5.6"}}), {1, 2, 3}); BOOST_REQUIRE_EQUAL(selector.get_instance(), "5.6"); std::vector frames({1, 2, 3}); BOOST_REQUIRE(selector.get_frames() == frames); } BOOST_AUTO_TEST_CASE(Set_XXX) { odil::webservices::Selector selector; selector.set_frames({1, 2, 3}); std::vector frames({1, 2, 3}); BOOST_REQUIRE(selector.get_frames() == frames); } odil-0.11.0/tests/code/webservices/URL.cpp000066400000000000000000000043701362244656000202770ustar00rootroot00000000000000#define BOOST_TEST_MODULE URL #include #include "odil/webservices/URL.h" BOOST_AUTO_TEST_CASE(Equal) { auto const url = odil::webservices::URL::parse( "foo://example.com:8042/over/there?name=ferret#nose"); BOOST_REQUIRE(url == url); BOOST_REQUIRE(!(url != url)); } BOOST_AUTO_TEST_CASE(Different) { auto const url1 = odil::webservices::URL::parse( "foo://example.com:8042/over/there?name=ferret#nose"); auto const url2 = odil::webservices::URL::parse( "foo://example.com:8042/over/there?name=goose#wing"); BOOST_REQUIRE(!(url1 == url2)); BOOST_REQUIRE(url1 != url2); } BOOST_AUTO_TEST_CASE(Parse) { auto const url = odil::webservices::URL::parse( "foo://example.com:8042/over/there?name=ferret#nose"); BOOST_REQUIRE_EQUAL(url.scheme, "foo"); BOOST_REQUIRE_EQUAL(url.authority, "example.com:8042"); BOOST_REQUIRE_EQUAL(url.path, "/over/there"); BOOST_REQUIRE_EQUAL(url.query, "name=ferret"); BOOST_REQUIRE_EQUAL(url.fragment, "nose"); } BOOST_AUTO_TEST_CASE(ParseIncomplete) { auto const url = odil::webservices::URL::parse( "foo://example.com:8042?name=ferret#nose"); BOOST_REQUIRE_EQUAL(url.scheme, "foo"); BOOST_REQUIRE_EQUAL(url.authority, "example.com:8042"); BOOST_REQUIRE_EQUAL(url.path, ""); BOOST_REQUIRE_EQUAL(url.query, "name=ferret"); BOOST_REQUIRE_EQUAL(url.fragment, "nose"); } BOOST_AUTO_TEST_CASE(Recompose) { odil::webservices::URL const url{ "foo", "example.com:8042", "/over/there", "name=ferret", "nose"}; std::string const string(url); BOOST_REQUIRE_EQUAL( string, "foo://example.com:8042/over/there?name=ferret#nose"); } BOOST_AUTO_TEST_CASE(ParseQueryDefaultSeparator) { odil::webservices::URL const url{"", "", "", "name=ferret&color=purple", ""}; auto const items = url.parse_query(); decltype(items) expected{ {"name", "ferret"}, {"color", "purple"}}; BOOST_REQUIRE(items == expected); } BOOST_AUTO_TEST_CASE(ParseQueryOtherSeparator) { odil::webservices::URL const url{"", "", "", "name=ferret;color=purple", ""}; auto const items = url.parse_query(";"); decltype(items) expected{ {"name", "ferret"}, {"color", "purple"}}; BOOST_REQUIRE(items == expected); } odil-0.11.0/tests/code/webservices/WADORSRequest.cpp000066400000000000000000000475771362244656000222250ustar00rootroot00000000000000#define BOOST_TEST_MODULE WADORSRequest #include #include "odil/Exception.h" #include "odil/registry.h" #include "odil/webservices/HTTPRequest.h" #include "odil/webservices/URL.h" #include "odil/webservices/Utils.h" #include "odil/webservices/WADORSRequest.h" odil::webservices::URL const base_url{"", "example.com", "/dicom", "", ""}; odil::webservices::URL const base_url_http{ "http", "example.com", "/dicom", "", ""}; odil::webservices::Selector const instance_selector{ {{"studies", "1.2"}, {"series", "3.4"}, {"instances", "5.6"}} }; odil::webservices::Selector const frames_selector{ {{"studies", "1.2"}, {"series", "3.4"}, {"instances", "5.6"}}, {7, 8, 9} }; BOOST_AUTO_TEST_CASE(Constructor) { odil::webservices::WADORSRequest const request( base_url_http, "1.2.3.4", "latin1", true, true); BOOST_REQUIRE(request.get_base_url() == base_url_http); BOOST_REQUIRE_EQUAL(request.get_transfer_syntax(), "1.2.3.4"); BOOST_REQUIRE_EQUAL(request.get_character_set(), "latin1"); BOOST_REQUIRE(request.get_include_media_type_in_query()); BOOST_REQUIRE(request.get_include_character_set_in_query()); } BOOST_AUTO_TEST_CASE(BaseURL) { odil::webservices::WADORSRequest request((odil::webservices::URL())); request.set_base_url(base_url_http); BOOST_REQUIRE(request.get_base_url() == base_url_http); } BOOST_AUTO_TEST_CASE(TransferSyntax) { odil::webservices::WADORSRequest request((odil::webservices::URL())); request.set_transfer_syntax("1.2.3.4"); BOOST_REQUIRE_EQUAL(request.get_transfer_syntax(), "1.2.3.4"); } BOOST_AUTO_TEST_CASE(CharacterSet) { odil::webservices::WADORSRequest request((odil::webservices::URL())); request.set_character_set("latin1"); BOOST_REQUIRE_EQUAL(request.get_character_set(), "latin1"); } BOOST_AUTO_TEST_CASE(IncludeMediaTypeInQuery) { odil::webservices::WADORSRequest request((odil::webservices::URL())); request.set_include_media_type_in_query(true); BOOST_REQUIRE(request.get_include_media_type_in_query()); } BOOST_AUTO_TEST_CASE(IncludeCharacterSetInQuery) { odil::webservices::WADORSRequest request((odil::webservices::URL())); request.set_include_character_set_in_query(true); BOOST_REQUIRE(request.get_include_character_set_in_query()); } BOOST_AUTO_TEST_CASE(RequestDicom) { odil::webservices::WADORSRequest wado_request(base_url_http); wado_request.request_dicom( odil::webservices::Representation::DICOM, instance_selector); BOOST_REQUIRE( wado_request.get_type() == odil::webservices::Type::DICOM); BOOST_REQUIRE(wado_request.get_selector() == instance_selector); BOOST_REQUIRE_EQUAL(wado_request.get_media_type(), "application/dicom"); BOOST_REQUIRE( wado_request.get_representation() == odil::webservices::Representation::DICOM); auto const http_request = wado_request.get_http_request(); BOOST_REQUIRE_EQUAL(http_request.get_method(), "GET"); BOOST_REQUIRE_EQUAL( std::string(http_request.get_target()), std::string(base_url_http)+instance_selector.get_path(false)); BOOST_REQUIRE( http_request.get_headers() == odil::webservices::HTTPRequest::Headers({ { "Accept", "multipart/related;type=application/dicom" } })); BOOST_REQUIRE(http_request.get_body().empty()); } BOOST_AUTO_TEST_CASE(RequestDicomException) { odil::webservices::WADORSRequest wado_request(base_url_http); odil::webservices::Selector selector; selector.set_study("1.2").set_instance("5.6"); // need series in order to have instance odil::webservices::Selector selector_1; // empty : need at least a study BOOST_REQUIRE_THROW( wado_request.request_dicom( odil::webservices::Representation::DICOM, selector), odil::Exception); BOOST_REQUIRE_THROW( wado_request.request_dicom( odil::webservices::Representation::DICOM, selector_1), odil::Exception); } BOOST_AUTO_TEST_CASE(RequestDicomXML) { odil::webservices::WADORSRequest wado_request(base_url_http); wado_request.request_dicom( odil::webservices::Representation::DICOM_XML, frames_selector); BOOST_REQUIRE( wado_request.get_type() == odil::webservices::Type::DICOM); BOOST_REQUIRE(wado_request.get_selector() == frames_selector); BOOST_REQUIRE_EQUAL(wado_request.get_media_type(), "application/dicom+xml"); BOOST_REQUIRE( wado_request.get_representation() == odil::webservices::Representation::DICOM_XML); auto const http_request = wado_request.get_http_request(); BOOST_REQUIRE_EQUAL(http_request.get_method(), "GET"); BOOST_REQUIRE_EQUAL( std::string(http_request.get_target()), std::string(base_url_http)+frames_selector.get_path(true)+"/metadata"); BOOST_REQUIRE( http_request.get_headers() == odil::webservices::HTTPRequest::Headers({ { "Accept", "multipart/related;type=application/dicom+xml" } })); BOOST_REQUIRE(http_request.get_body().empty()); } BOOST_AUTO_TEST_CASE(RequestDicomJSON) { odil::webservices::WADORSRequest wado_request(base_url_http); wado_request.request_dicom( odil::webservices::Representation::DICOM_JSON, frames_selector); BOOST_REQUIRE( wado_request.get_type() == odil::webservices::Type::DICOM); BOOST_REQUIRE(wado_request.get_selector() == frames_selector); BOOST_REQUIRE_EQUAL(wado_request.get_media_type(), "application/dicom+json"); BOOST_REQUIRE( wado_request.get_representation() == odil::webservices::Representation::DICOM_JSON); auto const http_request = wado_request.get_http_request(); BOOST_REQUIRE_EQUAL(http_request.get_method(), "GET"); BOOST_REQUIRE_EQUAL( std::string(http_request.get_target()), std::string(base_url_http)+frames_selector.get_path(true)+"/metadata"); BOOST_REQUIRE( http_request.get_headers() == odil::webservices::HTTPRequest::Headers({ { "Accept", "application/dicom+json" } })); BOOST_REQUIRE(http_request.get_body().empty()); } BOOST_AUTO_TEST_CASE(RequestBulkDataAll) { odil::webservices::WADORSRequest wado_request(base_url_http); wado_request.request_bulk_data(frames_selector); BOOST_REQUIRE( wado_request.get_type() == odil::webservices::Type::BulkData); BOOST_REQUIRE(wado_request.get_selector() == frames_selector); BOOST_REQUIRE_EQUAL(wado_request.get_media_type(), "application/octet-stream"); auto const http_request = wado_request.get_http_request(); BOOST_REQUIRE_EQUAL(http_request.get_method(), "GET"); BOOST_REQUIRE_EQUAL( std::string(http_request.get_target()), std::string(base_url_http)+frames_selector.get_path(true)); BOOST_REQUIRE( http_request.get_headers() == odil::webservices::HTTPRequest::Headers({ { "Accept", "multipart/related;type=application/octet-stream" } })); BOOST_REQUIRE(http_request.get_body().empty()); } BOOST_AUTO_TEST_CASE(RequestBulkDataSingle) { odil::webservices::WADORSRequest wado_request(odil::webservices::URL{}); wado_request.request_bulk_data({ "http", "example.com", "/dicom"+frames_selector.get_path(true)+"/bulk/7fe00010", "", ""}); BOOST_REQUIRE( wado_request.get_type() == odil::webservices::Type::BulkData); BOOST_REQUIRE_EQUAL(wado_request.get_media_type(), "application/octet-stream"); auto const http_request = wado_request.get_http_request(); BOOST_REQUIRE_EQUAL(http_request.get_method(), "GET"); BOOST_REQUIRE_EQUAL( std::string(http_request.get_target()), std::string(base_url_http)+frames_selector.get_path(true)+"/bulk/7fe00010"); BOOST_REQUIRE( http_request.get_headers() == odil::webservices::HTTPRequest::Headers({ { "Accept", "multipart/related;type=application/octet-stream" } })); BOOST_REQUIRE(http_request.get_body().empty()); } BOOST_AUTO_TEST_CASE(RequestPixelData) { odil::webservices::WADORSRequest wado_request(base_url_http); wado_request.request_pixel_data(frames_selector, "image/jpeg"); BOOST_REQUIRE( wado_request.get_type() == odil::webservices::Type::PixelData); BOOST_REQUIRE(wado_request.get_selector() == frames_selector); BOOST_REQUIRE_EQUAL(wado_request.get_media_type(), "image/jpeg"); auto const http_request = wado_request.get_http_request(); BOOST_REQUIRE_EQUAL(http_request.get_method(), "GET"); BOOST_REQUIRE_EQUAL( std::string(http_request.get_target()), std::string(base_url_http)+frames_selector.get_path(true)); BOOST_REQUIRE( http_request.get_headers() == odil::webservices::HTTPRequest::Headers({ { "Accept", "multipart/related;type=image/jpeg" } })); BOOST_REQUIRE(http_request.get_body().empty()); } BOOST_AUTO_TEST_CASE(ParseRequestTransferSyntaxDefault) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/studies/1.2", "", "" }, "HTTP/1.1", { { "Accept", "multipart/related;type=application/dicom" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE_EQUAL( wado_request.get_transfer_syntax(), odil::registry::ExplicitVRLittleEndian); BOOST_REQUIRE(!wado_request.get_include_media_type_in_query()); } BOOST_AUTO_TEST_CASE(ParseRequestTransferSyntaxHeader) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/studies/1.2", "", "" }, "HTTP/1.1", { { "Accept", "multipart/related;type=application/dicom;transfer-syntax=3.4" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE_EQUAL(wado_request.get_transfer_syntax(), "3.4"); BOOST_REQUIRE(!wado_request.get_include_media_type_in_query()); } BOOST_AUTO_TEST_CASE(ParseRequestTransferSyntaxQuery) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/studies/1.2", "accept=multipart/related;type=application/dicom;transfer-syntax=3.4", "" }, "HTTP/1.1", { { "Accept", "multipart/related;type=application/dicom" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE_EQUAL(wado_request.get_transfer_syntax(), "3.4"); BOOST_REQUIRE(wado_request.get_include_media_type_in_query()); } BOOST_AUTO_TEST_CASE(ParseRequestTransferSyntaxBoth) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/studies/1.2", "accept=multipart/related;type=application/dicom;transfer-syntax=3.4", "" }, "HTTP/1.1", { { "Accept", "multipart/related;type=application/dicom;transfer-syntax=5.6" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE_EQUAL(wado_request.get_transfer_syntax(), "5.6"); BOOST_REQUIRE(wado_request.get_include_media_type_in_query()); } BOOST_AUTO_TEST_CASE(ParseRequestCharacterSetDefault) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/studies/1.2", "", "" }, "HTTP/1.1", { { "Accept", "multipart/related;type=application/dicom" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE_EQUAL(wado_request.get_character_set(), "UTF-8"); BOOST_REQUIRE(!wado_request.get_include_character_set_in_query()); } BOOST_AUTO_TEST_CASE(ParseRequestCharacterSetAcceptCharsetHeader) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/studies/1.2", "", "" }, "HTTP/1.1", { { "Accept", "multipart/related;type=application/dicom" }, { "AcceptCharset", "ISO-8859-1" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE_EQUAL(wado_request.get_character_set(), "ISO-8859-1"); BOOST_REQUIRE(!wado_request.get_include_character_set_in_query()); } BOOST_AUTO_TEST_CASE(ParseRequestCharacterSetAcceptHeader) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/studies/1.2", "", "" }, "HTTP/1.1", { { "Accept", "multipart/related;type=application/dicom;charset=ISO-8859-1" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE_EQUAL(wado_request.get_character_set(), "ISO-8859-1"); BOOST_REQUIRE(!wado_request.get_include_character_set_in_query()); } BOOST_AUTO_TEST_CASE(ParseRequestCharacterSetQuery) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/studies/1.2", "charset=ISO-8859-1", "" }, "HTTP/1.1", { { "Accept", "multipart/related;type=application/dicom" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE_EQUAL(wado_request.get_character_set(), "ISO-8859-1"); BOOST_REQUIRE(wado_request.get_include_character_set_in_query()); } BOOST_AUTO_TEST_CASE(ParseRequestCharacterSetAll) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/studies/1.2", "charset=ISO-8859-1", "" }, "HTTP/1.1", { { "Accept", "multipart/related;type=application/dicom;charset=ISO-8859-2" }, { "AcceptCharset", "ISO-8859-3" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE_EQUAL(wado_request.get_character_set(), "ISO-8859-2"); BOOST_REQUIRE(wado_request.get_include_character_set_in_query()); } BOOST_AUTO_TEST_CASE(ParseRequestAcceptAndCharacterSetInQuery) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/studies/1.2", "charset=ISO-8859-1&" "accept=multipart/related;type=application/dicom;transfer-syntax=3.4", "" }, "HTTP/1.1", { { "Accept", "multipart/related;type=application/dicom" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE_EQUAL(wado_request.get_transfer_syntax(), "3.4"); BOOST_REQUIRE_EQUAL(wado_request.get_character_set(), "ISO-8859-1"); BOOST_REQUIRE(wado_request.get_include_media_type_in_query()); BOOST_REQUIRE(wado_request.get_include_character_set_in_query()); } BOOST_AUTO_TEST_CASE(ParseRequestDICOM) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/dicom"+instance_selector.get_path(false), "", "" }, "HTTP/1.1", { { "Host", "example.com" }, { "Accept", "multipart/related;type=application/dicom" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE_EQUAL( std::string(wado_request.get_base_url()), std::string(base_url)); BOOST_REQUIRE(wado_request.get_base_url() == base_url); BOOST_REQUIRE( wado_request.get_type() == odil::webservices::Type::DICOM); BOOST_REQUIRE(wado_request.get_selector() == instance_selector); BOOST_REQUIRE_EQUAL(wado_request.get_media_type(), "application/dicom"); BOOST_REQUIRE( wado_request.get_representation() == odil::webservices::Representation::DICOM); } BOOST_AUTO_TEST_CASE(ParseRequestDICOM_XML) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/dicom"+frames_selector.get_path(true), "", "" }, "HTTP/1.1", { { "Host", "example.com" }, { "Accept", "multipart/related;type=application/dicom+xml" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE(wado_request.get_base_url() == base_url); BOOST_REQUIRE( wado_request.get_type() == odil::webservices::Type::DICOM); BOOST_REQUIRE(wado_request.get_selector() == frames_selector); BOOST_REQUIRE_EQUAL(wado_request.get_media_type(), "application/dicom+xml"); BOOST_REQUIRE( wado_request.get_representation() == odil::webservices::Representation::DICOM_XML); } BOOST_AUTO_TEST_CASE(ParseRequestDICOM_JSON) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/dicom"+frames_selector.get_path(true), "", "" }, "HTTP/1.1", { { "Host", "example.com" }, { "Accept", "application/dicom+json" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE(wado_request.get_base_url() == base_url); BOOST_REQUIRE( wado_request.get_type() == odil::webservices::Type::DICOM); BOOST_REQUIRE(wado_request.get_selector() == frames_selector); BOOST_REQUIRE_EQUAL(wado_request.get_media_type(), "application/dicom+json"); BOOST_REQUIRE( wado_request.get_representation() == odil::webservices::Representation::DICOM_JSON); } BOOST_AUTO_TEST_CASE(ParseRequestBulkDataSingle) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/dicom"+instance_selector.get_path(false)+"/7fe00010", "", "" }, "HTTP/1.1", { { "Host", "example.com" }, { "Accept", "multipart/related;type=application/octet-stream" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE( wado_request.get_url() == odil::webservices::URL({ "", "example.com", "/dicom"+instance_selector.get_path(false)+"/7fe00010", "", "" })); BOOST_REQUIRE( wado_request.get_type() == odil::webservices::Type::BulkData); BOOST_REQUIRE(wado_request.get_selector() == instance_selector); BOOST_REQUIRE_EQUAL(wado_request.get_media_type(), "application/octet-stream"); } BOOST_AUTO_TEST_CASE(ParseRequestBulkDataAll) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/dicom"+instance_selector.get_path(false), "", "" }, "HTTP/1.1", { { "Host", "example.com" }, { "Accept", "multipart/related;type=application/octet-stream" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE(wado_request.get_base_url() == base_url); BOOST_REQUIRE( wado_request.get_type() == odil::webservices::Type::BulkData); BOOST_REQUIRE(wado_request.get_selector() == instance_selector); BOOST_REQUIRE_EQUAL(wado_request.get_media_type(), "application/octet-stream"); } BOOST_AUTO_TEST_CASE(ParseRequestPixelDataUncompressed) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/dicom"+frames_selector.get_path(true), "", "" }, "HTTP/1.1", { { "Host", "example.com" }, { "Accept", "multipart/related;type=application/octet-stream" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE(wado_request.get_base_url() == base_url); BOOST_REQUIRE( wado_request.get_type() == odil::webservices::Type::BulkData); BOOST_REQUIRE(wado_request.get_selector() == frames_selector); BOOST_REQUIRE_EQUAL(wado_request.get_media_type(), "application/octet-stream"); } BOOST_AUTO_TEST_CASE(ParseRequestPixelDataCompressed) { odil::webservices::HTTPRequest const http_request( "GET", { "", "", "/dicom"+frames_selector.get_path(true), "", "" }, "HTTP/1.1", { { "Host", "example.com" }, { "Accept", "multipart/related;type=image/jpeg" } }, ""); odil::webservices::WADORSRequest const wado_request(http_request); BOOST_REQUIRE(wado_request.get_base_url() == base_url); BOOST_REQUIRE( wado_request.get_type() == odil::webservices::Type::PixelData); BOOST_REQUIRE(wado_request.get_selector() == frames_selector); BOOST_REQUIRE_EQUAL(wado_request.get_media_type(), "image/jpeg"); } odil-0.11.0/tests/code/webservices/WADORSResponse.cpp000066400000000000000000000273671362244656000223660ustar00rootroot00000000000000#define BOOST_TEST_MODULE WADORSResponse #include #include #include #include #include #include #include "odil/DataSet.h" #include "odil/json_converter.h" #include "odil/registry.h" #include "odil/webservices/BulkData.h" #include "odil/webservices/ItemWithParameters.h" #include "odil/webservices/multipart_related.h" #include "odil/webservices/Utils.h" #include "odil/webservices/WADORSResponse.h" #include "odil/Writer.h" #include "odil/xml_converter.h" struct Fixture { odil::Value::DataSets data_sets; std::vector bulk_data; Fixture() { auto data_set_1 = std::make_shared(); data_set_1->add("SOPClassUID", {odil::registry::RawDataStorage}); data_set_1->add("SOPInstanceUID", {"1.2.3.4"}); data_set_1->add("PatientID", {"DJ1234"}); data_set_1->add("PixelSpacing", {1.5, 2.5}); auto data_set_2 = std::make_shared(); data_set_2->add("SOPClassUID", {odil::registry::MRImageStorage}); data_set_2->add("SOPInstanceUID", {"1.2.3.5"}); data_set_2->add("PatientName", {"Doe^John"}); data_set_2->add("PatientAge", {"042Y"}); this->data_sets = { data_set_1, data_set_2 }; this->bulk_data = { {{'\x01', '\x02'}, "foo/bar", "here"}, {{'\x03', '\x04'}, "plip/plop", "not/here"}}; } }; BOOST_AUTO_TEST_CASE(Constructor) { odil::webservices::WADORSResponse const response; BOOST_REQUIRE(response.get_data_sets().empty()); BOOST_REQUIRE(response.get_bulk_data().empty()); BOOST_REQUIRE(!response.is_partial()); BOOST_REQUIRE(response.get_type() == odil::webservices::Type::None); } BOOST_AUTO_TEST_CASE(Constructor_HttpReq) { odil::webservices::HTTPResponse http_response; http_response.set_status(200); http_response.set_header( "Content-Type", "multipart/related;type=application/dicom+xml"); http_response.set_body(""); odil::webservices::WADORSResponse response(http_response); BOOST_REQUIRE(response.is_partial() == false); BOOST_REQUIRE( response.get_representation() == odil::webservices::Representation::DICOM_XML); BOOST_REQUIRE(response.get_type() == odil::webservices::Type::DICOM); } BOOST_FIXTURE_TEST_CASE(DataSets, Fixture) { odil::webservices::WADORSResponse response; response.set_data_sets(data_sets); BOOST_REQUIRE(response.get_data_sets() == data_sets); } BOOST_FIXTURE_TEST_CASE(BulkData, Fixture) { odil::webservices::WADORSResponse response; response.set_bulk_data(bulk_data); BOOST_REQUIRE( std::equal( response.get_bulk_data().begin(), response.get_bulk_data().end(), bulk_data.begin(), [](odil::webservices::BulkData const & b1, odil::webservices::BulkData const & b2) { return ( b1.data == b2.data && b1.type == b2.type && b1.location == b2.location); })); } BOOST_AUTO_TEST_CASE(Partial) { odil::webservices::WADORSResponse response; response.set_partial(true); BOOST_REQUIRE(response.is_partial()); } BOOST_FIXTURE_TEST_CASE(RespondFull, Fixture) { odil::webservices::WADORSResponse wado; wado.set_data_sets(data_sets); wado.set_partial(false); wado.respond_dicom(odil::webservices::Representation::DICOM); auto const http = wado.get_http_response(); BOOST_REQUIRE_EQUAL(http.get_status(), 200); BOOST_REQUIRE_EQUAL(http.get_reason(), "OK"); } BOOST_FIXTURE_TEST_CASE(RespondPartial, Fixture) { odil::webservices::WADORSResponse wado; wado.set_data_sets(data_sets); wado.set_partial(true); wado.respond_dicom(odil::webservices::Representation::DICOM); auto const http = wado.get_http_response(); BOOST_REQUIRE_EQUAL(http.get_status(), 206); BOOST_REQUIRE_EQUAL(http.get_reason(), "Partial Content"); } BOOST_FIXTURE_TEST_CASE(RespondDICOM, Fixture) { odil::webservices::WADORSResponse wado; data_sets[0]->set_transfer_syntax(odil::registry::ImplicitVRLittleEndian); wado.set_data_sets(data_sets); wado.respond_dicom(odil::webservices::Representation::DICOM); BOOST_REQUIRE(wado.get_type() == odil::webservices::Type::DICOM); BOOST_REQUIRE( wado.get_representation() == odil::webservices::Representation::DICOM); auto const http = wado.get_http_response(); BOOST_REQUIRE(odil::webservices::is_multipart_related(http)); BOOST_REQUIRE_EQUAL(odil::webservices::count_parts(http), data_sets.size()); auto const content_type = boost::lexical_cast< odil::webservices::ItemWithParameters>(http.get_header("Content-Type")); BOOST_REQUIRE_EQUAL( content_type.name_parameters.at("type"), "application/dicom"); std::vector parts; odil::webservices::transform_parts( http, std::back_inserter(parts), [](odil::webservices::Message const & m) { return m; }); for(unsigned int i=0; iget_transfer_syntax().empty() ?odil::registry::ExplicitVRLittleEndian :data_set->get_transfer_syntax(); auto const & part = parts[i]; auto const content_type = boost::lexical_cast< odil::webservices::ItemWithParameters>( part.get_header("Content-Type")); BOOST_REQUIRE_EQUAL(content_type.name, "application/dicom"); if( content_type.name_parameters.find("transfer-syntax") == content_type.name_parameters.end()) { BOOST_REQUIRE( transfer_syntax == odil::registry::ExplicitVRLittleEndian); } else { BOOST_REQUIRE_EQUAL( transfer_syntax, content_type.name_parameters.at("transfer-syntax")); } std::ostringstream stream(std::ios_base::out | std::ios_base::binary); odil::Writer::write_file( data_set, stream, std::make_shared(), transfer_syntax); BOOST_REQUIRE(stream.str() == part.get_body()); } } BOOST_FIXTURE_TEST_CASE(RespondDICOMXML, Fixture) { odil::webservices::WADORSResponse wado; wado.set_data_sets(data_sets); wado.respond_dicom(odil::webservices::Representation::DICOM_XML); BOOST_REQUIRE(wado.get_type() == odil::webservices::Type::DICOM); BOOST_REQUIRE( wado.get_representation() == odil::webservices::Representation::DICOM_XML); auto const http = wado.get_http_response(); BOOST_REQUIRE(odil::webservices::is_multipart_related(http)); BOOST_REQUIRE_EQUAL(odil::webservices::count_parts(http), data_sets.size()); auto const content_type = boost::lexical_cast< odil::webservices::ItemWithParameters>(http.get_header("Content-Type")); BOOST_REQUIRE_EQUAL( content_type.name_parameters.at("type"), "application/dicom+xml"); std::vector parts; odil::webservices::transform_parts( http, std::back_inserter(parts), [](odil::webservices::Message const & m) { return m; }); for(unsigned int i=0; iget_transfer_syntax().empty() ?odil::registry::ExplicitVRLittleEndian :data_set->get_transfer_syntax(); auto const & part = parts[i]; auto const content_type = boost::lexical_cast< odil::webservices::ItemWithParameters>( part.get_header("Content-Type")); BOOST_REQUIRE_EQUAL(content_type.name, "application/dicom+xml"); std::stringstream stream(part.get_body()); boost::property_tree::ptree xml; boost::property_tree::read_xml(stream, xml); BOOST_REQUIRE(*data_set == *odil::as_dataset(xml)); } } BOOST_FIXTURE_TEST_CASE(RespondDICOMJSON, Fixture) { odil::webservices::WADORSResponse wado; wado.set_data_sets(data_sets); wado.respond_dicom(odil::webservices::Representation::DICOM_JSON); BOOST_REQUIRE(wado.get_type() == odil::webservices::Type::DICOM); BOOST_REQUIRE( wado.get_representation() == odil::webservices::Representation::DICOM_JSON); auto const http = wado.get_http_response(); BOOST_REQUIRE(!odil::webservices::is_multipart_related(http)); auto const content_type = boost::lexical_cast< odil::webservices::ItemWithParameters>(http.get_header("Content-Type")); BOOST_REQUIRE_EQUAL(content_type.name, "application/dicom+json"); std::istringstream stream(http.get_body()); Json::Value array; stream >> array; BOOST_REQUIRE(array.isArray()); odil::Value::DataSets response_data_sets; std::transform( array.begin(), array.end(), std::back_inserter(response_data_sets), static_cast (*)(Json::Value const &)>(odil::as_dataset)); BOOST_REQUIRE(response_data_sets == data_sets); } BOOST_FIXTURE_TEST_CASE(RespondBulkData, Fixture) { odil::webservices::WADORSResponse wado; wado.set_bulk_data(bulk_data); wado.respond_bulk_data(); BOOST_REQUIRE(wado.get_type() == odil::webservices::Type::BulkData); auto const http = wado.get_http_response(); BOOST_REQUIRE(odil::webservices::is_multipart_related(http)); BOOST_REQUIRE_EQUAL(odil::webservices::count_parts(http), bulk_data.size()); auto const content_type = boost::lexical_cast< odil::webservices::ItemWithParameters>(http.get_header("Content-Type")); BOOST_REQUIRE_EQUAL( content_type.name_parameters.at("type"), "application/octet-stream"); std::vector parts; odil::webservices::transform_parts( http, std::back_inserter(parts), [](odil::webservices::Message const & m) { return m; }); for(unsigned int i=0; i data; std::copy( part.get_body().begin(), part.get_body().end(), std::back_inserter(data)); BOOST_REQUIRE(data == bulk_data[i].data); } } BOOST_FIXTURE_TEST_CASE(RespondPixelData, Fixture) { odil::webservices::WADORSResponse wado; wado.set_bulk_data(bulk_data); wado.respond_pixel_data("image/jpeg"); BOOST_REQUIRE(wado.get_type() == odil::webservices::Type::PixelData); auto const http = wado.get_http_response(); BOOST_REQUIRE(odil::webservices::is_multipart_related(http)); BOOST_REQUIRE_EQUAL(odil::webservices::count_parts(http), bulk_data.size()); auto const content_type = boost::lexical_cast< odil::webservices::ItemWithParameters>(http.get_header("Content-Type")); BOOST_REQUIRE_EQUAL(content_type.name_parameters.at("type"), "image/jpeg"); std::vector parts; odil::webservices::transform_parts( http, std::back_inserter(parts), [](odil::webservices::Message const & m) { return m; }); for(unsigned int i=0; i data; std::copy( part.get_body().begin(), part.get_body().end(), std::back_inserter(data)); BOOST_REQUIRE(data == bulk_data[i].data); } } odil-0.11.0/tests/code/webservices/multipart_related.cpp000066400000000000000000000203351362244656000233550ustar00rootroot00000000000000#define BOOST_TEST_MODULE multipart_related #include #include #include #include #include "odil/webservices/Message.h" #include "odil/webservices/multipart_related.h" BOOST_AUTO_TEST_CASE(is_multipart_related) { odil::webservices::Message const message( odil::webservices::Message::Headers{{ "Content-Type", "Multipart/Related; " "boundary=example-1;start=\"<950120.aaCC@XIson.com>\";" "type=\"Application/X-FixedRecord\";start-info=\"-o ps\"\r\n"}}); BOOST_REQUIRE(odil::webservices::is_multipart_related(message)); } BOOST_AUTO_TEST_CASE(is_not_multipart_related_bad_content) { odil::webservices::Message const message( odil::webservices::Message::Headers{{ "Content-Type", "text/plain; format=flowed"}}); BOOST_REQUIRE(!odil::webservices::is_multipart_related(message)); } BOOST_AUTO_TEST_CASE(is_not_multipart_related_no_content) { odil::webservices::Message const message; BOOST_REQUIRE(!odil::webservices::is_multipart_related(message)); } BOOST_AUTO_TEST_CASE(count_parts) { odil::webservices::Message const message( odil::webservices::Message::Headers{{ "Content-Type", "Multipart/Related; boundary=example-1;" "start=\"<950120.aaCC@XIson.com>\";" "type=\"Application/X-FixedRecord\";start-info=\"-o ps\"\r\n"}}, "--example-1\r\n" "Content-Type: Application/X-FixedRecord\r\n" "Content-ID: <950120.aaCC@XIson.com>\r\n" "\r\n" "25\r\n" "10\r\n" "34\r\n" "10\r\n" "25\r\n" "21\r\n" "26\r\n" "10\r\n" "--example-1\r\n" "Content-Type: Application/octet-stream\r\n" "Content-Description: The fixed length records\r\n" "Content-Transfer-Encoding: base64\r\n" "Content-ID: <950120.aaCB@XIson.com>\r\n" "\r\n" "T2xkIE1hY0RvbmFsZCBoYWQgYSBmYXJtCkUgSS\r\n" "BFIEkgTwpBbmQgb24gaGlzIGZhcm0gaGUgaGFk\r\n" "IHNvbWUgZHVja3MKRSBJIEUgSSBPCldpdGggYS\r\n" "BxdWFjayBxdWFjayBoZXJlLAphIHF1YWNrIHF1\r\n" "YWNrIHRoZXJlLApldmVyeSB3aGVyZSBhIHF1YW\r\n" "NrIHF1YWNrCkUgSSBFIEkgTwo=\r\n" "\r\n" "--example-1--\r\n" "\r\n"); BOOST_REQUIRE_EQUAL(odil::webservices::count_parts(message), 2); } BOOST_AUTO_TEST_CASE(random_boundary) { BOOST_REQUIRE( odil::webservices::random_boundary() != odil::webservices::random_boundary()); } struct Fixture { odil::webservices::Message message; std::vector parts; Fixture() { this->message = odil::webservices::Message( odil::webservices::Message::Headers{{ "Content-Type", "Multipart/Related; " "boundary=example-1;start=\"<950120.aaCC@XIson.com>\";" "type=\"Application/X-FixedRecord\";start-info=\"-o ps\"\r\n"}}, "Preamble, must be ignored\r\n" "--example-1\r\n" "Content-Type: Application/X-FixedRecord\r\n" "Content-ID: <950120.aaCC@XIson.com>\r\n" "\r\n" "25\r\n" "10\r\n" "34\r\n" "10\r\n" "25\r\n" "21\r\n" "26\r\n" "10\r\n" "--example-1\r\n" "Content-Type: Application/octet-stream\r\n" "Content-Description: The fixed length records\r\n" "Content-Transfer-Encoding: base64\r\n" "Content-ID: <950120.aaCB@XIson.com>\r\n" "\r\n" "T2xkIE1hY0RvbmFsZCBoYWQgYSBmYXJtCkUgSS\r\n" "BFIEkgTwpBbmQgb24gaGlzIGZhcm0gaGUgaGFk\r\n" "IHNvbWUgZHVja3MKRSBJIEUgSSBPCldpdGggYS\r\n" "BxdWFjayBxdWFjayBoZXJlLAphIHF1YWNrIHF1\r\n" "YWNrIHRoZXJlLApldmVyeSB3aGVyZSBhIHF1YW\r\n" "NrIHF1YWNrCkUgSSBFIEkgTwo=\r\n" "\r\n" "--example-1--\r\n" "\r\n" "Epilogue, must also be ignored"); this->parts = std::vector{ { { { "Content-Type", "Application/X-FixedRecord" }, { "Content-ID", "<950120.aaCC@XIson.com>" } }, "25\r\n" "10\r\n" "34\r\n" "10\r\n" "25\r\n" "21\r\n" "26\r\n" "10" }, { { { "Content-Type", "Application/octet-stream" }, { "Content-Description", "The fixed length records" }, { "Content-Transfer-Encoding", "base64" }, { "Content-ID", "<950120.aaCB@XIson.com>" } }, "T2xkIE1hY0RvbmFsZCBoYWQgYSBmYXJtCkUgSS\r\n" "BFIEkgTwpBbmQgb24gaGlzIGZhcm0gaGUgaGFk\r\n" "IHNvbWUgZHVja3MKRSBJIEUgSSBPCldpdGggYS\r\n" "BxdWFjayBxdWFjayBoZXJlLAphIHF1YWNrIHF1\r\n" "YWNrIHRoZXJlLApldmVyeSB3aGVyZSBhIHF1YW\r\n" "NrIHF1YWNrCkUgSSBFIEkgTwo=\r\n" } }; } }; BOOST_FIXTURE_TEST_CASE(transform_parts, Fixture) { std::vector transformed_parts; int called = 0; auto const functor = [&called](odil::webservices::Message const & part) { ++called; return part; }; odil::webservices::transform_parts( this->message, std::back_inserter(transformed_parts), functor); BOOST_REQUIRE_EQUAL(called, this->parts.size()); BOOST_REQUIRE( std::equal( this->parts.begin(), this->parts.end(), transformed_parts.begin(), []( odil::webservices::Message const & m1, odil::webservices::Message const & m2) { return ( m1.get_headers() == m2.get_headers() && m1.get_body() == m2.get_body()); } )); } BOOST_FIXTURE_TEST_CASE(for_each_part, Fixture) { std::vector< odil::webservices::Message > transformed_parts; unsigned int part_counter = 0; auto const functor = [&transformed_parts, &part_counter](odil::webservices::Message const & part) { part_counter ++; transformed_parts.push_back(part); }; odil::webservices::for_each_part( this->message, functor); BOOST_REQUIRE_EQUAL(part_counter, this->parts.size()); BOOST_REQUIRE( std::equal( this->parts.begin(), this->parts.end(), transformed_parts.begin(), []( odil::webservices::Message const & m1, odil::webservices::Message const & m2) { return ( m1.get_headers() == m2.get_headers() && m1.get_body() == m2.get_body()); } )); } BOOST_FIXTURE_TEST_CASE(accumulate_parts, Fixture) { std::ostringstream stream; int called = 0; auto const serialize = [&called](odil::webservices::Message const & part) { ++called; return part; }; odil::webservices::accumulate_parts( this->parts.begin(), this->parts.end(), serialize, stream, "example-1"); BOOST_REQUIRE_EQUAL(called, this->parts.size()); odil::webservices::Message const new_message( { {"Content-Type", "multipart/related;boundary=example-1"} }, stream.str()); std::vector transformed_parts; auto const functor = [](odil::webservices::Message const & part) { return part; }; odil::webservices::transform_parts( new_message, std::back_inserter(transformed_parts), functor); BOOST_REQUIRE_EQUAL(called, this->parts.size()); BOOST_REQUIRE( std::equal( this->parts.begin(), this->parts.end(), transformed_parts.begin(), []( odil::webservices::Message const & m1, odil::webservices::Message const & m2) { return ( m1.get_headers() == m2.get_headers() && m1.get_body() == m2.get_body()); } )); } odil-0.11.0/tests/code/xml_converter.cpp000066400000000000000000000271731362244656000202110ustar00rootroot00000000000000#define BOOST_TEST_MODULE xml_converter #include #include #include "odil/DataSet.h" #include "odil/registry.h" #include "odil/Tag.h" #include "odil/Value.h" #include "odil/VR.h" #include "odil/xml_converter.h" bool compare_ptree( boost::property_tree::ptree const & p1, boost::property_tree::ptree const & p2) { if(p1.size() != p2.size()) { return false; } typedef boost::property_tree::ptree::const_assoc_iterator::value_type iterator_value_type; return std::equal( p1.ordered_begin(), p1.not_found(), p2.ordered_begin(), [](iterator_value_type const v1, iterator_value_type const & v2) { return v1.first == v2.first && compare_ptree(v1.second, v2.second); }); } template void test_parsing( odil::Tag const & tag, odil::VR vr, TValue const & odil_value, std::string const & xml_value) { // Baseline data set auto data_set = std::make_shared(); data_set->add(tag, odil_value); // Baseline XML std::stringstream stream; stream << "" << "" << ""; stream << xml_value; stream << "" << ""; boost::property_tree::ptree xml; boost::property_tree::read_xml(stream, xml); BOOST_REQUIRE(*odil::as_dataset(xml) == *data_set); BOOST_REQUIRE(compare_ptree(xml, odil::as_xml(data_set))); } BOOST_AUTO_TEST_CASE(EmptyDataSet) { // Baseline data set auto data_set = std::make_shared(); // Baseline XML std::stringstream stream; stream << "" << "" << ""; boost::property_tree::ptree xml; boost::property_tree::read_xml(stream, xml); BOOST_REQUIRE(*odil::as_dataset(xml) == *data_set); BOOST_REQUIRE(compare_ptree(xml, odil::as_xml(data_set))); } BOOST_AUTO_TEST_CASE(EmptyValue) { auto const tag = odil::registry::SelectorSSValue; auto const vr = odil::VR::SS; odil::Value::Integers const value; std::stringstream stream; for(unsigned int i=0; i" << value[i] << "\n"; } test_parsing(tag, vr, value, ""/*stream.str()*/); } BOOST_AUTO_TEST_CASE(IntValues) { auto const tag = odil::registry::SelectorSSValue; auto const vr = odil::VR::SS; odil::Value::Integers const value{-12, -34}; std::stringstream stream; for(unsigned int i=0; i" << value[i] << "\n"; } test_parsing(tag, vr, value, stream.str()); } BOOST_AUTO_TEST_CASE(RealValues) { auto const tag = odil::registry::SelectorFLValue; auto const vr = odil::VR::FL; odil::Value::Reals const value{1.2, -3.4}; std::stringstream stream; for(unsigned int i=0; i" << value[i] << "\n"; } test_parsing(tag, vr, value, stream.str()); } BOOST_AUTO_TEST_CASE(StringValues) { auto const tag = odil::registry::SelectorCSValue; auto const vr = odil::VR::CS; odil::Value::Strings const value{"foo", "bar"}; std::stringstream stream; for(unsigned int i=0; i" << value[i] << "\n"; } test_parsing(tag, vr, value, stream.str()); } BOOST_AUTO_TEST_CASE(BulkDataURI) { auto const bulk_data_creator = [](std::shared_ptr, odil::Tag const & tag) { std::pair result; if(tag == odil::registry::EncapsulatedDocument) { result.first = "uri"; result.second = "http://example.com"; } return result; }; auto const tag = odil::registry::EncapsulatedDocument; auto const vr = odil::VR::OB; odil::Value::Binary const odil_value{{0x01, 0x02, 0x03, 0x04}}; std::string const xml_value = ""; // Baseline data set auto data_set = std::make_shared(); data_set->add(tag, odil_value); // Bulk-data data set auto bulk_data_set = std::make_shared(); bulk_data_set->add(tag, {"http://example.com"}, odil::VR::UR); // Baseline XML std::stringstream stream; stream << "" << "" << ""; stream << xml_value; stream << "" << ""; boost::property_tree::ptree xml; boost::property_tree::read_xml(stream, xml); BOOST_REQUIRE(*odil::as_dataset(xml) == *bulk_data_set); BOOST_REQUIRE(compare_ptree(xml, odil::as_xml(data_set, bulk_data_creator))); } BOOST_AUTO_TEST_CASE(BulkDataUUID) { auto const bulk_data_creator = [](std::shared_ptr, odil::Tag const & tag) { std::pair result; if(tag == odil::registry::EncapsulatedDocument) { result.first = "uuid"; result.second = "http://example.com"; } return result; }; auto const tag = odil::registry::EncapsulatedDocument; auto const vr = odil::VR::OB; odil::Value::Binary const odil_value{{0x01, 0x02, 0x03, 0x04}}; std::string const xml_value = ""; // Baseline data set auto data_set = std::make_shared(); data_set->add(tag, odil_value); // Bulk-data data set auto bulk_data_set = std::make_shared(); bulk_data_set->add(tag, {"http://example.com"}, odil::VR::UR); // Baseline XML std::stringstream stream; stream << "" << "" << ""; stream << xml_value; stream << "" << ""; boost::property_tree::ptree xml; boost::property_tree::read_xml(stream, xml); BOOST_REQUIRE(*odil::as_dataset(xml) == *bulk_data_set); BOOST_REQUIRE(compare_ptree(xml, odil::as_xml(data_set, bulk_data_creator))); } BOOST_AUTO_TEST_CASE(PersonNameSingleRepresentationSingleComponent) { auto const tag = odil::registry::SelectorPNValue; auto const vr = odil::VR::PN; odil::Value::Strings const value{"Last"}; std::stringstream stream; stream << "" << "" << "" << "Last" << "" << "" << ""; test_parsing(tag, vr, value, stream.str()); } BOOST_AUTO_TEST_CASE(PersonNameSingleRepresentationMultipleComponent) { auto const tag = odil::registry::SelectorPNValue; auto const vr = odil::VR::PN; odil::Value::Strings const value{"Last^^^Dr"}; std::stringstream stream; stream << "" << "" << "" << "Last" << "" << "" << "Dr" << "" << "" << ""; test_parsing(tag, vr, value, stream.str()); } BOOST_AUTO_TEST_CASE(PersonNameMultipleRepresentationSingleComponent) { auto const tag = odil::registry::SelectorPNValue; auto const vr = odil::VR::PN; odil::Value::Strings const value{"Last==Family"}; std::stringstream stream; stream << "" << "" << "" << "Last" << "" << "" << "" << "" << "Family" << "" << "" << ""; test_parsing(tag, vr, value, stream.str()); } BOOST_AUTO_TEST_CASE(PersonNameMultipleRepresentationMultipleComponent) { auto const tag = odil::registry::SelectorPNValue; auto const vr = odil::VR::PN; odil::Value::Strings const value{"Last^^X^Dr==Family^^^Mr"}; std::stringstream stream; stream << "" << "" << "" << "Last" << "" << "" << "X" << "" << "" << "Dr" << "" << "" << "" << "" << "Family" << "" << "" << "Mr" << "" << "" << ""; test_parsing(tag, vr, value, stream.str()); } BOOST_AUTO_TEST_CASE(Item) { auto const tag = odil::registry::ReferencedSeriesSequence; auto const vr = odil::VR::SQ; auto data_set_1 = std::make_shared(); data_set_1->add("PatientID", {"DJ1234"}); auto data_set_2 = std::make_shared(); data_set_2->add("NumberOfSeriesRelatedInstances", {1234}); odil::Value::DataSets const value{data_set_1, data_set_2}; std::stringstream stream; stream << "" << "" << "DJ1234" << "" << "" << "" << "" << "1234" << "" << ""; test_parsing(tag, vr, value, stream.str()); } BOOST_AUTO_TEST_CASE(InlineBinary) { auto const tag = odil::registry::SelectorOWValue; auto const vr = odil::VR::OW; odil::Value::Binary const value{{0x01, 0x02, 0x03, 0x04}}; std::stringstream stream; stream << "AQIDBA=="; test_parsing(tag, vr, value, stream.str()); } BOOST_AUTO_TEST_CASE(MissingRootNode) { BOOST_REQUIRE_THROW( odil::as_dataset(boost::property_tree::ptree()), odil::Exception); } BOOST_AUTO_TEST_CASE(BadVRCreation) { auto data_set = std::make_shared(); data_set->add(odil::registry::PatientID, {"value"}, odil::VR::INVALID); BOOST_REQUIRE_THROW(odil::as_xml(data_set), odil::Exception); } BOOST_AUTO_TEST_CASE(BadVRParsing) { std::stringstream stream; stream << "" << "" << "" << "" << ""; boost::property_tree::ptree xml; boost::property_tree::read_xml(stream, xml); BOOST_REQUIRE_THROW(odil::as_dataset(xml), odil::Exception); } odil-0.11.0/tests/data/000077500000000000000000000000001362244656000146035ustar00rootroot00000000000000odil-0.11.0/tests/data/dataset.dcm000066400000000000000000000007001362244656000167120ustar00rootroot00000000000000DICMUL¼OBUI1.2.840.10008.5.1.4.1.1.66UI,2.25.95090344942250266709587559073467305647UI1.2.840.10008.1.2.1UI1.2.276.0.7230010.3.0.3.6.5SHOFFIS_DCMTK_365 UI1.2.840.10008.5.1.4.1.1.66UI,2.25.95090344942250266709587559073467305647PNDoe^John LODJ001 odil-0.11.0/tests/data/dcmqrscp.config000066400000000000000000000002361362244656000176070ustar00rootroot00000000000000HostTable BEGIN remote = (REMOTE, localhost, 11112) local = (LOCAL, localhost, 11113) HostTable END AETable BEGIN REMOTE . RW (10, 1024mb) local AETable END odil-0.11.0/tests/peer_fixture_base.py000066400000000000000000000011621362244656000177370ustar00rootroot00000000000000import os import unittest import odil class PeerFixtureBase(unittest.TestCase): def setUp(self, contexts): self.association = odil.Association() self.association.set_peer_host(os.environ["ODIL_PEER_HOST_NAME"]) self.association.set_peer_port(int(os.environ["ODIL_PEER_PORT"])) self.association.update_parameters()\ .set_calling_ae_title(os.environ["ODIL_OWN_AET"])\ .set_called_ae_title(os.environ["ODIL_PEER_AET"]) \ .set_presentation_contexts(contexts) self.association.associate() def tearDown(self): self.association.release() odil-0.11.0/tests/run000077500000000000000000000105371362244656000144320ustar00rootroot00000000000000#!/usr/bin/env python import argparse import os import re import shutil import subprocess import sys import time import tempfile def main(): parser = argparse.ArgumentParser( description="Run all tests (C++ and Python). " "This program must be run from the build directory.") parser.add_argument("tests", nargs="*", help="Python only") parser.add_argument( "--no-network", action="store_true", help="Don't run network-related tests") parser.add_argument( "--verbose", "-v", action="store_true", help="Increase tests verbosity") parser.add_argument("--test-regex", "-R", help="C++ only") parser.add_argument("--exclude-regex", "-E", help="C++ only") parser.add_argument( "--nose", default="nosetests", help="nosetests executable") parser.add_argument("--exclude", "-e", help="Python only") arguments = parser.parse_args() if arguments.no_network: excluded_cpp = [ "Association", "Network", "ServiceRole", "SCP", "SCU", "Transport"] excluded_python = ["scu", "scp"] arguments.exclude_regex = "{}{}{}".format( arguments.exclude_regex or "", "|" if arguments.exclude_regex else "", "|".join(excluded_cpp)) arguments.exclude = "{}{}{}".format( arguments.exclude or "", "|" if arguments.exclude else "", "|".join(excluded_python)) cpp_args = [] if arguments.test_regex: cpp_args += ["-R", arguments.test_regex] if arguments.exclude_regex: cpp_args += ["-E", arguments.exclude_regex] python_args = [] if arguments.exclude: python_args += ["-e", arguments.exclude] python_args += arguments.tests directory, process = setUp(arguments.no_network) environment = os.environ.copy() environment["ODIL_OWN_AET"] = "LOCAL" environment["ODIL_PEER_HOST_NAME"] = "127.0.0.1" environment["ODIL_PEER_PORT"] = "11112" environment["ODIL_PEER_AET"] = "REMOTE" environment["PATH"] = os.pathsep.join( [os.path.abspath("tests/tools"), environment["PATH"]]) source_directory = None with open("CMakeCache.txt") as fd: lines = fd.readlines() for line in lines: match = re.match(r".*_SOURCE_DIR:.*=(.*)", line) if match: source_directory = match.group(1) break ctest = ["ctest", "--no-compress-output", "-T", "Test"] if arguments.verbose: ctest.append("-V") cpp_code = subprocess.call(ctest+cpp_args, env=environment) nose = [ arguments.nose, os.path.join(source_directory, "tests", "wrappers")] if arguments.verbose: nose.append("-v") python_code = subprocess.call(nose+python_args, env=environment) tearDown(directory, process) return max(cpp_code, python_code) def setUp(no_network): directory = tempfile.mkdtemp() process = None if not no_network: data = """ HostTable BEGIN remote = (REMOTE, localhost, 11112) local = (LOCAL, localhost, 11113) HostTable END AETable BEGIN REMOTE {} RW (10, 1024mb) local AETable END """.format(directory) with open(os.path.join(directory, "config"), "w") as fd: fd.write(data) process = subprocess.Popen([ "dcmqrscp", "-ll", "error", "-c", os.path.join(directory, "config"), "11112"]) time.sleep(1) data = """ (0008,0016) UI =RawDataStorage (0008,0018) UI [2.25.95090344942250266709587559073467305647] (0010,0010) PN [Doe^John] (0010,0020) LO [DJ001] """ read, write = os.pipe() os.write(write, data) os.close(write) subprocess.check_call( [ "dump2dcm", "--write-xfer-little", "/dev/stdin", os.path.join(directory, "data.dcm") ], stdin=read) subprocess.check_call([ "storescu", "-ll", "error", "-aet", "LOCAL", "-aec", "REMOTE", "localhost", "11112", os.path.join(directory, "data.dcm")]) return directory, process def tearDown(directory, process): if process is not None: process.terminate() process.wait() if directory is not None: shutil.rmtree(directory) if __name__ == "__main__": sys.exit(main()) odil-0.11.0/tests/tools/000077500000000000000000000000001362244656000150325ustar00rootroot00000000000000odil-0.11.0/tests/tools/CMakeLists.txt000066400000000000000000000006431362244656000175750ustar00rootroot00000000000000find_package(DCMTK REQUIRED) add_definitions(${DCMTK_DEFINITIONS}) include_directories(${DCMTK_INCLUDE_DIRS}) link_directories(${DCMTK_LIBRARY_DIRS}) file(GLOB headers *.h) file(GLOB files "*.cc") if(USE_BUILTIN_DCMTK_GETSCU) add_executable(dcmtk_getscu ${files} ${headers}) target_link_libraries(dcmtk_getscu ${DCMTK_LIBRARIES}) set_target_properties(dcmtk_getscu PROPERTIES OUTPUT_NAME getscu) endif() odil-0.11.0/tests/tools/dndefine.h000066400000000000000000000032461362244656000167640ustar00rootroot00000000000000/* * * Copyright (C) 2011, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by * * OFFIS e.V. * R&D Division Health * Escherweg 2 * D-26121 Oldenburg, Germany * * * Module: dcnmnet * * Author: Uli Schlachter * * Purpose: Contains preprocessor definitions * * Last Update: $Author: uli $ * Update Date: $Date: 2011-12-14 11:45:14 $ * CVS/RCS Revision: $Revision: 1.1 $ * Status: $State: Exp $ * * CVS/RCS Log at end of file * */ #ifndef DNDEFINE_H #define DNDEFINE_H #include "dcmtk/config/osconfig.h" #include "dcmtk/ofstd/ofdefine.h" // MODIFICATION: Add definitions #ifdef DCMTK_SHARED #ifdef _WIN32 /* Defines needed for building DLLs on windows */ #define DCMTK_DECL_EXPORT __declspec(dllexport) #define DCMTK_DECL_IMPORT __declspec(dllimport) #elif defined(HAVE_HIDDEN_VISIBILITY) /* GCC hides everything when given -fvisibility=hidden. The symbols which * should be visible have to get a default visibility again. */ #define DCMTK_DECL_EXPORT __attribute__ ((visibility("default"))) #endif #endif #ifndef DCMTK_DECL_EXPORT #define DCMTK_DECL_EXPORT #endif #ifndef DCMTK_DECL_IMPORT #define DCMTK_DECL_IMPORT #endif // END Modification #ifdef dcmnet_EXPORTS #define DCMTK_DCMNET_EXPORT DCMTK_DECL_EXPORT #else #define DCMTK_DCMNET_EXPORT DCMTK_DECL_IMPORT #endif #endif /* * CVS/RCS Log: * $Log: dndefine.h,v $ * Revision 1.1 2011-12-14 11:45:14 uli * Make it possible to perfectly build dcmnet and dcmtls a DLLs. * * Revision 1.1 2011-12-14 09:50:21 uli * Make it possible to properly build dcmimgle as a DLL. * * */ odil-0.11.0/tests/tools/getscu.cc000066400000000000000000000614741362244656000166470ustar00rootroot00000000000000/* * * Copyright (C) 2011, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by * * OFFIS e.V. * R&D Division Health * Escherweg 2 * D-26121 Oldenburg, Germany * * * Module: dcmnet * * Author: Michael Onken * * Purpose: Query/Retrieve Service Class User (C-GET operation) * * Last Update: $Author: onken $ * Update Date: $Date: 2012-02-10 14:54:38 $ * CVS/RCS Revision: $Revision: 1.10 $ * Status: $State: Exp $ * * CVS/RCS Log at end of file * */ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #ifdef HAVE_GUSI_H #include #endif #include "dcmtk/ofstd/ofconapp.h" #include "dcmtk/ofstd/oflist.h" // MODIFICATION: Use local header file #include "scu.h" // END Modification #include "dcmtk/dcmdata/dcuid.h" /* for dcmtk version name */ #include "dcmtk/dcmdata/dcostrmz.h" /* for dcmZlibCompressionLevel */ #include "dcmtk/dcmdata/dcpath.h" /* for DcmPathProcessor */ #ifdef WITH_ZLIB #include /* for zlibVersion() */ #endif #define OFFIS_CONSOLE_APPLICATION "getscu" static OFLogger getscuLogger = OFLog::getLogger("dcmtk.apps." OFFIS_CONSOLE_APPLICATION); static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v" OFFIS_DCMTK_VERSION " " OFFIS_DCMTK_RELEASEDATE " $"; /* default application titles */ #define APPLICATIONTITLE "GETSCU" #define PEERAPPLICATIONTITLE "ANY-SCP" typedef enum { QMPatientRoot = 0, QMStudyRoot = 1, QMPatientStudyOnly = 2 } QueryModel; static const char* querySyntax[3] = { UID_GETPatientRootQueryRetrieveInformationModel, UID_GETStudyRootQueryRetrieveInformationModel, UID_RETIRED_GETPatientStudyOnlyQueryRetrieveInformationModel }; OFCmdUnsignedInt opt_maxPDU = ASC_DEFAULTMAXPDU; E_TransferSyntax opt_store_networkTransferSyntax = EXS_Unknown; E_TransferSyntax opt_get_networkTransferSyntax = EXS_Unknown; DcmStorageMode opt_storageMode = DCMSCU_STORAGE_DISK; OFBool opt_showPresentationContexts = OFFalse; OFBool opt_abortAssociation = OFFalse; OFCmdUnsignedInt opt_repeatCount = 1; QueryModel opt_queryModel = QMPatientRoot; T_DIMSE_BlockingMode opt_blockMode = DIMSE_BLOCKING; int opt_dimse_timeout = 0; int opt_acse_timeout = 30; OFString opt_outputDirectory = "."; static OFList overrideKeys; static void prepareTS(E_TransferSyntax ts, OFList& syntaxes); static void applyOverrideKeys(DcmDataset *dataset); #define SHORTCOL 4 #define LONGCOL 21 int main(int argc, char *argv[]) { const char *opt_peer; OFCmdUnsignedInt opt_port = 104;; const char *opt_peerTitle = PEERAPPLICATIONTITLE; const char *opt_ourTitle = APPLICATIONTITLE; OFList fileNameList; #ifdef HAVE_GUSI_H /* needed for Macintosh */ GUSISetup(GUSIwithSIOUXSockets); GUSISetup(GUSIwithInternetSockets); #endif char tempstr[20]; OFString temp_str; OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION , "DICOM retrieve (C-GET) SCU", rcsid); OFCommandLine cmd; cmd.setParamColumn(LONGCOL + SHORTCOL + 4); cmd.addParam("peer", "hostname of DICOM peer"); cmd.addParam("port", "tcp/ip port number of peer"); cmd.addParam("dcmfile-in", "DICOM query file(s)", OFCmdParam::PM_MultiOptional); cmd.setOptionColumns(LONGCOL, SHORTCOL); cmd.addGroup("general options:", LONGCOL, SHORTCOL + 2); cmd.addOption("--help", "-h", "print this help text and exit", OFCommandLine::AF_Exclusive); cmd.addOption("--version", "print version information and exit", OFCommandLine::AF_Exclusive); OFLog::addOptions(cmd); cmd.addOption("--verbose-pc", "+v", "show presentation contexts in verbose mode"); cmd.addGroup("network options:"); cmd.addSubGroup("override matching keys:"); cmd.addOption("--key", "-k", 1, "[k]ey: gggg,eeee=\"str\", path or dic. name=\"str\"", "override matching key"); cmd.addSubGroup("retrieve information model:"); cmd.addOption("--patient", "-P", "use patient root information model (default)"); cmd.addOption("--study", "-S", "use study root information model"); cmd.addOption("--psonly", "-O", "use patient/study only information model"); cmd.addSubGroup("application entity titles:"); OFString opt1 = "set my calling AE title (default: "; opt1 += APPLICATIONTITLE; opt1 += ")"; cmd.addOption("--aetitle", "-aet", 1, "[a]etitle: string", opt1.c_str()); OFString opt2 = "set called AE title of peer (default: "; opt2 += PEERAPPLICATIONTITLE; opt2 += ")"; cmd.addOption("--call", "-aec", 1, "[a]etitle: string", opt2.c_str()); cmd.addSubGroup("preferred storage transfer syntaxes (incoming associations):"); cmd.addOption("--prefer-uncompr", "+x=", "prefer explicit VR local byte order (default)"); cmd.addOption("--prefer-little", "+xe", "prefer explicit VR little endian TS"); cmd.addOption("--prefer-big", "+xb", "prefer explicit VR big endian TS"); cmd.addOption("--prefer-lossless", "+xs", "prefer default JPEG lossless TS"); cmd.addOption("--prefer-jpeg8", "+xy", "prefer default JPEG lossy TS for 8 bit data"); cmd.addOption("--prefer-jpeg12", "+xx", "prefer default JPEG lossy TS for 12 bit data"); cmd.addOption("--prefer-j2k-lossless", "+xv", "prefer JPEG 2000 lossless TS"); cmd.addOption("--prefer-j2k-lossy", "+xw", "prefer JPEG 2000 lossy TS"); cmd.addOption("--prefer-jls-lossless", "+xt", "prefer JPEG-LS lossless TS"); cmd.addOption("--prefer-jls-lossy", "+xu", "prefer JPEG-LS lossy TS"); cmd.addOption("--prefer-mpeg2", "+xm", "prefer MPEG2 Main Profile @ Main Level TS"); cmd.addOption("--prefer-mpeg2-high", "+xh", "prefer MPEG2 Main Profile @ High Level TS"); cmd.addOption("--prefer-mpeg4", "+xn", "prefer MPEG4 AVC/H.264 HP / Level 4.1 TS"); cmd.addOption("--prefer-mpeg4-bd", "+xl", "prefer MPEG4 AVC/H.264 BD-compatible TS"); cmd.addOption("--prefer-rle", "+xr", "prefer RLE lossless TS"); #ifdef WITH_ZLIB cmd.addOption("--prefer-deflated", "+xd", "prefer deflated explicit VR little endian TS"); #endif cmd.addOption("--implicit", "+xi", "accept implicit VR little endian TS only"); cmd.addSubGroup("proposed retrieve transfer syntaxes (outgoing associations):"); cmd.addOption("--propose-uncompr", "-x=", "propose all uncompressed TS, explicit VR\nwith local byte ordering first (default)"); cmd.addOption("--propose-little", "-xe", "propose all uncompressed TS, explicit VR\nlittle endian first"); cmd.addOption("--propose-big", "-xb", "propose all uncompressed TS, explicit VR\nbig endian first"); #ifdef WITH_ZLIB cmd.addOption("--propose-deflated", "-xd", "propose deflated explicit VR little endian TS\nand all uncompressed transfer syntaxes"); #endif cmd.addOption("--propose-implicit", "-xi", "propose implicit VR little endian TS only"); cmd.addSubGroup("other network options:"); cmd.addOption("--timeout", "-to", 1, "[s]econds: integer (default: unlimited)", "timeout for connection requests"); cmd.addOption("--acse-timeout", "-ta", 1, "[s]econds: integer (default: 30)", "timeout for ACSE messages"); cmd.addOption("--dimse-timeout", "-td", 1, "[s]econds: integer (default: unlimited)", "timeout for DIMSE messages"); OFString opt3 = "set max receive pdu to n bytes (default: "; sprintf(tempstr, "%ld", OFstatic_cast(long, ASC_DEFAULTMAXPDU)); opt3 += tempstr; opt3 += ")"; OFString opt4 = "[n]umber of bytes: integer ("; sprintf(tempstr, "%ld", OFstatic_cast(long, ASC_MINIMUMPDUSIZE)); opt4 += tempstr; opt4 += ".."; sprintf(tempstr, "%ld", OFstatic_cast(long, ASC_MAXIMUMPDUSIZE)); opt4 += tempstr; opt4 += ")"; cmd.addOption("--max-pdu", "-pdu", 1, opt4.c_str(), opt3.c_str()); cmd.addOption("--repeat", 1, "[n]umber: integer", "repeat n times"); cmd.addOption("--abort", "abort association instead of releasing it"); cmd.addGroup("output options:"); cmd.addSubGroup("general:"); cmd.addOption("--output-directory", "-od", 1, "[d]irectory: string (default: \".\")", "write received objects to existing directory d"); cmd.addSubGroup("storage mode:"); cmd.addOption("--normal", "-B", "receive in memory, then write to disk (default)"); cmd.addOption("--bit-preserving", "+B", "receive directly to disk"); cmd.addOption("--ignore", "ignore store data, receive but do not store"); /* evaluate command line */ prepareCmdLineArgs(argc, argv, OFFIS_CONSOLE_APPLICATION); if (!app.parseCommandLine(cmd, argc, argv, OFCommandLine::PF_ExpandWildcards)) { exit(1); } /* check exclusive options first */ if (cmd.hasExclusiveOption()) { if (cmd.findOption("--version")) { app.printHeader(OFTrue /*print host identifier*/); COUT << OFendl << "External libraries used:"; #ifdef WITH_ZLIB COUT << OFendl << "- ZLIB, Version " << zlibVersion() << OFendl; #else COUT << " none" << OFendl; #endif return 0; } } /* command line parameters */ cmd.getParam(1, opt_peer); app.checkParam(cmd.getParamAndCheckMinMax(2, opt_port, 1, 65535)); OFLog::configureFromCommandLine(cmd, app); if (cmd.findOption("--verbose-pc")) { app.checkDependence("--verbose-pc", "verbose mode", getscuLogger.isEnabledFor(OFLogger::INFO_LOG_LEVEL)); opt_showPresentationContexts = OFTrue; } if (cmd.findOption("--key", 0, OFCommandLine::FOM_FirstFromLeft)) { const char *ovKey = NULL; do { app.checkValue(cmd.getValue(ovKey)); overrideKeys.push_back(ovKey); } while (cmd.findOption("--key", 0, OFCommandLine::FOM_NextFromLeft)); } cmd.beginOptionBlock(); if (cmd.findOption("--patient")) opt_queryModel = QMPatientRoot; if (cmd.findOption("--study")) opt_queryModel = QMStudyRoot; if (cmd.findOption("--psonly")) opt_queryModel = QMPatientStudyOnly; cmd.endOptionBlock(); if (cmd.findOption("--aetitle")) app.checkValue(cmd.getValue(opt_ourTitle)); if (cmd.findOption("--call")) app.checkValue(cmd.getValue(opt_peerTitle)); cmd.beginOptionBlock(); if (cmd.findOption("--prefer-uncompr")) { opt_store_networkTransferSyntax = EXS_Unknown; } // MODIFICATION: Comment undefined TransferSyntax if (cmd.findOption("--prefer-little")) opt_store_networkTransferSyntax = EXS_LittleEndianExplicit; if (cmd.findOption("--prefer-big")) opt_store_networkTransferSyntax = EXS_BigEndianExplicit; // if (cmd.findOption("--prefer-lossless")) opt_store_networkTransferSyntax = EXS_JPEGProcess14SV1; // if (cmd.findOption("--prefer-jpeg8")) opt_store_networkTransferSyntax = EXS_JPEGProcess1; // if (cmd.findOption("--prefer-jpeg12")) opt_store_networkTransferSyntax = EXS_JPEGProcess2_4; if (cmd.findOption("--prefer-j2k-lossless")) opt_store_networkTransferSyntax = EXS_JPEG2000LosslessOnly; if (cmd.findOption("--prefer-j2k-lossy")) opt_store_networkTransferSyntax = EXS_JPEG2000; if (cmd.findOption("--prefer-jls-lossless")) opt_store_networkTransferSyntax = EXS_JPEGLSLossless; if (cmd.findOption("--prefer-jls-lossy")) opt_store_networkTransferSyntax = EXS_JPEGLSLossy; if (cmd.findOption("--prefer-mpeg2")) opt_store_networkTransferSyntax = EXS_MPEG2MainProfileAtMainLevel; if (cmd.findOption("--prefer-mpeg2-high")) opt_store_networkTransferSyntax = EXS_MPEG2MainProfileAtHighLevel; // if (cmd.findOption("--prefer-mpeg4")) opt_store_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_1; // if (cmd.findOption("--prefer-mpeg4-bd")) opt_store_networkTransferSyntax = EXS_MPEG4BDcompatibleHighProfileLevel4_1; if (cmd.findOption("--prefer-rle")) opt_store_networkTransferSyntax = EXS_RLELossless; // END Modification #ifdef WITH_ZLIB if (cmd.findOption("--prefer-deflated")) opt_store_networkTransferSyntax = EXS_DeflatedLittleEndianExplicit; #endif if (cmd.findOption("--implicit")) opt_store_networkTransferSyntax = EXS_LittleEndianImplicit; cmd.endOptionBlock(); cmd.beginOptionBlock(); if (cmd.findOption("--propose-uncompr")) opt_get_networkTransferSyntax = EXS_Unknown; if (cmd.findOption("--propose-little")) opt_get_networkTransferSyntax = EXS_LittleEndianExplicit; if (cmd.findOption("--propose-big")) opt_get_networkTransferSyntax = EXS_BigEndianExplicit; if (cmd.findOption("--propose-implicit")) opt_get_networkTransferSyntax = EXS_LittleEndianImplicit; #ifdef WITH_ZLIB if (cmd.findOption("--propose-deflated")) opt_get_networkTransferSyntax = EXS_DeflatedLittleEndianExplicit; #endif cmd.endOptionBlock(); if (cmd.findOption("--timeout")) { OFCmdSignedInt opt_timeout = 0; app.checkValue(cmd.getValueAndCheckMin(opt_timeout, 1)); dcmConnectionTimeout.set(OFstatic_cast(Sint32, opt_timeout)); } if (cmd.findOption("--acse-timeout")) { OFCmdSignedInt opt_timeout = 0; app.checkValue(cmd.getValueAndCheckMin(opt_timeout, 1)); opt_acse_timeout = OFstatic_cast(int, opt_timeout); } if (cmd.findOption("--dimse-timeout")) { OFCmdSignedInt opt_timeout = 0; app.checkValue(cmd.getValueAndCheckMin(opt_timeout, 1)); opt_dimse_timeout = OFstatic_cast(int, opt_timeout); opt_blockMode = DIMSE_NONBLOCKING; } if (cmd.findOption("--max-pdu")) app.checkValue(cmd.getValueAndCheckMinMax(opt_maxPDU, ASC_MINIMUMPDUSIZE, ASC_MAXIMUMPDUSIZE)); if (cmd.findOption("--repeat")) app.checkValue(cmd.getValueAndCheckMin(opt_repeatCount, 1)); if (cmd.findOption("--abort")) opt_abortAssociation = OFTrue; if (cmd.findOption("--ignore")) opt_storageMode = DCMSCU_STORAGE_IGNORE; if (cmd.findOption("--output-directory")) { app.checkValue(cmd.getValue(opt_outputDirectory)); app.checkConflict("--output-directory", "--ignore", opt_storageMode == DCMSCU_STORAGE_IGNORE); } cmd.beginOptionBlock(); if (cmd.findOption("--bit-preserving")) { app.checkConflict("--bit-preserving", "--ignore", opt_storageMode == DCMSCU_STORAGE_IGNORE); opt_storageMode = DCMSCU_STORAGE_BIT_PRESERVING; } if (cmd.findOption("--normal")) { app.checkConflict("--normal", "--bit-preserving", opt_storageMode == DCMSCU_STORAGE_BIT_PRESERVING); app.checkConflict("--normal", "--ignore", opt_storageMode == DCMSCU_STORAGE_IGNORE); opt_storageMode = DCMSCU_STORAGE_DISK; } cmd.endOptionBlock(); /* finally parse filenames */ int paramCount = cmd.getParamCount(); const char *currentFilename = NULL; OFString errormsg; for (int i=3; i <= paramCount; i++) { cmd.getParam(i, currentFilename); if (access(currentFilename, R_OK) < 0) { errormsg = "cannot access file: "; errormsg += currentFilename; app.printError(errormsg.c_str()); } fileNameList.push_back(currentFilename); } if (fileNameList.empty() && overrideKeys.empty()) { app.printError("either query file or override keys (or both) must be specified"); } /* print resource identifier */ OFLOG_DEBUG(getscuLogger, rcsid << OFendl); /* make sure data dictionary is loaded */ if (!dcmDataDict.isDictionaryLoaded()) { OFLOG_WARN(getscuLogger, "no data dictionary loaded, check environment variable: " << DCM_DICT_ENVIRONMENT_VARIABLE); } /* make sure output directory exists and is writeable */ if (!OFStandard::dirExists(opt_outputDirectory)) { OFLOG_FATAL(getscuLogger, "specified output directory does not exist"); return 1; } else if (!OFStandard::isWriteable(opt_outputDirectory)) { OFLOG_FATAL(getscuLogger, "specified output directory is not writeable"); return 1; } // Setup SCU OFList syntaxes; prepareTS(opt_get_networkTransferSyntax, syntaxes); DcmSCU scu; scu.setMaxReceivePDULength(opt_maxPDU); scu.setACSETimeout(opt_acse_timeout); scu.setDIMSEBlockingMode(opt_blockMode); scu.setDIMSETimeout(opt_dimse_timeout); scu.setAETitle(opt_ourTitle); scu.setPeerHostName(opt_peer); scu.setPeerPort(OFstatic_cast(Uint16, opt_port)); scu.setPeerAETitle(opt_peerTitle); scu.setVerbosePCMode(opt_showPresentationContexts); // Add presentation contexts for get and find (we do not actually need find...) // (only uncompressed) scu.addPresentationContext(querySyntax[opt_queryModel], syntaxes); // Add storage presentation contexts (long list of storage SOP classes, uncompressed) syntaxes.clear(); prepareTS(opt_store_networkTransferSyntax, syntaxes); for (Uint16 j = 0; j < numberOfDcmLongSCUStorageSOPClassUIDs; j++) { scu.addPresentationContext(dcmLongSCUStorageSOPClassUIDs[j], syntaxes, ASC_SC_ROLE_SCP); } // Set the storage mode scu.setStorageMode(opt_storageMode); if (opt_storageMode != DCMSCU_STORAGE_IGNORE) { scu.setStorageDir(opt_outputDirectory); } // Initialize network and negotiate association OFCondition cond = scu.initNetwork(); if (cond.bad()) { OFLOG_FATAL(getscuLogger, DimseCondition::dump(temp_str, cond)); exit(1); } cond = scu.negotiateAssociation(); if (cond.bad()) { OFLOG_FATAL(getscuLogger, "No Acceptable Presentation Contexts"); exit(1); } cond = EC_Normal; T_ASC_PresentationContextID pcid = scu.findPresentationContextID(querySyntax[opt_queryModel], ""); if (pcid == 0) { OFLOG_FATAL(getscuLogger, "No adequate Presentation Contexts for sending C-GET"); exit(1); } /* Do the real work, i.e. send C-GET requests and receive objects */ for (Uint16 repeat = 0; repeat < opt_repeatCount; repeat++) { Uint16 numRuns = 1; DcmFileFormat dcmff; DcmDataset *dset = dcmff.getDataset(); OFListConstIterator(OFString) it; /* Load first file, if there is one */ if (!fileNameList.empty()) { numRuns = fileNameList.size(); it = fileNameList.begin(); cond = dcmff.loadFile((*it).c_str()); if (cond.bad()) { OFLOG_FATAL(getscuLogger, DimseCondition::dump(temp_str, cond)); exit(1); } dset = dcmff.getDataset(); } OFList responses; /* For all files (or at least one run from override keys) */ for (Uint16 i = 0; i < numRuns; i++) { applyOverrideKeys(dset); cond = scu.sendCGETRequest(pcid, dset, &responses); if (cond.bad()) { exit(1); } /* Load next file if there is one */ if (numRuns > 1) { it++; cond = dcmff.loadFile((*it).c_str()); if (cond.bad()) { OFLOG_FATAL(getscuLogger, DimseCondition::dump(temp_str, cond)); exit(1); } dset = dcmff.getDataset(); } } if (!responses.empty()) { /* Output final status report */ OFLOG_INFO(getscuLogger, "Final status report from last C-GET message:"); (*(--responses.end()))->print(); /* Delete responses */ OFListIterator(RetrieveResponse*) iter = responses.begin(); OFListConstIterator(RetrieveResponse*) last = responses.end(); while (iter != last) { delete (*iter); iter = responses.erase(iter); } } } /* tear down association */ if (cond == EC_Normal) { if (opt_abortAssociation) { OFLOG_INFO(getscuLogger, "Aborting Association"); scu.closeAssociation(DCMSCU_ABORT_ASSOCIATION); exit(0); } else { /* release association */ scu.closeAssociation(DCMSCU_RELEASE_ASSOCIATION); exit(0); } } else if (cond == DUL_PEERREQUESTEDRELEASE) { OFLOG_ERROR(getscuLogger, "Protocol Error: Peer requested release (Aborting)"); scu.closeAssociation(DCMSCU_ABORT_ASSOCIATION); exit(1); } else if (cond == DUL_PEERABORTEDASSOCIATION) { OFLOG_INFO(getscuLogger, "Peer Aborted Association"); } else { OFLOG_ERROR(getscuLogger, "GET SCU Failed: " << DimseCondition::dump(temp_str, cond)); OFLOG_INFO(getscuLogger, "Aborting Association"); scu.closeAssociation(DCMSCU_ABORT_ASSOCIATION); exit(1); } #ifdef HAVE_WINSOCK_H WSACleanup(); #endif return 0; } static void applyOverrideKeys(DcmDataset *dataset) { /* replace specific keys by those in overrideKeys */ OFListConstIterator(OFString) path = overrideKeys.begin(); OFListConstIterator(OFString) endOfList = overrideKeys.end(); DcmPathProcessor proc; proc.setItemWildcardSupport(OFFalse); proc.checkPrivateReservations(OFFalse); OFCondition cond; while (path != endOfList) { cond = proc.applyPathWithValue(dataset, *path); if (cond.bad()) { OFLOG_ERROR(getscuLogger, "Bad override key/path: " << *path << ": " << cond.text()); } path++; } } static void prepareTS(E_TransferSyntax ts, OFList& syntaxes) { /* ** We prefer to use Explicitly encoded transfer syntaxes. ** If we are running on a Little Endian machine we prefer ** LittleEndianExplicitTransferSyntax to BigEndianTransferSyntax. ** Some SCP implementations will just select the first transfer ** syntax they support (this is not part of the standard) so ** organise the proposed transfer syntaxes to take advantage ** of such behaviour. ** ** The presentation contexts proposed here are only used for ** C-FIND and C-MOVE, so there is no need to support compressed ** transmission. */ switch (ts) { case EXS_LittleEndianImplicit: /* we only support Little Endian Implicit */ syntaxes.push_back(UID_LittleEndianExplicitTransferSyntax); break; case EXS_LittleEndianExplicit: /* we prefer Little Endian Explicit */ syntaxes.push_back(UID_LittleEndianExplicitTransferSyntax); syntaxes.push_back(UID_BigEndianExplicitTransferSyntax); syntaxes.push_back(UID_LittleEndianImplicitTransferSyntax); break; case EXS_BigEndianExplicit: /* we prefer Big Endian Explicit */ syntaxes.push_back(UID_BigEndianExplicitTransferSyntax); syntaxes.push_back(UID_LittleEndianExplicitTransferSyntax); syntaxes.push_back(UID_LittleEndianImplicitTransferSyntax); break; #ifdef WITH_ZLIB case EXS_DeflatedLittleEndianExplicit: /* we prefer Deflated Little Endian Explicit */ syntaxes.push_back(UID_DeflatedExplicitVRLittleEndianTransferSyntax); syntaxes.push_back(UID_LittleEndianExplicitTransferSyntax); syntaxes.push_back(UID_BigEndianExplicitTransferSyntax); syntaxes.push_back(UID_LittleEndianImplicitTransferSyntax); break; #endif default: DcmXfer xfer(ts); if (xfer.isEncapsulated()) { syntaxes.push_back(xfer.getXferID()); } /* We prefer explicit transfer syntaxes. * If we are running on a Little Endian machine we prefer * LittleEndianExplicitTransferSyntax to BigEndianTransferSyntax. */ if (gLocalByteOrder == EBO_LittleEndian) /* defined in dcxfer.h */ { syntaxes.push_back(UID_LittleEndianExplicitTransferSyntax); syntaxes.push_back(UID_BigEndianExplicitTransferSyntax); } else { syntaxes.push_back(UID_BigEndianExplicitTransferSyntax); syntaxes.push_back(UID_LittleEndianExplicitTransferSyntax); } syntaxes.push_back(UID_LittleEndianImplicitTransferSyntax); break; } } /* ** CVS Log ** $Log: getscu.cc,v $ ** Revision 1.10 2012-02-10 14:54:38 onken ** Removed duplicate log message when closing an association. ** ** Revision 1.9 2011-12-16 16:36:44 meichel ** Minor changes for MSVC6 compatibility ** ** Revision 1.8 2011-09-26 08:13:53 joergr ** Moved --verbose-pc option to the end of the "general options" section. ** ** Revision 1.7 2011-09-21 12:57:47 joergr ** Removed TCP wrapper support (libwrap) which is not really useful for an SCU. ** ** Revision 1.6 2011-09-21 11:06:28 joergr ** Removed option --disable-host-lookup which is not really useful for an SCU. ** ** Revision 1.5 2011-09-09 08:58:11 joergr ** Replaced local list of supported storage SOP classes by the global variable ** dcmLongSCUStorageSOPClassUIDs, which is maintained at a central location. ** ** Revision 1.4 2011-09-07 12:40:45 joergr ** Made more clear that option --key also supports path expressions. ** ** Revision 1.3 2011-08-25 15:05:04 joergr ** Changed data structure for Q/R responses from OFVector to OFList. Also fixed ** some possible memory leaks and made the FIND/MOVE/GET code more consistent. ** ** Revision 1.2 2011-08-25 12:51:22 joergr ** Added "verbose-pc" mode that shows the presentation contexts in verbose mode. ** ** Revision 1.1 2011-08-25 09:31:32 onken ** Added C-GET functionality to DcmSCU class and accompanying getscu ** commandline application. ** */ odil-0.11.0/tests/tools/scu.cc000066400000000000000000002675601362244656000161530ustar00rootroot00000000000000/* * * Copyright (C) 2008-2012, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by * * OFFIS e.V. * R&D Division Health * Escherweg 2 * D-26121 Oldenburg, Germany * * * Module: dcmnet * * Author: Michael Onken * * Purpose: Base class for Service Class Users (SCUs) * * Last Update: $Author: onken $ * Update Date: $Date: 2012-05-14 10:42:54 $ * CVS/RCS Revision: $Revision: 1.60 $ * Status: $State: Exp $ * * CVS/RCS Log at end of file * */ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ // MODIFICATION: Take the local scu.h #include "scu.h" // END Modification #include "dcmtk/dcmnet/diutil.h" /* for dcmnet logger */ #include "dcmtk/dcmdata/dcuid.h" /* for dcmFindUIDName() */ #include "dcmtk/dcmdata/dcostrmf.h" /* for class DcmOutputFileStream */ #ifdef WITH_ZLIB #include /* for zlibVersion() */ #endif #if OFFIS_DCMTK_VERSION_NUMBER <= 360 // MODIFICATION: Add missing Errors const OFConditionConst NET_EC_InvalidSOPClassUID(OFM_dcmnet, 1000, OF_error, "Invalid SOP Class UID"); const OFConditionConst NET_EC_UnknownStorageSOPClass(OFM_dcmnet, 1001, OF_error, "Unknown Storage SOP Class"); const OFConditionConst NET_EC_InvalidSOPInstanceUID(OFM_dcmnet, 1002, OF_error, "Invalid SOP Instance UID"); const OFConditionConst NET_EC_InvalidTransferSyntaxUID(OFM_dcmnet, 1003, OF_error, "Invalid Transfer Syntax UID"); const OFConditionConst NET_EC_UnknownTransferSyntax(OFM_dcmnet, 1004, OF_error, "Unknown Transfer Syntax"); const OFConditionConst NET_EC_NoPresentationContextsDefined(OFM_dcmnet, 1005, OF_error, "No Presentation Contexts defined"); const OFConditionConst NET_EC_NoAcceptablePresentationContexts(OFM_dcmnet, 1006, OF_error, "No acceptable Presentation Contexts"); const OFConditionConst NET_EC_NoSOPInstancesToSend(OFM_dcmnet, 1007, OF_error, "No SOP instances to send"); const OFConditionConst NET_EC_NoSuchSOPInstance(OFM_dcmnet, 1008, OF_error, "No such SOP instance"); const OFConditionConst NET_EC_InvalidDatasetPointer(OFM_dcmnet, 1009, OF_error, "Invalid dataset pointer"); const OFConditionConst NET_EC_AlreadyConnected(OFM_dcmnet, 1010, OF_error, "Already connected"); const OFConditionConst NET_EC_InsufficientPortPrivileges(OFM_dcmnet, 1023, OF_error, "Insufficient port privileges"); // END Modification #endif DcmSCU::DcmSCU() : m_assoc(NULL), m_net(NULL), m_params(NULL), m_assocConfigFilename(), m_assocConfigProfile(), m_presContexts(), m_assocConfigFile(), m_openDIMSERequest(NULL), m_maxReceivePDULength(ASC_DEFAULTMAXPDU), m_blockMode(DIMSE_BLOCKING), m_ourAETitle("ANY-SCU"), m_peer(), m_peerAETitle("ANY-SCP"), m_peerPort(104), m_dimseTimeout(0), m_acseTimeout(30), m_storageDir(), m_storageMode(DCMSCU_STORAGE_DISK), m_verbosePCMode(OFFalse), m_datasetConversionMode(OFFalse), m_progressNotificationMode(OFTrue) { #ifdef HAVE_GUSI_H GUSISetup(GUSIwithSIOUXSockets); GUSISetup(GUSIwithInternetSockets); #endif #ifdef HAVE_WINSOCK_H WSAData winSockData; /* we need at least version 1.1 */ WORD winSockVersionNeeded = MAKEWORD( 1, 1 ); WSAStartup(winSockVersionNeeded, &winSockData); // TODO: check with multiple SCU instances whether this is harmful #endif } void DcmSCU::freeNetwork() { if ((m_assoc != NULL) || (m_net != NULL) || (m_params != NULL)) DCMNET_DEBUG("Cleaning up internal association and network structures"); /* destroy association parameters, i.e. free memory of T_ASC_Parameters. Usually this is done in ASC_destroyAssociation; however, if we already have association parameters but not yet an association (e.g. after calling initNetwork() and negotiateAssociation()), the latter approach may fail. */ if (m_params) { ASC_destroyAssociationParameters(&m_params); m_params = NULL; // make sure destroyAssocation does not try to free params a second time // (happens in case we have already have an association structure) if (m_assoc) m_assoc->params = NULL; } // destroy the association, i.e. free memory of T_ASC_Association* structure. ASC_destroyAssociation(&m_assoc); // drop the network, i.e. free memory of T_ASC_Network* structure. ASC_dropNetwork(&m_net); // Cleanup old DIMSE request if any delete m_openDIMSERequest; m_openDIMSERequest = NULL; } DcmSCU::~DcmSCU() { // abort association (if any) and destroy dcmnet data structures if (isConnected()) { closeAssociation(DCMSCU_ABORT_ASSOCIATION); // also frees network } else { freeNetwork(); } #ifdef HAVE_WINSOCK_H WSACleanup(); // TODO: check with multiple SCU instances whether this is harmful #endif } OFCondition DcmSCU::initNetwork() { /* Return if SCU is already connected */ if (isConnected()) return NET_EC_AlreadyConnected; /* Be sure internal network structures are clean (delete old) */ freeNetwork(); OFString tempStr; /* initialize network, i.e. create an instance of T_ASC_Network*. */ OFCondition cond = ASC_initializeNetwork(NET_REQUESTOR, 0, m_acseTimeout, &m_net); if (cond.bad()) { DimseCondition::dump(tempStr, cond); DCMNET_ERROR(tempStr); return cond; } /* initialize asscociation parameters, i.e. create an instance of T_ASC_Parameters*. */ cond = ASC_createAssociationParameters(&m_params, m_maxReceivePDULength); if (cond.bad()) { DCMNET_ERROR(DimseCondition::dump(tempStr, cond)); return cond; } /* sets this application's title and the called application's title in the params */ /* structure. The default values are "ANY-SCU" and "ANY-SCP". */ ASC_setAPTitles(m_params, m_ourAETitle.c_str(), m_peerAETitle.c_str(), NULL); /* Figure out the presentation addresses and copy the */ /* corresponding values into the association parameters.*/ DIC_NODENAME localHost; DIC_NODENAME peerHost; gethostname(localHost, sizeof(localHost) - 1); /* Since the underlying dcmnet structures reserve only 64 bytes for peer as well as local host name, we check here for buffer overflow. */ if ((m_peer.length() + 5 /* max 65535 */) + 1 /* for ":" */ > 63) { DCMNET_ERROR("Maximum length of peer host name '" << m_peer << "' is longer than maximum of 57 characters"); return EC_IllegalCall; // TODO: need to find better error code } if (strlen(localHost) + 1 > 63) { DCMNET_ERROR("Maximum length of local host name '" << localHost << "' is longer than maximum of 62 characters"); return EC_IllegalCall; // TODO: need to find better error code } sprintf(peerHost, "%s:%d", m_peer.c_str(), OFstatic_cast(int, m_peerPort)); ASC_setPresentationAddresses(m_params, localHost, peerHost); /* Add presentation contexts */ // First, import from config file, if specified OFCondition result; if (!m_assocConfigFilename.empty()) { DcmAssociationConfiguration assocConfig; result = DcmAssociationConfigurationFile::initialize(assocConfig, m_assocConfigFilename.c_str()); if (result.bad()) { DCMNET_WARN("Unable to parse association configuration file " << m_assocConfigFilename << " (ignored): " << result.text()); return result; } else { /* perform name mangling for config file key */ OFString profileName; const unsigned char *c = OFreinterpret_cast(const unsigned char *, m_assocConfigProfile.c_str()); while (*c) { if (! isspace(*c)) profileName += OFstatic_cast(char, toupper(*c)); ++c; } result = assocConfig.setAssociationParameters(profileName.c_str(), *m_params); if (result.bad()) { DCMNET_WARN("Unable to apply association configuration file " << m_assocConfigFilename <<" (ignored): " << result.text()); return result; } } } // Adapt presentation context ID to existing presentation contexts. // It's important that presentation context IDs are numerated 1,3,5,7...! Uint32 nextFreePresID = 257; Uint32 numContexts = ASC_countPresentationContexts(m_params); if (numContexts <= 127) { // Need Uint16 to avoid overflow in currPresID (unsigned char) nextFreePresID = 2 * numContexts + 1; /* add 1 to point to the next free ID*/ } // Print warning if number of overall presentation contexts exceeds 128 if ((numContexts + m_presContexts.size()) > 128) { DCMNET_WARN("Number of presentation contexts exceeds 128 (" << numContexts + m_presContexts.size() << "). Some contexts will not be negotiated"); } else { DCMNET_TRACE("Configured " << numContexts << " presentation contexts from config file"); if (m_presContexts.size() > 0) DCMNET_TRACE("Adding another " << m_presContexts.size() << " presentation contexts configured for SCU"); } // Add presentation contexts not originating from config file OFListIterator(DcmSCUPresContext) contIt = m_presContexts.begin(); OFListConstIterator(DcmSCUPresContext) endOfContList = m_presContexts.end(); while ((contIt != endOfContList) && (nextFreePresID <= 255)) { const Uint16 numTransferSyntaxes = OFstatic_cast(Uint16, (*contIt).transferSyntaxes.size()); const char** transferSyntaxes = new const char*[numTransferSyntaxes]; // Iterate over transfer syntaxes within one presentation context OFListIterator(OFString) syntaxIt = (*contIt).transferSyntaxes.begin(); OFListIterator(OFString) endOfSyntaxList = (*contIt).transferSyntaxes.end(); Uint16 sNum = 0; // copy all transfer syntaxes to array while (syntaxIt != endOfSyntaxList) { transferSyntaxes[sNum] = (*syntaxIt).c_str(); ++syntaxIt; ++sNum; } // add the presentation context cond = ASC_addPresentationContext(m_params, OFstatic_cast(Uint8, nextFreePresID), (*contIt).abstractSyntaxName.c_str(), transferSyntaxes, numTransferSyntaxes,(*contIt).roleSelect); // if adding was successfull, prepare presentation context ID for next addition delete[] transferSyntaxes; transferSyntaxes = NULL; if (cond.bad()) return cond; contIt++; // goto next free number, only odd presentation context IDs permitted nextFreePresID += 2; } numContexts = ASC_countPresentationContexts(m_params); if (numContexts == 0) { DCMNET_ERROR("Cannot initialize network: No presentation contexts defined"); return NET_EC_NoPresentationContextsDefined; } DCMNET_DEBUG("Configured a total of " << numContexts << " presentation contexts for SCU"); return cond; } OFCondition DcmSCU::negotiateAssociation() { /* Return error if SCU is already connected */ if (isConnected()) return NET_EC_AlreadyConnected; /* dump presentation contexts if required */ OFString tempStr; if (m_verbosePCMode) DCMNET_INFO("Request Parameters:" << OFendl << ASC_dumpParameters(tempStr, m_params, ASC_ASSOC_RQ)); else DCMNET_DEBUG("Request Parameters:" << OFendl << ASC_dumpParameters(tempStr, m_params, ASC_ASSOC_RQ)); /* create association, i.e. try to establish a network connection to another */ /* DICOM application. This call creates an instance of T_ASC_Association*. */ DCMNET_INFO("Requesting Association"); OFCondition cond = ASC_requestAssociation(m_net, m_params, &m_assoc); if (cond.bad()) { if (cond == DUL_ASSOCIATIONREJECTED) { T_ASC_RejectParameters rej; ASC_getRejectParameters(m_params, &rej); DCMNET_DEBUG("Association Rejected:" << OFendl << ASC_printRejectParameters(tempStr, &rej)); return cond; } else { DCMNET_DEBUG("Association Request Failed: " << DimseCondition::dump(tempStr, cond)); return cond; } } /* dump the presentation contexts which have been accepted/refused */ if (m_verbosePCMode) DCMNET_INFO("Association Parameters Negotiated:" << OFendl << ASC_dumpParameters(tempStr, m_params, ASC_ASSOC_AC)); else DCMNET_DEBUG("Association Parameters Negotiated:" << OFendl << ASC_dumpParameters(tempStr, m_params, ASC_ASSOC_AC)); /* count the presentation contexts which have been accepted by the SCP */ /* If there are none, finish the execution */ if (ASC_countAcceptedPresentationContexts(m_params) == 0) { DCMNET_ERROR("No Acceptable Presentation Contexts"); return NET_EC_NoAcceptablePresentationContexts; } /* dump general information concerning the establishment of the network connection if required */ DCMNET_INFO("Association Accepted (Max Send PDV: " << OFstatic_cast(unsigned long, m_assoc->sendPDVLength) << ")"); return EC_Normal; } OFCondition DcmSCU::addPresentationContext(const OFString &abstractSyntax, const OFList &xferSyntaxes, const T_ASC_SC_ROLE role) { DcmSCUPresContext presContext; presContext.abstractSyntaxName = abstractSyntax; OFListConstIterator(OFString) it = xferSyntaxes.begin(); OFListConstIterator(OFString) endOfList = xferSyntaxes.end(); while (it != endOfList) { presContext.transferSyntaxes.push_back(*it); it++; } presContext.roleSelect = role; m_presContexts.push_back(presContext); return EC_Normal; } OFCondition DcmSCU::useSecureConnection(DcmTransportLayer *tlayer) { OFCondition cond = ASC_setTransportLayer(m_net, tlayer, OFFalse /* do not take over ownership */); if (cond.good()) cond = ASC_setTransportLayerType(m_params, OFTrue /* use TLS */); return cond; } void DcmSCU::clearPresentationContexts() { m_presContexts.clear(); m_assocConfigFilename.clear(); m_assocConfigProfile.clear(); } // Returns usable presentation context ID for a given abstract syntax UID and // transfer syntax UID. 0 if none matches. T_ASC_PresentationContextID DcmSCU::findPresentationContextID(const OFString &abstractSyntax, const OFString &transferSyntax) { if (!isConnected()) return 0; DUL_PRESENTATIONCONTEXT *pc; LST_HEAD **l; OFBool found = OFFalse; if (abstractSyntax.empty()) return 0; /* first of all we look for a presentation context * matching both abstract and transfer syntax */ l = &m_assoc->params->DULparams.acceptedPresentationContext; pc = (DUL_PRESENTATIONCONTEXT*) LST_Head(l); (void)LST_Position(l, (LST_NODE*)pc); while (pc && !found) { found = (strcmp(pc->abstractSyntax, abstractSyntax.c_str()) == 0); found &= (pc->result == ASC_P_ACCEPTANCE); if (!transferSyntax.empty()) // ignore transfer syntax if not specified found &= (strcmp(pc->acceptedTransferSyntax, transferSyntax.c_str()) == 0); if (!found) pc = (DUL_PRESENTATIONCONTEXT*) LST_Next(l); } if (found) return pc->presentationContextID; return 0; /* not found */ } // Returns the presentation context ID that best matches the given abstract syntax UID and // transfer syntax UID. T_ASC_PresentationContextID DcmSCU::findAnyPresentationContextID(const OFString &abstractSyntax, const OFString &transferSyntax) { if (m_assoc == NULL) return 0; DUL_PRESENTATIONCONTEXT *pc; LST_HEAD **l; OFBool found = OFFalse; if (abstractSyntax.empty()) return 0; /* first of all we look for a presentation context * matching both abstract and transfer syntax */ l = &m_assoc->params->DULparams.acceptedPresentationContext; pc = (DUL_PRESENTATIONCONTEXT*) LST_Head(l); (void)LST_Position(l, (LST_NODE*)pc); while (pc && !found) { found = (strcmp(pc->abstractSyntax, abstractSyntax.c_str()) == 0); found &= (pc->result == ASC_P_ACCEPTANCE); if (!transferSyntax.empty()) // ignore transfer syntax if not specified found &= (strcmp(pc->acceptedTransferSyntax, transferSyntax.c_str()) == 0); if (!found) pc = (DUL_PRESENTATIONCONTEXT*) LST_Next(l); } if (found) return pc->presentationContextID; /* now we look for an explicit VR uncompressed PC. */ l = &m_assoc->params->DULparams.acceptedPresentationContext; pc = (DUL_PRESENTATIONCONTEXT*) LST_Head(l); (void)LST_Position(l, (LST_NODE*)pc); while (pc && !found) { found = (strcmp(pc->abstractSyntax, abstractSyntax.c_str()) == 0) && (pc->result == ASC_P_ACCEPTANCE) && ((strcmp(pc->acceptedTransferSyntax, UID_LittleEndianExplicitTransferSyntax) == 0) || (strcmp(pc->acceptedTransferSyntax, UID_BigEndianExplicitTransferSyntax) == 0)); if (!found) pc = (DUL_PRESENTATIONCONTEXT*) LST_Next(l); } if (found) return pc->presentationContextID; /* now we look for an implicit VR uncompressed PC. */ l = &m_assoc->params->DULparams.acceptedPresentationContext; pc = (DUL_PRESENTATIONCONTEXT*) LST_Head(l); (void)LST_Position(l, (LST_NODE*)pc); while (pc && !found) { found = (strcmp(pc->abstractSyntax, abstractSyntax.c_str()) == 0) && (pc->result == ASC_P_ACCEPTANCE) && (strcmp(pc->acceptedTransferSyntax, UID_LittleEndianImplicitTransferSyntax) == 0); if (!found) pc = (DUL_PRESENTATIONCONTEXT*) LST_Next(l); } if (found) return pc->presentationContextID; /* finally we accept everything we get. returns 0 if abstract syntax is not supported */ return ASC_findAcceptedPresentationContextID(m_assoc, abstractSyntax.c_str()); } void DcmSCU::findPresentationContext(const T_ASC_PresentationContextID presID, OFString &abstractSyntax, OFString &transferSyntax) { transferSyntax.clear(); abstractSyntax.clear(); if (m_assoc == NULL) return; DUL_PRESENTATIONCONTEXT *pc; LST_HEAD **l; /* we look for a presentation context matching * both abstract and transfer syntax */ l = &m_assoc->params->DULparams.acceptedPresentationContext; pc = (DUL_PRESENTATIONCONTEXT*) LST_Head(l); (void)LST_Position(l, (LST_NODE*)pc); while (pc) { if (presID == pc->presentationContextID) { if (pc->result == ASC_P_ACCEPTANCE) { // found a match transferSyntax = pc->acceptedTransferSyntax; abstractSyntax = pc->abstractSyntax; } break; } pc = (DUL_PRESENTATIONCONTEXT*) LST_Next(l); } } Uint16 DcmSCU::nextMessageID() { if (!isConnected()) return 0; else return m_assoc->nextMsgID++; } void DcmSCU::closeAssociation(const DcmCloseAssociationType closeType) { if (!isConnected()) { DCMNET_WARN("Closing of association request but no association active (ignored)"); return; } OFCondition cond; OFString tempStr; /* tear down association, i.e. terminate network connection to SCP */ switch (closeType) { case DCMSCU_RELEASE_ASSOCIATION: /* release association */ DCMNET_INFO("Releasing Association"); cond = ASC_releaseAssociation(m_assoc); if (cond.bad()) { DCMNET_ERROR("Association Release Failed: " << DimseCondition::dump(tempStr, cond)); return; // TODO: do we really need this? } break; case DCMSCU_ABORT_ASSOCIATION: /* abort association */ DCMNET_INFO("Aborting Association"); cond = ASC_abortAssociation(m_assoc); if (cond.bad()) { DCMNET_ERROR("Association Abort Failed: " << DimseCondition::dump(tempStr, cond)); } break; case DCMSCU_PEER_REQUESTED_RELEASE: /* peer requested release */ DCMNET_ERROR("Protocol Error: Peer requested release (Aborting)"); DCMNET_INFO("Aborting Association"); cond = ASC_abortAssociation(m_assoc); if (cond.bad()) { DCMNET_ERROR("Association Abort Failed: " << DimseCondition::dump(tempStr, cond)); } break; case DCMSCU_PEER_ABORTED_ASSOCIATION: /* peer aborted association */ DCMNET_INFO("Peer Aborted Association"); break; } // destroy and free memory of internal association and network structures freeNetwork(); } /* ************************************************************************* */ /* C-ECHO functionality */ /* ************************************************************************* */ // Sends C-ECHO request to another DICOM application OFCondition DcmSCU::sendECHORequest(const T_ASC_PresentationContextID presID) { if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; OFCondition cond; T_ASC_PresentationContextID pcid = presID; /* If necessary, find appropriate presentation context */ if (pcid == 0) pcid = findPresentationContextID(UID_VerificationSOPClass, UID_LittleEndianExplicitTransferSyntax); if (pcid == 0) pcid = findPresentationContextID(UID_VerificationSOPClass, UID_BigEndianExplicitTransferSyntax); if (pcid == 0) pcid = findPresentationContextID(UID_VerificationSOPClass, UID_LittleEndianImplicitTransferSyntax); if (pcid == 0) { DCMNET_ERROR("No presentation context found for sending C-ECHO with SOP Class / Transfer Syntax: " << dcmFindNameOfUID(UID_VerificationSOPClass, "") << " / " << DcmXfer(UID_LittleEndianImplicitTransferSyntax).getXferName()); return DIMSE_NOVALIDPRESENTATIONCONTEXTID; } /* Now, assemble DIMSE message */ T_DIMSE_Message msg; T_DIMSE_C_EchoRQ* req = &(msg.msg.CEchoRQ); // Set type of message msg.CommandField = DIMSE_C_ECHO_RQ; // Set message ID req->MessageID = nextMessageID(); // Announce no dataset req->DataSetType = DIMSE_DATASET_NULL; // Set affected SOP Class UID (always Verification SOP Class) OFStandard::strlcpy(req->AffectedSOPClassUID, UID_VerificationSOPClass, sizeof(req->AffectedSOPClassUID)); /* Send request */ OFString tempStr; DCMNET_INFO("Sending C-ECHO Request (MsgID " << req->MessageID << ")"); cond = sendDIMSEMessage(pcid, &msg, NULL /*dataObject*/); if (cond.bad()) { DCMNET_ERROR("Failed sending C-ECHO request: " << DimseCondition::dump(tempStr, cond)); return cond; } /* Receive response */ T_DIMSE_Message rsp; DcmDataset* statusDetail = NULL; cond = receiveDIMSECommand(&pcid, &rsp, &statusDetail, NULL /* not interested in the command set */); if (cond.bad()) { DCMNET_ERROR("Failed receiving DIMSE response: " << DimseCondition::dump(tempStr, cond)); return cond; } /* Check whether we received C-ECHO response, otherwise print error */ if (rsp.CommandField == DIMSE_C_ECHO_RSP) { DCMNET_INFO("Received C-ECHO Response (" << rsp.msg.CEchoRSP.DimseStatus << ")"); } else { DCMNET_ERROR("Expected C-ECHO response but received DIMSE command 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(4) << OFstatic_cast(unsigned int, rsp.CommandField)); DCMNET_DEBUG(DIMSE_dumpMessage(tempStr, rsp, DIMSE_INCOMING, NULL, pcid)); delete statusDetail; return DIMSE_BADCOMMANDTYPE; } /* Print status detail if it was received */ if (statusDetail != NULL) { DCMNET_DEBUG("Response has status detail:" << OFendl << DcmObject::PrintHelper(*statusDetail)); delete statusDetail; } return EC_Normal; } /* ************************************************************************* */ /* C-STORE functionality */ /* ************************************************************************* */ // Sends C-STORE request to another DICOM application OFCondition DcmSCU::sendSTORERequest(const T_ASC_PresentationContextID presID, const OFString &dicomFile, DcmDataset *dataset, Uint16 &rspStatusCode) { // Do some basic validity checks if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; OFCondition cond; OFString tempStr; T_ASC_PresentationContextID pcid = presID; DcmDataset* statusDetail = NULL; T_DIMSE_Message msg; T_DIMSE_C_StoreRQ* req = &(msg.msg.CStoreRQ); // Set type of message msg.CommandField = DIMSE_C_STORE_RQ; /* Set message ID */ req->MessageID = nextMessageID(); /* Load file if necessary */ DcmFileFormat *fileformat = NULL; if (!dicomFile.empty()) { fileformat = new DcmFileFormat(); if (fileformat == NULL) return EC_MemoryExhausted; cond = fileformat->loadFile(dicomFile.c_str()); if (cond.bad()) { delete fileformat; return cond; } dataset = fileformat->getDataset(); } /* Fill message according to dataset to be sent */ OFString sopClassUID; OFString sopInstanceUID; E_TransferSyntax xferSyntax = EXS_Unknown; cond = getDatasetInfo(dataset, sopClassUID, sopInstanceUID, xferSyntax); DcmXfer xfer(xferSyntax); /* Check whether the information is sufficient */ if (sopClassUID.empty() || sopInstanceUID.empty() || ((pcid == 0) && (xferSyntax == EXS_Unknown))) { DCMNET_ERROR("Cannot send SOP instance, missing information:"); if (!dicomFile.empty()) DCMNET_ERROR(" DICOM Filename : " << dicomFile); DCMNET_ERROR(" SOP Class UID : " << sopClassUID); DCMNET_ERROR(" SOP Instance UID : " << sopInstanceUID); DCMNET_ERROR(" Transfer Syntax : " << xfer.getXferName()); if (pcid == 0) DCMNET_ERROR(" Pres. Context ID : 0 (find via SOP Class and Transfer Syntax)"); else DCMNET_ERROR(" Pres. Context ID : " << OFstatic_cast(unsigned int, pcid)); delete fileformat; return cond; } OFStandard::strlcpy(req->AffectedSOPClassUID, sopClassUID.c_str(), sizeof(req->AffectedSOPClassUID)); OFStandard::strlcpy(req->AffectedSOPInstanceUID, sopInstanceUID.c_str(), sizeof(req->AffectedSOPInstanceUID)); req->DataSetType = DIMSE_DATASET_PRESENT; req->Priority = DIMSE_PRIORITY_LOW; /* If no presentation context is specified by the caller ... */ if (pcid == 0) { /* ... try to find an appropriate presentation context automatically */ pcid = findPresentationContextID(sopClassUID, xfer.getXferID()); } else if (m_datasetConversionMode) { /* Convert dataset to network transfer syntax (if required) */ OFString abstractSyntax, transferSyntax; findPresentationContext(pcid, abstractSyntax, transferSyntax); /* Check whether given presentation context was accepted by the peer */ if (abstractSyntax.empty() || transferSyntax.empty()) { /* Mark presentation context as invalid */ pcid = 0; } else { if (abstractSyntax != sopClassUID) { DCMNET_WARN("Inappropriate presentation context with ID " << OFstatic_cast(unsigned int, pcid) << ": abstract syntax does not match SOP class UID"); } /* Try to convert to the negotiated transfer syntax */ DcmXfer netXfer = DcmXfer(transferSyntax.c_str()).getXfer(); if (netXfer.getXfer() != xferSyntax) { DCMNET_INFO("Converting transfer syntax: " << xfer.getXferName() << " -> " << netXfer.getXferName()); dataset->chooseRepresentation(netXfer.getXfer(), NULL); } } } /* No appropriate presentation context for sending */ if (pcid == 0) { OFString sopClassName = dcmFindNameOfUID(sopClassUID.c_str(), sopClassUID.c_str()); OFString xferName = xfer.getXferName(); DCMNET_ERROR("No presentation context found for sending C-STORE with SOP Class / Transfer Syntax: " << sopClassName << " / " << xferName); return DIMSE_NOVALIDPRESENTATIONCONTEXTID; } /* Send request */ DCMNET_INFO("Sending C-STORE Request (MsgID " << req->MessageID << ", " << dcmSOPClassUIDToModality(sopClassUID.c_str(), "OT") << ")"); cond = sendDIMSEMessage(pcid, &msg, dataset); delete fileformat; fileformat = NULL; if (cond.bad()) { DCMNET_ERROR("Failed sending C-STORE request: " << DimseCondition::dump(tempStr, cond)); return cond; } /* Receive response */ T_DIMSE_Message rsp; cond = receiveDIMSECommand(&pcid, &rsp, &statusDetail, NULL /* not interested in the command set */); if (cond.bad()) { DCMNET_ERROR("Failed receiving DIMSE response: " << DimseCondition::dump(tempStr, cond)); return cond; } if (rsp.CommandField == DIMSE_C_STORE_RSP) { DCMNET_INFO("Received C-STORE Response (" << DU_cstoreStatusString(rsp.msg.CStoreRSP.DimseStatus) << ")"); } else { DCMNET_ERROR("Expected C-STORE response but received DIMSE command 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(4) << OFstatic_cast(unsigned int, rsp.CommandField)); DCMNET_DEBUG(DIMSE_dumpMessage(tempStr, rsp, DIMSE_INCOMING, NULL, pcid)); delete statusDetail; return DIMSE_BADCOMMANDTYPE; } T_DIMSE_C_StoreRSP storeRsp = rsp.msg.CStoreRSP; rspStatusCode = storeRsp.DimseStatus; if (statusDetail != NULL) { DCMNET_DEBUG("Response has status detail:" << OFendl << DcmObject::PrintHelper(*statusDetail)); delete statusDetail; } return cond; } /* ************************************************************************* */ /* C-MOVE functionality */ /* ************************************************************************* */ // Sends a C-MOVE Request on given presentation context OFCondition DcmSCU::sendMOVERequest(const T_ASC_PresentationContextID presID, const OFString &moveDestinationAETitle, DcmDataset *dataset, OFList *responses) { // Do some basic validity checks if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; if (dataset == NULL) return DIMSE_NULLKEY; /* Prepare DIMSE data structures for issuing request */ OFCondition cond; OFString tempStr; T_ASC_PresentationContextID pcid = presID; T_DIMSE_Message msg; DcmDataset* statusDetail = NULL; T_DIMSE_C_MoveRQ* req = &(msg.msg.CMoveRQ); // Set type of message msg.CommandField = DIMSE_C_MOVE_RQ; // Set message ID req->MessageID = nextMessageID(); // Announce dataset req->DataSetType = DIMSE_DATASET_PRESENT; // Set target for embedded C-Store's OFStandard::strlcpy(req->MoveDestination, moveDestinationAETitle.c_str(), sizeof(req->MoveDestination)); // Set priority (mandatory) req->Priority = DIMSE_PRIORITY_LOW; /* Determine SOP Class from presentation context */ OFString abstractSyntax, transferSyntax; findPresentationContext(pcid, abstractSyntax, transferSyntax); if (abstractSyntax.empty() || transferSyntax.empty()) return DIMSE_NOVALIDPRESENTATIONCONTEXTID; OFStandard::strlcpy(req->AffectedSOPClassUID, abstractSyntax.c_str(), sizeof(req->AffectedSOPClassUID)); /* Send request */ DCMNET_INFO("Sending C-MOVE Request (MsgID " << req->MessageID << ")"); cond = sendDIMSEMessage(pcid, &msg, dataset); if (cond.bad()) { DCMNET_ERROR("Failed sending C-MOVE request: " << DimseCondition::dump(tempStr, cond)); return cond; } /* Receive and handle C-MOVE response messages */ OFBool waitForNextResponse = OFTrue; while (waitForNextResponse) { T_DIMSE_Message rsp; statusDetail = NULL; // Receive command set cond = receiveDIMSECommand(&pcid, &rsp, &statusDetail, NULL /* not interested in the command set */); if (cond.bad()) { DCMNET_ERROR("Failed receiving DIMSE response: " << DimseCondition::dump(tempStr, cond)); delete statusDetail; break; } if (rsp.CommandField == DIMSE_C_MOVE_RSP) { DCMNET_INFO("Received C-MOVE Response (" << DU_cmoveStatusString(rsp.msg.CMoveRSP.DimseStatus) << ")"); } else { DCMNET_ERROR("Expected C-MOVE response but received DIMSE command 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(4) << OFstatic_cast(unsigned int, rsp.CommandField)); DCMNET_DEBUG(DIMSE_dumpMessage(tempStr, rsp, DIMSE_INCOMING, NULL, pcid)); delete statusDetail; cond = DIMSE_BADCOMMANDTYPE; break; } // Prepare response package for response handler RetrieveResponse *moveRSP = new RetrieveResponse(); moveRSP->m_affectedSOPClassUID = rsp.msg.CMoveRSP.AffectedSOPClassUID; moveRSP->m_messageIDRespondedTo = rsp.msg.CMoveRSP.MessageIDBeingRespondedTo; moveRSP->m_status = rsp.msg.CMoveRSP.DimseStatus; moveRSP->m_numberOfRemainingSubops = rsp.msg.CMoveRSP.NumberOfRemainingSubOperations; moveRSP->m_numberOfCompletedSubops = rsp.msg.CMoveRSP.NumberOfCompletedSubOperations; moveRSP->m_numberOfFailedSubops = rsp.msg.CMoveRSP.NumberOfFailedSubOperations; moveRSP->m_numberOfWarningSubops = rsp.msg.CMoveRSP.NumberOfWarningSubOperations; moveRSP->m_statusDetail = statusDetail; //DCMNET_DEBUG("C-MOVE response has status 0x" // << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(4) // << moveRSP->m_status); if (statusDetail != NULL) { DCMNET_DEBUG("Response has status detail:" << OFendl << DcmObject::PrintHelper(*statusDetail)); } // Receive dataset if there is one (status PENDING) DcmDataset *rspDataset = NULL; // Check if dataset is announced correctly if (rsp.msg.CMoveRSP.DataSetType != DIMSE_DATASET_NULL) // Some of the sub operations have failed, thus a dataset with a list of them is attached { // Receive dataset cond = receiveDIMSEDataset(&pcid, &rspDataset); if (cond.bad()) { DCMNET_ERROR("Unable to receive C-MOVE dataset on presentation context " << OFstatic_cast(unsigned int, pcid) << ": " << DimseCondition::dump(tempStr, cond)); delete moveRSP; // includes statusDetail break; } moveRSP->m_dataset = rspDataset; } // Handle C-MOVE response (has to handle all possible status flags) cond = handleMOVEResponse(pcid, moveRSP, waitForNextResponse); if (cond.bad()) { DCMNET_WARN("Unable to handle C-MOVE response correctly: " << cond.text() << " (ignored)"); delete moveRSP; // includes statusDetail // don't return here but trust the "waitForNextResponse" variable } // if response could be handled successfully, add it to response list else { if (responses != NULL) // only add if desired by caller responses->push_back(moveRSP); else delete moveRSP; // includes statusDetail } } /* All responses received or break signal occured */ return cond; } // Standard handler for C-MOVE message responses OFCondition DcmSCU::handleMOVEResponse( const T_ASC_PresentationContextID /* presID */, RetrieveResponse *response, OFBool &waitForNextResponse ) { // Do some basic validity checks if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; if (response == NULL) return DIMSE_NULLKEY; DCMNET_DEBUG("Handling C-MOVE Response"); switch (response->m_status) { case STATUS_MOVE_Failed_IdentifierDoesNotMatchSOPClass: waitForNextResponse = OFFalse; DCMNET_ERROR("Identifier does not match SOP class in C-MOVE response"); break; case STATUS_MOVE_Failed_MoveDestinationUnknown: waitForNextResponse = OFFalse; DCMNET_ERROR("Move destination unknown"); break; case STATUS_MOVE_Failed_UnableToProcess: waitForNextResponse = OFFalse; DCMNET_ERROR("Unable to process C-Move response"); break; case STATUS_MOVE_Cancel_SubOperationsTerminatedDueToCancelIndication: waitForNextResponse = OFFalse; DCMNET_DEBUG("Suboperations canceled by server due to CANCEL indication"); break; case STATUS_MOVE_Warning_SubOperationsCompleteOneOrMoreFailures: waitForNextResponse = OFFalse; DCMNET_WARN("Suboperations of C-MOVE completed with one or more failures"); break; case STATUS_Pending: /* in this case the current C-MOVE-RSP indicates that */ /* there will be some more results */ waitForNextResponse = OFTrue; DCMNET_DEBUG("One or more pending C-MOVE responses"); break; case STATUS_Success: /* in this case, we received the last C-MOVE-RSP so there */ /* will be no other responses we have to wait for. */ waitForNextResponse = OFFalse; DCMNET_DEBUG("Received final C-MOVE response, no more C-MOVE responses expected"); break; default: /* in all other cases, don't expect further responses to come */ waitForNextResponse = OFFalse; DCMNET_WARN("Status is 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(4) << response->m_status << " (unknown)"); DCMNET_WARN("Will not wait for further C-MOVE responses"); break; } //switch return EC_Normal; } /* ************************************************************************* */ /* C-GET and acommpanying C-STORE functionality */ /* ************************************************************************* */ // Sends a C-GET Request on given presentation context OFCondition DcmSCU::sendCGETRequest(const T_ASC_PresentationContextID presID, DcmDataset *dataset, OFList *responses) { // Do some basic validity checks if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; if (dataset == NULL) return DIMSE_NULLKEY; /* Prepare DIMSE data structures for issuing request */ OFCondition cond; OFString tempStr; T_ASC_PresentationContextID pcid = presID; T_DIMSE_Message msg; T_DIMSE_C_GetRQ* req = &(msg.msg.CGetRQ); // Set type of message msg.CommandField = DIMSE_C_GET_RQ; // Set message ID req->MessageID = nextMessageID(); // Announce dataset req->DataSetType = DIMSE_DATASET_PRESENT; // Specify priority req->Priority = DIMSE_PRIORITY_LOW; // Determine SOP Class from presentation context OFString abstractSyntax, transferSyntax; findPresentationContext(pcid, abstractSyntax, transferSyntax); if (abstractSyntax.empty() || transferSyntax.empty()) return DIMSE_NOVALIDPRESENTATIONCONTEXTID; OFStandard::strlcpy(req->AffectedSOPClassUID, abstractSyntax.c_str(), sizeof(req->AffectedSOPClassUID)); /* Send request */ DCMNET_INFO("Sending C-GET Request (MsgID " << req->MessageID << ")"); cond = sendDIMSEMessage(pcid, &msg, dataset); if (cond.bad()) { DCMNET_ERROR("Failed sending C-GET request: " << DimseCondition::dump(tempStr, cond)); return cond; } cond = handleCGETSession(pcid, dataset, responses); return cond; } // Does the logic for switching between C-GET Response and C-STORE Requests OFCondition DcmSCU::handleCGETSession(const T_ASC_PresentationContextID /* presID */, DcmDataset * /* dataset */, OFList *responses) { OFCondition result; OFBool continueSession = OFTrue; OFString tempStr; // As long we want to continue (usually, as long as we receive more objects, // i.e. the final C-GET reponse has not arrived yet) while (continueSession) { T_DIMSE_Message rsp; DcmDataset *statusDetail = NULL; T_ASC_PresentationContextID pcid = 0; // Receive command set result = receiveDIMSECommand(&pcid, &rsp, &statusDetail, NULL /* not interested in the command set */); if (result.bad()) { DCMNET_ERROR("Failed receiving DIMSE command: " << DimseCondition::dump(tempStr, result)); delete statusDetail; break; } // Handle C-GET Response if (rsp.CommandField == DIMSE_C_GET_RSP) { DCMNET_INFO("Received C-GET Response (" << DU_cgetStatusString(rsp.msg.CGetRSP.DimseStatus) << ")"); // Prepare response package for response handler RetrieveResponse *getRSP = new RetrieveResponse(); getRSP->m_affectedSOPClassUID = rsp.msg.CGetRSP.AffectedSOPClassUID; getRSP->m_messageIDRespondedTo = rsp.msg.CGetRSP.MessageIDBeingRespondedTo; getRSP->m_status = rsp.msg.CGetRSP.DimseStatus; getRSP->m_numberOfRemainingSubops = rsp.msg.CGetRSP.NumberOfRemainingSubOperations; getRSP->m_numberOfCompletedSubops = rsp.msg.CGetRSP.NumberOfCompletedSubOperations; getRSP->m_numberOfFailedSubops = rsp.msg.CGetRSP.NumberOfFailedSubOperations; getRSP->m_numberOfWarningSubops = rsp.msg.CGetRSP.NumberOfWarningSubOperations; getRSP->m_statusDetail = statusDetail; if (statusDetail != NULL) { DCMNET_DEBUG("Response has status detail:" << OFendl << DcmObject::PrintHelper(*statusDetail)); statusDetail = NULL; // forget reference to status detail, will be deleted with getRSP } result = handleCGETResponse(pcid, getRSP, continueSession); if (result.bad()) { DCMNET_WARN("Unable to handle C-GET response correctly: " << result.text() << " (ignored)"); delete getRSP; // includes statusDetail // don't return here but trust the "continueSession" variable } // if response could be handled successfully, add it to response list else { if (responses != NULL) // only add if desired by caller responses->push_back(getRSP); else delete getRSP; // includes statusDetail } } // Handle C-STORE Request else if (rsp.CommandField == DIMSE_C_STORE_RQ) { DCMNET_INFO("Received C-STORE Request (MsgID " << rsp.msg.CStoreRQ.MessageID << ")"); // Receive dataset if there is one (status PENDING) DcmDataset *rspDataset = NULL; // Check if dataset is announced correctly if (rsp.msg.CStoreRQ.DataSetType == DIMSE_DATASET_NULL) { DCMNET_WARN("Incoming C-STORE with no dataset, trying to receive one anyway"); } Uint16 desiredCStoreReturnStatus = 0; // handle normal storage mode, i.e. receive in memory and store to disk if (m_storageMode == DCMSCU_STORAGE_DISK) { // Receive dataset result = receiveDIMSEDataset(&pcid, &rspDataset); if (result.bad()) { result = DIMSE_NULLKEY; desiredCStoreReturnStatus = STATUS_STORE_Error_CannotUnderstand; } else { result = handleSTORERequest(pcid, rspDataset, continueSession, desiredCStoreReturnStatus); } } // handle bit preserving storage mode, i.e. receive directly to disk else if (m_storageMode == DCMSCU_STORAGE_BIT_PRESERVING) { OFString storageFilename; OFStandard::combineDirAndFilename(storageFilename, m_storageDir, rsp.msg.CStoreRQ.AffectedSOPInstanceUID, OFTrue); result = handleSTORERequestFile(&pcid, storageFilename, &(rsp.msg.CStoreRQ)); if (result.good()) { notifyInstanceStored(storageFilename, rsp.msg.CStoreRQ.AffectedSOPClassUID, rsp.msg.CStoreRQ.AffectedSOPInstanceUID); } } // handle ignore storage mode, i.e. ignore received dataset and do not store at all else { result = ignoreSTORERequest(pcid, rsp.msg.CStoreRQ); } // Evaluate result from C-STORE request handling and send response if (result.bad()) { desiredCStoreReturnStatus = STATUS_STORE_Error_CannotUnderstand; continueSession = OFFalse; } result = sendSTOREResponse(pcid, desiredCStoreReturnStatus, rsp.msg.CStoreRQ); if (result.bad()) { continueSession = OFFalse; } delete rspDataset; // should be NULL if not existing } // Handle other DIMSE command (error since other command than GET/STORE not expected) else { DCMNET_ERROR("Expected C-GET response or C-STORE request but received DIMSE command 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(4) << OFstatic_cast(unsigned int, rsp.CommandField)); DCMNET_DEBUG(DIMSE_dumpMessage(tempStr, rsp, DIMSE_INCOMING, NULL, pcid)); result = DIMSE_BADCOMMANDTYPE; continueSession = OFFalse; } delete statusDetail; // should be NULL if not existing or added to response list statusDetail = NULL; } /* All responses received or break signal occured */ return result; } // Handles single C-GET Response OFCondition DcmSCU::handleCGETResponse(const T_ASC_PresentationContextID /* presID */, RetrieveResponse* response, OFBool& continueCGETSession) { // Do some basic validity checks if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; if (response == NULL) return DIMSE_NULLKEY; DCMNET_DEBUG("Handling C-GET Response"); /* First, perform separate check for 0xCxxx error codes */ Uint16 highNibble = response->m_status & 0xf000; if (highNibble == STATUS_GET_Failed_UnableToProcess) { continueCGETSession = OFFalse; DCMNET_ERROR("Unable to Process"); DCMNET_WARN("Full status is 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(4) << response->m_status); return EC_Normal; } /* Check for other error codes */ switch (response->m_status) { case STATUS_GET_Refused_OutOfResourcesNumberOfMatches: continueCGETSession = OFFalse; DCMNET_ERROR("Out of Resouces - Unable to calculate number of matches"); break; case STATUS_GET_Refused_OutOfResourcesSubOperations: continueCGETSession = OFFalse; DCMNET_ERROR("Out of Resouces - Unable to perform sub-operations"); break; case STATUS_GET_Failed_IdentifierDoesNotMatchSOPClass: continueCGETSession = OFFalse; DCMNET_ERROR("Identifier does not match SOP class"); break; case STATUS_GET_Cancel_SubOperationsTerminatedDueToCancelIndication: continueCGETSession = OFFalse; DCMNET_DEBUG("Suboperations canceled by server due to CANCEL indication"); break; case STATUS_GET_Warning_SubOperationsCompleteOneOrMoreFailures: continueCGETSession = OFFalse; DCMNET_WARN("Suboperations of C-GET completed with one or more failures"); break; case STATUS_Pending: /* in this case the current C-MOVE-RSP indicates that */ /* there will be some more results */ continueCGETSession = OFTrue; DCMNET_DEBUG("One or more pending C-GET responses"); break; case STATUS_Success: /* in this case, we received the last C-MOVE-RSP so there */ /* will be no other responses we have to wait for. */ continueCGETSession = OFFalse; DCMNET_DEBUG("Received final C-GET response, no more C-GET responses expected"); break; default: /* in all other cases, don't expect further responses to come */ continueCGETSession = OFFalse; DCMNET_WARN("Status is 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(4) << response->m_status << " (unknown)"); DCMNET_WARN("Will not wait for further C-GET responses"); break; } //switch return EC_Normal; } // Handles single C-STORE Request received during C-GET session OFCondition DcmSCU::handleSTORERequest(const T_ASC_PresentationContextID /* presID */, DcmDataset *incomingObject, OFBool& /* continueCGETSession */, Uint16& cStoreReturnStatus) { if (incomingObject == NULL) return DIMSE_NULLKEY; OFString sopClassUID; OFString sopInstanceUID; OFCondition result = incomingObject->findAndGetOFString(DCM_SOPClassUID, sopClassUID); if (result.good()) result = incomingObject->findAndGetOFString(DCM_SOPInstanceUID, sopInstanceUID); if (result.bad()) { DCMNET_ERROR("Cannot store received object: either SOP Instance or SOP Class UID not present"); cStoreReturnStatus = STATUS_STORE_Error_DataSetDoesNotMatchSOPClass; return EC_TagNotFound; } OFString filename = createStorageFilename(incomingObject); result = incomingObject->saveFile(filename.c_str()); if (result.good()) { E_TransferSyntax xferSyntax; getDatasetInfo(incomingObject, sopClassUID, sopInstanceUID, xferSyntax); notifyInstanceStored(filename, sopClassUID, sopInstanceUID); cStoreReturnStatus = STATUS_Success; } else { cStoreReturnStatus = STATUS_STORE_Refused_OutOfResources; } return result; } OFCondition DcmSCU::handleSTORERequestFile(T_ASC_PresentationContextID *presID, const OFString& filename, T_DIMSE_C_StoreRQ* request) { if (filename.empty()) return EC_IllegalParameter; /* in the following, we want to receive data over the network and write it to a file */ /* exactly the way it was received over the network. Hence, a filestream will be created and the data */ /* set will be received and written to the file through the call to DIMSE_receiveDataSetInFile(...).*/ /* create filestream */ DcmOutputFileStream *filestream = NULL; OFCondition cond = DIMSE_createFilestream(filename.c_str(), request, m_assoc, *presID, OFTrue, &filestream); if (cond.good()) { if (m_progressNotificationMode) { cond = DIMSE_receiveDataSetInFile(m_assoc, m_blockMode, m_dimseTimeout, presID, filestream, callbackRECEIVEProgress, this /*callbackData*/); } else { cond = DIMSE_receiveDataSetInFile(m_assoc, m_blockMode, m_dimseTimeout, presID, filestream, NULL /*callback*/, NULL /*callbackData*/); } delete filestream; if (cond != EC_Normal) { unlink(filename.c_str()); } DCMNET_DEBUG("Received dataset on presentation context " << OFstatic_cast(unsigned int, *presID)); } else { OFString tempStr; DCMNET_ERROR("Unable to receive and store dataset on presentation context " << OFstatic_cast(unsigned int, *presID) << ": " << DimseCondition::dump(tempStr, cond)); } return cond; } OFCondition DcmSCU::sendSTOREResponse(T_ASC_PresentationContextID presID, Uint16 status, const T_DIMSE_C_StoreRQ& request) { // Send back response T_DIMSE_Message response; T_DIMSE_C_StoreRSP &storeRsp = response.msg.CStoreRSP; response.CommandField = DIMSE_C_STORE_RSP; storeRsp.MessageIDBeingRespondedTo = request.MessageID; storeRsp.DimseStatus = status; storeRsp.DataSetType = DIMSE_DATASET_NULL; storeRsp.opts = 0; /* Following information is optional and normally not sent by the underlying * dcmnet routines. However, maybe this could be changed later, so insert it. */ OFStandard::strlcpy(storeRsp.AffectedSOPClassUID, request.AffectedSOPClassUID, sizeof(storeRsp.AffectedSOPClassUID)); OFStandard::strlcpy(storeRsp.AffectedSOPInstanceUID, request.AffectedSOPInstanceUID, sizeof(storeRsp.AffectedSOPInstanceUID)); OFString tempStr; DCMNET_INFO("Sending C-STORE Response (" << DU_cstoreStatusString(status) << ")"); OFCondition cond = sendDIMSEMessage(presID, &response, NULL /*dataObject*/); if (cond.bad()) { DCMNET_ERROR("Failed sending C-STORE response: " << DimseCondition::dump(tempStr, cond)); } return cond; } OFString DcmSCU::createStorageFilename(DcmDataset *dataset) { OFString sopClassUID, sopInstanceUID; E_TransferSyntax dummy; getDatasetInfo(dataset, sopClassUID, sopInstanceUID, dummy); // Create unique filename if (sopClassUID.empty() || sopInstanceUID.empty()) return ""; OFString name = dcmSOPClassUIDToModality(sopClassUID.c_str(), "UNKNOWN"); name += "."; name += sopInstanceUID; OFString returnStr; OFStandard::combineDirAndFilename(returnStr, m_storageDir, name, OFTrue); return returnStr; } OFCondition DcmSCU::ignoreSTORERequest(T_ASC_PresentationContextID presID, const T_DIMSE_C_StoreRQ& request) { /* We cannot create the filestream, so ignore the incoming dataset and return an out-of-resources error to the SCU */ DIC_UL bytesRead = 0; DIC_UL pdvCount=0; DCMNET_DEBUG("Ignoring incoming C-STORE dataset on presentation context " << OFstatic_cast(unsigned int, presID) << " with Affected SOP Instance UID: " << request.AffectedSOPInstanceUID ); OFCondition result = DIMSE_ignoreDataSet(m_assoc, m_blockMode, m_dimseTimeout, &bytesRead, &pdvCount); if (result.good()) { DCMNET_TRACE("Successfully skipped " << bytesRead << " bytes in " << pdvCount << " PDVs"); } return result; } void DcmSCU::notifyInstanceStored(const OFString& filename, const OFString& sopClassUID, const OFString& sopInstanceUID) const { DCMNET_DEBUG("Stored instance to disk:"); DCMNET_DEBUG(" Filename: " << filename); DCMNET_DEBUG(" SOP Class UID: " << sopClassUID); DCMNET_DEBUG(" SOP Instance UID: " << sopInstanceUID); } /* ************************************************************************* */ /* C-FIND functionality */ /* ************************************************************************* */ // Sends a C-FIND Request on given presentation context OFCondition DcmSCU::sendFINDRequest(const T_ASC_PresentationContextID presID, DcmDataset *queryKeys, OFList *responses) { // Do some basic validity checks if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; if (queryKeys == NULL) return DIMSE_NULLKEY; /* Prepare DIMSE data structures for issuing request */ OFCondition cond; OFString tempStr; T_ASC_PresentationContextID pcid = presID; T_DIMSE_Message msg; DcmDataset* statusDetail = NULL; T_DIMSE_C_FindRQ* req = &(msg.msg.CFindRQ); // Set type of message msg.CommandField = DIMSE_C_FIND_RQ; // Set message ID req->MessageID = nextMessageID(); // Announce dataset req->DataSetType = DIMSE_DATASET_PRESENT; // Specify priority req->Priority = DIMSE_PRIORITY_LOW; // Determine SOP Class from presentation context OFString abstractSyntax, transferSyntax; findPresentationContext(pcid, abstractSyntax, transferSyntax); if (abstractSyntax.empty() || transferSyntax.empty()) return DIMSE_NOVALIDPRESENTATIONCONTEXTID; OFStandard::strlcpy(req->AffectedSOPClassUID, abstractSyntax.c_str(), sizeof(req->AffectedSOPClassUID)); /* Send request */ DCMNET_INFO("Sending C-FIND Request (MsgID " << req->MessageID << ")"); cond = sendDIMSEMessage(pcid, &msg, queryKeys); if (cond.bad()) { DCMNET_ERROR("Failed sending C-FIND request: " << DimseCondition::dump(tempStr, cond)); return cond; } /* Receive and handle response */ OFBool waitForNextResponse = OFTrue; while (waitForNextResponse) { T_DIMSE_Message rsp; statusDetail = NULL; // Receive command set cond = receiveDIMSECommand(&pcid, &rsp, &statusDetail, NULL /* not interested in the command set */); if (cond.bad()) { DCMNET_ERROR("Failed receiving DIMSE response: " << DimseCondition::dump(tempStr, cond)); return cond; } if (rsp.CommandField == DIMSE_C_FIND_RSP) { DCMNET_INFO("Received C-FIND Response (" << DU_cfindStatusString(rsp.msg.CFindRSP.DimseStatus) << ")"); } else { DCMNET_ERROR("Expected C-FIND response but received DIMSE command 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(4) << OFstatic_cast(unsigned int, rsp.CommandField)); DCMNET_DEBUG(DIMSE_dumpMessage(tempStr, rsp, DIMSE_INCOMING, NULL, pcid)); delete statusDetail; return DIMSE_BADCOMMANDTYPE; } // Prepare response package for response handler QRResponse *findRSP = new QRResponse(); findRSP->m_affectedSOPClassUID = rsp.msg.CFindRSP.AffectedSOPClassUID; findRSP->m_messageIDRespondedTo = rsp.msg.CFindRSP.MessageIDBeingRespondedTo; findRSP->m_status = rsp.msg.CFindRSP.DimseStatus; findRSP->m_statusDetail = statusDetail; // Receive dataset if there is one (status PENDING) DcmDataset *rspDataset = NULL; if (DICOM_PENDING_STATUS(findRSP->m_status)) { // Check if dataset is announced correctly if (rsp.msg.CFindRSP.DataSetType == DIMSE_DATASET_NULL) { DCMNET_ERROR("Received C-FIND response with PENDING status but no dataset announced, aborting"); delete findRSP; // includes statusDetail return DIMSE_BADMESSAGE; } // Receive dataset cond = receiveDIMSEDataset(&pcid, &rspDataset); if (cond.bad()) { delete findRSP; // includes statusDetail return DIMSE_BADDATA; } findRSP->m_dataset = rspDataset; } // Handle C-FIND response (has to handle all possible status flags) cond = handleFINDResponse(pcid, findRSP, waitForNextResponse); if (cond.bad()) { DCMNET_WARN("Unable to handle C-FIND response correctly: " << cond.text() << " (ignored)"); delete findRSP; // includes statusDetail and rspDataset // don't return here but trust the "waitForNextResponse" variable } // if response could be handled successfully, add it to response list else { if (responses != NULL) // only add if desired by caller responses->push_back(findRSP); else delete findRSP; // includes statusDetail and rspDataset } } /* All responses received or break signal occured */ return EC_Normal; } // Standard handler for C-FIND message responses OFCondition DcmSCU::handleFINDResponse(const T_ASC_PresentationContextID /* presID */, QRResponse *response, OFBool &waitForNextResponse) { if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; if (response == NULL) return DIMSE_NULLKEY; DCMNET_DEBUG("Handling C-FIND Response"); switch (response->m_status) { case STATUS_Pending: case STATUS_FIND_Pending_WarningUnsupportedOptionalKeys: /* in this case the current C-FIND-RSP indicates that */ /* there will be some more results */ waitForNextResponse = OFTrue; DCMNET_DEBUG("One or more pending C-FIND responses"); break; case STATUS_Success: /* in this case the current C-FIND-RSP indicates that */ /* there are no more records that match the search mask */ waitForNextResponse = OFFalse; DCMNET_DEBUG("Received final C-FIND response, no more C-FIND responses expected"); break; default: /* in all other cases, don't expect further responses to come */ waitForNextResponse = OFFalse; DCMNET_DEBUG("Status tells not to wait for further C-FIND responses"); break; } //switch return EC_Normal; } /* ************************************************************************* */ /* C-CANCEL functionality */ /* ************************************************************************* */ // Send C-CANCEL-REQ and, therefore, ends current C-FIND, -MOVE or -GET session OFCondition DcmSCU::sendCANCELRequest(const T_ASC_PresentationContextID presID) { if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; /* Prepare DIMSE data structures for issuing request */ OFCondition cond; OFString tempStr; T_ASC_PresentationContextID pcid = presID; T_DIMSE_Message msg; T_DIMSE_C_CancelRQ* req = &(msg.msg.CCancelRQ); // Set type of message msg.CommandField = DIMSE_C_CANCEL_RQ; /* Set message ID responded to. A new message ID is _not_ needed so we do not increment the message ID here but instead have to give the message ID that was used last. Note that that it is required to actually use the message ID of the last C-FIND/GET/MOVE that was issued on this presentation context channel. However, since we only support synchronous association mode so far, it is enough to take the last message ID used at all. For asynchronous operation, we would have to lookup the message ID of the last C-FIND/GET/MOVE request issued and thus, store this information after sending it. */ req->MessageIDBeingRespondedTo = m_assoc->nextMsgID - 1; // Announce dataset req->DataSetType = DIMSE_DATASET_NULL; /* We do not care about the transfer syntax since no dataset is transported at all, i.e. we trust that the user provided the correct presentation context ID (could be private one). */ DCMNET_INFO("Sending C-CANCEL Request (MsgID " << req->MessageIDBeingRespondedTo << ", PresID " << OFstatic_cast(unsigned int, pcid) << ")"); cond = sendDIMSEMessage(pcid, &msg, NULL /*dataObject*/); if (cond.bad()) { DCMNET_ERROR("Failed sending C-CANCEL request: " << DimseCondition::dump(tempStr, cond)); } DCMNET_TRACE("There is no C-CANCEL response in DICOM, so none expected"); return cond; } /* ************************************************************************* */ /* N-ACTION functionality */ /* ************************************************************************* */ // Sends N-ACTION request to another DICOM application OFCondition DcmSCU::sendACTIONRequest(const T_ASC_PresentationContextID presID, const OFString &sopInstanceUID, const Uint16 actionTypeID, DcmDataset *reqDataset, Uint16 &rspStatusCode) { // Do some basic validity checks if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; if (sopInstanceUID.empty() || (reqDataset == NULL)) return DIMSE_NULLKEY; // Prepare DIMSE data structures for issuing request OFCondition cond; OFString tempStr; T_ASC_PresentationContextID pcid = presID; T_DIMSE_Message request; T_DIMSE_N_ActionRQ &actionReq = request.msg.NActionRQ; DcmDataset *statusDetail = NULL; request.CommandField = DIMSE_N_ACTION_RQ; actionReq.MessageID = nextMessageID(); actionReq.DataSetType = DIMSE_DATASET_PRESENT; actionReq.ActionTypeID = actionTypeID; // Determine SOP Class from presentation context OFString abstractSyntax, transferSyntax; findPresentationContext(pcid, abstractSyntax, transferSyntax); if (abstractSyntax.empty() || transferSyntax.empty()) return DIMSE_NOVALIDPRESENTATIONCONTEXTID; OFStandard::strlcpy(actionReq.RequestedSOPClassUID, abstractSyntax.c_str(), sizeof(actionReq.RequestedSOPClassUID)); OFStandard::strlcpy(actionReq.RequestedSOPInstanceUID, sopInstanceUID.c_str(), sizeof(actionReq.RequestedSOPInstanceUID)); // Send request DCMNET_INFO("Sending N-ACTION Request (MsgID " << actionReq.MessageID << ")"); cond = sendDIMSEMessage(pcid, &request, reqDataset); if (cond.bad()) { DCMNET_ERROR("Failed sending N-ACTION request: " << DimseCondition::dump(tempStr, cond)); return cond; } // Receive response T_DIMSE_Message response; cond = receiveDIMSECommand(&pcid, &response, &statusDetail, NULL /* commandSet */); if (cond.bad()) { DCMNET_ERROR("Failed receiving DIMSE response: " << DimseCondition::dump(tempStr, cond)); return cond; } // Check command set if (response.CommandField == DIMSE_N_ACTION_RSP) { DCMNET_INFO("Received N-ACTION Response (" << DU_nactionStatusString(response.msg.NActionRSP.DimseStatus) << ")"); } else { DCMNET_ERROR("Expected N-ACTION response but received DIMSE command 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(4) << OFstatic_cast(unsigned int, response.CommandField)); DCMNET_DEBUG(DIMSE_dumpMessage(tempStr, response, DIMSE_INCOMING, NULL, pcid)); delete statusDetail; return DIMSE_BADCOMMANDTYPE; } if (statusDetail != NULL) { DCMNET_DEBUG("Response has status detail:" << OFendl << DcmObject::PrintHelper(*statusDetail)); delete statusDetail; } // Set return value T_DIMSE_N_ActionRSP &actionRsp = response.msg.NActionRSP; rspStatusCode = actionRsp.DimseStatus; // Check whether there is a dataset to be received if (actionRsp.DataSetType == DIMSE_DATASET_PRESENT) { // this should never happen DcmDataset *tempDataset = NULL; T_ASC_PresentationContextID tempID; DCMNET_WARN("Trying to retrieve unexpected dataset in N-ACTION response"); cond = receiveDIMSEDataset(&tempID, &tempDataset); if (cond.good()) { DCMNET_WARN("Received unexpected dataset after N-ACTION response, ignoring"); delete tempDataset; } else { return DIMSE_BADDATA; } } if (actionRsp.MessageIDBeingRespondedTo != actionReq.MessageID) { // since we only support synchronous communication, the message ID in the response // should be identical to the one in the request DCMNET_ERROR("Received response with wrong message ID (" << actionRsp.MessageIDBeingRespondedTo << " instead of " << actionReq.MessageID << ")"); return DIMSE_BADMESSAGE; } return cond; } /* ************************************************************************* */ /* N-EVENT REPORT functionality */ /* ************************************************************************* */ // Sends N-EVENT-REPORT request and receives N-EVENT-REPORT response OFCondition DcmSCU::sendEVENTREPORTRequest(const T_ASC_PresentationContextID presID, const OFString &sopInstanceUID, const Uint16 eventTypeID, DcmDataset *reqDataset, Uint16 &rspStatusCode) { // Do some basic validity checks if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; if (sopInstanceUID.empty() || (reqDataset == NULL)) return DIMSE_NULLKEY; // Prepare DIMSE data structures for issuing request OFCondition cond; OFString tempStr; T_ASC_PresentationContextID pcid = presID; T_DIMSE_Message request; T_DIMSE_N_EventReportRQ &eventReportReq = request.msg.NEventReportRQ; DcmDataset *statusDetail = NULL; request.CommandField = DIMSE_N_EVENT_REPORT_RQ; // Generate a new message ID eventReportReq.MessageID = nextMessageID(); eventReportReq.DataSetType = DIMSE_DATASET_PRESENT; eventReportReq.EventTypeID = eventTypeID; // Determine SOP Class from presentation context OFString abstractSyntax, transferSyntax; findPresentationContext(pcid, abstractSyntax, transferSyntax); if (abstractSyntax.empty() || transferSyntax.empty()) return DIMSE_NOVALIDPRESENTATIONCONTEXTID; OFStandard::strlcpy(eventReportReq.AffectedSOPClassUID, abstractSyntax.c_str(), sizeof(eventReportReq.AffectedSOPClassUID)); OFStandard::strlcpy(eventReportReq.AffectedSOPInstanceUID, sopInstanceUID.c_str(), sizeof(eventReportReq.AffectedSOPInstanceUID)); // Send request DCMNET_INFO("Sending N-EVENT-REPORT Request (MsgID " << eventReportReq.MessageID << ")"); cond = sendDIMSEMessage(pcid, &request, reqDataset); if (cond.bad()) { DCMNET_ERROR("Failed sending N-EVENT-REPORT request: " << DimseCondition::dump(tempStr, cond)); return cond; } // Receive response T_DIMSE_Message response; cond = receiveDIMSECommand(&pcid, &response, &statusDetail, NULL /* commandSet */); if (cond.bad()) { DCMNET_ERROR("Failed receiving DIMSE response: " << DimseCondition::dump(tempStr, cond)); return cond; } // Check command set if (response.CommandField == DIMSE_N_EVENT_REPORT_RSP) { DCMNET_INFO("Received N-EVENT-REPORT Response (" << DU_neventReportStatusString(response.msg.NEventReportRSP.DimseStatus) << ")"); } else { DCMNET_ERROR("Expected N-EVENT-REPORT response but received DIMSE command 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(4) << OFstatic_cast(unsigned int, response.CommandField)); DCMNET_DEBUG(DIMSE_dumpMessage(tempStr, response, DIMSE_INCOMING, NULL, pcid)); delete statusDetail; return DIMSE_BADCOMMANDTYPE; } if (statusDetail != NULL) { DCMNET_DEBUG("Response has status detail:" << OFendl << DcmObject::PrintHelper(*statusDetail)); delete statusDetail; } // Set return value T_DIMSE_N_EventReportRSP &eventReportRsp = response.msg.NEventReportRSP; rspStatusCode = eventReportRsp.DimseStatus; // Check whether there is a dataset to be received if (eventReportRsp.DataSetType == DIMSE_DATASET_PRESENT) { // this should never happen DcmDataset *tempDataset = NULL; T_ASC_PresentationContextID tempID; cond = receiveDIMSEDataset(&tempID, &tempDataset); if (cond.good()) { DCMNET_WARN("Received unexpected dataset after N-EVENT-REPORT response, ignoring"); delete tempDataset; } else { DCMNET_ERROR("Failed receiving unexpected dataset after N-EVENT-REPORT response: " << DimseCondition::dump(tempStr, cond)); return DIMSE_BADDATA; } } // Check whether the message ID being responded to is equal to the message ID of the request if (eventReportRsp.MessageIDBeingRespondedTo != eventReportReq.MessageID) { DCMNET_ERROR("Received response with wrong message ID (" << eventReportRsp.MessageIDBeingRespondedTo << " instead of " << eventReportReq.MessageID << ")"); return DIMSE_BADMESSAGE; } return cond; } // Receives N-EVENT-REPORT request OFCondition DcmSCU::handleEVENTREPORTRequest(DcmDataset *&reqDataset, Uint16 &eventTypeID, const int timeout) { // Do some basic validity checks if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; OFCondition cond; OFString tempStr; T_ASC_PresentationContextID presID; T_ASC_PresentationContextID presIDdset; T_DIMSE_Message request; T_DIMSE_N_EventReportRQ &eventReportReq = request.msg.NEventReportRQ; DcmDataset *dataset = NULL; DcmDataset *statusDetail = NULL; Uint16 statusCode = 0; if (timeout > 0) DCMNET_DEBUG("Handle N-EVENT-REPORT request, waiting up to " << timeout << " seconds (only for N-EVENT-REPORT message)"); else if ((m_dimseTimeout > 0) && (m_blockMode == DIMSE_NONBLOCKING)) DCMNET_DEBUG("Handle N-EVENT-REPORT request, waiting up to " << m_dimseTimeout << " seconds (default for all DIMSE messages)"); else DCMNET_DEBUG("Handle N-EVENT-REPORT request, waiting an unlimited period of time"); // Receive request, use specific timeout (if defined) cond = receiveDIMSECommand(&presID, &request, &statusDetail, NULL /* commandSet */, timeout); if (cond.bad()) { if (cond != DIMSE_NODATAAVAILABLE) DCMNET_ERROR("Failed receiving DIMSE request: " << DimseCondition::dump(tempStr, cond)); return cond; } // Check command set if (request.CommandField == DIMSE_N_EVENT_REPORT_RQ) { DCMNET_INFO("Received N-EVENT-REPORT Request (MsgID " << eventReportReq.MessageID << ")"); } else { DCMNET_DEBUG(DIMSE_dumpMessage(tempStr, request, DIMSE_INCOMING, NULL, presID)); DCMNET_ERROR("Expected N-EVENT-REPORT request but received DIMSE command 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(4) << OFstatic_cast(unsigned int, request.CommandField)); delete statusDetail; return DIMSE_BADCOMMANDTYPE; } if (statusDetail != NULL) { DCMNET_DEBUG("Request has status detail:" << OFendl << DcmObject::PrintHelper(*statusDetail)); delete statusDetail; } // Check if dataset is announced correctly if (eventReportReq.DataSetType == DIMSE_DATASET_NULL) { DCMNET_DEBUG(DIMSE_dumpMessage(tempStr, request, DIMSE_INCOMING, NULL, presID)); DCMNET_ERROR("Received N-EVENT-REPORT request but no dataset announced, aborting"); return DIMSE_BADMESSAGE; } // Receive dataset cond = receiveDIMSEDataset(&presIDdset, &dataset); if (cond.bad()) { DCMNET_DEBUG(DIMSE_dumpMessage(tempStr, request, DIMSE_INCOMING, NULL, presID)); return DIMSE_BADDATA; } // Output dataset only if trace level is enabled DCMNET_DEBUG(DIMSE_dumpMessage(tempStr, request, DIMSE_INCOMING, NULL, presID)); // Compare presentation context ID of command and data set if (presIDdset != presID) { DCMNET_ERROR("Presentation Context ID of command (" << OFstatic_cast(unsigned int, presID) << ") and data set (" << OFstatic_cast(unsigned int, presIDdset) << ") differ"); delete dataset; return makeDcmnetCondition(DIMSEC_INVALIDPRESENTATIONCONTEXTID, OF_error, "DIMSE: Presentation Contexts of Command and Data Set differ"); } // Check the request dataset and return the DIMSE status code to be used statusCode = checkEVENTREPORTRequest(eventReportReq, dataset); // Send back response T_DIMSE_Message response; T_DIMSE_N_EventReportRSP &eventReportRsp = response.msg.NEventReportRSP; response.CommandField = DIMSE_N_EVENT_REPORT_RSP; eventReportRsp.MessageIDBeingRespondedTo = eventReportReq.MessageID; eventReportRsp.DimseStatus = statusCode; eventReportRsp.DataSetType = DIMSE_DATASET_NULL; eventReportRsp.opts = 0; eventReportRsp.AffectedSOPClassUID[0] = 0; eventReportRsp.AffectedSOPInstanceUID[0] = 0; DCMNET_INFO("Sending N-EVENT-REPORT Response (" << DU_neventReportStatusString(statusCode) << ")"); cond = sendDIMSEMessage(presID, &response, NULL /*dataObject*/); if (cond.bad()) { DCMNET_ERROR("Failed sending N-EVENT-REPORT response: " << DimseCondition::dump(tempStr, cond)); delete dataset; return cond; } // Set return values reqDataset = dataset; eventTypeID = eventReportReq.EventTypeID; return cond; } Uint16 DcmSCU::checkEVENTREPORTRequest(T_DIMSE_N_EventReportRQ & /*eventReportReq*/, DcmDataset * /*reqDataset*/) { // we default to success return STATUS_Success; } /* ************************************************************************* */ /* General message handling */ /* ************************************************************************* */ void DcmSCU::notifySENDProgress(const unsigned long byteCount) { DCMNET_TRACE("Bytes sent: " << byteCount); } void DcmSCU::notifyRECEIVEProgress(const unsigned long byteCount) { DCMNET_TRACE("Bytes received: " << byteCount); } /* ************************************************************************* */ /* Various helpers */ /* ************************************************************************* */ // Sends a DIMSE command and possibly also instance data to the configured peer DICOM application OFCondition DcmSCU::sendDIMSEMessage(const T_ASC_PresentationContextID presID, T_DIMSE_Message *msg, DcmDataset *dataObject, DcmDataset **commandSet) { if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; if (msg == NULL) return DIMSE_NULLKEY; OFCondition cond; /* call the corresponding DIMSE function to send the message */ if (m_progressNotificationMode) { cond = DIMSE_sendMessageUsingMemoryData(m_assoc, presID, msg, NULL /*statusDetail*/, dataObject, callbackSENDProgress, this /*callbackData*/, commandSet); } else { cond = DIMSE_sendMessageUsingMemoryData(m_assoc, presID, msg, NULL /*statusDetail*/, dataObject, NULL /*callback*/, NULL /*callbackData*/, commandSet); } #if 0 // currently disabled because it is not (yet) needed if (cond.good()) { /* create a copy of the current DIMSE command message */ delete m_openDIMSERequest; m_openDIMSERequest = new T_DIMSE_Message; memcpy((char*)m_openDIMSERequest, msg, sizeof(*m_openDIMSERequest)); } #endif return cond; } // Receive DIMSE command (excluding dataset!) over the currently open association OFCondition DcmSCU::receiveDIMSECommand(T_ASC_PresentationContextID *presID, T_DIMSE_Message *msg, DcmDataset **statusDetail, DcmDataset **commandSet, const Uint32 timeout) { if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; OFCondition cond; if (timeout > 0) { /* call the corresponding DIMSE function to receive the command (use specified timeout)*/ cond = DIMSE_receiveCommand(m_assoc, DIMSE_NONBLOCKING, timeout, presID, msg, statusDetail, commandSet); } else { /* call the corresponding DIMSE function to receive the command (use default timeout) */ cond = DIMSE_receiveCommand(m_assoc, m_blockMode, m_dimseTimeout, presID, msg, statusDetail, commandSet); } return cond; } // Receives one dataset (of instance data) via network from another DICOM application OFCondition DcmSCU::receiveDIMSEDataset(T_ASC_PresentationContextID *presID, DcmDataset **dataObject) { if (!isConnected()) return DIMSE_ILLEGALASSOCIATION; OFCondition cond; /* call the corresponding DIMSE function to receive the dataset */ if (m_progressNotificationMode) { cond = DIMSE_receiveDataSetInMemory(m_assoc, m_blockMode, m_dimseTimeout, presID, dataObject, callbackRECEIVEProgress, this /*callbackData*/); } else { cond = DIMSE_receiveDataSetInMemory(m_assoc, m_blockMode, m_dimseTimeout, presID, dataObject, NULL /*callback*/, NULL /*callbackData*/); } if (cond.good()) { DCMNET_DEBUG("Received dataset on presentation context " << OFstatic_cast(unsigned int, *presID)); } else { OFString tempStr; DCMNET_ERROR("Unable to receive dataset on presentation context " << OFstatic_cast(unsigned int, *presID) << ": " << DimseCondition::dump(tempStr, cond)); } return cond; } void DcmSCU::setMaxReceivePDULength(const unsigned long maxRecPDU) { m_maxReceivePDULength = maxRecPDU; } void DcmSCU::setDIMSEBlockingMode(const T_DIMSE_BlockingMode blockingMode) { m_blockMode = blockingMode; } void DcmSCU::setAETitle(const OFString &myAETtitle) { m_ourAETitle = myAETtitle; } void DcmSCU::setPeerHostName(const OFString &peerHostName) { m_peer = peerHostName; } void DcmSCU::setPeerAETitle(const OFString &peerAETitle) { m_peerAETitle = peerAETitle; } void DcmSCU::setPeerPort(const Uint16 peerPort) { m_peerPort = peerPort; } void DcmSCU::setDIMSETimeout(const Uint32 dimseTimeout) { m_dimseTimeout = dimseTimeout; } void DcmSCU::setACSETimeout(const Uint32 acseTimeout) { m_acseTimeout = acseTimeout; } void DcmSCU::setAssocConfigFileAndProfile(const OFString &filename, const OFString &profile) { m_assocConfigFilename = filename; m_assocConfigProfile = profile; } void DcmSCU::setStorageDir(const OFString& storeDir) { m_storageDir = storeDir; } void DcmSCU::setStorageMode(const DcmStorageMode storageMode) { m_storageMode = storageMode; } void DcmSCU::setVerbosePCMode(const OFBool mode) { m_verbosePCMode = mode; } void DcmSCU::setDatasetConversionMode(const OFBool mode) { m_datasetConversionMode = mode; } void DcmSCU::setProgressNotificationMode(const OFBool mode) { m_progressNotificationMode = mode; } /* Get methods */ OFBool DcmSCU::isConnected() const { return (m_assoc != NULL) && (m_assoc->DULassociation != NULL); } Uint32 DcmSCU::getMaxReceivePDULength() const { return m_maxReceivePDULength; } OFBool DcmSCU::getTLSEnabled() const { return OFFalse; } T_DIMSE_BlockingMode DcmSCU::getDIMSEBlockingMode() const { return m_blockMode; } const OFString &DcmSCU::getAETitle() const { return m_ourAETitle; } const OFString &DcmSCU::getPeerHostName() const { return m_peer; } const OFString &DcmSCU::getPeerAETitle() const { return m_peerAETitle; } Uint16 DcmSCU::getPeerPort() const { return m_peerPort; } Uint32 DcmSCU::getDIMSETimeout() const { return m_dimseTimeout; } Uint32 DcmSCU::getACSETimeout() const { return m_acseTimeout; } OFString DcmSCU::getStorageDir() const { return m_storageDir; } DcmStorageMode DcmSCU::getStorageMode() const { return m_storageMode; } OFBool DcmSCU::getVerbosePCMode() const { return m_verbosePCMode; } OFBool DcmSCU::getDatasetConversionMode() const { return m_datasetConversionMode; } OFBool DcmSCU::getProgressNotificationMode() const { return m_progressNotificationMode; } OFCondition DcmSCU::getDatasetInfo(DcmDataset *dataset, OFString &sopClassUID, OFString &sopInstanceUID, E_TransferSyntax &transferSyntax) { OFCondition status = EC_IllegalParameter; sopClassUID.clear(); sopInstanceUID.clear(); transferSyntax = EXS_Unknown; if (dataset != NULL) { // ignore returned condition codes (e.g. EC_TagNotFound) dataset->findAndGetOFString(DCM_SOPClassUID, sopClassUID); dataset->findAndGetOFString(DCM_SOPInstanceUID, sopInstanceUID); transferSyntax = dataset->getOriginalXfer(); // check return values for validity if (sopClassUID.empty()) status = NET_EC_InvalidSOPClassUID; else if (sopInstanceUID.empty()) status = NET_EC_InvalidSOPInstanceUID; else if (transferSyntax == EXS_Unknown) status = NET_EC_UnknownTransferSyntax; else status = EC_Normal; } return status; } /* ************************************************************************* */ /* Callback functions */ /* ************************************************************************* */ void DcmSCU::callbackSENDProgress(void *callbackContext, const unsigned long byteCount) { if (callbackContext != NULL) OFreinterpret_cast(DcmSCU *, callbackContext)->notifySENDProgress(byteCount); } void DcmSCU::callbackRECEIVEProgress(void *callbackContext, const unsigned long byteCount) { if (callbackContext != NULL) OFreinterpret_cast(DcmSCU *, callbackContext)->notifyRECEIVEProgress(byteCount); } /* ************************************************************************* */ /* class RetrieveResponse */ /* ************************************************************************* */ void RetrieveResponse::print() { DCMNET_INFO(" Number of Remaining Suboperations : " << m_numberOfRemainingSubops); DCMNET_INFO(" Number of Completed Suboperations : " << m_numberOfCompletedSubops); DCMNET_INFO(" Number of Failed Suboperations : " << m_numberOfFailedSubops); DCMNET_INFO(" Number of Warning Suboperations : " << m_numberOfWarningSubops); } /* ** CVS Log ** $Log: scu.cc,v $ ** Revision 1.60 2012-05-14 10:42:54 onken ** Enhanced handling of error codes for C-GET (added explicit support for ** missing code Ax702 and enhanced recognition of customized 0xCxxx codes.) ** ** Revision 1.59 2012-02-21 08:48:54 joergr ** Added support for progress notifications while sending and receiving DICOM ** datasets. ** ** Revision 1.58 2011-10-10 14:01:29 uli ** Moved SCU-specific error condition to the correct place. ** ** Revision 1.57 2011-10-04 08:58:16 joergr ** Added flag that allows for specifying whether to convert a dataset to be ** transferred to the network transfer syntax. Also removed unused parameters ** "rspCommandSet" and "rspStatusDetail" from method sendSTORERequest(). ** ** Revision 1.56 2011-09-29 17:12:03 joergr ** Fixed memory leak in sendSTORERequest(), a DICOM dataset was not deleted. ** ** Revision 1.55 2011-09-29 13:12:01 joergr ** Introduced new network-related error codes, e.g. in case that none of the ** proposed presentation contexts were accepted by the association acceptor. ** ** Revision 1.54 2011-09-29 13:04:09 joergr ** Added check whether the presentation context specified by the caller of the ** method was really accepted before sending a C-STORE request. ** ** Revision 1.53 2011-09-29 12:56:21 joergr ** Enhanced implementation of the function that retrieves the abstract syntax ** and transfer syntax of a particular presentation context (using the ID). ** ** Revision 1.52 2011-09-29 09:04:26 joergr ** Output message ID of request and DIMSE status of response messages to the ** INFO logger (if DEBUG level is not enabled). All tools and classes in the ** "dcmnet" module now use (more or less) the same output in verbose mode. ** ** Revision 1.51 2011-09-28 16:28:18 joergr ** Added general support for transfer syntax conversions to sendSTORERequest(). ** ** Revision 1.50 2011-09-28 15:25:36 joergr ** Return a more appropriate error code in case the dataset to be sent is ** invalid. This also required to introduce a return value for getDatasetInfo(). ** ** Revision 1.49 2011-09-28 14:37:01 joergr ** Output the DIMSE status in verbose mode (if debug mode is not enabled). ** ** Revision 1.48 2011-09-28 13:31:54 joergr ** Added method that allows for clearing the list of presentation contexts. ** ** Revision 1.47 2011-09-23 15:27:02 joergr ** Removed needless deletion of the "statusDetail" variable. ** ** Revision 1.46 2011-09-16 09:38:40 joergr ** Fixed some typos and other small inconsistencies. ** ** Revision 1.45 2011-09-06 16:12:53 ogazzar ** Fixed typos in a log commit message. ** ** Revision 1.44 2011-09-06 14:15:10 ogazzar ** Fixed wrong logger name which caused compiler error. ** ** Revision 1.43 2011-09-06 12:58:35 ogazzar ** Added a function to send N-EVENT-REPORT request and to receive a response. ** ** Revision 1.42 2011-08-25 15:46:20 joergr ** Further cleanup of minor inconsistencies regarding documentation, parameter ** names, log output and handling of status details information. ** ** Revision 1.41 2011-08-25 15:05:09 joergr ** Changed data structure for Q/R responses from OFVector to OFList. Also fixed ** some possible memory leaks and made the FIND/MOVE/GET code more consistent. ** ** Revision 1.40 2011-08-25 13:49:31 joergr ** Fixed minor issues in the documentation, parameter and method names. Output ** retrieve responses to main dcmnet logger instead of response logger. ** ** Revision 1.39 2011-08-25 09:31:35 onken ** Added C-GET functionality to DcmSCU class and accompanying getscu ** commandline application. ** ** Revision 1.38 2011-08-24 11:50:48 joergr ** Uncommented name of unused method parameter that caused a compiler warning. ** ** Revision 1.37 2011-07-06 11:08:48 uli ** Fixed various compiler warnings. ** ** Revision 1.36 2011-06-29 16:33:45 joergr ** Fixed various issues that are reported when compiled with "gcc -Weffc++". ** ** Revision 1.35 2011-06-01 15:04:29 onken ** Removed unused status variable from C-ECHO code. ** ** Revision 1.34 2011-05-30 20:10:44 onken ** Added dump of query/move keys in debug mode when sending C-FIND or C-MOVE. ** ** Revision 1.33 2011-05-27 10:12:18 joergr ** Fixed typos and source code formatting. ** ** Revision 1.32 2011-05-25 09:56:52 ogazzar ** Renamed a function name. ** ** Revision 1.31 2011-05-25 09:31:53 ogazzar ** Added a function to look for a presentation context ID that best matches the ** abstract syntax UID and the transfer syntax UID. ** ** Revision 1.30 2011-05-24 08:38:39 ogazzar ** Added role selection negotiation while adding a presenation context. ** ** Revision 1.29 2011-05-19 17:19:52 onken ** Fixed some documentation. Added some extra checks for NULL when handling MOVE ** and FIND responses. Simplified destructors for FIND and MOVEResponses. ** ** Revision 1.28 2011-05-19 10:51:20 onken ** Simplified C string copy by using OFStandard::strlcpy and removed debugging ** code introduced with last comit. ** ** Revision 1.27 2011-05-19 10:37:44 onken ** Removed unused variable that caused compiler warning. Fixed typo. ** ** Revision 1.26 2011-05-19 09:57:24 onken ** Fixed message ID field in C-CANCEL request (should be the one of last ** request). In case of error status codes in C-MOVE responses, the default ** behaviour is now to not wait for further responses. Fixed log output level ** to better fit the messages while receiveing C-MOVE responses. Minor ** code and comment cleanups. Renamed function parameter in sendMOVEREquest ** to better reflect the standard. ** ** Revision 1.25 2011-05-19 08:08:30 onken ** Fixed wrong usage of strlcpy in new C-CANCEL function. ** ** Revision 1.24 2011-05-17 14:26:19 onken ** Implemented C-CANCEL message. Fixed some minor formatting issues. ** Changed C-ECHO implementation to rely on sendDIMSEMesage as the other ** DIMSE functions do. Changed some public function arguments to const to be ** more correct. Fixed CVS log at the end of the scu.cc file. ** ** Revision 1.23 2011-04-28 17:50:05 onken ** Re-sorted header list to make scu.h come first (after osconfig.h). ** Protected public networking functions for creating an association ** from being called twice. Enhanced protection of DIMSE messaging ** functions from being called without being connected. Introduced ** status detail into C-FIND responses (and C-MOVE responses). Was ** not accessible to the caller before. Minor code cleanups. Added ** C-MOVE code for retrieving DICOM objects. So far only retrieving ** on a separate connection is supported. Added function for cleaning ** up internal memory from destructor. This function also fixes a ** memory leak in case users call initNetwork more than one time. ** Added error code returned by functions if SCU is already connected. ** ** Revision 1.22 2011-04-18 07:01:03 uli ** Use global variables for the logger objects. This removes the thread-unsafe ** static local variables which were used before. ** ** Revision 1.21 2011-04-05 11:16:13 joergr ** Output DIMSE status code in hexadecimal format to the logger. Removed unused ** code (local half-implemented function). Added more comments. ** ** Revision 1.20 2011-03-09 11:13:28 onken ** Enhanced error message for missing data in store request. ** ** Revision 1.19 2011-02-23 08:11:51 joergr ** Fixed issue with undefined priority field in C-STORE and C-FIND request. ** ** Revision 1.18 2011-02-16 08:55:17 joergr ** Fixed issue in sendSTORERequest() when sending a dataset that was created ** in memory (and which has, therefore, an original transfer of EXS_Unknown). ** ** Revision 1.17 2011-02-04 12:57:40 uli ** Made sure all members are initialized in the constructor (-Weffc++). ** ** Revision 1.16 2010-12-21 09:37:36 onken ** Fixed wrong response assignment in DcmSCU's C-STORE code. Thanks to ** forum user "takeos" for the hint and fix. ** ** Revision 1.15 2010-10-20 07:41:36 uli ** Made sure isalpha() & friends are only called with valid arguments. ** ** Revision 1.14 2010-10-14 13:14:29 joergr ** Updated copyright header. Added reference to COPYRIGHT file. ** ** Revision 1.13 2010-10-01 12:25:29 uli ** Fixed most compiler warnings in remaining modules. ** ** Revision 1.12 2010-08-10 11:59:32 uli ** Fixed some cases where dcmFindNameOfUID() returning NULL could cause crashes. ** ** Revision 1.11 2010-06-24 09:26:57 joergr ** Added check on whether the presentation context ID of command and data set are ** identical. Made sure that received dataset is deleted when an error occurs. ** Used more appropriate error conditions / return codes. Further code cleanup. ** ** Revision 1.10 2010-06-22 15:48:53 joergr ** Introduced new enumeration type to be used for closeAssociation(). ** Further code cleanup. Renamed some methods, variables, types and so on. ** ** Revision 1.9 2010-06-18 14:58:01 joergr ** Changed some error conditions / return codes to more appropriate values. ** Further revised logging output. Use DimseCondition::dump() where appropriate. ** ** Revision 1.8 2010-06-17 17:13:06 joergr ** Added preliminary support for N-EVENT-REPORT to DcmSCU. Some further code ** cleanups and enhancements. Renamed some methods. Revised documentation. ** ** Revision 1.7 2010-06-09 16:33:34 joergr ** Added preliminary support for N-ACTION to DcmSCU. Some further code cleanups ** and enhancements. ** ** Revision 1.6 2010-06-08 17:54:14 onken ** Added C-FIND functionality to DcmSCU. Some code cleanups. Fixed ** memory leak sometimes occuring during association configuration. ** ** Revision 1.5 2010-06-02 16:01:49 joergr ** Slightly modified some log messages and levels for reasons of consistency. ** Use type cast macros (e.g. OFstatic_cast) where appropriate. ** ** Revision 1.4 2010-04-29 16:13:25 onken ** Made SCU class independent from dcmtls, i.e. outsourced TLS API. Added ** direct API support for sending C-STORE requests. Further API changes and ** some bugs fixed. ** ** Revision 1.3 2009-12-21 15:33:58 onken ** Added documentation and refactored / enhanced some code. ** ** Revision 1.2 2009-12-17 09:12:27 onken ** Fixed other scu and scp base class compile issues. ** ** Revision 1.1 2009-12-16 17:05:35 onken ** Added base classes for SCU and SCP implementation. ** ** Revision 1.5 2009-12-02 14:26:05 uli ** Stop including dcdebug.h which was removed. ** ** Revision 1.4 2009-11-18 12:37:28 uli ** Fix compiler errors due to removal of DUL_Debug() and DIMSE_Debug(). ** ** Revision 1.3 2009-01-08 18:25:34 joergr ** Replaced further OFListIterator() by OFListConstIterator() in order to ** compile when STL list classes are used. ** ** Revision 1.2 2009-01-08 13:33:31 joergr ** Replaced OFListIterator() by OFListConstIterator() in order to compile when ** STL list classes are used. ** ** Revision 1.1 2008-09-29 13:51:55 onken ** Initial checkin of module dcmppscu implementing an MPPS commandline client. ** */ odil-0.11.0/tests/tools/scu.h000066400000000000000000001627411362244656000160100ustar00rootroot00000000000000/* * * Copyright (C) 2008-2012, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by * * OFFIS e.V. * R&D Division Health * Escherweg 2 * D-26121 Oldenburg, Germany * * * Module: dcmnet * * Author: Michael Onken * * Purpose: Base class for Service Class Users (SCUs) * * Last Update: $Author: joergr $ * Update Date: $Date: 2012-02-21 08:48:51 $ * CVS/RCS Revision: $Revision: 1.41 $ * Status: $State: Exp $ * * CVS/RCS Log at end of file * */ #ifndef SCU_H #define SCU_H #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmdata/dctk.h" /* Covers most common dcmdata classes */ #include "dcmtk/dcmnet/dcompat.h" #include "dcmtk/dcmnet/dimse.h" /* DIMSE network layer */ #include "dcmtk/dcmnet/dcasccff.h" /* For reading a association config file */ #include "dcmtk/dcmnet/dcasccfg.h" /* For holding association config file infos */ #include "dcmtk/ofstd/oflist.h" // MODIFICATION: Use local header file #include "dndefine.h" // END Modification /** Different types of closing an association */ enum DcmCloseAssociationType { /// Release the current association DCMSCU_RELEASE_ASSOCIATION, /// Abort the current association DCMSCU_ABORT_ASSOCIATION, /// Peer requested release (Aborting) DCMSCU_PEER_REQUESTED_RELEASE, /// Peer aborted the association DCMSCU_PEER_ABORTED_ASSOCIATION }; /** Storage mode used for DICOM objects received via C-STORE */ enum DcmStorageMode { /// Ignore any objects received via C-STORE DCMSCU_STORAGE_IGNORE, /// Try to store the objects to disk DCMSCU_STORAGE_DISK, /// Try to store to disk in bit-preserving mode. This is especially useful /// for huge files that cannot fully be received in memory since the /// data is directly streamed to disk. Originally, this was introduced for /// DICOM signatures which can be kept valid this way. DCMSCU_STORAGE_BIT_PRESERVING }; /** Base class for C-FIND, C-MOVE and C-GET responses */ class DCMTK_DCMNET_EXPORT QRResponse { public: /** Standard constructor. */ QRResponse() : m_messageIDRespondedTo(0), m_affectedSOPClassUID(), m_dataset(NULL), m_status(0), m_statusDetail(NULL) {} /** Destructor, cleans up internal memory (dataset if present). */ virtual ~QRResponse() { delete m_dataset; delete m_statusDetail; } /// The message ID responded to (mandatory response field, /// equals message ID from request) Uint16 m_messageIDRespondedTo; /// Optional response field according to part 7 of the standard /// If present, equals SOP Class UID from request. OFString m_affectedSOPClassUID; /// Conditional response field (NULL if absent). From the standard (2009, /// part 4, C.4.2.1.4.2), for C-MOVE: In Q/R if no C-STORE sub-operation /// failed, Failed SOP Instance UID List (0008,0058) is absent and /// therefore no Data Set shall be sent in the C-MOVE response. Further /// rules: Statuses of Canceled, Failure, Refused, or Warning shall /// contain the Failed SOP Instance UID List Attribute; status of /// Pending shall not. DcmDataset *m_dataset; /// The returned DIMSE status (mandatory Response Field) Uint16 m_status; /// Status detail (NULL if absent). For some DIMSE return status codes, /// an additional dataset is sent which gives further information (i.e. /// in case of warnings or errors). DcmDataset *m_statusDetail; private: /** Private undefined copy constructor. * @param other The find response to copy from */ QRResponse(const QRResponse& other); /** Private undefined assignment operator. * @param other The find response that should be assigned from */ QRResponse& operator=(const QRResponse& other); }; /// Base class representing for single C-GET or C-MOVE response class DCMTK_DCMNET_EXPORT RetrieveResponse : public QRResponse { public: /** Standard constructor */ RetrieveResponse() : m_numberOfRemainingSubops(0), m_numberOfCompletedSubops(0), m_numberOfFailedSubops(0), m_numberOfWarningSubops(0) {} /** Destructor, cleans up internal memory */ virtual ~RetrieveResponse() {} /** Prints response to INFO log level. */ void print(); /// Number of remaining sub operations (in Q/R: C-STORE calls). /// For Q/R MOVE and GET, for status of pending this field shall be filled. /// For others, the field may be filled. Uint16 m_numberOfRemainingSubops; /// Number of successfully completed sub operations (in Q/R: C-STORE calls). /// For Q/R MOVE and GET, for status of pending this field shall be filled. /// For others, the field may be filled. Uint16 m_numberOfCompletedSubops; /// Number of failed sub operations (in Q/R: C-STORE calls). /// For Q/R MOVE and GET, for status of pending this field shall be filled. /// For others, the field may be filled. Uint16 m_numberOfFailedSubops; /// Number generated warnings generated by sub operations (in Q/R: C-STORE calls). /// For Q/R MOVE and GET, for status of pending this field shall be filled. /// For others, the field may be filled. Uint16 m_numberOfWarningSubops; private: /** Private undefined copy constructor * @param other Response to copy from */ RetrieveResponse(const RetrieveResponse& other); /** Private undefined assignment operator * @param other Response that should be assigned from */ RetrieveResponse& operator=(const RetrieveResponse& other); }; /** Base class for implementing DICOM Service Class User functionality. The class offers * support for negotiating associations and sending and receiving arbitrary DIMSE messages * on that connection. DcmSCU has built-in C-ECHO support so derived classes do not have to * implement that capability on their own. * @warning This class is EXPERIMENTAL. Be careful to use it in production environment. */ class DCMTK_DCMNET_EXPORT DcmSCU { public: /** Constructor, just initializes internal class members */ DcmSCU(); /** Virtual destructor */ virtual ~DcmSCU(); /** Add presentation context to be used for association negotiation * @param abstractSyntax [in] Abstract syntax name in UID format * @param xferSyntaxes [in] List of transfer syntaxes to be added for the given abstract * syntax * @param role [in] The role to be negotiated * @return EC_Normal if adding was successful, otherwise error code */ OFCondition addPresentationContext(const OFString &abstractSyntax, const OFList &xferSyntaxes, const T_ASC_SC_ROLE role = ASC_SC_ROLE_DEFAULT); /** Initialize network, i.e.\ prepare for association negotiation. If the SCU is already * connected, the call will not be successful and the old connection keeps open. * @return EC_Normal if initialization was successful, otherwise error code. * NET_EC_AlreadyConnected if SCU is already connected. */ virtual OFCondition initNetwork(); /** Negotiate association by using presentation contexts and parameters as defined by * earlier function calls. If negotiation fails, there is no need to close the association * or to do anything else with this class. * @return EC_Normal if negotiation was successful, otherwise error code. * NET_EC_AlreadyConnected if SCU is already connected. */ virtual OFCondition negotiateAssociation(); /** After negotiation association, this call returns the first usable presentation context * given the desired abstract syntax and transfer syntax * @param abstractSyntax [in] The abstract syntax (UID) to look for * @param transferSyntax [in] The transfer syntax (UID) to look for. If empty, the transfer * syntax is not checked. * @return Adequate Presentation context ID that can be used. 0 if none found. */ T_ASC_PresentationContextID findPresentationContextID(const OFString &abstractSyntax, const OFString &transferSyntax); /** After a successful association negotiation, this function is called to return the * presentation context ID that best matches the desired abstract syntax and transfer * syntax (TS). The function tries to do the following: * - If possible finds a presentation context with matching TS * - Else then tries to find an explicit VR uncompressed TS presentation context * - Else then tries to find an implicit VR uncompressed TS presentation context * - Else finally accepts each matching presentation ctx independent of TS. * @param abstractSyntax [in] The abstract syntax (UID) to look for * @param transferSyntax [in] The transfer syntax (UID) to look for. If empty, the transfer * syntax is not checked. * @return Adequate Presentation context ID that can be used. 0 if no appropriate * presentation context could be found at all. */ T_ASC_PresentationContextID findAnyPresentationContextID(const OFString &abstractSyntax, const OFString &transferSyntax); /** This function sends a C-ECHO command via network to another DICOM application * @param presID [in] Presentation context ID to use. A value of 0 lets SCP class tries * to choose one on its own. * @return EC_Normal if echo was successful, an error code otherwise * */ virtual OFCondition sendECHORequest(const T_ASC_PresentationContextID presID); /** This function sends a C-STORE request on the currently opened association and receives * the corresponding response then. If required and supported, the dataset of the SOP * instance can be converted automatically to the network transfer syntax that was * negotiated (and is specified by the parameter 'presID'). However, this feature is * disabled by default. See setDatasetConversionMode() on how to enable it. * @param presID [in] Contains in the end the ID of the presentation context which * was specified in the DIMSE command. If 0 is given, the * function tries to find an approriate presentation context * itself (based on SOP class and original transfer syntax of * the 'dicomFile' or 'dataset'). * @param dicomFile [in] The filename of the DICOM file to be sent. Alternatively, a * dataset can be given in the next parameter. If both are given * the dataset from the file name is used. * @param dataset [in] The dataset to be sent. Alternatively, a filename can be * specified in the previous parameter. If both are given the * dataset from the filename is used. * @param rspStatusCode [out] The response status code received. 0 means success, others * can be found in the DICOM standard. * @return EC_Normal if request could be issued and response was received successfully, * error code otherwise. That means that if the receiver sends a response denoting * failure of the storage request, EC_Normal will be returned. */ virtual OFCondition sendSTORERequest(const T_ASC_PresentationContextID presID, const OFString &dicomFile, DcmDataset *dataset, Uint16 &rspStatusCode); /** Sends a C-MOVE Request on given presentation context and receives list of responses. * The function receives the first response and then calls the function handleMOVEResponse() * which gets the relevant presentation context together with the response dataset and * status information. Then it waits again for the next response, if there are more to * come (i.e. response status is PENDING). In the end, after receiving all responses, the * full list of responses is returned to the caller. If he is not interested, he just sets * responses=NULL when calling the function. * This function can be overwritten by actual SCU implementations but just should work fine * for most people. * @param presID [in] The presentation context ID that should be used. * Must be an odd number. * @param moveDestinationAETitle [in] The move destination's AE title, i.e.\ the one that * is used for connection to the storage server. * @param dataset [in] The dataset containing the information about the * object(s) to be retrieved. * @param responses [out] The incoming C-MOVE responses for this request. * The caller is responsible for providing a non-NULL * pointer for this case. After receiving the results, * the caller is responsible for freeing the memory of * this variable. If NULL is specified, the responses * will not bereturned to the caller. * @return EC_Normal if everything went fine, i.e.\ if request could be send and responses * (with whatever status) could be received. */ virtual OFCondition sendMOVERequest(const T_ASC_PresentationContextID presID, const OFString &moveDestinationAETitle, DcmDataset *dataset, OFList *responses); /** This is the standard handler for C-MOVE message responses: It just adds up all responses * it receives and prints a DEBUG message. Therefore, it is called for each response * received in sendMOVERequest(). The idea is of course to overwrite this function in a * derived, actual SCU implementation if required. Thus, after each response, the caller of * sendMOVERequest() can decide on its own whether he wants to cancel the C-MOVE session, * terminate the association, do something useful or whatever. Thus this function is a more * object-oriented kind of callback. * @param presID [in] The presentation context ID where the response was * received on. * @param response [in] The C-MOVE response received. * @param waitForNextResponse [out] Denotes whether SCU should try to receive another * response. If set to OFTrue, then sendMOVERequest() will * continue waiting for responses. The current * implementation does that for all responses do not have * status Failed, Warning, Success or unknown. If set to * OFFalse, sendMOVERequest() will return control to the * caller. * @return EC_Normal, if response could be handled. Error code otherwise. * The current implementation always returns EC_Normal. */ virtual OFCondition handleMOVEResponse(const T_ASC_PresentationContextID presID, RetrieveResponse *response, OFBool &waitForNextResponse); /** Sends a C-GET Request on given presentation context and receives list of responses. It * then switches control to the function handleCGETSession(). * The full list of responses is returned to the caller. If he is not interested, he can * set responses=NULL when calling the function. * This function can be overwritten by actual SCU implementations but just should work fine * for most people. * @param presID [in] The presentation context ID that should be used. Must be an odd * number. * @param dataset [in] The dataset containing the information about the * object(s) to be retrieved * @param responses [out] The incoming C-GET responses for this request. If the caller * specifies NULL, no responses will be returned; otherwise there * should be at least one final C-GET response (mandatory). C-GET * responses after each DICOM object received are optional and may * have been ommitted by the server. * @return EC_Normal if everything went fine, i.e.\ if request could be sent and expected * responses (with whatever status) could be received. */ virtual OFCondition sendCGETRequest(const T_ASC_PresentationContextID presID, DcmDataset *dataset, OFList *responses); /** Does the logic for switching between C-GET Response and C-STORE Requests. Sends a C-GET * Request on given presentation context and receives list of responses. Ihe full list of * responses is returned to the caller. If he is not interested, he can set responses=NULL * when calling the function. After sending a C-GET Request, there might be two different * responses coming in: C-GET-RSP (optional after each received object and mandatory after * the last object) or a mandatory C-STORE for each incoming object that is received due to * the request. This function therefore either calls handleCGETResponse() or * handleSTORERequest() in order to deal with the incoming message. All other messages lead * to an error within this handler. * This function can be overwritten by actual SCU implementations but just should work fine * for most people. * @param presID [in] The presentation context ID that should be used. Must be an odd * number. * @param dataset [in] The dataset containing the information about the object(s) to be * retrieved * @param responses [out] The incoming C-GET responses for this request. If the caller * specifies NULL, no responses will be returned; otherwise there * should be at least one final C-GET response (mandatory). C-GET * responses after each DICOM object received are optional and may * have been ommitted by the server. * @return EC_Normal if everything went fine, i.e.\ if request could be send * and expected responses (with whatever status) could be received. */ virtual OFCondition handleCGETSession(const T_ASC_PresentationContextID presID, DcmDataset *dataset, OFList *responses); /** Function handling a single C-GET Response. This standard handler reads the status of the * response and decides whether to receive any further messages related to the original * C-GET Request or whether the last response was received or an error occured. * @param presID [in] The presentation context the C-GET Response was * received on. * @param response [in] The response received * @param continueCGETSession [out] Defines whether it is decided to wait for further C-GET * Responses/C-STORE Requests within this C-GET session * @return If no errors occur (dataset response NULL, SCU not connected), this method will * return EC_Normal, otherwise error code. */ virtual OFCondition handleCGETResponse(const T_ASC_PresentationContextID presID, RetrieveResponse* response, OFBool& continueCGETSession); /** Function handling a single C-STORE Request. If storage mode is set to disk (default), * this function is called and the incoming object stored to disk. * @param presID [in] The presentation context the C-STORE Response was * received on. * @param incomingObject [in] The dataset (the object) received * @param continueCGETSession [out] Defines whether it is decided to wait for further * C-GET Responses/C-STORE requests within this C-GET * session. * @param cStoreReturnStatus [out] Denotes the desired C-STORE return status. * @return If errors occur (incomingObject NULL or SCU not connected or file could not be * stored), this method will return an error code otherwise EC_Normal. */ virtual OFCondition handleSTORERequest(const T_ASC_PresentationContextID presID, DcmDataset *incomingObject, OFBool& continueCGETSession, Uint16& cStoreReturnStatus); /** Function handling a single C-STORE Request. If storage mode is set to bit preserving, * this function is called and the incoming object stored directly to disk, i.e. not stored * fully in memory. * @param presID [in] The presentation context the C-STORE Response was received on. * @param filename [in] The filename to store to * @param request [in] The incoming C-STORE request command set * @return If errors occur (incomingObject NULL or SCU not connected filename not * specified), this method will return an error code otherwise EC_Normal. */ virtual OFCondition handleSTORERequestFile(T_ASC_PresentationContextID *presID, const OFString& filename, T_DIMSE_C_StoreRQ* request); /** This function is called if an object was received due to a C-GET request and can be * overwritten by a user in order to be informed about such an event. The default * implementation just prints a DEBUG message. Note that this function is not called if * the SCU is in storage mode DCMSCU_STORAGE_IGNORE. * @param filename [in] The filename written * @param sopClassUID [in] The SOP Class UID of the object written * @param sopInstanceUID [in] The SOP Instance UID of the object written */ virtual void notifyInstanceStored(const OFString& filename, const OFString& sopClassUID, const OFString& sopInstanceUID) const; /** Sends a C-FIND Request on given presentation context and receives list of responses. * The function receives the first response and then calls the function handleFINDResponse * which gets the relevant presentation context together with the response dataset and * status information. Then it waits again for the next response, if there are more to * come (i.e. response status is PENDING). In the end, after receiving all responses, the * full list of responses is returned to the caller. If he is not interested, he just sets * responses=NULL when calling the function. * This function can be overwritten by actual SCU implementations but just should work fine * for most people. * @param presID [in] The presentation context ID that should be used. Must be an odd * number. * @param queryKeys [in] The dataset containing the query keys to be searched for on the * server (SCP). * @param responses [out] The incoming C-FIND responses for this request. The caller is * responsible for providing a non-NULL pointer for this case. * After receiving the results, the caller is responsible for * freeing the memory of this variable. If NULL is specified, the * responses will be not returned to the caller. * @return EC_Normal if everything went fine, i.e.\ if request could be send and responses * (with whatever status) could be received. */ virtual OFCondition sendFINDRequest(const T_ASC_PresentationContextID presID, DcmDataset *queryKeys, OFList *responses); /** This is the standard handler for C-FIND message responses: It just adds up all responses * it receives and prints a DEBUG message. Therefore, it is called for each response * received in sendFINDRequest(). The idea is of course to overwrite this function in a * derived, actual SCU implementation if required. Thus, after each response, the caller of * sendFINDRequest() can decide on its own whether he wants to cancel the C-FIND session, * terminate the association, do something useful or whatever. That way this is a more * object-oriented kind of callback. * @param presID [in] The presentation context ID where the response was * received on. * @param response [in] The C-FIND response received. * @param waitForNextResponse [out] Denotes whether SCU should try to receive another * response. If set to OFTrue, then sendFINDRequest() * will continue waiting for responses. The current * implementation does that for all responses do not have * status SUCESSS. If set to OFFalse, sendFINDRequest() * will return control to the caller. * @return EC_Normal, if response could be handled. Error code otherwise. * The current implementation always returns EC_Normal. */ virtual OFCondition handleFINDResponse(const T_ASC_PresentationContextID presID, QRResponse *response, OFBool &waitForNextResponse); /** Send C-CANCEL and, therefore, ends the C-FIND -GET or -MOVE session, i.e.\ no further * responses will be handled. A call to this function only makes sense if an association * is open, the given presentation context represents a valid C-FIND/GET/MOVE-enabled SOP * class and usually only, if the last command send on that presentation context was a * C-FIND message. * @param presID [in] The presentation context ID where the C-CANCEL should be sent on. * @return The current implementation always returns EC_Normal. */ virtual OFCondition sendCANCELRequest(const T_ASC_PresentationContextID presID); /** This function sends a N-ACTION request on the currently opened association and receives * the corresponding response then * @param presID [in] The ID of the presentation context to be used for sending * the request message. Should not be 0. * @param sopInstanceUID [in] The requested SOP Instance UID * @param actionTypeID [in] The action type ID to be used * @param reqDataset [in] The dataset to be sent * @param rspStatusCode [out] The response status code received. 0 means success, * others can be found in the DICOM standard. * @return EC_Normal if request could be issued and response was received successfully, * an error code otherwise */ virtual OFCondition sendACTIONRequest(const T_ASC_PresentationContextID presID, const OFString &sopInstanceUID, const Uint16 actionTypeID, DcmDataset *reqDataset, Uint16 &rspStatusCode); /** This function sends N-EVENT-REPORT request and receives the corresponding response * @param presID [in] The ID of the presentation context to be used for sending * the request message. Should not be 0. * @param sopInstanceUID [in] The requested SOP Instance UID * @param eventTypeID [in] The event type ID to be used * @param reqDataset [in] The request dataset to be sent * @param rspStatusCode [out] The response status code received. 0 means success, * others can be found in the DICOM standard. * @return EC_Normal if request could be issued and response was received successfully, * an error code otherwise */ virtual OFCondition sendEVENTREPORTRequest(const T_ASC_PresentationContextID presID, const OFString &sopInstanceUID, const Uint16 eventTypeID, DcmDataset *reqDataset, Uint16 &rspStatusCode); /** Receives N-EVENT-REPORT request on the currently opened association and sends a * corresponding response. Calls checkEVENTREPORTRequest() in order to determine the * DIMSE status code to be used for the N-EVENT-REPORT response. * @param reqDataset [out] Pointer to the dataset received * @param eventTypeID [out] Event Type ID from the command set received * @param timeout [in] Optional timeout in seconds for receiving data. This value * (if not 0) overwrites the standard DIMSE timeout and also * enables the non-blocking mode for receiving the request. * @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition handleEVENTREPORTRequest(DcmDataset *&reqDataset, Uint16 &eventTypeID, const int timeout = 0); /** This function is called while sending DIMSE messages, i.e.\ on each PDV of a dataset. * The default implementation just prints a TRACE message on the number of bytes sent so * far. By overwriting this method, the progress of the send process can be shown to the * user in a more appropriate way. The progress notification can also be disabled * completely by calling setProgressNotificationMode(). * @param byteCount [in] Number of bytes sent so far */ virtual void notifySENDProgress(const unsigned long byteCount); /** This function is called while receiving DIMSE messages, i.e.\ on each PDV of a dataset. * The default implementation just prints a TRACE message on the number of bytes received * so far. By overwriting this method, the progress of the receive process can be shown to * the user in a more appropriate way. The progress notification can also be disabled * completely by calling setProgressNotificationMode(). * @param byteCount [in] Number of bytes received so far */ virtual void notifyRECEIVEProgress(const unsigned long byteCount); /** Closes the association created by this SCU. Also resets the current association. * @param closeType [in] Define whether to release or abort the association */ virtual void closeAssociation(const DcmCloseAssociationType closeType); /* Set methods */ /** Set maximum PDU length (to be received by SCU) * @param maxRecPDU [in] The maximum PDU size to use in bytes */ void setMaxReceivePDULength(const unsigned long maxRecPDU); /** Set whether to send in DIMSE blocking or non-blocking mode * @param blockingMode [in] Either blocking or non-blocking mode */ void setDIMSEBlockingMode(const T_DIMSE_BlockingMode blockingMode); /** Set SCU's AETitle to be used in association negotiation * @param myAETtitle [in] The SCU's AETitle to be used */ void setAETitle(const OFString &myAETtitle); /** Set SCP's host (hostname or IP address) to talk to in association negotiation * @param peerHostName [in] The SCP's hostname or IP address to be used */ void setPeerHostName(const OFString &peerHostName); /** Set SCP's AETitle to talk to in association negotiation * @param peerAETitle [in] The SCP's AETitle to be used */ void setPeerAETitle(const OFString &peerAETitle); /** Set SCP's port number to connect to for association negotiation * @param peerPort [in] The SCP's port number */ void setPeerPort(const Uint16 peerPort); /** Set timeout for receiving DIMSE messages * @param dimseTimeout [in] DIMSE Timeout in seconds for receiving data. If the blocking * mode is DIMSE_NONBLOCKING and we are trying to read data from * the incoming socket stream and no data has been received. */ void setDIMSETimeout(const Uint32 dimseTimeout); /** Set timeout for receiving ACSE messages * @param acseTimeout [in] ACSE Timeout in seconds used by timer for message timeouts * during association negotiation */ void setACSETimeout(const Uint32 acseTimeout); /** Set an association configuration file and profile to be used * @param filename [in] File name of the association configuration file * @param profile [in] Profile inside the association negotiation file */ void setAssocConfigFileAndProfile(const OFString &filename, const OFString &profile); /** Set the directory that should be used by the standard C-GET handler to store objects * that come in with the corresponding C-STORE rqeuests * @param storeDir [in] The directory to store to. It is checked in handleSTORERequest() * whether the directory is writeable and readable. Per default, the * received objects are stored in the current working directory. */ void setStorageDir(const OFString& storeDir); /** Set the storage mode to be used. Default is DCMSCU_STORAGE_DISK. * @param storageMode The storage mode to be used. */ void setStorageMode(const DcmStorageMode storageMode); /** Set whether to show presentation contexts in verbose or debug mode * @param mode [in] Show presentation contexts in verbose mode if OFTrue. By default, the * presentation contexts are shown in debug mode. */ void setVerbosePCMode(const OFBool mode); /** Set the mode that specifies whether the transfer syntax of the dataset can be changed * for network transmission. This mainly covers the compression/decompression of datasets, * which is disabled by default. * @param mode [in] Allow dataset conversion if OFTrue */ void setDatasetConversionMode(const OFBool mode); /** Set the mode that specifies whether the progress of sending and receiving DIMSE * messages is notified by calling notifySENDProgress() and notifyRECEIVEProgress(), * respectively. The progress notification is enabled by default. * @param mode [in] Disable progress notification if OFFalse */ void setProgressNotificationMode(const OFBool mode); /* Get methods */ /** Get current connection status * @return OFTrue if SCU is currently connected, OFFalse otherwise */ OFBool isConnected() const; /** Returns maximum PDU length configured to be received by SCU * @return Maximum PDU length in bytes */ Uint32 getMaxReceivePDULength() const; /** Returns whether DIMSE messaging is configured to be blocking or unblocking * @return The blocking mode configured */ T_DIMSE_BlockingMode getDIMSEBlockingMode() const; /** Returns the SCU's own configured AETitle * @return The AETitle configured for this SCU */ const OFString &getAETitle() const; /** Returns the SCP's (peer's) host name configured * @return The hostname (or IP) configured to be talked to */ const OFString &getPeerHostName() const; /** Returns the SCP's (peer's) AETitle configured * @return The AETitle configured to be talked to */ const OFString &getPeerAETitle() const; /** Returns the SCP's (peer's) TCP/IP port configured * @return The port configured to talked to */ Uint16 getPeerPort() const; /** Returns the DIMSE timeout configured defining how long SCU will wait for DIMSE responses * @return The DIMSE timeout configured */ Uint32 getDIMSETimeout() const; /** Returns the timeout configured defining how long SCU will wait for messages during ACSE * messaging (association negotiation) * @return The ACSE timeout configured */ Uint32 getACSETimeout() const; /** Returns the storage directory used for storing objects received with C-STORE requests * in the context of C-GET sessions. Default is empty string which refers to the current * working directory. * @return The storage directory */ OFString getStorageDir() const; /** Returns the storage mode enabled * @return The storage mode enabled */ DcmStorageMode getStorageMode() const; /** Returns the verbose presentation context mode configured specifying whether details * on the presentation contexts (negotiated during association setup) should be shown in * verbose or debug mode. The latter is the default. * @return The current verbose presentation context mode. Show details on the * presentation contexts on INFO log level (verbose) if OFTrue and on DEBUG * level if OFFalse. */ OFBool getVerbosePCMode() const; /** Returns the mode that specifies whether the transfer syntax of the dataset can be * changed for network transmission. This mainly covers the compression/decompression * of datasets, which is disabled by default. * @return The current dataset conversion mode, enabled if OFTrue */ OFBool getDatasetConversionMode() const; /** Returns the mode that specifies whether the progress of sending and receiving DIMSE * messages is notified by calling notifySENDProgress() and notifyRECEIVEProgress(), * respectively. The progress notification is enabled by default. * @return The current progress notification mode, enabled if OFTrue */ OFBool getProgressNotificationMode() const; /** Returns whether SCU is configured to create a TLS connection with the SCP * @return OFFalse for this class but may be overriden by derived classes */ OFBool getTLSEnabled() const; /** Deletes internal networking structures from memory */ void freeNetwork(); protected: /** Sends a DIMSE command and possibly also a dataset from a data object via network to * another DICOM application * @param presID [in] Presentation context ID to be used for message * @param msg [in] Structure that represents a certain DIMSE command which * shall be sent * @param dataObject [in] The instance data which shall be sent to the other DICOM * application; NULL, if there is none * @param commandSet [out] If this parameter is not NULL it will return a copy of the * DIMSE command which is sent to the other DICOM application * @return EC_Normal if sending request was successful, an error code otherwise */ OFCondition sendDIMSEMessage(const T_ASC_PresentationContextID presID, T_DIMSE_Message *msg, DcmDataset *dataObject, DcmDataset **commandSet = NULL); /** Returns SOP Class UID, SOP Instance UID and original transfer syntax for a given dataset. * If the dataset is NULL, all returned values will be undefined (i.e. empty or EXS_Unknown). * @param dataset [in] The dataset to read from * @param sopClassUID [out] The value of attribute SOP Class UID if present * @param sopInstanceUID [out] The value of attribute SOP Instance UID if present * @param transferSyntax [out] The value of transfer syntax that originally was read from * disk. Will be unknown if the dataset was created in memory. * @return EC_Normal if all information could be retrieved and is valid, an error code * otherwise */ OFCondition getDatasetInfo(DcmDataset *dataset, OFString &sopClassUID, OFString &sopInstanceUID, E_TransferSyntax &transferSyntax); /** Tells DcmSCU to use a secure TLS connection described by the given TLS layer * @param tlayer [in] The TLS transport layer including all TLS parameters * @return EC_Normal if given transport layer is ok, an error code otherwise */ OFCondition useSecureConnection(DcmTransportLayer *tlayer); /** Receive DIMSE command (excluding dataset!) over the currently open association * @param presID [out] Contains in the end the ID of the presentation context * which was specified in the DIMSE command received * @param msg [out] The message received * @param statusDetail [out] If a non-NULL value is passed this variable will in the end * contain detailed information with regard to the status * information which is captured in the status element * (0000,0900). Note that the value for element (0000,0900) is * not contained in this return value but in internal msg. For * details on the structure of this object, see DICOM standard * part 7, annex C). * @param commandSet [out] If this parameter is not NULL, it will return a copy of the * DIMSE command which was received from the other DICOM * application. The caller is responsible to de-allocate the * returned object! * @param timeout [in] If this parameter is not 0, it specifies the timeout (in * seconds) to be used for receiving the DIMSE command. * Otherwise, the default timeout value is used (see * setDIMSETimeout()). * @return EC_Normal if command could be received successfully, an error code otherwise */ OFCondition receiveDIMSECommand(T_ASC_PresentationContextID *presID, T_DIMSE_Message *msg, DcmDataset **statusDetail, DcmDataset **commandSet = NULL, const Uint32 timeout = 0); /** Receives one dataset (of instance data) via network from another DICOM application * @param presID [out] Contains in the end the ID of the presentation context which * was used in the PDVs that were received on the network. If the * PDVs show different presentation context IDs, this function * will return an error. * @param dataObject [out] Contains in the end the information which was received over * the network * @return EC_Normal if dataset could be received successfully, an error code otherwise */ OFCondition receiveDIMSEDataset(T_ASC_PresentationContextID *presID, DcmDataset **dataObject); /** clear list of presentation contexts. In addition, any currently selected association * configuration file is disabled. */ void clearPresentationContexts(); /** After negotiation association, this call returns the presentation context belonging * to the given presentation context ID * @param presID [in] The presentation context ID to look for * @param abstractSyntax [out] The abstract syntax (UID) for that ID. * Empty, if such a presentation context does not exist. * @param transferSyntax [out] The transfer syntax (UID) for that ID. * Empty, if such a presentation context does not exist. */ void findPresentationContext(const T_ASC_PresentationContextID presID, OFString &abstractSyntax, OFString &transferSyntax); /** Check given N-EVENT-REPORT request and dataset for validity. This method is called by * handleEVENTREPORTRequest() before sending the response in order to determine the * DIMSE status code to be used for the response message. * @param request [in] The N-EVENT-REPORT request message data structure * @param reqDataset [in] The N-EVENT-REPORT request dataset received. Might be NULL. * @return DIMSE status code to be used for the N-EVENT-REPORT response. * Always returns STATUS_Success (0). Derived classes should, therefore, * overwrite this method and return a more appropriate value based on the * result of the checks performed. */ virtual Uint16 checkEVENTREPORTRequest(T_DIMSE_N_EventReportRQ &request, DcmDataset *reqDataset); /** Sends back a C-STORE response on the given presentation context, with the designated * status, fitting the corresponding C-STORE request. * @param presID [in] The presentation context ID to be used. * @param status [in] The storage DIMSE status to be used. * @param request [in] The C-STORE request that should be responded to. * @result EC_Normal if the response could be sent, error otherwise. */ virtual OFCondition sendSTOREResponse(T_ASC_PresentationContextID presID, Uint16 status, const T_DIMSE_C_StoreRQ& request); /** Helper function that generates a storage filename by extracting SOP Class and SOP * Instance UID from a dataset and combining that with the configured storage directory. * The SOP class is used to create an initial two letter abbreviation for the * corresponding modality, e.g. CT. An example for a storage filename created by this * function is /storage_dir/CT.1.2.3.4.5 for a CT with SOP Instance UID 1.2.3.4. * This function might be overwritten to change the filename behaviour completely. This * function is only called if the SCU is in DCMSCU_STORAGE_DISK mode. * @param dataset [in] The dataset that should be stored to disk * @result Non-empty string if successful, otherwise empty string. */ virtual OFString createStorageFilename(DcmDataset *dataset); /** Receives a DICOM dataset on a given presentation context ID but does not store it in * memory or disk, thus ignoring it. * @param presID [in] The presentation context to be used * @param request [in] The corresponding C-STORE request * @return EC_Normal if ignoring worked, error code otherwise. */ virtual OFCondition ignoreSTORERequest(T_ASC_PresentationContextID presID, const T_DIMSE_C_StoreRQ& request); /* Callback functions */ /** Callback function used for sending DIMSE messages. * @param callbackContext [in] The desired user callback data * @param byteCount [in] Progress bytes count */ static void callbackSENDProgress(void *callbackContext, unsigned long byteCount); /** Callback function used for receiving DIMSE messages. * @param callbackContext [in] The desired user callback data * @param byteCount [in] Progress bytes count */ static void callbackRECEIVEProgress(void *callbackContext, unsigned long byteCount); private: /** Private undefined copy-constructor. Shall never be called. * @param src Source object */ DcmSCU(const DcmSCU &src); /** Private undefined operator=. Shall never be called. * @param src Source object * @return Reference to this */ DcmSCU &operator=(const DcmSCU &src); /// Associaton of this SCU. This class only handles 1 association at a time. T_ASC_Association *m_assoc; /// The DICOM network the association is based on T_ASC_Network *m_net; /// Association parameters T_ASC_Parameters *m_params; /// Configuration file for presentation contexts (optional) OFString m_assocConfigFilename; /// Profile in configuration file that should be used (optional) OFString m_assocConfigProfile; /// Defines presentation context, consisting of one abstract syntax name /// and a list of transfer syntaxes for this abstract syntax struct DCMTK_DCMNET_EXPORT DcmSCUPresContext { /** Default constructor */ DcmSCUPresContext() : abstractSyntaxName() , transferSyntaxes() , roleSelect(ASC_SC_ROLE_DEFAULT) { } /// Abstract Syntax Name of Presentation Context OFString abstractSyntaxName; /// List of Transfer Syntaxes for Presentation Context OFList transferSyntaxes; /// Role Selection T_ASC_SC_ROLE roleSelect; }; /// List of presentation contexts that should be negotiated OFList m_presContexts; /// Configuration file containing association parameters OFString m_assocConfigFile; /// The last DIMSE successfully sent, unresponded DIMSE request T_DIMSE_Message *m_openDIMSERequest; /// Maximum PDU size Uint32 m_maxReceivePDULength; /// DIMSE blocking mode T_DIMSE_BlockingMode m_blockMode; /// AEtitle of this application OFString m_ourAETitle; /// Peer hostname OFString m_peer; /// AEtitle of remote application OFString m_peerAETitle; /// Port of remote application entity Uint16 m_peerPort; /// DIMSE timeout Uint32 m_dimseTimeout; /// ACSE timeout Uint32 m_acseTimeout; /// Storage directory for objects received with C-STORE due to a /// running C-GET session. Per default, the received objects /// are stored in the current working directory. OFString m_storageDir; /// Set whether bit preserving storage should be enabled, i.e.\ any objects /// retrieved via C-STORE should be written directly to disk without /// any data correction/re-computation (e.g.\ group length calculations, /// padding, etc.). This is especially interesting for retaining valid /// signatures, and also to receive huge files which cannot be fully received /// in memory. Default is OFFalse (no bit preserving) storage. DcmStorageMode m_storageMode; /// Verbose PC mode OFBool m_verbosePCMode; /// Dataset conversion mode OFBool m_datasetConversionMode; /// Progress notification mode OFBool m_progressNotificationMode; /** Returns next available message ID free to be used by SCU * @return Next free message ID */ Uint16 nextMessageID(); }; #endif // SCU_H /* ** CVS Log ** $Log: scu.h,v $ ** Revision 1.41 2012-02-21 08:48:51 joergr ** Added support for progress notifications while sending and receiving DICOM ** datasets. ** ** Revision 1.40 2011-12-14 11:45:15 uli ** Make it possible to perfectly build dcmnet and dcmtls a DLLs. ** ** Revision 1.39 2011-10-10 14:01:29 uli ** Moved SCU-specific error condition to the correct place. ** ** Revision 1.38 2011-10-04 08:58:14 joergr ** Added flag that allows for specifying whether to convert a dataset to be ** transferred to the network transfer syntax. Also removed unused parameters ** "rspCommandSet" and "rspStatusDetail" from method sendSTORERequest(). ** ** Revision 1.37 2011-09-28 16:28:20 joergr ** Added general support for transfer syntax conversions to sendSTORERequest(). ** ** Revision 1.36 2011-09-28 15:25:34 joergr ** Return a more appropriate error code in case the dataset to be sent is ** invalid. This also required to introduce a return value for getDatasetInfo(). ** ** Revision 1.35 2011-09-28 13:31:56 joergr ** Added method that allows for clearing the list of presentation contexts. ** ** Revision 1.34 2011-09-22 13:49:03 joergr ** Fixed incorrect comment on return code of some sendXXXRequest() methods. ** ** Revision 1.33 2011-09-06 16:11:06 ogazzar ** Fixed typos in a log commit message. ** ** Revision 1.32 2011-09-06 12:57:36 ogazzar ** Added a function to send N-EVENT-REPORT request and receive a reponse. ** ** Revision 1.31 2011-08-25 15:46:18 joergr ** Further cleanup of minor inconsistencies regarding documentation, parameter ** names, log output and handling of status details information. ** ** Revision 1.30 2011-08-25 15:05:06 joergr ** Changed data structure for Q/R responses from OFVector to OFList. Also fixed ** some possible memory leaks and made the FIND/MOVE/GET code more consistent. ** ** Revision 1.29 2011-08-25 13:46:28 joergr ** Fixed minor issues in the API documentation, parameter and method names. ** ** Revision 1.28 2011-08-25 09:31:33 onken ** Added C-GET functionality to DcmSCU class and accompanying getscu ** commandline application. ** ** Revision 1.27 2011-05-25 09:57:54 ogazzar ** Renamed a function name. ** ** Revision 1.26 2011-05-25 09:30:12 ogazzar ** Added a function to look for a presentation context ID that best matches ** the abstract syntax and the transfer syntax. ** ** Revision 1.25 2011-05-24 13:17:58 onken ** Added missing default initializiation of role flag in presentation context ** constructor. ** ** Revision 1.24 2011-05-24 08:28:08 ogazzar ** Added support for role selection negotiation. ** ** Revision 1.23 2011-05-19 17:20:09 onken ** Fixed some documentation. ** ** Revision 1.22 2011-05-19 09:57:26 onken ** Fixed message ID field in C-CANCEL request (should be the one of last ** request). In case of error status codes in C-MOVE responses, the default ** behaviour is now to not wait for further responses. Fixed log output level ** to better fit the messages while receiveing C-MOVE responses. Minor ** code and comment cleanups. Renamed function parameter in sendMOVEREquest ** to better reflect the standard. ** ** Revision 1.21 2011-05-17 14:43:55 onken ** Removed some windows line endings. ** ** Revision 1.20 2011-05-17 14:34:32 onken ** Completed doxygen documentation of DcmSCU class. Fixed some minor formatting ** issues. Fixed CVS log at end of the file. Implemented C-CANCEL message. ** Fixed some minor formatting issues. Changed C-ECHO implementation to rely ** on sendDIMSEMesage as the other DIMSE functions do. Changed some public ** function arguments to const to be more correct. Fixed CVS log at the end ** of the file. Re-formatted CHANGES log entry from 2011-04-28. ** ** Revision 1.19 2011-05-17 14:26:19 onken ** Implemented C-CANCEL message. Fixed some minor formatting issues. ** Changed C-ECHO implementation to rely on sendDIMSEMesage as the other ** DIMSE functions do. Changed some public function arguments to const to be ** more correct. Fixed CVS log at the end of the scu.cc file. ** ** Revision 1.18 2011-04-28 17:50:05 onken ** Protected public networking functions for creating an association ** from being called twice. Enhanced protection of DIMSE messaging ** functions from being called without being connected. Introduced ** status detail into C-FIND responses (and C-MOVE responses). Was ** not accessible to the caller before. Minor code cleanups. Added ** C-MOVE code for retrieving DICOM objects. So far only retrieving ** on a separate connection is supported. Added function for cleaning ** up internal memory from destructor. This function also fixes a ** memory leak in case users call initNetwork more than one time. ** Added error code returned by functions if SCU is already connected. ** ** Revision 1.17 2011-02-16 08:55:13 joergr ** Fixed issue in sendSTORERequest() when sending a dataset that was created ** in memory (and which has, therefore, an original transfer of EXS_Unknown). ** ** Revision 1.16 2011-02-04 12:57:40 uli ** Made sure all members are initialized in the constructor (-Weffc++). ** ** Revision 1.15 2011-02-04 11:24:40 uli ** Added private undefined functions where gcc's -Weffc++ warns otherwise. ** ** Revision 1.14 2011-02-01 09:01:19 joergr ** Added "const" specifier to parameter in order to be consistent with the ** source file (caused warnings/errors with certain compilers). ** ** Revision 1.13 2010-10-14 13:17:22 joergr ** Updated copyright header. Added reference to COPYRIGHT file. ** ** Revision 1.12 2010-10-07 12:54:07 joergr ** Fixed minor Doxygen API documentation issues (added backslash in order to ** avoid that the short description ends at the first period). ** ** Revision 1.11 2010-06-24 09:21:54 joergr ** Revised comment to make clear that the parameter "presID" shall never be 0 ** for the sendACTIONRequest() method. ** ** Revision 1.10 2010-06-22 15:45:27 joergr ** Introduced new enumeration type to be used for closeAssociation(). ** Further code cleanup. Renamed some methods, variables, types and so on. ** ** Revision 1.9 2010-06-17 17:11:27 joergr ** Added preliminary support for N-EVENT-REPORT to DcmSCU. Some further code ** cleanups and enhancements. Renamed some methods. Revised documentation. ** ** Revision 1.8 2010-06-09 16:09:01 joergr ** Added preliminary support for N-ACTION to DcmSCU. Some further code cleanups ** and enhancements. ** ** Revision 1.7 2010-06-08 17:54:12 onken ** Added C-FIND functionality to DcmSCU. Some code cleanups. Fixed ** memory leak sometimes occuring during association configuration. ** ** Revision 1.6 2010-04-29 16:13:28 onken ** Made SCU class independent from dcmtls, i.e. outsourced TLS API. Added ** direct API support for sending C-STORE requests. Further API changes and ** some bugs fixed. ** ** Revision 1.5 2009-12-21 17:00:32 onken ** Fixed API documentation to keep doxygen quiet. ** ** Revision 1.4 2009-12-21 15:33:55 onken ** Added documentation and refactored / enhanced some code. ** ** Revision 1.3 2009-12-17 09:12:10 onken ** Fixed other scu and scp base class compile issues. ** ** Revision 1.2 2009-12-17 09:05:15 onken ** Fixed typo resulting in build failure. ** ** Revision 1.1 2009-12-17 09:02:44 onken ** Added base classes for SCU and SCP implementations. ** ** Revision 1.2 2009-12-02 14:26:05 uli ** Stop including dcdebug.h which was removed. ** ** Revision 1.1 2008-09-29 13:51:52 onken ** Initial checkin of module dcmppscu implementing an MPPS commandline client. ** */ odil-0.11.0/tests/wrappers/000077500000000000000000000000001362244656000155355ustar00rootroot00000000000000odil-0.11.0/tests/wrappers/messages/000077500000000000000000000000001362244656000173445ustar00rootroot00000000000000odil-0.11.0/tests/wrappers/messages/__init__.py000066400000000000000000000000001362244656000214430ustar00rootroot00000000000000odil-0.11.0/tests/wrappers/messages/test_message.py000066400000000000000000000003341362244656000224010ustar00rootroot00000000000000import unittest import odil class TestMessage(unittest.TestCase): def test_commands(self): self.assertEqual(odil.messages.Message.Command.C_FIND_RSP, 0x8020) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_association.py000066400000000000000000000030321362244656000214600ustar00rootroot00000000000000import unittest import odil class TestAssociation(unittest.TestCase): def test_default_constructor(self): association = odil.Association() self.assertFalse(association.is_associated()) def test_peer_host(self): association = odil.Association() association.set_peer_host("pacs.example.com") self.assertEqual(association.get_peer_host(), "pacs.example.com") def test_peer_port(self): association = odil.Association() association.set_peer_port(1234) self.assertEqual(association.get_peer_port(), 1234) def test_peer_port(self): association = odil.Association() association.set_peer_port(1234) self.assertEqual(association.get_peer_port(), 1234) def test_parameters(self): parameters = odil.AssociationParameters() parameters.set_called_ae_title("foo") association = odil.Association() association.set_parameters(parameters) self.assertEqual( association.get_parameters().get_called_ae_title(), "foo") def test_update_parameters(self): association = odil.Association() association.update_parameters().set_called_ae_title("foo") self.assertEqual( association.get_parameters().get_called_ae_title(), "foo") def test_next_message_id(self): association = odil.Association() id1 = association.next_message_id() id2 = association.next_message_id() self.assertNotEqual(id1, id2) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_association_parameters.py000066400000000000000000000124671362244656000237170ustar00rootroot00000000000000import unittest import odil class TestAssociationParameters(unittest.TestCase): def test_default_constructor(self): parameters = odil.AssociationParameters() self.assertEqual(parameters.get_called_ae_title(), "") self.assertEqual(parameters.get_calling_ae_title(), "") self.assertEqual(len(parameters.get_presentation_contexts()), 0) user_identity = parameters.get_user_identity() self.assertEqual( user_identity.type, getattr(odil.AssociationParameters.UserIdentity.Type, "None")) self.assertEqual(parameters.get_maximum_length(), 16384) def test_called_ae_title(self): parameters = odil.AssociationParameters() parameters.set_called_ae_title("foo") self.assertEqual(parameters.get_called_ae_title(), "foo") def test_calling_ae_title(self): parameters = odil.AssociationParameters() parameters.set_calling_ae_title("foo") self.assertEqual(parameters.get_calling_ae_title(), "foo") def test_presentation_contexts(self): presentation_context = odil.AssociationParameters.PresentationContext( 1, "foo", ["bar"], odil.AssociationParameters.PresentationContext.Role.SCU) parameters = odil.AssociationParameters() parameters.set_presentation_contexts([presentation_context]) self.assertEqual(len(parameters.get_presentation_contexts()), 1) self.assertEqual( parameters.get_presentation_contexts()[0], presentation_context) def test_presentation_contexts_simplified(self): presentation_context = odil.AssociationParameters.PresentationContext( "quux", ["plip", "plop"], odil.AssociationParameters.PresentationContext.Role.SCU) parameters = odil.AssociationParameters() parameters.set_presentation_contexts([presentation_context]) self.assertEqual(len(parameters.get_presentation_contexts()), 1) # ID is modified since not user-supplied presentation_context.id = parameters.get_presentation_contexts()[0].id self.assertEqual( parameters.get_presentation_contexts()[0], presentation_context) def test_user_identity_username(self): parameters = odil.AssociationParameters() parameters.set_user_identity_to_username("foo") user_identity = parameters.get_user_identity() self.assertEqual( user_identity.type, odil.AssociationParameters.UserIdentity.Type.Username) self.assertEqual(user_identity.primary_field, "foo") def test_user_identity_username_and_password(self): parameters = odil.AssociationParameters() parameters.set_user_identity_to_username_and_password("foo", "bar") user_identity = parameters.get_user_identity() self.assertEqual( user_identity.type, odil.AssociationParameters.UserIdentity.Type.UsernameAndPassword) self.assertEqual(user_identity.primary_field, "foo") self.assertEqual(user_identity.secondary_field, "bar") def test_user_identity_kerberos(self): parameters = odil.AssociationParameters() parameters.set_user_identity_to_kerberos("foo") user_identity = parameters.get_user_identity() self.assertEqual( user_identity.type, odil.AssociationParameters.UserIdentity.Type.Kerberos) self.assertEqual(user_identity.primary_field, "foo") def test_user_identity_saml(self): parameters = odil.AssociationParameters() parameters.set_user_identity_to_saml("foo") user_identity = parameters.get_user_identity() self.assertEqual( user_identity.type, odil.AssociationParameters.UserIdentity.Type.SAML) self.assertEqual(user_identity.primary_field, "foo") def test_user_identity_none(self): parameters = odil.AssociationParameters() parameters.set_user_identity_to_saml("foo") parameters.set_user_identity_to_none() user_identity = parameters.get_user_identity() self.assertEqual( user_identity.type, getattr(odil.AssociationParameters.UserIdentity.Type, "None")) def test_maximum_length(self): parameters = odil.AssociationParameters() parameters.set_maximum_length(12345) self.assertEqual(parameters.get_maximum_length(), 12345) def test_chaining(self): parameters = odil.AssociationParameters() parameters.set_called_ae_title("foo").set_calling_ae_title("bar") self.assertEqual(parameters.get_called_ae_title(), "foo") self.assertEqual(parameters.get_calling_ae_title(), "bar") class TestPresentationContext(unittest.TestCase): def test_constructor(self): presentation_context = odil.AssociationParameters.PresentationContext( 1, "foo", ["bar", "baz"], odil.AssociationParameters.PresentationContext.Role.SCP) self.assertEqual(presentation_context.id, 1) self.assertEqual(presentation_context.abstract_syntax, "foo") self.assertEqual( [x for x in presentation_context.transfer_syntaxes], [b"bar", b"baz"]) self.assertEqual( presentation_context.role, odil.AssociationParameters.PresentationContext.Role.SCP) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_basic_directory_creator.py000066400000000000000000000112121362244656000240270ustar00rootroot00000000000000import os import shutil import tempfile import unittest import odil class TestBasicDirectoryCreator(unittest.TestCase): def setUp(self): self.root = tempfile.mkdtemp() data_set_1 = odil.DataSet() data_set_1.add("PatientID", ["DJ123"]) data_set_1.add("StudyDate", ["19100110"]) data_set_1.add("StudyTime", ["1234"]) data_set_1.add("StudyDescription", ["Study"]) data_set_1.add("StudyInstanceUID", ["1.2.3.4"]) data_set_1.add("StudyID", ["FOO"]) data_set_1.add("Modality", ["OT"]) data_set_1.add("SeriesInstanceUID", ["1.2.3.4.1"]) data_set_1.add("SeriesNumber", [1]) data_set_1.add("SeriesDescription", ["Series"]) data_set_1.add("InstanceNumber", [1]) data_set_1.add("SOPInstanceUID", ["1.2.3.4.1.1"]) data_set_1.add("SOPClassUID", [odil.registry.RawDataStorage]) with open(os.path.join(self.root, "a.dcm"), "wb") as fd: stream_1 = odil.iostream(fd) odil.Writer.write_file(data_set_1, stream_1) data_set_2 = odil.DataSet() data_set_2.add("PatientID", ["DJ123"]) data_set_2.add("StudyDate", ["19100110"]) data_set_2.add("StudyTime", ["1234"]) data_set_2.add("StudyDescription", ["Study"]) data_set_2.add("StudyInstanceUID", ["1.2.3.4"]) data_set_2.add("StudyID", ["FOO"]) data_set_2.add("Modality", ["OT"]) data_set_2.add("SeriesInstanceUID", ["1.2.3.4.1"]) data_set_2.add("SeriesNumber", [1]) data_set_2.add("SeriesDescription", ["Series"]) data_set_2.add("InstanceNumber", [2]) data_set_2.add("SOPInstanceUID", ["1.2.3.4.1.2"]) data_set_2.add("SOPClassUID", [odil.registry.RawDataStorage]) with open(os.path.join(self.root, "b.dcm"), "wb") as fd: stream_2 = odil.iostream(fd) odil.Writer.write_file(data_set_2, stream_2) self.files = ["a.dcm", "b.dcm"] def tearDown(self): shutil.rmtree(self.root) def test_default_record_keys(self): creator = odil.BasicDirectoryCreator(self.root, self.files) creator() with open(os.path.join(self.root, "DICOMDIR"), "rb") as fd: header, dicomdir = odil.Reader.read_file(odil.iostream(fd)) records = dicomdir.as_data_set("DirectoryRecordSequence") self._test_default_records(records) def test_extra_record_keys_list(self): creator = odil.BasicDirectoryCreator( self.root, self.files, { "SERIES": [["SeriesDescription", 1]]}) creator() with open(os.path.join(self.root, "DICOMDIR"), "rb") as fd: header, dicomdir = odil.Reader.read_file(odil.iostream(fd)) records = dicomdir.as_data_set("DirectoryRecordSequence") self._test_default_records(records) self.assertSequenceEqual( records[2].as_string("SeriesDescription"), [b"Series"]) def test_extra_record_keys_tuple(self): creator = odil.BasicDirectoryCreator( self.root, self.files, { "SERIES": (("SeriesDescription", 1), )}) creator() with open(os.path.join(self.root, "DICOMDIR"), "rb") as fd: header, dicomdir = odil.Reader.read_file(odil.iostream(fd)) records = dicomdir.as_data_set("DirectoryRecordSequence") self._test_default_records(records) self.assertSequenceEqual( records[2].as_string("SeriesDescription"), [b"Series"]) def _test_default_records(self, records): self.assertEqual(len(records), 5) self.assertSequenceEqual( records[0].as_string("DirectoryRecordType"), [b"PATIENT"]) self.assertSequenceEqual( records[0].as_string("PatientID"), [b"DJ123"]) self.assertSequenceEqual( records[1].as_string("DirectoryRecordType"), [b"STUDY"]) self.assertSequenceEqual( records[1].as_string("StudyInstanceUID"), [b"1.2.3.4"]) self.assertSequenceEqual( records[1].as_string("StudyDescription"), [b"Study"]) self.assertSequenceEqual( records[2].as_string("DirectoryRecordType"), [b"SERIES"]) self.assertSequenceEqual( records[2].as_string("SeriesInstanceUID"), [b"1.2.3.4.1"]) self.assertSequenceEqual( records[3].as_string("DirectoryRecordType"), [b"IMAGE"]) self.assertSequenceEqual( records[3].as_int("InstanceNumber"), [1]) self.assertSequenceEqual( records[4].as_string("DirectoryRecordType") , [b"IMAGE"]) self.assertSequenceEqual( records[4].as_int("InstanceNumber"), [2]) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_data_set.py000066400000000000000000000205411362244656000207340ustar00rootroot00000000000000import unittest import odil class TestDataSet(unittest.TestCase): def test_empty_constructor(self): data_set = odil.DataSet() self.assertTrue(data_set.empty()) self.assertEqual(data_set.size(), 0) self.assertEqual(len(data_set), 0) self.assertEqual(len(data_set.get_transfer_syntax()), 0) def test_transfer_syntax_constructor(self): data_set = odil.DataSet(odil.registry.ExplicitVRLittleEndian) self.assertEqual( data_set.get_transfer_syntax().encode(), odil.registry.ExplicitVRLittleEndian) def test_transfer_syntax(self): data_set = odil.DataSet() data_set.set_transfer_syntax(odil.registry.ExplicitVRLittleEndian) self.assertEqual( data_set.get_transfer_syntax().encode(), odil.registry.ExplicitVRLittleEndian) def test_empty_element_tag(self): tag = odil.registry.PatientName data_set = odil.DataSet() data_set.add(tag) self.assertFalse(data_set.empty()) self.assertEqual(data_set.size(), 1) self.assertEqual(len(data_set), 1) self.assertEqual(data_set.get_vr(tag), odil.VR.PN) self.assertTrue(data_set.empty(tag)) self.assertEqual(data_set.size(tag), 0) def _test_sequences(self, odil_contents, python_contents): if python_contents and isinstance(python_contents[0], bytearray): self.assertSequenceEqual( [bytearray([x for x in item]) for item in odil_contents], python_contents) else: self.assertSequenceEqual(list(odil_contents), list(python_contents)) def _test_element_value( self, data_set, tag, contents, type_check, accessor): self.assertTrue(data_set.has(tag)) self.assertEqual(data_set.empty(tag), len(contents)==0) self.assertEqual(data_set.size(tag), len(contents)) self.assertTrue(type_check(data_set, tag)) self._test_sequences(accessor(data_set, tag), contents) if not data_set.is_int(tag): with self.assertRaises(odil.Exception): data_set.as_int(tag) if not data_set.is_real(tag): with self.assertRaises(odil.Exception): data_set.as_real(tag) if not data_set.is_string(tag): with self.assertRaises(odil.Exception): data_set.as_string(tag) if not data_set.is_data_set(tag): with self.assertRaises(odil.Exception): data_set.as_data_set(tag) if not data_set.is_binary(tag): with self.assertRaises(odil.Exception): data_set.as_binary(tag) def _test_implicit_container( self, tag, empty_content, type_check, accessor): # Implicit empty content data_set = odil.DataSet() data_set.add(tag) self._test_element_value( data_set, tag, empty_content, type_check, accessor) # Explicit empty content data_set = odil.DataSet() data_set.add(tag, empty_content) self._test_element_value( data_set, tag, empty_content, type_check, accessor) def _test_container_no_vr(self, tag, contents, type_check, accessor): data_set = odil.DataSet() data_set.add(tag, contents) self._test_element_value(data_set, tag, contents, type_check, accessor) def _test_container_vr(self, tag, contents, vr, type_check, accessor): data_set = odil.DataSet() data_set.add(tag, contents, vr) self._test_element_value(data_set, tag, contents, type_check, accessor) def _test_modify(self, tag, contents, accessor): data_set = odil.DataSet() data_set.add(tag, [contents[0]]) if isinstance(contents[0], bytearray): accessor(data_set, tag).append( odil.Value.BinaryItem(contents[1])) else: accessor(data_set, tag).append(contents[1]) self._test_sequences(accessor(data_set, tag), contents) def _test_clear(self, tag, contents, type_check): data_set = odil.DataSet() data_set.add(tag, contents) data_set.clear(tag) self.assertTrue(type_check(data_set, tag)) self.assertTrue(data_set.empty(tag)) def _test_item(self, tag, contents, type_check, accessor): data_set = odil.DataSet() data_set.add(tag, contents) self._test_sequences(accessor(data_set[tag]), contents) data_set[tag] = odil.Element(contents[:1], data_set.get_vr(tag)) self._test_sequences(accessor(data_set[tag]), contents[:1]) def _test_element( self, tag, empty_content, contents, vr, data_set_type_check, data_set_accessor, element_type_check, element_accessor): self._test_implicit_container( tag, empty_content, data_set_type_check, data_set_accessor) self._test_container_no_vr( tag, contents, data_set_type_check, data_set_accessor) self._test_container_vr( tag, contents, vr, data_set_type_check, data_set_accessor) self._test_modify(tag, contents, data_set_accessor) self._test_clear(tag, contents, data_set_type_check) self._test_item(tag, contents, element_type_check, element_accessor) def test_int(self): self._test_element( odil.registry.Rows, odil.Value.Integers(), [1234, 5678], odil.VR.US, odil.DataSet.is_int, odil.DataSet.as_int, odil.Element.is_int, odil.Element.as_int) def test_real(self): self._test_element( odil.registry.SpacingBetweenSlices, odil.Value.Reals(), [12.34, 56.78], odil.VR.FL, odil.DataSet.is_real, odil.DataSet.as_real, odil.Element.is_real, odil.Element.as_real) def test_string(self): self._test_element( odil.registry.PatientID, odil.Value.Strings(), [b"foo", b"bar"], odil.VR.LT, odil.DataSet.is_string, odil.DataSet.as_string, odil.Element.is_string, odil.Element.as_string) def test_data_set(self): data_set_1 = odil.DataSet() data_set_1.add("PatientID", ["DJ1234"]) data_set_2 = odil.DataSet() data_set_2.add("EchoTime", [100]) self._test_element( odil.registry.ReferencedStudySequence, odil.Value.DataSets(), [data_set_1, data_set_2], odil.VR.SQ, odil.DataSet.is_data_set, odil.DataSet.as_data_set, odil.Element.is_data_set, odil.Element.as_data_set) def test_binary(self): self._test_element( odil.registry.BadPixelImage, odil.Value.Binary(), [bytearray([0x01, 0x02]), bytearray([0x03])], odil.VR.OB, odil.DataSet.is_binary, odil.DataSet.as_binary, odil.Element.is_binary, odil.Element.as_binary) def test_getitem(self): data_set = odil.DataSet() data_set.add("PatientName", ["Doe^John"]) self.assertSequenceEqual( data_set["PatientName"].as_string(), [b"Doe^John"]) self.assertRaises(Exception, lambda x: data_set["PatientID"]) def test_iter(self): data_set = odil.DataSet() data_set.add("PatientName", ["Doe^John"]) data_set.add("PatientID", ["DJ123"]) self.assertEqual( [x.get_name() for x in data_set], ["PatientName", "PatientID"]) def test_keys(self): data_set = odil.DataSet() data_set.add("PatientName", ["Doe^John"]) data_set.add("PatientID", ["DJ123"]) self.assertEqual( [x.get_name() for x in data_set.keys()], ["PatientName", "PatientID"]) def test_values(self): data_set = odil.DataSet() data_set.add("PatientName", ["Doe^John"]) data_set.add("PatientID", ["DJ123"]) self.assertEqual( [ [item for item in element.as_string()] for element in data_set.values()], [[b"Doe^John"], [b"DJ123"]]) def test_items(self): data_set = odil.DataSet() data_set.add("PatientName", ["Doe^John"]) data_set.add("PatientID", ["DJ123"]) self.assertSequenceEqual( [ [tag.get_name(), [item for item in element.as_string()]] for tag, element in data_set.items()], [["PatientName", [b"Doe^John"]], ["PatientID", [b"DJ123"]]]) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_echo_scp.py000066400000000000000000000037371362244656000207430ustar00rootroot00000000000000import multiprocessing import subprocess import sys import time import unittest import odil class TestEchoSCP(unittest.TestCase): def test_echo_scp_release(self): process = multiprocessing.Process(target=lambda: self.run_server(False)) process.start() time.sleep(0.5) client_code = self.run_client(False) process.join(2) server_code = process.exitcode self.assertEqual(client_code, 0) self.assertEqual(server_code, 0) def test_echo_scp_abort(self): process = multiprocessing.Process(target=lambda: self.run_server(True)) process.start() time.sleep(0.5) client_code = self.run_client(True) process.join(2) server_code = process.exitcode self.assertEqual(client_code, 0) self.assertEqual(server_code, 0) def run_client(self, use_abort): command = ["echoscu", "-q"] if use_abort: command.append("--abort") command.extend(["localhost", "11113"]) return subprocess.call(command) def run_server(self, use_abort): called = [False] def echo_callback(message): called[0] = True return 0 association = odil.Association() association.set_tcp_timeout(1) association.receive_association("v4", 11113) echo_scp = odil.EchoSCP(association) echo_scp.set_callback(echo_callback) message = association.receive_message() echo_scp(message) termination_ok = False try: association.receive_message() except odil.AssociationReleased: if not use_abort: termination_ok = True except odil.AssociationAborted: if use_abort: termination_ok = True if called[0] and termination_ok: sys.exit(0) else: sys.exit(1) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_echo_scu.py000066400000000000000000000013061362244656000207360ustar00rootroot00000000000000import os import sys import unittest import odil sys.path.append(os.path.dirname(os.path.dirname(__file__))) from peer_fixture_base import PeerFixtureBase class TestEchoSCU(PeerFixtureBase): def setUp(self): PeerFixtureBase.setUp( self, [ odil.AssociationParameters.PresentationContext( 3, odil.registry.VerificationSOPClass, [ odil.registry.ImplicitVRLittleEndian ], odil.AssociationParameters.PresentationContext.Role.SCU) ] ) def test_echo(self): echo = odil.EchoSCU(self.association) echo.echo() if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_element.py000066400000000000000000000135061362244656000206040ustar00rootroot00000000000000import re import unittest import odil class TestElement(unittest.TestCase): def _test_sequences(self, odil_contents, python_contents): if python_contents and isinstance(python_contents[0], bytearray): self.assertSequenceEqual( [bytearray([x for x in item]) for item in odil_contents], python_contents) else: self.assertSequenceEqual(list(odil_contents), list(python_contents)) def _test_value(self, element, vr, contents, type_check, accessor): self.assertTrue(type_check(element)) self.assertEqual(element.empty(), len(contents)==0) self.assertEqual(element.size(), len(contents)) self.assertEqual(len(element), len(contents)) self._test_sequences(accessor(element), contents) self.assertEqual(element.vr, vr) if not element.is_int(): with self.assertRaises(odil.Exception): element.as_int() if not element.is_real(): with self.assertRaises(odil.Exception): element.as_real() if not element.is_string(): with self.assertRaises(odil.Exception): element.as_string() if not element.is_data_set(): with self.assertRaises(odil.Exception): element.as_data_set() if not element.is_binary(): with self.assertRaises(odil.Exception): element.as_binary() def _test_implicit_container(self, empty_content, vr, type_check, accessor): element = odil.Element(vr) self._test_value(element, vr, empty_content, type_check, accessor) def _test_container(self, contents, vr, type_check, accessor): element = odil.Element(contents, vr) self._test_value(element, vr, contents, type_check, accessor) def _test_modify(self, contents, vr, accessor): value = odil.Element([contents[0]], vr) if isinstance(contents[0], bytearray): accessor(value).append(odil.Value.BinaryItem(contents[1])) else: accessor(value).append(contents[1]) self._test_sequences(accessor(value), contents) def _test_clear(self, contents, vr, type_check): element = odil.Element(contents, vr) element.clear() self.assertTrue(type_check(element)) self.assertTrue(element.empty()) def _test_equality(self, contents_1, contents_2, vr_1, vr_2): element_1 = odil.Element(contents_1, vr_1) element_2 = odil.Element(contents_1, vr_1) element_3 = odil.Element(contents_1, vr_2) element_4 = odil.Element(contents_2, vr_1) self.assertTrue(element_1 == element_2) self.assertFalse(element_1 == element_3) self.assertFalse(element_1 == element_4) self.assertFalse(element_1 != element_2) self.assertTrue(element_1 != element_3) self.assertTrue(element_1 != element_4) def _test( self, empty_content, contents, other_contents, vr, other_vr, type_check, accessor): self._test_implicit_container(empty_content, vr, type_check, accessor) self._test_container(contents, vr, type_check, accessor) self._test_modify(contents, vr, accessor) self._test_clear(contents, vr, type_check) self._test_equality(contents, other_contents, vr, other_vr) def test_implicit_type(self): for vr in dir(odil.VR): if re.match(r"^[A-Z]{2}$", vr) is None: continue vr = getattr(odil.VR, vr) if odil.is_int(vr): self._test_implicit_container( odil.Value.Integers(), vr, odil.Element.is_int, odil.Element.as_int) elif odil.is_real(vr): self._test_implicit_container( odil.Value.Reals(), vr, odil.Element.is_real, odil.Element.as_real) elif odil.is_string(vr): self._test_implicit_container( odil.Value.Strings(), vr, odil.Element.is_string, odil.Element.as_string) elif vr == odil.VR.SQ: self._test_implicit_container( odil.Value.DataSets(), vr, odil.Element.is_data_set, odil.Element.as_data_set) elif odil.is_binary(vr): self._test_implicit_container( odil.Value.Binary(), vr, odil.Element.is_binary, odil.Element.as_binary) def test_integers(self): self._test( odil.Value.Integers(), [1234, 5678], [9012, 3456], odil.VR.US, odil.VR.UL, odil.Element.is_int, odil.Element.as_int) def test_reals(self): self._test( odil.Value.Reals(), [12.34, 56.78], [1., 2.], odil.VR.FD, odil.VR.DS, odil.Element.is_real, odil.Element.as_real) def test_strings(self): self._test( odil.Value.Strings(), [b"foo", b"bar"], [b"plip", b"plop"], odil.VR.CS, odil.VR.UT, odil.Element.is_string, odil.Element.as_string) def test_data_sets(self): data_set_1 = odil.DataSet() data_set_1.add("PatientID", ["DJ1234"]) data_set_2 = odil.DataSet() data_set_2.add("EchoTime", [100]) self._test( odil.Value.DataSets(), [data_set_1, data_set_2], [data_set_2, data_set_1], odil.VR.SQ, odil.VR.UN, odil.Element.is_data_set, odil.Element.as_data_set) def test_binary(self): self._test( odil.Value.Binary(), [bytearray([0x01, 0x02]), bytearray([0x03])], [bytearray([0x04]), bytearray([0x05, 0x06])], odil.VR.OB, odil.VR.OW, odil.Element.is_binary, odil.Element.as_binary) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_elements_dictionary.py000066400000000000000000000034161362244656000232130ustar00rootroot00000000000000import unittest import odil class TestElementsDictionaryKey(unittest.TestCase): def test_empty_constructor(self): key = odil.ElementsDictionaryKey() def test_tag_constructor(self): key = odil.ElementsDictionaryKey(odil.registry.PatientName) def test_string_constructor(self): key = odil.ElementsDictionaryKey("60xx0010") class TestElementsDictionaryEntry(unittest.TestCase): def test_constructor(self): entry = odil.ElementsDictionaryEntry( "Patient's Name", "PatientName", "PN", "1") self.assertEqual(entry.name, "Patient's Name") self.assertEqual(entry.keyword, "PatientName") self.assertEqual(entry.vr, "PN") self.assertEqual(entry.vm, "1") class TestElementsDictionary(unittest.TestCase): def test_contains(self): self.assertTrue( odil.registry.PatientName in odil.registry.public_dictionary) self.assertFalse( odil.Tag(0x0001, 0x0001) in odil.registry.public_dictionary) self.assertTrue("60xx0010" in odil.registry.public_dictionary) self.assertFalse("foo" in odil.registry.public_dictionary) def test_get_item_tag(self): entry = odil.registry.public_dictionary[odil.registry.PatientName] self.assertEqual(entry.name, "Patient's Name") self.assertEqual(entry.keyword, "PatientName") self.assertEqual(entry.vr, "PN") self.assertEqual(entry.vm, "1") def test_get_item_string(self): entry = odil.registry.public_dictionary["60xx0010"] self.assertEqual(entry.name, "Overlay Rows") self.assertEqual(entry.keyword, "OverlayRows") self.assertEqual(entry.vr, "US") self.assertEqual(entry.vm, "1") if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_exception.py000066400000000000000000000012111362244656000211370ustar00rootroot00000000000000import unittest import odil class TestException(unittest.TestCase): def test_python_generic(self): with self.assertRaises(Exception): raise odil.Exception() def test_python_specific(self): with self.assertRaises(odil.Exception): raise odil.Exception() def test_cpp_generic(self): tag = odil.Tag(0xdead, 0xbeef) with self.assertRaises(Exception): tag.get_name() def test_cpp_specific(self): tag = odil.Tag(0xdead, 0xbeef) with self.assertRaises(odil.Exception): tag.get_name() if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_find_scp.py000066400000000000000000000061611362244656000207370ustar00rootroot00000000000000import glob import multiprocessing import os import subprocess import sys import time import unittest import odil class Generator(odil.FindSCP.DataSetGenerator): def __init__(self): odil.FindSCP.DataSetGenerator.__init__(self) self._responses = [] self._response_index = None def initialize(self, message): data_set_1 = odil.DataSet() data_set_1.add("PatientName", ["Hello^World"]) data_set_1.add("PatientID", ["1234"]) self._responses.append(data_set_1) data_set_2 = odil.DataSet() data_set_2.add("PatientName", ["Doe^John"]) data_set_2.add("PatientID", ["5678"]) self._responses.append(data_set_2) self._response_index = 0 def done(self): return (self._response_index == len(self._responses)) def next(self): self._response_index += 1 def get(self): return self._responses[self._response_index] class TestFindSCP(unittest.TestCase): def test_find_scp_release(self): process = multiprocessing.Process(target=self.run_server) process.start() time.sleep(0.5) data_sets = self.run_client() process.join(2) server_code = process.exitcode self.assertEqual(server_code, 0) self.assertEqual(len(data_sets), 2) self.assertEqual(len(data_sets[0]), 2) self.assertSequenceEqual( data_sets[0].as_string("PatientName"), [b"Hello^World"]) self.assertSequenceEqual(data_sets[0].as_string("PatientID"), [b"1234"]) self.assertSequenceEqual( data_sets[1].as_string("PatientName"), [b"Doe^John"]) self.assertSequenceEqual(data_sets[1].as_string("PatientID"), [b"5678"]) def run_client(self): command = [ "findscu", "-P", "-k", "QueryRetrieveLevel=PATIENT", "-k", "PatientID=*", "-k", "PatientName", "-q", "-X", "localhost", "11113"] retcode = subprocess.call(command) if retcode != 0: return [] files = sorted(glob.glob("rsp*")) data_sets = [] for file_ in files: with odil.open(file_, "rb") as fd: data_sets.append(odil.Reader.read_file(fd)[1]) for file_ in files: os.remove(file_) return data_sets def run_server(self): association = odil.Association() association.set_tcp_timeout(1) association.receive_association("v4", 11113) find_scp = odil.FindSCP(association) generator = Generator() find_scp.set_generator(generator) message = association.receive_message() find_scp(message) termination_ok = False try: association.receive_message() except odil.AssociationReleased: termination_ok = True except odil.AssociationAborted: pass if termination_ok: sys.exit(0) else: sys.exit(1) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_find_scu.py000066400000000000000000000031271362244656000207430ustar00rootroot00000000000000import os import sys import unittest import odil sys.path.append(os.path.dirname(os.path.dirname(__file__))) from peer_fixture_base import PeerFixtureBase class TestFindSCU(PeerFixtureBase): def setUp(self): PeerFixtureBase.setUp( self, [ odil.AssociationParameters.PresentationContext( 1, odil.registry.PatientRootQueryRetrieveInformationModelFIND, [ odil.registry.ImplicitVRLittleEndian ], odil.AssociationParameters.PresentationContext.Role.SCU) ] ) self.query = odil.DataSet() self.query.add("PatientName", ["Doe^John"]) self.query.add("QueryRetrieveLevel", ["PATIENT"]) self.query.add("PatientID") def test_without_callback(self): find = odil.FindSCU(self.association) find.set_affected_sop_class(odil.registry.PatientRootQueryRetrieveInformationModelFIND) data_sets = find.find(self.query) self.assertEqual(len(data_sets), 1) self.assertSequenceEqual( data_sets[0].as_string("PatientID"), [b"DJ001"]) def test_with_callback(self): data_sets = [] def callback(data_set): data_sets.append(data_set) find = odil.FindSCU(self.association) find.set_affected_sop_class(odil.registry.PatientRootQueryRetrieveInformationModelFIND) find.find(self.query, callback) self.assertEqual(len(data_sets), 1) self.assertSequenceEqual( data_sets[0].as_string("PatientID"), [b"DJ001"]) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_get_scp.py000066400000000000000000000102731362244656000205750ustar00rootroot00000000000000import glob import multiprocessing import os import subprocess import sys import time import unittest import odil class Generator(odil.GetSCP.DataSetGenerator): def __init__(self): odil.GetSCP.DataSetGenerator.__init__(self) self._responses = [] self._response_index = None def initialize(self, message): data_set_1 = odil.DataSet() data_set_1.add("SOPClassUID", [odil.registry.RawDataStorage]) data_set_1.add( "SOPInstanceUID", ["1.2.826.0.1.3680043.9.5560.3127449359877365688774406533090568532"]) data_set_1.add("PatientName", ["Hello^World"]) data_set_1.add("PatientID", ["1234"]) self._responses.append(data_set_1) data_set_2 = odil.DataSet() data_set_2.add("SOPClassUID", [odil.registry.RawDataStorage]) data_set_2.add( "SOPInstanceUID", ["1.2.826.0.1.3680043.9.5560.3221615743193123463515381981101110692"]) data_set_2.add("PatientName", ["Doe^John"]) data_set_2.add("PatientID", ["5678"]) self._responses.append(data_set_2) self._response_index = 0 def done(self): return (self._response_index == len(self._responses)) def next(self): self._response_index += 1 def get(self): return self._responses[self._response_index] def count(self): return 2 class TestGetSCP(unittest.TestCase): def test_get_scp_release(self): process = multiprocessing.Process(target=self.run_server) process.start() time.sleep(0.5) data_sets = self.run_client() process.join(2) server_code = process.exitcode self.assertEqual(server_code, 0) self.assertEqual(len(data_sets), 2) self.assertEqual(len(data_sets[0]), 4) self.assertSequenceEqual( data_sets[0].as_string("SOPClassUID"), [odil.registry.RawDataStorage]) self.assertSequenceEqual( data_sets[0].as_string("SOPInstanceUID"), [b"1.2.826.0.1.3680043.9.5560.3127449359877365688774406533090568532"]) self.assertSequenceEqual( data_sets[0].as_string("PatientName"), [b"Hello^World"]) self.assertSequenceEqual(data_sets[0].as_string("PatientID"), [b"1234"]) self.assertSequenceEqual( data_sets[1].as_string("SOPClassUID"), [odil.registry.RawDataStorage]) self.assertSequenceEqual( data_sets[1].as_string("SOPInstanceUID"), [b"1.2.826.0.1.3680043.9.5560.3221615743193123463515381981101110692"]) self.assertSequenceEqual( data_sets[1].as_string("PatientName"), [b"Doe^John"]) self.assertSequenceEqual(data_sets[1].as_string("PatientID"), [b"5678"]) def run_client(self): command = [ "getscu", "-ll", "error", "-P", "-k", "QueryRetrieveLevel=PATIENT", "-k", "PatientID=*", "-k", "PatientName", "+B", "localhost", "11113"] retcode = subprocess.call(command) if retcode != 0: return [] files = sorted(glob.glob("{}*".format(odil.uid_prefix))) data_sets = [] for file_ in files: with odil.open(file_, "rb") as fd: data_sets.append(odil.Reader.read_file(fd)[1]) for file_ in files: os.remove(file_) return data_sets def run_server(self): association = odil.Association() association.set_tcp_timeout(1) association.receive_association("v4", 11113) get_scp = odil.GetSCP(association) generator = Generator() get_scp.set_generator(generator) message = association.receive_message() get_scp(message) termination_ok = False try: association.receive_message() except odil.AssociationReleased: termination_ok = True except odil.AssociationAborted: pass if termination_ok: sys.exit(0) else: sys.exit(1) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_get_scu.py000066400000000000000000000065061362244656000206060ustar00rootroot00000000000000import os import sys import unittest import odil sys.path.append(os.path.dirname(os.path.dirname(__file__))) from peer_fixture_base import PeerFixtureBase class TestGetSCU(PeerFixtureBase): def setUp(self): PeerFixtureBase.setUp( self, [ odil.AssociationParameters.PresentationContext( 1, odil.registry.PatientRootQueryRetrieveInformationModelGET, [ odil.registry.ImplicitVRLittleEndian ], odil.AssociationParameters.PresentationContext.Role.SCU ), odil.AssociationParameters.PresentationContext( 3, odil.registry.RawDataStorage, [ odil.registry.ImplicitVRLittleEndian ], odil.AssociationParameters.PresentationContext.Role.SCP ) ]) self.query = odil.DataSet() self.query.add("PatientName", ["Doe^John"]) self.query.add("QueryRetrieveLevel", ["PATIENT"]) def test_without_callback(self): get = odil.GetSCU(self.association) get.set_affected_sop_class(odil.registry.PatientRootQueryRetrieveInformationModelGET) data_sets = get.get(self.query) self.assertEqual(len(data_sets), 1) self.assertSequenceEqual( data_sets[0].as_string("SOPInstanceUID"), [b"2.25.95090344942250266709587559073467305647"]) def test_both_callbacks(self): data_sets = [] messages = [] def store_callback(data_set): data_sets.append(data_set) def get_callback(message): messages.append(message) get = odil.GetSCU(self.association) get.set_affected_sop_class( odil.registry.PatientRootQueryRetrieveInformationModelGET) get.get(self.query, store_callback, get_callback) self.assertEqual(len(data_sets), 1) self.assertSequenceEqual( data_sets[0].as_string("SOPInstanceUID"), [b"2.25.95090344942250266709587559073467305647"]) self.assertEqual(len(messages), 2) self.assertEqual( messages[0].get_number_of_remaining_sub_operations(), 0) self.assertEqual( messages[0].get_number_of_completed_sub_operations(), 1) self.assertEqual(messages[0].get_number_of_failed_sub_operations(), 0) self.assertEqual(messages[0].get_number_of_warning_sub_operations(), 0) self.assertFalse(messages[1].has_number_of_remaining_sub_operations()) self.assertEqual( messages[1].has_number_of_completed_sub_operations(), 1) self.assertEqual( messages[1].get_number_of_failed_sub_operations(), 0) self.assertEqual( messages[1].get_number_of_warning_sub_operations(), 0) def test_only_store_callback(self): data_sets = [] def store_callback(data_set): data_sets.append(data_set) get = odil.GetSCU(self.association) get.set_affected_sop_class( odil.registry.PatientRootQueryRetrieveInformationModelGET) get.get(self.query, store_callback) self.assertEqual(len(data_sets), 1) self.assertSequenceEqual( data_sets[0].as_string("SOPInstanceUID"), [b"2.25.95090344942250266709587559073467305647"]) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_json_converter.py000066400000000000000000000014061362244656000222070ustar00rootroot00000000000000import re import unittest import odil class TestJSONConverter(unittest.TestCase): def setUp(self): self.data_set = odil.DataSet() self.data_set.add("PatientName", ["Foo^Bar"]) self.json = """{"00100010":{"Value":[{"Alphabetic":"Foo^Bar"}],"vr":"PN"}}""" def test_ugly_print(self): serialized = odil.as_json(self.data_set, False) self.assertEqual(re.sub(r"\s+", "", serialized), self.json) def test_pretty_print(self): serialized = odil.as_json(self.data_set, True) self.assertEqual(re.sub(r"\s+", "", serialized), self.json) def test_as_dataset(self): data_set = odil.from_json(self.json) self.assertTrue(data_set == self.data_set) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_move_scp.py000066400000000000000000000120651362244656000207650ustar00rootroot00000000000000import glob import multiprocessing import os import subprocess import sys import time import unittest import odil class Generator(odil.MoveSCP.DataSetGenerator): def __init__(self, association): odil.MoveSCP.DataSetGenerator.__init__(self) self._association = association self._responses = [] self._response_index = None def initialize(self, message): data_set_1 = odil.DataSet() data_set_1.add("SOPClassUID", [odil.registry.RawDataStorage]) data_set_1.add( "SOPInstanceUID", ["1.2.826.0.1.3680043.9.5560.3127449359877365688774406533090568532"]) data_set_1.add("PatientName", ["Hello^World"]) data_set_1.add("PatientID", ["1234"]) self._responses.append(data_set_1) data_set_2 = odil.DataSet() data_set_2.add("SOPClassUID", [odil.registry.RawDataStorage]) data_set_2.add( "SOPInstanceUID", ["1.2.826.0.1.3680043.9.5560.3221615743193123463515381981101110692"]) data_set_2.add("PatientName", ["Doe^John"]) data_set_2.add("PatientID", ["5678"]) self._responses.append(data_set_2) self._response_index = 0 def done(self): return (self._response_index == len(self._responses)) def next(self): self._response_index += 1 def get(self): return self._responses[self._response_index] def count(self): return 2 def get_association(self, request): move_association = odil.Association() move_association.set_peer_host(self._association.get_peer_host()) move_association.set_peer_port(11114) presentation_contexts = [ odil.AssociationParameters.PresentationContext( 1, odil.registry.RawDataStorage, [odil.registry.ImplicitVRLittleEndian], odil.AssociationParameters.PresentationContext.Role.SCU)] move_association.update_parameters()\ .set_calling_ae_title( self._association.get_negotiated_parameters().get_called_ae_title())\ .set_called_ae_title(request.get_move_destination())\ .set_presentation_contexts(presentation_contexts) return move_association class TestMoveSCP(unittest.TestCase): def test_move_scp_release(self): process = multiprocessing.Process(target=self.run_server) process.start() time.sleep(0.5) data_sets = self.run_client() process.join(2) server_code = process.exitcode self.assertEqual(server_code, 0) self.assertEqual(len(data_sets), 2) self.assertEqual(len(data_sets[0]), 4) self.assertSequenceEqual( data_sets[0].as_string("SOPClassUID"), [odil.registry.RawDataStorage]) self.assertSequenceEqual( data_sets[0].as_string("SOPInstanceUID"), [b"1.2.826.0.1.3680043.9.5560.3127449359877365688774406533090568532"]) self.assertSequenceEqual( data_sets[0].as_string("PatientName"), [b"Hello^World"]) self.assertSequenceEqual(data_sets[0].as_string("PatientID"), [b"1234"]) self.assertSequenceEqual( data_sets[1].as_string("SOPClassUID"), [odil.registry.RawDataStorage]) self.assertSequenceEqual( data_sets[1].as_string("SOPInstanceUID"), [b"1.2.826.0.1.3680043.9.5560.3221615743193123463515381981101110692"]) self.assertSequenceEqual( data_sets[1].as_string("PatientName"), [b"Doe^John"]) self.assertSequenceEqual(data_sets[1].as_string("PatientID"), [b"5678"]) def run_client(self): command = [ "movescu", "-ll", "error", "-P", "-k", "QueryRetrieveLevel=PATIENT", "-k", "PatientID=*", "-k", "PatientName", "+P", "11114", "localhost", "11113"] retcode = subprocess.call(command) if retcode != 0: return [] files = sorted(glob.glob("RAW*")) data_sets = [] for file_ in files: with odil.open(file_, "rb") as fd: data_sets.append(odil.Reader.read_file(fd)[1]) for file_ in files: os.remove(file_) return data_sets def run_server(self): association = odil.Association() association.set_tcp_timeout(1) association.receive_association("v4", 11113) move_scp = odil.MoveSCP(association) generator = Generator(association) move_scp.set_generator(generator) message = association.receive_message() move_scp(message) termination_ok = False try: association.receive_message() except odil.AssociationReleased: termination_ok = True except odil.AssociationAborted: pass if termination_ok: sys.exit(0) else: sys.exit(1) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_move_scu.py000066400000000000000000000101611362244656000207650ustar00rootroot00000000000000import os import sys import unittest import odil sys.path.append(os.path.dirname(os.path.dirname(__file__))) from peer_fixture_base import PeerFixtureBase class TestMoveSCU(PeerFixtureBase): def setUp(self): PeerFixtureBase.setUp( self, [ odil.AssociationParameters.PresentationContext( 1, odil.registry.PatientRootQueryRetrieveInformationModelMOVE, [ odil.registry.ImplicitVRLittleEndian ], odil.AssociationParameters.PresentationContext.Role.SCU ), odil.AssociationParameters.PresentationContext( 3, odil.registry.RawDataStorage, [ odil.registry.ImplicitVRLittleEndian ], odil.AssociationParameters.PresentationContext.Role.SCP ) ]) self.query = odil.DataSet() self.query.add("PatientName", ["Doe^John"]) self.query.add("QueryRetrieveLevel", ["PATIENT"]) def test_default_constructor(self): move = odil.MoveSCU(self.association) self.assertEqual(move.get_move_destination(), "") self.assertEqual(move.get_incoming_port(), 0) def test_move_destination(self): move = odil.MoveSCU(self.association) move.set_move_destination("remote") self.assertEqual(move.get_move_destination(), "remote") def test_incoming_port(self): move = odil.MoveSCU(self.association) move.set_incoming_port(11113) self.assertEqual(move.get_incoming_port(), 11113) def test_without_callback(self): move = odil.MoveSCU(self.association) move.set_affected_sop_class(odil.registry.PatientRootQueryRetrieveInformationModelMOVE) move.set_move_destination("LOCAL") move.set_incoming_port(11113) data_sets = move.move(self.query) self.assertEqual(len(data_sets), 1) self.assertSequenceEqual( data_sets[0].as_string("SOPInstanceUID"), [b"2.25.95090344942250266709587559073467305647"]) def test_both_callback(self): data_sets = [] messages = [] def store_callback(data_set): data_sets.append(data_set) def move_callback(message): messages.append(message) move = odil.MoveSCU(self.association) move.set_affected_sop_class(odil.registry.PatientRootQueryRetrieveInformationModelMOVE) move.set_move_destination("LOCAL") move.set_incoming_port(11113) move.move(self.query, store_callback, move_callback) self.assertEqual(len(data_sets), 1) self.assertSequenceEqual( data_sets[0].as_string("SOPInstanceUID"), [b"2.25.95090344942250266709587559073467305647"]) self.assertEqual(len(messages), 2) self.assertEqual( messages[0].get_number_of_remaining_sub_operations(), 0) self.assertEqual( messages[0].get_number_of_completed_sub_operations(), 1) self.assertEqual(messages[0].get_number_of_failed_sub_operations(), 0) self.assertEqual(messages[0].get_number_of_warning_sub_operations(), 0) self.assertFalse(messages[1].has_number_of_remaining_sub_operations()) self.assertEqual( messages[1].has_number_of_completed_sub_operations(), 1) self.assertEqual( messages[1].get_number_of_failed_sub_operations(), 0) self.assertEqual( messages[1].get_number_of_warning_sub_operations(), 0) def test_store_only_callback(self): data_sets = [] def store_callback(data_set): data_sets.append(data_set) move = odil.MoveSCU(self.association) move.set_affected_sop_class(odil.registry.PatientRootQueryRetrieveInformationModelMOVE) move.set_move_destination("LOCAL") move.set_incoming_port(11113) move.move(self.query, store_callback, None) self.assertEqual(len(data_sets), 1) self.assertSequenceEqual( data_sets[0].as_string("SOPInstanceUID"), [b"2.25.95090344942250266709587559073467305647"]) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_reader.py000066400000000000000000000071101362244656000204070ustar00rootroot00000000000000import unittest from io import BytesIO import odil class TestReader(unittest.TestCase): def test_constructor(self): stream = odil.iostream(BytesIO()) reader = odil.Reader(stream, odil.registry.ImplicitVRLittleEndian) self.assertEqual( reader.transfer_syntax.encode(), odil.registry.ImplicitVRLittleEndian) self.assertEqual(reader.byte_ordering, odil.ByteOrdering.LittleEndian) self.assertFalse(reader.explicit_vr) self.assertFalse(reader.keep_group_length) def test_constructor_no_default(self): stream = odil.iostream(BytesIO()) reader = odil.Reader( stream, odil.registry.ExplicitVRBigEndian_Retired, True) self.assertEqual( reader.transfer_syntax.encode(), odil.registry.ExplicitVRBigEndian_Retired) self.assertEqual(reader.byte_ordering, odil.ByteOrdering.BigEndian) self.assertTrue(reader.explicit_vr) self.assertTrue(reader.keep_group_length) def test_read_data_set(self): string_io = BytesIO( b"\x10\x00\x10\x00PN\x07\x00Foo^Bar" b"\x10\x00\x20\x00CS\x03\x00FOO" ) stream = odil.iostream(string_io) reader = odil.Reader(stream, odil.registry.ExplicitVRLittleEndian) data_set = reader.read_data_set() self.assertEqual(data_set.size(), 2) self.assertSequenceEqual(data_set.as_string("PatientName"), [b"Foo^Bar"]) self.assertSequenceEqual(data_set.as_string("PatientID"), [b"FOO"]) def test_read_data_set_halt_condition(self): string_io = BytesIO( b"\x10\x00\x10\x00" b"PN" b"\x08\x00" b"Foo^Bar " b"\x10\x00\x20\x00" b"LO" b"\x04\x00" b"FOO " ) stream = odil.iostream(string_io) reader = odil.Reader(stream, odil.registry.ExplicitVRLittleEndian) data_set = reader.read_data_set(lambda x: x==odil.registry.PatientID) self.assertEqual(data_set.size(), 1) self.assertSequenceEqual(data_set.as_string("PatientName"), [b"Foo^Bar"]) def test_read_tag(self): string_io = BytesIO(b"\x10\x00\x20\x00") stream = odil.iostream(string_io) reader = odil.Reader(stream, odil.registry.ExplicitVRLittleEndian) self.assertEqual(reader.read_tag(), odil.registry.PatientID) def test_read_length(self): string_io = BytesIO(b"\x34\x12") stream = odil.iostream(string_io) reader = odil.Reader(stream, odil.registry.ExplicitVRLittleEndian) self.assertEqual(reader.read_length(odil.VR.CS), 0x1234) def test_read_element(self): string_io = BytesIO(b"PN\x08\x00Foo^Bar ") stream = odil.iostream(string_io) reader = odil.Reader(stream, odil.registry.ExplicitVRLittleEndian) self.assertEqual( reader.read_element(odil.registry.PatientName), odil.Element([b"Foo^Bar"], odil.VR.PN)) def test_read_file(self): data = ( 128*b"\x00"+b"DICM"+ b"\x02\x00\x10\x00" b"UI" b"\x14\x00" b"1.2.840.10008.1.2.1\x00" b"\x10\x00\x10\x00" b"PN" b"\x08\x00" b"Foo^Bar " ) string_io = BytesIO(data) stream = odil.iostream(string_io) header, data_set = odil.Reader.read_file(stream) self.assertEqual(len(header), 1) self.assertSequenceEqual( header.as_string("TransferSyntaxUID"), [odil.registry.ExplicitVRLittleEndian]) self.assertEqual(len(data_set), 1) self.assertSequenceEqual(data_set.as_string("PatientName"), [b"Foo^Bar"]) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_registry.py000066400000000000000000000020041362244656000210120ustar00rootroot00000000000000import unittest import odil class TestRegistry(unittest.TestCase): def test_attribute(self): tag = odil.registry.PatientID self.assertEqual(tag.group, 0x0010) self.assertEqual(tag.element, 0x0020) def test_public_dictionary(self): tag = odil.registry.PatientID self.assertTrue(tag in odil.registry.public_dictionary) entry = odil.registry.public_dictionary[tag] self.assertEqual(entry.name, "Patient ID") self.assertEqual(entry.keyword, "PatientID") self.assertEqual(entry.vr, "LO") self.assertEqual(entry.vm, "1") def test_uids_dictionary(self): uid = "1.2.840.10008.1.2.1" self.assertTrue(uid in odil.registry.uids_dictionary) entry = odil.registry.uids_dictionary[uid] self.assertEqual(entry.name, "Explicit VR Little Endian") self.assertEqual(entry.keyword, "ExplicitVRLittleEndian") self.assertEqual(entry.type, "Transfer Syntax") if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_scp_dispatcher.py000066400000000000000000000026451362244656000221500ustar00rootroot00000000000000import multiprocessing import subprocess import sys import time import unittest import odil class TestSCPDispatcher(unittest.TestCase): def test_echo(self): process = multiprocessing.Process(target=lambda: self.run_server(False)) process.start() time.sleep(0.5) client_code = self.run_client() process.join(2) server_code = process.exitcode self.assertEqual(client_code, 0) self.assertEqual(server_code, 0) def run_client(self): command = ["echoscu", "-q"] command.extend(["localhost", "11113"]) return subprocess.call(command) def run_server(self, use_abort): called = [False] def echo_callback(message): called[0] = True return 0 association = odil.Association() association.set_tcp_timeout(1) association.receive_association("v4", 11113) echo_scp = odil.EchoSCP(association) echo_scp.set_callback(echo_callback) dispatcher = odil.SCPDispatcher(association) dispatcher.set_echo_scp(echo_scp) dispatcher.dispatch() termination_ok = False try: association.receive_message() except odil.AssociationReleased: termination_ok = True if called[0] and termination_ok: sys.exit(0) else: sys.exit(1) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_store_scp.py000066400000000000000000000043721362244656000211550ustar00rootroot00000000000000import multiprocessing import os import shutil import subprocess import sys import tempfile import time import unittest import odil class TestStoreSCP(unittest.TestCase): def __init__(self, *args, **kwargs): unittest.TestCase.__init__(self, *args, **kwargs) self.directory = None def setUp(self): self.directory = tempfile.mkdtemp() with open(os.path.join(self.directory, "data.txt"), "w") as fd: fd.write( """ (0008,0016) UI =RawDataStorage (0008,0018) UI [2.25.95090344942250266709587559073467305647] (0010,0010) PN [Doe^John] (0010,0020) LO [DJ001] """) subprocess.check_call([ "dump2dcm", "--write-xfer-little", os.path.join(self.directory, "data.txt"), os.path.join(self.directory, "data.dcm") ]) def tearDown(self): shutil.rmtree(self.directory) def test_store_scp_release(self): process = multiprocessing.Process(target=lambda: self.run_server(False)) process.start() time.sleep(0.5) client_code = self.run_client() process.join(2) server_code = process.exitcode self.assertEqual(client_code, 0) self.assertEqual(server_code, 0) def run_client(self): command = [ "storescu", "-ll", "error", "localhost", "11113", os.path.join(self.directory, "data.dcm")] return subprocess.call(command) def run_server(self, use_abort): called = [False] def store_callback(message): called[0] = True return 0 association = odil.Association() association.set_tcp_timeout(1) association.receive_association("v4", 11113) store_scp = odil.StoreSCP(association) store_scp.set_callback(store_callback) message = association.receive_message() store_scp(message) termination_ok = False try: association.receive_message() except odil.AssociationReleased: termination_ok = True if called[0] and termination_ok: sys.exit(0) else: sys.exit(1) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_store_scu.py000066400000000000000000000031571362244656000211620ustar00rootroot00000000000000import os import sys import unittest import odil sys.path.append(os.path.dirname(os.path.dirname(__file__))) from peer_fixture_base import PeerFixtureBase class TestStoreSCU(PeerFixtureBase): def setUp(self): PeerFixtureBase.setUp( self, [ odil.AssociationParameters.PresentationContext( 1, odil.registry.RawDataStorage, [ odil.registry.ImplicitVRLittleEndian ], odil.AssociationParameters.PresentationContext.Role.SCU ) ]) self.data_set = odil.DataSet() self.data_set.add("ImageType", ["ORIGINAL", "PRIMARY", "OTHER"]) self.data_set.add("PatientID", ["1234"]) self.data_set.add( "StudyInstanceUID", ["2.25.386726390606491051215227596277040710"]) self.data_set.add( "SeriesInstanceUID", ["2.25.235367796740370588607388995952651763168"]) self.data_set.add("SOPClassUID", [odil.registry.RawDataStorage]) self.data_set.add( "SOPInstanceUID", ["2.25.294312554735929033890522327215919068328"]) def test_affected_sop_class_uid(self): store = odil.StoreSCU(self.association) store.set_affected_sop_class(self.data_set) self.assertEqual( store.get_affected_sop_class().encode(), odil.registry.RawDataStorage) def test_store(self): store = odil.StoreSCU(self.association) store.set_affected_sop_class(self.data_set) store.store(self.data_set) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_tag.py000066400000000000000000000056471362244656000177350ustar00rootroot00000000000000import unittest import odil class TestTag(unittest.TestCase): def test_two_ints_constructor(self): tag = odil.Tag(0x1234, 0x5678) self.assertEqual(tag.group, 0x1234) self.assertEqual(tag.element, 0x5678) def test_one_int_constructor(self): tag = odil.Tag(0x12345678) self.assertEqual(tag.group, 0x1234) self.assertEqual(tag.element, 0x5678) def test_string_constructor(self): tag = odil.Tag("PatientID") self.assertEqual(tag.group, 0x0010) self.assertEqual(tag.element, 0x0020) def test_group(self): tag = odil.Tag(0x1234, 0x5678) tag.group = 0x4321 self.assertEqual(tag.group, 0x4321) self.assertEqual(tag.element, 0x5678) def test_element(self): tag = odil.Tag(0x1234, 0x5678) tag.element = 0x8765 self.assertEqual(tag.group, 0x1234) self.assertEqual(tag.element, 0x8765) def test_is_private(self): public = odil.Tag(0x1234, 0x5678) self.assertTrue(not public.is_private()) private = odil.Tag(0x1235, 0x5678) self.assertTrue(private.is_private()) def test_get_name(self): tag = odil.Tag(0x0010, 0x0020) self.assertEqual(tag.get_name(), "PatientID") def test_equality(self): tag1 = odil.Tag(0x1234, 0x5678) tag2 = odil.Tag(0x4321, 0x8765) self.assertTrue(tag1 == tag1) self.assertFalse(tag1 == tag2) def test_inequality(self): tag1 = odil.Tag(0x1234, 0x5678) tag2 = odil.Tag(0x4321, 0x8765) self.assertFalse(tag1 != tag1) self.assertTrue(tag1 != tag2) def test_less(self): tag1 = odil.Tag(0x1234, 0x5678) tag2 = odil.Tag(0x4321, 0x8765) self.assertTrue(tag1 < tag2) self.assertFalse(tag2 < tag1) def test_greater(self): tag1 = odil.Tag(0x1234, 0x5678) tag2 = odil.Tag(0x4321, 0x8765) self.assertFalse(tag1 > tag2) self.assertTrue(tag2 > tag1) def test_less_or_equal(self): tag1 = odil.Tag(0x1234, 0x5678) tag2 = odil.Tag(0x4321, 0x8765) self.assertTrue(tag1 <= tag2) self.assertTrue(tag1 <= tag1) self.assertFalse(tag2 <= tag1) def test_greater_or_equal(self): tag1 = odil.Tag(0x1234, 0x5678) tag2 = odil.Tag(0x4321, 0x8765) self.assertFalse(tag1 >= tag2) self.assertTrue(tag1 >= tag1) self.assertTrue(tag2 >= tag1) def test_str(self): tag = odil.Tag(0x1234, 0x5678) self.assertEqual(str(tag), "12345678") def test_hash(self): tag = odil.Tag( odil.registry.PatientName.group, odil.registry.PatientName.element) d = {tag: True} self.assertTrue(tag in d) self.assertTrue(odil.registry.PatientName in d) other = odil.Tag( odil.registry.PatientID.group, odil.registry.PatientID.element) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_uid.py000066400000000000000000000005371362244656000177340ustar00rootroot00000000000000import unittest import odil class TestUID(unittest.TestCase): def test_uid_prefix(self): self.assertEqual(odil.uid_prefix, "1.2.826.0.1.3680043.9.5560") def test_uid_prefix(self): uid = odil.generate_uid() self.assertEqual(uid[:len(odil.uid_prefix)], odil.uid_prefix) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_uids_dictionary.py000066400000000000000000000013521362244656000223400ustar00rootroot00000000000000import unittest import odil class TestUIDsDictionaryEntry(unittest.TestCase): def test_constructor(self): entry = odil.UIDsDictionaryEntry( "MR Image Storage", "MRImageStorage", "SOP Class") self.assertEqual(entry.name, "MR Image Storage") self.assertEqual(entry.keyword, "MRImageStorage") self.assertEqual(entry.type, "SOP Class") class TestUIDsDictionary(unittest.TestCase): def test_get_item(self): entry = odil.registry.uids_dictionary["1.2.840.10008.5.1.4.1.1.4"] self.assertEqual(entry.name, "MR Image Storage") self.assertEqual(entry.keyword, "MRImageStorage") self.assertEqual(entry.type, "SOP Class") if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_value.py000066400000000000000000000162021362244656000202630ustar00rootroot00000000000000#encoding: utf-8 import unittest import odil class TestValue(unittest.TestCase): def _test_sequences(self, odil_contents, python_contents): self.assertEqual(len(odil_contents), len(python_contents)) if python_contents and isinstance(python_contents[0], bytearray): self.assertSequenceEqual( [bytearray([x for x in item]) for item in odil_contents], python_contents) # Access from start self.assertEqual(bytearray(odil_contents[0]), python_contents[0]) # Access from end self.assertEqual(bytearray(odil_contents[-1]), python_contents[-1]) # Slice self.assertSequenceEqual( [bytearray([x for x in item]) for item in odil_contents[0:-1]], python_contents[0:-1]) else: self.assertSequenceEqual(list(odil_contents), list(python_contents)) if python_contents: # Access from start self.assertEqual(odil_contents[0], python_contents[0]) # Access from end self.assertEqual(odil_contents[-1], python_contents[-1]) # Slice self.assertSequenceEqual(odil_contents[0:-1], python_contents[0:-1]) def _test_contents(self, value, contents, type_, accessor): self.assertEqual(value.type, type_) self.assertEqual(value.empty(), len(contents) == 0) self.assertEqual(value.size(), len(contents)) self.assertEqual(len(value), len(contents)) self._test_sequences(accessor(value), contents) if type_ != odil.Value.Type.Integers: with self.assertRaises(odil.Exception): value.as_integers() if type_ != odil.Value.Type.Reals: with self.assertRaises(odil.Exception): value.as_reals() if type_ != odil.Value.Type.Strings: with self.assertRaises(odil.Exception): value.as_strings() if type_ != odil.Value.Type.DataSets: with self.assertRaises(odil.Exception): value.as_data_sets() if type_ != odil.Value.Type.Binary: with self.assertRaises(odil.Exception): value.as_binary() def _test_container(self, contents, type_, accessor): value = odil.Value(contents) self._test_contents(value, contents, type_, accessor) def _test_modify(self, contents, accessor): value = odil.Value([contents[0]]) if isinstance(contents[0], bytearray): accessor(value).append(odil.Value.BinaryItem(contents[1])) else: accessor(value).append(contents[1]) self._test_sequences(accessor(value), contents) def _test_clear(self, contents, type_): value = odil.Value(contents) value.clear() self.assertEqual(value.type, type_) self.assertTrue(value.empty()) def _test_equality(self, contents_1, contents_2): value_1 = odil.Value(contents_1) value_2 = odil.Value(contents_1) value_3 = odil.Value(contents_2) value_4 = odil.Value(contents_2) self.assertTrue(value_1 == value_2) self.assertFalse(value_1 == value_3) self.assertFalse(value_1 == value_4) self.assertFalse(value_1 != value_2) self.assertTrue(value_1 != value_3) self.assertTrue(value_1 != value_4) def _test(self, empty_content, contents, other_contents, type_, accessor): self._test_container(empty_content, type_, accessor) self._test_container(contents, type_, accessor) self._test_modify(contents, accessor) self._test_clear(contents, type_) self._test_equality(contents, other_contents) def test_integers(self): self._test( odil.Value.Integers(), [1234, 5678], [9012, 3456], odil.Value.Type.Integers, odil.Value.as_integers) def test_reals(self): self._test( odil.Value.Reals(), [12.34, 56.78], [1., 2.], odil.Value.Type.Reals, odil.Value.as_reals) def test_strings(self): self._test( odil.Value.Strings(), [b"foo", b"bar"], [b"plip", b"plop"], odil.Value.Type.Strings, odil.Value.as_strings) # FIXME: strings in DICOM are byte-string, with some VR requiring # conversion based on Specific Character Set. In Boost.Python, some # explicit conversion are used (unicode <-> std::string in Python 3). def test_data_sets(self): data_set_1 = odil.DataSet() data_set_1.add("PatientID", ["DJ1234"]) data_set_2 = odil.DataSet() data_set_2.add("EchoTime", [100]) self._test( odil.Value.DataSets(), [data_set_1, data_set_2], [data_set_2, data_set_1], odil.Value.Type.DataSets, odil.Value.as_data_sets) def test_binary(self): self._test( odil.Value.Binary(), [bytearray([0x01, 0x02]), bytearray([0x03])], [bytearray([0x04]), bytearray([0x05, 0x06])], odil.Value.Type.Binary, odil.Value.as_binary) def test_unknown_constructor(self): class Foo(object): pass items = [Foo()] with self.assertRaises(odil.Exception): odil.Value(items) class TestValueIntegers(unittest.TestCase): def test_empty_constructor(self): data = odil.Value.Integers() self.assertEqual([x for x in data], []) def test_sequence_constructor(self): items = [1, 2, 3] data = odil.Value.Integers(items) self.assertEqual([x for x in data], items) class TestValueReals(unittest.TestCase): def test_empty_constructor(self): data = odil.Value.Reals() self.assertEqual([x for x in data], []) def test_sequence_constructor(self): items = [1.1, 2, 3.3] data = odil.Value.Reals(items) self.assertEqual([x for x in data], items) class TestValueStrings(unittest.TestCase): def test_empty_constructor(self): data = odil.Value.Strings() self.assertEqual([x for x in data], []) def test_sequence_constructor(self): items = [b"foo", b"bar"] data = odil.Value.Strings(items) self.assertEqual([x for x in data], items) class TestValueDataSets(unittest.TestCase): def test_empty_constructor(self): data = odil.Value.DataSets() self.assertEqual([x for x in data], []) def test_sequence_constructor(self): items = [odil.DataSet(), odil.DataSet()] data = odil.Value.DataSets(items) self.assertEqual([x for x in data], items) class TestValueBinary(unittest.TestCase): def test_empty_constructor(self): data = odil.Value.Binary() self.assertEqual([x for x in data], []) def test_sequence_constructor(self): items = [odil.Value.BinaryItem([1, 2, 3])] data = odil.Value.Binary(items) self.assertEqual([x for x in data[0]], [x for x in items[0]]) def test_buffer(self): item = odil.Value.BinaryItem([1, 2, 3]) memory_view = item.get_memory_view() self.assertTrue(isinstance(memory_view, memoryview)) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_vr.py000066400000000000000000000012211362244656000175710ustar00rootroot00000000000000import unittest import odil class TestVR(unittest.TestCase): def test_bytes_constructor(self): vr = odil.VR(b"UT") self.assertEqual(vr, odil.VR.UT) def test_unicode_constructor(self): vr = odil.VR(u"UT") self.assertEqual(vr, odil.VR.UT) def test_invalid_bytes_constructor(self): with self.assertRaises(Exception): odil.VR(b"XX") def test_invalid_unicode_constructor(self): with self.assertRaises(Exception): odil.VR(u"XX") def test_string(self): vr = odil.VR.AE self.assertEqual(str(vr), "AE") if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_vr_finder.py000066400000000000000000000006621362244656000211300ustar00rootroot00000000000000import unittest import odil class TestVRFinder(unittest.TestCase): def test_default_finder(self): finder = odil.VRFinder() data_set = odil.DataSet() data_set.add(odil.registry.BitsAllocated, [8]) vr = finder( odil.Tag(0x7fe0, 0x0010), data_set, odil.registry.ExplicitVRLittleEndian) self.assertEqual(vr, odil.VR.OB) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_writer.py000066400000000000000000000064771362244656000205000ustar00rootroot00000000000000import unittest from io import BytesIO import odil class TestWriter(unittest.TestCase): def test_constructor_1(self): stream = odil.iostream(BytesIO()) writer = odil.Writer(stream, odil.ByteOrdering.LittleEndian, False) self.assertEqual(writer.byte_ordering, odil.ByteOrdering.LittleEndian) self.assertFalse(writer.explicit_vr) self.assertEqual( writer.item_encoding, odil.Writer.ItemEncoding.ExplicitLength) self.assertFalse(writer.use_group_length) def test_constructor_2(self): stream = odil.iostream(BytesIO()) writer = odil.Writer( stream, odil.registry.ExplicitVRBigEndian_Retired) self.assertEqual(writer.byte_ordering, odil.ByteOrdering.BigEndian) self.assertTrue(writer.explicit_vr) self.assertEqual( writer.item_encoding, odil.Writer.ItemEncoding.ExplicitLength) self.assertFalse(writer.use_group_length) def test_write_data_set(self): data_set = odil.DataSet() data_set.add("PatientName", ["Foo^Bar"]) data_set.add("PatientID", ["FOO"]) string_io = BytesIO() stream = odil.iostream(string_io) writer = odil.Writer(stream, odil.registry.ExplicitVRLittleEndian) writer.write_data_set(data_set) self.assertEqual( string_io.getvalue(), b"\x10\x00\x10\x00" b"PN" b"\x08\x00" b"Foo^Bar " b"\x10\x00\x20\x00" b"LO" b"\x04\x00" b"FOO " ) def test_write_tag(self): string_io = BytesIO() stream = odil.iostream(string_io) writer = odil.Writer(stream, odil.registry.ExplicitVRLittleEndian) writer.write_tag(odil.registry.PatientID) self.assertEqual(string_io.getvalue(), b"\x10\x00\x20\x00") def test_write_element(self): string_io = BytesIO() stream = odil.iostream(string_io) writer = odil.Writer(stream, odil.registry.ExplicitVRLittleEndian) writer.write_element(odil.Element(["Foo^Bar"], odil.VR.PN)) self.assertEqual(string_io.getvalue(), b"PN\x08\x00Foo^Bar ") def test_write_file(self): data_set = odil.DataSet() data_set.add("SOPClassUID", ["1.2.3.4"]) data_set.add("SOPInstanceUID", ["1.2.3.4.5"]) data_set.add("PatientName", ["Foo^Bar"]) string_io = BytesIO() stream = odil.iostream(string_io) odil.Writer.write_file( data_set, stream, odil.DataSet(), odil.registry.ExplicitVRLittleEndian) data = ( 128*b"\0"+b"DICM"+ b"\x02\x00\x00\x00" b"UL" b"\x04\x00" b"\x80\x00\x00\x00" b"\x02\x00\x01\x00" b"OB" b"\x00\x00" b"\x02\x00\x00\x00" b"\x00\x01" b"\x02\x00\x02\x00" b"UI" b"\x08\x00" b"1.2.3.4\x00" b"\x02\x00\x03\x00" b"UI" b"\x0a\x00" b"1.2.3.4.5\x00" b"\x02\x00\x10\x00" b"UI" b"\x14\x00" b"1.2.840.10008.1.2.1\x00" b"\x02\x00\x12\x00" b"UI" b"\x1e\x00" b"1.2.826.0.1.3680043.9.55600.0\x00" b"\x02\x00\x13\x00" b"SH" b"\x06\x00" b"Odil 0" b"\x08\x00\x16\x00" b"UI" b"\x08\x00" b"1.2.3.4\x00" b"\x08\x00\x18\x00" b"UI" b"\x0a\x00" b"1.2.3.4.5\x00" b"\x10\x00\x10\x00" b"PN" b"\x08\x00" b"Foo^Bar ") self.assertEqual(string_io.getvalue(), data) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/test_xml_converter.py000066400000000000000000000024421362244656000220370ustar00rootroot00000000000000import re import unittest import odil class TestXMLConverter(unittest.TestCase): def setUp(self): self.data_set = odil.DataSet() self.data_set.add("PatientName", ["Foo^Bar"]) self.xml = ( """""" "" """""" """""" "" "Foo" "Bar" "" "" "" "" ) def test_ugly_print(self): serialized = odil.as_xml(self.data_set, False) self.assertEqual(re.sub(r"\n+", "", serialized), self.xml) def test_pretty_print(self): serialized = odil.as_xml(self.data_set, True) serialized = re.sub(r"\n\s+", "\n", serialized, re.M) serialized = re.sub(r"\n", "", serialized) self.assertEqual(serialized, self.xml) def test_as_dataset(self): data_set = odil.from_xml(self.xml) self.assertTrue(data_set == self.data_set) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/webservices/000077500000000000000000000000001362244656000200565ustar00rootroot00000000000000odil-0.11.0/tests/wrappers/webservices/__init__.py000066400000000000000000000000001362244656000221550ustar00rootroot00000000000000odil-0.11.0/tests/wrappers/webservices/test_http_request.py000066400000000000000000000040551362244656000242220ustar00rootroot00000000000000import unittest import odil class TestHTTPRequest(unittest.TestCase): def test_default_constructor(self): request = odil.webservices.HTTPRequest() self.assertEqual(request.get_method(), "") self.assertEqual(str(request.get_target()), "") self.assertEqual(request.get_http_version(), "HTTP/1.0") self.assertEqual(dict(request.get_headers()), {}) self.assertEqual(request.get_body(), b"") def test_full_constructor(self): request = odil.webservices.HTTPRequest( method="GET", target=odil.webservices.URL.parse("http://example.com/foo?bar=quux"), http_version="HTTP/1.1", headers={"foo": "bar"}, body="body") self.assertEqual(request.get_method(), "GET") self.assertEqual( str(request.get_target()), "http://example.com/foo?bar=quux") self.assertEqual(request.get_http_version(), "HTTP/1.1") self.assertEqual(dict(request.get_headers()), {"foo":"bar"}) self.assertEqual(request.get_body(), b"body") def test_method(self): request = odil.webservices.HTTPRequest() request.set_method("POST") self.assertEqual(request.get_method(), "POST") def test_target(self): request = odil.webservices.HTTPRequest() request.set_target( odil.webservices.URL.parse("http://example.com/foo?bar=quux")) self.assertEqual( str(request.get_target()), "http://example.com/foo?bar=quux") def test_http_version(self): request = odil.webservices.HTTPRequest() request.set_http_version("HTTP/1.1") self.assertEqual(request.get_http_version(), "HTTP/1.1") def test_headers(self): request = odil.webservices.HTTPRequest() request.set_headers({"foo": "bar"}) self.assertEqual(dict(request.get_headers()), {"foo": "bar"}) def test_body(self): request = odil.webservices.HTTPRequest() request.set_body("body") self.assertEqual(request.get_body(), b"body") if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/webservices/test_http_response.py000066400000000000000000000035351362244656000243720ustar00rootroot00000000000000import unittest import odil class TestHTTPResponse(unittest.TestCase): def test_default_constructor(self): response = odil.webservices.HTTPResponse() self.assertEqual(response.get_http_version(), "") self.assertEqual(response.get_status(), 0) self.assertEqual(response.get_reason(), "") self.assertEqual(dict(response.get_headers()), {}) self.assertEqual(response.get_body(), b"") def test_full_constructor(self): response = odil.webservices.HTTPResponse( http_version="HTTP/1.1", status=404, reason="not found", headers={"foo": "bar"}, body="body") self.assertEqual(response.get_http_version(), "HTTP/1.1") self.assertEqual(response.get_status(), 404) self.assertEqual(response.get_reason(), "not found") self.assertEqual(dict(response.get_headers()), {"foo":"bar"}) self.assertEqual(response.get_body(), b"body") def test_http_version(self): response = odil.webservices.HTTPResponse() response.set_http_version("HTTP/1.1") self.assertEqual(response.get_http_version(), "HTTP/1.1") def test_status(self): response = odil.webservices.HTTPResponse() response.set_status(200) self.assertEqual(response.get_status(), 200) def test_reason(self): response = odil.webservices.HTTPResponse() response.set_reason("OK") self.assertEqual(response.get_reason(), "OK") def test_headers(self): response = odil.webservices.HTTPResponse() response.set_headers({"foo": "bar"}) self.assertEqual(dict(response.get_headers()), {"foo": "bar"}) def test_body(self): response = odil.webservices.HTTPResponse() response.set_body("body") self.assertEqual(response.get_body(), b"body") if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/webservices/test_message.py000066400000000000000000000034161362244656000231170ustar00rootroot00000000000000import unittest import odil class TestMessage(unittest.TestCase): def test_default_constructor(self): message = odil.webservices.Message() self.assertEqual(dict(message.get_headers()), {}) self.assertEqual(message.get_body(), b"") def test_full_constructor(self): message = odil.webservices.Message(headers={"foo": "bar"}, body="body") self.assertEqual(dict(message.get_headers()), {"foo": "bar"}) self.assertEqual(message.get_body(), b"body") def test_existing_header(self): message = odil.webservices.Message({"foo": "bar", "plip": "plop"}) self.assertTrue(message.has_header("foo")) self.assertEqual(message.get_header("foo"), "bar") def test_missing_header(self): message = odil.webservices.Message({"foo": "bar", "plip": "plop"}) self.assertFalse(message.has_header("none")) with self.assertRaises(odil.Exception): message.get_header("none") def test_set_headers(self): message = odil.webservices.Message() message.set_headers({"foo": "bar", "plip": "plop"}) self.assertEqual( dict(message.get_headers()), {"foo": "bar", "plip": "plop"}) def test_modify_header(self): message = odil.webservices.Message({"foo": "bar", "plip": "plop"}) message.set_header("foo", "baz") self.assertEqual(message.get_header("foo"), "baz") def test_add_header(self): message = odil.webservices.Message() message.set_header("foo", "baz") self.assertEqual(message.get_header("foo"), "baz") def test_body(self): message = odil.webservices.Message() message.set_body("body") self.assertEqual(message.get_body(), b"body") if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/webservices/test_qido_rs_request.py000066400000000000000000000173551362244656000247120ustar00rootroot00000000000000import unittest import odil class TestQIDORSRequest(unittest.TestCase): base_url_http = odil.webservices.URL("http", "example.com", "/dicom", "", "") full_url = odil.webservices.URL( "http", "example.com", "/dicom/studies/1.2/instances", "PatientName=TOTO&" "SharedFunctionalGroupsSequence.EffectiveEchoTime=10.5&" "includefield=00200020&includefield=52009229.00200035", "" ) def test_url_constructor(self): request = odil.webservices.QIDORSRequest(self.base_url_http) self.assertEqual(request.get_base_url(), self.base_url_http) self.assertEqual(request.get_media_type(), "") self.assertEqual(request.get_representation(), odil.webservices.Utils.Representation.DICOM_JSON) self.assertEqual(request.get_url(), odil.webservices.URL()) self.assertEqual(request.get_selector(), odil.webservices.Selector()) self.assertEqual(request.get_query_data_set(), None) self.assertFalse(request.get_fuzzymatching()) self.assertEqual(request.get_limit(), -1) self.assertEqual(request.get_offset(), 0) def test_base_url(self): http_request = odil.webservices.HTTPRequest("GET", self.full_url) http_request.set_header("Accept", "application/dicom+json") request = odil.webservices.QIDORSRequest(http_request) self.assertEqual(request.get_base_url(), self.base_url_http) def test_set_base_url(self): request = odil.webservices.QIDORSRequest(odil.webservices.URL()) def test_full_url(self): http_request = odil.webservices.HTTPRequest("GET", self.full_url) http_request.set_header("Accept", "application/dicom+json") request = odil.webservices.QIDORSRequest(http_request) full_url_alphabetic = odil.webservices.URL( "http", "example.com", "/dicom/studies/1.2/instances", "PatientName=TOTO&" "SharedFunctionalGroupsSequence.EffectiveEchoTime=10.5&" "includefield=PatientOrientation&" "includefield=SharedFunctionalGroupsSequence.ImageOrientation&" "fuzzymatching=false", "" ) # Check for whole url self.assertEqual(request.get_url(), full_url_alphabetic) def test_selector(self): http_request = odil.webservices.HTTPRequest("GET", self.full_url) http_request.set_header("Accept", "application/dicom+json") request = odil.webservices.QIDORSRequest(http_request) # Check For Selector self.assertEqual(request.get_selector().get_path(False), "/studies/1.2/instances") def test_query_dataset(self): http_request = odil.webservices.HTTPRequest("GET", self.full_url) http_request.set_header("Accept", "application/dicom+json") request = odil.webservices.QIDORSRequest(http_request) # Check For DataSet dataset = odil.DataSet() dataset.add(odil.Tag("PatientName"),["TOTO"]) dataset.add(odil.Tag("00200020")) shared = odil.DataSet() shared.add(odil.Tag("EffectiveEchoTime"), [10.5]) shared.add(odil.Tag("00200035")) dataset.add(odil.Tag("SharedFunctionalGroupsSequence"), [shared]) self.assertEqual(request.get_query_data_set(), dataset) def test_fuzzy_limit_offset(self): http_request = odil.webservices.HTTPRequest("GET", self.full_url) http_request.set_header("Accept", "application/dicom+json") request = odil.webservices.QIDORSRequest(http_request) # Check for fuzzymatching self.assertFalse(request.get_fuzzymatching()) # Check for limit - offset self.assertEqual(request.get_limit(), -1) self.assertEqual(request.get_offset(), 0) def test_media_type_json(self): http_request = odil.webservices.HTTPRequest("GET", self.full_url) http_request.set_header("Accept", "application/dicom+json") request = odil.webservices.QIDORSRequest(http_request) self.assertEqual(request.get_representation(), odil.webservices.Utils.Representation.DICOM_JSON) def test_media_type_xml(self): http_request = odil.webservices.HTTPRequest("GET", self.full_url) http_request.set_header("Accept", "multipart/related;type=application/dicom+xml") request = odil.webservices.QIDORSRequest(http_request) self.assertEqual(request.get_representation(), odil.webservices.Utils.Representation.DICOM_XML) def test_media_type_unrecognized(self): http_request = odil.webservices.HTTPRequest("GET", self.full_url) http_request.set_header("Accept", "multipart/related;type=application/dicom+json") with self.assertRaises(odil.Exception): odil.webservices.QIDORSRequest(http_request) def test_request_data_set(self): # Selector selector = odil.webservices.Selector() selector.set_study("1.2").set_instance("") # DataSet dataset = odil.DataSet() dataset.add(odil.Tag("PatientName"),["TOTO"]) dataset.add(odil.Tag("00200020")) shared = odil.DataSet() shared.add(odil.Tag("StudyDate"), [20130509]) shared.add(odil.Tag("00200035")) dataset.add(odil.Tag("SharedFunctionalGroupsSequence"), [shared]) request = odil.webservices.QIDORSRequest(self.base_url_http) request.request_datasets( odil.webservices.Utils.Representation.DICOM_XML, selector, dataset ) full_url_alphabetic_tags = odil.webservices.URL( "http", "example.com", "/dicom/studies/1.2/instances", "PatientName=TOTO&" "SharedFunctionalGroupsSequence.StudyDate=20130509&" "includefield=PatientOrientation&" "includefield=SharedFunctionalGroupsSequence.ImageOrientation&" "fuzzymatching=false", "" ) self.assertEqual(request.get_http_request().get_target(), full_url_alphabetic_tags) self.assertEqual(request.get_http_request().get_method(), "GET") def test_equality(self): full_url_cpy = odil.webservices.URL( "http", "example.com", "/dicom/studies/1.2/instances", "SharedFunctionalGroupsSequence.EffectiveEchoTime=10.5&" "includefield=00200020&" "includefield=52009229.00200035&" "PatientName=TOTO" "" ) http_request_base = odil.webservices.HTTPRequest("GET", self.full_url) http_request_base.set_header("Accept", "application/dicom+json") request = odil.webservices.QIDORSRequest(http_request_base) http_request_cpy = odil.webservices.HTTPRequest("GET", full_url_cpy) http_request_cpy.set_header("Accept", "application/dicom+json") request_cpy = odil.webservices.QIDORSRequest(http_request_cpy) self.assertTrue(request == request_cpy) def test_difference(self): full_url_cpy = odil.webservices.URL( "http", "example.com", "/dicom/studies/1.2/instances", "SharedFunctionalGroupsSequence.EffectiveEchoTime=10.5&" "includefield=00200020&" "includefield=52009229.00200035&" "PatientName=TUTU" "" ) http_request_base = odil.webservices.HTTPRequest("GET", self.full_url) http_request_base.set_header("Accept", "application/dicom+json") request = odil.webservices.QIDORSRequest(http_request_base) http_request_cpy = odil.webservices.HTTPRequest("GET", full_url_cpy) http_request_cpy.set_header("Accept", "application/dicom+json") request_cpy = odil.webservices.QIDORSRequest(http_request_cpy) self.assertIsNot(request, request_cpy) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/webservices/test_qido_rs_response.py000066400000000000000000000061751362244656000250560ustar00rootroot00000000000000import email import json import sys import unittest import odil class TestQIDORSResponse(unittest.TestCase): data_set_1 = odil.DataSet() data_set_1.add("SOPClassUID", [odil.registry.RawDataStorage]) data_set_1.add("SOPInstanceUID", ["1.2.3.4"]) data_set_1.add("PatientID", ["DJ1234"]) data_set_1.add("PixelSpacing", [1.5, 2.5]) data_set_2 = odil.DataSet() data_set_2.add("SOPClassUID", [odil.registry.MRImageStorage]) data_set_2.add("SOPInstanceUID", ["1.2.3.5"]) data_set_2.add("PatientName", ["Doe^John"]) data_set_2.add("PatientAge", ["042Y"]) data_sets = [data_set_1, data_set_2] def test_constructor(self): response = odil.webservices.QIDORSResponse() self.assertEqual(len(response.get_data_sets()), 0) def test_data_sets(self): response = odil.webservices.QIDORSResponse() response.set_data_sets(self.data_sets) self.assertSequenceEqual(response.get_data_sets(), self.data_sets) def test_Response_DicomJson(self): response = odil.webservices.QIDORSResponse() response.set_representation(odil.webservices.Utils.Representation.DICOM_JSON) response.set_data_sets(self.data_sets) self.assertEqual(response.get_media_type(), "application/dicom+json") self.assertEqual(response.get_representation(), odil.webservices.Utils.Representation.DICOM_JSON) http = response.get_http_response() content_type = http.get_header("Content-Type") self.assertEqual(content_type, "application/dicom+json") json_http = json.loads(http.get_body().decode()) json_ds = [ json.loads(odil.as_json(x)) for x in self.data_sets ] self.assertEqual(json_ds, json_http) def test_Response_DicomXML(self): response = odil.webservices.QIDORSResponse() response.set_representation(odil.webservices.Utils.Representation.DICOM_XML) response.set_data_sets(self.data_sets) self.assertEqual(response.get_media_type(), "application/dicom+xml") self.assertEqual(response.get_representation(), odil.webservices.Utils.Representation.DICOM_XML) http = response.get_http_response() message_bytes = [ name.encode()+b": "+value.encode() for (name, value) in http.get_headers().items()] message_bytes.append(http.get_body()) message_bytes = b"\r\n".join(message_bytes) if sys.version_info[0] >= 3: msg = email.message_from_bytes(message_bytes) else: msg = email.message_from_string(message_bytes) self.assertTrue(msg.is_multipart()) i = 0 for part in msg.walk(): if part.get_content_type() == "application/dicom+xml": self.assertEqual(odil.as_xml(self.data_sets[i], False), part.get_payload()) i = i+1 self.assertEqual(i, len(self.data_sets)) def test_empty_response(self): response = odil.webservices.QIDORSResponse() http = response.get_http_response() self.assertEqual(http.get_status(), 204) self.assertEqual(http.get_reason(), "No Content") if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/webservices/test_selector.py000066400000000000000000000027611362244656000233150ustar00rootroot00000000000000import unittest import odil class TestSelector(unittest.TestCase): def test_default_constructor(self): selector = odil.webservices.Selector() self.assertFalse(selector.is_study_present()) self.assertFalse(selector.is_series_present()) self.assertFalse(selector.is_instance_present()) self.assertEqual(list(selector.get_frames()), []) def test_full_constructor(self): selector = odil.webservices.Selector({"studies" :"1.2", "series" :"3.4", "instances" :"5.6"}, [7,8]) self.assertTrue(selector.is_study_present()) self.assertEqual(selector.get_study(), "1.2") self.assertTrue(selector.is_series_present()) self.assertEqual(selector.get_series(), "3.4") self.assertTrue(selector.is_instance_present()) self.assertEqual(selector.get_instance(), "5.6") self.assertEqual(list(selector.get_frames()), [7,8]) def test_get_path_no_frames(self): selector = odil.webservices.Selector( {"studies" :"1.2", "series" :"3.4", "instances" :"5.6"}, [7,8]) self.assertEqual( selector.get_path(False), "/studies/1.2/series/3.4/instances/5.6") def test_get_path_frames(self): selector = odil.webservices.Selector( {"studies" :"1.2", "series" :"3.4", "instances" :"5.6"}, [7,8]) self.assertEqual( selector.get_path(True), "/studies/1.2/series/3.4/instances/5.6/frames/7,8") if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/webservices/test_stow_rs_request.py000066400000000000000000000137441362244656000247500ustar00rootroot00000000000000import email import sys import unittest import odil class TestSTOWRSRequest(unittest.TestCase): base_url_http = odil.webservices.URL("http", "example.com", "/dicom", "", "") full_url = odil.webservices.URL( "http", # scheme "example.com", # authority "/dicom/studies/1.2", # path "", # query "" # fragment ) selector = odil.webservices.Selector({"studies" : "1.2"}) def setUp(self): data_set_1 = odil.DataSet() data_set_1.add("SOPClassUID", [odil.registry.RawDataStorage]) data_set_1.add("SOPInstanceUID", ["1.2.3.4"]) data_set_1.add("PatientID", ["DJ1234"]) data_set_1.add("PixelSpacing", [1.5, 2.5]) data_set_2 = odil.DataSet() data_set_2.add("SOPClassUID", [odil.registry.MRImageStorage]) data_set_2.add("SOPInstanceUID", ["1.2.3.5"]) data_set_2.add("PatientName", ["Doe^John"]) data_set_2.add("PatientAge", ["042Y"]) bin = odil.Value.BinaryItem() bin.append(0x01) bin.append(0x02) bin.append(0x03) bin.append(0x04) binary = odil.Value.Binary() binary.append(bin) # Fix Binary factory with BinaryItem data_set_2.add("Signature", [bytearray([0x01, 0x02, 0x03, 0x04])]) self.data_sets = [data_set_1, data_set_2] def test_constructor_baseUrl(self): request = odil.webservices.STOWRSRequest(self.base_url_http) self.assertEqual(request.get_base_url(), self.base_url_http) def test_base_url(self): request = odil.webservices.STOWRSRequest(self.base_url_http) base_url_http2 = odil.webservices.URL("http", "second_example.com", "/dicom", "", "") request.set_base_url(base_url_http2) self.assertEqual(request.get_base_url(), base_url_http2) def test_constructor_http(self): http_request = odil.webservices.HTTPRequest("POST", self.full_url) http_request.set_header("Content-Type", "multipart/related;type=application/dicom") request = odil.webservices.STOWRSRequest(http_request) # Check for full_url self.assertEqual(request.get_url(), self.full_url) # Check for media type self.assertEqual(request.get_media_type(), "application/dicom") # Check for representation self.assertEqual(request.get_representation(), odil.webservices.Utils.Representation.DICOM) # Check for selector self.assertEqual(request.get_selector(), self.selector) def test_fail_request_datasets(self): request = odil.webservices.STOWRSRequest(self.base_url_http) invalid_selector = odil.webservices.Selector({"studies" : "1.2", "series" : "3.4"}) with self.assertRaises(odil.Exception): request.request_dicom(self.data_sets, invalid_selector, odil.webservices.Utils.Representation.DICOM) def test_get_http_request(self): #DICOM+XML request = odil.webservices.STOWRSRequest(self.base_url_http) request.request_dicom(self.data_sets, self.selector, odil.webservices.Utils.Representation.DICOM_XML) http_request = request.get_http_request() # Check for http_request content self.assertTrue(http_request.has_header("Content-Type")) self.assertEqual(http_request.get_method(), "POST") self.assertEqual(http_request.get_http_version(), "HTTP/1.0") msg = self._http_message_to_email_message(http_request) self.assertTrue(msg.is_multipart()) i = 0 for part in msg.walk(): if part.get_param("type") != "application/dicom+xml": i = i+1 self.assertEqual(i, 3) # 3 parts (One for each dataset and 1 for binary) self.assertEqual(request.get_base_url(), self.base_url_http) #DICOM request.request_dicom(self.data_sets, self.selector, odil.webservices.Utils.Representation.DICOM) http_request_dcm = request.get_http_request() msg = self._http_message_to_email_message(http_request_dcm) self.assertTrue(msg.is_multipart()) i = 0 for part in msg.walk(): if part.get_param("type") != "application/dicom": i = i+1 self.assertEqual(i, 2) # 3 parts (One for each dataset and 1 for binary) def test_data_sets_equality(self): request = odil.webservices.STOWRSRequest(self.base_url_http) request.request_dicom([self.data_sets[1]], self.selector, odil.webservices.Utils.Representation.DICOM_JSON) http_request = request.get_http_request() self.assertSequenceEqual(request.get_data_sets(), [self.data_sets[1]]) def test_equality(self): request = odil.webservices.STOWRSRequest(self.base_url_http) request.request_dicom(self.data_sets, self.selector, odil.webservices.Utils.Representation.DICOM) http_request = request.get_http_request() second_request = odil.webservices.STOWRSRequest(http_request) self.assertEqual(request, second_request) def test_equality_2 (self): request = odil.webservices.STOWRSRequest(self.base_url_http) request.request_dicom(self.data_sets, self.selector, odil.webservices.Utils.Representation.DICOM_XML) http_request = request.get_http_request() request_copy = odil.webservices.STOWRSRequest(http_request) self.assertEqual(request_copy, request) self.assertSequenceEqual(self.data_sets, request_copy.get_data_sets()) def tearDown(self): self.data_sets = None def _http_message_to_email_message(self, http_message): message_bytes = [ name.encode()+b": "+value.encode() for (name, value) in http_message.get_headers().items()] message_bytes.append(http_message.get_body()) message_bytes = b"\r\n".join(message_bytes) if sys.version_info[0] >= 3: email_message = email.message_from_bytes(message_bytes) else: email_message = email.message_from_string(message_bytes) return email_message if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/webservices/test_stow_rs_response.py000066400000000000000000000133371362244656000251140ustar00rootroot00000000000000import email import json import sys import unittest import odil class TestSTOWRSResponse(unittest.TestCase): def setUp(self): data_set_1 = odil.DataSet() data_set_1.add("RetrieveURL", ["http://example.com/dicom/studies/7.8.9"]) data_set_1.add("FailedSOPSequence", [odil.DataSet()], odil.VR.SQ) referenceSOPSequence_item1 = odil.DataSet() referenceSOPSequence_item1.add("ReferencedSOPClassUID", [odil.registry.MRImageStorage]) referenceSOPSequence_item1.add("ReferencedSOPInstanceUID", ["1.2.3.6.1"]) referenceSOPSequence_item1.add("RetrieveURL", ["http://example.com/dicom/studies/7.8.9/series/4.5/instances/1.2.3.6.1"]) referenceSOPSequence_item2 = odil.DataSet() referenceSOPSequence_item2.add("ReferencedSOPClassUID", [odil.registry.RawDataStorage]) referenceSOPSequence_item2.add("ReferencedSOPInstanceUID", ["1.2.3.6.2"]) referenceSOPSequence_item2.add("RetrieveURL", ["http://example.com/dicom/studies/7.8.9/series/4.5/instances/1.2.3.6.2"]) data_set_1.add("ReferencedSOPSequence", [referenceSOPSequence_item1, referenceSOPSequence_item2]) self.data_set = data_set_1 def test_constructor(self): response = odil.webservices.STOWRSResponse() self.assertEqual(len(response.get_store_instance_responses()), 0) def test_respondDICOM_XML(self): response = odil.webservices.STOWRSResponse() response.set_representation(odil.webservices.Utils.Representation.DICOM_XML) response.set_store_instance_responses(self.data_set) self.assertEqual(response.get_media_type(), "application/dicom+xml") self.assertEqual(response.get_representation(), odil.webservices.Utils.Representation.DICOM_XML) http = response.get_http_response() msg = self._http_message_to_email_message(http) for part in msg.walk(): if part.get_content_type() == "application/dicom+xml": self.assertEqual(odil.as_xml(self.data_set, False), part.get_payload()) def test_respondDICOM_JSON(self): response = odil.webservices.STOWRSResponse() response.set_representation(odil.webservices.Utils.Representation.DICOM_JSON) response.set_store_instance_responses(self.data_set) self.assertEqual(response.get_media_type(), "application/dicom+json") self.assertEqual(response.get_representation(), odil.webservices.Utils.Representation.DICOM_JSON) http = response.get_http_response() msg = self._http_message_to_email_message(http) self.assertFalse(msg.is_multipart()) self.assertTrue(msg.get_content_type(), "application/dicom+json") odil_json = [json.loads(odil.as_json(self.data_set))] http_json = json.loads(http.get_body().decode()) self.assertSequenceEqual(http_json, odil_json) def test_equality(self): http_response = odil.webservices.HTTPResponse() http_response.set_header("Content-Type", "application/dicom+xml") http_response.set_status(200) http_response.set_reason("OK") http_response.set_body(odil.as_xml(self.data_set, False)) response = odil.webservices.STOWRSResponse(http_response) response_2 = odil.webservices.STOWRSResponse() response_2.set_representation(odil.webservices.Utils.Representation.DICOM_XML) response_2.set_store_instance_responses(self.data_set) response_2.set_warning(False) response_2.set_reason("OK") self.assertEqual(response, response_2) def test_difference(self): http_response = odil.webservices.HTTPResponse() http_response.set_header("Content-Type", "application/dicom+xml") http_response.set_status(200) http_response.set_reason("OK") http_response.set_body(odil.as_xml(self.data_set, False)) response = odil.webservices.STOWRSResponse(http_response) http_response_2 = odil.webservices.HTTPResponse() http_response_2.set_header("Content-Type", "application/dicom+xml") http_response_2.set_status(400) http_response_2.set_reason("Bad Request") http_response_2.set_body(odil.as_xml(self.data_set, False)) response_2 = odil.webservices.STOWRSResponse(http_response_2) self.assertTrue(response != response_2) def test_reason(self): response = odil.webservices.STOWRSResponse() response.set_reason("Unauthorized") self.assertEqual(response.get_reason(), "Unauthorized") def test_invalid_reason(self): response = odil.webservices.STOWRSResponse() with self.assertRaises(odil.Exception): self.assertRaises(response.set_reason("Unrecognize")) def test_failureCode(self): response = odil.webservices.STOWRSResponse() response.set_failure_code(503) self.assertEqual(response.get_failure_code(), 503) def test_Representation(self): response = odil.webservices.STOWRSResponse() response.set_representation(odil.webservices.Utils.Representation.DICOM_JSON) self.assertTrue(response.get_representation(), odil.webservices.Utils.Representation.DICOM_JSON) def tearDown(self): self.data_set = None def _http_message_to_email_message(self, http_message): message_bytes = [ name.encode()+b": "+value.encode() for (name, value) in http_message.get_headers().items()] message_bytes.append(http_message.get_body()) message_bytes = b"\r\n".join(message_bytes) if sys.version_info[0] >= 3: email_message = email.message_from_bytes(message_bytes) else: email_message = email.message_from_string(message_bytes) return email_message if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/webservices/test_url.py000066400000000000000000000017251362244656000222760ustar00rootroot00000000000000import unittest import odil class TestURL(unittest.TestCase): def test_parse(self): url = odil.webservices.URL.parse("http://foo.com/bar?plip=plop#here") self.assertEqual(url.scheme, "http") self.assertEqual(url.authority, "foo.com") self.assertEqual(url.path, "/bar") self.assertEqual(url.query, "plip=plop") self.assertEqual(url.fragment, "here") def test_default_arguments(self): url = odil.webservices.URL("http", "foo.com", "/bar", fragment="here") self.assertEqual(url.scheme, "http") self.assertEqual(url.authority, "foo.com") self.assertEqual(url.path, "/bar") self.assertEqual(url.query, "") self.assertEqual(url.fragment, "here") def test_serialize(self): url = odil.webservices.URL("http", "foo.com", "/bar", "plip=plop", "here") self.assertEqual(str(url), "http://foo.com/bar?plip=plop#here") if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/webservices/test_wado_rs_request.py000066400000000000000000000047571362244656000247120ustar00rootroot00000000000000import unittest import odil class TestWADORSRequest(unittest.TestCase): def test_default_constructor(self): request = odil.webservices.WADORSRequest() self.assertEqual(str(request.get_base_url()), "") self.assertEqual(request.get_transfer_syntax(), "") self.assertEqual(request.get_character_set(), "") self.assertFalse(request.get_include_media_type_in_query()) self.assertFalse(request.get_include_character_set_in_query()) def test_http_request_constructor(self): http_request = odil.webservices.HTTPRequest( "GET", odil.webservices.URL.parse("/foo/studies/1.2"), headers={"Accept": "multipart/related;type=application/dicom"}) wado_rs_request = odil.webservices.WADORSRequest(http_request) self.assertEqual(str(wado_rs_request.get_base_url()), "/foo") self.assertEqual( wado_rs_request.get_transfer_syntax().encode(), odil.registry.ExplicitVRLittleEndian) self.assertEqual(wado_rs_request.get_character_set(), "UTF-8") self.assertFalse(wado_rs_request.get_include_media_type_in_query()) self.assertFalse(wado_rs_request.get_include_character_set_in_query()) self.assertEqual( wado_rs_request.get_type(), odil.webservices.Utils.Type.DICOM) self.assertEqual( wado_rs_request.get_selector(), odil.webservices.Selector({"studies" : "1.2"})) self.assertEqual(str(wado_rs_request.get_url()), "/foo/studies/1.2") self.assertEqual(wado_rs_request.get_media_type(), "application/dicom") self.assertEqual( wado_rs_request.get_representation(), odil.webservices.Utils.Representation.DICOM) def test_full_constructor(self): request = odil.webservices.WADORSRequest( base_url=odil.webservices.URL.parse("http://foo.com/bar"), transfer_syntax=odil.registry.ExplicitVRLittleEndian, character_set="utf-8", include_media_type_in_query=True, include_character_set_in_query=True) self.assertEqual(str(request.get_base_url()), "http://foo.com/bar") self.assertEqual( request.get_transfer_syntax().encode(), odil.registry.ExplicitVRLittleEndian) self.assertEqual(request.get_character_set(), "utf-8") self.assertTrue(request.get_include_media_type_in_query()) self.assertTrue(request.get_include_character_set_in_query()) if __name__ == "__main__": unittest.main() odil-0.11.0/tests/wrappers/webservices/test_wado_rs_response.py000066400000000000000000000200041362244656000250370ustar00rootroot00000000000000import email import io import json import tempfile import sys import unittest import odil class WADORSResponse(unittest.TestCase): def setUp(self): data_set_1 = odil.DataSet() data_set_1.add("SOPClassUID", [odil.registry.RawDataStorage]) data_set_1.add("SOPInstanceUID", ["1.2.3.4"]) data_set_1.add("PatientID", ["DJ1234"]) data_set_1.add("PixelSpacing", [1.5, 2.5]) data_set_2 = odil.DataSet() data_set_2.add("SOPClassUID", [odil.registry.MRImageStorage]) data_set_2.add("SOPInstanceUID", ["1.2.3.5"]) data_set_2.add("PatientName", ["Doe^John"]) data_set_2.add("PatientAge", ["042Y"]) self.data_sets = [data_set_1, data_set_2] bin = odil.Value.BinaryItem() bin.append(0x01) bin.append(0x02) bulk_data_1 = odil.webservices.BulkData(bin, "foo/bar", "here") bin = odil.Value.BinaryItem() bin.append(0x03) bin.append(0x04) bulk_data_2 = odil.webservices.BulkData(bin, "plip/plop", "not/here") self.bulk_data = [ bulk_data_1, bulk_data_2 ] def test_constructor(self): response = odil.webservices.WADORSResponse() self.assertEqual(len(response.get_data_sets()), 0) self.assertEqual(len(response.get_bulk_data()), 0) self.assertFalse(response.is_partial()) self.assertEqual(response.get_type(), odil.webservices.Utils.Type.None_) def test_data_sets(self): response = odil.webservices.WADORSResponse() response.set_data_sets(self.data_sets) self.assertSequenceEqual(response.get_data_sets(), self.data_sets) def test_bulk_data(self): response = odil.webservices.WADORSResponse() response.set_bulk_data(self.bulk_data) bulk = response.get_bulk_data() self.assertEqual(len(bulk), len(self.bulk_data)) for i in range(len(bulk)): self.assertEqual(bulk[i].data.get_memory_view(), self.bulk_data[i].data.get_memory_view()) self.assertEqual(bulk[i].type, self.bulk_data[i].type) self.assertEqual(bulk[i].location, self.bulk_data[i].location) def test_partial(self): response = odil.webservices.WADORSResponse() response.set_partial(True) self.assertTrue(response.is_partial()) def test_respondFull(self): wado = odil.webservices.WADORSResponse() wado.set_data_sets(self.data_sets) wado.set_partial(False) wado.respond_dicom(odil.webservices.Utils.Representation.DICOM) http = wado.get_http_response() self.assertEqual(http.get_status(), 200) self.assertEqual(http.get_reason(), "OK") def test_respondPartial(self): wado = odil.webservices.WADORSResponse() wado.set_data_sets(self.data_sets) wado.set_partial(True) wado.respond_dicom(odil.webservices.Utils.Representation.DICOM) http = wado.get_http_response() self.assertEqual(http.get_status(), 206) self.assertEqual(http.get_reason(), "Partial Content") def test_respondDICOM(self): wado = odil.webservices.WADORSResponse() wado.set_data_sets(self.data_sets) wado.respond_dicom(odil.webservices.Utils.Representation.DICOM) self.assertEqual(wado.get_type(), odil.webservices.Utils.Type.DICOM) self.assertEqual(wado.get_representation(), odil.webservices.Utils.Representation.DICOM) http = wado.get_http_response() msg = self._http_message_to_email_message(http) self.assertTrue(msg.is_multipart()) i = 0 for part in msg.walk(): if part.get_content_type() == "application/dicom": file = tempfile.mkstemp() stream = io.FileIO(file[1], "wb") stream.write(part.get_payload(decode=True)) stream.close() with odil.open(file[1], "rb") as stream: ds = odil.Reader.read_file(stream)[1] self.assertEqual(self.data_sets[i], ds) i = i+1 self.assertEqual(i, len(self.data_sets)) def test_respondDICOMXML(self): wado = odil.webservices.WADORSResponse() wado.set_data_sets(self.data_sets) wado.respond_dicom(odil.webservices.Utils.Representation.DICOM_XML) self.assertEqual(wado.get_type(), odil.webservices.Utils.Type.DICOM) self.assertEqual(wado.get_representation(), odil.webservices.Utils.Representation.DICOM_XML) http = wado.get_http_response() msg = self._http_message_to_email_message(http) self.assertTrue(msg.is_multipart()) i = 0 for part in msg.walk(): if part.get_content_type() == "application/dicom+xml": self.assertEqual(odil.as_xml(self.data_sets[i], False), part.get_payload()) i = i+1 self.assertEqual(i, len(self.data_sets)) def test_respondDICOMJSON(self): wado = odil.webservices.WADORSResponse() wado.set_data_sets(self.data_sets) wado.respond_dicom(odil.webservices.Utils.Representation.DICOM_JSON) self.assertEqual(wado.get_type(), odil.webservices.Utils.Type.DICOM) self.assertEqual(wado.get_representation(), odil.webservices.Utils.Representation.DICOM_JSON) http = wado.get_http_response() msg = self._http_message_to_email_message(http) self.assertFalse(msg.is_multipart()) self.assertTrue(msg.get_content_type(), "application/dicom+json") odil_json = [json.loads(odil.as_json(x)) for x in self.data_sets] http_json = json.loads(http.get_body().decode()) self.assertSequenceEqual(http_json, odil_json) def test_respondBulkData(self): wado = odil.webservices.WADORSResponse() wado.set_bulk_data(self.bulk_data) wado.respond_bulk_data() self.assertEqual(wado.get_type(), odil.webservices.Utils.Type.BulkData) http = wado.get_http_response() msg = self._http_message_to_email_message(http) self.assertTrue(msg.is_multipart()) i = 0 for part in msg.walk(): if part.get_param("type") != "application/octet-stream": self.assertEqual(part.get("Content-Location"), self.bulk_data[i].location) self.assertEqual(part.get_content_type(), self.bulk_data[i].type) self.assertEqual( self.bulk_data[i].data.get_memory_view().tobytes(), part.get_payload(decode=True)) i = i+1 self.assertEqual(i, len(self.bulk_data)) def test_respondPixelData(self): wado = odil.webservices.WADORSResponse() wado.set_bulk_data(self.bulk_data) wado.respond_pixel_data("image/jpeg") self.assertEqual(wado.get_type(), odil.webservices.Utils.Type.PixelData) http = wado.get_http_response() msg = self._http_message_to_email_message(http) self.assertTrue(msg.is_multipart()) i = 0 for part in msg.walk(): if part.get_param("type") != "image/jpeg": self.assertEqual(part.get("Content-Location"), self.bulk_data[i].location) self.assertEqual(part.get_content_type(), self.bulk_data[i].type) self.assertEqual( self.bulk_data[i].data.get_memory_view().tobytes(), part.get_payload(decode=True)) i = i+1 self.assertEqual(i, len(self.bulk_data)) def tearDown(self): self.data_sets = None self.bulk_data = None def _http_message_to_email_message(self, http_message): message_bytes = [ name.encode()+b": "+value.encode() for (name, value) in http_message.get_headers().items()] message_bytes.append(http_message.get_body()) message_bytes = b"\r\n".join(message_bytes) if sys.version_info[0] >= 3: email_message = email.message_from_bytes(message_bytes) else: email_message = email.message_from_string(message_bytes) return email_message if __name__ == "__main__": unittest.main() odil-0.11.0/wrappers/000077500000000000000000000000001362244656000143735ustar00rootroot00000000000000odil-0.11.0/wrappers/js/000077500000000000000000000000001362244656000150075ustar00rootroot00000000000000odil-0.11.0/wrappers/js/CMakeLists.txt000066400000000000000000000137411362244656000175550ustar00rootroot00000000000000find_package(Boost REQUIRED COMPONENTS system) if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common") file( DOWNLOAD http://download.icu-project.org/files/icu4c/58.2/icu4c-58_2-src.zip ${CMAKE_CURRENT_BINARY_DIR}/icu4c-58_2-src.zip SHOW_PROGRESS) execute_process( COMMAND ${CMAKE_COMMAND} -E tar x icu4c-58_2-src.zip WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) endif() if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/jsoncpp-1.8.0/dist/jsoncpp.cpp") file( DOWNLOAD https://github.com/open-source-parsers/jsoncpp/archive/1.8.0.zip ${CMAKE_CURRENT_BINARY_DIR}/jsoncpp-1.8.0.zip SHOW_PROGRESS) execute_process( COMMAND ${CMAKE_COMMAND} -E tar x jsoncpp-1.8.0.zip WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) execute_process( COMMAND python amalgamate.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/jsoncpp-1.8.0) endif() if (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/boost") execute_process( COMMAND ln -s ${Boost_INCLUDE_DIRS}/boost ${CMAKE_CURRENT_BINARY_DIR}) endif() set(icu_files "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/bytestream.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/charstr.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/cmemory.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/putil.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/stringpiece.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucln_cmn.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucmndata.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnv.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnv2022.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnvbocu.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnvhz.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnvisci.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnvlat1.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnvmbcs.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnvscsu.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnv_bld.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnv_cb.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnv_ct.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnv_cnv.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnv_err.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnv_ext.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnv_io.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnv_lmb.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnv_u7.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnv_u8.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnv_u16.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ucnv_u32.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/udata.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/udatamem.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/uhash.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/uinvchar.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/umapfile.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/umath.c" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/umutex.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/unistr.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/unistr_cnv.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/uobject.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ustr_cnv.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ustring.cpp" "${CMAKE_CURRENT_BINARY_DIR}/icu/source/common/ustrtrns.cpp") set(json_cpp_files "${CMAKE_CURRENT_BINARY_DIR}/jsoncpp-1.8.0/dist/jsoncpp.cpp") set(odil_files "${CMAKE_SOURCE_DIR}/src/odil/base64.cpp" "${CMAKE_SOURCE_DIR}/src/odil/DataSet.cpp" "${CMAKE_SOURCE_DIR}/src/odil/Element.cpp" "${CMAKE_SOURCE_DIR}/src/odil/ElementsDictionary.cpp" "${CMAKE_SOURCE_DIR}/src/odil/Exception.cpp" "${CMAKE_SOURCE_DIR}/src/odil/json_converter.cpp" "${CMAKE_SOURCE_DIR}/src/odil/Reader.cpp" "${CMAKE_SOURCE_DIR}/src/odil/registry.cpp" "${CMAKE_SOURCE_DIR}/src/odil/Tag.cpp" "${CMAKE_SOURCE_DIR}/src/odil/uid.cpp" "${CMAKE_SOURCE_DIR}/src/odil/UIDsDictionary.cpp" "${CMAKE_SOURCE_DIR}/src/odil/unicode.cpp" "${CMAKE_SOURCE_DIR}/src/odil/Value.cpp" "${CMAKE_SOURCE_DIR}/src/odil/VR.cpp" "${CMAKE_SOURCE_DIR}/src/odil/VRFinder.cpp" "${CMAKE_SOURCE_DIR}/src/odil/webservices/HTTPRequest.cpp" "${CMAKE_SOURCE_DIR}/src/odil/webservices/HTTPResponse.cpp" "${CMAKE_SOURCE_DIR}/src/odil/webservices/ItemWithParameters.cpp" "${CMAKE_SOURCE_DIR}/src/odil/webservices/Message.cpp" "${CMAKE_SOURCE_DIR}/src/odil/webservices/multipart_related.cpp" "${CMAKE_SOURCE_DIR}/src/odil/webservices/QIDORSRequest.cpp" "${CMAKE_SOURCE_DIR}/src/odil/webservices/QIDORSResponse.cpp" "${CMAKE_SOURCE_DIR}/src/odil/webservices/Selector.cpp" "${CMAKE_SOURCE_DIR}/src/odil/webservices/URL.cpp" "${CMAKE_SOURCE_DIR}/src/odil/webservices/WADORSRequest.cpp" "${CMAKE_SOURCE_DIR}/src/odil/webservices/WADORSResponse.cpp") file(GLOB_RECURSE files "*cpp") set(CMAKE_C_COMPILER emcc) set(CMAKE_CXX_COMPILER em++) set(CMAKE_AR emar) set(CMAKE_RANLIB emranlib) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --bind -s ALLOW_MEMORY_GROWTH=1 -s DISABLE_EXCEPTION_CATCHING=0") set(CMAKE_C_CREATE_STATIC_LIBRARY " rc ") set(CMAKE_CXX_CREATE_STATIC_LIBRARY " rc ") add_definitions( -D ODIL_MAJOR_VERSION=${odil_MAJOR_VERSION} -D U_COMMON_IMPLEMENTATION -D U_DISABLE_RENAMING=1 ) include_directories( ${Boost_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/icu/source/common ${CMAKE_CURRENT_BINARY_DIR}/jsoncpp-1.8.0/dist/ ${CMAKE_SOURCE_DIR}/src) add_executable(odil_js ${icu_files} ${json_cpp_files} ${odil_files} ${files}) set_target_properties(odil_js PROPERTIES OUTPUT_NAME odil) set_target_properties(odil_js PROPERTIES SUFFIX ".js") odil-0.11.0/wrappers/js/DataSet.cpp000066400000000000000000000070721362244656000170460ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/DataSet.h" std::vector get_tags(odil::DataSet const & data_set) { std::vector result; result.reserve(data_set.size()); for(auto const & item: data_set) { result.push_back(item.first); } return result; } std::vector as_int(odil::DataSet const & data_set, odil::Tag const & tag) { auto const & value = data_set.as_int(tag); std::vector result; result.resize(value.size()); std::copy(value.begin(), value.end(), result.begin()); return result; } emscripten::val as_bytes(odil::DataSet const & data_set, odil::Tag const & tag) { using namespace emscripten; // FIXME: handle multi-valued binary items. auto const & value = data_set.as_binary(tag, 0); return val(typed_memory_view(value.size(), &value[0])); } void wrap_DataSet() { using namespace emscripten; using namespace odil; class_("DataSet") .constructor<>() // add .function("remove", &DataSet::remove) .function("empty", select_overload(&DataSet::empty)) .function("size", select_overload(&DataSet::size)) .function("has", &DataSet::has) .function("get_vr", &DataSet::get_vr) .function( "empty_tag", select_overload(&DataSet::empty)) .function( "size_tag", select_overload(&DataSet::size)) .function("is_int", &DataSet::is_int) // FIXME: Javascript has no 64-bits int .function( "as_int", &as_int // select_overload( // &DataSet::as_int) ) .function("is_real", &DataSet::is_real) .function( "as_real", select_overload( &DataSet::as_real)) .function("is_string", &DataSet::is_string) .function( "as_string", select_overload( &DataSet::as_string)) .function("is_data_set", &DataSet::is_data_set) .function( "as_data_set", select_overload( &DataSet::as_data_set)) .function("is_binary", &DataSet::is_binary) .function( "as_binary", select_overload( &DataSet::as_binary)) .function( "as_binary", select_overload( &DataSet::as_binary)) .function("as_bytes", &as_bytes) .function("get_tags", &get_tags) .function("equal", &DataSet::operator==) .function("notEqual", &DataSet::operator!=) .function( "clear_tag", select_overload(&DataSet::clear)) .function("get_transfer_syntax", &DataSet::get_transfer_syntax) .function("set_transfer_syntax", &DataSet::set_transfer_syntax) ; } odil-0.11.0/wrappers/js/Tag.cpp000066400000000000000000000021451362244656000162300ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/Tag.h" void wrap_Tag() { using namespace emscripten; using namespace odil; class_("Tag") .constructor() .property("group", &Tag::group) .property("element", &Tag::element) .function("is_private", &Tag::is_private) .function("get_name", &Tag::get_name) .function("equal", &Tag::operator==) .function("notEqual", &Tag::operator!=) .function("less", &Tag::operator<) .function("greater", &Tag::operator>) .function("lessEqual", &Tag::operator<=) .function("greaterEqual", &Tag::operator>=) .function("toString", &Tag::operator std::string) ; } odil-0.11.0/wrappers/js/VR.cpp000066400000000000000000000031221362244656000160400ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/VR.h" void wrap_VR() { using namespace emscripten; using namespace odil; enum_("VR") .value("UNKNOWN", VR::UNKNOWN) .value("AE", VR::AE) .value("AS", VR::AS) .value("AT", VR::AT) .value("CS", VR::CS) .value("DA", VR::DA) .value("DS", VR::DS) .value("DT", VR::DT) .value("FL", VR::FL) .value("FD", VR::FD) .value("IS", VR::IS) .value("LO", VR::LO) .value("LT", VR::LT) .value("OB", VR::OB) .value("OD", VR::OD) .value("OF", VR::OF) .value("OL", VR::OL) .value("OW", VR::OW) .value("PN", VR::PN) .value("SH", VR::SH) .value("SL", VR::SL) .value("SQ", VR::SQ) .value("SS", VR::SS) .value("ST", VR::ST) .value("TM", VR::TM) .value("UC", VR::UC) .value("UI", VR::UI) .value("UL", VR::UL) .value("UN", VR::UN) .value("UR", VR::UR) .value("US", VR::US) .value("UT", VR::UT) .value("INVALID", VR::INVALID) ; function("VRtoString", select_overload(&as_string)); } odil-0.11.0/wrappers/js/odil.cpp000066400000000000000000000054041362244656000164450ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include #include "odil/Reader.h" #include "odil/registry.h" std::vector readBuffer(std::string const & buffer) { std::istringstream istream(buffer); auto const header_and_data_set = odil::Reader::read_file(istream); std::vector result; result.push_back(header_and_data_set.first); result.push_back(header_and_data_set.second); return result; } emscripten::val getTag(std::string const & name) { auto const iterator = odil::registry::public_tags.find(name); emscripten::val result = emscripten::val::undefined(); if(iterator != odil::registry::public_tags.end()) { result = emscripten::val(iterator->second); } else { result = emscripten::val::null(); } return result; } void wrap_DataSet(); void wrap_Tag(); void wrap_VR(); void wrap_webservices_HTTPRequest(); void wrap_webservices_HTTPResponse(); void wrap_webservices_Message(); void wrap_webservices_QIDORSRequest(); void wrap_webservices_QIDORSResponse(); void wrap_webservices_Selector(); void wrap_webservices_URL(); void wrap_webservices_Utils(); void wrap_webservices_WADORSRequest(); void wrap_webservices_WADORSResponse(); EMSCRIPTEN_BINDINGS(odil) { using namespace emscripten; using namespace odil; register_vector("Integers"); // FIXME: Javascript has no 64-bits int register_vector("Reals"); register_vector("Strings"); register_vector("DataSets"); register_vector("BinaryItem"); register_vector("Binary"); register_vector("VectorTag"); register_map("MapStringString"); wrap_DataSet(); wrap_Tag(); wrap_VR(); EM_ASM( Module['webservices'] = {}; ); wrap_webservices_Message(); wrap_webservices_HTTPRequest(); wrap_webservices_HTTPResponse(); wrap_webservices_QIDORSRequest(); wrap_webservices_QIDORSResponse(); wrap_webservices_Selector(); wrap_webservices_URL(); wrap_webservices_Utils(); wrap_webservices_WADORSRequest(); wrap_webservices_WADORSResponse(); emscripten::function("readBuffer", readBuffer); emscripten::function("getTag", getTag); } odil-0.11.0/wrappers/js/webservices/000077500000000000000000000000001362244656000173305ustar00rootroot00000000000000odil-0.11.0/wrappers/js/webservices/HTTPRequest.cpp000066400000000000000000000025671362244656000221760ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/HTTPRequest.h" #include "odil/webservices/Message.h" void wrap_webservices_HTTPRequest() { using namespace emscripten; using namespace odil::webservices; class_>("webservices_HTTPRequest") .constructor< std::string, URL, std::string, std::map, std::string>() .function("get_method", &HTTPRequest::get_method) .function("set_method", &HTTPRequest::set_method) .function("get_target", &HTTPRequest::get_target) .function("set_target", &HTTPRequest::set_target) .function("get_http_version", &HTTPRequest::get_http_version) .function("set_http_version", &HTTPRequest::set_http_version) ; EM_ASM( Module['webservices']['HTTPRequest'] = Module['webservices_HTTPRequest']; delete Module['webservices_HTTPRequest']; ); } odil-0.11.0/wrappers/js/webservices/HTTPResponse.cpp000066400000000000000000000026041362244656000223340ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/HTTPResponse.h" #include "odil/webservices/Message.h" void wrap_webservices_HTTPResponse() { using namespace emscripten; using namespace odil::webservices; class_>("webservices_HTTPResponse") .constructor< std::string, int, std::string, std::map, std::string>() .function("get_http_version", &HTTPResponse::get_http_version) .function("set_http_version", &HTTPResponse::set_http_version) .function("get_status", &HTTPResponse::get_status) .function("set_status", &HTTPResponse::set_status) .function("get_reason", &HTTPResponse::get_reason) .function("set_reason", &HTTPResponse::set_reason) ; EM_ASM( Module['webservices']['HTTPResponse'] = Module['webservices_HTTPResponse']; delete Module['webservices_HTTPResponse']; ); } odil-0.11.0/wrappers/js/webservices/Message.cpp000066400000000000000000000023421362244656000214210ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/Message.h" void wrap_webservices_Message() { using namespace emscripten; using namespace odil::webservices; class_("webservices_Message") .constructor, std::string>() .function("get_headers", &Message::get_headers) .function("set_headers", &Message::set_headers) .function("has_header", &Message::has_header) .function("get_header", &Message::get_header) .function("set_header", &Message::set_header) .function("get_body", &Message::get_body) .function("set_body", &Message::set_body) ; EM_ASM( Module['webservices']['Message'] = Module['webservices_Message']; delete Module['webservices_Message']; ); } odil-0.11.0/wrappers/js/webservices/QIDORSRequest.cpp000066400000000000000000000067641362244656000224230ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "iostream" #include "odil/webservices/QIDORSRequest.h" #include "odil/webservices/Utils.h" #include "odil/json_converter.h" #include "json/json.h" namespace { odil::webservices::QIDORSRequest QIDORSRequest_fromHTTPRequest(odil::webservices::HTTPRequest const & request) { return odil::webservices::QIDORSRequest(request); } } void request_datasets(odil::webservices::QIDORSRequest & qido, odil::webservices::Representation const & repr, odil::webservices::Selector const & selector, Json::Value const & array) // Following fields are not handled still now // bool fuzzymatching, // int limit, // int offset, // bool numerical_tags) { odil::DataSet query = odil::as_dataset(array[0]); std::vector wanted_includefields = { odil::Tag("00100010"), // PatientName odil::Tag("0008103e"), // SeriesDesc odil::Tag("00081030"), // StudyDesc // Study odil::Tag("0020000d"), // StudyInstanceUID odil::Tag("00080020"), // StudyDate odil::Tag("00080030"), // StudyTime odil::Tag("00201206"), // NumberOfStudyRelatedSeries // Series odil::Tag("00200011"), // Series Number odil::Tag("00080060"), // Modality odil::Tag("0020000E"), // SeriesInstanceUID odil::Tag("00201209"), // NumberOfSeriesRelatedInstances }; for (auto const tag : wanted_includefields) { if (!query.has(tag)) { query.add(tag); } } // Still here ds is correctly constructed, and qido is correctly obtained, repr is ok, selector qido.request_datasets(repr, selector, query); } void wrap_webservices_QIDORSRequest() { using namespace emscripten; using namespace odil::webservices; class_("webservices_QIDORSRequest") .constructor() .class_function("fromHTTPRequest", &QIDORSRequest_fromHTTPRequest) .function("get_base_url", &QIDORSRequest::get_base_url) .function("set_base_url", &QIDORSRequest::set_base_url) .function("get_media_type", &QIDORSRequest::get_media_type) .function("get_representation", &QIDORSRequest::get_representation) .function("get_query_data_set", &QIDORSRequest::get_query_data_set) .function("get_includefields", &QIDORSRequest::get_includefields) .function("get_fuzzymatching", &QIDORSRequest::get_fuzzymatching) .function("get_limit", &QIDORSRequest::get_limit) .function("get_offset", &QIDORSRequest::get_offset) .function("get_http_request", &QIDORSRequest::get_http_request) .function("request_datasets", &request_datasets) .function("equal", &QIDORSRequest::operator==) .function("notEqual", &QIDORSRequest::operator!=) ; EM_ASM( Module['webservices']['QIDORSRequest'] = Module['webservices_QIDORSRequest']; delete Module['webservices_QIDORSRequest']; ); } odil-0.11.0/wrappers/js/webservices/QIDORSResponse.cpp000066400000000000000000000027621362244656000225630ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/QIDORSResponse.h" void wrap_webservices_QIDORSResponse() { using namespace emscripten; using namespace odil::webservices; class_("webservices_QIDORSResponse") .constructor() .function("equal", &QIDORSResponse::operator==) .function("notEqual", &QIDORSResponse::operator!=) .function("get_data_sets", select_overload const & ()const >(&QIDORSResponse::get_data_sets)) .function("set_data_sets", &QIDORSResponse::set_data_sets) .function("get_representation", &QIDORSResponse::get_representation) .function("set_representation", &QIDORSResponse::set_representation) .function("get_media_type", &QIDORSResponse::get_media_type) .function("get_http_response", &QIDORSResponse::get_http_response) ; EM_ASM( Module["webservices"]["QIDORSResponse"] = Module["webservices_QIDORSResponse"]; delete Module["webservices_QIDORSResponse"]; ); } odil-0.11.0/wrappers/js/webservices/Selector.cpp000066400000000000000000000037171362244656000216240ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/Selector.h" namespace { odil::webservices::Selector Selector_fromMap(std::map const & path, std::vector const & frames) { return odil::webservices::Selector(path, frames); } } void wrap_webservices_Selector() { using namespace emscripten; using namespace odil::webservices; class_("webservices_Selector") .constructor<>() .class_function("fromMap", &Selector_fromMap) .constructor, std::vector>() .function("get_study", &Selector::get_study) .function("get_series", &Selector::get_series) .function("get_instance", &Selector::get_instance) .function("get_frames", &Selector::get_frames) .function("set_study", &Selector::set_study) .function("set_series", &Selector::set_series) .function("set_instance", &Selector::set_instance) .function("set_frames", &Selector::set_frames) .function("is_study_present", &Selector::is_study_present) .function("is_series_present", &Selector::is_series_present) .function("is_instance_present", &Selector::is_instance_present) .function("equal", &Selector::operator==) .function("notEqual", &Selector::operator!=) .function("get_path", &Selector::get_path) ; EM_ASM( Module['webservices']['Selector'] = Module['webservices_Selector']; delete Module['webservices_Selector']; ); } odil-0.11.0/wrappers/js/webservices/URL.cpp000066400000000000000000000022741362244656000205030ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/URL.h" void wrap_webservices_URL() { using namespace emscripten; using namespace odil::webservices; class_("webservices_URL") .constructor<>() .property("scheme", &URL::scheme) .property("authority", &URL::authority) .property("path", &URL::path) .property("query", &URL::query) .property("fragment", &URL::fragment) .function("equal", &URL::operator==) .function("notEqual", &URL::operator!=) .function("toString", &URL::operator std::string) .class_function("parse", &URL::parse) ; EM_ASM( Module['webservices']['URL'] = Module['webservices_URL']; delete Module['webservices_URL']; ); } odil-0.11.0/wrappers/js/webservices/Utils.cpp000066400000000000000000000026201362244656000211340ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/Utils.h" void wrap_webservices_Utils() { using namespace emscripten; using namespace odil::webservices; enum_("webservices_Utils_Type") .value("None", Type::None) .value("DICOM", Type::DICOM) .value("BulkData", Type::BulkData) .value("PixelData", Type::PixelData) ; enum_("webservices_Utils_Representation") .value("DICOM", Representation::DICOM) .value("DICOM_XML", Representation::DICOM_XML) .value("DICOM_JSON", Representation::DICOM_JSON) ; EM_ASM( Module['webservices']['Utils'] = {}; Module['webservices']['Utils']['Type'] = Module['webservices_Utils_Type']; delete Module['webservices_Utils_Type']; Module['webservices']['Utils']['Representation'] = Module['webservices_Utils_Representation']; delete Module['webservices_Utils_Representation']; ); } odil-0.11.0/wrappers/js/webservices/WADORSRequest.cpp000066400000000000000000000054371362244656000224150ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/WADORSRequest.h" namespace { odil::webservices::WADORSRequest WADORSRequest_fromHTTPRequest(odil::webservices::HTTPRequest const & request) { return odil::webservices::WADORSRequest(request); } } void wrap_webservices_WADORSRequest() { using namespace emscripten; using namespace odil::webservices; class_("webservices_WADORSRequest") .constructor() .class_function("fromHTTPRequest", &WADORSRequest_fromHTTPRequest) .function("equal", &WADORSRequest::operator==) .function("notEqual", &WADORSRequest::operator!=) .function("get_base_url", &WADORSRequest::get_base_url) .function("set_base_url", &WADORSRequest::set_base_url) .function("get_transfer_syntax", &WADORSRequest::get_transfer_syntax) .function("set_transfer_syntax", &WADORSRequest::set_transfer_syntax) .function("get_character_set", &WADORSRequest::get_character_set) .function("set_character_set", &WADORSRequest::set_character_set) .function( "get_include_media_type_in_query", &WADORSRequest::get_include_media_type_in_query) .function( "set_include_media_type_in_query", &WADORSRequest::set_include_media_type_in_query) .function( "get_include_character_set_in_query", &WADORSRequest::get_include_character_set_in_query) .function( "set_include_character_set_in_query", &WADORSRequest::set_include_character_set_in_query) .function("get_type", &WADORSRequest::get_type) .function("get_selector", &WADORSRequest::get_selector) .function("get_url", &WADORSRequest::get_url) .function("get_media_type", &WADORSRequest::get_media_type) .function("get_representation", &WADORSRequest::get_representation) .function("request_dicom", &WADORSRequest::request_dicom) // request_bulk_data // request_bulk_data .function("request_pixel_data", &WADORSRequest::request_pixel_data) .function("get_http_request", &WADORSRequest::get_http_request) ; EM_ASM( Module['webservices']['WADORSRequest'] = Module['webservices_WADORSRequest']; delete Module['webservices_WADORSRequest']; ); } odil-0.11.0/wrappers/js/webservices/WADORSResponse.cpp000066400000000000000000000041401362244656000225510ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/WADORSResponse.h" namespace { odil::webservices::WADORSResponse WADORSResponse_fromHTTPResponse( odil::webservices::HTTPResponse const & response) { return odil::webservices::WADORSResponse(response); } } void wrap_webservices_WADORSResponse() { using namespace emscripten; using namespace odil; using namespace odil::webservices; class_("webservices_WADORSResponse") .constructor<>() .class_function("fromHTTPResponse", &WADORSResponse_fromHTTPResponse) .function("equal", &WADORSResponse::operator==) .function("notEqual", &WADORSResponse::operator!=) .function( "get_data_sets", select_overload const & () const>( &WADORSResponse::get_data_sets)) .function("set_data_sets", &WADORSResponse::set_data_sets) // get_bulk_data // set_bulk_data .function("is_partial", &WADORSResponse::is_partial) .function("set_partial", &WADORSResponse::set_partial) .function("get_type", &WADORSResponse::get_type) .function("get_representation", &WADORSResponse::get_representation) .function("respond_dicom", &WADORSResponse::respond_dicom) .function("respond_bulk_data", &WADORSResponse::respond_bulk_data) .function("respond_pixel_data", &WADORSResponse::respond_pixel_data) .function("get_http_response", &WADORSResponse::get_http_response) ; EM_ASM( Module['webservices']['WADORSResponse'] = Module['webservices_WADORSResponse']; delete Module['webservices_WADORSResponse']; ); } odil-0.11.0/wrappers/python/000077500000000000000000000000001362244656000157145ustar00rootroot00000000000000odil-0.11.0/wrappers/python/Association.cpp000066400000000000000000000061471362244656000207040ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/Association.h" namespace { void receive_association( odil::Association& association, std::string protocol, unsigned short port) { if(protocol == "v4") { association.receive_association(boost::asio::ip::tcp::v4(), port); } else if (protocol == "v6") { association.receive_association(boost::asio::ip::tcp::v6(), port); } } float get_tcp_timeout(odil::Association const& association) { return association.get_tcp_timeout().total_microseconds()/1000000.f; } void set_tcp_timeout(odil::Association& association, float seconds) { association.set_tcp_timeout( boost::posix_time::microseconds(int(seconds*1000000.f))); } } void wrap_Association(pybind11::module & m) { using namespace pybind11; using namespace odil; auto association_scope = class_(m, "Association") .def(init<>()) .def("get_peer_host", &Association::get_peer_host) .def("set_peer_host", &Association::set_peer_host) .def("get_peer_port", &Association::get_peer_port) .def("set_peer_port", &Association::set_peer_port) .def( "get_parameters", &Association::get_parameters, return_value_policy::reference_internal) .def("set_parameters", &Association::set_parameters) .def( "update_parameters", &Association::update_parameters, return_value_policy::reference_internal) .def( "get_negotiated_parameters", &Association::get_negotiated_parameters, return_value_policy::reference_internal) .def("get_tcp_timeout", &get_tcp_timeout) .def("set_tcp_timeout", &set_tcp_timeout) .def("is_associated", &Association::is_associated) .def("associate", &Association::associate) .def("receive_association", &receive_association) //.def("reject", &Association::reject) .def("release", &Association::release) .def("abort", &Association::abort) .def("receive_message", &Association::receive_message) .def("next_message_id", &Association::next_message_id) .def("send_message", &Association::send_message) ; enum_(association_scope, "Result") .value("Accepted", Association::Accepted) .value("RejectedPermanent", Association::RejectedPermanent) .value("RejectedTransient", Association::RejectedTransient) ; register_exception( m, "AssociationReleased", m.attr("Exception").ptr()); register_exception( m, "AssociationAborted", m.attr("Exception").ptr()); } odil-0.11.0/wrappers/python/AssociationParameters.cpp000066400000000000000000000222271362244656000227250ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include #include "odil/AssociationParameters.h" namespace { odil::AssociationParameters::PresentationContext presentation_context_constructor( uint8_t id, std::string const & abstract_syntax, pybind11::sequence transfer_syntaxes, odil::AssociationParameters::PresentationContext::Role role) { std::vector transfer_syntaxes_cpp( pybind11::len(transfer_syntaxes)); std::transform( transfer_syntaxes.begin(), transfer_syntaxes.end(), transfer_syntaxes_cpp.begin(), [](pybind11::handle const & item) { return item.cast(); }); return odil::AssociationParameters::PresentationContext( id, abstract_syntax, transfer_syntaxes_cpp, role); } odil::AssociationParameters::PresentationContext presentation_context_simplified_constructor( std::string const & abstract_syntax, pybind11::sequence transfer_syntaxes, odil::AssociationParameters::PresentationContext::Role role) { std::vector transfer_syntaxes_cpp(len(transfer_syntaxes)); std::transform( transfer_syntaxes.begin(), transfer_syntaxes.end(), transfer_syntaxes_cpp.begin(), [](pybind11::handle const & item) { return item.cast(); }); return odil::AssociationParameters::PresentationContext( abstract_syntax, transfer_syntaxes_cpp, role); } pybind11::list get_presentation_contexts(odil::AssociationParameters const & parameters) { pybind11::list presentation_contexts_python; for(auto const & presentation_context: parameters.get_presentation_contexts()) { presentation_contexts_python.append(presentation_context); } return presentation_contexts_python; } odil::AssociationParameters & set_presentation_contexts( odil::AssociationParameters & parameters, pybind11::sequence const & presentation_contexts) { std::vector presentation_contexts_cpp; presentation_contexts_cpp.reserve(pybind11::len(presentation_contexts)); for(pybind11::handle const & item: presentation_contexts) { presentation_contexts_cpp.push_back( item.cast()); } parameters.set_presentation_contexts(presentation_contexts_cpp); return parameters; } } void wrap_AssociationParameters(pybind11::module & m) { using namespace pybind11; using namespace pybind11::literals; using namespace odil; auto association_parameters_scope = class_(m, "AssociationParameters") .def(init<>()) // TODO Construct from PDU .def( "get_called_ae_title", &AssociationParameters::get_called_ae_title, return_value_policy::copy) .def( "set_called_ae_title", &AssociationParameters::set_called_ae_title, return_value_policy::copy) .def( "get_calling_ae_title", &AssociationParameters::get_calling_ae_title, return_value_policy::copy) .def( "set_calling_ae_title", &AssociationParameters::set_calling_ae_title, return_value_policy::reference_internal) .def("get_presentation_contexts", &get_presentation_contexts) .def( "set_presentation_contexts", &set_presentation_contexts, return_value_policy::reference_internal) .def( "get_user_identity", &AssociationParameters::get_user_identity, return_value_policy::reference_internal) .def( "set_user_identity_to_none", &AssociationParameters::set_user_identity_to_none, return_value_policy::reference_internal) .def( "set_user_identity_to_username", &AssociationParameters::set_user_identity_to_username, return_value_policy::reference_internal) .def( "set_user_identity_to_username_and_password", &AssociationParameters::set_user_identity_to_username_and_password, return_value_policy::reference_internal) .def( "set_user_identity_to_kerberos", &AssociationParameters::set_user_identity_to_kerberos, return_value_policy::reference_internal) .def( "set_user_identity_to_saml", &AssociationParameters::set_user_identity_to_saml, return_value_policy::reference_internal) .def("get_maximum_length", &AssociationParameters::get_maximum_length) .def( "set_maximum_length", &AssociationParameters::set_maximum_length, return_value_policy::reference_internal) ; { auto presentation_context_scope = class_( association_parameters_scope, "PresentationContext"); enum_( presentation_context_scope, "Result") .value( "Acceptance", AssociationParameters::PresentationContext::Result::Acceptance ) .value( "UserRejection", AssociationParameters::PresentationContext::Result::UserRejection ) .value( "NoReason", AssociationParameters::PresentationContext::Result::NoReason ) .value( "AbstractSyntaxNotSupported", AssociationParameters::PresentationContext::Result::AbstractSyntaxNotSupported ) .value( "TransferSyntaxesNotSupported", AssociationParameters::PresentationContext::Result::TransferSyntaxesNotSupported ) ; enum_( presentation_context_scope, "Role") .value( "Unspecified", AssociationParameters::PresentationContext::Role::Unspecified ) .value("None", AssociationParameters::PresentationContext::Role::None) .value("SCU", AssociationParameters::PresentationContext::Role::SCU) .value("SCP", AssociationParameters::PresentationContext::Role::SCP) .value("Both", AssociationParameters::PresentationContext::Role::Both) ; // WARNING using STL conversion // (https://pybind11.readthedocs.io/en/stable/advanced/cast/stl.html) // conflicts with opaque types required to avoid copying data set values presentation_context_scope .def(init(&presentation_context_constructor)) .def(init(&presentation_context_simplified_constructor)) .def_readwrite( "id", &AssociationParameters::PresentationContext::id ) .def_readwrite( "abstract_syntax", &AssociationParameters::PresentationContext::abstract_syntax ) .def_readwrite( "transfer_syntaxes", &AssociationParameters::PresentationContext::transfer_syntaxes ) .def_readwrite( "role", &AssociationParameters::PresentationContext::role ) .def_readwrite( "result", &AssociationParameters::PresentationContext::result ) .def(self == self) ; } { auto user_identity_scope = class_( association_parameters_scope, "UserIdentity") .def(init<>()) .def_readwrite( "type", &AssociationParameters::UserIdentity::type ) .def_readwrite( "primary_field", &AssociationParameters::UserIdentity::primary_field ) .def_readwrite( "secondary_field", &AssociationParameters::UserIdentity::secondary_field ) .def(self == self) ; enum_(user_identity_scope, "Type") .value("None", AssociationParameters::UserIdentity::Type::None) .value( "Username", AssociationParameters::UserIdentity::Type::Username ) .value( "UsernameAndPassword", AssociationParameters::UserIdentity::Type::UsernameAndPassword ) .value( "Kerberos", AssociationParameters::UserIdentity::Type::Kerberos) .value("SAML", AssociationParameters::UserIdentity::Type::SAML) ; } } odil-0.11.0/wrappers/python/BasicDirectoryCreator.cpp000066400000000000000000000070551362244656000226550ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include #include "odil/BasicDirectoryCreator.h" #include "opaque_types.h" #include "type_casters.h" namespace { pybind11::list get_files(odil::BasicDirectoryCreator const & creator) { pybind11::list result; for(auto const & file: creator.files) { result.append(file); } return result; } void set_files( odil::BasicDirectoryCreator & creator, pybind11::sequence const & files_python) { std::vector files_cpp(pybind11::len(files_python)); std::transform( files_python.begin(), files_python.end(), files_cpp.begin(), [](pybind11::handle const & h) { return pybind11::cast(h); }); creator.files = files_cpp; } pybind11::dict get_extra_record_keys(odil::BasicDirectoryCreator const & creator) { pybind11::dict result; for(auto const & item: creator.extra_record_keys) { pybind11::list values; for(auto const & value_cpp: item.second) { pybind11::list value_python; value_python.append(value_cpp.first); value_python.append(value_cpp.second); values.append(value_python); } result[pybind11::cast(item.first)] = values; } return result; } void set_extra_record_keys( odil::BasicDirectoryCreator & creator, pybind11::dict const & extra_record_keys_python) { for(auto const item: extra_record_keys_python) { auto const level = pybind11::cast(item.first); auto const extra_record_keys = item.second; std::vector value( pybind11::len(extra_record_keys)); std::transform( extra_record_keys.begin(), extra_record_keys.end(), value.begin(), [](pybind11::handle const & h) { auto const tag_and_type = h.cast(); auto const tag = pybind11::cast(tag_and_type[0]); auto const type = pybind11::cast(tag_and_type[1]); return odil::BasicDirectoryCreator::RecordKey(tag, type); }); creator.extra_record_keys[level] = value; } } } void wrap_BasicDirectoryCreator(pybind11::module & m) { using namespace pybind11; using namespace odil; class_(m, "BasicDirectoryCreator") .def( init( []( std::string const & root, sequence const & files, dict const & extra_record_keys) { BasicDirectoryCreator creator(root); set_files(creator, files); set_extra_record_keys(creator, extra_record_keys); return creator; }), "root"_a, "files"_a, "extra_record_keys"_a=dict()) .def_readwrite("root", &BasicDirectoryCreator::root) .def_property("files", &get_files, &set_files) .def_property( "extra_record_keys", &get_extra_record_keys, &set_extra_record_keys) .def("__call__", &BasicDirectoryCreator::operator()) ; } odil-0.11.0/wrappers/python/CMakeLists.txt000066400000000000000000000025561362244656000204640ustar00rootroot00000000000000find_package(JsonCpp REQUIRED) find_package(pybind11 REQUIRED) if(BUILD_SHARED_LIBS) add_definitions(-D BOOST_ALL_DYN_LINK) endif() include_directories( ${CMAKE_SOURCE_DIR}/src ${Boost_INCLUDE_DIRS} ${JsonCpp_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}) link_directories(${Boost_LIBRARY_DIRS}) file(GLOB_RECURSE Header_Files "*.h") file(GLOB_RECURSE Source_Files "*.cpp") set(Python_Files "__init__.py") list(SORT Header_Files) list(SORT Source_Files) list(SORT Python_Files) pybind11_add_module(pyodil SHARED ${Source_Files} ${Header_Files}) set_target_properties(pyodil PROPERTIES OUTPUT_NAME _odil FOLDER "Wrappers") if(APPLE) set_target_properties(pyodil PROPERTIES SUFFIX ".so") endif() target_link_libraries(pyodil PUBLIC ${JsonCpp_LIBRARIES} PUBLIC libodil) add_custom_target( pyodil-pure ${CMAKE_COMMAND} -E echo "Pure-python files" SOURCES ${Python_Files}) set_target_properties(pyodil-pure PROPERTIES FOLDER "Wrappers") execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import *; print(get_python_lib(True, prefix='').replace('\\\\', '/'))" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) install(DIRECTORY DESTINATION "${PYTHON_SITE_PACKAGES}") install(TARGETS pyodil DESTINATION "${PYTHON_SITE_PACKAGES}/odil") install(FILES ${Python_Files} DESTINATION "${PYTHON_SITE_PACKAGES}/odil") odil-0.11.0/wrappers/python/DataSet.cpp000066400000000000000000000111351362244656000177460ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/DataSet.h" #include "opaque_types.h" #include "type_casters.h" void wrap_DataSet(pybind11::module & m) { using namespace pybind11; using namespace odil; class_>(m, "DataSet") .def(init<>()) .def(init()) .def("add", (void (DataSet::*)(Tag const &, Element const &)) &DataSet::add) .def( "add", (void (DataSet::*)(Tag const &, VR)) &DataSet::add, "tag"_a, "vr"_a=VR::UNKNOWN) .def( "add", [](DataSet & data_set, Tag const & tag, sequence source, VR vr) { if(vr == VR::UNKNOWN) { vr = as_vr(tag); } if(len(source) > 0) { data_set.add(tag, {convert_sequence(source), vr}); } else { data_set.add(tag); } }, "self"_a, "tag"_a, "vr"_a=VR::UNKNOWN ) .def("remove", &DataSet::remove) .def("has", &DataSet::has) .def("empty", (bool (DataSet::*)() const) &DataSet::empty) .def("size", (std::size_t (DataSet::*)() const) &DataSet::size) .def("get_vr", &DataSet::get_vr) .def("empty", (bool (DataSet::*)(Tag const &) const) &DataSet::empty) .def("size", (std::size_t (DataSet::*)(Tag const &) const) &DataSet::size) .def("is_int", &DataSet::is_int) .def( "as_int", (Value::Integers & (DataSet::*)(Tag const &)) &DataSet::as_int, return_value_policy::reference_internal) .def("is_real", &DataSet::is_real) .def( "as_real", (Value::Reals & (DataSet::*)(Tag const &)) &DataSet::as_real, return_value_policy::reference_internal) .def("is_string", &DataSet::is_string) .def( "as_string", (Value::Strings & (DataSet::*)(Tag const &)) &DataSet::as_string, return_value_policy::reference_internal) .def("is_data_set", &DataSet::is_data_set) .def( "as_data_set", (Value::DataSets & (DataSet::*)(Tag const &)) &DataSet::as_data_set, return_value_policy::reference_internal) .def("is_binary", &DataSet::is_binary) .def( "as_binary", (Value::Binary & (DataSet::*)(Tag const &)) &DataSet::as_binary, return_value_policy::reference_internal) .def(self == self) .def(self != self) .def("clear", (void (DataSet::*)()) &DataSet::clear) .def("clear", (void (DataSet::*) (Tag const &)) &DataSet::clear) .def("get_transfer_syntax", &DataSet::get_transfer_syntax) .def("set_transfer_syntax", &DataSet::set_transfer_syntax) .def("__len__", (std::size_t (DataSet::*)() const) &DataSet::size) .def( "__getitem__", [](DataSet const & d, Tag const & t) { return d[t]; }) .def( "__setitem__", [](DataSet & d, Tag const & t, Element const & e) { d[t] = e; }) .def( "__iter__", [](DataSet const & d) { return make_key_iterator(d.begin(), d.end()); }, keep_alive<0, 1>()) .def( "keys", [](DataSet const & data_set) { list tags; for(auto const & item: data_set) { tags.append(item.first); } return tags; }) .def( "values", [](DataSet const & data_set) { list tags; for(auto const & item: data_set) { tags.append(&item.second); } return tags; }) .def( "items", [](DataSet const & data_set) { list tags; for(auto const & item: data_set) { tags.append(std::make_pair(item.first, &item.second)); } return tags; }) ; } odil-0.11.0/wrappers/python/DataSetGeneratorWrapper.h000066400000000000000000000027671362244656000226360ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _8971f17b_e958_4aa3_9d36_640aaa018f56 #define _8971f17b_e958_4aa3_9d36_640aaa018f56 #include #include "odil/DataSet.h" #include "odil/message/Request.h" template class DataSetGeneratorWrapper: public TDataSetGenerator { public: DataSetGeneratorWrapper() : TDataSetGenerator() { // Nothing else. } virtual ~DataSetGeneratorWrapper() override { // Nothing to do. } virtual void initialize( std::shared_ptr request) override { PYBIND11_OVERLOAD_PURE(void, TDataSetGenerator, initialize, request); } virtual bool done() const override { PYBIND11_OVERLOAD_PURE(bool, TDataSetGenerator, done, ); } virtual void next() override { PYBIND11_OVERLOAD_PURE(void, TDataSetGenerator, next, ); } virtual std::shared_ptr get() const override { PYBIND11_OVERLOAD_PURE( std::shared_ptr, TDataSetGenerator, get, ); } }; #endif // _8971f17b_e958_4aa3_9d36_640aaa018f56 odil-0.11.0/wrappers/python/EchoSCP.cpp000066400000000000000000000021531362244656000176450ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/EchoSCP.h" namespace { void set_callback(odil::EchoSCP& scp, pybind11::object const& f) { scp.set_callback( [f](std::shared_ptr message) { return f(message).cast(); }); } } void wrap_EchoSCP(pybind11::module & m) { using namespace pybind11; using namespace odil; class_(m, "EchoSCP") .def(init()) .def("set_callback", &set_callback) .def( "__call__", static_cast< void (EchoSCP::*)(std::shared_ptr) >(&EchoSCP::operator())) ; } odil-0.11.0/wrappers/python/EchoSCU.cpp000066400000000000000000000015711362244656000176550ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/EchoSCU.h" void wrap_EchoSCU(pybind11::module & m) { using namespace pybind11; using namespace odil; class_(m, "EchoSCU") .def(init()) .def( "get_affected_sop_class", &EchoSCU::get_affected_sop_class, return_value_policy::copy) .def("set_affected_sop_class", &EchoSCU::set_affected_sop_class) .def("echo", &EchoSCU::echo) ; } odil-0.11.0/wrappers/python/Element.cpp000066400000000000000000000046571362244656000200250ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/Element.h" #include "odil/VR.h" #include "opaque_types.h" #include "type_casters.h" void wrap_Element(pybind11::module & m) { using namespace pybind11; using namespace odil; class_(m, "Element") // WARNING: the VR is not handled correctly //.def_readwrite("vr", &Element::vr) .def_property( "vr", [](Element const & e) { return e.vr; }, [](Element & e, VR v) { e.vr = v; }) .def(init()) .def(init()) .def( init([](sequence & source, VR vr) { return convert_sequence(source, vr); }), "source"_a, "vr"_a=VR::INVALID) .def("empty", &Element::empty) .def("size", &Element::size) .def( "get_value", &Element::get_value, return_value_policy::reference_internal) .def("is_int", &Element::is_int) .def( "as_int", (Value::Integers & (Element::*)()) &Element::as_int, return_value_policy::reference_internal) .def("is_real", &Element::is_real) .def( "as_real", (Value::Reals & (Element::*)()) &Element::as_real, return_value_policy::reference_internal) .def("is_string", &Element::is_string) .def( "as_string", (Value::Strings & (Element::*)()) &Element::as_string, return_value_policy::reference_internal) .def("is_data_set", &Element::is_data_set) .def( "as_data_set", (Value::DataSets & (Element::*)()) &Element::as_data_set, return_value_policy::reference_internal) .def("is_binary", &Element::is_binary) .def( "as_binary", (Value::Binary & (Element::*)()) &Element::as_binary, return_value_policy::reference_internal) .def(self == self) .def(self != self) .def("__len__", &Element::size) .def("clear", &Element::clear) ; } odil-0.11.0/wrappers/python/ElementsDictionary.cpp000066400000000000000000000064271362244656000222330ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "opaque_types.h" #include "type_casters.h" void wrap_ElementsDictionary(pybind11::module & m) { using namespace pybind11; using namespace odil; auto scope = class_(m, "ElementsDictionaryKey") .def(init<>()) .def(init()) .def(init()) .def("get_type", &ElementsDictionaryKey::get_type) .def("get_tag", &ElementsDictionaryKey::get_tag) .def("get_string", &ElementsDictionaryKey::get_string) .def("get_string", &ElementsDictionaryKey::get_string) .def( "set", static_cast< void (ElementsDictionaryKey::*)(Tag const) >(&ElementsDictionaryKey::set)) .def( "set", static_cast< void (ElementsDictionaryKey::*)(std::string const &) >(&ElementsDictionaryKey::set)) .def(self < self) .def(self == self) ; enum_(scope, "Type") .value("Tag", ElementsDictionaryKey::Type::Tag) .value("String", ElementsDictionaryKey::Type::String) .value("None", ElementsDictionaryKey::Type::None) ; class_(m, "ElementsDictionaryEntry") .def(init()) .def_readwrite("name", &ElementsDictionaryEntry::name) .def_readwrite("keyword", &ElementsDictionaryEntry::keyword) .def_readwrite("vr", &ElementsDictionaryEntry::vr) .def_readwrite("vm", &ElementsDictionaryEntry::vm) ; bind_map(m, "ElementsDictionary") .def("__getitem__", [](ElementsDictionary & container, Tag const & key) { ElementsDictionary::iterator iterator = container.find(key); if(iterator == container.end()) { throw key_error(); } return iterator->second; } ) .def("__getitem__", [](ElementsDictionary & container, std::string const & key) { ElementsDictionary::iterator iterator = container.find(key); if(iterator == container.end()) { throw key_error(); } return iterator->second; } ) .def( "__contains__", [](ElementsDictionary const & container, Tag const & key) { return container.find(key) != container.end(); } ) .def( "__contains__", [](ElementsDictionary const & container, std::string const & key) { return container.find(key) != container.end(); } ) ; } odil-0.11.0/wrappers/python/Exception.cpp000066400000000000000000000012161362244656000203560ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/Exception.h" #include "opaque_types.h" #include "type_casters.h" void wrap_Exception(pybind11::module & m) { pybind11::register_exception(m, "Exception"); } odil-0.11.0/wrappers/python/FindSCP.cpp000066400000000000000000000027211362244656000176500ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/CFindRequest.h" #include "odil/FindSCP.h" #include "DataSetGeneratorWrapper.h" void wrap_FindSCP(pybind11::module & m) { using namespace pybind11; using namespace odil; auto find_scp_scope = class_(m, "FindSCP") .def(init()) .def("set_generator", &FindSCP::set_generator) .def( "__call__", static_cast< void (FindSCP::*)(std::shared_ptr) >(&FindSCP::operator())) ; class_< FindSCP::DataSetGenerator, DataSetGeneratorWrapper, // trampoline std::shared_ptr // holder >(find_scp_scope, "DataSetGenerator") .def(init<>()) .def("initialize", &FindSCP::DataSetGenerator::initialize) .def("done", &FindSCP::DataSetGenerator::done) .def("next", &FindSCP::DataSetGenerator::next) .def("get", &FindSCP::DataSetGenerator::get) ; } odil-0.11.0/wrappers/python/FindSCU.cpp000066400000000000000000000023621362244656000176560ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/FindSCU.h" namespace { void find_with_python_callback( odil::FindSCU const & scu, std::shared_ptr query, pybind11::object const & f) { scu.find( query, [f](std::shared_ptr data_set) { f(data_set); } ); } } void wrap_FindSCU(pybind11::module & m) { using namespace pybind11; using namespace odil; class_(m, "FindSCU") .def(init()) .def( "find", &find_with_python_callback ) .def( "find", static_cast< Value::DataSets (FindSCU::*)(std::shared_ptr) const >(&FindSCU::find) ) .def("set_affected_sop_class", &FindSCU::set_affected_sop_class) ; } odil-0.11.0/wrappers/python/GetSCP.cpp000066400000000000000000000040001362244656000174770ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/message/CGetRequest.h" #include "odil/GetSCP.h" #include "DataSetGeneratorWrapper.h" namespace { class DataSetGeneratorWrapperGet: public DataSetGeneratorWrapper { public: DataSetGeneratorWrapperGet() : DataSetGeneratorWrapper() { // Nothing else } virtual ~DataSetGeneratorWrapperGet() override { // Nothing to do. } virtual unsigned int count() const override { PYBIND11_OVERLOAD_PURE(unsigned int, odil::GetSCP::DataSetGenerator, count, ); } }; } void wrap_GetSCP(pybind11::module & m) { using namespace pybind11; using namespace odil; auto get_scp_scope = class_(m, "GetSCP") .def(init()) .def("set_generator", &GetSCP::set_generator) .def( "__call__", static_cast< void (GetSCP::*)(std::shared_ptr) >(&GetSCP::operator()) ) ; class_< GetSCP::DataSetGenerator, DataSetGeneratorWrapperGet, // trampoline std::shared_ptr // holder >(get_scp_scope, "DataSetGenerator") .def(init<>()) .def("initialize", &GetSCP::DataSetGenerator::initialize) .def("done", &GetSCP::DataSetGenerator::done) .def("next", &GetSCP::DataSetGenerator::next) .def("get", &GetSCP::DataSetGenerator::get) .def("count", &GetSCP::DataSetGenerator::count) ; } odil-0.11.0/wrappers/python/GetSCU.cpp000066400000000000000000000035331362244656000175160ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/GetSCU.h" namespace { void get_with_python_callback( odil::GetSCU const & scu, std::shared_ptr query, pybind11::object const & store_callback, pybind11::object const & get_callback) { odil::GetSCU::StoreCallback store_callback_cpp; if(!store_callback.is_none()) { store_callback_cpp = [store_callback](std::shared_ptr data_set) { store_callback(data_set); }; } odil::GetSCU::GetCallback get_callback_cpp; if(!get_callback.is_none()) { get_callback_cpp = [get_callback](std::shared_ptr message) { get_callback(message); }; } scu.get(query, store_callback_cpp, get_callback_cpp); } } void wrap_GetSCU(pybind11::module & m) { using namespace pybind11; using namespace pybind11::literals; using namespace odil; class_(m, "GetSCU") .def(init()) .def( // FIXME "get", &get_with_python_callback, "Perform the C-GET using callbacks", "query"_a, "store_callback"_a, "get_callback"_a=none()) .def( "get", static_cast< Value::DataSets (GetSCU::*)(std::shared_ptr) const >(&GetSCU::get) ) .def("set_affected_sop_class", &GetSCU::set_affected_sop_class) ; } odil-0.11.0/wrappers/python/MoveSCP.cpp000066400000000000000000000045671362244656000177100ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/message/CMoveRequest.h" #include "odil/MoveSCP.h" #include "DataSetGeneratorWrapper.h" namespace { class DataSetGeneratorWrapperMove: public DataSetGeneratorWrapper { public: DataSetGeneratorWrapperMove() : DataSetGeneratorWrapper() { // Nothing else } virtual ~DataSetGeneratorWrapperMove() override { // Nothing to do. } virtual unsigned int count() const override { PYBIND11_OVERLOAD_PURE(unsigned int, odil::MoveSCP::DataSetGenerator, count, ); } virtual odil::Association get_association(std::shared_ptr request) const override { PYBIND11_OVERLOAD_PURE( odil::Association, odil::MoveSCP::DataSetGenerator, get_association, request); } }; } void wrap_MoveSCP(pybind11::module & m) { using namespace pybind11; using namespace odil; auto move_scp_scope = class_(m, "MoveSCP") .def(init()) .def("set_generator", &MoveSCP::set_generator) .def( "__call__", static_cast< void (MoveSCP::*)(std::shared_ptr) >(&MoveSCP::operator()) ) ; class_< MoveSCP::DataSetGenerator, DataSetGeneratorWrapperMove, // trampoline std::shared_ptr // holder >(move_scp_scope, "DataSetGenerator") .def(init<>()) .def("initialize", &MoveSCP::DataSetGenerator::initialize) .def("done", &MoveSCP::DataSetGenerator::done) .def("next", &MoveSCP::DataSetGenerator::next) .def("get", &MoveSCP::DataSetGenerator::get) .def("count", &MoveSCP::DataSetGenerator::count) .def("get_association", &MoveSCP::DataSetGenerator::get_association) ; } odil-0.11.0/wrappers/python/MoveSCU.cpp000066400000000000000000000041741362244656000177070ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/CMoveResponse.h" #include "odil/MoveSCU.h" namespace { void move_with_python_callback( odil::MoveSCU const & scu, std::shared_ptr query, pybind11::object const & store_callback, pybind11::object const & move_callback) { odil::MoveSCU::StoreCallback store_callback_cpp; if(!store_callback.is_none()) { store_callback_cpp = [store_callback](std::shared_ptr data_set) { store_callback(data_set); }; } odil::MoveSCU::MoveCallback move_callback_cpp; if(!move_callback.is_none()) { move_callback_cpp = [move_callback](std::shared_ptr message) { move_callback(message); }; } scu.move(query, store_callback_cpp, move_callback_cpp); } } void wrap_MoveSCU(pybind11::module & m) { using namespace pybind11; using namespace odil; class_(m, "MoveSCU") .def(init()) .def( "get_move_destination", &MoveSCU::get_move_destination, return_value_policy::copy) .def( "set_move_destination", &MoveSCU::set_move_destination ) .def( "get_incoming_port", &MoveSCU::get_incoming_port ) .def( "set_incoming_port", &MoveSCU::set_incoming_port ) .def("move", &move_with_python_callback) .def( "move", static_cast< Value::DataSets (MoveSCU::*)(std::shared_ptr) const >(&MoveSCU::move) ) .def("set_affected_sop_class", &MoveSCU::set_affected_sop_class) ; } odil-0.11.0/wrappers/python/NCreateSCP.cpp000066400000000000000000000022061362244656000203070ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/NCreateSCP.h" namespace { void set_callback(odil::NCreateSCP & scp, pybind11::object const & f) { scp.set_callback( [f](std::shared_ptr message) { return f(message).cast(); } ); } } void wrap_NCreateSCP(pybind11::module & m) { using namespace pybind11; using namespace odil; class_(m, "NCreateSCP") .def(init()) .def("set_callback", &set_callback) .def( "__call__", static_cast< void (NCreateSCP::*)(std::shared_ptr) >(&NCreateSCP::operator()) ) ; } odil-0.11.0/wrappers/python/NSetSCP.cpp000066400000000000000000000022341362244656000176400ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/NSetSCP.h" namespace { void set_callback(odil::NSetSCP& scp, pybind11::object const& f) { scp.set_callback( [f](std::shared_ptr message) { return f(message).cast(); }); } } void wrap_NSetSCP(pybind11::module & m) { using namespace pybind11; using namespace odil; class_(m, "NSetSCP") .def(init()) .def (init()) .def("set_callback", &set_callback) .def( "__call__", static_cast< void (NSetSCP::*)(std::shared_ptr) >(&NSetSCP::operator()) ) ; } odil-0.11.0/wrappers/python/NSetSCU.cpp000066400000000000000000000017361362244656000176530ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/NSetSCU.h" void wrap_NSetSCU(pybind11::module & m) { using namespace pybind11; using namespace odil; class_(m, "NSetSCU") .def(init()) .def( "get_affected_sop_class", &NSetSCU::get_affected_sop_class, return_value_policy::copy) .def( "set_affected_sop_class", static_cast)>( &NSetSCU::set_affected_sop_class) ) .def("set", &NSetSCU::set) ; } odil-0.11.0/wrappers/python/Reader.cpp000066400000000000000000000042441362244656000176260ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _99998287_59bb_4f7c_aadc_fe5ecb87f8c2 #define _99998287_59bb_4f7c_aadc_fe5ecb87f8c2 #include #include #include #include "opaque_types.h" #include "type_casters.h" #include "streambuf.h" void wrap_Reader(pybind11::module & m) { using namespace pybind11; using namespace odil; std::function default_halt_condition = [](Tag const &)->bool { return false;}; class_(m, "Reader") .def( init(), "stream"_a, "transfer_syntax"_a, "keep_group_length"_a=false) .def_readwrite("transfer_syntax", &Reader::transfer_syntax) .def_readwrite("byte_ordering", &Reader::byte_ordering) .def_readwrite("explicit_vr", &Reader::explicit_vr) .def_readwrite("keep_group_length", &Reader::keep_group_length) .def( "read_data_set", &Reader::read_data_set, "halt_condition"_a=default_halt_condition) .def("read_tag", &Reader::read_tag) .def("read_length", &Reader::read_length) .def( "read_element", &Reader::read_element, "tag"_a=Tag(0xffff, 0xffff), "data_set"_a=std::make_shared()) .def_static( "read_file", []( odil::wrappers::python::iostream & stream, bool keep_group_length, std::function halt_condition) { return Reader::read_file(stream, keep_group_length, halt_condition); }, "stream"_a, "keep_group_length"_a=false, "halt_condition"_a=default_halt_condition) ; } #endif // _99998287_59bb_4f7c_aadc_fe5ecb87f8c2 odil-0.11.0/wrappers/python/SCPDispatcher.cpp000066400000000000000000000031071362244656000210550ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/EchoSCP.h" #include "odil/NCreateSCP.h" #include "odil/NSetSCP.h" #include "odil/SCP.h" #include "odil/SCPDispatcher.h" #include "odil/StoreSCP.h" namespace { template void set_scp(odil::SCPDispatcher & dispatcher, TSCP scp) { dispatcher.set_scp(Command, std::make_shared(scp)); } } void wrap_SCPDispatcher(pybind11::module & m) { using namespace pybind11; using namespace odil; class_(m, "SCPDispatcher") .def(init()) .def("set_scp", &SCPDispatcher::set_scp) .def("dispatch", &SCPDispatcher::dispatch) .def( "set_echo_scp", &set_scp) .def( "set_store_scp", &set_scp) .def( "set_nset_scp", &set_scp) .def( "set_ncreate_scp", &set_scp) .def("has_scp", &SCPDispatcher::has_scp) ; } odil-0.11.0/wrappers/python/StoreSCP.cpp000066400000000000000000000023021362244656000200570ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/StoreSCP.h" namespace { using namespace std; void set_callback(odil::StoreSCP& scp, pybind11::object const& f) { scp.set_callback( [f](std::shared_ptr message) { auto result = f(message); return result.cast(); }); } } void wrap_StoreSCP(pybind11::module & m) { using namespace pybind11; using namespace odil; class_(m, "StoreSCP") .def(init()) .def(init()) .def("set_callback", &set_callback) .def( "__call__", static_cast< void (StoreSCP::*)(std::shared_ptr) >(&StoreSCP::operator())) ; } odil-0.11.0/wrappers/python/StoreSCU.cpp000066400000000000000000000024271362244656000200740ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/StoreSCU.h" void wrap_StoreSCU(pybind11::module & m) { using namespace pybind11; using namespace pybind11::literals; using namespace odil; typedef void (StoreSCU::*StoreFunction)( std::shared_ptr, Value::String const &, Value::Integer) const; class_(m, "StoreSCU") .def(init()) .def( "get_affected_sop_class", &StoreSCU::get_affected_sop_class, return_value_policy::copy) .def( "set_affected_sop_class", static_cast)>( &StoreSCU::set_affected_sop_class) ) .def( "store", &odil::StoreSCU::store, "dataset"_a, "move_originator_ae_title"_a="", "move_originator_message_id"_a=-1) ; } odil-0.11.0/wrappers/python/Tag.cpp000066400000000000000000000025141362244656000171350ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/Tag.h" #include "opaque_types.h" #include "type_casters.h" void wrap_Tag(pybind11::module & m) { using namespace pybind11; using namespace odil; class_(m, "Tag") .def(init()) .def(init()) .def(init()) .def_readwrite("group", &Tag::group) .def_readwrite("element", &Tag::element) .def("is_private", &Tag::is_private) .def("get_name", &Tag::get_name) .def(self == self) .def(self != self) .def(self < self) .def(self > self) .def(self <= self) .def(self >= self) .def("__str__", &Tag::operator std::string) .def_property_readonly("name", &Tag::get_name) .def("__hash__", [](Tag const & x) { return (x.group<<16)+x.element; }) ; implicitly_convertible(); } odil-0.11.0/wrappers/python/UIDsDictionary.cpp000066400000000000000000000020001362244656000212420ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "opaque_types.h" #include "type_casters.h" void wrap_UIDsDictionary(pybind11::module & m) { using namespace pybind11; using namespace odil; class_(m, "UIDsDictionaryEntry") .def(init()) .def_readwrite("name", &UIDsDictionaryEntry::name) .def_readwrite("keyword", &UIDsDictionaryEntry::keyword) .def_readwrite("type", &UIDsDictionaryEntry::type) ; bind_map(m, "UIDsDictionary"); } odil-0.11.0/wrappers/python/VR.cpp000066400000000000000000000036431362244656000167550ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/Tag.h" #include "odil/VR.h" #include "opaque_types.h" #include "type_casters.h" void wrap_VR(pybind11::module & m) { using namespace pybind11; using namespace odil; enum_(m, "VR") .value("UNKNOWN", VR::UNKNOWN) .value("AE", VR::AE).value("AS", VR::AS).value("AT", VR::AT) .value("CS", VR::CS).value("DA", VR::DA).value("DS", VR::DS) .value("DT", VR::DT).value("FD", VR::FD).value("FL", VR::FL) .value("IS", VR::IS).value("LO", VR::LO).value("LT", VR::LT) .value("PN", VR::PN).value("OB", VR::OB).value("OF", VR::OF) .value("OV", VR::OV).value("OW", VR::OW).value("SH", VR::SH) .value("SL", VR::SL).value("SQ", VR::SQ).value("SS", VR::SS) .value("ST", VR::ST).value("SV", VR::SV).value("TM", VR::TM) .value("UC", VR::UC).value("UI", VR::UI).value("UL", VR::UL) .value("UN", VR::UN).value("UR", VR::UR).value("US", VR::US) .value("UT", VR::UT).value("UV", VR::UV) .value("INVALID", VR::INVALID) .def(init([](std::string const & string) { return as_vr(string); })) .def("__str__", [](VR const & vr ) { return as_string(vr); }) ; m.def("as_string", (std::string (*)(VR)) as_string); m.def("as_vr", (VR (*)(std::string)) as_string); m.def("as_vr", (VR (*)(Tag)) as_string); m.def("is_int", odil::is_int); m.def("is_real", odil::is_real); m.def("is_string", odil::is_string); m.def("is_binary", odil::is_binary); } odil-0.11.0/wrappers/python/VRFinder.cpp000066400000000000000000000013421362244656000200770ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/VRFinder.h" #include "opaque_types.h" #include "type_casters.h" void wrap_VRFinder(pybind11::module & m) { using namespace pybind11; using namespace odil; class_(m, "VRFinder") .def(init<>()) .def("__call__", &VRFinder::operator()) ; } odil-0.11.0/wrappers/python/Value.cpp000066400000000000000000000206331362244656000175000ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include #include "odil/DataSet.h" #include "odil/Value.h" #include "opaque_types.h" #include "type_casters.h" namespace odil { pybind11::object as_memory_view(odil::Value::Binary::value_type const & binary_item) { Py_buffer buffer; PyBuffer_FillInfo( &buffer, nullptr, const_cast(&binary_item[0]), binary_item.size(), 1, PyBUF_SIMPLE); PyObject * memory_view = PyMemoryView_FromBuffer(&buffer); return pybind11::reinterpret_steal(memory_view); } // TODO: add this to bind_vector template void vector_accessor(Class_ &cl) { using T = typename Vector::value_type; using SizeType = long; //typename Vector::size_type; using ItType = typename Vector::iterator; cl.def( "__getitem__", [](Vector &v, SizeType i) -> T & { if((i>=0 && i >= SizeType(v.size())) || (i<0 && i < -SizeType(v.size()))) { throw pybind11::index_error(); } return v[i>=0?i:v.size()+i]; }, pybind11::return_value_policy::reference_internal // ref + keepalive ); cl.def( "__iter__", [](Vector &v) { return pybind11::make_iterator< pybind11::return_value_policy::reference_internal, ItType, ItType, T& >(v.begin(), v.end()); }, pybind11::keep_alive<0, 1>() /* Essential: keep list alive while iterator exists */ ); } template, typename... Args> pybind11::class_ bind_vector(pybind11::handle scope, std::string const &name, Args&&... args) { using Class_ = pybind11::class_; // If the value_type is unregistered (e.g. a converting type) or is itself registered // module-local then make the vector binding module-local as well: using vtype = typename Vector::value_type; auto vtype_info = pybind11::detail::get_type_info(typeid(vtype)); bool local = !vtype_info || vtype_info->module_local; Class_ cl( scope, name.c_str(), pybind11::module_local(local), std::forward(args)...); // Declare the buffer interface if a buffer_protocol() is passed in pybind11::detail::vector_buffer(cl); cl.def(pybind11::init<>()); // Register copy constructor (if possible) pybind11::detail::vector_if_copy_constructible(cl); // Register comparison-related operators and functions (if possible) pybind11::detail::vector_if_equal_operator(cl); // Register stream insertion operator (if possible) pybind11::detail::vector_if_insertion_operator(cl, name); // Modifiers require copyable vector value type pybind11::detail::vector_modifiers(cl); // Accessor and iterator; return by value if copyable, otherwise we return by ref + keep-alive odil::vector_accessor(cl); cl.def( "__bool__", [](const Vector &v) -> bool { return !v.empty(); }, "Check whether the list is nonempty" ); cl.def("__len__", &Vector::size); return cl; } } void wrap_Value(pybind11::module & m) { using namespace pybind11; using namespace odil; class_ value(m, "Value"); value .def(init()) .def(init()) .def(init()) .def(init()) .def(init()) // Explicit constructor since Value::XXX are opaque // WARNING: define *after* other constructors for correct priority .def( init([](sequence & source) { return convert_sequence(source); })) .def("get_type", &Value::get_type) .def("empty", &Value::empty) .def("size", &Value::size) .def( "as_integers", (Value::Integers & (Value::*)()) &Value::as_integers, return_value_policy::reference_internal) .def( "as_reals", (Value::Reals & (Value::*)()) &Value::as_reals, return_value_policy::reference_internal) .def( "as_strings", (Value::Strings & (Value::*)()) &Value::as_strings, return_value_policy::reference_internal) .def( "as_data_sets", (Value::DataSets & (Value::*)()) &Value::as_data_sets, return_value_policy::reference_internal) .def( "as_binary", (Value::Binary & (Value::*)()) &Value::as_binary, return_value_policy::reference_internal) .def(self == self) .def(self != self) .def("clear", &Value::clear) .def("__len__", &Value::size) .def_property_readonly("type", &Value::get_type) ; enum_(value, "Type") .value("Integers", Value::Type::Integers) .value("Reals", Value::Type::Reals) .value("Strings", Value::Type::Strings) .value("DataSets", Value::Type::DataSets) .value("Binary", Value::Type::Binary) ; odil::bind_vector(value, "Integers"); odil::bind_vector(value, "Reals"); // NOTE Using bind_vector brings back #63. // Re-use the code of bind_vector and modify where needed. { using Vector = Value::Strings; std::string const name = "Strings"; using Class_ = class_; Class_ cl(value, name.c_str(), module_local(true)); cl.def(init<>()); detail::vector_if_copy_constructible(cl); detail::vector_if_equal_operator(cl); detail::vector_if_insertion_operator(cl); detail::vector_modifiers(cl); // vector_accessor using SizeType = long; //typename Vector::size_type; using ItType = typename Vector::iterator; cl.def("__getitem__", [](Vector &v, SizeType i) { if((i>=0 && i >= SizeType(v.size())) || (i<0 && i < -SizeType(v.size()))) { throw pybind11::index_error(); } return bytes(v[i>=0?i:v.size()+i]); }); cl.def( "__iter__", [](Vector &v) { typedef detail::iterator_state< ItType, ItType, false, return_value_policy::copy> state; if (!detail::get_type_info(typeid(state), false)) { class_(handle(), "iterator", pybind11::module_local()) .def("__iter__", [](state &s) -> state& { return s; }) .def("__next__", [](state &s) -> bytes { if (!s.first_or_done) { ++s.it; } else { s.first_or_done = false; } if (s.it == s.end) { s.first_or_done = true; throw stop_iteration(); } return bytes(*s.it); }) ; } return cast(state{v.begin(), v.end(), true}); } ); // bind_vector cl.def("__bool__", [](const Vector &v) -> bool { return !v.empty(); }, "Check whether the list is nonempty" ); cl.def("__len__", &Vector::size); } odil::bind_vector(value, "DataSets"); odil::bind_vector(value, "BinaryItem") .def("get_memory_view", as_memory_view); odil::bind_vector(value, "Binary"); } odil-0.11.0/wrappers/python/Writer.cpp000066400000000000000000000053711362244656000177020ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "opaque_types.h" #include "type_casters.h" #include "streambuf.h" void wrap_Writer(pybind11::module & m) { using namespace pybind11; using namespace odil; class_ writer(m, "Writer"); enum_(writer, "ItemEncoding") .value("ExplicitLength", Writer::ItemEncoding::ExplicitLength) .value("UndefinedLength", Writer::ItemEncoding::UndefinedLength) ; writer .def_readwrite("byte_ordering", &Writer::byte_ordering) .def_readwrite("explicit_vr", &Writer::explicit_vr) .def_readwrite("item_encoding", &Writer::item_encoding) .def_readwrite("use_group_length", &Writer::use_group_length) .def( init< odil::wrappers::python::iostream &, ByteOrdering, bool, Writer::ItemEncoding, bool>(), "stream"_a, "byte_ordering"_a, "explicit_vr"_a, "item_encoding"_a=Writer::ItemEncoding::ExplicitLength, "use_group_length"_a=false) .def( init< odil::wrappers::python::iostream &, std::string const &, Writer::ItemEncoding, bool>(), "stream"_a, "transfer_syntax"_a, "item_encoding"_a=Writer::ItemEncoding::ExplicitLength, "use_group_length"_a=false) .def("write_data_set", &Writer::write_data_set) .def("write_tag", &Writer::write_tag) .def("write_element", &Writer::write_element) .def_static( "write_file", []( std::shared_ptr const data_set, odil::wrappers::python::iostream & stream, std::shared_ptr meta_information, std::string const & transfer_syntax, Writer::ItemEncoding item_encoding, bool use_group_length) { Writer::write_file( data_set, stream, meta_information, transfer_syntax, item_encoding, use_group_length); }, "data_set"_a, "stream"_a, "meta_information"_a=std::make_shared(), "transfer_syntax"_a=registry::ExplicitVRLittleEndian, "item_encoding"_a=Writer::ItemEncoding::ExplicitLength, "use_group_length"_a=false) ; } odil-0.11.0/wrappers/python/__init__.py000066400000000000000000000016061362244656000200300ustar00rootroot00000000000000import contextlib import warnings from ._odil import * _open = open @contextlib.contextmanager def open(path, mode="rb"): fd = _open(path, mode) stream = iostream(fd) yield stream fd.close() def read(path, keep_group_length=False, halt_condition=None): warnings.warn("odil.read is deprecated. Use odil.open instead") with open(path) as stream: return Reader.read_file(stream, keep_group_length, halt_condition) def write( data_set, path, meta_information=DataSet(), transfer_syntax=registry.ExplicitVRLittleEndian, item_encoding=Writer.ItemEncoding.ExplicitLength, use_group_length=False): warnings.warn("odil.write is deprecated. Use odil.open instead") with open(path, "wb") as stream: Writer.write_file( data_set, stream, meta_information, transfer_syntax, item_encoding, use_group_length) odil-0.11.0/wrappers/python/endian.cpp000066400000000000000000000014121362244656000176540ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "opaque_types.h" #include "type_casters.h" void wrap_endian(pybind11::module & m) { using namespace pybind11; using namespace odil; enum_(m, "ByteOrdering") .value("LittleEndian", ByteOrdering::LittleEndian) .value("BigEndian", ByteOrdering::BigEndian) ; } odil-0.11.0/wrappers/python/json_converter.cpp000066400000000000000000000030771362244656000214670ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/DataSet.h" #include "odil/json_converter.h" #include "odil/StringStream.h" #include "opaque_types.h" #include "type_casters.h" void wrap_json_converter(pybind11::module & m) { using namespace pybind11; using namespace odil; m.def( "as_json", [](std::shared_ptr data_set, bool pretty_print) { auto const json = as_json(data_set); std::shared_ptr writer; if(pretty_print) { writer = std::make_shared(); } else { writer = std::make_shared(); } auto const string = writer->write(json); return string; }, "data_set"_a, "pretty_print"_a=false); m.def( "from_json", [](std::string const & json_string) { IStringStream stream(&json_string[0], json_string.size()); Json::Value json_value; stream >> json_value; return as_dataset(json_value); } ); } odil-0.11.0/wrappers/python/messages/000077500000000000000000000000001362244656000175235ustar00rootroot00000000000000odil-0.11.0/wrappers/python/messages/CEchoRequest.cpp000066400000000000000000000020731362244656000225630ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/CEchoRequest.h" void wrap_CEchoRequest(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; class_, Request>(m, "CEchoRequest") .def(init()) .def(init>()) .def( "get_affected_sop_class_uid", &CEchoRequest::get_affected_sop_class_uid, return_value_policy::copy) .def( "set_affected_sop_class_uid", &CEchoRequest::set_affected_sop_class_uid) ; } odil-0.11.0/wrappers/python/messages/CEchoResponse.cpp000066400000000000000000000021141362244656000227250ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/CEchoResponse.h" void wrap_CEchoResponse(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; class_, Response>(m, "CEchoResponse") .def(init()) .def(init>()) .def( "get_affected_sop_class_uid", &CEchoResponse::get_affected_sop_class_uid, return_value_policy::copy) .def( "set_affected_sop_class_uid", &CEchoResponse::set_affected_sop_class_uid) ; } odil-0.11.0/wrappers/python/messages/CFindRequest.cpp000066400000000000000000000024651362244656000225720ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/CFindRequest.h" void wrap_CFindRequest(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; class_, Request>(m, "CFindRequest") .def(init< Value::Integer, Value::String const &, Value::Integer, std::shared_ptr >()) .def(init>()) .def( "get_affected_sop_class_uid", &CFindRequest::get_affected_sop_class_uid, return_value_policy::copy) .def( "set_affected_sop_class_uid", &CFindRequest::set_affected_sop_class_uid) .def( "get_priority", &CFindRequest::get_priority, return_value_policy::copy) .def("set_priority", &CFindRequest::set_priority) ; } odil-0.11.0/wrappers/python/messages/CFindResponse.cpp000066400000000000000000000024651362244656000227400ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/CFindResponse.h" void wrap_CFindResponse(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; class_, Response>(m, "CFindResponse") .def(init()) .def(init>()) .def(init>()) .def( "get_message_id", &CFindResponse::get_message_id, return_value_policy::copy) .def("set_message_id", &CFindResponse::set_message_id) .def( "get_affected_sop_class_uid", &CFindResponse::get_affected_sop_class_uid, return_value_policy::copy) .def( "set_affected_sop_class_uid", &CFindResponse::set_affected_sop_class_uid) ; } odil-0.11.0/wrappers/python/messages/CGetRequest.cpp000066400000000000000000000024541362244656000224270ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/CGetRequest.h" void wrap_CGetRequest(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; class_, Request>(m, "CGetRequest") .def(init< Value::Integer, Value::String const &, Value::Integer, std::shared_ptr >()) .def(init>()) .def( "get_affected_sop_class_uid", &CGetRequest::get_affected_sop_class_uid, return_value_policy::copy) .def( "set_affected_sop_class_uid", &CGetRequest::set_affected_sop_class_uid) .def( "get_priority", &CGetRequest::get_priority, return_value_policy::copy) .def("set_priority", &CGetRequest::set_priority) ; } odil-0.11.0/wrappers/python/messages/CGetResponse.cpp000066400000000000000000000062551362244656000226000ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/CGetResponse.h" void wrap_CGetResponse(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; class_, Response>(m, "CGetResponse") .def(init()) .def(init>()) .def(init>()) .def("has_message_id", &CGetResponse::has_message_id) .def( "get_message_id", &CGetResponse::get_message_id, return_value_policy::copy) .def("set_message_id", &CGetResponse::set_message_id) .def( "has_affected_sop_class_uid", &CGetResponse::has_affected_sop_class_uid) .def( "get_affected_sop_class_uid", &CGetResponse::get_affected_sop_class_uid, return_value_policy::copy) .def( "set_affected_sop_class_uid", &CGetResponse::set_affected_sop_class_uid) .def( "has_number_of_remaining_sub_operations", &CGetResponse::has_number_of_remaining_sub_operations) .def( "get_number_of_remaining_sub_operations", &CGetResponse::get_number_of_remaining_sub_operations, return_value_policy::copy) .def( "set_number_of_remaining_sub_operations", &CGetResponse::set_number_of_remaining_sub_operations) .def( "has_number_of_completed_sub_operations", &CGetResponse::has_number_of_completed_sub_operations) .def( "get_number_of_completed_sub_operations", &CGetResponse::get_number_of_completed_sub_operations, return_value_policy::copy) .def( "set_number_of_completed_sub_operations", &CGetResponse::set_number_of_completed_sub_operations) .def( "has_number_of_failed_sub_operations", &CGetResponse::has_number_of_failed_sub_operations) .def( "get_number_of_failed_sub_operations", &CGetResponse::get_number_of_failed_sub_operations, return_value_policy::copy) .def( "set_number_of_failed_sub_operations", &CGetResponse::set_number_of_failed_sub_operations) .def( "has_number_of_warning_sub_operations", &CGetResponse::has_number_of_warning_sub_operations) .def( "get_number_of_warning_sub_operations", &CGetResponse::get_number_of_warning_sub_operations, return_value_policy::copy) .def( "set_number_of_warning_sub_operations", &CGetResponse::set_number_of_warning_sub_operations) ; } odil-0.11.0/wrappers/python/messages/CMoveRequest.cpp000066400000000000000000000030241362244656000226100ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/CMoveRequest.h" void wrap_CMoveRequest(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; class_, Request>(m, "CMoveRequest") .def(init< Value::Integer, Value::String const &, Value::Integer, Value::String const &, std::shared_ptr >()) .def(init>()) .def( "get_affected_sop_class_uid", &CMoveRequest::get_affected_sop_class_uid, return_value_policy::copy) .def( "set_affected_sop_class_uid", &CMoveRequest::set_affected_sop_class_uid) .def( "get_priority", &CMoveRequest::get_priority, return_value_policy::copy) .def("set_priority", &CMoveRequest::set_priority) .def( "get_move_destination", &CMoveRequest::get_move_destination, return_value_policy::copy) .def("set_move_destination", &CMoveRequest::set_move_destination) ; } odil-0.11.0/wrappers/python/messages/CMoveResponse.cpp000066400000000000000000000063041362244656000227620ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/CMoveResponse.h" void wrap_CMoveResponse(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; class_, Response>(m, "CMoveResponse") .def(init()) .def(init>()) .def(init>()) .def("has_message_id", &CMoveResponse::has_message_id) .def( "get_message_id", &CMoveResponse::get_message_id, return_value_policy::copy) .def("set_message_id", &CMoveResponse::set_message_id) .def( "has_affected_sop_class_uid", &CMoveResponse::has_affected_sop_class_uid) .def( "get_affected_sop_class_uid", &CMoveResponse::get_affected_sop_class_uid, return_value_policy::copy) .def( "set_affected_sop_class_uid", &CMoveResponse::set_affected_sop_class_uid) .def( "has_number_of_remaining_sub_operations", &CMoveResponse::has_number_of_remaining_sub_operations) .def( "get_number_of_remaining_sub_operations", &CMoveResponse::get_number_of_remaining_sub_operations, return_value_policy::copy) .def( "set_number_of_remaining_sub_operations", &CMoveResponse::set_number_of_remaining_sub_operations) .def( "has_number_of_completed_sub_operations", &CMoveResponse::has_number_of_completed_sub_operations) .def( "get_number_of_completed_sub_operations", &CMoveResponse::get_number_of_completed_sub_operations, return_value_policy::copy) .def( "set_number_of_completed_sub_operations", &CMoveResponse::set_number_of_completed_sub_operations) .def( "has_number_of_failed_sub_operations", &CMoveResponse::has_number_of_failed_sub_operations) .def( "get_number_of_failed_sub_operations", &CMoveResponse::get_number_of_failed_sub_operations, return_value_policy::copy) .def( "set_number_of_failed_sub_operations", &CMoveResponse::set_number_of_failed_sub_operations) .def( "has_number_of_warning_sub_operations", &CMoveResponse::has_number_of_warning_sub_operations) .def( "get_number_of_warning_sub_operations", &CMoveResponse::get_number_of_warning_sub_operations, return_value_policy::copy) .def( "set_number_of_warning_sub_operations", &CMoveResponse::set_number_of_warning_sub_operations) ; } odil-0.11.0/wrappers/python/messages/CStoreRequest.cpp000066400000000000000000000045721362244656000230070ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/CStoreRequest.h" void wrap_CStoreRequest(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; class_, Request>(m, "CStoreRequest") .def(init< Value::Integer, Value::String const &, Value::String const &, Value::Integer, std::shared_ptr >()) .def(init>()) .def( "get_affected_sop_class_uid", &CStoreRequest::get_affected_sop_class_uid, return_value_policy::copy) .def( "set_affected_sop_class_uid", &CStoreRequest::set_affected_sop_class_uid) .def( "get_affected_sop_instance_uid", &CStoreRequest::get_affected_sop_instance_uid, return_value_policy::copy) .def( "set_affected_sop_instance_uid", &CStoreRequest::set_affected_sop_instance_uid) .def( "get_priority", &CStoreRequest::get_priority, return_value_policy::copy) .def("set_priority", &CStoreRequest::set_priority) .def( "has_move_originator_ae_title", &CStoreRequest::has_move_originator_ae_title) .def( "get_move_originator_ae_title", &CStoreRequest::get_move_originator_ae_title, return_value_policy::copy) .def( "set_move_originator_ae_title", &CStoreRequest::set_move_originator_ae_title) .def( "has_move_originator_message_id", &CStoreRequest::has_move_originator_message_id) .def( "get_move_originator_message_id", &CStoreRequest::get_move_originator_message_id, return_value_policy::copy) .def( "set_move_originator_message_id", &CStoreRequest::set_move_originator_message_id) ; } odil-0.11.0/wrappers/python/messages/CStoreResponse.cpp000066400000000000000000000037651362244656000231600ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/CStoreResponse.h" void wrap_CStoreResponse(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; class_, Response>(m, "CStoreResponse") .def(init< Value::Integer, Value::Integer>()) .def(init>()) .def( "has_message_id", &CStoreResponse::has_message_id) .def( "get_message_id", &CStoreResponse::get_message_id, return_value_policy::copy) .def( "set_message_id", &CStoreResponse::set_message_id) .def( "has_affected_sop_class_uid", &CStoreResponse::has_affected_sop_class_uid) .def( "get_affected_sop_class_uid", &CStoreResponse::get_affected_sop_class_uid, return_value_policy::copy) .def( "set_affected_sop_class_uid", &CStoreResponse::set_affected_sop_class_uid) .def( "has_affected_sop_instance_uid", &CStoreResponse::has_affected_sop_instance_uid) .def( "get_affected_sop_instance_uid", &CStoreResponse::get_affected_sop_instance_uid, return_value_policy::copy) .def( "set_affected_sop_instance_uid", &CStoreResponse::set_affected_sop_instance_uid) ; } odil-0.11.0/wrappers/python/messages/Message.cpp000066400000000000000000000052611362244656000216170ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/DataSet.h" #include "odil/message/Message.h" void wrap_Message(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; auto message_scope = class_>(m, "Message") .def(init>()) .def(init, std::shared_ptr>()) .def("get_command_set", &Message::get_command_set) .def("has_data_set", &Message::has_data_set) .def( "get_data_set", static_cast (Message::*)() const>(&Message::get_data_set)) .def( "get_command_field", &Message::get_command_field, return_value_policy::reference_internal) .def("set_command_field", &Message::set_command_field) ; enum_(message_scope, "Command") .value("C_STORE_RQ", Message::Command::C_STORE_RQ) .value("C_STORE_RSP", Message::Command::C_STORE_RSP) .value("C_FIND_RQ", Message::Command::C_FIND_RQ) .value("C_FIND_RSP", Message::Command::C_FIND_RSP) .value("C_CANCEL_RQ", Message::Command::C_CANCEL_RQ) .value("C_GET_RQ", Message::Command::C_GET_RQ) .value("C_GET_RSP", Message::Command::C_GET_RSP) .value("C_MOVE_RQ", Message::Command::C_MOVE_RQ) .value("C_MOVE_RSP", Message::Command::C_MOVE_RSP) .value("C_ECHO_RQ", Message::Command::C_ECHO_RQ) .value("C_ECHO_RSP", Message::Command::C_ECHO_RSP) .value("N_EVENT_REPORT_RQ", Message::Command::N_EVENT_REPORT_RQ) .value("N_EVENT_REPORT_RSP", Message::Command::N_EVENT_REPORT_RSP) .value("N_GET_RQ", Message::Command::N_GET_RQ) .value("N_GET_RSP", Message::Command::N_GET_RSP) .value("N_SET_RQ", Message::Command::N_SET_RQ) .value("N_SET_RSP", Message::Command::N_SET_RSP) .value("N_ACTION_RQ", Message::Command::N_ACTION_RQ) .value("N_ACTION_RSP", Message::Command::N_ACTION_RSP) .value("N_CREATE_RQ", Message::Command::N_CREATE_RQ) .value("N_CREATE_RSP", Message::Command::N_CREATE_RSP) .value("N_DELETE_RQ", Message::Command::N_DELETE_RQ) .value("N_DELETE_RSP", Message::Command::N_DELETE_RSP) ; } odil-0.11.0/wrappers/python/messages/NCreateRequest.cpp000066400000000000000000000037051362244656000231260ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/NCreateRequest.h" void wrap_NCreateRequest(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; class_, Request>(m, "NCreateRequest") .def(init< Value::Integer, Value::String const &, std::shared_ptr >()) .def(init>()) .def( "get_affected_sop_class_uid", &NCreateRequest::get_affected_sop_class_uid, return_value_policy::copy) .def( "set_affected_sop_class_uid", &NCreateRequest::set_affected_sop_class_uid) .def( "get_affected_sop_instance_uid", &NCreateRequest::get_affected_sop_instance_uid, return_value_policy::copy) .def( "set_affected_sop_instance_uid", &NCreateRequest::set_affected_sop_instance_uid) .def( "get_command_field", &NCreateRequest::get_command_field, return_value_policy::copy) .def( "set_command_field", &NCreateRequest::set_command_field) .def("has_attribute_list", &NCreateRequest::has_attribute_list) .def( "get_attribute_list", &NCreateRequest::get_attribute_list, return_value_policy::copy) .def( "set_attribute_field", &NCreateRequest::set_attribute_list) ; } odil-0.11.0/wrappers/python/messages/NSetRequest.cpp000066400000000000000000000033231362244656000224520ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/NSetRequest.h" void wrap_NSetRequest(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; class_, Request>(m, "NSetRequest") .def(init< Value::Integer, Value::String const &, Value::String const &, std::shared_ptr >()) .def(init>()) .def( "get_requested_sop_class_uid", &NSetRequest::get_requested_sop_class_uid, return_value_policy::copy) .def( "set_requested_sop_class_uid", &NSetRequest::set_requested_sop_class_uid) .def( "get_requested_sop_instance_uid", &NSetRequest::get_requested_sop_instance_uid, return_value_policy::copy) .def( "set_requested_sop_instance_uid", &NSetRequest::set_requested_sop_instance_uid) .def("has_command_field", &NSetRequest::set_command_field) .def( "get_command_field", &NSetRequest::get_command_field, return_value_policy::copy) .def( "set_command_field", &NSetRequest::set_command_field) ; } odil-0.11.0/wrappers/python/messages/Request.cpp000066400000000000000000000016461362244656000216660ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/Request.h" void wrap_Request(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; class_, Message>(m, "Request") .def(init()) .def(init>()) .def( "get_message_id", &Request::get_message_id, return_value_policy::copy) .def("set_message_id", &Request::set_message_id) ; } odil-0.11.0/wrappers/python/messages/Response.cpp000066400000000000000000000070351362244656000220320ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/message/Response.h" void wrap_Response(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; class_, Message>(m, "Response") .def(init()) .def(init>()) .def( "get_message_id_being_responded_to", &Response::get_message_id_being_responded_to/*, return_value_policy::copy*/) .def( "set_message_id_being_responded_to", &Response::set_message_id_being_responded_to) .def( "get_status", &Response::get_status, return_value_policy::copy) .def("set_status", &Response::set_status) .def( "is_pending", static_cast(&Response::is_pending)) .def( "is_warning", static_cast(&Response::is_warning)) .def( "is_failure", static_cast(&Response::is_failure)) ; } void wrap_ResponseStatus(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::message; enum_(m, "ResponseStatus") .value("Success", Response::Status::Success) .value("Cancel", Response::Status::Cancel) .value("Pending", Response::Status::Pending) .value("AttributeListError", Response::Status::AttributeListError) .value("AttributeValueOutOfRange", Response::Status::AttributeValueOutOfRange) .value("SOPClassNotSupported", Response::Status::SOPClassNotSupported) .value("ClassInstanceConflict", Response::Status::ClassInstanceConflict) .value("DuplicateSOPInstance", Response::Status::DuplicateSOPInstance) .value("DuplicateInvocation", Response::Status::DuplicateInvocation) .value("InvalidArgumentValue", Response::Status::InvalidArgumentValue) .value("InvalidAttributeValue", Response::Status::InvalidAttributeValue) .value("InvalidObjectInstance", Response::Status::InvalidObjectInstance) .value("MissingAttribute", Response::Status::MissingAttribute) .value("MissingAttributeValue", Response::Status::MissingAttributeValue) .value("MistypedArgument", Response::Status::MistypedArgument) .value("NoSuchArgument", Response::Status::NoSuchArgument) .value("NoSuchAttribute", Response::Status::NoSuchAttribute) .value("NoSuchEventType", Response::Status::NoSuchEventType) .value("NoSuchSOPInstance", Response::Status::NoSuchSOPInstance) .value("NoSuchSOPClass", Response::Status::NoSuchSOPClass) .value("ProcessingFailure", Response::Status::ProcessingFailure) .value("ResourceLimitation", Response::Status::ResourceLimitation) .value("UnrecognizedOperation", Response::Status::UnrecognizedOperation) .value("NoSuchActionType", Response::Status::NoSuchActionType) ; } odil-0.11.0/wrappers/python/messages/messages.cpp000066400000000000000000000034101362244656000220340ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include void wrap_Message(pybind11::module &); void wrap_CommandTypeEnum(pybind11::module &); void wrap_ResponseStatus(pybind11::module &); void wrap_Request(pybind11::module &); void wrap_Response(pybind11::module &); void wrap_CEchoRequest(pybind11::module &); void wrap_CEchoResponse(pybind11::module &); void wrap_CFindRequest(pybind11::module &); void wrap_CFindResponse(pybind11::module &); void wrap_CGetRequest(pybind11::module &); void wrap_CGetResponse(pybind11::module &); void wrap_CMoveRequest(pybind11::module &); void wrap_CMoveResponse(pybind11::module &); void wrap_CStoreRequest(pybind11::module &); void wrap_CStoreResponse(pybind11::module &); void wrap_NSetRequest(pybind11::module &); void wrap_NCreateRequest(pybind11::module &); void wrap_messages(pybind11::module & m) { auto messages = m.def_submodule("messages"); wrap_Message(messages); wrap_ResponseStatus(messages); wrap_Request(messages); wrap_Response(messages); wrap_CEchoRequest(messages); wrap_CEchoResponse(messages); wrap_CFindRequest(messages); wrap_CFindResponse(messages); wrap_CGetRequest(messages); wrap_CGetResponse(messages); wrap_CMoveRequest(messages); wrap_CMoveResponse(messages); wrap_CStoreRequest(messages); wrap_CStoreResponse(messages); wrap_NSetRequest(messages); wrap_NCreateRequest(messages); } odil-0.11.0/wrappers/python/odil.cpp000066400000000000000000000060771362244656000173610ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "opaque_types.h" #include "type_casters.h" //void wrap_std_map(); //void wrap_std_vector(); void wrap_Association(pybind11::module &); void wrap_AssociationParameters(pybind11::module &); void wrap_BasicDirectoryCreator(pybind11::module &); void wrap_DataSet(pybind11::module &); void wrap_EchoSCP(pybind11::module &); void wrap_EchoSCU(pybind11::module &); void wrap_Element(pybind11::module &); void wrap_ElementsDictionary(pybind11::module &); void wrap_endian(pybind11::module &); void wrap_Exception(pybind11::module &); void wrap_FindSCP(pybind11::module &); void wrap_FindSCU(pybind11::module &); void wrap_GetSCP(pybind11::module &); void wrap_GetSCU(pybind11::module &); void wrap_json_converter(pybind11::module &); void wrap_MoveSCP(pybind11::module &); void wrap_MoveSCU(pybind11::module &); void wrap_NCreateSCP(pybind11::module &); void wrap_NSetSCP(pybind11::module &); void wrap_NSetSCU(pybind11::module &); void wrap_Reader(pybind11::module &); void wrap_registry(pybind11::module &); void wrap_SCPDispatcher(pybind11::module &); void wrap_StoreSCU(pybind11::module &); void wrap_StoreSCP(pybind11::module &); void wrap_Tag(pybind11::module &); void wrap_uid(pybind11::module &); void wrap_unicode(pybind11::module &); void wrap_UIDsDictionary(pybind11::module &); void wrap_Value(pybind11::module &); void wrap_VR(pybind11::module &); void wrap_VRFinder(pybind11::module &); void wrap_Writer(pybind11::module &); void wrap_xml_converter(pybind11::module &); void wrap_messages(pybind11::module &); void wrap_webservices(pybind11::module &); void wrap_iostream(pybind11::module &); PYBIND11_MODULE(_odil, _odil) { // wrap_std_map(); // wrap_std_vector(); wrap_endian(_odil); wrap_uid(_odil); wrap_Exception(_odil); wrap_Tag(_odil); wrap_Value(_odil); wrap_VR(_odil); wrap_VRFinder(_odil); wrap_unicode(_odil); wrap_Element(_odil); wrap_DataSet(_odil); wrap_ElementsDictionary(_odil); wrap_UIDsDictionary(_odil); wrap_registry(_odil); wrap_BasicDirectoryCreator(_odil); wrap_iostream(_odil); wrap_Reader(_odil); wrap_Writer(_odil); wrap_json_converter(_odil); wrap_xml_converter(_odil); wrap_Association(_odil); wrap_AssociationParameters(_odil); wrap_EchoSCP(_odil); wrap_EchoSCU(_odil); wrap_FindSCP(_odil); wrap_FindSCU(_odil); wrap_GetSCP(_odil); wrap_GetSCU(_odil); wrap_MoveSCP(_odil); wrap_MoveSCU(_odil); wrap_NCreateSCP(_odil); wrap_NSetSCP(_odil); wrap_NSetSCU(_odil); wrap_SCPDispatcher(_odil); wrap_StoreSCP(_odil); wrap_StoreSCU(_odil); wrap_messages(_odil); wrap_webservices(_odil); } odil-0.11.0/wrappers/python/opaque_types.h000066400000000000000000000052741362244656000206130ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _0dcf136c_4136_40c3_a036_2a74ca0c54d1 #define _0dcf136c_4136_40c3_a036_2a74ca0c54d1 #include #include "pybind11/pybind11.h" #include "odil/DataSet.h" #include "odil/Exception.h" #include "odil/Value.h" // The following must be in every translation unit. PYBIND11_MAKE_OPAQUE(odil::Value::Integers); PYBIND11_MAKE_OPAQUE(odil::Value::Reals); PYBIND11_MAKE_OPAQUE(odil::Value::Strings); PYBIND11_MAKE_OPAQUE(odil::Value::DataSets); PYBIND11_MAKE_OPAQUE(odil::Value::Binary); PYBIND11_MAKE_OPAQUE(odil::Value::Binary::value_type); template T convert_sequence(pybind11::sequence & source, Args && ... args) { if(pybind11::len(source) == 0) { throw odil::Exception("Empty sequence has no type"); } #define try_convert(Items) \ try \ { \ Items items(len(source)); \ std::transform( \ source.begin(), source.end(), items.begin(), \ [](pybind11::handle const h) { \ return h.cast(); \ } \ ); \ return T{items, std::forward(args)...}; \ } \ catch(pybind11::cast_error const &) \ { \ /* Ignore */ \ } try_convert(odil::Value::Integers); try_convert(odil::Value::Reals); try_convert(odil::Value::Strings); try_convert(odil::Value::DataSets); try_convert(odil::Value::Binary); #undef try_convert try { odil::Value::Binary items(len(source)); std::transform( source.begin(), source.end(), items.begin(), [](pybind11::handle const h) { auto pyobject = h.ptr(); if(PyByteArray_Check(pyobject)) { auto const begin = PyByteArray_AsString(pyobject); auto const length = PyObject_Length(pyobject); return odil::Value::Binary::value_type{begin, begin+length}; } else { throw pybind11::cast_error(); } } ); return T{items, std::forward(args)...}; } catch(pybind11::cast_error const &) { /* ignore */ } throw odil::Exception("Unknown value type"); } #endif // _0dcf136c_4136_40c3_a036_2a74ca0c54d1 odil-0.11.0/wrappers/python/registry.cpp000066400000000000000000000022541362244656000202730ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/registry.h" #include "opaque_types.h" #include "type_casters.h" void wrap_registry(pybind11::module & m) { using namespace pybind11; using namespace odil; auto registry_ = m.def_submodule("registry"); for(auto const & entry: registry::public_dictionary) { if(entry.first.get_type() == ElementsDictionaryKey::Type::Tag) { registry_.attr(entry.second.keyword.c_str()) = entry.first.get_tag(); } } for(auto const & entry: registry::uids_dictionary) { registry_.attr(entry.second.keyword.c_str()) = bytes(entry.first); } registry_.attr("public_dictionary") = registry::public_dictionary; registry_.attr("uids_dictionary") = registry::uids_dictionary; } odil-0.11.0/wrappers/python/streambuf.cpp000066400000000000000000000077311362244656000204200ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include "streambuf.h" #include #include #include #include #include #include #include "odil/Exception.h" #if PY_MAJOR_VERSION >= 3 #define FromStringAndSize(v, len) PyBytes_FromStringAndSize(v, len) #else #define IS_PY2 #define FromStringAndSize(v, len) PyString_FromStringAndSize(v, len) #endif namespace odil { namespace wrappers { namespace python { streambuf ::streambuf(pybind11::object object, std::string::size_type buffer_size) : _object(object), _buffer_size(buffer_size), _buffer(), _current(std::string::npos) { this->setg(nullptr, nullptr, nullptr); this->setp(nullptr, nullptr); } // Python objects do not differentiate between input and output sequence: the // "which" parameter is unused. std::streambuf::pos_type streambuf ::seekoff( std::streambuf::off_type off, std::ios_base::seekdir dir, std::ios_base::openmode /* which */) { std::streambuf::off_type adjusted_offset; if(dir == std::ios_base::cur && this->_current != std::string::npos) { // We need to adjust the offset since the position of the Python // file-like object is at the end of the buffer. std::streambuf::off_type const position_offset = this->_buffer.size()-this->_current; adjusted_offset = off-position_offset; } else { // Either // - beg or end, // - or at the end of buffer (_current == std::string::npos) // In those cases, the semantics don't change adjusted_offset = off; } int whence; if(dir == std::ios::beg) { whence = 0; } else if(dir == std::ios::cur) { whence = 1; } else if(dir == std::ios::end) { whence = 2; } else { throw Exception("Invalid direction"); } this->_object.attr("seek")(adjusted_offset, whence); this->_update_buffer(); return ( pybind11::cast(this->_object.attr("tell")()) - this->_buffer.size()); } std::streambuf::pos_type streambuf ::seekpos(std::streambuf::pos_type pos, std::ios_base::openmode which) { return this->seekoff(pos, std::ios_base::beg, which); } int streambuf ::underflow() { if(this->_current == std::string::npos) { this->_update_buffer(); } if(this->_current == std::string::npos) { return std::char_traits::eof(); } else { auto const character = this->_buffer.at(this->_current); return std::char_traits::to_int_type(character); } } int streambuf ::uflow() { auto const character = this->underflow(); if(character != std::char_traits::eof()) { ++this->_current; if(this->_current >= this->_buffer.size()) { this->_current = std::string::npos; } } return character; } int streambuf ::overflow(int ch) { if(ch != std::char_traits::eof()) { char const cast_ch(ch); pybind11::bytes bytes_ch(&cast_ch, 1); this->_object.attr("write")(bytes_ch); } return ch; } void streambuf ::_update_buffer() { auto data = this->_object.attr("read")(this->_buffer_size); if(pybind11::len(data) == 0) { // EOF this->_current = std::string::npos; } else { this->_buffer = pybind11::cast(data); this->_current = 0; } } } } } void wrap_iostream(pybind11::module & m) { using namespace pybind11; using namespace odil::wrappers::python; class_(m, "iostream") .def(init()); } odil-0.11.0/wrappers/python/streambuf.h000066400000000000000000000037251362244656000200640ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _fc7ce52d_b32d_43c4_87fc_465b674e6726 #define _fc7ce52d_b32d_43c4_87fc_465b674e6726 #include #include #include #include #include namespace odil { namespace wrappers { namespace python { /// @brief streambuf wrapper around Python byte-based file-like objects. class streambuf : public std::streambuf { public: streambuf(pybind11::object object, std::string::size_type buffer_size=4096); ~streambuf() =default; streambuf(streambuf const &) =delete; streambuf(streambuf &&) =default; streambuf & operator=(streambuf const &) =delete; streambuf & operator=(streambuf &&) =default; protected: std::streambuf::pos_type seekoff( std::streambuf::off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out); std::streambuf::pos_type seekpos( std::streambuf::pos_type pos, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out); int underflow(); int uflow(); int overflow(int ch=std::char_traits::eof()); private: pybind11::object _object; std::string::size_type _buffer_size; std::string _buffer; std::string::size_type _current; void _update_buffer(); }; class iostream: public std::iostream { public: iostream(pybind11::object file_like) : std::iostream(nullptr), _streambuf(file_like) { this->rdbuf(&this->_streambuf); } private: streambuf _streambuf; }; } } } #endif // _fc7ce52d_b32d_43c4_87fc_465b674e6726 odil-0.11.0/wrappers/python/type_casters.h000066400000000000000000000032211362244656000205700ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #ifndef _a9546367_fb58_452f_837b_69d26d0e6a43 #define _a9546367_fb58_452f_837b_69d26d0e6a43 #include #include #include #include namespace pybind11 { namespace detail { // Example taken from https://github.com/pybind/pybind11/issues/1176#issuecomment-343312352 template<> struct type_caster: public type_caster_base { using base = type_caster_base; bool load(handle src, bool convert) { if(base::load(src, convert)) { return true; } object utf8; if(PyUnicode_Check(src.ptr())) { utf8 = reinterpret_steal(PyUnicode_AsUTF8String(src.ptr())); } else if(PYBIND11_BYTES_CHECK(src.ptr())) { utf8 = reinterpret_borrow(src); } if(!utf8) { return false; } std::string const string{PYBIND11_BYTES_AS_STRING(utf8.ptr())}; this->value = new odil::VR{odil::as_vr(string)}; return true; } static handle cast(odil::VR src, return_value_policy policy, handle parent) { return base::cast(src, policy, parent); } }; } } #endif // _a9546367_fb58_452f_837b_69d26d0e6a43 odil-0.11.0/wrappers/python/uid.cpp000066400000000000000000000014771362244656000172120ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "opaque_types.h" #include "type_casters.h" void wrap_uid(pybind11::module & m) { using namespace pybind11; using namespace odil; m.attr("uid_prefix") = uid_prefix; m.attr("implementation_class_uid") = implementation_class_uid; m.attr("implementation_version_name") = implementation_version_name; m.def("generate_uid", generate_uid); } odil-0.11.0/wrappers/python/unicode.cpp000066400000000000000000000023541362244656000200520ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/unicode.h" #include "odil/Value.h" #include "opaque_types.h" #include "type_casters.h" void wrap_unicode(pybind11::module & m) { using namespace pybind11; using namespace odil; m.def( "as_utf8", as_utf8, "input"_a, "specific_character_set"_a, "is_pn"_a=false); m.def( "as_specific_character_set", as_specific_character_set, "input"_a, "specific_character_set"_a, "is_pn"_a=false); m.def( "as_unicode", []( std::string const & input, Value::Strings const & specific_character_set, bool is_pn=false) { auto const utf8_input = as_utf8(input, specific_character_set, is_pn); return utf8_input; }, "input"_a, "specific_character_set"_a, "is_pn"_a=false); } odil-0.11.0/wrappers/python/webservices/000077500000000000000000000000001362244656000202355ustar00rootroot00000000000000odil-0.11.0/wrappers/python/webservices/BulkData.cpp000066400000000000000000000025131362244656000224310ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/Value.h" #include "odil/webservices/BulkData.h" namespace { odil::webservices::BulkData constructor( odil::Value::Binary::value_type const & data = odil::Value::Binary::value_type(), std::string const & type = "", std::string const & location = "") { odil::webservices::BulkData bulk_data; bulk_data.data = data; bulk_data.type = type; bulk_data.location = location; return bulk_data; } } void wrap_webservices_BulkData(pybind11::module & m) { using namespace pybind11; using namespace odil::webservices; class_(m, "BulkData") .def( init(&constructor), "", arg("data") = odil::Value::Binary::value_type(), arg("type")="", arg("location")="") .def_readwrite("data", &BulkData::data) .def_readwrite("type", &BulkData::type) .def_readwrite("location", &BulkData::location) ; } odil-0.11.0/wrappers/python/webservices/HTTPRequest.cpp000066400000000000000000000026051362244656000230740ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/HTTPRequest.h" void wrap_webservices_HTTPRequest(pybind11::module & m) { using namespace pybind11; using namespace odil::webservices; class_(m, "HTTPRequest") .def( init(), "", arg("method")="", arg("target")=URL(), arg("http_version")="HTTP/1.0", arg("headers")=Message::Headers(), arg("body")="") .def("get_method", &HTTPRequest::get_method, return_value_policy::copy) .def("set_method", &HTTPRequest::set_method) .def( "get_target", &HTTPRequest::get_target, return_value_policy::copy) .def("set_target", &HTTPRequest::set_target) .def( "get_http_version", &HTTPRequest::get_http_version, return_value_policy::copy) .def("set_http_version", &HTTPRequest::set_http_version) ; } odil-0.11.0/wrappers/python/webservices/HTTPResponse.cpp000066400000000000000000000025331362244656000232420ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/HTTPResponse.h" void wrap_webservices_HTTPResponse(pybind11::module & m) { using namespace pybind11; using namespace odil::webservices; class_(m, "HTTPResponse") .def( init(), "", arg("http_version")="", arg("status")=0, arg("reason")="", arg("headers")=dict(), arg("body")=std::string()) .def( "get_http_version", &HTTPResponse::get_http_version, return_value_policy::copy) .def("set_http_version", &HTTPResponse::set_http_version) .def("get_status", &HTTPResponse::get_status) .def("set_status", &HTTPResponse::set_status) .def("get_reason", &HTTPResponse::get_reason, return_value_policy::copy) .def("set_reason", &HTTPResponse::set_reason) ; } odil-0.11.0/wrappers/python/webservices/Message.cpp000066400000000000000000000024211362244656000223240ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/Message.h" void wrap_webservices_Message(pybind11::module & m) { using namespace pybind11; using namespace odil::webservices; class_(m, "Message") .def( init(), "Constructor. By default, headers and body will be empty.", arg("headers")=Message::Headers(), arg("body")="") .def("get_headers", &Message::get_headers, return_value_policy::copy) .def("set_headers", &Message::set_headers) .def("has_header", &Message::has_header) .def("get_header", &Message::get_header, return_value_policy::copy) .def("set_header", &Message::set_header) .def("get_body", [](Message const & m) { return bytes(m.get_body()); }) .def("set_body", &Message::set_body) ; } odil-0.11.0/wrappers/python/webservices/QIDORSRequest.cpp000066400000000000000000000035001362244656000233110ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/QIDORSRequest.h" #include "odil/webservices/HTTPRequest.h" #include "odil/webservices/Utils.h" void wrap_webservices_QIDORSRequest(pybind11::module & m) { using namespace pybind11; using namespace odil::webservices; class_(m, "QIDORSRequest") .def(init()) .def(init()) .def("get_base_url", &QIDORSRequest::get_base_url) .def("set_base_url", &QIDORSRequest::set_base_url) .def("get_media_type", &QIDORSRequest::get_media_type) .def("get_representation", &QIDORSRequest::get_representation) .def("get_url", &QIDORSRequest::get_url) .def("get_selector", &QIDORSRequest::get_selector) .def("get_query_data_set", &QIDORSRequest::get_query_data_set) .def("get_fuzzymatching", &QIDORSRequest::get_fuzzymatching) .def("get_limit", &QIDORSRequest::get_limit) .def("get_offset", &QIDORSRequest::get_offset) .def("get_http_request", &QIDORSRequest::get_http_request) .def( "request_datasets", &QIDORSRequest::request_datasets, "", arg("representation"), arg("selector"), arg("data_sets"), arg("fuzzymatching") = false, arg("limit") = -1, arg("offset") = 0, arg("numerical_tags") = false) .def(self == self) .def(self != self) ; } odil-0.11.0/wrappers/python/webservices/QIDORSResponse.cpp000066400000000000000000000034761362244656000234730ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/DataSet.h" #include "odil/Value.h" #include "odil/webservices/HTTPResponse.h" #include "odil/webservices/QIDORSResponse.h" namespace { void set_data_sets( odil::webservices::QIDORSResponse& self, pybind11::sequence data_sets) { odil::Value::DataSets cpp_val(pybind11::len(data_sets)); std::transform( data_sets.begin(), data_sets.end(), cpp_val.begin(), [](pybind11::handle const & h) { return h.cast>(); }); self.set_data_sets(cpp_val); } } void wrap_webservices_QIDORSResponse(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::webservices; class_(m, "QIDORSResponse") .def(init()) .def(init()) .def(self == self) .def(self != self) .def( "get_data_sets", static_cast< Value::DataSets const &(QIDORSResponse::*)() const >(&QIDORSResponse::get_data_sets)) .def("set_data_sets", set_data_sets) .def("get_representation", &QIDORSResponse::get_representation) .def("set_representation", &QIDORSResponse::set_representation) .def("get_media_type", &QIDORSResponse::get_media_type) .def("get_http_response", &QIDORSResponse::get_http_response) ; } odil-0.11.0/wrappers/python/webservices/STOWRSRequest.cpp000066400000000000000000000040771362244656000233630ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/DataSet.h" #include "odil/webservices/STOWRSRequest.h" #include "odil/webservices/HTTPRequest.h" namespace { void request_dicom( odil::webservices::STOWRSRequest& self, pybind11::sequence data_sets, odil::webservices::Selector selector, odil::webservices::Representation representation) { odil::Value::DataSets cpp_val(pybind11::len(data_sets)); std::transform( data_sets.begin(), data_sets.end(), cpp_val.begin(), [](pybind11::handle const & h) { return h.cast>(); }); self.request_dicom(cpp_val, selector, representation); } } void wrap_webservices_STOWRSRequest(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::webservices; class_(m, "STOWRSRequest") .def(init(), "", arg("base_url")=URL()) .def(init()) .def(self == self) .def(self != self) .def("get_base_url", &STOWRSRequest::get_base_url) .def("set_base_url", &STOWRSRequest::set_base_url) .def("get_media_type", &STOWRSRequest::get_media_type) .def("get_representation",&STOWRSRequest::get_representation) .def("get_url", &STOWRSRequest::get_url) .def("get_selector", &STOWRSRequest::get_selector) .def( "get_data_sets", static_cast( &STOWRSRequest::get_data_sets)) .def("request_dicom", request_dicom) .def("get_http_request", &STOWRSRequest::get_http_request) ; } odil-0.11.0/wrappers/python/webservices/STOWRSResponse.cpp000066400000000000000000000032521362244656000235230ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/STOWRSResponse.h" void wrap_webservices_STOWRSResponse(pybind11::module & m) { using namespace pybind11; using namespace odil::webservices; class_(m, "STOWRSResponse") .def(init()) .def(init()) .def(self == self) .def(self != self) .def( "set_store_instance_responses", &STOWRSResponse::set_store_instance_responses) .def( "get_store_instance_responses", &STOWRSResponse::get_store_instance_responses) .def("get_media_type", &STOWRSResponse::get_media_type) .def("set_representation", &STOWRSResponse::set_representation) .def("get_representation", &STOWRSResponse::get_representation) .def("set_warning", &STOWRSResponse::set_warning) .def("is_status_warning", &STOWRSResponse::is_status_warning) .def("set_failure_code", &STOWRSResponse::set_failure_code) .def("get_failure_code", &STOWRSResponse::get_failure_code) .def("set_reason", &STOWRSResponse::set_reason) .def("get_reason", &STOWRSResponse::get_reason) .def("get_http_response", &STOWRSResponse::get_http_response) ; } odil-0.11.0/wrappers/python/webservices/Selector.cpp000066400000000000000000000040141362244656000225200ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/webservices/HTTPRequest.h" #include "odil/webservices/WADORSRequest.h" void wrap_webservices_Selector(pybind11::module & m) { using namespace pybind11; using namespace odil::webservices; class_(m, "Selector") .def( init, std::vector>(), "", arg("selector") = std::map(), arg("frames")=std::vector()) //"selector : {\"studies\" : \"StudiesInstanceUID\", \"series\" : \"SeriesInstanceUID\", \"instances\" : \"SOPInstanceUID\"} ")) .def("get_path", &Selector::get_path) .def("is_study_present", &Selector::is_study_present) .def("is_series_present", &Selector::is_series_present) .def("is_instance_present", &Selector::is_instance_present) .def("get_study", &Selector::get_study, return_value_policy::copy) .def("get_series", &Selector::get_series, return_value_policy::copy) .def("get_instance", &Selector::get_instance, return_value_policy::copy) .def("get_frames", &Selector::get_frames, return_value_policy::copy) .def("set_study", &Selector::set_study, return_value_policy::copy) .def("set_series", &Selector::set_series, return_value_policy::copy) .def("set_instance", &Selector::set_instance, return_value_policy::copy) .def( "set_frames", &Selector::set_frames, return_value_policy::reference_internal) .def(self == self) .def(self != self) ; } odil-0.11.0/wrappers/python/webservices/URL.cpp000066400000000000000000000031201362244656000213770ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/URL.h" namespace { odil::webservices::URL constructor( std::string const & scheme="", std::string const & authority="", std::string const & path="", std::string const & query="", std::string const & fragment="") { odil::webservices::URL url; url.scheme = scheme; url.authority = authority; url.path = path; url.query = query; url.fragment = fragment; return url; } } void wrap_webservices_URL(pybind11::module & m) { using namespace pybind11; using namespace odil::webservices; class_(m, "URL") .def( init(&constructor), "", arg("scheme")="", arg("authority")="", arg("path")="", arg("query")="", arg("fragment")="") .def_readwrite("scheme", &URL::scheme) .def_readwrite("authority", &URL::authority) .def_readwrite("path", &URL::path) .def_readwrite("query", &URL::query) .def_readwrite("fragment", &URL::fragment) .def("__str__", &URL::operator std::string) .def(self == self) .def(self != self) .def_static("parse", &URL::parse) ; } odil-0.11.0/wrappers/python/webservices/Utils.cpp000066400000000000000000000020421362244656000220370ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include "odil/webservices/Utils.h" void wrap_webservices_Utils(pybind11::module & m) { using namespace pybind11; using namespace odil::webservices; auto utils = m.def_submodule("Utils"); enum_(utils, "Type") .value("None_", Type::None) .value("DICOM", Type::DICOM) .value("BulkData", Type::BulkData) .value("PixelData", Type::PixelData) ; enum_(utils, "Representation") .value("DICOM", Representation::DICOM) .value("DICOM_XML", Representation::DICOM_XML) .value("DICOM_JSON", Representation::DICOM_JSON) ; } odil-0.11.0/wrappers/python/webservices/WADORSRequest.cpp000066400000000000000000000063021362244656000233120ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include "odil/webservices/HTTPRequest.h" #include "odil/webservices/WADORSRequest.h" void wrap_webservices_WADORSRequest(pybind11::module & m) { using namespace pybind11; using namespace odil::webservices; class_(m, "WADORSRequest") .def( init(), "", arg("base_url")=URL(), arg("transfer_syntax")="", arg("character_set")="", arg("include_media_type_in_query")=false, arg("include_character_set_in_query")=false) .def(init()) .def( "get_base_url", &WADORSRequest::get_base_url, return_value_policy::copy) .def("set_base_url", &WADORSRequest::set_base_url) .def( "get_transfer_syntax", &WADORSRequest::get_transfer_syntax, return_value_policy::copy) .def("set_transfer_syntax", &WADORSRequest::set_transfer_syntax) .def( "get_character_set", &WADORSRequest::get_character_set, return_value_policy::copy) .def("set_character_set", &WADORSRequest::set_character_set) .def( "get_include_media_type_in_query", &WADORSRequest::get_include_media_type_in_query) .def( "set_include_media_type_in_query", &WADORSRequest::set_include_media_type_in_query) .def( "get_include_character_set_in_query", &WADORSRequest::get_include_character_set_in_query) .def( "set_include_character_set_in_query", &WADORSRequest::set_include_character_set_in_query) .def("get_type", &WADORSRequest::get_type) .def( "get_selector", &WADORSRequest::get_selector, return_value_policy::copy) .def( "get_url", &WADORSRequest::get_url, return_value_policy::reference_internal) .def( "get_media_type", &WADORSRequest::get_media_type, return_value_policy::reference_internal) .def( "get_representation", &WADORSRequest::get_representation, return_value_policy::reference_internal) .def("request_dicom", &WADORSRequest::request_dicom) .def( "request_bulk_data", static_cast( &WADORSRequest::request_bulk_data)) .def( "request_bulk_data", static_cast( &WADORSRequest::request_bulk_data)) .def("request_pixel_data", &WADORSRequest::request_pixel_data) .def("get_http_request", &WADORSRequest::get_http_request) .def(self == self) .def(self != self) ; } odil-0.11.0/wrappers/python/webservices/WADORSResponse.cpp000066400000000000000000000052671362244656000234710ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include #include #include "odil/DataSet.h" #include "odil/webservices/BulkData.h" #include "odil/webservices/WADORSResponse.h" #include "odil/Value.h" void set_data_sets( odil::webservices::WADORSResponse& self, pybind11::sequence data_sets) { odil::Value::DataSets cpp_val(pybind11::len(data_sets)); std::transform( data_sets.begin(), data_sets.end(), cpp_val.begin(), [](pybind11::handle const & h) { return h.cast>(); }); self.set_data_sets(cpp_val); } void set_bulk_data( odil::webservices::WADORSResponse& self, pybind11::sequence bulk_data) { std::vector cpp_val(pybind11::len(bulk_data)); std::transform( bulk_data.begin(), bulk_data.end(), cpp_val.begin(), [](pybind11::handle const & h) { return h.cast(); }); self.set_bulk_data(cpp_val); } void wrap_webservices_WADORSResponse(pybind11::module & m) { using namespace pybind11; using namespace odil; using namespace odil::webservices; class_(m, "WADORSResponse") .def(init<>()) .def(init()) .def( "get_data_sets", static_cast< Value::DataSets const &(WADORSResponse::*)() const >(&WADORSResponse::get_data_sets)) .def("set_data_sets", &set_data_sets) .def( "get_bulk_data", static_cast< std::vector const &(WADORSResponse::*)() const >(&WADORSResponse::get_bulk_data)) .def("set_bulk_data", set_bulk_data) .def("is_partial", &WADORSResponse::is_partial) .def("set_partial", &WADORSResponse::set_partial) .def("get_type", &WADORSResponse::get_type) .def("get_representation", &WADORSResponse::get_representation) .def("respond_dicom", &WADORSResponse::respond_dicom) .def("respond_bulk_data", &WADORSResponse::respond_bulk_data) .def("respond_pixel_data", &WADORSResponse::respond_pixel_data) .def("get_http_response", &WADORSResponse::get_http_response) .def(self == self) .def(self != self) ; } odil-0.11.0/wrappers/python/webservices/webservices.cpp000066400000000000000000000036251362244656000232700ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include void wrap_webservices_BulkData(pybind11::module &); void wrap_webservices_HTTPRequest(pybind11::module &); void wrap_webservices_HTTPResponse(pybind11::module &); void wrap_webservices_Message(pybind11::module &); void wrap_webservices_QIDORSRequest(pybind11::module &); void wrap_webservices_QIDORSResponse(pybind11::module &); void wrap_webservices_Selector(pybind11::module &); void wrap_webservices_STOWRSRequest(pybind11::module &); void wrap_webservices_STOWRSResponse(pybind11::module &); void wrap_webservices_URL(pybind11::module &); void wrap_webservices_Utils(pybind11::module &); void wrap_webservices_WADORSRequest(pybind11::module &); void wrap_webservices_WADORSResponse(pybind11::module &); namespace { class webservices_namespace {}; } void wrap_webservices(pybind11::module & m) { using namespace pybind11; auto webservices = m.def_submodule("webservices"); wrap_webservices_Message(webservices); wrap_webservices_URL(webservices); wrap_webservices_BulkData(webservices); wrap_webservices_HTTPRequest(webservices); wrap_webservices_HTTPResponse(webservices); wrap_webservices_Selector(webservices); wrap_webservices_Utils(webservices); wrap_webservices_WADORSRequest(webservices); wrap_webservices_WADORSResponse(webservices); wrap_webservices_QIDORSRequest(webservices); wrap_webservices_QIDORSResponse(webservices); wrap_webservices_STOWRSRequest(webservices); wrap_webservices_STOWRSResponse(webservices); } odil-0.11.0/wrappers/python/xml_converter.cpp000066400000000000000000000044261362244656000213150ustar00rootroot00000000000000/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for details. ************************************************************************/ #include #include #include #include "odil/DataSet.h" #include "odil/StringStream.h" #include "odil/xml_converter.h" #include "opaque_types.h" #include "type_casters.h" namespace { std::string as_xml(std::shared_ptr data_set, bool pretty_print) { auto const xml = odil::as_xml(data_set); std::ostringstream stream; #if BOOST_VERSION >= 105600 typedef boost::property_tree::xml_writer_settings SettingsType; #else typedef boost::property_tree::xml_writer_settings SettingsType; #endif SettingsType settings; if(pretty_print) { settings = SettingsType('\t', 1); } boost::property_tree::write_xml(stream, xml, settings); return stream.str(); } } void wrap_xml_converter(pybind11::module & m) { using namespace pybind11; using namespace odil; m.def( "as_xml", [](std::shared_ptr data_set, bool pretty_print) { auto const xml = odil::as_xml(data_set); std::string data; OStringStream stream(data); #if BOOST_VERSION >= 105600 typedef boost::property_tree::xml_writer_settings SettingsType; #else typedef boost::property_tree::xml_writer_settings SettingsType; #endif SettingsType settings; if(pretty_print) { settings = SettingsType('\t', 1); } boost::property_tree::write_xml(stream, xml, settings); return data; }); m.def( "from_xml", [](std::string const & xml_string) { IStringStream stream(&xml_string[0], xml_string.size()); boost::property_tree::ptree xml; boost::property_tree::read_xml(stream, xml); return as_dataset(xml); } ); }