gdcm-3.0.22/Copyright.txt000664 001766 001770 00000003507 14517730450 017573 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2016 Mathieu Malaterre Copyright (c) 1993-2005 CREATIS (CREATIS = Centre de Recherche et d'Applications en Traitement de l'Image) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither name of Mathieu Malaterre, or CREATIS, nor the names of any contributors (CNRS, INSERM, UCB, Universite Lyon I), may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =========================================================================*/ gdcm-3.0.22/.travis.yml000664 001766 001770 00000015231 14517730450 017170 0ustar00mmalaterremmalaterre000000 000000 # https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables # https://github.com/travis-ci/travis-ci/issues/3505 language: cpp # Use the faster container-based infrastructure. #sudo: false dist: xenial env: global: # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created # via the "travis encrypt" command using the project repo's public key - secure: ClIqhtIIfQPhil8GH9bnJg70rvJfuYs7Z2Aq2SrdwQsIFNvvfFD5pVxQiaYbZI3nxNclggQ50BmGB96e6jLxbbd/xlIOjcU19W2nzyP6LGkXFHDHm8FwhqqDNpfYvirAOfqgjqf7khRe3ajF33jhrLrhb5QOO5640N93pdChu1sAvI0LZv8JFIUcN7A7To3+WYc7H4CK3U8B2V8nzqcBSHDZNBGAdeVdmldwrlBtQeWBg5wJAEzzUHn0x+kltqvuoPYi2ShpaUkEfHeUWYhOT1uoyXNRAqHXiM1jhiw3JCkqaf7sUKLzyx0ozjTnYntNMggtBzavKjuYg6RhdlNdNbdsi2nxrycCOyCZcF+d4limq+yDMqoP7g/DnPag7XFgjkG/ThULPu+pEK/6nV1NqGNWFu1CqgAwPW7hGbIUADPsMEb+Bz2L2KUof2wU1cdvGK4fzsM9Qpdipbagghn4b5eGtvyBzYzoCS02AKrYfimhcm8bVmlfaMVgd6PnJ19Y1+ADCWwStwaQL2S6udh66JVGNszY/kYSmZKn51RQQDkubmGpywzeNdn7gM9u8QR9s2Lsq0GaSdptcLOPmVNSg6mQJThbMRHM/H2UrSyo7/GLr28sNNbYNweGPevsnrRJPUdG2ENWVw5rg1sD1cLm8rLlD4H2f/b97X9NCl4bLxY= # -m32 is not supported # no poppler, openjpeg, uuid, json # no swig # using debian-sid I get: # /usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.22 internal error, aborting at # ../../bfd/reloc.c line 443 in bfd_get_reloc_size matrix: fast_finish: true include: - compiler: gcc os: linux env: - CFLAGS="-g -O2" - CXXFLAGS="-g -O2" - CMAKE_EXTRA="-DGDCM_WRAP_PYTHON:BOOL=OFF -DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF" - B_NAME=default - CPACK_NAME=Linux - compiler: gcc os: linux # No docbook-xsl-ns addons: {apt: {packages: [default-jdk, mono-devel, swig, libcharls-dev, libvtk5-dev, libexpat-dev, libz-dev, uuid-dev, python-all-dev, libpoppler-private-dev, xsltproc, docbook-xsl, dcmtk]}} env: - CFLAGS="-Wall -Wextra -m64" - CXXFLAGS="-Wall -Wextra -m64" # Cant use manpage with old docbook - CMAKE_EXTRA="-DGDCM_USE_SYSTEM_OPENSSL:BOOL=ON -DGDCM_WRAP_PYTHON:BOOL=ON -DGDCM_WRAP_CSHARP:BOOL=ON -DGDCM_WRAP_JAVA:BOOL=ON -DGDCM_WRAP_PHP:BOOL=OFF -DGDCM_USE_SYSTEM_EXPAT:BOOL=ON -DGDCM_USE_SYSTEM_JSON:BOOL=OFF -DGDCM_USE_SYSTEM_LIBXML2:BOOL=ON -DGDCM_USE_SYSTEM_OPENJPEG:BOOL=OFF -DGDCM_USE_SYSTEM_POPPLER:BOOL=ON -DGDCM_USE_SYSTEM_UUID:BOOL=ON -DGDCM_USE_SYSTEM_ZLIB:BOOL=ON -DGDCM_WEAK_SWIG_CHECK:BOOL=ON -DGDCM_LEGACY_SILENT:BOOL=ON -DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF" - B_NAME=system - CPACK_NAME=Linux - compiler: clang os: linux env: - CFLAGS="-g -O0 -Wall -Wextra -m64 -fsanitize=address,undefined,shift" - CXXFLAGS="-g -O0 -Wall -Wextra -m64 -fsanitize=address,undefined,shift" - CMAKE_EXTRA="-DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF" - B_NAME=fsanitize - CPACK_NAME=Linux - compiler: clang os: osx env: - CFLAGS="-Wall -Wextra" # -m64 -fsanitize=address,undefined - CXXFLAGS="-Wall -Wextra" # -m64 -fsanitize=address,undefined # http://stackoverflow.com/questions/15678153/homebrew-python-on-mac-os-x-10-8-fatal-python-error-pythreadstate-get-no-cu #- CMAKE_EXTRA="-DGDCM_WRAP_PYTHON:BOOL=ON -DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2.7" - CMAKE_EXTRA="-DGDCM_WRAP_PYTHON:BOOL=ON -DGDCM_WRAP_CSHARP:BOOL=OFF -DGDCM_WRAP_JAVA:BOOL=OFF -DGDCM_USE_SYSTEM_UUID:BOOL=ON -DGDCM_USE_SYSTEM_ZLIB:BOOL=ON -DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF" - B_NAME=default - CPACK_NAME=Darwin before_install: #- env - cmake --version - if [ "$B_NAME" == "system" ]; then swig -version; fi # do not run the full test suite for now on fsanitize and osx (takes too long) - if [ "$B_NAME" == "fsanitize" ]; then mv Testing/Data Testing/Data.old; fi # https://docs.travis-ci.com/user/osx-ci-environment/#Environment-variables - if [ "$TRAVIS_OS_NAME" == "osx" ]; then mv Testing/Data Testing/Data.old; fi - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update ; fi - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install swig docbook-xsl ; fi - if [ "$TRAVIS_OS_NAME" == "osx" ]; then swig -version; fi # https://github.com/travis-ci/travis-ci/issues/2312 #- if [ "$TRAVIS_OS_NAME" == "osx" ]; then virtualenv env -p python3 ; fi #- if [ "$TRAVIS_OS_NAME" == "osx" ]; then source env/bin/activate ; fi # kakadu setup for linux/system: - if [ "$B_NAME" == "system" ]; then wget http://kakadusoftware.com/wp-content/uploads/KDU805_Demo_Apps_for_Linux-x86-64_200602.zip; fi - if [ "$B_NAME" == "system" ]; then unzip KDU805_Demo_Apps_for_Linux-x86-64_200602.zip; fi - if [ "$B_NAME" == "system" ]; then export PATH=$PATH:$PWD/KDU805_Demo_Apps_for_Linux-x86-64_200602; fi install: true before_script: - cmake -Wno-dev -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=None -DGDCM_BUILD_TESTING:BOOL=ON -DGDCM_BUILD_APPLICATIONS:BOOL=ON -DGDCM_BUILD_SHARED_LIBS:BOOL=ON -DBUILDNAME:STRING=${TRAVIS_OS_NAME}-${TRAVIS_BRANCH}-${B_NAME} ${CMAKE_EXTRA} . - ctest -D ExperimentalStart script: - ctest -D ExperimentalBuild -j2 - ctest -D ExperimentalTest -j2 || true after_success: - ctest -D ExperimentalSubmit || true # prefer after_success since before_deploy is not called (conditions unmet) - cpack -G TGZ - cpack -G TBZ2 after_failure: true before_deploy: - VTAG=$(echo $TRAVIS_TAG | cut -f2 -dv) deploy: edge: true provider: releases api_key: secure: R5+dbibdcgPHq6cAPC8uepifDuS3yjZu2dBB2oSeQtBZTAeN1VIfJMrF8TeQDqj2GC28RHxXm4BHwdJ2FUpBXjOS2eUE6Mto1Rbbvfi63MREnFPIAWkNyLtR2Jxq/Gzb8X05PbCWGwCNvX9eeo+qcWTpczuQvJ+/bds7MyRsk45+sUc+j7rglAbxewgijsXebCkObwaXmhqTYJwrvf2lyEnA2Jo1gL2WmK6iPjHvTOVS9JfBMqVRmlk7j8efnqag8fMCzNp1Ess5wBy5Jf58qvVs7RuuBi16s7vOOBtb9xVjcDB1KaAxc/dDQGQhRkrveBtH18ZpFrArOj6DBPbupS3+xuU4ywdYbCuGnvdpRFafBc+iNU4M81crkFUDmSPEQChBnL4wwpaYaQ1LlgdlF0r9/Rlu2/iqKe4t7rdZnkQqQ/3SNNf+x4AKnGmaSGasV/VUXstTGVrtl7hsDMzSdrVCXODao0SRv5tPSI3BgAZi7NzCJ/xv5LgA1EQVkGdTQN0ZpKZCQYfifL5K6oYDI+WlAFU0OcH+9dy4KNqF+QnzMh9iPwP0zR6BN9yE0w6ydnyNt0CkIUaxgaTtr+pHPXsmmtgXzQScESC8B9JHGocOXjT6MtyUmoP/ewlPz2G6x114PnAL7LlZ07jPqAASJwW/ZiXtBcVxv50hPhC7L80= file: - GDCM-$VTAG-$CPACK_NAME-x86_64.tar.gz - GDCM-$VTAG-$CPACK_NAME-x86_64.tar.bz2 skip_cleanup: true on: repo: malaterre/GDCM condition: $B_NAME = default all_branches: true tags: true # final after_script: true addons: coverity_scan: project: name: malaterre/GDCM description: "Grassroots DICOM" notification_email: mathieu.malaterre@gmail.com build_command_prepend: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DGDCM_BUILD_SHARED_LIBS:BOOL=ON .. build_command: cmake --build . branch_pattern: coverity_scan gdcm-3.0.22/PACKAGER000664 001766 001770 00000003642 14517730450 016162 0ustar00mmalaterremmalaterre000000 000000 Info for packagers: At a minimum you should consider the following cmake options: CMAKE_SKIP_RPATH:BOOL=YES CMAKE_INSTALL_PREFIX:PATH=/usr To build the cmd line applications: GDCM_BUILD_APPLICATIONS:BOOL=ON To build shared libs: GDCM_BUILD_SHARED_LIBS:BOOL=ON To build the documentation (need doxygen >= 1.6.1) GDCM_DOCUMENTATION:BOOL=ON You should really consider: GDCM_BUILD_TESTING:BOOL=OFF Otherwise it build extra code only needed to run the unit test of gdcm... unless you have some specific compiler optimization technique you should use the cmake default one: CMAKE_BUILD_TYPE:STRING=Release By default this will build pdf doc if you have all the required package, if you do not want the pdf: GDCM_PDF_DOCUMENTATION:BOOL=ON Wrapping: GDCM support the following wrapped language GDCM_WRAP_PYTHON:BOOL=ON GDCM_WRAP_CSHARP:BOOL=ON GDCM_WRAP_JAVA:BOOL=ON There is an ongoing effort to make PHP another supported language (very experimental ATM) GDCM_WRAP_PHP:BOOL=ON For VTK user: GDCM_USE_VTK:BOOL=ON System libs: - By default gdcm ships with system libs for ease of compilation on win32 system. So for most *nix system you may want: GDCM_USE_SYSTEM_EXPAT:BOOL=ON GDCM_USE_SYSTEM_ZLIB:BOOL=ON GDCM_USE_SYSTEM_UUID:BOOL=ON GDCM_USE_SYSTEM_OPENJPEG:BOOL=ON OpenSSL option is slightly different as not 'convenient' openssl is shipped within GDCM, so the only way to access the openssl functionalities is to have openssl installed in the target system. GDCM_USE_SYSTEM_OPENSSL:BOOL=ON Examples: GDCM comes with some examples for user, but setting the following: GDCM_BUILD_EXAMPLES:BOOL=ON will not do anything since there is no install rule for examples... The library attempts to provide a clean API, therefore it is highly suggested that you compile GDCM using: $ CFLAGS=-fvisibility=hidden CXXFLAGS=-fvisibility=hidden cmake /path/to/gdcm/sources This make sure that on UNIX, the API is actually identical at what is found on Windows. gdcm-3.0.22/Testing/000775 001766 001770 00000000000 14517731550 016474 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/CMakeLists.txt000664 001766 001770 00000004041 14517730450 021231 0ustar00mmalaterremmalaterre000000 000000 find_package(DCMTK) find_package(DICOM3TOOLS) # Special CMake Module required when doing Python Testing if(GDCM_WRAP_PYTHON) include(${GDCM_SOURCE_DIR}/CMake/UsePythonTest.cmake) endif() # Special CMake Module required when doing Java Testing if(GDCM_WRAP_JAVA) include(${GDCM_SOURCE_DIR}/CMake/UseJavaTest.cmake) endif() # Special CMake Module required when doing C# Testing if(GDCM_WRAP_CSHARP) include(${GDCM_SOURCE_DIR}/CMake/UseCSharpTest.cmake) endif() add_subdirectory( Source ) #----------------------------------------------------------------------------- # Here is one cool test: you can pretty much test all configuration using # ctest...well except one, the case where a user set BUILD_TESTING=OFF # since this would deactivate the dashboard and would not submit...doh! # So instead let's create a test that would build gdcm with this option if(GDCM_TEST_BOOTSTRAP) add_test(BuildGDCM ${CMAKE_CTEST_COMMAND} --build-and-test ${GDCM_SOURCE_DIR} ${GDCM_BINARY_DIR}/GDCMLocal --build-two-config --build-generator ${CMAKE_GENERATOR} --build-makeprogram ${CMAKE_MAKE_PROGRAM} --build-project GDCMLOCAL --build-options -DGDCM_BUILD_TESTING:BOOL=OFF -DGDCM_BUILD_SHARED_LIBS:BOOL=ON -DGDCM_WRAP_PYTHON:BOOL=ON -DGDCM_WRAP_CSHARP:BOOL=ON -DGDCM_SUPPORT_BROKEN_IMPLEMENTATION:BOOL=OFF ) add_test(InstallGDCM ${CMAKE_CTEST_COMMAND} --build-and-test ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} --build-generator ${CMAKE_GENERATOR} --build-project GDCM --build-makeprogram ${CMAKE_MAKE_PROGRAM} --build-noclean --build-target install ) add_test(BuildStaticGDCM ${CMAKE_CTEST_COMMAND} --build-and-test ${GDCM_SOURCE_DIR} ${GDCM_BINARY_DIR}/GDCMLocal2 --build-two-config --build-generator ${CMAKE_GENERATOR} --build-makeprogram ${CMAKE_MAKE_PROGRAM} --build-project GDCMLOCAL2 --build-options -DGDCM_BUILD_TESTING:BOOL=ON -DGDCM_BUILD_SHARED_LIBS:BOOL=OFF -DGDCM_SUPPORT_BROKEN_IMPLEMENTATION:BOOL=OFF -DGDCM_LEGACY_REMOVE:BOOL=ON --test-command ${CMAKE_CTEST_COMMAND} ) endif() gdcm-3.0.22/Testing/Source/000775 001766 001770 00000000000 14517731550 017734 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/000775 001766 001770 00000000000 14517731550 024674 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/CMakeLists.txt000664 001766 001770 00000000306 14517730450 027431 0ustar00mmalaterremmalaterre000000 000000 # Always add_subdirectory(Cxx) if(GDCM_WRAP_PYTHON) add_subdirectory(Python) endif() if(GDCM_WRAP_CSHARP) add_subdirectory(Csharp) endif() if(GDCM_WRAP_JAVA) add_subdirectory(Java) endif() gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Python/000775 001766 001770 00000000000 14517731550 026155 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Python/TestStringFilter.py000664 001766 001770 00000003356 14517730450 032010 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys def TestStringFilter(filename, verbose = False): r = gdcm.Reader() r.SetFileName( filename ) success = r.Read() if( not success ): return 1 file = r.GetFile() ds = file.GetDataSet() # Change gdcm struct into something swig can digest: pds = gdcm.PythonDataSet(ds) sf = gdcm.StringFilter() pds.Start() # Make iterator go at beginning dic1={} dic2={} sf.SetFile(file) # extremely important while(not pds.IsAtEnd() ): t = str(pds.GetCurrent().GetTag()) res = sf.ToStringPair( pds.GetCurrent().GetTag() ) dic2[t] = res[1] dic1[res[0]] = res[1] pds.Next() #print dic1 #print dic2 try: print "Pixel Representation=",dic2[ '(0028,0103)' ] except KeyError: print "Tag not found in dataset" return 0 if __name__ == "__main__": success = 0 try: filename = os.sys.argv[1] success += TestStringFilter( filename, True ) except: # loop over all files: gdcm.Trace.WarningOff() t = gdcm.Testing() nfiles = t.GetNumberOfFileNames() for i in range(0,nfiles): filename = t.GetFileName(i) success += TestStringFilter( filename ) # Test succeed ? sys.exit(success == 0) gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Python/TestAnonymizer.py000664 001766 001770 00000004677 14517730450 031536 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys def TestAnonymizer(filename, verbose = False): r = gdcm.Reader() r.SetFileName( filename ) success = r.Read() if( not success ): return 1 #print r.GetFile().GetDataSet() ano = gdcm.Anonymizer() ano.SetFile( r.GetFile() ) # 1. Replace with another value ano.Replace( gdcm.Tag(0x0010,0x0010), "Test^Anonymize" ) # 2. Remove a tag (even a SQ) ano.Remove( gdcm.Tag(0x0008,0x2112) ) # 3. Make a tag empty ano.Empty( gdcm.Tag(0x0008,0x0070) ) # Call the main function: success = ano.RemovePrivateTags() # do it ! if( not success ): return 1 # Check we can also change value from binary field #ano.Replace( gdcm.Tag(0x0010,0x0010), "16", gdcm. ) # Let's check if our anonymization worked: if verbose: print(ano.GetFile().GetDataSet()) # So at that point r.GetFile() was modified, let's simply passed it to the Writer: # First find a place where to write it out: subdir = "TestAnonymizerPython" tmpdir = gdcm.Testing.GetTempDirectory( subdir ) if not gdcm.System.FileIsDirectory( tmpdir ): gdcm.System.MakeDirectory( tmpdir ) # Ok directory does exist now, extract the name of the input file, and merge it in # our newly created tmpdir: outfilename = gdcm.Testing.GetTempFilename( filename, subdir ) w = gdcm.Writer() w.SetFileName( outfilename ) w.SetFile( r.GetFile() ) w.SetCheckFileMetaInformation( False ) success = w.Write() if( not success ): return 1 if verbose: print("Success to write: %s"%outfilename) return success if __name__ == "__main__": success = 0 try: filename = os.sys.argv[1] success += TestAnonymizer( filename, True ) except: # loop over all files: t = gdcm.Testing() nfiles = t.GetNumberOfFileNames() for i in range(0,nfiles): filename = t.GetFileName(i) success += TestAnonymizer( filename ) # Test succeed ? sys.exit(success == 0) gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Python/TestUIDGenerator.py000664 001766 001770 00000001561 14517730450 031660 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys if __name__ == "__main__": uid = gdcm.UIDGenerator() for i in range(0,100): print(uid.Generate()) MY_ROOT = "1.2.3.4" # static function: gdcm.UIDGenerator_SetRoot( MY_ROOT ) for i in range(0,100): print(uid.Generate()) # Test succeed ? sys.exit(0) gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Python/CMakeLists.txt000664 001766 001770 00000002005 14517730450 030710 0ustar00mmalaterremmalaterre000000 000000 # Define the tests for gdcm-python # gdcm-python set(GDCM_PYTHON_TEST_SRCS #TestPythonFilter #TestStringFilter TestIPPSorter TestOrientation TestUIDGenerator ) if(GDCM_DATA_ROOT) set(GDCM_PYTHON_TEST_SRCS ${GDCM_PYTHON_TEST_SRCS} TestAnonymizer TestModifyFields TestImageReader TestScanner ) endif() if(BUILD_APPLICATIONS) if(DCMTK_DCMDUMP_EXECUTABLE) if(UNIX) if(GDCM_DATA_ROOT) set(GDCM_PYTHON_TEST_SRCS ${GDCM_PYTHON_TEST_SRCS} TestDCMTKMD5 # need dcmdrle and dcmdjpeg ) endif() endif() endif() endif() # Loop over files and create executables foreach(name ${GDCM_PYTHON_TEST_SRCS}) ADD_PYTHON_TEST(${name}Python ${name}.py) endforeach() # Special test that need extra arg: # TestKakaduDecompressionMD5 find_package(KAKADU) if(BUILD_APPLICATIONS) if(KDU_EXPAND_EXECUTABLE) if(UNIX) if(GDCM_DATA_ROOT) ADD_PYTHON_TEST(TestKakaduDecompressionMD5Python TestKakaduDecompressionMD5.py ${KDU_EXPAND_EXECUTABLE}) endif() endif() endif() endif() gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Python/TestPythonFilter.py000664 001766 001770 00000003373 14517730450 032022 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys def TestPythonFilter(filename, verbose = False): r = gdcm.Reader() r.SetFileName( filename ) success = r.Read() if( not success ): return 1 file = r.GetFile() ds = file.GetDataSet() # Change gdcm struct into something swig can digest: pds = gdcm.PythonDataSet(ds) sf = gdcm.PythonFilter() pds.Start() # Make iterator go at beginning dic1={} dic2={} sf.SetFile(file) # extremely important while(not pds.IsAtEnd() ): t = str(pds.GetCurrent().GetTag()) print(t) res = sf.ToPyObject( pds.GetCurrent().GetTag() ) dic2[t] = res[1] dic1[res[0]] = res[1] pds.Next() #print dic1 #print dic2 try: print("Pixel Representation=",dic2[ '(0028,0103)' ]) except KeyError: print("Tag not found in dataset") return 0 if __name__ == "__main__": success = 0 try: filename = os.sys.argv[1] success += TestPythonFilter( filename, True ) except: # loop over all files: gdcm.Trace.WarningOff() t = gdcm.Testing() nfiles = t.GetNumberOfFileNames() for i in range(0,nfiles): filename = t.GetFileName(i) success += TestPythonFilter( filename ) # Test succeed ? sys.exit(success == 0) gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Python/TestModifyFields.py000664 001766 001770 00000005035 14517730450 031746 0ustar00mmalaterremmalaterre000000 000000 ########################################################################### # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys def TestModifyFields(filename): outfilename = filename + ".rewrite" r = gdcm.Reader() r.SetFileName( filename ) success = r.Read() #print r.GetFile().GetDataSet() ds = r.GetFile().GetDataSet() #print dir(ds) # eg, let's remove a tag removetag = gdcm.Tag(0x0043,0x106f) if ds.FindDataElement( removetag ): ds.Remove( removetag ) # let's replace a value: replacetag = gdcm.Tag(0x0010,0x0010) if ds.FindDataElement( replacetag ): de = ds.GetDataElement( replacetag ) #print dir(de) patname = b"This^is^an^example" de.SetByteStringValue( patname ) # let's insert a new dataelement # pir = gdcm.DataElement( gdcm.Tag(0x0012,0x0062) ) pir.SetVR( gdcm.VR( gdcm.VR.CS ) ) # specify the VR explicitly yes = b"YES" pir.SetByteStringValue( yes ) ds.Insert( pir ) # try again but pretend we don't know the VR # deidmethod = gdcm.Tag(0x0012,0x0063) # retrieve the supreme global instance, sum of all knowledge in da whole universe: dicomdicts = gdcm.GlobalInstance.GetDicts() dictel = dicomdicts.GetDictEntry( deidmethod ) #print dictel.GetVR() deid = gdcm.DataElement( deidmethod ) deid.SetVR( dictel.GetVR() ) methodstr = b"Well known Company" #deid.SetByteStringValue( methodstr ) deid.SetByteStringValue( methodstr ) ds.Insert( deid ) #w = gdcm.Writer() #w.SetFileName( outfilename ) #w.SetFile( r.GetFile() ) #success = w.Write() return success if __name__ == "__main__": success = 0 try: filename = os.sys.argv[1] success += TestModifyFields( filename ) except: # loop over all files: t = gdcm.Testing() nfiles = t.GetNumberOfFileNames() for i in range(0,nfiles): filename = t.GetFileName(i) success += TestModifyFields( filename ) # Test succeed ? sys.exit(success == 0) gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Python/TestScanner.py000664 001766 001770 00000005004 14517730450 030755 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys def TestScan(dirname, recursive = False): # Check the dirname is indeed a directory system = gdcm.System() if not system.FileIsDirectory(dirname): print("Need a directory") sys.exit(1) # Retrieve all the files within that dir (recursively?) d = gdcm.Directory() nfiles = d.Load( dirname, recursive ) print("done retrieving all the",nfiles,"files") s = gdcm.Scanner() t1 = gdcm.Tag(0x0020,0x000d) # VR::UI t2 = gdcm.Tag(0x0020,0x000e) # VR::UI t3 = gdcm.Tag(0x0028,0x0011) # VR::US # Some fun tags, with dual VR: t4 = gdcm.Tag(0x0028,0x0106) # VR::US_SS t5 = gdcm.Tag(0x0028,0x0107) # VR::US_SS s.AddTag( t1 ) s.AddTag( t2 ) s.AddTag( t3 ) s.AddTag( t4 ) s.AddTag( t5 ) b = s.Scan( d.GetFilenames() ) if not b: print("Scanner failed") sys.exit(1) # Raw Values found: values = s.GetValues() print("Values found for all tags are:") print(values) # get the main super-map : mappings = s.GetMappings() #file1 = d.GetFilenames()[0]; #print file1 #m1 = s.GetMapping( file1 ) #print m1 #print dir(m1) #for k,v in m1.iteritems(): # print "item", k,v # For each file get the value for tag t1: for f in d.GetFilenames(): print("Working on:",f) mapping = s.GetMapping(f) pttv = gdcm.PythonTagToValue(mapping) # reset iterator to start position pttv.Start() # iterate until the end: while( not pttv.IsAtEnd() ): # get current value for tag and associated value: # if tag was not found, then it was simply not added to the internal std::map # Warning value can be None tag = pttv.GetCurrentTag() value = pttv.GetCurrentValue() print(tag,"->",value) # increment iterator pttv.Next() if __name__ == "__main__": try: dirname = os.sys.argv[1] recursive = True except: t = gdcm.Testing() dirname = t.GetDataRoot() recursive = False TestScan( dirname, recursive) sys.exit(0) gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Python/TestImageReader.py000664 001766 001770 00000002324 14517730450 031533 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys def TestImageRead(filename, verbose = False): r = gdcm.ImageReader() r.SetFileName( filename ) success = r.Read() if verbose: print(r.GetImage()) return success if __name__ == "__main__": success = 0 try: filename = os.sys.argv[1] success += TestImageRead( filename, True ) except: # loop over all files: gdcm.Trace.DebugOff() gdcm.Trace.WarningOff() t = gdcm.Testing() nfiles = t.GetNumberOfFileNames() for i in range(0,nfiles): #print t.GetFileName(i) filename = t.GetFileName(i) success += TestImageRead( filename ) # Test succeed ? sys.exit(success == 0) gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Python/TestKakaduDecompressionMD5.py000664 001766 001770 00000006562 14517730450 033637 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys def TestKakadu(filename, kdu_expand): fn = gdcm.Filename(filename) testdir = fn.GetPath() testbasename = fn.GetName() ext = fn.GetExtension() #print ext #kakadu_path = '/home/mmalaterre/Software/Kakadu60' kakadu_path = os.path.dirname( kdu_expand ) #kdu_expand = kakadu_path + '/kdu_expand' kdu_args = ' -quiet -i ' output_dcm = testdir + '/kakadu/' + testbasename output_j2k = output_dcm + '.j2k' output_ppm = output_dcm + '.ppm' # output_raw = output_dcm + '.rawl' # FIXME: little endian only... kdu_expand += kdu_args + output_j2k + ' -o ' + output_raw # $ ./bin/gdcmraw -i .../TestImageChangeTransferSyntax2/012345.002.050.dcm -o toto.j2k executable_output_path = gdcm.GDCM_EXECUTABLE_OUTPUT_PATH gdcmraw = executable_output_path + '/gdcmraw' outputfilename = output_j2k gdcmraw_args = ' -i ' + filename + ' -o ' + outputfilename gdcmraw += gdcmraw_args #print gdcmraw ret = os.system( gdcmraw ) #print "ret:",ret #print kdu_expand os.environ["LD_LIBRARY_PATH"]=kakadu_path ret = os.system( kdu_expand ) # now need to skip the ppm header: dd_cmd = 'dd bs=15 skip=1 if=%s of = %s'%(output_ppm,output_raw) #print "ret:",ret md5 = gdcm.Testing.ComputeFileMD5( output_raw ) # ok this is the md5 as computed after decompression using kdu_expand # let see if it match out previously (stored) md5: ref = gdcm.Testing.GetMD5FromFile(filename) #print ref retval = 0 if ref != md5: img = gdcm.ImageReader() img.SetFileName( filename ) img.Read() if img.GetImage().GetDimension(2) != 1: print("Test do not handle multiframes for now") elif img.GetImage().GetPixelFormat().GetSamplesPerPixel() != 1: print("Test do not handle RGB for now. kdu_expand expand as RRR GGG BBB by default") else: print("md5 are different: %s should be: %s for file %s"%(md5,ref,filename)) print("raw file was: %s"%(output_raw)) retval = 1 return retval if __name__ == "__main__": success = 0 #try: # filename = os.sys.argv[1] # success += TestKakadu( filename ) #except: # loop over all files: #t = gdcm.Testing() #nfiles = t.GetNumberOfFileNames() #for i in range(0,nfiles): # filename = t.GetFileName(i) # success += TestKakadu( filename ) d = gdcm.Directory() tempdir = gdcm.Testing.GetTempDirectory() j2ksubdir = 'TestImageChangeTransferSyntax2' # FIXME hardcoded ! nfiles = d.Load( tempdir + '/' + j2ksubdir ) # make sure the output dir for temporary j2k files exists: md = gdcm.System.MakeDirectory( tempdir + '/' + j2ksubdir + '/kakadu' ); if not md: sys.exit(1) files = d.GetFilenames() for i in range(0,nfiles): filename = files[i] success += TestKakadu( filename, os.sys.argv[1] ) # Test succeed ? sys.exit(success) gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Python/TestOrientation.py000664 001766 001770 00000003141 14517730450 031657 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys if __name__ == "__main__": success = True ori1 = (1,0,0,0,1,0) ori2 = (1,0,0,0,0,1) ori3 = (0,1,0,0,0,1) label1 = gdcm.Orientation.GetLabel( gdcm.Orientation.GetType( ori1 ) ) if label1 != 'AXIAL': print("Found:",label1) success = False label2 = gdcm.Orientation.GetLabel( gdcm.Orientation.GetType( ori2 ) ) if label2 != 'CORONAL': print("Found:",label2) success = False label3 = gdcm.Orientation.GetLabel( gdcm.Orientation.GetType( ori3 ) ) if label3 != 'SAGITTAL': print("Found:",label3) success = False image = gdcm.Image() image.SetNumberOfDimensions(2) print(image) print(image.GetDimensions()) print(image.GetOrigin()) print(image.GetSpacing()) print(image.GetDirectionCosines()) image.SetNumberOfDimensions(3) image.SetDimensions( (512,256,128) ) print(image.GetDimensions()) #dircos = gdcm.DirectionCosines( (1,0,0,0,0,-1) ) dircos = gdcm.DirectionCosines() print(dircos) #print dircos.Cross() # Test succeed ? sys.exit(success == False) gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Python/TestIPPSorter.py000664 001766 001770 00000001345 14517730450 031217 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys if __name__ == "__main__": success = 0 s = gdcm.IPPSorter() # black box test: if not s.Sort([]): sys.exit(1) sys.exit(0) gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Python/TestDCMTKMD5.py000664 001766 001770 00000014522 14517730450 030541 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys,re """ You need to have dcmdump/dcmdrle/dcmdjpeg in your PATH """ def TestDCMTKMD5( filename, verbose = False ): blacklist = [ # Get rid of DICOMDIR if any: 'DICOMDIR', 'DICOMDIR_MR_B_VA12A', 'DICOMDIR-Philips-EasyVision-4200-Entries', 'dicomdir_Acusson_WithPrivate_WithSR', 'dicomdir_Pms_With_heavy_embedded_sequence', 'dicomdir_Pms_WithVisit_WithPrivate_WithStudyComponents', 'dicomdir_With_embedded_icons', # Unsupported file: 'MR_Spectroscopy_SIEMENS_OF.dcm', 'gdcm-CR-DCMTK-16-NonSamplePerPix.dcm', # this is not an image 'ELSCINT1_PMSCT_RLE1.dcm', 'SignedShortLosslessBug.dcm', 'JPEGDefinedLengthSequenceOfFragments.dcm', # dcmtk 3.6.0 gives garbage 'GE_DLX-8-MONO2-PrivateSyntax.dcm', 'PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm', #'DermaColorLossLess.dcm', # technically I could support this one... #'LEADTOOLS_FLOWERS-24-RGB-JpegLossy.dcm', # idem 'ALOKA_SSD-8-MONO2-RLE-SQ.dcm'] # this one is not supported by dcmtk 3.5.4 for f in blacklist: if f in filename: print("%s is on the black list, giving up"%filename) return 0 #print filename # #dcmdump_exec = "dcmdump -dc -E +P 2,10 -s " + filename + " 2> /dev/null" # I had to remove the -dc for the following file: # GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm there is trailing space instead of \0 dcmdump_exec = "dcmdump -E +P 2,10 -s " + filename + " 2> /dev/null" #print dcmdump_exec f = os.popen(dcmdump_exec) ret = f.read() #assert ret == 0 #print ret jpegre = re.compile('^.*JPEGLossless.*$') jpegre2 = re.compile('^.*JPEGExtended.*$') jpegre3 = re.compile('^.*JPEGBaseline.*$') j2kre = re.compile('^.*JPEG2000.*$') jplsre = re.compile('^.*JPEGLS.*$') rlere = re.compile('^.*RLELossless.*$') lexre = re.compile('^.*LittleEndianExplicit.*$') leire = re.compile('^.*LittleEndianImplicit.*$') beire = re.compile('^.*BigEndianExplicit.*$') testing = gdcm.Testing() outputdir = testing.GetTempDirectory( "TestDCMTKMD5" ) gdcm.System.MakeDirectory( outputdir ) outputfilename = testing.GetTempFilename( filename, "TestDCMTKMD5" ) executable_output_path = gdcm.GDCM_EXECUTABLE_OUTPUT_PATH gdcmraw = executable_output_path + '/gdcmraw -P' if not ret: #print "empty, problem with:", filename return 0 elif type(ret) != type(''): print("problem of type with:", filename) return 0 #print ret #print ret.__class__ elif( jpegre.match( ret ) or jpegre2.match(ret) or jpegre3.match(ret) ): #print "jpeg: ",filename # +cn : conv-never # +px : color by pixel dcmdjpeg_exec = "dcmdjpeg +cn +px " + filename + " " + outputfilename ret = os.system( dcmdjpeg_exec ) if ret: print("dcmdjpeg failed to decompress file. giving up") return 0 gdcmraw_args = ' -i ' + outputfilename + ' -o ' + outputfilename + ".raw" gdcmraw += gdcmraw_args #print gdcmraw ret = os.system( gdcmraw ) md5 = gdcm.Testing.ComputeFileMD5( outputfilename + ".raw" ) ref = gdcm.Testing.GetMD5FromFile(filename) #print md5 retval = 0 if ref != md5: print("md5 are different: %s should be: %s for file %s"%(md5,ref,filename)) retval = 1 #print outputfilename return retval elif( jplsre.match( ret ) ): #print "jpegls: ",filename dcmdjpls_exec = "dcmdjpls " + filename + " " + outputfilename ret = os.system( dcmdjpls_exec ) if ret: print("failed with: ", dcmdjpls_exec) return 1 gdcmraw_args = ' -i ' + outputfilename + ' -o ' + outputfilename + ".raw" gdcmraw += gdcmraw_args #print gdcmraw ret = os.system( gdcmraw ) md5 = gdcm.Testing.ComputeFileMD5( outputfilename + ".raw" ) ref = gdcm.Testing.GetMD5FromFile(filename) #print md5 retval = 0 if ref != md5: print("md5 are different: %s should be: %s for file %s"%(md5,ref,filename)) retval = 1 #print outputfilename return retval elif( rlere.match( ret ) ): #print "rle: ",filename dcmdrle_exec = "dcmdrle " + filename + " " + outputfilename ret = os.system( dcmdrle_exec ) if ret: print("failed with: ", dcmdrle_exec) return 1 gdcmraw_args = ' -i ' + outputfilename + ' -o ' + outputfilename + ".raw" gdcmraw += gdcmraw_args #print gdcmraw ret = os.system( gdcmraw ) md5 = gdcm.Testing.ComputeFileMD5( outputfilename + ".raw" ) ref = gdcm.Testing.GetMD5FromFile(filename) #print md5 retval = 0 if ref != md5: print("md5 are different: %s should be: %s for file %s"%(md5,ref,filename)) retval = 1 #print outputfilename return retval elif( j2kre.match( ret ) ): return 0 elif( lexre.match( ret ) or leire.match(ret) or beire.match(ret) ): #print "rle: ",filename #dcmdrle_exec = "dcmdrle " + filename + " " + outputfilename #ret = os.system( dcmdrle_exec ) gdcmraw_args = ' -i ' + filename + ' -o ' + outputfilename + ".raw" gdcmraw += gdcmraw_args #print gdcmraw ret = os.system( gdcmraw ) if ret: print("failed with: ", gdcmraw) return 1 md5 = gdcm.Testing.ComputeFileMD5( outputfilename + ".raw" ) ref = gdcm.Testing.GetMD5FromFile(filename) #print md5 retval = 0 if ref != md5: print("md5 are different: %s should be: %s for file %s"%(md5,ref,filename)) retval = 1 #print outputfilename return retval #else print("Unhandled:",filename,"with ret=",ret) return 1 if __name__ == "__main__": success = 0 try: filename = os.sys.argv[1] success += TestDCMTKMD5( filename, True ) except: # loop over all files: t = gdcm.Testing() gdcm.Trace.WarningOff() gdcm.Trace.DebugOff() nfiles = t.GetNumberOfFileNames() for i in range(0,nfiles): filename = t.GetFileName(i) success += TestDCMTKMD5( filename ) # Test succeed ? sys.exit(success) gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Csharp/000775 001766 001770 00000000000 14517731550 026114 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Csharp/FCTS_RLE.cs000664 001766 001770 00000002746 14517730450 027713 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ using System; using gdcm; public class FCTS_RLE { public static int Main(string[] args) { string filename = args[0]; string outfilename = args[1]; using( var sfcts = FileChangeTransferSyntax.New() ) { FileChangeTransferSyntax fcts = sfcts.__ref__(); //SimpleSubjectWatcher watcher = new SimpleSubjectWatcher(fcts, "FileChangeTransferSyntax"); gdcm.TransferSyntax ts = new TransferSyntax( TransferSyntax.TSType.RLELossless ); fcts.SetTransferSyntax( ts ); ImageCodec ic = fcts.GetCodec(); RLECodec rle = RLECodec.Cast( ic ); // need to call at least one member func to check not NULL: long val = rle.GetBufferLength(); System.Console.WriteLine( val ); // use val to remove a warning fcts.SetInputFileName( filename ); fcts.SetOutputFileName( outfilename ); if( !fcts.Change() ) { return 1; } } return 0; } } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Csharp/CMakeLists.txt000664 001766 001770 00000002175 14517730450 030657 0ustar00mmalaterremmalaterre000000 000000 # C# MSFF tests set(MSFF_TEST_SRCS FCTS_JPEG FCTS_JPEGLS FCTS_JPEG2000 FCTS_RLE ) set(DEP) set_source_files_properties(${GDCM_LIBRARY_DIR}/gdcm-sharp.dll PROPERTIES GENERATED 1) foreach(test ${MSFF_TEST_SRCS}) file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${test}.cs result) add_custom_command( OUTPUT ${GDCM_EXECUTABLE_DIR}/${test}.exe COMMAND ${CMAKE_CSHARP_COMPILER} "${CSC_PLATFORM_FLAG}" "/r:${GDCM_LIBRARY_DIR}/gdcm-sharp.dll" "/out:${GDCM_EXECUTABLE_DIR}/${test}.exe" ${result} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${test}.cs COMMENT "Create ${test}.exe" ) add_custom_target(gdcm_sharp_${test} DEPENDS ${GDCM_EXECUTABLE_DIR}/${test}.exe) add_dependencies(gdcm_sharp_${test} GDCMCSharp) list(APPEND DEP ${GDCM_EXECUTABLE_DIR}/${test}.exe) # add test if(GDCM_DATA_ROOT) ADD_CSHARP_TEST(Test${test} ${GDCM_EXECUTABLE_DIR}/${test}.exe ${GDCM_DATA_ROOT}/GE_DLX-8-MONO2-Multiframe.dcm ${CMAKE_CURRENT_BINARY_DIR}/${test}.dcm) endif() endforeach() add_custom_target(gdcmMSFFTestsCsharp ALL DEPENDS ${DEP} COMMENT "building MSFF C# tests" ) add_dependencies(gdcmMSFFTestsCsharp GDCMCSharp) gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Csharp/FCTS_JPEG.cs000664 001766 001770 00000002623 14517730450 030010 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ using System; using gdcm; public class FCTS_JPEG { public static int Main(string[] args) { string filename = args[0]; string outfilename = args[1]; using( var sfcts = FileChangeTransferSyntax.New() ) { FileChangeTransferSyntax fcts = sfcts.__ref__(); //SimpleSubjectWatcher watcher = new SimpleSubjectWatcher(fcts, "FileChangeTransferSyntax"); gdcm.TransferSyntax ts = new TransferSyntax( TransferSyntax.TSType.JPEGBaselineProcess1 ); fcts.SetTransferSyntax( ts ); ImageCodec ic = fcts.GetCodec(); JPEGCodec jpeg = JPEGCodec.Cast( ic ); jpeg.SetLossless( false ); jpeg.SetQuality( 50 ); // poor quality ! fcts.SetInputFileName( filename ); fcts.SetOutputFileName( outfilename ); if( !fcts.Change() ) { return 1; } } return 0; } } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Csharp/FCTS_JPEG2000.cs000664 001766 001770 00000002620 14517730450 030307 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ using System; using gdcm; public class FCTS_JPEG2000 { public static int Main(string[] args) { string filename = args[0]; string outfilename = args[1]; using( var sfcts = FileChangeTransferSyntax.New() ) { FileChangeTransferSyntax fcts = sfcts.__ref__(); //SimpleSubjectWatcher watcher = new SimpleSubjectWatcher(fcts, "FileChangeTransferSyntax"); gdcm.TransferSyntax ts = new TransferSyntax( TransferSyntax.TSType.JPEG2000 ); fcts.SetTransferSyntax( ts ); ImageCodec ic = fcts.GetCodec(); JPEG2000Codec jpeg2000 = JPEG2000Codec.Cast( ic ); jpeg2000.SetReversible( false ); jpeg2000.SetQuality(0, 55); fcts.SetInputFileName( filename ); fcts.SetOutputFileName( outfilename ); if( !fcts.Change() ) { return 1; } } return 0; } } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Csharp/FCTS_JPEGLS.cs000664 001766 001770 00000002615 14517730450 030250 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ using System; using gdcm; public class FCTS_JPEGLS { public static int Main(string[] args) { string filename = args[0]; string outfilename = args[1]; using( var sfcts = FileChangeTransferSyntax.New() ) { FileChangeTransferSyntax fcts = sfcts.__ref__(); //SimpleSubjectWatcher watcher = new SimpleSubjectWatcher(fcts, "FileChangeTransferSyntax"); gdcm.TransferSyntax ts = new TransferSyntax( TransferSyntax.TSType.JPEGLSNearLossless ); fcts.SetTransferSyntax( ts ); ImageCodec ic = fcts.GetCodec(); JPEGLSCodec jpegls = JPEGLSCodec.Cast( ic ); jpegls.SetLossless( false ); jpegls.SetLossyError( 2 ); fcts.SetInputFileName( filename ); fcts.SetOutputFileName( outfilename ); if( !fcts.Change() ) { return 1; } } return 0; } } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Java/000775 001766 001770 00000000000 14517731550 025555 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Java/CMakeLists.txt000664 001766 001770 00000002450 14517730450 030314 0ustar00mmalaterremmalaterre000000 000000 # Define the tests for gdcm-java set(GDCM_JAVA_TEST_SRCS TestStringFilter ) # Do not change anything after here: find_package(Java ${GDCM_DEFAULT_JAVA_VERSION} REQUIRED) # javac, jar find_package(JNI REQUIRED) include_directories( ${JNI_INCLUDE_PATH} ) set(classfilesdep) foreach(example ${GDCM_JAVA_TEST_SRCS}) add_custom_command( OUTPUT ${GDCM_EXECUTABLE_DIR}/${example}.class COMMAND ${Java_JAVAC_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${example}.java -d ${GDCM_EXECUTABLE_DIR} -source ${GDCM_JAVA_SOURCE_VERSION} -target ${GDCM_JAVA_TARGET_VERSION} -classpath ${GDCM_LIBRARY_DIR}/gdcm.jar WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${example}.java COMMENT "javac ${example}.java" ) list(APPEND classfilesdep ${GDCM_EXECUTABLE_DIR}/${example}.class) set(GDCM_LIBRARY_DIR2 ${LIBRARY_OUTPUT_PATH}/\${BUILD_TYPE}) set_source_files_properties(${GDCM_EXECUTABLE_DIR}/${example}.class PROPERTIES CLASSPATH "${GDCM_LIBRARY_DIR2}/gdcm.jar") ADD_JAVA_TEST(${example}Java ${GDCM_EXECUTABLE_DIR}/${example}) endforeach() # 3. ok now add the target add_custom_target(GDCMJavaMSFFTests ALL DEPENDS ${classfilesdep} COMMENT "building gdcm java msff tests" ) # make sure gdcm.jar is built add_dependencies(GDCMJavaMSFFTests GDCMJavaJar) gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Java/TestStringFilter.java000664 001766 001770 00000006000 14517730450 031666 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* */ import gdcm.*; public class TestStringFilter { public static void main(String[] args) throws Exception { /* System.out.println("PATH : " + System.getProperty("java.library.path")); Properties p = System.getProperties(); Enumeration keys = p.keys(); while (keys.hasMoreElements()) { String key = (String)keys.nextElement(); String value = (String)p.get(key); System.out.println(key + ": " + value); } */ long nfiles = Testing.GetNumberOfFileNames(); Trace.DebugOff(); Trace.WarningOff(); for( long i = 0; i < nfiles; ++i ) { String filename = Testing.GetFileName( i ); if( filename.contains( "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm" )) { //System.out.println("Success reading: " + filename ); Reader reader = new Reader(); reader.SetFileName( filename ); if ( !reader.Read() ) { throw new Exception("Could not read: " + filename ); } File file = reader.GetFile(); DataSet ds = file.GetDataSet(); Tag t1 = new Tag(0x2005,0xe229); StringFilter sf = new StringFilter(); sf.SetFile( file ); if( ds.FindDataElement( t1 ) ) { DataElement de1 = ds.GetDataElement(t1); System.out.println("de1: " + de1 ); String s1 = sf.ToString( de1 ); System.out.println("s1: " + s1 ); float array[] = { 5.1f, -4.9f }; de1.SetArray( array, array.length ); System.out.println("de1: " + de1 ); s1 = sf.ToString( de1 ); System.out.println("s1: " + s1 ); } Tag t2 = new Tag(0x18,0x2043); float array[] = { 2.5f, -1.6f }; DataElement de = new DataElement(t2); //de.SetVR( new VR(VR.VRType.FL) ); de.SetArray( array, array.length ); String s = sf.ToString( de ); System.out.println("s: " + s ); ds.Replace( de ); if( ds.FindDataElement( t2 ) ) { DataElement de2 = ds.GetDataElement(t2); System.out.println("de2: " + de2 ); String s2 = sf.ToString( de2 ); System.out.println("s2: " + s2 ); //float array[] = { 51, 49 }; //de1.SetArray( array, array.length ); //System.out.println("de1: " + de1 ); //s1 = sf.ToString( de1 ); //System.out.println("s1: " + s1 ); //ds.Replace( de1 ); } Writer writer = new Writer(); writer.SetFile( reader.GetFile() ); writer.SetFileName( "testsf.dcm" ); if ( !writer.Write() ) { throw new Exception("Could not write: " + filename ); } } } } } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/000775 001766 001770 00000000000 14517731550 025436 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestDumper.cxx000664 001766 001770 00000003722 14517730450 030260 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmDumper.h" #include "gdcmTesting.h" #include "gdcmCSAHeader.h" int TestDump(const char *filename) { gdcm::Reader r; r.SetFileName( filename ); if( !r.Read() ) { return 1; } std::ostringstream out; { gdcm::Dumper p; p.SetFile( r.GetFile() ); //p.Print( std::cout ); p.Print( out ); } // Test CSA Header here too gdcm::CSAHeader csa; const gdcm::DataSet& ds = r.GetFile().GetDataSet(); const gdcm::PrivateTag &t1 = csa.GetCSAImageHeaderInfoTag(); const gdcm::PrivateTag &t2 = csa.GetCSASeriesHeaderInfoTag(); if( ds.FindDataElement( t1 ) ) { csa.LoadFromDataElement( ds.GetDataElement( t1 ) ); csa.Print( std::cout ); } if( ds.FindDataElement( t2 ) ) { csa.LoadFromDataElement( ds.GetDataElement( t2 ) ); csa.Print( std::cout ); } if( csa.GetFormat() == gdcm::CSAHeader::DATASET_FORMAT ) { gdcm::Dumper p; gdcm::File f; f.SetDataSet( csa.GetDataSet() ); p.SetFile( f ); //p.Print( std::cout ); p.Print( out ); } return 0; } int TestDumper(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestDump(filename); } // else int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestDump( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestUIDGenerator2.cxx000664 001766 001770 00000004436 14517730450 031401 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmUIDGenerator.h" #include #include #include #include #include #include const unsigned int nuids = 100; void* func (void* argc) { gdcm::UIDGenerator g; std::set *uids= reinterpret_cast< std::set* >(argc); for(unsigned int i = 0; i < nuids; i++) { const char *s = g.Generate(); //std::cout << s << std::endl; if ( uids->count(s) == 1 ) { std::cerr << "Already found: " << s << std::endl; //pthread_exit(); // How do I say this is an error... } uids->insert( s ); } return nullptr; } int TestUIDGenerator2(int , char *[]) { const unsigned int nthreads = 10; // multiple of 2 please pthread_t th[nthreads]; std::set uids[nthreads]; unsigned int i; for (i = 0; i < nthreads; i++) { const int ret = pthread_create (&th[i], nullptr, func, (void*)(uids+i)); if( ret ) return 1; } for (i = 0; i < nthreads; i++) pthread_join (th[i], nullptr); std::vector v_one(nuids*nthreads); std::vector::iterator it = v_one.begin(); for(i = 0; i < nthreads; i+=2) { std::set_union(uids[i].begin(), uids[i].end(), uids[i+1].begin(), uids[i+1].end(), it); it += nuids*2; } std::cout << v_one.size() << std::endl; assert( v_one.size() == nuids * nthreads ); // programmer error std::copy(v_one.begin(), v_one.end(), std::ostream_iterator(std::cout, "\n")); std::set global; for(it = v_one.begin(); it != v_one.end(); ++it) { global.insert( *it ); } std::cout << "set:" << global.size() << std::endl; if( global.size() != nuids * nthreads ) { return 1; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestIPPSorter2.cxx000664 001766 001770 00000005676 14517730450 030747 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmIPPSorter.h" #include "gdcmDirectory.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmTrace.h" #include "gdcmAttribute.h" // Sort image using Instance Number: bool mysort(gdcm::DataSet const & ds1, gdcm::DataSet const & ds2 ) { gdcm::Attribute<0x0020,0x0013> at1; // Instance Number at1.Set( ds1 ); gdcm::Attribute<0x0020,0x0013> at2; at2.Set( ds2 ); return at1 < at2; } int TestIPPSorter2(int argc, char *argv[]) { const char *directory = gdcm::Testing::GetDataRoot(); std::vector filenames; if( argc == 2 ) { gdcm::Trace::DebugOn(); directory = argv[1]; if( gdcm::System::FileIsDirectory( directory ) ) { gdcm::Directory d; unsigned int nfiles = d.Load( directory ); // no recursion d.Print( std::cout ); std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; filenames = d.GetFilenames(); } else { std::cerr << "file:" << directory << " is not a directory" << std::endl; return 1; } } else { // default execution (nightly test) // let's take 4 files that can be sorted: std::string file0 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm"; std::string file1 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm"; std::string file2 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm"; std::string file3 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm"; // let's push them in random order (oh my god how are we going to succeed ??) filenames.push_back( file1 ); filenames.push_back( file3 ); filenames.push_back( file2 ); filenames.push_back( file0 ); } gdcm::IPPSorter s; s.SetComputeZSpacing( true ); s.SetZSpacingTolerance( 1e-10 ); bool b = s.Sort( filenames ); if( !b ) { std::cerr << "Failed to sort:" << directory << std::endl; return 1; } std::cout << "Sorting succeeded:" << std::endl; s.Print( std::cout ); double zspacing = s.GetZSpacing(); if(!zspacing) { std::cerr << "computation of ZSpacing failed." << std::endl; return 1; } std::cout << "Found z-spacing:" << std::endl; std::cout << s.GetZSpacing() << std::endl; // Now apply a StableSort on them: s.SetSortFunction( mysort ); s.StableSort( s.GetFilenames() ); s.Print( std::cout ); return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageChangeTransferSyntax1.cxx000664 001766 001770 00000013353 14517730450 034152 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageChangeTransferSyntax.h" #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmFileMetaInformation.h" #include "gdcmTesting.h" #include "gdcmByteSwap.h" #include "gdcmImageChangePlanarConfiguration.h" namespace gdcm { int TestImageChangeTransferSyntaxJPEG(const char *filename, bool verbose = false) { ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const FileMetaInformation &header = reader.GetFile().GetHeader(); MediaStorage ms = header.GetMediaStorage(); bool isImage = MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } else { // not an image give up... std::cerr << "Problem with: " << filename << " but that's ok" << std::endl; return 0; } } const gdcm::Image &image = reader.GetImage(); int pc = image.GetPlanarConfiguration(); gdcm::ImageChangeTransferSyntax change; change.SetTransferSyntax( gdcm::TransferSyntax::JPEGLosslessProcess14_1 ); change.SetInput( image ); bool b = change.Change(); if( !b ) { unsigned short ba = reader.GetImage().GetPixelFormat().GetBitsAllocated(); if( ba == 12 ) { std::cerr << "fail to change, but that's ok" << std::endl; return 0; } std::cerr << "Could not change the Transfer Syntax: " << filename << std::endl; return 1; } // Create directory first: const char subdir[] = "TestImageChangeTransferSyntax"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); ImageWriter writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); // increase test goal writer.SetImage( change.GetOutput() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // Let's read that file back in ! ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not even reread our generated file : " << outfilename << std::endl; return 1; } // Check that after decompression we still find the same thing: int res = 0; gdcm::Image img = reader2.GetImage(); // When recompressing: US-RGB-8-epicard.dcm, make sure to compute the md5 using the // same original Planar Configuration... if( (int)img.GetPlanarConfiguration() != pc ) { gdcm::ImageChangePlanarConfiguration icpc; icpc.SetInput( reader2.GetImage() ); icpc.SetPlanarConfiguration( pc ); icpc.Change(); img = icpc.GetOutput(); } //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; bool res2 = img.GetBuffer(buffer); if( !res2 ) { std::cerr << "could not get buffer: " << outfilename << std::endl; return 1; } // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: #ifdef GDCM_WORDS_BIGENDIAN if( img.GetPixelFormat().GetBitsAllocated() == 16 ) { assert( !(len % 2) ); assert( img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME1 || img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME2 ); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem( (unsigned short*)buffer, gdcm::SwapCode::LittleEndian, len/2); } #endif const char *ref = gdcm::Testing::GetMD5FromFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( !ref ) { // new regression image needs a md5 sum std::cerr << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } if(res) { std::cerr << "problem with: " << outfilename << std::endl; } if( verbose ) { std::cout << "file was written in: " << outfilename << std::endl; } delete[] buffer; return res; } } // end namespace gdcm int TestImageChangeTransferSyntax1(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestImageChangeTransferSyntaxJPEG(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestImageChangeTransferSyntaxJPEG( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestIconImageGenerator.cxx000664 001766 001770 00000044324 14517730450 032531 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmFileMetaInformation.h" #include "gdcmTesting.h" #include "gdcmByteSwap.h" #include "gdcmIconImageGenerator.h" static const char * const iconimagearray[][2] = { {"f4f187737b9646348844804cd4eda259" , "SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs.acr" }, {"8659bcbae5479e03925ea51af0d42170" , "gdcm-MR-SIEMENS-16-2.acr" }, {"f50225bbd7de605fa5b32d47ab4d0f19" , "test.acr" }, {"890bd3ca8ab288128f520fd2a0c33539" , "MR-MONO2-12-an2.acr" }, {"8893470f6cbe6314c66763b709177c7a" , "CT-MONO2-12-lomb-an2.acr" }, {"2134b4b992ded28502f24ab3f21c6432" , "LIBIDO-8-ACR_NEMA-Lena_128_128.acr" }, {"f9d8a0796ebf5a6aabddb4e133d09770" , "gdcm-ACR-LibIDO.acr" }, {"68525a2313b5416fb6cf1f6b4fdb8d48" , "libido1.0-vol.acr" }, {"a6453c0e0abbaad98edd3fd2d76f9d31" , "SIEMENS_CSA2.dcm" }, {"84b514b71413607571b40dcc73a1e73b" , "gdcm-JPEG-LossLessThoravision.dcm" }, {"c58f9cbfa1fe616278f963b48b33ee9f" , "XA-MONO2-8-12x-catheter.dcm" }, {"d383b49843c5226c8f21cd5ee89b6da4" , "gdcm-MR-PHILIPS-16-Multi-Seq.dcm" }, {"5fd844186b04820e1a55d42e99d81466" , "PHILIPS_GDCM12xBug.dcm" }, {"5ec31742812dc9d3fd2a4eca8e8b8a48" , "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm" }, {"0132ce06e00b199446ebd14d957e6119" , "D_CLUNIE_CT1_J2KI.dcm" }, {"3f7cae9b920adb3ca4a96ace2c0c91d7" , "rle16sti.dcm" }, {"aa3c60bbe989c9f3ef5e59243e08af56" , "3E768EB7.dcm" }, {"e3dae1f82b71857960bad4103524a72b" , "D_CLUNIE_MR2_JPLY.dcm" }, {"5995fc49c087d64182a7dc2cabedb4b2" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm" }, {"b7051f50189e469f6fc52d5108080b6d" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm" }, {"17cd7bdeb852639b214377f0263a82d3" , "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm" }, {"365049df79c7491d14476c21083283ee" , "LEADTOOLS_FLOWERS-16-MONO2-Uncompressed.dcm" }, {"2cc83519b459f49f22d37c56f0362c3a" , "D_CLUNIE_MR3_JPLY.dcm" }, {"e8b529fbe615b4c540318695913d02e7" , "D_CLUNIE_VL2_RLE.dcm" }, {"e223c80bb1ce7344559632777881fc98" , "OsirixFake16BitsStoredFakeSpacing.dcm" }, {"e1b4e64a3a665d9ad74dc8a14cdc882b" , "GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm" }, {"cb78acab107d772f3ef2353ffdc32360" , "MR_SIEMENS_forceLoad29-1010_29-1020.dcm" }, {"4755c9b837968ca19b7a9882d4662c33" , "fffc0000UN.dcm" }, {"796594769ee3570292de36fdb4509df1" , "LIBIDO-24-ACR_NEMA-Rectangle.dcm" }, {"ffab5ebdfe60100e71295fe50412a98f" , "IM-0001-0066.CommandTag00.dcm" }, {"4ce869f259e705d596bd459f7863c0ca" , "D_CLUNIE_NM1_JPLY.dcm" }, {"e1b4e64a3a665d9ad74dc8a14cdc882b" , "D_CLUNIE_CT1_J2KR.dcm" }, {"539914be101cd8a0fad88ea3e0827f59" , "TheralysGDCM120Bug.dcm" }, {"20ac559d51fd5685236979d165178dd6" , "SIEMENS_MAGNETOM-12-MONO2-VRUN.dcm" }, {"ed6e642ca59d3e90d7db08856330cf00" , "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm" }, {"209400d084e2c179c8c3d4973e75c66a" , "ALOKA_SSD-8-MONO2-RLE-SQ.dcm" }, {"66bfea16c5837f976654e038b119af7a" , "GE_GENESIS-16-MONO2-WrongLengthItem.dcm" }, {"d4669bd89971c1affd311c7d1d8b20c7" , "US-RGB-8-esopecho.dcm" }, {"4b827f55ca36895f40bc47d27a0d7ea4" , "D_CLUNIE_MR4_RLE.dcm" }, {"7d1c251e29dcd79af32c791a6f8e24e9" , "D_CLUNIE_MR2_JPLL.dcm" }, {"5d642ed928e155551f3431f172e3378d" , "SIEMENS_Sonata-16-MONO2-Value_Multiplicity.dcm" }, {"365049df79c7491d14476c21083283ee" , "LEADTOOLS_FLOWERS-16-MONO2-JpegLossless.dcm" }, {"4305b70775ce53503ef93614815961e1" , "CT-MONO2-16-ankle.dcm" }, {"1a27a48d4efe2999b83bc89d3003d05c" , "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm" }, {"2134b4b992ded28502f24ab3f21c6432" , "simpleImageWithIcon.dcm" }, {"a13e29a4a0ca1a31338589a45f21a9e2" , "CR-MONO1-10-chest.dcm" }, {"e1b4e64a3a665d9ad74dc8a14cdc882b" , "D_CLUNIE_CT1_RLE.dcm" }, {"32931c4b9131f43496ab4a3518527af1" , "D_CLUNIE_NM1_JPLL.dcm" }, {"efc58ca0ba4b51b511374f8e53f2af4e" , "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm" }, {"620f0b67a91f7f74151bc5be745b7110" , "NM-MONO2-16-13x-heart.dcm" }, {"9abf5e3aadcfe2b9c1cfe41782b36704" , "US-IRAD-NoPreambleStartWith0003.dcm" }, {"f778aac834d5a68acaa97d8faec18e72" , "MR-MONO2-16-head.dcm" }, {"1a27a48d4efe2999b83bc89d3003d05c" , "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm" }, {"09e18d103bc8c9cf08b1455af2717310" , "MAROTECH_CT_JP2Lossy.dcm" }, {"bedb38b85f3bdb85c99b62e5b01a3ada" , "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm" }, {"fb5402472ee00639ef8dc1b09692c299" , "US-PAL-8-10x-echo.dcm" }, {"cea1ea10e8efc68bfb559bbefd1e4cc1" , "MR-SIEMENS-DICOM-WithOverlays.dcm" }, {"6246c70687f0deab108c889eacda1b8e" , "D_CLUNIE_MR1_JPLL.dcm" }, {"e1b4e64a3a665d9ad74dc8a14cdc882b" , "D_CLUNIE_CT1_JPLL.dcm" }, {"db6293d8adc92a2273b6ae2fee13c2e7" , "AMIInvalidPrivateDefinedLengthSQasUN.dcm" }, {"17cd7bdeb852639b214377f0263a82d3" , "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm" }, {"b041b08aa1786195f3f26a75c1b84b85" , "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" }, {"9172854202523aa6688367efcbfc3bdc" , "D_CLUNIE_SC1_JPLY.dcm" }, {"d29e7ff251d7d754ce8b5368f61032b0" , "gdcm-MR-PHILIPS-16-NonSquarePixels.dcm" }, {"8a5d13f6c85b2eebc1c02432d729cd45" , "SIEMENS-MR-RGB-16Bits.dcm" }, {"3e8618fee9c8baca508eeef8206a340a" , "US-IRAD-NoPreambleStartWith0005.dcm" }, {"3a7816dc8359a0d8a935313909fcf817" , "PICKER-16-MONO2-Nested_icon.dcm" }, {"be5490cac843a7325027e578067d4eb3" , "gdcm-JPEG-Extended.dcm" }, {"c790d0a462907135c1991f10a4846f98" , "D_CLUNIE_US1_RLE.dcm" }, {"3ac268f0ec6f1005a72db89d182f143c" , "D_CLUNIE_RG2_JPLY.dcm" }, {"5e848e7bc12f27e598c3348a586def24" , "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm" }, {"3bbe5ebe2ff7e260d56e40f670e3e335" , "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm" }, {"9df1b097f3f7eb4a3725065e361b9213" , "TG18-CH-2k-01.dcm" }, {"365049df79c7491d14476c21083283ee" , "LEADTOOLS_FLOWERS-16-MONO2-RLE.dcm" }, {"27daf49ec13f58db1d800fc58378852e" , "OT-PAL-8-face.dcm" }, {"07fef244d4e14358d453c144770b2a55" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossy.dcm" }, {"0c38dfd851a74ea2205a0a6b69c2ddf7" , "SIEMENS_MAGNETOM-12-MONO2-Uncompressed.dcm" }, {"620f0b67a91f7f74151bc5be745b7110" , "GDCMJ2K_TextGBR.dcm" }, {"5158679aaa379a50dec1e4a092d91455" , "MR16BitsAllocated_8BitsStored.dcm" }, {"22103a2ee208d18f8c4e60dc15e5444a" , "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm" }, {"e1b4e64a3a665d9ad74dc8a14cdc882b" , "D_CLUNIE_CT1_JLSL.dcm" }, {"719505e71eafd643fa2e114acc83496f" , "ELSCINT1_JP2vsJ2K.dcm" }, {"09dd85a0f964f307f66f2b8727d22efb" , "D_CLUNIE_XA1_JPLL.dcm" }, {"a5019730f663a81b50d559c8a98da4a6" , "SIEMENS_Sonata-12-MONO2-SQ.dcm" }, {"ed0f5fc46b2e0bb6550d68686d956ca6" , "JPEGDefinedLengthSequenceOfFragments.dcm" }, {"5aaee8a979cb11627e56ca5757e5d4e3" , "PHILIPS_GDCM12xBug2.dcm" }, {"620f0b67a91f7f74151bc5be745b7110" , "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm" }, {"e34c7c8d406ceec07ff1c8b82b59d2e5" , "D_CLUNIE_RG2_JPLL.dcm" }, {"7478edd0202fde583138df8dfe2782f9" , "FUJI-10-MONO1-ACR_NEMA_2.dcm" }, {"c5d8e44435241965c400935d30b0d654" , "D_CLUNIE_MR1_JPLY.dcm" }, {"09dd85a0f964f307f66f2b8727d22efb" , "D_CLUNIE_XA1_RLE.dcm" }, {"2783d3ac71623cd136de7eb8af13753b" , "BugGDCM2_UndefItemWrongVL.dcm" }, {"8659bcbae5479e03925ea51af0d42170" , "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm" }, {"477d801b27ef3cb21a8685cedbc9b12e" , "JDDICOM_Sample2.dcm" }, {"028dcdbc8e309eac282f73cff0751273" , "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm" }, {"7e183442aefeadbfff9f0d79a7064a5d" , "DCMTK_JPEGExt_12Bits.dcm" }, {"9f04afae98a960de78b31e416bdbe31b" , "US-MONO2-8-8x-execho.dcm" }, {"7cc0d00a56ec460d4025d4f9cea4e445" , "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" }, {"bee28068ae9edef69fef792583b3e20f" , "ACUSON-24-YBR_FULL-RLE-b.dcm" }, {"b171f7581c9cf15b2d32cfd62e9b6038" , "gdcm-US-ALOKA-16.dcm" }, {"b6ba84d4868436e0b44b19d75cefe239" , "DX_J2K_0Padding.dcm" }, {"76b3e5225e1914e61010eb11c50b0d13" , "D_CLUNIE_CT2_RLE.dcm" }, {"455aa24ef2085a6b57f8b29d4f42b558" , "D_CLUNIE_RG1_JPLL.dcm" }, {"e0a3fd5917c5a13a16981e1d0346af4d" , "D_CLUNIE_VL3_RLE.dcm" }, {"fd69a42d6ed9ac779fbdea5a874f27da" , "NM_Kakadu44_SOTmarkerincons.dcm" }, {"5a622115e307a024aeb6003ad45c87d7" , "CT-SIEMENS-Icone-With-PaletteColor.dcm" }, {"d687a5770da5430258c9354ef7283fb1" , "GE_DLX-8-MONO2-PrivateSyntax.dcm" }, {"48843eac44f481073e2349a9b40034e6" , "CT_16b_signed-UsedBits13.dcm" }, {"7b8f24a39d4d46d6898d0c868e2ead62" , "D_CLUNIE_RG3_JPLY.dcm" }, {"a1b35156bf0be7f0fe5054e13b6dc11f" , "DX_GE_FALCON_SNOWY-VOI.dcm" }, {"8745f035e70b8dad2a4b04b855c1974e" , "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm" }, {"608d7fd9e8cf15f95b75a12072a209d9" , "CT-MONO2-16-brain.dcm" }, {"c2de60330cda14759a117b937a7e5a95" , "D_CLUNIE_VL4_RLE.dcm" }, {"b4213e55f351e2c9e013050652c8fad4" , "D_CLUNIE_MR3_RLE.dcm" }, {"cdae2ce2d07ef1880f9eba78e72c7f03" , "undefined_length_un_vr.dcm" }, {"1e456d9eb136554a3d035d65999ac72f" , "CT-MONO2-16-ort.dcm" }, {"7022cd07ae0e9311ca2bb13372becee1" , "05148044-mr-siemens-avanto-syngo.dcm" }, {"5d6aaab5766479ec6e27de4eaa4a6438" , "GE_LOGIQBook-8-RGB-HugePreview.dcm" }, {"d8b9952cb72ea315ae4b81038ca7498f" , "RadBWLossLess.dcm" }, {"b7b5b0a05dde85a672529e896ffd34cc" , "KODAK-12-MONO1-Odd_Terminated_Sequence.dcm" }, {"c1b31ebeb79ba29263e59254af17eb88" , "CT-MONO2-16-chest.dcm" }, {"4085155ff0a36230f55dfd17c07b016f" , "PhilipsInteraSeqTermInvLen.dcm" }, {"4c80f49834a2f8cec23ff8c7c0e80613" , "D_CLUNIE_MR4_JPLY.dcm" }, {"dc04449fe2bdd8c5ff26f2b6b4f3a1aa" , "D_CLUNIE_RG3_JPLL.dcm" }, {"01d9c3bac1a49f874eb70640d9187657" , "MR_Philips-Intera_BreaksNOSHADOW.dcm" }, {"f86eb566e712fa57bf5bdd13af9233c6" , "GE_CT_With_Private_compressed-icon.dcm" }, {"b2ed24f5bad1fe7fe1ceb62a1a37bf03" , "D_CLUNIE_CT1_JLSN.dcm" }, {"20ac559d51fd5685236979d165178dd6" , "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm" }, {"cee47e57f6b1aaace74bb813e33a74eb" , "00191113.dcm" }, {"645a354b8bfbbda1c3e01a79c583eca0" , "MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm" }, {"f8ef8fa89c0415c54ee8350db9bafc59" , "SignedShortLosslessBug.dcm" }, {"9274ed6683e657a8e6c95278cb93a971" , "GE_DLX-8-MONO2-Multiframe.dcm" }, {"cb7ccda2e8aed6d56df6350207c1d122" , "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm" }, {"788c5bf06000799bd630c70ce0418430" , "LJPEG_BuginGDCM12.dcm" }, {"610b9ac0f1aac082eb1c0b140a85d2de" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm" }, {"dc04449fe2bdd8c5ff26f2b6b4f3a1aa" , "D_CLUNIE_RG3_RLE.dcm" }, {"587e56aa881d645ee67ac3afe317b11d" , "CT-SIEMENS-MissingPixelDataInIconSQ.dcm" }, {"7d1c251e29dcd79af32c791a6f8e24e9" , "MR-MONO2-12-shoulder.dcm" }, {"0b818ac3983d76cfdc535a46058a1a53" , "LEADTOOLS_FLOWERS-24-RGB-Uncompressed.dcm" }, {"ba8fb87069401e40d9c0dd5bf0f2bb06" , "PICKER-16-MONO2-No_DicomV3_Preamble.dcm" }, {"634fca1b1087cfb2dd4c74a567daf302" , "SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm" }, {"ba0654f3e7aae75bca8fc24705ddb78a" , "CT-MONO2-8-abdo.dcm" }, {"b4213e55f351e2c9e013050652c8fad4" , "D_CLUNIE_MR3_JPLL.dcm" }, {"03f25fb3e6e8ae53b9565553e2026a66" , "D_CLUNIE_VL6_RLE.dcm" }, {"365049df79c7491d14476c21083283ee" , "LEADTOOLS_FLOWERS-8-MONO2-RLE.dcm" }, {"99b13adb3932f9fcf50c0aa936b6e367" , "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm" }, {"1f0795064ee1d19534780b7a4e92d5db" , "SIEMENS-12-Jpeg_Process_2_4-Lossy-a.dcm" }, {"de42da38e961881e7a68f4d9337007cd" , "gdcm-JPEG-LossLess3a.dcm" }, {"bec532ee78edb47bd0894dcbb2a7d1f5" , "D_CLUNIE_XA1_JPLY.dcm" }, {"455aa24ef2085a6b57f8b29d4f42b558" , "D_CLUNIE_RG1_RLE.dcm" }, {"e77b93eb953f2a21fa75d257da0514fb" , "US-RGB-8-epicard.dcm" }, {"ddc56ce334439f64953f1b11c82aeeb9" , "GE_MR_0025xx1bProtocolDataBlock.dcm" }, {"b9f48f54e75b7f1994cfe1a7152d9ab5" , "rle16loo.dcm" }, {"50bf4b4c98228d2f11fb0d8c4b49e3cc" , "DMCPACS_ExplicitImplicit_BogusIOP.dcm" }, {"76b3e5225e1914e61010eb11c50b0d13" , "D_CLUNIE_CT2_JPLL.dcm" }, {"477d801b27ef3cb21a8685cedbc9b12e" , "JDDICOM_Sample2-dcmdjpeg.dcm" }, {"17cd7bdeb852639b214377f0263a82d3" , "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm" }, {"19cd0ebffc7541a5ec944d25200923ad" , "KODAK_CompressedIcon.dcm" }, {"486199008daf27f167efee9469fffd52" , "ACUSON-24-YBR_FULL-RLE.dcm" }, {"7d1c251e29dcd79af32c791a6f8e24e9" , "D_CLUNIE_MR2_RLE.dcm" }, {"b53c440c32a7bd20d24cc1997bd7c9e6" , "JPEG_LossyYBR.dcm" }, {"4c54ea0d88336020167a5cb9437a1dec" , "012345.002.050.dcm" }, {"e34c7c8d406ceec07ff1c8b82b59d2e5" , "D_CLUNIE_RG2_RLE.dcm" }, {"b209bb00a5bb920ebfb52b50132bd3cb" , "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm" }, {"261065dc52f086beac57ed71977b40ec" , "SIEMENS_ImageLocationUN.dcm" }, {"17cd7bdeb852639b214377f0263a82d3" , "PHILIPS_Intera-16-MONO2-Uncompress.dcm" }, {"60e754c9dfc02bba3aee11e67653d844" , "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm" }, {"0b818ac3983d76cfdc535a46058a1a53" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossless.dcm" }, {"91b4da2ca9fd378ca404580c84c62984" , "US-GE-4AICL142.dcm" }, {"5b24d4a43d7c72090eabb88a06b56f15" , "D_CLUNIE_SC1_RLE.dcm" }, {"4b827f55ca36895f40bc47d27a0d7ea4" , "D_CLUNIE_MR4_JPLL.dcm" }, {"95ccb6a943e1ca82f3be78ceaa72b9d4" , "MR-Brucker-CineTagging-NonSquarePixels.dcm" }, {"552dd953ebd0575d124e44df0218b0ea" , "MR-MONO2-8-16x-heart.dcm" }, {"e73b404ca6d9b4b7ba54f46d2662deca" , "LEADTOOLS_FLOWERS-8-MONO2-JpegLossy.dcm" }, {"8a35a388332dbb40018ee6814ab27994" , "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm" }, {"32931c4b9131f43496ab4a3518527af1" , "D_CLUNIE_NM1_RLE.dcm" }, {"20e2f6cc2b60ae26adfdd3b3ee0e1915" , "D_CLUNIE_VL1_RLE.dcm" }, {"0b1cb469990edd0cabfa34c8b6cb427d" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm" }, {"620f0b67a91f7f74151bc5be745b7110" , "DermaColorLossLess.dcm" }, {"b9395dcfbb50e1af31147f80e8e0c1e7" , "OT-MONO2-8-a7.dcm" }, {"6246c70687f0deab108c889eacda1b8e" , "D_CLUNIE_MR1_RLE.dcm" }, {"365049df79c7491d14476c21083283ee" , "LEADTOOLS_FLOWERS-8-MONO2-Uncompressed.dcm" }, {"cee47e57f6b1aaace74bb813e33a74eb" , "00191113.dcm" }, {"07b6f4e2fba920d28e2f29dbb037b640" , "TOSHIBA_J2K_SIZ1_PixRep0.dcm" }, {"206713a8ff161546d664d1285f99f90b" , "TOSHIBA_J2K_OpenJPEGv2Regression.dcm" }, {"dc70ae52689ebf8f5003320e1c7f216b" , "TOSHIBA_J2K_SIZ0_PixRep1.dcm" }, {"3475cb96e0308cb84502be1c1531b588" , "NM-PAL-16-PixRep1.dcm" }, {"bcac830aae8652a88f4c4aa6d9e7e116" , "MEDILABInvalidCP246_EVRLESQasUN.dcm" }, {"5b8db1c8d42870f68bfd908529c58710" , "JPEGInvalidSecondFrag.dcm" }, {"37f43037574e53a0c27151443e27613f" , "SC16BitsAllocated_8BitsStoredJ2K.dcm" }, {"620f0b67a91f7f74151bc5be745b7110" , "SC16BitsAllocated_8BitsStoredJPEG.dcm" }, // sentinel { 0, 0 } }; namespace gdcm { int TestIconImageGenerate(const char *subdir, const char* filename, bool verbose = false) { ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const FileMetaInformation &header = reader.GetFile().GetHeader(); MediaStorage ms = header.GetMediaStorage(); bool isImage = MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } else { // not an image give up... std::cerr << "Problem with: " << filename << " but that's ok" << std::endl; return 0; } } // Create directory first: std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); IconImageGenerator iig; iig.SetPixmap( reader.GetImage() ); const unsigned int idims[2] = { 64, 64 }; iig.SetOutputDimensions( idims ); bool b = iig.Generate(); gdcm::Filename fn( filename ); const char *name = fn.GetName(); unsigned int i = 0; const char *p = iconimagearray[i][1]; while( p != 0 ) { if( strcmp( name, p ) == 0 ) { break; } ++i; p = iconimagearray[i][1]; } const char *refmd5 = iconimagearray[i][0]; if( b ) { const gdcm::IconImage &icon = iig.GetIconImage(); if( verbose ) icon.Print( std::cout ); unsigned long len = icon.GetBufferLength(); std::vector< char > vbuffer; vbuffer.resize( len ); char *buffer = &vbuffer[0]; bool res2 = icon.GetBuffer(buffer); if( !res2 ) { std::cerr << "res2 failure:" << filename << std::endl; return 1; } char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); Image & img = reader.GetImage(); img.SetIconImage( iig.GetIconImage() ); ImageWriter writer; writer.SetFileName( outfilename.c_str() ); #if 1 writer.SetImage( img ); #else Image &ii = writer.GetImage(); (Bitmap&)ii = iig.GetIconImage(); #endif if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } if( verbose ) { std::cout << "success: " << outfilename << std::endl; std::cout << "ref=" << refmd5 << std::endl; std::cout << "md5=" << digest << std::endl; } if( !refmd5 ) { std::cerr << " missing md5= {\"" << digest << "\" , \"" << name << "\" }," << std::endl; return 1; } if( strcmp( refmd5, digest) ) { std::cerr << "Problem with : " << name << " " << refmd5 << " vs " << digest << std::endl; return 1; } } else { assert( refmd5 == 0 ); std::cerr << "Could not generate Icon for: " << filename << std::endl; return 1; } return 0; } } int TestIconImageGenerator(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestIconImageGenerate(argv[0],filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestIconImageGenerate(argv[0], filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestStreamImageReader.cxx000664 001766 001770 00000016350 14517730450 032346 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmStreamImageReader.h" #include "gdcmFileMetaInformation.h" #include "gdcmSystem.h" #include "gdcmFilename.h" #include "gdcmByteSwap.h" #include "gdcmTrace.h" #include "gdcmTesting.h" #include "gdcmImageHelper.h" #include "gdcmImageReader.h" #include "gdcmImage.h" #include "gdcmMediaStorage.h" #include "gdcmRAWCodec.h" #include "gdcmJPEGLSCodec.h" int TestStreamImageRead(const char* filename, bool verbose = false, bool lossydump = false) { (void)lossydump; if( verbose ) std::cerr << "Reading: " << filename << std::endl; gdcm::StreamImageReader reader; reader.SetFileName( filename ); bool canReadImageInformation = reader.ReadImageInformation(); if (!canReadImageInformation) { return 0; //unable to read tags as expected. } else { int res = 0; //let's be tricky; each image will be read in portions, first the top half, then the bottom //that way, we can test how the stream handles fragmentation of the data //we could also loop this to get various different size combinations, but I'm not sure //that's useful, yet. std::vector extent = gdcm::ImageHelper::GetDimensionsValue(reader.GetFile()); //at this point, these values aren't used, but may be in the future //unsigned short xmin = 0; //unsigned short xmax = extent[0]; //unsigned short ymin = 0; //unsigned short ymax = extent[1]; //unsigned short zmin = 0; //unsigned short zmax = extent[2]; reader.DefinePixelExtent(0, (uint16_t)extent[0], 0, (uint16_t)extent[1], 0, (uint16_t)extent[2]); unsigned long len = reader.DefineProperBufferLength(); char* finalBuffer = new char[len]; memset(finalBuffer, 0, sizeof(char)*len); if (reader.CanReadImage()){ bool result = reader.Read(finalBuffer, len); if( !result ){ std::cerr << "res2 failure:" << filename << std::endl; delete [] finalBuffer; return 1; } } else { delete [] finalBuffer; return 0; //essentially, we're going to skip this file since it can't be read by the streamer } /* //now, read in smaller buffer extents reader.DefinePixelExtent(xmin, xmax, ymin, ymax); len = reader.DefineProperBufferLength(); char* buffer = new char[len]; bool res2 = reader.Read(buffer, len); if( !res2 ){ std::cerr << "res2 failure:" << filename << std::endl; return 1; } //copy the result into finalBuffer memcpy(finalBuffer, buffer, len); //now read the next half of the image ymin = ymax; ymax = extent[1]; reader.DefinePixelExtent(xmin, xmax, ymin, ymax); //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len2 = reader.DefineProperBufferLength(); char* buffer2 = new char[len2]; bool res3 = reader.Read(buffer2, len2); if( !res3 ){ std::cerr << "res3 failure:" << filename << std::endl; return 1; } //copy the result into finalBuffer memcpy(&(finalBuffer[len]), buffer2, len2); delete [] buffer; delete [] buffer2; */ // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: const char *ref = gdcm::Testing::GetMD5FromFile(filename); const char *correct_ref = gdcm::Testing::GetMD5FromBrokenFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(finalBuffer, len, digest); if( verbose ) { std::cout << "ref=" << ref << std::endl; std::cout << "md5=" << digest << std::endl; } if( !ref ) { // new regression image needs a md5 sum std::cout << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { // let's be nice for now and only truly fails when file is proper DICOM if( correct_ref && !strcmp(correct_ref, ref) ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; /* //uncomment this code to explicitly read and check the md5 hash gdcm::ImageReader reader; reader.SetFileName( filename ); if (reader.Read()) { const gdcm::Image &img = reader.GetImage(); //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len2 = img.GetBufferLength(); char* buffer2 = new char[len]; bool res3 = img.GetBuffer(buffer2); if (res3) { char digest2[33]; gdcm::Testing::ComputeMD5(buffer2, len2, digest2); if (strcmp(digest2, digest)) { std::cerr << "Second check read " << digest2 << " not " << digest << std::endl; } } delete [] buffer2; } */ res = 1; } #if 0 std::ofstream debug("/tmp/dump.gray",std::ios::binary); debug.write(finalBuffer, len); debug.close(); #endif } delete[] finalBuffer; if (res == 0) { //uncomment this line to determine if a file was correctly read //std::cerr << "Correctly read " << filename << std::endl; } return res; } #if 0 const gdcm::FileMetaInformation &header = reader.GetFile().GetHeader(); gdcm::MediaStorage ms = header.GetMediaStorage(); bool isImage = gdcm::MediaStorage::IsImage( ms ); if( isImage ) { if( reader.GetFile().GetDataSet().FindDataElement( gdcm::Tag(0x7fe0,0x0010) ) ) { std::cerr << "Failed to read image from file: " << filename << std::endl; return 1; } else { std::cerr << "no Pixel Data Element found in the file:" << filename << std::endl; return 0; } } // else // well this is not an image, so thankfully we fail to read it std::cerr << "Could not read image(" << filename << "), since file is a: " << ms << std::endl; //assert( ms != gdcm::MediaStorage::MS_END ); return 0; #endif } int TestStreamImageReader(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestStreamImageRead(filename, true); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestStreamImageRead( filename); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileAnonymizer1.cxx000664 001766 001770 00000007261 14517730450 032042 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileAnonymizer.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmFilename.h" int TestFileAnonymize1(const char *filename, bool verbose = false) { using namespace gdcm; if( verbose ) std::cout << "Processing: " << filename << std::endl; // Create directory first: const char subdir[] = "TestFileAnonymize1"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); const gdcm::Tag t1(0x0018,0x5100); const gdcm::Tag t2(0x0018,0x1312); const gdcm::Tag t3(0x0018,0x1313); const gdcm::Tag t4(0x0018,0x1317); const gdcm::Tag t5(0x0008,0x2112); const gdcm::Tag t6(0x0008,0x9215); const gdcm::Tag t7(0x0018,0x1020); const gdcm::Tag t8(0x0004,0x1130); // Test DICOMDIR ! const gdcm::Tag t9(0x0008,0x0000); // Earliest possible Data Element const gdcm::Tag t0(0xffff,0xffff); // Latest Possible Element std::vector tags; tags.push_back( t0 ); tags.push_back( t1 ); tags.push_back( t2 ); tags.push_back( t3 ); tags.push_back( t4 ); tags.push_back( t5 ); tags.push_back( t6 ); tags.push_back( t7 ); tags.push_back( t8 ); tags.push_back( t9 ); // precondition, remove the file if present: System::RemoveFile(outfilename.c_str()); gdcm::FileAnonymizer fa; fa.SetInputFileName( filename ); fa.SetOutputFileName( outfilename.c_str() ); for( std::vector::const_iterator it = tags.begin(); it != tags.end(); ++it ) { fa.Remove( *it ); } if( !fa.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // Read back and check: gdcm::Reader r; r.SetFileName( outfilename.c_str() ); if( !r.Read() ) { std::cerr << "Failed to read: " << outfilename << std::endl; return 1; } const File &f = r.GetFile(); const DataSet &ds = f.GetDataSet(); for( std::vector::const_iterator it = tags.begin(); it != tags.end(); ++it ) { const gdcm::Tag & t = *it; if( ds.FindDataElement( t ) ) { gdcm::Filename fn( filename ); std::cerr << "Found element: " << t << " in " << outfilename << std::endl; gdcm::MediaStorage ms; ms.SetFromFile( f ); const bool isdicomdir = (ms == gdcm::MediaStorage::MediaStorageDirectoryStorage); // de-activate for now if( strcmp(fn.GetName(), "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm") == 0 || isdicomdir ) { return 0; } return 1; } } return 0; } int TestFileAnonymizer1(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileAnonymize1(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileAnonymize1( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestPixelFormat.cxx000664 001766 001770 00000010301 14517730450 031245 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmPixelFormat.h" struct frame_info { gdcm::PixelFormat pixeltype; }; int TestPixelFormat(int , char *[]) { using gdcm::PixelFormat; gdcm::PixelFormat pf; pf.SetScalarType( gdcm::PixelFormat::UNKNOWN ); if( pf.GetScalarType() != gdcm::PixelFormat::UNKNOWN ) { return 1; } pf.SetScalarType( gdcm::PixelFormat::UINT32 ); //pf.SetScalarType( gdcm::PixelFormat::UINT64 ); static const int64_t values[][2] = { { 0LL,255LL }, { 0LL,4095LL }, { 0LL,65535LL }, { 0LL,4294967295LL }, { -128LL,127LL }, { -2048LL,2047LL }, { -32768LL,32767LL }, { -2147483648LL,2147483647LL }, // { -2147483648LL,2147483647LL } }; static const size_t n = sizeof( values ) / sizeof( *values ); size_t c = 0; pf.SetBitsStored( 8 ); if( pf.GetMin() != values[c][0] || pf.GetMax() != values[c][1] ) { std::cerr << pf.GetMin() << "," << pf.GetMax() << std::endl; return 1; } ++c; pf.SetBitsStored( 12 ); if( pf.GetMin() != values[c][0] || pf.GetMax() != values[c][1] ) { std::cerr << pf.GetMin() << "," << pf.GetMax() << std::endl; return 1; } ++c; pf.SetBitsStored( 16 ); if( pf.GetMin() != values[c][0] || pf.GetMax() != values[c][1] ) { std::cerr << pf.GetMin() << "," << pf.GetMax() << std::endl; return 1; } ++c; pf.SetBitsStored( 32 ); if( pf.GetMin() != values[c][0] || pf.GetMax() != values[c][1] ) { std::cerr << pf.GetMin() << "," << pf.GetMax() << std::endl; return 1; } // ++c; // pf.SetBitsStored( 64 ); // if( pf.GetMin() != values[c][0] || pf.GetMax() != values[c][1] ) // { // std::cerr << pf.GetMin() << "," << pf.GetMax() << std::endl; // return 1; // } pf.SetPixelRepresentation( 1 ); ++c; pf.SetBitsStored( 8 ); if( pf.GetMin() != values[c][0] || pf.GetMax() != values[c][1] ) { std::cerr << pf.GetMin() << "," << pf.GetMax() << std::endl; return 1; } ++c; pf.SetBitsStored( 12 ); if( pf.GetMin() != values[c][0] || pf.GetMax() != values[c][1] ) { std::cerr << pf.GetMin() << "," << pf.GetMax() << std::endl; return 1; } ++c; pf.SetBitsStored( 16 ); if( pf.GetMin() != values[c][0] || pf.GetMax() != values[c][1] ) { std::cerr << pf.GetMin() << "," << pf.GetMax() << std::endl; return 1; } ++c; pf.SetBitsStored( 32 ); if( pf.GetMin() != values[c][0] || pf.GetMax() != values[c][1] ) { std::cerr << pf.GetMin() << "," << pf.GetMax() << std::endl; return 1; } // ++c; // pf.SetBitsStored( 64 ); // if( pf.GetMin() != values[c][0] || pf.GetMax() != values[c][1] ) // { // std::cerr << pf.GetMin() << "," << pf.GetMax() << std::endl; // return 1; // } ++c; if ( c != n ) return 1; for(unsigned int i = 0; i < PixelFormat::UNKNOWN; ++i) { PixelFormat::ScalarType st = (PixelFormat::ScalarType)i; pf.SetScalarType( st ); gdcm::PixelFormat pf2 = st; std::cout << pf << std::endl; std::cout << pf.GetPixelRepresentation() << std::endl; std::cout << pf.GetScalarTypeAsString() << std::endl; if( pf2 != pf ) return 1; } // make to avoid user mistakes: gdcm::PixelFormat pf3 = PixelFormat::UINT8; if( pf3.GetBitsStored() != 8 ) return 1; pf3.SetBitsStored( 32 ); // previous call should not execute if( pf3.GetBitsStored() != 8 ) return 1; pf3.SetHighBit( 8 ); if( pf3.GetHighBit() != 7 ) return 1; gdcm::PixelFormat pf4 = PixelFormat::UINT16; pf4.SetBitsStored(8); if( pf4.GetScalarType() != gdcm::PixelFormat::UINT16 ) return 1; pf4.SetPixelRepresentation(1); if( pf4.GetScalarType() != gdcm::PixelFormat::INT16 ) return 1; frame_info fi = {}; (void)fi; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileStreamer5.cxx000664 001766 001770 00000005313 14517730450 031471 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileStreamer.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmDataSet.h" #include "gdcmPrivateTag.h" #include "gdcmFilename.h" int TestFileStream5(const char *filename, bool verbose = false) { using namespace gdcm; if( verbose ) std::cout << "Processing: " << filename << std::endl; // Create directory first: const char subdir[] = "TestFileStreamer5"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); if( verbose ) std::cout << "Generating: " << outfilename << std::endl; gdcm::Filename fn( filename ); const char *name = fn.GetName(); // Special handling: bool checktemplate = false; if( strcmp(name, "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0 || strcmp(name, "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm") == 0 || strcmp(name, "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm") == 0 ) { checktemplate = true; } gdcm::FileStreamer fs; fs.SetTemplateFileName( filename ); fs.CheckTemplateFileName( checktemplate ); fs.SetOutputFileName( outfilename.c_str() ); std::vector vbuffer; vbuffer.resize( 8192 ); const char *buffer = vbuffer.data(); const size_t len = vbuffer.size(); PrivateTag pt( Tag(0x9,0x10), "MYTEST" ); fs.StartGroupDataElement( pt, 10 ); if( fs.AppendToGroupDataElement( pt, buffer, len ) ) { std::cerr << "We should not succeed, we should fail this test" << std::endl; return 1; } fs.StopGroupDataElement( pt ); return 0; } int TestFileStreamer5(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileStream5(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileStream5( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestIconImage.cxx000664 001766 001770 00000004524 14517730450 030660 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmIconImage.h" // FIXME: // gdcmData/US-GE-4AICL142.dcm has a private data element that is an Icon: /* (6003,0010) LO [GEMS_Ultrasound_ImageGroup_001] # 30, 1 PrivateCreator (6003,1010) SQ (Sequence with explicit length #=1) # 12522, 1 Unknown Tag & Data (fffe,e000) na (Item with explicit length #=15) # 12514, 1 Item (0002,0010) UI =LittleEndianExplicit # 20, 1 TransferSyntaxUID (0008,0008) CS [DERIVED\SECONDARY] # 18, 2 ImageType (0008,2111) ST [SmallPreview] # 12, 1 DerivationDescription (0028,0002) US 3 # 2, 1 SamplesPerPixel (0028,0004) CS [RGB] # 4, 1 PhotometricInterpretation (0028,0006) US 0 # 2, 1 PlanarConfiguration (0028,0010) US 64 # 2, 1 Rows (0028,0011) US 64 # 2, 1 Columns (0028,0014) US 1 # 2, 1 UltrasoundColorDataPresent (0028,0100) US 8 # 2, 1 BitsAllocated (0028,0101) US 8 # 2, 1 BitsStored (0028,0102) US 7 # 2, 1 HighBit (0028,0103) US 0 # 2, 1 PixelRepresentation (6003,0010) LO [GEMS_Ultrasound_ImageGroup_001] # 30, 1 PrivateCreator (6003,1011) OB 00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00... # 12288, 1 Unknown Tag & Data (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem */ int TestIconImage(int, char *[]) { gdcm::IconImage icon; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestOverlay2.cxx000664 001766 001770 00000003431 14517730450 030524 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmOverlay.h" #include "gdcmPixmapReader.h" #include "gdcmTesting.h" #include "gdcmSystem.h" int TestOverlay2(int, char *[]) { const char *extradataroot = gdcm::Testing::GetDataExtraRoot(); if( !extradataroot ) { return 1; } if( !gdcm::System::FileIsDirectory(extradataroot) ) { std::cerr << "No such directory: " << extradataroot << std::endl; return 1; } std::string filename = extradataroot; filename += "/gdcmSampleData/images_of_interest/XA_GE_JPEG_02_with_Overlays.dcm"; if( !gdcm::System::FileExists(filename.c_str()) ) { return 1; } gdcm::PixmapReader reader; reader.SetFileName( filename.c_str() ); if( !reader.Read() ) { std::cerr << "could not read: " << filename << std::endl; return 1; } gdcm::Pixmap &pixmap = reader.GetPixmap(); if( pixmap.GetNumberOfOverlays() != 8 ) { return 1; } size_t numoverlays = pixmap.GetNumberOfOverlays(); for( size_t ovidx = 0; ovidx < numoverlays; ++ovidx ) { const gdcm::Overlay& ov = pixmap.GetOverlay(ovidx); if( ov.GetTypeAsEnum() != gdcm::Overlay::Graphics ) { std::cerr << "Wrong Type for overlay #" << ovidx << std::endl; return 1; } } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestIconImageGenerator3.cxx000664 001766 001770 00000044706 14517730450 032620 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmFileMetaInformation.h" #include "gdcmTesting.h" #include "gdcmByteSwap.h" #include "gdcmIconImageGenerator.h" static const char * const iconimagearray3[][2] = { {"18de6726bc64732057fb57ffa6f63482" , "SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs.acr" }, {"e751b44ccfa55354e08ba04fade91687" , "gdcm-MR-SIEMENS-16-2.acr" }, {"a7ff57ec105e45b72d91ac750953befc" , "test.acr" }, {"464cc3218d282f534326f2323264f8ca" , "MR-MONO2-12-an2.acr" }, {"e23711964e5606b7cf8a9bf194e46a27" , "CT-MONO2-12-lomb-an2.acr" }, {"fc5db4e2e7fca8445342b83799ff16d8" , "LIBIDO-8-ACR_NEMA-Lena_128_128.acr" }, {"50ab781df5647feb681c6c24a1245d0d" , "gdcm-ACR-LibIDO.acr" }, {"ce338fe6899778aacfc28414f2d9498b" , "libido1.0-vol.acr" }, {"7acad6aa0274edfc797492128c2dd2bf" , "SIEMENS_CSA2.dcm" }, {"231db66c0b1a60cab9e8e879711ebc16" , "gdcm-JPEG-LossLessThoravision.dcm" }, {"353a62510cef13ce252f5e3a7ece54dc" , "XA-MONO2-8-12x-catheter.dcm" }, {"b992b65f8beed6adc2224541be339d68" , "gdcm-MR-PHILIPS-16-Multi-Seq.dcm" }, {"a9b91f5b18b1d7078ce597ec611a2c43" , "PHILIPS_GDCM12xBug.dcm" }, {"a0b26e46dc8920167cd6b9b5ed57d8df" , "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm" }, {"eff839f187f2dfa07204b6550a96d4b6" , "D_CLUNIE_CT1_J2KI.dcm" }, {"4f94be538667ad8d39abf42ee604bf7d" , "rle16sti.dcm" }, {"7acd654cb0176b7b6f1982245593e8e6" , "3E768EB7.dcm" }, {"6fe22e9a0983a07c5b1dde43373c36f3" , "D_CLUNIE_MR2_JPLY.dcm" }, {"f17269f3d2447ed0b523b41a98b03129" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm" }, {"311524ab5c9cb14812256c561c78e573" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm" }, {"35619ea28ae211558d526e63429d5cbb" , "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm" }, {"a189258582a49855ae002d381016d02f" , "LEADTOOLS_FLOWERS-16-MONO2-Uncompressed.dcm" }, {"b9291915007d8fae5c2a67a691c33236" , "D_CLUNIE_MR3_JPLY.dcm" }, {"e2100ad66e70220df75ee60e9f69acdd" , "D_CLUNIE_VL2_RLE.dcm" }, {"985dd349809ef7d63feeb511a63b05d1" , "OsirixFake16BitsStoredFakeSpacing.dcm" }, {"046896d4baee6361e58217bd0a046162" , "GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm" }, {"54307dbe02cab5ee23efa8360eb0cbd5" , "MR_SIEMENS_forceLoad29-1010_29-1020.dcm" }, {"7e8bfa2560d883b45a0f868a81daac4d" , "fffc0000UN.dcm" }, {"00f59e7e071f7fdf7d2e700df06a1d6b" , "LIBIDO-24-ACR_NEMA-Rectangle.dcm" }, {"c1d31936337a3c65bba3edf67466a139" , "IM-0001-0066.CommandTag00.dcm" }, {"6d95a1855031ac5401ec2c8ba7ff8b18" , "D_CLUNIE_NM1_JPLY.dcm" }, {"046896d4baee6361e58217bd0a046162" , "D_CLUNIE_CT1_J2KR.dcm" }, {"a439396c24ce353e108bd0308e8a80e2" , "TheralysGDCM120Bug.dcm" }, {"e5155757353de1ad5c2b68c88fd34901" , "SIEMENS_MAGNETOM-12-MONO2-VRUN.dcm" }, {"338d45d1ee3ec0202cdfa637c491669a" , "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm" }, {"5f90ef6a0621c658cfd2ae1f2bba351e" , "ALOKA_SSD-8-MONO2-RLE-SQ.dcm" }, {"c881ef5c9a6a643ac7e890279ffc010f" , "GE_GENESIS-16-MONO2-WrongLengthItem.dcm" }, {"13d97ddbcff7e14a89a6e5c337611881" , "US-RGB-8-esopecho.dcm" }, {"0464a1b7160b097ea33f25865cce8fc9" , "D_CLUNIE_MR4_RLE.dcm" }, {"3703d1695f0c02fa7a5cbe7142c8fc6f" , "D_CLUNIE_MR2_JPLL.dcm" }, {"f0b59feaa0499a68038b627f2df71d93" , "SIEMENS_Sonata-16-MONO2-Value_Multiplicity.dcm" }, {"a189258582a49855ae002d381016d02f" , "LEADTOOLS_FLOWERS-16-MONO2-JpegLossless.dcm" }, {"dcce1e8c7b5cdc15d315807b4ec2d34b" , "CT-MONO2-16-ankle.dcm" }, {"75c3cb93e002c788acc7eff4a93e2b5b" , "TOSHIBA_J2K_SIZ1_PixRep0.dcm" }, {"4e8c0f3b4154f54ae04756d61fb1c2f5" , "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm" }, {"fc5db4e2e7fca8445342b83799ff16d8" , "simpleImageWithIcon.dcm" }, {"1c582b9b521c398ed55776bcd615af3e" , "CR-MONO1-10-chest.dcm" }, {"046896d4baee6361e58217bd0a046162" , "D_CLUNIE_CT1_RLE.dcm" }, {"f00d34662aeb08d14bcaf230053bfd5f" , "D_CLUNIE_NM1_JPLL.dcm" }, {"39faf30ee66e8c70dd2e772fcdbb1078" , "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm" }, {"ce338fe6899778aacfc28414f2d9498b" , "NM-MONO2-16-13x-heart.dcm" }, {"5a4101fb01068d1b48afcacc9bca9f7e" , "US-IRAD-NoPreambleStartWith0003.dcm" }, {"3c18da99b3d3d53399d622aabdd96b64" , "MR-MONO2-16-head.dcm" }, {"4e8c0f3b4154f54ae04756d61fb1c2f5" , "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm" }, {"443c20bd84b91d30037ad1da84568c6e" , "MAROTECH_CT_JP2Lossy.dcm" }, {"488e407541a6c353f0540049ba36d61c" , "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm" }, {"50057b97e7c585ba31144867cd40c363" , "US-PAL-8-10x-echo.dcm" }, {"e189b6b3a44a8d929f654105f9842707" , "MR-SIEMENS-DICOM-WithOverlays.dcm" }, {"139f2ba3c6f578f883125d090163e730" , "D_CLUNIE_MR1_JPLL.dcm" }, {"046896d4baee6361e58217bd0a046162" , "D_CLUNIE_CT1_JPLL.dcm" }, {"bbc89a7b6e41d668f22b6e612cfb13e7" , "AMIInvalidPrivateDefinedLengthSQasUN.dcm" }, {"35619ea28ae211558d526e63429d5cbb" , "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm" }, {"8b2eca7c4d23a79a9e6d9437bff66d67" , "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" }, {"4ef7021ed6522a730693574a37759940" , "D_CLUNIE_SC1_JPLY.dcm" }, {"ce338fe6899778aacfc28414f2d9498b" , "gdcm-MR-PHILIPS-16-NonSquarePixels.dcm" }, {"b92f9dcf1acd6dd998539d22a5296f74" , "SIEMENS-MR-RGB-16Bits.dcm" }, {"07c92897d0cbd052060f8a9d13a6386a" , "US-IRAD-NoPreambleStartWith0005.dcm" }, {"64b228a9c05e2f1b4a6371abf1ac7e21" , "PICKER-16-MONO2-Nested_icon.dcm" }, {"41d6ffef9d2edbad51c94a8d476bb1ab" , "gdcm-JPEG-Extended.dcm" }, {"5d8f3a1415c53f2b8b6ea459b4f3f6c1" , "D_CLUNIE_US1_RLE.dcm" }, {"d0dcc34bad0aa031269d3101fa044e4b" , "D_CLUNIE_RG2_JPLY.dcm" }, {"4a56065c6ab80bc0a32b39a143e58d5c" , "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm" }, {"2888e58bfe4d11b2671f2cd6a35f9b7c" , "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm" }, {"00d2f91bbf1f1d5c248f98220f85a860" , "TG18-CH-2k-01.dcm" }, {"a189258582a49855ae002d381016d02f" , "LEADTOOLS_FLOWERS-16-MONO2-RLE.dcm" }, {"703d03c5fb65c9493775c7ed6a9aa001" , "OT-PAL-8-face.dcm" }, {"12919f48891b07e74651efd5a2a52676" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossy.dcm" }, {"94e0346dc7594b042c6e67a0f8ebfa71" , "SIEMENS_MAGNETOM-12-MONO2-Uncompressed.dcm" }, {"06148d96de1833da4518b6d97fdd4165" , "GDCMJ2K_TextGBR.dcm" }, {"59f3e40cbdd708b43dd818a953bd5ca0" , "MR16BitsAllocated_8BitsStored.dcm" }, {"fe4ee9d2fc8f068c7e5b61e8dc90811d" , "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm" }, {"046896d4baee6361e58217bd0a046162" , "D_CLUNIE_CT1_JLSL.dcm" }, {"9f04eeafdcd85d84cc6f8edad761e3a1" , "ELSCINT1_JP2vsJ2K.dcm" }, {"531bfd1059c6396e9da4c9a4f5436e86" , "D_CLUNIE_XA1_JPLL.dcm" }, {"12ea2d93daec9fda8f26666dbaf21c30" , "SIEMENS_Sonata-12-MONO2-SQ.dcm" }, {"acf0d5ea13eb09415ffe3ec2d0800590" , "JPEGDefinedLengthSequenceOfFragments.dcm" }, {"6b9e6ee648acb3ca92814bc6642d0b96" , "PHILIPS_GDCM12xBug2.dcm" }, {"ce338fe6899778aacfc28414f2d9498b" , "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm" }, {"941378c3e000b34264342b1d46ce6dce" , "D_CLUNIE_RG2_JPLL.dcm" }, {"9efc87377ac56dd01476046bbbd5bf7b" , "FUJI-10-MONO1-ACR_NEMA_2.dcm" }, {"99b4254ecb0b4075b8005b775b02bea1" , "D_CLUNIE_MR1_JPLY.dcm" }, {"531bfd1059c6396e9da4c9a4f5436e86" , "D_CLUNIE_XA1_RLE.dcm" }, {"8058ebaf622a0108d12a387c75de5aae" , "BugGDCM2_UndefItemWrongVL.dcm" }, {"e751b44ccfa55354e08ba04fade91687" , "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm" }, {"c860f1795d0be70b310f5b653b34f06f" , "JDDICOM_Sample2.dcm" }, {"5fcd3432874ea0f3cbc59a317534a0b0" , "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm" }, {"ce338fe6899778aacfc28414f2d9498b" , "DCMTK_JPEGExt_12Bits.dcm" }, {"7abf9227edf8f7106198b320c5daa538" , "US-MONO2-8-8x-execho.dcm" }, {"16fff764b95a60d83e4b6781da292cea" , "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" }, {"d600407a5f79393f294518be3bba7fed" , "ACUSON-24-YBR_FULL-RLE-b.dcm" }, {"eb1c07547d036c3f778700cfef1ad24c" , "gdcm-US-ALOKA-16.dcm" }, {"9805da917d916632cf3a22b6b9140bce" , "DX_J2K_0Padding.dcm" }, {"4d6a3590ae425105315a0995f8a7da41" , "D_CLUNIE_CT2_RLE.dcm" }, {"f1b14732b392da7ea5fba9b47225945c" , "D_CLUNIE_RG1_JPLL.dcm" }, {"86362d24addeeaaa8b1b4e485ff49ea7" , "D_CLUNIE_VL3_RLE.dcm" }, {"5d590fa042089bbd62f771e403ad3068" , "NM_Kakadu44_SOTmarkerincons.dcm" }, {"790f684146906a7f0b9d8c3838066579" , "CT-SIEMENS-Icone-With-PaletteColor.dcm" }, {"336e557af65d34ae7cb5dcc18582b12b" , "GE_DLX-8-MONO2-PrivateSyntax.dcm" }, {"848ee1315da8c58064a685e70378dae5" , "CT_16b_signed-UsedBits13.dcm" }, {"29db994be059e339ab881eb760878a54" , "D_CLUNIE_RG3_JPLY.dcm" }, {"d1bd49bdf8ce55652f7802f8f8820f97" , "DX_GE_FALCON_SNOWY-VOI.dcm" }, {"7dcb5cdba4bfc242dbcc0d275ad14970" , "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm" }, {"d66fddd6bc26af655f500cd37de3b135" , "CT-MONO2-16-brain.dcm" }, {"351d2c3befec588fe7798ae0884908e7" , "D_CLUNIE_VL4_RLE.dcm" }, {"97e8c927ca201a2f932b5b3ecc6453e5" , "D_CLUNIE_MR3_RLE.dcm" }, {"bbb1be6461a9c8b1a0fd507b5c19ec20" , "undefined_length_un_vr.dcm" }, {"ae8fe4406652ca3e6b93d2ade029d94e" , "CT-MONO2-16-ort.dcm" }, {"ab976b85e44c2332d826067520f6c2e6" , "05148044-mr-siemens-avanto-syngo.dcm" }, {"8a9c001007c43fff520fada2b75e1e72" , "GE_LOGIQBook-8-RGB-HugePreview.dcm" }, {"3808ac31fbf6ede5d0a1ca47ff604f8d" , "RadBWLossLess.dcm" }, {"0ceae99a40ae6ee2ad5cf1fa06a86820" , "KODAK-12-MONO1-Odd_Terminated_Sequence.dcm" }, {"e8dd9e61c1eb37c4ab54003ef9fd2842" , "CT-MONO2-16-chest.dcm" }, {"63808ab2b6faa36b6914e01907358eb7" , "PhilipsInteraSeqTermInvLen.dcm" }, {"3a1f7960887aa18084a6f7347926c8b5" , "D_CLUNIE_MR4_JPLY.dcm" }, {"91c2703f4a5dec2d780539c29b450d47" , "D_CLUNIE_RG3_JPLL.dcm" }, {"96f9a1224838a0695b3d2cc8b0b26b97" , "MR_Philips-Intera_BreaksNOSHADOW.dcm" }, {"c75d2a8866ccdb2a96f7634bcc81adef" , "GE_CT_With_Private_compressed-icon.dcm" }, {"4c600037ef23dbf2da360db9f8d7e28b" , "TOSHIBA_J2K_OpenJPEGv2Regression.dcm" }, {"6c004779f7e43673883f04742aae9541" , "D_CLUNIE_CT1_JLSN.dcm" }, {"e5155757353de1ad5c2b68c88fd34901" , "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm" }, {"afccf775abd15a6c053c7f134b204762" , "00191113.dcm" }, {"9670e5f8c163087d75cc4044356359c3" , "MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm" }, {"ac1abc22d5d52b21c74c9f34b6178cd1" , "SignedShortLosslessBug.dcm" }, {"0f5efe869ef6b9846707e89fbef18f2c" , "GE_DLX-8-MONO2-Multiframe.dcm" }, {"6763fff05fa5b5dc2b842a40573b18a3" , "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm" }, {"10151c9ee27d40cfd58f0d79e693f38e" , "LJPEG_BuginGDCM12.dcm" }, {"d1779fd58242dc231aa021cbd9687b04" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm" }, {"91c2703f4a5dec2d780539c29b450d47" , "D_CLUNIE_RG3_RLE.dcm" }, {"ab0815dcb84bd5a42972134ea9c0493d" , "CT-SIEMENS-MissingPixelDataInIconSQ.dcm" }, {"3703d1695f0c02fa7a5cbe7142c8fc6f" , "MR-MONO2-12-shoulder.dcm" }, {"5a898d46c28350c4f55b9915b9001852" , "LEADTOOLS_FLOWERS-24-RGB-Uncompressed.dcm" }, {"654e4af3861f475c16bf498efc5df861" , "PICKER-16-MONO2-No_DicomV3_Preamble.dcm" }, {"885cd1e48a980257534d3c88380ec259" , "SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm" }, {"dbe025b7a22b829898b6eb2b35580171" , "CT-MONO2-8-abdo.dcm" }, {"97e8c927ca201a2f932b5b3ecc6453e5" , "D_CLUNIE_MR3_JPLL.dcm" }, {"5cffc4c262df7534f4008aa49aaef3ae" , "D_CLUNIE_VL6_RLE.dcm" }, {"a189258582a49855ae002d381016d02f" , "LEADTOOLS_FLOWERS-8-MONO2-RLE.dcm" }, {"051d73b41bb387005e1dbcc3af7253b3" , "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm" }, {"e20e59c88037bbe676e8c67bee2a9540" , "TOSHIBA_J2K_SIZ0_PixRep1.dcm" }, {"ca3a2e9d6d2813df183a9fd9c9d2e9a1" , "SIEMENS-12-Jpeg_Process_2_4-Lossy-a.dcm" }, {"f073eb11257017c6422158aa5cfb372c" , "gdcm-JPEG-LossLess3a.dcm" }, {"9b2dfd69af52cd8625fe1faa73f51493" , "D_CLUNIE_XA1_JPLY.dcm" }, {"f1b14732b392da7ea5fba9b47225945c" , "D_CLUNIE_RG1_RLE.dcm" }, {"8b86324f5b7b88f06dffe975a06f1544" , "US-RGB-8-epicard.dcm" }, {"5a478d37f436a6687a07fd43aaef79ee" , "GE_MR_0025xx1bProtocolDataBlock.dcm" }, {"43d75fbe29085c5760d6ff4c083a9726" , "rle16loo.dcm" }, {"cbebb7b25f11a1c39194566b194e84e5" , "DMCPACS_ExplicitImplicit_BogusIOP.dcm" }, {"4d6a3590ae425105315a0995f8a7da41" , "D_CLUNIE_CT2_JPLL.dcm" }, {"c860f1795d0be70b310f5b653b34f06f" , "JDDICOM_Sample2-dcmdjpeg.dcm" }, {"35619ea28ae211558d526e63429d5cbb" , "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm" }, {"2f2f0a482fc0c1b8d99db02a57122b22" , "KODAK_CompressedIcon.dcm" }, {"1b28808b244d86f4b6ec626b4d538680" , "ACUSON-24-YBR_FULL-RLE.dcm" }, {"3703d1695f0c02fa7a5cbe7142c8fc6f" , "D_CLUNIE_MR2_RLE.dcm" }, {"22a67114d4ae8e036665e1a1a508ca8d" , "JPEG_LossyYBR.dcm" }, {"3646c27f6fb60d66ab916934d331d550" , "012345.002.050.dcm" }, {"941378c3e000b34264342b1d46ce6dce" , "D_CLUNIE_RG2_RLE.dcm" }, {"0ba3c7de165ffe7fb43733f25de2fdf1" , "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm" }, {"e344c9a95328db382caf8a7b86c91992" , "SIEMENS_ImageLocationUN.dcm" }, {"35619ea28ae211558d526e63429d5cbb" , "PHILIPS_Intera-16-MONO2-Uncompress.dcm" }, {"42aa4fa1ac9421f083927baaf7230cf6" , "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm" }, {"5a898d46c28350c4f55b9915b9001852" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossless.dcm" }, {"00e15542d31e48490442eb4c336103e8" , "US-GE-4AICL142.dcm" }, {"2bacf42b57e957883e35451c5ff26f50" , "D_CLUNIE_SC1_RLE.dcm" }, {"0464a1b7160b097ea33f25865cce8fc9" , "D_CLUNIE_MR4_JPLL.dcm" }, {"9b801c57776e5f7c4b45f2c6c47795d8" , "MR-Brucker-CineTagging-NonSquarePixels.dcm" }, {"373a42fc21d411b4c060d2cf2a4e85f4" , "MR-MONO2-8-16x-heart.dcm" }, {"6e9d26218dce3f54b41efbe442a2154b" , "LEADTOOLS_FLOWERS-8-MONO2-JpegLossy.dcm" }, {"ccda9f1170c12f443d83990e9777ca8e" , "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm" }, {"f00d34662aeb08d14bcaf230053bfd5f" , "D_CLUNIE_NM1_RLE.dcm" }, {"a2b00a80955b1f368dcff51264b9e2e7" , "D_CLUNIE_VL1_RLE.dcm" }, {"f00ef30b32dd57515c2c0d5c921c6ee1" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm" }, {"0638ee027ccf94fd7ecca641b6fd402c" , "DermaColorLossLess.dcm" }, {"5340e9111251343c6a932992241b299e" , "OT-MONO2-8-a7.dcm" }, {"139f2ba3c6f578f883125d090163e730" , "D_CLUNIE_MR1_RLE.dcm" }, {"a189258582a49855ae002d381016d02f" , "LEADTOOLS_FLOWERS-8-MONO2-Uncompressed.dcm" }, {"afccf775abd15a6c053c7f134b204762" , "00191113.dcm" }, {"f4f35d60b3cc18aaa6d8d92f0cd3708a" , "NM-PAL-16-PixRep1.dcm" }, {"843f097f2161014cd1b11be5413eace9" , "MEDILABInvalidCP246_EVRLESQasUN.dcm" }, {"c103d405ae61aa4ed148e17157e5afc1" , "JPEGInvalidSecondFrag.dcm" }, {"c103d405ae61aa4ed148e17157e5afc1" , "Osirix10vs8BitsStored.dcm" }, {"c103d405ae61aa4ed148e17157e5afc1" , "Bug_Siemens_PrivateIconNoItem.dcm" }, {"c103d405ae61aa4ed148e17157e5afc1" , "HardcopyColor_YBR_RCT_J2K_PC1.dcm" }, {"c103d405ae61aa4ed148e17157e5afc1" , "PET-GE-dicomwrite-PixelDataSQUNv2.dcm" }, // sentinel { 0, 0 } }; namespace gdcm { int TestIconImageGenerate3(const char *subdir, const char* filename, bool verbose = false) { ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const FileMetaInformation &header = reader.GetFile().GetHeader(); MediaStorage ms = header.GetMediaStorage(); bool isImage = MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } else { // not an image give up... std::cerr << "Problem with: " << filename << " but that's ok" << std::endl; return 0; } } // Create directory first: std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); IconImageGenerator iig; iig.SetPixmap( reader.GetImage() ); iig.ConvertRGBToPaletteColor( false ); const unsigned int idims[2] = { 128, 128}; //const unsigned int idims[2] = { 552,421 }; iig.SetOutputDimensions( idims ); bool b = iig.Generate(); gdcm::Filename fn( filename ); const char *name = fn.GetName(); unsigned int i = 0; const char *p = iconimagearray3[i][1]; while( p != 0 ) { if( strcmp( name, p ) == 0 ) { break; } ++i; p = iconimagearray3[i][1]; } const char *refmd5 = iconimagearray3[i][0]; if( b ) { const gdcm::IconImage &icon = iig.GetIconImage(); if( verbose ) icon.Print( std::cout ); unsigned long len = icon.GetBufferLength(); std::vector< char > vbuffer; vbuffer.resize( len ); char *buffer = &vbuffer[0]; bool res2 = icon.GetBuffer(buffer); if( !res2 ) { std::cerr << "res2 failure:" << filename << std::endl; return 1; } char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); Image & img = reader.GetImage(); img.SetIconImage( iig.GetIconImage() ); ImageWriter writer; writer.SetFileName( outfilename.c_str() ); #if 1 writer.SetImage( img ); #else Image &ii = writer.GetImage(); (Bitmap&)ii = iig.GetIconImage(); #endif if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } if( verbose ) { std::cout << "success: " << outfilename << std::endl; std::cout << "ref=" << refmd5 << std::endl; std::cout << "md5=" << digest << std::endl; } if( !refmd5 ) { std::cerr << " missing md5= {\"" << digest << "\" , \"" << name << "\" }," << std::endl; return 1; } if( strcmp( refmd5, digest) ) { std::cerr << "Problem with : " << name << " " << refmd5 << " vs " << digest << std::endl; return 1; } } else { assert( refmd5 == 0 ); std::cerr << "Could not generate Icon for: " << filename << std::endl; return 1; } return 0; } } int TestIconImageGenerator3(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestIconImageGenerate3(argv[0],filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestIconImageGenerate3(argv[0], filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestPrinter2.cxx000664 001766 001770 00000003545 14517730450 030534 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmPrinter.h" #include "gdcmFilename.h" #include "gdcmTesting.h" #include "gdcmGlobal.h" #include "gdcmDicts.h" /* This test exercise a very obscure section of gdcm::Printer when it handles a SQ when it is hidden as VR::UN + undefined length which means this is a Implicit VR Little Endian encoded SQ in an Explicit VR Little Endian DataSet */ int TestPrinter2(int , char *[]) { const char *directory = gdcm::Testing::GetDataRoot(); std::string filename = std::string(directory) + "/undefined_length_un_vr.dcm"; gdcm::Reader r; r.SetFileName( filename.c_str() ); if( !r.Read() ) { return 1; } gdcm::Printer print; print.SetFile( r.GetFile() ); std::ostringstream out; print.Print( out ); gdcm::Global &g = gdcm::Global::GetInstance(); gdcm::Dicts &dicts = g.GetDicts(); gdcm::PrivateDict &priv_dict = dicts.GetPrivateDict(); gdcm::PrivateTag pt(0x2001,0x005f,"Philips Imaging DD 001"); if( !priv_dict.RemoveDictEntry( pt ) ) { return 1; } gdcm::Reader r2; r2.SetFileName( filename.c_str() ); if( !r2.Read() ) { return 1; } gdcm::Printer print2; print2.SetFile( r.GetFile() ); std::ostringstream out2; print2.Print( out2 ); // if( out2.str() != out.str() ) // { // return 1; // } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestCopyDataSet.cxx000664 001766 001770 00000003547 14517730450 031211 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmDataSet.h" #include "gdcmWriter.h" #include "gdcmTesting.h" int TestCopyDataSet(int, char *[]) { std::string dataroot = gdcm::Testing::GetDataRoot(); std::string filename = dataroot + "/test.acr"; gdcm::Reader reader; reader.SetFileName( filename.c_str() ); if ( !reader.Read() ) { return 1; } const gdcm::DataSet &ds = reader.GetFile().GetDataSet(); gdcm::DataSet ds_copy = ds; gdcm::DataElement n( gdcm::Tag(0x0028,0x0005) ); n.SetByteValue( "3", 1 ); std::cout << n << std::endl; ds_copy.Replace( n ); std::cout << ds_copy << std::endl; // roup="0018" element="1020" vr="LO" vm="1-n" na gdcm::DataElement n2( gdcm::Tag(0x0018,0x1020) ); //const char versions[] = "1234567890\\1234567890\\1234567890\\1234567890\\1234567890\\1234567890"; const char versions[] = "12345678901234567890123456789012345678901234567890123\\45678901234567890"; n2.SetByteValue( versions, (uint32_t)strlen(versions) ); ds_copy.Replace( n2 ); std::string outfilename = gdcm::Testing::GetTempFilename( "TestCopyDataSet.dcm" ); gdcm::Writer writer; writer.SetFile( reader.GetFile() ); writer.GetFile().GetDataSet().Replace( n2 ); writer.SetFileName( outfilename.c_str() ); writer.SetCheckFileMetaInformation( false ); writer.Write(); return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileExplicitFilter.cxx000664 001766 001770 00000006253 14517730450 032555 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileExplicitFilter.h" #include "gdcmReader.h" #include "gdcmWriter.h" #include "gdcmTesting.h" #include "gdcmSystem.h" int TestFileExplicitFilt(const char *subdir, const char *filename, bool verbose = false) { if( verbose ) std::cerr << "Reading: " << filename << std::endl; gdcm::Reader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { std::cerr << "could not read: " << filename << std::endl; return 1; } //const gdcm::FileMetaInformation &h = reader.GetFile().GetHeader(); //const gdcm::DataSet &ds = reader.GetFile().GetDataSet(); gdcm::FileExplicitFilter im2ex; im2ex.SetFile( reader.GetFile() ); if( !im2ex.Change() ) { std::cerr << "Could not im2ex change: " << filename << std::endl; return 1; } // Create directory first: std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { gdcm::System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = gdcm::Testing::GetTempFilename( filename, subdir ); gdcm::Writer writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); writer.SetCheckFileMetaInformation( false ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } if(verbose) std::cerr << "write out: " << outfilename << std::endl; char digest1[33] = {}; char digest2[33] = {}; bool b1 = gdcm::Testing::ComputeFileMD5(filename, digest1); if( !b1 ) { std::cerr << "Could not compute md5:" << filename << std::endl; return 1; } bool b2 = gdcm::Testing::ComputeFileMD5(outfilename.c_str(), digest2); if( !b2 ) { std::cerr << "Could not compute md5:" << outfilename << std::endl; return 1; } if( strcmp(digest1, digest2 ) == 0 ) { // Easy case input file was explicit return 0; } else { if(verbose) { std::cerr << "input file contained wrong VR: " << filename << std::endl; std::cerr << "see: " << outfilename << std::endl; } } return 0; } int TestFileExplicitFilter(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileExplicitFilt(argv[0], filename, true); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileExplicitFilt( argv[0], filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestDirectionCosines.cxx000664 001766 001770 00000012663 14517730450 032274 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDirectionCosines.h" #include #include /* * Let's use the CrossDot API to compare IOP safely */ static const char * ImageOrientationPatientList[] = { R"(0.999081\0.0426953\0.00369275\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369272\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369275\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369272\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369275\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426952\0.00369272\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369272\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369274\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369274\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369272\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369272\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426952\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426952\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369274\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369274\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369274\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369275\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369272\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369275\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369272\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369275\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426952\0.00369272\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369272\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369274\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369274\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369272\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369272\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426952\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426952\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369273\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369274\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369274\-0.0419025\0.955059\0.293439)", R"(0.999081\0.0426953\0.00369274\-0.0419025\0.955059\0.293439)", }; bool TestCrossDot() { std::set< std::string > myset; const unsigned int nipp = sizeof(ImageOrientationPatientList) / sizeof(*ImageOrientationPatientList); for( unsigned int i = 0; i < nipp; ++i ) { myset.insert( ImageOrientationPatientList[i] ); } if( myset.size() <= 1 ) return false; std::set< std::string >::const_iterator it = myset.begin(); gdcm::DirectionCosines ref; gdcm::DirectionCosines dc; for( ; it != myset.end(); ++it ) { ref.SetFromString( it->c_str() ); for( unsigned int i = 0; i < nipp; ++i ) { dc.SetFromString( ImageOrientationPatientList[i] ); const double crossdot = ref.CrossDot( dc); const double eps = 1. - crossdot; if( eps > 1e-6 || eps < 0 ) return false; } } return true; } int TestDirectionCosines(int, char *[]) { gdcm::DirectionCosines dc; //const double *dircos = dc; if( !dc.IsValid() ) { return 1; } const double cross[3] = {0,0,1}; double z[3]; dc.Cross(z); if( z[0] != cross[0] || z[1] != cross[1] || z[2] != cross[2] ) { return 1; } bool b = TestCrossDot(); if( !b ) return 1; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestPersonName.cxx000664 001766 001770 00000006147 14517730450 031077 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmPersonName.h" #include "gdcmByteValue.h" #include int TestPersonName(int, char *[]) { using PN = gdcm::PersonName; PN pn0; pn0.SetComponents(); std::cout << "NumComp:" << pn0.GetNumberOfComponents() << std::endl; pn0.Print( std::cout ); std::cout << std::endl; PN pn00 = {{ "" }}; std::cout << "NumComp:" << pn00.GetNumberOfComponents() << std::endl; PN pn1 = {{ "abc123", "def", "ghi", "klm", "opq" }}; pn1.Print( std::cout ); std::cout << std::endl; std::cout << "NumComp:" << pn1.GetNumberOfComponents() << std::endl; PN pn2 = {{ "malaterre", "mathieu olivier patrick"}}; pn2.Print( std::cout ); std::cout << std::endl; std::cout << "NumComp:" << pn2.GetNumberOfComponents() << std::endl; // Rev. John Robert Quincy Adams, B.A. M.Div. Adams^John Robert Quincy^^Rev.^B.A. M.Div. [One family name; three given names; no middle name; one prefix; two suffixes.] PN pn3 = {{ "Adams", "John Robert Quincy", "", "Rev.", "B.A. M.Div." }}; pn3.Print( std::cout ); std::cout << std::endl; std::cout << "NumComp:" << pn3.GetNumberOfComponents() << std::endl; // Susan Morrison-Jones, Ph.D., Chief Executive Officer Morrison-Jones^Susan^^^Ph.D., Chief Executive Officer [Two family names; one given name; no middle name; no prefix; two suffixes.] PN pn4 = {{ "Morrison-Jones", "Susan", "", "", "Ph.D., Chief Executive Officer" }}; pn4.Print( std::cout ); std::cout << std::endl; std::cout << "NumComp:" << pn4.GetNumberOfComponents() << std::endl; // John Doe Doe^John [One family name; one given name; no middle name, prefix, or suffix. Delimiters have been omitted for the three trailing null components.] PN pn5 = {{ "Doe", "John" }}; pn5.Print( std::cout ); std::cout << std::endl; std::cout << "NumComp:" << pn5.GetNumberOfComponents() << std::endl; // (for examples of the encoding of Person Names using multi-byte character sets see Annex H) // Smith^Fluffy [A cat, rather than a //human, whose responsible party family name is Smith, and whose own name is Fluffy] PN pn6 = {{ "Smith", "Fluffy" }}; pn6.Print( std::cout ); std::cout << std::endl; std::cout << "NumComp:" << pn6.GetNumberOfComponents() << std::endl; //ABC Farms^Running on Water [A horse whose responsible organization is named ABC Farms, and whose name is Running On Water] PN pn7 = {{ "ABC Farms", "Running on Water" }}; pn7.Print( std::cout ); std::cout << std::endl; std::cout << "NumComp:" << pn7.GetNumberOfComponents() << std::endl; gdcm::ByteValue bv; PN pn8; pn8.SetBlob( bv ); return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestStringFilter2.cxx000664 001766 001770 00000004511 14517730450 031517 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmStringFilter.h" #include "gdcmReader.h" #include "gdcmSequenceOfItems.h" #include "gdcmTesting.h" #include "gdcmTrace.h" static int TestStringFilt(const char *filename) { gdcm::StringFilter sf; gdcm::Reader r; r.SetFileName( filename ); if( !r.Read() ) { return 1; } gdcm::DataSet const& ds = r.GetFile().GetDataSet(); sf.SetFile( r.GetFile() ); int ret = 0; gdcm::DataSet::ConstIterator it = ds.Begin(); for( ; it != ds.End(); ++it) { const gdcm::DataElement &ref = *it; std::pair s = sf.ToStringPair( ref ); if( !s.second.empty() || ref.GetVL() == 0 ) { std::cout << s.first << " -> " << s.second << std::endl; std::string s2 = sf.FromString( ref.GetTag(), s.second.c_str(), s.second.size() ); //std::cout << s.first << " -> " << s2 << std::endl; } else if( !ref.GetByteValue() ) // It means it's a SQ { std::cout << "SQ:" << ref.GetTag() << std::endl; } else if( ref.GetTag().IsPrivate() ) { //std::cout << "Private:" << ref.GetTag() << std::endl; std::string s2 = sf.FromString( ref.GetTag(), s.second.c_str(), s.second.size() ); } else { std::cerr << "Not supported: " << ref << std::endl; //ret += 1; } } return ret; } int TestStringFilter2(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestStringFilt(filename); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestStringFilt( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileStreamer1.cxx000664 001766 001770 00000010176 14517730450 031470 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileStreamer.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmDataSet.h" #include "gdcmPrivateTag.h" #include "gdcmFilename.h" int TestFileStream1(const char *filename, bool verbose = false) { using namespace gdcm; if( verbose ) std::cout << "Processing: " << filename << std::endl; // Create directory first: const char subdir[] = "TestFileStreamer1"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); if( verbose ) std::cout << "Generating: " << outfilename << std::endl; gdcm::Filename fn( filename ); const char *name = fn.GetName(); // Special handling: bool checktemplate = false; if( strcmp(name, "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0 || strcmp(name, "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm") == 0 || strcmp(name, "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm") == 0 ) { checktemplate = true; } gdcm::FileStreamer fs; fs.SetTemplateFileName( filename ); fs.CheckTemplateFileName( checktemplate ); fs.SetOutputFileName( outfilename.c_str() ); std::vector vbuffer; vbuffer.resize( 8192 ); const char *buffer = vbuffer.data(); const size_t len = vbuffer.size(); PrivateTag pt( Tag(0x9,0x10), "MYTEST" ); if( !fs.ReserveGroupDataElement( 20 ) ) { return 1; } const uint8_t startoffset = 0x13; // why not ? fs.StartGroupDataElement( pt, 1000, startoffset ); fs.AppendToGroupDataElement( pt, buffer, len ); fs.AppendToGroupDataElement( pt, buffer, len ); fs.StopGroupDataElement( pt ); // Read back and check: gdcm::Reader r; r.SetFileName( outfilename.c_str() ); if( !r.Read() ) { std::cerr << "Failed to read: " << outfilename << std::endl; return 1; } gdcm::File & f = r.GetFile(); gdcm::DataSet & ds = f.GetDataSet(); const DataElement private_creator = pt.GetAsDataElement(); if( !ds.FindDataElement( private_creator.GetTag() ) ) { std::cerr << "Could not find priv creator: " << outfilename << std::endl; return 1; } // Check all the group: const size_t nels = (2 * vbuffer.size() + 999) / 1000; if( nels != 17 ) return 1; PrivateTag check = pt; for( size_t i = startoffset; i < startoffset + nels; ++i ) { #if 1 check.SetElement( (uint16_t)i ); check.SetPrivateCreator( pt ); #else check.SetElement( check.GetElement() + 1 ); #endif if( !ds.FindDataElement( check ) ) { std::cerr << "Could not find priv tag: " << check << " " << outfilename << std::endl; return 1; } const DataElement & de = ds.GetDataElement( check ); const int vl = de.GetVL(); int reflen = 0; if( i == (startoffset + nels - 1) ) { reflen = 384; } else { reflen = 1000; } if( vl != reflen ) { std::cerr << "Wrong length for: " << check << ":" << vl << " should be :" << reflen << std::endl; return 1; } } return 0; } int TestFileStreamer1(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileStream1(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileStream1( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestPDFCodec.cxx000664 001766 001770 00000001332 14517730450 030366 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmPDFCodec.h" #include "gdcmTransferSyntax.h" int TestPDFCodec(int , char *[]) { gdcm::PDFCodec c; c.CanCode(gdcm::TransferSyntax()); return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileAnonymizer4.cxx000664 001766 001770 00000012121 14517730450 032034 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileAnonymizer.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmFilename.h" #include // in-place replace checking static int TestFileAnonymize4(const char *filename, bool verbose = false) { using namespace gdcm; if( verbose ) std::cout << "Processing: " << filename << std::endl; // Create directory first: const char subdir[] = "TestFileAnonymize4"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); if( verbose ) std::cout << "Generating: " << outfilename << std::endl; const gdcm::Tag t1(0x0018,0x5100); const gdcm::Tag t2(0x0018,0x1312); const gdcm::Tag t3(0x0018,0x1313); const gdcm::Tag t4(0x0018,0x1317); //const gdcm::Tag t5(0x0008,0x2112); // SQ //const gdcm::Tag t6(0x0008,0x9215); // SQ const gdcm::Tag t7(0x0018,0x1020); const gdcm::Tag t8(0x0004,0x1130); // Test DICOMDIR ! const gdcm::Tag t9(0x0008,0x0000); // Earliest possible Data Element const gdcm::Tag t0(0xffff,0xffff); // Latest Possible Element std::vector tags; tags.push_back( t0 ); tags.push_back( t1 ); tags.push_back( t2 ); tags.push_back( t3 ); tags.push_back( t4 ); tags.push_back( t7 ); tags.push_back( t8 ); tags.push_back( t9 ); // precondition, remove the file if present: System::RemoveFile(outfilename.c_str()); { gdcm::FileAnonymizer fa; fa.SetInputFileName( filename ); fa.SetOutputFileName( outfilename.c_str() ); for( std::vector::const_iterator it = tags.begin(); it != tags.end(); ++it ) { fa.Replace( *it, "TOTO" ); } if( !fa.Write() ) { std::cerr << "Failed to write (1): " << outfilename << std::endl; return 1; } } { // Read back and check: gdcm::Reader r; r.SetFileName( outfilename.c_str() ); if( !r.Read() ) { gdcm::Filename fn( filename ); if( strcmp(fn.GetName(), "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm") == 0 || strcmp(fn.GetName(), "DMCPACS_ExplicitImplicit_BogusIOP.dcm") == 0 || strcmp(fn.GetName(), "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm") == 0 ) { return 0; } std::cerr << "Failed to read: " << outfilename << std::endl; return 1; } } { gdcm::FileAnonymizer fa; fa.SetInputFileName( outfilename.c_str() ); fa.SetOutputFileName( outfilename.c_str() ); for( std::vector::const_iterator it = tags.begin(); it != tags.end(); ++it ) { fa.Replace( *it, "TATA" ); } if( !fa.Write() ) { gdcm::Filename fn( filename ); if( strcmp(fn.GetName(), "JPEGInvalidSecondFrag.dcm") == 0 ) { } else { std::cerr << "Failed to write (2): " << outfilename << std::endl; return 1; } } } // Read back and check: gdcm::Reader r; r.SetFileName( outfilename.c_str() ); if( !r.Read() ) { std::cerr << "Failed to read (2): " << outfilename << std::endl; return 1; } const File &f = r.GetFile(); gdcm::MediaStorage ms; ms.SetFromFile( f ); const DataSet &ds = f.GetDataSet(); for( std::vector::const_iterator it = tags.begin(); it != tags.end(); ++it ) { const gdcm::Tag & t = *it; // Special handling of t8 (DICOMDIR only) const bool iserror = (ms == gdcm::MediaStorage::MediaStorageDirectoryStorage && t == t8) && false; // de-activate for now if( !ds.FindDataElement( t ) ) { if( iserror ) { std::cerr << "Not found element: " << t << " in " << outfilename << std::endl; return 1; } } const gdcm::DataElement & de = ds.GetDataElement( t ); if( de.GetVL() != 4 ) { if( iserror ) { std::cerr << "Wrong VL for: " << t << " in " << outfilename << std::endl; return 1; } } } return 0; } int TestFileAnonymizer4(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileAnonymize4(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileAnonymize4( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageHelper.cxx000664 001766 001770 00000013247 14517730450 031211 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageHelper.h" #include "gdcmMediaStorage.h" #include "gdcmDataSet.h" #include "gdcmAttribute.h" #include "gdcmDirectionCosines.h" int TestImageHelper(int, char *[]) { // gdcm::ImageHelper sh; const double pos[] = { 0,0,0, 1,1,1}; //const double answer[3] = {1,1,1}; std::vector impos(pos,pos+6); std::vector spacing; spacing.resize(3); if( !gdcm::ImageHelper::ComputeSpacingFromImagePositionPatient(impos, spacing) ) { return 1; } std::cout << spacing[0] << std::endl; std::cout << spacing[1] << std::endl; std::cout << spacing[2] << std::endl; std::vector dircos; // make it an invalid call dircos.resize(6); dircos[0] = 1; dircos[1] = 0; dircos[2] = 0; dircos[3] = 1; dircos[4] = 0; dircos[5] = 0; // Try SC { gdcm::MediaStorage ms( gdcm::MediaStorage::SecondaryCaptureImageStorage ); gdcm::DataSet ds; gdcm::DataElement de( gdcm::Tag(0x0008, 0x0016) ); const char* msstr = gdcm::MediaStorage::GetMSString(ms); de.SetByteValue( msstr, (uint32_t)strlen(msstr) ); de.SetVR( gdcm::Attribute<0x0008, 0x0016>::GetVR() ); ds.Insert( de ); // Since SC this is a no-op gdcm::ImageHelper::SetDirectionCosinesValue( ds, dircos ); // previous call removed the attribute gdcm::Tag iop(0x0020,0x0037); if( ds.FindDataElement( iop ) ) return 1; } // MR now { gdcm::MediaStorage ms( gdcm::MediaStorage::MRImageStorage ); gdcm::DataSet ds; gdcm::DataElement de( gdcm::Tag(0x0008, 0x0016) ); const char* msstr = gdcm::MediaStorage::GetMSString(ms); de.SetByteValue( msstr, (uint32_t)strlen(msstr) ); de.SetVR( gdcm::Attribute<0x0008, 0x0016>::GetVR() ); ds.Insert( de ); // Since SC this is a no-op gdcm::ImageHelper::SetDirectionCosinesValue( ds, dircos ); // previous call should not have replaced tag with default value gdcm::Tag iop(0x0020,0x0037); if( !ds.FindDataElement( iop ) ) return 1; const gdcm::DataElement &iopde = ds.GetDataElement( iop ); gdcm::Attribute<0x0020,0x0037> at; at.SetFromDataElement( iopde ); dircos.clear(); dircos.push_back( at.GetValue(0) ); dircos.push_back( at.GetValue(1) ); dircos.push_back( at.GetValue(2) ); dircos.push_back( at.GetValue(3) ); dircos.push_back( at.GetValue(4) ); dircos.push_back( at.GetValue(5) ); gdcm::DirectionCosines dc( dircos.data() ); if (!dc.IsValid()) return 1; if ( (at.GetValue(0) != 1) || (at.GetValue(1) != 0) || (at.GetValue(2) != 0) || (at.GetValue(3) != 0) || (at.GetValue(4) != 1) || (at.GetValue(5) != 0) ) return 1; } // SC family //ms = gdcm::MediaStorage::SecondaryCaptureImageStorage; gdcm::PixelFormat pf; gdcm::PhotometricInterpretation pi = gdcm::PhotometricInterpretation::MONOCHROME2; gdcm::MediaStorage ms; ms = gdcm::ImageHelper::ComputeMediaStorageFromModality( "OT", 2 ); if( ms != gdcm::MediaStorage::SecondaryCaptureImageStorage ) { std::cerr << "SecondaryCaptureImageStorage 1" << std::endl; return 1; } ms = gdcm::ImageHelper::ComputeMediaStorageFromModality( "OT", 2, pf ); if( ms != gdcm::MediaStorage::SecondaryCaptureImageStorage ) { std::cerr << "SecondaryCaptureImageStorage 2" << std::endl; return 1; } ms = gdcm::ImageHelper::ComputeMediaStorageFromModality( "OT", 2, pf, pi ); if( ms != gdcm::MediaStorage::SecondaryCaptureImageStorage ) { std::cerr << "SecondaryCaptureImageStorage 3" << std::endl; return 1; } ms = gdcm::ImageHelper::ComputeMediaStorageFromModality( "OT", 3, pf, pi ); if( ms != gdcm::MediaStorage::MultiframeGrayscaleByteSecondaryCaptureImageStorage ) { std::cerr << "MultiframeGrayscaleByteSecondaryCaptureImageStorage" << std::endl; return 1; } pf.SetBitsAllocated( 1 ); ms = gdcm::ImageHelper::ComputeMediaStorageFromModality( "OT", 3, pf, pi ); if( ms != gdcm::MediaStorage::MultiframeSingleBitSecondaryCaptureImageStorage ) { std::cerr << "MultiframeSingleBitSecondaryCaptureImageStorage" << std::endl; return 1; } pf.SetBitsAllocated( 16 ); ms = gdcm::ImageHelper::ComputeMediaStorageFromModality( "OT", 3, pf, pi ); if( ms != gdcm::MediaStorage::MultiframeGrayscaleWordSecondaryCaptureImageStorage ) { std::cerr << "MultiframeGrayscaleWordSecondaryCaptureImageStorage" << std::endl; return 1; } pf.SetBitsAllocated( 8 ); pf.SetSamplesPerPixel( 3 ); pi = gdcm::PhotometricInterpretation::RGB; ms = gdcm::ImageHelper::ComputeMediaStorageFromModality( "OT", 3, pf, pi ); if( ms != gdcm::MediaStorage::MultiframeTrueColorSecondaryCaptureImageStorage ) { std::cerr << "MultiframeTrueColorSecondaryCaptureImageStorage" << std::endl; return 1; } ms = gdcm::ImageHelper::ComputeMediaStorageFromModality( "OT", 3, pf, pi, -1024, 1 ); if( ms != gdcm::MediaStorage::MS_END ) { std::cerr << "MultiframeTrueColorSecondaryCaptureImageStorage 2" << std::endl; return 1; } ms = gdcm::ImageHelper::ComputeMediaStorageFromModality( "OT", 3, pf, pi, 0, 2 ); if( ms != gdcm::MediaStorage::MS_END ) { std::cerr << "MultiframeTrueColorSecondaryCaptureImageStorage 3" << std::endl; return 1; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/CMakeLists.txt000664 001766 001770 00000024213 14517730450 030176 0ustar00mmalaterremmalaterre000000 000000 # Define the tests for Media Storage and File Format # MSFF set(MSFF_TEST_SRCS TestAnonymizer.cxx TestAnonymizer4.cxx TestDataSetHelper.cxx TestEquipmentManufacturer.cxx TestFileChangeTransferSyntax1.cxx TestFileChangeTransferSyntax2.cxx TestFileChangeTransferSyntax3.cxx TestFileChangeTransferSyntax4.cxx TestFileStreamer1.cxx TestFileStreamer2.cxx TestFileStreamer3.cxx TestFileStreamer4.cxx TestFileStreamer5.cxx TestFileStreamer6.cxx TestFileAnonymizer1.cxx TestFileAnonymizer2.cxx TestFileAnonymizer3.cxx TestFileAnonymizer4.cxx TestIconImageFilter.cxx #TestIconImageGenerator.cxx #TestIconImageGenerator2.cxx #TestIconImageGenerator3.cxx #TestIconImageGenerator4.cxx TestParseXPATH.cxx TestValidate.cxx TestAnonymizeEvent.cxx TestFileDerivation.cxx TestSegmentedPaletteColorLookupTable.cxx TestPNMCodec.cxx TestSpacing.cxx TestSerieHelper.cxx TestFileExplicitFilter.cxx TestImageFragmentSplitter.cxx TestTagPath.cxx TestDPath.cxx TestOrientation.cxx TestIconImage.cxx TestImageHelper.cxx TestImageToImageFilter.cxx TestImageChangeTransferSyntax1.cxx #TestImageChangePhotometricInterpretation.cxx #TestImageChangePhotometricInterpretation2.cxx # does not compile on mingw... TestImageChangeTransferSyntax2.cxx TestImageChangeTransferSyntax3.cxx TestImageChangeTransferSyntax4.cxx # see below TestImageChangeTransferSyntax6.cxx TestImageChangeTransferSyntax7.cxx TestImageApplyLookupTable.cxx TestFileDecompressLookupTable.cxx TestImageChangePlanarConfiguration.cxx TestCoder.cxx TestDecoder.cxx TestRescaler1.cxx TestRescaler2.cxx TestDumper.cxx TestDictPrinter.cxx TestApplicationEntity.cxx TestStringFilter1.cxx TestStringFilter2.cxx TestStringFilter3.cxx TestStringFilter4.cxx TestUIDGenerator.cxx TestUUIDGenerator.cxx #TestUIDGenerator3.cxx TestXMLPrinter.cxx TestPrinter1.cxx TestPrint.cxx TestSorter.cxx TestImageReader.cxx TestStreamImageReader.cxx TestImageRegionReader1.cxx TestImageRegionReader2.cxx TestImageRegionReader3.cxx #TestStreamImageWriter.cxx TestImageReaderRandomEmpty.cxx TestDirectionCosines.cxx TestImageWriter.cxx TestCodec.cxx TestPDFCodec.cxx TestRLECodec.cxx TestAudioCodec.cxx TestImage.cxx TestPhotometricInterpretation.cxx TestLookupTable.cxx TestOverlay.cxx TestOverlay3.cxx TestCurve.cxx TestCurve2.cxx TestPixelFormat.cxx TestPersonName.cxx TestImageCodec.cxx TestImageConverter.cxx TestJPEGCodec.cxx TestRAWCodec.cxx TestDICOMDIR.cxx TestWaveform.cxx TestFiducials.cxx TestEncapsulatedDocument.cxx TestSpectroscopy.cxx TestSurfaceWriter.cxx TestSurfaceWriter2.cxx ) if(GDCM_DATA_ROOT) set(MSFF_TEST_SRCS ${MSFF_TEST_SRCS} TestCleaner1.cxx TestCleaner2.cxx TestCleaner3.cxx TestCleaner4.cxx TestSplitMosaicFilter3.cxx TestStrictScanner1.cxx TestStrictScanner2_1.cxx TestStrictScanner2.cxx TestStrictScanner2_2.cxx TestScanner1.cxx TestScanner2_1.cxx TestScanner2.cxx TestScanner2_2.cxx TestImageHelper2.cxx TestPrinter2.cxx TestIPPSorter.cxx TestIPPSorter2.cxx TestIPPSorter3.cxx TestCopyDataSet.cxx TestDataElementValueAsSQ.cxx TestImageWriter2.cxx TestDICOMDIRGenerator1.cxx # Must be after TestImageChangeTransferSyntax4 TestDICOMDIRGenerator2.cxx # Must be after TestImageChangeTransferSyntax4 ) # Those tests requires that openssl be linked in: if(GDCM_USE_SYSTEM_OPENSSL) set(MSFF_TEST_SRCS ${MSFF_TEST_SRCS} TestAnonymizer2.cxx TestAnonymizer3.cxx ) endif() if(GDCM_USE_SYSTEM_JSON) set(MSFF_TEST_SRCS ${MSFF_TEST_SRCS} TestJSON1.cxx ) endif() endif() # gdcmDataExtra if(GDCM_DATA_EXTRA_ROOT) set(MSFF_TEST_SRCS ${MSFF_TEST_SRCS} TestSplitMosaicFilter.cxx TestSplitMosaicFilter2.cxx TestOverlay2.cxx TestImageRegionReader4.cxx ) endif() if(GDCM_USE_JPEGLS) set(MSFF_TEST_SRCS ${MSFF_TEST_SRCS} TestImageChangeTransferSyntax5.cxx ) endif() if(GDCM_HAVE_PTHREAD_H) set(MSFF_TEST_SRCS ${MSFF_TEST_SRCS} TestUIDGenerator2.cxx ) endif() if(GDCM_PIXEL_SPACING_DATA_ROOT) set(MSFF_TEST_SRCS ${MSFF_TEST_SRCS} TestImageReaderPixelSpacing.cxx ) endif() # Add the include paths include_directories( "${GDCM_BINARY_DIR}/Source/Common" "${GDCM_SOURCE_DIR}/Source/Common" "${GDCM_SOURCE_DIR}/Testing/Source/Data" "${GDCM_BINARY_DIR}/Testing/Source/Data" "${GDCM_SOURCE_DIR}/Source/DataStructureAndEncodingDefinition" "${GDCM_SOURCE_DIR}/Source/DataDictionary" "${GDCM_SOURCE_DIR}/Source/MediaStorageAndFileFormat" ) create_test_sourcelist(MSFFTests gdcmMSFFTests.cxx ${MSFF_TEST_SRCS} EXTRA_INCLUDE gdcmTestDriver.h ) add_executable(gdcmMSFFTests ${MSFFTests}) target_link_libraries(gdcmMSFFTests gdcmMSFF) if(GDCM_HAVE_PTHREAD_H) target_link_libraries(gdcmMSFFTests pthread) endif() # Loop over files and create executables foreach(name ${MSFF_TEST_SRCS}) get_filename_component(testname ${name} NAME_WE) add_test(NAME ${testname} COMMAND gdcmMSFFTests ${testname}) endforeach() if(GDCM_DATA_ROOT) set_tests_properties(TestDICOMDIRGenerator2 PROPERTIES WILL_FAIL ON) endif() # We can only run the dcmtk cross-checking test *only* after all the tests have run # in particular once the TestWriter is done. foreach(filename ${gdcm_data_filenames_glob}) get_filename_component(filename_name ${filename} NAME) string(REGEX MATCH ${filename_name} bad_dicom ${black_list_reader}) if(NOT bad_dicom) if(GDCM_TEST_DCMTK) if(DCMTK_DCMDUMP_EXECUTABLE) # -M : load short tags # -dc: disable correction add_test(NAME "DCMDUMP-${filename_name}" COMMAND ${DCMTK_DCMDUMP_EXECUTABLE} -M -dc "${GDCM_TEMP_DIRECTORY}/TestWriter/${filename_name}") endif() endif() endif() endforeach() # Repeat for dcdump foreach(filename ${gdcm_data_filenames_glob}) get_filename_component(filename_name ${filename} NAME) string(REGEX MATCH ${filename_name} bad_dicom ${black_list_reader}) if(NOT bad_dicom) if(GDCM_TEST_DICOM3TOOLS) if(DCDUMP_EXECUTABLE) add_test(NAME "DCDUMP-${filename_name}" COMMAND "${DCDUMP_EXECUTABLE}" "${GDCM_TEMP_DIRECTORY}/TestWriter/${filename_name}") endif() endif() endif() endforeach() # There is a new test that compress all images using the jpeg compression alg: # try to decompress them with dcmtk: file(MAKE_DIRECTORY "${GDCM_TEMP_DIRECTORY}/TestImageChangeTransferSyntax/dcmdjpeg/") foreach(filename ${gdcm_data_filenames_glob}) get_filename_component(filename_name ${filename} NAME) string(REGEX MATCH ${filename_name} bad_dicom ${black_list_reader}) if(NOT bad_dicom) if(GDCM_TEST_DCMTK) if(DCMTK_DCMDJPEG_EXECUTABLE) add_test(NAME "DCMDJPEG-${filename_name}" COMMAND ${DCMTK_DCMDJPEG_EXECUTABLE} "${GDCM_TEMP_DIRECTORY}/TestImageChangeTransferSyntax/${filename_name}" "${GDCM_TEMP_DIRECTORY}/TestImageChangeTransferSyntax/dcmdjpeg/${filename_name}") # Special handling of the DICOMDIR files: string(REGEX MATCH ${filename_name} is_dicomdir ${gdcm_data_dicomdir_filenames_glob}) if(is_dicomdir) #message("IS DICOMDIR ${filename_name}") set_tests_properties("DCMDJPEG-${filename_name}" PROPERTIES WILL_FAIL TRUE) endif() endif() endif() endif() endforeach() file(MAKE_DIRECTORY "${GDCM_TEMP_DIRECTORY}/TestImageChangeTransferSyntax3/dcmdrle/") foreach(filename ${gdcm_data_filenames_glob}) get_filename_component(filename_name ${filename} NAME) string(REGEX MATCH ${filename_name} bad_dicom ${black_list_reader}) if(NOT bad_dicom) if(GDCM_TEST_DCMTK) if(DCMTK_DCMDRLE_EXECUTABLE) add_test(NAME "DCMDRLE-${filename_name}" COMMAND ${DCMTK_DCMDRLE_EXECUTABLE} "${GDCM_TEMP_DIRECTORY}/TestImageChangeTransferSyntax3/${filename_name}" "${GDCM_TEMP_DIRECTORY}/TestImageChangeTransferSyntax3/dcmdrle/${filename_name}") # Special handling of the DICOMDIR files: string(REGEX MATCH ${filename_name} is_dicomdir ${gdcm_data_dicomdir_filenames_glob}) if(is_dicomdir) #message("IS DICOMDIR ${filename_name}") set_tests_properties("DCMDRLE-${filename_name}" PROPERTIES WILL_FAIL TRUE) endif() # endif() endif() endif() endforeach() file(MAKE_DIRECTORY "${GDCM_TEMP_DIRECTORY}/TestImageChangeTransferSyntax5/dcmdjpls/") foreach(filename ${gdcm_data_filenames_glob}) get_filename_component(filename_name ${filename} NAME) string(REGEX MATCH ${filename_name} bad_dicom ${black_list_reader}) if(NOT bad_dicom) if(GDCM_TEST_DCMTK) if(DCMTK_DCMDJPLS_EXECUTABLE) #if(EXISTS "${GDCM_TEMP_DIRECTORY}/TestImageChangeTransferSyntax5/${filename_name}") add_test(NAME "DCMDJPLS-${filename_name}" COMMAND ${DCMTK_DCMDJPLS_EXECUTABLE} "${GDCM_TEMP_DIRECTORY}/TestImageChangeTransferSyntax5/${filename_name}" "${GDCM_TEMP_DIRECTORY}/TestImageChangeTransferSyntax5/dcmdjpls/${filename_name}") # Special handling of the DICOMDIR files: string(REGEX MATCH ${filename_name} is_dicomdir ${gdcm_data_dicomdir_filenames_glob}) if(is_dicomdir) #message("IS DICOMDIR ${filename_name}") set_tests_properties("DCMDJPLS-${filename_name}" PROPERTIES WILL_FAIL TRUE) endif() #endif() # endif() endif() endif() endforeach() # Need to SET_TESTS_PROPERTIES only *after* the loop is done (test need to have been declared first) if(GDCM_TEST_DCMTK) if(GDCM_DATA_ROOT) if(DCMTK_DCMDJPLS_EXECUTABLE) # No pixel data set_tests_properties("DCMDJPLS-ELSCINT1_PMSCT_RLE1.dcm" PROPERTIES WILL_FAIL TRUE) endif() if(DCMTK_DCMDJPEG_EXECUTABLE) # No pixel data set_tests_properties("DCMDJPEG-ELSCINT1_PMSCT_RLE1.dcm" PROPERTIES WILL_FAIL TRUE) endif() if(DCMTK_DCMDRLE_EXECUTABLE) # No pixel data set_tests_properties("DCMDRLE-ELSCINT1_PMSCT_RLE1.dcm" PROPERTIES WILL_FAIL TRUE) # It is missing the very last pixel, so technically is illegal set_tests_properties("DCMDRLE-ALOKA_SSD-8-MONO2-RLE-SQ.dcm" PROPERTIES WILL_FAIL TRUE) endif() endif() endif() gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageApplyLookupTable.cxx000664 001766 001770 00000011376 14517730450 033222 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageApplyLookupTable.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmImage.h" #include "gdcmFilename.h" static const char * const lutarray[][2] = { { "d613050ca0f9c924fb5282d140281fcc", "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm" }, { "d613050ca0f9c924fb5282d140281fcc", "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm" }, { "7b8d795eaf99f1fff176c43f9cf76bfb", "NM-PAL-16-PixRep1.dcm" }, { "47715f0a5d5089268bbef6f83251a8ad", "OT-PAL-8-face.dcm" }, { "c70309b66045140b8e08c11aa319c0ab", "US-PAL-8-10x-echo.dcm" }, { "c370ca934dc910eb4b629a2fa8650b67", "gdcm-US-ALOKA-16.dcm" }, { "49ca8ad45fa7f24b0406a5a03ba8aff6", "rle16loo.dcm" }, { "964ea27345a7004325896d34b257f289", "rle16sti.dcm" }, // sentinel { nullptr, nullptr } }; int TestImageApplyLookupTableFunc(const char *filename, bool verbose = false) { gdcm::ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const gdcm::FileMetaInformation &header = reader.GetFile().GetHeader(); gdcm::MediaStorage ms = header.GetMediaStorage(); bool isImage = gdcm::MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( gdcm::Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cout << "Could not read: " << filename << std::endl; return 1; } return 0; } const gdcm::Image &image = reader.GetImage(); const gdcm::PhotometricInterpretation &pi = image.GetPhotometricInterpretation(); if( pi != gdcm::PhotometricInterpretation::PALETTE_COLOR ) { // yeah well not much I can do here... if( verbose ) { std::cout << "PhotometricInterpretation is: " << pi << " cannot apply LUT then..." << std::endl; } return 0; } gdcm::ImageApplyLookupTable lutfilt; lutfilt.SetInput( image ); bool b = lutfilt.Apply(); if( !b ) { std::cerr << "Could not apply lut: " << filename << std::endl; return 1; } // Create directory first: const char subdir[] = "TestImageApplyLookupTable"; std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { gdcm::System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = gdcm::Testing::GetTempFilename( filename, subdir ); gdcm::ImageWriter writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); writer.SetImage( lutfilt.GetOutput() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // Let's read that file back in ! gdcm::ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Failed to read back: " << outfilename << std::endl; return 1; } const gdcm::Image &img = reader2.GetImage(); unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; img.GetBuffer(buffer); gdcm::Filename fn( filename ); const char *name = fn.GetName(); unsigned int i = 0; const char *p = lutarray[i][1]; while( p != nullptr ) { if( strcmp( name, p ) == 0 ) { break; } ++i; p = lutarray[i][1]; } const char *ref = lutarray[i][0]; char digest[33] = {}; gdcm::Testing::ComputeMD5(buffer, len, digest); int res = 0; if( !ref ) { std::cerr << "Missing LUT-applied MD5 for image from: " << filename << std::endl; res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } delete[] buffer; return res; } int TestImageApplyLookupTable(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestImageApplyLookupTableFunc(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestImageApplyLookupTableFunc( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestRescaler2.cxx000664 001766 001770 00000014534 14517730450 030651 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmRescaler.h" #include #include template < typename T > struct TypeToPixelFormat; template<> struct TypeToPixelFormat { enum { Type = gdcm::PixelFormat::FLOAT64 }; }; template<> struct TypeToPixelFormat { enum { Type = gdcm::PixelFormat::FLOAT32 }; }; template<> struct TypeToPixelFormat { enum { Type = gdcm::PixelFormat::INT16 }; }; template<> struct TypeToPixelFormat { enum { Type = gdcm::PixelFormat::UINT16 }; }; template<> struct TypeToPixelFormat { enum { Type = gdcm::PixelFormat::UINT8 }; }; template<> struct TypeToPixelFormat { enum { Type = gdcm::PixelFormat::INT8 }; }; template<> struct TypeToPixelFormat { enum { Type = gdcm::PixelFormat::INT32 }; }; template bool TestRescaler2Func( const double intercept, const double slope, const unsigned short bitsallocated, const unsigned short bitsstored, const unsigned short pixelrepresentation, const bool best_fit ) { const gdcm::PixelFormat pixeltype(1,bitsallocated,bitsstored, (unsigned short)(bitsstored-1),pixelrepresentation); uint8_t ps = pixeltype.GetPixelSize(); // programmer error: if( ps != sizeof( input_pixel ) ) return false; if( pixelrepresentation ) // signed { if( std::numeric_limits::min() == 0 ) return false; } else { if( std::numeric_limits::min() != 0 ) return false; } gdcm::Rescaler r; r.SetIntercept( intercept ); r.SetSlope( slope ); r.SetPixelFormat( pixeltype ); const int64_t min = pixeltype.GetMin(); const int64_t max = pixeltype.GetMax(); gdcm::PixelFormat::ScalarType outputpt; outputpt = r.ComputeInterceptSlopePixelType(); gdcm::PixelFormat::ScalarType targetpixeltype = (gdcm::PixelFormat::ScalarType)TypeToPixelFormat::Type; if( best_fit ) { if( targetpixeltype != outputpt ) { return false; } } else { if( targetpixeltype == outputpt ) { return false; } } r.SetTargetPixelType( targetpixeltype ); r.SetUseTargetPixelType(true); std::vector values; const int nvalues = 1 << bitsstored; values.reserve( nvalues ); for( int i = 0; i < nvalues; ++i ) { //values.push_back( (input_pixel)(std::numeric_limits::min() + i) ); values.push_back( (input_pixel)(min + i) ); } std::vector output; output.resize( nvalues ); if( !r.Rescale((char*)output.data(),(char*)values.data(),nvalues * sizeof( values[0] ) ) ) return false; // get the min/max: double min2 = (double)output[0]; double max2 = (double)output[nvalues-1]; if( min2 > max2 ) return false; if( intercept == 0 && slope == 1 ) { if( min != min2 ) return false; if( max != max2 ) return false; } gdcm::Rescaler ir; ir.SetIntercept( intercept ); ir.SetSlope( slope ); ir.SetPixelFormat( targetpixeltype ); ir.SetMinMaxForPixelType( min2, max2 ); const gdcm::PixelFormat pf2 = ir.ComputePixelTypeFromMinMax(); if( pf2 != pixeltype ) return false; std::vector check; check.resize( nvalues ); if( check == values ) // dummy check return false; if( !ir.InverseRescale((char*)check.data(),(char*)output.data(), nvalues * sizeof( output[0] ) ) ) return false; if( check != values ) return false; return true; } int TestRescaler2(int, char *[]) { { double intercept = 0.000061; double slope = 3.774114; // Case 1. // gdcmData/MR-MONO2-12-shoulder.dcm // (0028,0100) US 16 # 2,1 Bits Allocated // (0028,0101) US 12 # 2,1 Bits Stored // (0028,0102) US 11 # 2,1 High Bit // (0028,0103) US 0 # 2,1 Pixel Representation // [...] // (0028,1052) DS [0.000061] # 8,1 Rescale Intercept // (0028,1053) DS [3.774114] # 8,1 Rescale Slope if( !TestRescaler2Func(intercept, slope,16,12,0,true) ) return 1; // Case 2. // use float instead of default double if( !TestRescaler2Func(intercept, slope,16,12,0,false) ) return 1; } { double intercept = 0; double slope = 1; // Case 3. if( !TestRescaler2Func(intercept, slope,16,12,0,false) ) return 1; // Case 4. if( !TestRescaler2Func(intercept, slope,16,12,0,false) ) return 1; // Case 5. best fit if( !TestRescaler2Func(intercept, slope,16,12,0,true) ) return 1; // Case 6. unsigned char: if( !TestRescaler2Func(intercept,slope,8,8,0,true) ) return 1; // Case 7. char if( !TestRescaler2Func(intercept,slope,8,7,0,false) ) return 1; } { double intercept = 0; double slope = 1; // Case 8. if( !TestRescaler2Func(intercept,slope,16,12,1,false) ) return 1; // Case 9. if( !TestRescaler2Func(intercept, slope,16,12,1,false) ) return 1; // Case 10. best fit if( !TestRescaler2Func(intercept, slope,16,12,1,true) ) return 1; // Case 11. unsigned char: if( !TestRescaler2Func(intercept,slope,8,8,1,true) ) return 1; // Case 12. char if( !TestRescaler2Func(intercept,slope,8,7,1,true) ) return 1; } { double intercept = -1024; double slope = 1; // Case 13. if( !TestRescaler2Func(intercept, slope,16,12,0,true) ) return 1; // Case 14. if( !TestRescaler2Func(intercept, slope,16,12,0,false) ) return 1; // Case 15. if( !TestRescaler2Func(intercept, slope,8,8,0,true) ) return 1; // Case 16. if( !TestRescaler2Func(intercept, slope,8,8,0,false) ) return 1; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestSurfaceWriter2.cxx000664 001766 001770 00000015777 14517730450 031710 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTesting.h" #include "gdcmSurfaceWriter.h" #include "gdcmSurfaceReader.h" #include "gdcmFileMetaInformation.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmAttribute.h" #include namespace gdcm { /** * Test surface reading and writing method. */ int TestSurfaceWriter2(const char *subdir, const char* filename) { SurfaceReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { int ret = 1; gdcm::MediaStorage ms; if( ms.SetFromFile( reader.GetFile() ) ) { if( ms == gdcm::MediaStorage::SurfaceSegmentationStorage ) { ret = 0; } } if( !ret ) { std::cerr << "Failed to read: " << filename << std::endl; std::cerr << "MediaStorage is: " << ms.GetString() << std::endl; } return !ret; } // std::cout << "success to read" << std::endl; if (reader.GetNumberOfSurfaces() < 2) { std::cerr << "File with not enough surfaces (min : 2): " << filename << std::endl; return 1; } // Modify data to test other writing/reading way SmartPointer< Segment > segment = new Segment; srand( (unsigned int)time(nullptr)); SegmentHelper::BasicCodedEntry processingAlgo("123", "TEST", "Test123"); { SegmentReader::SegmentVector segments = reader.GetSegments(); Segment::SurfaceVector tmp; SegmentReader::SegmentVector::iterator itSegments = segments.begin(); SegmentReader::SegmentVector::iterator itEndSegments = segments.end(); for (; itSegments != itEndSegments; itSegments++) { tmp = (*itSegments)->GetSurfaces(); Segment::SurfaceVector::iterator itSurfaces = tmp.begin(); Segment::SurfaceVector::iterator itEndSurfaces = tmp.end(); for (; itSurfaces != itEndSurfaces; itSurfaces++) { SmartPointer< Surface > surf = *itSurfaces; surf->SetSurfaceProcessing( true ); surf->SetSurfaceProcessingRatio( 0.42f ); surf->SetSurfaceProcessingDescription( "Test processing" ); surf->SetProcessingAlgorithm( processingAlgo ); if (surf->GetNumberOfVectors() > 0) surf->SetNumberOfVectors( 42 ); surf->SetSurfaceNumber( rand()%1000 ); segment->AddSurface(surf); } } segment->SetSegmentDescription("Surface test"); // segment.SetSurfaceCount( segment.GetSurfaces().size() ); } // Create directory first: std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); // Write file from content reader { SurfaceWriter writer; writer.SetFileName( outfilename.c_str() ); writer.AddSegment( segment ); // writer.SetNumberOfSurfaces( segment.GetSurfaces().size() ); // Set same header to write file const FileMetaInformation & header = reader.GetFile().GetHeader(); writer.GetFile().SetHeader( header ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // std::cout << "success to write" << std::endl; } SurfaceReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Failed to read again: " << outfilename << std::endl; return 1; } // std::cout << "success to read again" << std::endl; SegmentReader::SegmentVector segments2 = reader2.GetSegments(); if ( strcmp(segment->GetSegmentDescription(), segments2[0]->GetSegmentDescription()) != 0) { std::cerr << "Find different segment description"<< std::endl; return 1; } Segment::SurfaceVector surfaces2 = segments2[0]->GetSurfaces(); if ( segment->GetSurfaces().size() != surfaces2.size() ) { std::cerr << "Find different surface count"<< std::endl; return 1; } Segment::SurfaceVector::iterator itSurfaces2 = surfaces2.begin(); Segment::SurfaceVector::iterator itEndSurfaces2 = surfaces2.end(); SegmentHelper::BasicCodedEntry processingAlgo2; Segment::SurfaceVector surfaces = segment->GetSurfaces(); Segment::SurfaceVector::iterator itSurfaces = surfaces.begin(); Segment::SurfaceVector::iterator itEndSurfaces = surfaces.end(); for (; itSurfaces2 != itEndSurfaces2; itSurfaces2++) { SmartPointer< Surface > surf = *itSurfaces2; if (!surf->GetSurfaceProcessing()) { std::cerr << "Find different surface processing"<< std::endl; return 1; } if ( 0.41f > surf->GetSurfaceProcessingRatio() || surf->GetSurfaceProcessingRatio() > 0.43f) { std::cerr << "Find different surface processing ratio"<< std::endl; return 1; } String<> str; str = surf->GetSurfaceProcessingDescription(); if (str.Trim() != "Test processing") { std::cerr << "Find different surface processing description"<< std::endl; return 1; } processingAlgo2 = surf->GetProcessingAlgorithm(); str = processingAlgo2.CV; processingAlgo2.CV = str.Trim(); str = processingAlgo2.CSD; processingAlgo2.CSD = str.Trim(); str = processingAlgo2.CM; processingAlgo2.CM = str.Trim(); if (processingAlgo2.CV != processingAlgo.CV || processingAlgo2.CSD != processingAlgo.CSD || processingAlgo2.CM != processingAlgo.CM ) { std::cerr << "Find different surface processing algorithm"<< std::endl; return 1; } if (itSurfaces != itEndSurfaces) { if (surf->GetSurfaceNumber() != (*itSurfaces)->GetSurfaceNumber()) { std::cerr << "Find different surface number"<< std::endl; return 1; } if (surf->GetNumberOfVectors() > 0) { std::cerr << "Find different number of vectors"<< std::endl; return 1; } itSurfaces++; } else { std::cerr << "Find different surface organization"<< std::endl; return 1; } } return 0; } } int TestSurfaceWriter2(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestSurfaceWriter2(argv[0],filename); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestSurfaceWriter2(argv[0], filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestApplicationEntity.cxx000664 001766 001770 00000001257 14517730450 032465 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmApplicationEntity.h" int TestApplicationEntity(int, char *[]) { gdcm::ApplicationEntity ae; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestRAWCodec.cxx000664 001766 001770 00000001245 14517730450 030411 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmRAWCodec.h" int TestRAWCodec(int argc, char *argv[]) { (void)argc; (void)argv; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestPrint.cxx000664 001766 001770 00000003164 14517730450 030120 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmStringFilter.h" #include "gdcmReader.h" #include "gdcmSequenceOfItems.h" #include "gdcmTrace.h" #include "gdcmTesting.h" int TestSimplePrint(const char *filename, bool verbose = false) { gdcm::Reader r; r.SetFileName( filename ); if( !r.Read() ) { return 1; } gdcm::DataSet const& ds = r.GetFile().GetDataSet(); int ret = 0; gdcm::DataSet::ConstIterator it = ds.Begin(); std::ostringstream os; for( ; it != ds.End(); ++it) { const gdcm::DataElement &ref = *it; os << ref << std::endl; } if( verbose ) std::cout << os.str(); return ret; } int TestPrint(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestSimplePrint(filename, true); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestSimplePrint( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestCleaner3.cxx000664 001766 001770 00000011702 14517730450 030455 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmCleaner.h" #include "gdcmFilename.h" #include "gdcmReader.h" #include "gdcmSmartPointer.h" #include "gdcmSystem.h" #include "gdcmTesting.h" #include "gdcmWriter.h" namespace gdcm { static const DataSet &GetNestedDataSet(const DataSet &ds, const PrivateTag &path) { const DataElement &de = ds.GetDataElement(path); SmartPointer sqi = de.GetValueAsSQ(); assert(sqi && sqi->GetNumberOfItems() == 1); const Item &item = sqi->GetItem(1); const DataSet &subds = item.GetNestedDataSet(); return subds; } static bool IsTagIn(const DataSet &ds, const PrivateTag &path, const PrivateTag &pt) { const DataSet &subds = GetNestedDataSet(ds, path); return subds.FindDataElement(pt); } } // namespace gdcm int TestCleaner3Impl(std::string const &filename, std::string const &outfilename, bool useDPath) { using namespace gdcm; // Setup DPath DPath dpath1, dpath2; PrivateTag pt1, pt2; // This attribute is a SQ. make sure we can Empty a SQ: static const char ref1[] = "0029,e0,SPI-P-Private_ICS Release 1;4"; static const char ref2[] = "0029,00,SPI-P-Private_ICS Release 1;1"; if (useDPath) { if (!dpath1.ConstructFromString(ref1)) { return 1; } if (!dpath2.ConstructFromString(ref2)) { return 1; } } if (!pt1.ReadFromCommaSeparatedString(ref1)) { return 1; } if (!pt2.ReadFromCommaSeparatedString(ref2)) { return 1; } PrivateTag path1(0x0029, 0xf, "SPI-P-Private_ICS Release 1"); PrivateTag path2(0x0029, 0xcd, "SPI-P-Private_ICS Release 1;1"); PrivateTag path3(0x0029, 0x1b, "SPI-P-Private_ICS Release 1"); PrivateTag path4(0x0029, 0x4c, "SPI-P-Private_ICS Release 1"); // first pass { Reader reader; reader.SetFileName(filename.c_str()); if (!reader.Read()) { std::cerr << "Could not read: " << filename << std::endl; return 1; } File &file = reader.GetFile(); DataSet &ds = file.GetDataSet(); const bool b0 = IsTagIn(ds, path4, pt1); const bool b1 = IsTagIn(ds, path1, pt2); const DataSet &ds1 = GetNestedDataSet(ds, path1); const bool b2 = IsTagIn(ds1, path2, pt2); const bool b3 = IsTagIn(ds, path3, pt2); const bool b4 = IsTagIn(ds, path4, pt2); if (!b0 || !b1 || !b2 || !b3 || !b4) { std::cerr << "Test not setup correctly" << std::endl; return 1; } Cleaner cleaner; cleaner.SetFile(file); cleaner.RemoveAllGroupLength(false); if (useDPath) { if (!cleaner.Remove(dpath1)) { return 1; } if (!cleaner.Remove(dpath2)) { return 1; } } else { if (!cleaner.Remove(pt1)) { return 1; } if (!cleaner.Remove(pt2)) { return 1; } } if (!cleaner.Clean()) { return 1; } Writer writer; writer.SetFileName(outfilename.c_str()); writer.SetFile(cleaner.GetFile()); if (!writer.Write()) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } } // re-read, written out: { Reader reader; reader.SetFileName(outfilename.c_str()); if (!reader.Read()) { std::cerr << "Could not read: " << outfilename << std::endl; return 1; } File &file = reader.GetFile(); DataSet &ds = file.GetDataSet(); const bool b0 = IsTagIn(ds, path4, pt1); const bool b1 = IsTagIn(ds, path1, pt2); const DataSet &ds1 = GetNestedDataSet(ds, path1); const bool b2 = IsTagIn(ds1, path2, pt2); const bool b3 = IsTagIn(ds, path3, pt2); const bool b4 = IsTagIn(ds, path4, pt2); if (b0 || b1 || b2 || b3 || b4) { std::cerr << "At least one tag was not removed" << std::endl; return 1; } } return 0; } int TestCleaner3(int, char *[]) { using namespace gdcm; const char *directory = gdcm::Testing::GetDataRoot(); std::string sfilename = std::string(directory) + "/PhilipsInteraSeqTermInvLen.dcm"; const char *filename = sfilename.c_str(); // Create directory first: const char subdir[] = "TestCleaner3"; std::string tmpdir = Testing::GetTempDirectory(subdir); if (!System::FileIsDirectory(tmpdir.c_str())) { System::MakeDirectory(tmpdir.c_str()); } std::string outfilename = Testing::GetTempFilename(filename, subdir); int res1 = 0; // TestCleaner3Impl(filename, outfilename, true); int res2 = TestCleaner3Impl(filename, outfilename, false); return res1 + res2; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestEquipmentManufacturer.cxx000664 001766 001770 00000017125 14517730450 033352 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmEquipmentManufacturer.h" #include "gdcmFilename.h" #include "gdcmReader.h" #include "gdcmTesting.h" static int TestEquipmentManufacturerFunc(const char *filename, bool verbose = false) { if (verbose) std::cerr << "Reading: " << filename << std::endl; const gdcm::Tag pixeldata(0x7fe0, 0x0010); gdcm::Reader reader; reader.SetFileName(filename); if (!reader.ReadUpToTag(pixeldata)) { std::cerr << "TestReadError: Failed to read: " << filename << std::endl; return 1; } gdcm::File &file = reader.GetFile(); gdcm::MediaStorage ms; ms.SetFromFile(file); if (ms == gdcm::MediaStorage::MediaStorageDirectoryStorage) return 0; // skip DICOMDIR gdcm::Filename fn(filename); const char *name = fn.GetName(); // Special handling: if (strcmp(name, "OsirixFake16BitsStoredFakeSpacing.dcm") == 0 || strcmp(name, "simpleImageWithIcon.dcm") == 0 || strcmp(name, "rle16sti.dcm") == 0 || strcmp(name, "rle16loo.dcm") == 0 || strcmp(name, "gdcm-CR-DCMTK-16-NonSamplePerPix.dcm") == 0 || strcmp(name, "XA-MONO2-8-12x-catheter.dcm") == 0 || strcmp(name, "US-RGB-8-esopecho.dcm") == 0 || strcmp(name, "US-PAL-8-10x-echo.dcm") == 0 || strcmp(name, "US-MONO2-8-8x-execho.dcm") == 0 || strcmp(name, "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm") == 0 || strcmp(name, "SignedShortLosslessBug.dcm") == 0 || strcmp(name, "SC16BitsAllocated_8BitsStoredJPEG.dcm") == 0 || strcmp(name, "SC16BitsAllocated_8BitsStoredJ2K.dcm") == 0 || strcmp(name, "RadBWLossLess.dcm") == 0 || strcmp(name, "RLEDebianBug816607Orig.dcm") == 0 || strcmp(name, "DermaColorLossLess.dcm") == 0 || strcmp(name, "00191113.dcm") == 0 || strcmp(name, "test.acr") == 0 || strcmp(name, "MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm") == 0 || strcmp(name, "PICKER-16-MONO2-Nested_icon.dcm") == 0 || strcmp(name, "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm") == 0 || strcmp(name, "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm") == 0 || strcmp(name, "LIBIDO-8-ACR_NEMA-Lena_128_128.acr") == 0 || strcmp(name, "gdcm-ACR-LibIDO.acr") == 0 || strcmp(name, "libido1.0-vol.acr") == 0 || strcmp(name, "DCMTK_JPEGExt_12Bits.dcm") == 0 || strcmp(name, "DMCPACS_ExplicitImplicit_BogusIOP.dcm") == 0 || strcmp(name, "DX_J2K_0Padding.dcm") == 0 || strcmp(name, "GDCMJ2K_TextGBR.dcm") == 0 || strcmp(name, "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm") == 0 || strcmp(name, "JPEGLS_CharLS_10742.dcm") == 0 || strcmp(name, "JPEGLosslessYBR_FULL_422.dcm") == 0 || strcmp(name, "JPEGLosslessSeNonZero.dcm") == 0 || strcmp(name, "US-YBR_FULL_422-EVRLE.dcm") == 0 || strcmp(name, "LIBIDO-24-ACR_NEMA-Rectangle.dcm") == 0 || strcmp(name, "MR-Brucker-CineTagging-NonSquarePixels.dcm") == 0 || strcmp(name, "MR16BitsAllocated_8BitsStored.dcm") == 0 || strcmp(name, "NM-MONO2-16-13x-heart.dcm") == 0 || strcmp(name, "NM-PAL-16-PixRep1.dcm") == 0 || strcmp(name, "NM_Kakadu44_SOTmarkerincons.dcm") == 0 || strcmp(name, "PICKER-16-MONO2-No_DicomV3_Preamble.dcm") == 0 || strcmp(name, "OT-PAL-8-face.dcm") == 0 || strcmp(name, "TG18-CH-2k-01.dcm") == 0 // wotsit ? || strcmp(name, "HardcopyColor_YBR_RCT_J2K_PC1.dcm") == 0 // RamSoft Inc. || strncmp(name, "D_CLUNIE", 8) == 0 // D_CLUNIE* || strncmp(name, "LEADTOOLS_FLOWERS", 17) == 0 // LEADTOOLS_FLOWERS* || strncmp(name, "JDDICOM", 7) == 0 // JDDICOM* || strncmp(name, "JPEGNote", 8) == 0 // JPEGNote* || strncmp(name, "KODAK", 5) == 0 // KODAK* || strncmp(name, "DICOMDIR", 8) == 0 // DICOMDIR* || strncmp(name, "dicomdir", 8) == 0 // dicomdir* ) { if (verbose) std::cout << "skip: " << filename << std::endl; return 0; } gdcm::DataSet &ds = file.GetDataSet(); gdcm::EquipmentManufacturer::Type manufacturer = gdcm::EquipmentManufacturer::Compute(ds); if (verbose) { std::cout << "Found: " << gdcm::EquipmentManufacturer::TypeToString(manufacturer) << " -> " << manufacturer << std::endl; } if (manufacturer == gdcm::EquipmentManufacturer::UNKNOWN) { std::cerr << "Unknown: " << filename << std::endl; return 1; } ds.Remove(gdcm::Tag(0x8, 0x70)); gdcm::EquipmentManufacturer::Type manufacturer2 = gdcm::EquipmentManufacturer::Compute(ds); if (manufacturer2 == gdcm::EquipmentManufacturer::UNKNOWN) { if (strcmp(name, "gdcm-US-ALOKA-16.dcm") == 0 || strcmp(name, "US-RGB-8-epicard.dcm") == 0 || strcmp(name, "OT-MONO2-8-a7.dcm") == 0 || strcmp(name, "MR-MONO2-8-16x-heart.dcm") == 0 || strcmp(name, "MR-MONO2-16-head.dcm") == 0 || strcmp(name, "MR-MONO2-12-shoulder.dcm") == 0 || strcmp(name, "MR-MONO2-12-an2.acr") == 0 || strcmp(name, "LJPEG_BuginGDCM12.dcm") == 0 || strcmp(name, "ELSCINT1_PMSCT_RLE1.dcm") == 0 || strcmp(name, "ELSCINT1_JP2vsJ2K.dcm") == 0 || strcmp(name, "MAROTECH_CT_JP2Lossy.dcm") == 0 || strcmp(name, "ALOKA_SSD-8-MONO2-RLE-SQ.dcm") == 0 || strcmp(name, "CR-MONO1-10-chest.dcm") == 0 || strcmp(name, "CT-MONO2-12-lomb-an2.acr") == 0 || strcmp(name, "CT-MONO2-16-ankle.dcm") == 0 || strcmp(name, "CT-MONO2-8-abdo.dcm") == 0 || strcmp(name, "CT-MONO2-16-ort.dcm") == 0 || strcmp(name, "CT-MONO2-16-chest.dcm") == 0 || strcmp(name, "CT-MONO2-16-brain.dcm") == 0 || strcmp(name, "EnhancedWithIPPPerFrameIOPShared.dcm") == 0 || strcmp(name, "FUJI-10-MONO1-ACR_NEMA_2.dcm") == 0 || strcmp(name, "JPEGDefinedLengthSequenceOfFragments.dcm") == 0 || strcmp(name, "IM-0001-0066.CommandTag00.dcm") == 0 || strcmp(name, "GE_GENESIS-16-MONO2-WrongLengthItem.dcm") == 0 || strcmp(name, "MR_Spectroscopy_SIEMENS_OF.dcm") == 0 || strcmp(name, "US-IRAD-NoPreambleStartWith0005.dcm") == 0 || strcmp(name, "US-IRAD-NoPreambleStartWith0003.dcm") == 0 || strcmp(name, "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm") == 0 || strcmp(name, "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm") == 0 || strcmp(name, "fffc0000UN.dcm") == 0) { } else { std::cerr << "Unknown2: " << filename << std::endl; return 1; } } else if (manufacturer2 != manufacturer) { std::cerr << "Incompatible: " << filename << std::endl; return 1; } return 0; } int TestEquipmentManufacturer(int argc, char *argv[]) { if (argc == 2) { const char *filename = argv[1]; return TestEquipmentManufacturerFunc(filename, true); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char *const *filenames = gdcm::Testing::GetFileNames(); while ((filename = filenames[i])) { r += TestEquipmentManufacturerFunc(filename); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestAnonymizer2.cxx000664 001766 001770 00000014535 14517730450 031245 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAnonymizer.h" #include "gdcmSimpleSubjectWatcher.h" #include "gdcmFilename.h" #include "gdcmTesting.h" #include "gdcmCryptographicMessageSyntax.h" #include "gdcmCryptoFactory.h" #include "gdcmSmartPointer.h" #include "gdcmReader.h" #include "gdcmWriter.h" #include "gdcmGlobal.h" #include "gdcmSystem.h" #include // std::unique_ptr namespace gdcm { int TestAnonymize2(const char *subdir, const char *filename, bool verbose = false) { gdcm::Global& g = gdcm::Global::GetInstance(); if( !g.LoadResourcesFiles() ) { return 1; } std::string certpath = gdcm::Filename::Join(gdcm::Testing::GetSourceDirectory(), "/Testing/Source/Data/certificate.pem" ); std::string keypath = gdcm::Filename::Join(gdcm::Testing::GetSourceDirectory(), "/Testing/Source/Data/privatekey.pem" ); // Create directory first: std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } if(verbose) std::cout << "Processing: " << filename << std::endl; std::string outfilename = Testing::GetTempFilename( filename, subdir ); // Create directory first: const char subdir2[] = "TestAnonymizer2_2"; std::string tmpdir2 = Testing::GetTempDirectory( subdir2 ); if( !System::FileIsDirectory( tmpdir2.c_str() ) ) { System::MakeDirectory( tmpdir2.c_str() ); //return 1; } std::string outfilename2 = Testing::GetTempFilename( filename, subdir2 ); // Encrypt { gdcm::CryptoFactory* cryptoFactory = gdcm::CryptoFactory::GetFactoryInstance(); if (cryptoFactory == NULL) { std::cerr << "Crypto library not available" << std::endl; return 1; } std::unique_ptr cms_ptr(cryptoFactory->CreateCMSProvider()); gdcm::CryptographicMessageSyntax& cms = *cms_ptr; if( !cms.ParseCertificateFile( certpath.c_str() ) ) { std::cerr << "Could not parse cert: " << certpath << std::endl; return 1; } gdcm::SmartPointer ano = new gdcm::Anonymizer; ano->SetCryptographicMessageSyntax( &cms ); //gdcm::SimpleSubjectWatcher watcher(ano, "Anonymizer"); gdcm::Reader reader; reader.SetFileName( filename ); if( !reader.Read() ) { std::cerr << "Could not read: " << filename << std::endl; return 1; } const DataSet &ds = reader.GetFile().GetDataSet(); bool hasinstanceuid = true; if( !ds.FindDataElement( Tag(0x0008,0x0018) ) || ds.GetDataElement( Tag(0x0008,0x0018) ).IsEmpty() ) { hasinstanceuid = false; } gdcm::MediaStorage ms; ms.SetFromFile( reader.GetFile() ); ano->SetFile( reader.GetFile() ); if( !ano->BasicApplicationLevelConfidentialityProfile() ) { gdcm::Filename fn( filename ); if( strcmp(fn.GetName(), "EmptyIcon_Bug417.dcm") == 0 // not supported for now (already anonymized) || strcmp(fn.GetName(), "PET-GE-dicomwrite-PixelDataSQUNv2.dcm") == 0 // not supported for now (already anonymized) || strcmp(fn.GetName(), "HardcopyColor_YBR_RCT_J2K_PC1.dcm") == 0 // deprecated SOP Class UID ) { return 0; } if( ms != gdcm::MediaStorage::MS_END ) { std::cerr << "BasicApplicationLevelConfidentialityProfile fails for: " << filename << std::endl; return 1; } } gdcm::Writer writer; //writer.SetFileName( "/tmp/ano.dcm" ); writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); if( !writer.Write() ) { if( hasinstanceuid ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } return 0; } } // Decrypt { gdcm::CryptoFactory* cryptoFactory = gdcm::CryptoFactory::GetFactoryInstance(); if (cryptoFactory == NULL) { std::cerr << "Crypto library not available" << std::endl; return 1; } std::unique_ptr cms_ptr(cryptoFactory->CreateCMSProvider()); gdcm::CryptographicMessageSyntax& cms = *cms_ptr; if( !cms.ParseKeyFile( keypath.c_str() ) ) { std::cerr << "Could not parse key: " << keypath << std::endl; return 1; } gdcm::SmartPointer ano = new gdcm::Anonymizer; ano->SetCryptographicMessageSyntax( &cms ); //gdcm::SimpleSubjectWatcher watcher(ano, "Anonymizer"); gdcm::Reader reader; reader.SetFileName( outfilename.c_str() ); if( !reader.Read() ) { std::cerr << "Could not read: " << outfilename << std::endl; return 1; } ano->SetFile( reader.GetFile() ); if( !ano->BasicApplicationLevelConfidentialityProfile(false) ) { std::cerr << "BasicApplicationLevelConfidentialityProfile (false) fails for: " << outfilename << std::endl; return 1; } const DataSet &ds = reader.GetFile().GetDataSet(); bool hasinstanceuid = true; if( !ds.FindDataElement( Tag(0x0008,0x0018) ) || ds.GetDataElement( Tag(0x0008,0x0018) ).IsEmpty() ) { hasinstanceuid = false; } // TODO Need to compare filename to decrypted one. gdcm::Writer writer; writer.SetFileName( outfilename2.c_str() ); writer.SetFile( reader.GetFile() ); if( !writer.Write() ) { if( hasinstanceuid ) { std::cerr << "Failed to write (2): " << outfilename2 << std::endl; std::cerr << "Orig file was : " << outfilename << std::endl; return 1; } return 0; } } return 0; } } int TestAnonymizer2(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestAnonymize2(argv[0], filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestAnonymize2( argv[0], filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileStreamer3.cxx000664 001766 001770 00000010517 14517730450 031471 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileStreamer.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmFilename.h" int TestFileStream3(const char *filename, bool verbose = false) { using namespace gdcm; if( verbose ) std::cout << "Processing: " << filename << std::endl; // Create directory first: const char subdir[] = "TestFileStreamer3"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); if( verbose ) std::cout << "Generating: " << outfilename << std::endl; gdcm::Filename fn( filename ); const char *name = fn.GetName(); // Special handling: bool checktemplate = false; if( strcmp(name, "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0 || strcmp(name, "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm") == 0 || strcmp(name, "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm") == 0 ) { checktemplate = true; } gdcm::FileStreamer fs; fs.SetTemplateFileName( filename ); fs.CheckTemplateFileName( checktemplate ); fs.SetOutputFileName( outfilename.c_str() ); const gdcm::Tag t1(0x0008,0x0010); const gdcm::Tag t2(0x0010,0x0010); // Try a small buffer to find a case where existing element is larger bool b; const char buffer[] = " "; const size_t len = strlen( buffer ); // Recognition Code b = fs.StartDataElement( t1 ); if( !b ) { std::cerr << "Could not StartDataElement" << std::endl; return 1; } b = fs.AppendToDataElement( t1, buffer, len ); if( !b ) { std::cerr << "Could not AppendToDataElement (t1)" << std::endl; return 1; } b = fs.StopDataElement( t1 ); if( !b ) { std::cerr << "Could not StopDataElement" << std::endl; return 1; } // Patient's Name b = fs.StartDataElement( t2 ); if( !b ) { std::cerr << "Could not StartDataElement" << std::endl; return 1; } b = fs.AppendToDataElement( t2, buffer, len ); if( !b ) { std::cerr << "Could not AppendToDataElement" << std::endl; return 1; } b = fs.StopDataElement( t2 ); if( !b ) { std::cerr << "Could not StopDataElement" << std::endl; return 1; } // Read back and check: gdcm::Reader r; r.SetFileName( outfilename.c_str() ); if( !r.Read() ) { std::cerr << "Failed to read: " << outfilename << std::endl; return 1; } gdcm::File & f = r.GetFile(); gdcm::DataSet & ds = f.GetDataSet(); if( !ds.FindDataElement( t1 ) ) { std::cerr << "Could not find tag: " << t1 << std::endl; return 1; } { const DataElement & de = ds.GetDataElement( t1 ); const ByteValue * bv = de.GetByteValue(); if( !bv ) return 1; if( bv->GetLength() != 2 ) { std::cerr << "Wrong length: " << bv->GetLength() << std::endl; return 1; } if( memcmp( bv->GetPointer(), buffer, 2 ) != 0 ) { std::cerr << "Wrong content" << std::endl; return 1; } } { const DataElement & de = ds.GetDataElement( t2 ); const ByteValue * bv = de.GetByteValue(); if( !bv ) return 1; if( bv->GetLength() != 2 ) return 1; if( memcmp( bv->GetPointer(), buffer, 2 ) != 0 ) { std::cerr << "Wrong content" << std::endl; return 1; } } return 0; } int TestFileStreamer3(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileStream3(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileStream3( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageHelper2.cxx000664 001766 001770 00000007503 14517730450 031271 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTesting.h" #include "gdcmImageHelper.h" #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmMediaStorage.h" #include "gdcmDataSet.h" #include "gdcmAttribute.h" #include "gdcmDirectionCosines.h" /* * Let's check this is easy with GDCM to handle the new * Real World Value Mapping Sequence mechanism */ int TestImageHelper2(int, char *[]) { static const char *filenames[] = { "D_CLUNIE_MR2_JPLL.dcm", "D_CLUNIE_MR2_JPLY.dcm", "D_CLUNIE_MR2_RLE.dcm", "D_CLUNIE_MR4_JPLL.dcm", "D_CLUNIE_MR4_JPLY.dcm", "D_CLUNIE_MR4_RLE.dcm", "MR-MONO2-12-shoulder.dcm", "MR_Philips-Intera_BreaksNOSHADOW.dcm", "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm", "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm", "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm", "PHILIPS_GDCM12xBug.dcm", "PHILIPS_GDCM12xBug2.dcm", "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm", "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm", "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm", "PHILIPS_Intera-16-MONO2-Uncompress.dcm", "PhilipsInteraSeqTermInvLen.dcm", "SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm", "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm", "gdcm-MR-PHILIPS-16-Multi-Seq.dcm", "gdcm-MR-PHILIPS-16-NonSquarePixels.dcm", "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm", // need PVRG option }; const unsigned int nfiles = sizeof(filenames)/sizeof(*filenames); const char *root = gdcm::Testing::GetDataRoot(); if( !root || !*root ) { std::cerr << "root is not defined" << std::endl; return 1; } std::string sroot = root; sroot += "/"; gdcm::Trace::WarningOff(); for(unsigned int i = 0; i < nfiles; ++i) { const char * filename = filenames[i]; std::string fullpath = sroot + filename; gdcm::ImageHelper::SetForceRescaleInterceptSlope(true); gdcm::ImageReader r; r.SetFileName( fullpath.c_str() ); if( !r.Read() ) { return 1; } gdcm::ImageHelper::SetForceRescaleInterceptSlope(false); gdcm::Image & img = r.GetImage(); //std::cout << img.GetIntercept() << std::endl; //std::cout << img.GetSlope() << std::endl; // Create directory first: const char subdir[] = "TestImageHelper2"; std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { gdcm::System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = gdcm::Testing::GetTempFilename( filename, subdir ); gdcm::ImageWriter writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( r.GetFile() ); writer.SetImage( r.GetImage() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } gdcm::ImageReader r2; r2.SetFileName( outfilename.c_str() ); if( !r2.Read() ) { return 1; } gdcm::Image & img2 = r2.GetImage(); if( img.GetIntercept() != img2.GetIntercept() ) { std::cerr << img2.GetIntercept() << std::endl; return 1; } if( img.GetSlope() != img2.GetSlope() ) { std::cout << img2.GetSlope() << std::endl; return 1; } } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageConverter.cxx000664 001766 001770 00000001261 14517730450 031732 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageConverter.h" int TestImageConverter(int argc, char *argv[]) { (void)argc; (void)argv; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestDataElementValueAsSQ.cxx000664 001766 001770 00000003574 14517730450 032741 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTesting.h" #include "gdcmReader.h" #include "gdcmDataElement.h" #include "gdcmSequenceOfItems.h" int TestDataElementValueAsSQ(int , char *[]) { int ret = 0; const char *filenames[] = { "D_CLUNIE_CT1_J2KI.dcm", "PET-cardio-Multiframe-Papyrus.dcm" }; const gdcm::Tag tags[] = { gdcm::Tag(0x8,0x2112), gdcm::Tag(0x41,0x1010) }; const unsigned int nfiles = sizeof(filenames)/sizeof(*filenames); const char *root = gdcm::Testing::GetDataRoot(); if( !root || !*root ) { std::cerr << "root is not defined" << std::endl; return 1; } std::string sroot = root; //sroot += "/DISCIMG/IMAGES/"; sroot += "/"; for(unsigned int i = 0; i < nfiles; ++i) { std::string filename = sroot + filenames[i]; //std::cout << filename << std::endl; gdcm::Reader r; r.SetFileName( filename.c_str() ); if( !r.Read() ) { ret++; std::cerr << "could not read: " << filename << std::endl; } const gdcm::Tag &tag = tags[i]; gdcm::DataSet &ds = r.GetFile().GetDataSet(); const gdcm::DataElement &roicsq = ds.GetDataElement( tag ); gdcm::SmartPointer sqi = roicsq.GetValueAsSQ(); if(!sqi) { ++ret; std::cerr << "could not get SQ " << tag << " from: " << filename << std::endl; } } return ret; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestSpacing.cxx000664 001766 001770 00000002736 14517730450 030414 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSpacing.h" int TestSpacing(int argc, char *argv[]) { (void)argc; (void)argv; gdcm::Spacing s; // gdcmData/gdcm-MR-PHILIPS-16-NonSquarePixels.dcm // (0028,0030) DS [ 0.487416\0.194966] # 18,2 Pixel Spacing // 0.487416 / 0.194966 = 2.5000051290994327 // Simple case ratio 1:1 gdcm::Attribute<0x28,0x30> pixelspacing = {{0.5, 0.5}}; gdcm::Attribute<0x28,0x34> par = gdcm::Spacing::ComputePixelAspectRatioFromPixelSpacing(pixelspacing); if( par[0] != 1 || par[1] != 1 ) { std::cerr << "par[0] = " << par[0] << " par[1]=" << par[1] << std::endl; return 1; } // More complex pixelspacing[0] = 0.487416; pixelspacing[1] = 0.194966; par = gdcm::Spacing::ComputePixelAspectRatioFromPixelSpacing(pixelspacing); if( par[0] != 5 || par[1] != 2 ) { std::cerr << "par[0] = " << par[0] << " par[1]=" << par[1] << std::endl; return 1; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestSerieHelper.cxx000664 001766 001770 00000001235 14517730450 031230 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSerieHelper.h" int TestSerieHelper(int, char *[]) { gdcm::SerieHelper sh; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestSpectroscopy.cxx000664 001766 001770 00000001320 14517730450 031511 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSpectroscopy.h" int TestSpectroscopy(int argc, char *argv[]) { (void)argc; (void)argv; gdcm::Spectroscopy w; (void)w; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestLookupTable.cxx000664 001766 001770 00000001236 14517730450 031243 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmLookupTable.h" int TestLookupTable(int, char *[]) { gdcm::LookupTable lut; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestAudioCodec.cxx000664 001766 001770 00000001246 14517730450 031022 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAudioCodec.h" int TestAudioCodec(int , char *[]) { gdcm::AudioCodec c; (void)c; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestScanner1.cxx000664 001766 001770 00000015144 14517730450 030477 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmScanner.h" #include "gdcmDirectory.h" #include "gdcmSystem.h" #include "gdcmTesting.h" #include "gdcmTrace.h" // dcmdump /path/to/image/*.dcm 2>&/dev/null| grep 0020 | grep "000e\|000d" | sort | uniq // // $ find /images/ -type f -exec dcmdump -s +P 0010,0010 {} \; static int TestScannerExtra() { const char *extradataroot = gdcm::Testing::GetDataExtraRoot(); if( !extradataroot ) { return 1; } if( !gdcm::System::FileIsDirectory(extradataroot) ) { std::cerr << "No such directory: " << extradataroot << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( extradataroot, true ); // no recursion std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::Scanner s; const gdcm::Tag t1(0x0020,0x000d); // Study Instance UID const gdcm::Tag t2(0x0020,0x000e); // Series Instance UID const gdcm::Tag t3(0x0010,0x0010); // Patient's Name const gdcm::Tag t4(0x0004,0x5678); // DUMMY element const gdcm::Tag t5(0x0028,0x0010); // Rows const gdcm::Tag t6(0x0028,0x0011); // Columns s.AddTag( t1 ); s.AddTag( t2 ); s.AddTag( t3 ); s.AddTag( t4 ); s.AddTag( t5 ); s.AddTag( t6 ); bool b = s.Scan( d.GetFilenames() ); if( !b ) { std::cerr << "Scanner failed" << std::endl; return 1; } //s.Print( std::cout ); return 0; } int TestScanner1(int argc, char *argv[]) { gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); const char *directory = gdcm::Testing::GetDataRoot(); if( argc == 2 ) { directory = argv[1]; } if( !gdcm::System::FileIsDirectory(directory) ) { std::cerr << "No such directory: " << directory << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( directory ); // no recursion // d.Print( std::cout ); std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::Scanner s; const gdcm::Tag t1(0x0020,0x000d); // Study Instance UID const gdcm::Tag t2(0x0020,0x000e); // Series Instance UID const gdcm::Tag t3(0x0010,0x0010); // Patient's Name const gdcm::Tag t4(0x0004,0x5678); // DUMMY element const gdcm::Tag t5(0x0028,0x0010); // Rows const gdcm::Tag t6(0x0028,0x0011); // Columns const gdcm::Tag t7(0x0008,0x0016); // s.AddTag( t1 ); s.AddTag( t2 ); s.AddTag( t3 ); s.AddTag( t4 ); s.AddTag( t5 ); s.AddTag( t6 ); s.AddTag( t7 ); bool b = s.Scan( d.GetFilenames() ); if( !b ) { std::cerr << "Scanner failed" << std::endl; return 1; } // s.Print( std::cout ); gdcm::Directory::FilenamesType const & files = s.GetFilenames(); if( files != d.GetFilenames() ) { return 1; } int numerrors = 0; for( gdcm::Directory::FilenamesType::const_iterator it = files.begin(); it != files.end(); ++it ) { const char *filename = it->c_str(); const char* value = s.GetValue(filename, t7); const char *msstr = gdcm::Testing::GetMediaStorageFromFile(filename); if( msstr && strcmp(msstr, "1.2.840.10008.1.3.10" ) == 0 ) { // would need to check (0002,0002)... } if( value && msstr ) { if( strcmp( value, msstr ) != 0 ) { std::cerr << "Problem with file " << filename << std::endl; std::cerr << value << "/" << msstr << std::endl; ++numerrors; } } else { if ( !msstr ) { std::cerr << "Problem with file " << filename << std::endl; if( value ) std::cerr << "Value found: " << value << std::endl; ++numerrors; } } } if( numerrors ) return numerrors; // Check dummy filename: bool iskey = s.IsKey( "gdcm.rocks.invalid.name" ); if( iskey ) { std::cout << "IsKey returned: " << iskey << std::endl; return 1; } // Let's get the value for tag t1 in first file: gdcm::Scanner::MappingType const &mt = s.GetMappings(); std::string sfilename; sfilename = gdcm::Testing::GetDataRoot(); sfilename+= "/test.acr"; { //const char *filename = d.GetFilenames()[0].c_str(); const char *filename = sfilename.c_str(); // The following breaks with Papyrus file: PET-cardio-Multiframe-Papyrus.dcm unsigned int i = 0; gdcm::Scanner::MappingType::const_iterator it = mt.find(filename); assert( it != mt.end() ); while( it == mt.end() ) { ++i; if( i == d.GetFilenames().size() ) { return 1; } filename = d.GetFilenames()[i].c_str(); it = mt.find(filename); } std::cout << "Mapping for " << filename << " is :" << std::endl; const gdcm::Scanner::TagToValue &tv = it->second; //const std::string &filename = d.GetFilenames()[0]; gdcm::Scanner::TagToValue::const_iterator it2 = tv.find( t5 ); if( it2 == tv.end() || t5 != it2->first ) { std::cerr << "Could not find tag:" << t5 << std::endl; return 1; } const char * t1value = it2->second; std::cout << filename << " -> " << t1 << " = " << (*t1value ? t1value : "none" ) << std::endl; } const gdcm::Directory::FilenamesType &filenames = d.GetFilenames(); { gdcm::Directory::FilenamesType::const_iterator it = filenames.begin(); for(; it != filenames.end(); ++it) { const char *filename = it->c_str(); const gdcm::Tag &reftag = t6; const char *value = s.GetValue( filename, reftag ); if( value ) { assert( value ); std::cout << filename << " has " << reftag << " = " << value << std::endl; } else { std::cout << filename << " has " << reftag << " = no value or not DICOM" << std::endl; } } } /* { std::vector keys = s.GetKeys(); for( std::vector::const_iterator it = keys.begin(); it != keys.end(); ++it) { const char *filename = *it; const gdcm::Directory::FilenamesType::const_iterator it2 = std::find(filenames.begin(), filenames.end(), filename); if( it2 == filenames.end() ) { return 1; } if( !s.IsKey( filename ) ) { return 1; } } } */ // puposely discard gdcmDataExtra test, this is just an 'extra' test... int b2 = TestScannerExtra(); (void)b2; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileStreamer4.cxx000664 001766 001770 00000012301 14517730450 031463 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileStreamer.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmFilename.h" #include "gdcmImageRegionReader.h" #include "gdcmImageHelper.h" int TestFileStream4(const char *filename, bool verbose = false) { using namespace gdcm; // Create directory first: const char subdir[] = "TestFileStreamer4"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); gdcm::Filename fn( filename ); const char *name = fn.GetName(); // Special handling: bool checktemplate = false; if( strcmp(name, "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0 || strcmp(name, "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm") == 0 || strcmp(name, "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm") == 0 ) { checktemplate = true; } if( strcmp(name, "JPEGNote_empty.dcm" ) == 0 || strcmp(name, "JPEGNote_missing.dcm" ) == 0 ) { // cannot read dims from DICOM header... return 0; } gdcm::ImageRegionReader irr; irr.SetFileName( filename ); if( !irr.ReadInformation() ) { //std::cerr << "not an image: " << filename << std::endl; return 0; } gdcm::File & file = irr.GetFile(); std::vector dims = gdcm::ImageHelper::GetDimensionsValue(file); PixelFormat pf = gdcm::ImageHelper::GetPixelFormatValue(file); int pixsize = pf.GetPixelSize(); const size_t computedlen = dims[0] * dims[1] * dims[2] * pixsize; const FileMetaInformation &header = file.GetHeader(); const TransferSyntax &ts = header.GetDataSetTransferSyntax(); if( verbose ) { std::cout << "Processing: " << filename << std::endl; std::cout << "Generating: " << outfilename << std::endl; } std::vector vbuffer; assert( dims[0] ); vbuffer.resize( dims[0] * pixsize ); char *buffer = vbuffer.data(); const size_t len = vbuffer.size(); gdcm::FileStreamer fs; fs.ReserveDataElement( computedlen ); fs.SetTemplateFileName( filename ); fs.CheckTemplateFileName( checktemplate ); fs.SetOutputFileName( outfilename.c_str() ); const gdcm::Tag pixeldata(0x7fe0,0x0010); bool b = true; if( strcmp(name, "libido1.0-vol.acr" ) != 0 ) // use Planes instead of Number of Frames { b = fs.CheckDataElement( pixeldata ); // will be checking file size } if( !b ) { std::cerr << "Failed to CheckDataElement: " << outfilename << std::endl; return 1; } b = fs.StartDataElement( pixeldata ); if( !b ) { std::cerr << "Failed to StartDataElement: " << outfilename << std::endl; return 1; } for( unsigned int z = 0; z < dims[2]; ++z ) for( unsigned int y = 0; y < dims[1]; ++y ) { b = fs.AppendToDataElement( pixeldata, buffer, len ); if( !b ) { std::cerr << "Failed to AppendToDataElement: " << outfilename << std::endl; return 1; } } if( !fs.StopDataElement( pixeldata ) ) { if( ts.IsEncapsulated() ) { // Everything is under control return 0; } std::cerr << "Failed to StopDataElement: " << outfilename << std::endl; return 1; } // Read back and check: gdcm::Reader r; r.SetFileName( outfilename.c_str() ); if( !r.Read() ) { std::cerr << "Failed to read: " << outfilename << std::endl; return 1; } gdcm::File & f = r.GetFile(); gdcm::DataSet & ds = f.GetDataSet(); if( !ds.FindDataElement( pixeldata ) ) { std::cerr << "No pixel data: " << outfilename << std::endl; return 1; } const gdcm::DataElement & de = ds.GetDataElement( pixeldata ); const gdcm::ByteValue *bv = de.GetByteValue(); if( bv->GetLength() != computedlen ) { std::cerr << "Mismatch len: " << outfilename << " : " << bv->GetLength() << " vs " << computedlen << std::endl; return 1; } const char *p = bv->GetPointer(); const char *end = p + dims[0] * dims[1] * dims[2]; int res = 0; for( ; p != end; ++p ) { res += *p; } if( res ) { std::cerr << "Mismatch: " << outfilename << std::endl; } return res; } int TestFileStreamer4(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileStream4(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileStream4( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageCodec.cxx000664 001766 001770 00000001251 14517730450 030777 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageCodec.h" int TestImageCodec(int argc, char *argv[]) { (void)argc; (void)argv; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestStringFilter3.cxx000664 001766 001770 00000004155 14517730450 031524 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmStringFilter.h" #include "gdcmAttribute.h" #include "gdcmSmartPointer.h" // reproduce a bug with multi value binary attribute int TestStringFilter3(int , char *[]) { gdcm::SmartPointer f = new gdcm::File; gdcm::DataSet & ds = f->GetDataSet(); // (0020,0032) DS [-85.000000\ 21.600000\108.699997] # 32,3 Image Position (Patient) { gdcm::Attribute<0x20,0x32> at = {{ -85, 21.6, 108.699997 }}; gdcm::DataElement de = at.GetAsDataElement(); const gdcm::ByteValue * bv = de.GetByteValue(); const std::string ref( bv->GetPointer(), bv->GetLength() ); ds.Insert( de ); gdcm::StringFilter sf; sf.SetFile( *f ); const gdcm::Tag & t = at.GetTag(); std::string s1 = sf.ToString( t ); std::string s2 = sf.FromString(t, s1.data(), s1.size() ); std::cout << s1 << std::endl; //std::cout << s2 << std::endl; if( s2 != ref ) return 1; } // (0018,1310) US 0\256\256\0 # 8,4 Acquisition Matrix { gdcm::Attribute<0x18,0x1310> at = {{ 0, 256, 256, 0 }}; gdcm::DataElement de = at.GetAsDataElement(); const gdcm::ByteValue * bv = de.GetByteValue(); const std::string ref( bv->GetPointer(), bv->GetLength() ); ds.Insert( de ); gdcm::StringFilter sf; sf.SetFile( *f ); const gdcm::Tag & t = at.GetTag(); std::string s1 = sf.ToString( t ); std::string s2 = sf.FromString(t, s1.data(), s1.size() ); std::cout << "[" << s1 << "]" << std::endl; //std::cout << s2 << std::endl; if( s2 != ref ) return 1; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageChangeTransferSyntax2.cxx000664 001766 001770 00000013401 14517730450 034145 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageChangeTransferSyntax.h" #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmFileMetaInformation.h" #include "gdcmTesting.h" #include "gdcmByteSwap.h" #include "gdcmImageChangePlanarConfiguration.h" namespace gdcm { int TestImageChangeTransferSyntaxJ2K(const char *filename, bool verbose = false) { ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const FileMetaInformation &header = reader.GetFile().GetHeader(); MediaStorage ms = header.GetMediaStorage(); bool isImage = MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } else { // not an image give up... std::cerr << "Problem with: " << filename << " but that's ok" << std::endl; return 0; } } const gdcm::Image &image = reader.GetImage(); int pc = image.GetPlanarConfiguration(); gdcm::ImageChangeTransferSyntax change; change.SetTransferSyntax( gdcm::TransferSyntax::JPEG2000Lossless ); change.SetInput( image ); bool b = change.Change(); if( !b ) { unsigned short ba = reader.GetImage().GetPixelFormat().GetBitsAllocated(); if( ba == 12 ) { std::cerr << "fail to change, but that's ok: " << filename << std::endl; return 0; } std::cerr << "Could not change the Transfer Syntax: " << filename << std::endl; return 1; } // Create directory first: const char subdir[] = "TestImageChangeTransferSyntax2"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); ImageWriter writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); // important for palette + multiframes writer.SetImage( change.GetOutput() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // Let's read that file back in ! ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not even reread our generated file : " << outfilename << std::endl; return 1; } // Check that after decompression we still find the same thing: int res = 0; gdcm::Image img = reader2.GetImage(); // When recompressing: US-RGB-8-epicard.dcm, make sure to compute the md5 using the // same original Planar Configuration... if( (int)img.GetPlanarConfiguration() != pc ) { gdcm::ImageChangePlanarConfiguration icpc; icpc.SetInput( reader2.GetImage() ); icpc.SetPlanarConfiguration( pc ); icpc.Change(); img = icpc.GetOutput(); } //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; bool res2 = img.GetBuffer(buffer); if( !res2 ) { std::cerr << "could not get buffer: " << outfilename << std::endl; return 1; } // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: #ifdef GDCM_WORDS_BIGENDIAN if( img.GetPixelFormat().GetBitsAllocated() == 16 ) { assert( !(len % 2) ); assert( img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME1 || img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME2 ); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem( (unsigned short*)buffer, gdcm::SwapCode::LittleEndian, len/2); } #endif const char *ref = gdcm::Testing::GetMD5FromFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( !ref ) { // new regression image needs a md5 sum std::cerr << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } if(res) { std::cerr << "problem with: " << outfilename << std::endl; } if( verbose ) { std::cout << "file was written in: " << outfilename << std::endl; } delete[] buffer; return res; } } // end namespace gdcm int TestImageChangeTransferSyntax2(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestImageChangeTransferSyntaxJ2K(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestImageChangeTransferSyntaxJ2K( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestSplitMosaicFilter2.cxx000664 001766 001770 00000014055 14517730450 032504 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSplitMosaicFilter.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmAnonymizer.h" #include "gdcmPrivateTag.h" #include "gdcmCSAHeader.h" #include "gdcmElement.h" #include "gdcmDirectionCosines.h" int TestSplitMosaicFilter2(int argc, char *argv[]) { std::string filename; if( argc == 2 ) { filename = argv[1]; } else { const char *extradataroot = gdcm::Testing::GetDataExtraRoot(); if( !extradataroot ) { return 1; } if( !gdcm::System::FileIsDirectory(extradataroot) ) { std::cerr << "No such directory: " << extradataroot << std::endl; return 1; } filename = extradataroot; filename += "/gdcmSampleData/images_of_interest/MR-sonata-3D-as-Tile.dcm"; } gdcm::SplitMosaicFilter s; if( !gdcm::System::FileExists(filename.c_str()) ) { return 1; } gdcm::Reader reader; reader.SetFileName( filename.c_str() ); if( !reader.Read() ) { std::cerr << "could not read: " << filename << std::endl; return 1; } gdcm::SplitMosaicFilter filter; filter.SetFile( reader.GetFile() ); bool inverted; double slicenormal[3]; bool b = filter.ComputeMOSAICSliceNormal( slicenormal, inverted ); if( !b ) { std::cerr << "Could not ComputeMOSAICSliceNormal: " << filename << std::endl; return 1; } // SliceNormalVector is slightly less precise that sNormal: //const double refnormal[3] = {-0.08193696,0.08808136,0.99273763}; // Value as read from sNormal (sSlice) const double refnor[3] = { -0.08193693363, 0.08808135446, 0.992737636 }; const double eps = 1e-6; gdcm::DirectionCosines dc; const double dot = dc.Dot( slicenormal, refnor ); if( std::fabs( 1.0 - dot ) > eps ) { std::cerr << "Invalid ComputeMOSAICSliceNormal: " << filename << std::endl; return 1; } double slicepos[3]; b = filter.ComputeMOSAICSlicePosition( slicepos, inverted ); if( !b ) { std::cerr << "Could not ComputeMOSAICSlicePosition: " << filename << std::endl; return 1; } const double refpos[3] = { 2.24891108,-52.65585315,-26.94105767 }; for( int i = 0; i < 3; ++i ) { if( std::fabs( refpos[i] - slicepos[i] ) > eps ) { std::cerr << "Invalid ComputeMOSAICSlicePosition: " << filename << std::endl; return 1; } } gdcm::CSAHeader csa; gdcm::DataSet & ds = reader.GetFile().GetDataSet(); gdcm::MrProtocol mrprot; if( !csa.GetMrProtocol(ds, mrprot)) { std::cerr << "No MrProtocol" << filename << std::endl; return 1; } gdcm::MrProtocol::SliceArray sa; b = mrprot.GetSliceArray(sa); if( !b || sa.Slices.size() != 31 ) { return 1; } gdcm::MrProtocol::Slice & slice0 = sa.Slices[0]; gdcm::MrProtocol::Vector3 & p0 = slice0.Position; double pos0[3]; pos0[0] = p0.dSag; pos0[1] = p0.dCor; pos0[2] = p0.dTra; for( int i = 0; i < 3; ++i ) { if( std::fabs( refpos[i] - pos0[i] ) > eps ) { std::cerr << "Invalid slice0: " << filename << std::endl; return 1; } } gdcm::MrProtocol::Slice & slice1 = sa.Slices[1]; gdcm::MrProtocol::Vector3 & p1 = slice1.Position; double pos1[3]; pos1[0] = p1.dSag; pos1[1] = p1.dCor; pos1[2] = p1.dTra; double altnor[3]; for( int i = 0; i < 3; ++i ) { altnor[i] = pos1[i] - pos0[i]; } dc.Normalize( altnor ); const double dot2 = dc.Dot( altnor, refnor ); if( std::fabs( 1.0 - dot2 ) > eps ) { std::cerr << "Incompatible alt " << filename << std::endl; return 1; } for( int k = 0; k < 31; ++k ) { gdcm::MrProtocol::Slice & slice = sa.Slices[k]; gdcm::MrProtocol::Vector3 & nor = slice.Normal; double normal[3]; normal[0] = nor.dSag; normal[1] = nor.dCor; normal[2] = nor.dTra; for( int i = 0; i < 3; ++i ) { if( std::fabs( refnor[i] - normal[i] ) > eps ) { std::cerr << "Invalid normal: " << filename << std::endl; return 1; } } } gdcm::Anonymizer ano; ano.SetFile( reader.GetFile() ); const gdcm::PrivateTag &t1 = csa.GetCSAImageHeaderInfoTag(); ano.Remove( t1 ); unsigned int modims[3]; b = filter.ComputeMOSAICDimensions( modims ); if( !b ) return 1; const unsigned int ref0[3] = { 64u, 64u, 36u }; // padded with black if( modims[0] != ref0[0] || modims[1] != ref0[1] || modims[2] != ref0[2] ) { std::cerr << "Invalid ComputeMOSAICDimensions " << filename << std::endl; return 1; } // alternate code path: gdcm::PrivateTag t2 (0x0019,0x0a, "SIEMENS MR HEADER"); if( ds.FindDataElement( t2 ) ) { return 1; } else { // Create a fake one: std::string creator = ds.GetPrivateCreator( t2 ); if( !creator.empty() ) return 1; gdcm::Tag t3 (0x0019,0x10); ano.Replace( t3, t2.GetOwner() ); gdcm::Element elem; elem.SetValue( 31 ); gdcm::DataElement de = elem.GetAsDataElement(); de.SetTag( t2 ); const uint16_t el = de.GetTag().GetElement(); de.GetTag().SetElement( 0x1000 + el ); if( de.GetVR() != gdcm::VR::US ) return 1; ds.Insert( de ); creator = ds.GetPrivateCreator( de.GetTag() ); if( creator.empty() ) return 1; } b = filter.ComputeMOSAICDimensions( modims ); if( !b ) { std::cerr << "Could not ComputeMOSAICDimensions " << filename << std::endl; return 1; } const unsigned int ref[3] = { 64u, 64u, 31u }; if( modims[0] != ref[0] || modims[1] != ref[1] || modims[2] != ref[2] ) { std::cerr << "Invalid ComputeMOSAICDimensions " << filename << std::endl; return 1; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageToImageFilter.cxx000664 001766 001770 00000001261 14517730450 032456 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageToImageFilter.h" int TestImageToImageFilter(int, char *[]) { gdcm::ImageToImageFilter f; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestCleaner4.cxx000664 001766 001770 00000031027 14517730450 030460 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmCleaner.h" #include "gdcmFilename.h" #include "gdcmReader.h" #include "gdcmSmartPointer.h" #include "gdcmSystem.h" #include "gdcmTesting.h" #include "gdcmWriter.h" namespace gdcm { template static const DataSet &GetNestedDataSet(const DataSet &ds, const T &path) { const DataElement &de = ds.GetDataElement(path); SmartPointer sqi = de.GetValueAsSQ(); assert(sqi && sqi->GetNumberOfItems() == 1); const Item &item = sqi->GetItem(1); const DataSet &subds = item.GetNestedDataSet(); return subds; } template static bool IsTagIn(const DataSet &ds, const T &pt) { return ds.FindDataElement(pt); } template static bool IsTagIn(const DataSet &ds, const T1 &path, const T2 &pt) { const DataSet &subds = GetNestedDataSet(ds, path); return subds.FindDataElement(pt); } template static bool IsTagEmpty(const DataSet &ds, const T &pt) { if (!ds.FindDataElement(pt)) return false; const DataElement &de = ds.GetDataElement(pt); return de.IsEmpty(); } template static bool IsTagEmpty(const DataSet &ds, const T1 &path, const T2 &pt) { const DataSet &subds = GetNestedDataSet(ds, path); if (!subds.FindDataElement(pt)) return false; const DataElement &de = subds.GetDataElement(pt); return de.IsEmpty(); } } // namespace gdcm struct TestCleaner4Impl { virtual ~TestCleaner4Impl() = default; virtual bool check_before(gdcm::DataSet &ds) = 0; virtual bool check_after(gdcm::DataSet &ds, bool preservePatientName) = 0; int run(std::string const &filename, std::string const &outfilename, bool useDPath, bool preservePatientName = false) { using namespace gdcm; // Setup DPath DPath dpath1, dpath2; if (useDPath) { } // first pass { Reader reader; reader.SetFileName(filename.c_str()); if (!reader.Read()) { std::cerr << "Could not read: " << filename << std::endl; return 1; } File &file = reader.GetFile(); DataSet &ds = file.GetDataSet(); if (!check_before(ds)) { std::cerr << "Test not setup correctly" << std::endl; return 1; } Cleaner cleaner; cleaner.SetFile(file); cleaner.RemoveAllGroupLength(false); if (preservePatientName) { DPath dpath; dpath.ConstructFromString("\\0010,0010"); cleaner.Preserve(dpath); } if (useDPath) { if (!cleaner.Empty(dpath1)) { return 1; } } else { if (!cleaner.Empty(VR(VR::PN))) { return 1; } } if (!cleaner.Clean()) { return 1; } Writer writer; writer.SetFileName(outfilename.c_str()); writer.SetFile(cleaner.GetFile()); #if 0 gdcm::FileMetaInformation::SetSourceApplicationEntityTitle("gdcmconv"); file.GetHeader().Clear(); writer.SetCheckFileMetaInformation(true); #endif if (!writer.Write()) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } } // re-read, written out: { Reader reader; reader.SetFileName(outfilename.c_str()); if (!reader.Read()) { std::cerr << "Could not read: " << outfilename << std::endl; return 1; } File &file = reader.GetFile(); DataSet &ds = file.GetDataSet(); if (!check_after(ds, preservePatientName)) { std::cerr << "At least one tag was not empty" << std::endl; return 1; } } return 0; } }; struct TestCleaner4Impl1 : public TestCleaner4Impl { bool check_before(gdcm::DataSet &ds) override { const gdcm::Tag t1(0x0008, 0x0090); // const gdcm::Tag t2(0x0008, 0x1050); // const gdcm::Tag t3(0x0008, 0x1070); // const gdcm::Tag t4(0x0010, 0x0010); // { const bool b1 = IsTagIn(ds, t1); const bool b2 = IsTagIn(ds, t2); const bool b3 = IsTagIn(ds, t3); const bool b4 = IsTagIn(ds, t4); if (!b1 || !b2 || !b3 || !b4) { return false; } } { const bool b1 = IsTagEmpty(ds, t1); const bool b2 = IsTagEmpty(ds, t2); const bool b3 = IsTagEmpty(ds, t3); const bool b4 = IsTagEmpty(ds, t4); if (b1 || b2 || b3 || b4) { return false; } } return true; } bool check_after(gdcm::DataSet &ds, bool /*preservePatientName*/) override { const gdcm::Tag t1(0x0008, 0x0090); // const gdcm::Tag t2(0x0008, 0x1050); // const gdcm::Tag t3(0x0008, 0x1070); // const gdcm::Tag t4(0x0010, 0x0010); // const bool b1 = IsTagEmpty(ds, t1); const bool b2 = IsTagEmpty(ds, t2); const bool b3 = IsTagEmpty(ds, t3); const bool b4 = IsTagEmpty(ds, t4); if (!b1 || !b2 || !b3 || !b4) { return false; } return true; } }; struct TestCleaner4Impl2 : public TestCleaner4Impl { bool check_before(gdcm::DataSet &ds) override { const gdcm::Tag t1(0x0008, 0x0090); // PN 6 EU^^^^ const gdcm::Tag t2(0x0008, 0x1050); // PN 4 ^^^^ const gdcm::Tag t3(0x0008, 0x1060); // PN 16 DR.H.DOOLITTLER const gdcm::Tag t4(0x0008, 0x1070); // PN 4 CNA const gdcm::Tag t5(0x0010, 0x0010); // PN 16 ABCDEF^GHIJK^^MR const gdcm::Tag t6(0x0032, 0x1032); // PN 10 EMERG-UNIT { const bool b1 = IsTagIn(ds, t1); const bool b2 = IsTagIn(ds, t2); const bool b3 = IsTagIn(ds, t3); const bool b4 = IsTagIn(ds, t4); const bool b5 = IsTagIn(ds, t5); const bool b6 = IsTagIn(ds, t6); if (!b1 || !b2 || !b3 || !b4 || !b5 || !b6) { return false; } } { const bool b1 = IsTagEmpty(ds, t1); const bool b2 = IsTagEmpty(ds, t2); const bool b3 = IsTagEmpty(ds, t3); const bool b4 = IsTagEmpty(ds, t4); const bool b5 = IsTagEmpty(ds, t5); const bool b6 = IsTagEmpty(ds, t6); if (b1 || b2 || b3 || b4 || b5 || b6) { return false; } } return true; } bool check_after(gdcm::DataSet &ds, bool /*preservePatientName*/) override { const gdcm::Tag t1(0x0008, 0x0090); // PN 6 EU^^^^ const gdcm::Tag t2(0x0008, 0x1050); // PN 4 ^^^^ const gdcm::Tag t3(0x0008, 0x1060); // PN 16 DR.H.DOOLITTLER const gdcm::Tag t4(0x0008, 0x1070); // PN 4 CNA const gdcm::Tag t5(0x0010, 0x0010); // PN 16 ABCDEF^GHIJK^^MR const gdcm::Tag t6(0x0032, 0x1032); // PN 10 EMERG-UNIT const bool b1 = IsTagEmpty(ds, t1); const bool b2 = IsTagEmpty(ds, t2); const bool b3 = IsTagEmpty(ds, t3); const bool b4 = IsTagEmpty(ds, t4); const bool b5 = IsTagEmpty(ds, t5); const bool b6 = IsTagEmpty(ds, t6); if (!b1 || !b2 || !b3 || !b4 || !b5 || !b6) { return false; } return true; } }; struct TestCleaner4Impl3 : public TestCleaner4Impl { bool check_before(gdcm::DataSet &ds) override { const gdcm::Tag t1(0x0008, 0x0090); // const gdcm::Tag t2(0x0008, 0x1070); // const gdcm::Tag t3(0x0010, 0x0010); // const gdcm::PrivateTag path1(0x2001, 0x00, "Philips Imaging DD 129"); const gdcm::Tag t4(0x0070, 0x0084); // const gdcm::PrivateTag pt5(0x2005, 0x91, "Philips MR Imaging DD 004"); // { const bool b1 = IsTagIn(ds, t1); const bool b2 = IsTagIn(ds, t2); const bool b3 = IsTagIn(ds, t3); const bool b4 = IsTagIn(ds, path1, t4); const bool b5 = IsTagIn(ds, pt5); if (!b1 || !b2 || !b3 || !b4 || !b5) { return false; } } { const bool b1 = IsTagEmpty(ds, t1); const bool b2 = IsTagEmpty(ds, t2); const bool b3 = IsTagEmpty(ds, t3); const bool b4 = IsTagEmpty(ds, path1, t4); const bool b5 = IsTagEmpty(ds, pt5); if (!b1 || !b2 || b3 || b4 || !b5) { return false; } } return true; } bool check_after(gdcm::DataSet &ds, bool /*preservePatientName*/) override { const gdcm::Tag t1(0x0008, 0x0090); // const gdcm::Tag t2(0x0008, 0x1070); // const gdcm::Tag t3(0x0010, 0x0010); // const gdcm::PrivateTag path1(0x2001, 0x00, "Philips Imaging DD 129"); const gdcm::Tag t4(0x0070, 0x0084); // const gdcm::PrivateTag pt5(0x2005, 0x91, "Philips MR Imaging DD 004"); // const bool b1 = IsTagEmpty(ds, t1); const bool b2 = IsTagEmpty(ds, t2); const bool b3 = IsTagEmpty(ds, t3); const bool b4 = IsTagEmpty(ds, path1, t4); const bool b5 = IsTagEmpty(ds, pt5); if (!b1 || !b2 || !b3 || !b4 || !b5) { return false; } return true; } }; struct TestCleaner4Impl4 : public TestCleaner4Impl { bool check_before(gdcm::DataSet &ds) override { const gdcm::Tag t1(0x0008, 0x0090); // const gdcm::Tag t2(0x0008, 0x1070); // const gdcm::Tag t3(0x0010, 0x0010); // const gdcm::PrivateTag path1(0xe1, 0x39, "ELSCINT1"); const gdcm::Tag t4(0x0008, 0x0090); // const gdcm::Tag t5(0x0032, 0x1032); // { const bool b1 = IsTagIn(ds, t1); const bool b2 = IsTagIn(ds, t2); const bool b3 = IsTagIn(ds, t3); const bool b4 = IsTagIn(ds, path1, t4); const bool b5 = IsTagIn(ds, path1, t5); if (!b1 || !b2 || !b3 || !b4 || !b5) { return false; } } { const bool b1 = IsTagEmpty(ds, t1); const bool b2 = IsTagEmpty(ds, t2); const bool b3 = IsTagEmpty(ds, t3); const bool b4 = IsTagEmpty(ds, path1, t4); const bool b5 = IsTagEmpty(ds, path1, t5); if (!b1 || b2 || b3 || !b4 || !b5) { return false; } } return true; } bool check_after(gdcm::DataSet &ds, bool preservePatientName) override { const gdcm::Tag t1(0x0008, 0x0090); // const gdcm::Tag t2(0x0008, 0x1070); // const gdcm::Tag t3(0x0010, 0x0010); // const gdcm::PrivateTag path1(0xe1, 0x39, "ELSCINT1"); const gdcm::Tag t4(0x0008, 0x0090); // const gdcm::Tag t5(0x0032, 0x1032); // const bool b1 = IsTagEmpty(ds, t1); const bool b2 = IsTagEmpty(ds, t2); const bool b3 = preservePatientName ? !IsTagEmpty(ds, t3) : IsTagEmpty(ds, t3); const bool b4 = IsTagEmpty(ds, path1, t4); const bool b5 = IsTagEmpty(ds, path1, t5); if (!b1 || !b2 || !b3 || !b4 || !b5) { assert(0); return false; } return true; } }; int TestCleaner4(int, char *[]) { using namespace gdcm; const char *directory = gdcm::Testing::GetDataRoot(); std::string sfilename1 = std::string(directory) + "/GE_DLX-8-MONO2-Multiframe.dcm"; // implicit const char *filename1 = sfilename1.c_str(); std::string sfilename2 = std::string(directory) + "/JPEGInvalidSecondFrag.dcm"; // OB => PN const char *filename2 = sfilename2.c_str(); std::string sfilename3 = std::string(directory) + "/undefined_length_un_vr.dcm"; // => nested const char *filename3 = sfilename3.c_str(); std::string sfilename4 = std::string(directory) + "/MAROTECH_CT_JP2Lossy.dcm"; // => nested const char *filename4 = sfilename4.c_str(); // Create directory first: const char subdir[] = "TestCleaner4"; std::string tmpdir = Testing::GetTempDirectory(subdir); if (!System::FileIsDirectory(tmpdir.c_str())) { System::MakeDirectory(tmpdir.c_str()); } std::string outfilename1 = Testing::GetTempFilename(filename1, subdir); std::string outfilename2 = Testing::GetTempFilename(filename2, subdir); std::string outfilename3 = Testing::GetTempFilename(filename3, subdir); std::string outfilename4 = Testing::GetTempFilename(filename4, subdir); TestCleaner4Impl1 testCleaner1; TestCleaner4Impl2 testCleaner2; TestCleaner4Impl3 testCleaner3; TestCleaner4Impl4 testCleaner4; int res1 = testCleaner1.run(filename1, outfilename1, false); int res2 = testCleaner2.run(filename2, outfilename2, false); int res3 = testCleaner3.run(filename3, outfilename3, false); int res4 = testCleaner4.run(filename4, outfilename4, false, false); int res5 = testCleaner4.run(filename4, outfilename4, false, true); return res1 + res2 + res3 + res4 + res5; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestStrictScanner2.cxx000664 001766 001770 00000004054 14517730450 031667 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmStrictScanner.h" #include "gdcmDirectory.h" #include "gdcmSystem.h" #include "gdcmTesting.h" #include "gdcmTrace.h" int TestStrictScanner2(int argc, char *argv[]) { gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); const char *directory = gdcm::Testing::GetDataRoot(); std::string tmpdir = gdcm::Testing::GetTempDirectory( "TestWriter" ); directory = tmpdir.c_str(); if( argc == 2 ) { directory = argv[1]; } if( !gdcm::System::FileIsDirectory(directory) ) { std::cerr << "No such directory: " << directory << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( directory ); // no recursion std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::StrictScanner s; const gdcm::Tag t2(0x0020,0x000e); // Series Instance UID s.AddTag( t2 ); bool b = s.Scan( d.GetFilenames() ); if( !b ) { std::cerr << "Scanner failed" << std::endl; return 1; } gdcm::Directory::FilenamesType const & files = s.GetFilenames(); if( files != d.GetFilenames() ) { return 1; } const char str1[] = "1.3.12.2.1107.5.2.4.7630.20010301125744000008"; gdcm::Directory::FilenamesType fns = s.GetAllFilenamesFromTagToValue(t2, str1); // all SIEMENS_MAGNETOM-12-MONO2-FileSeq*.dcm: if( fns.size() != 4 ) return 1; const char str2[] = "1.3.12.2.1107.5.2.4.7630.2001030112574400000"; fns = s.GetAllFilenamesFromTagToValue(t2, str2); if( !fns.empty() ) return 1; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestValidate.cxx000664 001766 001770 00000001245 14517730450 030553 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmValidate.h" int TestValidate(int, char *[]) { gdcm::Validate v; v.Validation(); return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestDecoder.cxx000664 001766 001770 00000001444 14517730450 030370 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDecoder.h" namespace gdcm { class DummyDecoder : public Decoder { public: bool CanDecode(TransferSyntax const &) const override { return false; } }; } int TestDecoder(int, char *[]) { gdcm::DummyDecoder d; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageChangeTransferSyntax4.cxx000664 001766 001770 00000012770 14517730450 034157 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageChangeTransferSyntax.h" #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmFileMetaInformation.h" #include "gdcmTesting.h" #include "gdcmByteSwap.h" namespace gdcm { int TestImageChangeTransferSyntaxRAW(const char *filename, bool verbose = false) { ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const FileMetaInformation &header = reader.GetFile().GetHeader(); MediaStorage ms = header.GetMediaStorage(); bool isImage = MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } else { // not an image give up... std::cerr << "Problem with: " << filename << " but that's ok" << std::endl; return 0; } } const gdcm::Image &image = reader.GetImage(); const TransferSyntax &ts = reader.GetFile().GetHeader().GetDataSetTransferSyntax(); gdcm::ImageChangeTransferSyntax change; if( ts == gdcm::TransferSyntax::ExplicitVRLittleEndian ) { // TODO: I think that duplicate goals of TestImageWriter2 ... //change.SetTransferSyntax( gdcm::TransferSyntax::ImplicitVRLittleEndian ); change.SetTransferSyntax( gdcm::TransferSyntax::ExplicitVRLittleEndian ); } else { change.SetTransferSyntax( gdcm::TransferSyntax::ExplicitVRLittleEndian ); } change.SetInput( image ); bool b = change.Change(); if( !b ) { std::cerr << "Could not change the Transfer Syntax: " << filename << std::endl; return 1; } // Create directory first: const char subdir[] = "TestImageChangeTransferSyntax4"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); ImageWriter writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); // increase test goal writer.SetImage( change.GetOutput() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // Let's read that file back in ! ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not even reread our generated file : " << outfilename << std::endl; return 1; } // Check that after decompression we still find the same thing: int res = 0; const gdcm::Image &img = reader2.GetImage(); //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; bool res2 = img.GetBuffer(buffer); if( !res2 ) { std::cerr << "could not get buffer: " << outfilename << std::endl; return 1; } // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: #ifdef GDCM_WORDS_BIGENDIAN if( img.GetPixelFormat().GetBitsAllocated() == 16 ) { assert( !(len % 2) ); assert( img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME1 || img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME2 ); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem( (unsigned short*)buffer, gdcm::SwapCode::LittleEndian, len/2); } #endif const char *ref = gdcm::Testing::GetMD5FromFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( !ref ) { // new regression image needs a md5 sum std::cerr << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } if(res) { std::cerr << "problem with: " << outfilename << std::endl; } if( verbose ) { std::cout << "file was written in: " << outfilename << std::endl; } delete[] buffer; return res; } } // end namespace gdcm int TestImageChangeTransferSyntax4(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestImageChangeTransferSyntaxRAW(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestImageChangeTransferSyntaxRAW( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestCodec.cxx000664 001766 001770 00000001557 14517730450 030045 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmCodec.h" namespace gdcm { class DummyCodec : public Codec { public: bool CanDecode(TransferSyntax const &) const override { return false; } bool CanCode(TransferSyntax const &) const override { return false; } }; } int TestCodec(int , char *[]) { gdcm::DummyCodec c; (void)c; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestSorter.cxx000664 001766 001770 00000002533 14517730450 030301 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSorter.h" #include "gdcmTesting.h" int TestSorter(int argc, char *argv[]) { // Black box: gdcm::Directory::FilenamesType fns; gdcm::Sorter s; // No sort function and fns is empty if( !s.Sort( fns ) ) { return 1; } // White box: const char *directory = gdcm::Testing::GetDataRoot(); if( argc == 2 ) { directory = argv[1]; } gdcm::Directory d; unsigned int nfiles = d.Load( directory ); // no recursion d.Print( std::cout ); std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; /* bool b = s.Sort( d.GetFilenames() ); if( !b ) { std::cerr << "Failed to sort:" << directory << std::endl; return 1; } std::cout << "Sorting succeeded:" << std::endl; s.Print( std::cout ); */ return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestAnonymizer4.cxx000664 001766 001770 00000005533 14517730450 031245 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAnonymizer.h" #include "gdcmReader.h" #include "gdcmWriter.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmUIDGenerator.h" namespace gdcm { static int TestAnonymize(const char *subdir, const char* filename) { Reader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { return 1; } Anonymizer anonymizer; anonymizer.SetFile( reader.GetFile() ); // Setup some actions: const char empty[] = ""; const PrivateTag ptag1 = PrivateTag(0x0029,0x20,"SIEMENS MEDCOM HEADER"); const PrivateTag ptag2 = PrivateTag(0x0029,0x60,"SIEMENS MEDCOM HEADER2"); const PrivateTag ptag3 = PrivateTag(0x0029,0x10,"SIEMENS CSA HEADER"); anonymizer.Replace( ptag1 , empty ); anonymizer.Remove( ptag2 ); anonymizer.Empty( ptag3 ); anonymizer.Clear( ptag3 ); // Create directory first: std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); Writer writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); writer.SetCheckFileMetaInformation( false ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } std::cout << "Success to write: " << outfilename << std::endl; // now let's try to read it back in: Reader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not reread written file: " << outfilename << std::endl; return 1; } const DataSet & ds = reader.GetFile().GetDataSet(); //std::cout << ds << std::endl; const ByteValue *bv = ds.GetDataElement( ptag2 ).GetByteValue(); if( !bv ) { return 1; } if( bv->GetLength() != 0 ) { return 1; } return 0; } } int TestAnonymizer4(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestAnonymize(argv[0], filename); } // else int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestAnonymize( argv[0], filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestSurfaceWriter.cxx000664 001766 001770 00000006525 14517730450 031615 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTesting.h" #include "gdcmSurfaceWriter.h" #include "gdcmSurfaceReader.h" #include "gdcmFileMetaInformation.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmAttribute.h" namespace gdcm { int TestSurfaceWriter(const char *subdir, const char* filename) { SurfaceReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { int ret = 1; gdcm::MediaStorage ms; if( ms.SetFromFile( reader.GetFile() ) ) { if( ms == gdcm::MediaStorage::SurfaceSegmentationStorage ) { ret = 0; } } if( !ret ) { std::cerr << "Failed to read: " << filename << std::endl; std::cerr << "MediaStorage is: " << ms.GetString() << std::endl; } return !ret; } // Get content of filename const File & FReader = reader.GetFile(); const FileMetaInformation & fmiReader = FReader.GetHeader(); const DataSet & dsReader = FReader.GetDataSet(); // Create directory first: std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); // Write file from content reader SurfaceWriter writer; writer.SetFileName( outfilename.c_str() ); SegmentReader::SegmentVector segments = reader.GetSegments(); writer.SetSegments( segments ); writer.SetNumberOfSurfaces( reader.GetNumberOfSurfaces() ); // Set content from filename File & FWriter = writer.GetFile(); FWriter.SetHeader(fmiReader); FWriter.SetDataSet(dsReader); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // reuse the filename, since outfilename is simply the new representation // of the old filename const char * ref = Testing::GetMD5FromFile(filename); char digest[33] = {}; Testing::ComputeFileMD5(outfilename.c_str(), digest); if( ref == nullptr ) { // new regression file needs a md5 sum std::cout << "Missing md5 " << digest << " for: " << outfilename << std::endl; return 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Found " << digest << " instead of " << ref << std::endl; return 1; } return 0; } } int TestSurfaceWriter(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestSurfaceWriter(argv[0],filename); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestSurfaceWriter(argv[0], filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFiducials.cxx000664 001766 001770 00000001307 14517730450 030724 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFiducials.h" int TestFiducials(int argc, char *argv[]) { (void)argc; (void)argv; gdcm::Fiducials f; (void)f; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileAnonymizer2.cxx000664 001766 001770 00000010223 14517730450 032033 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileAnonymizer.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmFilename.h" static int TestFileAnonymize2(const char *filename, bool verbose = false) { using namespace gdcm; if( verbose ) std::cout << "Processing: " << filename << std::endl; // Create directory first: const char subdir[] = "TestFileAnonymize2"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); const gdcm::Tag t1(0x0018,0x5100); const gdcm::Tag t2(0x0018,0x1312); const gdcm::Tag t3(0x0018,0x1313); const gdcm::Tag t4(0x0018,0x1317); const gdcm::Tag t5(0x0008,0x2112); const gdcm::Tag t6(0x0008,0x9215); const gdcm::Tag t7(0x0018,0x1020); const gdcm::Tag t8(0x0004,0x1130); // Test DICOMDIR ! const gdcm::Tag t9(0x0008,0x0000); // Earliest possible Data Element const gdcm::Tag t0(0xffff,0xffff); // Latest Possible Element std::vector tags; tags.push_back( t0 ); tags.push_back( t1 ); tags.push_back( t2 ); tags.push_back( t3 ); tags.push_back( t4 ); tags.push_back( t5 ); tags.push_back( t6 ); tags.push_back( t7 ); tags.push_back( t8 ); tags.push_back( t9 ); // precondition, remove the file if present: System::RemoveFile(outfilename.c_str()); gdcm::FileAnonymizer fa; fa.SetInputFileName( filename ); fa.SetOutputFileName( outfilename.c_str() ); for( std::vector::const_iterator it = tags.begin(); it != tags.end(); ++it ) { fa.Empty( *it ); } if( !fa.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // Read back and check: gdcm::Reader r; r.SetFileName( outfilename.c_str() ); if( !r.Read() ) { gdcm::Filename fn( filename ); std::cerr << "Failed to read: " << outfilename << std::endl; if( strcmp(fn.GetName(), "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm") == 0 || strcmp(fn.GetName(), "DMCPACS_ExplicitImplicit_BogusIOP.dcm") == 0 || strcmp(fn.GetName(), "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm") == 0 ) { return 0; } return 1; } const File &f = r.GetFile(); gdcm::MediaStorage ms; ms.SetFromFile( f ); const DataSet &ds = f.GetDataSet(); for( std::vector::const_iterator it = tags.begin(); it != tags.end(); ++it ) { const gdcm::Tag & t = *it; // Special handling of t8 (DICOMDIR only) const bool iserror = (ms == gdcm::MediaStorage::MediaStorageDirectoryStorage && t == t8) && false; // de-activate for now if( !ds.FindDataElement( t ) ) { if( iserror ) { std::cerr << "Not found element: " << t << " in " << outfilename << std::endl; return 1; } } const gdcm::DataElement & de = ds.GetDataElement( t ); if( de.GetVL() != 0 ) { if( iserror ) { std::cerr << "Wrong VL for: " << t << " in " << outfilename << std::endl; return 1; } } } return 0; } int TestFileAnonymizer2(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileAnonymize2(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileAnonymize2( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageReader.cxx000664 001766 001770 00000011546 14517730450 031174 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageReader.h" #include "gdcmFileMetaInformation.h" #include "gdcmSystem.h" #include "gdcmFilename.h" #include "gdcmByteSwap.h" #include "gdcmTrace.h" #include "gdcmTesting.h" int TestImageRead(const char* filename, bool verbose = false, bool lossydump = false) { if( verbose ) std::cerr << "Reading: " << filename << std::endl; gdcm::ImageReader reader; reader.SetFileName( filename ); if ( reader.Read() ) { int res = 0; const gdcm::Image &img = reader.GetImage(); //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); if ( lossydump ) { int lossy = img.IsLossy(); std::cout << lossy << "," << filename << std::endl; } int reflossy = gdcm::Testing::GetLossyFlagFromFile( filename ); if( reflossy == -1 ) { std::cerr << "Missing lossy flag for: " << filename << std::endl; return 1; } if( img.IsLossy() != (reflossy > 0 ? true : false) )//vs10 has a stupid bool/int cast warning { std::cerr << "Inconsistency for lossy flag for: " << filename << std::endl; return 1; } char* buffer = new char[len]; bool res2 = img.GetBuffer(buffer); if( !res2 ) { std::cerr << "res2 failure: " << filename << std::endl; return 1; } // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: #ifdef GDCM_WORDS_BIGENDIAN if( img.GetPixelFormat().GetBitsAllocated() == 16 ) { assert( !(len % 2) ); // gdcm-US-ALOKA is a 16 bits image with PALETTE //assert( img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME1 // || img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME2 ); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem( (unsigned short*)buffer, gdcm::SwapCode::LittleEndian, len/2); } #endif const char *ref = gdcm::Testing::GetMD5FromFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( verbose ) { std::cout << "ref=" << ref << std::endl; std::cout << "md5=" << digest << std::endl; } if( !ref ) { // new regression image needs a md5 sum std::cout << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; #if 0 std::ofstream debug("/tmp/dump.gray",std::ios::binary); debug.write(buffer, len); debug.close(); //assert(0); #endif } delete[] buffer; return res; } const gdcm::FileMetaInformation &header = reader.GetFile().GetHeader(); gdcm::MediaStorage ms = header.GetMediaStorage(); bool isImage = gdcm::MediaStorage::IsImage( ms ); if( isImage ) { if( reader.GetFile().GetDataSet().FindDataElement( gdcm::Tag(0x7fe0,0x0010) ) ) { std::cerr << "Failed to read image from file: " << filename << std::endl; return 1; } else { std::cerr << "no Pixel Data Element found in the file:" << filename << std::endl; return 0; } } // else // well this is not an image, so thankfully we fail to read it std::cerr << "Could not read image(" << filename << "), since file is a: " << ms << std::endl; //assert( ms != gdcm::MediaStorage::MS_END ); return 0; } int TestImageReader(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestImageRead(filename, true); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestImageRead( filename); //r += TestImageRead( filename, false, true ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestAnonymizer3.cxx000664 001766 001770 00000017032 14517730450 031241 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAnonymizer.h" #include "gdcmSimpleSubjectWatcher.h" #include "gdcmUIDGenerator.h" #include "gdcmFilename.h" #include "gdcmTesting.h" #include "gdcmCryptographicMessageSyntax.h" #include "gdcmSmartPointer.h" #include "gdcmReader.h" #include "gdcmWriter.h" #include "gdcmGlobal.h" #include "gdcmFileDerivation.h" #include "gdcmSystem.h" #include "gdcmCryptoFactory.h" #include // std::unique_ptr int TestAnonymizer3(int , char *[]) { using namespace gdcm; gdcm::Global& g = gdcm::Global::GetInstance(); if( !g.LoadResourcesFiles() ) { return 1; } const char *directory = gdcm::Testing::GetDataRoot(); std::string sfilename = std::string(directory) + "/012345.002.050.dcm"; const char *filename = sfilename.c_str(); std::string certpath = gdcm::Filename::Join(gdcm::Testing::GetSourceDirectory(), "/Testing/Source/Data/certificate.pem" ); std::string keypath = gdcm::Filename::Join(gdcm::Testing::GetSourceDirectory(), "/Testing/Source/Data/privatekey.pem" ); // Create directory first: const char subdir[] = "TestAnonymizer3"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); std::string outfilenamelossy = Testing::GetTempFilename( "012345.002.050.lossy.dcm" , subdir ); std::string outfilenamelossy2 = Testing::GetTempFilename( "012345.002.050.lossy.anon.dcm" , subdir ); // Derive { gdcm::Reader reader; reader.SetFileName( filename ); if( !reader.Read() ) { std::cerr << "Could not read: " << filename << std::endl; return 1; } File& file = reader.GetFile(); DataSet &ds = file.GetDataSet(); DataElement instanceuid = ds.GetDataElement( Tag(0x8,0x18) ); UIDGenerator uid; const char *s = uid.Generate(); instanceuid.SetByteValue( s, (uint32_t)strlen(s) ); ds.Replace( instanceuid ); FileDerivation fd; fd.SetFile( file ); // FIXME hardcoded: fd.AddReference( "1.2.840.10008.5.1.4.1.1.4", "1.2.840.113619.2.5.1762386977.1328.985934491.693" ); // CID 7202 Source Image Purposes of Reference // {"DCM",121320,"Uncompressed predecessor"}, fd.SetPurposeOfReferenceCodeSequenceCodeValue( 121320 ); // CID 7203 Image Derivation // { "DCM",113040,"Lossy Compression" }, fd.SetDerivationCodeSequenceCodeValue( 113040 ); fd.SetDerivationDescription( "lossy conversion" ); if( !fd.Derive() ) { std::cerr << "Sorry could not derive using input info" << std::endl; return 1; } gdcm::Writer writer; writer.SetFileName( outfilenamelossy.c_str() ); writer.SetFile( fd.GetFile() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilenamelossy << std::endl; return 1; } } // Encrypt { gdcm::CryptoFactory* cryptoFactory = gdcm::CryptoFactory::GetFactoryInstance(); if (cryptoFactory == NULL) { std::cerr << "Crypto library not available" << std::endl; return 1; } std::unique_ptr cms_ptr(cryptoFactory->CreateCMSProvider()); gdcm::CryptographicMessageSyntax& cms = *cms_ptr; if( !cms.ParseCertificateFile( certpath.c_str() ) ) { return 1; } gdcm::SmartPointer ano = new gdcm::Anonymizer; ano->SetCryptographicMessageSyntax( &cms ); { // original file gdcm::Reader reader; reader.SetFileName( filename ); if( !reader.Read() ) { std::cerr << "Could not read: " << filename << std::endl; return 1; } // order of operation is important ano->SetFile( reader.GetFile() ); if( !ano->BasicApplicationLevelConfidentialityProfile() ) { return 1; } gdcm::Writer writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } } { // derived file gdcm::Reader reader; reader.SetFileName( outfilenamelossy.c_str() ); if( !reader.Read() ) { std::cerr << "Could not read: " << outfilenamelossy << std::endl; return 1; } // order of operation is important ano->SetFile( reader.GetFile() ); if( !ano->BasicApplicationLevelConfidentialityProfile() ) { return 1; } gdcm::Writer writer; writer.SetFileName( outfilenamelossy2.c_str() ); writer.SetFile( reader.GetFile() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilenamelossy2 << std::endl; return 1; } } } // Make sure UID is consistent: { std::string sopinstanceuid_str1; { // original anonymized file gdcm::Reader reader; reader.SetFileName( outfilename.c_str() ); if( !reader.Read() ) { std::cerr << "Could not read: " << filename << std::endl; return 1; } File &file = reader.GetFile(); DataSet &ds = file.GetDataSet(); if( !ds.FindDataElement( Tag(0x0008,0x0018) ) || ds.GetDataElement( Tag(0x0008,0x0018) ).IsEmpty() ) { return 1; } const DataElement &sopinstanceuid = ds.GetDataElement( Tag(0x0008,0x0018) ); sopinstanceuid_str1 = std::string( sopinstanceuid.GetByteValue()->GetPointer(), sopinstanceuid.GetByteValue()->GetLength() ); } std::string sopinstanceuid_str2; std::string refsopinstanceuid_str2; { // derived anonymized file gdcm::Reader reader; reader.SetFileName( outfilenamelossy2.c_str() ); if( !reader.Read() ) { std::cerr << "Could not read: " << outfilenamelossy << std::endl; return 1; } File &file = reader.GetFile(); DataSet &ds = file.GetDataSet(); if( !ds.FindDataElement( Tag(0x0008,0x0018) ) || ds.GetDataElement( Tag(0x0008,0x0018) ).IsEmpty() ) { return 1; } const DataElement &sopinstanceuid = ds.GetDataElement( Tag(0x0008,0x0018) ); sopinstanceuid_str2 = std::string( sopinstanceuid.GetByteValue()->GetPointer(), sopinstanceuid.GetByteValue()->GetLength() ); // Source Image Sequence if( !ds.FindDataElement( Tag(0x0008,0x2112) ) || ds.GetDataElement( Tag(0x0008,0x2112) ).IsEmpty() ) { return 1; } const DataElement &sourceimagesq = ds.GetDataElement( Tag(0x0008,0x2112) ); SmartPointer sq = sourceimagesq.GetValueAsSQ(); gdcm::SequenceOfItems::SizeType n = sq->GetNumberOfItems(); if( n != 1 ) return 1; Item &item = sq->GetItem( 1 ); DataSet &nested = item.GetNestedDataSet(); if( !nested.FindDataElement( Tag(0x0008,0x1155) ) || nested.GetDataElement( Tag(0x0008,0x1155) ).IsEmpty() ) { return 1; } const DataElement &refsopinstanceuid = nested.GetDataElement( Tag(0x0008,0x1155) ); refsopinstanceuid_str2 = std::string( refsopinstanceuid.GetByteValue()->GetPointer(), refsopinstanceuid.GetByteValue()->GetLength() ); } std::cout << sopinstanceuid_str1 << std::endl; std::cout << sopinstanceuid_str2 << std::endl; std::cout << refsopinstanceuid_str2 << std::endl; if( sopinstanceuid_str1 == sopinstanceuid_str2 ) { return 1; } if( sopinstanceuid_str1 != refsopinstanceuid_str2 ) { return 1; } } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestSplitMosaicFilter.cxx000664 001766 001770 00000010034 14517730450 032413 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSplitMosaicFilter.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmImageReader.h" static bool reorganize_mosaic_invert(unsigned short *input, const unsigned int *inputdims, unsigned int square, const unsigned int *outputdims, const unsigned short *output ) { for(unsigned x = 0; x < outputdims[0]; ++x) { for(unsigned y = 0; y < outputdims[1]; ++y) { for(unsigned z = 0; z < outputdims[2]; ++z) { size_t outputidx = x + y*outputdims[0] + z*outputdims[0]*outputdims[1]; size_t inputidx = (x + (z%square)*outputdims[0]) + (y + (z/square)*outputdims[1])*inputdims[0]; input[ inputidx ] = output[ outputidx ]; } } } return true; } int TestSplitMosaicFilter(int argc, char *argv[]) { std::string filename; if( argc == 2 ) { filename = argv[1]; } else { const char *extradataroot = gdcm::Testing::GetDataExtraRoot(); if( !extradataroot ) { return 1; } if( !gdcm::System::FileIsDirectory(extradataroot) ) { std::cerr << "No such directory: " << extradataroot << std::endl; return 1; } filename = extradataroot; filename += "/gdcmSampleData/images_of_interest/MR-sonata-3D-as-Tile.dcm"; } gdcm::SplitMosaicFilter s; // std::cout << filename << std::endl; if( !gdcm::System::FileExists(filename.c_str()) ) { return 1; } gdcm::ImageReader reader; reader.SetFileName( filename.c_str() ); if( !reader.Read() ) { std::cerr << "could not read: " << filename << std::endl; return 1; } const gdcm::Image &image = reader.GetImage(); unsigned int inputdims[3] = { 0, 0, 1 }; const unsigned int *dims = image.GetDimensions(); inputdims[0] = dims[0]; inputdims[1] = dims[1]; gdcm::SplitMosaicFilter filter; filter.SetImage( reader.GetImage() ); filter.SetFile( reader.GetFile() ); bool b = filter.Split(); if( !b ) { std::cerr << "Could not split << " << filename << std::endl; return 1; } unsigned int modims[3]; b = filter.ComputeMOSAICDimensions( modims ); if( !b ) { std::cerr << "Could not ComputeMOSAICDimensions << " << filename << std::endl; return 1; } const unsigned int ref[3] = { 64u, 64u, 31u }; if( modims[0] != ref[0] || modims[1] != ref[1] || modims[2] != ref[2] ) { std::cerr << "Invalid ComputeMOSAICDimensions << " << filename << std::endl; return 1; } // const gdcm::Image &image = filter.GetImage(); unsigned long l = image.GetBufferLength(); std::vector buf; buf.resize(l); if( !image.GetBuffer( &buf[0] ) ) { std::cerr << "Could not GetBuffer << " << filename << std::endl; return 1; } std::vector outbuf; unsigned long ll = inputdims[0] * inputdims[1] * sizeof( unsigned short ); outbuf.resize(ll); const unsigned int *mos_dims = image.GetDimensions(); unsigned int div = (unsigned int )ceil(sqrt( (double)mos_dims[2]) ); reorganize_mosaic_invert((unsigned short *)&outbuf[0], inputdims, div, mos_dims, (const unsigned short*)&buf[0] ); #if 0 std::ofstream o( "/tmp/debug", std::ios::binary ); o.write( &outbuf[0], ll ); o.close(); #endif char digest[33]; gdcm::Testing::ComputeMD5(&outbuf[0], ll, digest); // $ gdcminfo --md5sum gdcmSampleData/images_of_interest/MR-sonata-3D-as-Tile.dcm if( strcmp(digest, "be96c01db8a0ec0753bd43f6a985345c" ) != 0 ) { std::cerr << "Problem found: " << digest << std::endl; return 1; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestRescaler1.cxx000664 001766 001770 00000010675 14517730450 030652 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmRescaler.h" #include #include // atof static bool check_roundtrip(const gdcm::PixelFormat & pf ) { gdcm::Rescaler r; r.SetIntercept( 0. ); r.SetSlope( 1. ); r.SetPixelFormat( pf ); r.SetMinMaxForPixelType((double)pf.GetMin(),(double)pf.GetMax()); const gdcm::PixelFormat outputpt = r.ComputePixelTypeFromMinMax(); if( outputpt != pf ) return false; return true; } int TestRescaler1(int, char *[]) { gdcm::Rescaler ir; /* gdcmData/MR-MONO2-12-shoulder.dcm (gdb) p intercept $1 = 6.0999999999999999e-05 (gdb) p slope $2 = 3.774114 (gdb) p in[i] $3 = 3.77417493 ... p (in[i] - intercept)/slope $7 = 0.99999998109891775 $10 = {Intercept = 6.0999999999999999e-05, Slope = 3.774114, PF = {SamplesPerPixel = 1, BitsAllocated = 32, BitsStored = 32, HighBit = 31, PixelRepresentation = 3}, ScalarRangeMin = 6.0999998822808266e-05, ScalarRangeMax = 247336.561051} */ // (0028,1052) DS [0.000061] # 8, 1 RescaleIntercept // (0028,1053) DS [3.774114] # 8, 1 RescaleSlope const double intercept = atof( "0.000061" ); const double slope = atof( "3.774114" ); ir.SetIntercept( intercept ); ir.SetSlope( slope ); ir.SetPixelFormat( gdcm::PixelFormat::FLOAT64 ); const double smin = 6.0999998822808266e-05; const double smax = 247336.561051; ir.SetMinMaxForPixelType( smin, smax ); double outref[] = { 0 }; { char *copy = (char*)outref; const uint16_t in[] = { 1 }; const char *tempimage = (const char*)in; size_t vtklen = sizeof(in); ir.SetPixelFormat( gdcm::PixelFormat::UINT16 ); bool b = ir.Rescale(copy,tempimage,vtklen); if( !b ) return 1; std::cout << outref[0] << std::endl; } ir.SetPixelFormat( gdcm::PixelFormat::FLOAT64 ); uint16_t out[] = { 0 }; char *copy = (char*)out; //const double in[] = { 3.77417493 }; const double in[] = { 3.774175 }; if( outref[0] != in[0] ) { std::cerr << "Wrong input/output:" << std::endl; std::cerr << outref[0] << " vs " << in[0] << std::endl; std::cerr << (outref[0] - in[0]) << std::endl; return 1; } const char *tempimage = (const char*)in; size_t vtklen = sizeof(in); ir.InverseRescale(copy,tempimage,vtklen); std::cout << out[0] << std::endl; if( out[0] != 1 ) { return 1; } // Let's make sure that rescaler works in the simplest case // it should be idempotent: { gdcm::PixelFormat pixeltype = gdcm::PixelFormat::INT16; gdcm::Rescaler r; r.SetIntercept( 0.0 ); r.SetSlope( 1.0 ); r.SetPixelFormat( pixeltype ); gdcm::PixelFormat::ScalarType outputpt; outputpt = r.ComputeInterceptSlopePixelType(); if( outputpt != pixeltype ) { return 1; } if( ! (outputpt == pixeltype) ) { return 1; } } { gdcm::PixelFormat::ScalarType outputpt ; double shift = -1024; double scale = 1; // gdcmData/CT-MONO2-16-ort.dcm gdcm::PixelFormat pixeltype( 1, 16, 16, 15, 1 ); gdcm::Rescaler r; r.SetIntercept( shift ); r.SetSlope( scale ); r.SetPixelFormat( pixeltype ); outputpt = r.ComputeInterceptSlopePixelType(); // min,max = [-33792, 31743] // we need at least int32 to store that if( outputpt != gdcm::PixelFormat::INT32 ) { return 1; } // let's pretend image is really the full range: // FIXME: I think it is ok to compute this way since shift is double anyway: r.SetMinMaxForPixelType(std::numeric_limits::min() + shift,std::numeric_limits::max() + shift ); gdcm::PixelFormat pf2 = r.ComputePixelTypeFromMinMax(); if( pf2 != pixeltype ) { return 1; } } // ComputePixelTypeFromMinMax() { if( !check_roundtrip(gdcm::PixelFormat(1,16,12,11,0) ) ) return 1; if( !check_roundtrip(gdcm::PixelFormat(1,16,12,11,1) ) ) return 1; if( !check_roundtrip(gdcm::PixelFormat(1,8,8,7,0) ) ) return 1; if( !check_roundtrip(gdcm::PixelFormat(1,8,8,7,1) ) ) return 1; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileChangeTransferSyntax3.cxx000664 001766 001770 00000016147 14517730450 034015 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileChangeTransferSyntax.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmImageReader.h" #include "gdcmFilename.h" #include "gdcmImageChangePlanarConfiguration.h" #include "gdcmByteSwap.h" static int TestFileChangeTransferSyntax3Func(const char *filename, bool verbose = false) { using namespace gdcm; if( verbose ) std::cout << "Processing: " << filename << std::endl; // Create directory first: const char subdir[] = "TestFileChangeTransferSyntax3"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); if( verbose ) std::cout << "Generating: " << outfilename << std::endl; const gdcm::TransferSyntax ts( TransferSyntax::JPEG2000Lossless ); gdcm::FileChangeTransferSyntax fcts; fcts.SetTransferSyntax( ts ); fcts.SetInputFileName( filename ); fcts.SetOutputFileName( outfilename.c_str() ); ImageCodec *ic = fcts.GetCodec(); if( !ic ) { return 1; } if( !fcts.Change() ) { gdcm::Reader reader; reader.SetFileName( filename ); if( !reader.Read() ) { std::cerr << "not dicom" << std::endl; return 1; } const gdcm::File & file = reader.GetFile(); const gdcm::FileMetaInformation & fmi = file.GetHeader(); const TransferSyntax &tsref = fmi.GetDataSetTransferSyntax(); if( tsref.IsEncapsulated() ) { if( verbose ) std::cout << "Will not generate (encaps): " << outfilename << std::endl; return 0; } gdcm::Filename fn( filename ); const char *name = fn.GetName(); // Special handling: if( strcmp(name, "CT-MONO2-12-lomb-an2.acr" ) == 0 || strcmp(name, "LIBIDO-8-ACR_NEMA-Lena_128_128.acr") == 0 || strcmp(name, "gdcm-ACR-LibIDO.acr") == 0 || strcmp(name, "gdcm-MR-SIEMENS-16-2.acr") == 0 || strcmp(name, "libido1.0-vol.acr") == 0 || strcmp(name, "test.acr") == 0 || strcmp(name, "LIBIDO-24-ACR_NEMA-Rectangle.dcm") == 0 || strcmp(name, "MR_Spectroscopy_SIEMENS_OF.dcm") == 0 // not an image || strcmp(name, "ELSCINT1_PMSCT_RLE1.dcm") == 0 || strcmp(name, "ELSCINT1_PMSCT_RLE1_priv.dcm") == 0 || strcmp(name, "gdcm-CR-DCMTK-16-NonSamplePerPix.dcm") == 0 || strcmp(name, "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm") == 0 || strcmp(name, "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm") == 0 // Implicit VR Big Endian DLX (G.E Private) || strcmp(name, "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm") == 0 // Explicit VR Big Endian || strcmp(name, "US-RGB-8-epicard.dcm") == 0 // Explicit VR Big Endian || strcmp(name, "GE_DLX-8-MONO2-PrivateSyntax.dcm") == 0 // Implicit VR Big Endian DLX (G.E Private) || strcmp(name, "GE_CT_With_Private_compressed-icon.dcm") == 0 // Explicit VR Big Endian || strcmp(name, "JDDICOM_Sample2-dcmdjpeg.dcm") == 0 // cannot recreate FMI || strcmp(name, "DMCPACS_ExplicitImplicit_BogusIOP.dcm") == 0 // ImageRegionReader does not handle it || strcmp(name, "unreadable.dcm") == 0 // No Pixel Data (old ACR-NEMA) || strcmp(name, "US-YBR_FULL_422-EVRLE.dcm") == 0 // packed ybr422 || strncmp(name, "DICOMDIR", 8) == 0 // DICOMDIR* || strncmp(name, "dicomdir", 8) == 0 // dicomdir* ) { if( verbose ) std::cout << "Will not generate: " << outfilename << std::endl; return 0; } std::cerr << "Could not change: " << filename << std::endl; return 1; } // Let's read that file back in ! gdcm::ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not even reread our generated file : " << outfilename << std::endl; return 1; } // Check that after decompression we still find the same thing: int res = 0; gdcm::Image img = reader2.GetImage(); int pc = 0; // When recompressing: US-RGB-8-epicard.dcm, make sure to compute the md5 using the // same original Planar Configuration... if( (int)img.GetPlanarConfiguration() != pc ) { gdcm::ImageChangePlanarConfiguration icpc; icpc.SetInput( reader2.GetImage() ); icpc.SetPlanarConfiguration( pc ); icpc.Change(); img = icpc.GetOutput(); } //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; bool res2 = img.GetBuffer(buffer); if( !res2 ) { std::cerr << "could not get buffer: " << outfilename << std::endl; return 1; } // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: #ifdef GDCM_WORDS_BIGENDIAN if( img.GetPixelFormat().GetBitsAllocated() == 16 ) { assert( !(len % 2) ); assert( img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME1 || img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME2 ); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem( (unsigned short*)buffer, gdcm::SwapCode::LittleEndian, len/2); } #endif const char *ref = gdcm::Testing::GetMD5FromFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( !ref ) { // new regression image needs a md5 sum std::cerr << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } if(res) { std::cerr << "problem with: " << outfilename << std::endl; } if( verbose ) { std::cout << "file was written in: " << outfilename << std::endl; } delete[] buffer; return res; } int TestFileChangeTransferSyntax3(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileChangeTransferSyntax3Func(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileChangeTransferSyntax3Func( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestXMLPrinter.cxx000664 001766 001770 00000003433 14517730450 031027 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmXMLPrinter.h" #include "gdcmFilename.h" #include "gdcmTesting.h" int TestXMLPrint(const char *filename, bool verbose= false) { gdcm::Reader r; r.SetFileName( filename ); if( !r.Read() ) { std::cerr << "Could not read: " << filename << std::endl; return 1; } gdcm::XMLPrinter print; //print.SetStyle( gdcm::XMLPrinter::LOADBULKDATA ); print.SetFile( r.GetFile() ); std::ostringstream out; if( verbose ) print.Print( std::cout ); print.Print( out ); gdcm::Filename fn( filename ); const char *name = fn.GetName(); std::string buf = out.str(); if( buf.find( "GDCM:UNKNOWN" ) != std::string::npos ) { std::cerr << "UNKNOWN Attribute with : " << name << std::endl; return 1; } return 0; } int TestXMLPrinter(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestXMLPrint(filename, true); } // else int r = 0, i = 0; gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestXMLPrint( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestStrictScanner2_2.cxx000664 001766 001770 00000004103 14517730450 032103 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmStrictScanner2.h" #include "gdcmDirectory.h" #include "gdcmSystem.h" #include "gdcmTesting.h" #include "gdcmTrace.h" int TestStrictScanner2_2(int argc, char *argv[]) { gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); const char *directory = gdcm::Testing::GetDataRoot(); std::string tmpdir = gdcm::Testing::GetTempDirectory( "TestWriter" ); directory = tmpdir.c_str(); if( argc == 2 ) { directory = argv[1]; } if( !gdcm::System::FileIsDirectory(directory) ) { std::cerr << "No such directory: " << directory << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( directory ); // no recursion std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::StrictScanner2 s; const gdcm::Tag t2(0x0020,0x000e); // Series Instance UID s.AddPublicTag( t2 ); bool b = s.Scan( d.GetFilenames() ); if( !b ) { std::cerr << "Scanner2 failed" << std::endl; return 1; } gdcm::Directory::FilenamesType const & files = s.GetFilenames(); if( files != d.GetFilenames() ) { return 1; } const char str1[] = "1.3.12.2.1107.5.2.4.7630.20010301125744000008"; gdcm::Directory::FilenamesType fns = s.GetAllFilenamesFromPublicTagToValue(t2, str1); // all SIEMENS_MAGNETOM-12-MONO2-FileSeq*.dcm: if( fns.size() != 4 ) return 1; const char str2[] = "1.3.12.2.1107.5.2.4.7630.2001030112574400000"; fns = s.GetAllFilenamesFromPublicTagToValue(t2, str2); if( !fns.empty() ) return 1; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageChangeTransferSyntax5.cxx000664 001766 001770 00000013046 14517730450 034155 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageChangeTransferSyntax.h" #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmFileMetaInformation.h" #include "gdcmTesting.h" #include "gdcmByteSwap.h" #include "gdcmImageChangePlanarConfiguration.h" namespace gdcm { int TestImageChangeTransferSyntaxJPEGLS(const char *filename, bool verbose = false) { ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const FileMetaInformation &header = reader.GetFile().GetHeader(); MediaStorage ms = header.GetMediaStorage(); bool isImage = MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } else { // not an image give up... std::cerr << "Problem with: " << filename << " but that's ok" << std::endl; return 0; } } const gdcm::Image &image = reader.GetImage(); int pc = image.GetPlanarConfiguration(); gdcm::ImageChangeTransferSyntax change; change.SetTransferSyntax( gdcm::TransferSyntax::JPEGLSLossless ); change.SetInput( image ); bool b = change.Change(); if( !b ) { std::cerr << "Could not change the Transfer Syntax: " << filename << std::endl; return 1; } // Create directory first: const char subdir[] = "TestImageChangeTransferSyntax5"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); ImageWriter writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); // increase test goal writer.SetImage( change.GetOutput() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // Let's read that file back in ! ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not even reread our generated file : " << outfilename << std::endl; return 1; } // Check that after decompression we still find the same thing: int res = 0; gdcm::Image img = reader2.GetImage(); // When recompressing: US-RGB-8-epicard.dcm, make sure to compute the md5 using the // same original Planar Configuration... if( (int)img.GetPlanarConfiguration() != pc ) { gdcm::ImageChangePlanarConfiguration icpc; icpc.SetInput( reader2.GetImage() ); icpc.SetPlanarConfiguration( pc ); icpc.Change(); img = icpc.GetOutput(); } //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; bool res2 = img.GetBuffer(buffer); if( !res2 ) { std::cerr << "could not get buffer: " << outfilename << std::endl; return 1; } // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: #ifdef GDCM_WORDS_BIGENDIAN if( img.GetPixelFormat().GetBitsAllocated() == 16 ) { assert( !(len % 2) ); assert( img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME1 || img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME2 ); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem( (unsigned short*)buffer, gdcm::SwapCode::LittleEndian, len/2); } #endif const char *ref = gdcm::Testing::GetMD5FromFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( !ref ) { // new regression image needs a md5 sum std::cerr << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } if(res) { std::cerr << "problem with: " << outfilename << std::endl; } if( verbose ) { std::cout << "file was written in: " << outfilename << std::endl; } delete[] buffer; return res; } } // end namespace gdcm int TestImageChangeTransferSyntax5(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestImageChangeTransferSyntaxJPEGLS(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestImageChangeTransferSyntaxJPEGLS( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestScanner2.cxx000664 001766 001770 00000003665 14517730450 030505 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmScanner.h" #include "gdcmDirectory.h" #include "gdcmSystem.h" #include "gdcmTesting.h" #include "gdcmTrace.h" int TestScanner2(int argc, char *argv[]) { gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); const char *directory = gdcm::Testing::GetDataRoot(); if( argc == 2 ) { directory = argv[1]; } if( !gdcm::System::FileIsDirectory(directory) ) { std::cerr << "No such directory: " << directory << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( directory ); // no recursion std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::Scanner s; const gdcm::Tag t2(0x0020,0x000e); // Series Instance UID s.AddTag( t2 ); bool b = s.Scan( d.GetFilenames() ); if( !b ) { std::cerr << "Scanner failed" << std::endl; return 1; } gdcm::Directory::FilenamesType const & files = s.GetFilenames(); if( files != d.GetFilenames() ) { return 1; } const char str1[] = "1.3.12.2.1107.5.2.4.7630.20010301125744000008"; gdcm::Directory::FilenamesType fns = s.GetAllFilenamesFromTagToValue(t2, str1); // all SIEMENS_MAGNETOM-12-MONO2-FileSeq*.dcm: if( fns.size() != 4 ) return 1; const char str2[] = "1.3.12.2.1107.5.2.4.7630.2001030112574400000"; fns = s.GetAllFilenamesFromTagToValue(t2, str2); if( !fns.empty() ) return 1; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestStringFilter4.cxx000664 001766 001770 00000003435 14517730450 031525 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmStringFilter.h" #include "gdcmAttribute.h" #include "gdcmSmartPointer.h" // https://sourceforge.net/p/gdcm/bugs/485/ int TestStringFilter4(int , char *[]) { gdcm::SmartPointer f = new gdcm::File; gdcm::DataSet & ds = f->GetDataSet(); { gdcm::Element priv_creator; priv_creator.SetValue( "SIEMENS MED SP DXMG WH AWS 1" ); gdcm::DataElement de1 = priv_creator.GetAsDataElement(); de1.SetTag( gdcm::Tag(0x19,0x10) ); ds.Insert( de1 ); gdcm::Element el; el.SetValue( "TestStringFilter4" ); gdcm::DataElement de2 = el.GetAsDataElement(); de2.SetTag( gdcm::Tag(0x19,0x1010) ); ds.Insert( de2 ); // std::cout << ds << std::endl; gdcm::StringFilter filter; filter.SetFile(*f); gdcm::PrivateTag privTag(0x0019, 0x10, "SIEMENS MED SP DXMG WH AWS 1"); // Works as intended std::string privTagValue1 = filter.ToString(ds.GetDataElement(privTag)); std::cout << privTagValue1 << std::endl; // Does not work, returns string value of the private creator instead of the actual tag std::string privTagValue2 = filter.ToString(privTag); std::cout << privTagValue2 << std::endl; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestUIDGenerator.cxx000664 001766 001770 00000011522 14517730450 031311 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmUIDGenerator.h" #include #include #include #include int TestUIDGeneratorValid() { gdcm::UIDGenerator uid; uid.SetRoot( "1.2.3.4.0.0.1" ); const char *s = uid.Generate(); if( !gdcm::UIDGenerator::IsValid( s ) ) { return 1; } const char invalid0[] = ".0.123"; if( gdcm::UIDGenerator::IsValid( invalid0 ) ) { return 1; } const char invalid1[] = "abcd"; if( gdcm::UIDGenerator::IsValid( invalid1 ) ) { return 1; } const char invalid2[] = "1.2.3.4.0.0.123.a"; if( gdcm::UIDGenerator::IsValid( invalid2 ) ) { return 1; } const char invalid3[] = "1.2.3.4.0.0.123.."; if( gdcm::UIDGenerator::IsValid( invalid3 ) ) { return 1; } const char invalid4[] = "1.2.3.4.0.0..123"; if( gdcm::UIDGenerator::IsValid( invalid4 ) ) { return 1; } const char invalid5[] = "1.2.3.4.00.123"; if( gdcm::UIDGenerator::IsValid( invalid5 ) ) { return 1; } const char invalid6[] = "1.2.3.4.00.123."; if( gdcm::UIDGenerator::IsValid( invalid6 ) ) { return 1; } const char invalid7[] = "1234567890.1234567890.1234567890.1234567890.1234567890.1234567890"; if( gdcm::UIDGenerator::IsValid( invalid7 ) ) { return 1; } const char invalid8[] = "1234567890.1234567890.1234567890.1234567890.1234567890/123456789"; if( gdcm::UIDGenerator::IsValid( invalid8 ) ) { return 1; } const char invalid9[] = ""; if( gdcm::UIDGenerator::IsValid( invalid9 ) ) { return 1; } const char invalid10[] = "."; if( gdcm::UIDGenerator::IsValid( invalid10 ) ) { return 1; } const char invalid11[] = "00.1"; if( gdcm::UIDGenerator::IsValid( invalid11 ) ) { return 1; } return 0; // no error } int TestUIDGenerator(int , char *[]) { gdcm::UIDGenerator uid; std::cout << gdcm::UIDGenerator::GetGDCMUID() << std::endl; std::cout << uid.GetRoot() << std::endl; if( strcmp( gdcm::UIDGenerator::GetGDCMUID(), uid.GetRoot() ) != 0 ) { return 1; } /* * Purposely take a very long root, to test the robustness of the generator * since we are left with fewer bytes to still generate uniq UID */ // let's test 27 bytes root: const char myroot[] = "9876543210.9876543210.98765"; // 26 bytes is the length of GDCM root //if( strlen(myroot) != 26 ) // { // return 1; // } uid.SetRoot( myroot ); std::cerr << "before generate" << std::endl; const char *s = uid.Generate(); std::cerr << "after generate" << std::endl; std::cout << "s:" << s << std::endl; if( strcmp( myroot, uid.GetRoot() ) != 0 ) { std::cerr << "1 failed" << std::endl; return 1; } if( strcmp( gdcm::UIDGenerator::GetGDCMUID(), myroot ) == 0 ) { std::cerr << "2 failed" << std::endl; return 1; } if( strncmp( s, uid.GetRoot(), strlen( uid.GetRoot() ) ) != 0 ) { std::cerr << "3 failed" << std::endl; return 1; } /* std::string s0 = "123456"; std::cout << (s0.c_str() + s0.find_first_not_of('0')) << std::endl; std::string s1 = "0123456"; std::cout << (s1.c_str() + s1.find_first_not_of('0')) << std::endl; std::string s2 = "00123456"; std::cout << (s2.c_str() + s2.find_first_not_of('0')) << std::endl; std::string s3 = "000"; if( s3.find_first_not_of('0') != std::string::npos ) std::cout << (s3.c_str() + s3.find_first_not_of('0')) << std::endl; */ // Threading issue, make sure that two different UIDs cannot generate same UID gdcm::UIDGenerator uid1; gdcm::UIDGenerator uid2; const unsigned int n = 100; std::set uids; for(unsigned int i = 0; i < n; ++i) { const char *unique1 = uid1.Generate(); const char *unique2 = uid2.Generate(); if( !unique1 || !unique2 ) return 1; std::cout << unique1 << std::endl; std::cout << unique2 << std::endl; if ( uids.count(unique1) == 1 ) { std::cerr << "Already found: " << unique1 << std::endl; return 1; } uids.insert( unique1 ); if ( uids.count(unique2) == 1 ) { std::cerr << "Already found: " << unique2 << std::endl; return 1; } uids.insert( unique2 ); if( strcmp(unique1 , unique2 ) == 0 ) { // That would be very bad ! return 1; } } int ret = 0; ret += TestUIDGeneratorValid(); return ret; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestStreamImageWriter.cxx000664 001766 001770 00000020172 14517730450 032415 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmStreamImageReader.h" #include "gdcmStreamImageWriter.h" #include "gdcmFileMetaInformation.h" #include "gdcmSystem.h" #include "gdcmFilename.h" #include "gdcmByteSwap.h" #include "gdcmTrace.h" #include "gdcmTesting.h" #include "gdcmImageHelper.h" #include "gdcmImageReader.h" #include "gdcmImage.h" int TestStreamImageWrite(const char *subdir, const char* filename, bool verbose = false, bool lossydump = false) { (void)lossydump; if( verbose ) std::cerr << "Reading and writing: " << filename << std::endl; gdcm::ImageReader theImageReaderOriginal; gdcm::ImageReader theImageReader; gdcm::StreamImageWriter theStreamWriter; theImageReaderOriginal.SetFileName( filename ); // Create directory first: std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { gdcm::System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = gdcm::Testing::GetTempFilename( filename, subdir ); if ( theImageReaderOriginal.Read() ) { //int res = 0; //to test the writer out, we have to read an image and then //write it out one line at a time. //a _real_ test would include both the streamimagereader and writer. //so, this test is: //1) read in the image via the stream reader //2) write it out line by line //3) read it in by a reader //4) compare the image from step 1 with step 3 //5) go to step2, replace step 3 with a regular image reader. //for now, we'll do 1-4 //pull image information prior to messing with the file gdcm::Image theOriginalImage = theImageReaderOriginal.GetImage(); char* theOriginalBuffer = new char[theOriginalImage.GetBufferLength()]; if (!theOriginalImage.GetBuffer(theOriginalBuffer)){ std::cerr << "Unable to get original image buffer, stopping." << std::endl; delete [] theOriginalBuffer; return 1; } //first, check that the image information can be written //theStreamReader.GetFile().GetDataSet().Print( std::cout ); theStreamWriter.SetFile(theImageReaderOriginal.GetFile()); #if 0 theStreamWriter.SetFileName(outfilename.c_str()); #else std::ofstream of; of.open( outfilename.c_str(), std::ios::out | std::ios::binary ); theStreamWriter.SetStream(of); #endif if (!theStreamWriter.CanWriteFile()){ delete [] theOriginalBuffer; return 0;//this means that the file was unwritable, period. //very similar to a ReadImageInformation failure } if (!theStreamWriter.WriteImageInformation()){ std::cerr << "unable to write image information" << std::endl; delete [] theOriginalBuffer; return 1; //the CanWrite function should prevent getting here, else, //that's a test failure } std::vector extent = gdcm::ImageHelper::GetDimensionsValue(theImageReaderOriginal.GetFile()); unsigned short xmax = (unsigned short)extent[0]; unsigned short ymax = (unsigned short)extent[1]; unsigned short theChunkSize = 4; unsigned short ychunk = (unsigned short)(extent[1]/theChunkSize); //go in chunk sizes of theChunkSize unsigned short zmax = (unsigned short)extent[2]; if (xmax == 0 || ymax == 0) { std::cerr << "Image has no size, unable to write zero-sized image." << std::endl; return 0; } int z, y, nexty; unsigned long prevLen = 0; //when going through the char buffer, make sure to grab //the bytes sequentially. So, store how far you got in the buffer with each iteration. for (z = 0; z < zmax; ++z){ for (y = 0; y < ymax; y += ychunk){ nexty = y + ychunk; if (nexty > ymax) nexty = ymax; theStreamWriter.DefinePixelExtent(0, (uint16_t)xmax, (uint16_t)y, (uint16_t)nexty, (uint16_t)z, (uint16_t)(z+1)); unsigned long len = theStreamWriter.DefineProperBufferLength(); char* finalBuffer = new char[len]; memcpy(finalBuffer, &(theOriginalBuffer[prevLen]), len); if (!theStreamWriter.Write(finalBuffer, len)){ std::cerr << "writing failure:" << outfilename << " at y = " << y << " and z= " << z << std::endl; delete [] theOriginalBuffer; delete [] finalBuffer; return 1; } delete [] finalBuffer; prevLen += len; } } delete [] theOriginalBuffer; theImageReader.SetFileName(outfilename.c_str()); if (!theImageReader.Read()){ std::cerr << "unable to read in the written test file: " << outfilename << std::endl; return 1; } else { int res = 0; const gdcm::Image &img = theImageReader.GetImage(); //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; img.GetBuffer(buffer); // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: const char *ref = gdcm::Testing::GetMD5FromFile(filename); const char *correct_ref = gdcm::Testing::GetMD5FromBrokenFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( verbose ) { std::cout << "ref=" << ref << std::endl; std::cout << "md5=" << digest << std::endl; } if( !ref ) { // new regression image needs a md5 sum std::cout << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) ) { // let's be nice for now and only truly fails when file is proper DICOM if( correct_ref && !strcmp(correct_ref, ref)) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } } delete[] buffer; return res; } } else { //std::cerr << "Unable to read test file: " << filename << std::endl; //return 1; return 0; //this is NOT a test of the reader, but a test of streaming writing } #if 0 const gdcm::FileMetaInformation &header = reader.GetFile().GetHeader(); gdcm::MediaStorage ms = header.GetMediaStorage(); bool isImage = gdcm::MediaStorage::IsImage( ms ); if( isImage ) { if( reader.GetFile().GetDataSet().FindDataElement( gdcm::Tag(0x7fe0,0x0010) ) ) { std::cerr << "Failed to read image from file: " << filename << std::endl; return 1; } else { std::cerr << "no Pixel Data Element found in the file:" << filename << std::endl; return 0; } } // else // well this is not an image, so thankfully we fail to read it std::cerr << "Could not read image(" << filename << "), since file is a: " << ms << std::endl; //assert( ms != gdcm::MediaStorage::MS_END ); #endif return 0; } int TestStreamImageWriter(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestStreamImageWrite(argv[0], filename, true); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestStreamImageWrite( argv[0], filename); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestJSON1.cxx000664 001766 001770 00000003236 14517730450 027656 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmJSON.h" #include "gdcmFilename.h" #include "gdcmTesting.h" #include "gdcmDataSet.h" #include "gdcmWriter.h" #include "gdcmFile.h" int TestJSON1(int, char *[]) { //std::string sup166 = gdcm::Filename::Join(gdcm::Testing::GetSourceDirectory(), "/Testing/Source/Data/QIDO-RS_examplesup166.json" ); std::string sup166 = gdcm::Filename::Join(gdcm::Testing::GetSourceDirectory(), "/Testing/Source/Data/QIDO-RS_examplesup166_2.json" ); if( !gdcm::System::FileExists( sup166.c_str() ) ) { std::cerr << sup166 << std::endl; return 1; } std::ifstream is( sup166.c_str() ); gdcm::JSON json; json.PrettyPrintOn(); #if 1 gdcm::DataSet ds; json.Decode(is, ds ); //std::cout << ds << std::endl; #else gdcm::Writer w; gdcm::File & ff = w.GetFile(); gdcm::DataSet &ds = ff.GetDataSet(); ff.GetHeader().SetDataSetTransferSyntax( gdcm::TransferSyntax::ExplicitVRLittleEndian ); json.Decode(is, ff.GetDataSet() ); w.SetFileName( "/tmp/debug2.dcm" ); if( !w.Write() ) return 1; #endif std::stringstream ss; json.Code(ds, ss ); std::cout << ss.str() << std::endl; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestCurve2.cxx000664 001766 001770 00000013234 14517730450 030171 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmCurve.h" #include "gdcmFileMetaInformation.h" #include "gdcmSystem.h" #include "gdcmImageReader.h" #include "gdcmFilename.h" #include "gdcmByteSwap.h" #include "gdcmTrace.h" #include "gdcmTesting.h" struct curveinfo { unsigned short dimensions; unsigned short numpts; const char *typeofdata; unsigned short datavaluerepresentation; const char *datamd5; }; static const curveinfo numptsarray1[] = { { 1, 1126, "PHYSIO", 0, "0fee912671ae158390efc7b49fe39f9b" } }; static const curveinfo numptsarray2[] = { { 1, 969, "PHYSIO", 0, "b46d2c6eed2944f1e16c46125022d2d4" } }; static const curveinfo numptsarray3[] = { { 2, 1864, "ECG ", 0, "22aadb1260fcb53a487a2e9e9ee445b3" } }; static const curveinfo numptsarray4[] = { { 2, 1590, "PRESSURE", 0, "6b4125d8a00c65feddb8c7c6f157e6ce" } , { 2, 1588, "ECG ", 0, "7a8e1cf198e74dd37738dbce5262c49d" } }; struct curveel { const char *name; size_t numcurves; const curveinfo *info; }; static const curveel arraycurve[] = { // gdcmData { "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm", 1, numptsarray1 }, { "GE_DLX-8-MONO2-Multiframe.dcm", 1, numptsarray2 }, // gdcmDataExtra { "xa_integris.dcm", 1, numptsarray3 }, // random stuff: { "XA.1.2.826.0.1.3680043.3.29.1.3230389164.20272.1340974735.2.3.0.000001.dcm", 2, numptsarray4 }, }; static const curveel *getcurveelfromname(const char *filename) { static const size_t nel = sizeof( arraycurve ) / sizeof( *arraycurve ); for( size_t i = 0; i < nel; ++i ) { const curveel &c = arraycurve[i]; if( strcmp( filename, c.name) == 0 ) { return &c; } } return nullptr; } static int TestCurve2Read(const char* filename, bool verbose = false) { if( verbose ) std::cerr << "Reading: " << filename << std::endl; gdcm::ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { } int res = 0; const gdcm::Image &img = reader.GetImage(); size_t numcurves = img.GetNumberOfCurves(); gdcm::Filename fn( filename ); if( numcurves ) { const curveel *c = getcurveelfromname( fn.GetName() ); if( c == nullptr ) { std::cerr << "Can't find: " << filename << std::endl; return 1; } if( c->numcurves != numcurves ) { std::cerr << "Should be: " << numcurves << " while " << c->numcurves << std::endl; return 1; } const curveinfo *info = c->info; for( size_t idx = 0; idx < numcurves; ++idx ) { const gdcm::Curve &curve = img.GetCurve(idx); //curve.Print( std::cout ); unsigned short dim = curve.GetDimensions(); if( info[idx].dimensions != dim ) { std::cerr << "Should be: " << dim << " while " << info[idx].dimensions << " for idx: " << idx << std::endl; return 1; } unsigned short npts = curve.GetNumberOfPoints(); if( info[idx].numpts != npts ) { std::cerr << "Should be: " << npts << " while " << info[idx].numpts << " for idx: " << idx << std::endl; return 1; } const char *tofdata = curve.GetTypeOfData(); if( strcmp(info[idx].typeofdata, tofdata ) != 0 ) { std::cerr << "Should be: [" << tofdata << "] while [" << info[idx].typeofdata << "] for idx: " << idx << std::endl; return 1; } unsigned short dvr = curve.GetDataValueRepresentation(); if( info[idx].datavaluerepresentation != dvr ) { std::cerr << "Should be: " << dvr << " while " << info[idx].datavaluerepresentation << " for idx: " << idx << std::endl; return 1; } std::vector points; points.resize( 3 * npts ); curve.GetAsPoints( (float*)points.data() ); #if 0 for( size_t i = 0; i < npts; i += 3 ) { std::cout << points[i + 0] << "," << points[i + 1] << "," << points[i + 2] << "\n"; } #endif char digest[33]; const char *buffer = (char*)points.data(); size_t len = sizeof(float) * 3 * npts; const char *ref = info[idx].datamd5; gdcm::Testing::ComputeMD5(buffer, len, digest); if( verbose ) { std::cout << "ref=" << ref << std::endl; std::cout << "md5=" << digest << std::endl; } if( !ref ) { // new regression image needs a md5 sum std::cout << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } } } return res; } int TestCurve2(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestCurve2Read(filename, true); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestCurve2Read(filename); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileAnonymizer3.cxx000664 001766 001770 00000010336 14517730450 032041 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileAnonymizer.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmFilename.h" #include static int TestFileAnonymize3(const char *filename, bool verbose = false) { using namespace gdcm; if( verbose ) std::cout << "Processing: " << filename << std::endl; // Create directory first: const char subdir[] = "TestFileAnonymize3"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); if( verbose ) std::cout << "Generating: " << outfilename << std::endl; const gdcm::Tag t1(0x0018,0x5100); const gdcm::Tag t2(0x0018,0x1312); const gdcm::Tag t3(0x0018,0x1313); const gdcm::Tag t4(0x0018,0x1317); //const gdcm::Tag t5(0x0008,0x2112); // SQ //const gdcm::Tag t6(0x0008,0x9215); // SQ const gdcm::Tag t7(0x0018,0x1020); const gdcm::Tag t8(0x0004,0x1130); // Test DICOMDIR ! const gdcm::Tag t9(0x0008,0x0000); // Earliest possible Data Element const gdcm::Tag t0(0xffff,0xffff); // Latest Possible Element std::vector tags; tags.push_back( t0 ); tags.push_back( t1 ); tags.push_back( t2 ); tags.push_back( t3 ); tags.push_back( t4 ); tags.push_back( t7 ); tags.push_back( t8 ); tags.push_back( t9 ); // precondition, remove the file if present: System::RemoveFile(outfilename.c_str()); gdcm::FileAnonymizer fa; fa.SetInputFileName( filename ); fa.SetOutputFileName( outfilename.c_str() ); for( std::vector::const_iterator it = tags.begin(); it != tags.end(); ++it ) { fa.Replace( *it, "TOTO" ); } if( !fa.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // Read back and check: gdcm::Reader r; r.SetFileName( outfilename.c_str() ); if( !r.Read() ) { gdcm::Filename fn( filename ); if( strcmp(fn.GetName(), "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm") == 0 || strcmp(fn.GetName(), "DMCPACS_ExplicitImplicit_BogusIOP.dcm") == 0 || strcmp(fn.GetName(), "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm") == 0 ) { return 0; } std::cerr << "Failed to read: " << outfilename << std::endl; return 1; } const File &f = r.GetFile(); gdcm::MediaStorage ms; ms.SetFromFile( f ); const DataSet &ds = f.GetDataSet(); for( std::vector::const_iterator it = tags.begin(); it != tags.end(); ++it ) { const gdcm::Tag & t = *it; // Special handling of t8 (DICOMDIR only) const bool iserror = (ms == gdcm::MediaStorage::MediaStorageDirectoryStorage && t == t8) && false; // de-activate for now if( !ds.FindDataElement( t ) ) { if( iserror ) { std::cerr << "Not found element: " << t << " in " << outfilename << std::endl; return 1; } } const gdcm::DataElement & de = ds.GetDataElement( t ); if( de.GetVL() != 4 ) { if( iserror ) { std::cerr << "Wrong VL for: " << t << " in " << outfilename << std::endl; return 1; } } } return 0; } int TestFileAnonymizer3(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileAnonymize3(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileAnonymize3( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestEncapsulatedDocument.cxx000664 001766 001770 00000001350 14517730450 033126 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmEncapsulatedDocument.h" int TestEncapsulatedDocument(int argc, char *argv[]) { (void)argc; (void)argv; gdcm::EncapsulatedDocument w; (void)w; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileStreamer6.cxx000664 001766 001770 00000006504 14517730450 031475 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileStreamer.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmDataSet.h" #include "gdcmPrivateTag.h" #include "gdcmFilename.h" /* * Make sure pseudo-private element also works: */ int TestFileStream6(const char *filename, bool verbose = false) { using namespace gdcm; if( verbose ) std::cout << "Processing: " << filename << std::endl; // Create directory first: const char subdir[] = "TestFileStreamer6"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); if( verbose ) std::cout << "Generating: " << outfilename << std::endl; gdcm::Filename fn( filename ); const char *name = fn.GetName(); // Special handling: bool checktemplate = false; if( strcmp(name, "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0 || strcmp(name, "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm") == 0 || strcmp(name, "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm") == 0 ) { checktemplate = true; } gdcm::FileStreamer fs; fs.SetTemplateFileName( filename ); fs.CheckTemplateFileName( checktemplate ); fs.SetOutputFileName( outfilename.c_str() ); std::vector vbuffer; vbuffer.resize( 8192 ); const char *buffer = vbuffer.data(); const size_t len = vbuffer.size(); Tag t( Tag(0x9,0x1010) ); fs.StartDataElement( t ); fs.AppendToDataElement( t, buffer, len ); fs.StopDataElement( t ); // Read back and check: gdcm::Reader r; r.SetFileName( outfilename.c_str() ); if( !r.Read() ) { std::cerr << "Failed to read: " << outfilename << std::endl; return 1; } gdcm::File & f = r.GetFile(); gdcm::DataSet & ds = f.GetDataSet(); if( !ds.FindDataElement( t ) ) { return 1; } const gdcm::DataElement & de = ds.GetDataElement( t ); const gdcm::ByteValue * bv = de.GetByteValue(); if( !bv ) return 1; if( bv->GetLength() != 8192 ) return 1; const char *p = bv->GetPointer(); const char *end = p + bv->GetLength(); int res = 0; for( ; p != end; ++p ) { res += *p; } if( res ) { std::cerr << "Mismatch: " << outfilename << std::endl; } return res; } int TestFileStreamer6(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileStream6(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileStream6( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestStringFilter1.cxx000664 001766 001770 00000004522 14517730450 031520 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmStringFilter.h" #include "gdcmReader.h" #include "gdcmSequenceOfItems.h" #include "gdcmTesting.h" #include "gdcmTrace.h" static int TestStringFilt(const char *filename) { gdcm::StringFilter sf; gdcm::Reader r; r.SetFileName( filename ); if( !r.Read() ) { return 1; } gdcm::DataSet const& ds = r.GetFile().GetDataSet(); sf.SetFile( r.GetFile() ); int ret = 0; gdcm::DataSet::ConstIterator it = ds.Begin(); for( ; it != ds.End(); ++it) { const gdcm::DataElement &ref = *it; std::pair s = sf.ToStringPair( ref.GetTag() ); if( !s.second.empty() || ref.GetVL() == 0 ) { std::cout << s.first << " -> " << s.second << std::endl; std::string s2 = sf.FromString( ref.GetTag(), s.second.c_str(), s.second.size() ); //std::cout << s.first << " -> " << s2 << std::endl; } else if( !ref.GetByteValue() ) // It means it's a SQ { std::cout << "SQ:" << ref.GetTag() << std::endl; } else if( ref.GetTag().IsPrivate() ) { //std::cout << "Private:" << ref.GetTag() << std::endl; std::string s2 = sf.FromString( ref.GetTag(), s.second.c_str(), s.second.size() ); } else { std::cerr << "Not supported: " << ref << std::endl; //ret += 1; } } return ret; } int TestStringFilter1(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestStringFilt(filename); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestStringFilt( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestRLECodec.cxx000664 001766 001770 00000001406 14517730450 030401 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTypes.h" int TestRLECodec(int, char *[]) { // Compress a black images: should give a good result // Compress a checkboard (black/white alternate). Should give a mediocre result return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestStrictScanner2_1.cxx000664 001766 001770 00000015632 14517730450 032113 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmStrictScanner2.h" #include "gdcmDirectory.h" #include "gdcmSystem.h" #include "gdcmTesting.h" #include "gdcmTrace.h" // dcmdump /path/to/image/*.dcm 2>&/dev/null| grep 0020 | grep "000e\|000d" | sort | uniq // // $ find /images/ -type f -exec dcmdump -s +P 0010,0010 {} \; static int TestScanner2Extra() { const char *extradataroot = gdcm::Testing::GetDataExtraRoot(); if( !extradataroot ) { return 1; } if( !gdcm::System::FileIsDirectory(extradataroot) ) { std::cerr << "No such directory: " << extradataroot << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( extradataroot, true ); // no recursion std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::StrictScanner2 s; const gdcm::Tag t1(0x0020,0x000d); // Study Instance UID const gdcm::Tag t2(0x0020,0x000e); // Series Instance UID const gdcm::Tag t3(0x0010,0x0010); // Patient's Name const gdcm::Tag t4(0x0004,0x5678); // DUMMY element const gdcm::Tag t5(0x0028,0x0010); // Rows const gdcm::Tag t6(0x0028,0x0011); // Columns s.AddPublicTag( t1 ); s.AddPublicTag( t2 ); s.AddPublicTag( t3 ); s.AddPublicTag( t4 ); s.AddPublicTag( t5 ); s.AddPublicTag( t6 ); bool b = s.Scan( d.GetFilenames() ); if( !b ) { std::cerr << "Scanner2 failed" << std::endl; return 1; } //s.Print( std::cout ); return 0; } int TestStrictScanner2_1(int argc, char *argv[]) { gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); const char *directory = gdcm::Testing::GetDataRoot(); std::string tmpdir = gdcm::Testing::GetTempDirectory( "TestWriter" ); directory = tmpdir.c_str(); if( argc == 2 ) { directory = argv[1]; } if( !gdcm::System::FileIsDirectory(directory) ) { std::cerr << "No such directory: " << directory << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( directory ); // no recursion // d.Print( std::cout ); std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::StrictScanner2 s; const gdcm::Tag t1(0x0020,0x000d); // Study Instance UID const gdcm::Tag t2(0x0020,0x000e); // Series Instance UID const gdcm::Tag t3(0x0010,0x0010); // Patient's Name const gdcm::Tag t4(0x0004,0x5678); // DUMMY element const gdcm::Tag t5(0x0028,0x0010); // Rows const gdcm::Tag t6(0x0028,0x0011); // Columns const gdcm::Tag t7(0x0008,0x0016); // s.AddPublicTag( t1 ); s.AddPublicTag( t2 ); s.AddPublicTag( t3 ); s.AddPublicTag( t4 ); s.AddPublicTag( t5 ); s.AddPublicTag( t6 ); s.AddPublicTag( t7 ); bool b = s.Scan( d.GetFilenames() ); if( !b ) { std::cerr << "Scanner2 failed" << std::endl; return 1; } // s.Print( std::cout ); gdcm::Directory::FilenamesType const & files = s.GetFilenames(); if( files != d.GetFilenames() ) { return 1; } int numerrors = 0; for( gdcm::Directory::FilenamesType::const_iterator it = files.begin(); it != files.end(); ++it ) { const char *filename = it->c_str(); const char* value = s.GetPublicValue(filename, t7); const char *msstr = gdcm::Testing::GetMediaStorageFromFile(filename); if( msstr && strcmp(msstr, "1.2.840.10008.1.3.10" ) == 0 ) { // would need to check (0002,0002)... } if( value && msstr ) { if( strcmp( value, msstr ) != 0 ) { std::cerr << "Problem with file " << filename << std::endl; std::cerr << value << "/" << msstr << std::endl; ++numerrors; } } else { if ( !msstr ) { std::cerr << "Problem with file " << filename << std::endl; if( value ) std::cerr << "Value found: " << value << std::endl; ++numerrors; } } } if( numerrors ) return numerrors; // Check dummy filename: bool iskey = s.IsKey( "gdcm.rocks.invalid.name" ); if( iskey ) { std::cout << "IsKey returned: " << iskey << std::endl; return 1; } // Let's get the value for tag t1 in first file: gdcm::StrictScanner2::PublicMappingType const &mt = s.GetPublicMappings(); std::string sfilename; sfilename = gdcm::Testing::GetDataRoot(); sfilename = directory; sfilename+= "/test.acr"; { //const char *filename = d.GetFilenames()[0].c_str(); const char *filename = sfilename.c_str(); // The following breaks with Papyrus file: PET-cardio-Multiframe-Papyrus.dcm unsigned int i = 0; gdcm::StrictScanner2::PublicMappingType::const_iterator it = mt.find(filename); assert( it != mt.end() ); while( it == mt.end() ) { ++i; if( i == d.GetFilenames().size() ) { return 1; } filename = d.GetFilenames()[i].c_str(); it = mt.find(filename); } std::cout << "Mapping for " << filename << " is :" << std::endl; const gdcm::StrictScanner2::PublicTagToValue &tv = it->second; //const std::string &filename = d.GetFilenames()[0]; gdcm::StrictScanner2::PublicTagToValue::const_iterator it2 = tv.find( t5 ); if( it2 == tv.end() || t5 != it2->first ) { std::cerr << "Could not find tag:" << t5 << std::endl; return 1; } const char * t1value = it2->second; std::cout << filename << " -> " << t1 << " = " << (*t1value ? t1value : "none" ) << std::endl; } const gdcm::Directory::FilenamesType &filenames = d.GetFilenames(); { gdcm::Directory::FilenamesType::const_iterator it = filenames.begin(); for(; it != filenames.end(); ++it) { const char *filename = it->c_str(); const gdcm::Tag &reftag = t6; const char *value = s.GetPublicValue( filename, reftag ); if( value ) { assert( value ); std::cout << filename << " has " << reftag << " = " << value << std::endl; } else { std::cout << filename << " has " << reftag << " = no value or not DICOM" << std::endl; } } } /* { std::vector keys = s.GetKeys(); for( std::vector::const_iterator it = keys.begin(); it != keys.end(); ++it) { const char *filename = *it; const gdcm::Directory::FilenamesType::const_iterator it2 = std::find(filenames.begin(), filenames.end(), filename); if( it2 == filenames.end() ) { return 1; } if( !s.IsKey( filename ) ) { return 1; } } } */ // puposely discard gdcmDataExtra test, this is just an 'extra' test... //int b2 = TestScanner2Extra(); (void)b2; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestStrictScanner1.cxx000664 001766 001770 00000015425 14517730450 031672 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmStrictScanner.h" #include "gdcmDirectory.h" #include "gdcmSystem.h" #include "gdcmTesting.h" #include "gdcmTrace.h" // dcmdump /path/to/image/*.dcm 2>&/dev/null| grep 0020 | grep "000e\|000d" | sort | uniq // // $ find /images/ -type f -exec dcmdump -s +P 0010,0010 {} \; static int TestScannerExtra() { const char *extradataroot = gdcm::Testing::GetDataExtraRoot(); if( !extradataroot ) { return 1; } if( !gdcm::System::FileIsDirectory(extradataroot) ) { std::cerr << "No such directory: " << extradataroot << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( extradataroot, true ); // no recursion std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::StrictScanner s; const gdcm::Tag t1(0x0020,0x000d); // Study Instance UID const gdcm::Tag t2(0x0020,0x000e); // Series Instance UID const gdcm::Tag t3(0x0010,0x0010); // Patient's Name const gdcm::Tag t4(0x0004,0x5678); // DUMMY element const gdcm::Tag t5(0x0028,0x0010); // Rows const gdcm::Tag t6(0x0028,0x0011); // Columns s.AddTag( t1 ); s.AddTag( t2 ); s.AddTag( t3 ); s.AddTag( t4 ); s.AddTag( t5 ); s.AddTag( t6 ); bool b = s.Scan( d.GetFilenames() ); if( !b ) { std::cerr << "Scanner failed" << std::endl; return 1; } //s.Print( std::cout ); return 0; } int TestStrictScanner1(int argc, char *argv[]) { gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); const char *directory = gdcm::Testing::GetDataRoot(); std::string tmpdir = gdcm::Testing::GetTempDirectory( "TestWriter" ); directory = tmpdir.c_str(); if( argc == 2 ) { directory = argv[1]; } if( !gdcm::System::FileIsDirectory(directory) ) { std::cerr << "No such directory: " << directory << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( directory ); // no recursion // d.Print( std::cout ); std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::StrictScanner s; const gdcm::Tag t1(0x0020,0x000d); // Study Instance UID const gdcm::Tag t2(0x0020,0x000e); // Series Instance UID const gdcm::Tag t3(0x0010,0x0010); // Patient's Name const gdcm::Tag t4(0x0004,0x5678); // DUMMY element const gdcm::Tag t5(0x0028,0x0010); // Rows const gdcm::Tag t6(0x0028,0x0011); // Columns const gdcm::Tag t7(0x0008,0x0016); // s.AddTag( t1 ); s.AddTag( t2 ); s.AddTag( t3 ); s.AddTag( t4 ); s.AddTag( t5 ); s.AddTag( t6 ); s.AddTag( t7 ); bool b = s.Scan( d.GetFilenames() ); if( !b ) { std::cerr << "Scanner failed" << std::endl; return 1; } // s.Print( std::cout ); gdcm::Directory::FilenamesType const & files = s.GetFilenames(); if( files != d.GetFilenames() ) { return 1; } int numerrors = 0; for( gdcm::Directory::FilenamesType::const_iterator it = files.begin(); it != files.end(); ++it ) { const char *filename = it->c_str(); const char* value = s.GetValue(filename, t7); const char *msstr = gdcm::Testing::GetMediaStorageFromFile(filename); if( msstr && strcmp(msstr, "1.2.840.10008.1.3.10" ) == 0 ) { // would need to check (0002,0002)... } if( value && msstr ) { if( strcmp( value, msstr ) != 0 ) { std::cerr << "Problem with file " << filename << std::endl; std::cerr << value << "/" << msstr << std::endl; ++numerrors; } } else { if ( !msstr ) { std::cerr << "Problem with file " << filename << std::endl; if( value ) std::cerr << "Value found: " << value << std::endl; ++numerrors; } } } if( numerrors ) return numerrors; // Check dummy filename: bool iskey = s.IsKey( "gdcm.rocks.invalid.name" ); if( iskey ) { std::cout << "IsKey returned: " << iskey << std::endl; return 1; } // Let's get the value for tag t1 in first file: gdcm::StrictScanner::MappingType const &mt = s.GetMappings(); std::string sfilename; sfilename = gdcm::Testing::GetDataRoot(); sfilename = directory; sfilename+= "/test.acr"; { //const char *filename = d.GetFilenames()[0].c_str(); const char *filename = sfilename.c_str(); // The following breaks with Papyrus file: PET-cardio-Multiframe-Papyrus.dcm unsigned int i = 0; gdcm::StrictScanner::MappingType::const_iterator it = mt.find(filename); assert( it != mt.end() ); while( it == mt.end() ) { ++i; if( i == d.GetFilenames().size() ) { return 1; } filename = d.GetFilenames()[i].c_str(); it = mt.find(filename); } std::cout << "Mapping for " << filename << " is :" << std::endl; const gdcm::StrictScanner::TagToValue &tv = it->second; //const std::string &filename = d.GetFilenames()[0]; gdcm::StrictScanner::TagToValue::const_iterator it2 = tv.find( t5 ); if( it2 == tv.end() || t5 != it2->first ) { std::cerr << "Could not find tag:" << t5 << std::endl; return 1; } const char * t1value = it2->second; std::cout << filename << " -> " << t1 << " = " << (*t1value ? t1value : "none" ) << std::endl; } const gdcm::Directory::FilenamesType &filenames = d.GetFilenames(); { gdcm::Directory::FilenamesType::const_iterator it = filenames.begin(); for(; it != filenames.end(); ++it) { const char *filename = it->c_str(); const gdcm::Tag &reftag = t6; const char *value = s.GetValue( filename, reftag ); if( value ) { assert( value ); std::cout << filename << " has " << reftag << " = " << value << std::endl; } else { std::cout << filename << " has " << reftag << " = no value or not DICOM" << std::endl; } } } /* { std::vector keys = s.GetKeys(); for( std::vector::const_iterator it = keys.begin(); it != keys.end(); ++it) { const char *filename = *it; const gdcm::Directory::FilenamesType::const_iterator it2 = std::find(filenames.begin(), filenames.end(), filename); if( it2 == filenames.end() ) { return 1; } if( !s.IsKey( filename ) ) { return 1; } } } */ // puposely discard gdcmDataExtra test, this is just an 'extra' test... //int b2 = TestScannerExtra(); (void)b2; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestDICOMDIRGenerator2.cxx000664 001766 001770 00000005306 14517730450 032147 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDICOMDIRGenerator.h" #include "gdcmDirectory.h" #include "gdcmWriter.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmFilenameGenerator.h" int TestDICOMDIRGenerator2(int argc, char *argv[]) { (void)argc; const char *directory = gdcm::Testing::GetDataRoot(); (void)argv; gdcm::Directory::FilenamesType filenames; gdcm::Directory::FilenamesType outfilenames; gdcm::Directory dir; int recursive = 0; unsigned int nfiles = 1; const char subdir[] = "TestImageChangeTransferSyntax4"; std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { std::cerr << "Need to run TestImageChangeTransferSyntax4 before" << std::endl; return 1; } directory = tmpdir.c_str(); const char outsubdir[] = "TestDICOMDIRGenerator2"; std::string outtmpdir = gdcm::Testing::GetTempDirectory( outsubdir ); if( !gdcm::System::FileIsDirectory( outtmpdir.c_str() ) ) { gdcm::System::MakeDirectory( outtmpdir.c_str() ); } nfiles = dir.Load(directory, (recursive > 0 ? true : false)); gdcm::FilenameGenerator fg; const char pattern[] = "FILE%03d"; fg.SetPattern( pattern ); fg.SetNumberOfFilenames( nfiles ); if( !fg.Generate() ) { std::cerr << "Could not generate" << std::endl; return 1; } filenames = dir.GetFilenames(); for( unsigned int i = 0; i < nfiles; ++i ) { std::string copy = outtmpdir; copy += "/"; copy += fg.GetFilename( i ); std::cerr << filenames[i] << " -> " << copy << std::endl; std::ifstream f1(filenames[i].c_str(), std::fstream::binary); std::ofstream f2(copy.c_str(), std::fstream::binary); f2 << f1.rdbuf(); outfilenames.push_back( copy ); } gdcm::DICOMDIRGenerator gen; gen.SetFilenames( outfilenames ); gen.SetRootDirectory( outtmpdir ); gen.SetDescriptor( "MYDESCRIPTOR" ); if( !gen.Generate() ) { return 1; } gdcm::Writer writer; writer.SetFile( gen.GetFile() ); std::string outfilename = outtmpdir; outfilename += "/DICOMDIR"; writer.SetFileName( outfilename.c_str() ); if( !writer.Write() ) { return 1; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestParseXPATH.cxx000664 001766 001770 00000006216 14517730450 030704 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmDataSet.h" #include "gdcmDict.h" #include "gdcmDicts.h" #include "gdcmGlobal.h" #include "gdcmStringFilter.h" #include "gdcmTesting.h" #include "gdcmFilename.h" static bool CheckResult( std::string const & filename, std::string const & value ) { if( filename == "D_CLUNIE_MR3_JPLY.dcm" || filename == "D_CLUNIE_RG3_JPLY.dcm" || filename == "D_CLUNIE_NM1_JPLY.dcm" || filename == "D_CLUNIE_MR4_JPLY.dcm" || filename == "D_CLUNIE_CT1_J2KI.dcm" || filename == "D_CLUNIE_CT1_JLSN.dcm" || filename == "D_CLUNIE_MR1_JPLY.dcm" || filename == "D_CLUNIE_SC1_JPLY.dcm" || filename == "D_CLUNIE_MR2_JPLY.dcm" || filename == "D_CLUNIE_RG2_JPLY.dcm" || filename == "D_CLUNIE_XA1_JPLY.dcm" ) { return value == "Lossy Compression "; } else if ( filename == "JPEG_LossyYBR.dcm" || filename == "MEDILABInvalidCP246_EVRLESQasUN.dcm" ) return value == "Full fidelity image, uncompressed or lossless compressed"; else if ( filename == "NM-PAL-16-PixRep1.dcm" ) return value == "Full fidelity image "; else return value.empty(); } int TestParseXPATHFile(const char* filename, bool verbose = false ) { (void)verbose; //static gdcm::Global &g = gdcm::Global::GetInstance(); //static const gdcm::Dicts &dicts = g.GetDicts(); //static const gdcm::Dict &pubdict = dicts.GetPublicDict(); gdcm::Reader reader; // reader.SetFileName( "/home/mathieu/Creatis/gdcmData/D_CLUNIE_CT1_J2KI.dcm" ); reader.SetFileName( filename ); if( !reader.Read() ) { return 1; } gdcm::StringFilter sf; sf.SetFile( reader.GetFile() ); const char query_const[] = "/DicomNativeModel/DicomAttribute[@keyword='DerivationCodeSequence']/Item[@number=1]//DicomAttribute[@keyword='CodeMeaning']/Value[@number=1]"; std::string value; bool ret = sf.ExecuteQuery( query_const, value ); if( !ret ) { return 1; } gdcm::Filename fn( filename ); bool b = CheckResult( fn.GetName(), value ); if( !b ) { std::cerr << "Problem with: " << filename << " -> " << value << std::endl; } return !b; } int TestParseXPATH(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestParseXPATHFile(filename, true); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestParseXPATHFile(filename); ++i; } (void)r; return EXIT_SUCCESS; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestJPEGCodec.cxx000664 001766 001770 00000001201 14517730450 030475 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmJPEGCodec.h" int TestJPEGCodec(int, char *[]) { return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader2.cxx000664 001766 001770 00000010713 14517730450 032415 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageRegionReader.h" #include "gdcmImageHelper.h" #include "gdcmFilename.h" #include "gdcmBoxRegion.h" #include "gdcmTesting.h" static int TestImageRegionRead(const char* filename, bool verbose = false) { if( verbose ) std::cerr << "Reading: " << filename << std::endl; gdcm::ImageRegionReader reader; gdcm::Filename fn( filename ); // DMCPACS_ExplicitImplicit_BogusIOP.dcm is very difficult to handle since // we need to read 3 attribute to detect the "well known" bug. However the third // attribute is (b500,b700) which make ReadUpToTag(7fe0,0010) fails... if( strcmp(fn.GetName(), "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0 || strcmp(fn.GetName(), "SC16BitsAllocated_8BitsStoredJ2K.dcm" ) == 0 // mismatch pixel format in JPEG 2000 vs DICOM || strcmp(fn.GetName(), "SC16BitsAllocated_8BitsStoredJPEG.dcm" ) == 0 // mismatch pixel format in JPEG vs DICOM || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 // bogus JPEG cannot be streamed || strcmp(fn.GetName(), "US-YBR_FULL_422-EVRLE.dcm" ) == 0 // FIXME TODO // FIXME: we should be able to handle those at some point: || strcmp(fn.GetName(), "JPEGNote_empty.dcm" ) == 0 || strcmp(fn.GetName(), "JPEGNote_missing.dcm" ) == 0 || strcmp(fn.GetName(), "JPEGNote_bogus.dcm" ) == 0 ) { std::cerr << "Skipping impossible file: " << filename << std::endl; return 0; } reader.SetFileName( filename ); bool canReadInformation = reader.ReadInformation(); if (!canReadInformation) { std::cerr << "Cannot ReadInformation: " << filename << std::endl; return 0; //unable to read tags as expected. } int res = 0; size_t len = 0; std::vector vbuffer; std::vector dims = gdcm::ImageHelper::GetDimensionsValue(reader.GetFile()); gdcm::BoxRegion box; for( unsigned int z = 0; z < dims[2]; ++z ) { box.SetDomain(0, dims[0] - 1, 0, dims[1] - 1, z, z); reader.SetRegion( box ); size_t zlen = reader.ComputeBufferLength(); if( !zlen ) { std::cerr << "No length for: " << filename << std::endl; return 1; } size_t oldlen = vbuffer.size(); len += zlen; vbuffer.resize( oldlen + zlen ); char* buffer = vbuffer.data() + oldlen; bool b = reader.ReadIntoBuffer(buffer, zlen); if( !b ) { std::cerr << "Could not ReadIntoBuffer" << std::endl; return 1; } } const char *ref = gdcm::Testing::GetMD5FromFile(filename); // FIXME: PC=1 if( strcmp(fn.GetName(), "ACUSON-24-YBR_FULL-RLE-b.dcm" ) == 0) ref = "2d7a28cae6c3b3183284d1b4ae08307f"; if( strcmp(fn.GetName(), "ACUSON-24-YBR_FULL-RLE.dcm" ) == 0) ref = "429f31f0b70bd515b3feeda5dea5eac0"; char digest[33]; char* buffer = vbuffer.data(); #if 0 std::ofstream of( "/tmp/dd.raw", std::ios::binary ); of.write( buffer, len ); of.close(); #endif gdcm::Testing::ComputeMD5(buffer, len, digest); if( verbose ) { std::cout << "ref=" << ref << std::endl; std::cout << "md5=" << digest << std::endl; } if( !ref ) { // new regression image needs a md5 sum std::cout << "Missing md5 " << digest << " for: " << filename << std::endl; res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } return res; } int TestImageRegionReader2(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestImageRegionRead(filename, true); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestImageRegionRead(filename); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageWriter.cxx000664 001766 001770 00000012514 14517730450 031242 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmFileMetaInformation.h" #include "gdcmTesting.h" #include "gdcmByteSwap.h" namespace gdcm { int TestImageWrite(const char *subdir, const char* filename) { ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const FileMetaInformation &header = reader.GetFile().GetHeader(); MediaStorage ms = header.GetMediaStorage(); bool isImage = MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } else { // not an image give up... std::cerr << "Problem with: " << filename << " but that's ok" << std::endl; return 0; } } // Create directory first: std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); ImageWriter writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); // important writer.SetImage( reader.GetImage() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } std::cout << "success: " << outfilename << std::endl; // Let's read that file back in ! ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( reader2.Read() ) { int res = 0; const Image &img = reader2.GetImage(); //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; img.GetBuffer(buffer); // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: #ifdef GDCM_WORDS_BIGENDIAN if( img.GetPixelFormat().GetBitsAllocated() == 16 ) { assert( !(len % 2) ); assert( img.GetPhotometricInterpretation() == PhotometricInterpretation::MONOCHROME1 || img.GetPhotometricInterpretation() == PhotometricInterpretation::MONOCHROME2 ); ByteSwap::SwapRangeFromSwapCodeIntoSystem( (unsigned short*)buffer, SwapCode::LittleEndian, len/2); } #endif // reuse the filename, since outfilename is simply the new representation of the old filename const char *ref = Testing::GetMD5FromFile(filename); char digest[33] = {}; Testing::ComputeMD5(buffer, len, digest); if( !ref ) { // new regression image needs a md5 sum std::cout << "Missing md5 " << digest << " for: " << outfilename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << outfilename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; #if 0 std::ofstream debug("/tmp/dump.gray", std::ios::binary); debug.write(buffer, len); debug.close(); //assert(0); #endif } delete[] buffer; return res; } #if 0 // Ok we have now two files let's compare their md5 sum: char digest[33], outdigest[33]; System::ComputeFileMD5(filename, digest); System::ComputeFileMD5(outfilename.c_str(), outdigest); if( strcmp(digest, outdigest) ) { // too bad the file is not identical, so let's be paranoid and // try to reread-rewrite this just-writen file: // TODO: Copy file System::CopyFile( ); if( TestImageWrite( outfilename.c_str() ) ) { std::cerr << filename << " and " << outfilename << " are different\n"; return 1; } // In theory I need to compare the two documents to check they // are identical... TODO std::cerr << filename << " and " << outfilename << " should be compatible\n"; return 0; } else { std::cerr << filename << " and " << outfilename << " are identical\n"; return 0; } #endif return 0; } } int TestImageWriter(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestImageWrite(argv[0],filename); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestImageWrite(argv[0], filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileDecompressLookupTable.cxx000664 001766 001770 00000012274 14517730450 034074 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileDecompressLookupTable.h" #include "gdcmImageApplyLookupTable.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmImageReader.h" #include "gdcmPixmapReader.h" #include "gdcmPixmapWriter.h" #include "gdcmImage.h" #include "gdcmFilename.h" // array copy/pasted from: TestImageApplyLookupTable static const char * const lutarray[][2] = { { "d613050ca0f9c924fb5282d140281fcc", "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm" }, { "d613050ca0f9c924fb5282d140281fcc", "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm" }, { "7b8d795eaf99f1fff176c43f9cf76bfb", "NM-PAL-16-PixRep1.dcm" }, { "47715f0a5d5089268bbef6f83251a8ad", "OT-PAL-8-face.dcm" }, { "c70309b66045140b8e08c11aa319c0ab", "US-PAL-8-10x-echo.dcm" }, { "c370ca934dc910eb4b629a2fa8650b67", "gdcm-US-ALOKA-16.dcm" }, { "49ca8ad45fa7f24b0406a5a03ba8aff6", "rle16loo.dcm" }, { "964ea27345a7004325896d34b257f289", "rle16sti.dcm" }, // sentinel { nullptr, nullptr } }; static int TestFileDecompressLookupTableFunc(const char *filename, bool verbose = false) { gdcm::PixmapReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const gdcm::FileMetaInformation &header = reader.GetFile().GetHeader(); gdcm::MediaStorage ms = header.GetMediaStorage(); bool isImage = gdcm::MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( gdcm::Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cout << "Could not read: " << filename << std::endl; return 1; } return 0; } const gdcm::Pixmap &image = reader.GetPixmap(); const gdcm::PhotometricInterpretation &pi = image.GetPhotometricInterpretation(); if( pi != gdcm::PhotometricInterpretation::PALETTE_COLOR ) { // yeah well not much I can do here... if( verbose ) { std::cout << "PhotometricInterpretation is: " << pi << " cannot apply LUT then..." << std::endl; } return 0; } gdcm::FileDecompressLookupTable lutfilt; lutfilt.SetPixmap( image ); lutfilt.SetFile( reader.GetFile() ); bool b = lutfilt.Change(); if( !b ) { std::cerr << "Could not apply lut: " << filename << std::endl; return 1; } // Create directory first: const char subdir[] = "TestFileDecompressLookupTable"; std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { gdcm::System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = gdcm::Testing::GetTempFilename( filename, subdir ); gdcm::PixmapWriter writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); // comment out if you dare writer.SetPixmap( lutfilt.GetPixmap() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // Let's read that file back in ! gdcm::ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Failed to read back: " << outfilename << std::endl; return 1; } gdcm::ImageApplyLookupTable lutfilt2; lutfilt2.SetInput( reader2.GetPixmap() ); b = lutfilt2.Apply(); if( !b ) { std::cerr << "Could not apply lut: " << filename << std::endl; return 1; } const gdcm::Image &img = lutfilt2.GetOutput(); unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; img.GetBuffer(buffer); gdcm::Filename fn( filename ); const char *name = fn.GetName(); unsigned int i = 0; const char *p = lutarray[i][1]; while( p != nullptr ) { if( strcmp( name, p ) == 0 ) { break; } ++i; p = lutarray[i][1]; } const char *ref = lutarray[i][0]; char digest[33] = {}; gdcm::Testing::ComputeMD5(buffer, len, digest); int res = 0; if( !ref ) { std::cerr << "Missing LUT-applied MD5 for image from: " << filename << std::endl; res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } delete[] buffer; return res; } int TestFileDecompressLookupTable(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileDecompressLookupTableFunc(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileDecompressLookupTableFunc( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader4.cxx000664 001766 001770 00000010030 14517730450 032407 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageRegionReader.h" #include "gdcmImageHelper.h" #include "gdcmFilename.h" #include "gdcmBoxRegion.h" #include "gdcmTesting.h" #include "gdcmSystem.h" static int TestImageRegionRead(const char* filename, bool verbose = false) { using gdcm::System; using gdcm::Testing; if( verbose ) std::cerr << "Reading: " << filename << std::endl; gdcm::ImageRegionReader reader; reader.SetFileName( filename ); bool canReadInformation = reader.ReadInformation(); if (!canReadInformation) { std::cerr << "Cannot ReadInformation: " << filename << std::endl; return 1; } // Create directory first: const char subdir[] = "TestImageRegionReader4"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); outfilename += ".raw"; std::ofstream of( outfilename.c_str(), std::ios::binary ); int res = 0; std::vector dims = gdcm::ImageHelper::GetDimensionsValue(reader.GetFile()); std::vector vbuffer; gdcm::BoxRegion box; for( unsigned int z = 0; z < dims[2]; ++z ) { box.SetDomain(0, dims[0] - 1, 0, dims[1] - 1, z, z); reader.SetRegion( box ); size_t len = reader.ComputeBufferLength(); if( !len ) { std::cerr << "No length for: " << filename << std::endl; return 1; } vbuffer.resize( len ); char* buffer = &vbuffer[0]; bool b = reader.ReadIntoBuffer(buffer, len); if( !b ) { std::cerr << "Could not ReadIntoBuffer" << std::endl; return 1; } of.write( buffer, len ); } of.close(); char digest[33]; bool b = gdcm::Testing::ComputeFileMD5(outfilename.c_str(), digest); if( !b ) { std::cerr << "Could not ComputeFileMD5: " << outfilename << std::endl; return 1; } const char *ref = gdcm::Testing::GetMD5FromFile(filename); if( verbose ) { std::cout << "ref=" << ref << std::endl; std::cout << "md5=" << digest << std::endl; } if( !ref ) { // new regression image needs a md5 sum std::cout << "Missing md5 " << digest << " for: " << filename << std::endl; res = 1; } else if( strcmp(digest, ref) ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Into: " << outfilename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } return res; } int TestImageRegionReader4(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestImageRegionRead(filename, true); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *extradataroot = gdcm::Testing::GetDataExtraRoot(); static const char *names[] = { "/gdcmSampleData/images_of_interest/US_512x512x2496_JPEG_BaseLine_Process_1.dcm", "/gdcmSampleData/images_of_interest/PHILIPS_Integris_V-10-MONO2-Multiframe.dcm", "/gdcmSampleData/ForSeriesTesting/MultiFramesSingleSerieXR/1.3.46.670589.7.5.10.80002138018.20001204.181556.9.1.1.dcm", "/gdcmSampleData/images_of_interest/i32.XADC.7.215MegaBytes.dcm", nullptr }; const char *filename; while( (filename = names[i]) ) { std::string fn = extradataroot; fn += filename; r += TestImageRegionRead(fn.c_str()); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageReaderPixelSpacing.cxx000664 001766 001770 00000003432 14517730450 033476 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTesting.h" #include "gdcmImageReader.h" #include "gdcmImage.h" int TestImageReaderPixelSpacing(int argc, char *argv[]) { int ret = 0; const char *filenames[] = { "CRIMAGE", "DXIMAGE", "MGIMAGE" }; const unsigned int nfiles = sizeof(filenames)/sizeof(*filenames); const char *root = gdcm::Testing::GetPixelSpacingDataRoot(); if( !root || !*root ) { std::cerr << "root is not defined" << std::endl; return 1; } std::string sroot = root; sroot += "/DISCIMG/IMAGES/"; const double spacing_ref[] = {0.5, 0.5}; for(unsigned int i = 0; i < nfiles; ++i) { std::string filename = sroot + filenames[i]; //std::cout << filename << std::endl; gdcm::ImageReader r; r.SetFileName( filename.c_str() ); if( !r.Read() ) { ret++; std::cerr << "could not read: " << filename << std::endl; } const gdcm::Image &image = r.GetImage(); const double *spacing = image.GetSpacing(); std::cout << spacing[0] << "," << spacing[1] << "," << spacing[2] << std::endl; if( spacing[0] != spacing_ref[0] || spacing[1] != spacing_ref[1] ) { std::cerr << "Wrong spacing for: " << filename << std::endl; ++ret; } } return ret; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestSplitMosaicFilter3.cxx000664 001766 001770 00000011050 14517730450 032475 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSplitMosaicFilter.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmAnonymizer.h" #include "gdcmPrivateTag.h" #include "gdcmCSAHeader.h" #include "gdcmElement.h" #include "gdcmDirectionCosines.h" int TestSplitMosaicFilter3(int , char *[]) { const char *directory = gdcm::Testing::GetDataRoot(); std::string filename = std::string(directory) + "/SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm"; gdcm::SplitMosaicFilter s; if( !gdcm::System::FileExists(filename.c_str()) ) { return 1; } gdcm::Reader reader; reader.SetFileName( filename.c_str() ); if( !reader.Read() ) { std::cerr << "could not read: " << filename << std::endl; return 1; } gdcm::SplitMosaicFilter filter; filter.SetFile( reader.GetFile() ); bool inverted; double slicenormal[3]; bool b = filter.ComputeMOSAICSliceNormal( slicenormal, inverted ); if( !b ) { std::cerr << "Could not ComputeMOSAICSliceNormal: " << filename << std::endl; return 1; } const double refnor[3] = { -0.03737130908,-0.314588168,0.9484923141 }; const double eps = 1e-6; gdcm::DirectionCosines dc; const double dot = dc.Dot( slicenormal, refnor ); if( std::fabs( 1.0 - dot ) > eps ) { std::cerr << "Invalid ComputeMOSAICSliceNormal: " << filename << std::endl; return 1; } double slicepos[3]; b = filter.ComputeMOSAICSlicePosition( slicepos, inverted ); if( !b ) { std::cerr << "Could not ComputeMOSAICSlicePosition: " << filename << std::endl; return 1; } const double refpos[3] = { -10.48860023,-7.82515782,-28.87523447 }; for( int i = 0; i < 3; ++i ) { if( std::fabs( refpos[i] - slicepos[i] ) > eps ) { std::cerr << "Invalid ComputeMOSAICSlicePosition: " << filename << std::endl; return 1; } } gdcm::CSAHeader csa; gdcm::DataSet & ds = reader.GetFile().GetDataSet(); gdcm::MrProtocol mrprot; if( !csa.GetMrProtocol(ds, mrprot)) { std::cerr << "No MrProtocol" << filename << std::endl; return 1; } gdcm::MrProtocol::SliceArray sa; b = mrprot.GetSliceArray(sa); if( !b || sa.Slices.size() != 18 ) { std::cerr << "Size" << filename << std::endl; return 1; } gdcm::MrProtocol::Slice & slice0 = sa.Slices[0]; gdcm::MrProtocol::Vector3 & p0 = slice0.Position; double pos0[3]; pos0[0] = p0.dSag; pos0[1] = p0.dCor; pos0[2] = p0.dTra; for( int i = 0; i < 3; ++i ) { if( std::fabs( refpos[i] - pos0[i] ) > eps ) { std::cerr << "Invalid slice0: " << filename << std::endl; return 1; } } gdcm::MrProtocol::Slice & slice1 = sa.Slices[1]; gdcm::MrProtocol::Vector3 & p1 = slice1.Position; double pos1[3]; pos1[0] = p1.dSag; pos1[1] = p1.dCor; pos1[2] = p1.dTra; double altnor[3]; for( int i = 0; i < 3; ++i ) { altnor[i] = pos1[i] - pos0[i]; } dc.Normalize( altnor ); const double dot2 = dc.Dot( altnor, refnor ); if( std::fabs( 1.0 - dot2 ) > eps ) { std::cerr << "Incompatible alt " << filename << std::endl; return 1; } for( int k = 0; k < 18; ++k ) { gdcm::MrProtocol::Slice & slice = sa.Slices[k]; gdcm::MrProtocol::Vector3 & nor = slice.Normal; double normal[3]; normal[0] = nor.dSag; normal[1] = nor.dCor; normal[2] = nor.dTra; for( int i = 0; i < 3; ++i ) { if( std::fabs( refnor[i] - normal[i] ) > eps ) { std::cerr << "Invalid normal: " << filename << std::endl; return 1; } } } gdcm::Anonymizer ano; ano.SetFile( reader.GetFile() ); const gdcm::PrivateTag &t1 = csa.GetCSAImageHeaderInfoTag(); ano.Remove( t1 ); unsigned int modims[3]; b = filter.ComputeMOSAICDimensions( modims ); if(! b ) { std::cerr << "ComputeMOSAICDimensions: " << filename << std::endl; return 1; } const unsigned int ref[3] = { 64u, 64u, 18u }; if( modims[0] != ref[0] || modims[1] != ref[1] || modims[2] != ref[2] ) { std::cerr << "Invalid ComputeMOSAICDimensions " << filename << std::endl; return 1; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader1.cxx000664 001766 001770 00000010515 14517730450 032414 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageRegionReader.h" #include "gdcmImageHelper.h" #include "gdcmFilename.h" #include "gdcmBoxRegion.h" #include "gdcmTesting.h" static int TestImageRegionRead(const char* filename, bool verbose = false) { if( verbose ) std::cerr << "Reading: " << filename << std::endl; gdcm::ImageRegionReader reader; gdcm::Filename fn( filename ); // DMCPACS_ExplicitImplicit_BogusIOP.dcm is very difficult to handle since // we need to read 3 attribute to detect the "well known" bug. However the third // attribute is (b500,b700) which make ReadUpToTag(7fe0,0010) fails... if( strcmp(fn.GetName(), "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0 || strcmp(fn.GetName(), "SC16BitsAllocated_8BitsStoredJ2K.dcm" ) == 0 // mismatch pixel format in JPEG 2000 vs DICOM || strcmp(fn.GetName(), "SC16BitsAllocated_8BitsStoredJPEG.dcm" ) == 0 // mismatch pixel format in JPEG vs DICOM || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 // bogus JPEG cannot be streamed || strcmp(fn.GetName(), "US-YBR_FULL_422-EVRLE.dcm" ) == 0 // FIXME TODO // FIXME: we should be able to handle those at some point: || strcmp(fn.GetName(), "JPEGNote_empty.dcm" ) == 0 || strcmp(fn.GetName(), "JPEGNote_missing.dcm" ) == 0 || strcmp(fn.GetName(), "JPEGNote_bogus.dcm" ) == 0 ) { std::cerr << "Skipping impossible file: " << filename << std::endl; return 0; } reader.SetFileName( filename ); bool canReadInformation = reader.ReadInformation(); if (!canReadInformation) { //std::cerr << "Cannot ReadInformation: " << filename << std::endl; return 0; //unable to read tags as expected. } int res = 0; //std::cout << reader.GetFile().GetDataSet() << std::endl; std::vector dims = gdcm::ImageHelper::GetDimensionsValue(reader.GetFile()); gdcm::BoxRegion box; box.SetDomain(0, dims[0] - 1, 0, dims[1] - 1, 0, dims[2] - 1); reader.SetRegion( box ); size_t len = reader.ComputeBufferLength(); if( !len ) { std::cerr << "No length for: " << filename << std::endl; return 1; } std::vector vbuffer; vbuffer.resize( len ); char* buffer = vbuffer.data(); bool b = reader.ReadIntoBuffer(buffer, len); if( !b ) { std::cerr << "Could not ReadIntoBuffer: " << filename << std::endl; return 1; } #if 0 std::ofstream of( "/tmp/dd.raw", std::ios::binary ); of.write( buffer, len ); of.close(); #endif const char *ref = gdcm::Testing::GetMD5FromFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); // FIXME: PC=1 if( strcmp(fn.GetName(), "ACUSON-24-YBR_FULL-RLE-b.dcm" ) == 0) ref = "2d7a28cae6c3b3183284d1b4ae08307f"; if( strcmp(fn.GetName(), "ACUSON-24-YBR_FULL-RLE.dcm" ) == 0) ref = "429f31f0b70bd515b3feeda5dea5eac0"; if( verbose ) { if(ref) std::cout << "ref=" << ref << std::endl; std::cout << "md5=" << digest << std::endl; } if( !ref ) { // new regression image needs a md5 sum std::cout << "Missing md5 " << digest << " for: " << filename << std::endl; res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } return res; } int TestImageRegionReader1(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestImageRegionRead(filename, true); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestImageRegionRead(filename); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestAnonymizeEvent.cxx000664 001766 001770 00000001246 14517730450 031776 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAnonymizeEvent.h" int TestAnonymizeEvent(int, char *[]) { gdcm::AnonymizeEvent ae; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestIPPSorter3.cxx000664 001766 001770 00000006506 14517730450 030741 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmIPPSorter.h" #include "gdcmDirectory.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmTrace.h" #include "gdcmReader.h" #include "gdcmWriter.h" int TestIPPSorter3(int , char *[]) { const char *directory = gdcm::Testing::GetDataRoot(); std::vector filenames; // let's take 4 files that can be sorted: std::string file0 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm"; std::string file1 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm"; std::string file2 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm"; std::string file3 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm"; // Make a fake copy: const char * reference = file0.c_str(); gdcm::Reader reader; reader.SetFileName( reference ); if( !reader.Read() ) return 1; // Create directory first: const char subdir[] = "TestIPPSorter3"; std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { gdcm::System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = gdcm::Testing::GetTempFilename( reference, subdir ); // Tweak the orientation just a little: // [001.000000E+00\-0.000000E+00\-0.000000E+00\00.000000E+00\01.000000E+00\-0.000000E+00] gdcm::Writer writer; writer.SetFileName( outfilename.c_str() ); //const char iop_orig[] = "1\\-0\\-0\\0\\1\\-0"; const char iop[] = R"(1\-0\-0\0\0.99999\0.00001)"; gdcm::DataElement de( gdcm::Tag(0x0020,0x0037) ); de.SetByteValue( iop, (uint32_t)strlen( iop ) ); reader.GetFile().GetDataSet().Replace( de ); writer.SetFile( reader.GetFile() ); if( !writer.Write() ) { return 1; } // let's push them in random order (oh my god how are we going to succeed ??) filenames.push_back( file1 ); filenames.push_back( file3 ); filenames.push_back( outfilename ); filenames.push_back( file2 ); //filenames.push_back( file0 ); gdcm::IPPSorter s; s.SetComputeZSpacing( true ); s.SetZSpacingTolerance( 1e-10 ); s.SetDirectionCosinesTolerance( 1e-6 ); bool b = s.Sort( filenames ); if( b ) { std::cerr << "Success to sort (we should have failed): " << directory << std::endl; return 1; } // Lower the threshold: s.SetDirectionCosinesTolerance( 1e-5 ); b = s.Sort( filenames ); if( !b ) { std::cerr << "Failed to sort: " << directory << std::endl; return 1; } // std::cout << "Sorting succeeded:" << std::endl; // s.Print( std::cout ); double zspacing = s.GetZSpacing(); if(!zspacing) { std::cerr << "computation of ZSpacing failed." << std::endl; return 1; } std::cout << "Found z-spacing:" << std::endl; std::cout << s.GetZSpacing() << std::endl; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestCurve.cxx000664 001766 001770 00000001621 14517730450 030104 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmCurve.h" int TestCurve(int, char *[]) { gdcm::Curve c; c.SetTypeOfData( "TAC" ); //c.SetTypeOfData( "PROF" ); //c.SetTypeOfData( "PRESSURE" ); //c.SetTypeOfData( "RESP" ); //c.SetTypeOfData( "dummy" ); std::cout << c.GetTypeOfData() << std::endl; std::cout << c.GetTypeOfDataDescription() << std::endl; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageChangeTransferSyntax6.cxx000664 001766 001770 00000012300 14517730450 034146 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageChangeTransferSyntax.h" #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmFileMetaInformation.h" #include "gdcmTesting.h" #include "gdcmByteSwap.h" namespace gdcm { int TestImageChangeTransferSyntaxRAWBE(const char *filename, bool verbose = false) { ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const FileMetaInformation &header = reader.GetFile().GetHeader(); MediaStorage ms = header.GetMediaStorage(); bool isImage = MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } else { // not an image give up... std::cerr << "Problem with: " << filename << " but that's ok" << std::endl; return 0; } } const gdcm::Image &image = reader.GetImage(); //const TransferSyntax &ts = reader.GetFile().GetHeader().GetDataSetTransferSyntax(); gdcm::ImageChangeTransferSyntax change; change.SetTransferSyntax( gdcm::TransferSyntax::ExplicitVRBigEndian ); change.SetInput( image ); bool b = change.Change(); if( !b ) { std::cerr << "Could not change the Transfer Syntax: " << filename << std::endl; return 1; } // Create directory first: const char subdir[] = "TestImageChangeTransferSyntax6"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); ImageWriter writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); // increase test goal writer.SetImage( change.GetOutput() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // Let's read that file back in ! ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not even reread our generated file : " << outfilename << std::endl; return 1; } // Check that after decompression we still find the same thing: int res = 0; const gdcm::Image &img = reader2.GetImage(); //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; bool res2 = img.GetBuffer(buffer); if( !res2 ) { std::cerr << "could not get buffer: " << outfilename << std::endl; return 1; } // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: #ifdef GDCM_WORDS_BIGENDIAN if( img.GetPixelFormat().GetBitsAllocated() == 16 ) { assert( !(len % 2) ); assert( img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME1 || img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME2 ); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem( (unsigned short*)buffer, gdcm::SwapCode::LittleEndian, len/2); } #endif const char *ref = gdcm::Testing::GetMD5FromFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( !ref ) { // new regression image needs a md5 sum std::cerr << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } if(res) { std::cerr << "problem with: " << outfilename << std::endl; } if( verbose ) { std::cout << "file was written in: " << outfilename << std::endl; } delete[] buffer; return res; } } // end namespace gdcm int TestImageChangeTransferSyntax6(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestImageChangeTransferSyntaxRAWBE(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestImageChangeTransferSyntaxRAWBE( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestIPPSorter.cxx000664 001766 001770 00000005034 14517730450 030651 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmIPPSorter.h" #include "gdcmDirectory.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmTrace.h" int TestIPPSorter(int argc, char *argv[]) { const char *directory = gdcm::Testing::GetDataRoot(); std::vector filenames; if( argc == 2 ) { gdcm::Trace::DebugOn(); directory = argv[1]; if( gdcm::System::FileIsDirectory( directory ) ) { gdcm::Directory d; unsigned int nfiles = d.Load( directory ); // no recursion d.Print( std::cout ); std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; filenames = d.GetFilenames(); } else { std::cerr << "file:" << directory << " is not a directory" << std::endl; return 1; } } else { // default execution (nightly test) // let's take 4 files that can be sorted: std::string file0 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm"; std::string file1 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm"; std::string file2 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm"; std::string file3 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm"; // let's push them in random order (oh my god how are we going to succeed ??) filenames.push_back( file1 ); filenames.push_back( file3 ); filenames.push_back( file2 ); filenames.push_back( file0 ); } gdcm::IPPSorter s; s.SetComputeZSpacing( true ); s.SetZSpacingTolerance( 1e-10 ); bool b = s.Sort( filenames ); if( !b ) { std::cerr << "Failed to sort: " << directory << std::endl; return 1; } std::cout << "Sorting succeeded:" << std::endl; s.Print( std::cout ); double zspacing = s.GetZSpacing(); if(!zspacing) { std::cerr << "computation of ZSpacing failed." << std::endl; return 1; } std::cout << "Found z-spacing:" << std::endl; std::cout << s.GetZSpacing() << std::endl; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestCoder.cxx000664 001766 001770 00000001430 14517730450 030052 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmCoder.h" namespace gdcm { class DummyCoder : public Coder { public: bool CanCode(TransferSyntax const &) const override { return false; } }; } int TestCoder(int, char *[]) { gdcm::DummyCoder c; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageChangeTransferSyntax3.cxx000664 001766 001770 00000013335 14517730450 034154 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageChangeTransferSyntax.h" #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmFileMetaInformation.h" #include "gdcmTesting.h" #include "gdcmByteSwap.h" #include "gdcmImageChangePlanarConfiguration.h" namespace gdcm { int TestImageChangeTransferSyntaxRLE(const char *filename, bool verbose = false) { ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const FileMetaInformation &header = reader.GetFile().GetHeader(); MediaStorage ms = header.GetMediaStorage(); bool isImage = MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } else { // not an image give up... std::cerr << "Problem with: " << filename << " but that's ok" << std::endl; return 0; } } const gdcm::Image &image = reader.GetImage(); unsigned int oldpc = image.GetPlanarConfiguration(); gdcm::ImageChangeTransferSyntax change; change.SetTransferSyntax( gdcm::TransferSyntax::RLELossless ); change.SetInput( image ); bool b = change.Change(); if( !b ) { unsigned short ba = reader.GetImage().GetPixelFormat().GetBitsAllocated(); if( ba == 12 ) { std::cerr << "fail to change, but that's ok" << std::endl; return 0; } std::cerr << "Could not change the Transfer Syntax: " << filename << std::endl; return 1; } // Create directory first: const char subdir[] = "TestImageChangeTransferSyntax3"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); ImageWriter writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); // important for palette + mf writer.SetImage( change.GetOutput() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // Let's read that file back in ! ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not even reread our generated file : " << outfilename << std::endl; return 1; } // Check that after decompression we still find the same thing: int res = 0; const gdcm::Image &img = reader2.GetImage(); unsigned int newpc = img.GetPlanarConfiguration(); //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; bool res2; if( oldpc != newpc ) { gdcm::ImageChangePlanarConfiguration icpc; icpc.SetPlanarConfiguration( oldpc ); icpc.SetInput( img ); if( !icpc.Change() ) { return 1; } res2 = icpc.GetOutput().GetBuffer(buffer); } else { res2 = img.GetBuffer(buffer); } if( !res2 ) { std::cerr << "could not get buffer: " << outfilename << std::endl; return 1; } // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: #ifdef GDCM_WORDS_BIGENDIAN if( img.GetPixelFormat().GetBitsAllocated() == 16 ) { assert( !(len % 2) ); assert( img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME1 || img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME2 ); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem( (unsigned short*)buffer, gdcm::SwapCode::LittleEndian, len/2); } #endif const char *ref = gdcm::Testing::GetMD5FromFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( !ref ) { // new regression image needs a md5 sum std::cerr << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } if(res) { std::cerr << "problem with: " << outfilename << std::endl; } if( verbose ) { std::cout << "file was written in: " << outfilename << std::endl; } delete[] buffer; return res; } } // end namespace gdcm int TestImageChangeTransferSyntax3(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestImageChangeTransferSyntaxRLE(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestImageChangeTransferSyntaxRLE( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageReaderRandomEmpty.cxx000664 001766 001770 00000006567 14517730450 033363 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageReader.h" #include "gdcmFileMetaInformation.h" #include "gdcmSystem.h" #include "gdcmWriter.h" #include "gdcmFilename.h" #include "gdcmAnonymizer.h" #include "gdcmByteSwap.h" #include "gdcmTrace.h" #include "gdcmTesting.h" #include int TestImageReaderRandomEmptyFunc(const char *subdir, const char* filename, bool verbose = false, bool lossydump = false) { (void)lossydump; if( verbose ) std::cerr << "Reading: " << filename << std::endl; gdcm::ImageReader reader; reader.SetFileName( filename ); if( !reader.Read() ) { return 0;//this is NOT a test of the ImageReader read function //this is a test of the anonymizer. As such, if the reader can't read this file, //that should be handled in the TestImageReader test, NOT here. //There is a lot of logic involved in testing non-standard images that should not be //duplicated here. } const gdcm::File &file = reader.GetFile(); const gdcm::DataSet &ds = file.GetDataSet(); const gdcm::FileMetaInformation &fmi = file.GetHeader(); gdcm::DataSet::ConstIterator it = ds.Begin(); // Create directory first: std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { gdcm::System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = gdcm::Testing::GetTempFilename( filename, subdir ); int ret = 0; int i = 0; for( ; it != ds.End(); ++it, ++i ) { //std::cout << "Processing Tag: " << *it << std::endl; gdcm::Writer writer; gdcm::File &filecopy = writer.GetFile(); filecopy.SetDataSet( ds ); filecopy.SetHeader( fmi ); gdcm::Anonymizer ano; ano.SetFile( filecopy ); ano.Empty( it->GetTag() ); //std::ostringstream os; //os << "/tmp/ddd"; //os << i; //os << ".dcm"; //std::string outfn = os.str(); std::string outfn = outfilename; writer.SetFile( ano.GetFile() ); writer.CheckFileMetaInformationOff(); // FIXME ? writer.SetFileName( outfn.c_str() ); if( !writer.Write() ) { std::cerr << "Could not write: " << outfn << std::endl; ret++; } gdcm::ImageReader readercopy; readercopy.SetFileName( outfn.c_str() ); readercopy.Read(); } return ret; } int TestImageReaderRandomEmpty(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestImageReaderRandomEmptyFunc(argv[0], filename, true); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestImageReaderRandomEmptyFunc( argv[0], filename); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageChangeTransferSyntax7.cxx000664 001766 001770 00000014527 14517730450 034164 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageChangeTransferSyntax.h" #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmFileMetaInformation.h" #include "gdcmTesting.h" #include "gdcmByteSwap.h" namespace gdcm { int TestImageChangeTransferSyntaxIM2RAWBE(const char *filename, bool verbose = false) { ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const FileMetaInformation &header = reader.GetFile().GetHeader(); MediaStorage ms = header.GetMediaStorage(); bool isImage = MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } else { // not an image give up... std::cerr << "Problem with: " << filename << " but that's ok" << std::endl; return 0; } } const gdcm::Image &image = reader.GetImage(); gdcm::ImageChangeTransferSyntax change; change.SetTransferSyntax( gdcm::TransferSyntax::ImplicitVRLittleEndian ); change.SetInput( image ); bool b = change.Change(); if( !b ) { std::cerr << "Could not change the Transfer Syntax: " << filename << std::endl; return 1; } // Create directory first: const char subdir[] = "TestImageChangeTransferSyntax7"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); ImageWriter writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); // increase test goal writer.SetImage( change.GetOutput() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // Let's read that file back in ! ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not even reread our generated file : " << outfilename << std::endl; return 1; } gdcm::ImageChangeTransferSyntax change2; change2.SetTransferSyntax( gdcm::TransferSyntax::ExplicitVRBigEndian ); const gdcm::Image &image2 = reader2.GetImage(); change2.SetInput( image2 ); b = change2.Change(); if( !b ) { std::cerr << "Could not change the Transfer Syntax: " << outfilename << std::endl; return 1; } // Create directory first: const char subdir2[] = "TestImageChangeTransferSyntax7_2"; std::string tmpdir2 = Testing::GetTempDirectory( subdir2 ); if( !System::FileIsDirectory( tmpdir2.c_str() ) ) { System::MakeDirectory( tmpdir2.c_str() ); //return 1; } std::string outfilename2 = Testing::GetTempFilename( filename, subdir2 ); ImageWriter writer2; writer2.SetFileName( outfilename2.c_str() ); writer2.SetFile( reader2.GetFile() ); // increase test goal writer2.SetImage( change2.GetOutput() ); if( !writer2.Write() ) { std::cerr << "Failed to write: " << outfilename2 << std::endl; return 1; } // Let's read that file back in ! ImageReader reader3; reader3.SetFileName( outfilename2.c_str() ); if ( !reader3.Read() ) { std::cerr << "Could not even reread our generated file : " << outfilename2 << std::endl; return 1; } // Check that after decompression we still find the same thing: int res = 0; const gdcm::Image &img = reader3.GetImage(); //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; bool res2 = img.GetBuffer(buffer); if( !res2 ) { std::cerr << "could not get buffer: " << outfilename << std::endl; return 1; } // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: #ifdef GDCM_WORDS_BIGENDIAN if( img.GetPixelFormat().GetBitsAllocated() == 16 ) { assert( !(len % 2) ); assert( img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME1 || img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME2 ); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem( (unsigned short*)buffer, gdcm::SwapCode::LittleEndian, len/2); } #endif const char *ref = gdcm::Testing::GetMD5FromFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( !ref ) { // new regression image needs a md5 sum std::cerr << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } if(res) { std::cerr << "problem with: " << outfilename2 << std::endl; } if( verbose ) { std::cout << "file was written in: " << outfilename2 << std::endl; } delete[] buffer; return res; } } // end namespace gdcm int TestImageChangeTransferSyntax7(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestImageChangeTransferSyntaxIM2RAWBE(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestImageChangeTransferSyntaxIM2RAWBE( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFloatingPointDouble.cxx000664 001766 001770 00000002031 14517730450 032724 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include #include #include #include int TestFloatingPointDouble(int, char *[]) { // Not applicable const char strnan[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x7F}; const char strinf[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x7F}; double inf = std::numeric_limits::infinity(); double nan = std::numeric_limits::quiet_NaN(); std::cout << inf << std::endl; std::cout << nan << std::endl; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestIconImageGenerator2.cxx000664 001766 001770 00000044205 14517730450 032611 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmFileMetaInformation.h" #include "gdcmTesting.h" #include "gdcmByteSwap.h" #include "gdcmIconImageGenerator.h" static const char * const iconimagearray2[][2] = { {"7e097b4a57af6a823bd692e37b131b1c" , "SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs.acr" }, {"7f2638cea652bf3452ada158d2ea67c4" , "gdcm-MR-SIEMENS-16-2.acr" }, {"da0922a02f8e763ec878089617e0bc4c" , "test.acr" }, {"e75ee90f23db1952a593393cdfaaf99f" , "MR-MONO2-12-an2.acr" }, {"c9c46afd186531850af9576cf54c800b" , "CT-MONO2-12-lomb-an2.acr" }, {"feb10d9a28e5166a3baf9ec6ef4f460a" , "LIBIDO-8-ACR_NEMA-Lena_128_128.acr" }, {"f9d8a0796ebf5a6aabddb4e133d09770" , "gdcm-ACR-LibIDO.acr" }, {"a1bce65e11c5fd2e26f7b38ebfdd1c53" , "libido1.0-vol.acr" }, {"9edea7caea2b85aad952d35c64f1e092" , "SIEMENS_CSA2.dcm" }, {"011d1f2abd9e27a2dc5d013bd4848104" , "gdcm-JPEG-LossLessThoravision.dcm" }, {"ddb7e67d119eb2ce14731cd9007e36cc" , "XA-MONO2-8-12x-catheter.dcm" }, {"1041bae356da40d2113210ff2adef923" , "gdcm-MR-PHILIPS-16-Multi-Seq.dcm" }, {"a3a6b3bf75ccdc91f82effc60d005688" , "PHILIPS_GDCM12xBug.dcm" }, {"a247e2ca32279956079c9a87403bd157" , "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm" }, {"48b19e53bffc8feab8671fd23c869028" , "D_CLUNIE_CT1_J2KI.dcm" }, {"3f7cae9b920adb3ca4a96ace2c0c91d7" , "rle16sti.dcm" }, {"f706f740496e445ee59141b15f3baeb4" , "3E768EB7.dcm" }, {"b38c113fffa4925f6f06a928b357f6a1" , "D_CLUNIE_MR2_JPLY.dcm" }, {"c3d3a218fcec778476090bce4c8b3201" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm" }, {"882a7327bab05d88571dcf29f902adf3" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm" }, {"7944f0f8eb06466099fe6cd792ae8bfa" , "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm" }, {"af193ff3143f299826d55e00696b3218" , "LEADTOOLS_FLOWERS-16-MONO2-Uncompressed.dcm" }, {"b9b499634bdaff3be7710722f75d9b5d" , "D_CLUNIE_MR3_JPLY.dcm" }, {"e8b529fbe615b4c540318695913d02e7" , "D_CLUNIE_VL2_RLE.dcm" }, {"8393213bd2c340a8cbd639f45a6b497e" , "OsirixFake16BitsStoredFakeSpacing.dcm" }, {"205a3ba253b61bf5ebb374523c366ccb" , "GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm" }, {"c265bf6c3bf4417987ff81b92ca4ca6c" , "MR_SIEMENS_forceLoad29-1010_29-1020.dcm" }, {"fa7da45d1a8eb16b092880ceff5a50e5" , "fffc0000UN.dcm" }, {"796594769ee3570292de36fdb4509df1" , "LIBIDO-24-ACR_NEMA-Rectangle.dcm" }, {"32b10fd4f13cfb4d74e1145f166e9dae" , "IM-0001-0066.CommandTag00.dcm" }, {"619f8c1650962cddf7695e39f43e8c49" , "D_CLUNIE_NM1_JPLY.dcm" }, {"205a3ba253b61bf5ebb374523c366ccb" , "D_CLUNIE_CT1_J2KR.dcm" }, {"30a530ea4df623cbec31f752637e234b" , "TheralysGDCM120Bug.dcm" }, {"3120b59e3635a912c6a60897f734b2ff" , "SIEMENS_MAGNETOM-12-MONO2-VRUN.dcm" }, {"5bdb2335ceb2dac83c2248d6ff8e0a49" , "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm" }, {"30ff6655c5eb98ad34cd20836418a5a7" , "ALOKA_SSD-8-MONO2-RLE-SQ.dcm" }, {"992e4ef2b01f9d79514d7ab22c354be9" , "GE_GENESIS-16-MONO2-WrongLengthItem.dcm" }, {"d4669bd89971c1affd311c7d1d8b20c7" , "US-RGB-8-esopecho.dcm" }, {"85124dd05ab0567aecaf896373f780da" , "D_CLUNIE_MR4_RLE.dcm" }, {"07964ed19883cb96460d1407795f4306" , "D_CLUNIE_MR2_JPLL.dcm" }, {"096547f2834609ae4dbc115169806fc4" , "SIEMENS_Sonata-16-MONO2-Value_Multiplicity.dcm" }, {"af193ff3143f299826d55e00696b3218" , "LEADTOOLS_FLOWERS-16-MONO2-JpegLossless.dcm" }, {"da7002947725a950c3226cd23aa8d718" , "CT-MONO2-16-ankle.dcm" }, {"1a27a48d4efe2999b83bc89d3003d05c" , "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm" }, {"feb10d9a28e5166a3baf9ec6ef4f460a" , "simpleImageWithIcon.dcm" }, {"aeb28d2cfb5376e2bb1ac4aac0b4807c" , "CR-MONO1-10-chest.dcm" }, {"205a3ba253b61bf5ebb374523c366ccb" , "D_CLUNIE_CT1_RLE.dcm" }, {"4d469f85f51b3b81bdf38ebba23a68e7" , "D_CLUNIE_NM1_JPLL.dcm" }, {"8ffdae8852e9388369935d65b8afa408" , "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm" }, {"abe1950da247d18196fe5bea54cb26f1" , "NM-MONO2-16-13x-heart.dcm" }, {"6bd67bbd6e3e65808db8598fe0913f86" , "US-IRAD-NoPreambleStartWith0003.dcm" }, {"99672e03104c9176595bc0002cd8edf8" , "MR-MONO2-16-head.dcm" }, {"1a27a48d4efe2999b83bc89d3003d05c" , "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm" }, {"af8491953e762c12feb93a80a1575edf" , "MAROTECH_CT_JP2Lossy.dcm" }, {"932281859be22ffae33a2669b34cc2e6" , "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm" }, {"fb5402472ee00639ef8dc1b09692c299" , "US-PAL-8-10x-echo.dcm" }, {"038acb53133733a9f2c54528b8029511" , "MR-SIEMENS-DICOM-WithOverlays.dcm" }, {"890d0a5afdbf77398d857b523f86e83a" , "D_CLUNIE_MR1_JPLL.dcm" }, {"205a3ba253b61bf5ebb374523c366ccb" , "D_CLUNIE_CT1_JPLL.dcm" }, {"7e971371b523cc1db53f3fc7f2ac5441" , "AMIInvalidPrivateDefinedLengthSQasUN.dcm" }, {"7944f0f8eb06466099fe6cd792ae8bfa" , "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm" }, {"3443eba48f11dd9aadb4632c8c896b39" , "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" }, {"b72e483ad977e18b8016c7cc916c4bbd" , "D_CLUNIE_SC1_JPLY.dcm" }, {"582df1a47c5992cc4f37496dab8c5130" , "gdcm-MR-PHILIPS-16-NonSquarePixels.dcm" }, {"8a5d13f6c85b2eebc1c02432d729cd45" , "SIEMENS-MR-RGB-16Bits.dcm" }, {"aacd6f6257e068cf53cdec5c7e172513" , "US-IRAD-NoPreambleStartWith0005.dcm" }, {"6a9ecd676ce47b0fda111a804b58b054" , "PICKER-16-MONO2-Nested_icon.dcm" }, {"9b720fd0aa079bc2f3f9545bd0e207c6" , "gdcm-JPEG-Extended.dcm" }, {"c790d0a462907135c1991f10a4846f98" , "D_CLUNIE_US1_RLE.dcm" }, {"4689c053642dcee7a2a9d0475c1b6528" , "D_CLUNIE_RG2_JPLY.dcm" }, {"b3b8a60e7b7b20c029eec1d5006e2b9c" , "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm" }, {"91533007e5e07353012dea33149d920f" , "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm" }, {"c8902cc14f285f2687866f60e45c7d86" , "TG18-CH-2k-01.dcm" }, {"af193ff3143f299826d55e00696b3218" , "LEADTOOLS_FLOWERS-16-MONO2-RLE.dcm" }, {"27daf49ec13f58db1d800fc58378852e" , "OT-PAL-8-face.dcm" }, {"07fef244d4e14358d453c144770b2a55" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossy.dcm" }, {"ad96e04c3c50d463cccdfca68b49b071" , "SIEMENS_MAGNETOM-12-MONO2-Uncompressed.dcm" }, {"620f0b67a91f7f74151bc5be745b7110" , "GDCMJ2K_TextGBR.dcm" }, {"d1f5dfac9c3213f548df6a1f9e86acd0" , "MR16BitsAllocated_8BitsStored.dcm" }, {"dab7df42898362213062eb0d493eb38e" , "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm" }, {"205a3ba253b61bf5ebb374523c366ccb" , "D_CLUNIE_CT1_JLSL.dcm" }, {"719505e71eafd643fa2e114acc83496f" , "ELSCINT1_JP2vsJ2K.dcm" }, {"7132fec8839d9c8b26cba4a4f17000da" , "D_CLUNIE_XA1_JPLL.dcm" }, {"cdf5908902fb63e321b224fae86a4128" , "SIEMENS_Sonata-12-MONO2-SQ.dcm" }, {"bc1774acbf5c025aa3b57184213cc98c" , "JPEGDefinedLengthSequenceOfFragments.dcm" }, {"e9faa2ce59db8563d7abe50432f91351" , "PHILIPS_GDCM12xBug2.dcm" }, {"620f0b67a91f7f74151bc5be745b7110" , "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm" }, {"52d0b90aa78a20cbff6b0beb3bd2c2b3" , "D_CLUNIE_RG2_JPLL.dcm" }, {"50dd1ae0bf918a9144b50229fa04f8e0" , "FUJI-10-MONO1-ACR_NEMA_2.dcm" }, {"d7e55bf3c6eb7a627823b532bcac7e16" , "D_CLUNIE_MR1_JPLY.dcm" }, {"7132fec8839d9c8b26cba4a4f17000da" , "D_CLUNIE_XA1_RLE.dcm" }, {"ddb5ac3f32badb154ce9a8a18c09c2c0" , "BugGDCM2_UndefItemWrongVL.dcm" }, {"7f2638cea652bf3452ada158d2ea67c4" , "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm" }, {"477d801b27ef3cb21a8685cedbc9b12e" , "JDDICOM_Sample2.dcm" }, {"cae77b420f407118f288c14eeb81e11f" , "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm" }, {"524014ef866b31e3fd2e33a6148d31bb" , "DCMTK_JPEGExt_12Bits.dcm" }, {"84ea2f46ad98332a06875da922709007" , "US-MONO2-8-8x-execho.dcm" }, {"19d6f17c8a0b2cd04049828dcb304046" , "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" }, {"bee28068ae9edef69fef792583b3e20f" , "ACUSON-24-YBR_FULL-RLE-b.dcm" }, {"b171f7581c9cf15b2d32cfd62e9b6038" , "gdcm-US-ALOKA-16.dcm" }, {"80be78c9365f6a1604191dd703c84ac5" , "DX_J2K_0Padding.dcm" }, {"a9a72d44b888fb4f1f727af88109cfb3" , "D_CLUNIE_CT2_RLE.dcm" }, {"151376fcac2fbd55c3b5c5a155e16d26" , "D_CLUNIE_RG1_JPLL.dcm" }, {"e0a3fd5917c5a13a16981e1d0346af4d" , "D_CLUNIE_VL3_RLE.dcm" }, {"28ea47a62e1f2ca9d7dcd10ef868701d" , "NM_Kakadu44_SOTmarkerincons.dcm" }, {"e95cec3c8078cea91b287e45d751cf78" , "CT-SIEMENS-Icone-With-PaletteColor.dcm" }, {"eacd1cabeaf78554804ca627344cba91" , "GE_DLX-8-MONO2-PrivateSyntax.dcm" }, {"8f40712ff8e4a7691be144d884546a17" , "CT_16b_signed-UsedBits13.dcm" }, {"da9fb19d564fa01e4633df5c105f5a58" , "D_CLUNIE_RG3_JPLY.dcm" }, {"6510f44ff1dd8daf9b49100fd2c81d85" , "DX_GE_FALCON_SNOWY-VOI.dcm" }, {"5a15bd50c589c9611636dc7813493c03" , "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm" }, {"4948235091edc01603344f79a29835e1" , "CT-MONO2-16-brain.dcm" }, {"c2de60330cda14759a117b937a7e5a95" , "D_CLUNIE_VL4_RLE.dcm" }, {"db07030ff68debba674a6ca5c3e6eeb3" , "D_CLUNIE_MR3_RLE.dcm" }, {"72f55d5cf022e983783185195b77d0e6" , "undefined_length_un_vr.dcm" }, {"a8e2e35044384f31afc1dcf9163154ff" , "CT-MONO2-16-ort.dcm" }, {"0fefcf91a55062f1cb20945b3f726eda" , "05148044-mr-siemens-avanto-syngo.dcm" }, {"5d6aaab5766479ec6e27de4eaa4a6438" , "GE_LOGIQBook-8-RGB-HugePreview.dcm" }, {"acad4e43da617035315bcddc4bbb96bd" , "RadBWLossLess.dcm" }, {"b69e23b6479de4d9c3b4ed51aa748f73" , "KODAK-12-MONO1-Odd_Terminated_Sequence.dcm" }, {"e8458a5483e72cced4d46f93eed1699e" , "CT-MONO2-16-chest.dcm" }, {"728a698e308f7863ba3d103b80dffc45" , "PhilipsInteraSeqTermInvLen.dcm" }, {"35144f65c704edf2d69abc40405c3ea7" , "D_CLUNIE_MR4_JPLY.dcm" }, {"904b38f362b86f626ea7d89eed455709" , "D_CLUNIE_RG3_JPLL.dcm" }, {"707e26b0fa27f670c35ca5cc2bf3eda2" , "MR_Philips-Intera_BreaksNOSHADOW.dcm" }, {"04b97df84da7a126be30993cf9cff942" , "GE_CT_With_Private_compressed-icon.dcm" }, {"04cb0299587f38ba369e1fdcbf07dc25" , "D_CLUNIE_CT1_JLSN.dcm" }, {"3120b59e3635a912c6a60897f734b2ff" , "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm" }, {"cee47e57f6b1aaace74bb813e33a74eb" , "00191113.dcm" }, {"99ba02caa6813cafd254f97fb8377f60" , "MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm" }, {"0a9449186ab107120640910a58a38ec4" , "SignedShortLosslessBug.dcm" }, {"2b306840879792f3509e1c1ccedee81d" , "GE_DLX-8-MONO2-Multiframe.dcm" }, {"fde7dc022ec854a98ffdc2190ceef424" , "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm" }, {"f4b5fc5cc1440b865f1a99b85b170ecd" , "LJPEG_BuginGDCM12.dcm" }, {"ba2717c0d839213e788a74cccf37f1d4" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm" }, {"904b38f362b86f626ea7d89eed455709" , "D_CLUNIE_RG3_RLE.dcm" }, {"5e51e64ee21c2f643c13257e054c2990" , "CT-SIEMENS-MissingPixelDataInIconSQ.dcm" }, {"07964ed19883cb96460d1407795f4306" , "MR-MONO2-12-shoulder.dcm" }, {"0b818ac3983d76cfdc535a46058a1a53" , "LEADTOOLS_FLOWERS-24-RGB-Uncompressed.dcm" }, {"7f7aaee92f20ffcd64bebf8ce105bf5d" , "PICKER-16-MONO2-No_DicomV3_Preamble.dcm" }, {"fde3b9c4853c597383fab1050b491202" , "SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm" }, {"ba0654f3e7aae75bca8fc24705ddb78a" , "CT-MONO2-8-abdo.dcm" }, {"db07030ff68debba674a6ca5c3e6eeb3" , "D_CLUNIE_MR3_JPLL.dcm" }, {"03f25fb3e6e8ae53b9565553e2026a66" , "D_CLUNIE_VL6_RLE.dcm" }, {"af193ff3143f299826d55e00696b3218" , "LEADTOOLS_FLOWERS-8-MONO2-RLE.dcm" }, {"d46afca30969faa05583e87b0f6e5211" , "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm" }, {"5885ade0feaaf967f5a1c22724c10d02" , "SIEMENS-12-Jpeg_Process_2_4-Lossy-a.dcm" }, {"13758e32fe34c17b897efcbd26e7e03b" , "gdcm-JPEG-LossLess3a.dcm" }, {"1e61c6d50ae3ef3ac0550277f166bd1c" , "D_CLUNIE_XA1_JPLY.dcm" }, {"151376fcac2fbd55c3b5c5a155e16d26" , "D_CLUNIE_RG1_RLE.dcm" }, {"e77b93eb953f2a21fa75d257da0514fb" , "US-RGB-8-epicard.dcm" }, {"a101ddd933114bcc0145d047d74f41c9" , "GE_MR_0025xx1bProtocolDataBlock.dcm" }, {"b9f48f54e75b7f1994cfe1a7152d9ab5" , "rle16loo.dcm" }, {"cc61470afd2b80014749abbb5bd9109d" , "DMCPACS_ExplicitImplicit_BogusIOP.dcm" }, {"a9a72d44b888fb4f1f727af88109cfb3" , "D_CLUNIE_CT2_JPLL.dcm" }, {"477d801b27ef3cb21a8685cedbc9b12e" , "JDDICOM_Sample2-dcmdjpeg.dcm" }, {"7944f0f8eb06466099fe6cd792ae8bfa" , "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm" }, {"323c2919ea590363dd6eb4105a2566a7" , "KODAK_CompressedIcon.dcm" }, {"486199008daf27f167efee9469fffd52" , "ACUSON-24-YBR_FULL-RLE.dcm" }, {"07964ed19883cb96460d1407795f4306" , "D_CLUNIE_MR2_RLE.dcm" }, {"b53c440c32a7bd20d24cc1997bd7c9e6" , "JPEG_LossyYBR.dcm" }, {"23bf148e163ea7d3f1dbadfc590618fe" , "012345.002.050.dcm" }, {"52d0b90aa78a20cbff6b0beb3bd2c2b3" , "D_CLUNIE_RG2_RLE.dcm" }, {"e44869a1044b611e08a9f1396432a44b" , "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm" }, {"f92d6349e1d80bbdba34a9e1b84eb737" , "SIEMENS_ImageLocationUN.dcm" }, {"7944f0f8eb06466099fe6cd792ae8bfa" , "PHILIPS_Intera-16-MONO2-Uncompress.dcm" }, {"0e82ac528c72a2dd69fa1b52e5370d82" , "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm" }, {"0b818ac3983d76cfdc535a46058a1a53" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossless.dcm" }, {"91b4da2ca9fd378ca404580c84c62984" , "US-GE-4AICL142.dcm" }, {"2ff486489d600e0ab5f8c829960c516f" , "D_CLUNIE_SC1_RLE.dcm" }, {"85124dd05ab0567aecaf896373f780da" , "D_CLUNIE_MR4_JPLL.dcm" }, {"ece67fa0c8a99f8147b26081252cd0a5" , "MR-Brucker-CineTagging-NonSquarePixels.dcm" }, {"bdf48b10871ac0b3c14587eaba9ca998" , "MR-MONO2-8-16x-heart.dcm" }, {"0c65a403a0a24957e523bb29e84c31ef" , "LEADTOOLS_FLOWERS-8-MONO2-JpegLossy.dcm" }, {"f92a60ad3cbc2783db57cac5f800a9c0" , "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm" }, {"4d469f85f51b3b81bdf38ebba23a68e7" , "D_CLUNIE_NM1_RLE.dcm" }, {"20e2f6cc2b60ae26adfdd3b3ee0e1915" , "D_CLUNIE_VL1_RLE.dcm" }, {"84462b24809f4e9d151c7c27004f7922" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm" }, {"620f0b67a91f7f74151bc5be745b7110" , "DermaColorLossLess.dcm" }, {"72e203ca5756f4491d84d8240c82a59b" , "OT-MONO2-8-a7.dcm" }, {"890d0a5afdbf77398d857b523f86e83a" , "D_CLUNIE_MR1_RLE.dcm" }, {"af193ff3143f299826d55e00696b3218" , "LEADTOOLS_FLOWERS-8-MONO2-Uncompressed.dcm" }, {"cee47e57f6b1aaace74bb813e33a74eb" , "00191113.dcm" }, {"07b6f4e2fba920d28e2f29dbb037b640" , "TOSHIBA_J2K_SIZ1_PixRep0.dcm" }, {"93f60acbb450c62992a1db09a6c19c05" , "TOSHIBA_J2K_OpenJPEGv2Regression.dcm" }, {"fa02ad71bdf3e6970e18fc9a9df03a2d" , "TOSHIBA_J2K_SIZ0_PixRep1.dcm" }, {"3475cb96e0308cb84502be1c1531b588" , "NM-PAL-16-PixRep1.dcm" }, {"2ec6d7c60d6786665cff2b7a31aaeedf" , "MEDILABInvalidCP246_EVRLESQasUN.dcm" }, {"54b1cec013420f771142ca6ec6c274a4" , "JPEGInvalidSecondFrag.dcm" }, // sentinel { 0, 0 } }; namespace gdcm { int TestIconImageGenerate2(const char *subdir, const char* filename, bool verbose = false) { ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const FileMetaInformation &header = reader.GetFile().GetHeader(); MediaStorage ms = header.GetMediaStorage(); bool isImage = MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } else { // not an image give up... std::cerr << "Problem with: " << filename << " but that's ok" << std::endl; return 0; } } // Create directory first: std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); IconImageGenerator iig; iig.SetPixmap( reader.GetImage() ); iig.AutoPixelMinMax(true); const unsigned int idims[2] = { 64, 64 }; //const unsigned int idims[2] = { 600,430 }; iig.SetOutputDimensions( idims ); bool b = iig.Generate(); gdcm::Filename fn( filename ); const char *name = fn.GetName(); unsigned int i = 0; const char *p = iconimagearray2[i][1]; while( p != 0 ) { if( strcmp( name, p ) == 0 ) { break; } ++i; p = iconimagearray2[i][1]; } const char *refmd5 = iconimagearray2[i][0]; if( b ) { const gdcm::IconImage &icon = iig.GetIconImage(); if( verbose ) icon.Print( std::cout ); unsigned long len = icon.GetBufferLength(); std::vector< char > vbuffer; vbuffer.resize( len ); char *buffer = &vbuffer[0]; bool res2 = icon.GetBuffer(buffer); if( !res2 ) { std::cerr << "res2 failure:" << filename << std::endl; return 1; } char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); Image & img = reader.GetImage(); img.SetIconImage( iig.GetIconImage() ); ImageWriter writer; writer.SetFileName( outfilename.c_str() ); #if 1 writer.SetImage( img ); #else Image &ii = writer.GetImage(); (Bitmap&)ii = iig.GetIconImage(); #endif if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } if( verbose ) { std::cout << "success: " << outfilename << std::endl; std::cout << "ref=" << refmd5 << std::endl; std::cout << "md5=" << digest << std::endl; } if( !refmd5 ) { std::cerr << " missing md5= {\"" << digest << "\" , \"" << name << "\" }," << std::endl; return 1; } if( strcmp( refmd5, digest) ) { std::cerr << "Problem with : " << name << " " << refmd5 << " vs " << digest << std::endl; return 1; } } else { assert( refmd5 == 0 ); std::cerr << "Could not generate Icon for: " << filename << std::endl; return 1; } return 0; } } int TestIconImageGenerator2(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestIconImageGenerate2(argv[0],filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestIconImageGenerate2(argv[0], filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageRegionReader3.cxx000664 001766 001770 00000011761 14517730450 032422 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageRegionReader.h" #include "gdcmImageHelper.h" #include "gdcmFilename.h" #include "gdcmBoxRegion.h" #include "gdcmTesting.h" static int TestImageRegionRead(const char* filename, bool verbose = false) { using gdcm::System; using gdcm::Testing; if( verbose ) std::cerr << "Reading: " << filename << std::endl; gdcm::Filename fn( filename ); // DMCPACS_ExplicitImplicit_BogusIOP.dcm is very difficult to handle since // we need to read 3 attribute to detect the "well known" bug. However the third // attribute is (b500,b700) which make ReadUpToTag(7fe0,0010) fails... if( strcmp(fn.GetName(), "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0 || strcmp(fn.GetName(), "SC16BitsAllocated_8BitsStoredJ2K.dcm" ) == 0 // mismatch pixel format in JPEG 2000 vs DICOM || strcmp(fn.GetName(), "SC16BitsAllocated_8BitsStoredJPEG.dcm" ) == 0 // mismatch pixel format in JPEG vs DICOM || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 // bogus JPEG cannot be streamed || strcmp(fn.GetName(), "US-YBR_FULL_422-EVRLE.dcm" ) == 0 // FIXME TODO // FIXME: we should be able to handle those at some point: || strcmp(fn.GetName(), "JPEGNote_empty.dcm" ) == 0 || strcmp(fn.GetName(), "JPEGNote_missing.dcm" ) == 0 || strcmp(fn.GetName(), "JPEGNote_bogus.dcm" ) == 0 ) { std::cerr << "Skipping impossible file: " << filename << std::endl; return 0; } gdcm::ImageRegionReader reader; reader.SetFileName( filename ); bool canReadInformation = reader.ReadInformation(); if (!canReadInformation) { std::cerr << "Cannot ReadInformation: " << filename << std::endl; return 0; //unable to read tags as expected. } // Create directory first: const char subdir[] = "TestImageRegionReader3"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); outfilename += ".raw"; std::ofstream of( outfilename.c_str(), std::ios::binary ); int res = 0; std::vector dims = gdcm::ImageHelper::GetDimensionsValue(reader.GetFile()); std::vector vbuffer; gdcm::BoxRegion box; for( unsigned int z = 0; z < dims[2]; ++z ) { const unsigned int xdelta = dims[0] / 1; const unsigned int ydelta = dims[1] / 4; size_t zlen; bool b; for( unsigned int y = 0; y < 4; ++y ) { unsigned int maxy = ydelta + y * ydelta; if( y == 3 ) maxy = dims[1]; box.SetDomain(0, xdelta - 1, 0 + y * ydelta, (unsigned int)(maxy - 1), z, z); reader.SetRegion(box); zlen = reader.ComputeBufferLength(); assert( zlen ); vbuffer.resize( zlen ); char* buffer = vbuffer.data(); b = reader.ReadIntoBuffer(buffer, zlen); if( !b ) return 1; assert( zlen ); of.write( buffer, zlen ); } } of.close(); char digest[33]; bool b = gdcm::Testing::ComputeFileMD5(outfilename.c_str(), digest); if( !b ) { std::cerr << "Could not ComputeFileMD5: " << outfilename << std::endl; return 1; } const char *ref = gdcm::Testing::GetMD5FromFile(filename); // FIXME: PC=1 if( strcmp(fn.GetName(), "ACUSON-24-YBR_FULL-RLE-b.dcm" ) == 0) ref = "2d7a28cae6c3b3183284d1b4ae08307f"; if( strcmp(fn.GetName(), "ACUSON-24-YBR_FULL-RLE.dcm" ) == 0) ref = "429f31f0b70bd515b3feeda5dea5eac0"; if( verbose ) { std::cout << "ref=" << ref << std::endl; std::cout << "md5=" << digest << std::endl; } if( !ref ) { // new regression image needs a md5 sum std::cout << "Missing md5 " << digest << " for: " << filename << std::endl; res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } return res; } int TestImageRegionReader3(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestImageRegionRead(filename, true); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestImageRegionRead(filename); ++i; } return r; } Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageChangePhotometricInterpretation.cxx000664 001766 001770 00000007007 14517730450 036243 0ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageChangePhotometricInterpretation.h" #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmTesting.h" #include "gdcmSystem.h" namespace gdcm { PhotometricInterpretation InvertPI(PhotometricInterpretation pi) { assert( pi == PhotometricInterpretation::MONOCHROME1 || pi == PhotometricInterpretation::MONOCHROME2 ); if( pi == PhotometricInterpretation::MONOCHROME1 ) { return PhotometricInterpretation::MONOCHROME2; } return PhotometricInterpretation::MONOCHROME1; } } int TestImageChangePhotometricInterpretationFunc(const char *filename, bool verbose = false) { gdcm::ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const gdcm::FileMetaInformation &header = reader.GetFile().GetHeader(); gdcm::MediaStorage ms = header.GetMediaStorage(); bool isImage = gdcm::MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( gdcm::Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cout << "Could not read: " << filename << std::endl; return 1; } return 0; } const gdcm::Image &image = reader.GetImage(); //unsigned int pc = image.GetPlanarConfiguration(); gdcm::PhotometricInterpretation pi = image.GetPhotometricInterpretation(); if( pi != gdcm::PhotometricInterpretation::MONOCHROME1 && pi != gdcm::PhotometricInterpretation::MONOCHROME2 ) { // nothing to do: return 0; } gdcm::PhotometricInterpretation invert_pi = gdcm::InvertPI(pi); gdcm::ImageChangePhotometricInterpretation pcfilt; pcfilt.SetInput( image ); pcfilt.SetPhotometricInterpretation( invert_pi ); bool b = pcfilt.Change(); if( !b ) { std::cerr << "Could not apply pcfilt: " << filename << std::endl; return 1; } // Create directory first: const char subdir[] = "TestImageChangePhotometricInterpretation"; std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { gdcm::System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = gdcm::Testing::GetTempFilename( filename, subdir ); gdcm::ImageWriter writer; writer.SetFileName( outfilename.c_str() ); //writer.SetFile( reader.GetFile() ); // increase test goal writer.SetImage( pcfilt.GetOutput() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } return 0; } int TestImageChangePhotometricInterpretation(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestImageChangePhotometricInterpretationFunc(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestImageChangePhotometricInterpretationFunc( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageChangePlanarConfiguration.cxx000664 001766 001770 00000013350 14517730450 035040 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageChangePlanarConfiguration.h" #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmTesting.h" #include "gdcmFilename.h" #include "gdcmByteSwap.h" #include "gdcmSystem.h" int TestImageChangePlanarConfigurationFunc(const char *filename, bool verbose = false) { (void)verbose; gdcm::ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const gdcm::FileMetaInformation &header = reader.GetFile().GetHeader(); gdcm::MediaStorage ms = header.GetMediaStorage(); bool isImage = gdcm::MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( gdcm::Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cout << "Could not read: " << filename << std::endl; return 1; } return 0; } const gdcm::Image &image = reader.GetImage(); unsigned int oldpc = image.GetPlanarConfiguration(); assert( oldpc == 1 || oldpc == 0 ); gdcm::ImageChangePlanarConfiguration pcfilt; pcfilt.SetPlanarConfiguration( !oldpc ); pcfilt.SetInput( image ); bool b = pcfilt.Change(); if( !b ) { unsigned short ba = reader.GetImage().GetPixelFormat().GetBitsAllocated(); if( ba == 12 ) { std::cerr << "fail to change, but that's ok" << std::endl; return 0; } std::cerr << "Could not apply pcfilt: " << filename << std::endl; return 1; } // Create directory first: const char subdir[] = "TestImageChangePlanarConfiguration"; std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { gdcm::System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = gdcm::Testing::GetTempFilename( filename, subdir ); gdcm::ImageWriter writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); // important writer.SetImage( pcfilt.GetOutput() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // Let's read that file back in ! gdcm::ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not even reread our generated file : " << outfilename << std::endl; return 1; } // Check that after decompression we still find the same thing: int res = 0; const gdcm::Image &img = reader2.GetImage(); //unsigned int newpc = img.GetPlanarConfiguration(); //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; bool res2; { gdcm::ImageChangePlanarConfiguration icpc; icpc.SetPlanarConfiguration( oldpc ); icpc.SetInput( img ); if( !icpc.Change() ) { return 1; } res2 = icpc.GetOutput().GetBuffer(buffer); } if( !res2 ) { std::cerr << "could not get buffer: " << outfilename << std::endl; return 1; } // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: #ifdef GDCM_WORDS_BIGENDIAN if( img.GetPixelFormat().GetBitsAllocated() == 16 ) { assert( !(len % 2) ); assert( img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME1 || img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME2 ); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem( (unsigned short*)buffer, gdcm::SwapCode::LittleEndian, len/2); } #endif const char *ref = gdcm::Testing::GetMD5FromFile(filename); // FIXME: PC=1 gdcm::Filename fn( filename ); if( strcmp(fn.GetName(), "ACUSON-24-YBR_FULL-RLE-b.dcm" ) == 0) ref = "2d7a28cae6c3b3183284d1b4ae08307f"; if( strcmp(fn.GetName(), "ACUSON-24-YBR_FULL-RLE.dcm" ) == 0) ref = "429f31f0b70bd515b3feeda5dea5eac0"; char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( !ref ) { // new regression image needs a md5 sum std::cerr << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } if(res) { std::cerr << "problem with: " << outfilename << std::endl; } if( verbose ) { std::cout << "file was written in: " << outfilename << std::endl; } delete[] buffer; return 0; } int TestImageChangePlanarConfiguration(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestImageChangePlanarConfigurationFunc(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestImageChangePlanarConfigurationFunc( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestCleaner2.cxx000664 001766 001770 00000012363 14517730450 030460 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmCleaner.h" #include "gdcmFilename.h" #include "gdcmReader.h" #include "gdcmSmartPointer.h" #include "gdcmSystem.h" #include "gdcmTesting.h" #include "gdcmWriter.h" namespace gdcm { static const DataSet &GetNestedDataSet(const DataSet &ds, const PrivateTag &path) { const DataElement &de = ds.GetDataElement(path); SmartPointer sqi = de.GetValueAsSQ(); assert(sqi && sqi->GetNumberOfItems() == 1); const Item &item = sqi->GetItem(1); const DataSet &subds = item.GetNestedDataSet(); return subds; } static bool IsTagIn(const DataSet &ds, const PrivateTag &path, const PrivateTag &pt) { const DataSet &subds = GetNestedDataSet(ds, path); return subds.FindDataElement(pt); } static bool IsTagEmpty(const DataSet &ds, const PrivateTag &path, const PrivateTag &pt) { const DataSet &subds = GetNestedDataSet(ds, path); if (!subds.FindDataElement(pt)) return false; const DataElement &de = subds.GetDataElement(pt); return de.IsEmpty(); } } // namespace gdcm int TestCleaner2Impl(std::string const &filename, std::string const &outfilename, bool useDPath) { using namespace gdcm; // Setup DPath DPath dpath1, dpath2; PrivateTag pt1, pt2; // This attribute is a SQ. make sure we can Empty a SQ: static const char ref1[] = "0029,e0,SPI-P-Private_ICS Release 1;4"; static const char ref2[] = "0029,00,SPI-P-Private_ICS Release 1;1"; if (useDPath) { if (!dpath1.ConstructFromString(ref1)) { return 1; } if (!dpath2.ConstructFromString(ref2)) { return 1; } } if (!pt1.ReadFromCommaSeparatedString(ref1)) { return 1; } if (!pt2.ReadFromCommaSeparatedString(ref2)) { return 1; } PrivateTag path1(0x0029, 0xf, "SPI-P-Private_ICS Release 1"); PrivateTag path2(0x0029, 0xcd, "SPI-P-Private_ICS Release 1;1"); PrivateTag path3(0x0029, 0x1b, "SPI-P-Private_ICS Release 1"); PrivateTag path4(0x0029, 0x4c, "SPI-P-Private_ICS Release 1"); // first pass { Reader reader; reader.SetFileName(filename.c_str()); if (!reader.Read()) { std::cerr << "Could not read: " << filename << std::endl; return 1; } File &file = reader.GetFile(); DataSet &ds = file.GetDataSet(); const bool b0 = IsTagIn(ds, path4, pt1); const bool b1 = IsTagIn(ds, path1, pt2); const DataSet &ds1 = GetNestedDataSet(ds, path1); const bool b2 = IsTagIn(ds1, path2, pt2); const bool b3 = IsTagIn(ds, path3, pt2); const bool b4 = IsTagIn(ds, path4, pt2); if (!b0 || !b1 || !b2 || !b3 || !b4) { std::cerr << "Test not setup correctly" << std::endl; return 1; } Cleaner cleaner; cleaner.SetFile(file); cleaner.RemoveAllGroupLength(false); if (useDPath) { if (!cleaner.Empty(dpath1)) { return 1; } if (!cleaner.Empty(dpath2)) { return 1; } } else { if (!cleaner.Empty(pt1)) { return 1; } if (!cleaner.Empty(pt2)) { return 1; } } if (!cleaner.Clean()) { return 1; } Writer writer; writer.SetFileName(outfilename.c_str()); writer.SetFile(cleaner.GetFile()); if (!writer.Write()) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } } // re-read, written out: { Reader reader; reader.SetFileName(outfilename.c_str()); if (!reader.Read()) { std::cerr << "Could not read: " << outfilename << std::endl; return 1; } File &file = reader.GetFile(); DataSet &ds = file.GetDataSet(); const bool b0 = IsTagEmpty(ds, path4, pt1); const bool b1 = IsTagEmpty(ds, path1, pt2); const DataSet &ds1 = GetNestedDataSet(ds, path1); const bool b2 = IsTagEmpty(ds1, path2, pt2); const bool b3 = IsTagEmpty(ds, path3, pt2); const bool b4 = IsTagEmpty(ds, path4, pt2); if (!b0 || !b1 || !b2 || !b3 || !b4) { std::cerr << "At least one tag was not empty" << std::endl; return 1; } } return 0; } int TestCleaner2(int, char *[]) { using namespace gdcm; const char *directory = gdcm::Testing::GetDataRoot(); std::string sfilename = std::string(directory) + "/PhilipsInteraSeqTermInvLen.dcm"; const char *filename = sfilename.c_str(); // Create directory first: const char subdir[] = "TestCleaner2"; std::string tmpdir = Testing::GetTempDirectory(subdir); if (!System::FileIsDirectory(tmpdir.c_str())) { System::MakeDirectory(tmpdir.c_str()); } std::string outfilename = Testing::GetTempFilename(filename, subdir); int res1 = 0; // TestCleaner2Impl(filename, outfilename, true); int res2 = TestCleaner2Impl(filename, outfilename, false); return res1 + res2; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestWaveform.cxx000664 001766 001770 00000001304 14517730450 030604 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmWaveform.h" int TestWaveform(int argc, char *argv[]) { (void)argc; (void)argv; gdcm::Waveform w; (void)w; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestScanner2_2.cxx000664 001766 001770 00000003714 14517730450 030721 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmScanner2.h" #include "gdcmDirectory.h" #include "gdcmSystem.h" #include "gdcmTesting.h" #include "gdcmTrace.h" int TestScanner2_2(int argc, char *argv[]) { gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); const char *directory = gdcm::Testing::GetDataRoot(); if( argc == 2 ) { directory = argv[1]; } if( !gdcm::System::FileIsDirectory(directory) ) { std::cerr << "No such directory: " << directory << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( directory ); // no recursion std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::Scanner2 s; const gdcm::Tag t2(0x0020,0x000e); // Series Instance UID s.AddPublicTag( t2 ); bool b = s.Scan( d.GetFilenames() ); if( !b ) { std::cerr << "Scanner2 failed" << std::endl; return 1; } gdcm::Directory::FilenamesType const & files = s.GetFilenames(); if( files != d.GetFilenames() ) { return 1; } const char str1[] = "1.3.12.2.1107.5.2.4.7630.20010301125744000008"; gdcm::Directory::FilenamesType fns = s.GetAllFilenamesFromPublicTagToValue(t2, str1); // all SIEMENS_MAGNETOM-12-MONO2-FileSeq*.dcm: if( fns.size() != 4 ) return 1; const char str2[] = "1.3.12.2.1107.5.2.4.7630.2001030112574400000"; fns = s.GetAllFilenamesFromPublicTagToValue(t2, str2); if( !fns.empty() ) return 1; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestDICOMDIR.cxx000664 001766 001770 00000001515 14517730450 030214 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDICOMDIR.h" #include "gdcmFileSet.h" int TestDICOMDIR(int argc, char *argv[]) { (void)argc; (void)argv; gdcm::DICOMDIR dd; gdcm::FileSet fs; gdcm::File f1; gdcm::File f2; fs.AddFile( f1 ); fs.AddFile( f2 ); gdcm::DICOMDIR dd2(fs); return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileDerivation.cxx000664 001766 001770 00000007455 14517730450 031737 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileDerivation.h" #include "gdcmReader.h" #include "gdcmWriter.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmUIDGenerator.h" int TestFileDerive(const char *subdir, const char* filename) { using namespace gdcm; Reader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } FileDerivation fd; fd.SetFile( reader.GetFile() ); // Setup some actions: // TODO we should reference the original image File &file = reader.GetFile(); DataSet &ds = file.GetDataSet(); if( !ds.FindDataElement( Tag(0x0008,0x0016) ) || ds.GetDataElement( Tag(0x0008,0x0016) ).IsEmpty() ) { std::cerr << "Missing sop class giving up: " << filename << std::endl; return 0; } if( !ds.FindDataElement( Tag(0x0008,0x0018) ) || ds.GetDataElement( Tag(0x0008,0x0018) ).IsEmpty() ) { std::cerr << "Missing sop instance giving up: " << filename << std::endl; return 0; } const DataElement &sopclassuid = ds.GetDataElement( Tag(0x0008,0x0016) ); const DataElement &sopinstanceuid = ds.GetDataElement( Tag(0x0008,0x0018) ); // Make sure that const char* pointer will be properly padded with \0 char: std::string sopclassuid_str( sopclassuid.GetByteValue()->GetPointer(), sopclassuid.GetByteValue()->GetLength() ); std::string sopinstanceuid_str( sopinstanceuid.GetByteValue()->GetPointer(), sopinstanceuid.GetByteValue()->GetLength() ); fd.AddReference( sopclassuid_str.c_str(), sopinstanceuid_str.c_str() ); // CID 7202 Source Image Purposes of Reference // {"DCM",121320,"Uncompressed predecessor"}, fd.SetPurposeOfReferenceCodeSequenceCodeValue( 121320 ); // CID 7203 Image Derivation // { "DCM",113040,"Lossy Compression" }, fd.SetDerivationCodeSequenceCodeValue( 113040 ); fd.SetDerivationDescription( "lossy conversion" ); if( !fd.Derive() ) { std::cerr << "Failed to derive: " << filename << std::endl; if( ds.FindDataElement( Tag(0x8,0x2112) ) ) { return 0; } return 1; } // Create directory first: std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); Writer writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // now let's try to read it back in: Reader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not reread written file: " << outfilename << std::endl; return 1; } return 0; } int TestFileDerivation( int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileDerive( argv[0], filename); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileDerive( argv[0], filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageWriter2.cxx000664 001766 001770 00000014430 14517730450 031323 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageWriter.h" #include "gdcmImageReader.h" #include "gdcmImage.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmTrace.h" #include "gdcmAttribute.h" /* Let's test the relation in between lossless transfer syntax and lossless compressed stream. D_CLUNIE_CT1_J2KR.dcm D_CLUNIE_CT1_J2KI.dcm D_CLUNIE_MR1_JPLL.dcm D_CLUNIE_MR1_JPLY.dcm D_CLUNIE_CT1_JLSL.dcm D_CLUNIE_CT1_JLSN.dcm */ struct LossLessTest { const char *lossyfile; const char *losslessfile; gdcm::TransferSyntax::TSType lossyts; gdcm::TransferSyntax::TSType losslessts; }; static const LossLessTest LossLessTestArray[] = { { "/D_CLUNIE_CT1_J2KI.dcm", "/D_CLUNIE_CT1_J2KR.dcm", gdcm::TransferSyntax::JPEG2000, gdcm::TransferSyntax::JPEG2000Lossless }, { "/D_CLUNIE_MR1_JPLY.dcm", "/D_CLUNIE_MR1_JPLL.dcm", gdcm::TransferSyntax::JPEGExtendedProcess2_4, gdcm::TransferSyntax::JPEGLosslessProcess14_1 }, { "/D_CLUNIE_CT1_JLSN.dcm", "/D_CLUNIE_CT1_JLSL.dcm", gdcm::TransferSyntax::JPEGLSNearLossless, gdcm::TransferSyntax::JPEGLSLossless } }; int TestImageWriter2(int , char *[]) { const char *directory = gdcm::Testing::GetDataRoot(); gdcm::Trace::WarningOff(); static const unsigned int ntests = sizeof( LossLessTestArray ) / sizeof( *LossLessTestArray ); for( unsigned int test = 0; test < ntests; ++test ) { const LossLessTest <est = LossLessTestArray[test]; const char *j2k_filename1 = ltest.lossyfile; const char *j2k_filename2 = ltest.losslessfile; //const char j2k_filename1[] = "/D_CLUNIE_CT1_J2KI.dcm"; //const char j2k_filename2[] = "/D_CLUNIE_CT1_J2KR.dcm"; std::string filename_lossy = directory; filename_lossy += j2k_filename1; std::string filename_lossless = directory; filename_lossless += j2k_filename2; // Create directory first: const char subdir[] = "TestImageWriter2"; std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { gdcm::System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename_lossy = gdcm::Testing::GetTempFilename( filename_lossy.c_str(), subdir ); std::string outfilename_lossless = gdcm::Testing::GetTempFilename( filename_lossless.c_str(), subdir ); { gdcm::ImageReader reader; reader.SetFileName( filename_lossy.c_str() ); if( !reader.Read() ) { return 1; } gdcm::Image &ir = reader.GetImage(); if( !ir.IsLossy() ) { std::cerr << "Image is not lossy" << std::endl; std::cerr << filename_lossy << std::endl; return 1; } //if( ir.GetTransferSyntax() != gdcm::TransferSyntax::JPEG2000 ) if( ir.GetTransferSyntax() != ltest.lossyts ) { std::cerr << filename_lossy << " " << filename_lossless << std::endl; std::cerr << ir.GetTransferSyntax() << " vs " << gdcm::TransferSyntax::GetTSString( ltest.lossyts ) << std::endl; return 1; } //ir.SetTransferSyntax( gdcm::TransferSyntax::JPEG2000Lossless ); ir.SetTransferSyntax( ltest.losslessts ); gdcm::ImageWriter writer; writer.SetImage( ir ); writer.SetFileName( outfilename_lossy.c_str() ); // We should never authorized writing of image that was lossy compress and declare as lossless if( writer.Write() ) { gdcm::Attribute<0x0028,0x2110> at; at.Set( writer.GetFile().GetDataSet() ); if( at.GetValue() != "01" ) { std::cerr << "We should never authorize writing of image that was lossy " "compress and declare as lossless" << std::endl; std::cerr << filename_lossy << " " << filename_lossless << std::endl; return 1; } } } // But the contrary is ok: { gdcm::ImageReader reader; reader.SetFileName( filename_lossless.c_str() ); if( !reader.Read() ) { return 1; } gdcm::Image &ir = reader.GetImage(); //if( ir.GetTransferSyntax() != gdcm::TransferSyntax::JPEG2000Lossless ) if( ir.GetTransferSyntax() != ltest.losslessts ) { return 1; } //ir.SetTransferSyntax( gdcm::TransferSyntax::JPEG2000 ); ir.SetTransferSyntax( ltest.lossyts ); gdcm::ImageWriter writer; writer.SetImage( ir ); writer.SetFileName( outfilename_lossless.c_str() ); // It is ok to save a lossless file and declare transfer syntax to JPEG2000 if( !writer.Write() ) { return 1; } } } #if 0 const gdcm::Image &ir = reader.GetImage(); gdcm::Image image; image.SetNumberOfDimensions( ir.GetNumberOfDimensions() ); const unsigned int *dims = ir.GetDimensions(); image.SetDimension(0, dims[0] ); image.SetDimension(1, dims[1] ); const gdcm::PixelFormat &pixeltype = ir.GetPixelFormat(); image.SetPixelFormat( pixeltype ); const gdcm::PhotometricInterpretation &pi = ir.GetPhotometricInterpretation(); image.SetPhotometricInterpretation( pi ); unsigned long len = image.GetBufferLength(); assert( len = ir.GetBufferLength() ); std::vector buffer; buffer.resize(len); // black image gdcm::ByteValue *bv = new gdcm::ByteValue(buffer); gdcm::DataElement pixeldata( gdcm::Tag(0x7fe0,0x0010) ); pixeldata.SetValue( *bv ); image.SetDataElement( pixeldata ); const char filename[] = "toto.dcm"; gdcm::ImageWriter writer; writer.SetImage( image ); writer.SetFileName( filename ); gdcm::File& file = writer.GetFile(); gdcm::DataSet& ds = file.GetDataSet(); gdcm::DataElement de( gdcm::Tag(0x0010,0x0010) ); const char s[] = "GDCM^Rocks"; de.SetByteValue( s, strlen( s ) ); ds.Insert( de ); if( !writer.Write() ) { return 1; } return 0; #endif return 0; } Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageChangePhotometricInterpretation2.cxx000664 001766 001770 00000006053 14517730450 036325 0ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageChangePhotometricInterpretation.h" #include #include template double diff(T rgb1[3], T rgb2[2]) { double sum = 0; for(int i = 0; i < 3; ++i) sum += fabs((double)(rgb1[i] - rgb2[i])); return sum < 1e-3 ? 0 : sum; //return sum; } int TestImageChangePhotometricInterpretation2(int argc, char *argv[]) { //typedef float Type; //typedef double Type; //typedef int Type; typedef unsigned char Type; double sdiff = 0; double max = 0; int nerrors = 0; int res = 0; Type error[3] = {}; Type error2[3] = {}; Type yerror[3] = {}; for(int r = 0; r < 256; ++r) for(int g = 0; g < 256; ++g) for(int b = 0; b < 256; ++b) { Type rgb[3]; Type ybr[3] = {}; Type rgb2[3] = {}; rgb[0] = r; rgb[1] = g; rgb[1] = 128; rgb[2] = b; rgb[2] = 128; // convert rgb 2 ybr: //gdcm::ImageChangePhotometricInterpretation::RGB2YBR(ybr,rgb); gdcm::ImageChangePhotometricInterpretation::YBR2RGB(ybr,rgb); // convert back: //gdcm::ImageChangePhotometricInterpretation::YBR2RGB(rgb2,ybr); gdcm::ImageChangePhotometricInterpretation::RGB2YBR(rgb2,ybr); if( memcmp(rgb,rgb2,3*sizeof(Type)) != 0 ) { //std::cerr << "Problem with R,G,B=" << r << "," << g << "," << b << //" instead of " << (int)rgb2[0] << "," << (int)rgb2[1] << "," << (int)rgb2[2] << std::endl; //std::cerr << "diff:" << diff(rgb,rgb2) << std::endl; double d = diff(rgb,rgb2); sdiff += d; if( d > max ) { error2[0] = rgb2[0]; error2[1] = rgb2[1]; error2[2] = rgb2[2]; error[0] = rgb[0]; error[1] = rgb[1]; error[2] = rgb[2]; yerror[0] = ybr[0]; yerror[1] = ybr[1]; yerror[2] = ybr[2]; } max = std::max(d,max); res = 1; ++nerrors; } } std::cerr << "nerrors=" << nerrors << std::endl; std::cerr << "sdiff=" << sdiff<< std::endl; std::cerr << "max=" << max << std::endl; std::cerr << "max error=" << (double)error[0] << "," << (double)error[1] << "," << (double)error[2] << std::endl; std::cerr << "max error2=" << (double)error2[0] << "," << (double)error2[1] << "," << (double)error2[2] << std::endl; std::cerr << "max yerror=" << (double)yerror[0] << "," << (double)yerror[1] << "," << (double)yerror[2] << std::endl; return res; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestCleaner1.cxx000664 001766 001770 00000012403 14517730450 030452 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmCSAHeader.h" #include "gdcmCleaner.h" #include "gdcmFilename.h" #include "gdcmReader.h" #include "gdcmSmartPointer.h" #include "gdcmSystem.h" #include "gdcmTesting.h" #include "gdcmWriter.h" namespace gdcm { static std::pair ComputeMD5CSADecoded( const DataSet &ds, const PrivateTag &pt) { std::pair ret; CSAHeader csa; char digest1[33]; char digest2[33]; if (ds.FindDataElement(pt)) { const DataElement &de = ds.GetDataElement(pt); const ByteValue *bv = de.GetByteValue(); if (!Testing::ComputeMD5(bv->GetPointer(), bv->GetLength(), digest1)) return ret; if (!csa.LoadFromDataElement(de)) return ret; if (csa.GetFormat() != CSAHeader::SV10) return ret; std::ostringstream os; csa.Print(os); std::string str = os.str(); if (!Testing::ComputeMD5(str.c_str(), str.size(), digest2)) return ret; ret.first = digest1; ret.second = digest2; } return ret; } } // namespace gdcm int TestCleaner1Impl(std::string const &filename, std::string const &outfilename, bool useDPath) { using namespace gdcm; // reference digest of decoded csa: const std::string ref1 = "ff225133ae107e4e8ee0ba1972016e0c"; const std::string ref2 = "860bf885643a9a40e6d4bd468f8fd6c4"; // first pass { Reader reader; reader.SetFileName(filename.c_str()); if (!reader.Read()) { std::cerr << "Could not read: " << filename << std::endl; return 1; } File &file = reader.GetFile(); DataSet &ds = file.GetDataSet(); const std::string raw1 = "42efe9d2b2611d88039ce76a0d5eeb42"; const std::string raw2 = "938bbc5c001fb24e37b97dbffbd83ff7"; CSAHeader csa; const PrivateTag &t1 = csa.GetCSAImageHeaderInfoTag(); const PrivateTag &t2 = csa.GetCSASeriesHeaderInfoTag(); const std::pair digests1 = ComputeMD5CSADecoded(ds, t1); const std::pair digests2 = ComputeMD5CSADecoded(ds, t2); if (digests1.first != raw1 || digests2.first != raw2) { std::cerr << "bogus digest" << std::endl; return 1; } if (digests1.second != ref1 || digests2.second != ref2) { std::cerr << "bogus digest" << std::endl; return 1; } // Setup DPath DPath dpath1, dpath2; if (!dpath1.ConstructFromString("/0029,10,SIEMENS CSA HEADER") || !dpath2.ConstructFromString("/0029,20,SIEMENS CSA HEADER")) { return 1; } Cleaner cleaner; cleaner.SetFile(file); if (useDPath) { if (!cleaner.Scrub(dpath1)) { return 1; } if (!cleaner.Scrub(dpath2)) { return 1; } } else { if (!cleaner.Scrub(t1)) { return 1; } if (!cleaner.Scrub(t2)) { return 1; } } if (!cleaner.Clean()) { return 1; } Writer writer; writer.SetFileName(outfilename.c_str()); writer.SetFile(cleaner.GetFile()); if (!writer.Write()) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } } // re-read, written out: { Reader reader; reader.SetFileName(outfilename.c_str()); if (!reader.Read()) { std::cerr << "Could not read: " << outfilename << std::endl; return 1; } File &file = reader.GetFile(); DataSet &ds = file.GetDataSet(); const std::string raw1 = "c712f47d79928578a724f36420342fc1"; const std::string raw2 = "3a33733b8dc87cb5f80eccf0aeb784f5"; CSAHeader csa; const PrivateTag &t1 = csa.GetCSAImageHeaderInfoTag(); const PrivateTag &t2 = csa.GetCSASeriesHeaderInfoTag(); const std::pair digests1 = ComputeMD5CSADecoded(ds, t1); const std::pair digests2 = ComputeMD5CSADecoded(ds, t2); if (digests1.first != raw1 || digests2.first != raw2) { std::cerr << "bogus digest" << std::endl; return 1; } if (digests1.second != ref1 || digests2.second != ref2) { std::cerr << "bogus digest" << std::endl; return 1; } } return 0; } int TestCleaner1(int, char *[]) { using namespace gdcm; const char *directory = gdcm::Testing::GetDataRoot(); std::string sfilename = std::string(directory) + "/SIEMENS_CSA2.dcm"; const char *filename = sfilename.c_str(); // Create directory first: const char subdir[] = "TestCleaner1"; std::string tmpdir = Testing::GetTempDirectory(subdir); if (!System::FileIsDirectory(tmpdir.c_str())) { System::MakeDirectory(tmpdir.c_str()); } std::string outfilename = Testing::GetTempFilename(filename, subdir); int res1 = TestCleaner1Impl(filename, outfilename, true); int res2 = TestCleaner1Impl(filename, outfilename, false); return res1 + res2; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImage.cxx000664 001766 001770 00000003440 14517730450 030043 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImage.h" #include "gdcmImageReader.h" int TestImage(int, char *[]) { gdcm::Image img; gdcm::ImageReader reader; const gdcm::Image &img2 = reader.GetImage(); img2.Print(std::cout);//just to avoid the warning of img2 being unused #if 0 { gdcm::Image img3 = reader.GetImage(); } gdcm::SmartPointer img4 = const_cast(&img2); gdcm::ImageReader r; //r.SetFileName( "/home/mathieu/Creatis/gdcmData/test.acr" ); r.SetFileName( "/home/mathieu/Creatis/gdcmData/DermaColorLossLess.dcm" ); r.Read(); //std::vector< gdcm::SmartPointer > images; std::vector< gdcm::Image > images; { const gdcm::Image &ref = r.GetImage(); images.push_back( ref ); ref.Print(std::cout); gdcm::Image copy1 = ref; copy1.Print(std::cout); gdcm::SmartPointer copy2; copy2 = r.GetImage(); copy2->Print(std::cout); gdcm::ImageReader r2; r2.SetFileName( "/home/mathieu/Creatis/gdcmData/012345.002.050.dcm" ); r2.Read(); std::cout << " ------------------ " << std::endl; images.push_back( r2.GetImage() ); ref.Print(std::cout); copy1.Print(std::cout); copy2->Print(std::cout); } images[0].Print( std::cout ); images[1].Print( std::cout ); #endif return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestPNMCodec.cxx000664 001766 001770 00000001366 14517730450 030416 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmPNMCodec.h" #include "gdcmTransferSyntax.h" int TestPNMCodec(int, char *[]) { gdcm::PNMCodec pnm; pnm.CanDecode( gdcm::TransferSyntax::ImplicitVRLittleEndian ); return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileStreamer2.cxx000664 001766 001770 00000007364 14517730450 031476 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileStreamer.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmFilename.h" int TestFileStream2(const char *filename, bool verbose = false) { using namespace gdcm; if( verbose ) std::cout << "Processing: " << filename << std::endl; // Create directory first: const char subdir[] = "TestFileStreamer2"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); if( verbose ) std::cout << "Generating: " << outfilename << std::endl; const gdcm::Tag t1(0x0042,0x0011); gdcm::Filename fn( filename ); const char *name = fn.GetName(); // Special handling: bool checktemplate = false; if( strcmp(name, "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0 || strcmp(name, "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm") == 0 || strcmp(name, "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm") == 0 ) { checktemplate = true; } gdcm::FileStreamer fs; fs.SetTemplateFileName( filename ); fs.CheckTemplateFileName( checktemplate ); fs.SetOutputFileName( outfilename.c_str() ); const char buffer[10] = { 0, 1, 2 , 3, 4, 5, 6, 7, 8, 9 }; const size_t len = sizeof( buffer ); //fs.ReserveDataElement( 36 ); fs.StartDataElement( t1 ); fs.AppendToDataElement( t1, buffer, len ); fs.AppendToDataElement( t1, buffer, len ); fs.AppendToDataElement( t1, buffer, len ); fs.AppendToDataElement( t1, buffer, len / 2 + 0 ); fs.StopDataElement( t1 ); // Read back and check: gdcm::Reader r; r.SetFileName( outfilename.c_str() ); if( !r.Read() ) { std::cerr << "Failed to read: " << outfilename << std::endl; return 1; } gdcm::File & f = r.GetFile(); gdcm::DataSet & ds = f.GetDataSet(); if( !ds.FindDataElement( t1 ) ) { std::cerr << "Could not find tag: " << t1 << std::endl; return 1; } const DataElement & de = ds.GetDataElement( t1 ); const int vl = de.GetVL(); if( vl != 36 ) // 35 + padding { return 1; } const ByteValue *bv = de.GetByteValue(); const char *ptr = bv->GetPointer(); const int b1 = memcmp( ptr + 0 * len, buffer, len ); const int b2 = memcmp( ptr + 1 * len, buffer, len ); const int b3 = memcmp( ptr + 2 * len, buffer, len ); const int b4 = memcmp( ptr + 3 * len, buffer, len / 2 ); if( b1 || b2 || b3 || b4 ) { std::cerr << "Problem:" << b1 << " " << b2 << " " << b3 << " " << b4 << std::endl; return 1; } // NULL padding if( ptr[35] != 0x0 ) { std::cerr << "Error in padding" << std::endl; return 1; } return 0; } int TestFileStreamer2(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileStream2(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileStream2( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestAnonymizer.cxx000664 001766 001770 00000006355 14517730450 031164 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAnonymizer.h" #include "gdcmReader.h" #include "gdcmWriter.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmUIDGenerator.h" namespace gdcm { static int TestAnonymize(const char *subdir, const char* filename) { Reader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { return 1; } Anonymizer anonymizer; anonymizer.SetFile( reader.GetFile() ); // Setup some actions: const char patname[] = "test^anonymize"; const Tag pattag = Tag(0x0010,0x0010); anonymizer.Replace( pattag , patname ); anonymizer.Remove( Tag(0x0008,0x2112) ); anonymizer.Empty( Tag(0x0008,0x0070) ); anonymizer.Clear( Tag(0x0010,0x0020) ); UIDGenerator uid; // Those two are very special, since (0008,0016) needs to be propagated to (0002,0002) and // (0008,0018) needs to be propagated to (0002,0003) std::string newuid = uid.Generate(); anonymizer.Replace( Tag(0x0008,0x0018), newuid.c_str() ); anonymizer.Replace( Tag(0x0008,0x0016), "1.2.840.10008.5.1.4.1.1.1" ); // Make it a CT if( !anonymizer.RemovePrivateTags() ) { return 1; } // Create directory first: std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); Writer writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); writer.SetCheckFileMetaInformation( false ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } std::cout << "Success to write: " << outfilename << std::endl; // now let's try to read it back in: Reader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not reread written file: " << outfilename << std::endl; return 1; } const DataSet & ds = reader.GetFile().GetDataSet(); //std::cout << ds << std::endl; const ByteValue *bv = ds.GetDataElement( pattag ).GetByteValue(); if( !bv ) { return 1; } if (strncmp( bv->GetPointer(), patname, strlen(patname) ) != 0 ) { return 1; } if( bv->GetLength() != strlen(patname) ) { return 1; } return 0; } } int TestAnonymizer(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestAnonymize(argv[0], filename); } // else int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestAnonymize( argv[0], filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestOrientation.cxx000664 001766 001770 00000003066 14517730450 031320 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmOrientation.h" #include int TestOrientation(int, char *[]) { gdcm::Orientation o; { double dircos[] = { 1, 0, 0, 0, 1, 0 }; gdcm::Orientation::OrientationType type = gdcm::Orientation::GetType(dircos); if( type != gdcm::Orientation::AXIAL ) { std::cerr << "Should be AXIAL: " << gdcm::Orientation::GetLabel( type ) << std::endl; return 1; } } { double dircos[] = { 1, 0, 0, 0, 0, 1 }; gdcm::Orientation::OrientationType type = gdcm::Orientation::GetType(dircos); if( type != gdcm::Orientation::CORONAL ) { return 1; } } { double dircos[] = { 0, 1, 0, 0, 0, -1 }; gdcm::Orientation::OrientationType type = gdcm::Orientation::GetType(dircos); if( type != gdcm::Orientation::SAGITTAL ) { return 1; } } if( o.GetObliquityThresholdCosineValue() != 0.8 ) { return 1; } gdcm::Orientation::SetObliquityThresholdCosineValue( 0.75 ); if( o.GetObliquityThresholdCosineValue() != 0.75 ) { return 1; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestDataSetHelper.cxx000664 001766 001770 00000020004 14517730450 031501 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDataSetHelper.h" #include "gdcmPrinter.h" #include "gdcmReader.h" #include "gdcmGlobal.h" #include "gdcmTesting.h" namespace gdcm { class Printer2 : public Printer { public: VR PrintDataElement(std::ostringstream & os, const Dicts &dicts, const DataSet & ds, const DataElement &de, std::ostream &out, std::string const & indent ) { const VR vr = Printer::PrintDataElement(os, dicts, ds, de, out, indent ); const VR vr2 = DataSetHelper::ComputeVR(*F, ds, de.GetTag()); if( vr != vr2 ) { std::string privcrea = ds.GetPrivateCreator(de.GetTag()); // Special case for AMIInvalidPrivateDefinedLengthSQasUN.dcm const PrivateTag pt1(0x0027,0x33,"GEMS_IMAG_01"); // DX_GE_FALCON_SNOWY-VOI.dcm const PrivateTag pt2(0x0045,0x72,"GEMS_FALCON_03"); const PrivateTag pt3(0x0045,0x73,"GEMS_FALCON_03"); // MEDILABValidCP246_EVRLESQasOB.dcm const PrivateTag pt4(0x0029,0x1140,"SIEMENS MEDCOM HEADER"); if( PrivateTag(de.GetTag(),"GEMS_IMAG_01") == pt1 ) { assert( vr == VR::UL ); assert( vr2 == VR::SL ); return vr; } if( PrivateTag(de.GetTag(),"GEMS_IMAG_01") == pt2 || PrivateTag(de.GetTag(),"GEMS_IMAG_01") == pt3 ) { assert( vr == VR::IS ); assert( vr2 == VR::DS ); return vr; } if( PrivateTag(de.GetTag(),"SIEMENS MEDCOM HEADER") == pt4 ) { assert( vr == VR::OB ); assert( vr2 == VR::SQ ); return vr; } // ELSCINT1_PMSCT_RLE1.dcm if( de.GetTag() == Tag(0x0020,0x0070) ) { assert( vr == VR::CS ); assert( vr2 == VR::LO ); return vr; } // EmptyIcon_Bug417.dcm if( de.GetTag() == Tag(0x0040,0x1008) ) { assert( vr == VR::ST ); assert( vr2 == VR::LO ); return vr; } // GE_CT_With_Private_compressed-icon.dcm if( de.GetTag() == Tag(0x0040,0x0253) ) { assert( vr == VR::CS ); assert( vr2 == VR::SH ); return vr; } // JPEGInvalidSecondFrag.dcm if( de.GetTag() == Tag(0x0018,0x9305) || de.GetTag() == Tag(0x0018,0x9306) || de.GetTag() == Tag(0x0018,0x9307) || de.GetTag() == Tag(0x0023,0x1070) ) { assert( vr == VR::OB ); assert( vr2 == VR::FD ); return vr; } // NM-PAL-16-PixRep1.dcm...FIXME: dcmconv +te if( de.GetTag() == Tag(0x0028,0x1101) || de.GetTag() == Tag(0x0028,0x1102) || de.GetTag() == Tag(0x0028,0x1103) || de.GetTag() == Tag(0x0028,0x1201) || de.GetTag() == Tag(0x0028,0x1202) || de.GetTag() == Tag(0x0028,0x1203) ) { assert( vr == VR::US ); assert( vr2 == VR::SS || vr2 == VR::OW ); return vr; } // PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm if( de.GetTag() == Tag(0x0008,0x0010) || de.GetTag() == Tag(0x0018,0x4000) || de.GetTag() == Tag(0x0020,0x3402) ) { assert( vr == VR::LO ); assert( vr2 == VR::CS || vr2 == VR::LT || vr2 == VR::SH ); return vr; } // PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm if( de.GetTag() == Tag(0x0020,0x1001) || de.GetTag() == Tag(0x0028,0x0005) || de.GetTag() == Tag(0x0028,0x0040) || de.GetTag() == Tag(0x0028,0x0200) ) { assert( vr == VR::DS || vr == VR::SS || vr == VR::SH ); assert( vr2 == VR::IS || vr2 == VR::US || vr2 == VR::CS ); return vr; } // PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm if( de.GetTag() == Tag(0x0008,0x0040) ) { assert( vr == VR::SS ); assert( vr2 == VR::US ); return vr; } if( vr == VR::SQ || vr2 == VR::SQ ) assert( vr == vr2 ); if( !de.GetTag().IsPrivate() ) assert( vr == vr2 ); //assert( vr.Compatible(vr2) ); } return vr; } void PrintSQ(const SequenceOfItems *sqi, std::ostream & os, std::string const & indent) { if( !sqi ) return; SequenceOfItems::ItemVector::const_iterator it = sqi->Items.begin(); for(; it != sqi->Items.end(); ++it) { const Item &item = *it; const DataSet &ds = item.GetNestedDataSet(); const DataElement &deitem = item; std::string nextindent = indent + " "; os << nextindent << deitem.GetTag(); os << " "; os << "na"; //deitem.GetVR(); os << " "; if( deitem.GetVL().IsUndefined() ) { os << "(Item with undefined length)"; } else { os << "(Item with defined length)"; } os << "\n"; PrintDataSet(ds, os, nextindent + " "); if( deitem.GetVL().IsUndefined() ) { const Tag itemDelItem(0xfffe,0xe00d); os << nextindent << itemDelItem << "\n"; } } if( sqi->GetLength().IsUndefined() ) { const Tag seqDelItem(0xfffe,0xe0dd); os << indent << seqDelItem << "\n"; } } void PrintDataSet(const DataSet &ds, std::ostream &out, std::string const & indent = "" ) { const Global& g = GlobalInstance; const Dicts &dicts = g.GetDicts(); DataSet::ConstIterator it = ds.Begin(); for( ; it != ds.End(); ++it ) { const DataElement &de = *it; const SequenceOfFragments *sqf = de.GetSequenceOfFragments(); std::ostringstream os; VR refvr = PrintDataElement(os, dicts, ds, de, out, indent); if( refvr == VR::SQ /*|| sqi*/ ) { SmartPointer sqi2 = de.GetValueAsSQ(); // may throw PrintSQ(sqi2, os, indent); } else if ( sqf ) { std::string nextindent = indent + " "; const BasicOffsetTable & table = sqf->GetTable(); PrintDataElement(os,dicts,ds,table,out,nextindent); size_t numfrag = sqf->GetNumberOfFragments(); for(size_t i = 0; i < numfrag; ++i) { const Fragment& frag = sqf->GetFragment(i); PrintDataElement(os,dicts,ds,frag,out,nextindent); } const Tag seqDelItem(0xfffe,0xe0dd); VL zero = 0; os << /*nextindent <<*/ seqDelItem; os << " " << zero << "\n"; } else { // This is a byte value, so it should have been already treated } out << os.str(); } } void Print(std::ostream& os) { os << "# Dicom-File-Format\n"; os << "\n"; os << "# Dicom-Meta-Information-Header\n"; os << "# Used TransferSyntax: \n"; const FileMetaInformation &meta = F->GetHeader(); PrintDataSet(meta, os); os << "\n# Dicom-Data-Set\n"; os << "# Used TransferSyntax: "; const TransferSyntax &metats = meta.GetDataSetTransferSyntax(); os << metats; os << std::endl; const DataSet &ds = F->GetDataSet(); PrintDataSet(ds, os); } }; } // namespace gdcm static int TestDataSetHelperFunc(const char *filename, bool verbose= false) { gdcm::Reader r; r.SetFileName( filename ); if( !r.Read() ) { std::cerr << "Could not read: " << filename << std::endl; return 1; } const gdcm::File & file = r.GetFile(); gdcm::Printer2 print; print.SetFile( file ); std::ostringstream out; if( verbose ) print.Print( std::cout ); print.Print( out ); return 0; } int TestDataSetHelper(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestDataSetHelperFunc(filename, true); } // else int r = 0, i = 0; gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestDataSetHelperFunc( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestUUIDGenerator.cxx000664 001766 001770 00000002423 14517730450 031436 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmUUIDGenerator.h" #include int TestUUIDGenerator(int , char *[]) { gdcm::UUIDGenerator uid; const char *suid = uid.Generate(); if( !gdcm::UUIDGenerator::IsValid( suid ) ) { std::cerr << "Invalid: " << suid << std::endl; return 1; } const char *valids[] = { "00000000-0000-0000-0000-000000000000", "ba209999-0c6c-11d2-97cf-00c04f8eea45", "67C8770B-44F1-410A-AB9A-F9B5446F13EE" }; const size_t nv = sizeof( valids ) / sizeof( *valids ); for( size_t i = 0; i < nv; ++i ) { const char *valid = valids[i]; if( !gdcm::UUIDGenerator::IsValid( valid ) ) { std::cerr << "Invalid: " << valid << std::endl; return 1; } } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestScanner2_1.cxx000664 001766 001770 00000015351 14517730450 030720 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmScanner2.h" #include "gdcmDirectory.h" #include "gdcmSystem.h" #include "gdcmTesting.h" #include "gdcmTrace.h" // dcmdump /path/to/image/*.dcm 2>&/dev/null| grep 0020 | grep "000e\|000d" | sort | uniq // // $ find /images/ -type f -exec dcmdump -s +P 0010,0010 {} \; static int TestScanner2Extra() { const char *extradataroot = gdcm::Testing::GetDataExtraRoot(); if( !extradataroot ) { return 1; } if( !gdcm::System::FileIsDirectory(extradataroot) ) { std::cerr << "No such directory: " << extradataroot << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( extradataroot, true ); // no recursion std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::Scanner2 s; const gdcm::Tag t1(0x0020,0x000d); // Study Instance UID const gdcm::Tag t2(0x0020,0x000e); // Series Instance UID const gdcm::Tag t3(0x0010,0x0010); // Patient's Name const gdcm::Tag t4(0x0004,0x5678); // DUMMY element const gdcm::Tag t5(0x0028,0x0010); // Rows const gdcm::Tag t6(0x0028,0x0011); // Columns s.AddPublicTag( t1 ); s.AddPublicTag( t2 ); s.AddPublicTag( t3 ); s.AddPublicTag( t4 ); s.AddPublicTag( t5 ); s.AddPublicTag( t6 ); bool b = s.Scan( d.GetFilenames() ); if( !b ) { std::cerr << "Scanner2 failed" << std::endl; return 1; } //s.Print( std::cout ); return 0; } int TestScanner2_1(int argc, char *argv[]) { gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); const char *directory = gdcm::Testing::GetDataRoot(); if( argc == 2 ) { directory = argv[1]; } if( !gdcm::System::FileIsDirectory(directory) ) { std::cerr << "No such directory: " << directory << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( directory ); // no recursion // d.Print( std::cout ); std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::Scanner2 s; const gdcm::Tag t1(0x0020,0x000d); // Study Instance UID const gdcm::Tag t2(0x0020,0x000e); // Series Instance UID const gdcm::Tag t3(0x0010,0x0010); // Patient's Name const gdcm::Tag t4(0x0004,0x5678); // DUMMY element const gdcm::Tag t5(0x0028,0x0010); // Rows const gdcm::Tag t6(0x0028,0x0011); // Columns const gdcm::Tag t7(0x0008,0x0016); // s.AddPublicTag( t1 ); s.AddPublicTag( t2 ); s.AddPublicTag( t3 ); s.AddPublicTag( t4 ); s.AddPublicTag( t5 ); s.AddPublicTag( t6 ); s.AddPublicTag( t7 ); bool b = s.Scan( d.GetFilenames() ); if( !b ) { std::cerr << "Scanner2 failed" << std::endl; return 1; } // s.Print( std::cout ); gdcm::Directory::FilenamesType const & files = s.GetFilenames(); if( files != d.GetFilenames() ) { return 1; } int numerrors = 0; for( gdcm::Directory::FilenamesType::const_iterator it = files.begin(); it != files.end(); ++it ) { const char *filename = it->c_str(); const char* value = s.GetPublicValue(filename, t7); const char *msstr = gdcm::Testing::GetMediaStorageFromFile(filename); if( msstr && strcmp(msstr, "1.2.840.10008.1.3.10" ) == 0 ) { // would need to check (0002,0002)... } if( value && msstr ) { if( strcmp( value, msstr ) != 0 ) { std::cerr << "Problem with file " << filename << std::endl; std::cerr << value << "/" << msstr << std::endl; ++numerrors; } } else { if ( !msstr ) { std::cerr << "Problem with file " << filename << std::endl; if( value ) std::cerr << "Value found: " << value << std::endl; ++numerrors; } } } if( numerrors ) return numerrors; // Check dummy filename: bool iskey = s.IsKey( "gdcm.rocks.invalid.name" ); if( iskey ) { std::cout << "IsKey returned: " << iskey << std::endl; return 1; } // Let's get the value for tag t1 in first file: gdcm::Scanner2::PublicMappingType const &mt = s.GetPublicMappings(); std::string sfilename; sfilename = gdcm::Testing::GetDataRoot(); sfilename+= "/test.acr"; { //const char *filename = d.GetFilenames()[0].c_str(); const char *filename = sfilename.c_str(); // The following breaks with Papyrus file: PET-cardio-Multiframe-Papyrus.dcm unsigned int i = 0; gdcm::Scanner2::PublicMappingType::const_iterator it = mt.find(filename); assert( it != mt.end() ); while( it == mt.end() ) { ++i; if( i == d.GetFilenames().size() ) { return 1; } filename = d.GetFilenames()[i].c_str(); it = mt.find(filename); } std::cout << "Mapping for " << filename << " is :" << std::endl; const gdcm::Scanner2::PublicTagToValue &tv = it->second; //const std::string &filename = d.GetFilenames()[0]; gdcm::Scanner2::PublicTagToValue::const_iterator it2 = tv.find( t5 ); if( it2 == tv.end() || t5 != it2->first ) { std::cerr << "Could not find tag:" << t5 << std::endl; return 1; } const char * t1value = it2->second; std::cout << filename << " -> " << t1 << " = " << (*t1value ? t1value : "none" ) << std::endl; } const gdcm::Directory::FilenamesType &filenames = d.GetFilenames(); { gdcm::Directory::FilenamesType::const_iterator it = filenames.begin(); for(; it != filenames.end(); ++it) { const char *filename = it->c_str(); const gdcm::Tag &reftag = t6; const char *value = s.GetPublicValue( filename, reftag ); if( value ) { assert( value ); std::cout << filename << " has " << reftag << " = " << value << std::endl; } else { std::cout << filename << " has " << reftag << " = no value or not DICOM" << std::endl; } } } /* { std::vector keys = s.GetKeys(); for( std::vector::const_iterator it = keys.begin(); it != keys.end(); ++it) { const char *filename = *it; const gdcm::Directory::FilenamesType::const_iterator it2 = std::find(filenames.begin(), filenames.end(), filename); if( it2 == filenames.end() ) { return 1; } if( !s.IsKey( filename ) ) { return 1; } } } */ // puposely discard gdcmDataExtra test, this is just an 'extra' test... int b2 = TestScanner2Extra(); (void)b2; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileChangeTransferSyntax2.cxx000664 001766 001770 00000016145 14517730450 034012 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileChangeTransferSyntax.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmImageReader.h" #include "gdcmFilename.h" #include "gdcmImageChangePlanarConfiguration.h" #include "gdcmByteSwap.h" static int TestFileChangeTransferSyntax2Func(const char *filename, bool verbose = false) { using namespace gdcm; if( verbose ) std::cout << "Processing: " << filename << std::endl; // Create directory first: const char subdir[] = "TestFileChangeTransferSyntax2"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); if( verbose ) std::cout << "Generating: " << outfilename << std::endl; const gdcm::TransferSyntax ts( TransferSyntax::JPEGLSLossless ); gdcm::FileChangeTransferSyntax fcts; fcts.SetTransferSyntax( ts ); fcts.SetInputFileName( filename ); fcts.SetOutputFileName( outfilename.c_str() ); ImageCodec *ic = fcts.GetCodec(); if( !ic ) { return 1; } if( !fcts.Change() ) { gdcm::Reader reader; reader.SetFileName( filename ); if( !reader.Read() ) { std::cerr << "not dicom" << std::endl; return 1; } const gdcm::File & file = reader.GetFile(); const gdcm::FileMetaInformation & fmi = file.GetHeader(); const TransferSyntax &tsref = fmi.GetDataSetTransferSyntax(); if( tsref.IsEncapsulated() ) { if( verbose ) std::cout << "Will not generate (encaps): " << outfilename << std::endl; return 0; } gdcm::Filename fn( filename ); const char *name = fn.GetName(); // Special handling: if( strcmp(name, "CT-MONO2-12-lomb-an2.acr" ) == 0 || strcmp(name, "LIBIDO-8-ACR_NEMA-Lena_128_128.acr") == 0 || strcmp(name, "gdcm-ACR-LibIDO.acr") == 0 || strcmp(name, "gdcm-MR-SIEMENS-16-2.acr") == 0 || strcmp(name, "libido1.0-vol.acr") == 0 || strcmp(name, "test.acr") == 0 || strcmp(name, "LIBIDO-24-ACR_NEMA-Rectangle.dcm") == 0 || strcmp(name, "MR_Spectroscopy_SIEMENS_OF.dcm") == 0 // not an image || strcmp(name, "ELSCINT1_PMSCT_RLE1.dcm") == 0 || strcmp(name, "ELSCINT1_PMSCT_RLE1_priv.dcm") == 0 || strcmp(name, "gdcm-CR-DCMTK-16-NonSamplePerPix.dcm") == 0 || strcmp(name, "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm") == 0 || strcmp(name, "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm") == 0 // Implicit VR Big Endian DLX (G.E Private) || strcmp(name, "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm") == 0 // Explicit VR Big Endian || strcmp(name, "US-RGB-8-epicard.dcm") == 0 // Explicit VR Big Endian || strcmp(name, "GE_DLX-8-MONO2-PrivateSyntax.dcm") == 0 // Implicit VR Big Endian DLX (G.E Private) || strcmp(name, "GE_CT_With_Private_compressed-icon.dcm") == 0 // Explicit VR Big Endian || strcmp(name, "JDDICOM_Sample2-dcmdjpeg.dcm") == 0 // cannot recreate FMI || strcmp(name, "DMCPACS_ExplicitImplicit_BogusIOP.dcm") == 0 // ImageRegionReader does not handle it || strcmp(name, "unreadable.dcm") == 0 // No Pixel Data (old ACR-NEMA) || strcmp(name, "US-YBR_FULL_422-EVRLE.dcm") == 0 // packed ybr422 || strncmp(name, "DICOMDIR", 8) == 0 // DICOMDIR* || strncmp(name, "dicomdir", 8) == 0 // dicomdir* ) { if( verbose ) std::cout << "Will not generate: " << outfilename << std::endl; return 0; } std::cerr << "Could not change: " << filename << std::endl; return 1; } // Let's read that file back in ! gdcm::ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not even reread our generated file : " << outfilename << std::endl; return 1; } // Check that after decompression we still find the same thing: int res = 0; gdcm::Image img = reader2.GetImage(); int pc = 0; // When recompressing: US-RGB-8-epicard.dcm, make sure to compute the md5 using the // same original Planar Configuration... if( (int)img.GetPlanarConfiguration() != pc ) { gdcm::ImageChangePlanarConfiguration icpc; icpc.SetInput( reader2.GetImage() ); icpc.SetPlanarConfiguration( pc ); icpc.Change(); img = icpc.GetOutput(); } //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; bool res2 = img.GetBuffer(buffer); if( !res2 ) { std::cerr << "could not get buffer: " << outfilename << std::endl; return 1; } // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: #ifdef GDCM_WORDS_BIGENDIAN if( img.GetPixelFormat().GetBitsAllocated() == 16 ) { assert( !(len % 2) ); assert( img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME1 || img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME2 ); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem( (unsigned short*)buffer, gdcm::SwapCode::LittleEndian, len/2); } #endif const char *ref = gdcm::Testing::GetMD5FromFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( !ref ) { // new regression image needs a md5 sum std::cerr << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } if(res) { std::cerr << "problem with: " << outfilename << std::endl; } if( verbose ) { std::cout << "file was written in: " << outfilename << std::endl; } delete[] buffer; return res; } int TestFileChangeTransferSyntax2(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileChangeTransferSyntax2Func(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileChangeTransferSyntax2Func( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestDictPrinter.cxx000664 001766 001770 00000001235 14517730450 031250 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDictPrinter.h" int TestDictPrinter(int, char *[]) { gdcm::DictPrinter dp; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestIconImageGenerator4.cxx000664 001766 001770 00000046262 14517730450 032620 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmFileMetaInformation.h" #include "gdcmTesting.h" #include "gdcmByteSwap.h" #include "gdcmIconImageGenerator.h" #include "gdcmAttribute.h" #include "gdcmStringFilter.h" static const char * const iconimagearray4[][2] = { {"7e097b4a57af6a823bd692e37b131b1c" , "SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs.acr" }, {"7f2638cea652bf3452ada158d2ea67c4" , "gdcm-MR-SIEMENS-16-2.acr" }, {"da0922a02f8e763ec878089617e0bc4c" , "test.acr" }, {"e75ee90f23db1952a593393cdfaaf99f" , "MR-MONO2-12-an2.acr" }, {"c9c46afd186531850af9576cf54c800b" , "CT-MONO2-12-lomb-an2.acr" }, {"feb10d9a28e5166a3baf9ec6ef4f460a" , "LIBIDO-8-ACR_NEMA-Lena_128_128.acr" }, {"f9d8a0796ebf5a6aabddb4e133d09770" , "gdcm-ACR-LibIDO.acr" }, {"a1bce65e11c5fd2e26f7b38ebfdd1c53" , "libido1.0-vol.acr" }, {"9edea7caea2b85aad952d35c64f1e092" , "SIEMENS_CSA2.dcm" }, {"011d1f2abd9e27a2dc5d013bd4848104" , "gdcm-JPEG-LossLessThoravision.dcm" }, {"ddb7e67d119eb2ce14731cd9007e36cc" , "XA-MONO2-8-12x-catheter.dcm" }, {"1041bae356da40d2113210ff2adef923" , "gdcm-MR-PHILIPS-16-Multi-Seq.dcm" }, {"a3a6b3bf75ccdc91f82effc60d005688" , "PHILIPS_GDCM12xBug.dcm" }, {"a247e2ca32279956079c9a87403bd157" , "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm" }, {"b29a7fe847f942e3afdda5ddf23c03c3" , "D_CLUNIE_CT1_J2KI.dcm" }, {"3f7cae9b920adb3ca4a96ace2c0c91d7" , "rle16sti.dcm" }, {"f706f740496e445ee59141b15f3baeb4" , "3E768EB7.dcm" }, {"b38c113fffa4925f6f06a928b357f6a1" , "D_CLUNIE_MR2_JPLY.dcm" }, {"c3d3a218fcec778476090bce4c8b3201" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm" }, {"882a7327bab05d88571dcf29f902adf3" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm" }, {"1f4ae64fab8745e6affb72721ffdfaec" , "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm" }, {"af193ff3143f299826d55e00696b3218" , "LEADTOOLS_FLOWERS-16-MONO2-Uncompressed.dcm" }, {"f6a020bb9aab2e59a289064b2add00ec" , "D_CLUNIE_MR3_JPLY.dcm" }, {"e8b529fbe615b4c540318695913d02e7" , "D_CLUNIE_VL2_RLE.dcm" }, {"8393213bd2c340a8cbd639f45a6b497e" , "OsirixFake16BitsStoredFakeSpacing.dcm" }, {"c50f0f97e1e36a4387620634e7a9b152" , "GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm" }, {"c265bf6c3bf4417987ff81b92ca4ca6c" , "MR_SIEMENS_forceLoad29-1010_29-1020.dcm" }, {"fa7da45d1a8eb16b092880ceff5a50e5" , "fffc0000UN.dcm" }, {"796594769ee3570292de36fdb4509df1" , "LIBIDO-24-ACR_NEMA-Rectangle.dcm" }, {"32b10fd4f13cfb4d74e1145f166e9dae" , "IM-0001-0066.CommandTag00.dcm" }, {"619f8c1650962cddf7695e39f43e8c49" , "D_CLUNIE_NM1_JPLY.dcm" }, {"c50f0f97e1e36a4387620634e7a9b152" , "D_CLUNIE_CT1_J2KR.dcm" }, {"30a530ea4df623cbec31f752637e234b" , "TheralysGDCM120Bug.dcm" }, {"3120b59e3635a912c6a60897f734b2ff" , "SIEMENS_MAGNETOM-12-MONO2-VRUN.dcm" }, {"5bdb2335ceb2dac83c2248d6ff8e0a49" , "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm" }, {"30ff6655c5eb98ad34cd20836418a5a7" , "ALOKA_SSD-8-MONO2-RLE-SQ.dcm" }, {"992e4ef2b01f9d79514d7ab22c354be9" , "GE_GENESIS-16-MONO2-WrongLengthItem.dcm" }, {"d4669bd89971c1affd311c7d1d8b20c7" , "US-RGB-8-esopecho.dcm" }, {"85124dd05ab0567aecaf896373f780da" , "D_CLUNIE_MR4_RLE.dcm" }, {"07964ed19883cb96460d1407795f4306" , "D_CLUNIE_MR2_JPLL.dcm" }, {"096547f2834609ae4dbc115169806fc4" , "SIEMENS_Sonata-16-MONO2-Value_Multiplicity.dcm" }, {"af193ff3143f299826d55e00696b3218" , "LEADTOOLS_FLOWERS-16-MONO2-JpegLossless.dcm" }, {"da7002947725a950c3226cd23aa8d718" , "CT-MONO2-16-ankle.dcm" }, {"1a27a48d4efe2999b83bc89d3003d05c" , "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm" }, {"feb10d9a28e5166a3baf9ec6ef4f460a" , "simpleImageWithIcon.dcm" }, {"aeb28d2cfb5376e2bb1ac4aac0b4807c" , "CR-MONO1-10-chest.dcm" }, {"c50f0f97e1e36a4387620634e7a9b152" , "D_CLUNIE_CT1_RLE.dcm" }, {"4d469f85f51b3b81bdf38ebba23a68e7" , "D_CLUNIE_NM1_JPLL.dcm" }, {"f7f066f0597791fcc147603ab5af6387" , "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm" }, {"abe1950da247d18196fe5bea54cb26f1" , "NM-MONO2-16-13x-heart.dcm" }, {"6bd67bbd6e3e65808db8598fe0913f86" , "US-IRAD-NoPreambleStartWith0003.dcm" }, {"99672e03104c9176595bc0002cd8edf8" , "MR-MONO2-16-head.dcm" }, {"1a27a48d4efe2999b83bc89d3003d05c" , "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm" }, {"af8491953e762c12feb93a80a1575edf" , "MAROTECH_CT_JP2Lossy.dcm" }, {"932281859be22ffae33a2669b34cc2e6" , "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm" }, {"fb5402472ee00639ef8dc1b09692c299" , "US-PAL-8-10x-echo.dcm" }, {"038acb53133733a9f2c54528b8029511" , "MR-SIEMENS-DICOM-WithOverlays.dcm" }, {"890d0a5afdbf77398d857b523f86e83a" , "D_CLUNIE_MR1_JPLL.dcm" }, {"c50f0f97e1e36a4387620634e7a9b152" , "D_CLUNIE_CT1_JPLL.dcm" }, {"7897424399822301bdbedbcaf34c7c84" , "AMIInvalidPrivateDefinedLengthSQasUN.dcm" }, {"1f4ae64fab8745e6affb72721ffdfaec" , "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm" }, {"3443eba48f11dd9aadb4632c8c896b39" , "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" }, {"b72e483ad977e18b8016c7cc916c4bbd" , "D_CLUNIE_SC1_JPLY.dcm" }, {"582df1a47c5992cc4f37496dab8c5130" , "gdcm-MR-PHILIPS-16-NonSquarePixels.dcm" }, {"8a5d13f6c85b2eebc1c02432d729cd45" , "SIEMENS-MR-RGB-16Bits.dcm" }, {"aacd6f6257e068cf53cdec5c7e172513" , "US-IRAD-NoPreambleStartWith0005.dcm" }, {"6a9ecd676ce47b0fda111a804b58b054" , "PICKER-16-MONO2-Nested_icon.dcm" }, {"9b720fd0aa079bc2f3f9545bd0e207c6" , "gdcm-JPEG-Extended.dcm" }, {"c790d0a462907135c1991f10a4846f98" , "D_CLUNIE_US1_RLE.dcm" }, {"4689c053642dcee7a2a9d0475c1b6528" , "D_CLUNIE_RG2_JPLY.dcm" }, {"b3b8a60e7b7b20c029eec1d5006e2b9c" , "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm" }, {"91533007e5e07353012dea33149d920f" , "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm" }, {"c8902cc14f285f2687866f60e45c7d86" , "TG18-CH-2k-01.dcm" }, {"af193ff3143f299826d55e00696b3218" , "LEADTOOLS_FLOWERS-16-MONO2-RLE.dcm" }, {"27daf49ec13f58db1d800fc58378852e" , "OT-PAL-8-face.dcm" }, {"07fef244d4e14358d453c144770b2a55" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossy.dcm" }, {"ad96e04c3c50d463cccdfca68b49b071" , "SIEMENS_MAGNETOM-12-MONO2-Uncompressed.dcm" }, {"620f0b67a91f7f74151bc5be745b7110" , "GDCMJ2K_TextGBR.dcm" }, {"d1f5dfac9c3213f548df6a1f9e86acd0" , "MR16BitsAllocated_8BitsStored.dcm" }, {"cc2aaa869f08908e1f37ccdd314841ab" , "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm" }, {"c50f0f97e1e36a4387620634e7a9b152" , "D_CLUNIE_CT1_JLSL.dcm" }, {"719505e71eafd643fa2e114acc83496f" , "ELSCINT1_JP2vsJ2K.dcm" }, {"7132fec8839d9c8b26cba4a4f17000da" , "D_CLUNIE_XA1_JPLL.dcm" }, {"cdf5908902fb63e321b224fae86a4128" , "SIEMENS_Sonata-12-MONO2-SQ.dcm" }, {"bc1774acbf5c025aa3b57184213cc98c" , "JPEGDefinedLengthSequenceOfFragments.dcm" }, {"e9faa2ce59db8563d7abe50432f91351" , "PHILIPS_GDCM12xBug2.dcm" }, {"620f0b67a91f7f74151bc5be745b7110" , "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm" }, {"52d0b90aa78a20cbff6b0beb3bd2c2b3" , "D_CLUNIE_RG2_JPLL.dcm" }, {"50dd1ae0bf918a9144b50229fa04f8e0" , "FUJI-10-MONO1-ACR_NEMA_2.dcm" }, {"d7e55bf3c6eb7a627823b532bcac7e16" , "D_CLUNIE_MR1_JPLY.dcm" }, {"7132fec8839d9c8b26cba4a4f17000da" , "D_CLUNIE_XA1_RLE.dcm" }, {"f48ea76ff11ca6ca4958df9c186422f4" , "BugGDCM2_UndefItemWrongVL.dcm" }, {"7f2638cea652bf3452ada158d2ea67c4" , "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm" }, {"477d801b27ef3cb21a8685cedbc9b12e" , "JDDICOM_Sample2.dcm" }, {"cae77b420f407118f288c14eeb81e11f" , "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm" }, {"524014ef866b31e3fd2e33a6148d31bb" , "DCMTK_JPEGExt_12Bits.dcm" }, {"84ea2f46ad98332a06875da922709007" , "US-MONO2-8-8x-execho.dcm" }, {"19d6f17c8a0b2cd04049828dcb304046" , "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" }, {"bee28068ae9edef69fef792583b3e20f" , "ACUSON-24-YBR_FULL-RLE-b.dcm" }, {"b171f7581c9cf15b2d32cfd62e9b6038" , "gdcm-US-ALOKA-16.dcm" }, {"80be78c9365f6a1604191dd703c84ac5" , "DX_J2K_0Padding.dcm" }, {"a9a72d44b888fb4f1f727af88109cfb3" , "D_CLUNIE_CT2_RLE.dcm" }, {"151376fcac2fbd55c3b5c5a155e16d26" , "D_CLUNIE_RG1_JPLL.dcm" }, {"e0a3fd5917c5a13a16981e1d0346af4d" , "D_CLUNIE_VL3_RLE.dcm" }, {"28ea47a62e1f2ca9d7dcd10ef868701d" , "NM_Kakadu44_SOTmarkerincons.dcm" }, {"e95cec3c8078cea91b287e45d751cf78" , "CT-SIEMENS-Icone-With-PaletteColor.dcm" }, {"eacd1cabeaf78554804ca627344cba91" , "GE_DLX-8-MONO2-PrivateSyntax.dcm" }, {"8f40712ff8e4a7691be144d884546a17" , "CT_16b_signed-UsedBits13.dcm" }, {"da9fb19d564fa01e4633df5c105f5a58" , "D_CLUNIE_RG3_JPLY.dcm" }, {"6510f44ff1dd8daf9b49100fd2c81d85" , "DX_GE_FALCON_SNOWY-VOI.dcm" }, {"5a15bd50c589c9611636dc7813493c03" , "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm" }, {"4948235091edc01603344f79a29835e1" , "CT-MONO2-16-brain.dcm" }, {"c2de60330cda14759a117b937a7e5a95" , "D_CLUNIE_VL4_RLE.dcm" }, {"599ac7bd3a573451f3cd53494ace8cdf" , "D_CLUNIE_MR3_RLE.dcm" }, {"72f55d5cf022e983783185195b77d0e6" , "undefined_length_un_vr.dcm" }, {"a8e2e35044384f31afc1dcf9163154ff" , "CT-MONO2-16-ort.dcm" }, {"0fefcf91a55062f1cb20945b3f726eda" , "05148044-mr-siemens-avanto-syngo.dcm" }, {"5d6aaab5766479ec6e27de4eaa4a6438" , "GE_LOGIQBook-8-RGB-HugePreview.dcm" }, {"acad4e43da617035315bcddc4bbb96bd" , "RadBWLossLess.dcm" }, {"b69e23b6479de4d9c3b4ed51aa748f73" , "KODAK-12-MONO1-Odd_Terminated_Sequence.dcm" }, {"e8458a5483e72cced4d46f93eed1699e" , "CT-MONO2-16-chest.dcm" }, {"728a698e308f7863ba3d103b80dffc45" , "PhilipsInteraSeqTermInvLen.dcm" }, {"35144f65c704edf2d69abc40405c3ea7" , "D_CLUNIE_MR4_JPLY.dcm" }, {"904b38f362b86f626ea7d89eed455709" , "D_CLUNIE_RG3_JPLL.dcm" }, {"707e26b0fa27f670c35ca5cc2bf3eda2" , "MR_Philips-Intera_BreaksNOSHADOW.dcm" }, {"04b97df84da7a126be30993cf9cff942" , "GE_CT_With_Private_compressed-icon.dcm" }, {"04cb0299587f38ba369e1fdcbf07dc25" , "D_CLUNIE_CT1_JLSN.dcm" }, {"3120b59e3635a912c6a60897f734b2ff" , "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm" }, {"cee47e57f6b1aaace74bb813e33a74eb" , "00191113.dcm" }, {"99ba02caa6813cafd254f97fb8377f60" , "MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm" }, {"46c2e032f2858831691a184aa6cdb0da" , "SignedShortLosslessBug.dcm" }, {"2b306840879792f3509e1c1ccedee81d" , "GE_DLX-8-MONO2-Multiframe.dcm" }, {"fde7dc022ec854a98ffdc2190ceef424" , "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm" }, {"f4b5fc5cc1440b865f1a99b85b170ecd" , "LJPEG_BuginGDCM12.dcm" }, {"ba2717c0d839213e788a74cccf37f1d4" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm" }, {"904b38f362b86f626ea7d89eed455709" , "D_CLUNIE_RG3_RLE.dcm" }, {"5e51e64ee21c2f643c13257e054c2990" , "CT-SIEMENS-MissingPixelDataInIconSQ.dcm" }, {"07964ed19883cb96460d1407795f4306" , "MR-MONO2-12-shoulder.dcm" }, {"0b818ac3983d76cfdc535a46058a1a53" , "LEADTOOLS_FLOWERS-24-RGB-Uncompressed.dcm" }, {"7f7aaee92f20ffcd64bebf8ce105bf5d" , "PICKER-16-MONO2-No_DicomV3_Preamble.dcm" }, {"fde3b9c4853c597383fab1050b491202" , "SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm" }, {"ba0654f3e7aae75bca8fc24705ddb78a" , "CT-MONO2-8-abdo.dcm" }, {"599ac7bd3a573451f3cd53494ace8cdf" , "D_CLUNIE_MR3_JPLL.dcm" }, {"03f25fb3e6e8ae53b9565553e2026a66" , "D_CLUNIE_VL6_RLE.dcm" }, {"af193ff3143f299826d55e00696b3218" , "LEADTOOLS_FLOWERS-8-MONO2-RLE.dcm" }, {"d46afca30969faa05583e87b0f6e5211" , "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm" }, {"5885ade0feaaf967f5a1c22724c10d02" , "SIEMENS-12-Jpeg_Process_2_4-Lossy-a.dcm" }, {"13758e32fe34c17b897efcbd26e7e03b" , "gdcm-JPEG-LossLess3a.dcm" }, {"1e61c6d50ae3ef3ac0550277f166bd1c" , "D_CLUNIE_XA1_JPLY.dcm" }, {"151376fcac2fbd55c3b5c5a155e16d26" , "D_CLUNIE_RG1_RLE.dcm" }, {"e77b93eb953f2a21fa75d257da0514fb" , "US-RGB-8-epicard.dcm" }, {"a101ddd933114bcc0145d047d74f41c9" , "GE_MR_0025xx1bProtocolDataBlock.dcm" }, {"b9f48f54e75b7f1994cfe1a7152d9ab5" , "rle16loo.dcm" }, {"cc61470afd2b80014749abbb5bd9109d" , "DMCPACS_ExplicitImplicit_BogusIOP.dcm" }, {"a9a72d44b888fb4f1f727af88109cfb3" , "D_CLUNIE_CT2_JPLL.dcm" }, {"477d801b27ef3cb21a8685cedbc9b12e" , "JDDICOM_Sample2-dcmdjpeg.dcm" }, {"1f4ae64fab8745e6affb72721ffdfaec" , "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm" }, {"323c2919ea590363dd6eb4105a2566a7" , "KODAK_CompressedIcon.dcm" }, {"486199008daf27f167efee9469fffd52" , "ACUSON-24-YBR_FULL-RLE.dcm" }, {"07964ed19883cb96460d1407795f4306" , "D_CLUNIE_MR2_RLE.dcm" }, {"b53c440c32a7bd20d24cc1997bd7c9e6" , "JPEG_LossyYBR.dcm" }, {"2b098d933de8c90b317619658f698cc5" , "012345.002.050.dcm" }, {"52d0b90aa78a20cbff6b0beb3bd2c2b3" , "D_CLUNIE_RG2_RLE.dcm" }, {"e44869a1044b611e08a9f1396432a44b" , "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm" }, {"f92d6349e1d80bbdba34a9e1b84eb737" , "SIEMENS_ImageLocationUN.dcm" }, {"1f4ae64fab8745e6affb72721ffdfaec" , "PHILIPS_Intera-16-MONO2-Uncompress.dcm" }, {"0e82ac528c72a2dd69fa1b52e5370d82" , "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm" }, {"0b818ac3983d76cfdc535a46058a1a53" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossless.dcm" }, {"91b4da2ca9fd378ca404580c84c62984" , "US-GE-4AICL142.dcm" }, {"2ff486489d600e0ab5f8c829960c516f" , "D_CLUNIE_SC1_RLE.dcm" }, {"85124dd05ab0567aecaf896373f780da" , "D_CLUNIE_MR4_JPLL.dcm" }, {"ece67fa0c8a99f8147b26081252cd0a5" , "MR-Brucker-CineTagging-NonSquarePixels.dcm" }, {"bdf48b10871ac0b3c14587eaba9ca998" , "MR-MONO2-8-16x-heart.dcm" }, {"0c65a403a0a24957e523bb29e84c31ef" , "LEADTOOLS_FLOWERS-8-MONO2-JpegLossy.dcm" }, {"f92a60ad3cbc2783db57cac5f800a9c0" , "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm" }, {"4d469f85f51b3b81bdf38ebba23a68e7" , "D_CLUNIE_NM1_RLE.dcm" }, {"20e2f6cc2b60ae26adfdd3b3ee0e1915" , "D_CLUNIE_VL1_RLE.dcm" }, {"84462b24809f4e9d151c7c27004f7922" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm" }, {"620f0b67a91f7f74151bc5be745b7110" , "DermaColorLossLess.dcm" }, {"72e203ca5756f4491d84d8240c82a59b" , "OT-MONO2-8-a7.dcm" }, {"890d0a5afdbf77398d857b523f86e83a" , "D_CLUNIE_MR1_RLE.dcm" }, {"af193ff3143f299826d55e00696b3218" , "LEADTOOLS_FLOWERS-8-MONO2-Uncompressed.dcm" }, {"cee47e57f6b1aaace74bb813e33a74eb" , "00191113.dcm" }, {"07b6f4e2fba920d28e2f29dbb037b640" , "TOSHIBA_J2K_SIZ1_PixRep0.dcm" }, {"93f60acbb450c62992a1db09a6c19c05" , "TOSHIBA_J2K_OpenJPEGv2Regression.dcm" }, {"fa02ad71bdf3e6970e18fc9a9df03a2d" , "TOSHIBA_J2K_SIZ0_PixRep1.dcm" }, {"3475cb96e0308cb84502be1c1531b588" , "NM-PAL-16-PixRep1.dcm" }, {"2ec6d7c60d6786665cff2b7a31aaeedf" , "MEDILABInvalidCP246_EVRLESQasUN.dcm" }, {"560881eca73809ac358aa14733ee64af" , "JPEGInvalidSecondFrag.dcm" }, {"7c70c2aaacf9a4206cbe2191fa4d2041" , "SC16BitsAllocated_8BitsStoredJ2K.dcm" }, {"da0922a02f8e763ec878089617e0bc4c" , "SC16BitsAllocated_8BitsStoredJPEG.dcm" }, {"da0922a02f8e763ec878089617e0bc4c" , "Osirix10vs8BitsStored.dcm" }, {"da0922a02f8e763ec878089617e0bc4c" , "Bug_Siemens_PrivateIconNoItem.dcm" }, {"da0922a02f8e763ec878089617e0bc4c" , "HardcopyColor_YBR_RCT_J2K_PC1.dcm" }, {"da0922a02f8e763ec878089617e0bc4c" , "PET-GE-dicomwrite-PixelDataSQUNv2.dcm" }, // sentinel { 0, 0 } }; namespace gdcm { int TestIconImageGenerate4(const char *subdir, const char* filename, bool verbose = false) { ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const FileMetaInformation &header = reader.GetFile().GetHeader(); MediaStorage ms = header.GetMediaStorage(); bool isImage = MediaStorage::IsImage( ms ); bool pixeldata = reader.GetFile().GetDataSet().FindDataElement( Tag(0x7fe0,0x0010) ); if( isImage && pixeldata ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } else { // not an image give up... std::cerr << "Problem with: " << filename << " but that's ok" << std::endl; return 0; } } // Create directory first: std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); IconImageGenerator iig; iig.SetPixmap( reader.GetImage() ); iig.AutoPixelMinMax(true); gdcm::StringFilter sf; sf.SetFile( reader.GetFile() ); /* const DataSet & ds = reader.GetFile().GetDataSet(); if( ds.FindDataElement( gdcm::Tag(0x0028,0x0120) ) && !ds.GetDataElement(gdcm::Tag(0x0028,0x0120)).IsEmpty() ) { // gdcm::Attribute<0x28,0x120> at; iig.SetOutsideValuePixel( -2000 ); } */ std::string strval = sf.ToString(gdcm::Tag(0x0028,0x0120)); double val; std::istringstream is; is.str( strval ); if( is >> val ) { iig.SetOutsideValuePixel( val ); assert( !strval.empty() ); } const unsigned int idims[2] = { 64, 64 }; //const unsigned int idims[2] = { 600,430 }; iig.SetOutputDimensions( idims ); bool b = iig.Generate(); gdcm::Filename fn( filename ); const char *name = fn.GetName(); unsigned int i = 0; const char *p = iconimagearray4[i][1]; while( p != 0 ) { if( strcmp( name, p ) == 0 ) { break; } ++i; p = iconimagearray4[i][1]; } const char *refmd5 = iconimagearray4[i][0]; if( b ) { const gdcm::IconImage &icon = iig.GetIconImage(); if( verbose ) icon.Print( std::cout ); unsigned long len = icon.GetBufferLength(); std::vector< char > vbuffer; vbuffer.resize( len ); char *buffer = &vbuffer[0]; bool res2 = icon.GetBuffer(buffer); if( !res2 ) { std::cerr << "res2 failure:" << filename << std::endl; return 1; } char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); Image & img = reader.GetImage(); img.SetIconImage( iig.GetIconImage() ); ImageWriter writer; writer.SetFileName( outfilename.c_str() ); #if 1 writer.SetImage( img ); #else Image &ii = writer.GetImage(); (Bitmap&)ii = iig.GetIconImage(); #endif if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } if( verbose ) { std::cout << "success: " << outfilename << std::endl; std::cout << "ref=" << refmd5 << std::endl; std::cout << "md5=" << digest << std::endl; } if( !refmd5 ) { std::cerr << " missing md5= {\"" << digest << "\" , \"" << name << "\" }," << std::endl; return 1; } if( strcmp( refmd5, digest) ) { std::cerr << "Problem with : " << name << " " << refmd5 << " vs " << digest << std::endl; return 1; } } else { assert( refmd5 == 0 ); std::cerr << "Could not generate Icon for: " << filename << std::endl; return 1; } return 0; } } int TestIconImageGenerator4(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestIconImageGenerate4(argv[0],filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestIconImageGenerate4(argv[0], filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestTagPath.cxx000664 001766 001770 00000002675 14517730450 030362 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTagPath.h" #include "gdcmTag.h" int TestTagPath(int argc, char *argv[]) { (void)argc; (void)argv; gdcm::TagPath tp; const char path[] = "/0010,0010"; if( !gdcm::TagPath::IsValid( path ) ) { return 1; } if( !tp.ConstructFromString( path ) ) { return 1; } tp.Print( std::cout ); const char path2[] = "/0010,0011/*/1234,5678"; if( !gdcm::TagPath::IsValid( path2 ) ) { return 1; } if( !tp.ConstructFromString( path2 ) ) { return 1; } std::cout << "FromString:" << std::endl; tp.Print( std::cout ); const unsigned int n = 10; gdcm::Tag list[n]; for(unsigned i = 0; i < n; ++i) { list[i].SetGroup( 0x1234 ); list[i].SetElement( (uint16_t)i ); } if( !tp.ConstructFromTagList( list, n ) ) { return 1; } std::cout << "TagList:" << std::endl; tp.Print( std::cout ); return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestDPath.cxx000664 001766 001770 00000005602 14517730450 030023 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDPath.h" int TestDPath(int, char *[]) { gdcm::DPath tp; #if 0 { const char path[] = "10,10"; if (!gdcm::DPath::IsValid(path)) { return 1; } if (!tp.ConstructFromString(path)) { return 1; } tp.Print(std::cout); std::cout << std::endl; } #endif { const char path[] = "/0010,0010"; if (!gdcm::DPath::IsValid(path)) { return 1; } if (!tp.ConstructFromString(path)) { return 1; } tp.Print(std::cout); std::cout << std::endl; } { const char path[] = "/0008,1120/*/0008,1155"; if (!gdcm::DPath::IsValid(path)) { return 1; } if (!tp.ConstructFromString(path)) { return 1; } tp.Print(std::cout); std::cout << std::endl; } // contains a '/' in creator { const char path[] = "\\19,0,Siemens: Thorax/Multix FD Lab Settings"; if (!gdcm::DPath::IsValid(path)) { return 1; } if (!tp.ConstructFromString(path)) { return 1; } tp.Print(std::cout); std::cout << std::endl; } { const char path[] = "\\019,0,PHILIPS MR R5.6/PART"; if (!gdcm::DPath::IsValid(path)) { return 1; } if (!tp.ConstructFromString(path)) { return 1; } tp.Print(std::cout); std::cout << std::endl; } { const char path[] = "\\4109,2,Applicare/Centricity Radiology Web/Version 1.0"; if (!gdcm::DPath::IsValid(path)) { return 1; } if (!tp.ConstructFromString(path)) { return 1; } tp.Print(std::cout); std::cout << std::endl; } // contains a ',' in creator { const char path[] = "/4453,1000,DR Systems, Inc."; if (!gdcm::DPath::IsValid(path)) { return 1; } if (!tp.ConstructFromString(path)) { return 1; } tp.Print(std::cout); std::cout << std::endl; } // wildcard '*' in item { const char path[] = "/29,2,SIEMENS SYNGO ADVANCED PRESENTATION/*/70,84"; if (!gdcm::DPath::IsValid(path)) { return 1; } if (!tp.ConstructFromString(path)) { return 1; } tp.Print(std::cout); std::cout << std::endl; } // indexed: { const char path[] = "/40,100/1/40,6"; if (!gdcm::DPath::IsValid(path)) { return 1; } if (!tp.ConstructFromString(path)) { return 1; } tp.Print(std::cout); std::cout << std::endl; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestImageFragmentSplitter.cxx000664 001766 001770 00000010077 14517730450 033262 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImageFragmentSplitter.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmTransferSyntax.h" #include "gdcmImage.h" #include "gdcmFilename.h" int TestImageFragmentSplitterFunc(const char *filename, bool verbose = false) { gdcm::ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { const gdcm::FileMetaInformation &header = reader.GetFile().GetHeader(); gdcm::MediaStorage ms = header.GetMediaStorage(); bool isImage = gdcm::MediaStorage::IsImage( ms ); if( isImage ) { if( reader.GetFile().GetDataSet().FindDataElement( gdcm::Tag(0x7fe0,0x0010) ) ) { std::cerr << "Could not read: " << filename << std::endl; return 1; } } return 0; } const gdcm::Image &image = reader.GetImage(); const unsigned int *dims = image.GetDimensions(); if( dims[2] != 1 ) { return 0; // nothing to do } const gdcm::File &file = reader.GetFile(); const gdcm::FileMetaInformation &header = file.GetHeader(); //gdcm::MediaStorage ms = header.GetMediaStorage(); if( header.GetDataSetTransferSyntax() == gdcm::TransferSyntax::ImplicitVRLittleEndian || header.GetDataSetTransferSyntax() == gdcm::TransferSyntax::ImplicitVRBigEndianPrivateGE || header.GetDataSetTransferSyntax() == gdcm::TransferSyntax::ExplicitVRLittleEndian || header.GetDataSetTransferSyntax() == gdcm::TransferSyntax::DeflatedExplicitVRLittleEndian || header.GetDataSetTransferSyntax() == gdcm::TransferSyntax::ExplicitVRBigEndian ) { return 0; // nothing to do } gdcm::ImageFragmentSplitter splitter; splitter.SetInput( image ); splitter.SetFragmentSizeMax( 65536 ); bool b = splitter.Split(); if( !b ) { const gdcm::DataElement &pixeldata = file.GetDataSet().GetDataElement( gdcm::Tag(0x7fe0,0x0010) ); const gdcm::SequenceOfFragments* sqf = pixeldata.GetSequenceOfFragments(); if( sqf && dims[2] == 1 ) { return 0; } gdcm::Filename fn( filename ); if( fn.GetName() == std::string("JPEGDefinedLengthSequenceOfFragments.dcm" ) ) { // JPEG Fragments are packed in a VR:OB Attribute return 0; } std::cerr << "Could not apply splitter: " << filename << std::endl; return 1; } // Create directory first: const char subdir[] = "TestImageFragmentSplitter"; std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { gdcm::System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = gdcm::Testing::GetTempFilename( filename, subdir ); gdcm::ImageWriter writer; writer.SetFileName( outfilename.c_str() ); //writer.SetFile( reader.GetFile() ); // increase test goal writer.SetImage( splitter.GetOutput() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } if( verbose ) std::cout << "Success to write: " << outfilename << std::endl; return 0; } int TestImageFragmentSplitter(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestImageFragmentSplitterFunc(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestImageFragmentSplitterFunc( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestSegmentedPaletteColorLookupTable.cxx000664 001766 001770 00000001333 14517730450 035413 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSegmentedPaletteColorLookupTable.h" int TestSegmentedPaletteColorLookupTable(int, char *[]) { gdcm::SegmentedPaletteColorLookupTable o; return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestDICOMDIRGenerator1.cxx000664 001766 001770 00000005460 14517730450 032147 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDICOMDIRGenerator.h" #include "gdcmDirectory.h" #include "gdcmWriter.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmFilenameGenerator.h" int TestDICOMDIRGenerator1(int argc, char *argv[]) { (void)argc; (void)argv; gdcm::Directory::FilenamesType filenames; gdcm::Directory::FilenamesType outfilenames; const char outsubdir[] = "TestDICOMDIRGenerator1"; std::string outtmpdir = gdcm::Testing::GetTempDirectory( outsubdir ); if( !gdcm::System::FileIsDirectory( outtmpdir.c_str() ) ) { gdcm::System::MakeDirectory( outtmpdir.c_str() ); } const char subdir[] = "TestImageChangeTransferSyntax4"; std::string directory = gdcm::Testing::GetTempDirectory( subdir ); std::string file0 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm"; std::string file1 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm"; std::string file2 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm"; std::string file3 = std::string(directory) + "/SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm"; filenames.push_back( file1 ); filenames.push_back( file3 ); filenames.push_back( file2 ); filenames.push_back( file0 ); size_t nfiles = filenames.size(); gdcm::FilenameGenerator fg; const char pattern[] = "FILE%03d"; fg.SetPattern( pattern ); fg.SetNumberOfFilenames( nfiles ); if( !fg.Generate() ) { std::cerr << "Could not generate" << std::endl; return 1; } for( unsigned int i = 0; i < nfiles; ++i ) { std::string copy = outtmpdir; copy += "/"; copy += fg.GetFilename( i ); std::cerr << filenames[i] << " -> " << copy << std::endl; std::ifstream f1(filenames[i].c_str(), std::fstream::binary); std::ofstream f2(copy.c_str(), std::fstream::binary); f2 << f1.rdbuf(); outfilenames.push_back( copy ); } gdcm::DICOMDIRGenerator gen; gen.SetFilenames( outfilenames ); gen.SetRootDirectory( outtmpdir ); gen.SetDescriptor( "MYDESCRIPTOR" ); if( !gen.Generate() ) { return 1; } gdcm::Writer writer; writer.SetFile( gen.GetFile() ); std::string outfilename = outtmpdir; outfilename += "/DICOMDIR"; writer.SetFileName( outfilename.c_str() ); if( !writer.Write() ) { return 1; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestPhotometricInterpretation.cxx000664 001766 001770 00000006372 14517730450 034255 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmPhotometricInterpretation.h" #include // strlen int TestPhotometricInterpretation(int, char *[]) { gdcm::PhotometricInterpretation pi; int end = gdcm::PhotometricInterpretation::PI_END; for( int i = 1; i < end; ++i) { const char *pistr = gdcm::PhotometricInterpretation::GetPIString( (gdcm::PhotometricInterpretation::PIType)i ); if( strlen( pistr ) % 2 ) { std::cerr << pistr << std::endl; return 1; } } pi = gdcm::PhotometricInterpretation::RGB; pi = gdcm::PhotometricInterpretation::GetPIType( "MONOCHROME2" ); if( pi != gdcm::PhotometricInterpretation::MONOCHROME2 ) { std::cerr << "PhotometricInterpretation: " << pi << std::endl; return 1; } pi = gdcm::PhotometricInterpretation::GetPIType( "MONOCHROME2 " ); if( pi != gdcm::PhotometricInterpretation::MONOCHROME2 ) { std::cerr << "PhotometricInterpretation: " << pi << std::endl; return 1; } pi = gdcm::PhotometricInterpretation::GetPIType( " MONOCHROME2 " ); if( pi != gdcm::PhotometricInterpretation::MONOCHROME2 ) { std::cerr << "PhotometricInterpretation: " << pi << std::endl; return 1; } pi = gdcm::PhotometricInterpretation::GetPIType( " MONOCHROME2 " ); if( pi != gdcm::PhotometricInterpretation::MONOCHROME2 ) { std::cerr << "PhotometricInterpretation: " << pi << std::endl; return 1; } pi = gdcm::PhotometricInterpretation::GetPIType( " MONOCHROME2 " ); if( pi != gdcm::PhotometricInterpretation::MONOCHROME2 ) { std::cerr << "PhotometricInterpretation: " << pi << std::endl; return 1; } pi = gdcm::PhotometricInterpretation::GetPIType( "MONOCHROME" ); if( pi != gdcm::PhotometricInterpretation::MONOCHROME1 ) { std::cerr << "PhotometricInterpretation: " << pi << std::endl; return 1; } pi = gdcm::PhotometricInterpretation::GetPIType( "YBR_PARTIAL_42 " ); if( pi != gdcm::PhotometricInterpretation::YBR_PARTIAL_422) { std::cerr << "PhotometricInterpretation: " << pi << std::endl; return 1; } pi = gdcm::PhotometricInterpretation::GetPIType( "PALETTE" ); if( pi != gdcm::PhotometricInterpretation::PALETTE_COLOR ) { std::cerr << "PhotometricInterpretation: " << pi << std::endl; return 1; } pi = gdcm::PhotometricInterpretation::GetPIType( "YBR_FULL_4" ); if( pi != gdcm::PhotometricInterpretation::YBR_FULL_422) { std::cerr << "PhotometricInterpretation: " << pi << std::endl; return 1; } // FIXME ? pi = gdcm::PhotometricInterpretation::GetPIType( "YBR_FUL" ); if( pi != gdcm::PhotometricInterpretation::YBR_FULL ) { std::cerr << "PhotometricInterpretation: " << pi << std::endl; return 1; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestOverlay.cxx000664 001766 001770 00000001250 14517730450 030437 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmOverlay.h" int TestOverlay(int, char *[]) { gdcm::Overlay o; o.Print( std::cout ); return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestWriter2.cxx000664 001766 001770 00000002035 14517730450 030356 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ int TestWriter2(int argc, char *argv[]) { const char *filename = argv[1]; const char *outfilename = argv[2]; Reader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } Writer writer; writer.SetFileName( outfilename ); writer.SetFile( reader.GetFile() ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileChangeTransferSyntax4.cxx000664 001766 001770 00000016142 14517730450 034011 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileChangeTransferSyntax.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmImageReader.h" #include "gdcmFilename.h" #include "gdcmImageChangePlanarConfiguration.h" #include "gdcmByteSwap.h" static int TestFileChangeTransferSyntax4Func(const char *filename, bool verbose = false) { using namespace gdcm; if( verbose ) std::cout << "Processing: " << filename << std::endl; // Create directory first: const char subdir[] = "TestFileChangeTransferSyntax4"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); if( verbose ) std::cout << "Generating: " << outfilename << std::endl; const gdcm::TransferSyntax ts( TransferSyntax::RLELossless ); gdcm::FileChangeTransferSyntax fcts; fcts.SetTransferSyntax( ts ); fcts.SetInputFileName( filename ); fcts.SetOutputFileName( outfilename.c_str() ); ImageCodec *ic = fcts.GetCodec(); if( !ic ) { return 1; } if( !fcts.Change() ) { gdcm::Reader reader; reader.SetFileName( filename ); if( !reader.Read() ) { std::cerr << "not dicom" << std::endl; return 1; } const gdcm::File & file = reader.GetFile(); const gdcm::FileMetaInformation & fmi = file.GetHeader(); const TransferSyntax &tsref = fmi.GetDataSetTransferSyntax(); if( tsref.IsEncapsulated() ) { if( verbose ) std::cout << "Will not generate (encaps): " << outfilename << std::endl; return 0; } gdcm::Filename fn( filename ); const char *name = fn.GetName(); // Special handling: if( strcmp(name, "CT-MONO2-12-lomb-an2.acr" ) == 0 || strcmp(name, "LIBIDO-8-ACR_NEMA-Lena_128_128.acr") == 0 || strcmp(name, "gdcm-ACR-LibIDO.acr") == 0 || strcmp(name, "gdcm-MR-SIEMENS-16-2.acr") == 0 || strcmp(name, "libido1.0-vol.acr") == 0 || strcmp(name, "test.acr") == 0 || strcmp(name, "LIBIDO-24-ACR_NEMA-Rectangle.dcm") == 0 || strcmp(name, "MR_Spectroscopy_SIEMENS_OF.dcm") == 0 // not an image || strcmp(name, "ELSCINT1_PMSCT_RLE1.dcm") == 0 || strcmp(name, "ELSCINT1_PMSCT_RLE1_priv.dcm") == 0 || strcmp(name, "gdcm-CR-DCMTK-16-NonSamplePerPix.dcm") == 0 || strcmp(name, "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm") == 0 || strcmp(name, "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm") == 0 // Implicit VR Big Endian DLX (G.E Private) || strcmp(name, "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm") == 0 // Explicit VR Big Endian || strcmp(name, "US-RGB-8-epicard.dcm") == 0 // Explicit VR Big Endian || strcmp(name, "GE_DLX-8-MONO2-PrivateSyntax.dcm") == 0 // Implicit VR Big Endian DLX (G.E Private) || strcmp(name, "GE_CT_With_Private_compressed-icon.dcm") == 0 // Explicit VR Big Endian || strcmp(name, "JDDICOM_Sample2-dcmdjpeg.dcm") == 0 // cannot recreate FMI || strcmp(name, "DMCPACS_ExplicitImplicit_BogusIOP.dcm") == 0 // ImageRegionReader does not handle it || strcmp(name, "unreadable.dcm") == 0 // No Pixel Data (old ACR-NEMA) || strcmp(name, "US-YBR_FULL_422-EVRLE.dcm") == 0 // packed ybr422 || strncmp(name, "DICOMDIR", 8) == 0 // DICOMDIR* || strncmp(name, "dicomdir", 8) == 0 // dicomdir* ) { if( verbose ) std::cout << "Will not generate: " << outfilename << std::endl; return 0; } std::cerr << "Could not change: " << filename << std::endl; return 1; } // Let's read that file back in ! gdcm::ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not even reread our generated file : " << outfilename << std::endl; return 1; } // Check that after decompression we still find the same thing: int res = 0; gdcm::Image img = reader2.GetImage(); int pc = 0; // When recompressing: US-RGB-8-epicard.dcm, make sure to compute the md5 using the // same original Planar Configuration... if( (int)img.GetPlanarConfiguration() != pc ) { gdcm::ImageChangePlanarConfiguration icpc; icpc.SetInput( reader2.GetImage() ); icpc.SetPlanarConfiguration( pc ); icpc.Change(); img = icpc.GetOutput(); } //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; bool res2 = img.GetBuffer(buffer); if( !res2 ) { std::cerr << "could not get buffer: " << outfilename << std::endl; return 1; } // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: #ifdef GDCM_WORDS_BIGENDIAN if( img.GetPixelFormat().GetBitsAllocated() == 16 ) { assert( !(len % 2) ); assert( img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME1 || img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME2 ); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem( (unsigned short*)buffer, gdcm::SwapCode::LittleEndian, len/2); } #endif const char *ref = gdcm::Testing::GetMD5FromFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( !ref ) { // new regression image needs a md5 sum std::cerr << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } if(res) { std::cerr << "problem with: " << outfilename << std::endl; } if( verbose ) { std::cout << "file was written in: " << outfilename << std::endl; } delete[] buffer; return res; } int TestFileChangeTransferSyntax4(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileChangeTransferSyntax4Func(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileChangeTransferSyntax4Func( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestIconImageFilter.cxx000664 001766 001770 00000011403 14517730450 032020 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmIconImageFilter.h" #include "gdcmTesting.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmImageReader.h" #include "gdcmImageWriter.h" #include "gdcmImage.h" static const char * const iconimagearray[][2] = { { "b818c90fc4135423dfc118c3305d23ef" , "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm" }, { "57e43cf467d9bc4c4a43e0a97329075d" , "SIEMENS_CSA2.dcm" }, { "fc5db4e2e7fca8445342b83799ff16d8" , "simpleImageWithIcon.dcm" }, { "93c1b9e4c97cf5ff3501f3d8114c3b89" , "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm" }, { "07950df5d3662740874e93d2c41dec18" , "MR-SIEMENS-DICOM-WithOverlays.dcm" }, { "e1305d5341e8ced04caff40c706c23b0" , "AMIInvalidPrivateDefinedLengthSQasUN.dcm" }, { "5f76af83e7b99cab45a70248824c2145" , "PICKER-16-MONO2-Nested_icon.dcm" }, { "59d8479e0025d8bbb3244551d6535890" , "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm" }, { "9ad43e72601a228c4a3d021f08a09b69" , "CT-SIEMENS-Icone-With-PaletteColor.dcm" }, { "a9c3c78082a46e2226a4b1ff499ccd74" , "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm" }, { "50387cdd945b22ccbb5d1824e955deeb" , "05148044-mr-siemens-avanto-syngo.dcm" }, { "e42ea2852be5d20f95083991728d8623" , "GE_LOGIQBook-8-RGB-HugePreview.dcm" }, { "c38df20a8514714f5d5af1699a841c60" , "GE_CT_With_Private_compressed-icon.dcm" }, { "61b2bf04c18a0f67b7e720e07804dcdd" , "KODAK_CompressedIcon.dcm" }, { "620f0b67a91f7f74151bc5be745b7110" , "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm" }, { "938f6ea0bea13ff5c45c7934e603caac" , "US-GE-4AICL142.dcm" }, { "9c145bbfd00e867d5f9f6efe9651a71e" , "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" }, { "48bf71ea2e18b0632ec318d55fb455ab" , "Bug_Siemens_PrivateIconNoItem.dcm" }, { "a29e9def9a1478c9f8b957c68b33885b" , "PET-GE-dicomwrite-PixelDataSQUNv2.dcm" }, // VEPRO VIF { "ea4673b2aa72f477188bac340e115f4c" , "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm" }, { "660417e04b9af62832a43bf82369e4fa" , "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm" }, // gdcmDataExtra { "a144b851c9262c97dde567d4d3781733" , "2929J888_8b_YBR_RLE_PlanConf0_breaker.dcm" }, // sentinel { nullptr, nullptr } }; int TestIconImageFilterFunc(const char *filename, bool verbose = false) { gdcm::ImageReader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { return 0; } gdcm::IconImageFilter iif; iif.SetFile( reader.GetFile() ); bool b = iif.Extract(); gdcm::Filename fn( filename ); const char *name = fn.GetName(); unsigned int i = 0; const char *p = iconimagearray[i][1]; while( p != nullptr ) { if( strcmp( name, p ) == 0 ) { break; } ++i; p = iconimagearray[i][1]; } const char *refmd5 = iconimagearray[i][0]; if( b ) { if( iif.GetNumberOfIconImages() != 1 ) return 1; const gdcm::IconImage &icon = iif.GetIconImage(0); if( verbose ) icon.Print( std::cout ); unsigned long len = icon.GetBufferLength(); std::vector< char > vbuffer; vbuffer.resize( len ); char *buffer = vbuffer.data(); bool res2 = icon.GetBuffer(buffer); if( !res2 ) { std::cerr << "res2 failure:" << filename << std::endl; return 1; } char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( verbose ) { std::cout << "ref=" << refmd5 << std::endl; std::cout << "md5=" << digest << std::endl; } if( !refmd5 ) { std::cerr << "Problem with : " << name << " missing md5= " << digest << std::endl; return 1; } if( strcmp( refmd5, digest) != 0 ) { std::cerr << "Problem with : " << name << " " << refmd5 << " vs " << digest << std::endl; return 1; } } else { assert( refmd5 == nullptr ); } return 0; } int TestIconImageFilter(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestIconImageFilterFunc(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestIconImageFilterFunc( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestPrinter1.cxx000664 001766 001770 00000050307 14517730450 030531 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmPrinter.h" #include "gdcmFilename.h" #include "gdcmTesting.h" // How to update this file: // $ while IFS=\; read -r col1 col2 col3; do echo "-e 's/$col2/$col3/g'"; done < /tmp/full > /tmp/s // the following list has been generated using gdcm, git: df760b9d8b3c9b280ad423153c649190f6e21204 // This correspond to the commit just before: // BUG: an explicit length VR=SQ dataelement would not have been loaded as // expected and a call to GetSequenceOfItems would fails. Thus downstream filter // would fail load the SQ as expected. Introducing the more robust interface: // GetValueAsSQ to solve that issue. static const char * const printmd5[][2] = { { "a19bffac370df32acbf6b4991d1cbafe" , "00191113.dcm" } , { "94816f96c7db33e8449cc4f2e0843ff8" , "012345.002.050.dcm" } , { "94f8c6ab090bdc11e61625bfc2dd39b7" , "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm" } , { "20c11831c616eb121a405cd73de5cba2" , "05148044-mr-siemens-avanto-syngo.dcm" } , { "ec10dcbf1b13ace8a6c0cc5b24c6c870" , "3E768EB7.dcm" } , { "fde1da68a1707dcc687ddffd57e6b3c3" , "ACUSON-24-YBR_FULL-RLE-b.dcm" } , { "a27c6628d6379783a3be223481d5cba4" , "ACUSON-24-YBR_FULL-RLE.dcm" } , { "9f3aa114b955a812942f815b6b456eaf" , "ALOKA_SSD-8-MONO2-RLE-SQ.dcm" } , { "0f44d8305020f5fb854563eb4335e207" , "AMIInvalidPrivateDefinedLengthSQasUN.dcm" } , { "56aea0ecd59a5b9427dbd60523eeb2c1" , "BugGDCM2_UndefItemWrongVL.dcm" } , { "6d2af85d2af299c223b684538d42d9e5" , "CR-MONO1-10-chest.dcm" } , { "820d45cefd528e011921ea129bec9084" , "CT_16b_signed-UsedBits13.dcm" } , { "fcf2ca019aa3138188edb18552983733" , "CT-MONO2-12-lomb-an2.acr" } , { "0e4137f63819c706dfa370405d662c79" , "CT-MONO2-16-ankle.dcm" } , { "f00a663066627e7ecdd1a7379137d396" , "CT-MONO2-16-brain.dcm" } , { "87eadd3a3460c13593c9468bc533aa58" , "CT-MONO2-16-chest.dcm" } , { "8b0efbe7cfd72a7d14cef44683fbacab" , "CT-MONO2-16-ort.dcm" } , { "32c8e40e0726bbcc374f20771d37a312" , "CT-MONO2-8-abdo.dcm" } , { "c5ffd15172c43b200e3654d5e3e45f3e" , "CT-SIEMENS-Icone-With-PaletteColor.dcm" } , { "ca0e93a8995fccad9d031e0125ea1a29" , "CT-SIEMENS-MissingPixelDataInIconSQ.dcm" } , { "a46ca467a0df5e1c71c8017b6b6768e7" , "D_CLUNIE_CT1_J2KI.dcm" } , { "d2698545b07ad721faa71fdc1cf4a35d" , "D_CLUNIE_CT1_J2KR.dcm" } , { "78f619a764a94a2c2bdc084d53ad2577" , "D_CLUNIE_CT1_JPLL.dcm" } , { "4aaa4a602d7a1fd80c023acba36d6a84" , "D_CLUNIE_CT1_RLE.dcm" } , { "9ee24f3a3291cd86f0bc78fddc3417e7" , "D_CLUNIE_CT2_JPLL.dcm" } , { "b01b2b28aa3caa945b05865a9c440349" , "D_CLUNIE_CT2_RLE.dcm" } , { "7d6531dc92c53ad25835b75fa5505b66" , "D_CLUNIE_MR1_JPLL.dcm" } , { "e8a970a1c861192331a98162146ee0f9" , "D_CLUNIE_MR1_JPLY.dcm" } , { "6f8b7b128c86c5a670a284e7eac38391" , "D_CLUNIE_MR1_RLE.dcm" } , { "b770b1ca257d7c1c885f69a5a1b58808" , "D_CLUNIE_MR2_JPLL.dcm" } , { "da74aefef4e8ac49dbe1a4dd3b1dcb26" , "D_CLUNIE_MR2_JPLY.dcm" } , { "023eb2a9ecbfd3c04bb148ec339865f0" , "D_CLUNIE_MR2_RLE.dcm" } , { "fbeaa26ab8c0ce7abcae5c24532cab0c" , "D_CLUNIE_MR3_JPLL.dcm" } , { "d2b228b64ef53df5b8fb07c227e4250a" , "D_CLUNIE_MR3_JPLY.dcm" } , { "ef7b70b4f87f540f7c2fe954c5988d82" , "D_CLUNIE_MR3_RLE.dcm" } , { "1646ec013060ef3f261849db705f80f3" , "D_CLUNIE_MR4_JPLL.dcm" } , { "fbbfe4caab2179641bd0de5d8ccf79ae" , "D_CLUNIE_MR4_JPLY.dcm" } , { "fafdb8499580e59c2f6d9047894272ea" , "D_CLUNIE_MR4_RLE.dcm" } , { "bc35454da5d8c0825236ccae83adcb82" , "D_CLUNIE_NM1_JPLL.dcm" } , { "03527dbfa9b0b82fee7d6eb601abf470" , "D_CLUNIE_NM1_JPLY.dcm" } , { "9488a473e2cd1fc981f36643e7dc1b82" , "D_CLUNIE_NM1_RLE.dcm" } , { "d9da8798488b1c825dbd4ef940e386b9" , "D_CLUNIE_RG1_JPLL.dcm" } , { "68a498853d26cce827eefb0f8be3581d" , "D_CLUNIE_RG1_RLE.dcm" } , { "9f652b621320650c6be743b6bafcf539" , "D_CLUNIE_RG2_JPLL.dcm" } , { "1f0e2edba097f4491b7d45fed604729d" , "D_CLUNIE_RG2_JPLY.dcm" } , { "403e0e40507608cdcd61ee461de91226" , "D_CLUNIE_RG2_RLE.dcm" } , { "73ecf348f874e7fb69f5dbfb4637979e" , "D_CLUNIE_RG3_JPLL.dcm" } , { "f454ce36a97e4d4164a628e686a9977b" , "D_CLUNIE_RG3_JPLY.dcm" } , { "ec7dcf6857238547f0fb43f51317b05f" , "D_CLUNIE_RG3_RLE.dcm" } , { "af35b9ad269b8a37df3d25389655272e" , "D_CLUNIE_SC1_JPLY.dcm" } , { "50f92b02a370e2858632dfde330a2881" , "D_CLUNIE_SC1_RLE.dcm" } , { "ad377bc5cc50cb1b6312e9035417b2f1" , "D_CLUNIE_US1_RLE.dcm" } , { "e6ea16c1ba4a8e8f97383811fd91288a" , "D_CLUNIE_VL1_RLE.dcm" } , { "291ac2ee3c48a76ae0ab9a095199997c" , "D_CLUNIE_VL2_RLE.dcm" } , { "91c92c4d1330c283012d2bdd3a91dc2f" , "D_CLUNIE_VL3_RLE.dcm" } , { "fcc44b14754a56879e0f3afc8161c1c0" , "D_CLUNIE_VL4_RLE.dcm" } , { "d7ded36c6827f41d61790bed41b963e3" , "D_CLUNIE_VL6_RLE.dcm" } , { "75801e9732698ea89740f935052f28d6" , "D_CLUNIE_XA1_JPLL.dcm" } , { "79d8daf6837a4b5aefaa963b1fb88df1" , "D_CLUNIE_XA1_JPLY.dcm" } , { "e2bda8297745ab7a77ca84242ad4c980" , "D_CLUNIE_XA1_RLE.dcm" } , { "bb52d9f7a9116c87103066dd18a60e68" , "D_CLUNIE_CT1_JLSN.dcm" } , { "8984d6319cd913d0f88fdb61989412f2" , "D_CLUNIE_CT1_JLSL.dcm" } , { "4ef94d44a83066b80b39d254fb2a1c28" , "DCMTK_JPEGExt_12Bits.dcm" } , { "d982dca9cc6c9db94a6233ca76e52f26" , "DermaColorLossLess.dcm" } , { "ee354d9b221360982f15b630e1fdb046" , "DICOMDIR" } , { "aa0556f64fb938935447f3e3b6b67b68" , "dicomdir_Acusson_WithPrivate_WithSR" } , { "9934ab3c8adca82cad0fe8997b6c5cd3" , "DICOMDIR_MR_B_VA12A" } , { "6a4cfd1ddd6eea5538dd7f8cf1ba1e1f" , "DICOMDIR-Philips-EasyVision-4200-Entries" } , { "4254e4123245565e43a86e191acff01b" , "dicomdir_Pms_With_heavy_embedded_sequence" } , { "6b4a338aff7a2e0b75e39bc7b2393ec2" , "dicomdir_Pms_WithVisit_WithPrivate_WithStudyComponents" } , { "356f30be965bbe4e335a56c6c5fe1928" , "dicomdir_With_embedded_icons" } , { "cfa838dc4a9f62199b10909744dee484" , "DMCPACS_ExplicitImplicit_BogusIOP.dcm" } , { "c28bfc62319b6059b4e7a30dd31599de" , "DX_GE_FALCON_SNOWY-VOI.dcm" } , { "1cbeb77ea2d6e0171dd38e0d6d5cb0b9" , "DX_J2K_0Padding.dcm" } , { "3493bf0e698798529fde6ef488289879" , "ELSCINT1_JP2vsJ2K.dcm" } , { "8f5581be656bd6f1ab6c9ec94f302284" , "ELSCINT1_LOSSLESS_RICE.dcm" } , { "54f138a1aa6819ec1560a7ed344cde1a" , "ELSCINT1_PMSCT_RLE1.dcm" } , { "1f3720cdf4c65748d512fe7e6f5dcab8" , "EnhancedWithIPPPerFrameIOPShared.dcm"} , { "d576bf8e8b2ca71fd543d29698807e85" , "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm" } , { "3199cd21166043d619209d7a2073fb56" , "fffc0000UN.dcm" } , { "9b426b02521cbc2f3ee25ab383ca835e" , "FUJI-10-MONO1-ACR_NEMA_2.dcm" } , { "f705cfe771a299023c8dcc94b2184960" , "FUJI-ffff-MONO1-J2K.dcm"} , { "2aba3dacd00a0bc14a06e2d7142b916a" , "gdcm-ACR-LibIDO.acr" } , { "b808c747b59f9d1a91a01491103abea5" , "gdcm-CR-DCMTK-16-NonSamplePerPix.dcm" } , { "e7b5089a2a007221993ee5a7e6d44959" , "gdcm-JPEG-Extended.dcm" } , { "20894653d750b4edf6034258a8dc3cf7" , "gdcm-JPEG-LossLess3a.dcm" } , { "5011206e2a744c8a6f2cedb1ff7e5e11" , "gdcm-JPEG-LossLessThoravision.dcm" } , { "49f3c524267607c09b6a78448f804eb8" , "gdcm-MR-PHILIPS-16-Multi-Seq.dcm" } , { "3ada4145885084c465fc0d2969299428" , "gdcm-MR-PHILIPS-16-NonSquarePixels.dcm" } , { "ac5f5bea451fd81aa2416fbab1a4e8c4" , "gdcm-MR-SIEMENS-16-2.acr" } , { "48c49a7a41a7efea9ea0eadcd89ac9fa" , "gdcm-US-ALOKA-16.dcm" } , { "7d42ad3c14c4fc9953ed8da6df4ae6c6" , "GE_CT_With_Private_compressed-icon.dcm" } , { "9e126a24f81534e1cd653f16739a6192" , "GE_DLX-8-MONO2-Multiframe.dcm" } , { "aa39aa421b9d1e9c51e261ed632250a3" , "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm" } , { "61ca6c5115e6f74565f6f2ca06647444" , "GE_DLX-8-MONO2-PrivateSyntax.dcm" } , { "84b29e188d5067565469c7c31676ff58" , "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm" } , { "8d398fce426d3a248d8c3f7582e3751d" , "GE_GENESIS-16-MONO2-WrongLengthItem.dcm" } , { "d9111c251fd785c328897e8eadc19dbc" , "GE_LOGIQBook-8-RGB-HugePreview.dcm" } , { "511da6acdb4f3189c93928e99b73ba39" , "GE_MR_0025xx1bProtocolDataBlock.dcm" } , { "d5efa34d8091e1ad04683eefb41f33c7" , "GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm" } , { "d41d8cd98f00b204e9800998ecf8427e" , "IM-0001-0066.dcm" } , { "cd085d783924d8a7fa2270ff40c6dc3e" , "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm" } , { "40b0edf4b7c8a6f3756cbc1cd2d00359" , "JDDICOM_Sample2.dcm" } , { "e08545c49082b527a6446c9077227471" , "JDDICOM_Sample2-dcmdjpeg.dcm" } , { "9fc7096fd5d3ffdcbfe535f517689e62" , "JPEGDefinedLengthSequenceOfFragments.dcm" } , { "9c0548b6cc474c309686cfc3bdff7723" , "JPEG_LossyYBR.dcm" } , { "7c666b7c8fe0d52d906150d80d805cb7" , "KODAK-12-MONO1-Odd_Terminated_Sequence.dcm" } , { "492ba4d8a4b904a15a4f14fe35b31a16" , "KODAK_CompressedIcon.dcm" } , { "3b2388a839775bb10d45ff19465a63ce" , "LEADTOOLS_FLOWERS-16-MONO2-JpegLossless.dcm" } , { "3789010ccb4520b923e2bdc260377a2f" , "LEADTOOLS_FLOWERS-16-MONO2-RLE.dcm" } , { "27626466079fd8b8f8965947a0bba342" , "LEADTOOLS_FLOWERS-16-MONO2-Uncompressed.dcm" } , { "ee4b520d66c63601d228168c84a95150" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossless.dcm" } , { "dbd4d69de9e9579fa9938bbfba0bf770" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossy.dcm" } , { "43a20a3308793dabbc8ea4b7e0a0e04f" , "LEADTOOLS_FLOWERS-24-RGB-Uncompressed.dcm" } , { "8af486710c7ff58fdedc6543aec353fe" , "LEADTOOLS_FLOWERS-8-MONO2-JpegLossy.dcm" } , { "b708f5dd17424f0d2fe9355a345b5954" , "LEADTOOLS_FLOWERS-8-MONO2-RLE.dcm" } , { "e3ca577b17fbc3bb8c0b0da85cc9cd6c" , "LEADTOOLS_FLOWERS-8-MONO2-Uncompressed.dcm" } , { "0082bdcd44ae5d2681d645b49ec49a80" , "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm" } , { "6ac99a8ae372d278c96627f9cf76b6bb" , "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm" } , { "8fb0042d71596bb45e7387b0f0ed0d6b" , "libido1.0-vol.acr" } , { "05fe8714421e16371d62ae2c280b7107" , "LIBIDO-16-ACR_NEMA-Volume.dcm" } , { "251033db6d79bcfde7a8e17a814713a9" , "LIBIDO-24-ACR_NEMA-Rectangle.dcm" } , { "d71a08e78c1d33c858836f6c1a0f2231" , "LIBIDO-8-ACR_NEMA-Lena_128_128.acr" } , { "e39e4923be2d8bb2fb19c6c8deae216f" , "LJPEG_BuginGDCM12.dcm" } , { "e6bc657d132abebb01a675ade04129f1" , "MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm" } , { "4d808eca0d736b876cad3c566722d077" , "MAROTECH_CT_JP2Lossy.dcm" } , { "497d6ea45b8f3f7f6a3bf8125dcc43b1" , "MR16BitsAllocated_8BitsStored.dcm" } , { "cff201fb9749bd85a43d9bfb3675a25e" , "MR-Brucker-CineTagging-NonSquarePixels.dcm" } , { "31246836410a24124acf6bea5a36a942" , "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm" } , { "84d300c76b8e8bee108d7a1e2da81319" , "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm" } , { "8419613dfb8d4b190ef8a988f8927bce" , "MR-MONO2-12-an2.acr" } , { "b4058b67ec1eb3d3d3acde27d51eb24a" , "MR-MONO2-12-angio-an1.acr" } , { "f782f6ea25928310bd69c3ca5c6a97d2" , "MR-MONO2-12-shoulder.dcm" } , { "7f6bccb00b34a7d277eacaffd2bb0362" , "MR-MONO2-16-head.dcm" } , { "294324abb8e0e5df7907fba58d60ab99" , "MR-MONO2-8-16x-heart.dcm" } , { "cd623ac04602182dc66adb505c516341" , "MR_Philips-Intera_BreaksNOSHADOW.dcm" } , { "ced145431248f1e00e9bdc23b0c61674" , "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm" } , { "8eab7fcf9c53d06968dde33f6b3a8918" , "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm" } , { "3d24233b19788d349f64b7b267723186" , "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm" } , { "1693399bc1edb7cdc494095a27201eab" , "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm" } , { "5797c9dfe94e4a4bccfbf81ab0aaa957" , "MR-SIEMENS-DICOM-WithOverlays.dcm" } , { "cc2f9bcd27cf7880482fcf72b9afd303" , "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm" } , { "bf324a1c91d3a09d9136f54f5910e570" , "MR_SIEMENS_forceLoad29-1010_29-1020.dcm" } , { "67d2eb3dba82f5d3ac5620b3fb7932d6" , "MR_Spectroscopy_SIEMENS_OF.dcm" } , { "1a5646a7b05840813c067d8c8dfa507e" , "NM-MONO2-16-13x-heart.dcm" } , { "1bc606b879ab7bd244782685f5f6149d" , "OsirixFake16BitsStoredFakeSpacing.dcm" } , { "bf793beb0e96f2399e467409e3cf5311" , "OT-MONO2-8-a7.dcm" } , { "7f4cddc9a88f8c5147b89f769eb1cae7" , "OT-PAL-8-face.dcm" } , { "5fce2728bd9457d4fc1224a374829e2f" , "PET-cardio-Multiframe-Papyrus.dcm" } , { "aa865ae5cf7c0c0320b58e7714155f13" , "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm" } , { "020332d94a89fd2be159f9b82637db5d" , "PHILIPS_GDCM12xBug2.dcm" } , { "9f97969789e9ae279c87189a62ab12d4" , "PHILIPS_GDCM12xBug.dcm" } , { "c38ad661c6a14f8bd88b304755e7ba7b" , "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" } , { "73d6489008482473f2839c3984d987c6" , "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm" } , { "03d88060c3bd820b96840599c0099470" , "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm" } , { "1f198bdb09f5e52dc3f9ad1dfced8a4d" , "PHILIPS_Intera-16-MONO2-Uncompress.dcm" } , { "4f34474ed72e6a5960fc4691e588f8e0" , "PICKER-16-MONO2-Nested_icon.dcm" } , { "629da04611e097e2cc532d6fe5e6454d" , "PICKER-16-MONO2-No_DicomV3_Preamble.dcm" } , { "3aaca1826b4a4deb9e41ebf2af4fa6b2" , "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm" } , { "62837f966bfd15ca8f9853cc905e20a4" , "RadBWLossLess.dcm" } , { "c2f13224f3f0bc3aa8bbfa6f4a0a23ec" , "rle16loo.dcm" } , { "bd5d9b2f994cfc0c6a95cca8c586533a" , "rle16sti.dcm" } , { "631c5bb2e2f046215999072d13316363" , "SIEMENS-12-Jpeg_Process_2_4-Lossy-a.dcm" } , { "e71384013e91e3a6e6acdb84b9c83a4d" , "SIEMENS_CSA2.dcm" } , { "fa919f3ee7cef3af1f362dd166d53103" , "SIEMENS_GBS_III-16-ACR_NEMA_1.acr" } , { "825580733e8cfaf5d8679348889db40d" , "SIEMENS_GBS_III-16-ACR_NEMA_1-ULis2Bytes.dcm" } , { "ff6bf3c70ef86ca08244317afd7fb98a" , "SIEMENS_ImageLocationUN.dcm" } , { "ac5f5bea451fd81aa2416fbab1a4e8c4" , "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm" } , { "5202b5e2521b1a5b480317864081beae" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm" } , { "8969371a42ecebc02f316a344a887c81" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm" } , { "c32e8171b87f3825bf6a37c4ed4b627a" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm" } , { "ea85da9fae20a585af6a71467916fa4a" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm" } , { "1e22b1b3ef16b82cac4299279018282a" , "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm" } , { "16f02a1ee88f8753978a3dad9a5968ac" , "SIEMENS_MAGNETOM-12-MONO2-Uncompressed.dcm" } , { "bec3be5aaf61c96757095120bc5db29e" , "SIEMENS_MAGNETOM-12-MONO2-VRUN.dcm" } , { "3fb1221855970e4837dccab0d0441ccc" , "SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm" } , { "be0b7098b442990aebf3364d747af482" , "SIEMENS-MR-RGB-16Bits.dcm" } , { "433387bd667a1737628f05547d982758" , "SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs.acr" } , { "5fc4be2074b6186d3993818cd1baeb89" , "SIEMENS_Sonata-12-MONO2-SQ.dcm" } , { "c56ae357244ed3d4203c2b28fe3ab447" , "SIEMENS_Sonata-16-MONO2-Value_Multiplicity.dcm" } , { "7176eb4ec64dab63578eb6826318c87d" , "SignedShortLosslessBug.dcm" } , { "3b7f193595e3954796ed5c15ba65f9e4" , "simpleImageWithIcon.dcm" } , { "cbd59e416dd82dc14df251ea6fccb55b" , "test.acr" } , { "0c2c475f6d21ae0aeadbf16565dcdbc4" , "TG18-CH-2k-01.dcm" } , { "e8cc7ed19eedf9bed9ab60683f3dbfa1" , "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm" } , { "aa708d3b15e451c8367e7909257d9346" , "TheralysGDCM120Bug.dcm" } , { "e8819809884c214fe78ee2b227417e5c" , "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm" } , { "203e3207fb53e4141341cd112fc2e867" , "undefined_length_un_vr.dcm" } , { "787ca80c8dd1aa619d5f85610862380b" , "US-GE-4AICL142.dcm" } , { "f1e9c893391e1d458cffa2a1e0904160" , "US-IRAD-NoPreambleStartWith0003.dcm" } , { "d1d9be67c9d066fabc8e1c4ae124f9a0" , "US-IRAD-NoPreambleStartWith0005.dcm" } , { "a917b69aed7c81f4e2fb5983ca340ebf" , "US-MONO2-8-8x-execho.dcm" } , { "d58a4930f5b436939d297730b883d5b9" , "US-PAL-8-10x-echo.dcm" } , { "b42152fc38f88b3a52f93003ab83a148" , "US-RGB-8-epicard.dcm" } , { "87fa2e4c03b664afa7f5b70cdaa5ac59" , "US-RGB-8-esopecho.dcm" } , { "7a3535f869f4a450b8de3d73a268e713" , "XA-MONO2-8-12x-catheter.dcm" } , { "167af475c7e2f4605544fa1602c34d50" , "IM-0001-0066.CommandTag00.dcm" }, { "d2cb6962750eb8f92c480e6cc2f4d104" , "GDCMJ2K_TextGBR.dcm" }, { "2e039bbc7520f809963e051ff5144ccf" , "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" }, { "5046074a1377d76f109df7ce331c8144" , "NM_Kakadu44_SOTmarkerincons.dcm" }, { "fdd8a53915712a924ac74c26ec4d1051" , "PhilipsInteraSeqTermInvLen.dcm" }, { "2940bd46f097f79012d24f47504c3c8c" , "TOSHIBA_J2K_OpenJPEGv2Regression.dcm" }, { "696917fea41e83b9980bad82b609162c" , "TOSHIBA_J2K_SIZ0_PixRep1.dcm" }, { "7ef3da46c43e51cfe2eb82e4d23dd623" , "TOSHIBA_J2K_SIZ1_PixRep0.dcm" }, { "47d8f59fe43aae50263fef27145cca11" , "NM-PAL-16-PixRep1.dcm" }, { "27ccfa08495b406c9c5e1b686a8b35f9" , "MEDILABInvalidCP246_EVRLESQasUN.dcm" }, { "43620b01e21fdcecb2ff4cbd71f921cc" , "JPEGInvalidSecondFrag.dcm" }, { "2a8649f99c4ada4109b6aa7c52cf1a6a" , "SC16BitsAllocated_8BitsStoredJPEG.dcm" }, { "25cca40808c9ecdaac6316667c77daac" , "SC16BitsAllocated_8BitsStoredJ2K.dcm" }, { "a841fb52502c740d57d187219a906173" , "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" }, { "41d1baead629d878d09d6c1037faf47a" , "JPEGNote_empty.dcm" }, { "3cb9917c468226c265ef637aac5f4b61" , "JPEGLS_CharLS_10742.dcm" }, { "8381875d83ce321955a064e40d047dde" , "JPEGLosslessYBR_FULL_422.dcm" }, { "67f7b36ad6e54889b4a2581baa41afdf" , "JPEGNote_missing.dcm" }, { "807bf2aef3bc1885217c8a12d2d2bc19" , "JPEGNote_bogus.dcm" }, { "669cc0e807673ebe57124739a1874f35" , "RLEDebianBug816607Orig.dcm" }, { "1daa9bb53a8ce090041472f528248686" , "IllegalGroup2ImplicitTS.dcm" }, { "d08fd49e8bd15a5e66b5578c49441514" , "GE_MR_0025xx1bProtocolDataBlockXML.dcm" }, { "df3327313dadcc29e88779c7bc884abb" , "EmptyIcon_Bug417.dcm" }, { "7d0db54d48964c813d513b472f29155c" , "JPEGLosslessSeNonZero.dcm" }, { "44e6c3eef66b555ec3ae3e6dec6e8157" , "US-YBR_FULL_422-EVRLE.dcm" }, { "6b8a1f866c39aaccef4185a0923552cd" , "Osirix10vs8BitsStored.dcm" }, { "a638f2bc00e67f35257f36e5d5caa6b0" , "Bug_Siemens_PrivateIconNoItem.dcm" }, { "f64bcbdf9396df3eb3cedd28457042da" , "HardcopyColor_YBR_RCT_J2K_PC1.dcm" }, { "4f9b4e5530f1d60472d85a641105c009" , "PET-GE-dicomwrite-PixelDataSQUNv2.dcm" }, { "a7f54f67b6a978813b8ab1a0e2900f30" , "MEDILABValidCP246_EVRLESQasOB.dcm" }, { nullptr ,nullptr } }; int TestPrint(const char *filename, bool verbose= false) { gdcm::Reader r; r.SetFileName( filename ); if( !r.Read() ) { std::cerr << "Could not read: " << filename << std::endl; return 1; } gdcm::Printer print; print.SetFile( r.GetFile() ); std::ostringstream out; if( verbose ) print.Print( std::cout ); #if defined(_MSC_VER) && (_MSC_VER <= 1800) // Visual Studio 2013 auto old_exponent_format = _set_output_format(_TWO_DIGIT_EXPONENT); #endif print.Print( out ); #if defined(_MSC_VER) && (_MSC_VER <= 1800) // Visual Studio 2013 _set_output_format(old_exponent_format); #endif gdcm::Filename fn( filename ); const char *name = fn.GetName(); std::string buf = out.str(); if( buf.find( "GDCM:UNKNOWN" ) != std::string::npos ) { if( strcmp(name, "test.acr" ) != 0 && strcmp(name, "LIBIDO-8-ACR_NEMA-Lena_128_128.acr" ) != 0 && strcmp(name, "gdcm-ACR-LibIDO.acr" ) != 0 && strcmp(name, "SIEMENS_GBS_III-16-ACR_NEMA_1.acr" ) != 0 && strcmp(name, "LIBIDO-24-ACR_NEMA-Rectangle.dcm" ) != 0 && strcmp(name, "NM_Kakadu44_SOTmarkerincons.dcm" ) != 0 && strcmp(name, "GE_MR_0025xx1bProtocolDataBlockXML.dcm" ) != 0 ) { std::cerr << "UNKNOWN Attribute with : " << name << std::endl; return 1; } } char digest[33]; gdcm::Testing::ComputeMD5(buf.data(), buf.size(), digest); unsigned int i = 0; const char *p = printmd5[i][1]; while( p != nullptr ) { if( strcmp( name, p ) == 0 ) { break; } ++i; p = printmd5[i][1]; } const char *refmd5 = printmd5[i][0]; if( !refmd5 ) { std::cerr << "Problem with : " << name << " missing md5= " << digest << std::endl; return 1; } if( strcmp( refmd5, digest) != 0 ) { std::cerr << "Problem with : " << name << " " << refmd5 << " vs " << digest << std::endl; return 1; } return 0; } int TestPrinter1(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestPrint(filename, true); } // else int r = 0, i = 0; gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestPrint( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestFileChangeTransferSyntax1.cxx000664 001766 001770 00000016156 14517730450 034013 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileChangeTransferSyntax.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmReader.h" #include "gdcmImageReader.h" #include "gdcmFilename.h" #include "gdcmImageChangePlanarConfiguration.h" #include "gdcmByteSwap.h" static int TestFileChangeTransferSyntax1Func(const char *filename, bool verbose = false) { using namespace gdcm; if( verbose ) std::cout << "Processing: " << filename << std::endl; // Create directory first: const char subdir[] = "TestFileChangeTransferSyntax1"; std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); if( verbose ) std::cout << "Generating: " << outfilename << std::endl; const gdcm::TransferSyntax ts( TransferSyntax::JPEGLosslessProcess14_1 ); gdcm::FileChangeTransferSyntax fcts; fcts.SetTransferSyntax( ts ); fcts.SetInputFileName( filename ); fcts.SetOutputFileName( outfilename.c_str() ); ImageCodec *ic = fcts.GetCodec(); if( !ic ) { return 1; } if( !fcts.Change() ) { gdcm::Reader reader; reader.SetFileName( filename ); if( !reader.Read() ) { std::cerr << "not dicom" << std::endl; return 1; } const gdcm::File & file = reader.GetFile(); const gdcm::FileMetaInformation & fmi = file.GetHeader(); const TransferSyntax &tsref = fmi.GetDataSetTransferSyntax(); if( tsref.IsEncapsulated() ) { if( verbose ) std::cout << "Will not generate (encaps): " << outfilename << std::endl; return 0; } gdcm::Filename fn( filename ); const char *name = fn.GetName(); // Special handling: if( strcmp(name, "CT-MONO2-12-lomb-an2.acr" ) == 0 || strcmp(name, "LIBIDO-8-ACR_NEMA-Lena_128_128.acr") == 0 || strcmp(name, "gdcm-ACR-LibIDO.acr") == 0 || strcmp(name, "gdcm-MR-SIEMENS-16-2.acr") == 0 || strcmp(name, "libido1.0-vol.acr") == 0 || strcmp(name, "test.acr") == 0 || strcmp(name, "LIBIDO-24-ACR_NEMA-Rectangle.dcm") == 0 || strcmp(name, "MR_Spectroscopy_SIEMENS_OF.dcm") == 0 // not an image || strcmp(name, "ELSCINT1_PMSCT_RLE1.dcm") == 0 || strcmp(name, "ELSCINT1_PMSCT_RLE1_priv.dcm") == 0 || strcmp(name, "gdcm-CR-DCMTK-16-NonSamplePerPix.dcm") == 0 || strcmp(name, "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm") == 0 || strcmp(name, "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm") == 0 // Implicit VR Big Endian DLX (G.E Private) || strcmp(name, "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm") == 0 // Explicit VR Big Endian || strcmp(name, "US-RGB-8-epicard.dcm") == 0 // Explicit VR Big Endian || strcmp(name, "GE_DLX-8-MONO2-PrivateSyntax.dcm") == 0 // Implicit VR Big Endian DLX (G.E Private) || strcmp(name, "GE_CT_With_Private_compressed-icon.dcm") == 0 // Explicit VR Big Endian || strcmp(name, "JDDICOM_Sample2-dcmdjpeg.dcm") == 0 // cannot recreate FMI || strcmp(name, "DMCPACS_ExplicitImplicit_BogusIOP.dcm") == 0 // ImageRegionReader does not handle it || strcmp(name, "unreadable.dcm") == 0 // No Pixel Data (old ACR-NEMA) || strcmp(name, "US-YBR_FULL_422-EVRLE.dcm") == 0 // packed ybr422 || strncmp(name, "DICOMDIR", 8) == 0 // DICOMDIR* || strncmp(name, "dicomdir", 8) == 0 // dicomdir* ) { if( verbose ) std::cout << "Will not generate: " << outfilename << std::endl; return 0; } std::cerr << "Could not change: " << filename << std::endl; return 1; } // Let's read that file back in ! gdcm::ImageReader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Could not even reread our generated file : " << outfilename << std::endl; return 1; } // Check that after decompression we still find the same thing: int res = 0; gdcm::Image img = reader2.GetImage(); int pc = 0; // When recompressing: US-RGB-8-epicard.dcm, make sure to compute the md5 using the // same original Planar Configuration... if( (int)img.GetPlanarConfiguration() != pc ) { gdcm::ImageChangePlanarConfiguration icpc; icpc.SetInput( reader2.GetImage() ); icpc.SetPlanarConfiguration( pc ); icpc.Change(); img = icpc.GetOutput(); } //std::cerr << "Success to read image from file: " << filename << std::endl; unsigned long len = img.GetBufferLength(); char* buffer = new char[len]; bool res2 = img.GetBuffer(buffer); if( !res2 ) { std::cerr << "could not get buffer: " << outfilename << std::endl; return 1; } // On big Endian system we have byteswapped the buffer (duh!) // Since the md5sum is byte based there is now way it would detect // that the file is written in big endian word, so comparing against // a md5sum computed on LittleEndian would fail. Thus we need to // byteswap (again!) here: #ifdef GDCM_WORDS_BIGENDIAN if( img.GetPixelFormat().GetBitsAllocated() == 16 ) { assert( !(len % 2) ); assert( img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME1 || img.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::MONOCHROME2 ); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem( (unsigned short*)buffer, gdcm::SwapCode::LittleEndian, len/2); } #endif const char *ref = gdcm::Testing::GetMD5FromFile(filename); char digest[33]; gdcm::Testing::ComputeMD5(buffer, len, digest); if( !ref ) { // new regression image needs a md5 sum std::cerr << "Missing md5 " << digest << " for: " << filename << std::endl; //assert(0); res = 1; } else if( strcmp(digest, ref) != 0 ) { std::cerr << "Problem reading image from: " << filename << std::endl; std::cerr << "Found " << digest << " instead of " << ref << std::endl; res = 1; } if(res) { std::cerr << "problem with: " << outfilename << std::endl; } if( verbose ) { std::cout << "file was written in: " << outfilename << std::endl; } delete[] buffer; return res; } int TestFileChangeTransferSyntax1(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestFileChangeTransferSyntax1Func(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestFileChangeTransferSyntax1Func( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestUIDGenerator3.cxx000664 001766 001770 00000003722 14517730450 031377 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmUIDGenerator.h" #include "gdcmSystem.h" #include #include int TestUIDGenerator3(int argc, char *argv[]) { char randbytesbuf[200]; gdcm::UIDGenerator uid; unsigned char data[16]; for(unsigned int i = 0; i < 100; ++i) { uid.GenerateUUID( data ); size_t len = gdcm::System::EncodeBytes(randbytesbuf, data, sizeof(data)); //std::cout << randbytesbuf << std::endl; std::bitset<8> x; //x.reset(); //std::cout << x << std::endl; //x.flip(); //std::cout << x << std::endl; //std::cout << sizeof(x) << std::endl; //std::cout << sizeof(data) << std::endl; x = data[0]; //std::cout << x << std::endl; //std::cout << (int)data[0] << std::endl; //x = data[5]; //std::cout << x << std::endl; x[2+0] = 0; x[2+1] = 0; x[2+2] = 0; x[2+3] = 0; x[2+4] = 0; x[2+5] = 0; data[0] = x.to_ulong(); //std::cout << x << std::endl; //std::cout << (int)data[0] << std::endl; len = gdcm::System::EncodeBytes(randbytesbuf, data, sizeof(data)); std::cout << randbytesbuf << std::endl; if( len > 37 ) { return 1; } // Can't use the following, this would declare x2 as a function //std::bitset<128> x2( std::string(randbytesbuf) ); // instead split it out : //std::string s(randbytesbuf); //std::bitset<128> x2( s ); //std::cout << x2 << std::endl; } return 0; } gdcm-3.0.22/Testing/Source/MediaStorageAndFileFormat/Cxx/TestOverlay3.cxx000664 001766 001770 00000013305 14517730450 030526 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmOverlay.h" #include "gdcmImageReader.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include "gdcmFilename.h" using namespace gdcm; struct ovel { const char *md5; const char *fn; unsigned int idx; Overlay::OverlayType type; }; static const ovel overlay3array[] = { // gdcmData {"d42bff3545ed8c5fccb39d9a61828992", "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm", 0, Overlay::Graphics }, {"2cf60257b75a034fbdc98e560881184e", "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm", 0, Overlay::Graphics }, {"b2dd1007e018b3b9691761cf93f77552", "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm", 0, Overlay::Graphics }, {"d42bff3545ed8c5fccb39d9a61828992", "MR-SIEMENS-DICOM-WithOverlays.dcm", 0, Overlay::Graphics }, // gdcmDataExtra {"4b0240033afba211eeac42a44417d4c9", "05119848_IS_Black_hasOverlayData.dcm", 0, Overlay::Graphics }, {"349d1f9510f64467ecf73eeea46c9c6e", "45909476", 0, Overlay::Graphics }, {"6a5f8038cc8cf753bf74422164adc24c", "45909517", 0, Overlay::Graphics }, {"1a3bf73e42b0f6dc282a9be59c054027", "OverlayDICOMDataSet.dcm", 0, Overlay::Graphics }, // gdcmConformanceTests {"040560796c1a53ffce0d2f7e90c9dc26", "CT_OSIRIX_OddOverlay.dcm", 0, Overlay::Graphics }, // random // {"f7e43de189a1bc08044c13aefac73fed", "1.dcm", 0 }, // {"e7859c818f26202fb63a2b205ff16297", "1.dcm", 1 }, // {"aa4c726bc52e13b750ac8c94c7b06e07", "0.dcm", 0 }, // {"31d58476326722793379fbcda55a4856", "0.dcm", 1 }, // sentinel { nullptr, nullptr, 0, Overlay::Invalid } }; static int TestReadOverlay(const char* filename, bool verbose = false) { if( verbose ) std::cerr << "Reading: " << filename << std::endl; gdcm::ImageReader reader; reader.SetFileName( filename ); int ret = 0; if ( reader.Read() ) { gdcm::Filename fn( filename ); const char *name = fn.GetName(); std::vector overlay; const gdcm::Image &img = reader.GetImage(); size_t numoverlays = img.GetNumberOfOverlays(); for( size_t ovidx = 0; ovidx < numoverlays; ++ovidx ) { const gdcm::Overlay& ov = img.GetOverlay(ovidx); size_t len = ov.GetUnpackBufferLength(); overlay.resize( len ); if( !ov.GetUnpackBuffer(overlay.data(), len) ) { std::cerr << "GetUnpackBuffer: Problem with Overlay: #" << ovidx << std::endl; ++ret; } char digest1[33]; if( !gdcm::Testing::ComputeMD5(overlay.data(), len, digest1) ) { std::cerr << "ComputeMD5: Problem with Overlay: #" << ovidx << std::endl; ++ret; } std::stringstream overlay2; ov.Decompress(overlay2); Overlay::OverlayType type = ov.GetTypeAsEnum(); const std::string soverlay2 = overlay2.str(); if( soverlay2.size() != len ) { std::cerr << "Decompress: Problem with Overlay: #" << ovidx << std::endl; std::cerr << "Size is: " << soverlay2.size() << " vs " << len << std::endl; ++ret; } char digest2[33]; if( !gdcm::Testing::ComputeMD5(soverlay2.c_str(), soverlay2.size(), digest2) ) { std::cerr << "ComputeMD5: Problem with Overlay: #" << ovidx << std::endl; ++ret; } Overlay::OverlayType reftype = Overlay::Invalid; const char *refmd5 = nullptr; { unsigned int i = 0; const char *p = overlay3array[i].fn; unsigned int idx = overlay3array[i].idx; while( p != nullptr ) { if( strcmp( name, p ) == 0 && ovidx == idx ) { break; } ++i; p = overlay3array[i].fn; idx = overlay3array[i].idx; } refmd5 = overlay3array[i].md5; reftype = overlay3array[i].type; } if( !refmd5 ) { std::cerr << "refmd5: Problem with Overlay: #" << ovidx << std::endl; std::cerr << name << std::endl; ++ret; } if( refmd5 && strcmp(digest1, refmd5) != 0 ) { std::cerr << "strcmp/ref: Problem with Overlay: #" << ovidx << std::endl; std::cerr << "ref: " << refmd5 << " vs " << digest1 << std::endl; ++ret; } if( strcmp(digest1, digest2) != 0 ) { std::cerr << "strcmp/1/2: Problem with Overlay: #" << ovidx << std::endl; std::cerr << "digest1: " << digest1 << " vs " << digest2 << std::endl; ++ret; } if( reftype != type ) { std::cerr << "OverlayType: Problem with Overlay: #" << ovidx << std::endl; std::cerr << "reftype: " << (int)reftype << " vs " << (int)type << std::endl; std::cerr << name << std::endl; ++ret; } } } return ret; } int TestOverlay3(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestReadOverlay(filename, true); } // else // First of get rid of warning/debug message gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestReadOverlay( filename); ++i; } return r; } gdcm-3.0.22/Testing/Source/Attribute/000775 001766 001770 00000000000 14517731550 021677 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/Attribute/CMakeLists.txt000664 001766 001770 00000000000 14517730450 024423 0ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/CMakeLists.txt000664 001766 001770 00000001565 14517730450 022501 0ustar00mmalaterremmalaterre000000 000000 # All the tests # ADD_SUBDIRECTORY is required here to properly get the definition variables later on: add_subdirectory(Data) # Get the variables defined in Data add_subdirectory: get_directory_property(gdcm_data_dicomdir_filenames_glob DIRECTORY Data DEFINITION GDCM_DATA_DICOMDIR_FILENAMES_GLOB) get_directory_property(gdcm_data_image_filenames_glob DIRECTORY Data DEFINITION GDCM_DATA_IMAGE_FILENAMES_GLOB) get_directory_property(gdcm_data_filenames_glob DIRECTORY Data DEFINITION GDCM_DATA_FILENAMES_GLOB) get_directory_property(black_list_reader DIRECTORY Data DEFINITION BLACK_LIST_READER) add_subdirectory( Attribute ) add_subdirectory( Common ) add_subdirectory( DataDictionary ) add_subdirectory( DataStructureAndEncodingDefinition ) add_subdirectory( InformationObjectDefinition ) add_subdirectory( MediaStorageAndFileFormat ) add_subdirectory( MessageExchangeDefinition ) gdcm-3.0.22/Testing/Source/DataDictionary/000775 001766 001770 00000000000 14517731550 022633 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/DataDictionary/CMakeLists.txt000664 001766 001770 00000000117 14517730450 025370 0ustar00mmalaterremmalaterre000000 000000 add_subdirectory(Cxx) if(GDCM_WRAP_PYTHON) add_subdirectory(Python) endif() gdcm-3.0.22/Testing/Source/DataDictionary/Python/000775 001766 001770 00000000000 14517731550 024114 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/DataDictionary/Python/CMakeLists.txt000664 001766 001770 00000000361 14517730450 026652 0ustar00mmalaterremmalaterre000000 000000 # Define the tests for gdcm-python # gdcm-python set(GDCM_PYTHON_TEST_SRCS TestGlobal TestDict ) # Loop over files and create executables foreach(name ${GDCM_PYTHON_TEST_SRCS}) ADD_PYTHON_TEST(${name}Python ${name}.py) endforeach() gdcm-3.0.22/Testing/Source/DataDictionary/Python/TestDict.py000664 001766 001770 00000002170 14517730450 026207 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys if __name__ == "__main__": singleton = gdcm.Global.GetInstance() dicts = singleton.GetDicts() d = dicts.GetPublicDict() t = gdcm.Tag(0x0010,0x0010) keyword = d.GetKeywordFromTag( t ) if keyword != 'PatientName': sys.exit(1) print(keyword) p = d.GetDictEntryByKeyword( keyword ) if p[0].GetKeyword() != keyword: sys.exit(1) print(p[0].GetKeyword()) p = d.GetDictEntryByKeyword( 'foobar' ) undef = gdcm.Tag(0xffff,0xffff) if p[1] != undef: sys.exit(1) print(p[1]) # Test succeed ? sys.exit(0) gdcm-3.0.22/Testing/Source/DataDictionary/Python/TestGlobal.py000664 001766 001770 00000001666 14517730450 026535 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys if __name__ == "__main__": #gi = gdcm.GlobalInstance #print gi singleton = gdcm.Global.GetInstance() print(singleton) d = singleton.GetDicts() print(d) t = gdcm.Tag(0x0010,0x0010) entry = d.GetDictEntry( t ) print(entry) print(entry.GetName()) #print entry.GetVM() print(entry.GetVR()) # Test succeed ? sys.exit(0) gdcm-3.0.22/Testing/Source/DataDictionary/Cxx/000775 001766 001770 00000000000 14517731550 023375 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/DataDictionary/Cxx/CMakeLists.txt000664 001766 001770 00000001653 14517730450 026140 0ustar00mmalaterremmalaterre000000 000000 # Define the tests for Data Dictionary # DICT set(DICT_TEST_SRCS TestDictEntry.cxx TestDict.cxx TestGlobal.cxx TestUIDs.cxx TestDicts.cxx TestGroupDict.cxx TestTagToType.cxx TestSOPClassUIDToIOD.cxx TestTagKeywords.cxx ) # Add the include paths include_directories( "${GDCM_BINARY_DIR}/Source/Common" "${GDCM_SOURCE_DIR}/Source/Common" "${GDCM_SOURCE_DIR}/Source/DataStructureAndEncodingDefinition" "${GDCM_SOURCE_DIR}/Source/DataDictionary" "${GDCM_SOURCE_DIR}/Source/InformationObjectDefinition" ) create_test_sourcelist(DICTTests gdcmDICTTests.cxx ${DICT_TEST_SRCS} EXTRA_INCLUDE gdcmTestDriver.h ) add_executable(gdcmDICTTests ${DICTTests}) target_link_libraries(gdcmDICTTests gdcmDICT gdcmMSFF) # Loop over files and create executables foreach(name ${DICT_TEST_SRCS}) get_filename_component(testname ${name} NAME_WE) add_test(NAME ${testname} COMMAND gdcmDICTTests ${testname}) endforeach() gdcm-3.0.22/Testing/Source/DataDictionary/Cxx/TestSOPClassUIDToIOD.cxx000664 001766 001770 00000003141 14517730450 027606 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSOPClassUIDToIOD.h" #include int TestSOPClassUIDToIOD(int, char *[]) { gdcm::SOPClassUIDToIOD::SOPClassUIDToIODType& s = gdcm::SOPClassUIDToIOD::GetSOPClassUIDToIOD(0); std::cout << s[0] << std::endl; if( std::string(s[0] ) != "1.2.840.10008.1.3.10" ) return 1; std::cout << s[1] << std::endl; if( std::string(s[1] ) != "Basic Directory IOD Modules" ) return 1; // points to { nullptr, nullptr }, hardcoded gdcm::SOPClassUIDToIOD::SOPClassUIDToIODType& s2 = gdcm::SOPClassUIDToIOD::GetSOPClassUIDToIOD(107); std::cout << ( s2[0] == nullptr ) << std::endl; if( !(s2[0] == nullptr) ) { std::cerr << s2[1] << std::endl; return 1; } if( !(s2[1] == nullptr) ) return 1; const char *sopclassuid = gdcm::SOPClassUIDToIOD::GetSOPClassUIDFromIOD( s[1] ); const char *iod = gdcm::SOPClassUIDToIOD::GetIODFromSOPClassUID( s[0] ); std::cout << sopclassuid << std::endl; std::cout << iod << std::endl; if( std::string(sopclassuid) != s[0] ) return 1; if( std::string(iod) != s[1] ) return 1; return 0; } gdcm-3.0.22/Testing/Source/DataDictionary/Cxx/TestUIDs.cxx000664 001766 001770 00000064102 14517730450 025566 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmUIDs.h" #include "gdcmTesting.h" #include #include // strcmp #include // strcmp // This list was retrieved from: // http://cardiacatlas.wiki.sourceforge.net/DICOM+Service+Class+Definitions // Hum...there is not a single difference, exact same number of white space... // apparently last modifier is 'solidether' // http://cardiacatlas.wiki.sourceforge.net/page/diff/DICOM+Service+Class+Definitions?v1=209104&v2=209124 // could this be that they copy/paste stuff from gdcm itself ? // how else could you explain the: // { "1.2.840.113543.6.6.1.3.10002","Unregistered (?) Philips3D" }, static const char * const sopclassuids[][2] = { { "1.2.840.10008.1.1","Verification SOP Class" }, { "1.2.840.10008.1.2","Implicit VR Little Endian: Default Transfer Syntax for DICOM" }, { "1.2.840.10008.1.2.1","Explicit VR Little Endian" }, { "1.2.840.10008.1.2.1.99","Deflated Explicit VR Little Endian" }, { "1.2.840.10008.1.2.2","Explicit VR Big Endian" }, { "1.2.840.10008.1.2.4.50","JPEG Baseline (Process 1): Default Transfer Syntax for Lossy JPEG 8 Bit Image Compression" }, { "1.2.840.10008.1.2.4.51","JPEG Extended (Process 2 & 4): Default Transfer Syntax for Lossy JPEG 12 Bit Image Compression (Process 4 only)" }, { "1.2.840.10008.1.2.4.52","JPEG Extended (Process 3 & 5)" }, { "1.2.840.10008.1.2.4.53","JPEG Spectral Selection, Non-Hierarchical (Process 6 & 8)" }, { "1.2.840.10008.1.2.4.54","JPEG Spectral Selection, Non-Hierarchical (Process 7 & 9)" }, { "1.2.840.10008.1.2.4.55","JPEG Full Progression, Non-Hierarchical (Process 10 & 12)" }, { "1.2.840.10008.1.2.4.56","JPEG Full Progression, Non-Hierarchical (Process 11 & 13)" }, { "1.2.840.10008.1.2.4.57","JPEG Lossless, Non-Hierarchical (Process 14)" }, { "1.2.840.10008.1.2.4.58","JPEG Lossless, Non-Hierarchical (Process 15)" }, { "1.2.840.10008.1.2.4.59","JPEG Extended, Hierarchical (Process 16 & 18)" }, { "1.2.840.10008.1.2.4.60","JPEG Extended, Hierarchical (Process 17 & 19)" }, { "1.2.840.10008.1.2.4.61","JPEG Spectral Selection, Hierarchical (Process 20 & 22)" }, { "1.2.840.10008.1.2.4.62","JPEG Spectral Selection, Hierarchical (Process 21 & 23)" }, { "1.2.840.10008.1.2.4.63","JPEG Full Progression, Hierarchical (Process 24 & 26)" }, { "1.2.840.10008.1.2.4.64","JPEG Full Progression, Hierarchical (Process 25 & 27)" }, { "1.2.840.10008.1.2.4.65","JPEG Lossless, Hierarchical (Process 28)" }, { "1.2.840.10008.1.2.4.66","JPEG Lossless, Hierarchical (Process 29)" }, { "1.2.840.10008.1.2.4.70","JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression" }, { "1.2.840.10008.1.2.4.80","JPEG-LS Lossless Image Compression" }, { "1.2.840.10008.1.2.4.81","JPEG-LS Lossy (Near-Lossless) Image Compression" }, { "1.2.840.10008.1.2.4.90","JPEG 2000 Image Compression (Lossless Only)" }, { "1.2.840.10008.1.2.4.91","JPEG 2000 Image Compression" }, { "1.2.840.10008.1.2.4.92","JPEG 2000 Part 2 Multi-component Image Compression (Lossless Only)" }, { "1.2.840.10008.1.2.4.93","JPEG 2000 Part 2 Multi-component Image Compression" }, { "1.2.840.10008.1.2.4.94","JPIP Referenced" }, { "1.2.840.10008.1.2.4.95","JPIP Referenced Deflate" }, { "1.2.840.10008.1.2.4.100","MPEG2 Main Profile @ Main Level" }, { "1.2.840.10008.1.2.5","RLE Lossless" }, { "1.2.840.10008.1.2.6.1","RFC 2557 MIME encapsulation" }, { "1.2.840.10008.1.2.6.2","XML Encoding" }, { "1.2.840.10008.1.3.10","Media Storage Directory Storage" }, { "1.2.840.10008.1.4.1.1","Talairach Brain Atlas Frame of Reference" }, { "1.2.840.10008.1.4.1.2","SPM2 T1 Frame of Reference" }, { "1.2.840.10008.1.4.1.3","SPM2 T2 Frame of Reference" }, { "1.2.840.10008.1.4.1.4","SPM2 PD Frame of Reference" }, { "1.2.840.10008.1.4.1.5","SPM2 EPI Frame of Reference" }, { "1.2.840.10008.1.4.1.6","SPM2 FIL T1 Frame of Reference" }, { "1.2.840.10008.1.4.1.7","SPM2 PET Frame of Reference" }, { "1.2.840.10008.1.4.1.8","SPM2 TRANSM Frame of Reference" }, { "1.2.840.10008.1.4.1.9","SPM2 SPECT Frame of Reference" }, { "1.2.840.10008.1.4.1.10","SPM2 GRAY Frame of Reference" }, { "1.2.840.10008.1.4.1.11","SPM2 WHITE Frame of Reference" }, { "1.2.840.10008.1.4.1.12","SPM2 CSF Frame of Reference" }, { "1.2.840.10008.1.4.1.13","SPM2 BRAINMASK Frame of Reference" }, { "1.2.840.10008.1.4.1.14","SPM2 AVG305T1 Frame of Reference" }, { "1.2.840.10008.1.4.1.15","SPM2 AVG152T1 Frame of Reference" }, { "1.2.840.10008.1.4.1.16","SPM2 AVG152T2 Frame of Reference" }, { "1.2.840.10008.1.4.1.17","SPM2 AVG152PD Frame of Reference" }, { "1.2.840.10008.1.4.1.18","SPM2 SINGLESUBJT1 Frame of Reference" }, { "1.2.840.10008.1.4.2.1","ICBM 452 T1 Frame of Reference" }, { "1.2.840.10008.1.4.2.2","ICBM Single Subject MRI Frame of Reference" }, { "1.2.840.10008.1.9","Basic Study Content Notification SOP Class" }, { "1.2.840.10008.1.20.1","Storage Commitment Push Model SOP Class" }, { "1.2.840.10008.1.20.1.1","Storage Commitment Push Model SOP Instance" }, { "1.2.840.10008.1.20.2","Storage Commitment Pull Model SOP Class" }, { "1.2.840.10008.1.20.2.1","Storage Commitment Pull Model SOP Instance" }, { "1.2.840.10008.1.40","Procedural Event Logging SOP Class" }, { "1.2.840.10008.1.40.1","Procedural Event Logging SOP Instance" }, { "1.2.840.10008.1.42","Substance Administration Logging SOP Class" }, { "1.2.840.10008.1.42.1","Substance Administration Logging SOP Instance" }, { "1.2.840.10008.2.6.1","DICOM UID Registry" }, { "1.2.840.10008.2.16.4","DICOM Controlled Terminology" }, { "1.2.840.10008.3.1.1.1","DICOM Application Context Name" }, { "1.2.840.10008.3.1.2.1.1","Detached Patient Management SOP Class" }, { "1.2.840.10008.3.1.2.1.4","Detached Patient Management Meta SOP Class" }, { "1.2.840.10008.3.1.2.2.1","Detached Visit Management SOP Class" }, { "1.2.840.10008.3.1.2.3.1","Detached Study Management SOP Class" }, { "1.2.840.10008.3.1.2.3.2","Study Component Management SOP Class" }, { "1.2.840.10008.3.1.2.3.3","Modality Performed Procedure Step SOP Class" }, { "1.2.840.10008.3.1.2.3.4","Modality Performed Procedure Step Retrieve SOP Class" }, { "1.2.840.10008.3.1.2.3.5","Modality Performed Procedure Step Notification SOP Class" }, { "1.2.840.10008.3.1.2.5.1","Detached Results Management SOP Class" }, { "1.2.840.10008.3.1.2.5.4","Detached Results Management Meta SOP Class" }, { "1.2.840.10008.3.1.2.5.5","Detached Study Management Meta SOP Class" }, { "1.2.840.10008.3.1.2.6.1","Detached Interpretation Management SOP Class" }, { "1.2.840.10008.4.2","Storage Service Class" }, { "1.2.840.10008.5.1.1.1","Basic Film Session SOP Class" }, { "1.2.840.10008.5.1.1.2","Basic Film Box SOP Class" }, { "1.2.840.10008.5.1.1.4","Basic Grayscale Image Box SOP Class" }, { "1.2.840.10008.5.1.1.4.1","Basic Color Image Box SOP Class" }, { "1.2.840.10008.5.1.1.4.2","Referenced Image Box SOP Class" }, { "1.2.840.10008.5.1.1.9","Basic Grayscale Print Management Meta SOP Class" }, { "1.2.840.10008.5.1.1.9.1","Referenced Grayscale Print Management Meta SOP Class" }, { "1.2.840.10008.5.1.1.14","Print Job SOP Class" }, { "1.2.840.10008.5.1.1.15","Basic Annotation Box SOP Class" }, { "1.2.840.10008.5.1.1.16","Printer SOP Class" }, { "1.2.840.10008.5.1.1.16.376","Printer Configuration Retrieval SOP Class" }, { "1.2.840.10008.5.1.1.17","Printer SOP Instance" }, { "1.2.840.10008.5.1.1.17.376","Printer Configuration Retrieval SOP Instance" }, { "1.2.840.10008.5.1.1.18","Basic Color Print Management Meta SOP Class" }, { "1.2.840.10008.5.1.1.18.1","Referenced Color Print Management Meta SOP Class" }, { "1.2.840.10008.5.1.1.22","VOI LUT Box SOP Class" }, { "1.2.840.10008.5.1.1.23","Presentation LUT SOP Class" }, { "1.2.840.10008.5.1.1.24","Image Overlay Box SOP Class" }, { "1.2.840.10008.5.1.1.24.1","Basic Print Image Overlay Box SOP Class" }, { "1.2.840.10008.5.1.1.25","Print Queue SOP Instance" }, { "1.2.840.10008.5.1.1.26","Print Queue Management SOP Class" }, { "1.2.840.10008.5.1.1.27","Stored Print Storage SOP Class" }, { "1.2.840.10008.5.1.1.29","Hardcopy Grayscale Image Storage SOP Class" }, { "1.2.840.10008.5.1.1.30","Hardcopy Color Image Storage SOP Class" }, { "1.2.840.10008.5.1.1.31","Pull Print Request SOP Class" }, { "1.2.840.10008.5.1.1.32","Pull Stored Print Management Meta SOP Class" }, { "1.2.840.10008.5.1.1.33","Media Creation Management SOP Class UID" }, { "1.2.840.10008.5.1.4.1.1.1","Computed Radiography Image Storage" }, { "1.2.840.10008.5.1.4.1.1.1.1","Digital X-Ray Image Storage - For Presentation" }, { "1.2.840.10008.5.1.4.1.1.1.1.1","Digital X-Ray Image Storage - For Processing" }, { "1.2.840.10008.5.1.4.1.1.1.2","Digital Mammography X-Ray Image Storage - For Presentation" }, { "1.2.840.10008.5.1.4.1.1.1.2.1","Digital Mammography X-Ray Image Storage - For Processing" }, { "1.2.840.10008.5.1.4.1.1.1.3","Digital Intra-oral X-Ray Image Storage - For Presentation" }, { "1.2.840.10008.5.1.4.1.1.1.3.1","Digital Intra-oral X-Ray Image Storage - For Processing" }, { "1.2.840.10008.5.1.4.1.1.2","CT Image Storage" }, { "1.2.840.10008.5.1.4.1.1.2.1","Enhanced CT Image Storage" }, { "1.2.840.10008.5.1.4.1.1.3","Ultrasound Multi-frame Image Storage" }, { "1.2.840.10008.5.1.4.1.1.3.1","Ultrasound Multi-frame Image Storage" }, { "1.2.840.10008.5.1.4.1.1.4","MR Image Storage" }, { "1.2.840.10008.5.1.4.1.1.4.1","Enhanced MR Image Storage" }, { "1.2.840.10008.5.1.4.1.1.4.2","MR Spectroscopy Storage" }, { "1.2.840.10008.5.1.4.1.1.5","Nuclear Medicine Image Storage" }, { "1.2.840.10008.5.1.4.1.1.6","Ultrasound Image Storage" }, { "1.2.840.10008.5.1.4.1.1.6.1","Ultrasound Image Storage" }, { "1.2.840.10008.5.1.4.1.1.7","Secondary Capture Image Storage" }, { "1.2.840.10008.5.1.4.1.1.7.1","Multi-frame Single Bit Secondary Capture Image Storage" }, { "1.2.840.10008.5.1.4.1.1.7.2","Multi-frame Grayscale Byte Secondary Capture Image Storage" }, { "1.2.840.10008.5.1.4.1.1.7.3","Multi-frame Grayscale Word Secondary Capture Image Storage" }, { "1.2.840.10008.5.1.4.1.1.7.4","Multi-frame True Color Secondary Capture Image Storage" }, { "1.2.840.10008.5.1.4.1.1.8","Standalone Overlay Storage" }, { "1.2.840.10008.5.1.4.1.1.9","Standalone Curve Storage" }, { "1.2.840.10008.5.1.4.1.1.9.1","Waveform Storage - Trial" }, { "1.2.840.10008.5.1.4.1.1.9.1.1","12-lead ECG Waveform Storage" }, { "1.2.840.10008.5.1.4.1.1.9.1.2","General ECG Waveform Storage" }, { "1.2.840.10008.5.1.4.1.1.9.1.3","Ambulatory ECG Waveform Storage" }, { "1.2.840.10008.5.1.4.1.1.9.2.1","Hemodynamic Waveform Storage" }, { "1.2.840.10008.5.1.4.1.1.9.3.1","Cardiac Electrophysiology Waveform Storage" }, { "1.2.840.10008.5.1.4.1.1.9.4.1","Basic Voice Audio Waveform Storage" }, { "1.2.840.10008.5.1.4.1.1.10","Standalone Modality LUT Storage" }, { "1.2.840.10008.5.1.4.1.1.11","Standalone VOI LUT Storage" }, { "1.2.840.10008.5.1.4.1.1.11.1","Grayscale Softcopy Presentation State Storage SOP Class" }, { "1.2.840.10008.5.1.4.1.1.11.2","Color Softcopy Presentation State Storage SOP Class" }, { "1.2.840.10008.5.1.4.1.1.11.3","Pseudo-Color Softcopy Presentation State Storage SOP Class" }, { "1.2.840.10008.5.1.4.1.1.11.4","Blending Softcopy Presentation State Storage SOP Class" }, { "1.2.840.10008.5.1.4.1.1.12.1","X-Ray Angiographic Image Storage" }, { "1.2.840.10008.5.1.4.1.1.12.1.1","Enhanced XA Image Storage" }, { "1.2.840.10008.5.1.4.1.1.12.2","X-Ray Radiofluoroscopic Image Storage" }, { "1.2.840.10008.5.1.4.1.1.12.2.1","Enhanced XRF Image Storage" }, { "1.2.840.10008.5.1.4.1.1.13.1.1","X-Ray 3D Angiographic Image Storage" }, { "1.2.840.10008.5.1.4.1.1.13.1.2","X-Ray 3D Craniofacial Image Storage" }, { "1.2.840.10008.5.1.4.1.1.12.3","X-Ray Angiographic Bi-Plane Image Storage" }, { "1.2.840.10008.5.1.4.1.1.20","Nuclear Medicine Image Storage" }, { "1.2.840.10008.5.1.4.1.1.66","Raw Data Storage" }, { "1.2.840.10008.5.1.4.1.1.66.1","Spatial Registration Storage" }, { "1.2.840.10008.5.1.4.1.1.66.2","Spatial Fiducials Storage" }, { "1.2.840.10008.5.1.4.1.1.66.3","Deformable Spatial Registration Storage" }, { "1.2.840.10008.5.1.4.1.1.66.4","Segmentation Storage" }, { "1.2.840.10008.5.1.4.1.1.67","Real World Value Mapping Storage" }, { "1.2.840.10008.5.1.4.1.1.77.1","VL Image Storage - Trial" }, { "1.2.840.10008.5.1.4.1.1.77.2","VL Multi-frame Image Storage - Trial" }, { "1.2.840.10008.5.1.4.1.1.77.1.1","VL Endoscopic Image Storage" }, { "1.2.840.10008.5.1.4.1.1.77.1.1.1","Video Endoscopic Image Storage" }, { "1.2.840.10008.5.1.4.1.1.77.1.2","VL Microscopic Image Storage" }, { "1.2.840.10008.5.1.4.1.1.77.1.2.1","Video Microscopic Image Storage" }, { "1.2.840.10008.5.1.4.1.1.77.1.3","VL Slide-Coordinates Microscopic Image Storage" }, { "1.2.840.10008.5.1.4.1.1.77.1.4","VL Photographic Image Storage" }, { "1.2.840.10008.5.1.4.1.1.77.1.4.1","Video Photographic Image Storage" }, { "1.2.840.10008.5.1.4.1.1.77.1.5.1","Ophthalmic Photography 8 Bit Image Storage" }, { "1.2.840.10008.5.1.4.1.1.77.1.5.2","Ophthalmic Photography 16 Bit Image Storage" }, { "1.2.840.10008.5.1.4.1.1.77.1.5.3","Stereometric Relationship Storage" }, { "1.2.840.10008.5.1.4.1.1.77.1.5.4","Ophthalmic Tomography Image Storage" }, { "1.2.840.10008.5.1.4.1.1.88.1","Text SR Storage - Trial" }, { "1.2.840.10008.5.1.4.1.1.88.2","Audio SR Storage - Trial" }, { "1.2.840.10008.5.1.4.1.1.88.3","Detail SR Storage - Trial" }, { "1.2.840.10008.5.1.4.1.1.88.4","Comprehensive SR Storage - Trial" }, { "1.2.840.10008.5.1.4.1.1.88.11","Basic Text SR Storage" }, { "1.2.840.10008.5.1.4.1.1.88.22","Enhanced SR Storage" }, { "1.2.840.10008.5.1.4.1.1.88.33","Comprehensive SR Storage" }, { "1.2.840.10008.5.1.4.1.1.88.40","Procedure Log Storage" }, { "1.2.840.10008.5.1.4.1.1.88.50","Mammography CAD SR Storage" }, { "1.2.840.10008.5.1.4.1.1.88.59","Key Object Selection Document Storage" }, { "1.2.840.10008.5.1.4.1.1.88.65","Chest CAD SR Storage" }, { "1.2.840.10008.5.1.4.1.1.88.67","X-Ray Radiation Dose SR Storage" }, { "1.2.840.10008.5.1.4.1.1.104.1","Encapsulated PDF Storage" }, { "1.2.840.10008.5.1.4.1.1.104.2","Encapsulated CDA Storage" }, { "1.2.840.10008.5.1.4.1.1.128","Positron Emission Tomography Image Storage" }, { "1.2.840.10008.5.1.4.1.1.129","Standalone PET Curve Storage" }, { "1.2.840.10008.5.1.4.1.1.481.1","RT Image Storage" }, { "1.2.840.10008.5.1.4.1.1.481.2","RT Dose Storage" }, { "1.2.840.10008.5.1.4.1.1.481.3","RT Structure Set Storage" }, { "1.2.840.10008.5.1.4.1.1.481.4","RT Beams Treatment Record Storage" }, { "1.2.840.10008.5.1.4.1.1.481.5","RT Plan Storage" }, { "1.2.840.10008.5.1.4.1.1.481.6","RT Brachy Treatment Record Storage" }, { "1.2.840.10008.5.1.4.1.1.481.7","RT Treatment Summary Record Storage" }, { "1.2.840.10008.5.1.4.1.1.481.8","RT Ion Plan Storage" }, { "1.2.840.10008.5.1.4.1.1.481.9","RT Ion Beams Treatment Record Storage" }, { "1.2.840.10008.5.1.4.1.2.1.1","Patient Root Query/Retrieve Information Model - FIND" }, { "1.2.840.10008.5.1.4.1.2.1.2","Patient Root Query/Retrieve Information Model - MOVE" }, { "1.2.840.10008.5.1.4.1.2.1.3","Patient Root Query/Retrieve Information Model - GET" }, { "1.2.840.10008.5.1.4.1.2.2.1","Study Root Query/Retrieve Information Model - FIND" }, { "1.2.840.10008.5.1.4.1.2.2.2","Study Root Query/Retrieve Information Model - MOVE" }, { "1.2.840.10008.5.1.4.1.2.2.3","Study Root Query/Retrieve Information Model - GET" }, { "1.2.840.10008.5.1.4.1.2.3.1","Patient/Study Only Query/Retrieve Information Model - FIND" }, { "1.2.840.10008.5.1.4.1.2.3.2","Patient/Study Only Query/Retrieve Information Model - MOVE" }, { "1.2.840.10008.5.1.4.1.2.3.3","Patient/Study Only Query/Retrieve Information Model - GET" }, { "1.2.840.10008.5.1.4.31","Modality Worklist Information Model - FIND" }, { "1.2.840.10008.5.1.4.32.1","General Purpose Worklist Information Model - FIND" }, { "1.2.840.10008.5.1.4.32.2","General Purpose Scheduled Procedure Step SOP Class" }, { "1.2.840.10008.5.1.4.32.3","General Purpose Performed Procedure Step SOP Class" }, { "1.2.840.10008.5.1.4.32","General Purpose Worklist Management Meta SOP Class" }, { "1.2.840.10008.5.1.4.33","Instance Availability Notification SOP Class" }, { "1.2.840.10008.5.1.4.34.1","RT Beams Delivery Instruction Storage (Supplement 74 Frozen Draft)" }, { "1.2.840.10008.5.1.4.34.2","RT Conventional Machine Verification (Supplement 74 Frozen Draft)" }, { "1.2.840.10008.5.1.4.34.3","RT Ion Machine Verification (Supplement 74 Frozen Draft)" }, { "1.2.840.10008.5.1.4.34.4","Unified Worklist and Procedure Step Service Class" }, { "1.2.840.10008.5.1.4.34.4.1","Unified Procedure Step - Push SOP Class" }, { "1.2.840.10008.5.1.4.34.4.2","Unified Procedure Step - Watch SOP Class" }, { "1.2.840.10008.5.1.4.34.4.3","Unified Procedure Step - Pull SOP Class" }, { "1.2.840.10008.5.1.4.34.4.4","Unified Procedure Step - Event SOP Class" }, { "1.2.840.10008.5.1.4.34.5","Unified Worklist and Procedure Step SOP Instance" }, { "1.2.840.10008.5.1.4.37.1","General Relevant Patient Information Query" }, { "1.2.840.10008.5.1.4.37.2","Breast Imaging Relevant Patient Information Query" }, { "1.2.840.10008.5.1.4.37.3","Cardiac Relevant Patient Information Query" }, { "1.2.840.10008.5.1.4.38.1","Hanging Protocol Storage" }, { "1.2.840.10008.5.1.4.38.2","Hanging Protocol Information Model - FIND" }, { "1.2.840.10008.5.1.4.38.3","Hanging Protocol Information Model - MOVE" }, { "1.2.840.10008.5.1.4.41","Product Characteristics Query SOP Class" }, { "1.2.840.10008.5.1.4.42","Substance Approval Query SOP Class" }, { "1.2.840.10008.15.0.3.1","dicomDeviceName" }, { "1.2.840.10008.15.0.3.2","dicomDescription" }, { "1.2.840.10008.15.0.3.3","dicomManufacturer" }, { "1.2.840.10008.15.0.3.4","dicomManufacturerModelName" }, { "1.2.840.10008.15.0.3.5","dicomSoftwareVersion" }, { "1.2.840.10008.15.0.3.6","dicomVendorData" }, { "1.2.840.10008.15.0.3.7","dicomAETitle" }, { "1.2.840.10008.15.0.3.8","dicomNetworkConnectionReference" }, { "1.2.840.10008.15.0.3.9","dicomApplicationCluster" }, { "1.2.840.10008.15.0.3.10","dicomAssociationInitiator" }, { "1.2.840.10008.15.0.3.11","dicomAssociationAcceptor" }, { "1.2.840.10008.15.0.3.12","dicomHostname" }, { "1.2.840.10008.15.0.3.13","dicomPort" }, { "1.2.840.10008.15.0.3.14","dicomSOPClass" }, { "1.2.840.10008.15.0.3.15","dicomTransferRole" }, { "1.2.840.10008.15.0.3.16","dicomTransferSyntax" }, { "1.2.840.10008.15.0.3.17","dicomPrimaryDeviceType" }, { "1.2.840.10008.15.0.3.18","dicomRelatedDeviceReference" }, { "1.2.840.10008.15.0.3.19","dicomPreferredCalledAETitle" }, { "1.2.840.10008.15.0.3.20","dicomTLSCyphersuite" }, { "1.2.840.10008.15.0.3.21","dicomAuthorizedNodeCertificateReference" }, { "1.2.840.10008.15.0.3.22","dicomThisNodeCertificateReference" }, { "1.2.840.10008.15.0.3.23","dicomInstalled" }, { "1.2.840.10008.15.0.3.24","dicomStationName" }, { "1.2.840.10008.15.0.3.25","dicomDeviceSerialNumber" }, { "1.2.840.10008.15.0.3.26","dicomInstitutionName" }, { "1.2.840.10008.15.0.3.27","dicomInstitutionAddress" }, { "1.2.840.10008.15.0.3.28","dicomInstitutionDepartmentName" }, { "1.2.840.10008.15.0.3.29","dicomIssuerOfPatientID" }, { "1.2.840.10008.15.0.3.30","dicomPreferredCallingAETitle" }, { "1.2.840.10008.15.0.3.31","dicomSupportedCharacterSet" }, { "1.2.840.10008.15.0.4.1","dicomConfigurationRoot" }, { "1.2.840.10008.15.0.4.2","dicomDevicesRoot" }, { "1.2.840.10008.15.0.4.3","dicomUniqueAETitlesRegistryRoot" }, { "1.2.840.10008.15.0.4.4","dicomDevice" }, { "1.2.840.10008.15.0.4.5","dicomNetworkAE" }, { "1.2.840.10008.15.0.4.6","dicomNetworkConnection" }, { "1.2.840.10008.15.0.4.7","dicomUniqueAETitle" }, { "1.2.840.10008.15.0.4.8","dicomTransferCapability" }, { "1.2.840.113619.4.2","General Electric Magnetic Resonance Image Storage" }, { "1.2.840.113619.4.3","General Electric Computed Tomography Image Storage" }, { "1.3.12.2.1107.5.9.1","CSA Non-Image Storage" }, { "1.2.840.113619.4.26","GE Private 3D Model Storage" }, { "1.2.840.113619.4.30","GE Advance (PET) Raw Data Storage" }, { "2.16.840.1.113709.1.5.1","GEPACS_PRIVATE_IMS_INFO Storage" }, { "1.2.840.113543.6.6.1.3.10002","Unregistered (?) Philips3D" }, { "1.2.392.200036.9116.7.8.1.1.1","Toshiba Private Data Storage" }, { "1.2.840.113619.4.27","GE Nuclear Medicine private SOP Class" }, //{ "1.3.46.670589.11.0.0.12.1","Philips Private Gyroscan MR Spectrum" }, { "1.3.46.670589.11.0.0.12.1","Philips Private MR Spectrum Storage" }, //{ "1.3.46.670589.11.0.0.12.2","Philips Private Gyroscan MR Series Data" }, { "1.3.46.670589.11.0.0.12.2","Philips Private MR Series Data Storage" }, { "1.3.46.670589.2.3.1.1","Philips Private Specialized XA Image" }, { "1.3.46.670589.2.4.1.1","Philips Private CX Image Storage" }, { "1.3.46.670589.2.5.1.1","Philips iE33 private 3D Object Storage" }, { "1.3.46.670589.5.0.1","Philips Private Volume Storage" }, { "1.3.46.670589.5.0.1.1","Philips Private Volume Image Reference" }, { "1.3.46.670589.5.0.10","Philips Private MR Synthetic Image Storage" }, { "1.3.46.670589.5.0.11","Philips Private MR Cardio Analysis Storage" }, { "1.3.46.670589.5.0.11.1","Philips Private MR Cardio Analysis Data" }, { "1.3.46.670589.5.0.12","Philips Private CX Synthetic Image Storage" }, { "1.3.46.670589.5.0.13","Philips Private Perfusion Image Reference" }, { "1.3.46.670589.5.0.14","Philips Private Perfusion Analysis Data" }, { "1.3.46.670589.5.0.2","Philips Private 3D Object Storage" }, { "1.3.46.670589.5.0.2.1","Philips Private 3D Object 2 Storage" }, { "1.3.46.670589.5.0.3","Philips Private Surface Storage" }, { "1.3.46.670589.5.0.3.1","Philips Private Surface 2 Storage" }, { "1.3.46.670589.5.0.4","Philips Private Composite Object Storage" }, { "1.3.46.670589.5.0.7","Philips Private MR Cardio Profile" }, { "1.3.46.670589.5.0.8","Philips Private MR Cardio" }, { "1.3.46.670589.5.0.9","Philips Private CT Synthetic Image Storage" }, { "1.2.752.24.3.7.6","Sectra Compression (Private Syntax)" }, { "1.2.752.24.3.7.7","Sectra Compression LS (Private Syntax)" }, { "1.2.840.113619.5.2","Implicit VR Big Endian DLX (G.E Private)" }, { nullptr, nullptr} }; // Custom list: static const char * const sopclassuids2[] = { "1.2.840.10008.1.3.10", "1.2.840.10008.5.1.4.1.1.1", "1.2.840.10008.5.1.4.1.1.1.1", "1.2.840.10008.5.1.4.1.1.11.1", "1.2.840.10008.5.1.4.1.1.1.2", "1.2.840.10008.5.1.4.1.1.12.1", "1.2.840.10008.5.1.4.1.1.12.2", "1.2.840.10008.5.1.4.1.1.128", "1.2.840.10008.5.1.4.1.1.2", "1.2.840.10008.5.1.4.1.1.20", "1.2.840.10008.5.1.4.1.1.3.1", "1.2.840.10008.5.1.4.1.1.4", "1.2.840.10008.5.1.4.1.1.4.1", "1.2.840.10008.5.1.4.1.1.481.3", "1.2.840.10008.5.1.4.1.1.5", "1.2.840.10008.5.1.4.1.1.6", "1.2.840.10008.5.1.4.1.1.6.1", "1.2.840.10008.5.1.4.1.1.66", "1.2.840.10008.5.1.4.1.1.7", "1.2.840.10008.5.1.4.1.1.88.11", "1.2.840.10008.5.1.4.1.1.88.22", "1.2.840.10008.5.1.4.1.1.88.3", "1.2.840.10008.5.1.4.1.1.88.59", "1.2.840.10008.5.1.4.1.1.9", "1.2.840.10008.5.1.4.1.1.9.4.1", "1.2.840.10008.5.1.4.38.1", "1.2.840.113619.4.26", "1.3.12.2.1107.5.9.1", "1.3.46.670589.11.0.0.12.2", "1.3.46.670589.5.0.1", "1.3.46.670589.5.0.10", "1.3.46.670589.5.0.1.1", "1.3.46.670589.5.0.11", "1.3.46.670589.5.0.13", "1.3.46.670589.5.0.14", "1.3.46.670589.5.0.2", "1.3.46.670589.5.0.2.1", "1.3.46.670589.5.0.3", "1.3.46.670589.5.0.8", //"1.3.6.1.4.1.20468.1.10", // invalid nullptr }; int TestUIDs(int, char *[]) { const char* s0 = gdcm::UIDs::GetUIDString( 0 ); if(s0) return 1; // {"1.2.840.10008.5.1.4.1.1.2.1","Enhanced CT Image Storage"}, // uid_1_2_840_10008_5_1_4_1_1_2_1 = 117, // Enhanced CT Image Storage const char* s = gdcm::UIDs::GetUIDString( gdcm::UIDs::uid_1_2_840_10008_5_1_4_1_1_2_1 ); if(!s) return 1; std::cout << s << std::endl; const char* n = gdcm::UIDs::GetUIDName( gdcm::UIDs::uid_1_2_840_10008_5_1_4_1_1_2_1 ); if(!n) return 1; std::cout << n << std::endl; const char* s1 = gdcm::UIDs::GetUIDString( gdcm::UIDs::EnhancedCTImageStorage ); if(!s1) return 1; std::cout << s1 << std::endl; const char* n1 = gdcm::UIDs::GetUIDName( gdcm::UIDs::EnhancedCTImageStorage ); if(!n1) return 1; std::cout << n1 << std::endl; gdcm::UIDs uid; // valid: if( !uid.SetFromUID( "1.2.840.10008.5.1.4.1.1.2.1" ) ) { return 1; } std::cout << "This is : " << uid.GetName() << std::endl; std::cout << "This is : " << uid.GetString() << std::endl; std::cout << uid << std::endl; // invalid if( uid.SetFromUID( "prosper youpla boum c'est le roi du pain d'epices" ) ) { return 1; } if( uid.GetName() ) return 1; if( uid.SetFromUID( "1.2" ) ) { return 1; } if( uid.GetName() ) return 1; if( uid.SetFromUID( "" ) ) { return 1; } if( uid.GetName() ) return 1; // black box: if( uid.SetFromUID( nullptr ) ) { return 1; } if( uid.GetName() ) return 1; using mytype = const char *const (*)[2]; mytype sopclassuid = sopclassuids; while( *sopclassuid[0] ) { const char *uid_str = (*sopclassuid)[0]; const char *name_str = (*sopclassuid)[1]; //std::cout << uid_str << std::endl; if( !uid.SetFromUID( uid_str ) ) { std::cerr << "Invalid UID:" << uid_str << std::endl; return 1; } const char *name = uid.GetName(); if( !name ) { std::cerr << "problem with: " << uid_str << std::endl; return 1; } if( strcmp( name, name_str) != 0 ) { std::cerr << "Error: " << name << " vs " << name_str << std::endl; return 1; } ++sopclassuid; } std::cout << "Custom List:" << std::endl; const char * const *s2 = sopclassuids2; while( *s2 ) { const char *uid_str = *s2; if( !uid.SetFromUID( uid_str ) ) { std::cerr << "Invalid UID:" << uid_str << std::endl; return 1; } const char *name = uid.GetName(); if( !name ) { return 1; } //std::cout << uid_str << "," << name << std::endl; s2++; } // Print all std::cout << "All:" << std::endl; for(unsigned int i = 0; i < gdcm::UIDs::GetNumberOfTransferSyntaxStrings(); ++i) { //const char * const * str_pair = gdcm::UIDs::GetTransferSyntaxString(i); uid.SetFromUID( gdcm::UIDs::GetUIDString( i+1 ) ); //std::cout << uid << std::endl; if( !uid.GetName() || !uid.GetString() ) return 1; } return 0; } gdcm-3.0.22/Testing/Source/DataDictionary/Cxx/TestDictEntry.cxx000664 001766 001770 00000002757 14517730450 026677 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDictEntry.h" #include "gdcmDict.h" int TestDictEntry(int, char *[]) { //gdcm::DictEntry de(0,0,0,0); //std::cout << sizeof(de) << std::endl; //gdcm::PrivateDictEntry pde(0,0,0); //std::cout << sizeof(pde) << std::endl; gdcm::PrivateTag pt1(0,0,"bla"); gdcm::PrivateTag pt2(0,0,"foo"); gdcm::PrivateTag pt3(0,1,"bla"); gdcm::PrivateTag pt4(0,1,"foo"); if( ! (pt1 < pt2) ) { return 1; } if( ! (pt2 < pt3) ) { return 1; } if( ! (pt3 < pt4) ) { return 1; } if( ! (pt1 < pt3) ) { return 1; } if( ! (pt1 < pt4) ) { return 1; } if( ! (pt2 < pt4) ) { return 1; } if( pt4 < pt3 ) { return 1; } if( pt4 < pt2 ) { return 1; } if( pt4 < pt1 ) { return 1; } if( pt3 < pt2 ) { return 1; } if( pt3 < pt1 ) { return 1; } if( pt2 < pt1 ) { return 1; } return 0; } gdcm-3.0.22/Testing/Source/DataDictionary/Cxx/TestDict.cxx000664 001766 001770 00000001257 14517730450 025647 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDict.h" int TestDict(int, char *[]) { gdcm::Dict d; std::cerr << sizeof(d) << std::endl; return 0; } gdcm-3.0.22/Testing/Source/DataDictionary/Cxx/TestTagToType.xsl000664 001766 001770 00000004513 14517730450 026646 0ustar00mmalaterremmalaterre000000 000000 // GENERATED FILE DO NOT EDIT // $ xsltproc TestTagToType.xsl DICOMV3.xml > TestTagToType.cxx /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTagToType.h" int TestTagToType(int, char *[]) { gdcm::TagToType<0x ,0x > ; (void) ; return 0; } gdcm-3.0.22/Testing/Source/DataDictionary/Cxx/TestTagKeywords.cxx000664 001766 001770 00000001374 14517730450 027227 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTagKeywords.h" int TestTagKeywords(int, char *[]) { gdcm::Keywords::FileMetaInformationVersion at1; (void)at1; if( at1.GetTag() != gdcm::Tag( 0x2, 0x1 ) ) return 1; return 0; } gdcm-3.0.22/Testing/Source/DataDictionary/Cxx/TestGlobal.cxx000664 001766 001770 00000006317 14517730450 026166 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmGlobal.h" #include "gdcmDicts.h" #include "gdcmDict.h" #include "gdcmDefs.h" int TestGlobal(int, char *[]) { // case 1 // Get the global singleton: gdcm::Trace::DebugOn(); gdcm::Global& g = gdcm::Global::GetInstance(); if( !g.LoadResourcesFiles() ) { std::cerr << "Could not LoadResourcesFiles" << std::endl; return 1; } gdcm::Trace::DebugOff(); // get the Part 6 dicts from it: const gdcm::Dicts &ds = g.GetDicts(); const gdcm::Dict &pub = ds.GetPublicDict(); const gdcm::PrivateDict &priv = ds.GetPrivateDict(); // case 2 gdcm::Dicts dicts; const gdcm::Dict &d1 = dicts.GetPublicDict(); // case 3 gdcm::Dict d2; // This one will be empty: std::cout << "Empty dict:" << std::endl; std::cout << d1 << std::endl; if( !d1.IsEmpty() ) { return 1; } // This one will be empty: std::cout << "Empty dict:" << std::endl; std::cout << d2 << std::endl; if( !d2.IsEmpty() ) { return 1; } // This should should be filled in: std::cout << "Global pub dict:" << std::endl; //std::cout << pub << std::endl; if( pub.IsEmpty() ) { return 1; } // This should should be filled in: std::cout << "Global priv dict:" << std::endl; //std::cout << priv << std::endl; if( priv.IsEmpty() ) { return 1; } #if 0 // FIXME I do not understand what was wrong before... // I had to change the PrivateTag to use lower case to support this: const gdcm::DictEntry& de1 = priv.GetDictEntry( gdcm::PrivateTag(0x2001,0x0001,"Philips Imaging DD 001") ); std::cout << de1 << std::endl; const gdcm::DictEntry& de2 = priv.GetDictEntry( gdcm::PrivateTag(0x2001,0x0001,"PHILIPS IMAGING DD 001") ); std::cout << de2 << std::endl; if( &de1 != &de2 ) { return 1; } const gdcm::DictEntry& de3 = priv.GetDictEntry( gdcm::PrivateTag(0x2001,0x0003,"Philips Imaging DD 001") ); std::cout << de3 << std::endl; const gdcm::DictEntry& de4 = priv.GetDictEntry( gdcm::PrivateTag(0x2001,0x0003,"PHILIPS IMAGING DD 001") ); std::cout << de4 << std::endl; if( &de4 != &de3 ) { return 1; } #endif #if 0 const char *empty = ""; std::string s = empty; std::cout << s.empty() << std::endl; const gdcm::DictEntry& de = pub.GetDictEntry( gdcm::Tag(0x0028,0x0015) ); const char *v = de.GetName(); //assert( v ); std::cout << "TOTO:" << de << std::endl; #endif const gdcm::Defs &defs = g.GetDefs(); const gdcm::Modules &modules = defs.GetModules(); std::cout << modules << std::endl; const gdcm::Macros ¯os = defs.GetMacros(); std::cout << macros << std::endl; const gdcm::IODs &iods = defs.GetIODs(); std::cout << iods << std::endl; return 0; } gdcm-3.0.22/Testing/Source/DataDictionary/Cxx/TestGroupDict.cxx000664 001766 001770 00000001316 14517730450 026660 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmGroupDict.h" #include int TestGroupDict(int , char *[]) { gdcm::GroupDict gd; std::cout << gd << std::endl; return 0; } gdcm-3.0.22/Testing/Source/DataDictionary/Cxx/TestTagToType.cxx000664 001766 001770 00000474252 14517730450 026655 0ustar00mmalaterremmalaterre000000 000000 // GENERATED FILE DO NOT EDIT // $ xsltproc TestTagToType.xsl DICOMV3.xml > TestTagToType.cxx /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTagToType.h" int TestTagToType(int, char *[]) { gdcm::TagToType<0x0000,0x0000> x00000000; (void)x00000000; gdcm::TagToType<0x0000,0x0001> x00000001; (void)x00000001; gdcm::TagToType<0x0000,0x0002> x00000002; (void)x00000002; gdcm::TagToType<0x0000,0x0003> x00000003; (void)x00000003; gdcm::TagToType<0x0000,0x0010> x00000010; (void)x00000010; gdcm::TagToType<0x0000,0x0100> x00000100; (void)x00000100; gdcm::TagToType<0x0000,0x0110> x00000110; (void)x00000110; gdcm::TagToType<0x0000,0x0120> x00000120; (void)x00000120; gdcm::TagToType<0x0000,0x0200> x00000200; (void)x00000200; gdcm::TagToType<0x0000,0x0300> x00000300; (void)x00000300; gdcm::TagToType<0x0000,0x0400> x00000400; (void)x00000400; gdcm::TagToType<0x0000,0x0600> x00000600; (void)x00000600; gdcm::TagToType<0x0000,0x0700> x00000700; (void)x00000700; gdcm::TagToType<0x0000,0x0800> x00000800; (void)x00000800; gdcm::TagToType<0x0000,0x0850> x00000850; (void)x00000850; gdcm::TagToType<0x0000,0x0860> x00000860; (void)x00000860; gdcm::TagToType<0x0000,0x0900> x00000900; (void)x00000900; gdcm::TagToType<0x0000,0x0901> x00000901; (void)x00000901; gdcm::TagToType<0x0000,0x0902> x00000902; (void)x00000902; gdcm::TagToType<0x0000,0x0903> x00000903; (void)x00000903; gdcm::TagToType<0x0000,0x1000> x00001000; (void)x00001000; gdcm::TagToType<0x0000,0x1001> x00001001; (void)x00001001; gdcm::TagToType<0x0000,0x1002> x00001002; (void)x00001002; gdcm::TagToType<0x0000,0x1005> x00001005; (void)x00001005; gdcm::TagToType<0x0000,0x1008> x00001008; (void)x00001008; gdcm::TagToType<0x0000,0x1020> x00001020; (void)x00001020; gdcm::TagToType<0x0000,0x1021> x00001021; (void)x00001021; gdcm::TagToType<0x0000,0x1022> x00001022; (void)x00001022; gdcm::TagToType<0x0000,0x1023> x00001023; (void)x00001023; gdcm::TagToType<0x0000,0x1030> x00001030; (void)x00001030; gdcm::TagToType<0x0000,0x1031> x00001031; (void)x00001031; gdcm::TagToType<0x0000,0x4000> x00004000; (void)x00004000; gdcm::TagToType<0x0000,0x4010> x00004010; (void)x00004010; gdcm::TagToType<0x0000,0x5010> x00005010; (void)x00005010; gdcm::TagToType<0x0000,0x5020> x00005020; (void)x00005020; gdcm::TagToType<0x0000,0x5110> x00005110; (void)x00005110; gdcm::TagToType<0x0000,0x5120> x00005120; (void)x00005120; gdcm::TagToType<0x0000,0x5130> x00005130; (void)x00005130; gdcm::TagToType<0x0000,0x5140> x00005140; (void)x00005140; gdcm::TagToType<0x0000,0x5150> x00005150; (void)x00005150; gdcm::TagToType<0x0000,0x5160> x00005160; (void)x00005160; gdcm::TagToType<0x0000,0x5170> x00005170; (void)x00005170; gdcm::TagToType<0x0000,0x5180> x00005180; (void)x00005180; gdcm::TagToType<0x0000,0x5190> x00005190; (void)x00005190; gdcm::TagToType<0x0000,0x51a0> x000051a0; (void)x000051a0; gdcm::TagToType<0x0000,0x51b0> x000051b0; (void)x000051b0; gdcm::TagToType<0x0002,0x0000> x00020000; (void)x00020000; gdcm::TagToType<0x0002,0x0001> x00020001; (void)x00020001; gdcm::TagToType<0x0002,0x0002> x00020002; (void)x00020002; gdcm::TagToType<0x0002,0x0003> x00020003; (void)x00020003; gdcm::TagToType<0x0002,0x0010> x00020010; (void)x00020010; gdcm::TagToType<0x0002,0x0012> x00020012; (void)x00020012; gdcm::TagToType<0x0002,0x0013> x00020013; (void)x00020013; gdcm::TagToType<0x0002,0x0016> x00020016; (void)x00020016; gdcm::TagToType<0x0002,0x0100> x00020100; (void)x00020100; gdcm::TagToType<0x0002,0x0102> x00020102; (void)x00020102; gdcm::TagToType<0x0004,0x1130> x00041130; (void)x00041130; gdcm::TagToType<0x0004,0x1141> x00041141; (void)x00041141; gdcm::TagToType<0x0004,0x1142> x00041142; (void)x00041142; gdcm::TagToType<0x0004,0x1200> x00041200; (void)x00041200; gdcm::TagToType<0x0004,0x1202> x00041202; (void)x00041202; gdcm::TagToType<0x0004,0x1212> x00041212; (void)x00041212; gdcm::TagToType<0x0004,0x1220> x00041220; (void)x00041220; gdcm::TagToType<0x0004,0x1400> x00041400; (void)x00041400; gdcm::TagToType<0x0004,0x1410> x00041410; (void)x00041410; gdcm::TagToType<0x0004,0x1420> x00041420; (void)x00041420; gdcm::TagToType<0x0004,0x1430> x00041430; (void)x00041430; gdcm::TagToType<0x0004,0x1432> x00041432; (void)x00041432; gdcm::TagToType<0x0004,0x1500> x00041500; (void)x00041500; gdcm::TagToType<0x0004,0x1504> x00041504; (void)x00041504; gdcm::TagToType<0x0004,0x1510> x00041510; (void)x00041510; gdcm::TagToType<0x0004,0x1511> x00041511; (void)x00041511; gdcm::TagToType<0x0004,0x1512> x00041512; (void)x00041512; gdcm::TagToType<0x0004,0x151a> x0004151a; (void)x0004151a; gdcm::TagToType<0x0004,0x1600> x00041600; (void)x00041600; gdcm::TagToType<0x0008,0x0001> x00080001; (void)x00080001; gdcm::TagToType<0x0008,0x0005> x00080005; (void)x00080005; gdcm::TagToType<0x0008,0x0008> x00080008; (void)x00080008; gdcm::TagToType<0x0008,0x0010> x00080010; (void)x00080010; gdcm::TagToType<0x0008,0x0012> x00080012; (void)x00080012; gdcm::TagToType<0x0008,0x0013> x00080013; (void)x00080013; gdcm::TagToType<0x0008,0x0014> x00080014; (void)x00080014; gdcm::TagToType<0x0008,0x0016> x00080016; (void)x00080016; gdcm::TagToType<0x0008,0x0018> x00080018; (void)x00080018; gdcm::TagToType<0x0008,0x001a> x0008001a; (void)x0008001a; gdcm::TagToType<0x0008,0x001b> x0008001b; (void)x0008001b; gdcm::TagToType<0x0008,0x0020> x00080020; (void)x00080020; gdcm::TagToType<0x0008,0x0021> x00080021; (void)x00080021; gdcm::TagToType<0x0008,0x0022> x00080022; (void)x00080022; gdcm::TagToType<0x0008,0x0023> x00080023; (void)x00080023; gdcm::TagToType<0x0008,0x0024> x00080024; (void)x00080024; gdcm::TagToType<0x0008,0x0025> x00080025; (void)x00080025; gdcm::TagToType<0x0008,0x002a> x0008002a; (void)x0008002a; gdcm::TagToType<0x0008,0x0030> x00080030; (void)x00080030; gdcm::TagToType<0x0008,0x0031> x00080031; (void)x00080031; gdcm::TagToType<0x0008,0x0032> x00080032; (void)x00080032; gdcm::TagToType<0x0008,0x0033> x00080033; (void)x00080033; gdcm::TagToType<0x0008,0x0034> x00080034; (void)x00080034; gdcm::TagToType<0x0008,0x0035> x00080035; (void)x00080035; gdcm::TagToType<0x0008,0x0040> x00080040; (void)x00080040; gdcm::TagToType<0x0008,0x0041> x00080041; (void)x00080041; gdcm::TagToType<0x0008,0x0042> x00080042; (void)x00080042; gdcm::TagToType<0x0008,0x0050> x00080050; (void)x00080050; gdcm::TagToType<0x0008,0x0052> x00080052; (void)x00080052; gdcm::TagToType<0x0008,0x0054> x00080054; (void)x00080054; gdcm::TagToType<0x0008,0x0056> x00080056; (void)x00080056; gdcm::TagToType<0x0008,0x0058> x00080058; (void)x00080058; gdcm::TagToType<0x0008,0x0060> x00080060; (void)x00080060; gdcm::TagToType<0x0008,0x0061> x00080061; (void)x00080061; gdcm::TagToType<0x0008,0x0062> x00080062; (void)x00080062; gdcm::TagToType<0x0008,0x0064> x00080064; (void)x00080064; gdcm::TagToType<0x0008,0x0068> x00080068; (void)x00080068; gdcm::TagToType<0x0008,0x0070> x00080070; (void)x00080070; gdcm::TagToType<0x0008,0x0080> x00080080; (void)x00080080; gdcm::TagToType<0x0008,0x0081> x00080081; (void)x00080081; gdcm::TagToType<0x0008,0x0082> x00080082; (void)x00080082; gdcm::TagToType<0x0008,0x0090> x00080090; (void)x00080090; gdcm::TagToType<0x0008,0x0092> x00080092; (void)x00080092; gdcm::TagToType<0x0008,0x0094> x00080094; (void)x00080094; gdcm::TagToType<0x0008,0x0096> x00080096; (void)x00080096; gdcm::TagToType<0x0008,0x0100> x00080100; (void)x00080100; gdcm::TagToType<0x0008,0x0102> x00080102; (void)x00080102; gdcm::TagToType<0x0008,0x0103> x00080103; (void)x00080103; gdcm::TagToType<0x0008,0x0104> x00080104; (void)x00080104; gdcm::TagToType<0x0008,0x0105> x00080105; (void)x00080105; gdcm::TagToType<0x0008,0x0106> x00080106; (void)x00080106; gdcm::TagToType<0x0008,0x0107> x00080107; (void)x00080107; gdcm::TagToType<0x0008,0x010b> x0008010b; (void)x0008010b; gdcm::TagToType<0x0008,0x010c> x0008010c; (void)x0008010c; gdcm::TagToType<0x0008,0x010d> x0008010d; (void)x0008010d; gdcm::TagToType<0x0008,0x010f> x0008010f; (void)x0008010f; gdcm::TagToType<0x0008,0x0110> x00080110; (void)x00080110; gdcm::TagToType<0x0008,0x0112> x00080112; (void)x00080112; gdcm::TagToType<0x0008,0x0114> x00080114; (void)x00080114; gdcm::TagToType<0x0008,0x0115> x00080115; (void)x00080115; gdcm::TagToType<0x0008,0x0116> x00080116; (void)x00080116; gdcm::TagToType<0x0008,0x0201> x00080201; (void)x00080201; gdcm::TagToType<0x0008,0x1000> x00081000; (void)x00081000; gdcm::TagToType<0x0008,0x1010> x00081010; (void)x00081010; gdcm::TagToType<0x0008,0x1030> x00081030; (void)x00081030; gdcm::TagToType<0x0008,0x1032> x00081032; (void)x00081032; gdcm::TagToType<0x0008,0x103e> x0008103e; (void)x0008103e; gdcm::TagToType<0x0008,0x1040> x00081040; (void)x00081040; gdcm::TagToType<0x0008,0x1048> x00081048; (void)x00081048; gdcm::TagToType<0x0008,0x1049> x00081049; (void)x00081049; gdcm::TagToType<0x0008,0x1050> x00081050; (void)x00081050; gdcm::TagToType<0x0008,0x1052> x00081052; (void)x00081052; gdcm::TagToType<0x0008,0x1060> x00081060; (void)x00081060; gdcm::TagToType<0x0008,0x1062> x00081062; (void)x00081062; gdcm::TagToType<0x0008,0x1070> x00081070; (void)x00081070; gdcm::TagToType<0x0008,0x1072> x00081072; (void)x00081072; gdcm::TagToType<0x0008,0x1080> x00081080; (void)x00081080; gdcm::TagToType<0x0008,0x1084> x00081084; (void)x00081084; gdcm::TagToType<0x0008,0x1090> x00081090; (void)x00081090; gdcm::TagToType<0x0008,0x1100> x00081100; (void)x00081100; gdcm::TagToType<0x0008,0x1110> x00081110; (void)x00081110; gdcm::TagToType<0x0008,0x1111> x00081111; (void)x00081111; gdcm::TagToType<0x0008,0x1115> x00081115; (void)x00081115; gdcm::TagToType<0x0008,0x1120> x00081120; (void)x00081120; gdcm::TagToType<0x0008,0x1125> x00081125; (void)x00081125; gdcm::TagToType<0x0008,0x1130> x00081130; (void)x00081130; gdcm::TagToType<0x0008,0x113a> x0008113a; (void)x0008113a; gdcm::TagToType<0x0008,0x1140> x00081140; (void)x00081140; gdcm::TagToType<0x0008,0x1145> x00081145; (void)x00081145; gdcm::TagToType<0x0008,0x114a> x0008114a; (void)x0008114a; gdcm::TagToType<0x0008,0x114b> x0008114b; (void)x0008114b; gdcm::TagToType<0x0008,0x1150> x00081150; (void)x00081150; gdcm::TagToType<0x0008,0x1155> x00081155; (void)x00081155; gdcm::TagToType<0x0008,0x115a> x0008115a; (void)x0008115a; gdcm::TagToType<0x0008,0x1160> x00081160; (void)x00081160; gdcm::TagToType<0x0008,0x1195> x00081195; (void)x00081195; gdcm::TagToType<0x0008,0x1197> x00081197; (void)x00081197; gdcm::TagToType<0x0008,0x1198> x00081198; (void)x00081198; gdcm::TagToType<0x0008,0x1199> x00081199; (void)x00081199; gdcm::TagToType<0x0008,0x1200> x00081200; (void)x00081200; gdcm::TagToType<0x0008,0x1250> x00081250; (void)x00081250; gdcm::TagToType<0x0008,0x2110> x00082110; (void)x00082110; gdcm::TagToType<0x0008,0x2111> x00082111; (void)x00082111; gdcm::TagToType<0x0008,0x2112> x00082112; (void)x00082112; gdcm::TagToType<0x0008,0x2120> x00082120; (void)x00082120; gdcm::TagToType<0x0008,0x2122> x00082122; (void)x00082122; gdcm::TagToType<0x0008,0x2124> x00082124; (void)x00082124; gdcm::TagToType<0x0008,0x2127> x00082127; (void)x00082127; gdcm::TagToType<0x0008,0x2128> x00082128; (void)x00082128; gdcm::TagToType<0x0008,0x2129> x00082129; (void)x00082129; gdcm::TagToType<0x0008,0x212a> x0008212a; (void)x0008212a; gdcm::TagToType<0x0008,0x2130> x00082130; (void)x00082130; gdcm::TagToType<0x0008,0x2132> x00082132; (void)x00082132; gdcm::TagToType<0x0008,0x2142> x00082142; (void)x00082142; gdcm::TagToType<0x0008,0x2143> x00082143; (void)x00082143; gdcm::TagToType<0x0008,0x2144> x00082144; (void)x00082144; gdcm::TagToType<0x0008,0x2200> x00082200; (void)x00082200; gdcm::TagToType<0x0008,0x2204> x00082204; (void)x00082204; gdcm::TagToType<0x0008,0x2208> x00082208; (void)x00082208; gdcm::TagToType<0x0008,0x2218> x00082218; (void)x00082218; gdcm::TagToType<0x0008,0x2220> x00082220; (void)x00082220; gdcm::TagToType<0x0008,0x2228> x00082228; (void)x00082228; gdcm::TagToType<0x0008,0x2229> x00082229; (void)x00082229; gdcm::TagToType<0x0008,0x2230> x00082230; (void)x00082230; gdcm::TagToType<0x0008,0x2240> x00082240; (void)x00082240; gdcm::TagToType<0x0008,0x2242> x00082242; (void)x00082242; gdcm::TagToType<0x0008,0x2244> x00082244; (void)x00082244; gdcm::TagToType<0x0008,0x2246> x00082246; (void)x00082246; gdcm::TagToType<0x0008,0x2251> x00082251; (void)x00082251; gdcm::TagToType<0x0008,0x2253> x00082253; (void)x00082253; gdcm::TagToType<0x0008,0x2255> x00082255; (void)x00082255; gdcm::TagToType<0x0008,0x2256> x00082256; (void)x00082256; gdcm::TagToType<0x0008,0x2257> x00082257; (void)x00082257; gdcm::TagToType<0x0008,0x2258> x00082258; (void)x00082258; gdcm::TagToType<0x0008,0x2259> x00082259; (void)x00082259; gdcm::TagToType<0x0008,0x225a> x0008225a; (void)x0008225a; gdcm::TagToType<0x0008,0x225c> x0008225c; (void)x0008225c; gdcm::TagToType<0x0008,0x3001> x00083001; (void)x00083001; gdcm::TagToType<0x0008,0x3010> x00083010; (void)x00083010; gdcm::TagToType<0x0008,0x4000> x00084000; (void)x00084000; gdcm::TagToType<0x0008,0x9007> x00089007; (void)x00089007; gdcm::TagToType<0x0008,0x9092> x00089092; (void)x00089092; gdcm::TagToType<0x0008,0x9121> x00089121; (void)x00089121; gdcm::TagToType<0x0008,0x9123> x00089123; (void)x00089123; gdcm::TagToType<0x0008,0x9124> x00089124; (void)x00089124; gdcm::TagToType<0x0008,0x9154> x00089154; (void)x00089154; gdcm::TagToType<0x0008,0x9205> x00089205; (void)x00089205; gdcm::TagToType<0x0008,0x9206> x00089206; (void)x00089206; gdcm::TagToType<0x0008,0x9207> x00089207; (void)x00089207; gdcm::TagToType<0x0008,0x9208> x00089208; (void)x00089208; gdcm::TagToType<0x0008,0x9209> x00089209; (void)x00089209; gdcm::TagToType<0x0008,0x9215> x00089215; (void)x00089215; gdcm::TagToType<0x0008,0x9237> x00089237; (void)x00089237; gdcm::TagToType<0x0008,0x9410> x00089410; (void)x00089410; gdcm::TagToType<0x0008,0x9458> x00089458; (void)x00089458; gdcm::TagToType<0x0008,0x9459> x00089459; (void)x00089459; gdcm::TagToType<0x0008,0x9460> x00089460; (void)x00089460; gdcm::TagToType<0x0010,0x0010> x00100010; (void)x00100010; gdcm::TagToType<0x0010,0x0020> x00100020; (void)x00100020; gdcm::TagToType<0x0010,0x0021> x00100021; (void)x00100021; gdcm::TagToType<0x0010,0x0022> x00100022; (void)x00100022; gdcm::TagToType<0x0010,0x0030> x00100030; (void)x00100030; gdcm::TagToType<0x0010,0x0032> x00100032; (void)x00100032; gdcm::TagToType<0x0010,0x0040> x00100040; (void)x00100040; gdcm::TagToType<0x0010,0x0050> x00100050; (void)x00100050; gdcm::TagToType<0x0010,0x0101> x00100101; (void)x00100101; gdcm::TagToType<0x0010,0x0102> x00100102; (void)x00100102; gdcm::TagToType<0x0010,0x1000> x00101000; (void)x00101000; gdcm::TagToType<0x0010,0x1001> x00101001; (void)x00101001; gdcm::TagToType<0x0010,0x1002> x00101002; (void)x00101002; gdcm::TagToType<0x0010,0x1005> x00101005; (void)x00101005; gdcm::TagToType<0x0010,0x1010> x00101010; (void)x00101010; gdcm::TagToType<0x0010,0x1020> x00101020; (void)x00101020; gdcm::TagToType<0x0010,0x1030> x00101030; (void)x00101030; gdcm::TagToType<0x0010,0x1040> x00101040; (void)x00101040; gdcm::TagToType<0x0010,0x1050> x00101050; (void)x00101050; gdcm::TagToType<0x0010,0x1060> x00101060; (void)x00101060; gdcm::TagToType<0x0010,0x1080> x00101080; (void)x00101080; gdcm::TagToType<0x0010,0x1081> x00101081; (void)x00101081; gdcm::TagToType<0x0010,0x1090> x00101090; (void)x00101090; gdcm::TagToType<0x0010,0x2000> x00102000; (void)x00102000; gdcm::TagToType<0x0010,0x2110> x00102110; (void)x00102110; gdcm::TagToType<0x0010,0x2150> x00102150; (void)x00102150; gdcm::TagToType<0x0010,0x2152> x00102152; (void)x00102152; gdcm::TagToType<0x0010,0x2154> x00102154; (void)x00102154; gdcm::TagToType<0x0010,0x2160> x00102160; (void)x00102160; gdcm::TagToType<0x0010,0x2180> x00102180; (void)x00102180; gdcm::TagToType<0x0010,0x21a0> x001021a0; (void)x001021a0; gdcm::TagToType<0x0010,0x21b0> x001021b0; (void)x001021b0; gdcm::TagToType<0x0010,0x21c0> x001021c0; (void)x001021c0; gdcm::TagToType<0x0010,0x21d0> x001021d0; (void)x001021d0; gdcm::TagToType<0x0010,0x21f0> x001021f0; (void)x001021f0; gdcm::TagToType<0x0010,0x2201> x00102201; (void)x00102201; gdcm::TagToType<0x0010,0x2202> x00102202; (void)x00102202; gdcm::TagToType<0x0010,0x2203> x00102203; (void)x00102203; gdcm::TagToType<0x0010,0x2292> x00102292; (void)x00102292; gdcm::TagToType<0x0010,0x2293> x00102293; (void)x00102293; gdcm::TagToType<0x0010,0x2294> x00102294; (void)x00102294; gdcm::TagToType<0x0010,0x2295> x00102295; (void)x00102295; gdcm::TagToType<0x0010,0x2296> x00102296; (void)x00102296; gdcm::TagToType<0x0010,0x2297> x00102297; (void)x00102297; gdcm::TagToType<0x0010,0x2298> x00102298; (void)x00102298; gdcm::TagToType<0x0010,0x2299> x00102299; (void)x00102299; gdcm::TagToType<0x0010,0x4000> x00104000; (void)x00104000; gdcm::TagToType<0x0010,0x9431> x00109431; (void)x00109431; gdcm::TagToType<0x0012,0x0010> x00120010; (void)x00120010; gdcm::TagToType<0x0012,0x0020> x00120020; (void)x00120020; gdcm::TagToType<0x0012,0x0021> x00120021; (void)x00120021; gdcm::TagToType<0x0012,0x0030> x00120030; (void)x00120030; gdcm::TagToType<0x0012,0x0031> x00120031; (void)x00120031; gdcm::TagToType<0x0012,0x0040> x00120040; (void)x00120040; gdcm::TagToType<0x0012,0x0042> x00120042; (void)x00120042; gdcm::TagToType<0x0012,0x0050> x00120050; (void)x00120050; gdcm::TagToType<0x0012,0x0051> x00120051; (void)x00120051; gdcm::TagToType<0x0012,0x0060> x00120060; (void)x00120060; gdcm::TagToType<0x0012,0x0062> x00120062; (void)x00120062; gdcm::TagToType<0x0012,0x0063> x00120063; (void)x00120063; gdcm::TagToType<0x0012,0x0064> x00120064; (void)x00120064; gdcm::TagToType<0x0012,0x0071> x00120071; (void)x00120071; gdcm::TagToType<0x0012,0x0072> x00120072; (void)x00120072; gdcm::TagToType<0x0018,0x0010> x00180010; (void)x00180010; gdcm::TagToType<0x0018,0x0012> x00180012; (void)x00180012; gdcm::TagToType<0x0018,0x0014> x00180014; (void)x00180014; gdcm::TagToType<0x0018,0x0015> x00180015; (void)x00180015; gdcm::TagToType<0x0018,0x0020> x00180020; (void)x00180020; gdcm::TagToType<0x0018,0x0021> x00180021; (void)x00180021; gdcm::TagToType<0x0018,0x0022> x00180022; (void)x00180022; gdcm::TagToType<0x0018,0x0023> x00180023; (void)x00180023; gdcm::TagToType<0x0018,0x0024> x00180024; (void)x00180024; gdcm::TagToType<0x0018,0x0025> x00180025; (void)x00180025; gdcm::TagToType<0x0018,0x0026> x00180026; (void)x00180026; gdcm::TagToType<0x0018,0x0027> x00180027; (void)x00180027; gdcm::TagToType<0x0018,0x0028> x00180028; (void)x00180028; gdcm::TagToType<0x0018,0x0029> x00180029; (void)x00180029; gdcm::TagToType<0x0018,0x002a> x0018002a; (void)x0018002a; gdcm::TagToType<0x0018,0x0030> x00180030; (void)x00180030; gdcm::TagToType<0x0018,0x0031> x00180031; (void)x00180031; gdcm::TagToType<0x0018,0x0032> x00180032; (void)x00180032; gdcm::TagToType<0x0018,0x0033> x00180033; (void)x00180033; gdcm::TagToType<0x0018,0x0034> x00180034; (void)x00180034; gdcm::TagToType<0x0018,0x0035> x00180035; (void)x00180035; gdcm::TagToType<0x0018,0x0036> x00180036; (void)x00180036; gdcm::TagToType<0x0018,0x0037> x00180037; (void)x00180037; gdcm::TagToType<0x0018,0x0038> x00180038; (void)x00180038; gdcm::TagToType<0x0018,0x0039> x00180039; (void)x00180039; gdcm::TagToType<0x0018,0x003a> x0018003a; (void)x0018003a; gdcm::TagToType<0x0018,0x0040> x00180040; (void)x00180040; gdcm::TagToType<0x0018,0x0050> x00180050; (void)x00180050; gdcm::TagToType<0x0018,0x0060> x00180060; (void)x00180060; gdcm::TagToType<0x0018,0x0070> x00180070; (void)x00180070; gdcm::TagToType<0x0018,0x0071> x00180071; (void)x00180071; gdcm::TagToType<0x0018,0x0072> x00180072; (void)x00180072; gdcm::TagToType<0x0018,0x0073> x00180073; (void)x00180073; gdcm::TagToType<0x0018,0x0074> x00180074; (void)x00180074; gdcm::TagToType<0x0018,0x0075> x00180075; (void)x00180075; gdcm::TagToType<0x0018,0x0080> x00180080; (void)x00180080; gdcm::TagToType<0x0018,0x0081> x00180081; (void)x00180081; gdcm::TagToType<0x0018,0x0082> x00180082; (void)x00180082; gdcm::TagToType<0x0018,0x0083> x00180083; (void)x00180083; gdcm::TagToType<0x0018,0x0084> x00180084; (void)x00180084; gdcm::TagToType<0x0018,0x0085> x00180085; (void)x00180085; gdcm::TagToType<0x0018,0x0086> x00180086; (void)x00180086; gdcm::TagToType<0x0018,0x0087> x00180087; (void)x00180087; gdcm::TagToType<0x0018,0x0088> x00180088; (void)x00180088; gdcm::TagToType<0x0018,0x0089> x00180089; (void)x00180089; gdcm::TagToType<0x0018,0x0090> x00180090; (void)x00180090; gdcm::TagToType<0x0018,0x0091> x00180091; (void)x00180091; gdcm::TagToType<0x0018,0x0093> x00180093; (void)x00180093; gdcm::TagToType<0x0018,0x0094> x00180094; (void)x00180094; gdcm::TagToType<0x0018,0x0095> x00180095; (void)x00180095; gdcm::TagToType<0x0018,0x1000> x00181000; (void)x00181000; gdcm::TagToType<0x0018,0x1002> x00181002; (void)x00181002; gdcm::TagToType<0x0018,0x1003> x00181003; (void)x00181003; gdcm::TagToType<0x0018,0x1004> x00181004; (void)x00181004; gdcm::TagToType<0x0018,0x1005> x00181005; (void)x00181005; gdcm::TagToType<0x0018,0x1006> x00181006; (void)x00181006; gdcm::TagToType<0x0018,0x1007> x00181007; (void)x00181007; gdcm::TagToType<0x0018,0x1008> x00181008; (void)x00181008; gdcm::TagToType<0x0018,0x1010> x00181010; (void)x00181010; gdcm::TagToType<0x0018,0x1011> x00181011; (void)x00181011; gdcm::TagToType<0x0018,0x1012> x00181012; (void)x00181012; gdcm::TagToType<0x0018,0x1014> x00181014; (void)x00181014; gdcm::TagToType<0x0018,0x1016> x00181016; (void)x00181016; gdcm::TagToType<0x0018,0x1017> x00181017; (void)x00181017; gdcm::TagToType<0x0018,0x1018> x00181018; (void)x00181018; gdcm::TagToType<0x0018,0x1019> x00181019; (void)x00181019; gdcm::TagToType<0x0018,0x101a> x0018101a; (void)x0018101a; gdcm::TagToType<0x0018,0x101b> x0018101b; (void)x0018101b; gdcm::TagToType<0x0018,0x1020> x00181020; (void)x00181020; gdcm::TagToType<0x0018,0x1022> x00181022; (void)x00181022; gdcm::TagToType<0x0018,0x1023> x00181023; (void)x00181023; gdcm::TagToType<0x0018,0x1030> x00181030; (void)x00181030; gdcm::TagToType<0x0018,0x1040> x00181040; (void)x00181040; gdcm::TagToType<0x0018,0x1041> x00181041; (void)x00181041; gdcm::TagToType<0x0018,0x1042> x00181042; (void)x00181042; gdcm::TagToType<0x0018,0x1043> x00181043; (void)x00181043; gdcm::TagToType<0x0018,0x1044> x00181044; (void)x00181044; gdcm::TagToType<0x0018,0x1045> x00181045; (void)x00181045; gdcm::TagToType<0x0018,0x1046> x00181046; (void)x00181046; gdcm::TagToType<0x0018,0x1047> x00181047; (void)x00181047; gdcm::TagToType<0x0018,0x1048> x00181048; (void)x00181048; gdcm::TagToType<0x0018,0x1049> x00181049; (void)x00181049; gdcm::TagToType<0x0018,0x1050> x00181050; (void)x00181050; gdcm::TagToType<0x0018,0x1060> x00181060; (void)x00181060; gdcm::TagToType<0x0018,0x1061> x00181061; (void)x00181061; gdcm::TagToType<0x0018,0x1062> x00181062; (void)x00181062; gdcm::TagToType<0x0018,0x1063> x00181063; (void)x00181063; gdcm::TagToType<0x0018,0x1064> x00181064; (void)x00181064; gdcm::TagToType<0x0018,0x1065> x00181065; (void)x00181065; gdcm::TagToType<0x0018,0x1066> x00181066; (void)x00181066; gdcm::TagToType<0x0018,0x1067> x00181067; (void)x00181067; gdcm::TagToType<0x0018,0x1068> x00181068; (void)x00181068; gdcm::TagToType<0x0018,0x1069> x00181069; (void)x00181069; gdcm::TagToType<0x0018,0x106a> x0018106a; (void)x0018106a; gdcm::TagToType<0x0018,0x106c> x0018106c; (void)x0018106c; gdcm::TagToType<0x0018,0x106e> x0018106e; (void)x0018106e; gdcm::TagToType<0x0018,0x1070> x00181070; (void)x00181070; gdcm::TagToType<0x0018,0x1071> x00181071; (void)x00181071; gdcm::TagToType<0x0018,0x1072> x00181072; (void)x00181072; gdcm::TagToType<0x0018,0x1073> x00181073; (void)x00181073; gdcm::TagToType<0x0018,0x1074> x00181074; (void)x00181074; gdcm::TagToType<0x0018,0x1075> x00181075; (void)x00181075; gdcm::TagToType<0x0018,0x1076> x00181076; (void)x00181076; gdcm::TagToType<0x0018,0x1077> x00181077; (void)x00181077; gdcm::TagToType<0x0018,0x1078> x00181078; (void)x00181078; gdcm::TagToType<0x0018,0x1079> x00181079; (void)x00181079; gdcm::TagToType<0x0018,0x1080> x00181080; (void)x00181080; gdcm::TagToType<0x0018,0x1081> x00181081; (void)x00181081; gdcm::TagToType<0x0018,0x1082> x00181082; (void)x00181082; gdcm::TagToType<0x0018,0x1083> x00181083; (void)x00181083; gdcm::TagToType<0x0018,0x1084> x00181084; (void)x00181084; gdcm::TagToType<0x0018,0x1085> x00181085; (void)x00181085; gdcm::TagToType<0x0018,0x1086> x00181086; (void)x00181086; gdcm::TagToType<0x0018,0x1088> x00181088; (void)x00181088; gdcm::TagToType<0x0018,0x1090> x00181090; (void)x00181090; gdcm::TagToType<0x0018,0x1094> x00181094; (void)x00181094; gdcm::TagToType<0x0018,0x1100> x00181100; (void)x00181100; gdcm::TagToType<0x0018,0x1110> x00181110; (void)x00181110; gdcm::TagToType<0x0018,0x1111> x00181111; (void)x00181111; gdcm::TagToType<0x0018,0x1114> x00181114; (void)x00181114; gdcm::TagToType<0x0018,0x1120> x00181120; (void)x00181120; gdcm::TagToType<0x0018,0x1121> x00181121; (void)x00181121; gdcm::TagToType<0x0018,0x1130> x00181130; (void)x00181130; gdcm::TagToType<0x0018,0x1131> x00181131; (void)x00181131; gdcm::TagToType<0x0018,0x1134> x00181134; (void)x00181134; gdcm::TagToType<0x0018,0x1135> x00181135; (void)x00181135; gdcm::TagToType<0x0018,0x1136> x00181136; (void)x00181136; gdcm::TagToType<0x0018,0x1137> x00181137; (void)x00181137; gdcm::TagToType<0x0018,0x1138> x00181138; (void)x00181138; gdcm::TagToType<0x0018,0x113a> x0018113a; (void)x0018113a; gdcm::TagToType<0x0018,0x1140> x00181140; (void)x00181140; gdcm::TagToType<0x0018,0x1141> x00181141; (void)x00181141; gdcm::TagToType<0x0018,0x1142> x00181142; (void)x00181142; gdcm::TagToType<0x0018,0x1143> x00181143; (void)x00181143; gdcm::TagToType<0x0018,0x1144> x00181144; (void)x00181144; gdcm::TagToType<0x0018,0x1145> x00181145; (void)x00181145; gdcm::TagToType<0x0018,0x1146> x00181146; (void)x00181146; gdcm::TagToType<0x0018,0x1147> x00181147; (void)x00181147; gdcm::TagToType<0x0018,0x1149> x00181149; (void)x00181149; gdcm::TagToType<0x0018,0x1150> x00181150; (void)x00181150; gdcm::TagToType<0x0018,0x1151> x00181151; (void)x00181151; gdcm::TagToType<0x0018,0x1152> x00181152; (void)x00181152; gdcm::TagToType<0x0018,0x1153> x00181153; (void)x00181153; gdcm::TagToType<0x0018,0x1154> x00181154; (void)x00181154; gdcm::TagToType<0x0018,0x1155> x00181155; (void)x00181155; gdcm::TagToType<0x0018,0x1156> x00181156; (void)x00181156; gdcm::TagToType<0x0018,0x115a> x0018115a; (void)x0018115a; gdcm::TagToType<0x0018,0x115e> x0018115e; (void)x0018115e; gdcm::TagToType<0x0018,0x1160> x00181160; (void)x00181160; gdcm::TagToType<0x0018,0x1161> x00181161; (void)x00181161; gdcm::TagToType<0x0018,0x1162> x00181162; (void)x00181162; gdcm::TagToType<0x0018,0x1164> x00181164; (void)x00181164; gdcm::TagToType<0x0018,0x1166> x00181166; (void)x00181166; gdcm::TagToType<0x0018,0x1170> x00181170; (void)x00181170; gdcm::TagToType<0x0018,0x1180> x00181180; (void)x00181180; gdcm::TagToType<0x0018,0x1181> x00181181; (void)x00181181; gdcm::TagToType<0x0018,0x1182> x00181182; (void)x00181182; gdcm::TagToType<0x0018,0x1183> x00181183; (void)x00181183; gdcm::TagToType<0x0018,0x1184> x00181184; (void)x00181184; gdcm::TagToType<0x0018,0x1190> x00181190; (void)x00181190; gdcm::TagToType<0x0018,0x1191> x00181191; (void)x00181191; gdcm::TagToType<0x0018,0x11a0> x001811a0; (void)x001811a0; gdcm::TagToType<0x0018,0x11a2> x001811a2; (void)x001811a2; gdcm::TagToType<0x0018,0x1200> x00181200; (void)x00181200; gdcm::TagToType<0x0018,0x1201> x00181201; (void)x00181201; gdcm::TagToType<0x0018,0x1210> x00181210; (void)x00181210; gdcm::TagToType<0x0018,0x1240> x00181240; (void)x00181240; gdcm::TagToType<0x0018,0x1242> x00181242; (void)x00181242; gdcm::TagToType<0x0018,0x1243> x00181243; (void)x00181243; gdcm::TagToType<0x0018,0x1244> x00181244; (void)x00181244; gdcm::TagToType<0x0018,0x1250> x00181250; (void)x00181250; gdcm::TagToType<0x0018,0x1251> x00181251; (void)x00181251; gdcm::TagToType<0x0018,0x1260> x00181260; (void)x00181260; gdcm::TagToType<0x0018,0x1261> x00181261; (void)x00181261; gdcm::TagToType<0x0018,0x1300> x00181300; (void)x00181300; gdcm::TagToType<0x0018,0x1301> x00181301; (void)x00181301; gdcm::TagToType<0x0018,0x1302> x00181302; (void)x00181302; gdcm::TagToType<0x0018,0x1310> x00181310; (void)x00181310; gdcm::TagToType<0x0018,0x1312> x00181312; (void)x00181312; gdcm::TagToType<0x0018,0x1314> x00181314; (void)x00181314; gdcm::TagToType<0x0018,0x1315> x00181315; (void)x00181315; gdcm::TagToType<0x0018,0x1316> x00181316; (void)x00181316; gdcm::TagToType<0x0018,0x1318> x00181318; (void)x00181318; gdcm::TagToType<0x0018,0x1400> x00181400; (void)x00181400; gdcm::TagToType<0x0018,0x1401> x00181401; (void)x00181401; gdcm::TagToType<0x0018,0x1402> x00181402; (void)x00181402; gdcm::TagToType<0x0018,0x1403> x00181403; (void)x00181403; gdcm::TagToType<0x0018,0x1404> x00181404; (void)x00181404; gdcm::TagToType<0x0018,0x1405> x00181405; (void)x00181405; gdcm::TagToType<0x0018,0x1450> x00181450; (void)x00181450; gdcm::TagToType<0x0018,0x1460> x00181460; (void)x00181460; gdcm::TagToType<0x0018,0x1470> x00181470; (void)x00181470; gdcm::TagToType<0x0018,0x1480> x00181480; (void)x00181480; gdcm::TagToType<0x0018,0x1490> x00181490; (void)x00181490; gdcm::TagToType<0x0018,0x1491> x00181491; (void)x00181491; gdcm::TagToType<0x0018,0x1495> x00181495; (void)x00181495; gdcm::TagToType<0x0018,0x1500> x00181500; (void)x00181500; gdcm::TagToType<0x0018,0x1508> x00181508; (void)x00181508; gdcm::TagToType<0x0018,0x1510> x00181510; (void)x00181510; gdcm::TagToType<0x0018,0x1511> x00181511; (void)x00181511; gdcm::TagToType<0x0018,0x1520> x00181520; (void)x00181520; gdcm::TagToType<0x0018,0x1521> x00181521; (void)x00181521; gdcm::TagToType<0x0018,0x1530> x00181530; (void)x00181530; gdcm::TagToType<0x0018,0x1531> x00181531; (void)x00181531; gdcm::TagToType<0x0018,0x1600> x00181600; (void)x00181600; gdcm::TagToType<0x0018,0x1602> x00181602; (void)x00181602; gdcm::TagToType<0x0018,0x1604> x00181604; (void)x00181604; gdcm::TagToType<0x0018,0x1606> x00181606; (void)x00181606; gdcm::TagToType<0x0018,0x1608> x00181608; (void)x00181608; gdcm::TagToType<0x0018,0x1610> x00181610; (void)x00181610; gdcm::TagToType<0x0018,0x1612> x00181612; (void)x00181612; gdcm::TagToType<0x0018,0x1620> x00181620; (void)x00181620; gdcm::TagToType<0x0018,0x1622> x00181622; (void)x00181622; gdcm::TagToType<0x0018,0x1623> x00181623; (void)x00181623; gdcm::TagToType<0x0018,0x1624> x00181624; (void)x00181624; gdcm::TagToType<0x0018,0x1700> x00181700; (void)x00181700; gdcm::TagToType<0x0018,0x1702> x00181702; (void)x00181702; gdcm::TagToType<0x0018,0x1704> x00181704; (void)x00181704; gdcm::TagToType<0x0018,0x1706> x00181706; (void)x00181706; gdcm::TagToType<0x0018,0x1708> x00181708; (void)x00181708; gdcm::TagToType<0x0018,0x1710> x00181710; (void)x00181710; gdcm::TagToType<0x0018,0x1712> x00181712; (void)x00181712; gdcm::TagToType<0x0018,0x1720> x00181720; (void)x00181720; gdcm::TagToType<0x0018,0x1800> x00181800; (void)x00181800; gdcm::TagToType<0x0018,0x1801> x00181801; (void)x00181801; gdcm::TagToType<0x0018,0x1802> x00181802; (void)x00181802; gdcm::TagToType<0x0018,0x1803> x00181803; (void)x00181803; gdcm::TagToType<0x0018,0x2001> x00182001; (void)x00182001; gdcm::TagToType<0x0018,0x2002> x00182002; (void)x00182002; gdcm::TagToType<0x0018,0x2003> x00182003; (void)x00182003; gdcm::TagToType<0x0018,0x2004> x00182004; (void)x00182004; gdcm::TagToType<0x0018,0x2005> x00182005; (void)x00182005; gdcm::TagToType<0x0018,0x2006> x00182006; (void)x00182006; gdcm::TagToType<0x0018,0x2010> x00182010; (void)x00182010; gdcm::TagToType<0x0018,0x2020> x00182020; (void)x00182020; gdcm::TagToType<0x0018,0x2030> x00182030; (void)x00182030; gdcm::TagToType<0x0018,0x3100> x00183100; (void)x00183100; gdcm::TagToType<0x0018,0x3101> x00183101; (void)x00183101; gdcm::TagToType<0x0018,0x3102> x00183102; (void)x00183102; gdcm::TagToType<0x0018,0x3103> x00183103; (void)x00183103; gdcm::TagToType<0x0018,0x3104> x00183104; (void)x00183104; gdcm::TagToType<0x0018,0x3105> x00183105; (void)x00183105; gdcm::TagToType<0x0018,0x4000> x00184000; (void)x00184000; gdcm::TagToType<0x0018,0x5000> x00185000; (void)x00185000; gdcm::TagToType<0x0018,0x5010> x00185010; (void)x00185010; gdcm::TagToType<0x0018,0x5012> x00185012; (void)x00185012; gdcm::TagToType<0x0018,0x5020> x00185020; (void)x00185020; gdcm::TagToType<0x0018,0x5021> x00185021; (void)x00185021; gdcm::TagToType<0x0018,0x5022> x00185022; (void)x00185022; gdcm::TagToType<0x0018,0x5024> x00185024; (void)x00185024; gdcm::TagToType<0x0018,0x5026> x00185026; (void)x00185026; gdcm::TagToType<0x0018,0x5027> x00185027; (void)x00185027; gdcm::TagToType<0x0018,0x5028> x00185028; (void)x00185028; gdcm::TagToType<0x0018,0x5029> x00185029; (void)x00185029; gdcm::TagToType<0x0018,0x5030> x00185030; (void)x00185030; gdcm::TagToType<0x0018,0x5040> x00185040; (void)x00185040; gdcm::TagToType<0x0018,0x5050> x00185050; (void)x00185050; gdcm::TagToType<0x0018,0x5100> x00185100; (void)x00185100; gdcm::TagToType<0x0018,0x5101> x00185101; (void)x00185101; gdcm::TagToType<0x0018,0x5104> x00185104; (void)x00185104; gdcm::TagToType<0x0018,0x5210> x00185210; (void)x00185210; gdcm::TagToType<0x0018,0x5212> x00185212; (void)x00185212; gdcm::TagToType<0x0018,0x6000> x00186000; (void)x00186000; gdcm::TagToType<0x0018,0x6011> x00186011; (void)x00186011; gdcm::TagToType<0x0018,0x6012> x00186012; (void)x00186012; gdcm::TagToType<0x0018,0x6014> x00186014; (void)x00186014; gdcm::TagToType<0x0018,0x6016> x00186016; (void)x00186016; gdcm::TagToType<0x0018,0x6018> x00186018; (void)x00186018; gdcm::TagToType<0x0018,0x601a> x0018601a; (void)x0018601a; gdcm::TagToType<0x0018,0x601c> x0018601c; (void)x0018601c; gdcm::TagToType<0x0018,0x601e> x0018601e; (void)x0018601e; gdcm::TagToType<0x0018,0x6020> x00186020; (void)x00186020; gdcm::TagToType<0x0018,0x6022> x00186022; (void)x00186022; gdcm::TagToType<0x0018,0x6024> x00186024; (void)x00186024; gdcm::TagToType<0x0018,0x6026> x00186026; (void)x00186026; gdcm::TagToType<0x0018,0x6028> x00186028; (void)x00186028; gdcm::TagToType<0x0018,0x602a> x0018602a; (void)x0018602a; gdcm::TagToType<0x0018,0x602c> x0018602c; (void)x0018602c; gdcm::TagToType<0x0018,0x602e> x0018602e; (void)x0018602e; gdcm::TagToType<0x0018,0x6030> x00186030; (void)x00186030; gdcm::TagToType<0x0018,0x6031> x00186031; (void)x00186031; gdcm::TagToType<0x0018,0x6032> x00186032; (void)x00186032; gdcm::TagToType<0x0018,0x6034> x00186034; (void)x00186034; gdcm::TagToType<0x0018,0x6036> x00186036; (void)x00186036; gdcm::TagToType<0x0018,0x6038> x00186038; (void)x00186038; gdcm::TagToType<0x0018,0x6039> x00186039; (void)x00186039; gdcm::TagToType<0x0018,0x603a> x0018603a; (void)x0018603a; gdcm::TagToType<0x0018,0x603b> x0018603b; (void)x0018603b; gdcm::TagToType<0x0018,0x603c> x0018603c; (void)x0018603c; gdcm::TagToType<0x0018,0x603d> x0018603d; (void)x0018603d; gdcm::TagToType<0x0018,0x603e> x0018603e; (void)x0018603e; gdcm::TagToType<0x0018,0x603f> x0018603f; (void)x0018603f; gdcm::TagToType<0x0018,0x6040> x00186040; (void)x00186040; gdcm::TagToType<0x0018,0x6041> x00186041; (void)x00186041; gdcm::TagToType<0x0018,0x6042> x00186042; (void)x00186042; gdcm::TagToType<0x0018,0x6043> x00186043; (void)x00186043; gdcm::TagToType<0x0018,0x6044> x00186044; (void)x00186044; gdcm::TagToType<0x0018,0x6046> x00186046; (void)x00186046; gdcm::TagToType<0x0018,0x6048> x00186048; (void)x00186048; gdcm::TagToType<0x0018,0x604a> x0018604a; (void)x0018604a; gdcm::TagToType<0x0018,0x604c> x0018604c; (void)x0018604c; gdcm::TagToType<0x0018,0x604e> x0018604e; (void)x0018604e; gdcm::TagToType<0x0018,0x6050> x00186050; (void)x00186050; gdcm::TagToType<0x0018,0x6052> x00186052; (void)x00186052; gdcm::TagToType<0x0018,0x6054> x00186054; (void)x00186054; gdcm::TagToType<0x0018,0x6056> x00186056; (void)x00186056; gdcm::TagToType<0x0018,0x6058> x00186058; (void)x00186058; gdcm::TagToType<0x0018,0x605a> x0018605a; (void)x0018605a; gdcm::TagToType<0x0018,0x6060> x00186060; (void)x00186060; gdcm::TagToType<0x0018,0x7000> x00187000; (void)x00187000; gdcm::TagToType<0x0018,0x7001> x00187001; (void)x00187001; gdcm::TagToType<0x0018,0x7004> x00187004; (void)x00187004; gdcm::TagToType<0x0018,0x7005> x00187005; (void)x00187005; gdcm::TagToType<0x0018,0x7006> x00187006; (void)x00187006; gdcm::TagToType<0x0018,0x7008> x00187008; (void)x00187008; gdcm::TagToType<0x0018,0x700a> x0018700a; (void)x0018700a; gdcm::TagToType<0x0018,0x700c> x0018700c; (void)x0018700c; gdcm::TagToType<0x0018,0x700e> x0018700e; (void)x0018700e; gdcm::TagToType<0x0018,0x7010> x00187010; (void)x00187010; gdcm::TagToType<0x0018,0x7011> x00187011; (void)x00187011; gdcm::TagToType<0x0018,0x7012> x00187012; (void)x00187012; gdcm::TagToType<0x0018,0x7014> x00187014; (void)x00187014; gdcm::TagToType<0x0018,0x7016> x00187016; (void)x00187016; gdcm::TagToType<0x0018,0x701a> x0018701a; (void)x0018701a; gdcm::TagToType<0x0018,0x7020> x00187020; (void)x00187020; gdcm::TagToType<0x0018,0x7022> x00187022; (void)x00187022; gdcm::TagToType<0x0018,0x7024> x00187024; (void)x00187024; gdcm::TagToType<0x0018,0x7026> x00187026; (void)x00187026; gdcm::TagToType<0x0018,0x7028> x00187028; (void)x00187028; gdcm::TagToType<0x0018,0x702a> x0018702a; (void)x0018702a; gdcm::TagToType<0x0018,0x702b> x0018702b; (void)x0018702b; gdcm::TagToType<0x0018,0x7030> x00187030; (void)x00187030; gdcm::TagToType<0x0018,0x7032> x00187032; (void)x00187032; gdcm::TagToType<0x0018,0x7034> x00187034; (void)x00187034; gdcm::TagToType<0x0018,0x7040> x00187040; (void)x00187040; gdcm::TagToType<0x0018,0x7041> x00187041; (void)x00187041; gdcm::TagToType<0x0018,0x7042> x00187042; (void)x00187042; gdcm::TagToType<0x0018,0x7044> x00187044; (void)x00187044; gdcm::TagToType<0x0018,0x7046> x00187046; (void)x00187046; gdcm::TagToType<0x0018,0x7048> x00187048; (void)x00187048; gdcm::TagToType<0x0018,0x704c> x0018704c; (void)x0018704c; gdcm::TagToType<0x0018,0x7050> x00187050; (void)x00187050; gdcm::TagToType<0x0018,0x7052> x00187052; (void)x00187052; gdcm::TagToType<0x0018,0x7054> x00187054; (void)x00187054; gdcm::TagToType<0x0018,0x7060> x00187060; (void)x00187060; gdcm::TagToType<0x0018,0x7062> x00187062; (void)x00187062; gdcm::TagToType<0x0018,0x7064> x00187064; (void)x00187064; gdcm::TagToType<0x0018,0x7065> x00187065; (void)x00187065; gdcm::TagToType<0x0018,0x8150> x00188150; (void)x00188150; gdcm::TagToType<0x0018,0x8151> x00188151; (void)x00188151; gdcm::TagToType<0x0018,0x9004> x00189004; (void)x00189004; gdcm::TagToType<0x0018,0x9005> x00189005; (void)x00189005; gdcm::TagToType<0x0018,0x9006> x00189006; (void)x00189006; gdcm::TagToType<0x0018,0x9008> x00189008; (void)x00189008; gdcm::TagToType<0x0018,0x9009> x00189009; (void)x00189009; gdcm::TagToType<0x0018,0x9010> x00189010; (void)x00189010; gdcm::TagToType<0x0018,0x9011> x00189011; (void)x00189011; gdcm::TagToType<0x0018,0x9012> x00189012; (void)x00189012; gdcm::TagToType<0x0018,0x9014> x00189014; (void)x00189014; gdcm::TagToType<0x0018,0x9015> x00189015; (void)x00189015; gdcm::TagToType<0x0018,0x9016> x00189016; (void)x00189016; gdcm::TagToType<0x0018,0x9017> x00189017; (void)x00189017; gdcm::TagToType<0x0018,0x9018> x00189018; (void)x00189018; gdcm::TagToType<0x0018,0x9019> x00189019; (void)x00189019; gdcm::TagToType<0x0018,0x9020> x00189020; (void)x00189020; gdcm::TagToType<0x0018,0x9021> x00189021; (void)x00189021; gdcm::TagToType<0x0018,0x9022> x00189022; (void)x00189022; gdcm::TagToType<0x0018,0x9024> x00189024; (void)x00189024; gdcm::TagToType<0x0018,0x9025> x00189025; (void)x00189025; gdcm::TagToType<0x0018,0x9026> x00189026; (void)x00189026; gdcm::TagToType<0x0018,0x9027> x00189027; (void)x00189027; gdcm::TagToType<0x0018,0x9028> x00189028; (void)x00189028; gdcm::TagToType<0x0018,0x9029> x00189029; (void)x00189029; gdcm::TagToType<0x0018,0x9030> x00189030; (void)x00189030; gdcm::TagToType<0x0018,0x9032> x00189032; (void)x00189032; gdcm::TagToType<0x0018,0x9033> x00189033; (void)x00189033; gdcm::TagToType<0x0018,0x9034> x00189034; (void)x00189034; gdcm::TagToType<0x0018,0x9035> x00189035; (void)x00189035; gdcm::TagToType<0x0018,0x9036> x00189036; (void)x00189036; gdcm::TagToType<0x0018,0x9037> x00189037; (void)x00189037; gdcm::TagToType<0x0018,0x9041> x00189041; (void)x00189041; gdcm::TagToType<0x0018,0x9042> x00189042; (void)x00189042; gdcm::TagToType<0x0018,0x9043> x00189043; (void)x00189043; gdcm::TagToType<0x0018,0x9044> x00189044; (void)x00189044; gdcm::TagToType<0x0018,0x9045> x00189045; (void)x00189045; gdcm::TagToType<0x0018,0x9046> x00189046; (void)x00189046; gdcm::TagToType<0x0018,0x9047> x00189047; (void)x00189047; gdcm::TagToType<0x0018,0x9048> x00189048; (void)x00189048; gdcm::TagToType<0x0018,0x9049> x00189049; (void)x00189049; gdcm::TagToType<0x0018,0x9050> x00189050; (void)x00189050; gdcm::TagToType<0x0018,0x9051> x00189051; (void)x00189051; gdcm::TagToType<0x0018,0x9052> x00189052; (void)x00189052; gdcm::TagToType<0x0018,0x9053> x00189053; (void)x00189053; gdcm::TagToType<0x0018,0x9054> x00189054; (void)x00189054; gdcm::TagToType<0x0018,0x9058> x00189058; (void)x00189058; gdcm::TagToType<0x0018,0x9059> x00189059; (void)x00189059; gdcm::TagToType<0x0018,0x9060> x00189060; (void)x00189060; gdcm::TagToType<0x0018,0x9061> x00189061; (void)x00189061; gdcm::TagToType<0x0018,0x9062> x00189062; (void)x00189062; gdcm::TagToType<0x0018,0x9063> x00189063; (void)x00189063; gdcm::TagToType<0x0018,0x9064> x00189064; (void)x00189064; gdcm::TagToType<0x0018,0x9065> x00189065; (void)x00189065; gdcm::TagToType<0x0018,0x9066> x00189066; (void)x00189066; gdcm::TagToType<0x0018,0x9067> x00189067; (void)x00189067; gdcm::TagToType<0x0018,0x9069> x00189069; (void)x00189069; gdcm::TagToType<0x0018,0x9070> x00189070; (void)x00189070; gdcm::TagToType<0x0018,0x9073> x00189073; (void)x00189073; gdcm::TagToType<0x0018,0x9074> x00189074; (void)x00189074; gdcm::TagToType<0x0018,0x9075> x00189075; (void)x00189075; gdcm::TagToType<0x0018,0x9076> x00189076; (void)x00189076; gdcm::TagToType<0x0018,0x9077> x00189077; (void)x00189077; gdcm::TagToType<0x0018,0x9078> x00189078; (void)x00189078; gdcm::TagToType<0x0018,0x9079> x00189079; (void)x00189079; gdcm::TagToType<0x0018,0x9080> x00189080; (void)x00189080; gdcm::TagToType<0x0018,0x9081> x00189081; (void)x00189081; gdcm::TagToType<0x0018,0x9082> x00189082; (void)x00189082; gdcm::TagToType<0x0018,0x9083> x00189083; (void)x00189083; gdcm::TagToType<0x0018,0x9084> x00189084; (void)x00189084; gdcm::TagToType<0x0018,0x9085> x00189085; (void)x00189085; gdcm::TagToType<0x0018,0x9087> x00189087; (void)x00189087; gdcm::TagToType<0x0018,0x9089> x00189089; (void)x00189089; gdcm::TagToType<0x0018,0x9090> x00189090; (void)x00189090; gdcm::TagToType<0x0018,0x9091> x00189091; (void)x00189091; gdcm::TagToType<0x0018,0x9093> x00189093; (void)x00189093; gdcm::TagToType<0x0018,0x9094> x00189094; (void)x00189094; gdcm::TagToType<0x0018,0x9095> x00189095; (void)x00189095; gdcm::TagToType<0x0018,0x9096> x00189096; (void)x00189096; gdcm::TagToType<0x0018,0x9098> x00189098; (void)x00189098; gdcm::TagToType<0x0018,0x9100> x00189100; (void)x00189100; gdcm::TagToType<0x0018,0x9101> x00189101; (void)x00189101; gdcm::TagToType<0x0018,0x9103> x00189103; (void)x00189103; gdcm::TagToType<0x0018,0x9104> x00189104; (void)x00189104; gdcm::TagToType<0x0018,0x9105> x00189105; (void)x00189105; gdcm::TagToType<0x0018,0x9106> x00189106; (void)x00189106; gdcm::TagToType<0x0018,0x9107> x00189107; (void)x00189107; gdcm::TagToType<0x0018,0x9112> x00189112; (void)x00189112; gdcm::TagToType<0x0018,0x9114> x00189114; (void)x00189114; gdcm::TagToType<0x0018,0x9115> x00189115; (void)x00189115; gdcm::TagToType<0x0018,0x9117> x00189117; (void)x00189117; gdcm::TagToType<0x0018,0x9118> x00189118; (void)x00189118; gdcm::TagToType<0x0018,0x9119> x00189119; (void)x00189119; gdcm::TagToType<0x0018,0x9125> x00189125; (void)x00189125; gdcm::TagToType<0x0018,0x9126> x00189126; (void)x00189126; gdcm::TagToType<0x0018,0x9127> x00189127; (void)x00189127; gdcm::TagToType<0x0018,0x9147> x00189147; (void)x00189147; gdcm::TagToType<0x0018,0x9151> x00189151; (void)x00189151; gdcm::TagToType<0x0018,0x9152> x00189152; (void)x00189152; gdcm::TagToType<0x0018,0x9155> x00189155; (void)x00189155; gdcm::TagToType<0x0018,0x9159> x00189159; (void)x00189159; gdcm::TagToType<0x0018,0x9166> x00189166; (void)x00189166; gdcm::TagToType<0x0018,0x9168> x00189168; (void)x00189168; gdcm::TagToType<0x0018,0x9169> x00189169; (void)x00189169; gdcm::TagToType<0x0018,0x9170> x00189170; (void)x00189170; gdcm::TagToType<0x0018,0x9171> x00189171; (void)x00189171; gdcm::TagToType<0x0018,0x9172> x00189172; (void)x00189172; gdcm::TagToType<0x0018,0x9173> x00189173; (void)x00189173; gdcm::TagToType<0x0018,0x9174> x00189174; (void)x00189174; gdcm::TagToType<0x0018,0x9175> x00189175; (void)x00189175; gdcm::TagToType<0x0018,0x9176> x00189176; (void)x00189176; gdcm::TagToType<0x0018,0x9177> x00189177; (void)x00189177; gdcm::TagToType<0x0018,0x9178> x00189178; (void)x00189178; gdcm::TagToType<0x0018,0x9179> x00189179; (void)x00189179; gdcm::TagToType<0x0018,0x9180> x00189180; (void)x00189180; gdcm::TagToType<0x0018,0x9181> x00189181; (void)x00189181; gdcm::TagToType<0x0018,0x9182> x00189182; (void)x00189182; gdcm::TagToType<0x0018,0x9183> x00189183; (void)x00189183; gdcm::TagToType<0x0018,0x9184> x00189184; (void)x00189184; gdcm::TagToType<0x0018,0x9185> x00189185; (void)x00189185; gdcm::TagToType<0x0018,0x9186> x00189186; (void)x00189186; gdcm::TagToType<0x0018,0x9195> x00189195; (void)x00189195; gdcm::TagToType<0x0018,0x9196> x00189196; (void)x00189196; gdcm::TagToType<0x0018,0x9197> x00189197; (void)x00189197; gdcm::TagToType<0x0018,0x9198> x00189198; (void)x00189198; gdcm::TagToType<0x0018,0x9199> x00189199; (void)x00189199; gdcm::TagToType<0x0018,0x9200> x00189200; (void)x00189200; gdcm::TagToType<0x0018,0x9214> x00189214; (void)x00189214; gdcm::TagToType<0x0018,0x9217> x00189217; (void)x00189217; gdcm::TagToType<0x0018,0x9218> x00189218; (void)x00189218; gdcm::TagToType<0x0018,0x9219> x00189219; (void)x00189219; gdcm::TagToType<0x0018,0x9220> x00189220; (void)x00189220; gdcm::TagToType<0x0018,0x9226> x00189226; (void)x00189226; gdcm::TagToType<0x0018,0x9227> x00189227; (void)x00189227; gdcm::TagToType<0x0018,0x9231> x00189231; (void)x00189231; gdcm::TagToType<0x0018,0x9232> x00189232; (void)x00189232; gdcm::TagToType<0x0018,0x9234> x00189234; (void)x00189234; gdcm::TagToType<0x0018,0x9236> x00189236; (void)x00189236; gdcm::TagToType<0x0018,0x9239> x00189239; (void)x00189239; gdcm::TagToType<0x0018,0x9240> x00189240; (void)x00189240; gdcm::TagToType<0x0018,0x9241> x00189241; (void)x00189241; gdcm::TagToType<0x0018,0x9295> x00189295; (void)x00189295; gdcm::TagToType<0x0018,0x9296> x00189296; (void)x00189296; gdcm::TagToType<0x0018,0x9301> x00189301; (void)x00189301; gdcm::TagToType<0x0018,0x9302> x00189302; (void)x00189302; gdcm::TagToType<0x0018,0x9303> x00189303; (void)x00189303; gdcm::TagToType<0x0018,0x9304> x00189304; (void)x00189304; gdcm::TagToType<0x0018,0x9305> x00189305; (void)x00189305; gdcm::TagToType<0x0018,0x9306> x00189306; (void)x00189306; gdcm::TagToType<0x0018,0x9307> x00189307; (void)x00189307; gdcm::TagToType<0x0018,0x9308> x00189308; (void)x00189308; gdcm::TagToType<0x0018,0x9309> x00189309; (void)x00189309; gdcm::TagToType<0x0018,0x9310> x00189310; (void)x00189310; gdcm::TagToType<0x0018,0x9311> x00189311; (void)x00189311; gdcm::TagToType<0x0018,0x9312> x00189312; (void)x00189312; gdcm::TagToType<0x0018,0x9313> x00189313; (void)x00189313; gdcm::TagToType<0x0018,0x9314> x00189314; (void)x00189314; gdcm::TagToType<0x0018,0x9315> x00189315; (void)x00189315; gdcm::TagToType<0x0018,0x9316> x00189316; (void)x00189316; gdcm::TagToType<0x0018,0x9317> x00189317; (void)x00189317; gdcm::TagToType<0x0018,0x9318> x00189318; (void)x00189318; gdcm::TagToType<0x0018,0x9319> x00189319; (void)x00189319; gdcm::TagToType<0x0018,0x9320> x00189320; (void)x00189320; gdcm::TagToType<0x0018,0x9321> x00189321; (void)x00189321; gdcm::TagToType<0x0018,0x9322> x00189322; (void)x00189322; gdcm::TagToType<0x0018,0x9323> x00189323; (void)x00189323; gdcm::TagToType<0x0018,0x9324> x00189324; (void)x00189324; gdcm::TagToType<0x0018,0x9325> x00189325; (void)x00189325; gdcm::TagToType<0x0018,0x9326> x00189326; (void)x00189326; gdcm::TagToType<0x0018,0x9327> x00189327; (void)x00189327; gdcm::TagToType<0x0018,0x9328> x00189328; (void)x00189328; gdcm::TagToType<0x0018,0x9329> x00189329; (void)x00189329; gdcm::TagToType<0x0018,0x9330> x00189330; (void)x00189330; gdcm::TagToType<0x0018,0x9332> x00189332; (void)x00189332; gdcm::TagToType<0x0018,0x9333> x00189333; (void)x00189333; gdcm::TagToType<0x0018,0x9334> x00189334; (void)x00189334; gdcm::TagToType<0x0018,0x9335> x00189335; (void)x00189335; gdcm::TagToType<0x0018,0x9337> x00189337; (void)x00189337; gdcm::TagToType<0x0018,0x9338> x00189338; (void)x00189338; gdcm::TagToType<0x0018,0x9340> x00189340; (void)x00189340; gdcm::TagToType<0x0018,0x9341> x00189341; (void)x00189341; gdcm::TagToType<0x0018,0x9342> x00189342; (void)x00189342; gdcm::TagToType<0x0018,0x9343> x00189343; (void)x00189343; gdcm::TagToType<0x0018,0x9344> x00189344; (void)x00189344; gdcm::TagToType<0x0018,0x9345> x00189345; (void)x00189345; gdcm::TagToType<0x0018,0x9346> x00189346; (void)x00189346; gdcm::TagToType<0x0018,0x9351> x00189351; (void)x00189351; gdcm::TagToType<0x0018,0x9352> x00189352; (void)x00189352; gdcm::TagToType<0x0018,0x9360> x00189360; (void)x00189360; gdcm::TagToType<0x0018,0x9401> x00189401; (void)x00189401; gdcm::TagToType<0x0018,0x9402> x00189402; (void)x00189402; gdcm::TagToType<0x0018,0x9403> x00189403; (void)x00189403; gdcm::TagToType<0x0018,0x9404> x00189404; (void)x00189404; gdcm::TagToType<0x0018,0x9405> x00189405; (void)x00189405; gdcm::TagToType<0x0018,0x9406> x00189406; (void)x00189406; gdcm::TagToType<0x0018,0x9407> x00189407; (void)x00189407; gdcm::TagToType<0x0018,0x9412> x00189412; (void)x00189412; gdcm::TagToType<0x0018,0x9417> x00189417; (void)x00189417; gdcm::TagToType<0x0018,0x9420> x00189420; (void)x00189420; gdcm::TagToType<0x0018,0x9423> x00189423; (void)x00189423; gdcm::TagToType<0x0018,0x9424> x00189424; (void)x00189424; gdcm::TagToType<0x0018,0x9425> x00189425; (void)x00189425; gdcm::TagToType<0x0018,0x9426> x00189426; (void)x00189426; gdcm::TagToType<0x0018,0x9427> x00189427; (void)x00189427; gdcm::TagToType<0x0018,0x9428> x00189428; (void)x00189428; gdcm::TagToType<0x0018,0x9429> x00189429; (void)x00189429; gdcm::TagToType<0x0018,0x9430> x00189430; (void)x00189430; gdcm::TagToType<0x0018,0x9432> x00189432; (void)x00189432; gdcm::TagToType<0x0018,0x9433> x00189433; (void)x00189433; gdcm::TagToType<0x0018,0x9434> x00189434; (void)x00189434; gdcm::TagToType<0x0018,0x9435> x00189435; (void)x00189435; gdcm::TagToType<0x0018,0x9436> x00189436; (void)x00189436; gdcm::TagToType<0x0018,0x9437> x00189437; (void)x00189437; gdcm::TagToType<0x0018,0x9438> x00189438; (void)x00189438; gdcm::TagToType<0x0018,0x9439> x00189439; (void)x00189439; gdcm::TagToType<0x0018,0x9440> x00189440; (void)x00189440; gdcm::TagToType<0x0018,0x9441> x00189441; (void)x00189441; gdcm::TagToType<0x0018,0x9442> x00189442; (void)x00189442; gdcm::TagToType<0x0018,0x9447> x00189447; (void)x00189447; gdcm::TagToType<0x0018,0x9449> x00189449; (void)x00189449; gdcm::TagToType<0x0018,0x9451> x00189451; (void)x00189451; gdcm::TagToType<0x0018,0x9452> x00189452; (void)x00189452; gdcm::TagToType<0x0018,0x9455> x00189455; (void)x00189455; gdcm::TagToType<0x0018,0x9456> x00189456; (void)x00189456; gdcm::TagToType<0x0018,0x9457> x00189457; (void)x00189457; gdcm::TagToType<0x0018,0x9461> x00189461; (void)x00189461; gdcm::TagToType<0x0018,0x9462> x00189462; (void)x00189462; gdcm::TagToType<0x0018,0x9463> x00189463; (void)x00189463; gdcm::TagToType<0x0018,0x9464> x00189464; (void)x00189464; gdcm::TagToType<0x0018,0x9465> x00189465; (void)x00189465; gdcm::TagToType<0x0018,0x9466> x00189466; (void)x00189466; gdcm::TagToType<0x0018,0x9467> x00189467; (void)x00189467; gdcm::TagToType<0x0018,0x9468> x00189468; (void)x00189468; gdcm::TagToType<0x0018,0x9469> x00189469; (void)x00189469; gdcm::TagToType<0x0018,0x9470> x00189470; (void)x00189470; gdcm::TagToType<0x0018,0x9471> x00189471; (void)x00189471; gdcm::TagToType<0x0018,0x9472> x00189472; (void)x00189472; gdcm::TagToType<0x0018,0x9473> x00189473; (void)x00189473; gdcm::TagToType<0x0018,0x9474> x00189474; (void)x00189474; gdcm::TagToType<0x0018,0x9476> x00189476; (void)x00189476; gdcm::TagToType<0x0018,0x9477> x00189477; (void)x00189477; gdcm::TagToType<0x0018,0x9504> x00189504; (void)x00189504; gdcm::TagToType<0x0018,0x9506> x00189506; (void)x00189506; gdcm::TagToType<0x0018,0x9507> x00189507; (void)x00189507; gdcm::TagToType<0x0018,0x9508> x00189508; (void)x00189508; gdcm::TagToType<0x0018,0x9509> x00189509; (void)x00189509; gdcm::TagToType<0x0018,0x9510> x00189510; (void)x00189510; gdcm::TagToType<0x0018,0x9511> x00189511; (void)x00189511; gdcm::TagToType<0x0018,0x9514> x00189514; (void)x00189514; gdcm::TagToType<0x0018,0x9515> x00189515; (void)x00189515; gdcm::TagToType<0x0018,0x9516> x00189516; (void)x00189516; gdcm::TagToType<0x0018,0x9517> x00189517; (void)x00189517; gdcm::TagToType<0x0018,0x9524> x00189524; (void)x00189524; gdcm::TagToType<0x0018,0x9525> x00189525; (void)x00189525; gdcm::TagToType<0x0018,0x9526> x00189526; (void)x00189526; gdcm::TagToType<0x0018,0x9527> x00189527; (void)x00189527; gdcm::TagToType<0x0018,0x9528> x00189528; (void)x00189528; gdcm::TagToType<0x0018,0x9530> x00189530; (void)x00189530; gdcm::TagToType<0x0018,0x9531> x00189531; (void)x00189531; gdcm::TagToType<0x0018,0x9538> x00189538; (void)x00189538; gdcm::TagToType<0x0018,0x9601> x00189601; (void)x00189601; gdcm::TagToType<0x0018,0x9602> x00189602; (void)x00189602; gdcm::TagToType<0x0018,0x9603> x00189603; (void)x00189603; gdcm::TagToType<0x0018,0x9604> x00189604; (void)x00189604; gdcm::TagToType<0x0018,0x9605> x00189605; (void)x00189605; gdcm::TagToType<0x0018,0x9606> x00189606; (void)x00189606; gdcm::TagToType<0x0018,0x9607> x00189607; (void)x00189607; gdcm::TagToType<0x0018,0xa001> x0018a001; (void)x0018a001; gdcm::TagToType<0x0018,0xa002> x0018a002; (void)x0018a002; gdcm::TagToType<0x0018,0xa003> x0018a003; (void)x0018a003; gdcm::TagToType<0x0020,0x000d> x0020000d; (void)x0020000d; gdcm::TagToType<0x0020,0x000e> x0020000e; (void)x0020000e; gdcm::TagToType<0x0020,0x0010> x00200010; (void)x00200010; gdcm::TagToType<0x0020,0x0011> x00200011; (void)x00200011; gdcm::TagToType<0x0020,0x0012> x00200012; (void)x00200012; gdcm::TagToType<0x0020,0x0013> x00200013; (void)x00200013; gdcm::TagToType<0x0020,0x0014> x00200014; (void)x00200014; gdcm::TagToType<0x0020,0x0015> x00200015; (void)x00200015; gdcm::TagToType<0x0020,0x0016> x00200016; (void)x00200016; gdcm::TagToType<0x0020,0x0017> x00200017; (void)x00200017; gdcm::TagToType<0x0020,0x0018> x00200018; (void)x00200018; gdcm::TagToType<0x0020,0x0019> x00200019; (void)x00200019; gdcm::TagToType<0x0020,0x0020> x00200020; (void)x00200020; gdcm::TagToType<0x0020,0x0022> x00200022; (void)x00200022; gdcm::TagToType<0x0020,0x0024> x00200024; (void)x00200024; gdcm::TagToType<0x0020,0x0026> x00200026; (void)x00200026; gdcm::TagToType<0x0020,0x0030> x00200030; (void)x00200030; gdcm::TagToType<0x0020,0x0032> x00200032; (void)x00200032; gdcm::TagToType<0x0020,0x0035> x00200035; (void)x00200035; gdcm::TagToType<0x0020,0x0037> x00200037; (void)x00200037; gdcm::TagToType<0x0020,0x0050> x00200050; (void)x00200050; gdcm::TagToType<0x0020,0x0052> x00200052; (void)x00200052; gdcm::TagToType<0x0020,0x0060> x00200060; (void)x00200060; gdcm::TagToType<0x0020,0x0062> x00200062; (void)x00200062; gdcm::TagToType<0x0020,0x0070> x00200070; (void)x00200070; gdcm::TagToType<0x0020,0x0080> x00200080; (void)x00200080; gdcm::TagToType<0x0020,0x0100> x00200100; (void)x00200100; gdcm::TagToType<0x0020,0x0105> x00200105; (void)x00200105; gdcm::TagToType<0x0020,0x0110> x00200110; (void)x00200110; gdcm::TagToType<0x0020,0x0200> x00200200; (void)x00200200; gdcm::TagToType<0x0020,0x1000> x00201000; (void)x00201000; gdcm::TagToType<0x0020,0x1001> x00201001; (void)x00201001; gdcm::TagToType<0x0020,0x1002> x00201002; (void)x00201002; gdcm::TagToType<0x0020,0x1003> x00201003; (void)x00201003; gdcm::TagToType<0x0020,0x1004> x00201004; (void)x00201004; gdcm::TagToType<0x0020,0x1005> x00201005; (void)x00201005; gdcm::TagToType<0x0020,0x1020> x00201020; (void)x00201020; gdcm::TagToType<0x0020,0x1040> x00201040; (void)x00201040; gdcm::TagToType<0x0020,0x1041> x00201041; (void)x00201041; gdcm::TagToType<0x0020,0x1070> x00201070; (void)x00201070; gdcm::TagToType<0x0020,0x1200> x00201200; (void)x00201200; gdcm::TagToType<0x0020,0x1202> x00201202; (void)x00201202; gdcm::TagToType<0x0020,0x1204> x00201204; (void)x00201204; gdcm::TagToType<0x0020,0x1206> x00201206; (void)x00201206; gdcm::TagToType<0x0020,0x1208> x00201208; (void)x00201208; gdcm::TagToType<0x0020,0x1209> x00201209; (void)x00201209; gdcm::TagToType<0x0020,0x3401> x00203401; (void)x00203401; gdcm::TagToType<0x0020,0x3402> x00203402; (void)x00203402; gdcm::TagToType<0x0020,0x3403> x00203403; (void)x00203403; gdcm::TagToType<0x0020,0x3404> x00203404; (void)x00203404; gdcm::TagToType<0x0020,0x3405> x00203405; (void)x00203405; gdcm::TagToType<0x0020,0x3406> x00203406; (void)x00203406; gdcm::TagToType<0x0020,0x4000> x00204000; (void)x00204000; gdcm::TagToType<0x0020,0x5000> x00205000; (void)x00205000; gdcm::TagToType<0x0020,0x5002> x00205002; (void)x00205002; gdcm::TagToType<0x0020,0x9056> x00209056; (void)x00209056; gdcm::TagToType<0x0020,0x9057> x00209057; (void)x00209057; gdcm::TagToType<0x0020,0x9071> x00209071; (void)x00209071; gdcm::TagToType<0x0020,0x9072> x00209072; (void)x00209072; gdcm::TagToType<0x0020,0x9111> x00209111; (void)x00209111; gdcm::TagToType<0x0020,0x9113> x00209113; (void)x00209113; gdcm::TagToType<0x0020,0x9116> x00209116; (void)x00209116; gdcm::TagToType<0x0020,0x9128> x00209128; (void)x00209128; gdcm::TagToType<0x0020,0x9153> x00209153; (void)x00209153; gdcm::TagToType<0x0020,0x9156> x00209156; (void)x00209156; gdcm::TagToType<0x0020,0x9157> x00209157; (void)x00209157; gdcm::TagToType<0x0020,0x9158> x00209158; (void)x00209158; gdcm::TagToType<0x0020,0x9161> x00209161; (void)x00209161; gdcm::TagToType<0x0020,0x9162> x00209162; (void)x00209162; gdcm::TagToType<0x0020,0x9163> x00209163; (void)x00209163; gdcm::TagToType<0x0020,0x9164> x00209164; (void)x00209164; gdcm::TagToType<0x0020,0x9165> x00209165; (void)x00209165; gdcm::TagToType<0x0020,0x9167> x00209167; (void)x00209167; gdcm::TagToType<0x0020,0x9213> x00209213; (void)x00209213; gdcm::TagToType<0x0020,0x9221> x00209221; (void)x00209221; gdcm::TagToType<0x0020,0x9222> x00209222; (void)x00209222; gdcm::TagToType<0x0020,0x9228> x00209228; (void)x00209228; gdcm::TagToType<0x0020,0x9238> x00209238; (void)x00209238; gdcm::TagToType<0x0020,0x9241> x00209241; (void)x00209241; gdcm::TagToType<0x0020,0x9245> x00209245; (void)x00209245; gdcm::TagToType<0x0020,0x9246> x00209246; (void)x00209246; gdcm::TagToType<0x0020,0x9247> x00209247; (void)x00209247; gdcm::TagToType<0x0020,0x9248> x00209248; (void)x00209248; gdcm::TagToType<0x0020,0x9249> x00209249; (void)x00209249; gdcm::TagToType<0x0020,0x9250> x00209250; (void)x00209250; gdcm::TagToType<0x0020,0x9251> x00209251; (void)x00209251; gdcm::TagToType<0x0020,0x9252> x00209252; (void)x00209252; gdcm::TagToType<0x0020,0x9253> x00209253; (void)x00209253; gdcm::TagToType<0x0020,0x9254> x00209254; (void)x00209254; gdcm::TagToType<0x0020,0x9255> x00209255; (void)x00209255; gdcm::TagToType<0x0020,0x9256> x00209256; (void)x00209256; gdcm::TagToType<0x0020,0x9257> x00209257; (void)x00209257; gdcm::TagToType<0x0020,0x9421> x00209421; (void)x00209421; gdcm::TagToType<0x0020,0x9450> x00209450; (void)x00209450; gdcm::TagToType<0x0020,0x9453> x00209453; (void)x00209453; gdcm::TagToType<0x0020,0x9518> x00209518; (void)x00209518; gdcm::TagToType<0x0020,0x9529> x00209529; (void)x00209529; gdcm::TagToType<0x0020,0x9536> x00209536; (void)x00209536; gdcm::TagToType<0x0022,0x0001> x00220001; (void)x00220001; gdcm::TagToType<0x0022,0x0002> x00220002; (void)x00220002; gdcm::TagToType<0x0022,0x0003> x00220003; (void)x00220003; gdcm::TagToType<0x0022,0x0004> x00220004; (void)x00220004; gdcm::TagToType<0x0022,0x0005> x00220005; (void)x00220005; gdcm::TagToType<0x0022,0x0006> x00220006; (void)x00220006; gdcm::TagToType<0x0022,0x0007> x00220007; (void)x00220007; gdcm::TagToType<0x0022,0x0008> x00220008; (void)x00220008; gdcm::TagToType<0x0022,0x0009> x00220009; (void)x00220009; gdcm::TagToType<0x0022,0x000a> x0022000a; (void)x0022000a; gdcm::TagToType<0x0022,0x000b> x0022000b; (void)x0022000b; gdcm::TagToType<0x0022,0x000c> x0022000c; (void)x0022000c; gdcm::TagToType<0x0022,0x000d> x0022000d; (void)x0022000d; gdcm::TagToType<0x0022,0x000e> x0022000e; (void)x0022000e; gdcm::TagToType<0x0022,0x0010> x00220010; (void)x00220010; gdcm::TagToType<0x0022,0x0011> x00220011; (void)x00220011; gdcm::TagToType<0x0022,0x0012> x00220012; (void)x00220012; gdcm::TagToType<0x0022,0x0013> x00220013; (void)x00220013; gdcm::TagToType<0x0022,0x0014> x00220014; (void)x00220014; gdcm::TagToType<0x0022,0x0015> x00220015; (void)x00220015; gdcm::TagToType<0x0022,0x0016> x00220016; (void)x00220016; gdcm::TagToType<0x0022,0x0017> x00220017; (void)x00220017; gdcm::TagToType<0x0022,0x0018> x00220018; (void)x00220018; gdcm::TagToType<0x0022,0x0019> x00220019; (void)x00220019; gdcm::TagToType<0x0022,0x001a> x0022001a; (void)x0022001a; gdcm::TagToType<0x0022,0x001b> x0022001b; (void)x0022001b; gdcm::TagToType<0x0022,0x001c> x0022001c; (void)x0022001c; gdcm::TagToType<0x0022,0x001d> x0022001d; (void)x0022001d; gdcm::TagToType<0x0022,0x0020> x00220020; (void)x00220020; gdcm::TagToType<0x0022,0x0021> x00220021; (void)x00220021; gdcm::TagToType<0x0022,0x0022> x00220022; (void)x00220022; gdcm::TagToType<0x0022,0x0030> x00220030; (void)x00220030; gdcm::TagToType<0x0022,0x0031> x00220031; (void)x00220031; gdcm::TagToType<0x0022,0x0032> x00220032; (void)x00220032; gdcm::TagToType<0x0022,0x0035> x00220035; (void)x00220035; gdcm::TagToType<0x0022,0x0036> x00220036; (void)x00220036; gdcm::TagToType<0x0022,0x0037> x00220037; (void)x00220037; gdcm::TagToType<0x0022,0x0038> x00220038; (void)x00220038; gdcm::TagToType<0x0022,0x0039> x00220039; (void)x00220039; gdcm::TagToType<0x0022,0x0041> x00220041; (void)x00220041; gdcm::TagToType<0x0022,0x0042> x00220042; (void)x00220042; gdcm::TagToType<0x0022,0x0048> x00220048; (void)x00220048; gdcm::TagToType<0x0022,0x0049> x00220049; (void)x00220049; gdcm::TagToType<0x0022,0x004e> x0022004e; (void)x0022004e; gdcm::TagToType<0x0022,0x0055> x00220055; (void)x00220055; gdcm::TagToType<0x0022,0x0056> x00220056; (void)x00220056; gdcm::TagToType<0x0022,0x0057> x00220057; (void)x00220057; gdcm::TagToType<0x0022,0x0058> x00220058; (void)x00220058; gdcm::TagToType<0x0028,0x0002> x00280002; (void)x00280002; gdcm::TagToType<0x0028,0x0003> x00280003; (void)x00280003; gdcm::TagToType<0x0028,0x0004> x00280004; (void)x00280004; gdcm::TagToType<0x0028,0x0005> x00280005; (void)x00280005; gdcm::TagToType<0x0028,0x0006> x00280006; (void)x00280006; gdcm::TagToType<0x0028,0x0008> x00280008; (void)x00280008; gdcm::TagToType<0x0028,0x0009> x00280009; (void)x00280009; gdcm::TagToType<0x0028,0x000a> x0028000a; (void)x0028000a; gdcm::TagToType<0x0028,0x0010> x00280010; (void)x00280010; gdcm::TagToType<0x0028,0x0011> x00280011; (void)x00280011; gdcm::TagToType<0x0028,0x0012> x00280012; (void)x00280012; gdcm::TagToType<0x0028,0x0014> x00280014; (void)x00280014; gdcm::TagToType<0x0028,0x0030> x00280030; (void)x00280030; gdcm::TagToType<0x0028,0x0031> x00280031; (void)x00280031; gdcm::TagToType<0x0028,0x0032> x00280032; (void)x00280032; gdcm::TagToType<0x0028,0x0034> x00280034; (void)x00280034; gdcm::TagToType<0x0028,0x0040> x00280040; (void)x00280040; gdcm::TagToType<0x0028,0x0050> x00280050; (void)x00280050; gdcm::TagToType<0x0028,0x0051> x00280051; (void)x00280051; gdcm::TagToType<0x0028,0x005f> x0028005f; (void)x0028005f; gdcm::TagToType<0x0028,0x0060> x00280060; (void)x00280060; gdcm::TagToType<0x0028,0x0061> x00280061; (void)x00280061; gdcm::TagToType<0x0028,0x0062> x00280062; (void)x00280062; gdcm::TagToType<0x0028,0x0063> x00280063; (void)x00280063; gdcm::TagToType<0x0028,0x0065> x00280065; (void)x00280065; gdcm::TagToType<0x0028,0x0066> x00280066; (void)x00280066; gdcm::TagToType<0x0028,0x0068> x00280068; (void)x00280068; gdcm::TagToType<0x0028,0x0069> x00280069; (void)x00280069; gdcm::TagToType<0x0028,0x0070> x00280070; (void)x00280070; gdcm::TagToType<0x0028,0x0080> x00280080; (void)x00280080; gdcm::TagToType<0x0028,0x0081> x00280081; (void)x00280081; gdcm::TagToType<0x0028,0x0082> x00280082; (void)x00280082; gdcm::TagToType<0x0028,0x0090> x00280090; (void)x00280090; gdcm::TagToType<0x0028,0x0091> x00280091; (void)x00280091; gdcm::TagToType<0x0028,0x0092> x00280092; (void)x00280092; gdcm::TagToType<0x0028,0x0093> x00280093; (void)x00280093; gdcm::TagToType<0x0028,0x0094> x00280094; (void)x00280094; gdcm::TagToType<0x0028,0x0100> x00280100; (void)x00280100; gdcm::TagToType<0x0028,0x0101> x00280101; (void)x00280101; gdcm::TagToType<0x0028,0x0102> x00280102; (void)x00280102; gdcm::TagToType<0x0028,0x0103> x00280103; (void)x00280103; gdcm::TagToType<0x0028,0x0200> x00280200; (void)x00280200; gdcm::TagToType<0x0028,0x0300> x00280300; (void)x00280300; gdcm::TagToType<0x0028,0x0301> x00280301; (void)x00280301; gdcm::TagToType<0x0028,0x0400> x00280400; (void)x00280400; gdcm::TagToType<0x0028,0x0401> x00280401; (void)x00280401; gdcm::TagToType<0x0028,0x0402> x00280402; (void)x00280402; gdcm::TagToType<0x0028,0x0403> x00280403; (void)x00280403; gdcm::TagToType<0x0028,0x0404> x00280404; (void)x00280404; gdcm::TagToType<0x0028,0x0700> x00280700; (void)x00280700; gdcm::TagToType<0x0028,0x0701> x00280701; (void)x00280701; gdcm::TagToType<0x0028,0x0702> x00280702; (void)x00280702; gdcm::TagToType<0x0028,0x0710> x00280710; (void)x00280710; gdcm::TagToType<0x0028,0x0720> x00280720; (void)x00280720; gdcm::TagToType<0x0028,0x0721> x00280721; (void)x00280721; gdcm::TagToType<0x0028,0x0722> x00280722; (void)x00280722; gdcm::TagToType<0x0028,0x0730> x00280730; (void)x00280730; gdcm::TagToType<0x0028,0x0740> x00280740; (void)x00280740; gdcm::TagToType<0x0028,0x0a02> x00280a02; (void)x00280a02; gdcm::TagToType<0x0028,0x0a04> x00280a04; (void)x00280a04; gdcm::TagToType<0x0028,0x1040> x00281040; (void)x00281040; gdcm::TagToType<0x0028,0x1041> x00281041; (void)x00281041; gdcm::TagToType<0x0028,0x1050> x00281050; (void)x00281050; gdcm::TagToType<0x0028,0x1051> x00281051; (void)x00281051; gdcm::TagToType<0x0028,0x1052> x00281052; (void)x00281052; gdcm::TagToType<0x0028,0x1053> x00281053; (void)x00281053; gdcm::TagToType<0x0028,0x1054> x00281054; (void)x00281054; gdcm::TagToType<0x0028,0x1055> x00281055; (void)x00281055; gdcm::TagToType<0x0028,0x1056> x00281056; (void)x00281056; gdcm::TagToType<0x0028,0x1080> x00281080; (void)x00281080; gdcm::TagToType<0x0028,0x1090> x00281090; (void)x00281090; gdcm::TagToType<0x0028,0x1199> x00281199; (void)x00281199; gdcm::TagToType<0x0028,0x1201> x00281201; (void)x00281201; gdcm::TagToType<0x0028,0x1202> x00281202; (void)x00281202; gdcm::TagToType<0x0028,0x1203> x00281203; (void)x00281203; gdcm::TagToType<0x0028,0x1211> x00281211; (void)x00281211; gdcm::TagToType<0x0028,0x1212> x00281212; (void)x00281212; gdcm::TagToType<0x0028,0x1213> x00281213; (void)x00281213; gdcm::TagToType<0x0028,0x1214> x00281214; (void)x00281214; gdcm::TagToType<0x0028,0x1221> x00281221; (void)x00281221; gdcm::TagToType<0x0028,0x1222> x00281222; (void)x00281222; gdcm::TagToType<0x0028,0x1223> x00281223; (void)x00281223; gdcm::TagToType<0x0028,0x1300> x00281300; (void)x00281300; gdcm::TagToType<0x0028,0x1350> x00281350; (void)x00281350; gdcm::TagToType<0x0028,0x1351> x00281351; (void)x00281351; gdcm::TagToType<0x0028,0x1352> x00281352; (void)x00281352; gdcm::TagToType<0x0028,0x135a> x0028135a; (void)x0028135a; gdcm::TagToType<0x0028,0x2000> x00282000; (void)x00282000; gdcm::TagToType<0x0028,0x2110> x00282110; (void)x00282110; gdcm::TagToType<0x0028,0x2112> x00282112; (void)x00282112; gdcm::TagToType<0x0028,0x2114> x00282114; (void)x00282114; gdcm::TagToType<0x0028,0x3000> x00283000; (void)x00283000; gdcm::TagToType<0x0028,0x3003> x00283003; (void)x00283003; gdcm::TagToType<0x0028,0x3004> x00283004; (void)x00283004; gdcm::TagToType<0x0028,0x3010> x00283010; (void)x00283010; gdcm::TagToType<0x0028,0x3110> x00283110; (void)x00283110; gdcm::TagToType<0x0028,0x4000> x00284000; (void)x00284000; gdcm::TagToType<0x0028,0x5000> x00285000; (void)x00285000; gdcm::TagToType<0x0028,0x6010> x00286010; (void)x00286010; gdcm::TagToType<0x0028,0x6020> x00286020; (void)x00286020; gdcm::TagToType<0x0028,0x6022> x00286022; (void)x00286022; gdcm::TagToType<0x0028,0x6023> x00286023; (void)x00286023; gdcm::TagToType<0x0028,0x6030> x00286030; (void)x00286030; gdcm::TagToType<0x0028,0x6040> x00286040; (void)x00286040; gdcm::TagToType<0x0028,0x6100> x00286100; (void)x00286100; gdcm::TagToType<0x0028,0x6101> x00286101; (void)x00286101; gdcm::TagToType<0x0028,0x6102> x00286102; (void)x00286102; gdcm::TagToType<0x0028,0x6110> x00286110; (void)x00286110; gdcm::TagToType<0x0028,0x6112> x00286112; (void)x00286112; gdcm::TagToType<0x0028,0x6114> x00286114; (void)x00286114; gdcm::TagToType<0x0028,0x6120> x00286120; (void)x00286120; gdcm::TagToType<0x0028,0x6190> x00286190; (void)x00286190; gdcm::TagToType<0x0028,0x7fe0> x00287fe0; (void)x00287fe0; gdcm::TagToType<0x0028,0x9001> x00289001; (void)x00289001; gdcm::TagToType<0x0028,0x9002> x00289002; (void)x00289002; gdcm::TagToType<0x0028,0x9003> x00289003; (void)x00289003; gdcm::TagToType<0x0028,0x9099> x00289099; (void)x00289099; gdcm::TagToType<0x0028,0x9108> x00289108; (void)x00289108; gdcm::TagToType<0x0028,0x9110> x00289110; (void)x00289110; gdcm::TagToType<0x0028,0x9132> x00289132; (void)x00289132; gdcm::TagToType<0x0028,0x9145> x00289145; (void)x00289145; gdcm::TagToType<0x0028,0x9235> x00289235; (void)x00289235; gdcm::TagToType<0x0028,0x9411> x00289411; (void)x00289411; gdcm::TagToType<0x0028,0x9415> x00289415; (void)x00289415; gdcm::TagToType<0x0028,0x9416> x00289416; (void)x00289416; gdcm::TagToType<0x0028,0x9422> x00289422; (void)x00289422; gdcm::TagToType<0x0028,0x9443> x00289443; (void)x00289443; gdcm::TagToType<0x0028,0x9444> x00289444; (void)x00289444; gdcm::TagToType<0x0028,0x9445> x00289445; (void)x00289445; gdcm::TagToType<0x0028,0x9446> x00289446; (void)x00289446; gdcm::TagToType<0x0028,0x9454> x00289454; (void)x00289454; gdcm::TagToType<0x0028,0x9474> x00289474; (void)x00289474; gdcm::TagToType<0x0028,0x9520> x00289520; (void)x00289520; gdcm::TagToType<0x0028,0x9537> x00289537; (void)x00289537; gdcm::TagToType<0x0032,0x000a> x0032000a; (void)x0032000a; gdcm::TagToType<0x0032,0x000c> x0032000c; (void)x0032000c; gdcm::TagToType<0x0032,0x0012> x00320012; (void)x00320012; gdcm::TagToType<0x0032,0x0032> x00320032; (void)x00320032; gdcm::TagToType<0x0032,0x0033> x00320033; (void)x00320033; gdcm::TagToType<0x0032,0x0034> x00320034; (void)x00320034; gdcm::TagToType<0x0032,0x0035> x00320035; (void)x00320035; gdcm::TagToType<0x0032,0x1000> x00321000; (void)x00321000; gdcm::TagToType<0x0032,0x1001> x00321001; (void)x00321001; gdcm::TagToType<0x0032,0x1010> x00321010; (void)x00321010; gdcm::TagToType<0x0032,0x1011> x00321011; (void)x00321011; gdcm::TagToType<0x0032,0x1020> x00321020; (void)x00321020; gdcm::TagToType<0x0032,0x1021> x00321021; (void)x00321021; gdcm::TagToType<0x0032,0x1030> x00321030; (void)x00321030; gdcm::TagToType<0x0032,0x1031> x00321031; (void)x00321031; gdcm::TagToType<0x0032,0x1032> x00321032; (void)x00321032; gdcm::TagToType<0x0032,0x1033> x00321033; (void)x00321033; gdcm::TagToType<0x0032,0x1040> x00321040; (void)x00321040; gdcm::TagToType<0x0032,0x1041> x00321041; (void)x00321041; gdcm::TagToType<0x0032,0x1050> x00321050; (void)x00321050; gdcm::TagToType<0x0032,0x1051> x00321051; (void)x00321051; gdcm::TagToType<0x0032,0x1055> x00321055; (void)x00321055; gdcm::TagToType<0x0032,0x1060> x00321060; (void)x00321060; gdcm::TagToType<0x0032,0x1064> x00321064; (void)x00321064; gdcm::TagToType<0x0032,0x1070> x00321070; (void)x00321070; gdcm::TagToType<0x0032,0x4000> x00324000; (void)x00324000; gdcm::TagToType<0x0038,0x0004> x00380004; (void)x00380004; gdcm::TagToType<0x0038,0x0008> x00380008; (void)x00380008; gdcm::TagToType<0x0038,0x0010> x00380010; (void)x00380010; gdcm::TagToType<0x0038,0x0011> x00380011; (void)x00380011; gdcm::TagToType<0x0038,0x0016> x00380016; (void)x00380016; gdcm::TagToType<0x0038,0x001a> x0038001a; (void)x0038001a; gdcm::TagToType<0x0038,0x001b> x0038001b; (void)x0038001b; gdcm::TagToType<0x0038,0x001c> x0038001c; (void)x0038001c; gdcm::TagToType<0x0038,0x001d> x0038001d; (void)x0038001d; gdcm::TagToType<0x0038,0x001e> x0038001e; (void)x0038001e; gdcm::TagToType<0x0038,0x0020> x00380020; (void)x00380020; gdcm::TagToType<0x0038,0x0021> x00380021; (void)x00380021; gdcm::TagToType<0x0038,0x0030> x00380030; (void)x00380030; gdcm::TagToType<0x0038,0x0032> x00380032; (void)x00380032; gdcm::TagToType<0x0038,0x0040> x00380040; (void)x00380040; gdcm::TagToType<0x0038,0x0044> x00380044; (void)x00380044; gdcm::TagToType<0x0038,0x0050> x00380050; (void)x00380050; gdcm::TagToType<0x0038,0x0060> x00380060; (void)x00380060; gdcm::TagToType<0x0038,0x0061> x00380061; (void)x00380061; gdcm::TagToType<0x0038,0x0062> x00380062; (void)x00380062; gdcm::TagToType<0x0038,0x0100> x00380100; (void)x00380100; gdcm::TagToType<0x0038,0x0300> x00380300; (void)x00380300; gdcm::TagToType<0x0038,0x0400> x00380400; (void)x00380400; gdcm::TagToType<0x0038,0x0500> x00380500; (void)x00380500; gdcm::TagToType<0x0038,0x0502> x00380502; (void)x00380502; gdcm::TagToType<0x0038,0x4000> x00384000; (void)x00384000; gdcm::TagToType<0x003a,0x0004> x003a0004; (void)x003a0004; gdcm::TagToType<0x003a,0x0005> x003a0005; (void)x003a0005; gdcm::TagToType<0x003a,0x0010> x003a0010; (void)x003a0010; gdcm::TagToType<0x003a,0x001a> x003a001a; (void)x003a001a; gdcm::TagToType<0x003a,0x0020> x003a0020; (void)x003a0020; gdcm::TagToType<0x003a,0x0200> x003a0200; (void)x003a0200; gdcm::TagToType<0x003a,0x0202> x003a0202; (void)x003a0202; gdcm::TagToType<0x003a,0x0203> x003a0203; (void)x003a0203; gdcm::TagToType<0x003a,0x0205> x003a0205; (void)x003a0205; gdcm::TagToType<0x003a,0x0208> x003a0208; (void)x003a0208; gdcm::TagToType<0x003a,0x0209> x003a0209; (void)x003a0209; gdcm::TagToType<0x003a,0x020a> x003a020a; (void)x003a020a; gdcm::TagToType<0x003a,0x020c> x003a020c; (void)x003a020c; gdcm::TagToType<0x003a,0x0210> x003a0210; (void)x003a0210; gdcm::TagToType<0x003a,0x0211> x003a0211; (void)x003a0211; gdcm::TagToType<0x003a,0x0212> x003a0212; (void)x003a0212; gdcm::TagToType<0x003a,0x0213> x003a0213; (void)x003a0213; gdcm::TagToType<0x003a,0x0214> x003a0214; (void)x003a0214; gdcm::TagToType<0x003a,0x0215> x003a0215; (void)x003a0215; gdcm::TagToType<0x003a,0x0218> x003a0218; (void)x003a0218; gdcm::TagToType<0x003a,0x021a> x003a021a; (void)x003a021a; gdcm::TagToType<0x003a,0x0220> x003a0220; (void)x003a0220; gdcm::TagToType<0x003a,0x0221> x003a0221; (void)x003a0221; gdcm::TagToType<0x003a,0x0222> x003a0222; (void)x003a0222; gdcm::TagToType<0x003a,0x0223> x003a0223; (void)x003a0223; gdcm::TagToType<0x003a,0x0230> x003a0230; (void)x003a0230; gdcm::TagToType<0x003a,0x0231> x003a0231; (void)x003a0231; gdcm::TagToType<0x003a,0x0240> x003a0240; (void)x003a0240; gdcm::TagToType<0x003a,0x0241> x003a0241; (void)x003a0241; gdcm::TagToType<0x003a,0x0242> x003a0242; (void)x003a0242; gdcm::TagToType<0x003a,0x0244> x003a0244; (void)x003a0244; gdcm::TagToType<0x003a,0x0245> x003a0245; (void)x003a0245; gdcm::TagToType<0x003a,0x0246> x003a0246; (void)x003a0246; gdcm::TagToType<0x003a,0x0247> x003a0247; (void)x003a0247; gdcm::TagToType<0x003a,0x0248> x003a0248; (void)x003a0248; gdcm::TagToType<0x003a,0x0300> x003a0300; (void)x003a0300; gdcm::TagToType<0x003a,0x0301> x003a0301; (void)x003a0301; gdcm::TagToType<0x003a,0x0302> x003a0302; (void)x003a0302; gdcm::TagToType<0x0040,0x0001> x00400001; (void)x00400001; gdcm::TagToType<0x0040,0x0002> x00400002; (void)x00400002; gdcm::TagToType<0x0040,0x0003> x00400003; (void)x00400003; gdcm::TagToType<0x0040,0x0004> x00400004; (void)x00400004; gdcm::TagToType<0x0040,0x0005> x00400005; (void)x00400005; gdcm::TagToType<0x0040,0x0006> x00400006; (void)x00400006; gdcm::TagToType<0x0040,0x0007> x00400007; (void)x00400007; gdcm::TagToType<0x0040,0x0008> x00400008; (void)x00400008; gdcm::TagToType<0x0040,0x0009> x00400009; (void)x00400009; gdcm::TagToType<0x0040,0x000a> x0040000a; (void)x0040000a; gdcm::TagToType<0x0040,0x000b> x0040000b; (void)x0040000b; gdcm::TagToType<0x0040,0x0010> x00400010; (void)x00400010; gdcm::TagToType<0x0040,0x0011> x00400011; (void)x00400011; gdcm::TagToType<0x0040,0x0012> x00400012; (void)x00400012; gdcm::TagToType<0x0040,0x0020> x00400020; (void)x00400020; gdcm::TagToType<0x0040,0x0100> x00400100; (void)x00400100; gdcm::TagToType<0x0040,0x0220> x00400220; (void)x00400220; gdcm::TagToType<0x0040,0x0241> x00400241; (void)x00400241; gdcm::TagToType<0x0040,0x0242> x00400242; (void)x00400242; gdcm::TagToType<0x0040,0x0243> x00400243; (void)x00400243; gdcm::TagToType<0x0040,0x0244> x00400244; (void)x00400244; gdcm::TagToType<0x0040,0x0245> x00400245; (void)x00400245; gdcm::TagToType<0x0040,0x0250> x00400250; (void)x00400250; gdcm::TagToType<0x0040,0x0251> x00400251; (void)x00400251; gdcm::TagToType<0x0040,0x0252> x00400252; (void)x00400252; gdcm::TagToType<0x0040,0x0253> x00400253; (void)x00400253; gdcm::TagToType<0x0040,0x0254> x00400254; (void)x00400254; gdcm::TagToType<0x0040,0x0255> x00400255; (void)x00400255; gdcm::TagToType<0x0040,0x0260> x00400260; (void)x00400260; gdcm::TagToType<0x0040,0x0270> x00400270; (void)x00400270; gdcm::TagToType<0x0040,0x0275> x00400275; (void)x00400275; gdcm::TagToType<0x0040,0x0280> x00400280; (void)x00400280; gdcm::TagToType<0x0040,0x0281> x00400281; (void)x00400281; gdcm::TagToType<0x0040,0x0293> x00400293; (void)x00400293; gdcm::TagToType<0x0040,0x0294> x00400294; (void)x00400294; gdcm::TagToType<0x0040,0x0295> x00400295; (void)x00400295; gdcm::TagToType<0x0040,0x0296> x00400296; (void)x00400296; gdcm::TagToType<0x0040,0x0300> x00400300; (void)x00400300; gdcm::TagToType<0x0040,0x0301> x00400301; (void)x00400301; gdcm::TagToType<0x0040,0x0302> x00400302; (void)x00400302; gdcm::TagToType<0x0040,0x0303> x00400303; (void)x00400303; gdcm::TagToType<0x0040,0x0306> x00400306; (void)x00400306; gdcm::TagToType<0x0040,0x0307> x00400307; (void)x00400307; gdcm::TagToType<0x0040,0x030e> x0040030e; (void)x0040030e; gdcm::TagToType<0x0040,0x0310> x00400310; (void)x00400310; gdcm::TagToType<0x0040,0x0312> x00400312; (void)x00400312; gdcm::TagToType<0x0040,0x0314> x00400314; (void)x00400314; gdcm::TagToType<0x0040,0x0316> x00400316; (void)x00400316; gdcm::TagToType<0x0040,0x0318> x00400318; (void)x00400318; gdcm::TagToType<0x0040,0x0320> x00400320; (void)x00400320; gdcm::TagToType<0x0040,0x0321> x00400321; (void)x00400321; gdcm::TagToType<0x0040,0x0324> x00400324; (void)x00400324; gdcm::TagToType<0x0040,0x0330> x00400330; (void)x00400330; gdcm::TagToType<0x0040,0x0340> x00400340; (void)x00400340; gdcm::TagToType<0x0040,0x0400> x00400400; (void)x00400400; gdcm::TagToType<0x0040,0x0440> x00400440; (void)x00400440; gdcm::TagToType<0x0040,0x0441> x00400441; (void)x00400441; gdcm::TagToType<0x0040,0x050a> x0040050a; (void)x0040050a; gdcm::TagToType<0x0040,0x0550> x00400550; (void)x00400550; gdcm::TagToType<0x0040,0x0551> x00400551; (void)x00400551; gdcm::TagToType<0x0040,0x0552> x00400552; (void)x00400552; gdcm::TagToType<0x0040,0x0553> x00400553; (void)x00400553; gdcm::TagToType<0x0040,0x0555> x00400555; (void)x00400555; gdcm::TagToType<0x0040,0x0556> x00400556; (void)x00400556; gdcm::TagToType<0x0040,0x059a> x0040059a; (void)x0040059a; gdcm::TagToType<0x0040,0x06fa> x004006fa; (void)x004006fa; gdcm::TagToType<0x0040,0x071a> x0040071a; (void)x0040071a; gdcm::TagToType<0x0040,0x072a> x0040072a; (void)x0040072a; gdcm::TagToType<0x0040,0x073a> x0040073a; (void)x0040073a; gdcm::TagToType<0x0040,0x074a> x0040074a; (void)x0040074a; gdcm::TagToType<0x0040,0x08d8> x004008d8; (void)x004008d8; gdcm::TagToType<0x0040,0x08da> x004008da; (void)x004008da; gdcm::TagToType<0x0040,0x08ea> x004008ea; (void)x004008ea; gdcm::TagToType<0x0040,0x09f8> x004009f8; (void)x004009f8; gdcm::TagToType<0x0040,0x1001> x00401001; (void)x00401001; gdcm::TagToType<0x0040,0x1002> x00401002; (void)x00401002; gdcm::TagToType<0x0040,0x1003> x00401003; (void)x00401003; gdcm::TagToType<0x0040,0x1004> x00401004; (void)x00401004; gdcm::TagToType<0x0040,0x1005> x00401005; (void)x00401005; gdcm::TagToType<0x0040,0x1006> x00401006; (void)x00401006; gdcm::TagToType<0x0040,0x1007> x00401007; (void)x00401007; gdcm::TagToType<0x0040,0x1008> x00401008; (void)x00401008; gdcm::TagToType<0x0040,0x1009> x00401009; (void)x00401009; gdcm::TagToType<0x0040,0x100a> x0040100a; (void)x0040100a; gdcm::TagToType<0x0040,0x1010> x00401010; (void)x00401010; gdcm::TagToType<0x0040,0x1011> x00401011; (void)x00401011; gdcm::TagToType<0x0040,0x1101> x00401101; (void)x00401101; gdcm::TagToType<0x0040,0x1102> x00401102; (void)x00401102; gdcm::TagToType<0x0040,0x1103> x00401103; (void)x00401103; gdcm::TagToType<0x0040,0x1400> x00401400; (void)x00401400; gdcm::TagToType<0x0040,0x2001> x00402001; (void)x00402001; gdcm::TagToType<0x0040,0x2004> x00402004; (void)x00402004; gdcm::TagToType<0x0040,0x2005> x00402005; (void)x00402005; gdcm::TagToType<0x0040,0x2006> x00402006; (void)x00402006; gdcm::TagToType<0x0040,0x2007> x00402007; (void)x00402007; gdcm::TagToType<0x0040,0x2008> x00402008; (void)x00402008; gdcm::TagToType<0x0040,0x2009> x00402009; (void)x00402009; gdcm::TagToType<0x0040,0x2010> x00402010; (void)x00402010; gdcm::TagToType<0x0040,0x2016> x00402016; (void)x00402016; gdcm::TagToType<0x0040,0x2017> x00402017; (void)x00402017; gdcm::TagToType<0x0040,0x2400> x00402400; (void)x00402400; gdcm::TagToType<0x0040,0x3001> x00403001; (void)x00403001; gdcm::TagToType<0x0040,0x4001> x00404001; (void)x00404001; gdcm::TagToType<0x0040,0x4002> x00404002; (void)x00404002; gdcm::TagToType<0x0040,0x4003> x00404003; (void)x00404003; gdcm::TagToType<0x0040,0x4004> x00404004; (void)x00404004; gdcm::TagToType<0x0040,0x4005> x00404005; (void)x00404005; gdcm::TagToType<0x0040,0x4006> x00404006; (void)x00404006; gdcm::TagToType<0x0040,0x4007> x00404007; (void)x00404007; gdcm::TagToType<0x0040,0x4009> x00404009; (void)x00404009; gdcm::TagToType<0x0040,0x4010> x00404010; (void)x00404010; gdcm::TagToType<0x0040,0x4011> x00404011; (void)x00404011; gdcm::TagToType<0x0040,0x4015> x00404015; (void)x00404015; gdcm::TagToType<0x0040,0x4016> x00404016; (void)x00404016; gdcm::TagToType<0x0040,0x4018> x00404018; (void)x00404018; gdcm::TagToType<0x0040,0x4019> x00404019; (void)x00404019; gdcm::TagToType<0x0040,0x4020> x00404020; (void)x00404020; gdcm::TagToType<0x0040,0x4021> x00404021; (void)x00404021; gdcm::TagToType<0x0040,0x4022> x00404022; (void)x00404022; gdcm::TagToType<0x0040,0x4023> x00404023; (void)x00404023; gdcm::TagToType<0x0040,0x4025> x00404025; (void)x00404025; gdcm::TagToType<0x0040,0x4026> x00404026; (void)x00404026; gdcm::TagToType<0x0040,0x4027> x00404027; (void)x00404027; gdcm::TagToType<0x0040,0x4028> x00404028; (void)x00404028; gdcm::TagToType<0x0040,0x4029> x00404029; (void)x00404029; gdcm::TagToType<0x0040,0x4030> x00404030; (void)x00404030; gdcm::TagToType<0x0040,0x4031> x00404031; (void)x00404031; gdcm::TagToType<0x0040,0x4032> x00404032; (void)x00404032; gdcm::TagToType<0x0040,0x4033> x00404033; (void)x00404033; gdcm::TagToType<0x0040,0x4034> x00404034; (void)x00404034; gdcm::TagToType<0x0040,0x4035> x00404035; (void)x00404035; gdcm::TagToType<0x0040,0x4036> x00404036; (void)x00404036; gdcm::TagToType<0x0040,0x4037> x00404037; (void)x00404037; gdcm::TagToType<0x0040,0x8302> x00408302; (void)x00408302; gdcm::TagToType<0x0040,0x9094> x00409094; (void)x00409094; gdcm::TagToType<0x0040,0x9096> x00409096; (void)x00409096; gdcm::TagToType<0x0040,0x9098> x00409098; (void)x00409098; gdcm::TagToType<0x0040,0x9210> x00409210; (void)x00409210; gdcm::TagToType<0x0040,0x9212> x00409212; (void)x00409212; gdcm::TagToType<0x0040,0x9224> x00409224; (void)x00409224; gdcm::TagToType<0x0040,0x9225> x00409225; (void)x00409225; gdcm::TagToType<0x0040,0xa010> x0040a010; (void)x0040a010; gdcm::TagToType<0x0040,0xa027> x0040a027; (void)x0040a027; gdcm::TagToType<0x0040,0xa030> x0040a030; (void)x0040a030; gdcm::TagToType<0x0040,0xa032> x0040a032; (void)x0040a032; gdcm::TagToType<0x0040,0xa040> x0040a040; (void)x0040a040; gdcm::TagToType<0x0040,0xa043> x0040a043; (void)x0040a043; gdcm::TagToType<0x0040,0xa050> x0040a050; (void)x0040a050; gdcm::TagToType<0x0040,0xa073> x0040a073; (void)x0040a073; gdcm::TagToType<0x0040,0xa075> x0040a075; (void)x0040a075; gdcm::TagToType<0x0040,0xa078> x0040a078; (void)x0040a078; gdcm::TagToType<0x0040,0xa07a> x0040a07a; (void)x0040a07a; gdcm::TagToType<0x0040,0xa07c> x0040a07c; (void)x0040a07c; gdcm::TagToType<0x0040,0xa080> x0040a080; (void)x0040a080; gdcm::TagToType<0x0040,0xa082> x0040a082; (void)x0040a082; gdcm::TagToType<0x0040,0xa084> x0040a084; (void)x0040a084; gdcm::TagToType<0x0040,0xa088> x0040a088; (void)x0040a088; gdcm::TagToType<0x0040,0xa090> x0040a090; (void)x0040a090; gdcm::TagToType<0x0040,0xa0b0> x0040a0b0; (void)x0040a0b0; gdcm::TagToType<0x0040,0xa120> x0040a120; (void)x0040a120; gdcm::TagToType<0x0040,0xa121> x0040a121; (void)x0040a121; gdcm::TagToType<0x0040,0xa122> x0040a122; (void)x0040a122; gdcm::TagToType<0x0040,0xa123> x0040a123; (void)x0040a123; gdcm::TagToType<0x0040,0xa124> x0040a124; (void)x0040a124; gdcm::TagToType<0x0040,0xa130> x0040a130; (void)x0040a130; gdcm::TagToType<0x0040,0xa132> x0040a132; (void)x0040a132; gdcm::TagToType<0x0040,0xa136> x0040a136; (void)x0040a136; gdcm::TagToType<0x0040,0xa138> x0040a138; (void)x0040a138; gdcm::TagToType<0x0040,0xa13a> x0040a13a; (void)x0040a13a; gdcm::TagToType<0x0040,0xa160> x0040a160; (void)x0040a160; gdcm::TagToType<0x0040,0xa168> x0040a168; (void)x0040a168; gdcm::TagToType<0x0040,0xa170> x0040a170; (void)x0040a170; gdcm::TagToType<0x0040,0xa180> x0040a180; (void)x0040a180; gdcm::TagToType<0x0040,0xa195> x0040a195; (void)x0040a195; gdcm::TagToType<0x0040,0xa300> x0040a300; (void)x0040a300; gdcm::TagToType<0x0040,0xa301> x0040a301; (void)x0040a301; gdcm::TagToType<0x0040,0xa30a> x0040a30a; (void)x0040a30a; gdcm::TagToType<0x0040,0xa353> x0040a353; (void)x0040a353; gdcm::TagToType<0x0040,0xa354> x0040a354; (void)x0040a354; gdcm::TagToType<0x0040,0xa360> x0040a360; (void)x0040a360; gdcm::TagToType<0x0040,0xa370> x0040a370; (void)x0040a370; gdcm::TagToType<0x0040,0xa372> x0040a372; (void)x0040a372; gdcm::TagToType<0x0040,0xa375> x0040a375; (void)x0040a375; gdcm::TagToType<0x0040,0xa385> x0040a385; (void)x0040a385; gdcm::TagToType<0x0040,0xa390> x0040a390; (void)x0040a390; gdcm::TagToType<0x0040,0xa491> x0040a491; (void)x0040a491; gdcm::TagToType<0x0040,0xa492> x0040a492; (void)x0040a492; gdcm::TagToType<0x0040,0xa493> x0040a493; (void)x0040a493; gdcm::TagToType<0x0040,0xa494> x0040a494; (void)x0040a494; gdcm::TagToType<0x0040,0xa504> x0040a504; (void)x0040a504; gdcm::TagToType<0x0040,0xa525> x0040a525; (void)x0040a525; gdcm::TagToType<0x0040,0xa730> x0040a730; (void)x0040a730; gdcm::TagToType<0x0040,0xb020> x0040b020; (void)x0040b020; gdcm::TagToType<0x0040,0xdb00> x0040db00; (void)x0040db00; gdcm::TagToType<0x0040,0xdb06> x0040db06; (void)x0040db06; gdcm::TagToType<0x0040,0xdb07> x0040db07; (void)x0040db07; gdcm::TagToType<0x0040,0xdb0b> x0040db0b; (void)x0040db0b; gdcm::TagToType<0x0040,0xdb0c> x0040db0c; (void)x0040db0c; gdcm::TagToType<0x0040,0xdb0d> x0040db0d; (void)x0040db0d; gdcm::TagToType<0x0040,0xdb73> x0040db73; (void)x0040db73; gdcm::TagToType<0x0040,0xe001> x0040e001; (void)x0040e001; gdcm::TagToType<0x0040,0xe004> x0040e004; (void)x0040e004; gdcm::TagToType<0x0040,0xe006> x0040e006; (void)x0040e006; gdcm::TagToType<0x0040,0xe010> x0040e010; (void)x0040e010; gdcm::TagToType<0x0042,0x0010> x00420010; (void)x00420010; gdcm::TagToType<0x0042,0x0011> x00420011; (void)x00420011; gdcm::TagToType<0x0042,0x0012> x00420012; (void)x00420012; gdcm::TagToType<0x0042,0x0013> x00420013; (void)x00420013; gdcm::TagToType<0x0042,0x0014> x00420014; (void)x00420014; gdcm::TagToType<0x0044,0x0001> x00440001; (void)x00440001; gdcm::TagToType<0x0044,0x0002> x00440002; (void)x00440002; gdcm::TagToType<0x0044,0x0003> x00440003; (void)x00440003; gdcm::TagToType<0x0044,0x0004> x00440004; (void)x00440004; gdcm::TagToType<0x0044,0x0007> x00440007; (void)x00440007; gdcm::TagToType<0x0044,0x0008> x00440008; (void)x00440008; gdcm::TagToType<0x0044,0x0009> x00440009; (void)x00440009; gdcm::TagToType<0x0044,0x000a> x0044000a; (void)x0044000a; gdcm::TagToType<0x0044,0x000b> x0044000b; (void)x0044000b; gdcm::TagToType<0x0044,0x0010> x00440010; (void)x00440010; gdcm::TagToType<0x0044,0x0011> x00440011; (void)x00440011; gdcm::TagToType<0x0044,0x0012> x00440012; (void)x00440012; gdcm::TagToType<0x0044,0x0013> x00440013; (void)x00440013; gdcm::TagToType<0x0044,0x0019> x00440019; (void)x00440019; gdcm::TagToType<0x0050,0x0004> x00500004; (void)x00500004; gdcm::TagToType<0x0050,0x0010> x00500010; (void)x00500010; gdcm::TagToType<0x0050,0x0014> x00500014; (void)x00500014; gdcm::TagToType<0x0050,0x0016> x00500016; (void)x00500016; gdcm::TagToType<0x0050,0x0017> x00500017; (void)x00500017; gdcm::TagToType<0x0050,0x0018> x00500018; (void)x00500018; gdcm::TagToType<0x0050,0x0019> x00500019; (void)x00500019; gdcm::TagToType<0x0050,0x0020> x00500020; (void)x00500020; gdcm::TagToType<0x0054,0x0010> x00540010; (void)x00540010; gdcm::TagToType<0x0054,0x0011> x00540011; (void)x00540011; gdcm::TagToType<0x0054,0x0012> x00540012; (void)x00540012; gdcm::TagToType<0x0054,0x0013> x00540013; (void)x00540013; gdcm::TagToType<0x0054,0x0014> x00540014; (void)x00540014; gdcm::TagToType<0x0054,0x0015> x00540015; (void)x00540015; gdcm::TagToType<0x0054,0x0016> x00540016; (void)x00540016; gdcm::TagToType<0x0054,0x0017> x00540017; (void)x00540017; gdcm::TagToType<0x0054,0x0018> x00540018; (void)x00540018; gdcm::TagToType<0x0054,0x0020> x00540020; (void)x00540020; gdcm::TagToType<0x0054,0x0021> x00540021; (void)x00540021; gdcm::TagToType<0x0054,0x0022> x00540022; (void)x00540022; gdcm::TagToType<0x0054,0x0030> x00540030; (void)x00540030; gdcm::TagToType<0x0054,0x0031> x00540031; (void)x00540031; gdcm::TagToType<0x0054,0x0032> x00540032; (void)x00540032; gdcm::TagToType<0x0054,0x0033> x00540033; (void)x00540033; gdcm::TagToType<0x0054,0x0036> x00540036; (void)x00540036; gdcm::TagToType<0x0054,0x0038> x00540038; (void)x00540038; gdcm::TagToType<0x0054,0x0039> x00540039; (void)x00540039; gdcm::TagToType<0x0054,0x0050> x00540050; (void)x00540050; gdcm::TagToType<0x0054,0x0051> x00540051; (void)x00540051; gdcm::TagToType<0x0054,0x0052> x00540052; (void)x00540052; gdcm::TagToType<0x0054,0x0053> x00540053; (void)x00540053; gdcm::TagToType<0x0054,0x0060> x00540060; (void)x00540060; gdcm::TagToType<0x0054,0x0061> x00540061; (void)x00540061; gdcm::TagToType<0x0054,0x0062> x00540062; (void)x00540062; gdcm::TagToType<0x0054,0x0063> x00540063; (void)x00540063; gdcm::TagToType<0x0054,0x0070> x00540070; (void)x00540070; gdcm::TagToType<0x0054,0x0071> x00540071; (void)x00540071; gdcm::TagToType<0x0054,0x0072> x00540072; (void)x00540072; gdcm::TagToType<0x0054,0x0073> x00540073; (void)x00540073; gdcm::TagToType<0x0054,0x0080> x00540080; (void)x00540080; gdcm::TagToType<0x0054,0x0081> x00540081; (void)x00540081; gdcm::TagToType<0x0054,0x0090> x00540090; (void)x00540090; gdcm::TagToType<0x0054,0x0100> x00540100; (void)x00540100; gdcm::TagToType<0x0054,0x0101> x00540101; (void)x00540101; gdcm::TagToType<0x0054,0x0200> x00540200; (void)x00540200; gdcm::TagToType<0x0054,0x0202> x00540202; (void)x00540202; gdcm::TagToType<0x0054,0x0210> x00540210; (void)x00540210; gdcm::TagToType<0x0054,0x0211> x00540211; (void)x00540211; gdcm::TagToType<0x0054,0x0220> x00540220; (void)x00540220; gdcm::TagToType<0x0054,0x0222> x00540222; (void)x00540222; gdcm::TagToType<0x0054,0x0300> x00540300; (void)x00540300; gdcm::TagToType<0x0054,0x0302> x00540302; (void)x00540302; gdcm::TagToType<0x0054,0x0304> x00540304; (void)x00540304; gdcm::TagToType<0x0054,0x0306> x00540306; (void)x00540306; gdcm::TagToType<0x0054,0x0308> x00540308; (void)x00540308; gdcm::TagToType<0x0054,0x0400> x00540400; (void)x00540400; gdcm::TagToType<0x0054,0x0410> x00540410; (void)x00540410; gdcm::TagToType<0x0054,0x0412> x00540412; (void)x00540412; gdcm::TagToType<0x0054,0x0414> x00540414; (void)x00540414; gdcm::TagToType<0x0054,0x0500> x00540500; (void)x00540500; gdcm::TagToType<0x0054,0x1000> x00541000; (void)x00541000; gdcm::TagToType<0x0054,0x1001> x00541001; (void)x00541001; gdcm::TagToType<0x0054,0x1002> x00541002; (void)x00541002; gdcm::TagToType<0x0054,0x1004> x00541004; (void)x00541004; gdcm::TagToType<0x0054,0x1100> x00541100; (void)x00541100; gdcm::TagToType<0x0054,0x1101> x00541101; (void)x00541101; gdcm::TagToType<0x0054,0x1102> x00541102; (void)x00541102; gdcm::TagToType<0x0054,0x1103> x00541103; (void)x00541103; gdcm::TagToType<0x0054,0x1104> x00541104; (void)x00541104; gdcm::TagToType<0x0054,0x1105> x00541105; (void)x00541105; gdcm::TagToType<0x0054,0x1200> x00541200; (void)x00541200; gdcm::TagToType<0x0054,0x1201> x00541201; (void)x00541201; gdcm::TagToType<0x0054,0x1202> x00541202; (void)x00541202; gdcm::TagToType<0x0054,0x1203> x00541203; (void)x00541203; gdcm::TagToType<0x0054,0x1210> x00541210; (void)x00541210; gdcm::TagToType<0x0054,0x1220> x00541220; (void)x00541220; gdcm::TagToType<0x0054,0x1300> x00541300; (void)x00541300; gdcm::TagToType<0x0054,0x1310> x00541310; (void)x00541310; gdcm::TagToType<0x0054,0x1311> x00541311; (void)x00541311; gdcm::TagToType<0x0054,0x1320> x00541320; (void)x00541320; gdcm::TagToType<0x0054,0x1321> x00541321; (void)x00541321; gdcm::TagToType<0x0054,0x1322> x00541322; (void)x00541322; gdcm::TagToType<0x0054,0x1323> x00541323; (void)x00541323; gdcm::TagToType<0x0054,0x1324> x00541324; (void)x00541324; gdcm::TagToType<0x0054,0x1330> x00541330; (void)x00541330; gdcm::TagToType<0x0054,0x1400> x00541400; (void)x00541400; gdcm::TagToType<0x0054,0x1401> x00541401; (void)x00541401; gdcm::TagToType<0x0060,0x3000> x00603000; (void)x00603000; gdcm::TagToType<0x0060,0x3002> x00603002; (void)x00603002; gdcm::TagToType<0x0060,0x3008> x00603008; (void)x00603008; gdcm::TagToType<0x0060,0x3010> x00603010; (void)x00603010; gdcm::TagToType<0x0060,0x3020> x00603020; (void)x00603020; gdcm::TagToType<0x0062,0x0001> x00620001; (void)x00620001; gdcm::TagToType<0x0062,0x0002> x00620002; (void)x00620002; gdcm::TagToType<0x0062,0x0003> x00620003; (void)x00620003; gdcm::TagToType<0x0062,0x0004> x00620004; (void)x00620004; gdcm::TagToType<0x0062,0x0005> x00620005; (void)x00620005; gdcm::TagToType<0x0062,0x0006> x00620006; (void)x00620006; gdcm::TagToType<0x0062,0x0008> x00620008; (void)x00620008; gdcm::TagToType<0x0062,0x0009> x00620009; (void)x00620009; gdcm::TagToType<0x0062,0x000a> x0062000a; (void)x0062000a; gdcm::TagToType<0x0062,0x000b> x0062000b; (void)x0062000b; gdcm::TagToType<0x0062,0x000c> x0062000c; (void)x0062000c; gdcm::TagToType<0x0062,0x000d> x0062000d; (void)x0062000d; gdcm::TagToType<0x0062,0x000e> x0062000e; (void)x0062000e; gdcm::TagToType<0x0062,0x000f> x0062000f; (void)x0062000f; gdcm::TagToType<0x0062,0x0010> x00620010; (void)x00620010; gdcm::TagToType<0x0064,0x0002> x00640002; (void)x00640002; gdcm::TagToType<0x0064,0x0003> x00640003; (void)x00640003; gdcm::TagToType<0x0064,0x0005> x00640005; (void)x00640005; gdcm::TagToType<0x0064,0x0007> x00640007; (void)x00640007; gdcm::TagToType<0x0064,0x0008> x00640008; (void)x00640008; gdcm::TagToType<0x0064,0x0009> x00640009; (void)x00640009; gdcm::TagToType<0x0064,0x000f> x0064000f; (void)x0064000f; gdcm::TagToType<0x0064,0x0010> x00640010; (void)x00640010; gdcm::TagToType<0x0070,0x0001> x00700001; (void)x00700001; gdcm::TagToType<0x0070,0x0002> x00700002; (void)x00700002; gdcm::TagToType<0x0070,0x0003> x00700003; (void)x00700003; gdcm::TagToType<0x0070,0x0004> x00700004; (void)x00700004; gdcm::TagToType<0x0070,0x0005> x00700005; (void)x00700005; gdcm::TagToType<0x0070,0x0006> x00700006; (void)x00700006; gdcm::TagToType<0x0070,0x0008> x00700008; (void)x00700008; gdcm::TagToType<0x0070,0x0009> x00700009; (void)x00700009; gdcm::TagToType<0x0070,0x0010> x00700010; (void)x00700010; gdcm::TagToType<0x0070,0x0011> x00700011; (void)x00700011; gdcm::TagToType<0x0070,0x0012> x00700012; (void)x00700012; gdcm::TagToType<0x0070,0x0014> x00700014; (void)x00700014; gdcm::TagToType<0x0070,0x0015> x00700015; (void)x00700015; gdcm::TagToType<0x0070,0x0020> x00700020; (void)x00700020; gdcm::TagToType<0x0070,0x0021> x00700021; (void)x00700021; gdcm::TagToType<0x0070,0x0022> x00700022; (void)x00700022; gdcm::TagToType<0x0070,0x0023> x00700023; (void)x00700023; gdcm::TagToType<0x0070,0x0024> x00700024; (void)x00700024; gdcm::TagToType<0x0070,0x0040> x00700040; (void)x00700040; gdcm::TagToType<0x0070,0x0041> x00700041; (void)x00700041; gdcm::TagToType<0x0070,0x0042> x00700042; (void)x00700042; gdcm::TagToType<0x0070,0x0050> x00700050; (void)x00700050; gdcm::TagToType<0x0070,0x0051> x00700051; (void)x00700051; gdcm::TagToType<0x0070,0x0052> x00700052; (void)x00700052; gdcm::TagToType<0x0070,0x0053> x00700053; (void)x00700053; gdcm::TagToType<0x0070,0x005a> x0070005a; (void)x0070005a; gdcm::TagToType<0x0070,0x0060> x00700060; (void)x00700060; gdcm::TagToType<0x0070,0x0062> x00700062; (void)x00700062; gdcm::TagToType<0x0070,0x0066> x00700066; (void)x00700066; gdcm::TagToType<0x0070,0x0067> x00700067; (void)x00700067; gdcm::TagToType<0x0070,0x0068> x00700068; (void)x00700068; gdcm::TagToType<0x0070,0x0080> x00700080; (void)x00700080; gdcm::TagToType<0x0070,0x0081> x00700081; (void)x00700081; gdcm::TagToType<0x0070,0x0082> x00700082; (void)x00700082; gdcm::TagToType<0x0070,0x0083> x00700083; (void)x00700083; gdcm::TagToType<0x0070,0x0084> x00700084; (void)x00700084; gdcm::TagToType<0x0070,0x0086> x00700086; (void)x00700086; gdcm::TagToType<0x0070,0x0100> x00700100; (void)x00700100; gdcm::TagToType<0x0070,0x0101> x00700101; (void)x00700101; gdcm::TagToType<0x0070,0x0102> x00700102; (void)x00700102; gdcm::TagToType<0x0070,0x0103> x00700103; (void)x00700103; gdcm::TagToType<0x0070,0x0306> x00700306; (void)x00700306; gdcm::TagToType<0x0070,0x0308> x00700308; (void)x00700308; gdcm::TagToType<0x0070,0x0309> x00700309; (void)x00700309; gdcm::TagToType<0x0070,0x030a> x0070030a; (void)x0070030a; gdcm::TagToType<0x0070,0x030c> x0070030c; (void)x0070030c; gdcm::TagToType<0x0070,0x030d> x0070030d; (void)x0070030d; gdcm::TagToType<0x0070,0x030f> x0070030f; (void)x0070030f; gdcm::TagToType<0x0070,0x0310> x00700310; (void)x00700310; gdcm::TagToType<0x0070,0x0311> x00700311; (void)x00700311; gdcm::TagToType<0x0070,0x0312> x00700312; (void)x00700312; gdcm::TagToType<0x0070,0x0314> x00700314; (void)x00700314; gdcm::TagToType<0x0070,0x0318> x00700318; (void)x00700318; gdcm::TagToType<0x0070,0x031a> x0070031a; (void)x0070031a; gdcm::TagToType<0x0070,0x031c> x0070031c; (void)x0070031c; gdcm::TagToType<0x0070,0x031e> x0070031e; (void)x0070031e; gdcm::TagToType<0x0070,0x0401> x00700401; (void)x00700401; gdcm::TagToType<0x0070,0x0402> x00700402; (void)x00700402; gdcm::TagToType<0x0070,0x0403> x00700403; (void)x00700403; gdcm::TagToType<0x0070,0x0404> x00700404; (void)x00700404; gdcm::TagToType<0x0070,0x0405> x00700405; (void)x00700405; gdcm::TagToType<0x0072,0x0002> x00720002; (void)x00720002; gdcm::TagToType<0x0072,0x0004> x00720004; (void)x00720004; gdcm::TagToType<0x0072,0x0006> x00720006; (void)x00720006; gdcm::TagToType<0x0072,0x0008> x00720008; (void)x00720008; gdcm::TagToType<0x0072,0x000a> x0072000a; (void)x0072000a; gdcm::TagToType<0x0072,0x000c> x0072000c; (void)x0072000c; gdcm::TagToType<0x0072,0x000e> x0072000e; (void)x0072000e; gdcm::TagToType<0x0072,0x0010> x00720010; (void)x00720010; gdcm::TagToType<0x0072,0x0012> x00720012; (void)x00720012; gdcm::TagToType<0x0072,0x0014> x00720014; (void)x00720014; gdcm::TagToType<0x0072,0x0020> x00720020; (void)x00720020; gdcm::TagToType<0x0072,0x0022> x00720022; (void)x00720022; gdcm::TagToType<0x0072,0x0024> x00720024; (void)x00720024; gdcm::TagToType<0x0072,0x0026> x00720026; (void)x00720026; gdcm::TagToType<0x0072,0x0028> x00720028; (void)x00720028; gdcm::TagToType<0x0072,0x0030> x00720030; (void)x00720030; gdcm::TagToType<0x0072,0x0032> x00720032; (void)x00720032; gdcm::TagToType<0x0072,0x0034> x00720034; (void)x00720034; gdcm::TagToType<0x0072,0x0038> x00720038; (void)x00720038; gdcm::TagToType<0x0072,0x003a> x0072003a; (void)x0072003a; gdcm::TagToType<0x0072,0x003c> x0072003c; (void)x0072003c; gdcm::TagToType<0x0072,0x003e> x0072003e; (void)x0072003e; gdcm::TagToType<0x0072,0x0040> x00720040; (void)x00720040; gdcm::TagToType<0x0072,0x0050> x00720050; (void)x00720050; gdcm::TagToType<0x0072,0x0052> x00720052; (void)x00720052; gdcm::TagToType<0x0072,0x0054> x00720054; (void)x00720054; gdcm::TagToType<0x0072,0x0056> x00720056; (void)x00720056; gdcm::TagToType<0x0072,0x0060> x00720060; (void)x00720060; gdcm::TagToType<0x0072,0x0062> x00720062; (void)x00720062; gdcm::TagToType<0x0072,0x0064> x00720064; (void)x00720064; gdcm::TagToType<0x0072,0x0066> x00720066; (void)x00720066; gdcm::TagToType<0x0072,0x0068> x00720068; (void)x00720068; gdcm::TagToType<0x0072,0x006a> x0072006a; (void)x0072006a; gdcm::TagToType<0x0072,0x006c> x0072006c; (void)x0072006c; gdcm::TagToType<0x0072,0x006e> x0072006e; (void)x0072006e; gdcm::TagToType<0x0072,0x0070> x00720070; (void)x00720070; gdcm::TagToType<0x0072,0x0072> x00720072; (void)x00720072; gdcm::TagToType<0x0072,0x0074> x00720074; (void)x00720074; gdcm::TagToType<0x0072,0x0076> x00720076; (void)x00720076; gdcm::TagToType<0x0072,0x0078> x00720078; (void)x00720078; gdcm::TagToType<0x0072,0x007a> x0072007a; (void)x0072007a; gdcm::TagToType<0x0072,0x007c> x0072007c; (void)x0072007c; gdcm::TagToType<0x0072,0x007e> x0072007e; (void)x0072007e; gdcm::TagToType<0x0072,0x0080> x00720080; (void)x00720080; gdcm::TagToType<0x0072,0x0100> x00720100; (void)x00720100; gdcm::TagToType<0x0072,0x0102> x00720102; (void)x00720102; gdcm::TagToType<0x0072,0x0104> x00720104; (void)x00720104; gdcm::TagToType<0x0072,0x0106> x00720106; (void)x00720106; gdcm::TagToType<0x0072,0x0108> x00720108; (void)x00720108; gdcm::TagToType<0x0072,0x010a> x0072010a; (void)x0072010a; gdcm::TagToType<0x0072,0x010c> x0072010c; (void)x0072010c; gdcm::TagToType<0x0072,0x010e> x0072010e; (void)x0072010e; gdcm::TagToType<0x0072,0x0200> x00720200; (void)x00720200; gdcm::TagToType<0x0072,0x0202> x00720202; (void)x00720202; gdcm::TagToType<0x0072,0x0203> x00720203; (void)x00720203; gdcm::TagToType<0x0072,0x0204> x00720204; (void)x00720204; gdcm::TagToType<0x0072,0x0206> x00720206; (void)x00720206; gdcm::TagToType<0x0072,0x0208> x00720208; (void)x00720208; gdcm::TagToType<0x0072,0x0210> x00720210; (void)x00720210; gdcm::TagToType<0x0072,0x0212> x00720212; (void)x00720212; gdcm::TagToType<0x0072,0x0214> x00720214; (void)x00720214; gdcm::TagToType<0x0072,0x0216> x00720216; (void)x00720216; gdcm::TagToType<0x0072,0x0218> x00720218; (void)x00720218; gdcm::TagToType<0x0072,0x0300> x00720300; (void)x00720300; gdcm::TagToType<0x0072,0x0302> x00720302; (void)x00720302; gdcm::TagToType<0x0072,0x0304> x00720304; (void)x00720304; gdcm::TagToType<0x0072,0x0306> x00720306; (void)x00720306; gdcm::TagToType<0x0072,0x0308> x00720308; (void)x00720308; gdcm::TagToType<0x0072,0x0310> x00720310; (void)x00720310; gdcm::TagToType<0x0072,0x0312> x00720312; (void)x00720312; gdcm::TagToType<0x0072,0x0314> x00720314; (void)x00720314; gdcm::TagToType<0x0072,0x0316> x00720316; (void)x00720316; gdcm::TagToType<0x0072,0x0318> x00720318; (void)x00720318; gdcm::TagToType<0x0072,0x0320> x00720320; (void)x00720320; gdcm::TagToType<0x0072,0x0330> x00720330; (void)x00720330; gdcm::TagToType<0x0072,0x0400> x00720400; (void)x00720400; gdcm::TagToType<0x0072,0x0402> x00720402; (void)x00720402; gdcm::TagToType<0x0072,0x0404> x00720404; (void)x00720404; gdcm::TagToType<0x0072,0x0406> x00720406; (void)x00720406; gdcm::TagToType<0x0072,0x0500> x00720500; (void)x00720500; gdcm::TagToType<0x0072,0x0510> x00720510; (void)x00720510; gdcm::TagToType<0x0072,0x0512> x00720512; (void)x00720512; gdcm::TagToType<0x0072,0x0514> x00720514; (void)x00720514; gdcm::TagToType<0x0072,0x0516> x00720516; (void)x00720516; gdcm::TagToType<0x0072,0x0520> x00720520; (void)x00720520; gdcm::TagToType<0x0072,0x0600> x00720600; (void)x00720600; gdcm::TagToType<0x0072,0x0602> x00720602; (void)x00720602; gdcm::TagToType<0x0072,0x0604> x00720604; (void)x00720604; gdcm::TagToType<0x0072,0x0700> x00720700; (void)x00720700; gdcm::TagToType<0x0072,0x0702> x00720702; (void)x00720702; gdcm::TagToType<0x0072,0x0704> x00720704; (void)x00720704; gdcm::TagToType<0x0072,0x0706> x00720706; (void)x00720706; gdcm::TagToType<0x0072,0x0710> x00720710; (void)x00720710; gdcm::TagToType<0x0072,0x0712> x00720712; (void)x00720712; gdcm::TagToType<0x0072,0x0714> x00720714; (void)x00720714; gdcm::TagToType<0x0072,0x0716> x00720716; (void)x00720716; gdcm::TagToType<0x0072,0x0717> x00720717; (void)x00720717; gdcm::TagToType<0x0072,0x0718> x00720718; (void)x00720718; gdcm::TagToType<0x0074,0x1000> x00741000; (void)x00741000; gdcm::TagToType<0x0074,0x1002> x00741002; (void)x00741002; gdcm::TagToType<0x0074,0x1004> x00741004; (void)x00741004; gdcm::TagToType<0x0074,0x1006> x00741006; (void)x00741006; gdcm::TagToType<0x0074,0x1008> x00741008; (void)x00741008; gdcm::TagToType<0x0074,0x100a> x0074100a; (void)x0074100a; gdcm::TagToType<0x0074,0x100c> x0074100c; (void)x0074100c; gdcm::TagToType<0x0074,0x100e> x0074100e; (void)x0074100e; gdcm::TagToType<0x0074,0x1020> x00741020; (void)x00741020; gdcm::TagToType<0x0074,0x1022> x00741022; (void)x00741022; gdcm::TagToType<0x0074,0x1024> x00741024; (void)x00741024; gdcm::TagToType<0x0074,0x1030> x00741030; (void)x00741030; gdcm::TagToType<0x0074,0x1032> x00741032; (void)x00741032; gdcm::TagToType<0x0074,0x1034> x00741034; (void)x00741034; gdcm::TagToType<0x0074,0x1036> x00741036; (void)x00741036; gdcm::TagToType<0x0074,0x1038> x00741038; (void)x00741038; gdcm::TagToType<0x0074,0x103a> x0074103a; (void)x0074103a; gdcm::TagToType<0x0074,0x1040> x00741040; (void)x00741040; gdcm::TagToType<0x0074,0x1042> x00741042; (void)x00741042; gdcm::TagToType<0x0074,0x1044> x00741044; (void)x00741044; gdcm::TagToType<0x0074,0x1046> x00741046; (void)x00741046; gdcm::TagToType<0x0074,0x1048> x00741048; (void)x00741048; gdcm::TagToType<0x0074,0x104a> x0074104a; (void)x0074104a; gdcm::TagToType<0x0074,0x104c> x0074104c; (void)x0074104c; gdcm::TagToType<0x0074,0x104e> x0074104e; (void)x0074104e; gdcm::TagToType<0x0074,0x1050> x00741050; (void)x00741050; gdcm::TagToType<0x0074,0x1052> x00741052; (void)x00741052; gdcm::TagToType<0x0074,0x1054> x00741054; (void)x00741054; gdcm::TagToType<0x0074,0x1056> x00741056; (void)x00741056; gdcm::TagToType<0x0074,0x1200> x00741200; (void)x00741200; gdcm::TagToType<0x0074,0x1202> x00741202; (void)x00741202; gdcm::TagToType<0x0074,0x1204> x00741204; (void)x00741204; gdcm::TagToType<0x0074,0x1210> x00741210; (void)x00741210; gdcm::TagToType<0x0074,0x1212> x00741212; (void)x00741212; gdcm::TagToType<0x0074,0x1216> x00741216; (void)x00741216; gdcm::TagToType<0x0074,0x1220> x00741220; (void)x00741220; gdcm::TagToType<0x0074,0x1222> x00741222; (void)x00741222; gdcm::TagToType<0x0074,0x1230> x00741230; (void)x00741230; gdcm::TagToType<0x0074,0x1234> x00741234; (void)x00741234; gdcm::TagToType<0x0074,0x1236> x00741236; (void)x00741236; gdcm::TagToType<0x0074,0x1238> x00741238; (void)x00741238; gdcm::TagToType<0x0074,0x1242> x00741242; (void)x00741242; gdcm::TagToType<0x0074,0x1244> x00741244; (void)x00741244; gdcm::TagToType<0x0074,0x1246> x00741246; (void)x00741246; gdcm::TagToType<0x0088,0x0130> x00880130; (void)x00880130; gdcm::TagToType<0x0088,0x0140> x00880140; (void)x00880140; gdcm::TagToType<0x0088,0x0200> x00880200; (void)x00880200; gdcm::TagToType<0x0088,0x0904> x00880904; (void)x00880904; gdcm::TagToType<0x0088,0x0906> x00880906; (void)x00880906; gdcm::TagToType<0x0088,0x0910> x00880910; (void)x00880910; gdcm::TagToType<0x0088,0x0912> x00880912; (void)x00880912; gdcm::TagToType<0x0100,0x0410> x01000410; (void)x01000410; gdcm::TagToType<0x0100,0x0420> x01000420; (void)x01000420; gdcm::TagToType<0x0100,0x0424> x01000424; (void)x01000424; gdcm::TagToType<0x0100,0x0426> x01000426; (void)x01000426; gdcm::TagToType<0x0400,0x0005> x04000005; (void)x04000005; gdcm::TagToType<0x0400,0x0010> x04000010; (void)x04000010; gdcm::TagToType<0x0400,0x0015> x04000015; (void)x04000015; gdcm::TagToType<0x0400,0x0020> x04000020; (void)x04000020; gdcm::TagToType<0x0400,0x0100> x04000100; (void)x04000100; gdcm::TagToType<0x0400,0x0105> x04000105; (void)x04000105; gdcm::TagToType<0x0400,0x0110> x04000110; (void)x04000110; gdcm::TagToType<0x0400,0x0115> x04000115; (void)x04000115; gdcm::TagToType<0x0400,0x0120> x04000120; (void)x04000120; gdcm::TagToType<0x0400,0x0305> x04000305; (void)x04000305; gdcm::TagToType<0x0400,0x0310> x04000310; (void)x04000310; gdcm::TagToType<0x0400,0x0401> x04000401; (void)x04000401; gdcm::TagToType<0x0400,0x0402> x04000402; (void)x04000402; gdcm::TagToType<0x0400,0x0403> x04000403; (void)x04000403; gdcm::TagToType<0x0400,0x0404> x04000404; (void)x04000404; gdcm::TagToType<0x0400,0x0500> x04000500; (void)x04000500; gdcm::TagToType<0x0400,0x0510> x04000510; (void)x04000510; gdcm::TagToType<0x0400,0x0520> x04000520; (void)x04000520; gdcm::TagToType<0x0400,0x0550> x04000550; (void)x04000550; gdcm::TagToType<0x0400,0x0561> x04000561; (void)x04000561; gdcm::TagToType<0x0400,0x0562> x04000562; (void)x04000562; gdcm::TagToType<0x0400,0x0563> x04000563; (void)x04000563; gdcm::TagToType<0x0400,0x0564> x04000564; (void)x04000564; gdcm::TagToType<0x0400,0x0565> x04000565; (void)x04000565; gdcm::TagToType<0x2000,0x0010> x20000010; (void)x20000010; gdcm::TagToType<0x2000,0x001e> x2000001e; (void)x2000001e; gdcm::TagToType<0x2000,0x0020> x20000020; (void)x20000020; gdcm::TagToType<0x2000,0x0030> x20000030; (void)x20000030; gdcm::TagToType<0x2000,0x0040> x20000040; (void)x20000040; gdcm::TagToType<0x2000,0x0050> x20000050; (void)x20000050; gdcm::TagToType<0x2000,0x0060> x20000060; (void)x20000060; gdcm::TagToType<0x2000,0x0061> x20000061; (void)x20000061; gdcm::TagToType<0x2000,0x0062> x20000062; (void)x20000062; gdcm::TagToType<0x2000,0x0063> x20000063; (void)x20000063; gdcm::TagToType<0x2000,0x0065> x20000065; (void)x20000065; gdcm::TagToType<0x2000,0x0067> x20000067; (void)x20000067; gdcm::TagToType<0x2000,0x0069> x20000069; (void)x20000069; gdcm::TagToType<0x2000,0x006a> x2000006a; (void)x2000006a; gdcm::TagToType<0x2000,0x00a0> x200000a0; (void)x200000a0; gdcm::TagToType<0x2000,0x00a1> x200000a1; (void)x200000a1; gdcm::TagToType<0x2000,0x00a2> x200000a2; (void)x200000a2; gdcm::TagToType<0x2000,0x00a4> x200000a4; (void)x200000a4; gdcm::TagToType<0x2000,0x00a8> x200000a8; (void)x200000a8; gdcm::TagToType<0x2000,0x0500> x20000500; (void)x20000500; gdcm::TagToType<0x2000,0x0510> x20000510; (void)x20000510; gdcm::TagToType<0x2010,0x0010> x20100010; (void)x20100010; gdcm::TagToType<0x2010,0x0030> x20100030; (void)x20100030; gdcm::TagToType<0x2010,0x0040> x20100040; (void)x20100040; gdcm::TagToType<0x2010,0x0050> x20100050; (void)x20100050; gdcm::TagToType<0x2010,0x0052> x20100052; (void)x20100052; gdcm::TagToType<0x2010,0x0054> x20100054; (void)x20100054; gdcm::TagToType<0x2010,0x0060> x20100060; (void)x20100060; gdcm::TagToType<0x2010,0x0080> x20100080; (void)x20100080; gdcm::TagToType<0x2010,0x00a6> x201000a6; (void)x201000a6; gdcm::TagToType<0x2010,0x00a7> x201000a7; (void)x201000a7; gdcm::TagToType<0x2010,0x00a8> x201000a8; (void)x201000a8; gdcm::TagToType<0x2010,0x00a9> x201000a9; (void)x201000a9; gdcm::TagToType<0x2010,0x0100> x20100100; (void)x20100100; gdcm::TagToType<0x2010,0x0110> x20100110; (void)x20100110; gdcm::TagToType<0x2010,0x0120> x20100120; (void)x20100120; gdcm::TagToType<0x2010,0x0130> x20100130; (void)x20100130; gdcm::TagToType<0x2010,0x0140> x20100140; (void)x20100140; gdcm::TagToType<0x2010,0x0150> x20100150; (void)x20100150; gdcm::TagToType<0x2010,0x0152> x20100152; (void)x20100152; gdcm::TagToType<0x2010,0x0154> x20100154; (void)x20100154; gdcm::TagToType<0x2010,0x015e> x2010015e; (void)x2010015e; gdcm::TagToType<0x2010,0x0160> x20100160; (void)x20100160; gdcm::TagToType<0x2010,0x0376> x20100376; (void)x20100376; gdcm::TagToType<0x2010,0x0500> x20100500; (void)x20100500; gdcm::TagToType<0x2010,0x0510> x20100510; (void)x20100510; gdcm::TagToType<0x2010,0x0520> x20100520; (void)x20100520; gdcm::TagToType<0x2020,0x0010> x20200010; (void)x20200010; gdcm::TagToType<0x2020,0x0020> x20200020; (void)x20200020; gdcm::TagToType<0x2020,0x0030> x20200030; (void)x20200030; gdcm::TagToType<0x2020,0x0040> x20200040; (void)x20200040; gdcm::TagToType<0x2020,0x0050> x20200050; (void)x20200050; gdcm::TagToType<0x2020,0x00a0> x202000a0; (void)x202000a0; gdcm::TagToType<0x2020,0x00a2> x202000a2; (void)x202000a2; gdcm::TagToType<0x2020,0x0110> x20200110; (void)x20200110; gdcm::TagToType<0x2020,0x0111> x20200111; (void)x20200111; gdcm::TagToType<0x2020,0x0130> x20200130; (void)x20200130; gdcm::TagToType<0x2020,0x0140> x20200140; (void)x20200140; gdcm::TagToType<0x2030,0x0010> x20300010; (void)x20300010; gdcm::TagToType<0x2030,0x0020> x20300020; (void)x20300020; gdcm::TagToType<0x2040,0x0010> x20400010; (void)x20400010; gdcm::TagToType<0x2040,0x0011> x20400011; (void)x20400011; gdcm::TagToType<0x2040,0x0020> x20400020; (void)x20400020; gdcm::TagToType<0x2040,0x0060> x20400060; (void)x20400060; gdcm::TagToType<0x2040,0x0070> x20400070; (void)x20400070; gdcm::TagToType<0x2040,0x0072> x20400072; (void)x20400072; gdcm::TagToType<0x2040,0x0074> x20400074; (void)x20400074; gdcm::TagToType<0x2040,0x0080> x20400080; (void)x20400080; gdcm::TagToType<0x2040,0x0082> x20400082; (void)x20400082; gdcm::TagToType<0x2040,0x0090> x20400090; (void)x20400090; gdcm::TagToType<0x2040,0x0100> x20400100; (void)x20400100; gdcm::TagToType<0x2040,0x0500> x20400500; (void)x20400500; gdcm::TagToType<0x2050,0x0010> x20500010; (void)x20500010; gdcm::TagToType<0x2050,0x0020> x20500020; (void)x20500020; gdcm::TagToType<0x2050,0x0500> x20500500; (void)x20500500; gdcm::TagToType<0x2100,0x0010> x21000010; (void)x21000010; gdcm::TagToType<0x2100,0x0020> x21000020; (void)x21000020; gdcm::TagToType<0x2100,0x0030> x21000030; (void)x21000030; gdcm::TagToType<0x2100,0x0040> x21000040; (void)x21000040; gdcm::TagToType<0x2100,0x0050> x21000050; (void)x21000050; gdcm::TagToType<0x2100,0x0070> x21000070; (void)x21000070; gdcm::TagToType<0x2100,0x0140> x21000140; (void)x21000140; gdcm::TagToType<0x2100,0x0160> x21000160; (void)x21000160; gdcm::TagToType<0x2100,0x0170> x21000170; (void)x21000170; gdcm::TagToType<0x2100,0x0500> x21000500; (void)x21000500; gdcm::TagToType<0x2110,0x0010> x21100010; (void)x21100010; gdcm::TagToType<0x2110,0x0020> x21100020; (void)x21100020; gdcm::TagToType<0x2110,0x0030> x21100030; (void)x21100030; gdcm::TagToType<0x2110,0x0099> x21100099; (void)x21100099; gdcm::TagToType<0x2120,0x0010> x21200010; (void)x21200010; gdcm::TagToType<0x2120,0x0050> x21200050; (void)x21200050; gdcm::TagToType<0x2120,0x0070> x21200070; (void)x21200070; gdcm::TagToType<0x2130,0x0010> x21300010; (void)x21300010; gdcm::TagToType<0x2130,0x0015> x21300015; (void)x21300015; gdcm::TagToType<0x2130,0x0030> x21300030; (void)x21300030; gdcm::TagToType<0x2130,0x0040> x21300040; (void)x21300040; gdcm::TagToType<0x2130,0x0050> x21300050; (void)x21300050; gdcm::TagToType<0x2130,0x0060> x21300060; (void)x21300060; gdcm::TagToType<0x2130,0x0080> x21300080; (void)x21300080; gdcm::TagToType<0x2130,0x00a0> x213000a0; (void)x213000a0; gdcm::TagToType<0x2130,0x00c0> x213000c0; (void)x213000c0; gdcm::TagToType<0x2200,0x0001> x22000001; (void)x22000001; gdcm::TagToType<0x2200,0x0002> x22000002; (void)x22000002; gdcm::TagToType<0x2200,0x0003> x22000003; (void)x22000003; gdcm::TagToType<0x2200,0x0004> x22000004; (void)x22000004; gdcm::TagToType<0x2200,0x0005> x22000005; (void)x22000005; gdcm::TagToType<0x2200,0x0006> x22000006; (void)x22000006; gdcm::TagToType<0x2200,0x0007> x22000007; (void)x22000007; gdcm::TagToType<0x2200,0x0008> x22000008; (void)x22000008; gdcm::TagToType<0x2200,0x0009> x22000009; (void)x22000009; gdcm::TagToType<0x2200,0x000a> x2200000a; (void)x2200000a; gdcm::TagToType<0x2200,0x000b> x2200000b; (void)x2200000b; gdcm::TagToType<0x2200,0x000c> x2200000c; (void)x2200000c; gdcm::TagToType<0x2200,0x000d> x2200000d; (void)x2200000d; gdcm::TagToType<0x2200,0x000e> x2200000e; (void)x2200000e; gdcm::TagToType<0x2200,0x000f> x2200000f; (void)x2200000f; gdcm::TagToType<0x2200,0x0020> x22000020; (void)x22000020; gdcm::TagToType<0x3002,0x0002> x30020002; (void)x30020002; gdcm::TagToType<0x3002,0x0003> x30020003; (void)x30020003; gdcm::TagToType<0x3002,0x0004> x30020004; (void)x30020004; gdcm::TagToType<0x3002,0x000a> x3002000a; (void)x3002000a; gdcm::TagToType<0x3002,0x000c> x3002000c; (void)x3002000c; gdcm::TagToType<0x3002,0x000d> x3002000d; (void)x3002000d; gdcm::TagToType<0x3002,0x000e> x3002000e; (void)x3002000e; gdcm::TagToType<0x3002,0x0010> x30020010; (void)x30020010; gdcm::TagToType<0x3002,0x0011> x30020011; (void)x30020011; gdcm::TagToType<0x3002,0x0012> x30020012; (void)x30020012; gdcm::TagToType<0x3002,0x0020> x30020020; (void)x30020020; gdcm::TagToType<0x3002,0x0022> x30020022; (void)x30020022; gdcm::TagToType<0x3002,0x0024> x30020024; (void)x30020024; gdcm::TagToType<0x3002,0x0026> x30020026; (void)x30020026; gdcm::TagToType<0x3002,0x0028> x30020028; (void)x30020028; gdcm::TagToType<0x3002,0x0029> x30020029; (void)x30020029; gdcm::TagToType<0x3002,0x0030> x30020030; (void)x30020030; gdcm::TagToType<0x3002,0x0032> x30020032; (void)x30020032; gdcm::TagToType<0x3002,0x0034> x30020034; (void)x30020034; gdcm::TagToType<0x3002,0x0040> x30020040; (void)x30020040; gdcm::TagToType<0x3002,0x0041> x30020041; (void)x30020041; gdcm::TagToType<0x3002,0x0042> x30020042; (void)x30020042; gdcm::TagToType<0x3004,0x0001> x30040001; (void)x30040001; gdcm::TagToType<0x3004,0x0002> x30040002; (void)x30040002; gdcm::TagToType<0x3004,0x0004> x30040004; (void)x30040004; gdcm::TagToType<0x3004,0x0006> x30040006; (void)x30040006; gdcm::TagToType<0x3004,0x0008> x30040008; (void)x30040008; gdcm::TagToType<0x3004,0x000a> x3004000a; (void)x3004000a; gdcm::TagToType<0x3004,0x000c> x3004000c; (void)x3004000c; gdcm::TagToType<0x3004,0x000e> x3004000e; (void)x3004000e; gdcm::TagToType<0x3004,0x0010> x30040010; (void)x30040010; gdcm::TagToType<0x3004,0x0012> x30040012; (void)x30040012; gdcm::TagToType<0x3004,0x0014> x30040014; (void)x30040014; gdcm::TagToType<0x3004,0x0040> x30040040; (void)x30040040; gdcm::TagToType<0x3004,0x0042> x30040042; (void)x30040042; gdcm::TagToType<0x3004,0x0050> x30040050; (void)x30040050; gdcm::TagToType<0x3004,0x0052> x30040052; (void)x30040052; gdcm::TagToType<0x3004,0x0054> x30040054; (void)x30040054; gdcm::TagToType<0x3004,0x0056> x30040056; (void)x30040056; gdcm::TagToType<0x3004,0x0058> x30040058; (void)x30040058; gdcm::TagToType<0x3004,0x0060> x30040060; (void)x30040060; gdcm::TagToType<0x3004,0x0062> x30040062; (void)x30040062; gdcm::TagToType<0x3004,0x0070> x30040070; (void)x30040070; gdcm::TagToType<0x3004,0x0072> x30040072; (void)x30040072; gdcm::TagToType<0x3004,0x0074> x30040074; (void)x30040074; gdcm::TagToType<0x3006,0x0002> x30060002; (void)x30060002; gdcm::TagToType<0x3006,0x0004> x30060004; (void)x30060004; gdcm::TagToType<0x3006,0x0006> x30060006; (void)x30060006; gdcm::TagToType<0x3006,0x0008> x30060008; (void)x30060008; gdcm::TagToType<0x3006,0x0009> x30060009; (void)x30060009; gdcm::TagToType<0x3006,0x0010> x30060010; (void)x30060010; gdcm::TagToType<0x3006,0x0012> x30060012; (void)x30060012; gdcm::TagToType<0x3006,0x0014> x30060014; (void)x30060014; gdcm::TagToType<0x3006,0x0016> x30060016; (void)x30060016; gdcm::TagToType<0x3006,0x0020> x30060020; (void)x30060020; gdcm::TagToType<0x3006,0x0022> x30060022; (void)x30060022; gdcm::TagToType<0x3006,0x0024> x30060024; (void)x30060024; gdcm::TagToType<0x3006,0x0026> x30060026; (void)x30060026; gdcm::TagToType<0x3006,0x0028> x30060028; (void)x30060028; gdcm::TagToType<0x3006,0x002a> x3006002a; (void)x3006002a; gdcm::TagToType<0x3006,0x002c> x3006002c; (void)x3006002c; gdcm::TagToType<0x3006,0x0030> x30060030; (void)x30060030; gdcm::TagToType<0x3006,0x0033> x30060033; (void)x30060033; gdcm::TagToType<0x3006,0x0036> x30060036; (void)x30060036; gdcm::TagToType<0x3006,0x0038> x30060038; (void)x30060038; gdcm::TagToType<0x3006,0x0039> x30060039; (void)x30060039; gdcm::TagToType<0x3006,0x0040> x30060040; (void)x30060040; gdcm::TagToType<0x3006,0x0042> x30060042; (void)x30060042; gdcm::TagToType<0x3006,0x0044> x30060044; (void)x30060044; gdcm::TagToType<0x3006,0x0045> x30060045; (void)x30060045; gdcm::TagToType<0x3006,0x0046> x30060046; (void)x30060046; gdcm::TagToType<0x3006,0x0048> x30060048; (void)x30060048; gdcm::TagToType<0x3006,0x0049> x30060049; (void)x30060049; gdcm::TagToType<0x3006,0x0050> x30060050; (void)x30060050; gdcm::TagToType<0x3006,0x0080> x30060080; (void)x30060080; gdcm::TagToType<0x3006,0x0082> x30060082; (void)x30060082; gdcm::TagToType<0x3006,0x0084> x30060084; (void)x30060084; gdcm::TagToType<0x3006,0x0085> x30060085; (void)x30060085; gdcm::TagToType<0x3006,0x0086> x30060086; (void)x30060086; gdcm::TagToType<0x3006,0x0088> x30060088; (void)x30060088; gdcm::TagToType<0x3006,0x00a0> x300600a0; (void)x300600a0; gdcm::TagToType<0x3006,0x00a4> x300600a4; (void)x300600a4; gdcm::TagToType<0x3006,0x00a6> x300600a6; (void)x300600a6; gdcm::TagToType<0x3006,0x00b0> x300600b0; (void)x300600b0; gdcm::TagToType<0x3006,0x00b2> x300600b2; (void)x300600b2; gdcm::TagToType<0x3006,0x00b4> x300600b4; (void)x300600b4; gdcm::TagToType<0x3006,0x00b6> x300600b6; (void)x300600b6; gdcm::TagToType<0x3006,0x00b7> x300600b7; (void)x300600b7; gdcm::TagToType<0x3006,0x00b8> x300600b8; (void)x300600b8; gdcm::TagToType<0x3006,0x00c0> x300600c0; (void)x300600c0; gdcm::TagToType<0x3006,0x00c2> x300600c2; (void)x300600c2; gdcm::TagToType<0x3006,0x00c4> x300600c4; (void)x300600c4; gdcm::TagToType<0x3006,0x00c6> x300600c6; (void)x300600c6; gdcm::TagToType<0x3006,0x00c8> x300600c8; (void)x300600c8; gdcm::TagToType<0x3008,0x0010> x30080010; (void)x30080010; gdcm::TagToType<0x3008,0x0012> x30080012; (void)x30080012; gdcm::TagToType<0x3008,0x0014> x30080014; (void)x30080014; gdcm::TagToType<0x3008,0x0016> x30080016; (void)x30080016; gdcm::TagToType<0x3008,0x0020> x30080020; (void)x30080020; gdcm::TagToType<0x3008,0x0021> x30080021; (void)x30080021; gdcm::TagToType<0x3008,0x0022> x30080022; (void)x30080022; gdcm::TagToType<0x3008,0x0024> x30080024; (void)x30080024; gdcm::TagToType<0x3008,0x0025> x30080025; (void)x30080025; gdcm::TagToType<0x3008,0x002a> x3008002a; (void)x3008002a; gdcm::TagToType<0x3008,0x002b> x3008002b; (void)x3008002b; gdcm::TagToType<0x3008,0x002c> x3008002c; (void)x3008002c; gdcm::TagToType<0x3008,0x0030> x30080030; (void)x30080030; gdcm::TagToType<0x3008,0x0032> x30080032; (void)x30080032; gdcm::TagToType<0x3008,0x0033> x30080033; (void)x30080033; gdcm::TagToType<0x3008,0x0036> x30080036; (void)x30080036; gdcm::TagToType<0x3008,0x0037> x30080037; (void)x30080037; gdcm::TagToType<0x3008,0x003a> x3008003a; (void)x3008003a; gdcm::TagToType<0x3008,0x003b> x3008003b; (void)x3008003b; gdcm::TagToType<0x3008,0x0040> x30080040; (void)x30080040; gdcm::TagToType<0x3008,0x0041> x30080041; (void)x30080041; gdcm::TagToType<0x3008,0x0042> x30080042; (void)x30080042; gdcm::TagToType<0x3008,0x0044> x30080044; (void)x30080044; gdcm::TagToType<0x3008,0x0045> x30080045; (void)x30080045; gdcm::TagToType<0x3008,0x0046> x30080046; (void)x30080046; gdcm::TagToType<0x3008,0x0047> x30080047; (void)x30080047; gdcm::TagToType<0x3008,0x0048> x30080048; (void)x30080048; gdcm::TagToType<0x3008,0x0050> x30080050; (void)x30080050; gdcm::TagToType<0x3008,0x0052> x30080052; (void)x30080052; gdcm::TagToType<0x3008,0x0054> x30080054; (void)x30080054; gdcm::TagToType<0x3008,0x0056> x30080056; (void)x30080056; gdcm::TagToType<0x3008,0x005a> x3008005a; (void)x3008005a; gdcm::TagToType<0x3008,0x0060> x30080060; (void)x30080060; gdcm::TagToType<0x3008,0x0061> x30080061; (void)x30080061; gdcm::TagToType<0x3008,0x0062> x30080062; (void)x30080062; gdcm::TagToType<0x3008,0x0063> x30080063; (void)x30080063; gdcm::TagToType<0x3008,0x0064> x30080064; (void)x30080064; gdcm::TagToType<0x3008,0x0065> x30080065; (void)x30080065; gdcm::TagToType<0x3008,0x0066> x30080066; (void)x30080066; gdcm::TagToType<0x3008,0x0068> x30080068; (void)x30080068; gdcm::TagToType<0x3008,0x006a> x3008006a; (void)x3008006a; gdcm::TagToType<0x3008,0x0070> x30080070; (void)x30080070; gdcm::TagToType<0x3008,0x0072> x30080072; (void)x30080072; gdcm::TagToType<0x3008,0x0074> x30080074; (void)x30080074; gdcm::TagToType<0x3008,0x0076> x30080076; (void)x30080076; gdcm::TagToType<0x3008,0x0078> x30080078; (void)x30080078; gdcm::TagToType<0x3008,0x007a> x3008007a; (void)x3008007a; gdcm::TagToType<0x3008,0x0080> x30080080; (void)x30080080; gdcm::TagToType<0x3008,0x0082> x30080082; (void)x30080082; gdcm::TagToType<0x3008,0x0090> x30080090; (void)x30080090; gdcm::TagToType<0x3008,0x0092> x30080092; (void)x30080092; gdcm::TagToType<0x3008,0x00a0> x300800a0; (void)x300800a0; gdcm::TagToType<0x3008,0x00b0> x300800b0; (void)x300800b0; gdcm::TagToType<0x3008,0x00c0> x300800c0; (void)x300800c0; gdcm::TagToType<0x3008,0x00d0> x300800d0; (void)x300800d0; gdcm::TagToType<0x3008,0x00e0> x300800e0; (void)x300800e0; gdcm::TagToType<0x3008,0x00f0> x300800f0; (void)x300800f0; gdcm::TagToType<0x3008,0x00f2> x300800f2; (void)x300800f2; gdcm::TagToType<0x3008,0x00f4> x300800f4; (void)x300800f4; gdcm::TagToType<0x3008,0x00f6> x300800f6; (void)x300800f6; gdcm::TagToType<0x3008,0x0100> x30080100; (void)x30080100; gdcm::TagToType<0x3008,0x0105> x30080105; (void)x30080105; gdcm::TagToType<0x3008,0x0110> x30080110; (void)x30080110; gdcm::TagToType<0x3008,0x0116> x30080116; (void)x30080116; gdcm::TagToType<0x3008,0x0120> x30080120; (void)x30080120; gdcm::TagToType<0x3008,0x0122> x30080122; (void)x30080122; gdcm::TagToType<0x3008,0x0130> x30080130; (void)x30080130; gdcm::TagToType<0x3008,0x0132> x30080132; (void)x30080132; gdcm::TagToType<0x3008,0x0134> x30080134; (void)x30080134; gdcm::TagToType<0x3008,0x0136> x30080136; (void)x30080136; gdcm::TagToType<0x3008,0x0138> x30080138; (void)x30080138; gdcm::TagToType<0x3008,0x013a> x3008013a; (void)x3008013a; gdcm::TagToType<0x3008,0x013c> x3008013c; (void)x3008013c; gdcm::TagToType<0x3008,0x0140> x30080140; (void)x30080140; gdcm::TagToType<0x3008,0x0142> x30080142; (void)x30080142; gdcm::TagToType<0x3008,0x0150> x30080150; (void)x30080150; gdcm::TagToType<0x3008,0x0152> x30080152; (void)x30080152; gdcm::TagToType<0x3008,0x0160> x30080160; (void)x30080160; gdcm::TagToType<0x3008,0x0162> x30080162; (void)x30080162; gdcm::TagToType<0x3008,0x0164> x30080164; (void)x30080164; gdcm::TagToType<0x3008,0x0166> x30080166; (void)x30080166; gdcm::TagToType<0x3008,0x0168> x30080168; (void)x30080168; gdcm::TagToType<0x3008,0x0200> x30080200; (void)x30080200; gdcm::TagToType<0x3008,0x0202> x30080202; (void)x30080202; gdcm::TagToType<0x3008,0x0220> x30080220; (void)x30080220; gdcm::TagToType<0x3008,0x0223> x30080223; (void)x30080223; gdcm::TagToType<0x3008,0x0224> x30080224; (void)x30080224; gdcm::TagToType<0x3008,0x0230> x30080230; (void)x30080230; gdcm::TagToType<0x3008,0x0240> x30080240; (void)x30080240; gdcm::TagToType<0x3008,0x0250> x30080250; (void)x30080250; gdcm::TagToType<0x3008,0x0251> x30080251; (void)x30080251; gdcm::TagToType<0x300a,0x0002> x300a0002; (void)x300a0002; gdcm::TagToType<0x300a,0x0003> x300a0003; (void)x300a0003; gdcm::TagToType<0x300a,0x0004> x300a0004; (void)x300a0004; gdcm::TagToType<0x300a,0x0006> x300a0006; (void)x300a0006; gdcm::TagToType<0x300a,0x0007> x300a0007; (void)x300a0007; gdcm::TagToType<0x300a,0x0009> x300a0009; (void)x300a0009; gdcm::TagToType<0x300a,0x000a> x300a000a; (void)x300a000a; gdcm::TagToType<0x300a,0x000b> x300a000b; (void)x300a000b; gdcm::TagToType<0x300a,0x000c> x300a000c; (void)x300a000c; gdcm::TagToType<0x300a,0x000e> x300a000e; (void)x300a000e; gdcm::TagToType<0x300a,0x0010> x300a0010; (void)x300a0010; gdcm::TagToType<0x300a,0x0012> x300a0012; (void)x300a0012; gdcm::TagToType<0x300a,0x0013> x300a0013; (void)x300a0013; gdcm::TagToType<0x300a,0x0014> x300a0014; (void)x300a0014; gdcm::TagToType<0x300a,0x0015> x300a0015; (void)x300a0015; gdcm::TagToType<0x300a,0x0016> x300a0016; (void)x300a0016; gdcm::TagToType<0x300a,0x0018> x300a0018; (void)x300a0018; gdcm::TagToType<0x300a,0x001a> x300a001a; (void)x300a001a; gdcm::TagToType<0x300a,0x0020> x300a0020; (void)x300a0020; gdcm::TagToType<0x300a,0x0021> x300a0021; (void)x300a0021; gdcm::TagToType<0x300a,0x0022> x300a0022; (void)x300a0022; gdcm::TagToType<0x300a,0x0023> x300a0023; (void)x300a0023; gdcm::TagToType<0x300a,0x0025> x300a0025; (void)x300a0025; gdcm::TagToType<0x300a,0x0026> x300a0026; (void)x300a0026; gdcm::TagToType<0x300a,0x0027> x300a0027; (void)x300a0027; gdcm::TagToType<0x300a,0x0028> x300a0028; (void)x300a0028; gdcm::TagToType<0x300a,0x002a> x300a002a; (void)x300a002a; gdcm::TagToType<0x300a,0x002b> x300a002b; (void)x300a002b; gdcm::TagToType<0x300a,0x002c> x300a002c; (void)x300a002c; gdcm::TagToType<0x300a,0x002d> x300a002d; (void)x300a002d; gdcm::TagToType<0x300a,0x0040> x300a0040; (void)x300a0040; gdcm::TagToType<0x300a,0x0042> x300a0042; (void)x300a0042; gdcm::TagToType<0x300a,0x0043> x300a0043; (void)x300a0043; gdcm::TagToType<0x300a,0x0044> x300a0044; (void)x300a0044; gdcm::TagToType<0x300a,0x0046> x300a0046; (void)x300a0046; gdcm::TagToType<0x300a,0x0048> x300a0048; (void)x300a0048; gdcm::TagToType<0x300a,0x004a> x300a004a; (void)x300a004a; gdcm::TagToType<0x300a,0x004b> x300a004b; (void)x300a004b; gdcm::TagToType<0x300a,0x004c> x300a004c; (void)x300a004c; gdcm::TagToType<0x300a,0x004e> x300a004e; (void)x300a004e; gdcm::TagToType<0x300a,0x004f> x300a004f; (void)x300a004f; gdcm::TagToType<0x300a,0x0050> x300a0050; (void)x300a0050; gdcm::TagToType<0x300a,0x0051> x300a0051; (void)x300a0051; gdcm::TagToType<0x300a,0x0052> x300a0052; (void)x300a0052; gdcm::TagToType<0x300a,0x0053> x300a0053; (void)x300a0053; gdcm::TagToType<0x300a,0x0055> x300a0055; (void)x300a0055; gdcm::TagToType<0x300a,0x0070> x300a0070; (void)x300a0070; gdcm::TagToType<0x300a,0x0071> x300a0071; (void)x300a0071; gdcm::TagToType<0x300a,0x0072> x300a0072; (void)x300a0072; gdcm::TagToType<0x300a,0x0078> x300a0078; (void)x300a0078; gdcm::TagToType<0x300a,0x0079> x300a0079; (void)x300a0079; gdcm::TagToType<0x300a,0x007a> x300a007a; (void)x300a007a; gdcm::TagToType<0x300a,0x007b> x300a007b; (void)x300a007b; gdcm::TagToType<0x300a,0x0080> x300a0080; (void)x300a0080; gdcm::TagToType<0x300a,0x0082> x300a0082; (void)x300a0082; gdcm::TagToType<0x300a,0x0084> x300a0084; (void)x300a0084; gdcm::TagToType<0x300a,0x0086> x300a0086; (void)x300a0086; gdcm::TagToType<0x300a,0x0088> x300a0088; (void)x300a0088; gdcm::TagToType<0x300a,0x0089> x300a0089; (void)x300a0089; gdcm::TagToType<0x300a,0x008a> x300a008a; (void)x300a008a; gdcm::TagToType<0x300a,0x00a0> x300a00a0; (void)x300a00a0; gdcm::TagToType<0x300a,0x00a2> x300a00a2; (void)x300a00a2; gdcm::TagToType<0x300a,0x00a4> x300a00a4; (void)x300a00a4; gdcm::TagToType<0x300a,0x00b0> x300a00b0; (void)x300a00b0; gdcm::TagToType<0x300a,0x00b2> x300a00b2; (void)x300a00b2; gdcm::TagToType<0x300a,0x00b3> x300a00b3; (void)x300a00b3; gdcm::TagToType<0x300a,0x00b4> x300a00b4; (void)x300a00b4; gdcm::TagToType<0x300a,0x00b6> x300a00b6; (void)x300a00b6; gdcm::TagToType<0x300a,0x00b8> x300a00b8; (void)x300a00b8; gdcm::TagToType<0x300a,0x00ba> x300a00ba; (void)x300a00ba; gdcm::TagToType<0x300a,0x00bb> x300a00bb; (void)x300a00bb; gdcm::TagToType<0x300a,0x00bc> x300a00bc; (void)x300a00bc; gdcm::TagToType<0x300a,0x00be> x300a00be; (void)x300a00be; gdcm::TagToType<0x300a,0x00c0> x300a00c0; (void)x300a00c0; gdcm::TagToType<0x300a,0x00c2> x300a00c2; (void)x300a00c2; gdcm::TagToType<0x300a,0x00c3> x300a00c3; (void)x300a00c3; gdcm::TagToType<0x300a,0x00c4> x300a00c4; (void)x300a00c4; gdcm::TagToType<0x300a,0x00c6> x300a00c6; (void)x300a00c6; gdcm::TagToType<0x300a,0x00c7> x300a00c7; (void)x300a00c7; gdcm::TagToType<0x300a,0x00c8> x300a00c8; (void)x300a00c8; gdcm::TagToType<0x300a,0x00ca> x300a00ca; (void)x300a00ca; gdcm::TagToType<0x300a,0x00cc> x300a00cc; (void)x300a00cc; gdcm::TagToType<0x300a,0x00ce> x300a00ce; (void)x300a00ce; gdcm::TagToType<0x300a,0x00d0> x300a00d0; (void)x300a00d0; gdcm::TagToType<0x300a,0x00d1> x300a00d1; (void)x300a00d1; gdcm::TagToType<0x300a,0x00d2> x300a00d2; (void)x300a00d2; gdcm::TagToType<0x300a,0x00d3> x300a00d3; (void)x300a00d3; gdcm::TagToType<0x300a,0x00d4> x300a00d4; (void)x300a00d4; gdcm::TagToType<0x300a,0x00d5> x300a00d5; (void)x300a00d5; gdcm::TagToType<0x300a,0x00d6> x300a00d6; (void)x300a00d6; gdcm::TagToType<0x300a,0x00d7> x300a00d7; (void)x300a00d7; gdcm::TagToType<0x300a,0x00d8> x300a00d8; (void)x300a00d8; gdcm::TagToType<0x300a,0x00d9> x300a00d9; (void)x300a00d9; gdcm::TagToType<0x300a,0x00da> x300a00da; (void)x300a00da; gdcm::TagToType<0x300a,0x00db> x300a00db; (void)x300a00db; gdcm::TagToType<0x300a,0x00dc> x300a00dc; (void)x300a00dc; gdcm::TagToType<0x300a,0x00dd> x300a00dd; (void)x300a00dd; gdcm::TagToType<0x300a,0x00e0> x300a00e0; (void)x300a00e0; gdcm::TagToType<0x300a,0x00e1> x300a00e1; (void)x300a00e1; gdcm::TagToType<0x300a,0x00e2> x300a00e2; (void)x300a00e2; gdcm::TagToType<0x300a,0x00e3> x300a00e3; (void)x300a00e3; gdcm::TagToType<0x300a,0x00e4> x300a00e4; (void)x300a00e4; gdcm::TagToType<0x300a,0x00e5> x300a00e5; (void)x300a00e5; gdcm::TagToType<0x300a,0x00e6> x300a00e6; (void)x300a00e6; gdcm::TagToType<0x300a,0x00e7> x300a00e7; (void)x300a00e7; gdcm::TagToType<0x300a,0x00e8> x300a00e8; (void)x300a00e8; gdcm::TagToType<0x300a,0x00e9> x300a00e9; (void)x300a00e9; gdcm::TagToType<0x300a,0x00ea> x300a00ea; (void)x300a00ea; gdcm::TagToType<0x300a,0x00eb> x300a00eb; (void)x300a00eb; gdcm::TagToType<0x300a,0x00ec> x300a00ec; (void)x300a00ec; gdcm::TagToType<0x300a,0x00ed> x300a00ed; (void)x300a00ed; gdcm::TagToType<0x300a,0x00ee> x300a00ee; (void)x300a00ee; gdcm::TagToType<0x300a,0x00f0> x300a00f0; (void)x300a00f0; gdcm::TagToType<0x300a,0x00f2> x300a00f2; (void)x300a00f2; gdcm::TagToType<0x300a,0x00f3> x300a00f3; (void)x300a00f3; gdcm::TagToType<0x300a,0x00f4> x300a00f4; (void)x300a00f4; gdcm::TagToType<0x300a,0x00f5> x300a00f5; (void)x300a00f5; gdcm::TagToType<0x300a,0x00f6> x300a00f6; (void)x300a00f6; gdcm::TagToType<0x300a,0x00f7> x300a00f7; (void)x300a00f7; gdcm::TagToType<0x300a,0x00f8> x300a00f8; (void)x300a00f8; gdcm::TagToType<0x300a,0x00f9> x300a00f9; (void)x300a00f9; gdcm::TagToType<0x300a,0x00fa> x300a00fa; (void)x300a00fa; gdcm::TagToType<0x300a,0x00fb> x300a00fb; (void)x300a00fb; gdcm::TagToType<0x300a,0x00fc> x300a00fc; (void)x300a00fc; gdcm::TagToType<0x300a,0x00fe> x300a00fe; (void)x300a00fe; gdcm::TagToType<0x300a,0x0100> x300a0100; (void)x300a0100; gdcm::TagToType<0x300a,0x0102> x300a0102; (void)x300a0102; gdcm::TagToType<0x300a,0x0104> x300a0104; (void)x300a0104; gdcm::TagToType<0x300a,0x0106> x300a0106; (void)x300a0106; gdcm::TagToType<0x300a,0x0107> x300a0107; (void)x300a0107; gdcm::TagToType<0x300a,0x0108> x300a0108; (void)x300a0108; gdcm::TagToType<0x300a,0x0109> x300a0109; (void)x300a0109; gdcm::TagToType<0x300a,0x010a> x300a010a; (void)x300a010a; gdcm::TagToType<0x300a,0x010c> x300a010c; (void)x300a010c; gdcm::TagToType<0x300a,0x010e> x300a010e; (void)x300a010e; gdcm::TagToType<0x300a,0x0110> x300a0110; (void)x300a0110; gdcm::TagToType<0x300a,0x0111> x300a0111; (void)x300a0111; gdcm::TagToType<0x300a,0x0112> x300a0112; (void)x300a0112; gdcm::TagToType<0x300a,0x0114> x300a0114; (void)x300a0114; gdcm::TagToType<0x300a,0x0115> x300a0115; (void)x300a0115; gdcm::TagToType<0x300a,0x0116> x300a0116; (void)x300a0116; gdcm::TagToType<0x300a,0x0118> x300a0118; (void)x300a0118; gdcm::TagToType<0x300a,0x011a> x300a011a; (void)x300a011a; gdcm::TagToType<0x300a,0x011c> x300a011c; (void)x300a011c; gdcm::TagToType<0x300a,0x011e> x300a011e; (void)x300a011e; gdcm::TagToType<0x300a,0x011f> x300a011f; (void)x300a011f; gdcm::TagToType<0x300a,0x0120> x300a0120; (void)x300a0120; gdcm::TagToType<0x300a,0x0121> x300a0121; (void)x300a0121; gdcm::TagToType<0x300a,0x0122> x300a0122; (void)x300a0122; gdcm::TagToType<0x300a,0x0123> x300a0123; (void)x300a0123; gdcm::TagToType<0x300a,0x0124> x300a0124; (void)x300a0124; gdcm::TagToType<0x300a,0x0125> x300a0125; (void)x300a0125; gdcm::TagToType<0x300a,0x0126> x300a0126; (void)x300a0126; gdcm::TagToType<0x300a,0x0128> x300a0128; (void)x300a0128; gdcm::TagToType<0x300a,0x0129> x300a0129; (void)x300a0129; gdcm::TagToType<0x300a,0x012a> x300a012a; (void)x300a012a; gdcm::TagToType<0x300a,0x012c> x300a012c; (void)x300a012c; gdcm::TagToType<0x300a,0x012e> x300a012e; (void)x300a012e; gdcm::TagToType<0x300a,0x0130> x300a0130; (void)x300a0130; gdcm::TagToType<0x300a,0x0134> x300a0134; (void)x300a0134; gdcm::TagToType<0x300a,0x0140> x300a0140; (void)x300a0140; gdcm::TagToType<0x300a,0x0142> x300a0142; (void)x300a0142; gdcm::TagToType<0x300a,0x0144> x300a0144; (void)x300a0144; gdcm::TagToType<0x300a,0x0146> x300a0146; (void)x300a0146; gdcm::TagToType<0x300a,0x0148> x300a0148; (void)x300a0148; gdcm::TagToType<0x300a,0x014a> x300a014a; (void)x300a014a; gdcm::TagToType<0x300a,0x014c> x300a014c; (void)x300a014c; gdcm::TagToType<0x300a,0x014e> x300a014e; (void)x300a014e; gdcm::TagToType<0x300a,0x0180> x300a0180; (void)x300a0180; gdcm::TagToType<0x300a,0x0182> x300a0182; (void)x300a0182; gdcm::TagToType<0x300a,0x0183> x300a0183; (void)x300a0183; gdcm::TagToType<0x300a,0x0184> x300a0184; (void)x300a0184; gdcm::TagToType<0x300a,0x0190> x300a0190; (void)x300a0190; gdcm::TagToType<0x300a,0x0192> x300a0192; (void)x300a0192; gdcm::TagToType<0x300a,0x0194> x300a0194; (void)x300a0194; gdcm::TagToType<0x300a,0x0196> x300a0196; (void)x300a0196; gdcm::TagToType<0x300a,0x0198> x300a0198; (void)x300a0198; gdcm::TagToType<0x300a,0x0199> x300a0199; (void)x300a0199; gdcm::TagToType<0x300a,0x019a> x300a019a; (void)x300a019a; gdcm::TagToType<0x300a,0x01a0> x300a01a0; (void)x300a01a0; gdcm::TagToType<0x300a,0x01a2> x300a01a2; (void)x300a01a2; gdcm::TagToType<0x300a,0x01a4> x300a01a4; (void)x300a01a4; gdcm::TagToType<0x300a,0x01a6> x300a01a6; (void)x300a01a6; gdcm::TagToType<0x300a,0x01a8> x300a01a8; (void)x300a01a8; gdcm::TagToType<0x300a,0x01b0> x300a01b0; (void)x300a01b0; gdcm::TagToType<0x300a,0x01b2> x300a01b2; (void)x300a01b2; gdcm::TagToType<0x300a,0x01b4> x300a01b4; (void)x300a01b4; gdcm::TagToType<0x300a,0x01b6> x300a01b6; (void)x300a01b6; gdcm::TagToType<0x300a,0x01b8> x300a01b8; (void)x300a01b8; gdcm::TagToType<0x300a,0x01ba> x300a01ba; (void)x300a01ba; gdcm::TagToType<0x300a,0x01bc> x300a01bc; (void)x300a01bc; gdcm::TagToType<0x300a,0x01d0> x300a01d0; (void)x300a01d0; gdcm::TagToType<0x300a,0x01d2> x300a01d2; (void)x300a01d2; gdcm::TagToType<0x300a,0x01d4> x300a01d4; (void)x300a01d4; gdcm::TagToType<0x300a,0x01d6> x300a01d6; (void)x300a01d6; gdcm::TagToType<0x300a,0x0200> x300a0200; (void)x300a0200; gdcm::TagToType<0x300a,0x0202> x300a0202; (void)x300a0202; gdcm::TagToType<0x300a,0x0206> x300a0206; (void)x300a0206; gdcm::TagToType<0x300a,0x0210> x300a0210; (void)x300a0210; gdcm::TagToType<0x300a,0x0212> x300a0212; (void)x300a0212; gdcm::TagToType<0x300a,0x0214> x300a0214; (void)x300a0214; gdcm::TagToType<0x300a,0x0216> x300a0216; (void)x300a0216; gdcm::TagToType<0x300a,0x0218> x300a0218; (void)x300a0218; gdcm::TagToType<0x300a,0x021a> x300a021a; (void)x300a021a; gdcm::TagToType<0x300a,0x0222> x300a0222; (void)x300a0222; gdcm::TagToType<0x300a,0x0224> x300a0224; (void)x300a0224; gdcm::TagToType<0x300a,0x0226> x300a0226; (void)x300a0226; gdcm::TagToType<0x300a,0x0228> x300a0228; (void)x300a0228; gdcm::TagToType<0x300a,0x0229> x300a0229; (void)x300a0229; gdcm::TagToType<0x300a,0x022a> x300a022a; (void)x300a022a; gdcm::TagToType<0x300a,0x022b> x300a022b; (void)x300a022b; gdcm::TagToType<0x300a,0x022c> x300a022c; (void)x300a022c; gdcm::TagToType<0x300a,0x022e> x300a022e; (void)x300a022e; gdcm::TagToType<0x300a,0x0230> x300a0230; (void)x300a0230; gdcm::TagToType<0x300a,0x0232> x300a0232; (void)x300a0232; gdcm::TagToType<0x300a,0x0234> x300a0234; (void)x300a0234; gdcm::TagToType<0x300a,0x0236> x300a0236; (void)x300a0236; gdcm::TagToType<0x300a,0x0238> x300a0238; (void)x300a0238; gdcm::TagToType<0x300a,0x0240> x300a0240; (void)x300a0240; gdcm::TagToType<0x300a,0x0242> x300a0242; (void)x300a0242; gdcm::TagToType<0x300a,0x0244> x300a0244; (void)x300a0244; gdcm::TagToType<0x300a,0x0250> x300a0250; (void)x300a0250; gdcm::TagToType<0x300a,0x0260> x300a0260; (void)x300a0260; gdcm::TagToType<0x300a,0x0262> x300a0262; (void)x300a0262; gdcm::TagToType<0x300a,0x0263> x300a0263; (void)x300a0263; gdcm::TagToType<0x300a,0x0264> x300a0264; (void)x300a0264; gdcm::TagToType<0x300a,0x0266> x300a0266; (void)x300a0266; gdcm::TagToType<0x300a,0x026a> x300a026a; (void)x300a026a; gdcm::TagToType<0x300a,0x026c> x300a026c; (void)x300a026c; gdcm::TagToType<0x300a,0x0280> x300a0280; (void)x300a0280; gdcm::TagToType<0x300a,0x0282> x300a0282; (void)x300a0282; gdcm::TagToType<0x300a,0x0284> x300a0284; (void)x300a0284; gdcm::TagToType<0x300a,0x0286> x300a0286; (void)x300a0286; gdcm::TagToType<0x300a,0x0288> x300a0288; (void)x300a0288; gdcm::TagToType<0x300a,0x028a> x300a028a; (void)x300a028a; gdcm::TagToType<0x300a,0x028c> x300a028c; (void)x300a028c; gdcm::TagToType<0x300a,0x0290> x300a0290; (void)x300a0290; gdcm::TagToType<0x300a,0x0291> x300a0291; (void)x300a0291; gdcm::TagToType<0x300a,0x0292> x300a0292; (void)x300a0292; gdcm::TagToType<0x300a,0x0294> x300a0294; (void)x300a0294; gdcm::TagToType<0x300a,0x0296> x300a0296; (void)x300a0296; gdcm::TagToType<0x300a,0x0298> x300a0298; (void)x300a0298; gdcm::TagToType<0x300a,0x029c> x300a029c; (void)x300a029c; gdcm::TagToType<0x300a,0x029e> x300a029e; (void)x300a029e; gdcm::TagToType<0x300a,0x02a0> x300a02a0; (void)x300a02a0; gdcm::TagToType<0x300a,0x02a2> x300a02a2; (void)x300a02a2; gdcm::TagToType<0x300a,0x02a4> x300a02a4; (void)x300a02a4; gdcm::TagToType<0x300a,0x02b0> x300a02b0; (void)x300a02b0; gdcm::TagToType<0x300a,0x02b2> x300a02b2; (void)x300a02b2; gdcm::TagToType<0x300a,0x02b3> x300a02b3; (void)x300a02b3; gdcm::TagToType<0x300a,0x02b4> x300a02b4; (void)x300a02b4; gdcm::TagToType<0x300a,0x02b8> x300a02b8; (void)x300a02b8; gdcm::TagToType<0x300a,0x02ba> x300a02ba; (void)x300a02ba; gdcm::TagToType<0x300a,0x02c8> x300a02c8; (void)x300a02c8; gdcm::TagToType<0x300a,0x02d0> x300a02d0; (void)x300a02d0; gdcm::TagToType<0x300a,0x02d2> x300a02d2; (void)x300a02d2; gdcm::TagToType<0x300a,0x02d4> x300a02d4; (void)x300a02d4; gdcm::TagToType<0x300a,0x02d6> x300a02d6; (void)x300a02d6; gdcm::TagToType<0x300a,0x02e0> x300a02e0; (void)x300a02e0; gdcm::TagToType<0x300a,0x02e1> x300a02e1; (void)x300a02e1; gdcm::TagToType<0x300a,0x02e2> x300a02e2; (void)x300a02e2; gdcm::TagToType<0x300a,0x02e3> x300a02e3; (void)x300a02e3; gdcm::TagToType<0x300a,0x02e4> x300a02e4; (void)x300a02e4; gdcm::TagToType<0x300a,0x02e5> x300a02e5; (void)x300a02e5; gdcm::TagToType<0x300a,0x02e6> x300a02e6; (void)x300a02e6; gdcm::TagToType<0x300a,0x02e7> x300a02e7; (void)x300a02e7; gdcm::TagToType<0x300a,0x02e8> x300a02e8; (void)x300a02e8; gdcm::TagToType<0x300a,0x02ea> x300a02ea; (void)x300a02ea; gdcm::TagToType<0x300a,0x02eb> x300a02eb; (void)x300a02eb; gdcm::TagToType<0x300a,0x0302> x300a0302; (void)x300a0302; gdcm::TagToType<0x300a,0x0304> x300a0304; (void)x300a0304; gdcm::TagToType<0x300a,0x0306> x300a0306; (void)x300a0306; gdcm::TagToType<0x300a,0x0308> x300a0308; (void)x300a0308; gdcm::TagToType<0x300a,0x030a> x300a030a; (void)x300a030a; gdcm::TagToType<0x300a,0x030c> x300a030c; (void)x300a030c; gdcm::TagToType<0x300a,0x030d> x300a030d; (void)x300a030d; gdcm::TagToType<0x300a,0x030f> x300a030f; (void)x300a030f; gdcm::TagToType<0x300a,0x0312> x300a0312; (void)x300a0312; gdcm::TagToType<0x300a,0x0314> x300a0314; (void)x300a0314; gdcm::TagToType<0x300a,0x0316> x300a0316; (void)x300a0316; gdcm::TagToType<0x300a,0x0318> x300a0318; (void)x300a0318; gdcm::TagToType<0x300a,0x0320> x300a0320; (void)x300a0320; gdcm::TagToType<0x300a,0x0322> x300a0322; (void)x300a0322; gdcm::TagToType<0x300a,0x0330> x300a0330; (void)x300a0330; gdcm::TagToType<0x300a,0x0332> x300a0332; (void)x300a0332; gdcm::TagToType<0x300a,0x0334> x300a0334; (void)x300a0334; gdcm::TagToType<0x300a,0x0336> x300a0336; (void)x300a0336; gdcm::TagToType<0x300a,0x0338> x300a0338; (void)x300a0338; gdcm::TagToType<0x300a,0x033a> x300a033a; (void)x300a033a; gdcm::TagToType<0x300a,0x033c> x300a033c; (void)x300a033c; gdcm::TagToType<0x300a,0x0340> x300a0340; (void)x300a0340; gdcm::TagToType<0x300a,0x0342> x300a0342; (void)x300a0342; gdcm::TagToType<0x300a,0x0344> x300a0344; (void)x300a0344; gdcm::TagToType<0x300a,0x0346> x300a0346; (void)x300a0346; gdcm::TagToType<0x300a,0x0348> x300a0348; (void)x300a0348; gdcm::TagToType<0x300a,0x034a> x300a034a; (void)x300a034a; gdcm::TagToType<0x300a,0x034c> x300a034c; (void)x300a034c; gdcm::TagToType<0x300a,0x0350> x300a0350; (void)x300a0350; gdcm::TagToType<0x300a,0x0352> x300a0352; (void)x300a0352; gdcm::TagToType<0x300a,0x0354> x300a0354; (void)x300a0354; gdcm::TagToType<0x300a,0x0356> x300a0356; (void)x300a0356; gdcm::TagToType<0x300a,0x0358> x300a0358; (void)x300a0358; gdcm::TagToType<0x300a,0x035a> x300a035a; (void)x300a035a; gdcm::TagToType<0x300a,0x0360> x300a0360; (void)x300a0360; gdcm::TagToType<0x300a,0x0362> x300a0362; (void)x300a0362; gdcm::TagToType<0x300a,0x0364> x300a0364; (void)x300a0364; gdcm::TagToType<0x300a,0x0366> x300a0366; (void)x300a0366; gdcm::TagToType<0x300a,0x0370> x300a0370; (void)x300a0370; gdcm::TagToType<0x300a,0x0372> x300a0372; (void)x300a0372; gdcm::TagToType<0x300a,0x0374> x300a0374; (void)x300a0374; gdcm::TagToType<0x300a,0x0380> x300a0380; (void)x300a0380; gdcm::TagToType<0x300a,0x0382> x300a0382; (void)x300a0382; gdcm::TagToType<0x300a,0x0384> x300a0384; (void)x300a0384; gdcm::TagToType<0x300a,0x0386> x300a0386; (void)x300a0386; gdcm::TagToType<0x300a,0x0388> x300a0388; (void)x300a0388; gdcm::TagToType<0x300a,0x038a> x300a038a; (void)x300a038a; gdcm::TagToType<0x300a,0x0390> x300a0390; (void)x300a0390; gdcm::TagToType<0x300a,0x0392> x300a0392; (void)x300a0392; gdcm::TagToType<0x300a,0x0394> x300a0394; (void)x300a0394; gdcm::TagToType<0x300a,0x0396> x300a0396; (void)x300a0396; gdcm::TagToType<0x300a,0x0398> x300a0398; (void)x300a0398; gdcm::TagToType<0x300a,0x039a> x300a039a; (void)x300a039a; gdcm::TagToType<0x300a,0x03a0> x300a03a0; (void)x300a03a0; gdcm::TagToType<0x300a,0x03a2> x300a03a2; (void)x300a03a2; gdcm::TagToType<0x300a,0x03a4> x300a03a4; (void)x300a03a4; gdcm::TagToType<0x300a,0x03a6> x300a03a6; (void)x300a03a6; gdcm::TagToType<0x300a,0x03a8> x300a03a8; (void)x300a03a8; gdcm::TagToType<0x300a,0x03aa> x300a03aa; (void)x300a03aa; gdcm::TagToType<0x300a,0x03ac> x300a03ac; (void)x300a03ac; gdcm::TagToType<0x300a,0x0401> x300a0401; (void)x300a0401; gdcm::TagToType<0x300a,0x0402> x300a0402; (void)x300a0402; gdcm::TagToType<0x300a,0x0410> x300a0410; (void)x300a0410; gdcm::TagToType<0x300a,0x0412> x300a0412; (void)x300a0412; gdcm::TagToType<0x300a,0x0420> x300a0420; (void)x300a0420; gdcm::TagToType<0x300a,0x0421> x300a0421; (void)x300a0421; gdcm::TagToType<0x300a,0x0422> x300a0422; (void)x300a0422; gdcm::TagToType<0x300a,0x0423> x300a0423; (void)x300a0423; gdcm::TagToType<0x300a,0x0424> x300a0424; (void)x300a0424; gdcm::TagToType<0x300c,0x0002> x300c0002; (void)x300c0002; gdcm::TagToType<0x300c,0x0004> x300c0004; (void)x300c0004; gdcm::TagToType<0x300c,0x0006> x300c0006; (void)x300c0006; gdcm::TagToType<0x300c,0x0007> x300c0007; (void)x300c0007; gdcm::TagToType<0x300c,0x0008> x300c0008; (void)x300c0008; gdcm::TagToType<0x300c,0x0009> x300c0009; (void)x300c0009; gdcm::TagToType<0x300c,0x000a> x300c000a; (void)x300c000a; gdcm::TagToType<0x300c,0x000c> x300c000c; (void)x300c000c; gdcm::TagToType<0x300c,0x000e> x300c000e; (void)x300c000e; gdcm::TagToType<0x300c,0x0020> x300c0020; (void)x300c0020; gdcm::TagToType<0x300c,0x0022> x300c0022; (void)x300c0022; gdcm::TagToType<0x300c,0x0040> x300c0040; (void)x300c0040; gdcm::TagToType<0x300c,0x0042> x300c0042; (void)x300c0042; gdcm::TagToType<0x300c,0x0050> x300c0050; (void)x300c0050; gdcm::TagToType<0x300c,0x0051> x300c0051; (void)x300c0051; gdcm::TagToType<0x300c,0x0055> x300c0055; (void)x300c0055; gdcm::TagToType<0x300c,0x0060> x300c0060; (void)x300c0060; gdcm::TagToType<0x300c,0x006a> x300c006a; (void)x300c006a; gdcm::TagToType<0x300c,0x0080> x300c0080; (void)x300c0080; gdcm::TagToType<0x300c,0x00a0> x300c00a0; (void)x300c00a0; gdcm::TagToType<0x300c,0x00b0> x300c00b0; (void)x300c00b0; gdcm::TagToType<0x300c,0x00c0> x300c00c0; (void)x300c00c0; gdcm::TagToType<0x300c,0x00d0> x300c00d0; (void)x300c00d0; gdcm::TagToType<0x300c,0x00e0> x300c00e0; (void)x300c00e0; gdcm::TagToType<0x300c,0x00f0> x300c00f0; (void)x300c00f0; gdcm::TagToType<0x300c,0x00f2> x300c00f2; (void)x300c00f2; gdcm::TagToType<0x300c,0x00f4> x300c00f4; (void)x300c00f4; gdcm::TagToType<0x300c,0x00f6> x300c00f6; (void)x300c00f6; gdcm::TagToType<0x300c,0x0100> x300c0100; (void)x300c0100; gdcm::TagToType<0x300c,0x0102> x300c0102; (void)x300c0102; gdcm::TagToType<0x300c,0x0104> x300c0104; (void)x300c0104; gdcm::TagToType<0x300e,0x0002> x300e0002; (void)x300e0002; gdcm::TagToType<0x300e,0x0004> x300e0004; (void)x300e0004; gdcm::TagToType<0x300e,0x0005> x300e0005; (void)x300e0005; gdcm::TagToType<0x300e,0x0008> x300e0008; (void)x300e0008; gdcm::TagToType<0x4000,0x0010> x40000010; (void)x40000010; gdcm::TagToType<0x4000,0x4000> x40004000; (void)x40004000; gdcm::TagToType<0x4008,0x0040> x40080040; (void)x40080040; gdcm::TagToType<0x4008,0x0042> x40080042; (void)x40080042; gdcm::TagToType<0x4008,0x0050> x40080050; (void)x40080050; gdcm::TagToType<0x4008,0x0100> x40080100; (void)x40080100; gdcm::TagToType<0x4008,0x0101> x40080101; (void)x40080101; gdcm::TagToType<0x4008,0x0102> x40080102; (void)x40080102; gdcm::TagToType<0x4008,0x0103> x40080103; (void)x40080103; gdcm::TagToType<0x4008,0x0108> x40080108; (void)x40080108; gdcm::TagToType<0x4008,0x0109> x40080109; (void)x40080109; gdcm::TagToType<0x4008,0x010a> x4008010a; (void)x4008010a; gdcm::TagToType<0x4008,0x010b> x4008010b; (void)x4008010b; gdcm::TagToType<0x4008,0x010c> x4008010c; (void)x4008010c; gdcm::TagToType<0x4008,0x0111> x40080111; (void)x40080111; gdcm::TagToType<0x4008,0x0112> x40080112; (void)x40080112; gdcm::TagToType<0x4008,0x0113> x40080113; (void)x40080113; gdcm::TagToType<0x4008,0x0114> x40080114; (void)x40080114; gdcm::TagToType<0x4008,0x0115> x40080115; (void)x40080115; gdcm::TagToType<0x4008,0x0117> x40080117; (void)x40080117; gdcm::TagToType<0x4008,0x0118> x40080118; (void)x40080118; gdcm::TagToType<0x4008,0x0119> x40080119; (void)x40080119; gdcm::TagToType<0x4008,0x011a> x4008011a; (void)x4008011a; gdcm::TagToType<0x4008,0x0200> x40080200; (void)x40080200; gdcm::TagToType<0x4008,0x0202> x40080202; (void)x40080202; gdcm::TagToType<0x4008,0x0210> x40080210; (void)x40080210; gdcm::TagToType<0x4008,0x0212> x40080212; (void)x40080212; gdcm::TagToType<0x4008,0x0300> x40080300; (void)x40080300; gdcm::TagToType<0x4008,0x4000> x40084000; (void)x40084000; gdcm::TagToType<0x4ffe,0x0001> x4ffe0001; (void)x4ffe0001; gdcm::TagToType<0x5000,0x0005> x50000005; (void)x50000005; gdcm::TagToType<0x5000,0x0010> x50000010; (void)x50000010; gdcm::TagToType<0x5000,0x0020> x50000020; (void)x50000020; gdcm::TagToType<0x5000,0x0022> x50000022; (void)x50000022; gdcm::TagToType<0x5000,0x0030> x50000030; (void)x50000030; gdcm::TagToType<0x5000,0x0040> x50000040; (void)x50000040; gdcm::TagToType<0x5000,0x0103> x50000103; (void)x50000103; gdcm::TagToType<0x5000,0x0104> x50000104; (void)x50000104; gdcm::TagToType<0x5000,0x0105> x50000105; (void)x50000105; gdcm::TagToType<0x5000,0x0106> x50000106; (void)x50000106; gdcm::TagToType<0x5000,0x0110> x50000110; (void)x50000110; gdcm::TagToType<0x5000,0x0112> x50000112; (void)x50000112; gdcm::TagToType<0x5000,0x0114> x50000114; (void)x50000114; gdcm::TagToType<0x5000,0x1001> x50001001; (void)x50001001; gdcm::TagToType<0x5000,0x2000> x50002000; (void)x50002000; gdcm::TagToType<0x5000,0x2002> x50002002; (void)x50002002; gdcm::TagToType<0x5000,0x2004> x50002004; (void)x50002004; gdcm::TagToType<0x5000,0x2006> x50002006; (void)x50002006; gdcm::TagToType<0x5000,0x2008> x50002008; (void)x50002008; gdcm::TagToType<0x5000,0x200a> x5000200a; (void)x5000200a; gdcm::TagToType<0x5000,0x200e> x5000200e; (void)x5000200e; gdcm::TagToType<0x5000,0x2500> x50002500; (void)x50002500; gdcm::TagToType<0x5000,0x2600> x50002600; (void)x50002600; gdcm::TagToType<0x5000,0x2610> x50002610; (void)x50002610; gdcm::TagToType<0x5200,0x9229> x52009229; (void)x52009229; gdcm::TagToType<0x5200,0x9230> x52009230; (void)x52009230; gdcm::TagToType<0x5400,0x0100> x54000100; (void)x54000100; gdcm::TagToType<0x5400,0x1004> x54001004; (void)x54001004; gdcm::TagToType<0x5400,0x1006> x54001006; (void)x54001006; gdcm::TagToType<0x5600,0x0010> x56000010; (void)x56000010; gdcm::TagToType<0x5600,0x0020> x56000020; (void)x56000020; gdcm::TagToType<0x6000,0x0010> x60000010; (void)x60000010; gdcm::TagToType<0x6000,0x0011> x60000011; (void)x60000011; gdcm::TagToType<0x6000,0x0012> x60000012; (void)x60000012; gdcm::TagToType<0x6000,0x0015> x60000015; (void)x60000015; gdcm::TagToType<0x6000,0x0022> x60000022; (void)x60000022; gdcm::TagToType<0x6000,0x0040> x60000040; (void)x60000040; gdcm::TagToType<0x6000,0x0045> x60000045; (void)x60000045; gdcm::TagToType<0x6000,0x0050> x60000050; (void)x60000050; gdcm::TagToType<0x6000,0x0051> x60000051; (void)x60000051; gdcm::TagToType<0x6000,0x0052> x60000052; (void)x60000052; gdcm::TagToType<0x6000,0x0060> x60000060; (void)x60000060; gdcm::TagToType<0x6000,0x0061> x60000061; (void)x60000061; gdcm::TagToType<0x6000,0x0062> x60000062; (void)x60000062; gdcm::TagToType<0x6000,0x0063> x60000063; (void)x60000063; gdcm::TagToType<0x6000,0x0066> x60000066; (void)x60000066; gdcm::TagToType<0x6000,0x0068> x60000068; (void)x60000068; gdcm::TagToType<0x6000,0x0069> x60000069; (void)x60000069; gdcm::TagToType<0x6000,0x0100> x60000100; (void)x60000100; gdcm::TagToType<0x6000,0x0102> x60000102; (void)x60000102; gdcm::TagToType<0x6000,0x0110> x60000110; (void)x60000110; gdcm::TagToType<0x6000,0x0200> x60000200; (void)x60000200; gdcm::TagToType<0x6000,0x0800> x60000800; (void)x60000800; gdcm::TagToType<0x6000,0x0802> x60000802; (void)x60000802; gdcm::TagToType<0x6000,0x0803> x60000803; (void)x60000803; gdcm::TagToType<0x6000,0x0804> x60000804; (void)x60000804; gdcm::TagToType<0x6000,0x1001> x60001001; (void)x60001001; gdcm::TagToType<0x6000,0x1100> x60001100; (void)x60001100; gdcm::TagToType<0x6000,0x1101> x60001101; (void)x60001101; gdcm::TagToType<0x6000,0x1102> x60001102; (void)x60001102; gdcm::TagToType<0x6000,0x1103> x60001103; (void)x60001103; gdcm::TagToType<0x6000,0x1200> x60001200; (void)x60001200; gdcm::TagToType<0x6000,0x1201> x60001201; (void)x60001201; gdcm::TagToType<0x6000,0x1202> x60001202; (void)x60001202; gdcm::TagToType<0x6000,0x1203> x60001203; (void)x60001203; gdcm::TagToType<0x6000,0x1301> x60001301; (void)x60001301; gdcm::TagToType<0x6000,0x1302> x60001302; (void)x60001302; gdcm::TagToType<0x6000,0x1303> x60001303; (void)x60001303; gdcm::TagToType<0x6000,0x1500> x60001500; (void)x60001500; gdcm::TagToType<0x6000,0x4000> x60004000; (void)x60004000; gdcm::TagToType<0x7fe0,0x0020> x7fe00020; (void)x7fe00020; gdcm::TagToType<0x7fe0,0x0030> x7fe00030; (void)x7fe00030; gdcm::TagToType<0x7fe0,0x0040> x7fe00040; (void)x7fe00040; gdcm::TagToType<0x7f00,0x0011> x7f000011; (void)x7f000011; gdcm::TagToType<0x7f00,0x0020> x7f000020; (void)x7f000020; gdcm::TagToType<0x7f00,0x0030> x7f000030; (void)x7f000030; gdcm::TagToType<0x7f00,0x0040> x7f000040; (void)x7f000040; gdcm::TagToType<0xfffa,0xfffa> xfffafffa; (void)xfffafffa; gdcm::TagToType<0xfffc,0xfffc> xfffcfffc; (void)xfffcfffc; return 0; } gdcm-3.0.22/Testing/Source/DataDictionary/Cxx/TestDicts.cxx000664 001766 001770 00000003410 14517730450 026023 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDicts.h" #include "gdcmGlobal.h" #include "gdcmDict.h" #include int TestDicts(int, char *[]) { gdcm::Dicts dicts; //const gdcm::Dict &d = dicts.GetPublicDict(); //std::cout << d << std::endl; const gdcm::Global& g = gdcm::GlobalInstance; // get the Part 6 dicts from it: const gdcm::Dicts &ds = g.GetDicts(); const gdcm::Dict &pub = ds.GetPublicDict(); gdcm::Dict::ConstIterator it = pub.Begin(); int ret = 0; std::set names; for( ; it != pub.End(); ++it) { const gdcm::Tag &t = it->first; const gdcm::DictEntry &de = it->second; // A couple of tests: if( t.GetElement() == 0x0 ) { // Check group length if( de.GetVR() != gdcm::VR::UL || de.GetVM() != gdcm::VM::VM1 ) { std::cerr << "Group length issue: Problem with tag: " << t << " " << de << std::endl; ++ret; } } // I need a test that check there is no duplicate name for data elements since python-gdcm // will rely on it if( names.count( de.GetName() ) != 0 ) { //std::cerr << "Name issue: Problem with tag: " << t << " " << de << std::endl; //++ret; } names.insert( de.GetName() ); } return ret; } gdcm-3.0.22/Testing/Source/Data/000775 001766 001770 00000000000 14517731550 020605 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/Data/encrypted_text000664 001766 001770 00000000731 14517730450 023570 0ustar00mmalaterremmalaterre000000 000000 0‚Õ *†H†÷  ‚Æ0‚Â1‚n0‚j0R0E1 0 UAU10U Some-State1!0U Internet Widgits Pty Ltd ¬–mˆxzQ´0  *†H†÷ ‚5"Ú/}¸Rë Tpñ³`¯vìÿñ˜b V»#‹®ª¿¡a2è§å²„zw\ÛÈ©”“·áí€>˜@2„‡5¶¶6D¯·TÐm\ëk…‡²¬ú¦E|ÎPÚ8‚ݵÖUÑyà95å^t¢èÊ'á¬î/tÅKœû×áãUû½WMboÔÏnÂÏ“Tß9&{^:*ÛHH,9q,­˜½3ͰB$·Âǽ³u†êÆoyÔ;ªO–#UÚûq?ÌììkwxÈØ+Fzô¨„m}ÒvêåÄ+fi EâFõòÛàûkÆ@ È¥W?²J¬É·Í3 dº|<î“0K *†H†÷ 0*†H†÷ ›3è®ÙÙž‘€(9†ùæ1Í¥ͪM×J¾ö£»£™{ß°qMÀØz¼8Íá-3ÙçH]‰?gdcm-3.0.22/Testing/Source/Data/certificate.pem000664 001766 001770 00000002502 14517730450 023567 0ustar00mmalaterremmalaterre000000 000000 -----BEGIN CERTIFICATE----- MIIDtTCCAp2gAwIBAgIJAKyWbYh4elG0MA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX aWRnaXRzIFB0eSBMdGQwHhcNMDkwNDI3MDk1NzE1WhcNMTAwNDI3MDk1NzE1WjBF MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB CgKCAQEA4k5GEgO9mI5K2UuywuGxcO4xJdygQlpvL2IS9XEbXOWBEwJZx1tccfzC a929DCijlJE6/f5KBzDNPdLpPt3eyUKB3n7mOos7ATWEFCZgE7RWGRBhIfN2R9LD kLT2eaUhXDzsk7L1qmKPP9nSdAXoUB6sj0EmHrQQWIPEZwGcPcvMUhcUpjD/hnmC X6DAWHVCvE7vhbHntNYFwu1Bmau5ZY6Ywk5lQ/ZTfEYcRD1ZmUB2Wkzv4InvRc1z YbTBpL/Lkft1B9/A7+LzJJRHoNvHaMN5pRF2qFyZW3sb+bh8z8SC0oJNzIbrWZvW M9TEnQ8P+GCw4y68juSvlcLcBsoxCQIDAQABo4GnMIGkMB0GA1UdDgQWBBTNWfHq ZOUwrkeH39jLz0qgBV1LaDB1BgNVHSMEbjBsgBTNWfHqZOUwrkeH39jLz0qgBV1L aKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAKyWbYh4elG0MAwGA1UdEwQF MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAMvT7rwSoHwOUMr1ZnjCYccuBsWND1Vt JvMzELX/IUs2f0BbDVZeyn1NC7VyoAOfvgJwLccK6v49p2J/SbBaAiixlgGAi670 V7VkwMaDKIAR/AEIbORwcRoogHYSft4to1kNcPmYOhiny2VFWSp3Fmoc/egU3Cbo pVH/ixjcCT7q/6MIuklnvULGSOajtE/+fz+KzlX8nZyD22oMk/TtxVsys8F0qWtZ HsGoXUY15xg+HjHcSCOBeU7pAglCyRCLyO3mhAgfE3o4T5HBp4opjfRGDaVd+uPj XRjzAZgfgLQAmiUixyCzzG8wDgpFVdoOcWQ9RcNnR9XgIw5Omas75so= -----END CERTIFICATE----- gdcm-3.0.22/Testing/Source/Data/CMakeLists.txt000664 001766 001770 00000010645 14517730450 023351 0ustar00mmalaterremmalaterre000000 000000 #----------------------------------------------------------------------------- # We need to test the reading of all dicom images in the gdcmData directory # First parse this directory and extract all images set(GDCM_DATA_IMAGE_FILENAMES_GLOB_EXPR "${GDCM_DATA_ROOT}/*.acr" "${GDCM_DATA_ROOT}/*.nema" "${GDCM_DATA_ROOT}/*.dcm" ) set(GDCM_DATA_DICOMDIR_FILENAMES_GLOB_EXPR # Those files do not have any extension, special regex: "${GDCM_DATA_ROOT}/dicomdir*" ) # Case sensitive system: if(UNIX) set(GDCM_DATA_IMAGE_FILENAMES_GLOB_EXPR ${GDCM_DATA_IMAGE_FILENAMES_GLOB_EXPR} "${GDCM_DATA_ROOT}/*.DCM" ) set(GDCM_DATA_DICOMDIR_FILENAMES_GLOB_EXPR ${GDCM_DATA_DICOMDIR_FILENAMES_GLOB_EXPR} "${GDCM_DATA_ROOT}/DICOMDIR*" ) endif() # GLOB expression ! file(GLOB GDCM_DATA_IMAGE_FILENAMES_GLOB ${GDCM_DATA_IMAGE_FILENAMES_GLOB_EXPR} ) # Same for DICOMDIR: file(GLOB GDCM_DATA_DICOMDIR_FILENAMES_GLOB ${GDCM_DATA_DICOMDIR_FILENAMES_GLOB_EXPR} ) set(GDCM_DATA_FILENAMES_GLOB ${GDCM_DATA_IMAGE_FILENAMES_GLOB} ${GDCM_DATA_DICOMDIR_FILENAMES_GLOB} ) # List of images that are technically difficult to read # Hopefully we will soon be able to read them set(BLACK_LIST_READER # grrrrrr do not handle swapping correctly (implicit dataset are such a pain) LIBIDO-16-ACR_NEMA-Volume.dcm # Papyrus: PET-cardio-Multiframe-Papyrus.dcm # No way to read this image: ELSCINT1_LOSSLESS_RICE.dcm # SignedShortLossless has never really been supported anyway: SignedShortLosslessBug.dcm # Would need to process ALL Pixel Data element when decompressing: PET-GE-dicomwrite-PixelDataSQUNv3.dcm # Toshiba US Private Data Storage 1.2.392.200036.9116.7.8.1.1.1 TOSHIBA_MDW_HEADER.dcm # TODO, nasty: PhilipsLosslessRice.dcm # This file is incorrect IM-0001-0066.dcm # Problem with RLE SIEMENS_GBS_III-16-ACR_NEMA_1.acr SIEMENS_GBS_III-16-ACR_NEMA_1-ULis2Bytes.dcm # TestImageChangeTransferSyntax1 MR-MONO2-12-angio-an1.acr # Openjpeg / Part 2: lena512_rot90.j2k.dcm # Remove this one for now: LengthOfItemLarger.dcm # https://github.com/team-charls/charls/issues/16 JPEG_LS_InvalidEscapeSequence_COM_padding.dcm # MITRA_CORNELL MITRA_CORNELL.dcm # FIXME PET-GE-dicomwrite-PixelDataSQUN.dcm ) if(NOT GDCM_USE_PVRG) set(BLACK_LIST_READER # The following should really fails according to JPEG spec, IJG is failing and even when forcing # decompression using IJG output is different from PVRG... # Apparently pvrg likes it this way... # PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm ${BLACK_LIST_READER} PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm ) endif() if(GDCM_WORDS_BIGENDIAN) set(BLACK_LIST_READER ${BLACK_LIST_READER} MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm PHILIPS_Intera-16-MONO2-Uncompress.dcm SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm PICKER-16-MONO2-No_DicomV3_Preamble.dcm ) endif() if(NOT GDCM_SUPPORT_BROKEN_IMPLEMENTATION) set(BLACK_LIST_READER ${BLACK_LIST_READER} GE_GENESIS-16-MONO2-WrongLengthItem.dcm # can't read odd length PHILIPS_GDCM12xBug2.dcm # odd length KODAK-12-MONO1-Odd_Terminated_Sequence.dcmq # odd length PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm # odd length PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm # odd length BugGDCM2_UndefItemWrongVL.dcm # odd length THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm CT-SIEMENS-MissingPixelDataInIconSQ.dcm # odd length 00191113.dcm MR_Philips_Intera_PrivateSequenceImplicitVR.dcm PICKER-16-MONO2-Nested_icon.dcm PHILIPS_GDCM12xBug.dcm # odd length MR_Philips-Intera_BreaksNOSHADOW.dcm NM_Kakadu44_SOTmarkerincons.dcm MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm ) endif() set(GDCM_DATA_FILENAMES) set(GDCM_BLACK_LIST_READER_DATA_FILENAMES) foreach(filename ${GDCM_DATA_FILENAMES_GLOB}) get_filename_component(filename_name ${filename} NAME) string(REGEX MATCH ${filename_name} bad_dicom ${BLACK_LIST_READER}) if(NOT bad_dicom) set(GDCM_DATA_FILENAMES "${GDCM_DATA_FILENAMES}\n\"${filename}\",") else() set(GDCM_BLACK_LIST_READER_DATA_FILENAMES "${GDCM_BLACK_LIST_READER_DATA_FILENAMES}\n\"${filename}\",") endif() endforeach() # Populate GDCM_DATA_FILENAMES: configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/gdcmDataFileNames.cxx.in" "${CMAKE_CURRENT_BINARY_DIR}/gdcmDataFileNames.cxx" ) gdcm-3.0.22/Testing/Source/Data/gdcmSelectedTagsOffsetDataFiles.cxx000664 001766 001770 00000024120 14517730450 027454 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http:/gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* * See TestReaderSelectedTags */ #if 0 struct StreamOffset { const char *filename; std::streamoff offset; }; #endif static const StreamOffset gdcmSelectedTagsOffsetDataFiles[] = { { "SC16BitsAllocated_8BitsStoredJ2K.dcm", 752}, { "SC16BitsAllocated_8BitsStoredJPEG.dcm", 946}, { "CT-MONO2-12-lomb-an2.acr",1222 }, { "LIBIDO-8-ACR_NEMA-Lena_128_128.acr",174 }, { "MR-MONO2-12-an2.acr",1858 }, { "SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs.acr",5056 }, { "gdcm-ACR-LibIDO.acr",174 }, { "gdcm-MR-SIEMENS-16-2.acr",6044 }, { "libido1.0-vol.acr",162 }, { "test.acr",174 }, { "00191113.dcm",922 }, { "012345.002.050.dcm",9592 }, { "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm",41936 }, { "05148044-mr-siemens-avanto-syngo.dcm",55872 }, { "3E768EB7.dcm",3222 }, { "ACUSON-24-YBR_FULL-RLE-b.dcm",2020 }, { "ACUSON-24-YBR_FULL-RLE.dcm",1908 }, { "ALOKA_SSD-8-MONO2-RLE-SQ.dcm",1386 }, { "AMIInvalidPrivateDefinedLengthSQasUN.dcm",12732 }, { "BugGDCM2_UndefItemWrongVL.dcm",9562 }, { "CR-MONO1-10-chest.dcm",768 }, { "CT-MONO2-16-ankle.dcm",1140 }, { "CT-MONO2-16-brain.dcm",1668 }, { "CT-MONO2-16-chest.dcm",1626 }, { "CT-MONO2-16-ort.dcm",1666 }, { "CT-MONO2-8-abdo.dcm",788 }, { "CT-SIEMENS-Icone-With-PaletteColor.dcm",8150 }, { "CT-SIEMENS-MissingPixelDataInIconSQ.dcm",20496 }, { "CT_16b_signed-UsedBits13.dcm",2574 }, { "DCMTK_JPEGExt_12Bits.dcm",784 }, { "DMCPACS_ExplicitImplicit_BogusIOP.dcm",20018 }, { "DX_GE_FALCON_SNOWY-VOI.dcm",104002 }, { "DX_J2K_0Padding.dcm",1482 }, { "D_CLUNIE_CT1_J2KI.dcm",6584 }, { "D_CLUNIE_CT1_J2KR.dcm",6484 }, { "D_CLUNIE_CT1_JLSL.dcm",6452 }, { "D_CLUNIE_CT1_JLSN.dcm",6566 }, { "D_CLUNIE_CT1_JPLL.dcm",6456 }, { "D_CLUNIE_CT1_RLE.dcm",6390 }, { "D_CLUNIE_CT2_JPLL.dcm",1744 }, { "D_CLUNIE_CT2_RLE.dcm",1676 }, { "D_CLUNIE_MR1_JPLL.dcm",1750 }, { "D_CLUNIE_MR1_JPLY.dcm",1836 }, { "D_CLUNIE_MR1_RLE.dcm",1682 }, { "D_CLUNIE_MR2_JPLL.dcm",1946 }, { "D_CLUNIE_MR2_JPLY.dcm",2034 }, { "D_CLUNIE_MR2_RLE.dcm",1878 }, { "D_CLUNIE_MR3_JPLL.dcm",9570 }, { "D_CLUNIE_MR3_JPLY.dcm",9658 }, { "D_CLUNIE_MR3_RLE.dcm",9504 }, { "D_CLUNIE_MR4_JPLL.dcm",1968 }, { "D_CLUNIE_MR4_JPLY.dcm",2056 }, { "D_CLUNIE_MR4_RLE.dcm",1900 }, { "D_CLUNIE_NM1_JPLL.dcm",2890 }, { "D_CLUNIE_NM1_JPLY.dcm",2978 }, { "D_CLUNIE_NM1_RLE.dcm",2826 }, { "D_CLUNIE_RG1_JPLL.dcm",1858 }, { "D_CLUNIE_RG1_RLE.dcm",1794 }, { "D_CLUNIE_RG2_JPLL.dcm",1444 }, { "D_CLUNIE_RG2_JPLY.dcm",1532 }, { "D_CLUNIE_RG2_RLE.dcm",1368 }, { "D_CLUNIE_RG3_JPLL.dcm",1514 }, { "D_CLUNIE_RG3_JPLY.dcm",1602 }, { "D_CLUNIE_RG3_RLE.dcm",1432 }, { "D_CLUNIE_SC1_JPLY.dcm",1340 }, { "D_CLUNIE_SC1_RLE.dcm",1176 }, { "D_CLUNIE_US1_RLE.dcm",1306 }, { "D_CLUNIE_VL1_RLE.dcm",1188 }, { "D_CLUNIE_VL2_RLE.dcm",1186 }, { "D_CLUNIE_VL3_RLE.dcm",1198 }, { "D_CLUNIE_VL4_RLE.dcm",1180 }, { "D_CLUNIE_VL6_RLE.dcm",1198 }, { "D_CLUNIE_XA1_JPLL.dcm",1192 }, { "D_CLUNIE_XA1_JPLY.dcm",1280 }, { "D_CLUNIE_XA1_RLE.dcm",1116 }, { "DermaColorLossLess.dcm",928 }, { "ELSCINT1_JP2vsJ2K.dcm",1808 }, { "ELSCINT1_PMSCT_RLE1.dcm",67912 }, { "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm",9534 }, { "FUJI-10-MONO1-ACR_NEMA_2.dcm",854 }, { "GDCMJ2K_TextGBR.dcm",758 }, { "GE_CT_With_Private_compressed-icon.dcm",10798 }, { "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm",14126 }, { "GE_DLX-8-MONO2-Multiframe.dcm",4976 }, { "GE_DLX-8-MONO2-PrivateSyntax.dcm",2912 }, { "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm",9654 }, { "GE_GENESIS-16-MONO2-WrongLengthItem.dcm",1922 }, { "GE_LOGIQBook-8-RGB-HugePreview.dcm",935596 }, { "GE_MR_0025xx1bProtocolDataBlock.dcm",11870 }, { "GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm",6456 }, { "IM-0001-0066.CommandTag00.dcm",3042 }, { "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm",1132 }, { "JDDICOM_Sample2-dcmdjpeg.dcm",836 }, { "JDDICOM_Sample2.dcm",822 }, { "JPEGDefinedLengthSequenceOfFragments.dcm",2862 }, { "JPEG_LossyYBR.dcm",2366 }, { "KODAK-12-MONO1-Odd_Terminated_Sequence.dcm",9126 }, { "KODAK_CompressedIcon.dcm",8634 }, { "LEADTOOLS_FLOWERS-16-MONO2-JpegLossless.dcm",1932 }, { "LEADTOOLS_FLOWERS-16-MONO2-RLE.dcm",1930 }, { "LEADTOOLS_FLOWERS-16-MONO2-Uncompressed.dcm",1930 }, { "LEADTOOLS_FLOWERS-24-RGB-JpegLossless.dcm",1924 }, { "LEADTOOLS_FLOWERS-24-RGB-JpegLossy.dcm",1924 }, { "LEADTOOLS_FLOWERS-24-RGB-Uncompressed.dcm",1922 }, { "LEADTOOLS_FLOWERS-8-MONO2-JpegLossy.dcm",1932 }, { "LEADTOOLS_FLOWERS-8-MONO2-RLE.dcm",1930 }, { "LEADTOOLS_FLOWERS-8-MONO2-Uncompressed.dcm",1930 }, { "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm",3526 }, { "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm",3526 }, { "LIBIDO-24-ACR_NEMA-Rectangle.dcm",174 }, { "LJPEG_BuginGDCM12.dcm",2236 }, { "MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm",1904 }, { "MAROTECH_CT_JP2Lossy.dcm",33844 }, { "MEDILABInvalidCP246_EVRLESQasUN.dcm",19162 }, { "MR-Brucker-CineTagging-NonSquarePixels.dcm",1530 }, { "MR-MONO2-12-shoulder.dcm",1568 }, { "MR-MONO2-16-head.dcm",1796 }, { "MR-MONO2-8-16x-heart.dcm",908 }, { "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm",42600 }, { "MR-SIEMENS-DICOM-WithOverlays.dcm",42404 }, { "MR16BitsAllocated_8BitsStored.dcm",928 }, { "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm",7696 }, { "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm",20700 }, { "MR_Philips-Intera_BreaksNOSHADOW.dcm",7618 }, { "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm",9500 }, { "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm",7512 }, { "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm",7018 }, { "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm",9264 }, { "MR_SIEMENS_forceLoad29-1010_29-1020.dcm",60556 }, { "MR_Spectroscopy_SIEMENS_OF.dcm",2102344 }, { "NM-MONO2-16-13x-heart.dcm",1222 }, { "NM-PAL-16-PixRep1.dcm", 4456}, { "NM_Kakadu44_SOTmarkerincons.dcm",1564 }, { "OT-MONO2-8-a7.dcm",430 }, { "OT-PAL-8-face.dcm",1646 }, { "OsirixFake16BitsStoredFakeSpacing.dcm",1306 }, { "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm",34538 }, { "PHILIPS_GDCM12xBug.dcm",9330 }, { "PHILIPS_GDCM12xBug2.dcm",9662 }, { "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm",5944 }, { "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm",15366 }, { "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm",6576 }, { "PHILIPS_Intera-16-MONO2-Uncompress.dcm",9264 }, { "PICKER-16-MONO2-Nested_icon.dcm",18220 }, { "PICKER-16-MONO2-No_DicomV3_Preamble.dcm",1398 }, { "PhilipsInteraSeqTermInvLen.dcm",7440 }, { "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm",14964 }, { "RadBWLossLess.dcm",930 }, { "SIEMENS-12-Jpeg_Process_2_4-Lossy-a.dcm",3032 }, { "SIEMENS-MR-RGB-16Bits.dcm",49840 }, { "SIEMENS_CSA2.dcm",104340 }, { "SIEMENS_ImageLocationUN.dcm",6336 }, { "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm",6044 }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm",6422 }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm",6422 }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm",6422 }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm",6422 }, { "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm",5158 }, { "SIEMENS_MAGNETOM-12-MONO2-Uncompressed.dcm",5148 }, { "SIEMENS_MAGNETOM-12-MONO2-VRUN.dcm",5290 }, { "SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm",105714 }, { "SIEMENS_Sonata-12-MONO2-SQ.dcm",51792 }, { "SIEMENS_Sonata-16-MONO2-Value_Multiplicity.dcm",25674 }, { "SignedShortLosslessBug.dcm",1772 }, { "TG18-CH-2k-01.dcm",2300 }, { "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm",1831 }, { "TOSHIBA_J2K_OpenJPEGv2Regression.dcm",2350 }, { "TOSHIBA_J2K_SIZ0_PixRep1.dcm",2334 }, { "TOSHIBA_J2K_SIZ1_PixRep0.dcm",2350 }, { "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm",1122 }, { "TheralysGDCM120Bug.dcm",8438 }, { "US-GE-4AICL142.dcm",14060 }, { "US-IRAD-NoPreambleStartWith0003.dcm",3322 }, { "US-IRAD-NoPreambleStartWith0005.dcm",2482 }, { "US-MONO2-8-8x-execho.dcm",964 }, { "US-PAL-8-10x-echo.dcm",2416 }, { "US-RGB-8-epicard.dcm",1000 }, { "US-RGB-8-esopecho.dcm",892 }, { "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm",4178 }, { "XA-MONO2-8-12x-catheter.dcm",994 }, { "fffc0000UN.dcm",1142 }, { "gdcm-CR-DCMTK-16-NonSamplePerPix.dcm",728 }, { "gdcm-JPEG-Extended.dcm",2934 }, { "gdcm-JPEG-LossLess3a.dcm",2528 }, { "gdcm-JPEG-LossLessThoravision.dcm",3132 }, { "gdcm-MR-PHILIPS-16-Multi-Seq.dcm",35834 }, { "gdcm-MR-PHILIPS-16-NonSquarePixels.dcm",4998 }, { "gdcm-US-ALOKA-16.dcm",258732 }, { "rle16loo.dcm",394214 }, { "rle16sti.dcm",394158 }, { "simpleImageWithIcon.dcm",17466 }, { "undefined_length_un_vr.dcm",9156 }, { "JPEGInvalidSecondFrag.dcm",4788 }, { "lena512_rot90.j2k.dcm",756 }, { "ELSCINT1_PMSCT_RLE1_priv.dcm",298002 }, { "00191113.dcm",922 }, { "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm", 48714 }, { "JPEGNote_empty.dcm", 704 }, { "JPEGLS_CharLS_10742.dcm", 748 }, { "JPEGLosslessYBR_FULL_422.dcm", 802 }, { "JPEGNote_missing.dcm", 596 }, { "JPEGNote_bogus.dcm", 722 }, { "RLEDebianBug816607Orig.dcm", 768 }, { "IllegalGroup2ImplicitTS.dcm", 2264 }, { "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm", 752 }, { "LengthOfItemLarger.dcm", 12748 }, { "GE_MR_0025xx1bProtocolDataBlockXML.dcm",6462 }, { "EmptyIcon_Bug417.dcm",4470}, { "EnhancedWithIPPPerFrameIOPShared.dcm",23212}, { "FUJI-ffff-MONO1-J2K.dcm",2040}, { "JPEGLosslessSeNonZero.dcm",748}, { "US-YBR_FULL_422-EVRLE.dcm",1542}, { "Osirix10vs8BitsStored.dcm",73966}, { "Bug_Siemens_PrivateIconNoItem.dcm",12966}, { "HardcopyColor_YBR_RCT_J2K_PC1.dcm",2614}, { "PET-GE-dicomwrite-PixelDataSQUNv2.dcm",7706}, { "MEDILABValidCP246_EVRLESQasOB.dcm",18996}, { "dicomdir_Acusson_WithPrivate_WithSR",3826 }, { "dicomdir_Pms_WithVisit_WithPrivate_WithStudyComponents",37218 }, { "dicomdir_Pms_With_heavy_embedded_sequence",3003414 }, { "dicomdir_With_embedded_icons",7125212 }, { "DICOMDIR",1112434 }, { "DICOMDIR-Philips-EasyVision-4200-Entries",1297194 }, { "DICOMDIR_MR_B_VA12A",14853880 }, /* Stopping condition */ { nullptr ,0 }, }; gdcm-3.0.22/Testing/Source/Data/privatekey.pem000664 001766 001770 00000003217 14517730450 023474 0ustar00mmalaterremmalaterre000000 000000 -----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAKCAQEA4k5GEgO9mI5K2UuywuGxcO4xJdygQlpvL2IS9XEbXOWBEwJZ x1tccfzCa929DCijlJE6/f5KBzDNPdLpPt3eyUKB3n7mOos7ATWEFCZgE7RWGRBh IfN2R9LDkLT2eaUhXDzsk7L1qmKPP9nSdAXoUB6sj0EmHrQQWIPEZwGcPcvMUhcU pjD/hnmCX6DAWHVCvE7vhbHntNYFwu1Bmau5ZY6Ywk5lQ/ZTfEYcRD1ZmUB2Wkzv 4InvRc1zYbTBpL/Lkft1B9/A7+LzJJRHoNvHaMN5pRF2qFyZW3sb+bh8z8SC0oJN zIbrWZvWM9TEnQ8P+GCw4y68juSvlcLcBsoxCQIDAQABAoIBAQDW1ogewf5TvYHB F+P0rl3NX9K4puJdG41B5lEpQN9BKX+HlEu2vjzc2Z+Y10CJMmtYtybRyX5tpR6y +m8Dh43gcorntoDKQzMYyr1Ag83h5ul1kd8kZAR92tBdp+31PZaWAiB1dwdRYY+s hhUMoC8TIIug07BkpXx/C1iAkT7KSc4D2djWFbEOoAENykycM1Q+0dgumkZAO1C4 ZDjW4y6DBfbdS8+edgr/Qa3LbeF1uB7d23s4slCVs5h+J0IXVe4/LjrpRfXWUCQM 1YJDY3PVgZOhhnrhfUb0e0gMFAKinNPo7L4d5ZTp3pR5d5Rex1luhbv+E/ZTaLBL RZQWWTgBAoGBAPH5ob3RxQa7e+a1HkbfmP/vW5vBr1aa2hxqjU3UnKR6azoKCBgf +LWbkSAZ1dLhjgsL6M3585WvHDzJJuhLX+Rcd38D+eFz+YjOi6o721iiFJ4lNQPj qymWPwDiia+g1diVfo+3I/l9UPvaQdwkGqFtl6Waty1BSOIEC8/WXhlhAoGBAO9s JMVEvhrP26ve3iPcEwBD7CfAxiSgtZAOt8VxIq2p2BzWnRWysrC3vP8CKfuxG1/b 9cFehCQp0Q1PYRzvR/tmP3vcMh0e/mg1eMTLDjp3VFRTvi3OXsdbXNcV4eDfq0GA /Jp0s1nRBSxY7obQEoSBxPOyyn5zssOlC+D8MXCpAoGBAIegEJzxP4q3eQnlyHOX Dg2dnm4d0GYtY0T8H/lYyveRuhoM116WRPOdn2krseKCE/hzE2inyXTDcoNLh6g5 3ySDA2NI2j0YoOuiQTwIUrhKGF5Ponhsmloz4VpgnyW2c0Xy/L4Wu24yZDrVqYZ3 IgoLAC2NG1CdP/mWpPw4PgPhAoGAH4cIGIoC1pkEfk9sxSAXyHMpR9rUvMIE5qFp hbBuNpwk/zcrnE3ZxfeMBbCNQr2Bs0/NvtbpY7G1+6C2Uw8XVX2TYoYOe1M3gRV5 f8CVcRGBo1EbvABu7qWTRid1hR0u+gM4QEaZz3v8yGg1kL8ZkSVdgBHNJHWr1qOH Ous6v3ECgYBVMV9OpGZfqH9VFX+SLcKnGpL9DsrikDKwAvX0xS6VZJd8nqwpMEJW KtiKZqvrHaIlRSGJ6HLNP1wYd4YzHhQg2Y/AWaw1BioUa2ZmI4OS7oDJlTx0qw69 RBbyWY5Cys+DS17xTjp/bqX+DTZESpWuqNuOIQftE/8KETgh4VD9NQ== -----END RSA PRIVATE KEY----- gdcm-3.0.22/Testing/Source/Data/gdcmSelectedPrivateGroupOffsetDataFiles.cxx000664 001766 001770 00000023570 14517730450 031215 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http:/gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* * See TestReaderSelectedPrivateGroup */ #if 0 struct StreamOffset { const char *filename; std::streamoff offset; }; #endif static const StreamOffset gdcmSelectedPrivateGroupOffsetDataFiles[] = { { "gdcm-ACR-LibIDO.acr",50 }, { "test.acr",50 }, { "libido1.0-vol.acr",50 }, { "gdcm-MR-SIEMENS-16-2.acr",686 }, { "SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs.acr",686 }, { "MR-MONO2-12-an2.acr",546 }, { "LIBIDO-8-ACR_NEMA-Lena_128_128.acr",50 }, { "CT-MONO2-12-lomb-an2.acr",366 }, { "D_CLUNIE_CT1_J2KR.dcm",1178 }, { "TOSHIBA_J2K_SIZ0_PixRep1.dcm",746 }, { "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm",1796 }, { "LJPEG_BuginGDCM12.dcm",886 }, { "GE_MR_0025xx1bProtocolDataBlock.dcm",1146 }, { "LEADTOOLS_FLOWERS-8-MONO2-RLE.dcm",848 }, { "SIEMENS_ImageLocationUN.dcm",960 }, { "JPEGDefinedLengthSequenceOfFragments.dcm",1496 }, { "TOSHIBA_J2K_OpenJPEGv2Regression.dcm",748 }, { "MR-SIEMENS-DICOM-WithOverlays.dcm",1042 }, { "GDCMJ2K_TextGBR.dcm",534 }, { "rle16loo.dcm",524 }, { "GE_DLX-8-MONO2-Multiframe.dcm",780 }, { "SC16BitsAllocated_8BitsStoredJ2K.dcm",534 }, { "MR-MONO2-12-shoulder.dcm",674 }, { "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm",794 }, { "SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm",1384 }, { "NM-MONO2-16-13x-heart.dcm",578 }, { "LEADTOOLS_FLOWERS-8-MONO2-Uncompressed.dcm",848 }, { "CT-MONO2-16-chest.dcm",838 }, { "D_CLUNIE_MR4_JPLY.dcm",1028 }, { "D_CLUNIE_SC1_JPLY.dcm",964 }, { "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm",1302 }, { "D_CLUNIE_VL6_RLE.dcm",866 }, { "DX_J2K_0Padding.dcm",746 }, { "D_CLUNIE_XA1_RLE.dcm",800 }, { "PHILIPS_Intera-16-MONO2-Uncompress.dcm",1622 }, { "US-RGB-8-esopecho.dcm",598 }, { "GE_GENESIS-16-MONO2-WrongLengthItem.dcm",760 }, { "D_CLUNIE_MR3_JPLL.dcm",1200 }, { "SIEMENS-12-Jpeg_Process_2_4-Lossy-a.dcm",1252 }, { "D_CLUNIE_MR1_RLE.dcm",908 }, { "SIEMENS_CSA2.dcm",1260 }, { "gdcm-MR-PHILIPS-16-Multi-Seq.dcm",1354 }, { "GE_DLX-8-MONO2-PrivateSyntax.dcm",770 }, { "D_CLUNIE_MR2_JPLY.dcm",1030 }, { "DX_GE_FALCON_SNOWY-VOI.dcm",1152 }, { "AMIInvalidPrivateDefinedLengthSQasUN.dcm",1028 }, { "SC16BitsAllocated_8BitsStoredJPEG.dcm",606 }, { "OT-PAL-8-face.dcm",140 }, { "LEADTOOLS_FLOWERS-16-MONO2-RLE.dcm",848 }, { "TOSHIBA_J2K_SIZ1_PixRep0.dcm",762 }, { "D_CLUNIE_RG2_JPLL.dcm",1014 }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm",968 }, { "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm",774 }, { "PHILIPS_GDCM12xBug2.dcm",1184 }, { "PICKER-16-MONO2-No_DicomV3_Preamble.dcm",496 }, { "MR_Spectroscopy_SIEMENS_OF.dcm",1372 }, { "ELSCINT1_JP2vsJ2K.dcm",680 }, { "US-PAL-8-10x-echo.dcm",496 }, { "OT-MONO2-8-a7.dcm",186 }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm",968 }, { "D_CLUNIE_NM1_JPLL.dcm",1406 }, { "D_CLUNIE_RG2_JPLY.dcm",1100 }, { "KODAK-12-MONO1-Odd_Terminated_Sequence.dcm",310 }, { "CT-MONO2-16-ort.dcm",784 }, { "D_CLUNIE_VL1_RLE.dcm",856 }, { "NM-PAL-16-PixRep1.dcm",820 }, { "ELSCINT1_PMSCT_RLE1.dcm",778 }, { "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm",1012 }, { "D_CLUNIE_MR2_JPLL.dcm",944 }, { "GE_CT_With_Private_compressed-icon.dcm",1112 }, { "LEADTOOLS_FLOWERS-16-MONO2-JpegLossless.dcm",850 }, { "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm",1258 }, { "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm",400 }, { "simpleImageWithIcon.dcm",616 }, { "D_CLUNIE_CT1_JLSL.dcm",1162 }, { "US-IRAD-NoPreambleStartWith0005.dcm",684 }, { "TheralysGDCM120Bug.dcm",1964 }, { "SIEMENS_Sonata-16-MONO2-Value_Multiplicity.dcm",1152 }, { "D_CLUNIE_NM1_RLE.dcm",1366 }, { "CR-MONO1-10-chest.dcm",298 }, { "ACUSON-24-YBR_FULL-RLE-b.dcm",822 }, { "TG18-CH-2k-01.dcm",1294 }, { "US-MONO2-8-8x-execho.dcm",630 }, { "GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm",1164 }, { "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm",753 }, { "MR_SIEMENS_forceLoad29-1010_29-1020.dcm",838 }, { "LEADTOOLS_FLOWERS-16-MONO2-Uncompressed.dcm",848 }, { "ACUSON-24-YBR_FULL-RLE.dcm",710 }, { "D_CLUNIE_MR1_JPLY.dcm",1036 }, { "D_CLUNIE_VL4_RLE.dcm",848 }, { "MR-MONO2-8-16x-heart.dcm",536 }, { "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm",1060 }, { "D_CLUNIE_MR4_JPLL.dcm",942 }, { "LEADTOOLS_FLOWERS-24-RGB-JpegLossy.dcm",850 }, { "D_CLUNIE_CT1_J2KI.dcm",1270 }, { "US-GE-4AICL142.dcm",688 }, { "CT-MONO2-16-ankle.dcm",750 }, { "LEADTOOLS_FLOWERS-24-RGB-JpegLossless.dcm",850 }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm",968 }, { "RadBWLossLess.dcm",542 }, { "DermaColorLossLess.dcm",542 }, { "D_CLUNIE_MR2_RLE.dcm",900 }, { "CT-SIEMENS-Icone-With-PaletteColor.dcm",1138 }, { "fffc0000UN.dcm",594 }, { "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm",1340 }, { "BugGDCM2_UndefItemWrongVL.dcm",1466 }, { "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm",753 }, { "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm",1014 }, { "05148044-mr-siemens-avanto-syngo.dcm",1174 }, { "gdcm-JPEG-LossLessThoravision.dcm",954 }, { "D_CLUNIE_CT1_JPLL.dcm",1164 }, { "MR16BitsAllocated_8BitsStored.dcm",536 }, { "gdcm-CR-DCMTK-16-NonSamplePerPix.dcm",420 }, { "JDDICOM_Sample2-dcmdjpeg.dcm",464 }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm",968 }, { "gdcm-JPEG-Extended.dcm",1332 }, { "CT-SIEMENS-MissingPixelDataInIconSQ.dcm",922 }, { "LEADTOOLS_FLOWERS-8-MONO2-JpegLossy.dcm",850 }, { "CT-MONO2-16-brain.dcm",946 }, { "IM-0001-0066.CommandTag00.dcm",1472 }, { "SIEMENS_MAGNETOM-12-MONO2-VRUN.dcm",646 }, { "MAROTECH_CT_JP2Lossy.dcm",1244 }, { "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm",1236 }, { "D_CLUNIE_MR1_JPLL.dcm",952 }, { "D_CLUNIE_MR4_RLE.dcm",898 }, { "MEDILABInvalidCP246_EVRLESQasUN.dcm",1182 }, { "DCMTK_JPEGExt_12Bits.dcm",498 }, { "D_CLUNIE_RG2_RLE.dcm",966 }, { "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm",1026 }, { "MR-Brucker-CineTagging-NonSquarePixels.dcm",652 }, { "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm",590 }, { "D_CLUNIE_RG3_JPLL.dcm",988 }, { "00191113.dcm",536 }, { "PhilipsInteraSeqTermInvLen.dcm",922 }, { "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm",1528 }, { "gdcm-JPEG-LossLess3a.dcm",1022 }, { "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm",834 }, { "D_CLUNIE_RG3_JPLY.dcm",1074 }, { "PICKER-16-MONO2-Nested_icon.dcm",13296 }, { "LIBIDO-24-ACR_NEMA-Rectangle.dcm",50 }, { "SignedShortLosslessBug.dcm",794 }, { "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm",848 }, { "MR_Philips-Intera_BreaksNOSHADOW.dcm",1382 }, { "US-RGB-8-epicard.dcm",668 }, { "SIEMENS_MAGNETOM-12-MONO2-Uncompressed.dcm",962 }, { "D_CLUNIE_VL2_RLE.dcm",854 }, { "3E768EB7.dcm",1282 }, { "012345.002.050.dcm",964 }, { "D_CLUNIE_CT1_JLSN.dcm",1260 }, { "PHILIPS_GDCM12xBug.dcm",1566 }, { "OsirixFake16BitsStoredFakeSpacing.dcm",664 }, { "CT_16b_signed-UsedBits13.dcm",1724 }, { "D_CLUNIE_CT2_RLE.dcm",922 }, { "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm",848 }, { "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm",1310 }, { "rle16sti.dcm",520 }, { "D_CLUNIE_NM1_JPLY.dcm",1492 }, { "JDDICOM_Sample2.dcm",450 }, { "D_CLUNIE_RG1_RLE.dcm",1044 }, { "DMCPACS_ExplicitImplicit_BogusIOP.dcm",538 }, { "SIEMENS_Sonata-12-MONO2-SQ.dcm",1228 }, { "D_CLUNIE_XA1_JPLL.dcm",848 }, { "NM_Kakadu44_SOTmarkerincons.dcm",874 }, { "JPEG_LossyYBR.dcm",1142 }, { "gdcm-MR-PHILIPS-16-NonSquarePixels.dcm",772 }, { "D_CLUNIE_SC1_RLE.dcm",830 }, { "SIEMENS-MR-RGB-16Bits.dcm",1466 }, { "JPEGInvalidSecondFrag.dcm",1394 }, { "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm",1632 }, { "MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm",626 }, { "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm",686 }, { "LEADTOOLS_FLOWERS-24-RGB-Uncompressed.dcm",848 }, { "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm",1622 }, { "MR-MONO2-16-head.dcm",752 }, { "D_CLUNIE_XA1_JPLY.dcm",934 }, { "D_CLUNIE_CT2_JPLL.dcm",966 }, { "D_CLUNIE_RG3_RLE.dcm",934 }, { "ALOKA_SSD-8-MONO2-RLE-SQ.dcm",612 }, { "GE_LOGIQBook-8-RGB-HugePreview.dcm",742 }, { "gdcm-US-ALOKA-16.dcm",702 }, { "D_CLUNIE_US1_RLE.dcm",918 }, { "undefined_length_un_vr.dcm",1434 }, { "D_CLUNIE_MR3_JPLY.dcm",1286 }, { "D_CLUNIE_VL3_RLE.dcm",866 }, { "US-IRAD-NoPreambleStartWith0003.dcm",1504 }, { "CT-MONO2-8-abdo.dcm",422 }, { "FUJI-10-MONO1-ACR_NEMA_2.dcm",312 }, { "D_CLUNIE_MR3_RLE.dcm",1158 }, { "D_CLUNIE_CT1_RLE.dcm",1122 }, { "KODAK_CompressedIcon.dcm",890 }, { "D_CLUNIE_RG1_JPLL.dcm",1084 }, { "XA-MONO2-8-12x-catheter.dcm",644 }, { "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm",1314}, { "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm", 1596 }, { "00191113.dcm",536 }, { "JPEGNote_empty.dcm", 482 }, { "JPEGLS_CharLS_10742.dcm", 532 }, { "JPEGLosslessYBR_FULL_422.dcm", 534 }, { "JPEGNote_missing.dcm", 406 }, { "JPEGNote_bogus.dcm", 482 }, { "RLEDebianBug816607Orig.dcm", 534 }, { "IllegalGroup2ImplicitTS.dcm", 1088 }, { "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm", 534 }, { "LengthOfItemLarger.dcm", 1044 }, { "GE_MR_0025xx1bProtocolDataBlockXML.dcm",1358}, { "EmptyIcon_Bug417.dcm",1000}, { "EnhancedWithIPPPerFrameIOPShared.dcm",772}, { "FUJI-ffff-MONO1-J2K.dcm",982}, { "JPEGLosslessSeNonZero.dcm",530}, { "US-YBR_FULL_422-EVRLE.dcm",744}, { "Osirix10vs8BitsStored.dcm",1512}, { "Bug_Siemens_PrivateIconNoItem.dcm",1360}, { "HardcopyColor_YBR_RCT_J2K_PC1.dcm",1284}, { "PET-GE-dicomwrite-PixelDataSQUNv2.dcm",4620}, { "MEDILABValidCP246_EVRLESQasOB.dcm",1148}, { "dicomdir_With_embedded_icons",7125212 }, { "dicomdir_Pms_WithVisit_WithPrivate_WithStudyComponents",37218 }, { "dicomdir_Acusson_WithPrivate_WithSR",3826 }, { "dicomdir_Pms_With_heavy_embedded_sequence",3003414 }, { "DICOMDIR-Philips-EasyVision-4200-Entries",1297194 }, { "DICOMDIR",1112434 }, { "DICOMDIR_MR_B_VA12A",14853880 }, /* Stopping condition */ { nullptr ,0 }, }; gdcm-3.0.22/Testing/Source/Data/NativeDICOM.rng000664 001766 001770 00000012627 14517730450 023325 0ustar00mmalaterremmalaterre000000 000000 8 8 [0-9A-F]{8} AE AS AT CS DA DS DT FL FD IS LO LT OB OF OW PN SH SL SQ SS ST TM UI UL UN US UT gdcm-3.0.22/Testing/Source/Data/QIDO-RS_examplesup166.json000664 001766 001770 00000013426 14517730450 025262 0ustar00mmalaterremmalaterre000000 000000 // The following example is a QIDO-RS SearchForStudies response consisting // of two matching studies, corresponding to the example QIDO-RS request: // GET http://qido.nema.org/studies?PatientID=12345&includefield=all&limit=2 [ { // Result 1 "SpecificCharacterSet": { "Tag": "00080005", "VR": "CS", "Value": [ "ISO_IR192" ] }, "StudyDate": { "Tag": "00080020", "VR": "DT", "Value": [ "20130409" ] }, "StudyTime": { "Tag": "00080030", "VR": "TM", "Value": [ "131600.0000" ] }, "AccessionNumber": { "Tag": "00080050", "VR": "SH", "Value": [ "11235813" ] }, "InstanceAvailability": { "Tag": "00080056", "VR": "CS", "Value": [ "ONLINE" ] }, "ModalitiesInStudy": { "Tag": "00080061", "VR": "CS", "Value": [ "CT", "PET" ] }, "ReferringPhysiciansName": { "Tag": "00080090", "VR": "PN", "PersonName": [ { "SingleByte": "^Bob^^Dr." } ] }, "00090010": { "Tag": "00090010", "VR": "LO", "Value": [ "Vendor A" ] }, "00091002": { "Tag": "00091002", "VR": "UN", "PrivateCreator": "Vendor A", "Value": [ "z0x9c8v7" ] }, "PatientName": { "Tag": "00100010", "VR": "PN", "PersonName": [ { "SingleByte": "Wang^XiaoDong", "Ideographic": "王^å°æ±" } ] }, "PatientID": { "Tag": "00100020", "VR": "LO", "Value": [ "12345" ] }, "IssuerOfPatientID": { "Tag": "00100021", "VR": "LO", "Value": [ "Hospital A" ] }, "PatientsBirthDate": { "Tag": "00100030", "VR": "DT", "Value": [ "19670701" ] }, "PatientsSex": { "Tag": "00100040", "VR": "CS", "Value": [ "M" ] }, "OtherPatientIDsSequence": { "Tag": "00101002", "VR": "SQ", "Sequence": [ { "PatientID": { "Tag": "00100020", "VR": "LO", "Value": [ "54321" ] }, "IssuerOfPatientID": { "Tag": "00100021", "VR": "LO", "Value": [ "Hospital B" ] } }, { "PatientID": { "Tag": "00100020", "VR": "LO", "Value": [ "24680" ] }, "IssuerOfPatientID": { "Tag": "00100021", "VR": "LO", "Value": [ "Hospital C" ] } } ] }, "StudyID": { "Tag": "00200010", "VR": "SH", "Value": [ "11235813" ] }, "StudyInstanceUID": { "Tag": "0020000D", "VR": "UI", "Value": [ "1.2.392.200036.9116.2.2.2.1762893313.1029997326.945873" ] }, "NumberOfStudyRelatedSeries": { "Tag": "00201206", "VR": "IS", "Value": [ "4" ] }, "NumberOfStudyRelatedInstances": { "Tag": "00201208", "VR": "IS", "Value": [ "942" ] }, "RetrieveURL": { "Tag": "00081190", "VR": "UT", "Value": [ "http://wado.nema.org/studies/1.2.392.200036.9116.2.2.2.1762893313.1029997326.945873" ] } }, { // Result 2 "SpecificCharacterSet": { "Tag": "00080005", "VR": "CS", "Value": [ "ISO_IR192" ] }, "StudyDate": { "Tag": "00080020", "VR": "DT", "Value": [ "20130309" ] }, "StudyTime": { "Tag": "00080030", "VR": "TM", "Value": [ "111900.0000" ] }, "AccessionNumber": { "Tag": "00080050", "VR": "SH", "Value": [ "11235821" ] }, "InstanceAvailability": { "Tag": "00080056", "VR": "CS", "Value": [ "ONLINE" ] }, "ModalitiesInStudy": { "Tag": "00080061", "VR": "CS", "Value": [ "CT", "PET" ] }, "ReferringPhysiciansName": { "Tag": "00080090", "VR": "PN", "PersonName": [ { "SingleByte": "^Bob^^Dr." } ] }, "00090010": { "Tag": "00090010", "VR": "LO", "Value": [ "Vendor A" ] }, "00091002": { "Tag": "00091002", "VR": "UN", "PrivateCreator": "Modality Vendor A", "Value": [ "z0x9c8v7" ] }, "PatientName": { "Tag": "00100010", "VR": "PN", "PersonName": [ { "SingleByte": "Wang^XiaoDong", "Ideographic": "王^å°æ±" } ] }, "PatientID": { "Tag": "00100020", "VR": "LO", "Value": [ "12345" ] }, "IssuerOfPatientID": { "Tag": "00100021", "VR": "LO", "Value": [ "Hospital A" ] }, "PatientsBirthDate": { "Tag": "00100030", "VR": "DT", "Value": [ "19670701" ] }, "PatientsSex": { "Tag": "00100040", "VR": "CS", "Value": [ "M" ] }, "OtherPatientIDsSequence": { "Tag": "00101002", "VR": "SQ", "Sequence": [ { "PatientID": { "Tag": "00100020", "VR": "LO", "Value": [ "54321" ] }, "IssuerOfPatientID": { "Tag": "00100021", "VR": "LO", "Value": [ "Hospital B" ] } }, { "PatientID": { "Tag": "00100020", "VR": "LO", "Value": [ "24680" ] }, "IssuerOfPatientID": { "Tag": "00100021", "VR": "LO", "Value": [ "Hospital C" ] } } ] }, "StudyID": { "Tag": "00200010", "VR": "SH", "Value": [ "11235821" ] }, "StudyInstanceUID": { "Tag": "0020000D", "VR": "UI", "Value": [ "1.2.392.200036.9116.2.2.2.2162893313.1029997326.945876" ] }, "NumberOfStudyRelatedSeries": { "Tag": "00201206", "VR": "IS", "Value": [ "5" ] }, "NumberOfStudyRelatedInstances": { "Tag": "00201208", "VR": "IS", "Value": [ "1123" ] }, "RetrieveURL": { "Tag": "00081190", "VR": "UT", "Value": [ "http://wado.nema.org/studies/1.2.392.200036.9116.2.2.2.2162893313.1029997326.945876" ] } } ] gdcm-3.0.22/Testing/Source/Data/gdcmMD5DataImages.cxx000664 001766 001770 00000113717 14517730450 024501 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ // See tst2md5 in GDCM/Utilities/md5 // // Another way to do it is: // // dcmdrle ACUSON-24-YBR_FULL-RLE.dcm bla.dcm // gdcmraw -i bla.dcm -o bla.raw // md5sum bla.raw // So this md5 checksum should match the one in dcmtk...hopefully :) // static const char * const gdcmMD5DataImages[][2] = { /* gdcm 512 512 4 8 1 */ { "bfff320d1b058e91b4819aa4560c16f7" , "00191113.dcm" }, /* gdcm 256 256 1 16 1 */ { "d594a5e2fde12f32b6633ca859b4d4a6" , "012345.002.050.dcm" }, /* gdcm 512 512 1 16 1 */ { "c68cf1c4ae59903930e334498389ea88" , "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm" }, /* gdcm 448 336 1 16 1 */ { "a9d455ca171294fe56d29bf714f4f845" , "05119865-mr-siemens-avanto-syngo.dcm" }, /* gdcm 192 192 1 16 1 */ { "9acdd9969f5d0584ddd67e994f00b7c7" , "05148044-mr-siemens-avanto-syngo.dcm" }, /* gdcm 512 512 1 16 1 */ { "c3541091a3794753065022f4defc4343" , "3E768EB7.dcm" }, /* gdcm 768 576 40 8 3 */ { "6a796be399aefebc1479e924f6051d69" , "ACUSON-24-YBR_FULL_422-Jpeg_Baseline_1.dcm" }, /* gdcm 384 288 1 8 3 */ //{ "2a922d5c606354612bfdbece1421d863" , "ACUSON-24-YBR_FULL-RLE-b.dcm" }, //{ "22b32f23beb118f7b64c13bf04bc2809" , "ACUSON-24-YBR_FULL-RLE-b.dcm" }, { "22b32f23beb118f7b64c13bf04bc2809" , "ACUSON-24-YBR_FULL-RLE-b.dcm" }, /* gdcm 768 576 1 8 3 */ //{ "f9bb8a37acabdf8b0cfa4fd1b471e6aa" , "ACUSON-24-YBR_FULL-RLE.dcm" }, //{ "435c66f7e113d11d226d500294aae865" , "ACUSON-24-YBR_FULL-RLE.dcm" }, { "435c66f7e113d11d226d500294aae865" , "ACUSON-24-YBR_FULL-RLE.dcm" }, /* gdcm 768 576 25 8 3 */ { "e36350b0711fd34eb86c386164554679" , "ACUSON-8-YBR_FULL-JPEG-TrailingInfo.dcm" }, /* gdcm 608 420 1 8 1 */ { "7d8858e3419392b7f39a99fdc8028064" , "ALOKA_SSD-8-MONO2-RLE-SQ.dcm" }, /* gdcm 440 440 1 16 1 */ //{ "8acaa88edcc2c29d3be3ee373fbaed5e" , "CR-MONO1-10-chest.dcm" }, { "1f772b4849727a9750931b60d920436f" , "CR-MONO1-10-chest.dcm" }, /* gdcm 512 512 1 16 1 */ { "8c8b9d99ad12fb4d231182d4fc14c042" , "CT_16b_signed-UsedBits13.dcm" }, /* gdcm 512 512 1 16 1 */ { "160c0b4432cfab8d36531b5a3693ff3e" , "CT-MONO2-12-lomb-an2.acr" }, /* gdcm 512 512 1 16 1 */ { "90cca03ada67c6a1fcb48cfcc2b52eeb" , "CT-MONO2-16-ankle.dcm" }, /* gdcm 512 512 1 16 1 */ { "a6cf43e05087b6c31644c1d360701ff2" , "CT-MONO2-16-brain.dcm" }, /* gdcm 512 400 1 16 1 */ { "78bb9ea4b746ff2aa5559be567f95030" , "CT-MONO2-16-chest.dcm" }, /* gdcm 512 512 1 16 1 */ { "dcb3aa1defd85d93d69d445e3e9b3074" , "CT-MONO2-16-ort.dcm" }, /* gdcm 512 512 1 8 1 */ { "86d3e09a5858aa3844cb3be1b822a069" , "CT-MONO2-8-abdo.dcm" }, /* gdcm 512 614 1 16 1 */ { "3695d167c298646b877efccaeff92682" , "CT_Phillips_JPEG2K_Decompr_Problem.dcm" }, /* gdcm 512 512 1 16 1 */ { "3372195a35448b76daee682d23502090" , "CT-SIEMENS-Icone-With-PaletteColor.dcm" }, /* gdcm 512 512 1 16 1 */ { "05bbdbcc81081791f6f9f8a1ffa648c8" , "D_CLUNIE_CT1_J2KI.dcm" }, /* gdcm 512 512 1 16 1 */ { "f3a3d0e739e5f4fbeddd1452b81f4d89" , "D_CLUNIE_CT1_J2KR.dcm" }, /* gdcm 512 512 1 16 1 */ { "f3a3d0e739e5f4fbeddd1452b81f4d89" , "D_CLUNIE_CT1_JPLL.dcm" }, /* gdcm 512 512 1 16 1 */ { "f3a3d0e739e5f4fbeddd1452b81f4d89" , "D_CLUNIE_CT1_RLE.dcm" }, /* gdcm 512 512 1 16 1 */ { "2e389ddbfc1b29d55c52c97e7f2c6f9c" , "D_CLUNIE_CT2_JPLL.dcm" }, /* gdcm 512 512 1 16 1 */ { "2e389ddbfc1b29d55c52c97e7f2c6f9c" , "D_CLUNIE_CT2_RLE.dcm" }, /* gdcm 3064 4664 1 16 1 */ { "d9b97ad9199d429960123dcc1e74bdbc" , "D_CLUNIE_MG1_JPLL.dcm" }, /* gdcm 3064 4664 1 16 1 */ { "02742062fcad004500d73d7c61b9b9e6" , "D_CLUNIE_MG1_JPLY.dcm" }, /* gdcm 3064 4664 1 16 1 */ { "d9b97ad9199d429960123dcc1e74bdbc" , "D_CLUNIE_MG1_RLE.dcm" }, /* gdcm 512 512 1 16 1 */ { "7b7424e6115931c371f3c94c2f5d32d9" , "D_CLUNIE_MR1_JPLL.dcm" }, /* gdcm 512 512 1 16 1 */ { "2824e914ecae250a755a8a0bb1a7d4b1" , "D_CLUNIE_MR1_JPLY.dcm" }, /* gdcm 512 512 1 16 1 */ { "7b7424e6115931c371f3c94c2f5d32d9" , "D_CLUNIE_MR1_RLE.dcm" }, /* gdcm 1024 1024 1 16 1 */ { "a70676f0e60a58f55a5ac517ff662e7e" , "D_CLUNIE_MR2_JPLL.dcm" }, /* gdcm 1024 1024 1 16 1 */ { "981510df3a57e98141c7d192b45bd93f" , "D_CLUNIE_MR2_JPLY.dcm" }, /* gdcm 1024 1024 1 16 1 */ { "a70676f0e60a58f55a5ac517ff662e7e" , "D_CLUNIE_MR2_RLE.dcm" }, /* gdcm 512 512 1 16 1 */ { "fb03254fad02d2330d404225c3ea9b4e" , "D_CLUNIE_MR3_JPLL.dcm" }, /* gdcm 512 512 1 16 1 */ { "d7009808a147f59a9bdf58d5c5924ef2" , "D_CLUNIE_MR3_JPLY.dcm" }, /* gdcm 512 512 1 16 1 */ { "fb03254fad02d2330d404225c3ea9b4e" , "D_CLUNIE_MR3_RLE.dcm" }, /* gdcm 512 512 1 16 1 */ { "14fa2ae9f63742af6944edd4a61145e8" , "D_CLUNIE_MR4_JPLL.dcm" }, /* gdcm 512 512 1 16 1 */ { "a33ad864b49ae7daa59cfaabdf751976" , "D_CLUNIE_MR4_JPLY.dcm" }, /* gdcm 512 512 1 16 1 */ { "14fa2ae9f63742af6944edd4a61145e8" , "D_CLUNIE_MR4_RLE.dcm" }, /* gdcm 256 1024 1 16 1 */ { "6b5c1eff0ef65e36b0565f96507e96fd" , "D_CLUNIE_NM1_JPLL.dcm" }, /* gdcm 256 1024 1 16 1 */ { "812050a7fc53b5735f7740b60969cb6b" , "D_CLUNIE_NM1_JPLY.dcm" }, /* gdcm 256 1024 1 16 1 */ { "6b5c1eff0ef65e36b0565f96507e96fd" , "D_CLUNIE_NM1_RLE.dcm" }, /* gdcm 1841 1955 1 16 1 */ //{ "01518af70491372814fb056d536ffb7e" , "D_CLUNIE_RG1_JPLL.dcm" }, { "ae141f6fb91f63769a6adc572a942fb9" , "D_CLUNIE_RG1_JPLL.dcm" }, /* gdcm 1841 1955 1 16 1 */ //{ "01518af70491372814fb056d536ffb7e" , "D_CLUNIE_RG1_RLE.dcm" }, { "ae141f6fb91f63769a6adc572a942fb9" , "D_CLUNIE_RG1_RLE.dcm" }, /* gdcm 1760 2140 1 16 1 */ { "06900ee4323a91b7f5ffab8655e3c845" , "D_CLUNIE_RG2_JPLL.dcm" }, /* gdcm 1760 2140 1 16 1 */ { "27fa50d4cf6b31baa669e9746ce10f63" , "D_CLUNIE_RG2_JPLY.dcm" }, /* gdcm 1760 2140 1 16 1 */ { "06900ee4323a91b7f5ffab8655e3c845" , "D_CLUNIE_RG2_RLE.dcm" }, /* gdcm 1760 1760 1 16 1 */ //{ "6588b7b8e6e53b2276d919a053316153" , "D_CLUNIE_RG3_JPLL.dcm" }, { "e7c857ef7e6a2c81498297a072a0332e" , "D_CLUNIE_RG3_JPLL.dcm" }, /* gdcm 1760 1760 1 16 1 */ //{ "cb381c53172242404346b237bf741eb4" , "D_CLUNIE_RG3_JPLY.dcm" }, { "cc2968949ffbb6548288ffde7e5202e4" , "D_CLUNIE_RG3_JPLY.dcm" }, /* gdcm 1760 1760 1 16 1 */ //{ "6588b7b8e6e53b2276d919a053316153" , "D_CLUNIE_RG3_RLE.dcm" }, { "e7c857ef7e6a2c81498297a072a0332e" , "D_CLUNIE_RG3_RLE.dcm" }, /* gdcm 2048 2487 1 16 1 */ { "bd0cccbfd8db465c0af306ba0f482d72" , "D_CLUNIE_SC1_JPLL.dcm" }, /* gdcm 2048 2487 1 16 1 */ { "994a5abb70d3f5968672ce4970a9d4da" , "D_CLUNIE_SC1_JPLY.dcm" }, /* gdcm 2048 2487 1 16 1 */ { "bd0cccbfd8db465c0af306ba0f482d72" , "D_CLUNIE_SC1_RLE.dcm" }, /* gdcm 640 480 1 8 3 */ { "eb52dce9eed5ad677364baadf6144ac4" , "D_CLUNIE_US1_RLE.dcm" }, /* gdcm 756 486 1 8 3 */ { "b07e34ec35ba1be62ee7d4a404cf0b90" , "D_CLUNIE_VL1_RLE.dcm" }, /* gdcm 756 486 1 8 3 */ { "d215c88125359d34474a741d793c2215" , "D_CLUNIE_VL2_RLE.dcm" }, /* gdcm 756 486 1 8 3 */ { "65cd359ea4c6c13ca89b906215a4b762" , "D_CLUNIE_VL3_RLE.dcm" }, /* gdcm 2226 1868 1 8 3 */ { "e2fdf24d2c03dd0991b4f4e9d6e84ed6" , "D_CLUNIE_VL4_RLE.dcm" }, /* gdcm 2670 3340 1 8 3 */ { "0ed86ef35d1fb443e1b63c28afe84bd0" , "D_CLUNIE_VL5_RLE.dcm" }, /* gdcm 756 486 1 8 3 */ { "b825c0ed35c7c896fb707c14b534c233" , "D_CLUNIE_VL6_RLE.dcm" }, /* gdcm 1024 1024 1 16 1 */ { "6111657e6b01ec7b243d63f5dec6ec48" , "D_CLUNIE_XA1_JPLL.dcm" }, /* gdcm 1024 1024 1 16 1 */ { "51af0d83fe795f9c9544c20d0bbac11c" , "D_CLUNIE_XA1_JPLY.dcm" }, /* gdcm 1024 1024 1 16 1 */ { "6111657e6b01ec7b243d63f5dec6ec48" , "D_CLUNIE_XA1_RLE.dcm" }, /* gdcm 117 181 1 8 3 */ { "b4f442047a209a98af015c89b4a3c4ed" , "DermaColorLossLess.dcm" }, /* gdcm 1024 1024 1 16 1 */ { "0b4dff77726ccf037fa83c42cc186a98" , "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm" }, /* gdcm 512 512 1 16 1 */ { "6b92115ec7a394c4aaad74e88d7dbc98" , "FLAIR-wrong-group-length.dcm" }, /* gdcm 1670 2010 1 16 1 */ //{ "9ca80d44bfb1af2f96495fac4b57fa29" , "FUJI-10-MONO1-ACR_NEMA_2.dcm" }, { "da2415a1e58b4ca2e588d0de18274f60" , "FUJI-10-MONO1-ACR_NEMA_2.dcm" }, /* gdcm 512 301 1 8 1 */ { "59d9851ca0f214d57fdfd6a8c13bc91c" , "gdcm-ACR-LibIDO.acr" }, /* gdcm 750 750 1 8 1 */ { "73f20916abaea83abebe9135c365d81a" , "gdcm-CR-DCMTK-16-NonSamplePerPix.dcm" }, /* gdcm 512 512 1 16 1 */ { "f2c026beea9da0a78404f1299c4628bb" , "gdcm-JPEG-Extended-Allready_present.dcm" }, /* gdcm 512 512 1 16 1 */ { "f2c026beea9da0a78404f1299c4628bb" , "gdcm-JPEG-Extended.dcm" }, /* gdcm 512 512 1 16 1 */ { "ad67e448e8923c34f1e019c3395e616c" , "gdcm-JPEG-LossLess3a.dcm" }, /* gdcm 1876 2076 1 16 1 */ { "c15c1e18a0c41970fbded48b20e834a1" , "gdcm-JPEG-LossLessThoravision.dcm" }, /* gdcm 128 128 1 16 1 */ { "ad85be428c08ab4166347ef04bda9637" , "gdcm-MR-PHILIPS-16-Multi-Seq.dcm" }, /* gdcm 160 64 1 16 1 */ { "2f7f9ef80b49111c5a7cfdb60a97f523" , "gdcm-MR-PHILIPS-16-NonSquarePixels.dcm" }, /* gdcm 512 512 1 16 1 */ { "864e2c5d6acf5a371fe9eaa7ee0dcf5f" , "gdcm-MR-SIEMENS-16-2.acr" }, /* gdcm 640 480 1 16 1 */ { "f85ff02a143c426edc4b2f6b9a175305" , "gdcm-US-ALOKA-16.dcm" }, /* gdcm 512 512 1 16 1 */ { "80527e9c17a4a3d12d408e9a354f37f9" , "GE_CT_With_Private_compressed-icon.dcm" }, /* gdcm 512 512 67 8 1 */ { "b8bcbccd17b76a0f8e3d4c342f855f9f" , "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm" }, /* gdcm 512 512 56 8 1 */ { "71e4ea61df4f7ada2955799c91f93e74" , "GE_DLX-8-MONO2-Multiframe.dcm" }, /* gdcm 512 512 54 8 1 */ { "51c998d3474c069b5703e98313258a1e" , "GE_DLX-8-MONO2-PrivateSyntax.dcm" }, /* gdcm 256 256 1 16 1 */ { "8ac7f7891fb4506e2cd3ae2f0f7e9f46" , "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm" }, /* gdcm 256 256 1 16 1 */ { "1497fb9d7467b1eb36d5618e254aac76" , "GE_GENESIS-16-MONO2-WrongLengthItem.dcm" }, /* gdcm 640 480 1 8 3 */ { "13fd8c7e533a3d7199bb78de45710f5c" , "GE_LOGIQBook-8-RGB-HugePreview.dcm" }, /* gdcm 512 512 1 16 1 */ { "f3a3d0e739e5f4fbeddd1452b81f4d89" , "GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm" }, /* gdcm 1792 2392 1 16 1 */ //{ "821acfdb5d5ad9dc13275d3ad3827d43" , "KODAK-12-MONO1-Odd_Terminated_Sequence.dcm" }, { "c1ed06d39821a5fd65abc397982e2ac1" , "KODAK-12-MONO1-Odd_Terminated_Sequence.dcm" }, /* gdcm 800 535 1 16 1 */ { "70166425c4dca767e22d3f25f737922b" , "LEADTOOLS_FLOWERS-16-MONO2-JpegLossless.dcm" }, /* gdcm 800 535 1 16 1 */ { "70166425c4dca767e22d3f25f737922b" , "LEADTOOLS_FLOWERS-16-MONO2-RLE.dcm" }, /* gdcm 800 535 1 16 1 */ { "70166425c4dca767e22d3f25f737922b" , "LEADTOOLS_FLOWERS-16-MONO2-Uncompressed.dcm" }, /* gdcm 800 535 1 8 3 */ { "279e2b0363394a553ff8571cf3540c6c" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossless.dcm" }, /* gdcm 800 535 1 8 3 */ { "38c2784aa485733fef45b6517479a4f5" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossy.dcm" }, /* gdcm 800 535 1 8 3 */ { "279e2b0363394a553ff8571cf3540c6c" , "LEADTOOLS_FLOWERS-24-RGB-Uncompressed.dcm" }, /* gdcm 800 535 1 8 1 */ { "fa08fec923f34e009ec89f77232e52ad" , "LEADTOOLS_FLOWERS-8-MONO2-JpegLossy.dcm" }, /* gdcm 800 535 1 8 1 */ { "3cd8bd92db17bff54e376885dfefdd8d" , "LEADTOOLS_FLOWERS-8-MONO2-RLE.dcm" }, /* gdcm 800 535 1 8 1 */ { "3cd8bd92db17bff54e376885dfefdd8d" , "LEADTOOLS_FLOWERS-8-MONO2-Uncompressed.dcm" }, /* gdcm 800 535 1 8 3 */ //{ "d613050ca0f9c924fb5282d140281fcc" , "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm" }, { "16e999d6afc5574bcb075f296c3bcbbc" , "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm" }, /* gdcm 800 535 1 8 3 */ //{ "d613050ca0f9c924fb5282d140281fcc" , "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm" }, { "16e999d6afc5574bcb075f296c3bcbbc" , "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm" }, /* duh ! This should be the exact same md5...if only the testing was a little * smarter */ { "d613050ca0f9c924fb5282d140281fcc" , "LEADTOOLS_FLOWERS-8-PAL-RAW.dcm" }, /* gdcm 50 50 262 16 1 */ { "ce1cc8ebb1efb86213d5912a1cfde843" , "LIBIDO-16-ACR_NEMA-Volume.dcm" }, /* gdcm 400 100 1 8 3 */ { "81a40454eec2b18f4331cfd1ba4e501e" , "LIBIDO-24-ACR_NEMA-Rectangle.dcm" }, /* gdcm 128 128 1 8 1 */ { "fc5db4e2e7fca8445342b83799ff16d8" , "LIBIDO-8-ACR_NEMA-Lena_128_128.acr" }, /* gdcm 512 512 1 16 1 */ { "b1476cacdd32216b3295d2a494af2945" , "MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm" }, /* gdcm 256 192 1 16 1 */ { "d9f47017de79e8755e4bc5d3c9146ebd" , "MR-Brucker-CineTagging-NonSquarePixels.dcm" }, /* gdcm 512 512 1 16 1 */ { "8fe67e8e1f849c1b61f59e70d2d53cf7" , "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm" }, /* gdcm 256 256 1 16 1 */ { "f54c7ea520ab3ec32b6303581ecd262f" , "MR-MONO2-12-an2.acr" }, /* gdcm 256 256 1 16 1 */ //{ "48345bccbd67f57b4c13060b6a9a0d35" , "MR-MONO2-12-angio-an1.acr" }, //{ "19cd553b53c8c35b8f2c20f27ed31d2d" , "MR-MONO2-12-angio-an1.acr" }, { "ae5c00b60a58849b19aaabfc6521eeed" , "MR-MONO2-12-angio-an1.acr" }, /* gdcm 1024 1024 1 16 1 */ { "a70676f0e60a58f55a5ac517ff662e7e" , "MR-MONO2-12-shoulder.dcm" }, /* gdcm 256 256 1 16 1 */ { "83be31fb5e5cee60dedaf485bf592ac3" , "MR-MONO2-16-head.dcm" }, /* gdcm 256 256 16 8 1 */ { "01db0d71100c47013e588082d5f39bab" , "MR-MONO2-8-16x-heart.dcm" }, /* gdcm 256 256 1 16 1 */ { "b606add66c681bbe674f972799c6d336" , "MR_Philips-Intera_BreaksNOSHADOW.dcm" }, /* gdcm 1024 1024 1 16 1 */ { "0b4dff77726ccf037fa83c42cc186a98" , "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm" }, /* gdcm 512 512 1 16 1 */ { "f69bca6228b0ca07d97ee11c0ab3b989" , "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm" }, /* gdcm 1024 1024 1 16 1 */ { "0b4dff77726ccf037fa83c42cc186a98" , "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm" }, /* ?? */ { "7775ffdd374994b7dd029f45f198844f" , "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm" }, /* gdcm 484 484 1 8 1 */ { "8b636107a6d8e6a6b3d1d7eed966d7a0" , "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm" }, /* gdcm 484 484 1 16 1 */ { "3027eda10630e5c845f456264dc65210" , "MR-SIEMENS-DICOM-WithOverlays.dcm" }, /* gdcm 128 128 1 16 1 */ { "6a925f871c58553f84ad24195e155c52" , "MR_SIEMENS_forceLoad29-1010_29-1020.dcm" }, /* gdcm 64 64 13 16 1 */ { "c83ef2159abef677229d3afd26f9e6a0" , "NM-MONO2-16-13x-heart.dcm" }, /* gdcm 512 512 1 8 1 */ { "a155c3004bb902ed3f2d78f482923b32" , "OT-MONO2-8-a7.dcm" }, /* gdcm 640 480 1 8 3 */ //{ "47715f0a5d5089268bbef6f83251a8ad" , "OT-PAL-8-face.dcm" }, { "d7c30d57af821b02c67103250a744235" , "OT-PAL-8-face.dcm" }, /* gdcm 512 512 1 16 1 */ //{ "4b0021efe5a675f24c82e1ff28a1e2eb" , "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" }, { "d93d2f78d845c7a132489aab92eadd32" , "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" }, /* gdcm 256 256 1 16 1 */ { "b78366162d9d43b2852d2637c5365c89" , "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm" }, /* gdcm 256 256 1 16 1 */ { "4842ccbaac5b563ce915d2e21eb4c06e" , "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm" }, /* gdcm 512 512 76 8 1 */ { "1f8951a6f8b599ad4ebc97efd7aab6be" , "PHILIPS_Integris_H-8-MONO2-Multiframe.dcm" }, /* gdcm 1024 1024 31 16 1 */ { "3d005cd3270c6d2562c2a8d9069c9295" , "PHILIPS_Integris_V-10-MONO2-Multiframe.dcm" }, /* gdcm 1024 1024 1 16 1 */ { "0b4dff77726ccf037fa83c42cc186a98" , "PHILIPS_Intera-16-MONO2-Uncompress.dcm" }, /* gdcm 512 512 1 16 1 */ { "6c9e477330d70d4a1360888121c7c3d3" , "PICKER-16-MONO2-Nested_icon.dcm" }, /* gdcm 512 512 1 16 1 */ { "5ea911b29f472f371d21f2da2fd6b016" , "PICKER-16-MONO2-No_DicomV3_Preamble.dcm" }, /* gdcm 512 512 1 16 1 */ { "498f80fd27882351b9a09e6ceef470bc" , "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm" }, /* gdcm 136 92 1 16 1 */ { "dbbf39ac11a39372b1e961f40ac6f62a" , "RadBWLossLess.dcm" }, /* gdcm 600 430 1 16 3 */ //{ "964ea27345a7004325896d34b257f289" , "rle16sti.dcm" }, { "f799773abbe36a1a8a3a881e27f8084d" , "rle16sti.dcm" }, /* gdcm 512 512 1 16 1 */ { "80527e9c17a4a3d12d408e9a354f37f9" , "ser002img00026.dcm" }, /* gdcm 512 512 1 16 1 */ { "7b55fd124331adde6276416678543048" , "SIEMENS-12-Jpeg_Process_2_4-Lossy-a.dcm" }, /* gdcm 256 256 1 16 1 */ { "ea24c09f475a4e9643e27f6d470edc67" , "SIEMENS_GBS_III-16-ACR_NEMA_1.acr" }, /* gdcm 512 512 1 16 1 */ { "864e2c5d6acf5a371fe9eaa7ee0dcf5f" , "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm" }, /* gdcm 128 128 1 16 1 */ { "a13466d96b2f068c4844240797069f13" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm" }, /* gdcm 128 128 1 16 1 */ { "73f5986082729c2661cdc8de81fd26d0" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm" }, /* gdcm 128 128 1 16 1 */ { "f932a194df62ec99aef676c563893496" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm" }, /* gdcm 128 128 1 16 1 */ { "b6e4780d8aa8c1d3642377a60a5302dd" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm" }, /* gdcm 512 512 1 16 1 */ { "4b426d4cd570bd4c998f3d19cfddfbb8" , "SIEMENS_MAGNETOM-12-MONO2-Uncompressed.dcm" }, /* gdcm 192 256 1 16 3 */ { "faff9970b905458c0844400b5b869e25" , "SIEMENS-MR-RGB-16Bits.dcm" }, /* gdcm 512 512 1 16 1 */ { "7ccf7c7c4b2a5fa9d337ea8b01f75c42" , "SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs.acr" }, /* gdcm 192 192 1 16 1 */ { "a3009bc70444148c5ea2441a099f9dc6" , "SIEMENS_Sonata-12-MONO2-SQ.dcm" }, /* gdcm 256 208 1 16 1 */ { "017237320ccded3a367f07b44851788e" , "SIEMENS_Sonata-16-MONO2-Value_Multiplicity.dcm" }, /* gdcm 512 512 1 8 1 */ { "f845c8f283d39a0204c325654493ba53" , "test.acr" }, /* gdcm 256 256 1 16 1 */ { "62c98e89a37c9a527d95d5ac3e2548b0" , "THERALYS-12-MONO2-Uncompressed-E_Film_Template.dcm" }, /* gdcm 256 256 1 16 1 */ { "0121cd64c3b9957f76dd338d27454bc6" , "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm" }, /* gdcm 512 512 1 16 1 */ { "09661bd8516aeb5a6f09239f9ca1b092" , "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm" }, /* gdcm 636 434 1 8 3 */ { "23ec8ed09e1ecc353c2e6436a1de6cb2" , "US-GE-4AICL142.dcm" }, /* gdcm 640 480 1 8 1 */ { "ba092234639594ee9091b46997532cce" , "US-IRAD-NoPreambleStartWith0003.dcm" }, /* gdcm 640 480 1 8 1 */ { "1bde104ba256fb73528c5d9a02e363d7" , "US-IRAD-NoPreambleStartWith0005.dcm" }, /* gdcm 128 120 8 8 1 */ { "bf63affde325b3fa81cd5a700f30bd5b" , "US-MONO2-8-8x-execho.dcm" }, /* gdcm 600 430 10 8 3 */ //{ "c70309b66045140b8e08c11aa319c0ab" , "US-PAL-8-10x-echo.dcm" }, { "1785f4d8af4717c17bfb78ba74c18ea5" , "US-PAL-8-10x-echo.dcm" }, /* gdcm 640 480 1 8 3 */ //{ "fe2d477d699e327be2d3d65eb76203e9" , "US-RGB-8-epicard.dcm" }, { "eb3433568c6b0cee90688ccf228ffc02" , "US-RGB-8-epicard.dcm" }, /* gdcm 256 120 1 8 3 */ { "4b350b9353a93c747917c7c3bf9b8f44" , "US-RGB-8-esopecho.dcm" }, /* gdcm 512 512 12 8 1 */ { "136eaf8f7d654bbb08741c201a945561" , "XA-MONO2-8-12x-catheter.dcm" }, // Those where added manually: // If you are lucky and the image is raw (MONOCHROME2) you simply need to // do (assuming you are under UNIX) // $ ./bin/gdcmraw -i 42166745.dcm -o bla.raw // $ md5sum bla.raw // For JPEG and RLE file, you need to check result against dcmtk (dcmdjpeg, // dcmdrle will help you). // Image1 & Image2 are crap, some kind of decompression went wrong // and PixelData is raw so not much you can do... { "1b0768a3518a6b6ed425c3c1d7a7ea3b" , "Image1.dcm" }, { "a41c7f4e75cf637ae8912f5c3cd2c69d" , "Image2.dcm" }, { "22c9be23446a7be61a90d3578f3c9739" , "deflate_image.dcm" }, { "d5681b156af55899835293286c57d887" , "brain.dcm" }, { "d4d365f0500f2ccff932317833d8804b" , "abdominal.dcm" }, { "138d9bd642c6f1cdc427ef6f99132677" , "ankle.dcm" }, { "ff8d450e47e8989478a1b6f19d0988cc" , "spine.dcm" }, { "c78c1721a5ac585a12cf9a52abc25d4c" , "42166745.dcm" }, { "d48ae6ccc815fd171169591a1048c5ed" , "JDDICOM_Sample4.dcm" }, { "63c45c2e73403af781d07ae02247654f" , "I20051107115955.dcm" }, { "938ac04374eadbe6ac4d7df80e5aa178" , "JDDICOM_Sample1.dcm" }, // This one can not be decompressed properly with dcmdjpeg. Until // they fix dcmdjpeg I'll assume decompression went right { "33aa469ec024188d692262d03e7108a0" , "JDDICOM_Sample2.dcm" }, // Same problem { "308b1b6fbc01df4dc3fb168830777cb1" , "JDDICOM_Sample3.dcm" }, // Same thing { "b8b5030261f92574227fe91902738558" , "JDDICOM_Sample5.dcm" }, // This one was computed from dcmtk, gdcm 1.x fails to read it... //{ "49ca8ad45fa7f24b0406a5a03ba8aff6" , "rle16loo.dcm" }, { "04b42f011bdcf56e8a22607cb715447c" , "rle16loo.dcm" }, // Name is poorly chosen since it's actually a Dicom Objects bug // Cannot only be read by gdcm 1.2.x { "f1436c1800ccbba8da82acb7f2dff29d" , "GE_JPEG-Broken.dcm" }, // For some reason the numbers gets funny { "73dd2a43ab7c2810714a8ea1079f3c38" , "10200901_8b_Palette_RLE_blinker.dcm" }, { "609ede096636ae804dbb0fb4d78be2c2" , "10200900_8b_Palette_RLE_blinker.dcm" }, { "ed6078d83f467f9eda5d8cd06f87080f" , "10200905_8b_Palette_RLE_blinker.dcm" }, // This is the same image as rle16loo ... { "49ca8ad45fa7f24b0406a5a03ba8aff6" , "rle16loop_16b_Palette_RLE.dcm" }, // dummy image, this is the same as US-IRAD-NoPreambleStartWith0005.dcm { "1bde104ba256fb73528c5d9a02e363d7" , "US.irad.27702.1.dcm"}, // ACR NEMA with a PhotometricInterpretation.. { "1e3acacba2ae92b52011804ebddbf5df" , "acc-max.dcm" }, { "d5037d66855c7815f55185b808e48750" , "Originale_015.dcm" }, { "bbca0e3e26acdd1ab4f6c4871810ac50" , "PETAt001_PT001.dcm" }, { "5a33e3a2cd414d734984c7a6a5a32a41" , "i0116.dcm" }, { "5a0ebe04ffe50d4373624e444093b855" , "eclipse_dose.dcm" }, { "c4e4589b884cfee49db81746cd18a41c" , "MRMN1786V1L.dcm" }, { "bc8f9791b75916e85c91e458cd1364a3" , "MRMN1786V1T.dcm" }, { "6cee5011d0dcce93d259d272eb94336f" , "MRMN1786V2L.dcm" }, { "793d177bd10188e66483ddc04cbca9e7" , "gdcm-CT-GE-16-GantryTilt.dcm" }, { "7db6d7da455d94ed1a3afda437c3f09e" , "MRMN1786V2T.dcm" }, // JPEG lossy: { "bea6e06fe30abd455288e35aaf47477d" , "angiograms.dcm" }, { "350aea8820dbbdbb15eabc88f3dd3b16" , "image09-bis.dcm" }, // The same as US-IRAD-NoPreambleStartWith0003.dcm { "ba092234639594ee9091b46997532cce" , "US.irad.28317.1.dcm" }, { "21a11f961726c81684be3241eb961819" , "PETAt001_PT204.dcm" }, { "23b5d0a918fb882c08c458c1507c39f7" , "SiemensIcon.dcm" }, { "0121cd64c3b9957f76dd338d27454bc6" , "RMI_Mattes_1_150_001_7_150_cEval0_038.dcm" }, { "350aea8820dbbdbb15eabc88f3dd3b16" , "image09.dcm" }, { "1bde104ba256fb73528c5d9a02e363d7" , "image12.dcm" }, { "417ca9bf1db40dd8656cfb6de0aef181" , "JPEGLosslessLongSQ.dcm" }, { "d5037d66855c7815f55185b808e48750" , "readWrite.dcm" }, // Visible Human written in DICOM with ITK-GDCM (1.2) { "e114252b9acf985cf53b06c39118a290" , "vhm.1001.dcm" }, { "0b4dff77726ccf037fa83c42cc186a98" , "MR_Philips_Intera_Kosher.dcm" }, { "f9d9898ad844a73c0656539388fec85c" , "0001.dcm" }, { "c4031c607b7312952bb560e55cbbb072" , "exp000.dcm" }, { "2bb620b2c516b66faeef7397d30b83f1" , "exp001.dcm" }, { "0dfbe8aa4c20b52e1b8bf3cb6cbdf193" , "RMI_Mattes_unevenLengthTags.dcm" }, // The famous Siemens 0029-1010/1020 { "6a925f871c58553f84ad24195e155c52" , "MR_forceLoad29-1010_29-1020.dcm" }, { "255769e6c9d8a161fce520c958c94de7" , "MR_Siemens_ShadowGroupsImplicitVR.dcm" }, { "5c25c435ecd8eeac124ab427668186de" , "01f7_7fdf.dcm" }, { "0dfbe8aa4c20b52e1b8bf3cb6cbdf193" , "RMI_Mattes_1_1_001_7_1_cEval0_000.dcm" }, { "620012cfec4ae2e6dd0137b2e16947d7" , "ElemZeroNotGroupLength.dcm" }, { "57994245238730f4b4c5eaed21c4144b" , "File000138.dcm" }, { "826b6bc1e36efda1b727b08248a71dd2" , "File000139.dcm" }, { "6b26a5561678b26aa2f21a68ea334819" , "SYNGORTImage.dcm" }, { "a198893279520631657781d47c4097b2" , "Implicit-0001.dcm" }, { "99540b33d088646b8e424a57afdccbe6" , "CT_PET001_CT001.dcm" }, { "343e27f0867b55af74b21a5ba55bd9cc" , "rattag.dcm" }, { "0038402afc09d44d3c75ed207171976b" , "i0002.dcm" }, { "0ad4eca25cc0f783bd60c07b2d73f8b0" , "fudd_post.dcm" }, { "b85ca0e38d91ba0ee3a97f9c709415ac" , "brain_001.dcm" }, { "f1436c1800ccbba8da82acb7f2dff29d" , "SignedShortLosslessBug.dcm" }, { "eb87ca4a01e55dc7a7f1c92f0aa31017" , "ATTMA002_DS.dcm" }, { "f17cf873a3c07f3d91dc88f34664bf0d" , "libido1.0-vol.acr" }, { "d2fab61e0fff8869e448d69951f1084d" , "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm" }, { "e0221ddcc9febdc3c266bb8cd0fcf14f" , "undefined_length_un_vr.dcm" }, { "a136e501bcd1b8ee0835981d2bc8dd87" , "fffc0000UN.dcm" }, { "33aa469ec024188d692262d03e7108a0" , "JDDICOM_Sample2-dcmdjpeg.dcm" }, // mismatch DICOM / JPEG { "d2fab61e0fff8869e448d69951f1084d" , "SIEMENS_MAGNETOM-12-MONO2-VRUN.dcm" }, { "fc5db4e2e7fca8445342b83799ff16d8" , "simpleImageWithIcon.dcm" }, // Following need to be proof checked: { "0b4dff77726ccf037fa83c42cc186a98" , "imp.dcm" }, { "eb5fc6c9e86a69c27b7208d72370a92d" , "Renal_Clearance.dcm" }, { "1b130fa646f8d6b3c14b9443b35c80b4" , "IM0046A0.dcm" }, { "8c00e7f797d8bb4a629ae1e4b08084b9" , "rvg_analysis.dcm" }, { "0d7c2f8714ed3c7dec8194c6e4b359c3" , "BRTUM001.dcm" }, { "e5dbfc8673ea25dd73c95f4df3353b10" , "3DDCM011.dcm" }, { "12150f9067ea72bc56c75d83c42c8108" , "MIRA.dcm" }, { "ae9a191c716dfda2651a147728910a89" , "NM.dcm" }, { "d4444bcca0ee13919f867e486a8f3553" , "QCpatternC-v1.dcm" }, { "ad85be428c08ab4166347ef04bda9637" , "gdcm-MR-PHILIPS-16-Multi-Seq-Correct.dcm" }, { "9c390fc010105325427e3ff29a9b186c" , "SIEMENS_ORIGINAL.dcm" }, { "0b4dff77726ccf037fa83c42cc186a98" , "venticles32004-11-09-08-55-57-6750000000.dcm" }, { "bfff320d1b058e91b4819aa4560c16f7" , "test.dcm" }, { "8c9666cef26a0cc76491a7a8a5239b85" , "Renal_Flow.dcm" }, { "f3a3d0e739e5f4fbeddd1452b81f4d89" , "dclunie.dcm" }, { "78dae0e2d9b7a124fe63300b6356ded4" , "Toshiba7005.dcm" }, { "8240955d1e4b72989f8f49549f1617b2" , "PhilipsWith15Overlays.dcm" }, { "3cd8bd92db17bff54e376885dfefdd8d" , "toto.dcm" }, { "14ad8ae28cc5e5e5dc4c4d010c291a7f" , "test20.dcm" }, { "e7408198028983cd6643a00fd7668c00" , "testacr-jpll.dcm" }, { "6633fb8bce0a648763e7ed2b7de1db5c" , "1_172.dcm" }, { "29cfe7038fae548abd4af4551b2a37cb" , "example.dcm" }, { "6b18e445fbc917e7d6f55b616f17d3e1" , "WrongVRFor00271033.dcm" }, { "0b4dff77726ccf037fa83c42cc186a98" , "ExplicitVRforPublicElementsImplicitVRforShadowElementsCorrected.dcm" }, { "9570a06da59988ff3a7271cdde14abf5" , "3DT1_5138_0077.dcm" }, { "20c5f63d65732703e3fffeb8d67c62ed" , "FluroWithDisplayShutter.dcm" }, { "92b62f22fc44b8563c19f5536d9e499f" , "fudd_ant.dcm" }, { "b92a22ef55d6a1fbd24a6a24a7a84a7f" , "yazhi.dcm" }, { "2b69286289543afc3be7df0400abb8fc" , "IM_0001.dcm" }, //{ "67d86e26740882586b6bf3fe7e09c831" , "PMMA-Treppe.dcm" }, { "287e002ebf84424fe66558b642c51bce" , "PMMA-Treppe.dcm" }, { "82a8d3398c98d23e1b34f5364f967287" , "PERFORM_T1_Symphony_VA25.dcm" }, //{ "00b4b3282855c96744355892caf9d310" , "Al-Treppe.dcm" }, { "2c0ccfeff0a6d4afd7929a672dec0cc0" , "Al-Treppe.dcm" }, { "f891eae2cdfecd578b2204ebbb93f606" , "ImplicitDeclaredAsExplicit.dcm" }, { "7ceb7886f9fbcb7ae979fdb6f1305414" , "CR-Preamble-NoMeta.dcm" }, { "d2fab61e0fff8869e448d69951f1084d" , "db318_MR_STN_stimulator_T2_TSE_TRA__20071005161618048_4.dcm" }, { "2b4d7fb6b039b43145f2766b2339c460" , "0019004_Baseline_IMG1.dcm" }, { "f02e48f4b7df2ff4855733febc92e4e6" , "SIEMENS_GBS_III-16-ACR_NEMA_1.acr.ovly.6002.dcm" }, { "6a34b606135c4cd1c31511164e2cb235" , "SIEMENS_GBS_III-16-ACR_NEMA_1.acr.ovly.6000.dcm" }, { "65f961aca90fb61952d723feec6dec89" , "SIEMENS_GBS_III-16-ACR_NEMA_1.acr.ovly.6006.dcm" }, { "fc137690ae436bb44a695fb2f1e49d85" , "SIEMENS_GBS_III-16-ACR_NEMA_1.acr.ovly.6004.dcm" }, // No tested: { "864e2c5d6acf5a371fe9eaa7ee0dcf5f" , "acr_image_with_non_printable_in_0051_1010.acr" }, { "7efed1c332c62ea34d5edad901081c36" , "mr_r_opptak000_20000925_t2.nema" }, { "d6995bd1d76eb36913c985c8397ff02d" , "mr_r_opptak000_20000925_t1.nema" }, { "dc549f804f1f59bfee245ddf100ee26b" , "SIEMENS-IncompletePixelData.dcm" }, { "51b7e83cdc569b8f355662d80bd7036d" , "20061119171007906.dcm" }, { "01db0d71100c47013e588082d5f39bab" , "MR0001.dcm" }, { "d9df75ff0394bb9a3753b625933d94fc" , "ModalityLUT.dcm" }, { "acd3f756192a9f0484c971db2869d70b" , "PublicElementsImplicitInExplicitDataSet.dcm" }, { "820575fcc05338f3e95296107d9ddf7a" , "MR3.dcm" }, { "3c6984afa2af4257565d8f622f7f5e5b" , "SIEMENS-JPEG-CorruptFragClean.dcm" }, { "cc2968949ffbb6548288ffde7e5202e4" , "D_CLUNIE_RG3_JPLY_dcmtk.dcm" }, { "83656f4989a2d4be8f9ad56d83a907f5" , "5decf5b5-6695-4557-867e-a1f97321cd80.dcm" }, { "92655f77a55eb9c316223b9e73d55800" , "PMS-IncompletePixelData.dcm" }, { "6a23c9f150a360381c8fbceb2277efc5" , "TOSHIBA-CurveData2.dcm" }, { "6ad75566935554fcc60ca35a003fba6d" , "IM_00003.dcm" }, { "ab7cab6e7b5f9043f8fa7c0ae3f1b282" , "19872890.dcm" }, { "48eb24e37d41faca8b629b3807c20d92" , "rm6_DICM.dcm" }, { "201c9761ed911ad12508248252f4ff16" , "T2*_1484_0009.dcm" }, { "90017033c3916259cad63615385a1d02" , "BogugsItemAndSequenceLength.dcm" }, { "b09dc714f6d56d29005996b3204eec25" , "TOSHIBA-CurveData1.dcm" }, { "5ed3d1de2a086ac7efd31a6f1463f129" , "SCIsMR.dcm" }, { "9bbb1d908401299e73e636ad5b19a225" , "Siemens_CT_Sensation64_has_VR_RT.dcm" }, { "13e41624a8b86c18ac257e3588f818ce" , "tst_ok.dcm" }, { "17f514732d5f7e9484ed33c35bddc930" , "ImplicitVRInExplicitDataSet.dcm" }, { "0826b8cc512a8e4d726c1c019af2eaf9" , "29627381.dcm" }, { "727383f164107aaa9ee6c2182f94b91d" , "1.2.752.24.6.1820537353.20080220145707750.8.1.dcm" }, { "5588652e673e745ad56441f5a26c2305" , "22484474.dcm" }, { "cf6fde116c90e4e56512b22004503d96" , "PHILIPS_PrivateSeqWithPublicElems.dcm" }, { "098bba76d4e75a3148c9b62aee35f950" , "GEMS-IncompletePixelData.dcm" }, { "1fe71a52a211d1a56cc49cdcb71c1dbb" , "IM03.dcm" }, { "b857b6cce2afd7033476526b89ed9678" , "TheralysGDCM1.dcm" }, { "e998bbfca8b892fd0955c95b6f1584ea" , "Theralys2048Thingy.dcm" }, { "0508d28682e209f87d28184ae10060bd" , "Compress_16bit_noPVRG.dcm" }, { "90017033c3916259cad63615385a1d02" , "BogugsItemAndSequenceLengthCorrected.dcm" }, { "51b7e83cdc569b8f355662d80bd7036d" , "debian_medcon_401529.dcm" }, { "51b7e83cdc569b8f355662d80bd7036d" , "BogusItemStartItemEnd.dcm" }, { "3c6984afa2af4257565d8f622f7f5e5b" , "SIEMENS-JPEG-CorruptFrag.dcm" }, { "192f5ebd4d8f6164a4142421408172b2" , "PhilipsByteSwapping.dcm" }, { "2438b8feef6c8f682b2f468aff4475e5" , "MismatchSOPClassUID.dcm" }, { "738092e703655b6ae22a907d9f9f0c9c" , "YBRisGray.dcm" }, { "635e947fc156c89a8d10ced8317ace82" , "2mAs.dcm" }, { "54d648704507de7cd6e4be12061a5fb2" , "OSIRIX_MONOCHROME2_BUG.dcm" }, { "1db40fc52b962c8b6823980fe9dad6d8" , "5mAs.dcm" }, { "1b130fa646f8d6b3c14b9443b35c80b4" , "IM0046A0_2.dcm" }, { "cdfb45de5ddad3e7e2b0053c848d0d2b" , "ImplicitVRInExplicitDataSet2.dcm" }, { "ec5c421832df7cc43801d038705cd2cf" , "OverlayPrivateDataInBetween.dcm" }, { "9a375c3b2a72a6ccf687250b17f646c9" , "ItemTerminatorVLnot0.dcm" }, { "5269176094127c6f106cbcf9dbdf55b0" , "I0000017.dcm" }, { "eb87ca4a01e55dc7a7f1c92f0aa31017" , "EmptyItemStarter.dcm" }, { "cae8f644373163cb3970999f7ac00fd3" , "169585.dcm" }, { "5ea911b29f472f371d21f2da2fd6b016" , "VRUNInMetaHeader.dcm" }, { "ad7b664eed26e95f790c24cdb3060fb9" , "IM000450.dcm" }, { "4f113f33863067b8ca8d560cb194da09" , "TOSHIBA-CurveData3.dcm" }, { "14fa2ae9f63742af6944edd4a61145e8" , "mrbrainR.dcm" }, { "ba17ae006314a097fef7a32fa1a624b0" , "c42g57hg64ca02.dcm" }, { "10047ec574a6401ad90606e63304de6e" , "0020.DCM" }, { "5184839806c9a9583fe192d43cede939" , "001005XA" }, { "5291e36a7d54d4c8e00d5765cd0b3d17" , "001007XA" }, { "a57df7bc23977977832f98bfb662cdb4" , "001003XA" }, { "b36329c27f359daede3205d7c57cccd1" , "001009XA" }, { "1d173a6f31e0e4dd1078adf3557774c7" , "001008XA" }, { "9b42aa4e5d3b5f889164b5a734b954b3" , "001010XA" }, { "87f72a961292c83f8a9230e8eefecc6b" , "001004XA" }, { "6c7a303d25b418988ef9a37c4315a746" , "001001XA" }, { "9dde002e4e99218891df5f98da56ec9d" , "001002XA" }, { "6c7a303d25b418988ef9a37c4315a746" , "001001XA.1" }, { "8891d44376bc53c7bd0d36d2b776cd9b" , "001006XA" }, { "a6d10a3de9499d8853c6667b82628e86" , "TOSHIBA-EnhancedCT.dcm" }, { "71b3b19571f5b9e7ec931071bf5157dd" , "CroppedArm.dcm" }, { "bab06b7112dbce4f528bab5c1b89abc1" , "Bug_Philips_ItemTag_3F3F.dcm" }, { "8d3a64a67b4d8d15561fb586fd0706ee" , "Nm.dcm" }, { "05392d4f7a0c05223eeb957ee60203a9" , "MergeCOM3_330_IM50.dcm" }, { "635c2dbedea549a89f88e959934ed93c" , "ELSCINT1_OW.dcm" }, { "594995a6eb12a565247cd98f967a378d" , "KONICA_VROX.dcm" }, { "1497b865a4c6ab73cd6797b8834baa9f" , "TheralysNoModalityNoObject.dcm" }, { "d1f8cbdb279d038e2674ec0907afffe1" , "gastrolateral.dcm" }, { "ea24c09f475a4e9643e27f6d470edc67" , "SIEMENS_GBS_III-16-ACR_NEMA_1-ULis2Bytes.dcm" }, { "ecd26fb1fa914918ff9292c4f7340050" , "MR00010001.dcm" }, { "c56567bbb8f1924d6c0c6fd8ca7f239d" , "006872.003.107.dcm" }, { "228e9af71b8ce00cae3066e3fdd3641f" , "SIEMENS_MONOCHROME2_LUT_MOCO.dcm" }, { "ef8c3435ee7a9b332976f2dc56833d3a" , "GENESIS_SIGNA-JPEG-CorruptFrag.dcm" }, // FIXME ! { "42a4f33eb34456e3e82f30d707c84870" , "DCMOBJ_IMG57.dcm" }, { "3a85617df95abbb63cd84a183515c697" , "image.acr" }, { "8c5a627c461688cfa5dc708a170c5eda" , "IM-0001-0001.dcm" }, { "ec87a838931d4d5d2e94a04644788a55" , "test_att.acr" }, { "0621954acd5815e0b4f7b65fcc6506b1" , "SIEMENS_ImageLocationUN.dcm" }, { "e1e34e81050d17b07a20c0e43c355187" , "GDCMFakeJPEG.dcm" }, { "ef9f915086db838334ddc656a10486f2" , "DMCPACS_ExplicitImplicit_BogusIOP.dcm" }, { "498f80fd27882351b9a09e6ceef470bc" , "ELSCINT1_GDCM12Bug.dcm" }, { "34b5c1ce40f09f0dbede87ebf3f6ed3c" , "korean_agfa_infinitt_2008-3.dcm" }, { "2c8b8ee9950582af472cf652005f07d4" , "c_vf1001.dcm" }, { "a1ea6633f17ef1e0d702cdd46434b393" , "MARTIN_ALBERT-20010502-2-1.nema" }, { "d85237c7ff838f5246643a027d3727ae" , "GDCMPrinterDisplayUNasSQ.dcm" }, { "2dbe2da7fbcf1bd73e2221e9cd4ad7ee" , "MissingPixelRepresentation.dcm" }, { "a3009bc70444148c5ea2441a099f9dc6" , "E00001S03I0015.dcm" }, { "afe5937be25ac657e48b1270b52e6d98" , "Martin.dcm" }, { "4d790e17ee35572d64e37c55dbc36725" , "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm" }, { "93ddc0c3d642af60f55630232d2801ae" , "CT_Image_Storage_multiframe.dcm" }, { "6127740892542f23e37e6ab516b17caf" , "ELSCINT1_JP2vsJ2K.dcm" }, { "b620a57170941e26dfd07ff334c73cb4" , "GE_MR_0025xx1bProtocolDataBlock.dcm" }, { "4b5423b34ab4e104c222359a91448a5d" , "CT-SIEMENS-MissingPixelDataInIconSQ.dcm" }, { "79b8705f2e6c7464bd3e2fc7e1d3483b" , "KODAK_CompressedIcon.dcm" }, { "59071590099d21dd439896592338bf95" , "ima43.dcm" }, { "46bf12c412590767bb8cd7f0d53eaa87" , "TG18-CH-2k-01.dcm" }, { "9214cc4f62fbea873ffad88e1be877c5" , "LJPEG_BuginGDCM12.dcm" }, { "52607a16af1eaddbbc71c14d32e489d8" , "DX_J2K_0Padding.dcm" }, { "6af53848fe77feb56a12aba74dadea8e" , "TheralysGDCM120Bug.dcm" }, { "79b8705f2e6c7464bd3e2fc7e1d3483b" , "TestVRSQUN2.dcm" }, { "71e4ea61df4f7ada2955799c91f93e74" , "TestVRSQUN1.dcm" }, { "6396332b75b15bf30b1dd1cd0f212691" , "SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm" }, { "ba8dae4b43075c7e8562f5addf5f95c3" , "DX_GE_FALCON_SNOWY-VOI.dcm" }, { "d6fb1fb06318dd305a461db9c84cf825" , "JPEG_LossyYBR.dcm" }, { "43f33c06d56f239ce9ed5ca0d66a69d2" , "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm" }, { "dae9d2e2b412646fd0a0f31dc2d17aa4" , "BugGDCM2_UndefItemWrongVL.dcm" }, { "62687f0a17e9c4153f18b55c8abfcef3" , "SIEMENS_CSA2.dcm" }, { "a02fa05065b3a93a391f820ac38bd9ee" , "MAROTECH_CT_JP2Lossy.dcm" }, { "8b5e38699887158c3defd47900a68fc5" , "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm" }, { "c57035e2dac52e339b27e8c965251b3d" , "DCMTK_JPEGExt_12Bits.dcm" }, // checked with dcmdjpeg v3.5.4+ 2009-05-07 { "d7673c8575cb2765f8ae25aa3899c77e" , "PHILIPS_GDCM12xBug.dcm"}, { "a597540a79306be4710f4f04497fc23a" , "PHILIPS_GDCM12xBug2.dcm"}, { "1e8843c2d247f9e9e7a44c9c6de43f6d" , "multiframegrayscalewordscis.dcm" }, { "928b41468193f0eecaea216866bbe735" , "signedtruecoloroldsc.dcm" }, { "209bc9b02004a712f0436a1ca5e676b4" , "multiframesinglebitscis.dcm" }, { "c8698fa1ec0b227113f244954b8e88f4" , "multiframegrayscalebytescis.dcm" }, { "dce1513162a762bf43dcc3c9d5c5c3f7" , "multiframetruecolorscis.dcm" }, { "6bf95a48f366bdf8af3a198c7b723c77" , "SinglePrecisionSC.dcm" }, { "42cb593979fcc4630f965c31caaf4ec1" , "MR16BitsAllocated_8BitsStored.dcm" }, { "da153c2f438d6dd4277e0c6ad2aeae74" , "OsirixFake16BitsStoredFakeSpacing.dcm" }, { "1c485e1ac2b2bdbeeba14391b8c1e0c8" , "JPEGDefinedLengthSequenceOfFragments.dcm" }, { "ae1290d59c63b0c334a4834c5995fe45" , "AMIInvalidPrivateDefinedLengthSQasUN.dcm" }, { "f3a3d0e739e5f4fbeddd1452b81f4d89" , "D_CLUNIE_CT1_JLSL.dcm" }, { "5e9085c66976d2f5f9989d88bf7a90c4" , "D_CLUNIE_CT1_JLSN.dcm" }, { "9eb513314b2fcf25d895e18ffb2ead0b" , "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" }, { "fb8119f30ec32ff575789caa969180ca" , "IM-0001-0066.CommandTag00.dcm" }, { "6f26e552a1b71d386483118779d192ad" , "NM_Kakadu44_SOTmarkerincons.dcm" }, { "56238d3665ebdb0251d1161fb7f4edc6" , "GDCMJ2K_TextGBR.dcm" }, { "f8a1f4ce85b51527267e670a8aa0c308" , "PhilipsInteraSeqTermInvLen.dcm" }, // following 3 md5 computes with kdu_expand v6.3.1 { "d6347ed051d7b887bdaad1a91433c6ba" , "TOSHIBA_J2K_SIZ1_PixRep0.dcm" }, { "d6347ed051d7b887bdaad1a91433c6ba" , "TOSHIBA_J2K_SIZ0_PixRep1.dcm" }, { "94414d8b4300aa3d8cbe4475d34e8e54" , "TOSHIBA_J2K_OpenJPEGv2Regression.dcm" }, { "304f147752d46adfdcff71a30cd03d0a" , "NM-PAL-16-PixRep1.dcm" }, { "20b1e4de7b864d44fcd0dda1fc42402c" , "MEDILABInvalidCP246_EVRLESQasUN.dcm" }, // gdcmDataExtra: { "cb26bfacea534b5cd6881bc36520ecfc" , "US_512x512x2496_JPEG_BaseLine_Process_1.dcm" }, { "d40e2d27988f0c546b0daeb67fcbfba8" , "i32.XADC.7.215MegaBytes.dcm" }, { "c383b244fd43cb0a9db764b71cb59741" , "1.3.46.670589.7.5.10.80002138018.20001204.181556.9.1.1.dcm" }, { "f111ed4eea73f535261039d3f7b112e9" , "JPEGInvalidSecondFrag.dcm" }, // Computed with kakadu: { "a218fcee00e16d430f30ec7ebd4937dc" , "lena512_rot90.j2k.dcm" }, { "dbf83984984741c98205d77a947b442c" , "SC16BitsAllocated_8BitsStoredJ2K.dcm" }, { "f845c8f283d39a0204c325654493ba53" , "SC16BitsAllocated_8BitsStoredJPEG.dcm" }, { "4a5d8549791432b29948dd8ff63e2534" , "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" }, { "2c8630ae1bff925b258d98e742dfc632" , "JPEGLS_CharLS_10742.dcm" }, { "f666a95dde9ddfdec0cf9574a7985ae3" , "IllegalGroup2ImplicitTS.dcm" }, { "b85686dd3169b99725149abb00181254" , "RLEDebianBug816607Orig.dcm" }, { "464960d948dff0ded72b0380080f18a3" , "JPEGNote_empty.dcm" }, { "cdfb5dd0c999d88badeb00a16f96554f" , "JPEGLosslessYBR_FULL_422.dcm" }, { "464960d948dff0ded72b0380080f18a3" , "JPEGNote_missing.dcm" }, { "161e9fd986ea87adf2596e8e16641f11" , "JPEGNote_bogus.dcm" }, { "ad8f1164f0517ee150bf510d5dba5cc6" , "GE_MR_0025xx1bProtocolDataBlockXML.dcm" }, { "a0e0effa8d5638721b19e592acc11a4c" , "EmptyIcon_Bug417.dcm" }, { "2b64303085d747956bfdda2ee8cc33bc" , "EnhancedWithIPPPerFrameIOPShared.dcm" }, { "4ca2f3a88d21d941f6485a8d91f96e29" , "FUJI-ffff-MONO1-J2K.dcm" }, { "b9697e3615a841e4c04f45ede6923278" , "JPEGLosslessSeNonZero.dcm" }, { "5fcd7d6573cab16d2ef575bba878ec78" , "US-YBR_FULL_422-EVRLE.dcm" }, { "d62b4c13e8108671f1c66626c5bdee55" , "Osirix10vs8BitsStored.dcm" }, { "b7c6fb507da1b7a3f81f821a2e3eaf49" , "Bug_Siemens_PrivateIconNoItem.dcm" }, { "56238d3665ebdb0251d1161fb7f4edc6" , "HardcopyColor_YBR_RCT_J2K_PC1.dcm" }, { "5fe2b8742f05a0ba06d354f965266dbc" , "PET-GE-dicomwrite-PixelDataSQUNv2.dcm" }, { "20b1e4de7b864d44fcd0dda1fc42402c" , "MEDILABValidCP246_EVRLESQasOB.dcm" }, /* Stopping condition */ { nullptr ,nullptr } }; gdcm-3.0.22/Testing/Source/Data/gdcmDataFileNames.cxx.in000664 001766 001770 00000002322 14517730450 025223 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* Hardcode the path to GDCM_DATA_ROOT */ static const char GDCM_DATA_ROOT[] = "@GDCM_DATA_ROOT@"; static const char GDCM_DATA_EXTRA_ROOT[] = "@GDCM_DATA_EXTRA_ROOT@"; static const char GDCM_PIXEL_SPACING_DATA_ROOT[] = "@GDCM_PIXEL_SPACING_DATA_ROOT@"; /* Hardcode the path to GDCM_TEMP_DIRECTORY */ static const char GDCM_TEMP_DIRECTORY[] = "@GDCM_TEMP_DIRECTORY@"; static const char * const gdcmDataFileNames[] = { @GDCM_DATA_FILENAMES@ 0 }; static const char * const gdcmBlackListReaderDataFileNames[] = { @GDCM_BLACK_LIST_READER_DATA_FILENAMES@ 0 }; //const char * const gdcmBlackListWriterDataImages[] = { // @GDCM_BLACK_LIST_WRITER_DATA_IMAGES@ //0 }; gdcm-3.0.22/Testing/Source/Data/gdcmMediaStorageDataFiles.cxx000664 001766 001770 00000037734 14517730450 026321 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http:/gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* * gdcmscanner -d /path/to/gdcmData/ -t 8,16 -p */ static const char * const gdcmMediaStorageDataFiles[][2] = { { "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm","1.2.840.10008.5.1.4.1.1.7" }, { "SIEMENS_GBS_III-16-ACR_NEMA_1.acr", "1.2.840.10008.5.1.4.1.1.4"}, { "00191113.dcm","1.2.840.10008.5.1.4.1.1.12.1"}, { "SignedShortLosslessBug.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "gdcm-MR-PHILIPS-16-NonSquarePixels.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "ACUSON-24-YBR_FULL-RLE.dcm","1.2.840.10008.5.1.4.1.1.6.1"}, { "D_CLUNIE_VL2_RLE.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "MR_Philips-Intera_BreaksNOSHADOW.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "D_CLUNIE_MR2_JPLL.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "D_CLUNIE_XA1_JPLL.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "JPEG_LossyYBR.dcm","1.2.840.10008.5.1.4.1.1.6.1"}, { "ALOKA_SSD-8-MONO2-RLE-SQ.dcm","1.2.840.10008.5.1.4.1.1.6.1"}, { "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "MR-MONO2-12-shoulder.dcm","1.2.840.10008.5.1.4.1.1.4"}, //{ "MR_SIEMENS_forceLoad29-1010_29-1020.README.txt (could not be read)}, //{ "ExplicitVRforPublicElementsImplicitVRforShadowElements.README.txt (could not be read)}, { "D_CLUNIE_RG3_JPLY.dcm","1.2.840.10008.5.1.4.1.1.1"}, { "SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs.acr","1.2.840.10008.5.1.4.1.1.2"}, { "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "DICOMDIR_MR_B_VA12A" , "1.2.840.10008.1.3.10" }, { "MR-MONO2-8-16x-heart.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "SIEMENS_ImageLocationUN.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "US-PAL-8-10x-echo.dcm","1.2.840.10008.5.1.4.1.1.3.1"}, { "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "SIEMENS_MAGNETOM-12-MONO2-Uncompressed.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "MR-MONO2-12-an2.acr","1.2.840.10008.5.1.4.1.1.4"}, { "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "US-RGB-8-esopecho.dcm","1.2.840.10008.5.1.4.1.1.6"}, { "GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "CT-SIEMENS-Icone-With-PaletteColor.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "gdcm-ACR-LibIDO.acr" , "1.2.840.10008.5.1.4.1.1.7"}, // COMPAT { "LEADTOOLS_FLOWERS-16-MONO2-Uncompressed.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "FUJI-10-MONO1-ACR_NEMA_2.dcm","1.2.840.10008.5.1.4.1.1.1"}, { "D_CLUNIE_CT1_RLE.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "undefined_length_un_vr.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "D_CLUNIE_MR4_JPLL.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "PET-cardio-Multiframe-Papyrus.dcm", "" }, { "dicomdir_Pms_WithVisit_WithPrivate_WithStudyComponents" , "1.2.840.10008.1.3.10"}, { "CT_16b_signed-UsedBits13.dcm","1.2.840.10008.5.1.4.1.1.2"}, //{ "TestAllEntryVerifyReference.txt (could not be read)}, { "DX_J2K_0Padding.dcm","1.2.840.10008.5.1.4.1.1.1.1"}, { "KODAK_CompressedIcon.dcm","1.2.840.10008.5.1.4.1.1.1"}, { "D_CLUNIE_CT2_JPLL.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "DermaColorLossLess.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "DICOMDIR" , "1.2.840.10008.1.3.10" }, { "LIBIDO-24-ACR_NEMA-Rectangle.dcm", "" }, { "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm","1.2.840.10008.5.1.4.1.1.4"}, //{ "MR-SIEMENS-DICOM-WithOverlays.README.txt (could not be read)}, { "D_CLUNIE_NM1_JPLY.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "LEADTOOLS_FLOWERS-24-RGB-JpegLossy.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "D_CLUNIE_CT1_J2KR.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "LEADTOOLS_FLOWERS-16-MONO2-RLE.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "US-RGB-8-epicard.dcm","1.2.840.10008.5.1.4.1.1.6.1"}, { "D_CLUNIE_MR3_RLE.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "test.acr" ,"1.2.840.10008.5.1.4.1.1.7"}, // COMPAT { "LEADTOOLS_FLOWERS-8-MONO2-Uncompressed.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "US-IRAD-NoPreambleStartWith0005.dcm","1.2.840.10008.5.1.4.1.1.6"}, { "D_CLUNIE_RG2_JPLL.dcm","1.2.840.10008.5.1.4.1.1.1"}, { "ELSCINT1_PMSCT_RLE1.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "DMCPACS_ExplicitImplicit_BogusIOP.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "LIBIDO-16-ACR_NEMA-Volume.dcm", "" }, //{ "Changelog (could not be read)}, //{ "ELSCINT1_LOSSLESS_RICE.txt (could not be read)}, { "MR-SIEMENS-DICOM-WithOverlays.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "JDDICOM_Sample2-dcmdjpeg.dcm", "" }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "D_CLUNIE_MR3_JPLY.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "TheralysGDCM120Bug.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "US-GE-4AICL142.dcm","1.2.840.10008.5.1.4.1.1.6.1"}, { "3E768EB7.dcm","1.2.840.10008.5.1.4.1.1.2"}, //{ "gdcm-MR-PHILIPS-16-Multi-Seq.README.txt (could not be read)}, { "SIEMENS_Sonata-16-MONO2-Value_Multiplicity.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "GE_MR_0025xx1bProtocolDataBlock.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "D_CLUNIE_SC1_JPLY.dcm","1.2.840.10008.5.1.4.1.1.7"}, //{ "imagesWithOverlays.README.txt (could not be read)}, { "CT-MONO2-16-chest.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "D_CLUNIE_MR4_RLE.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "gdcm-CR-DCMTK-16-NonSamplePerPix.dcm" , "" }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "ELSCINT1_JP2vsJ2K.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "D_CLUNIE_CT2_RLE.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "D_CLUNIE_MR2_RLE.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "OT-MONO2-8-a7.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "MR-MONO2-16-head.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "PICKER-16-MONO2-No_DicomV3_Preamble.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "gdcm-JPEG-Extended.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "MR-MONO2-12-angio-an1.acr", ""}, { "BugGDCM2_UndefItemWrongVL.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "D_CLUNIE_MR1_RLE.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "ELSCINT1_LOSSLESS_RICE.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "dicomdir_Pms_With_heavy_embedded_sequence" , "1.2.840.10008.1.3.10" }, { "PICKER-16-MONO2-Nested_icon.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "D_CLUNIE_VL4_RLE.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "D_CLUNIE_RG1_RLE.dcm","1.2.840.10008.5.1.4.1.1.1"}, { "JDDICOM_Sample2.dcm", "" }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "CT-MONO2-8-abdo.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "D_CLUNIE_SC1_RLE.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "LEADTOOLS_FLOWERS-24-RGB-JpegLossless.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "LIBIDO-8-ACR_NEMA-Lena_128_128.acr" , "" }, { "D_CLUNIE_RG3_JPLL.dcm","1.2.840.10008.5.1.4.1.1.1"}, { "SIEMENS_CSA2.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "SIEMENS_GBS_III-16-ACR_NEMA_1-ULis2Bytes.dcm", "" }, { "LJPEG_BuginGDCM12.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "CT-SIEMENS-MissingPixelDataInIconSQ.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "libido1.0-vol.acr" , "" }, { "MR_Spectroscopy_SIEMENS_OF.dcm","1.2.840.10008.5.1.4.1.1.4.2"}, { "GE_CT_With_Private_compressed-icon.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "D_CLUNIE_XA1_JPLY.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "012345.002.050.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "LEADTOOLS_FLOWERS-8-MONO2-JpegLossy.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "gdcm-US-ALOKA-16.dcm","1.2.840.10008.5.1.4.1.1.6.1"}, { "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "D_CLUNIE_CT1_JPLL.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "rle16loo.dcm","1.2.840.10008.5.1.4.1.1.3.1"}, { "D_CLUNIE_US1_RLE.dcm","1.2.840.10008.5.1.4.1.1.6.1"}, { "LEADTOOLS_FLOWERS-8-MONO2-RLE.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "RadBWLossLess.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "dicomdir_Acusson_WithPrivate_WithSR" , "1.2.840.10008.1.3.10"}, { "D_CLUNIE_MR1_JPLY.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "GE_DLX-8-MONO2-PrivateSyntax.dcm","1.2.840.10008.5.1.4.1.1.12.1"}, { "gdcm-JPEG-LossLess3a.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "TG18-CH-2k-01.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "OT-PAL-8-face.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "D_CLUNIE_NM1_RLE.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "rle16sti.dcm","1.2.840.10008.5.1.4.1.1.6.1"}, { "GE_GENESIS-16-MONO2-WrongLengthItem.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "D_CLUNIE_CT1_J2KI.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "LEADTOOLS_FLOWERS-24-RGB-Uncompressed.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "D_CLUNIE_MR4_JPLY.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "D_CLUNIE_RG3_RLE.dcm","1.2.840.10008.5.1.4.1.1.1"}, { "SIEMENS-12-Jpeg_Process_2_4-Lossy-a.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "DICOMDIR-Philips-EasyVision-4200-Entries", "1.2.840.10008.1.3.10"}, { "CT-MONO2-16-brain.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "D_CLUNIE_RG2_JPLY.dcm","1.2.840.10008.5.1.4.1.1.1"}, { "MAROTECH_CT_JP2Lossy.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "D_CLUNIE_MR1_JPLL.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "dicomdir_With_embedded_icons", "1.2.840.10008.1.3.10"}, { "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm", "" }, { "MR_SIEMENS_forceLoad29-1010_29-1020.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "simpleImageWithIcon.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "D_CLUNIE_MR3_JPLL.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "D_CLUNIE_RG1_JPLL.dcm","1.2.840.10008.5.1.4.1.1.1"}, { "US-MONO2-8-8x-execho.dcm","1.2.840.10008.5.1.4.1.1.3"}, { "XA-MONO2-8-12x-catheter.dcm","1.2.840.10008.5.1.4.1.1.12.1"}, //{ "TheralysGDCM120Bug.README.txt (could not be read)}, { "GE_LOGIQBook-8-RGB-HugePreview.dcm","1.2.840.10008.5.1.4.1.1.7"}, //{ "MR_Philips_Intera_PrivateSequenceImplicitVR.README.txt (could not be read)}, { "gdcm-MR-SIEMENS-16-2.acr", ""}, { "gdcm-MR-PHILIPS-16-Multi-Seq.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "D_CLUNIE_XA1_RLE.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "NM-MONO2-16-13x-heart.dcm","1.2.840.10008.5.1.4.1.1.20"}, { "gdcm-JPEG-LossLessThoravision.dcm","1.2.840.10008.5.1.4.1.1.1"}, //{ "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.txt (could not be read)}, { "GE_DLX-8-MONO2-Multiframe.dcm","1.2.840.10008.5.1.4.1.1.12.1"}, { "PHILIPS_Intera-16-MONO2-Uncompress.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "D_CLUNIE_MR2_JPLY.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "05148044-mr-siemens-avanto-syngo.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "D_CLUNIE_VL3_RLE.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "D_CLUNIE_RG2_RLE.dcm","1.2.840.10008.5.1.4.1.1.1"}, { "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "KODAK-12-MONO1-Odd_Terminated_Sequence.dcm","1.2.840.10008.5.1.4.1.1.1"}, { "SIEMENS-MR-RGB-16Bits.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "CR-MONO1-10-chest.dcm","1.2.840.10008.5.1.4.1.1.1"}, { "DX_GE_FALCON_SNOWY-VOI.dcm","1.2.840.10008.5.1.4.1.1.1.1"}, { "US-IRAD-NoPreambleStartWith0003.dcm","1.2.840.10008.5.1.4.1.1.6"}, { "MR-Brucker-CineTagging-NonSquarePixels.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "D_CLUNIE_VL6_RLE.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "fffc0000UN.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "CT-MONO2-12-lomb-an2.acr" , "" }, { "SIEMENS_Sonata-12-MONO2-SQ.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "ACUSON-24-YBR_FULL-RLE-b.dcm","1.2.840.10008.5.1.4.1.1.6.1"}, { "CT-MONO2-16-ankle.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm","1.2.840.10008.5.1.4.1.1.12.1"}, { "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "CT-MONO2-16-ort.dcm","1.2.840.10008.5.1.4.1.1.2"}, { "LEADTOOLS_FLOWERS-16-MONO2-JpegLossless.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "D_CLUNIE_NM1_JPLL.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "D_CLUNIE_VL1_RLE.dcm","1.2.840.10008.5.1.4.1.1.7"}, { "IM-0001-0066.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "SIEMENS_MAGNETOM-12-MONO2-VRUN.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "PhilipsInteraSeqTermInvLen.dcm","1.2.840.10008.5.1.4.1.1.4"}, { "PHILIPS_GDCM12xBug.dcm" , "1.2.840.10008.5.1.4.1.1.4" }, { "OsirixFake16BitsStoredFakeSpacing.dcm", "1.2.840.10008.5.1.4.1.1.7" }, { "IM-0001-0066.CommandTag00.dcm", "1.2.840.10008.5.1.4.1.1.4" }, { "AMIInvalidPrivateDefinedLengthSQasUN.dcm" , "1.2.840.10008.5.1.4.1.1.4" }, { "GDCMJ2K_TextGBR.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, { "MR16BitsAllocated_8BitsStored.dcm" , "1.2.840.10008.5.1.4.1.1.4" }, { "D_CLUNIE_CT1_JLSL.dcm", "1.2.840.10008.5.1.4.1.1.2" }, { "JPEGDefinedLengthSequenceOfFragments.dcm" , "1.2.840.10008.5.1.4.1.1.2" }, { "PHILIPS_GDCM12xBug2.dcm" , "1.2.840.10008.5.1.4.1.1.4" }, { "DCMTK_JPEGExt_12Bits.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, { "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" , "1.2.840.10008.5.1.4.1.1.20" }, { "NM_Kakadu44_SOTmarkerincons.dcm" , "1.2.840.10008.5.1.4.1.1.1" }, { "D_CLUNIE_CT1_JLSN.dcm", "1.2.840.10008.5.1.4.1.1.2" }, { "TOSHIBA_J2K_SIZ1_PixRep0.dcm", "1.2.840.10008.5.1.4.1.1.2"}, { "TOSHIBA_J2K_SIZ0_PixRep1.dcm", "1.2.840.10008.5.1.4.1.1.2" }, { "TOSHIBA_J2K_OpenJPEGv2Regression.dcm", "1.2.840.10008.5.1.4.1.1.2" }, { "NM-PAL-16-PixRep1.dcm", "1.2.840.10008.5.1.4.1.1.20" }, { "MEDILABInvalidCP246_EVRLESQasUN.dcm", "1.2.840.10008.5.1.4.1.1.2" }, { "JPEGInvalidSecondFrag.dcm", "1.2.840.10008.5.1.4.1.1.2" }, { "ELSCINT1_PMSCT_RLE1_priv.dcm", "1.2.840.10008.5.1.4.1.1.2" }, { "unreadable.dcm", "1.2.840.10008.5.1.4.1.1.2" }, { "SC16BitsAllocated_8BitsStoredJPEG.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, { "SC16BitsAllocated_8BitsStoredJ2K.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, { "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" , "1.2.840.10008.5.1.4.1.1.4" }, { "JPEGNote_empty.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, { "JPEGLS_CharLS_10742.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, { "JPEGLosslessYBR_FULL_422.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, { "JPEGNote_missing.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, { "JPEGNote_bogus.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, { "RLEDebianBug816607Orig.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, { "IllegalGroup2ImplicitTS.dcm" , "1.2.840.10008.5.1.4.1.1.1" }, { "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, { "LengthOfItemLarger.dcm" , "1.2.840.10008.5.1.4.1.1.4" }, { "GE_MR_0025xx1bProtocolDataBlockXML.dcm" , "1.2.840.10008.5.1.4.1.1.4" }, { "MITRA_CORNELL.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, { "EmptyIcon_Bug417.dcm" , "1.2.840.10008.5.1.4.1.1.2" }, { "EnhancedWithIPPPerFrameIOPShared.dcm" , "1.2.840.10008.5.1.4.1.1.13.1.2" }, { "FUJI-ffff-MONO1-J2K.dcm" , "1.2.840.10008.5.1.4.1.1.1" }, { "JPEGLosslessSeNonZero.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, { "US-YBR_FULL_422-EVRLE.dcm" , "1.2.840.10008.5.1.4.1.1.6.1" }, { "PET-GE-dicomwrite-PixelDataSQUN.dcm" , "1.2.840.10008.5.1.4.1.1.128" }, { "Osirix10vs8BitsStored.dcm" , "1.2.840.10008.5.1.4.1.1.4" }, { "Bug_Siemens_PrivateIconNoItem.dcm" , "1.2.840.10008.5.1.4.1.1.2" }, { "HardcopyColor_YBR_RCT_J2K_PC1.dcm" , "1.2.840.10008.5.1.1.30" }, { "PET-GE-dicomwrite-PixelDataSQUNv2.dcm" , "1.2.840.10008.5.1.4.1.1.128" }, { "PET-GE-dicomwrite-PixelDataSQUNv3.dcm" , "1.2.840.10008.5.1.4.1.1.128" }, { "MEDILABValidCP246_EVRLESQasOB.dcm" , "1.2.840.10008.5.1.4.1.1.2" }, /* Stopping condition */ { nullptr ,nullptr } }; gdcm-3.0.22/Testing/Source/Data/NativeDICOM.rnc000664 001766 001770 00000005140 14517730450 023311 0ustar00mmalaterremmalaterre000000 000000 # PS 3.19-2011 # A.1.6 Schema # The Normative version of the XML Schema for the Native DICOM Model follows: default namespace="http://dicom.nema.org/PS3.19/models/NativeDICOM" # This schema was created as an intermediary, a means of describing # native binary encoded DICOM objects as XML Infosets, thus allowing # one to manipulate binary DICOM objects using familiar XML tools. # As such, the schema is designed to facilitate a simple, mechanical, # bi-directional translation between binary encoded DICOM and XML-like # constructs without constraints, and to simplify identifying portions # of a DICOM object using XPath statements. # # Since this schema has minimal type checking, it is neither intended # to be used for any operation that involves hand coding, nor to # describe a definitive, fully validating encoding of DICOM concepts # into XML, as what one might use, for example, in a robust XML # database system or in XML-based forms, though it may be used # as a means for translating binary DICOM Objects into such a form # (e.g. through an XSLT script). start = element NativeDicomModel { DicomDataSet } # A DICOM Data Set is as defined in PS3.5. It does not appear # as an XML Element, since it does not appear in the binary encoded # DICOM objects. It exists here merely as a documentation aid. DicomDataSet = DicomAttribute* DicomAttribute = element DicomAttribute { Tag, VR, Keyword?, PrivateCreator?, ( BulkData | Value+ | Item+ | PersonName+ )? } BulkData = element BulkData{ UUID } Value = element Value { Number, xsd:string } Item = element Item { Number, DicomDataSet } PersonName = element PersonName { Number, element SingleByte { NameComponents }?, element Ideographic { NameComponents }?, element Phonetic { NameComponents }? } NameComponents = element FamilyName {xsd:string}?, element GivenName {xsd:string}?, element MiddleName {xsd:string}?, element NamePrefix {xsd:string}?, element NameSuffix {xsd:string}? # keyword is the attribute tag from PS3.6 # (derived from the DICOM Attribute's name) Keyword = attribute keyword { xsd:token } # canonical XML definition of Hex, with lowercase letters disallowed Tag = attribute tag { xsd:string{ minLength="8" maxLength="8" pattern="[0-9A-F]{8}" } } VR = attribute vr { "AE" | "AS" | "AT" | "CS" | "DA" | "DS" | "DT" | "FL" | "FD" | "IS" | "LO" | "LT" | "OB" | "OF" | "OW" | "PN" | "SH" | "SL" | "SQ" | "SS" | "ST" | "TM" | "UI" | "UL" | "UN" | "US" | "UT" } PrivateCreator = attribute privateCreator{ xsd:string } UUID = attribute uuid { xsd:string } Number = attribute number { xsd:positiveInteger } gdcm-3.0.22/Testing/Source/Data/gdcmStreamOffsetDataFiles.cxx000664 001766 001770 00000024210 14517730450 026340 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http:/gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* * See TestReaderUpToTag */ struct StreamOffset { const char *filename; std::streamoff offset; }; static const StreamOffset gdcmStreamOffsetDataFiles[] = { { "00191113.dcm",934 }, { "012345.002.050.dcm",9604 }, { "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm",41948 }, { "05148044-mr-siemens-avanto-syngo.dcm",55884 }, { "3E768EB7.dcm",3234 }, { "ACUSON-24-YBR_FULL-RLE-b.dcm",2032 }, { "ACUSON-24-YBR_FULL-RLE.dcm",1920 }, { "ALOKA_SSD-8-MONO2-RLE-SQ.dcm",1398 }, { "AMIInvalidPrivateDefinedLengthSQasUN.dcm", 12744 }, { "BugGDCM2_UndefItemWrongVL.dcm",9570 }, { "CR-MONO1-10-chest.dcm",776 }, { "CT-MONO2-12-lomb-an2.acr",1230 }, { "CT-MONO2-16-ankle.dcm",1148 }, { "CT-MONO2-16-brain.dcm",1680 }, { "CT-MONO2-16-chest.dcm",1638 }, { "CT-MONO2-16-ort.dcm",1674 }, { "CT-MONO2-8-abdo.dcm",796 }, { "CT-SIEMENS-Icone-With-PaletteColor.dcm",8162 }, { "CT-SIEMENS-MissingPixelDataInIconSQ.dcm",20504 }, { "CT_16b_signed-UsedBits13.dcm",2582 }, { "DCMTK_JPEGExt_12Bits.dcm",796 }, { "DICOMDIR",1112434 }, { "DICOMDIR-Philips-EasyVision-4200-Entries",1297194 }, { "DICOMDIR_MR_B_VA12A", 14853880}, { "DMCPACS_ExplicitImplicit_BogusIOP.dcm",66618 }, { "DX_GE_FALCON_SNOWY-VOI.dcm",104014 }, { "DX_J2K_0Padding.dcm",1494 }, { "D_CLUNIE_CT1_J2KI.dcm",6596 }, { "D_CLUNIE_CT1_J2KR.dcm",6496 }, { "D_CLUNIE_CT1_JLSL.dcm", 6464 }, { "D_CLUNIE_CT1_JLSN.dcm", 6578 }, { "D_CLUNIE_CT1_JPLL.dcm",6468 }, { "D_CLUNIE_CT1_RLE.dcm",6402 }, { "D_CLUNIE_CT2_JPLL.dcm",1756 }, { "D_CLUNIE_CT2_RLE.dcm",1688 }, { "D_CLUNIE_MR1_JPLL.dcm",1762 }, { "D_CLUNIE_MR1_JPLY.dcm",1848 }, { "D_CLUNIE_MR1_RLE.dcm",1694 }, { "D_CLUNIE_MR2_JPLL.dcm",1958 }, { "D_CLUNIE_MR2_JPLY.dcm",2046 }, { "D_CLUNIE_MR2_RLE.dcm",1890 }, { "D_CLUNIE_MR3_JPLL.dcm",9582 }, { "D_CLUNIE_MR3_JPLY.dcm",9670 }, { "D_CLUNIE_MR3_RLE.dcm",9516 }, { "D_CLUNIE_MR4_JPLL.dcm",1980 }, { "D_CLUNIE_MR4_JPLY.dcm",2068 }, { "D_CLUNIE_MR4_RLE.dcm",1912 }, { "D_CLUNIE_NM1_JPLL.dcm",2902 }, { "D_CLUNIE_NM1_JPLY.dcm",2990 }, { "D_CLUNIE_NM1_RLE.dcm",2838 }, { "D_CLUNIE_RG1_JPLL.dcm",1870 }, { "D_CLUNIE_RG1_RLE.dcm",1806 }, { "D_CLUNIE_RG2_JPLL.dcm",1456 }, { "D_CLUNIE_RG2_JPLY.dcm",1544 }, { "D_CLUNIE_RG2_RLE.dcm",1380 }, { "D_CLUNIE_RG3_JPLL.dcm",1526 }, { "D_CLUNIE_RG3_JPLY.dcm",1614 }, { "D_CLUNIE_RG3_RLE.dcm",1444 }, { "D_CLUNIE_SC1_JPLY.dcm",1352 }, { "D_CLUNIE_SC1_RLE.dcm",1188 }, { "D_CLUNIE_US1_RLE.dcm",1318 }, { "D_CLUNIE_VL1_RLE.dcm",1200 }, { "D_CLUNIE_VL2_RLE.dcm",1198 }, { "D_CLUNIE_VL3_RLE.dcm",1210 }, { "D_CLUNIE_VL4_RLE.dcm",1192 }, { "D_CLUNIE_VL6_RLE.dcm",1210 }, { "D_CLUNIE_XA1_JPLL.dcm",1204 }, { "D_CLUNIE_XA1_JPLY.dcm",1292 }, { "D_CLUNIE_XA1_RLE.dcm",1128 }, { "DermaColorLossLess.dcm",940 }, { "ELSCINT1_JP2vsJ2K.dcm",1820 }, { "ELSCINT1_PMSCT_RLE1.dcm",67912 }, { "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm",9546 }, { "FUJI-10-MONO1-ACR_NEMA_2.dcm",862 }, { "GE_CT_With_Private_compressed-icon.dcm",10810 }, { "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm",14138 }, { "GE_DLX-8-MONO2-Multiframe.dcm",4984 }, { "GE_DLX-8-MONO2-PrivateSyntax.dcm",2920 }, { "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm",9666 }, { "GE_GENESIS-16-MONO2-WrongLengthItem.dcm",1930 }, { "GE_LOGIQBook-8-RGB-HugePreview.dcm",935608 }, { "GE_MR_0025xx1bProtocolDataBlock.dcm",11882 }, { "GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm",6468 }, { "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm",1144 }, { "JDDICOM_Sample2-dcmdjpeg.dcm",848 }, { "JDDICOM_Sample2.dcm",834 }, { "JPEGDefinedLengthSequenceOfFragments.dcm",2874 }, { "JPEG_LossyYBR.dcm",2378 }, { "KODAK-12-MONO1-Odd_Terminated_Sequence.dcm",9134 }, { "KODAK_CompressedIcon.dcm",8646 }, { "LEADTOOLS_FLOWERS-16-MONO2-JpegLossless.dcm",1944 }, { "LEADTOOLS_FLOWERS-16-MONO2-RLE.dcm",1942 }, { "LEADTOOLS_FLOWERS-16-MONO2-Uncompressed.dcm",1942 }, { "LEADTOOLS_FLOWERS-24-RGB-JpegLossless.dcm",1936 }, { "LEADTOOLS_FLOWERS-24-RGB-JpegLossy.dcm",1936 }, { "LEADTOOLS_FLOWERS-24-RGB-Uncompressed.dcm",1934 }, { "LEADTOOLS_FLOWERS-8-MONO2-JpegLossy.dcm",1944 }, { "LEADTOOLS_FLOWERS-8-MONO2-RLE.dcm",1942 }, { "LEADTOOLS_FLOWERS-8-MONO2-Uncompressed.dcm",1942 }, { "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm",3538 }, { "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm",3538 }, { "LIBIDO-8-ACR_NEMA-Lena_128_128.acr",182 }, { "LJPEG_BuginGDCM12.dcm",2248 }, { "MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm",1916 }, { "MAROTECH_CT_JP2Lossy.dcm",33856 }, { "MR-Brucker-CineTagging-NonSquarePixels.dcm",1542 }, { "MR-MONO2-12-an2.acr",1866 }, { "MR-MONO2-12-angio-an1.acr",650 }, { "MR-MONO2-12-shoulder.dcm",1580 }, { "MR-MONO2-16-head.dcm",1804 }, { "MR-MONO2-8-16x-heart.dcm",920 }, { "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm", 42612 }, { "MR-SIEMENS-DICOM-WithOverlays.dcm",42416 }, { "MR16BitsAllocated_8BitsStored.dcm",940 }, { "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm",7704 }, { "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm",20712 }, { "MR_Philips-Intera_BreaksNOSHADOW.dcm",7626 }, { "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm",9508 }, { "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm",7524 }, { "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm",7026 }, { "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm",9276 }, { "MR_SIEMENS_forceLoad29-1010_29-1020.dcm",60564 }, { "MR_Spectroscopy_SIEMENS_OF.dcm",2102344 }, { "NM-MONO2-16-13x-heart.dcm",1234 }, { "OT-MONO2-8-a7.dcm",438 }, { "OT-PAL-8-face.dcm",1654 }, { "OsirixFake16BitsStoredFakeSpacing.dcm",1318 }, { "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm",34550 }, { "PHILIPS_GDCM12xBug.dcm",9338 }, { "PHILIPS_GDCM12xBug2.dcm",9670 }, { "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm",15378 }, { "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm", 6584 }, { "PHILIPS_Intera-16-MONO2-Uncompress.dcm",9276 }, { "PICKER-16-MONO2-Nested_icon.dcm",18228 }, { "PICKER-16-MONO2-No_DicomV3_Preamble.dcm",1406 }, { "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm",14972 }, { "RadBWLossLess.dcm",942 }, { "SIEMENS-12-Jpeg_Process_2_4-Lossy-a.dcm",3044 }, { "SIEMENS-MR-RGB-16Bits.dcm",49852 }, { "SIEMENS_CSA2.dcm",104352 }, { "SIEMENS_ImageLocationUN.dcm",6348 }, { "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm",6052 }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm",6430 }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm",6430 }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm",6430 }, { "SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm",6430 }, { "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm",5170 }, { "SIEMENS_MAGNETOM-12-MONO2-Uncompressed.dcm",5160 }, { "SIEMENS_MAGNETOM-12-MONO2-VRUN.dcm",5302 }, { "SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm",105726 }, { "SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs.acr",5064 }, { "SIEMENS_Sonata-12-MONO2-SQ.dcm",51804 }, { "SIEMENS_Sonata-16-MONO2-Value_Multiplicity.dcm",25686 }, { "SignedShortLosslessBug.dcm",1784 }, { "TG18-CH-2k-01.dcm",2308 }, { "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm",1839 }, { "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm",1130 }, { "TheralysGDCM120Bug.dcm",8450 }, { "US-GE-4AICL142.dcm",14072 }, { "US-IRAD-NoPreambleStartWith0003.dcm",3330 }, { "US-IRAD-NoPreambleStartWith0005.dcm",2490 }, { "US-MONO2-8-8x-execho.dcm",976 }, { "US-PAL-8-10x-echo.dcm",2428 }, { "US-RGB-8-epicard.dcm",1012 }, { "US-RGB-8-esopecho.dcm",904 }, { "XA-MONO2-8-12x-catheter.dcm",1006 }, { "dicomdir_Acusson_WithPrivate_WithSR",3826 }, { "dicomdir_Pms_WithVisit_WithPrivate_WithStudyComponents",37218 }, { "dicomdir_Pms_With_heavy_embedded_sequence",3003414 }, { "dicomdir_With_embedded_icons", 7125212 }, { "fffc0000UN.dcm",1154 }, { "gdcm-ACR-LibIDO.acr",182 }, { "gdcm-CR-DCMTK-16-NonSamplePerPix.dcm",740 }, { "gdcm-JPEG-Extended.dcm",2946 }, { "gdcm-JPEG-LossLess3a.dcm",2540 }, { "gdcm-JPEG-LossLessThoravision.dcm",3144 }, { "gdcm-MR-PHILIPS-16-Multi-Seq.dcm",35846 }, { "gdcm-MR-PHILIPS-16-NonSquarePixels.dcm",5010 }, { "gdcm-MR-SIEMENS-16-2.acr",6052 }, { "gdcm-US-ALOKA-16.dcm",258740 }, { "libido1.0-vol.acr",170 }, { "rle16loo.dcm",394226 }, { "rle16sti.dcm",394170 }, { "simpleImageWithIcon.dcm",17478 }, { "test.acr",182 }, { "undefined_length_un_vr.dcm",9168 }, { "IM-0001-0066.CommandTag00.dcm", 3050 }, { "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm", 5956 }, { "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm", 4190 }, { "GDCMJ2K_TextGBR.dcm", 770 }, { "NM_Kakadu44_SOTmarkerincons.dcm", 1576 }, { "PhilipsInteraSeqTermInvLen.dcm", 7452}, { "LIBIDO-24-ACR_NEMA-Rectangle.dcm", 182 }, { "TOSHIBA_J2K_SIZ1_PixRep0.dcm", 2362 }, { "TOSHIBA_J2K_OpenJPEGv2Regression.dcm", 2362 }, { "TOSHIBA_J2K_SIZ0_PixRep1.dcm", 2346 }, { "NM-PAL-16-PixRep1.dcm", 4468 }, { "MEDILABInvalidCP246_EVRLESQasUN.dcm", 19174 }, { "JPEGInvalidSecondFrag.dcm", 4800 }, { "lena512_rot90.j2k.dcm", 768 }, { "ELSCINT1_PMSCT_RLE1_priv.dcm", 298002 }, { "unreadable.dcm", 249230 }, { "SC16BitsAllocated_8BitsStoredJ2K.dcm", 764 }, { "SC16BitsAllocated_8BitsStoredJPEG.dcm", 958 }, { "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm", 48726 }, { "JPEGNote_empty.dcm", 716 }, { "JPEGLS_CharLS_10742.dcm", 760 }, { "JPEGLosslessYBR_FULL_422.dcm", 814 }, { "JPEGNote_missing.dcm", 608 }, { "JPEGNote_bogus.dcm", 734 }, { "RLEDebianBug816607Orig.dcm", 780 }, { "IllegalGroup2ImplicitTS.dcm", 2272 }, { "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm", 764 }, { "LengthOfItemLarger.dcm", 12748 }, { "GE_MR_0025xx1bProtocolDataBlockXML.dcm",6474 }, { "EmptyIcon_Bug417.dcm",4482 }, { "EnhancedWithIPPPerFrameIOPShared.dcm",23224 }, { "FUJI-ffff-MONO1-J2K.dcm",2052 }, { "JPEGLosslessSeNonZero.dcm",760 }, { "US-YBR_FULL_422-EVRLE.dcm",1554 }, { "Osirix10vs8BitsStored.dcm",73978 }, { "Bug_Siemens_PrivateIconNoItem.dcm",12978 }, { "HardcopyColor_YBR_RCT_J2K_PC1.dcm",2626 }, { "PET-GE-dicomwrite-PixelDataSQUNv2.dcm",7718 }, { "MEDILABValidCP246_EVRLESQasOB.dcm",19008 }, /* Stopping condition */ { nullptr ,0 }, }; gdcm-3.0.22/Testing/Source/Data/text000664 001766 001770 00000000044 14517730450 021510 0ustar00mmalaterremmalaterre000000 000000 1234567890abcdefghijklmnopqrstuvwxyzgdcm-3.0.22/Testing/Source/Data/out.bin000664 001766 001770 00000000731 14517730450 022105 0ustar00mmalaterremmalaterre000000 000000 0‚Õ *†H†÷  ‚Æ0‚Â1‚n0‚j0R0E1 0 UAU10U Some-State1!0U Internet Widgits Pty Ltd ¬–mˆxzQ´0  *†H†÷ ‚Å.iÎÅߨ­îùÕ3 åGG€œ{šk‘!ºÙ³–ñ_.S#+múNqÝ ÌÔý‡:HÊTíý;#Þ7¨‡¤µîū剋—^J9ššv¤¤¾É,JœC¶c§ˆâ/Xq‚ 4“f"v}…>Lë¡ãÏ»ü¡Àqƒ¸)#Õ;dÄ=æ³Dc>s;J¾2‘İKÏ< %\ÞV‡Sj‹°6R‰ç¹9>õ0@ÊÉHG߉ü¢åš=;—×BÌLsA&Ҟі°šªac’ 뵘õb|C¥šjga™YÉé×pñP¤ÍB¶‡ŒØÉ©§œThý÷†—–H ïL+,9Â+è¾Íå•0K *†H†÷ 0*†H†÷ 5Åq"ÈäaÓ€(Ä6‘c‡“š™rUþ@yÁ‹uV ¡Ö9b}„¡úz-¡˜½NÙ Þ|¹gdcm-3.0.22/Testing/Source/Data/gdcmMD5DataBrokenImages.cxx000664 001766 001770 00000012553 14517730450 025636 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http:/gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* * See TestWriter */ // This is the full md5 of the rewritten file. The file was manually check // and is (should be) exactly what should have been written in the first place // test was done using dcmtk 3.5.4 / dicom3tools static const char * const gdcmMD5DataBrokenImages[][2] = { // file has some garbage at the end, replace with a trailing end item. { "e8ed75f5e13cc20e96ee716bcc78351b" , "gdcm-JPEG-LossLess3a.dcm" }, // size match // files are little endian implicit meta data header: { "8cb29ba0173c66e7adb4c54c6b0a5896" , "GE_DLX-8-MONO2-PrivateSyntax.dcm" }, { "ed93b34819bf2acbacefb510476e8d4a" , "PICKER-16-MONO2-No_DicomV3_Preamble.dcm" }, // stupidest file ever, 0x6 was sent in place of 0x4 ... sigh { "c8cce480eac80770a3c6e456c7d8d66f" , "SIEMENS_MAGNETOM-12-MONO2-Uncompressed.dcm" }, // size match // big endian / little endian nightmare from PMS { "df0e01aae299317db1719e4de72b8937" , "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm" }, // size match and CheckbigEndian match => ok ! { "df632a3b5ca38340faa612a23b907ac4" , "PHILIPS_Intera-16-MONO2-Uncompress.dcm" }, // size match and CheckbigEndian match => ok ! { "6bf002815fad665392acab24f09caa5e" , "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm" }, // size match and CheckbigEndian match => ok ! // little endian implicit meta header + a couple of attribute sent with correct, but odd length: { "e1b2956f781685fc9e46e0da26b8a0fd" , "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm" }, // name says it all. dcmtk does not support this. dicom3tools confirmed that dataset is compatible { "66a75503221ef32b0236cf9f78e169ff" , "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm" }, // size mismatch // item length are supposed to be 0, not FFFF... { "3cc629fa470efb114a14ca3909117eb8" , "SIEMENS-MR-RGB-16Bits.dcm" }, // size match { "0fb0cb12f2b038bbfe1014bbf2935026" , "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm" }, // size match // this is a private syntax from ge with a little endian dataset and big endian pixel data // FMI is little endian implicit, it also contained a couple of odd length attributes. // using dcmtk it looks like file are identical { "2d23a8d55425c88bdd5e90f866a11607" , "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm" }, // size mismatch // couple of weird stuff going on... dcdump confirmed dataset is identical in both file { "34abc36682a6e6ba22d7295931b39d85" , "DMCPACS_ExplicitImplicit_BogusIOP.dcm" }, // size mismatch // weird stuff going on. dcdump confirmed dataset are identical. dcmdump can read output, and size match. { "82fda19e1f2046a289fe1307b70510af" , "gdcm-MR-PHILIPS-16-Multi-Seq.dcm" }, // yet another stupidest ever bug, 0xd was replaced with 0xa ... don't ask { "a047110a3935dc0fdda24d3b9e4769af" , "GE_GENESIS-16-MONO2-WrongLengthItem.dcm" }, // size match // empty 16bits after VR should be 0 not garbage... { "6cded0f160edfab809cddfce2d562671" , "JDDICOM_Sample2.dcm" }, // size match // simple issue, last fragment is odd, simply need to pad (easy, should be handle by most implementation) { "6234a50361f02cb9a739755d63cdd673" , "00191113.dcm" }, // size mismatch (obviously) { "28f9d4114b0699630a77d027910e5e41" , "MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm" }, // serious bug from gdcm 1.2.0, where VR=UN would be written on 16bits length sigh... no toolkit will ever be able to deal with that thing (and should not anyway) { "50752239f24669697897c4b6542bc161" , "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm" }, // unordered dataset { "f221e76c6f0758877aa3cf13632480f4" , "dicomdir_Pms_WithVisit_WithPrivate_WithStudyComponents" }, // size match // frankenstein-type dicom file: // 1. Implicit encoding is used any time it is not known (most of the time, private element) // 2. > (0x2001,0x1068) SQ ? VR= VL=<0xffffffff> is sent twice (don't ask), second entry cannot be stored... // dcdump kindda show file are somewhat compatible. { "69ca7a4300967cf2841da34d7904c6c4" , "TheralysGDCM120Bug.dcm" }, // size mismatch // GDCM 1.0 generated file. At that time, VL for a start/end item delimiter would be set to 0xFFF... instead of 0x0 // dcmtk / dicom3tools do not seems to care about the value stored for VL, so does GDCM (now). // As a side note the FMI was set to Little Endian Implicit ... { "ddf83cd708e58021a633588927d55ab8" , "BugGDCM2_UndefItemWrongVL.dcm" }, // size mismatch { "cb43a6ad60b8eacf718687b82126f625" , "NM_Kakadu44_SOTmarkerincons.dcm" }, // item size mismatch // Item length are bogus (explicit length) { "1225ea0a03b93393f70c73be35e2619d" , "PhilipsInteraSeqTermInvLen.dcm" }, // Two Items in a single Frame JPEG compressed DICOM image: { "cd00658f54dbd2d2a9d02d64c6f6497e" , "JPEGInvalidSecondFrag.dcm" }, // VR is set to 'OX' { "5793021ffb7b3506ae22ae9329d67d29" , "Bug_Siemens_PrivateIconNoItem.dcm" }, { nullptr ,nullptr } }; gdcm-3.0.22/Testing/Source/InformationObjectDefinition/000775 001766 001770 00000000000 14517731550 025361 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/InformationObjectDefinition/CMakeLists.txt000664 001766 001770 00000000117 14517730450 030116 0ustar00mmalaterremmalaterre000000 000000 add_subdirectory(Cxx) if(GDCM_WRAP_PYTHON) add_subdirectory(Python) endif() gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Python/000775 001766 001770 00000000000 14517731550 026642 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Python/TestMRModule.py000664 001766 001770 00000002064 14517730450 031540 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys g = gdcm.Global.GetInstance() g.LoadResourcesFiles() defs = g.GetDefs() modules = defs.GetModules() macros = defs.GetMacros() #module = modules.GetModule( "MR Image Module Attributes" ) module = modules.GetModule( "C.8.3.1" ) #print dir(module) mentry = module.GetModuleEntryInMacros( macros, gdcm.Tag(0x0018,0x0087) ) #print dir(mentry) print(mentry) mentry = module.GetModuleEntryInMacros( macros, gdcm.Tag(0x0018,0x1080) ) print(mentry) # Test succeed ? sys.exit(0) gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Python/CMakeLists.txt000664 001766 001770 00000000350 14517730450 031376 0ustar00mmalaterremmalaterre000000 000000 # Define the tests for gdcm-python # gdcm-python set(GDCM_PYTHON_TEST_SRCS TestMRModule ) # Loop over files and create executables foreach(name ${GDCM_PYTHON_TEST_SRCS}) ADD_PYTHON_TEST(${name}Python ${name}.py) endforeach() gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/000775 001766 001770 00000000000 14517731550 026123 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestStudy.cxx000664 001766 001770 00000001216 14517730450 030615 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmStudy.h" int TestStudy(int, char *[]) { gdcm::Study study; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestSeries.cxx000664 001766 001770 00000001242 14517730450 030736 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSeries.h" int TestSeries(int, char *[]) { gdcm::Series series; (void)series; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestDefinedTerms.cxx000664 001766 001770 00000001254 14517730450 032060 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDefinedTerms.h" int TestDefinedTerms(int, char *[]) { gdcm::DefinedTerms dt; (void)dt; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/CMakeLists.txt000664 001766 001770 00000002331 14517730450 030660 0ustar00mmalaterremmalaterre000000 000000 # Define the tests for Information Object Definition # IOD set(IOD_TEST_SRCS TestTableReader.cxx TestTable.cxx TestTableEntry.cxx TestType.cxx TestModule.cxx TestModules.cxx TestModuleEntry.cxx TestNestedModuleEntries.cxx TestIODEntry.cxx TestIOD.cxx TestIODs.cxx TestDefs.cxx TestPatient.cxx TestSeries.cxx TestStudy.cxx TestDefinedTerms.cxx TestEnumeratedValues.cxx TestUsage.cxx #TestXMLDictReader.cxx #TestXMLPrivateDictReader.cxx ) # Add the include paths include_directories( "${GDCM_BINARY_DIR}/Source/Common" "${GDCM_SOURCE_DIR}/Source/Common" "${GDCM_SOURCE_DIR}/Source/DataStructureAndEncodingDefinition" "${GDCM_SOURCE_DIR}/Source/DataDictionary" "${GDCM_SOURCE_DIR}/Source/InformationObjectDefinition" "${GDCM_BINARY_DIR}/Source/InformationObjectDefinition" # gdcmTables.h ) create_test_sourcelist(IODTests gdcmIODTests.cxx ${IOD_TEST_SRCS} EXTRA_INCLUDE gdcmTestDriver.h ) add_executable(gdcmIODTests ${IODTests}) target_link_libraries(gdcmIODTests gdcmIOD gdcmMSFF) # Loop over files and create executables foreach(name ${IOD_TEST_SRCS}) get_filename_component(testname ${name} NAME_WE) add_test(NAME ${testname} COMMAND gdcmIODTests ${testname}) endforeach() gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestTableReader.cxx000664 001766 001770 00000002623 14517730450 031662 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTableReader.h" #include "gdcmModules.h" // generated file: #include "gdcmTables.h" void TestReadTable(const char *filename, bool dump = false ) { gdcm::Defs defs; gdcm::TableReader tr(defs); tr.SetFilename(filename); tr.Read(); const gdcm::Modules &modules = defs.GetModules(); if(dump) std::cout << modules << std::endl; const gdcm::Macros ¯os = defs.GetMacros(); if(dump) std::cout << macros << std::endl; const gdcm::IODs &iods = defs.GetIODs(); if(dump) std::cout << iods << std::endl; } int TestTableReader(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; TestReadTable(filename, true); return 0; } // else int i = 0; const char *filename; while( (filename = gdcmTables[i]) ) { TestReadTable( filename ); ++i; } return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestXMLPrivateDictReader.cxx000664 001766 001770 00000001616 14517730450 033433 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmXMLPrivateDictReader.h" int TestXMLPrivateDictReader(int argc, char *argv[]) { if( argc < 2 ) { return 1; } const char *filename = argv[1]; gdcm::XMLPrivateDictReader tr; tr.SetFilename(filename); tr.Read(); std::cout << tr.GetPrivateDict() << std::endl; //tr.GetPrivateDict().PrintXML(); return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestIODEntry.cxx000664 001766 001770 00000001226 14517730450 031143 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmIODEntry.h" int TestIODEntry(int, char *[]) { gdcm::IODEntry iode; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestNestedModuleEntries.cxx000664 001766 001770 00000001266 14517730450 033434 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmNestedModuleEntries.h" int TestNestedModuleEntries(int, char *[]) { gdcm::NestedModuleEntries nme; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestXMLDictReader.cxx000664 001766 001770 00000001516 14517730450 032077 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmXMLDictReader.h" int TestXMLDictReader(int argc, char *argv[]) { if( argc < 2 ) { return 1; } const char *filename = argv[1]; gdcm::XMLDictReader tr; tr.SetFilename(filename); tr.Read(); std::cout << tr.GetDict() << std::endl; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestType.cxx000664 001766 001770 00000001213 14517730450 030423 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmType.h" int TestType(int, char *[]) { gdcm::Type type; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestDefs.cxx000664 001766 001770 00000005703 14517730450 030373 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDefs.h" #include "gdcmUIDs.h" #include "gdcmGlobal.h" #include "gdcmMediaStorage.h" #include "gdcmSOPClassUIDToIOD.h" int TestDefs(int, char *[]) { using gdcm::MediaStorage; gdcm::Global& g = gdcm::Global::GetInstance(); if( !g.LoadResourcesFiles() ) { std::cerr << "Could not LoadResourcesFiles" << std::endl; return 1; } const gdcm::Defs &defs = g.GetDefs(); //std::cout << defs.GetMacros() << std::endl; int ret = 0; gdcm::MediaStorage::MSType mst; for ( mst = gdcm::MediaStorage::MediaStorageDirectoryStorage; mst < gdcm::MediaStorage::MS_END; mst = (gdcm::MediaStorage::MSType)(mst + 1) ) { const char *iod = defs.GetIODNameFromMediaStorage(mst); gdcm::UIDs uid; uid.SetFromUID( gdcm::MediaStorage::GetMSString(mst) /*mst.GetString()*/ ); if( !iod ) { // We do not support Private IODs (for now??) if( mst != MediaStorage::PhilipsPrivateMRSyntheticImageStorage && mst != MediaStorage::ToshibaPrivateDataStorage && mst != MediaStorage::GEPrivate3DModelStorage && mst != MediaStorage::Philips3D && mst != MediaStorage::CSANonImageStorage && mst != MediaStorage::GeneralElectricMagneticResonanceImageStorage ) { std::cerr << "Missing iod for MS: " << (int)mst << " " << gdcm::MediaStorage::GetMSString(mst) << " "; //std::endl; std::cerr << "MediaStorage is " << (int)mst << " [" << uid.GetName() << "]" << std::endl; ++ret; } } else { const char *iod_ref = gdcm::SOPClassUIDToIOD::GetIOD(uid); if( !iod_ref ) { std::cerr << "Could not find IOD for SOPClass: " << uid << std::endl; ++ret; } else { std::string iod_ref_str = iod_ref; //iod_ref_str += " IOD Modules"; if( iod_ref_str != iod ) { std::cerr << "UID: " << uid << " "; std::cerr << "Incompatible IODs: [" << iod << "] versus ref= [" << iod_ref_str << "]" << std::endl; ++ret; } } } } unsigned int nm = MediaStorage::GetNumberOfModality(); unsigned int nsop = gdcm::SOPClassUIDToIOD::GetNumberOfSOPClassToIOD(); if( nm != nsop ) { std::cerr << "Incompatible MediaStorage knows: " << nm << " SOP Classes while SOPClassUIDToIOD knows: " << nsop << " classes" << std::endl; ++ret; } return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestPatient.cxx000664 001766 001770 00000001222 14517730450 031106 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmPatient.h" int TestPatient(int, char *[]) { gdcm::Patient pat; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestIODs.cxx000664 001766 001770 00000001212 14517730450 030277 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmIODs.h" int TestIODs(int, char *[]) { gdcm::IODs iods; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestUsage.cxx000664 001766 001770 00000001212 14517730450 030545 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmUsage.h" int TestUsage(int, char *[]) { gdcm::Usage u; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestModule.cxx000664 001766 001770 00000001224 14517730450 030731 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmModule.h" int TestModule(int , char *[]) { gdcm::Module module; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestModuleEntry.cxx000664 001766 001770 00000001373 14517730450 031760 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmModuleEntry.h" int TestModuleEntry(int, char *[]) { gdcm::ModuleEntry me("Image Type","1","Image identification characteristics. See C.8.3.1.1.1 for specialization."); return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestModules.cxx000664 001766 001770 00000001230 14517730450 031111 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmModules.h" int TestModules(int , char *[]) { gdcm::Modules modules; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestTableEntry.cxx000664 001766 001770 00000001233 14517730450 031555 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTableEntry.h" int TestTableEntry(int , char *[]) { gdcm::TableEntry te; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestEnumeratedValues.cxx000664 001766 001770 00000001270 14517730450 032756 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmEnumeratedValues.h" int TestEnumeratedValues(int, char *[]) { gdcm::EnumeratedValues ev; (void)ev; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestTable.cxx000664 001766 001770 00000001212 14517730450 030530 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTable.h" int TestTable(int, char *[]) { gdcm::Table t; return 0; } gdcm-3.0.22/Testing/Source/InformationObjectDefinition/Cxx/TestIOD.cxx000664 001766 001770 00000003227 14517730450 030124 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmIOD.h" #include "gdcmDefs.h" #include "gdcmGlobal.h" #include "gdcmDicts.h" #include "gdcmDict.h" #include "gdcmType.h" #include "gdcmIODs.h" int TestIOD(int, char *[]) { using namespace gdcm; gdcm::Global& g = gdcm::Global::GetInstance(); if( !g.LoadResourcesFiles() ) { std::cerr << "Could not LoadResourcesFiles" << std::endl; return 1; } static const Defs &defs = g.GetDefs(); static const gdcm::Dicts &dicts = g.GetDicts(); static const IODs &iods = defs.GetIODs(); static const gdcm::Dict &pubdict = dicts.GetPublicDict(); //const IOD& iod = defs.GetIODFromFile(*F); IODs::IODMapTypeConstIterator it = iods.Begin(); for( ; it != iods.End(); ++it ) { const IODs::IODName &name = it->first; (void)name; const IOD &iod = it->second; gdcm::Dict::ConstIterator dictit = pubdict.Begin(); for(; dictit != pubdict.End(); ++dictit) { const gdcm::Tag &tag = dictit->first; gdcm::Type t = iod.GetTypeFromTag(defs, tag); (void)t; //std::cout << t << std::endl; } } return 0; } gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/000775 001766 001770 00000000000 14517731550 024774 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/CMakeLists.txt000664 001766 001770 00000000026 14517730450 027530 0ustar00mmalaterremmalaterre000000 000000 add_subdirectory(Cxx) gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/000775 001766 001770 00000000000 14517731550 025536 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/TestSCUValidation.cxx000664 001766 001770 00000021402 14517730450 031564 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmULConnectionManager.h" #include "gdcmPresentationContextGenerator.h" #include "gdcmReader.h" #include "gdcmAttribute.h" #include "gdcmDataSet.h" #include "gdcmUIDGenerator.h" #include "gdcmStringFilter.h" #include "gdcmWriter.h" #include "gdcmDirectory.h" #include "gdcmImageReader.h" #include "gdcmQueryFactory.h" #include "gdcmGlobal.h" static const char AETitle[] = "ANY"; static const char PeerAETitle[] = "ANY"; static const char ComputerName[] = "51.75.171.41"; // www.dicomserver.co.uk static int port = 11112; static gdcm::network::ULConnectionManager *GetConnectionManager(gdcm::BaseRootQuery* theQuery) { gdcm::PresentationContextGenerator generator; if( !generator.GenerateFromUID( theQuery->GetAbstractSyntaxUID() ) ) { gdcmErrorMacro( "Failed to generate pres. context." ); return nullptr; } gdcm::network::ULConnectionManager *theManager = new gdcm::network::ULConnectionManager(); if (!theManager->EstablishConnection(AETitle, PeerAETitle, ComputerName, 0, (uint16_t)port, 1000, generator.GetPresentationContexts() )) { throw gdcm::Exception("Failed to establish connection."); } return theManager; } #if 0 static std::vector GetPatientInfo(bool validateQuery, bool inStrictQuery) { std::vector theDataSets; gdcm::BaseRootQuery* theQuery = gdcm::QueryFactory::ProduceQuery(gdcm::ePatientRootType, gdcm::eFind, gdcm::ePatient); theQuery->SetSearchParameter(gdcm::Tag(0x8, 0x52), "PATIENT"); //Query/Retrieval Level theQuery->SetSearchParameter(gdcm::Tag(0x10,0x20), ""); //Patient ID theQuery->SetSearchParameter(gdcm::Tag(0x10,0x10), "*"); //Patient Name if(validateQuery && !theQuery->ValidateQuery(inStrictQuery)) { return theDataSets; } gdcm::network::ULConnectionManager *theManager = GetConnectionManager( theQuery ); theDataSets = theManager->SendFind( theQuery ); return theDataSets; } #endif static std::vector GetStudyInfo(const char *patientID, bool validateQuery, bool inStrictQuery) { std::vector theDataSets; gdcm::BaseRootQuery* theQuery = gdcm::QueryFactory::ProduceQuery(gdcm::eStudyRootType, gdcm::eFind, gdcm::eStudy); theQuery->SetSearchParameter(gdcm::Tag(0x8, 0x52), "STUDY"); //Query/Retrieval Level theQuery->SetSearchParameter(gdcm::Tag(0x10,0x20), patientID); //Patient ID theQuery->SetSearchParameter(gdcm::Tag(0x20, 0x10), ""); //Study ID theQuery->SetSearchParameter(gdcm::Tag(0x20, 0xD), ""); //Study Instance UID theQuery->SetSearchParameter(gdcm::Tag(0x20, 0xE), ""); //Series Instance UID if(validateQuery && !theQuery->ValidateQuery(inStrictQuery)) { return theDataSets; } gdcm::network::ULConnectionManager *theManager = GetConnectionManager( theQuery ); theDataSets = theManager->SendFind( theQuery ); return theDataSets; } static std::vector GetSeriesInfo(const char *patientID, const char *studyInstanceUID, bool validateQuery, bool inStrictQuery) { std::vector theDataSets; gdcm::BaseRootQuery* theQuery = gdcm::QueryFactory::ProduceQuery(gdcm::eStudyRootType, gdcm::eFind, gdcm::eSeries); theQuery->SetSearchParameter(gdcm::Tag(0x8, 0x52), "SERIES"); //Query/Retrieval Level theQuery->SetSearchParameter(gdcm::Tag(0x10,0x20), patientID); //Patient ID theQuery->SetSearchParameter(gdcm::Tag(0x20, 0xD), studyInstanceUID); //Study Instance UID theQuery->SetSearchParameter(gdcm::Tag(0x20, 0xE), ""); //Series Instance UID if(validateQuery && !theQuery->ValidateQuery(inStrictQuery)) { return theDataSets; } gdcm::network::ULConnectionManager *theManager = GetConnectionManager( theQuery ); theDataSets = theManager->SendFind( theQuery ); return theDataSets; } static std::vector GetImageInfo(const char *patientID, const char *studyInstanceUID, const char *seriesInstanceUID, bool validateQuery, bool inStrictQuery) { std::vector theDataSets; gdcm::BaseRootQuery* theQuery = gdcm::QueryFactory::ProduceQuery(gdcm::eStudyRootType, gdcm::eFind, gdcm::eImage); theQuery->SetSearchParameter(gdcm::Tag(0x8, 0x52), "SERIES"); //Query/Retrieval Level theQuery->SetSearchParameter(gdcm::Tag(0x10,0x20), patientID); //Patient ID theQuery->SetSearchParameter(gdcm::Tag(0x20, 0xD), studyInstanceUID); //Study Instance UID theQuery->SetSearchParameter(gdcm::Tag(0x20, 0xE), seriesInstanceUID); //Series Instance UID theQuery->SetSearchParameter(gdcm::Tag(0x8, 0x18), ""); //SOP Instance UID if(validateQuery && !theQuery->ValidateQuery(inStrictQuery)) { return theDataSets; } gdcm::network::ULConnectionManager *theManager = GetConnectionManager( theQuery ); theDataSets = theManager->SendFind( theQuery ); return theDataSets; } static void PrintDataSets(std::vector theDataSets) { std::vector::iterator itor; for (itor = theDataSets.begin(); itor < theDataSets.end(); itor++) itor->Print(std::cout); } int TestSCUValidation(int , char *[]) { try { //set this to true to use a strict interpretation of the DICOM standard for query validation bool theUseStrictQueries = false; //Case 1: //Here I want to retrieve Study Information for the known Patient. //Here I pass the PatientID as a input and I need to reterive the StudyId, //StudyDate and Series Instance UID. std::vector theDataSets = GetStudyInfo("Z354998", true, theUseStrictQueries); PrintDataSets(theDataSets); //In the above I validated the constructed Query. This will not allow to add the //Series Instance UID as a search parameter for the query. On the result of //this I can't get the SeriesInstanceUID from the study level. //Case 2: //Here I execute the above same CFind Query with out validating. //This will send the Query which is having the SeriesInstanceUID tag //in search parameter to the CFind. This will executed successfully and //returns the SeriesInsanceUID related to the given StudyUID. theDataSets = GetStudyInfo("Z354998", false, theUseStrictQueries); PrintDataSets(theDataSets); //case 3: //If I validated the Query Like case 1, I can't get the Series Instance UID from //Study level. With out SeriesInstanceUID I can't retrieve the other series Information. //In Series Level also I can't add the StudyInstanceUID or other study information //as a search parameter. It allows only SeriesInstanceUID, Modality and SeriesNumber //as a search parameter. theDataSets = GetSeriesInfo("Z354998", "1.2.826.0.1.3680043.4.1.19990124221049.2", true, theUseStrictQueries); PrintDataSets(theDataSets); //case 4: //If I execute the above same CFind Query for Get Series with out validating //the query, it will return the requested SeriesInstanceUID for Known Study level. theDataSets = GetSeriesInfo("Z354998", "1.2.826.0.1.3680043.4.1.19990124221049.2", false, theUseStrictQueries); PrintDataSets(theDataSets); //In StudyLevel I can't get the Series information(Ref:Case 2). In Series Level //also I can't get the Series information for the known Study Level(Ref:Case 3). //How should I get the Series level information for the known patient and study //level information??? //case 5: //For retrieve the Image Level Information (SOP Instance UID) for the known //Patient,Study and Series level information, the Image level query is not //allowing. It allows only SOP Instance UID and SOP Instance Number as a //search Query. theDataSets = GetImageInfo("Z354998", "1.2.826.0.1.3680043.4.1.19990124221049.2", "1.2.826.0.1.3680043.4.1.19990124221049.3", true, theUseStrictQueries); PrintDataSets(theDataSets); //case 6: //Image Level retrieval also give the required information with out //validate the generated Query. theDataSets = GetImageInfo("Z354998", "1.2.826.0.1.3680043.4.1.19990124221049.2", "1.2.826.0.1.3680043.4.1.19990124221049.3", false, theUseStrictQueries); PrintDataSets(theDataSets); } catch( std::exception & ) { return 1; } //I want the Following things to do in CFind Query. // 1. Reterive the Study Level Information for the known Patient. // 2. Reterive the Series Level Information for the known Patient and Study. // 3. Reterive the Image Level Information for the known Patient, Study and Series. return 0; } gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/CMakeLists.txt000664 001766 001770 00000004225 14517730450 030277 0ustar00mmalaterremmalaterre000000 000000 # MEXD Testing set(MEXD_TEST_SRCS TestPresentationContextRQ.cxx TestQueryFactory.cxx TestULConnectionManager.cxx TestServiceClassUser1.cxx TestServiceClassUser2.cxx TestServiceClassUser3.cxx TestSCUValidation.cxx TestEcho.cxx TestFind.cxx #TestULTransitionTable.cxx # symbols are not exported, mainly used for debugging TestFindStudyRootQuery.cxx TestFindPatientRootQuery.cxx ) if(GDCM_DATA_ROOT) set(MEXD_TEST_SRCS ${MEXD_TEST_SRCS} TestSCUFunctions.cxx ) endif() # Add the include paths include_directories( "${GDCM_BINARY_DIR}/Source/Common" "${GDCM_SOURCE_DIR}/Source/Common" "${GDCM_SOURCE_DIR}/Testing/Source/Data" "${GDCM_BINARY_DIR}/Testing/Source/Data" "${GDCM_SOURCE_DIR}/Source/DataStructureAndEncodingDefinition" "${GDCM_SOURCE_DIR}/Source/DataDictionary" "${GDCM_SOURCE_DIR}/Source/MediaStorageAndFileFormat" "${GDCM_SOURCE_DIR}/Source/MessageExchangeDefinition" ) create_test_sourcelist(MEXDTests gdcmMEXDTests.cxx ${MEXD_TEST_SRCS} EXTRA_INCLUDE gdcmTestDriver.h ) add_executable(gdcmMEXDTests ${MEXDTests}) target_link_libraries(gdcmMEXDTests gdcmMEXD gdcmMSFF gdcmDSED gdcmDICT gdcmCommon) # Loop over files and create executables foreach(name ${MEXD_TEST_SRCS}) if(${name} STREQUAL "TestSCUFunctions.cxx" OR ${name} STREQUAL "TestServiceClassUser1.cxx" OR ${name} STREQUAL "TestServiceClassUser2.cxx" OR ${name} STREQUAL "TestServiceClassUser3.cxx" ) if(GDCM_DICOM_SERVER_AETITLE) add_test(NAME ${name} COMMAND gdcmMEXDTests ${name} ${GDCM_DICOM_CLIENT_AETITLE} ${GDCM_DICOM_SERVER_AETITLE} ${GDCM_DICOM_SERVER_PORT} ${GDCM_DICOM_CLIENT_PORT} ${GDCM_DICOM_SERVER_PEER}) endif() else() get_filename_component(testname ${name} NAME_WE) add_test(NAME ${testname} COMMAND gdcmMEXDTests ${testname}) endif() endforeach() set(DCMQRSCP_HOSTNAME gotlib) set(DCMQRSCP_PORT 5677) set(DCMQRSCP_DIRECTORY ${GDCM_TEMP_DIRECTORY}) configure_file( ${GDCM_SOURCE_DIR}/CMake/dcmqrscp.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/dcmqrscp.cfg ) # execute_process(COMMAND ${DCMTK_DCMQRSCP_EXECUTABLE} # --verbose --debug -c ${CMAKE_CURRENT_BINARY_DIR}/dcmqrscp.cfg) gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/TestFind.cxx000664 001766 001770 00000004073 14517730450 030004 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= * * Copyright Insight Software Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0.txt * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *=========================================================================*/ #include "gdcmCompositeNetworkFunctions.h" #include "gdcmTag.h" #include "gdcmQueryFactory.h" #include "gdcmMovePatientRootQuery.h" int TestFind(int , char *[]) { std::string hostname = "www.dicomserver.co.uk"; uint16_t port = 11112; std::string callaetitle = "GDCM_ROCKS"; std::string callingaetitle = "ACME1"; gdcm::Tag theTag(0x0010, 0x0010); std::string theName = "F*"; std::pair theTagPair = std::make_pair(theTag, theName); std::vector > theTags; theTags.push_back(theTagPair); gdcm::BaseRootQuery* theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery( gdcm::ePatientRootType, gdcm::ePatient, theTags); if (!theQuery) { std::cerr << "Query construction failed!" << std::endl; return 1; } if (!theQuery->ValidateQuery(false)) { std::cerr << "Find query is not valid. Please try again." << std::endl; delete theQuery; return 1; } std::vector theDataSet ; bool b = gdcm::CompositeNetworkFunctions::CFind(hostname.c_str(), port, theQuery, theDataSet , callingaetitle.c_str(), callaetitle.c_str()); if( !b ) return 1; //need to put some kind of validation of theDataSet here return (theDataSet.empty() ? 1:0);//shouldn't be a zero-sized dataset } gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/TestFindPatientRootQuery.cxx000664 001766 001770 00000020766 14517730450 033232 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFindPatientRootQuery.h" #include "gdcmCompositeNetworkFunctions.h" #include "gdcmTrace.h" /* * STUDY: * $ findscu --call GDCM_STORE --aetitle GDCMDASH -P server 11112 -k 8,52="PATIENT" -k 10,20="1*" * $ findscu --call GDCM_STORE --aetitle GDCMDASH -S server 11112 -k 8,52="STUDY" -k 10,20="FOO" * * SERIES: * $ findscu --call GDCM_STORE --aetitle GDCMDASH -S lirispat 11112 -k 8,52="SERIES" -k 20,d="1.2.3" -k 8,60 */ int TestFindPatientRootQuery(int , char *[]) { //gdcm::Trace::DebugOn(); gdcm::Trace::WarningOff(); // PATIENT: gdcm::ERootType theRoot = gdcm::ePatientRootType; gdcm::EQueryLevel theLevel = gdcm::ePatient; { std::vector< std::pair > keys; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // No key found is an error return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x10,0x10), "patient" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // required key return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x10,0x20), "patientid" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( !theQuery->ValidateQuery( true ) ) { // unique key return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x10,0x20), "patientid" ) ; keys.emplace_back( gdcm::Tag(0x10,0x10), "patient" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( !theQuery->ValidateQuery( true ) ) { // unique key + required return 1; } } // STUDY: theLevel = gdcm::eStudy; { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x10,0x10), "PATIENT" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // Patient Id is a Required Key in Study return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0x10), "studyid" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // Study Id is a required tag return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x8,0x90), "physician" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // ref physician's name is optional return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x10,0x20), "patientid" ) ; keys.emplace_back( gdcm::Tag(0x20,0xd), "studyuid" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( !theQuery->ValidateQuery( true ) ) { // Study UID is the unique tag return 1; } } // SERIES: theLevel = gdcm::eSeries; { std::vector< std::pair > keys; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // No key found is an error return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // No key at level Series return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; keys.emplace_back( gdcm::Tag(0x8,0x60), "" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // missing unique at series level return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; keys.emplace_back( gdcm::Tag(0x20,0xe), "4.5.6" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( !theQuery->ValidateQuery( true ) ) { // all unique keys present return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; keys.emplace_back( gdcm::Tag(0x20,0xe), "4.5.6" ) ; keys.emplace_back( gdcm::Tag(0x8,0x60), "" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( !theQuery->ValidateQuery( true ) ) { // all unique keys present and required is correct level return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; keys.emplace_back( gdcm::Tag(0x20,0xe), "4.5.6" ) ; keys.emplace_back( gdcm::Tag(0x8,0x20), "" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // all unique keys present and required is incorrect level return 1; } } // IMAGES: theLevel = gdcm::eImage; { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; keys.emplace_back( gdcm::Tag(0x20,0xe), "4.5.6" ) ; keys.emplace_back( gdcm::Tag(0x8,0x18), "7.8.9" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( !theQuery->ValidateQuery( true ) ) { // all unique keys present return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; keys.emplace_back( gdcm::Tag(0x20,0xe), "4.5.6" ) ; keys.emplace_back( gdcm::Tag(0x8,0x18), "7.8.9" ) ; keys.emplace_back( gdcm::Tag(0x20,0x13), "" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( !theQuery->ValidateQuery( true ) ) { // all unique keys present + required correct level return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; keys.emplace_back( gdcm::Tag(0x20,0xe), "4.5.6" ) ; keys.emplace_back( gdcm::Tag(0x8,0x18), "7.8.9" ) ; keys.emplace_back( gdcm::Tag(0x20,0x13), "" ) ; keys.emplace_back( gdcm::Tag(0x20,0x11), "" ) ; // series level gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // all unique keys present + required correct level + one incorrect return 1; } } //std::cout << "success" << std::endl; return 0; } gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/TestServiceClassUser1.cxx000664 001766 001770 00000020316 14517730450 032430 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmServiceClassUser.h" #include "gdcmDataEvent.h" #include "gdcmSimpleSubjectWatcher.h" #include "gdcmPresentationContextGenerator.h" #include "gdcmAttribute.h" #include "gdcmCompositeNetworkFunctions.h" #include "gdcmTransferSyntax.h" #include "gdcmWriter.h" #include "gdcmTesting.h" /* * This small example show how the association pipeline works. * the start association is an important step as it will define all the object * to be send in subsequence C-operation (c-echo, c-store, c-find, c-move). * In this example we will demonstrate how we can send a JPEG-Lossless object * and then further on, a non-jpeg encapsulated file * * The test also uses the Subject/Observer API for progress report. */ int TestServiceClassUser1(int argc, char *argv[]) { if( argc < 5 ) { std::cerr << argv[0] << " aetitle call portno moveReturnPort remote" << std::endl; return 1; } std::string aetitle = argv[1]; // the ae title of this computer std::string call = argv[2]; // the ae title of the server uint16_t portno = (uint16_t)atoi(argv[3]); // the port of the server uint16_t moveReturnPort = (uint16_t)atoi(argv[4]); // the port over which return cstore scps are done for cmove std::string remote = argv[5]; //the ip address of the remote server gdcm::SmartPointer scup = new gdcm::ServiceClassUser; gdcm::ServiceClassUser &scu = *scup; gdcm::SimpleSubjectWatcher w( &scu, "TestServiceClassUser1" ); scu.SetHostname( remote.c_str() ); scu.SetPort( portno ); scu.SetTimeout( 1000 ); scu.SetCalledAETitle( call.c_str() ); scu.SetAETitle( aetitle.c_str() ); std::ostringstream error_log; gdcm::Trace::SetErrorStream( error_log ); if( !scu.InitializeConnection() ) { return 1; } gdcm::PresentationContextGenerator generator; if( !generator.GenerateFromUID( gdcm::UIDs::VerificationSOPClass ) ) { return 1; } // make sure to fail if no pres. contexts: if( scu.StartAssociation() ) { return 1; } scu.SetPresentationContexts( generator.GetPresentationContexts() ); if( !scu.StartAssociation() ) { std::cerr << "Could not StartAssociation" << std::endl; std::cerr << "Error log is:" << std::endl; std::cerr << error_log.str() << std::endl; return 1; } // C-ECHO if( !scu.SendEcho() ) { std::cerr << "Could not Echo" << std::endl; std::cerr << "Error log is:" << std::endl; std::cerr << error_log.str() << std::endl; return 1; } if( !scu.StopAssociation() ) { return 1; } gdcm::Directory::FilenamesType filenames; const char *directory = gdcm::Testing::GetDataRoot(); // DEBUG: // storescu -R -xs --call GDCM_STORE macminig4 11112 gdcmData/012345.002.050.dcm std::string filename = std::string(directory) + "/012345.002.050.dcm"; filenames.push_back( filename ); if( !generator.GenerateFromFilenames(filenames) ) { return 1; } scu.SetPresentationContexts( generator.GetPresentationContexts() ); if( !scu.StartAssociation() ) { return 1; } // C-STORE MRImageStorage/JPEGLossless if( !scu.SendStore( filename.c_str() ) ) { std::cerr << "Could not C-Store" << std::endl; std::cerr << "Error log is:" << std::endl; std::cerr << error_log.str() << std::endl; return 1; } if( !scu.StopAssociation() ) { return 1; } //filename = std::string(directory) + "/MR-MONO2-12-an2.acr"; filename = std::string(directory) + "/MR_Spectroscopy_SIEMENS_OF.dcm"; filenames.clear(); filenames.push_back( filename ); if( !generator.GenerateFromFilenames(filenames) ) { return 1; } scu.SetPresentationContexts( generator.GetPresentationContexts() ); if( !scu.StartAssociation() ) { return 1; } // C-STORE MRImageStorage/LittleEndianImplicit if( !scu.SendStore( filename.c_str() ) ) { std::cerr << "Could not SendStore" << std::endl; std::cerr << "Error log is:" << std::endl; std::cerr << error_log.str() << std::endl; return 1; } if( !scu.StopAssociation() ) { return 1; } // customize the find query gdcm::DataSet findds; gdcm::Attribute<0x10,0x10> pn1 ={"ABCDEFGH^IJKLM"}; findds.Insert( pn1.GetAsDataElement() ); gdcm::Attribute<0x10,0x20> pid; findds.Insert( pid.GetAsDataElement() ); gdcm::SmartPointer findquery = gdcm::CompositeNetworkFunctions::ConstructQuery( gdcm::ePatientRootType, gdcm::ePatient, findds); // make sure the query is valid if (!findquery->ValidateQuery()) { return 1; } // Generate the PresentationContext array from the query UID: if( !generator.GenerateFromUID( findquery->GetAbstractSyntaxUID() ) ) { return 1; } scu.SetPresentationContexts( generator.GetPresentationContexts() ); if( !scu.StartAssociation() ) { return 1; } // C-FIND std::vector datasets; if( !scu.SendFind(findquery, datasets) ) { return 1; } // Need to make sure we have one dataset if( datasets.size() != 1 ) { std::cerr << "size: " << datasets.size() << std::endl; return 1; } datasets[0].Print( std::cout ); // C-find the second patient gdcm::Attribute<0x10,0x10> pn2 ={"XXXXXXXXXXX"}; findquery->GetQueryDataSet().Replace( pn2.GetAsDataElement() ); if( !scu.SendFind(findquery, datasets) ) { return 1; } if( datasets.size() != 2 ) { std::cerr << "size: " << datasets.size() << std::endl; return 1; } std::cout << std::endl; datasets[1].Print( std::cout ); if( !scu.StopAssociation() ) { return 1; } // C-MOVE // customize the move query gdcm::DataSet moveds; // use results from the c-find to construct the c-move query: moveds.Insert( datasets[0].GetDataElement( pid.GetTag() ) ); gdcm::SmartPointer movequery = gdcm::CompositeNetworkFunctions::ConstructQuery( gdcm::ePatientRootType, gdcm::ePatient, moveds, gdcm::eMove); // make sure the query is valid if (!movequery->ValidateQuery()) { return 1; } //generator.SetDefaultTransferSyntax( gdcm::TransferSyntax::JPEGLosslessProcess14_1 ); // Generate the PresentationContext array from the query UID: if( !generator.GenerateFromUID( movequery->GetAbstractSyntaxUID() ) ) { return 1; } scu.SetPresentationContexts( generator.GetPresentationContexts() ); scu.SetPortSCP( moveReturnPort ); if( !scu.StartAssociation() ) { return 1; } // C-MOVE std::vector data; if( !scu.SendMove(movequery, data) ) { return 1; } if( data.size() != 1 ) { std::cerr << "data size: " << data.size() << std::endl; return 1; } // SendMove + dataset is implicit by default: gdcm::Writer writer; writer.GetFile().GetHeader().SetDataSetTransferSyntax( gdcm::TransferSyntax::ImplicitVRLittleEndian ); writer.GetFile().SetDataSet( data[0] ); const char *outfilename = "dummy.dcm"; writer.SetFileName( outfilename ); if( !writer.Write() ) { return 1; } if( !gdcm::System::FileExists(outfilename) ) { std::cerr << "FileExists: " << outfilename << std::endl; return 1; } char digest_str[33]; if( !gdcm::Testing::ComputeFileMD5(outfilename, digest_str) ) { return 1; } if( strcmp( digest_str, "ae1f9a1bfc617f73ae8f72f81777dc03") != 0 ) { std::cerr << "md5: " << digest_str << std::endl; return 1; } // TODO: testing of CMove + JPEG Lossless is a *lot* more difficult // since we have to assume some behavior on the remote side (SCP) which // we cannot query. if( !scu.StopAssociation() ) { return 1; } // scu dstor will close the connection (!= association) return 0; } gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/TestFindStudyRootQuery.cxx000664 001766 001770 00000016405 14517730450 032731 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFindStudyRootQuery.h" #include "gdcmCompositeNetworkFunctions.h" #include "gdcmTrace.h" /* * STUDY: * $ findscu --call GDCM_STORE --aetitle GDCMDASH -P server 11112 -k 8,52="PATIENT" -k 10,20="1*" * $ findscu --call GDCM_STORE --aetitle GDCMDASH -S server 11112 -k 8,52="STUDY" -k 10,20="FOO" * * SERIES: * $ findscu --call GDCM_STORE --aetitle GDCMDASH -S lirispat 11112 -k 8,52="SERIES" -k 20,d="1.2.3" -k 8,60 */ int TestFindStudyRootQuery(int , char *[]) { //gdcm::Trace::DebugOn(); gdcm::Trace::WarningOff(); // STUDY: gdcm::ERootType theRoot = gdcm::eStudyRootType; gdcm::EQueryLevel theLevel = gdcm::eStudy; { std::vector< std::pair > keys; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // No key found is an error return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x10,0x10), "PATIENT" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // Patient Id is a Required Key in Study return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0x10), "studyid" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // Study Id is a required tag return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x8,0x90), "physician" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // ref physician's name is optional return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "studyuid" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( !theQuery->ValidateQuery( true ) ) { // Study UID is the unique tag return 1; } } // SERIES: theLevel = gdcm::eSeries; { std::vector< std::pair > keys; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // No key found is an error return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // No key at level Series return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; keys.emplace_back( gdcm::Tag(0x8,0x60), "" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // missing unique at series level return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; keys.emplace_back( gdcm::Tag(0x20,0xe), "4.5.6" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( !theQuery->ValidateQuery( true ) ) { // all unique keys present return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; keys.emplace_back( gdcm::Tag(0x20,0xe), "4.5.6" ) ; keys.emplace_back( gdcm::Tag(0x8,0x60), "" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( !theQuery->ValidateQuery( true ) ) { // all unique keys present and required is correct level return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; keys.emplace_back( gdcm::Tag(0x20,0xe), "4.5.6" ) ; keys.emplace_back( gdcm::Tag(0x8,0x20), "" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // all unique keys present and required is incorrect level return 1; } } // IMAGES: theLevel = gdcm::eImage; { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; keys.emplace_back( gdcm::Tag(0x20,0xe), "4.5.6" ) ; keys.emplace_back( gdcm::Tag(0x8,0x18), "7.8.9" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( !theQuery->ValidateQuery( true ) ) { // all unique keys present return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; keys.emplace_back( gdcm::Tag(0x20,0xe), "4.5.6" ) ; keys.emplace_back( gdcm::Tag(0x8,0x18), "7.8.9" ) ; keys.emplace_back( gdcm::Tag(0x20,0x13), "" ) ; gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( !theQuery->ValidateQuery( true ) ) { // all unique keys present + required correct level return 1; } } { std::vector< std::pair > keys; keys.emplace_back( gdcm::Tag(0x20,0xd), "1.2.3" ) ; keys.emplace_back( gdcm::Tag(0x20,0xe), "4.5.6" ) ; keys.emplace_back( gdcm::Tag(0x8,0x18), "7.8.9" ) ; keys.emplace_back( gdcm::Tag(0x20,0x13), "" ) ; keys.emplace_back( gdcm::Tag(0x20,0x11), "" ) ; // series level gdcm::SmartPointer theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys); if( theQuery->ValidateQuery( true ) ) { // all unique keys present + required correct level + one incorrect return 1; } } //std::cout << "success" << std::endl; return 0; } gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/TestSCUFunctions.cxx000664 001766 001770 00000023774 14517730450 031460 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= * * Copyright Insight Software Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0.txt * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *=========================================================================*/ #include "gdcmCompositeNetworkFunctions.h" #include "gdcmBaseRootQuery.h" //#include "gdcmDirectory.h" #include "gdcmScanner.h" #include "gdcmTesting.h" #include "gdcmReader.h" #include "gdcmWriter.h" #include "gdcmAttribute.h" #include "gdcmGlobal.h" #include #include //this should maybe override == ? bool AreDataSetsEqual(const gdcm::DataSet& ds1, const gdcm::DataSet& ds2){ gdcm::DataSet::ConstIterator it1 = ds1.Begin(); gdcm::DataSet::ConstIterator it2 = ds2.Begin(); const gdcm::DataElement &de1 = *it1; const gdcm::DataElement &de2 = *it2; if( de1 == de2 ) { } while( it1 != ds1.End() && it2 != ds2.End() && *it1 == *it2 ) { ++it1; ++it2; } if( it1 != ds1.End() || it2 != ds2.End() ) { std::cerr << "Problem with:" << std::endl; if( it1 != ds1.End() ) { std::cerr << "ds1: " << *it1 << std::endl; } if( it2 != ds2.End() ) { std::cerr << "ds2: " << *it2 << std::endl; } return false; } return true; } bool checkbl( const char *filename ) { static const char *blacklist[] = { "PHILIPS_GDCM12xBug2.dcm", // #3196213 // W: DIMSE Warning: (GDCMSCU,ANY-SCP): DIMSE receiveDataSetInMemory: // dset->read() Failed (Corrupted data) "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm", "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm", "GE_DLX-8-MONO2-PrivateSyntax.dcm", // Implicit VR Big Endian DLX (G.E Private) "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm", // Implicit VR Big Endian DLX (G.E Private) // W: DIMSE Warning: (STORESCU,ANY-SCP): sendMessage: unable to convert // dataset from 'JPEG Lossless, Non-hierarchical, Process 14' transfer // syntax to 'Big Endian Explicit' "SignedShortLosslessBug.dcm", "MR-MONO2-12-shoulder.dcm", // difficult for now: "SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs.acr", "MR-MONO2-12-an2.acr", "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm", nullptr }; for( const char **bl = blacklist; *bl; ++bl ) { const char *res = strstr( filename, *bl ); if( res ) { return true; } } return false; } int TestSCUFunctions(int argc, char *argv[]) { if( argc < 6 ) { std::cerr << argv[0] << " aetitle call portno moveReturnPort remote" << std::endl; return 1; } gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); std::string aetitle = argv[1]; // the ae title of this computer std::string call = argv[2]; // the ae title of the server uint16_t portno = (uint16_t)atoi(argv[3]); // the port of the server uint16_t moveReturnPort = (uint16_t)atoi(argv[4]); // the port over which return cstore scps are done for cmove std::string remote = argv[5]; //the ip address of the remote server std::string tmpdir = gdcm::Testing::GetTempDirectory( "TestSCUFunctions" ); std::string outputDir = tmpdir; //place to where data is returned by cmove //std::string inputDir = gdcm::Testing::GetDataRoot(); //input collection of data to transfer bool didItWork = gdcm::CompositeNetworkFunctions::CEcho( remote.c_str(), portno, aetitle.c_str(), call.c_str() ); if (!didItWork) { std::cerr << "Echo failed." << std::endl; return 1; } std::vector theFilenames; const char *filename; int i = 0; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { theFilenames.emplace_back(filename ); ++i; } // Fow now lets eliminate invalid candidates: // - no SOP Class UID // - no SOP Instance UID gdcm::Scanner sc; gdcm::Tag tts(0x0002,0x0010); gdcm::Tag sopclass(0x8,0x16); gdcm::Tag sopinstance(0x8,0x18); sc.AddTag( tts ); sc.AddTag( sopclass ); sc.AddTag( sopinstance ); if( !sc.Scan( theFilenames ) ) { return 1; } std::vector< gdcm::UIComp > validuids; validuids.emplace_back("1.2.840.10008.1.2" ); validuids.emplace_back("1.2.840.10008.1.2.1" ); //validuids.push_back( "1.2.840.10008.1.2.2" ); // remove any file without SOP Instance UID for( gdcm::Directory::FilenamesType::iterator it = theFilenames.begin(); it != theFilenames.end(); ) { const char *file = it->c_str(); const char* v1 = sc.GetValue(file, sopclass ); const char* v2 = sc.GetValue(file, sopinstance ); const char* v3 = sc.GetValue(file, tts ); gdcm::UIComp v3uid; if ( v3 ) v3uid = v3; std::vector< gdcm::UIComp >::const_iterator it2 = std::find( validuids.begin(), validuids.end(), v3uid ); if( !v1 || !v2 || !*v1 || !*v2 ) it = theFilenames.erase( it ); else if( checkbl( file ) ) it = theFilenames.erase( it ); else if( v3 && it2 == validuids.end() ) { //std::cerr << "erase: " << *it << " [" << v3uid << "]" << std::endl; it = theFilenames.erase( it ); } else ++it; } //store the datasets remotely didItWork = gdcm::CompositeNetworkFunctions::CStore(remote.c_str(), portno, theFilenames, aetitle.c_str(), call.c_str()); if (!didItWork) { std::cerr << "Store failed." << std::endl; return 1; } std::vector::iterator fitor; for (fitor = theFilenames.begin(); fitor < theFilenames.end(); ++fitor) { //read in the file gdcm::Reader theReader; theReader.SetFileName(fitor->c_str()); if (!theReader.Read()) { std::cerr << "Test failed, dicom file " << *fitor << " failed to load." < > keys; gdcm::Tag theTag(0x0010, 0x0010); gdcm::Tag theIDTag(0x0010, 0x0020); if (ds.FindDataElement(theTag)) { gdcm::DataElement de = ds.GetDataElement(theTag); const gdcm::ByteValue* bv = de.GetByteValue(); int theBufferLen = bv->GetLength(); if (theBufferLen < 2) continue; char* theBuf = new char[theBufferLen]; bv->GetBuffer(theBuf, theBufferLen); gdcm::UIComp theSearchStringRaw(theBuf, theBufferLen/2); delete [] theBuf; // HACK: std::string theSearchString = theSearchStringRaw.Trim(); std::replace( theSearchString.begin(), theSearchString.end(), ' ', '?'); theSearchString += "*"; std::cerr << "search for: [" << theSearchString << "]" << std::endl; if (theSearchString.size() %2 == 1) { theSearchString += " "; //to make sure everything is double spaced } keys.emplace_back(theTag, theSearchString); } else { continue; } std::string theEmptyString; keys.emplace_back(theIDTag, theEmptyString); gdcm::BaseRootQuery *theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(gdcm::ePatientRootType, gdcm::ePatient, keys); std::vector theDataSets; bool b = gdcm::CompositeNetworkFunctions::CFind(remote.c_str(), portno, theQuery, theDataSets, aetitle.c_str(), call.c_str()); //std::cout << theQuery->GetQueryDataSet() << std::endl; delete theQuery; if( !b ) { std::cerr << "Problem in CFind" << std::endl; return 1; } if (theDataSets.empty()) { std::cerr << "Unable to find the dataset that was just sent to the server, " << *fitor << std::endl; return 1; } keys.clear(); //if it's not empty, then pull it. std::vector::iterator itor; for (itor = theDataSets.begin(); itor != theDataSets.end(); itor++) { if (itor->FindDataElement(theIDTag)) { gdcm::DataElement de = itor->GetDataElement(theIDTag); const gdcm::ByteValue *bv = de.GetByteValue(); int theBufferLen = bv->GetLength(); char* theBuf = new char[theBufferLen]; bv->GetBuffer(theBuf, theBufferLen); std::string theSearchString(theBuf, theBuf + theBufferLen); delete [] theBuf; keys.emplace_back(theIDTag, theSearchString); gdcm::DataElement de2 = ds.GetDataElement(theIDTag); de2.SetVR( gdcm::VR::INVALID ); de.SetVR( gdcm::VR::INVALID ); if (!(de == de2)) { std::cerr << "Sent dataset does not match returned dataset ID. " << std::endl; std::cerr << de << std::endl; std::cerr << " vs " << std::endl; std::cerr << de2 << std::endl; std::cerr << "File: " << *fitor << std::endl; return 1; } break; } else { continue; } } if (keys.empty()) { std::cerr << "Sent dataset " << *fitor << " was not found by resulting CFind query. " << std::endl; return 1; } theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(gdcm::ePatientRootType, gdcm::ePatient, keys, gdcm::eMove ); didItWork = gdcm::CompositeNetworkFunctions::CMove(remote.c_str(), portno, theQuery, moveReturnPort, aetitle.c_str(), call.c_str(), outputDir.c_str() ); if ( !didItWork ) { std::cerr << "CMove failed for file " << *fitor << std::endl; return 1; } delete theQuery; std::cout << "File " << *fitor << " moved back to server." << std::endl; } return 0; } gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/TestQueryFactory.cxx000664 001766 001770 00000001577 14517730450 031567 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= * * Copyright Insight Software Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0.txt * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *=========================================================================*/ #include "gdcmQueryFactory.h" int TestQueryFactory(int , char *[]) { gdcm::QueryFactory o; (void)o; return 0; } gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/TestULTransitionTable.cxx000664 001766 001770 00000001767 14517730450 032476 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmULTransitionTable.h" #include "gdcmULActionAA.h" int TestULTransitionTable(int , char *[]) { gdcm::network::Transition t1; gdcm::network::Transition *t2 = gdcm::network::Transition::MakeNew( gdcm::network::eSta1Idle, new gdcm::network::ULActionAA2() ); gdcm::network::TableRow tr1; //tr1.transitions[0] = &t1; // no stack please tr1.transitions[1] = t2; gdcm::network::ULTransitionTable o; return 0; } gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/TestPresentationContextRQ.cxx000664 001766 001770 00000001630 14517730450 033403 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= * * Copyright Insight Software Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0.txt * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *=========================================================================*/ #include "gdcmPresentationContextRQ.h" int TestPresentationContextRQ(int , char *[]) { gdcm::network::PresentationContextRQ o; return 0; } gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/TestServiceClassUser3.cxx000664 001766 001770 00000007762 14517730450 032444 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmServiceClassUser.h" #include "gdcmDataEvent.h" #include "gdcmSimpleSubjectWatcher.h" #include "gdcmPresentationContextGenerator.h" #include "gdcmAttribute.h" #include "gdcmCompositeNetworkFunctions.h" #include "gdcmTransferSyntax.h" #include "gdcmWriter.h" #include "gdcmReader.h" #include "gdcmUIDGenerator.h" #include "gdcmTesting.h" /* * This test actually fails on D. Clunie PACS, but succeed on DicomObject (www.dicomserver.co.uk)... * * $ findscu 184.73.255.26 11112 --call AWSPIXELMEDPUB -P -k 8,52=IMAGE -k 8,16="1.*" -k 20,d * $ gdcmscu --find 184.73.255.26 11112 --call AWSPIXELMEDPUB --patientroot --image -k 8,16="1.*" -k 20,d */ int TestServiceClassUser3(int argc, char *argv[]) { if( argc < 5 ) { std::cerr << argv[0] << " aetitle call portno moveReturnPort remote" << std::endl; return 1; } std::string aetitle = argv[1]; // the ae title of this computer std::string call = argv[2]; // the ae title of the server uint16_t portno = (uint16_t)atoi(argv[3]); // the port of the server uint16_t moveReturnPort = (uint16_t)atoi(argv[4]); // the port over which return cstore scps are done for cmove std::string remote = argv[5]; //the ip address of the remote server (void)moveReturnPort; gdcm::SmartPointer scup = new gdcm::ServiceClassUser; gdcm::ServiceClassUser &scu = *scup; gdcm::SimpleSubjectWatcher w( &scu, "TestServiceClassUser3" ); std::ostringstream error_log; gdcm::Trace::SetErrorStream( error_log ); scu.SetHostname( remote.c_str() ); scu.SetPort( portno ); scu.SetTimeout( 1000 ); scu.SetCalledAETitle( call.c_str() ); scu.SetAETitle( aetitle.c_str() ); if( !scu.InitializeConnection() ) { return 1; } gdcm::PresentationContextGenerator generator; if( !generator.GenerateFromUID( gdcm::UIDs::VerificationSOPClass ) ) { return 1; } // make sure to fail if no pres. contexts: if( scu.StartAssociation() ) { return 1; } scu.SetPresentationContexts( generator.GetPresentationContexts() ); if( !scu.StartAssociation() ) { return 1; } // C-ECHO if( !scu.SendEcho() ) { return 1; } if( !scu.StopAssociation() ) { return 1; } // customize the find query gdcm::DataSet findds; gdcm::Attribute<0x8,0x16> sop ={"1.*"}; findds.Insert( sop.GetAsDataElement() ); gdcm::Attribute<0x20,0xd> uid; findds.Insert( uid.GetAsDataElement() ); gdcm::SmartPointer findquery = gdcm::CompositeNetworkFunctions::ConstructQuery( gdcm::ePatientRootType, gdcm::eImage, findds); // make sure the query is valid findquery->Print( std::cout ); if (!findquery->ValidateQuery(false)) { return 1; } // Generate the PresentationContext array from the query UID: if( !generator.GenerateFromUID( findquery->GetAbstractSyntaxUID() ) ) { return 1; } scu.SetPresentationContexts( generator.GetPresentationContexts() ); if( !scu.StartAssociation() ) { return 1; } // C-FIND std::vector datasets; // This is an error if the previous query succeed: if( scu.SendFind(findquery, datasets) ) { std::cerr << "Could SendFind, this is not possible !" << std::endl; std::cerr << "Error log is:" << std::endl; std::cerr << error_log.str() << std::endl; return 1; } if( !scu.StopAssociation() ) { return 1; } // scu dstor will close the connection (!= association) return 0; } gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/TestULConnectionManager.cxx000664 001766 001770 00000001622 14517730450 032754 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= * * Copyright Insight Software Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0.txt * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *=========================================================================*/ #include "gdcmULConnectionManager.h" int TestULConnectionManager(int , char *[]) { gdcm::network::ULConnectionManager o; return 0; } gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/TestServiceClassUser2.cxx000664 001766 001770 00000017411 14517730450 032433 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmServiceClassUser.h" #include "gdcmDataEvent.h" #include "gdcmSimpleSubjectWatcher.h" #include "gdcmPresentationContextGenerator.h" #include "gdcmAttribute.h" #include "gdcmCompositeNetworkFunctions.h" #include "gdcmTransferSyntax.h" #include "gdcmWriter.h" #include "gdcmReader.h" #include "gdcmUIDGenerator.h" #include "gdcmTesting.h" /* * This test make sure we can send/receive as many dataset as we want */ int TestServiceClassUser2(int argc, char *argv[]) { if( argc < 5 ) { std::cerr << argv[0] << " aetitle call portno moveReturnPort remote" << std::endl; return 1; } std::string aetitle = argv[1]; // the ae title of this computer std::string call = argv[2]; // the ae title of the server uint16_t portno = (uint16_t)atoi(argv[3]); // the port of the server uint16_t moveReturnPort = (uint16_t)atoi(argv[4]); // the port over which return cstore scps are done for cmove std::string remote = argv[5]; //the ip address of the remote server gdcm::SmartPointer scup = new gdcm::ServiceClassUser; gdcm::ServiceClassUser &scu = *scup; gdcm::SimpleSubjectWatcher w( &scu, "TestServiceClassUser2" ); scu.SetHostname( remote.c_str() ); scu.SetPort( portno ); scu.SetTimeout( 1000 ); scu.SetCalledAETitle( call.c_str() ); scu.SetAETitle( aetitle.c_str() ); std::ostringstream error_log; gdcm::Trace::SetErrorStream( error_log ); if( !scu.InitializeConnection() ) { return 1; } gdcm::PresentationContextGenerator generator; if( !generator.GenerateFromUID( gdcm::UIDs::VerificationSOPClass ) ) { return 1; } // make sure to fail if no pres. contexts: if( scu.StartAssociation() ) { return 1; } scu.SetPresentationContexts( generator.GetPresentationContexts() ); if( !scu.StartAssociation() ) { return 1; } // C-ECHO if( !scu.SendEcho() ) { return 1; } if( !scu.StopAssociation() ) { return 1; } gdcm::Directory::FilenamesType filenames; const char *directory = gdcm::Testing::GetDataRoot(); // storescu -R -xs --call GDCM_STORE macminig4 11112 gdcmData/gdcm-MR-PHILIPS-16-NonSquarePixels.dcm std::string filename = std::string(directory) + "/gdcm-MR-PHILIPS-16-NonSquarePixels.dcm"; filenames.push_back( filename ); if( !generator.GenerateFromUID( gdcm::UIDs::MRImageStorage ) ) { return 1; } scu.SetPresentationContexts( generator.GetPresentationContexts() ); if( !scu.StartAssociation() ) { return 1; } gdcm::Reader reader; reader.SetFileName( filename.c_str() ); if( !reader.Read() ) { return 1; } gdcm::File & file = reader.GetFile(); gdcm::UIDGenerator uid; const int nmax = 500; for( int i = 0; i < nmax; ++i ) { gdcm::DataSet & ds = file.GetDataSet(); std::string instance_uid = uid.Generate(); { gdcm::Attribute<0x8,0x18> at; at.SetValue( instance_uid.c_str() ); ds.Replace( at.GetAsDataElement() ); } { gdcm::Attribute<0x10,0x20> at; at.SetValue( "TestServiceClassUser2" ); ds.Replace( at.GetAsDataElement() ); } if( !scu.SendStore( file.GetDataSet() ) ) { return 1; } } if( !scu.StopAssociation() ) { return 1; } // customize the find query gdcm::DataSet findds; gdcm::Attribute<0x10,0x20> pid ={"TestServiceClassUser2"}; findds.Insert( pid.GetAsDataElement() ); gdcm::Attribute<0x8,0x18> iuid; findds.Insert( iuid.GetAsDataElement() ); gdcm::SmartPointer findquery = gdcm::CompositeNetworkFunctions::ConstructQuery( gdcm::ePatientRootType, gdcm::eImage, findds); // make sure the query is valid if (!findquery->ValidateQuery(false)) { return 1; } // Generate the PresentationContext array from the query UID: if( !generator.GenerateFromUID( findquery->GetAbstractSyntaxUID() ) ) { return 1; } scu.SetPresentationContexts( generator.GetPresentationContexts() ); if( !scu.StartAssociation() ) { return 1; } // C-FIND // $ findscu --call GDCM_STORE -P macminig4 11112 -k 8,52=IMAGE -k // 10,20=TestServiceClassUser2 -k 20,d -k 20,e -k 8,18 // gdcmscu --find --call GDCM_STORE --image --patientroot macminig4 11112 // -k 10,20=TestServiceClassUser2 -k 8,18 std::vector datasets; if( !scu.SendFind(findquery, datasets) ) { return 1; } if( !scu.StopAssociation() ) { return 1; } // C-MOVE // customize the move query gdcm::DataSet moveds1; // use results from the C-FIND to construct the c-move query: moveds1.Insert( datasets[0].GetDataElement( gdcm::Tag(0x10,0x20) ) ); moveds1.Insert( datasets[0].GetDataElement( gdcm::Tag(0x20,0xd) ) ); moveds1.Insert( datasets[0].GetDataElement( gdcm::Tag(0x20,0xe) ) ); gdcm::SmartPointer movequery1 = gdcm::CompositeNetworkFunctions::ConstructQuery( gdcm::ePatientRootType, gdcm::eImage, moveds1, gdcm::eMove); // Generate the PresentationContext array from the query UID: if( !generator.GenerateFromUID( movequery1->GetAbstractSyntaxUID() ) ) { return 1; } scu.SetPresentationContexts( generator.GetPresentationContexts() ); scu.SetPortSCP( moveReturnPort ); if( !scu.StartAssociation() ) { return 1; } size_t ndatasets = 0; for( std::vector::const_iterator cfind_it = datasets.begin(); cfind_it != datasets.end(); ++cfind_it ) { gdcm::DataSet &queryds = movequery1->GetQueryDataSet(); const gdcm::DataElement &instanceuid = cfind_it->GetDataElement( gdcm::Tag(0x8,0x18) ); queryds.Replace( instanceuid ); // C-MOVE std::vector data; if( !scu.SendMove(movequery1, data) ) { std::cerr << "CMove Failure for: " << instanceuid << std::endl; std::cerr << "Error log is:" << std::endl; std::cerr << error_log.str() << std::endl; return 1; } if( data.size() != 1 ) { std::cerr << "data size: " << data.size() << std::endl; return 1; } ++ndatasets; } //std::cerr << "Total number of dataset: " << ndatasets << std::endl; // Now let's do this again with a simpler request: gdcm::DataSet moveds2; moveds2.Insert( pid.GetAsDataElement() ); gdcm::SmartPointer movequery2 = gdcm::CompositeNetworkFunctions::ConstructQuery( gdcm::ePatientRootType, gdcm::ePatient, moveds2, gdcm::eMove ); const char outputdir[] = "TestServiceClassUser2"; // Make sure output dir exist, it will not be created if( gdcm::System::FileIsDirectory( outputdir ) ) { // cleanups old files: gdcm::System::DeleteDirectory( outputdir ); } gdcm::System::MakeDirectory( outputdir ); if( !scu.SendMove(movequery2, outputdir) ) { std::cerr << "CMove Failure for Patient ID: " << pid.GetValue() << std::endl; return 1; } // Compare results: gdcm::Directory dir; unsigned int ndatasets2 = dir.Load( outputdir, true ); if( ndatasets != ndatasets2 ) { std::cerr << "Incompatible number of results: " << ndatasets << " vs " << ndatasets2 << std::endl; return 1; } if( !scu.StopAssociation() ) { return 1; } // scu dstor will close the connection (!= association) return 0; } gdcm-3.0.22/Testing/Source/MessageExchangeDefinition/Cxx/TestEcho.cxx000664 001766 001770 00000002312 14517730450 027774 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= * * Copyright Insight Software Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0.txt * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *=========================================================================*/ #include "gdcmCompositeNetworkFunctions.h" #include "gdcmTag.h" #include "gdcmQueryFactory.h" int TestEcho(int , char *[]) { std::string hostname = "www.dicomserver.co.uk"; uint16_t port = 11112; std::string callaetitle = "GDCM_ROCKS"; std::string callingaetitle = "ACME1"; bool didItWork = gdcm::CompositeNetworkFunctions::CEcho( hostname.c_str(), port, callingaetitle.c_str(), callaetitle.c_str() ); return (didItWork ? 0:1); } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/000775 001766 001770 00000000000 14517731550 026631 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/CMakeLists.txt000664 001766 001770 00000000306 14517730450 031366 0ustar00mmalaterremmalaterre000000 000000 # Always add_subdirectory(Cxx) if(GDCM_WRAP_PYTHON) add_subdirectory(Python) endif() if(GDCM_WRAP_CSHARP) add_subdirectory(Csharp) endif() if(GDCM_WRAP_JAVA) add_subdirectory(Java) endif() gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Python/000775 001766 001770 00000000000 14517731550 030112 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Python/CMakeLists.txt000664 001766 001770 00000000512 14517730450 032646 0ustar00mmalaterremmalaterre000000 000000 # Define the tests for gdcm-python # gdcm-python set(GDCM_PYTHON_TEST_SRCS TestTag ) if(GDCM_DATA_ROOT) set(GDCM_PYTHON_TEST_SRCS ${GDCM_PYTHON_TEST_SRCS} TestReader ) endif() # Loop over files and create executables foreach(name ${GDCM_PYTHON_TEST_SRCS}) ADD_PYTHON_TEST(${name}Python ${name}.py) endforeach() gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Python/TestTag.py000664 001766 001770 00000001672 14517730450 032043 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import os,sys import gdcm if __name__ == "__main__": o1 = gdcm.Tag(0x0000,0x0000) o2 = gdcm.Tag(0x0010,0x0000) o3 = gdcm.Tag(0x0000,0x0010) o4 = gdcm.Tag(0x0010,0x0010) if o1 == o2: sys.exit(1) if o1 == o3: sys.exit(1) if o1 == o4: sys.exit(1) if o1 != o1: sys.exit(1) if o1 > o2: print("Fail o1 > o2") sys.exit(1) sys.exit(0) gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Python/TestReader.py000664 001766 001770 00000002320 14517730450 032521 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import os,sys import gdcm def TestRead(filename, verbose = False): r = gdcm.Reader() r.SetFileName( filename ) success = r.Read() #if verbose: print r.GetFile() if verbose: print(r.GetFile().GetDataSet()) return success if __name__ == "__main__": success = 0 try: filename = os.sys.argv[1] success += TestRead( filename, True ) except: # loop over all files: gdcm.Trace.DebugOff() gdcm.Trace.WarningOff() t = gdcm.Testing() nfiles = t.GetNumberOfFileNames() for i in range(0,nfiles): filename = t.GetFileName(i) success += TestRead( filename ) # Test succeed ? sys.exit(success == 0) gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Csharp/000775 001766 001770 00000000000 14517731550 030051 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Csharp/CMakeLists.txt000664 001766 001770 00000002012 14517730450 032602 0ustar00mmalaterremmalaterre000000 000000 # C# MSFF tests set(DSED_TEST_SRCS TestReaderUnicode ) set(DEP) set_source_files_properties(${GDCM_LIBRARY_DIR}/gdcm-sharp.dll PROPERTIES GENERATED 1) foreach(test ${DSED_TEST_SRCS}) file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${test}.cs result) add_custom_command( OUTPUT ${GDCM_EXECUTABLE_DIR}/${test}.exe COMMAND ${CMAKE_CSHARP_COMPILER} "${CSC_PLATFORM_FLAG}" "/r:${GDCM_LIBRARY_DIR}/gdcm-sharp.dll" "/out:${GDCM_EXECUTABLE_DIR}/${test}.exe" ${result} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${test}.cs COMMENT "Create ${test}.exe" ) add_custom_target(gdcm_sharp_${test} DEPENDS ${GDCM_EXECUTABLE_DIR}/${test}.exe) add_dependencies(gdcm_sharp_${test} GDCMCSharp) list(APPEND DEP ${GDCM_EXECUTABLE_DIR}/${test}.exe) # add test if(GDCM_DATA_ROOT) ADD_CSHARP_TEST(Test${test}Csharp ${GDCM_EXECUTABLE_DIR}/${test}.exe) endif() endforeach() add_custom_target(gdcmDSEDTestsCsharp ALL DEPENDS ${DEP} COMMENT "building DSED C# tests" ) add_dependencies(gdcmDSEDTestsCsharp GDCMCSharp) gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Csharp/TestReaderUnicode.cs000664 001766 001770 00000004717 14517730450 033760 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ using System; using System.IO; using gdcm; public class TestReaderUnicode { public static void copyFile( string sourceFileName, string destFileName ) { System.IO.File.Copy (sourceFileName, destFileName); } public static void process(String template, String tmpdir, String targetname) { if(!PosixEmulation.FileIsDirectory( tmpdir ) ) { PosixEmulation.MakeDirectory( tmpdir ); } String filename = tmpdir + "/" + targetname; PosixEmulation.RemoveFile( filename ); try { copyFile(template, filename); } catch (IOException ex) { Console.WriteLine("Error copying: " + template + " to " + filename ); throw ex; } Reader reader = new Reader(); Console.WriteLine("Reading: " + filename ); reader.SetFileName( filename ); if ( !reader.Read() ) { throw new Exception("Could not read: " + filename ); } String reference = Testing.GetMediaStorageFromFile(template); if( reference == null || reference == "" ) { throw new Exception("Missing ref for: " + template); } MediaStorage ms = new MediaStorage(); ms.SetFromFile( reader.GetFile() ); if( ms.IsUndefined() ) { throw new Exception("ref is undefined for: " + filename + " should be " + reference ); } MediaStorage.MSType ref_mstype = MediaStorage.GetMSType( reference ); if( ms.GetMSType() != ref_mstype ) { throw new Exception("incompatible type: " + reference + " vs " + ms.GetString() + " for " + filename ); } } public static int Main(string[] args) { String dataroot = Testing.GetDataRoot(); String filename = dataroot + "/012345.002.050.dcm"; String subdir = "TestReaderUnicode"; String tmpdir = Testing.GetTempDirectory( subdir ); process(filename, tmpdir, "ascii.dcm" ); process(filename, tmpdir, "ê.dcm" ); process(filename, tmpdir, "Ð.dcm" ); return 0; } } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Java/000775 001766 001770 00000000000 14517731550 027512 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Java/TestReader.java000664 001766 001770 00000004323 14517730450 032417 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* */ import gdcm.*; import java.util.Properties; import java.util.Enumeration; public class TestReader { public static void main(String[] args) throws Exception { /* System.out.println("PATH : " + System.getProperty("java.library.path")); Properties p = System.getProperties(); Enumeration keys = p.keys(); while (keys.hasMoreElements()) { String key = (String)keys.nextElement(); String value = (String)p.get(key); System.out.println(key + ": " + value); } */ long nfiles = Testing.GetNumberOfFileNames(); Trace.DebugOff(); Trace.WarningOff(); for( long i = 0; i < nfiles; ++i ) { String filename = Testing.GetFileName( i ); //System.out.println("Success reading: " + filename ); Reader reader = new Reader(); reader.SetFileName( filename ); if ( !reader.Read() ) { throw new Exception("Could not read: " + filename ); } String ref = Testing.GetMediaStorageFromFile(filename); if( ref == null ) { throw new Exception("Missing ref for: " + filename ); } MediaStorage ms = new MediaStorage(); ms.SetFromFile( reader.GetFile() ); if( ms.IsUndefined() && !"".equals( ref ) ) { // gdcm-CR-DCMTK-16-NonSamplePerPix.dcm is empty throw new Exception("ref is undefined for: " + filename + " should be " + ref ); } MediaStorage.MSType ref_mstype = MediaStorage.GetMSType( ref ); if( !"".equals( ref ) && ms.GetType() != ref_mstype ) { throw new Exception("incompatible type: " + ref + " vs " + ms.GetString() + " for " + filename ); } } } } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Java/CMakeLists.txt000664 001766 001770 00000002544 14517730450 032255 0ustar00mmalaterremmalaterre000000 000000 # Define the tests for gdcm-java set(GDCM_JAVA_TEST_SRCS TestReader TestReaderUnicode TestTag TestReaderUpToTag ) # Do not change anything after here: find_package(Java ${GDCM_DEFAULT_JAVA_VERSION} REQUIRED) # javac, jar find_package(JNI REQUIRED) include_directories( ${JNI_INCLUDE_PATH} ) set(classfilesdep) foreach(example ${GDCM_JAVA_TEST_SRCS}) add_custom_command( OUTPUT ${GDCM_EXECUTABLE_DIR}/${example}.class COMMAND ${Java_JAVAC_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${example}.java -encoding utf-8 -d ${GDCM_EXECUTABLE_DIR} -source ${GDCM_JAVA_SOURCE_VERSION} -target ${GDCM_JAVA_TARGET_VERSION} -classpath ${GDCM_LIBRARY_DIR}/gdcm.jar WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${example}.java COMMENT "javac ${example}.java" ) list(APPEND classfilesdep ${GDCM_EXECUTABLE_DIR}/${example}.class) set(GDCM_LIBRARY_DIR2 ${LIBRARY_OUTPUT_PATH}/\${BUILD_TYPE}) set_source_files_properties(${GDCM_EXECUTABLE_DIR}/${example}.class PROPERTIES CLASSPATH "${GDCM_LIBRARY_DIR2}/gdcm.jar") ADD_JAVA_TEST(${example}Java ${GDCM_EXECUTABLE_DIR}/${example}) endforeach() # 3. ok now add the target add_custom_target(GDCMJavaDSEDTests ALL DEPENDS ${classfilesdep} COMMENT "building gdcm java dsed tests" ) # make sure gdcm.jar is built add_dependencies(GDCMJavaDSEDTests GDCMJavaJar) gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Java/TestReaderUnicode.java000664 001766 001770 00000005240 14517730450 033725 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* */ import gdcm.*; import java.util.Properties; import java.util.Enumeration; import java.io.IOException; import java.nio.file.Files; public class TestReaderUnicode { public static void copyFile( java.io.File from, java.io.File to ) throws IOException { Files.copy( from.toPath(), to.toPath() ); } public static void process(String template, String tmpdir, String targetname) throws IOException, Exception { if(!PosixEmulation.FileIsDirectory( tmpdir ) ) { PosixEmulation.MakeDirectory( tmpdir ); } String filename = tmpdir + "/" + targetname; PosixEmulation.RemoveFile( filename ); try { copyFile(new java.io.File(template), new java.io.File(filename )); } catch (IOException ex) { System.err.println("Error copying: " + template + " to " + filename ); return; } Reader reader = new Reader(); System.out.println("Reading: " + filename ); reader.SetFileName( filename ); if ( !reader.Read() ) { throw new Exception("Could not read: " + filename ); } String ref = Testing.GetMediaStorageFromFile(template); if( ref == null ) { throw new Exception("Missing ref for: " + template); } MediaStorage ms = new MediaStorage(); ms.SetFromFile( reader.GetFile() ); if( ms.IsUndefined() && !"".equals( ref ) ) { // gdcm-CR-DCMTK-16-NonSamplePerPix.dcm is empty throw new Exception("ref is undefined for: " + filename + " should be " + ref ); } MediaStorage.MSType ref_mstype = MediaStorage.GetMSType( ref ); if( !"".equals( ref ) && ms.GetType() != ref_mstype ) { throw new Exception("incompatible type: " + ref + " vs " + ms.GetString() + " for " + filename ); } } public static void main(String[] args) throws Exception { String dataroot = Testing.GetDataRoot(); String filename = dataroot + "/012345.002.050.dcm"; String subdir = "TestReaderUnicode"; String tmpdir = Testing.GetTempDirectory( subdir ); process(filename, tmpdir, "ascii.dcm" ); process(filename, tmpdir, "ê.dcm" ); process(filename, tmpdir, "Ð.dcm" ); } } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Java/TestReaderUpToTag.java000664 001766 001770 00000005652 14517730450 033671 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* */ import gdcm.*; import java.util.SortedSet; import java.util.TreeSet; import java.util.Set; import java.util.HashSet; import java.util.List; import java.util.ArrayList; public class TestReaderUpToTag { private static void PrintTagSet( Set s ) { for( Tag t : s ) { System.out.println("Print: " + t); } } private static SortedSet getTagSet() { Tag tags[] = { new Tag(0x8,0x8), new Tag(0x8,0x16), new Tag(0x8,0x18), new Tag(0x8,0x60), new Tag(0x10,0x20), new Tag(0x28,0x2), new Tag(0x28,0x10), new Tag(0x28,0x11), new Tag(0x10,0x10) }; SortedSet tagSet = new TreeSet(); for( Tag tag : tags ) { tagSet.add( tag ); } return tagSet; } public static void main(String[] args) throws Exception { long nfiles = Testing.GetNumberOfFileNames(); SortedSet tagSet = getTagSet(); PrintTagSet( tagSet ); Tag last = tagSet.last(); System.out.println("last: " + last); TagSetType skip = new TagSetType(); Tag pixelData = new Tag(0x7fe0,0x0010); skip.insert( pixelData ); Trace.DebugOff(); Trace.WarningOff(); StringFilter sf = new StringFilter(); List> l = new ArrayList>(); for( long i = 0; i < nfiles; ++i ) { Set s = new HashSet(); String filename = Testing.GetFileName( i ); if( true || filename.contains( "ExplicitVRforPublicElementsImplicitVRforShadowElements" ) || filename.contains( "SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs" ) ) { Reader reader = new Reader(); reader.SetFileName( filename ); if ( !reader.ReadUpToTag(pixelData, skip) ) { throw new Exception("Could not read: " + filename ); } System.out.println("reading: " + filename); File file = reader.GetFile(); sf.SetFile( file ); DataSet ds = file.GetDataSet(); for( Tag tag : tagSet ) { if( ds.FindDataElement( tag ) ) { s.add( tag ); DataElement de = ds.GetDataElement( tag ); System.out.println("de: " + tag + " -> " + sf.ToString( de ) ); } } } l.add( s ); // PrintTagSet( s ); System.gc (); } System.gc (); System.runFinalization (); for( Set s : l ) { PrintTagSet( s ); } PrintTagSet( tagSet ); } } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Java/TestTag.java000664 001766 001770 00000004240 14517730450 031726 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* */ import gdcm.Tag; import java.util.Set; import java.util.HashSet; public class TestTag { public static void main(String[] args) throws Exception { Tag t1 = new Tag(0x8,0x8); //System.out.println("t1: " + t1.hashCode()); Tag t2 = new Tag(0x8,0x8); //System.out.println("t2: " + t2.hashCode()); Tag t3 = new Tag(0x8,0x9); if( t1 == t2 ) throw new Exception("Instances are identical" ); if( !t1.equals(t2) ) throw new Exception("Instances are different" ); if( !t2.equals(t1) ) throw new Exception("Instances are different" ); if( t1.equals(t3) ) throw new Exception("Instances are equals" ); if( t1.hashCode() != t2.hashCode() ) throw new Exception("hashCodes are different" ); Set s = new HashSet(); s.add(t1); s.add(t2); s.add(t3); if( s.size() != 2 ) throw new Exception("Invalid size: " + s.size() ); //System.out.println("compareTo: " + t1.compareTo(t2)); //System.out.println("compareTo: " + t2.compareTo(t1)); //System.out.println("compareTo: " + t1.compareTo(t3)); //System.out.println("compareTo: " + t3.compareTo(t1)); if( t1.compareTo(t2) != 0 ) throw new Exception("Invalid compareTo: " + t1 + " vs " + t2 ); if( t2.compareTo(t1) != 0 ) throw new Exception("Invalid compareTo: " + t1 + " vs " + t2 ); if( t1.compareTo(t3) >= 0 ) throw new Exception("Invalid compareTo: " + t1 + " vs " + t3 ); if( t3.compareTo(t1) <= 0 ) throw new Exception("Invalid compareTo: " + t1 + " vs " + t3 ); } } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/000775 001766 001770 00000000000 14517731550 027373 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestAttribute5.cxx000664 001766 001770 00000007354 14517730450 033016 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAttribute.h" /* (0008,0000) UL 38 (0008,0001) UL 262302 (0008,0010) LO [ACRNEMA_LIBIDO_1.1] (0028,0000) UL 100 (0028,0005) US 2 (0028,0010) US 512 (0028,0011) US 512 (0028,0015) ?? 00\00 (0028,0016) ?? 00\00 (0028,0100) US 8 (0028,0101) US 8 (0028,0102) US 7 (0028,0103) US 0 (0028,0199) ?? 70\00 (7fe0,0000) UL 262152 (7fe0,0010) OW ea00\eaea\e9e9\e9e9\e9e9\e */ struct dummy { int u; char v[5]; }; int TestAttribute(int argc, char *argv[]) { dummy du = { 2, "date" }; const char *filename; if( argc < 2 ) { filename = "/tmp/dummy.dcm"; } else { filename = argv[1]; } std::ofstream os(filename, std::ios::binary); //gdcm::Attribute<0x0008,0x0000, gdcm::VR::UL, gdcm::VM::VM1> a = { 38 }; gdcm::Attribute<0x0008,0x0000> a = { 38 }; a.Print( std::cout << std::endl ); a.Write(os); gdcm::Attribute<0x0008,0x0001, gdcm::VR::UL, gdcm::VM::VM1> b = { 262302 }; b.Print( std::cout << std::endl ); b.Write(os); gdcm::Attribute<0x0008,0x0010, gdcm::VR::LO, gdcm::VM::VM1> c = { "ACRNEMA_LIBIDO_1.1" }; c.Print( std::cout << std::endl ); c.Write(os); // 0008 0082 SQ 1 Institution Code Sequence gdcm::Attribute<0x0008,0x0082, gdcm::VR::SQ, gdcm::VM::VM1, gdcm::Attribute<0x0008,0x0080, gdcm::VR::LO> > sq = { "Institution Name" }; sq.Print( std::cout << std::endl ); sq.Write(os); gdcm::Attribute<0x0028,0x0000, gdcm::VR::UL, gdcm::VM::VM1> d = { 100 }; d.Print( std::cout << std::endl ); d.Write(os); gdcm::Attribute<0x0028,0x0005, gdcm::VR::US, gdcm::VM::VM1> e = { 2 }; e.Print( std::cout << std::endl ); e.Write(os); gdcm::Attribute<0x0028,0x0010, gdcm::VR::US, gdcm::VM::VM1> f = { 512 }; f.Print( std::cout << std::endl ); f.Write(os); gdcm::Attribute<0x0028,0x0011, gdcm::VR::US, gdcm::VM::VM1> g = { 512 }; g.Print( std::cout << std::endl ); g.Write(os); // 0028 0015 US 1 UsedNbX ACR Special (RET) // 0028 0016 US 1 UsedNbY ACR Special (RET) gdcm::Attribute<0x0028,0x0015, gdcm::VR::US, gdcm::VM::VM1> h = { 0 }; h.Print( std::cout << std::endl ); h.Write(os); gdcm::Attribute<0x0028,0x0016, gdcm::VR::US, gdcm::VM::VM1> i = { 0 }; i.Print( std::cout << std::endl ); i.Write(os); gdcm::Attribute<0x0028,0x0100, gdcm::VR::US, gdcm::VM::VM1> j = { 8 }; j.Print( std::cout << std::endl ); j.Write(os); gdcm::Attribute<0x0028,0x0101, gdcm::VR::US, gdcm::VM::VM1> k = { 8 }; k.Print( std::cout << std::endl ); k.Write(os); gdcm::Attribute<0x0028,0x0102, gdcm::VR::US, gdcm::VM::VM1> l = { 7 }; l.Print( std::cout << std::endl ); l.Write(os); gdcm::Attribute<0x0028,0x0103, gdcm::VR::US, gdcm::VM::VM1> m = { 0 }; m.Print( std::cout << std::endl ); m.Write(os); // 0028 0199 US 1 Special Code (RET) gdcm::Attribute<0x0028,0x0199, gdcm::VR::US, gdcm::VM::VM1> n = { 112 }; n.Print( std::cout << std::endl ); n.Write(os); gdcm::Attribute<0x7fe0,0x0000, gdcm::VR::UL, gdcm::VM::VM1> o = { 262152 }; o.Print( std::cout << std::endl ); o.Write(os); gdcm::Attribute<0x7fe0,0x0010, gdcm::VR::OW, gdcm::VM::VM1> p; // char bytes[512*512] = {}; p.SetBytes(bytes, 512*512); p.Print( std::cout << std::endl ); p.Write(os); os.close(); return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestTag.cxx000664 001766 001770 00000020677 14517730450 031504 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTag.h" #include "gdcmSwapper.h" int TestPrivate() { gdcm::Tag t1(0x0009,0x0000); if( t1.IsPublic() ) { return 1; } if( !t1.IsPrivate() ) { return 1; } if( t1.IsPrivateCreator() ) { return 1; } gdcm::Tag t2(0x0009,0x0001); if( t2.IsPublic() ) { return 1; } if( !t2.IsPrivate() ) { return 1; } if( t2.IsPrivateCreator() ) { return 1; } gdcm::Tag t3(0x0009,0x0010); if( t3.IsPublic() ) { return 1; } if( !t3.IsPrivate() ) { return 1; } if( !t3.IsPrivateCreator() ) { return 1; } gdcm::Tag t4(0x0009,0x1010); gdcm::Tag t4_creator(0x0009,0x0010); if( t4.IsPublic() ) { return 1; } if( !t4.IsPrivate() ) { return 1; } if( t4.IsPrivateCreator() ) { return 1; } if( t4.GetPrivateCreator() != t4_creator ) { return 1; } return 0; } int TestPipePrintRead() { gdcm::Tag t(0x1234,0x5678); const char pipesep[] = "1234|5678"; gdcm::Tag tprime(0x0,0x0); if( !tprime.ReadFromPipeSeparatedString(pipesep) ) { return 1; } if( tprime != t ) return 1; std::string str = t.PrintAsPipeSeparatedString(); if( str != pipesep ) return 1; return 0; } int TestOperator() { gdcm::Tag t1(0x1234,0x5678); gdcm::Tag t1bis(0x1234,0x5678); gdcm::Tag t2(0x1234,0x5679); if( t2 < t1 ) { return 1; } if( !(t1 < t2) ) { return 1; } if( !(t1 == t1bis) ) { return 1; } if( !(t1 <= t1bis) ) { return 1; } return 0; } int TestTag(int , char * []) { { const uint32_t dummy = 0x12345678; gdcm::Tag t16(0x1234, 0x5678); std::stringstream ss; t16.Write( ss ); gdcm::Tag t16_2; t16_2.Read( ss ); gdcm::Tag t32( dummy ); if( t32 != t16 ) { return 1; } gdcm::Tag t1; gdcm::Tag t2(0,0); if ( t1[0] != 0 ) { std::cerr << "1" << std::endl; return 1; } if (t1[1] != 0 ) {std::cout << "2" << std::endl ; return 1; } if (t2[0] != 0 ) {std::cout << "3" << std::endl ; return 1; } if (t2[1] != 0 ) {std::cout << "4" << std::endl ; return 1; } if ( !(t1 == t2) ) {std::cout << "5" << std::endl ; return 1; } if ( t1 != t2 ) {std::cout << "6" << std::endl ; return 1; } if ( t1 < t2 ) {std::cout << "7" << std::endl ; return 1; } unsigned int i; const uint32_t tag = dummy; std::cout << "Just to inform : uint32_t value=" << std::hex << tag ; std::cout << " stored in RAM as :"; for (i=0;i> tag2; //std::istringstream is; //is.str( "1234567890" ); //is >> tag2; if( tag != tag2 ) { std::cout << tag << std::endl; std::cout << tag2 << std::endl; return 1; } } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestSequenceOfItems.cxx000664 001766 001770 00000002131 14517730450 034011 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSequenceOfItems.h" int TestSequenceOfItems(int, char *[]) { gdcm::SequenceOfItems si; std::cout << si << std::endl; gdcm::VL vl = si.GetLength(); if( !vl.IsUndefined() ) { return 1; } if( !si.IsUndefinedLength() ) { return 1; } gdcm::SmartPointer sq = new gdcm::SequenceOfItems(); gdcm::DataElement des( gdcm::Tag(0xdead,0xbeef) ); des.SetVR(gdcm::VR::SQ); des.SetValue(*sq); if( !des.GetValueAsSQ()->IsUndefinedLength() ) { return 1; } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestDataSet.cxx000664 001766 001770 00000004033 14517730450 032302 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDataSet.h" #include "gdcmDataElement.h" #include "gdcmExplicitDataElement.h" #include "gdcmImplicitDataElement.h" int TestDataSet(int , char *[]) { gdcm::DataSet ds; std::cout << sizeof ds << std::endl; gdcm::DataElement d; ds.Insert(d); const gdcm::DataElement& r = ds.GetDataElement( gdcm::Tag(0,0) ); std::cout << r << std::endl; const gdcm::Tag t2 = gdcm::Tag(0x1234, 0x5678); gdcm::DataElement d2(t2); std::cout << d2 << std::endl; ds.Insert(d2); const gdcm::DataElement& r2 = ds.GetDataElement( t2 ); std::cout << r2 << std::endl; const gdcm::Tag t3 = gdcm::Tag(0x1234, 0x5679); gdcm::DataElement d3(t3); d3.SetVR( gdcm::VR::UL ); std::cout << d3 << std::endl; ds.Insert(d3); const gdcm::DataElement& r3 = ds.GetDataElement( t3 ); std::cout << r3 << std::endl; std::cout << "Size:" << ds.Size() << std::endl; if( ds.Size() != 3 ) { //return 1; } std::cout << "Print Dataset:" << std::endl; std::cout << ds << std::endl; const gdcm::DataElement &de1 = ds[ gdcm::Tag(0x0020,0x0037) ]; const gdcm::DataElement &de2 = ds(0x0020,0x0037); if( &de1 != &de2 ) return 1; std::cout << ds << std::endl; gdcm::DataElement de3; std::cout << de3 << std::endl; const gdcm::DataElement &de4 = ds(0x0,0x0); std::cout << de4 << std::endl; const gdcm::DataElement &de5 = ds(0x0,0x1); std::cout << de5 << std::endl; const gdcm::DataElement &de6 = ds(0x1,0x1); std::cout << de6 << std::endl; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestDataElement.cxx000664 001766 001770 00000015174 14517730450 033150 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDataElement.h" #include "gdcmExplicitDataElement.h" #include "gdcmTag.h" #include "gdcmSwapper.h" #include inline void DebugElement(std::stringstream const &os) { std::ofstream of("/tmp/bla.bin", std::ios::binary); std::string str = os.str(); of.write(str.c_str(), str.size()); of.close(); } inline void WriteRead(gdcm::DataElement const &w, gdcm::DataElement &r) { // w will be written // r will be read back std::stringstream ss; w.Write(ss); r.Read(ss); } int TestDataElement1(const uint16_t group, const uint16_t element, const uint16_t vl) { const char *str; std::stringstream ss; // SimpleData Element, just group,element and length str = reinterpret_cast(&group); ss.write(str, sizeof(group)); str = reinterpret_cast(&element); ss.write(str, sizeof(element)); str = reinterpret_cast(&vl); ss.write(str, sizeof(vl)); // gdcm::DataElement de; // de.Read( ss ); // if( de.GetTag().GetGroup() != group || // de.GetTag().GetElement() != element || // de.GetVL() != vl ) // { // std::cerr << de << std::endl; // return 1; // } // // gdcm::DataElement de2; // WriteRead(de, de2); // if( !(de == de2) ) // { // std::cerr << de << std::endl; // std::cerr << de2 << std::endl; // return 1; // } return 0; } // Explicit int TestDataElement2(const uint16_t group, const uint16_t element, const char* vr, const char* value) { const char *str; const uint32_t vl = (uint32_t)strlen( value ); std::stringstream ss; // SimpleData Element, just group,element and length str = reinterpret_cast(&group); ss.write(str, sizeof(group)); str = reinterpret_cast(&element); ss.write(str, sizeof(element)); if( gdcm::VR::GetVRType(vr) == gdcm::VR::INVALID ) { std::cerr << "Test buggy" << std::endl; return 1; } ss.write(vr, strlen(vr) ); str = reinterpret_cast(&vl); ss.write(str, sizeof(vl)); assert( !(strlen(value) % 2) ); ss.write(value, strlen(value) ); //DebugElement(ss); gdcm::ExplicitDataElement de; de.Read( ss ); if( de.GetTag().GetGroup() != group || de.GetTag().GetElement() != element || de.GetVL() != vl ) { std::cerr << de << std::endl; return 1; } gdcm::ExplicitDataElement de2; WriteRead(de, de2); if( !(de == de2) ) { std::cerr << de << std::endl; std::cerr << de2 << std::endl; return 1; } return 0; } namespace { // Tests operator== and operator!= for various gdcm::DataElement objects. // Also tests comparing to itself, symmetry of the comparison operators // with respect to their operands, and consistency between // operator== and operator!=. // Note: This function recursively calls itself, in order to get a pointer // to an equivalent array of gdcm::DataElement objects. int TestDataElementEqualityComparison( const gdcm::DataElement* const equivalentDataElements = nullptr) { const unsigned int numberOfDataElements = 6; gdcm::DataElement dataElements[numberOfDataElements] = { gdcm::DataElement(gdcm::Tag(0, 0), 0, gdcm::VR::INVALID), gdcm::DataElement(gdcm::Tag(1, 1), 0, gdcm::VR::INVALID), gdcm::DataElement(gdcm::Tag(1, 1), 1, gdcm::VR::INVALID), gdcm::DataElement(gdcm::Tag(1, 1), 1, gdcm::VR::AE) }; dataElements[4].SetByteValue("\0", 2); dataElements[5].SetByteValue("123", 4); // Now all data elements of the array dataElements are different. if ( equivalentDataElements == nullptr ) { return TestDataElementEqualityComparison(dataElements); } // equivalentDataElements != NULL, and because this function // is called recursively, equivalentDataElements[i] is equivalent // to dataElements[i]. for (unsigned int i = 0; i < numberOfDataElements; ++i) { const gdcm::DataElement& dataElement = dataElements[i]; if ( ! (dataElement == dataElement) ) { std::cerr << "Error: A data element should compare equal to itself!\n"; return 1; } if ( dataElement != dataElement ) { std::cerr << "Error: A data element should not compare unequal to itself!\n"; return 1; } const gdcm::DataElement& equivalentDataElement = equivalentDataElements[i]; if ( ! (dataElement == equivalentDataElement) || ! (equivalentDataElement == dataElement ) ) { std::cerr << "Error: A data element should compare equal to an equivalent one!\n"; return 1; } if ( (dataElement != equivalentDataElement) || (equivalentDataElement != dataElement) ) { std::cerr << "Error: A data element should not compare unequal to an equivalent one!\n"; return 1; } for (unsigned int j = i + 1; j < numberOfDataElements; ++j) { // dataElements[j] is different from dataElements[i]. const gdcm::DataElement& differentDataElement = dataElements[j]; if ( (dataElement == differentDataElement) || (differentDataElement == dataElement) ) { std::cerr << "Error: A data element should not compare equal to a different one!\n"; return 1; } if ( !(dataElement != differentDataElement) || !(differentDataElement != dataElement) ) { std::cerr << "Error: A data element should compare unequal to a different one!\n"; return 1; } } } return 0; } } // End of unnamed namespace. // Test Data Element int TestDataElement(int , char *[]) { const uint16_t group = 0x0010; const uint16_t element = 0x0012; const uint16_t vl = 0x0; int r = 0; r += TestDataElement1(group, element, vl); r += TestDataElementEqualityComparison(); // Full DataElement //const char vr[] = "UN"; //const char value[] = "ABCDEFGHIJKLMNOP"; //r += TestDataElement2(group, element, vr, value); return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestAttribute1.cxx000664 001766 001770 00000016741 14517730450 033012 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAttribute.h" #include // fabs #include int TestAttributeAE() { return 0; } int TestAttributeAS() { return 0; } int TestAttributeAT() { return 0; } /* int TestAttributeCS() { // (0008,9007) CS [ORIGINAL\PRIMARY\T1\NONE] # 24, 4 FrameType static const char* values[] = {"ORIGINAL","PRIMARY","T1","NONE"}; static const char* newvalues[] = {"DERIVED","SECONDARY","T2","ALL"}; const unsigned int numvalues = sizeof(values) / sizeof(values[0]); if( numvalues != 4 ) return 1; gdcm::Attribute<0x0008,0x9007> it = {"ORIGINAL","PRIMARY","T1","NONE"}; // FIXME HARDCODED: if( it.GetVM() != gdcm::VM::VM4 ) return 1; if( it.GetVR() != gdcm::VR::CS ) return 1; // END FIXME if( it.GetNumberOfValues() != numvalues ) return 1; for(unsigned int i = 0; i < numvalues; ++i) if( it.GetValue(i) != values[i] ) return 1; it.Print( std::cout ); std::cout << std::endl; gdcm::DataElement de = it.GetAsDataElement(); std::cout << de << std::endl; // new values: // Using implicit cstor of gdcm::String from const char * for(unsigned int i = 0; i < numvalues; ++i) it.SetValue( newvalues[i], i ); if( it.GetNumberOfValues() != numvalues ) return 1; for(unsigned int i = 0; i < numvalues; ++i) if( it.GetValue(i) != newvalues[i] ) return 1; // const char * is not a gdcm::String, need an array of gdcm::String static const gdcm::String<> newvalues2[] = {"DERIVED","SECONDARY","T2","ALL"}; const unsigned int numnewvalues2 = sizeof(newvalues2) / sizeof(newvalues2[0]); it.SetValues( newvalues2 ); it.Print( std::cout ); std::cout << std::endl; de = it.GetAsDataElement(); std::cout << de << std::endl; // (0008,0008) CS [DERIVED\PRIMARY\AXIAL] # 22, 3 ImageType gdcm::Attribute<0x0008,0x0008> it1; if( it1.GetVM() != gdcm::VM::VM2_n ) { std::cerr << "Wrong VM:" << it1.GetVM() << std::endl; return 1; } it1.SetValues( newvalues2, numnewvalues2 ); it1.Print( std::cout ); std::cout << std::endl; de = it1.GetAsDataElement(); std::cout << de << std::endl; // redo the same but this time copy the values: it1.SetValues( newvalues2, numnewvalues2, true ); it1.Print( std::cout ); std::cout << std::endl; de = it1.GetAsDataElement(); std::cout << de << std::endl; return 0; } */ int TestAttributeDA() { return 0; } int TestAttributeDS() { // (0020,0032) DS [-158.135803\-179.035797\-75.699997] # 34, 3 ImagePositionPatient const double values[] = {-158.135803,-179.035797,-75.699997}; const double newvalues[] = {12.34,56.78,90.0}; const unsigned int numvalues = sizeof(values) / sizeof(values[0]); gdcm::Attribute<0x0020,0x0032> ipp = {{-158.135803,-179.035797,-75.699997}}; // FIXME HARDCODED: if( ipp.GetVM() != gdcm::VM::VM3 ) return 1; if( ipp.GetVR() != gdcm::VR::DS ) return 1; // END FIXME if( ipp.GetNumberOfValues() != numvalues ) return 1; for(unsigned int i = 0; i < numvalues; ++i) if( fabs(ipp.GetValue(i) - values[i]) > std::numeric_limits::epsilon() ) return 1; ipp.Print( std::cout ); std::cout << std::endl; gdcm::DataElement de = ipp.GetAsDataElement(); std::cout << de << std::endl; // new values: ipp.SetValues( newvalues ); if( ipp.GetNumberOfValues() != numvalues ) return 1; for(unsigned int i = 0; i < numvalues; ++i) if( fabs(ipp.GetValue(i) - newvalues[i]) > std::numeric_limits::epsilon() ) return 1; ipp.Print( std::cout ); std::cout << std::endl; de = ipp.GetAsDataElement(); std::cout << de << std::endl; { //const char v[] = "0.960000000000662 "; // not working const char v[] = "1.960000000000662 "; gdcm::DataElement invalid( gdcm::Tag(0x10,0x1030) ); // Patient's Weight invalid.SetVR( gdcm::VR::DS ); invalid.SetByteValue( v, (uint32_t)strlen(v) ); gdcm::Attribute<0x0010,0x1030> pw; pw.SetFromDataElement( invalid ); gdcm::DataElement valid = pw.GetAsDataElement(); std::ostringstream os; os << valid.GetValue(); std::string s = os.str(); size_t l = s.size(); if( l > 16 ) { return 1; } } return 0; } int TestAttributeDT() { return 0; } int TestAttributeFL() { return 0; } int TestAttributeFD() { return 0; } int TestAttributeIS() { // // This case is slightly more complex it is up to the user to say what is the VM: gdcm::Attribute<0x0018,0x1182, gdcm::VR::IS, gdcm::VM::VM1> fd1 = {0}; if( fd1.GetVM() != gdcm::VM::VM1 ) return 1; gdcm::Attribute<0x0018,0x1182, gdcm::VR::IS, gdcm::VM::VM2> fd2 = {{0,1}}; if( fd2.GetVM() != gdcm::VM::VM2 ) return 1; // this one should not be allowed, I need a special CTest macro... //gdcm::Attribute<0x0018,0x1182, gdcm::VR::IS, gdcm::VM::VM3> fd3 = {0,1}; //return 1; return 0; } int TestAttributeLO() { return 0; } int TestAttributeLT() { return 0; } int TestAttributeOB() { return 0; } int TestAttributeOD() { return 0; } int TestAttributeOF() { gdcm::DataSet ds; const float array[] = { 0, 1, 2, 3, 4 }; gdcm::Attribute<0x5600,0x0020, gdcm::VR::OF, gdcm::VM::VM1_n> at; at.SetValues( array, sizeof( array ) / sizeof( *array ) ); ds.Insert( at.GetAsDataElement() ); if( at.GetNumberOfValues() != 5 ) return 1; // Sup 132 // Tag : (0x0066,0x0016), VR : OF, VM : 1, Type : 1 gdcm::Attribute<0x0066,0x0016> at1; float value = 1.f; at1.SetValue( value ); ds.Insert( at1.GetAsDataElement() ); return 0; } int TestAttributeOL() { return 0; } int TestAttributeOW() { return 0; } int TestAttributePN() { return 0; } int TestAttributeSH() { return 0; } int TestAttributeSL() { return 0; } int TestAttributeSQ() { return 0; } int TestAttributeSS() { return 0; } int TestAttributeST() { return 0; } int TestAttributeTM() { return 0; } int TestAttributeUI() { return 0; } int TestAttributeUL() { return 0; } int TestAttributeUN() { return 0; } int TestAttributeUS() { return 0; } int TestAttributeUT() { return 0; } int TestAttribute1(int , char *[]) { int numerrors = 0; numerrors += TestAttributeAE(); numerrors += TestAttributeAS(); numerrors += TestAttributeAT(); //numerrors += TestAttributeCS(); numerrors += TestAttributeDA(); numerrors += TestAttributeDS(); numerrors += TestAttributeDT(); numerrors += TestAttributeFL(); numerrors += TestAttributeFD(); numerrors += TestAttributeIS(); numerrors += TestAttributeLO(); numerrors += TestAttributeLT(); numerrors += TestAttributeOB(); numerrors += TestAttributeOD(); numerrors += TestAttributeOF(); numerrors += TestAttributeOL(); numerrors += TestAttributeOW(); numerrors += TestAttributePN(); numerrors += TestAttributeSH(); numerrors += TestAttributeSL(); numerrors += TestAttributeSQ(); numerrors += TestAttributeSS(); numerrors += TestAttributeST(); numerrors += TestAttributeTM(); numerrors += TestAttributeUI(); numerrors += TestAttributeUL(); numerrors += TestAttributeUN(); numerrors += TestAttributeUS(); numerrors += TestAttributeUT(); return numerrors; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestPreamble.cxx000664 001766 001770 00000002312 14517730450 032502 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmPreamble.h" #include "gdcmFileMetaInformation.h" int TestPreamble(int, char *[]) { { gdcm::Preamble p; } gdcm::FileMetaInformation * m_pFileMetaInformation = new gdcm::FileMetaInformation(); gdcm::Preamble *p = new gdcm::Preamble(); m_pFileMetaInformation->SetPreamble( *p ); m_pFileMetaInformation->Clear(); delete m_pFileMetaInformation; m_pFileMetaInformation = nullptr ; delete p; return 0; } int TestPreambleCopyConstructor(int, char *[]) { gdcm::Preamble p; gdcm::Preamble p_2(p); return 0; } int TestPreambleAssignmentOperator(int, char* []) { gdcm::Preamble p; gdcm::Preamble p_2; p_2 = p; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestAttribute8.cxx000664 001766 001770 00000004207 14517730450 033013 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAttribute.h" #include "gdcmReader.h" #include "gdcmFileMetaInformation.h" #include "gdcmFile.h" #include "gdcmTesting.h" #include "gdcmMediaStorage.h" /* * Contributed by Michele Bosi on gdcm-dev ML */ int TestAttribute8Func(const char *filename, bool verbose = false) { if( verbose ) std::cout << "TestRead: " << filename << std::endl; gdcm::Reader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { std::cerr << "TestReadError: Failed to read: " << filename << std::endl; return 1; } //const gdcm::FileMetaInformation &h = reader.GetFile().GetHeader(); //h is unused //std::cout << h << std::endl; const gdcm::DataSet &ds = reader.GetFile().GetDataSet(); // gdcm::DataSet& ds = file.GetDataSet(); gdcm::Attribute<0x28,0x1050> win_center; const gdcm::DataElement& de = ds.GetDataElement( win_center.GetTag() ); if(!de.IsEmpty()) { win_center.SetFromDataElement( de ); std::cout << win_center.GetNumberOfValues() << ": "; for( unsigned int i = 0; i < win_center.GetNumberOfValues(); ++i) std::cout << win_center[i] << ","; } std::cout << std::endl; return 0; } int TestAttribute8(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestAttribute8Func(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestAttribute8Func( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestVL.cxx000664 001766 001770 00000001255 14517730450 031301 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmVL.h" int TestVL(int, char *[]) { gdcm::VL vl; if( vl != 0 ) { return 1; } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/CMakeLists.txt000664 001766 001770 00000006011 14517730450 032127 0ustar00mmalaterremmalaterre000000 000000 # Define the tests for Data Structure and Encoding Definitions # DSED set(DSED_TEST_SRCS TestAttribute.cxx TestCodeString.cxx TestAttribute1.cxx TestAttribute7.cxx #TestReadPatientName.cxx TestLO.cxx TestCSAElement.cxx #TestByteBuffer.cxx #TestByteValue.cxx TestPreamble.cxx TestReader.cxx #TestReader4.cxx # FIXME TestReaderUpToTag1.cxx TestReaderUpToTag2.cxx TestReaderSelectedTags.cxx TestReaderSelectedPrivateGroups.cxx TestReaderCanRead.cxx TestWriter.cxx TestWriter2.cxx TestCSAHeader.cxx TestByteSwapFilter.cxx TestBasicOffsetTable.cxx TestComposite.cxx TestDataElement.cxx TestDataSet.cxx #TestVRDS.cxx TestDS.cxx TestVRLT.cxx TestVRUI.cxx TestElement1.cxx #TestExplicitDataElement.cxx TestFile.cxx TestFileSet.cxx TestFragment.cxx #TestImplicitDataElement.cxx TestItem.cxx #TestParser.cxx TestSequenceOfFragments.cxx TestSequenceOfItems.cxx TestTag.cxx TestPrivateTag.cxx TestTransferSyntax.cxx TestMediaStorage.cxx TestVL.cxx TestVM.cxx TestVR.cxx #TestValue.cxx #TestTorture.cxx TestElement2.cxx TestElement4.cxx TestElement5.cxx TestElement6.cxx ) if(GDCM_TESTING_USE_LC_NUMERIC) # The test expect to be able to set fr as locale only turn if user # set the appropriate & hidden cmake variable set(DSED_TEST_SRCS ${DSED_TEST_SRCS} TestLCNumeric.cxx ) endif() if(GDCM_DATA_ROOT) set(DSED_TEST_SRCS ${DSED_TEST_SRCS} TestFileMetaInformation.cxx TestReader2.cxx TestAttribute8.cxx TestPDBHeader.cxx TestSequenceOfItems2.cxx TestSequenceOfItems3.cxx ) endif() if(GDCM_DATA_EXTRA_ROOT) set(DSED_TEST_SRCS ${DSED_TEST_SRCS} TestInvalidDICOMFiles.cxx ) endif() CHECK_INCLUDE_FILE("sys/mman.h" GDCM_HAVE_SYS_MMAN_H) # Need mmap if(GDCM_HAVE_SYS_MMAN_H) set(DSED_TEST_SRCS ${DSED_TEST_SRCS} TestReader3.cxx ) endif() option(SHARED_PTR "shared_ptr" OFF) mark_as_advanced(SHARED_PTR) if(SHARED_PTR) set(DSED_TEST_SRCS ${DSED_TEST_SRCS} TestCopyValue.cxx ) endif() # Add the include paths include_directories( "${GDCM_BINARY_DIR}/Source/Common" "${GDCM_SOURCE_DIR}/Source/Common" "${GDCM_SOURCE_DIR}/Source/DataDictionary" "${GDCM_SOURCE_DIR}/Source/DataStructureAndEncodingDefinition" "${GDCM_BINARY_DIR}/Utilities/zlib" "${GDCM_SOURCE_DIR}/Utilities" ) create_test_sourcelist(DSEDTests gdcmDSEDTests.cxx ${DSED_TEST_SRCS} EXTRA_INCLUDE gdcmTestDriver.h ) add_executable(gdcmDSEDTests ${DSEDTests}) target_link_libraries(gdcmDSEDTests gdcmDSED) if(CMAKE_COMPILER_IS_GNUCXX AND MINGW) set_target_properties( gdcmDSEDTests PROPERTIES LINK_FLAGS "-Wl,--allow-multiple-definition") endif() # Loop over files and create executables foreach(name ${DSED_TEST_SRCS}) get_filename_component(testname ${name} NAME_WE) add_test(NAME ${testname} COMMAND gdcmDSEDTests ${testname}) endforeach() # FIXME #add_executable(TestAttribute2 TestAttribute2.cxx) #add_executable(TestAttribute3 TestAttribute3.cxx) #add_executable(TestAttribute4 TestAttribute4.cxx) #add_executable(TestAttribute5 TestAttribute5.cxx) gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestBasicOffsetTable.cxx000664 001766 001770 00000001255 14517730450 034120 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmBasicOffsetTable.h" int TestBasicOffsetTable(int, char *[]) { gdcm::BasicOffsetTable bot; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestTorture.cxx000664 001766 001770 00000002747 14517730450 032433 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmFileMetaInformation.h" #include "gdcmDataImages.h" int TestTortureRead(const char* filename) { // TODO unsigned long copy = rand()*original_size; std::copy(new_file, filename); gdcm::Reader reader; reader.SetFileName( new_file ); if ( !reader.Read() ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } std::cerr << "Success to read: " << filename << std::endl; const gdcm::FileMetaInformation &h = reader.GetHeader(); std::cout << h << std::endl; const gdcm::DataSet &ds = reader.GetDataSet(); std::cout << ds << std::endl; return 0; } int TestTorture(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestRead(filename); } // else int r = 0, i = 0; const char *filename; while( (filename = gdcmDataImages[i]) ) { r += TestRead( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestReaderUpToTag1.cxx000664 001766 001770 00000006441 14517730450 033511 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmFileMetaInformation.h" #include "gdcmFile.h" #include "gdcmTesting.h" #include "gdcmMediaStorage.h" #include "gdcmSystem.h" #include "gdcmDirectory.h" static int TestReadUpToTag(const char* filename, bool verbose = false) { if( verbose ) std::cout << "TestRead: " << filename << std::endl; std::ifstream is( filename, std::ios::binary ); gdcm::Reader reader; reader.SetStream( is ); // Let's read up to Pixel Data el... gdcm::Tag pixeldata (0x7fe0,0x0010); std::set skiptags; // ... but do not read it (to skip mem allocation) skiptags.insert( pixeldata ); if ( !reader.ReadUpToTag( pixeldata, skiptags) ) { if( verbose ) std::cerr << "TestReadError: Failed to read: " << filename << std::endl; return 1; } is.clear(); std::streamoff outStreamOffset = is.tellg(); #if 0 const gdcm::FileMetaInformation &h = reader.GetFile().GetHeader(); const gdcm::DataSet &ds = reader.GetFile().GetDataSet(); std::cout << ds << std::endl; #endif if(verbose) std::cout << "{ \"" << filename << "\"," << outStreamOffset << " }," << std::endl; std::streamoff refoffset = gdcm::Testing::GetStreamOffsetFromFile(filename); if( refoffset != outStreamOffset && (refoffset || verbose) ) { std::cerr << filename << ": " << outStreamOffset << " should be " << refoffset << std::endl; return 1; } is.close(); return 0; } static int TestReadUpToTagExtra() { const char *extradataroot = gdcm::Testing::GetDataExtraRoot(); if( !extradataroot ) { return 1; } if( !gdcm::System::FileIsDirectory(extradataroot) ) { std::cerr << "No such directory: " << extradataroot << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( extradataroot, true ); // no recursion std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::Directory::FilenamesType const & fns = d.GetFilenames(); int r = 0; for( gdcm::Directory::FilenamesType::const_iterator it = fns.begin(); it != fns.end(); ++it ) { const char *filename = it->c_str(); r += TestReadUpToTag( filename ); } return r; } int TestReaderUpToTag1(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestReadUpToTag(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestReadUpToTag( filename ); ++i; } // puposely discard gdcmDataExtra test, this is just an 'extra' test... int b2 = TestReadUpToTagExtra(); (void)b2; return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestReadPatientName.cxx000664 001766 001770 00000001601 14517730450 033754 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcm.h" int TestReadPatientName(int argc, char *argv[]) { (void)argc; gdcm::Parser p; std::string filename = argv[1]; p.SetFileName( filename ); gdcm::Tag t(0x0010, 0x0010); const char *v = p.Request( t ); gdcm::Attributes pn( v ); std::cout << pn << std::endl; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestFileSet.cxx000664 001766 001770 00000001451 14517730450 032311 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileSet.h" #include "gdcmFile.h" int TestFileSet(int argc, char *argv[]) { (void)argc; (void)argv; gdcm::FileSet fs; std::string f1; std::string f2; fs.AddFile( f1.c_str() ); fs.AddFile( f2.c_str() ); return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestReader3.cxx000664 001766 001770 00000014053 14517730450 032245 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* * OS Specific: need a POSIX system with mmap functionality */ #include #include #include #include // strstr // fstat #include #include #include /* close */ // open #include // mmap #include #include "gdcmFile.h" #include "gdcmDataSet.h" #include "gdcmFileMetaInformation.h" #include "gdcmSmartPointer.h" #include "gdcmReader.h" #include "gdcmWriter.h" #include "gdcmSystem.h" #include "gdcmTesting.h" #include "gdcmAttribute.h" #if 0 class membuf: public std::streambuf { public: membuf(const char* filename) :std::streambuf() { hFile = CreateFileA( filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL); hFileMappingObject = CreateFileMapping( hFile, NULL, PAGE_READONLY, 0, 0, NULL); beg = MapViewOfFile(hFileMappingObject, FILE_MAP_READ, 0, 0, 0); char* e = (char*)beg; e += GetFileSize( hFile, NULL ); setg((char*)beg,(char*)beg,e); setp(&outBuf,&outBuf); } /// Close the memory mapping and the opened /// file. ~membuf() { UnmapViewOfFile(beg); CloseHandle( hFileMappingObject ); CloseHandle( hFile ); } private: /// We can't copy this. membuf(const membuf&); membuf& operator=(const membuf&); /// Outbuf buffer that is not used since we /// don't write to the memory map. char outBuf; HANDLE hFile,hFileMappingObject; /// Pointer to the beginning of the mapped /// memory area. LPVOID beg; }; #endif /* * http://beej.us/guide/bgipc/output/html/multipage/mmap.html * http://www.dba-oracle.com/oracle_tips_mount_options.htm */ class membuf : public std::streambuf { public: membuf(char* mem, size_t length) { setg(mem, mem, mem + length); setp(mem, mem + length); } std::streampos seekpos(std::streampos pos, std::ios_base::openmode) override { char *p = eback() + pos; if(p>=eback() && p <=egptr()) { setg(eback(),p,egptr()); return pos; } else return -1; } std::streampos seekoff(std::streamoff off, std::ios_base::seekdir dir, std::ios_base::openmode) override { char *p; switch(dir) { case std::ios_base::beg: p = eback() + off; break; case std::ios_base::cur: p = gptr() + off; break; case std::ios_base::end: p = egptr() + off; break; default: p = nullptr; break; } if(p>=eback() && p <= egptr()) { setg(eback(),p,egptr()); return {p-egptr()}; } else return -1; } }; std::istream & DoTheMMapRead(std::istream &is) { gdcm::Reader reader; reader.SetStream(is); reader.Read(); //gdcm::Dumper printer; //printer.SetFile ( reader.GetFile() ); //printer.Print( std::cout ); return is; } int TestRead3(const char *subdir, const char * filename) { /// FIXME Because GDCM is seeging back and forth in the DICOM file // we cannot just apply mmap on any file, so let's clean them first: // gdcm::Reader r; r.SetFileName( filename ); if( !r.Read() ) { return 1; } // // Create directory first: const char * tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir ) ) { gdcm::System::MakeDirectory( tmpdir ); //return 1; } const char * outfilename = gdcm::Testing::GetTempFilename( filename, subdir ); // HACK: gdcm::DataSet &ds = r.GetFile().GetDataSet(); gdcm::Attribute<0x0008,0x0018> at; if( !ds.FindDataElement( at.GetTag() ) || ds.GetDataElement( at.GetTag() ).IsEmpty() ) { const gdcm::UIComp dummyuid = "1.2.3.4.5.6.7.8.9.0"; at.SetValue( dummyuid ); ds.Replace( at.GetAsDataElement() ); } gdcm::Writer w; w.SetFile( r.GetFile() ); w.SetFileName( outfilename ); if( !w.Write() ) { return 1; } const char *path = outfilename; bool readonly = true; int flags = (readonly ? O_RDONLY : O_RDWR); int handle = ::open(path, flags, S_IRWXU); struct stat info; const bool success = ::fstat(handle, &info) != -1; if( !success ) return 1; off_t size = info.st_size; off_t offset = 0; char* hint = nullptr; void* data = ::mmap( hint, size, readonly ? PROT_READ : (PROT_READ | PROT_WRITE), readonly ? MAP_PRIVATE : MAP_SHARED, handle, offset ); if (data == MAP_FAILED) { return 1; } char *chardata = reinterpret_cast(data); membuf mb( chardata, size ); std::istream is(&mb) ; DoTheMMapRead(is); // cleanup assert( handle ); bool error = false; error = ::munmap(data, size) != 0 || error; error = ::close(handle) != 0 || error; handle = 0; if ( error ) return 1; return 0; } int TestReader3(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestRead3(argv[0], filename); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { if( strstr(filename, "IllegalGroup2ImplicitTS.dcm" ) == nullptr ) r += TestRead3( argv[0], filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestVRUI.cxx000664 001766 001770 00000001575 14517730450 031552 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmVR.h" #include #include #include using gdcm::UIComp; int TestVRUI(int, char *[]) { UIComp ui = "1.2.3.4"; std::cout << ui << "/" << ui.size() << std::endl; if( ui.size() % 2 ) { return 1; } if( ui[ ui.size() - 1] != 0 ) { return 1; } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestFile.cxx000664 001766 001770 00000001470 14517730450 031636 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFile.h" #include "gdcmSmartPointer.h" int TestFile(int argc, char *argv[]) { (void)argc; (void)argv; gdcm::File f; gdcm::SmartPointer pf = new gdcm::File; { gdcm::SmartPointer other = pf; } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestByteBuffer.cxx000664 001766 001770 00000002431 14517730450 033012 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmByteBuffer.h" #include int TestByteBuffer(int, char *[]) { const int size = 128; gdcm::ByteBuffer b; char buffer[size]; int r = 0; for(int i=-size; i<0; ++i) { buffer[i+size] = (char)(i); } memcpy(b.Get(size), buffer, size); const char *start = b.GetStart(); for(int i=size; i>0; --i) { if( (int)start[size-i] != -i ) { std::cout << (int)start[size-i] << " " << -i << std::endl; ++r; } } for(int i=0; i(&group); ss.write(str, sizeof(group)); str = reinterpret_cast(&element); ss.write(str, sizeof(element)); str = vr; ss.write(str, 2); ss.write("\0\0", 2); str = reinterpret_cast(&vl); ss.write(str, sizeof(vl)); gdcm::ExplicitDataElement de; if( !de.Read(ss) ) { std::cerr << de << std::endl; return 1; } if( de.GetTag().GetGroup() != group || de.GetTag().GetElement() != element || de.GetVL() != vl ) { std::cerr << de << std::endl; return 1; } std::cout << de << std::endl; return 0; } int TestExplicitDataElement2(const uint16_t group, const uint16_t element, const char *vr, const char *value) { const char *str; const uint32_t vl = strlen(value); std::stringstream ss; str = reinterpret_cast(&group); ss.write(str, sizeof(group)); str = reinterpret_cast(&element); ss.write(str, sizeof(element)); str = vr; ss.write(str, 2); ss.write("\0\0", 2); str = reinterpret_cast(&vl); ss.write(str, sizeof(vl)); str = value; ss.write(str, vl); gdcm::ExplicitDataElement de; if( !de.Read(ss) ) { std::cerr << de << std::endl; return 1; } if( de.GetTag().GetGroup() != group || de.GetTag().GetElement() != element || de.GetVL() != vl ) { std::cerr << de << std::endl; return 1; } std::cout << de << std::endl; return 0; } inline void WriteRead(gdcm::DataElement const &w, gdcm::DataElement &r) { // w will be written // r will be read back std::stringstream ss; w.Write(ss); r.Read(ss); } int TestExplicitDataElement(int, char *[]) { const uint16_t group = 0x0010; const uint16_t element = 0x0012; const char vr[] = "UN"; // UN => 4bytes vl const uint32_t vl = 0x0; // 4 bytes const char value[] = "GDCM"; int r = 0; r += TestExplicitDataElement1(group, element, vr, vl); r += TestExplicitDataElement2(group, element, vr, value); gdcm::ExplicitDataElement de1(gdcm::Tag(0x1234, 0x5678), 0x4321); gdcm::ExplicitDataElement de2(gdcm::Tag(0x1234, 0x6789), 0x9876); WriteRead(de1, de2); if( !(de1 == de2) ) { std::cerr << de1 << std::endl; std::cerr << de2 << std::endl; return 1; } return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestVR.cxx000664 001766 001770 00000017211 14517730450 031306 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmVR.h" #include static int TestEnumString(std::string const & rep, gdcm::VR::VRType vr) { const std::string & odstr = rep; gdcm::VR::VRType od = gdcm::VR::GetVRTypeFromFile(odstr.c_str()); if( od != vr ) return 1; const char *odcstr = gdcm::VR::GetVRStringFromFile(vr); if( odstr != odcstr ) return 1; od = gdcm::VR::GetVRType(odstr.c_str()); if( od != vr ) return 1; odcstr = gdcm::VR::GetVRString(vr); if( !gdcm::VR::IsValid(odstr.c_str())) return 1; return 0; } // Not used... int verify() { // avoid INVALID = 0 for(int i = 1; i < 27; ++i) { gdcm::VR t = (gdcm::VR::VRType)(1 << i); if( gdcm::VR::IsASCII( t ) != gdcm::VR::IsASCII2( t ) ) { std::cerr << t << std::endl; return 1; } //if( gdcm::VR::IsBinary( t ) != gdcm::VR::IsBinary2( t ) ) // { // std::cerr << t << std::endl; //// return 1; // } } return 0; } int TestValue() { int k = 0; gdcm::VR vr; vr = gdcm::VR::INVALID; // = 0, if( (int)vr != 0 ) return 1; vr = gdcm::VR::AE; // = 1, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::AS; // = 2, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::AT; // = 4, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::CS; // = 8, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::DA; // = 16, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::DS; // = 32, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::DT; // = 64, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::FD; // = 256, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::FL; // = 128, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::IS; // = 512, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::LO; // = 1024, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::LT; // = 2048, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::OB; // = 4096, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::OF; // = 8192, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::OW; // = 16384, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::PN; // = 32768, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::SH; // = 65536, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::SL; // = 131072, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::SQ; // = 262144, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::SS; // = 524288, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::ST; // = 1048576, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::TM; // = 2097152, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::UI; // = 4194304, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::UL; // = 8388608, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::UN; // = 16777216, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::US; // = 33554432, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::UT; // = 67108864, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::OD; // = 134217728, if( (int)vr != (1 << k++) ) return 1; vr = gdcm::VR::OL; // = 268435456, if( (int)vr != (1 << k++) ) return 1; return 0; } int TestVR(int, char *[]) { enum { V1 = 0ULL, V2 = 4294967295ULL } E4; std::cout << sizeof E4 << std::endl; enum { V3 = 0ULL, V4 = 4294967296ULL } E8; enum : long long { V5 = 0ULL, V6 = 4294967296ULL } E8ll; std::cout << sizeof E8 << std::endl; if( sizeof E4 != 4 ) { std::cerr << "E4 is: " << sizeof E4 << std::endl; return 1; } if( sizeof E8 != 8 ) { // bad bad compiler std::cerr << "E8 is: " << sizeof E8 << std::endl; } if( sizeof E8ll != 8 ) { std::cerr << "E8ll is: " << sizeof E8 << std::endl; return 1; } if( TestValue() ) return 1; gdcm::VR vr = gdcm::VR::INVALID; const char *inv = gdcm::VR::GetVRString(vr); std::cout << 0 << "," << inv << std::endl; int i; for(i=0; i<27; i++) { int j = 1 << i; //int k = gdcm::VR::GetIndex((gdcm::VR::VRType)j); std::cout << "2^" << i << "=" << (int)j << "," << gdcm::VR::GetVRString((gdcm::VR::VRType)j) << std::endl; } vr = gdcm::VR::OB_OW; //int k = gdcm::VR::GetIndex(vr); std::cout << i++ << "," << gdcm::VR::GetVRString(vr) << std::endl; vr = gdcm::VR::US_SS; //k = gdcm::VR::GetIndex(vr); std::cout << i++ << "," << gdcm::VR::GetVRString(vr) << std::endl; vr = gdcm::VR::US_SS_OW; //k = gdcm::VR::GetIndex(vr); std::cout << i++ << "," << gdcm::VR::GetVRString(vr) << std::endl; std::string s = "OB"; vr = gdcm::VR::GetVRType(s.c_str()); if( s != gdcm::VR::GetVRString(vr)) return 1; s = "UT"; vr = gdcm::VR::GetVRType(s.c_str()); if( s != gdcm::VR::GetVRString(vr)) return 1; std::string s2 = "OB or OW"; gdcm::VR ob_ow = gdcm::VR::OB_OW; vr = gdcm::VR::GetVRType(s2.c_str()); if( vr != ob_ow ) return 1; if( s2 != gdcm::VR::GetVRString(vr)) return 1; // Check that "OB" is in "OB or OW" s = "OB"; if( !gdcm::VR::IsValid(s.c_str(), vr) ) return 1; std::string s3 = "US or SS or OW"; vr = gdcm::VR::GetVRType(s3.c_str()); // Check that "OB" is not in "US or SS or OW" if( gdcm::VR::IsValid(s.c_str(), vr) ) return 1; s = "XX"; //invalid vr = gdcm::VR::GetVRType(s.c_str()); if( vr != gdcm::VR::VR_END ) return 1; const char *t = gdcm::VR::GetVRString(vr); if( t != nullptr ) return 1; s = "??"; //invalid vr = gdcm::VR::GetVRType(s.c_str()); if( vr != gdcm::VR::INVALID) return 1; // Test Partial Match s = "US or SS"; vr = gdcm::VR::GetVRType(s.c_str()); if( vr == gdcm::VR::US ) return 1; { vr = gdcm::VR::AE; if( vr & gdcm::VR::VRASCII ) { std::cout << vr << " is ASCII\n"; } else { return 1; } vr = gdcm::VR::UI; if( vr & gdcm::VR::VRASCII ) { std::cout << vr << " is ASCII\n"; } else { return 1; } vr = gdcm::VR::OB; if( vr & gdcm::VR::VRBINARY ) { std::cout << vr << " is Binary\n"; } else { return 1; } vr = gdcm::VR::UI; if( vr & (gdcm::VR::OB | gdcm::VR::OF | gdcm::VR::OW /*| gdcm::VR::SQ*/ | gdcm::VR::UN) ) { return 1; } } // Let's check the & operator { vr = gdcm::VR::OB; if( !( vr.Compatible( gdcm::VR::OB_OW ) ) ) { return 1; } // if( !( vr.Compatible( gdcm::VR::INVALID) ) ) // { // return 1; // } } // Make sure VR::UT is the last valid VR that can be found in a file: //if( gdcm::VR::OB_OW <= gdcm::VR::UT ) return 1; //else if( gdcm::VR::US_SS <= gdcm::VR::UT ) return 1; //else if( gdcm::VR::US_SS_OW <= gdcm::VR::UT ) return 1; //else if( gdcm::VR::VL32 <= gdcm::VR::UT ) return 1; if( TestEnumString("OD", gdcm::VR::OD ) == 1 ) return 1; if( TestEnumString("OL", gdcm::VR::OL ) == 1 ) return 1; if( TestEnumString("UC", gdcm::VR::UC ) == 1 ) return 1; if( TestEnumString("UR", gdcm::VR::UR ) == 1 ) return 1; if( TestEnumString("OV", gdcm::VR::OV ) == 1 ) return 1; if( TestEnumString("SV", gdcm::VR::SV ) == 1 ) return 1; if( TestEnumString("UV", gdcm::VR::UV ) == 1 ) return 1; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestItem.cxx000664 001766 001770 00000003605 14517730450 031657 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmItem.h" //#include "gdcmStringStream.h" #include "gdcmVR.h" #include "gdcmExplicitDataElement.h" #include "gdcmSwapper.h" void CreateDataElement(gdcm::ExplicitDataElement &de, int offset) { std::stringstream ss; gdcm::Tag tag(0x1234, (uint16_t)(0x5678+offset)); gdcm::VR vr = gdcm::VR::UN; const char str[] = "GDCM"; uint32_t len = (uint32_t)strlen(str); assert( sizeof(uint32_t) == 4 ); gdcm::ByteValue val(str, len); tag.Write(ss); vr.Write(ss); const char *slen = reinterpret_cast(&len); ss.write( slen, 4); val.Write(ss); #ifdef GDCM_WORDS_BIGENDIAN de.Read( ss ); #else de.Read( ss ); #endif std::cout << de << std::endl; } int TestItem(int , char *[]) { gdcm::Item item; std::cout << item << std::endl; gdcm::Item it1; gdcm::Item it2; gdcm::DataSet ds; gdcm::ExplicitDataElement xde; CreateDataElement(xde,0); ds.Insert( xde ); CreateDataElement(xde,1); ds.Insert( xde ); CreateDataElement(xde,2); ds.Insert( xde ); CreateDataElement(xde,3); ds.Insert( xde ); std::cout << ds << std::endl; // undefined by default: gdcm::Item it3; gdcm::VL vl = it3.GetVL(); if( !vl.IsUndefined() ) { return 1; } if( !it3.IsUndefinedLength() ) { return 1; } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestElement2.cxx000664 001766 001770 00000002771 14517730450 032437 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmElement.h" #include "gdcmVR.h" struct dummy { unsigned short I[3]; }; // // template struct TagToElement; template<> struct TagToElement<0x0018,0x1624> { using Type = gdcm::Element; }; int TestElement2(int, char *[]) { gdcm::Element ref = {{0,1,2}}; ref.Print(std::cout); //dummy d = {{0,1,2}};//commenting out TagToElement<0x0018,0x1624>::Type t = {{1,2,3}}; t.Print( std::cout ); std::cout << std::endl; gdcm::Element ref2; // = {{1}}; ref2.SetLength(2); ref2.SetValue(1); ref2.Print(std::cout); std::cout << std::endl; gdcm::Element ref3; // = {{1}}; ref3.SetLength(4); ref3.SetValue(1,0); ref3.SetValue(2,1); ref3.Print(std::cout); std::cout << std::endl; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestLCNumeric.cxx000664 001766 001770 00000003735 14517730450 032606 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAttribute.h" #include /* setenv */ #include int TestLCNumeric(int , char *[]) { //setenv("LC_NUMERIC", "fr_FR", 1); //const char ss[] = "LC_NUMERIC=fr_FR"; //setlocale(LC_NUMERIC,"C"); // Seems to only affect the local sscanf char *l = setlocale(LC_NUMERIC,"fr_FR.UTF-8"); if( !l ) { std::cerr << "Could not set LC_NUMERIC" << std::endl; return 1; } float a = 1. / 3; printf("Float: %f\n", a ); // The following affect all ostringstream try { //std::locale b = std::locale( "fr_FR" ); std::locale::global( std::locale( "fr_FR.UTF-8" ) ) ; //char *copy = strdup(ss); //putenv(copy); //free(copy); std::ostringstream os; os.imbue(std::locale::classic()); double d = 1.2; os << d; std::string s = os.str(); std::cout << "s:" << s << std::endl; std::string::size_type pos_comma = s.find( "," ); if( pos_comma != std::string::npos ) { std::cerr << "We found the comma symbol" << std::endl; return 1; } std::string::size_type pos_dot = s.find( "." ); if( pos_dot == std::string::npos ) { std::cerr << "We did not found the dot symbol" << std::endl; return 1; } } catch(std::exception &ex) { // ok something went wrong when setting up fr_FR locale. // just ignore for now std::cerr << "What: " << ex.what() << std::endl; } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestSequenceOfItems2.cxx000664 001766 001770 00000005035 14517730450 034101 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSequenceOfItems.h" #include "gdcmReader.h" #include "gdcmTesting.h" #include "gdcmPrivateTag.h" int TestSequenceOfItems2(int, char *[]) { const char *dataroot = gdcm::Testing::GetDataRoot(); // gdcmData/AMIInvalidPrivateDefinedLengthSQasUN.dcm std::string filename = dataroot; filename += "/AMIInvalidPrivateDefinedLengthSQasUN.dcm"; gdcm::Reader reader; reader.SetFileName( filename.c_str() ); if( !reader.Read() ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } gdcm::PrivateTag pt(0x0009,0x10,"GEIIS"); const gdcm::DataSet& ds = reader.GetFile().GetDataSet(); if( !ds.FindDataElement( pt ) ) { return 1; } const gdcm::DataElement &de = ds.GetDataElement( pt ); if( de.IsEmpty() ) return 1; std::cout << de << std::endl; gdcm::SmartPointer sqi = de.GetValueAsSQ(); if( !sqi ) return 1; //std::cout << *sqi << std::endl; //sqi->Print( std::cout ); gdcm::SequenceOfItems::SizeType n = sqi->GetNumberOfItems(); if( n != 1 ) return 1; const gdcm::Item & item = sqi->GetItem( 1 ); const gdcm::DataSet &subds = item.GetNestedDataSet(); // std::cout << subds << std::endl; gdcm::Tag ticonpixeldata(0x7fe0,0x0010); //const gdcm::DataElement &iconpixeldata = subds.GetDataElement( ticonpixeldata ); // const gdcm::ByteValue *bv = iconpixeldata.GetByteValue();//unused unless that lower #def is set to true // I could test that gdcm::JPEGCodec::GetHeaderInfo return JPEG file: // JPEG image data, JFIF standard 1.01 gdcm::PrivateTag tgeiiscompressiontype(0x7fd1,0x10,"GEIIS"); const gdcm::DataElement &geiiscompressiontype = subds.GetDataElement( tgeiiscompressiontype ); gdcm::Element el; el.SetFromDataElement( geiiscompressiontype ); unsigned int v = el.GetValue(); if( v != 26 ) return 1; #if 0 std::ofstream of( "/tmp/o.jpg", std::ios::binary ); of.write( bv->GetPointer(), bv->GetLength() ); of.close(); #endif return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestWriter.cxx000664 001766 001770 00000010237 14517730450 032234 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmWriter.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmTesting.h" //bool IsImpossibleToRewrite(const char *filename) //{ // const char *impossible; // int i = 0; // while( (impossible= gdcmBlackListWriterDataImages[i]) ) // { // if( strcmp( impossible, filename ) == 0 ) // { // return true; // } // ++i; // } // return false; //} namespace gdcm { int TestWrite(const char *subdir, const char* filename, bool recursing, bool verbose = false) { Reader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } // Create directory first: std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = Testing::GetTempFilename( filename, subdir ); Writer writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); writer.SetCheckFileMetaInformation( false ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } // Ok we have now two files let's compare their md5 sum: char digest[33], outdigest[33]; Testing::ComputeFileMD5(filename, digest); Testing::ComputeFileMD5(outfilename.c_str(), outdigest); if( strcmp(digest, outdigest) != 0 ) { if (recursing) return 1; // too bad the file is not identical, so let's be paranoid and // try to reread-rewrite this just-written file: // TODO: Copy file System::CopyFile( ); std::string subsubdir = subdir; subsubdir += "/"; subsubdir += subdir; if( TestWrite(subsubdir.c_str(), outfilename.c_str(), true ) ) { std::cerr << filename << " and " << outfilename << " are different\n"; return 1; } const char * ref = Testing::GetMD5FromBrokenFile(filename); if( ref ) { if( strcmp(ref, outdigest) == 0 ) { // ok this situation was already analyzed and the written file is // readable by dcmtk and such //size_t size1 = System::FileSize( filename ); //size_t size2 = System::FileSize( outfilename.c_str() ); //assert( size1 == size2 ); // cannot deal with implicit VR meta data header return 0; } std::cerr << "incompatible ref: " << ref << " vs " << outdigest << " for file: " << filename << " & " << outfilename << std::endl; return 1; // ref exist but does not match, how is that possible ? } //if( !ref ) // { // return 1; // } // In theory I need to compare the two documents to check they // are identical... TODO std::cerr << filename << " and " << outfilename << " are different, output can be read though. Need manual intervention\n"; return 1; } else { size_t size1 = System::FileSize( filename ); size_t size2 = System::FileSize( outfilename.c_str() ); if( size1 != size2 ) return 1; if(verbose) std::cerr << filename << " and " << outfilename << " are identical\n"; return 0; } } } int TestWriter(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestWrite(argv[0], filename, false, true); } // else int r = 0, i = 0; gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestWrite(argv[0], filename, false ); ++i; } return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestReaderSelectedTags.cxx000664 001766 001770 00000010303 14517730450 034444 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmFileMetaInformation.h" #include "gdcmFile.h" #include "gdcmTesting.h" #include "gdcmMediaStorage.h" #include "gdcmSystem.h" #include "gdcmDirectory.h" #include "gdcmFilename.h" int TestReadSelectedTags(const char* filename, bool verbose = false) { if( verbose ) std::cout << "TestRead: " << filename << std::endl; std::ifstream is( filename, std::ios::binary ); gdcm::Reader reader; reader.SetStream( is ); // Let's read up to Pixel Data Group Length el... gdcm::Tag pixeldatagl (0x7fe0,0x0000); std::set selectedtags; selectedtags.insert ( pixeldatagl ); if ( !reader.ReadSelectedTags( selectedtags ) ) { if( verbose ) std::cerr << "TestReadSelectedTags : Failed to read: " << filename << std::endl; return 1; } std::streamoff outStreamOffset = is.tellg(); if(verbose) std::cout << "{ \"" << filename << "\"," << outStreamOffset << " }," << std::endl; std::streamoff refoffset = gdcm::Testing::GetSelectedTagsOffsetFromFile(filename); if( refoffset != outStreamOffset ) { if( verbose || refoffset ) // when stored std::cerr << filename << ": " << outStreamOffset << " should be " << refoffset << std::endl; return 1; } size_t filesize = gdcm::System::FileSize(filename); assert( (size_t)refoffset <= filesize ); std::streamoff refoffset2 = gdcm::Testing::GetStreamOffsetFromFile(filename); (void)refoffset2; const gdcm::File & file = reader.GetFile(); //const gdcm::DataSet & ds = file.GetDataSet(); //const bool isfound = ds.FindDataElement( pixeldatagl ); const gdcm::FileMetaInformation & fmi = file.GetHeader(); const gdcm::TransferSyntax & ts = fmi.GetDataSetTransferSyntax(); gdcm::Filename fn( filename ); const char *name = fn.GetName(); // Special handling: bool checkconsist = true; if( strcmp(name, "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0 ) { checkconsist = false; } if( (size_t)refoffset != filesize ) { if( checkconsist ) { if( ts.GetNegociatedType() == gdcm::TransferSyntax::Explicit ) { assert( refoffset + 12 == refoffset2 ); } else { assert( refoffset + 8 == refoffset2 ); } } } is.close(); return 0; } int TestReadSelectedTagsExtra() { const char *extradataroot = gdcm::Testing::GetDataExtraRoot(); if( !extradataroot ) { return 1; } if( !gdcm::System::FileIsDirectory(extradataroot) ) { std::cerr << "No such directory: " << extradataroot << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( extradataroot, true ); // no recursion std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::Directory::FilenamesType const & fns = d.GetFilenames(); int r = 0; for( gdcm::Directory::FilenamesType::const_iterator it = fns.begin(); it != fns.end(); ++it ) { const char *filename = it->c_str(); r += TestReadSelectedTags( filename ); } return r; } int TestReaderSelectedTags(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestReadSelectedTags(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestReadSelectedTags( filename ); //r += TestReadSelectedTags( filename , true); ++i; } // puposely discard gdcmDataExtra test, this is just an 'extra' test... int b2 = TestReadSelectedTagsExtra(); (void)b2; return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestVM.cxx000664 001766 001770 00000013546 14517730450 031310 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmVM.h" #include // strcmp int TestVM(int, char *[]) { //gdcm::VM::VMType vm = gdcm::LengthToVM<1>::TVM; const char str1[] = " 1\\2"; const size_t count1 = gdcm::VM::GetNumberOfElementsFromArray(str1, (unsigned int)strlen(str1) ); if( count1 != 2 ) return 1; const char str2[] = " 1\\2\\3"; const size_t count2 = gdcm::VM::GetNumberOfElementsFromArray(str2, (unsigned int)strlen(str2) ); if( count2 != 3 ) return 1; const char str3[] = " 1"; const size_t count3 = gdcm::VM::GetNumberOfElementsFromArray(str3, (unsigned int)strlen(str3) ); if( count3 != 1 ) return 1; const char str4[] = ""; const size_t count4 = gdcm::VM::GetNumberOfElementsFromArray(str4, (unsigned int)strlen(str4) ); if( count4 != 0 ) return 1; const char *str5 = nullptr; const size_t count5 = gdcm::VM::GetNumberOfElementsFromArray(str5, 0); if( count5 != 0 ) return 1; const char str6[] = " 1"; const size_t count6 = gdcm::VM::GetNumberOfElementsFromArray(str6, (unsigned int)strlen(str6) ); if( count6 != 1 ) return 1; const char str7[] = " 1 \\ 2 "; const size_t count7 = gdcm::VM::GetNumberOfElementsFromArray(str7, (unsigned int)strlen(str7) ); if( count7 != 2 ) return 1; const char str8[] = " "; const size_t count8 = gdcm::VM::GetNumberOfElementsFromArray(str8, (unsigned int)strlen(str8) ); if( count8 != 0 ) { std::cerr << "count8 failed" << std::endl; return 1; } const char str9[] = " \\ "; const size_t count9 = gdcm::VM::GetNumberOfElementsFromArray(str9, (unsigned int)strlen(str9) ); if( count9 != 0 ) return 1; const char str10[] = " 3 \\ "; const size_t count10 = gdcm::VM::GetNumberOfElementsFromArray(str10, (unsigned int)strlen(str10) ); if( count10 != 1 ) return 1; // store invalid combinations inside an int array to trick the compiler // and avoid unreachable return code warning static const int error_combinations[] = { gdcm::VM::VM1 & gdcm::VM::VM2, gdcm::VM::VM1 & gdcm::VM::VM2, gdcm::VM::VM1 & gdcm::VM::VM3, gdcm::VM::VM1 & gdcm::VM::VM32, !(gdcm::VM::VM1 & gdcm::VM::VM1_2), !(gdcm::VM::VM2 & gdcm::VM::VM1_2), !(gdcm::VM::VM1 & gdcm::VM::VM1_3), !(gdcm::VM::VM2 & gdcm::VM::VM1_3), !(gdcm::VM::VM3 & gdcm::VM::VM1_3), !(gdcm::VM::VM1 & gdcm::VM::VM1_n), gdcm::VM::VM1 & gdcm::VM::VM2_n, !(gdcm::VM::VM2 & gdcm::VM::VM2_n), gdcm::VM::VM1 & gdcm::VM::VM3_4, !(gdcm::VM::VM3 & gdcm::VM::VM3_4), !(gdcm::VM::VM4 & gdcm::VM::VM3_4), gdcm::VM::VM1 & gdcm::VM::VM3_3n, !(gdcm::VM::VM3 & gdcm::VM::VM3_3n), !(gdcm::VM::VM9 & gdcm::VM::VM3_3n), !(gdcm::VM::VM99 & gdcm::VM::VM3_3n), gdcm::VM::VM1 & gdcm::VM::VM4_4n, !(gdcm::VM::VM4 & gdcm::VM::VM4_4n), }; static const int nerror_combinations = sizeof( error_combinations ) / sizeof( *error_combinations ); for( int i = 0; i < nerror_combinations; ++i ) { if( error_combinations[i] ) return 1; } const char *vm1 = gdcm::VM::GetVMString( gdcm::VM::VM1 ); if( strcmp(vm1, "1" ) != 0 ) { std::cerr << "Error:" << vm1 << std::endl; return 1; } const char *vm8 = gdcm::VM::GetVMString( gdcm::VM::VM8 ); if( strcmp(vm8, "8" ) != 0 ) { std::cerr << "Error:" << vm8 << std::endl; return 1; } gdcm::VM vm = gdcm::VM::VM0; std::cout << vm << std::endl; vm = gdcm::VM::VM1; std::cout << vm << std::endl; vm = gdcm::VM::VM2; std::cout << vm << std::endl; vm = gdcm::VM::VM3; std::cout << vm << std::endl; vm = gdcm::VM::VM4; std::cout << vm << std::endl; vm = gdcm::VM::VM5; std::cout << vm << std::endl; vm = gdcm::VM::VM6; std::cout << vm << std::endl; vm = gdcm::VM::VM8; std::cout << vm << std::endl; vm = gdcm::VM::VM9; std::cout << vm << std::endl; vm = gdcm::VM::VM10; std::cout << vm << std::endl; vm = gdcm::VM::VM12; std::cout << vm << std::endl; vm = gdcm::VM::VM16; std::cout << vm << std::endl; vm = gdcm::VM::VM18; std::cout << vm << std::endl; vm = gdcm::VM::VM24; std::cout << vm << std::endl; vm = gdcm::VM::VM28; std::cout << vm << std::endl; vm = gdcm::VM::VM32; std::cout << vm << std::endl; vm = gdcm::VM::VM35; std::cout << vm << std::endl; vm = gdcm::VM::VM99; std::cout << vm << std::endl; vm = gdcm::VM::VM256; std::cout << vm << std::endl; vm = gdcm::VM::VM1_2; std::cout << vm << std::endl; vm = gdcm::VM::VM1_3; std::cout << vm << std::endl; vm = gdcm::VM::VM1_4; std::cout << vm << std::endl; vm = gdcm::VM::VM1_5; std::cout << vm << std::endl; vm = gdcm::VM::VM1_8; std::cout << vm << std::endl; vm = gdcm::VM::VM1_32; std::cout << vm << std::endl; vm = gdcm::VM::VM1_99; std::cout << vm << std::endl; vm = gdcm::VM::VM1_n; std::cout << vm << std::endl; vm = gdcm::VM::VM2_2n; std::cout << vm << std::endl; vm = gdcm::VM::VM2_n; std::cout << vm << std::endl; vm = gdcm::VM::VM3_4; std::cout << vm << std::endl; vm = gdcm::VM::VM3_3n; std::cout << vm << std::endl; vm = gdcm::VM::VM3_n; std::cout << vm << std::endl; vm = gdcm::VM::VM4_4n; std::cout << vm << std::endl; vm = gdcm::VM::VM7_7n; std::cout << vm << std::endl; //vm = gdcm::VM::VM_END; //std::cout << vm << std::endl; { gdcm::VM vm1_ = gdcm::VM::VM8; gdcm::VM vm2_ = gdcm::VM::VM1_n; if ( !vm2_.Compatible( vm1_ ) ) { return 1; } } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestAttribute.xsl000664 001766 001770 00000004641 14517730450 032731 0ustar00mmalaterremmalaterre000000 000000 // GENERATED FILE DO NOT EDIT // $ xsltproc TestAttribute.xsl DICOMV3.xml > TestAttribute.cxx /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAttribute.h" int TestAttribute(int, char *[]) { gdcm::Attribute<0x ,0x > ; (void) ; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestReader4.cxx000664 001766 001770 00000002776 14517730450 032257 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmTesting.h" // Reproduce issue #3538586 int TestReader4(int , char *[]) { const char subdir[] = "TestReader4"; std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { gdcm::System::MakeDirectory( tmpdir.c_str() ); } std::string outfilename = tmpdir; outfilename += "/"; outfilename += "fake.jpg"; const unsigned char jpeg[] = { 0xFF,0xD8,0xFF,0xE0,0x00,0x10,0x4A,0x46 }; std::ofstream out( outfilename.c_str() ); out.write( (char*)jpeg, sizeof( jpeg ) ); out.close(); const char *filename = outfilename.c_str(); gdcm::Reader reader; reader.SetFileName( filename ); if ( reader.Read() ) { std::cerr << "Success to read zip file !: " << filename << std::endl; return 1; } if ( reader.Read() ) { std::cerr << "Success to read zip file !: " << filename << std::endl; return 1; } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestAttribute3.cxx000664 001766 001770 00000004460 14517730450 033007 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAttribute.h" int main(int argc, char *argv[]) { gdcm::Attribute<0x0008,0x0000> a = { 38 }; a.Print( std::cout << std::endl ); gdcm::Attribute<0x0018,0x106c> b = { 123, 456 }; b.Print( std::cout << std::endl ); gdcm::Attribute<0x0018,0x1624> c = { 123, 456, 789 }; c.Print( std::cout << std::endl ); gdcm::Attribute<0x0072,0x0108> d = { 1.2, 3.4, 5.6, 7.8 }; d.Print( std::cout << std::endl ); gdcm::Attribute<0x3002,0x0010> e = { 1.2, 3.4, 5.6, 7.8, 9.0, 10. }; e.Print( std::cout << std::endl ); gdcm::Attribute<0x0018,0x1149, gdcm::VR::IS, gdcm::VM::VM2> f = { 12 , 13 }; f.Print( std::cout << std::endl ); gdcm::Attribute<0x0018,0x1149, gdcm::VR::IS, gdcm::VM::VM1> g = { 12 }; g.Print( std::cout << std::endl ); // grrrr.... too dangerous for users gdcm::Attribute<0x0018,0x1149, gdcm::VR::IS, gdcm::VM::VM1 > h = { 12 }; h.Print( std::cout << std::endl ); typedef gdcm::Attribute<0x3002,0x0010>::ArrayType type; const type &val = e.GetValue(2); std::cout << std::endl << "val=" << val; e.SetValue( 123.456, 2 ); std::cout << std::endl << "val=" << val; // gdcm::Attribute<0x3002,0x0010>::VMType == 6, let's check that: const type my[ gdcm::Attribute<0x3002,0x0010>::VMType ] = { 1.2 }; e.SetValues( my ); e.Print( std::cout << std::endl ); // TODO: // gdcm::Attribute<0x0002,0x0001> i = { '0', '1' }; // i.Print( std::cout << std::endl ); gdcm::Attribute<0x0002, 0x0002> m1 = { "1.2.840.10008.5.1.4.1.1.2" }; m1.Print( std::cout << std::endl ); gdcm::Attribute<0x0008, 0x0016> m2 = { "1.2.840.10008.5.1.4.1.1.3" }; m2.Print( std::cout << std::endl ); m1.SetValues( m2.GetValues() ); // copy all the 64+1 char m1.Print( std::cout << std::endl ); std::cout << std::endl; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestDS.cxx000664 001766 001770 00000053061 14517730450 031270 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmVR.h" #include "gdcmAttribute.h" #include "gdcmByteValue.h" #include #include #include #include // atof #include // std::rand() #include // min_exponent10 and max_exponent10 // WARNING: The number of digits in exponent can be dependent from compiler. // gcc uses 2 digits if the exponent is < 100 and 3 digits if >=, but // some compilers (i.e. MSVC) may always use 3 digits in exponent. // If some other compiler with this behaviour is detected, should be // added here. #if defined(_MSC_VER) #define ALWAYS_3_DIGITS_IN_EXPONENT #endif #ifdef ALWAYS_3_DIGITS_IN_EXPONENT #define MIN_NEGATIVE_EXP 6 //MSVC always use 3 digits in exponent. #else #define MIN_NEGATIVE_EXP 5 #endif template < typename Float > std::string to_string ( Float data ) { std::stringstream in; // in.imbue(std::locale::classic()); // This is not required AFAIK unsigned long digits = 0; // 16 integer digits number or 15 integer digits negative number if ( (data >= 1e+15 && data < 1e16) || (data <= -1e14 && data > -1e+15)) in << std::fixed; else { digits = 15; // 16 - 1 (dot) // negative number if (data < 0) digits -= 1; // (minus) if (data != 0) { Float ldata = log10(fabs(data)); // numbers that need std::scientific representation if ( ldata > 16 || (ldata > 15 && data < 0) || ldata < -MIN_NEGATIVE_EXP+1 ) { in << std::scientific; #ifdef ALWAYS_3_DIGITS_IN_EXPONENT digits -= 6; // (first digit + exponent) #else digits -= 5; // (first digit + exponent) // 3 digits in exponent if ( ldata >= 100 || ldata < -99 ) digits -=1; #endif } else if( ldata < 0){ //since ldata is negative, to have the test pass, //the right casting has to be done to avoid a casting warning here unsigned long uldata = (unsigned long)(fabs(ldata)+1.0); digits -= uldata; // (zeros before first significant digit) } } } /* // I don't know if you really need this check unsigned long const max_digits = static_cast< unsigned long >( - std::log( std::numeric_limits::epsilon() ) / std::log( 10.0 ) ); digits = (digits > max_digits) ? max_digits : digits; */ if ( in << std::dec << std::setprecision((int)digits) << data ) return in.str(); else throw "Impossible Conversion"; // should not happen ... } static bool checkerror(double d, std::string s) { double theConverted = atof(s.c_str()); double error = fabs(d - theConverted); int Log = (int)log10(fabs(d)); int eo = ( Log - 14 ); if ( Log <= -1 && Log >= -4 ) eo = -13; #ifdef ALWAYS_3_DIGITS_IN_EXPONENT else if ( Log >= 15 ) eo = ( Log - 9); #else else if ( Log >= 99 ) eo = ( Log - 9 ); else if ( Log >= 15 ) eo = ( Log - 10); #endif if (d<0) eo += 1; //if (error > pow(10., eo) ) //pow will underflow at 10^-308, so errors lower than -308 will appear to be //larger than pow(10., eo), because the 'pow' result will be 0 in vs2010 if (log10(error) > eo) { std::cout << "ERROR: Absolute Error is too large (error = " << error << ", should be < " << pow(10., eo) << ")" << std::endl; return true; } // else if (error != 0.0) std::cout << "OK (error = " << error << ", is < " << pow(10, eo) << ")" << std::endl; return false; } static bool checkerror(double d, std::string s, bool se) { double error = fabs(d - atof( s.c_str() )); bool has_error = (error != 0); if (has_error) { std::cout << "\tError is: " << error; } std::cout << std::endl; if( has_error != se ) { std::cout << "ERROR: has_error = " << has_error << " (should be " << se << ")" << std::endl; return true; } return checkerror(d,s); } /* d = double to test sz = size expected se = true if there should be an error */ static bool singleTestDS(double d, int sz, bool se = false) { bool fail = false; std::cout << " -|----------------|-" << std::endl; std::string s = to_string( d ); std::cout << " Result: " << s << std::flush; if ( checkerror(d, s, se) ) fail = true; assert(sz >= 0); if( s.size() != (unsigned int)sz ) { std::cout << "ERROR: Size = " << s.size() << " (should be " << sz << ")" << std::endl; fail = true; } std::cout << std::endl; return fail; } #define TEST(x, y, z) { \ std::cout << " Testing: " << #x << std::endl; \ err_count += singleTestDS(x, y, z); \ test_count++; } \ GDCM_NOOP_STATEMENT /* * Test to make sure that double precision ieee 'double' is ok for DICOM VR = 'DS' */ int TestDS(int, char *[]) { int err_count = 0; int test_count = 0; TEST( 118.242525316066 , 16, false); // 3 digits + dot + 12 digits => 16 chars TEST( -118.242525316066 , 16, true); // minus + 3 digits + dot + 12 digits => 16 chars + ERROR TEST( 118.24252531606 , 15, false); // minus + 3 digits + dot + 11 digits => 16 chars TEST( -118.24252531606 , 16, false); // minus + 3 digits + dot + 11 digits => 16 chars TEST( 0.059303515816892 , 16, true); // zero + dot + zero + 14 digits => 16 chars + ERROR TEST( -0.059303515816892 , 16, true); // minus + zero + dot + zero + 14 digits => 16 chars + ERROR TEST( 0.05930351581689 , 16, false); // zero + dot + zero + 13 digits => 16 chars TEST( -0.05930351581689 , 16, true); // minus + zero + dot + zero + 13 digits => 16 chars + ERROR TEST( 0.0593035158168 , 15, false); // zero + dot + zero + 12 digits => 15 chars TEST( -0.0593035158168 , 16, false); // minus + zero + dot + zero + 12 digits => 16 chars TEST( 0.00149700609543456 , 16, true); // zero + dot + 2 zeros + 15 digits => 16 chars + ERROR TEST( -0.00149700609543456 , 16, true); // zero + dot + 2 zeros + 15 digits => 16 chars + ERROR TEST( 0.0014970060954345 , 16, true); // zero + dot + 2 zeros + 14 digits => 16 chars + ERROR TEST( -0.0014970060954345 , 16, true); // zero + dot + 2 zeros + 14 digits => 16 chars + ERROR TEST( 0.001497006095434 , 16, true); // zero + dot + 2 zeros + 13 digits => 16 chars + ERROR TEST( -0.001497006095434 , 16, true); // zero + dot + 2 zeros + 13 digits => 16 chars + ERROR TEST( 0.00149700609543 , 16, false); // zero + dot + 2 zeros + 12 digits => 16 chars TEST( -0.00149700609543 , 16, true); // zero + dot + 2 zeros + 12 digits => 16 chars + ERROR TEST( 0.0014970060954 , 15, false); // zero + dot + 2 zeros + 11 digits => 15 chars TEST( -0.0014970060954 , 16, false); // zero + dot + 2 zeros + 11 digits => 16 chars TEST( 0.000593035158168 , 16, true); // zero + dot + 3 zeros + 12 digits => 16 chars + ERROR TEST( 5.93035158168e-04 , 16, true); // same number: cannot fit in 16 chars even in scientific notation (17 chars) TEST( 0.00059303515816 , 16, false); // zero + dot + 3 zeros + 11 digits => 16 chars TEST( -0.00059303515816 , 16, true); // minus + zero + dot + 3 zeros + 11 digits => 16 chars + ERROR TEST( -5.9303515816e-04 , 16, true); // same number: cannot fit in 16 chars even in scientific notation (17 chars) TEST( -0.0005930351581 , 16, false); // minus + zero + dot + 3 zeros + 10 digits => 16 chars TEST( 0.0000593035158168 , 16, true); // zero + dot + 4 zeros + 12 digits => 16 chars (w/ scientific notation) + ERROR TEST( 0.00005930351581 , 16, false); // zero + dot + 4 zeros + 10 digits => 16 chars TEST( -0.000059303515816 , 16, true); // minus + zero + dot + 4 zeros + 10 digits => 16 chars (w/ scientific notation) + ERROR TEST( -0.0000593035158 , 16, false); // minus + zero + dot + 4 zeros + 10 digits => 16 chars #ifdef ALWAYS_3_DIGITS_IN_EXPONENT TEST( 0.000059303515816 , 16, true); // zero + dot + 4 zeros + 11 digits => 16 chars (w/ scientific notation) + ERROR TEST( -0.00005930351581 , 16, true); // minus + zero + dot + 4 zeros + 10 digits => 16 chars (w/ scientific notation) + ERROR #else TEST( 0.000059303515816 , 16, false); // zero + dot + 4 zeros + 11 digits => 16 chars (w/ scientific notation) TEST( -0.00005930351581 , 16, false); // minus + zero + dot + 4 zeros + 10 digits => 16 chars (w/ scientific notation) #endif TEST( 123456789012.1 , 14, false); // 12 digits + dot + 1 digit => 14 chars TEST( -123456789012.1 , 15, false); // minus + 12 digits + dot + 1 digit => 14 chars TEST( 1234567890123.1 , 15, false); // 13 digits + dot + 1 digit => 15 chars TEST( -1234567890123.1 , 16, false); // minus + 13 digits + dot + 1 digit => 15 chars TEST( 1234567890123.12 , 16, false); // 13 digits + dot + 2 digit => 16 chars TEST( -1234567890123.12 , 16, true); // minus + 13 digits + dot + 2 digit => 16 chars + ERROR TEST( 1234567890123.123 , 16, true); // 13 digits + dot + 3 digit => 16 chars + ERROR TEST( -1234567890123.123 , 16, true); // minus + 13 digits + dot + 3 digit => 16 chars + ERROR // TEST( 12345678901234 , 14, false); // 14 digits => 14 chars TEST( 12345678901234. , 14, false); // same number TEST( 12345678901234.0 , 14, false); // same number TEST( 1.2345678901234e+13 , 14, false); // same number // TEST( -12345678901234 , 15, false); // minus + 14 digits => 15 chars TEST( -12345678901234. , 15, false); // same number TEST( -12345678901234.0 , 15, false); // same number TEST( -1.2345678901234e+13 , 15, false); // same number TEST( 12345678901234.1 , 16, false); // 14 digits + dot + 1 digit => 16 chars TEST( -12345678901234.1 , 15, true); // minus + 14 digits + dot + 1 digit => 15 chars + ERROR TEST( 12345678901234.12 , 16, true); // 14 digits + dot + 2 digit => 16 chars + ERROR TEST( -12345678901234.12 , 15, true); // minus + 15 digits + dot + 1 digit => 15 chars + ERROR // TEST( 123456789012345 , 15, false); // 15 digit => 15 chars TEST( 123456789012345. , 15, false); // same number TEST( 123456789012345.0 , 15, false); // same number TEST( 1.23456789012345e+14 , 15, false); // same number // TEST( -123456789012345 , 16, false); // minus + 15 digit => 16 chars TEST( -123456789012345. , 16, false); // same number TEST( -123456789012345.0 , 16, false); // same number TEST( -1.23456789012345e+14 , 16, false); // same number TEST( 123456789012345.1 , 15, true); // 15 digits + dot + 1 digit => 15 chars + ERROR TEST( -123456789012345.1 , 16, true); // minus + 15 digits + dot + 1 digit => 16 chars + ERROR // TEST( 1234567890123456 , 16, false); // 16 digits => 16 chars TEST( 1234567890123456. , 16, false); // same number TEST( 1234567890123456.0 , 16, false); // same number TEST( 1.234567890123456e+15 , 16, false); // same number // TEST( -1234567890123456 , 16, true); // minus + 6 digits => 16 chars TEST( -1234567890123456. , 16, true); // same number TEST( -1234567890123456.0 , 16, true); // same number TEST( -1.234567890123456e+15 , 16, true); // same number TEST( 1234567890123456.2 , 16, true); // 16 digits + dot + 1 digit => 16 chars + ERROR TEST( -1234567890123456.2 , 16, true); // minus + 16 digits + dot + 1 digit => 16 chars + ERROR // TEST( 12345678901234567 , 16, true); // 17 digits => 16 chars (w/ scientific notation) + ERROR TEST( 12345678901234567. , 16, true); // same number TEST( 1.2345678901234567e+16 , 16, true); // same number // TEST( -12345678901234567 , 16, true); // minus + 17 digits => 16 chars (w/ scientific notation) + ERROR TEST( -12345678901234567. , 16, true); // same number TEST(-1.2345678901234567e+16 , 16, true); // same number // TEST( 123456789012345678 , 16, true); // 18 digits => 16 chars (w/ scientific notation) + ERROR TEST( 123456789012345678. , 16, true); // same number TEST(1.23456789012345678e+17 , 16, true); // same number // TEST(-123456789012345678 , 16, true); // minus + 18 digits => 16 chars (w/ scientific notation) + ERROR TEST(-123456789012345678. , 16, true); // same number TEST(-1.23456789012345678e+17 , 16, true); // same number // TEST( 1234567890123456789 , 16, true); // 19 digits => 16 chars (w/ scientific notation) + ERROR TEST( 1234567890123456789. , 16, true); // same number TEST(1.234567890123456789e+18 , 16, true); // same number // TEST(-1234567890123456789 , 16, true); // minus + 19 digits => 16 chars (w/ scientific notation) + ERROR TEST(-1234567890123456789. , 16, true); // same number TEST(-1.234567890123456789e+18 , 16, true); // same number TEST(1.2345678901234567891e+19 , 16, true); TEST(-1.2345678901234567891e+19 , 16, true); TEST(1.23456789012345678901e+20 , 16, true); TEST(-1.23456789012345678901e+20 , 16, true); TEST(1.23456789012345678901e+99 , 16, true); TEST(-1.23456789012345678901e+99 , 16, true); TEST(1.23456789012345678901e+100 , 16, true); TEST(-1.23456789012345678901e+100 , 16, true); TEST( 100000000000000. , 15, false); // 15 digits => 15 chars TEST( -100000000000000. , 16, false); // minus + 15 digits => 15 chars TEST( 999999999999999. , 15, false); // 15 digits => 15 chars TEST( -999999999999999. , 16, false); // minus + 15 digits => 15 chars TEST( 1000000000000000. , 16, false); // 16 chars TEST( 1e+15 , 16, false); // same number TEST( 9999999999999998. , 16, false); // 16 chars TEST( -9999999999999998. , 16, true); // minus + 16 chars TEST( -9999999990099999. , 16, true); TEST( -10000000000000000. , 16, false); // minus + 17 chars => 16 digits (w/ scientific notation) #ifdef ALWAYS_3_DIGITS_IN_EXPONENT TEST( 10000000000000000. , 6, false); // 17 chars => 6 digits (w/ scientific notation) TEST( 1e16 , 6, false); TEST( -1000000000000000. , 7, false); // minus + 7 chars (w/ scientific notation) TEST( -1e+15 , 7, false); // same number #else TEST( 10000000000000000. , 5, false); // 17 chars => 5 digits (w/ scientific notation) TEST( 1e16 , 5, false); TEST( -1000000000000000. , 6, false); // minus + 7 chars (w/ scientific notation) TEST( -1e+15 , 6, false); // same number #endif TEST( -1e16 , 16, false); TEST( 1e17 , 16, false); TEST( -1e17 , 16, false); TEST( 1e18 , 16, false); TEST( -1e18 , 16, false); TEST( 1e19 , 16, false); TEST( -1e19 , 16, false); TEST( 1e20 , 16, false); TEST( -1e20 , 16, false); //TEST( 0 , 1, false); // zero => 1 char (MM: cannot execute this test with ftrapv) TEST( 1 , 1, false); // 1 digit => 1 char TEST( 9.9999999999e-4 , 16, false); #ifdef ALWAYS_3_DIGITS_IN_EXPONENT TEST( 1e-5 , 6, false); #else TEST( 1e-5 , 16, false); #endif TEST( 5.1e-4 , 7, false); #ifdef ALWAYS_3_DIGITS_IN_EXPONENT TEST( 5.1e-5 , 8, false); #else TEST( 5.1e-5 , 16, false); #endif TEST( 5.1e-6 , 16, false); TEST( 5.1e-7 , 16, false); TEST( 5.1e-8 , 16, false); TEST( 5.1e-9 , 16, false); TEST( 5.1e-10 , 16, false); TEST( 5.1e-11 , 16, false); TEST( 1e+99 , 16, false); TEST( -1e+99 , 16, false); TEST( 1e+100 , 16, false); TEST( -1e+100 , 16, false); TEST( 3.4584e+100 , 16, false); TEST( -3.4584e+100 , 16, false); TEST( 3.4584e+101 , 16, false); TEST( -3.4584e+101 , 16, false); TEST( 1e-99 , 16, false); TEST( -1e-99 , 16, false); TEST( 1e-100 , 16, false); TEST( -1e-100 , 16, false); TEST( 3.4584e-100 , 16, false); TEST( -3.4584e-100 , 16, false); TEST( 3.4584e-101 , 16, false); TEST( -3.4584e-101 , 16, false); // Tests failing due to double precision if (1234567890123456.1 != 1234567890123456.) { TEST( 1234567890123456.1 , 16, true); } // 16 digits + dot + 1 digit => 16 chars + ERROR else { TEST( 1234567890123456.1 , 16, false); } // 16 digits + dot + 1 digit => 16 chars + NO ERROR if ( 9999999999999999. != 1e+16 ) { TEST( 9999999999999999. , 16, false); } // 16 chars => 16 digits else { TEST( 9999999999999999. , 5, false); } // 16 chars => 5 digits (w/ scientific notation) if ( -9999999998999999. != -9.999999999e+15 ) { TEST( -9999999998999999. , 16, true); } else { TEST( -9999999998999999. , 16, false); } std::cout << "---> Failed test(s): " << err_count << " of " << test_count << std::endl << std::endl; // ---- RANDOM TESTS: const unsigned int random_count = 100000; int random_err_count = 0; int min_exp = std::numeric_limits::min_exponent10; int max_exp = std::numeric_limits::max_exponent10; std::cout << "Running " << random_count << " random tests." << std::endl << std::endl; for (unsigned int i = 0; i(std::rand()) * pow(10., rand_exp); if (rand != rand) {i--; continue;} // nan if (rand == std::numeric_limits::infinity()) {i--; continue;} // inf std::string s = to_string( rand ); //std::cout << s; if (s.size() > 16 || !s.compare("inf") || !s.compare("nan") ) { // std::cout << "\t--- FAIL" << std::endl; random_err_count += 1; continue; } if ( checkerror(rand, s) ) random_err_count += 1; // else // std::cout << "\t--- OK" << std::endl; } std::cout << "---> Failed random test(s): " << random_err_count << " of " << random_count << std::endl << std::endl; return err_count + random_err_count; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestCSAHeader.cxx000664 001766 001770 00000001527 14517730450 032501 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmCSAHeader.h" int TestCSAHeader(int , char * []) { gdcm::CSAHeader h; /* try { const gdcm::CSAElement &foo = csa.GetCSAElementByName( "foo" ); } catch( gdcm::CSAElementNameException &ex ) { std::cout << ex.what() << std::endl; } */ return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestElement4.cxx000664 001766 001770 00000001421 14517730450 032430 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include struct A { float Internal; }; struct B { float Internal[1]; }; int TestElement4(int, char *[]) { std::cout << sizeof( A ) << std::endl; std::cout << sizeof( B ) << std::endl; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestPDBHeader.cxx000664 001766 001770 00000003263 14517730450 032477 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmPDBHeader.h" #include "gdcmTesting.h" #include "gdcmReader.h" int TestPDBHeader(int , char *[]) { const char *dataroot = gdcm::Testing::GetDataRoot(); // gdcmData/GE_MR_0025xx1bProtocolDataBlock.dcm std::string filename = dataroot; filename += "/GE_MR_0025xx1bProtocolDataBlock.dcm"; gdcm::Reader reader; reader.SetFileName( filename.c_str() ); if( !reader.Read() ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } gdcm::PDBHeader pdb; const gdcm::DataSet& ds = reader.GetFile().GetDataSet(); const gdcm::PrivateTag &t1 = pdb.GetPDBInfoTag(); bool found = false; int ret = 0; if( ds.FindDataElement( t1 ) ) { pdb.LoadFromDataElement( ds.GetDataElement( t1 ) ); pdb.Print( std::cout ); found = true; } if( !found ) { std::cerr << "no pdb tag found" << std::endl; ret = 1; } const gdcm::PDBElement &pe = pdb.GetPDBElementByName( "SEDESC" ); std::cout << pe << std::endl; if( pe.GetValue() != std::string("AX FSE T2") ) { std::cerr << "Value found: " << pe.GetValue() << std::endl; ret = 1; } return ret; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestVRLT.cxx000664 001766 001770 00000001551 14517730450 031546 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmVR.h" #include #include #include using gdcm::LTComp; int TestVRLT(int, char *[]) { LTComp lt = "hello"; std::cout << lt << std::endl; if( lt.size() % 2 ) { return 1; } if( lt[ lt.size() - 1] != ' ' ) { return 1; } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestElement1.cxx000664 001766 001770 00000011016 14517730450 032426 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmElement.h" #include "gdcmDataSet.h" #define TPI 3.1415926535897931 namespace gdcm { int TestFL() { Element a = {{ (float)TPI }}; a.Print( std::cout ); std::cout << std::endl; Element b = {{ 0,1,2,3,4,5,6,7 }}; b.Print( std::cout ); std::cout << std::endl; float f[10] = {}; Element c; c.SetArray( f, sizeof(f), false); c.Print( std::cout ); std::cout << std::endl; { DataElement de = c.GetAsDataElement(); Element el; el.Set( de.GetValue() ); //el.SetFromDataElement( de ); } // Make sure this is possible to output as DataElement // an Element, in case one cannot use gdcm::Attribute // Eg. Sup 145 are not available -yet- { DataSet ds; Element el; el.SetValue(1.2f); DataElement de = el.GetAsDataElement(); de.SetTag( Tag(0x0048,0x0201) ); ds.Insert( de ); } return 0; } int TestFD() { Element a = {{ TPI }}; std::ostringstream os; a.Print( os ); const std::string st = os.str(); // important const char *s = st.c_str(); std::cout << s << std::endl; //double t = *reinterpret_cast(*s); //std::cout << t << std::endl; Element b; double array[] = { 1,2,3,4,5,6,7,9 }; b = reinterpret_cast& >( array ); b.Print( std::cout ); std::cout << std::endl; return 0; } int TestAS() { Element a = { "019Y" }; a.Print( std::cout ); std::cout << std::endl; // TODO this should not compile: Element b = {{ "019Yb" }}; (void)b;//to avoid the warning of b not being useful return 0; } int TestUL() { const signed char array[4] = {-78, 1, 0, 0}; // 434 { Element a; // reinterpret_cast< const Element& > ( array ); memcpy((void*)&a, array, 4); a.Print( std::cout ); } std::cout << std::endl; return 0; } int TestAT() { // = (0020,5000) : (0010,0010)\(0010,0020)\(0020,0013) Element a; Tag list[3]; list[0] = Tag(0x0010,0x0010); list[1] = Tag(0x0010,0x0020); list[2] = Tag(0x0020,0x0013); memcpy(&a, list, sizeof(list)); a.Print( std::cout ); std::cout << std::endl; Element b; b.SetArray( list, sizeof(list), false); b.Print( std::cout ); std::cout << std::endl; return 0; } int TestOB() { const unsigned char array[] = { 0x00,0x00,0x00,0x01,0x42,0x12,0xf9,0x22,0x00,0x31,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x03,0xfe,0x02,0x71 }; // Bad no such thing as 1-n for OB/OW: Element a; a.SetArray( array, sizeof(array), false); // reinterpret_cast< const Element& > ( array ); //memcpy((void*)&a, array, sizeof(array)); a.Print( std::cout ); std::cout << std::endl; Element b; b.SetArray( array, sizeof(array), false); // reinterpret_cast< const Element& > ( array ); //memcpy((void*)&a, array, sizeof(array)); b.Print( std::cout ); std::cout << std::endl; return 0; } int TestUSVM3() { Element a = {{ 0x0001, 0x0002, 0x0003 }}; a.Print( std::cout ); std::cout << std::endl; unsigned short tmp = a.GetValue(0); if( tmp != 0x0001 ) { return 1; } tmp = a.GetValue(1); if( tmp != 0x0002 ) { return 1; } tmp = a.GetValue(2); if( tmp != 0x0003 ) { return 1; } std::stringstream ss; a.Write( ss ); Element b; b.Read( ss ); b.Print( std::cout ); tmp = b.GetValue(0); if( tmp != 0x0001 ) { return 1; } tmp = b.GetValue(1); if( tmp != 0x0002 ) { return 1; } tmp = b.GetValue(2); if( tmp != 0x0003 ) { return 1; } std::cout << std::endl; return 0; } } int TestElement1(int , char *[]) { int r = 0; r += gdcm::TestFL(); r += gdcm::TestFD(); r += gdcm::TestAS(); r += gdcm::TestUSVM3(); r += gdcm::TestUL(); r += gdcm::TestOB(); r += gdcm::TestAT(); return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestAttribute.cxx000664 001766 001770 00000471362 14517730450 032735 0ustar00mmalaterremmalaterre000000 000000 // GENERATED FILE DO NOT EDIT // $ xsltproc TestAttribute.xsl DICOMV3.xml > TestAttribute.cxx /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAttribute.h" int TestAttribute(int, char *[]) { gdcm::Attribute<0x0000,0x0000> a00000000; (void)a00000000; gdcm::Attribute<0x0000,0x0001> a00000001; (void)a00000001; gdcm::Attribute<0x0000,0x0002> a00000002; (void)a00000002; gdcm::Attribute<0x0000,0x0003> a00000003; (void)a00000003; gdcm::Attribute<0x0000,0x0010> a00000010; (void)a00000010; gdcm::Attribute<0x0000,0x0100> a00000100; (void)a00000100; gdcm::Attribute<0x0000,0x0110> a00000110; (void)a00000110; gdcm::Attribute<0x0000,0x0120> a00000120; (void)a00000120; gdcm::Attribute<0x0000,0x0200> a00000200; (void)a00000200; gdcm::Attribute<0x0000,0x0300> a00000300; (void)a00000300; gdcm::Attribute<0x0000,0x0400> a00000400; (void)a00000400; gdcm::Attribute<0x0000,0x0600> a00000600; (void)a00000600; gdcm::Attribute<0x0000,0x0700> a00000700; (void)a00000700; gdcm::Attribute<0x0000,0x0800> a00000800; (void)a00000800; gdcm::Attribute<0x0000,0x0850> a00000850; (void)a00000850; gdcm::Attribute<0x0000,0x0860> a00000860; (void)a00000860; gdcm::Attribute<0x0000,0x0900> a00000900; (void)a00000900; gdcm::Attribute<0x0000,0x0901> a00000901; (void)a00000901; gdcm::Attribute<0x0000,0x0902> a00000902; (void)a00000902; gdcm::Attribute<0x0000,0x0903> a00000903; (void)a00000903; gdcm::Attribute<0x0000,0x1000> a00001000; (void)a00001000; gdcm::Attribute<0x0000,0x1001> a00001001; (void)a00001001; gdcm::Attribute<0x0000,0x1002> a00001002; (void)a00001002; gdcm::Attribute<0x0000,0x1005> a00001005; (void)a00001005; gdcm::Attribute<0x0000,0x1008> a00001008; (void)a00001008; gdcm::Attribute<0x0000,0x1020> a00001020; (void)a00001020; gdcm::Attribute<0x0000,0x1021> a00001021; (void)a00001021; gdcm::Attribute<0x0000,0x1022> a00001022; (void)a00001022; gdcm::Attribute<0x0000,0x1023> a00001023; (void)a00001023; gdcm::Attribute<0x0000,0x1030> a00001030; (void)a00001030; gdcm::Attribute<0x0000,0x1031> a00001031; (void)a00001031; gdcm::Attribute<0x0000,0x4000> a00004000; (void)a00004000; gdcm::Attribute<0x0000,0x4010> a00004010; (void)a00004010; gdcm::Attribute<0x0000,0x5010> a00005010; (void)a00005010; gdcm::Attribute<0x0000,0x5020> a00005020; (void)a00005020; gdcm::Attribute<0x0000,0x5110> a00005110; (void)a00005110; gdcm::Attribute<0x0000,0x5120> a00005120; (void)a00005120; gdcm::Attribute<0x0000,0x5130> a00005130; (void)a00005130; gdcm::Attribute<0x0000,0x5140> a00005140; (void)a00005140; gdcm::Attribute<0x0000,0x5150> a00005150; (void)a00005150; gdcm::Attribute<0x0000,0x5160> a00005160; (void)a00005160; gdcm::Attribute<0x0000,0x5170> a00005170; (void)a00005170; gdcm::Attribute<0x0000,0x5180> a00005180; (void)a00005180; gdcm::Attribute<0x0000,0x5190> a00005190; (void)a00005190; gdcm::Attribute<0x0000,0x51a0> a000051a0; (void)a000051a0; gdcm::Attribute<0x0000,0x51b0> a000051b0; (void)a000051b0; gdcm::Attribute<0x0002,0x0000> a00020000; (void)a00020000; gdcm::Attribute<0x0002,0x0001> a00020001; (void)a00020001; gdcm::Attribute<0x0002,0x0002> a00020002; (void)a00020002; gdcm::Attribute<0x0002,0x0003> a00020003; (void)a00020003; gdcm::Attribute<0x0002,0x0010> a00020010; (void)a00020010; gdcm::Attribute<0x0002,0x0012> a00020012; (void)a00020012; gdcm::Attribute<0x0002,0x0013> a00020013; (void)a00020013; gdcm::Attribute<0x0002,0x0016> a00020016; (void)a00020016; gdcm::Attribute<0x0002,0x0100> a00020100; (void)a00020100; gdcm::Attribute<0x0002,0x0102> a00020102; (void)a00020102; gdcm::Attribute<0x0004,0x1130> a00041130; (void)a00041130; gdcm::Attribute<0x0004,0x1142> a00041142; (void)a00041142; gdcm::Attribute<0x0004,0x1200> a00041200; (void)a00041200; gdcm::Attribute<0x0004,0x1202> a00041202; (void)a00041202; gdcm::Attribute<0x0004,0x1212> a00041212; (void)a00041212; gdcm::Attribute<0x0004,0x1220> a00041220; (void)a00041220; gdcm::Attribute<0x0004,0x1400> a00041400; (void)a00041400; gdcm::Attribute<0x0004,0x1410> a00041410; (void)a00041410; gdcm::Attribute<0x0004,0x1420> a00041420; (void)a00041420; gdcm::Attribute<0x0004,0x1430> a00041430; (void)a00041430; gdcm::Attribute<0x0004,0x1432> a00041432; (void)a00041432; gdcm::Attribute<0x0004,0x1504> a00041504; (void)a00041504; gdcm::Attribute<0x0004,0x1510> a00041510; (void)a00041510; gdcm::Attribute<0x0004,0x1511> a00041511; (void)a00041511; gdcm::Attribute<0x0004,0x1512> a00041512; (void)a00041512; gdcm::Attribute<0x0004,0x151a> a0004151a; (void)a0004151a; gdcm::Attribute<0x0004,0x1600> a00041600; (void)a00041600; gdcm::Attribute<0x0008,0x0001> a00080001; (void)a00080001; gdcm::Attribute<0x0008,0x0005> a00080005; (void)a00080005; gdcm::Attribute<0x0008,0x0008> a00080008; (void)a00080008; gdcm::Attribute<0x0008,0x0010> a00080010; (void)a00080010; gdcm::Attribute<0x0008,0x0012> a00080012; (void)a00080012; gdcm::Attribute<0x0008,0x0013> a00080013; (void)a00080013; gdcm::Attribute<0x0008,0x0014> a00080014; (void)a00080014; gdcm::Attribute<0x0008,0x0016> a00080016; (void)a00080016; gdcm::Attribute<0x0008,0x0018> a00080018; (void)a00080018; gdcm::Attribute<0x0008,0x001a> a0008001a; (void)a0008001a; gdcm::Attribute<0x0008,0x001b> a0008001b; (void)a0008001b; gdcm::Attribute<0x0008,0x0020> a00080020; (void)a00080020; gdcm::Attribute<0x0008,0x0021> a00080021; (void)a00080021; gdcm::Attribute<0x0008,0x0022> a00080022; (void)a00080022; gdcm::Attribute<0x0008,0x0023> a00080023; (void)a00080023; gdcm::Attribute<0x0008,0x0024> a00080024; (void)a00080024; gdcm::Attribute<0x0008,0x0025> a00080025; (void)a00080025; gdcm::Attribute<0x0008,0x002a> a0008002a; (void)a0008002a; gdcm::Attribute<0x0008,0x0030> a00080030; (void)a00080030; gdcm::Attribute<0x0008,0x0031> a00080031; (void)a00080031; gdcm::Attribute<0x0008,0x0032> a00080032; (void)a00080032; gdcm::Attribute<0x0008,0x0033> a00080033; (void)a00080033; gdcm::Attribute<0x0008,0x0034> a00080034; (void)a00080034; gdcm::Attribute<0x0008,0x0035> a00080035; (void)a00080035; gdcm::Attribute<0x0008,0x0040> a00080040; (void)a00080040; gdcm::Attribute<0x0008,0x0041> a00080041; (void)a00080041; gdcm::Attribute<0x0008,0x0042> a00080042; (void)a00080042; gdcm::Attribute<0x0008,0x0050> a00080050; (void)a00080050; gdcm::Attribute<0x0008,0x0052> a00080052; (void)a00080052; gdcm::Attribute<0x0008,0x0054> a00080054; (void)a00080054; gdcm::Attribute<0x0008,0x0056> a00080056; (void)a00080056; gdcm::Attribute<0x0008,0x0058> a00080058; (void)a00080058; gdcm::Attribute<0x0008,0x0060> a00080060; (void)a00080060; gdcm::Attribute<0x0008,0x0061> a00080061; (void)a00080061; gdcm::Attribute<0x0008,0x0062> a00080062; (void)a00080062; gdcm::Attribute<0x0008,0x0064> a00080064; (void)a00080064; gdcm::Attribute<0x0008,0x0068> a00080068; (void)a00080068; gdcm::Attribute<0x0008,0x0070> a00080070; (void)a00080070; gdcm::Attribute<0x0008,0x0080> a00080080; (void)a00080080; gdcm::Attribute<0x0008,0x0081> a00080081; (void)a00080081; gdcm::Attribute<0x0008,0x0082> a00080082; (void)a00080082; gdcm::Attribute<0x0008,0x0090> a00080090; (void)a00080090; gdcm::Attribute<0x0008,0x0092> a00080092; (void)a00080092; gdcm::Attribute<0x0008,0x0094> a00080094; (void)a00080094; gdcm::Attribute<0x0008,0x0096> a00080096; (void)a00080096; gdcm::Attribute<0x0008,0x0100> a00080100; (void)a00080100; gdcm::Attribute<0x0008,0x0102> a00080102; (void)a00080102; gdcm::Attribute<0x0008,0x0103> a00080103; (void)a00080103; gdcm::Attribute<0x0008,0x0104> a00080104; (void)a00080104; gdcm::Attribute<0x0008,0x0105> a00080105; (void)a00080105; gdcm::Attribute<0x0008,0x0106> a00080106; (void)a00080106; gdcm::Attribute<0x0008,0x0107> a00080107; (void)a00080107; gdcm::Attribute<0x0008,0x010b> a0008010b; (void)a0008010b; gdcm::Attribute<0x0008,0x010c> a0008010c; (void)a0008010c; gdcm::Attribute<0x0008,0x010d> a0008010d; (void)a0008010d; gdcm::Attribute<0x0008,0x010f> a0008010f; (void)a0008010f; gdcm::Attribute<0x0008,0x0110> a00080110; (void)a00080110; gdcm::Attribute<0x0008,0x0112> a00080112; (void)a00080112; gdcm::Attribute<0x0008,0x0114> a00080114; (void)a00080114; gdcm::Attribute<0x0008,0x0115> a00080115; (void)a00080115; gdcm::Attribute<0x0008,0x0116> a00080116; (void)a00080116; gdcm::Attribute<0x0008,0x0201> a00080201; (void)a00080201; gdcm::Attribute<0x0008,0x1000> a00081000; (void)a00081000; gdcm::Attribute<0x0008,0x1010> a00081010; (void)a00081010; gdcm::Attribute<0x0008,0x1030> a00081030; (void)a00081030; gdcm::Attribute<0x0008,0x1032> a00081032; (void)a00081032; gdcm::Attribute<0x0008,0x103e> a0008103e; (void)a0008103e; gdcm::Attribute<0x0008,0x1040> a00081040; (void)a00081040; gdcm::Attribute<0x0008,0x1048> a00081048; (void)a00081048; gdcm::Attribute<0x0008,0x1049> a00081049; (void)a00081049; gdcm::Attribute<0x0008,0x1050> a00081050; (void)a00081050; gdcm::Attribute<0x0008,0x1052> a00081052; (void)a00081052; gdcm::Attribute<0x0008,0x1060> a00081060; (void)a00081060; gdcm::Attribute<0x0008,0x1062> a00081062; (void)a00081062; gdcm::Attribute<0x0008,0x1070> a00081070; (void)a00081070; gdcm::Attribute<0x0008,0x1072> a00081072; (void)a00081072; gdcm::Attribute<0x0008,0x1080> a00081080; (void)a00081080; gdcm::Attribute<0x0008,0x1084> a00081084; (void)a00081084; gdcm::Attribute<0x0008,0x1090> a00081090; (void)a00081090; gdcm::Attribute<0x0008,0x1100> a00081100; (void)a00081100; gdcm::Attribute<0x0008,0x1110> a00081110; (void)a00081110; gdcm::Attribute<0x0008,0x1111> a00081111; (void)a00081111; gdcm::Attribute<0x0008,0x1115> a00081115; (void)a00081115; gdcm::Attribute<0x0008,0x1120> a00081120; (void)a00081120; gdcm::Attribute<0x0008,0x1125> a00081125; (void)a00081125; gdcm::Attribute<0x0008,0x1130> a00081130; (void)a00081130; gdcm::Attribute<0x0008,0x113a> a0008113a; (void)a0008113a; gdcm::Attribute<0x0008,0x1140> a00081140; (void)a00081140; gdcm::Attribute<0x0008,0x1145> a00081145; (void)a00081145; gdcm::Attribute<0x0008,0x114a> a0008114a; (void)a0008114a; gdcm::Attribute<0x0008,0x114b> a0008114b; (void)a0008114b; gdcm::Attribute<0x0008,0x1150> a00081150; (void)a00081150; gdcm::Attribute<0x0008,0x1155> a00081155; (void)a00081155; gdcm::Attribute<0x0008,0x115a> a0008115a; (void)a0008115a; gdcm::Attribute<0x0008,0x1160> a00081160; (void)a00081160; gdcm::Attribute<0x0008,0x1195> a00081195; (void)a00081195; gdcm::Attribute<0x0008,0x1197> a00081197; (void)a00081197; gdcm::Attribute<0x0008,0x1198> a00081198; (void)a00081198; gdcm::Attribute<0x0008,0x1199> a00081199; (void)a00081199; gdcm::Attribute<0x0008,0x1200> a00081200; (void)a00081200; gdcm::Attribute<0x0008,0x1250> a00081250; (void)a00081250; gdcm::Attribute<0x0008,0x2110> a00082110; (void)a00082110; gdcm::Attribute<0x0008,0x2111> a00082111; (void)a00082111; gdcm::Attribute<0x0008,0x2112> a00082112; (void)a00082112; gdcm::Attribute<0x0008,0x2120> a00082120; (void)a00082120; gdcm::Attribute<0x0008,0x2122> a00082122; (void)a00082122; gdcm::Attribute<0x0008,0x2124> a00082124; (void)a00082124; gdcm::Attribute<0x0008,0x2127> a00082127; (void)a00082127; gdcm::Attribute<0x0008,0x2128> a00082128; (void)a00082128; gdcm::Attribute<0x0008,0x2129> a00082129; (void)a00082129; gdcm::Attribute<0x0008,0x212a> a0008212a; (void)a0008212a; gdcm::Attribute<0x0008,0x2130> a00082130; (void)a00082130; gdcm::Attribute<0x0008,0x2132> a00082132; (void)a00082132; gdcm::Attribute<0x0008,0x2142> a00082142; (void)a00082142; gdcm::Attribute<0x0008,0x2143> a00082143; (void)a00082143; gdcm::Attribute<0x0008,0x2144> a00082144; (void)a00082144; gdcm::Attribute<0x0008,0x2200> a00082200; (void)a00082200; gdcm::Attribute<0x0008,0x2204> a00082204; (void)a00082204; gdcm::Attribute<0x0008,0x2208> a00082208; (void)a00082208; gdcm::Attribute<0x0008,0x2218> a00082218; (void)a00082218; gdcm::Attribute<0x0008,0x2220> a00082220; (void)a00082220; gdcm::Attribute<0x0008,0x2228> a00082228; (void)a00082228; gdcm::Attribute<0x0008,0x2229> a00082229; (void)a00082229; gdcm::Attribute<0x0008,0x2230> a00082230; (void)a00082230; gdcm::Attribute<0x0008,0x2240> a00082240; (void)a00082240; gdcm::Attribute<0x0008,0x2242> a00082242; (void)a00082242; gdcm::Attribute<0x0008,0x2244> a00082244; (void)a00082244; gdcm::Attribute<0x0008,0x2246> a00082246; (void)a00082246; gdcm::Attribute<0x0008,0x2251> a00082251; (void)a00082251; gdcm::Attribute<0x0008,0x2253> a00082253; (void)a00082253; gdcm::Attribute<0x0008,0x2255> a00082255; (void)a00082255; gdcm::Attribute<0x0008,0x2256> a00082256; (void)a00082256; gdcm::Attribute<0x0008,0x2257> a00082257; (void)a00082257; gdcm::Attribute<0x0008,0x2258> a00082258; (void)a00082258; gdcm::Attribute<0x0008,0x2259> a00082259; (void)a00082259; gdcm::Attribute<0x0008,0x225a> a0008225a; (void)a0008225a; gdcm::Attribute<0x0008,0x225c> a0008225c; (void)a0008225c; gdcm::Attribute<0x0008,0x3001> a00083001; (void)a00083001; gdcm::Attribute<0x0008,0x3010> a00083010; (void)a00083010; gdcm::Attribute<0x0008,0x4000> a00084000; (void)a00084000; gdcm::Attribute<0x0008,0x9007> a00089007; (void)a00089007; gdcm::Attribute<0x0008,0x9092> a00089092; (void)a00089092; gdcm::Attribute<0x0008,0x9121> a00089121; (void)a00089121; gdcm::Attribute<0x0008,0x9123> a00089123; (void)a00089123; gdcm::Attribute<0x0008,0x9124> a00089124; (void)a00089124; gdcm::Attribute<0x0008,0x9154> a00089154; (void)a00089154; gdcm::Attribute<0x0008,0x9205> a00089205; (void)a00089205; gdcm::Attribute<0x0008,0x9206> a00089206; (void)a00089206; gdcm::Attribute<0x0008,0x9207> a00089207; (void)a00089207; gdcm::Attribute<0x0008,0x9208> a00089208; (void)a00089208; gdcm::Attribute<0x0008,0x9209> a00089209; (void)a00089209; gdcm::Attribute<0x0008,0x9215> a00089215; (void)a00089215; gdcm::Attribute<0x0008,0x9237> a00089237; (void)a00089237; gdcm::Attribute<0x0008,0x9410> a00089410; (void)a00089410; gdcm::Attribute<0x0008,0x9458> a00089458; (void)a00089458; gdcm::Attribute<0x0008,0x9459> a00089459; (void)a00089459; gdcm::Attribute<0x0008,0x9460> a00089460; (void)a00089460; gdcm::Attribute<0x0010,0x0010> a00100010; (void)a00100010; gdcm::Attribute<0x0010,0x0020> a00100020; (void)a00100020; gdcm::Attribute<0x0010,0x0021> a00100021; (void)a00100021; gdcm::Attribute<0x0010,0x0022> a00100022; (void)a00100022; gdcm::Attribute<0x0010,0x0030> a00100030; (void)a00100030; gdcm::Attribute<0x0010,0x0032> a00100032; (void)a00100032; gdcm::Attribute<0x0010,0x0040> a00100040; (void)a00100040; gdcm::Attribute<0x0010,0x0050> a00100050; (void)a00100050; gdcm::Attribute<0x0010,0x0101> a00100101; (void)a00100101; gdcm::Attribute<0x0010,0x0102> a00100102; (void)a00100102; gdcm::Attribute<0x0010,0x1000> a00101000; (void)a00101000; gdcm::Attribute<0x0010,0x1001> a00101001; (void)a00101001; gdcm::Attribute<0x0010,0x1002> a00101002; (void)a00101002; gdcm::Attribute<0x0010,0x1005> a00101005; (void)a00101005; gdcm::Attribute<0x0010,0x1010> a00101010; (void)a00101010; gdcm::Attribute<0x0010,0x1020> a00101020; (void)a00101020; gdcm::Attribute<0x0010,0x1030> a00101030; (void)a00101030; gdcm::Attribute<0x0010,0x1040> a00101040; (void)a00101040; gdcm::Attribute<0x0010,0x1050> a00101050; (void)a00101050; gdcm::Attribute<0x0010,0x1060> a00101060; (void)a00101060; gdcm::Attribute<0x0010,0x1080> a00101080; (void)a00101080; gdcm::Attribute<0x0010,0x1081> a00101081; (void)a00101081; gdcm::Attribute<0x0010,0x1090> a00101090; (void)a00101090; gdcm::Attribute<0x0010,0x2000> a00102000; (void)a00102000; gdcm::Attribute<0x0010,0x2110> a00102110; (void)a00102110; gdcm::Attribute<0x0010,0x2150> a00102150; (void)a00102150; gdcm::Attribute<0x0010,0x2152> a00102152; (void)a00102152; gdcm::Attribute<0x0010,0x2154> a00102154; (void)a00102154; gdcm::Attribute<0x0010,0x2160> a00102160; (void)a00102160; gdcm::Attribute<0x0010,0x2180> a00102180; (void)a00102180; gdcm::Attribute<0x0010,0x21a0> a001021a0; (void)a001021a0; gdcm::Attribute<0x0010,0x21b0> a001021b0; (void)a001021b0; gdcm::Attribute<0x0010,0x21c0> a001021c0; (void)a001021c0; gdcm::Attribute<0x0010,0x21d0> a001021d0; (void)a001021d0; gdcm::Attribute<0x0010,0x21f0> a001021f0; (void)a001021f0; gdcm::Attribute<0x0010,0x2201> a00102201; (void)a00102201; gdcm::Attribute<0x0010,0x2202> a00102202; (void)a00102202; gdcm::Attribute<0x0010,0x2203> a00102203; (void)a00102203; gdcm::Attribute<0x0010,0x2292> a00102292; (void)a00102292; gdcm::Attribute<0x0010,0x2293> a00102293; (void)a00102293; gdcm::Attribute<0x0010,0x2294> a00102294; (void)a00102294; gdcm::Attribute<0x0010,0x2295> a00102295; (void)a00102295; gdcm::Attribute<0x0010,0x2296> a00102296; (void)a00102296; gdcm::Attribute<0x0010,0x2297> a00102297; (void)a00102297; gdcm::Attribute<0x0010,0x2298> a00102298; (void)a00102298; gdcm::Attribute<0x0010,0x2299> a00102299; (void)a00102299; gdcm::Attribute<0x0010,0x4000> a00104000; (void)a00104000; gdcm::Attribute<0x0010,0x9431> a00109431; (void)a00109431; gdcm::Attribute<0x0012,0x0010> a00120010; (void)a00120010; gdcm::Attribute<0x0012,0x0020> a00120020; (void)a00120020; gdcm::Attribute<0x0012,0x0021> a00120021; (void)a00120021; gdcm::Attribute<0x0012,0x0030> a00120030; (void)a00120030; gdcm::Attribute<0x0012,0x0031> a00120031; (void)a00120031; gdcm::Attribute<0x0012,0x0040> a00120040; (void)a00120040; gdcm::Attribute<0x0012,0x0042> a00120042; (void)a00120042; gdcm::Attribute<0x0012,0x0050> a00120050; (void)a00120050; gdcm::Attribute<0x0012,0x0051> a00120051; (void)a00120051; gdcm::Attribute<0x0012,0x0060> a00120060; (void)a00120060; gdcm::Attribute<0x0012,0x0062> a00120062; (void)a00120062; gdcm::Attribute<0x0012,0x0063> a00120063; (void)a00120063; gdcm::Attribute<0x0012,0x0064> a00120064; (void)a00120064; gdcm::Attribute<0x0012,0x0071> a00120071; (void)a00120071; gdcm::Attribute<0x0012,0x0072> a00120072; (void)a00120072; gdcm::Attribute<0x0018,0x0010> a00180010; (void)a00180010; gdcm::Attribute<0x0018,0x0012> a00180012; (void)a00180012; gdcm::Attribute<0x0018,0x0014> a00180014; (void)a00180014; gdcm::Attribute<0x0018,0x0015> a00180015; (void)a00180015; gdcm::Attribute<0x0018,0x0020> a00180020; (void)a00180020; gdcm::Attribute<0x0018,0x0021> a00180021; (void)a00180021; gdcm::Attribute<0x0018,0x0022> a00180022; (void)a00180022; gdcm::Attribute<0x0018,0x0023> a00180023; (void)a00180023; gdcm::Attribute<0x0018,0x0024> a00180024; (void)a00180024; gdcm::Attribute<0x0018,0x0025> a00180025; (void)a00180025; gdcm::Attribute<0x0018,0x0026> a00180026; (void)a00180026; gdcm::Attribute<0x0018,0x0027> a00180027; (void)a00180027; gdcm::Attribute<0x0018,0x0028> a00180028; (void)a00180028; gdcm::Attribute<0x0018,0x0029> a00180029; (void)a00180029; gdcm::Attribute<0x0018,0x002a> a0018002a; (void)a0018002a; gdcm::Attribute<0x0018,0x0030> a00180030; (void)a00180030; gdcm::Attribute<0x0018,0x0031> a00180031; (void)a00180031; gdcm::Attribute<0x0018,0x0032> a00180032; (void)a00180032; gdcm::Attribute<0x0018,0x0033> a00180033; (void)a00180033; gdcm::Attribute<0x0018,0x0034> a00180034; (void)a00180034; gdcm::Attribute<0x0018,0x0035> a00180035; (void)a00180035; gdcm::Attribute<0x0018,0x0036> a00180036; (void)a00180036; gdcm::Attribute<0x0018,0x0037> a00180037; (void)a00180037; gdcm::Attribute<0x0018,0x0038> a00180038; (void)a00180038; gdcm::Attribute<0x0018,0x0039> a00180039; (void)a00180039; gdcm::Attribute<0x0018,0x003a> a0018003a; (void)a0018003a; gdcm::Attribute<0x0018,0x0040> a00180040; (void)a00180040; gdcm::Attribute<0x0018,0x0050> a00180050; (void)a00180050; gdcm::Attribute<0x0018,0x0060> a00180060; (void)a00180060; gdcm::Attribute<0x0018,0x0070> a00180070; (void)a00180070; gdcm::Attribute<0x0018,0x0071> a00180071; (void)a00180071; gdcm::Attribute<0x0018,0x0072> a00180072; (void)a00180072; gdcm::Attribute<0x0018,0x0073> a00180073; (void)a00180073; gdcm::Attribute<0x0018,0x0074> a00180074; (void)a00180074; gdcm::Attribute<0x0018,0x0075> a00180075; (void)a00180075; gdcm::Attribute<0x0018,0x0080> a00180080; (void)a00180080; gdcm::Attribute<0x0018,0x0081> a00180081; (void)a00180081; gdcm::Attribute<0x0018,0x0082> a00180082; (void)a00180082; gdcm::Attribute<0x0018,0x0083> a00180083; (void)a00180083; gdcm::Attribute<0x0018,0x0084> a00180084; (void)a00180084; gdcm::Attribute<0x0018,0x0085> a00180085; (void)a00180085; gdcm::Attribute<0x0018,0x0086> a00180086; (void)a00180086; gdcm::Attribute<0x0018,0x0087> a00180087; (void)a00180087; gdcm::Attribute<0x0018,0x0088> a00180088; (void)a00180088; gdcm::Attribute<0x0018,0x0089> a00180089; (void)a00180089; gdcm::Attribute<0x0018,0x0090> a00180090; (void)a00180090; gdcm::Attribute<0x0018,0x0091> a00180091; (void)a00180091; gdcm::Attribute<0x0018,0x0093> a00180093; (void)a00180093; gdcm::Attribute<0x0018,0x0094> a00180094; (void)a00180094; gdcm::Attribute<0x0018,0x0095> a00180095; (void)a00180095; gdcm::Attribute<0x0018,0x1000> a00181000; (void)a00181000; gdcm::Attribute<0x0018,0x1002> a00181002; (void)a00181002; gdcm::Attribute<0x0018,0x1003> a00181003; (void)a00181003; gdcm::Attribute<0x0018,0x1004> a00181004; (void)a00181004; gdcm::Attribute<0x0018,0x1005> a00181005; (void)a00181005; gdcm::Attribute<0x0018,0x1006> a00181006; (void)a00181006; gdcm::Attribute<0x0018,0x1007> a00181007; (void)a00181007; gdcm::Attribute<0x0018,0x1008> a00181008; (void)a00181008; gdcm::Attribute<0x0018,0x1010> a00181010; (void)a00181010; gdcm::Attribute<0x0018,0x1011> a00181011; (void)a00181011; gdcm::Attribute<0x0018,0x1012> a00181012; (void)a00181012; gdcm::Attribute<0x0018,0x1014> a00181014; (void)a00181014; gdcm::Attribute<0x0018,0x1016> a00181016; (void)a00181016; gdcm::Attribute<0x0018,0x1017> a00181017; (void)a00181017; gdcm::Attribute<0x0018,0x1018> a00181018; (void)a00181018; gdcm::Attribute<0x0018,0x1019> a00181019; (void)a00181019; gdcm::Attribute<0x0018,0x101a> a0018101a; (void)a0018101a; gdcm::Attribute<0x0018,0x101b> a0018101b; (void)a0018101b; gdcm::Attribute<0x0018,0x1020> a00181020; (void)a00181020; gdcm::Attribute<0x0018,0x1022> a00181022; (void)a00181022; gdcm::Attribute<0x0018,0x1023> a00181023; (void)a00181023; gdcm::Attribute<0x0018,0x1030> a00181030; (void)a00181030; gdcm::Attribute<0x0018,0x1040> a00181040; (void)a00181040; gdcm::Attribute<0x0018,0x1041> a00181041; (void)a00181041; gdcm::Attribute<0x0018,0x1042> a00181042; (void)a00181042; gdcm::Attribute<0x0018,0x1043> a00181043; (void)a00181043; gdcm::Attribute<0x0018,0x1044> a00181044; (void)a00181044; gdcm::Attribute<0x0018,0x1045> a00181045; (void)a00181045; gdcm::Attribute<0x0018,0x1046> a00181046; (void)a00181046; gdcm::Attribute<0x0018,0x1047> a00181047; (void)a00181047; gdcm::Attribute<0x0018,0x1048> a00181048; (void)a00181048; gdcm::Attribute<0x0018,0x1049> a00181049; (void)a00181049; gdcm::Attribute<0x0018,0x1050> a00181050; (void)a00181050; gdcm::Attribute<0x0018,0x1060> a00181060; (void)a00181060; gdcm::Attribute<0x0018,0x1061> a00181061; (void)a00181061; gdcm::Attribute<0x0018,0x1062> a00181062; (void)a00181062; gdcm::Attribute<0x0018,0x1063> a00181063; (void)a00181063; gdcm::Attribute<0x0018,0x1064> a00181064; (void)a00181064; gdcm::Attribute<0x0018,0x1065> a00181065; (void)a00181065; gdcm::Attribute<0x0018,0x1066> a00181066; (void)a00181066; gdcm::Attribute<0x0018,0x1067> a00181067; (void)a00181067; gdcm::Attribute<0x0018,0x1068> a00181068; (void)a00181068; gdcm::Attribute<0x0018,0x1069> a00181069; (void)a00181069; gdcm::Attribute<0x0018,0x106a> a0018106a; (void)a0018106a; gdcm::Attribute<0x0018,0x106c> a0018106c; (void)a0018106c; gdcm::Attribute<0x0018,0x106e> a0018106e; (void)a0018106e; gdcm::Attribute<0x0018,0x1070> a00181070; (void)a00181070; gdcm::Attribute<0x0018,0x1071> a00181071; (void)a00181071; gdcm::Attribute<0x0018,0x1072> a00181072; (void)a00181072; gdcm::Attribute<0x0018,0x1073> a00181073; (void)a00181073; gdcm::Attribute<0x0018,0x1074> a00181074; (void)a00181074; gdcm::Attribute<0x0018,0x1075> a00181075; (void)a00181075; gdcm::Attribute<0x0018,0x1076> a00181076; (void)a00181076; gdcm::Attribute<0x0018,0x1077> a00181077; (void)a00181077; gdcm::Attribute<0x0018,0x1078> a00181078; (void)a00181078; gdcm::Attribute<0x0018,0x1079> a00181079; (void)a00181079; gdcm::Attribute<0x0018,0x1080> a00181080; (void)a00181080; gdcm::Attribute<0x0018,0x1081> a00181081; (void)a00181081; gdcm::Attribute<0x0018,0x1082> a00181082; (void)a00181082; gdcm::Attribute<0x0018,0x1083> a00181083; (void)a00181083; gdcm::Attribute<0x0018,0x1084> a00181084; (void)a00181084; gdcm::Attribute<0x0018,0x1085> a00181085; (void)a00181085; gdcm::Attribute<0x0018,0x1086> a00181086; (void)a00181086; gdcm::Attribute<0x0018,0x1088> a00181088; (void)a00181088; gdcm::Attribute<0x0018,0x1090> a00181090; (void)a00181090; gdcm::Attribute<0x0018,0x1094> a00181094; (void)a00181094; gdcm::Attribute<0x0018,0x1100> a00181100; (void)a00181100; gdcm::Attribute<0x0018,0x1110> a00181110; (void)a00181110; gdcm::Attribute<0x0018,0x1111> a00181111; (void)a00181111; gdcm::Attribute<0x0018,0x1114> a00181114; (void)a00181114; gdcm::Attribute<0x0018,0x1120> a00181120; (void)a00181120; gdcm::Attribute<0x0018,0x1121> a00181121; (void)a00181121; gdcm::Attribute<0x0018,0x1130> a00181130; (void)a00181130; gdcm::Attribute<0x0018,0x1131> a00181131; (void)a00181131; gdcm::Attribute<0x0018,0x1134> a00181134; (void)a00181134; gdcm::Attribute<0x0018,0x1135> a00181135; (void)a00181135; gdcm::Attribute<0x0018,0x1136> a00181136; (void)a00181136; gdcm::Attribute<0x0018,0x1137> a00181137; (void)a00181137; gdcm::Attribute<0x0018,0x1138> a00181138; (void)a00181138; gdcm::Attribute<0x0018,0x113a> a0018113a; (void)a0018113a; gdcm::Attribute<0x0018,0x1140> a00181140; (void)a00181140; gdcm::Attribute<0x0018,0x1141> a00181141; (void)a00181141; gdcm::Attribute<0x0018,0x1142> a00181142; (void)a00181142; gdcm::Attribute<0x0018,0x1143> a00181143; (void)a00181143; gdcm::Attribute<0x0018,0x1144> a00181144; (void)a00181144; gdcm::Attribute<0x0018,0x1145> a00181145; (void)a00181145; gdcm::Attribute<0x0018,0x1146> a00181146; (void)a00181146; gdcm::Attribute<0x0018,0x1147> a00181147; (void)a00181147; gdcm::Attribute<0x0018,0x1150> a00181150; (void)a00181150; gdcm::Attribute<0x0018,0x1151> a00181151; (void)a00181151; gdcm::Attribute<0x0018,0x1152> a00181152; (void)a00181152; gdcm::Attribute<0x0018,0x1153> a00181153; (void)a00181153; gdcm::Attribute<0x0018,0x1154> a00181154; (void)a00181154; gdcm::Attribute<0x0018,0x1155> a00181155; (void)a00181155; gdcm::Attribute<0x0018,0x1156> a00181156; (void)a00181156; gdcm::Attribute<0x0018,0x115a> a0018115a; (void)a0018115a; gdcm::Attribute<0x0018,0x115e> a0018115e; (void)a0018115e; gdcm::Attribute<0x0018,0x1160> a00181160; (void)a00181160; gdcm::Attribute<0x0018,0x1161> a00181161; (void)a00181161; gdcm::Attribute<0x0018,0x1162> a00181162; (void)a00181162; gdcm::Attribute<0x0018,0x1164> a00181164; (void)a00181164; gdcm::Attribute<0x0018,0x1166> a00181166; (void)a00181166; gdcm::Attribute<0x0018,0x1170> a00181170; (void)a00181170; gdcm::Attribute<0x0018,0x1180> a00181180; (void)a00181180; gdcm::Attribute<0x0018,0x1181> a00181181; (void)a00181181; gdcm::Attribute<0x0018,0x1190> a00181190; (void)a00181190; gdcm::Attribute<0x0018,0x1191> a00181191; (void)a00181191; gdcm::Attribute<0x0018,0x11a0> a001811a0; (void)a001811a0; gdcm::Attribute<0x0018,0x11a2> a001811a2; (void)a001811a2; gdcm::Attribute<0x0018,0x1200> a00181200; (void)a00181200; gdcm::Attribute<0x0018,0x1201> a00181201; (void)a00181201; gdcm::Attribute<0x0018,0x1210> a00181210; (void)a00181210; gdcm::Attribute<0x0018,0x1240> a00181240; (void)a00181240; gdcm::Attribute<0x0018,0x1242> a00181242; (void)a00181242; gdcm::Attribute<0x0018,0x1243> a00181243; (void)a00181243; gdcm::Attribute<0x0018,0x1244> a00181244; (void)a00181244; gdcm::Attribute<0x0018,0x1250> a00181250; (void)a00181250; gdcm::Attribute<0x0018,0x1251> a00181251; (void)a00181251; gdcm::Attribute<0x0018,0x1260> a00181260; (void)a00181260; gdcm::Attribute<0x0018,0x1261> a00181261; (void)a00181261; gdcm::Attribute<0x0018,0x1300> a00181300; (void)a00181300; gdcm::Attribute<0x0018,0x1301> a00181301; (void)a00181301; gdcm::Attribute<0x0018,0x1302> a00181302; (void)a00181302; gdcm::Attribute<0x0018,0x1310> a00181310; (void)a00181310; gdcm::Attribute<0x0018,0x1312> a00181312; (void)a00181312; gdcm::Attribute<0x0018,0x1314> a00181314; (void)a00181314; gdcm::Attribute<0x0018,0x1315> a00181315; (void)a00181315; gdcm::Attribute<0x0018,0x1316> a00181316; (void)a00181316; gdcm::Attribute<0x0018,0x1318> a00181318; (void)a00181318; gdcm::Attribute<0x0018,0x1400> a00181400; (void)a00181400; gdcm::Attribute<0x0018,0x1401> a00181401; (void)a00181401; gdcm::Attribute<0x0018,0x1402> a00181402; (void)a00181402; gdcm::Attribute<0x0018,0x1403> a00181403; (void)a00181403; gdcm::Attribute<0x0018,0x1404> a00181404; (void)a00181404; gdcm::Attribute<0x0018,0x1405> a00181405; (void)a00181405; gdcm::Attribute<0x0018,0x1450> a00181450; (void)a00181450; gdcm::Attribute<0x0018,0x1460> a00181460; (void)a00181460; gdcm::Attribute<0x0018,0x1470> a00181470; (void)a00181470; gdcm::Attribute<0x0018,0x1480> a00181480; (void)a00181480; gdcm::Attribute<0x0018,0x1490> a00181490; (void)a00181490; gdcm::Attribute<0x0018,0x1491> a00181491; (void)a00181491; gdcm::Attribute<0x0018,0x1495> a00181495; (void)a00181495; gdcm::Attribute<0x0018,0x1500> a00181500; (void)a00181500; gdcm::Attribute<0x0018,0x1508> a00181508; (void)a00181508; gdcm::Attribute<0x0018,0x1510> a00181510; (void)a00181510; gdcm::Attribute<0x0018,0x1511> a00181511; (void)a00181511; gdcm::Attribute<0x0018,0x1520> a00181520; (void)a00181520; gdcm::Attribute<0x0018,0x1521> a00181521; (void)a00181521; gdcm::Attribute<0x0018,0x1530> a00181530; (void)a00181530; gdcm::Attribute<0x0018,0x1531> a00181531; (void)a00181531; gdcm::Attribute<0x0018,0x1602> a00181602; (void)a00181602; gdcm::Attribute<0x0018,0x1604> a00181604; (void)a00181604; gdcm::Attribute<0x0018,0x1606> a00181606; (void)a00181606; gdcm::Attribute<0x0018,0x1608> a00181608; (void)a00181608; gdcm::Attribute<0x0018,0x1610> a00181610; (void)a00181610; gdcm::Attribute<0x0018,0x1612> a00181612; (void)a00181612; gdcm::Attribute<0x0018,0x1620> a00181620; (void)a00181620; gdcm::Attribute<0x0018,0x1622> a00181622; (void)a00181622; gdcm::Attribute<0x0018,0x1623> a00181623; (void)a00181623; gdcm::Attribute<0x0018,0x1624> a00181624; (void)a00181624; gdcm::Attribute<0x0018,0x1702> a00181702; (void)a00181702; gdcm::Attribute<0x0018,0x1704> a00181704; (void)a00181704; gdcm::Attribute<0x0018,0x1706> a00181706; (void)a00181706; gdcm::Attribute<0x0018,0x1708> a00181708; (void)a00181708; gdcm::Attribute<0x0018,0x1710> a00181710; (void)a00181710; gdcm::Attribute<0x0018,0x1712> a00181712; (void)a00181712; gdcm::Attribute<0x0018,0x1720> a00181720; (void)a00181720; gdcm::Attribute<0x0018,0x1800> a00181800; (void)a00181800; gdcm::Attribute<0x0018,0x1801> a00181801; (void)a00181801; gdcm::Attribute<0x0018,0x1802> a00181802; (void)a00181802; gdcm::Attribute<0x0018,0x1803> a00181803; (void)a00181803; gdcm::Attribute<0x0018,0x2001> a00182001; (void)a00182001; gdcm::Attribute<0x0018,0x2002> a00182002; (void)a00182002; gdcm::Attribute<0x0018,0x2003> a00182003; (void)a00182003; gdcm::Attribute<0x0018,0x2004> a00182004; (void)a00182004; gdcm::Attribute<0x0018,0x2005> a00182005; (void)a00182005; gdcm::Attribute<0x0018,0x2006> a00182006; (void)a00182006; gdcm::Attribute<0x0018,0x2010> a00182010; (void)a00182010; gdcm::Attribute<0x0018,0x2020> a00182020; (void)a00182020; gdcm::Attribute<0x0018,0x2030> a00182030; (void)a00182030; gdcm::Attribute<0x0018,0x3100> a00183100; (void)a00183100; gdcm::Attribute<0x0018,0x3101> a00183101; (void)a00183101; gdcm::Attribute<0x0018,0x3102> a00183102; (void)a00183102; gdcm::Attribute<0x0018,0x3103> a00183103; (void)a00183103; gdcm::Attribute<0x0018,0x3104> a00183104; (void)a00183104; gdcm::Attribute<0x0018,0x3105> a00183105; (void)a00183105; gdcm::Attribute<0x0018,0x4000> a00184000; (void)a00184000; gdcm::Attribute<0x0018,0x5000> a00185000; (void)a00185000; gdcm::Attribute<0x0018,0x5010> a00185010; (void)a00185010; gdcm::Attribute<0x0018,0x5012> a00185012; (void)a00185012; gdcm::Attribute<0x0018,0x5020> a00185020; (void)a00185020; gdcm::Attribute<0x0018,0x5021> a00185021; (void)a00185021; gdcm::Attribute<0x0018,0x5022> a00185022; (void)a00185022; gdcm::Attribute<0x0018,0x5024> a00185024; (void)a00185024; gdcm::Attribute<0x0018,0x5026> a00185026; (void)a00185026; gdcm::Attribute<0x0018,0x5027> a00185027; (void)a00185027; gdcm::Attribute<0x0018,0x5028> a00185028; (void)a00185028; gdcm::Attribute<0x0018,0x5029> a00185029; (void)a00185029; gdcm::Attribute<0x0018,0x5030> a00185030; (void)a00185030; gdcm::Attribute<0x0018,0x5040> a00185040; (void)a00185040; gdcm::Attribute<0x0018,0x5050> a00185050; (void)a00185050; gdcm::Attribute<0x0018,0x5100> a00185100; (void)a00185100; gdcm::Attribute<0x0018,0x5101> a00185101; (void)a00185101; gdcm::Attribute<0x0018,0x5104> a00185104; (void)a00185104; gdcm::Attribute<0x0018,0x5210> a00185210; (void)a00185210; gdcm::Attribute<0x0018,0x5212> a00185212; (void)a00185212; gdcm::Attribute<0x0018,0x6000> a00186000; (void)a00186000; gdcm::Attribute<0x0018,0x6011> a00186011; (void)a00186011; gdcm::Attribute<0x0018,0x6012> a00186012; (void)a00186012; gdcm::Attribute<0x0018,0x6014> a00186014; (void)a00186014; gdcm::Attribute<0x0018,0x6016> a00186016; (void)a00186016; gdcm::Attribute<0x0018,0x6018> a00186018; (void)a00186018; gdcm::Attribute<0x0018,0x601a> a0018601a; (void)a0018601a; gdcm::Attribute<0x0018,0x601c> a0018601c; (void)a0018601c; gdcm::Attribute<0x0018,0x601e> a0018601e; (void)a0018601e; gdcm::Attribute<0x0018,0x6020> a00186020; (void)a00186020; gdcm::Attribute<0x0018,0x6022> a00186022; (void)a00186022; gdcm::Attribute<0x0018,0x6024> a00186024; (void)a00186024; gdcm::Attribute<0x0018,0x6026> a00186026; (void)a00186026; gdcm::Attribute<0x0018,0x6028> a00186028; (void)a00186028; gdcm::Attribute<0x0018,0x602a> a0018602a; (void)a0018602a; gdcm::Attribute<0x0018,0x602c> a0018602c; (void)a0018602c; gdcm::Attribute<0x0018,0x602e> a0018602e; (void)a0018602e; gdcm::Attribute<0x0018,0x6030> a00186030; (void)a00186030; gdcm::Attribute<0x0018,0x6031> a00186031; (void)a00186031; gdcm::Attribute<0x0018,0x6032> a00186032; (void)a00186032; gdcm::Attribute<0x0018,0x6034> a00186034; (void)a00186034; gdcm::Attribute<0x0018,0x6036> a00186036; (void)a00186036; gdcm::Attribute<0x0018,0x6038> a00186038; (void)a00186038; gdcm::Attribute<0x0018,0x6039> a00186039; (void)a00186039; gdcm::Attribute<0x0018,0x603a> a0018603a; (void)a0018603a; gdcm::Attribute<0x0018,0x603b> a0018603b; (void)a0018603b; gdcm::Attribute<0x0018,0x603c> a0018603c; (void)a0018603c; gdcm::Attribute<0x0018,0x603d> a0018603d; (void)a0018603d; gdcm::Attribute<0x0018,0x603e> a0018603e; (void)a0018603e; gdcm::Attribute<0x0018,0x603f> a0018603f; (void)a0018603f; gdcm::Attribute<0x0018,0x6040> a00186040; (void)a00186040; gdcm::Attribute<0x0018,0x6041> a00186041; (void)a00186041; gdcm::Attribute<0x0018,0x6042> a00186042; (void)a00186042; gdcm::Attribute<0x0018,0x6043> a00186043; (void)a00186043; gdcm::Attribute<0x0018,0x6044> a00186044; (void)a00186044; gdcm::Attribute<0x0018,0x6046> a00186046; (void)a00186046; gdcm::Attribute<0x0018,0x6048> a00186048; (void)a00186048; gdcm::Attribute<0x0018,0x604a> a0018604a; (void)a0018604a; gdcm::Attribute<0x0018,0x604c> a0018604c; (void)a0018604c; gdcm::Attribute<0x0018,0x604e> a0018604e; (void)a0018604e; gdcm::Attribute<0x0018,0x6050> a00186050; (void)a00186050; gdcm::Attribute<0x0018,0x6052> a00186052; (void)a00186052; gdcm::Attribute<0x0018,0x6054> a00186054; (void)a00186054; gdcm::Attribute<0x0018,0x6056> a00186056; (void)a00186056; gdcm::Attribute<0x0018,0x6058> a00186058; (void)a00186058; gdcm::Attribute<0x0018,0x605a> a0018605a; (void)a0018605a; gdcm::Attribute<0x0018,0x6060> a00186060; (void)a00186060; gdcm::Attribute<0x0018,0x7000> a00187000; (void)a00187000; gdcm::Attribute<0x0018,0x7001> a00187001; (void)a00187001; gdcm::Attribute<0x0018,0x7004> a00187004; (void)a00187004; gdcm::Attribute<0x0018,0x7005> a00187005; (void)a00187005; gdcm::Attribute<0x0018,0x7006> a00187006; (void)a00187006; gdcm::Attribute<0x0018,0x7008> a00187008; (void)a00187008; gdcm::Attribute<0x0018,0x700a> a0018700a; (void)a0018700a; gdcm::Attribute<0x0018,0x700c> a0018700c; (void)a0018700c; gdcm::Attribute<0x0018,0x700e> a0018700e; (void)a0018700e; gdcm::Attribute<0x0018,0x7010> a00187010; (void)a00187010; gdcm::Attribute<0x0018,0x7011> a00187011; (void)a00187011; gdcm::Attribute<0x0018,0x7012> a00187012; (void)a00187012; gdcm::Attribute<0x0018,0x7014> a00187014; (void)a00187014; gdcm::Attribute<0x0018,0x7016> a00187016; (void)a00187016; gdcm::Attribute<0x0018,0x701a> a0018701a; (void)a0018701a; gdcm::Attribute<0x0018,0x7020> a00187020; (void)a00187020; gdcm::Attribute<0x0018,0x7022> a00187022; (void)a00187022; gdcm::Attribute<0x0018,0x7024> a00187024; (void)a00187024; gdcm::Attribute<0x0018,0x7028> a00187028; (void)a00187028; gdcm::Attribute<0x0018,0x702a> a0018702a; (void)a0018702a; gdcm::Attribute<0x0018,0x702b> a0018702b; (void)a0018702b; gdcm::Attribute<0x0018,0x7030> a00187030; (void)a00187030; gdcm::Attribute<0x0018,0x7032> a00187032; (void)a00187032; gdcm::Attribute<0x0018,0x7034> a00187034; (void)a00187034; gdcm::Attribute<0x0018,0x7040> a00187040; (void)a00187040; gdcm::Attribute<0x0018,0x7041> a00187041; (void)a00187041; gdcm::Attribute<0x0018,0x7042> a00187042; (void)a00187042; gdcm::Attribute<0x0018,0x7044> a00187044; (void)a00187044; gdcm::Attribute<0x0018,0x7046> a00187046; (void)a00187046; gdcm::Attribute<0x0018,0x7048> a00187048; (void)a00187048; gdcm::Attribute<0x0018,0x704c> a0018704c; (void)a0018704c; gdcm::Attribute<0x0018,0x7050> a00187050; (void)a00187050; gdcm::Attribute<0x0018,0x7052> a00187052; (void)a00187052; gdcm::Attribute<0x0018,0x7054> a00187054; (void)a00187054; gdcm::Attribute<0x0018,0x7060> a00187060; (void)a00187060; gdcm::Attribute<0x0018,0x7062> a00187062; (void)a00187062; gdcm::Attribute<0x0018,0x7064> a00187064; (void)a00187064; gdcm::Attribute<0x0018,0x7065> a00187065; (void)a00187065; gdcm::Attribute<0x0018,0x8150> a00188150; (void)a00188150; gdcm::Attribute<0x0018,0x8151> a00188151; (void)a00188151; gdcm::Attribute<0x0018,0x9004> a00189004; (void)a00189004; gdcm::Attribute<0x0018,0x9005> a00189005; (void)a00189005; gdcm::Attribute<0x0018,0x9006> a00189006; (void)a00189006; gdcm::Attribute<0x0018,0x9008> a00189008; (void)a00189008; gdcm::Attribute<0x0018,0x9009> a00189009; (void)a00189009; gdcm::Attribute<0x0018,0x9010> a00189010; (void)a00189010; gdcm::Attribute<0x0018,0x9011> a00189011; (void)a00189011; gdcm::Attribute<0x0018,0x9012> a00189012; (void)a00189012; gdcm::Attribute<0x0018,0x9014> a00189014; (void)a00189014; gdcm::Attribute<0x0018,0x9015> a00189015; (void)a00189015; gdcm::Attribute<0x0018,0x9016> a00189016; (void)a00189016; gdcm::Attribute<0x0018,0x9017> a00189017; (void)a00189017; gdcm::Attribute<0x0018,0x9018> a00189018; (void)a00189018; gdcm::Attribute<0x0018,0x9019> a00189019; (void)a00189019; gdcm::Attribute<0x0018,0x9020> a00189020; (void)a00189020; gdcm::Attribute<0x0018,0x9021> a00189021; (void)a00189021; gdcm::Attribute<0x0018,0x9022> a00189022; (void)a00189022; gdcm::Attribute<0x0018,0x9024> a00189024; (void)a00189024; gdcm::Attribute<0x0018,0x9025> a00189025; (void)a00189025; gdcm::Attribute<0x0018,0x9026> a00189026; (void)a00189026; gdcm::Attribute<0x0018,0x9027> a00189027; (void)a00189027; gdcm::Attribute<0x0018,0x9028> a00189028; (void)a00189028; gdcm::Attribute<0x0018,0x9029> a00189029; (void)a00189029; gdcm::Attribute<0x0018,0x9030> a00189030; (void)a00189030; gdcm::Attribute<0x0018,0x9032> a00189032; (void)a00189032; gdcm::Attribute<0x0018,0x9033> a00189033; (void)a00189033; gdcm::Attribute<0x0018,0x9034> a00189034; (void)a00189034; gdcm::Attribute<0x0018,0x9035> a00189035; (void)a00189035; gdcm::Attribute<0x0018,0x9036> a00189036; (void)a00189036; gdcm::Attribute<0x0018,0x9037> a00189037; (void)a00189037; gdcm::Attribute<0x0018,0x9041> a00189041; (void)a00189041; gdcm::Attribute<0x0018,0x9042> a00189042; (void)a00189042; gdcm::Attribute<0x0018,0x9043> a00189043; (void)a00189043; gdcm::Attribute<0x0018,0x9044> a00189044; (void)a00189044; gdcm::Attribute<0x0018,0x9045> a00189045; (void)a00189045; gdcm::Attribute<0x0018,0x9046> a00189046; (void)a00189046; gdcm::Attribute<0x0018,0x9047> a00189047; (void)a00189047; gdcm::Attribute<0x0018,0x9048> a00189048; (void)a00189048; gdcm::Attribute<0x0018,0x9049> a00189049; (void)a00189049; gdcm::Attribute<0x0018,0x9050> a00189050; (void)a00189050; gdcm::Attribute<0x0018,0x9051> a00189051; (void)a00189051; gdcm::Attribute<0x0018,0x9054> a00189054; (void)a00189054; gdcm::Attribute<0x0018,0x9058> a00189058; (void)a00189058; gdcm::Attribute<0x0018,0x9059> a00189059; (void)a00189059; gdcm::Attribute<0x0018,0x9062> a00189062; (void)a00189062; gdcm::Attribute<0x0018,0x9064> a00189064; (void)a00189064; gdcm::Attribute<0x0018,0x9067> a00189067; (void)a00189067; gdcm::Attribute<0x0018,0x9069> a00189069; (void)a00189069; gdcm::Attribute<0x0018,0x9070> a00189070; (void)a00189070; gdcm::Attribute<0x0018,0x9073> a00189073; (void)a00189073; gdcm::Attribute<0x0018,0x9074> a00189074; (void)a00189074; gdcm::Attribute<0x0018,0x9075> a00189075; (void)a00189075; gdcm::Attribute<0x0018,0x9076> a00189076; (void)a00189076; gdcm::Attribute<0x0018,0x9077> a00189077; (void)a00189077; gdcm::Attribute<0x0018,0x9078> a00189078; (void)a00189078; gdcm::Attribute<0x0018,0x9079> a00189079; (void)a00189079; gdcm::Attribute<0x0018,0x9080> a00189080; (void)a00189080; gdcm::Attribute<0x0018,0x9081> a00189081; (void)a00189081; gdcm::Attribute<0x0018,0x9082> a00189082; (void)a00189082; gdcm::Attribute<0x0018,0x9083> a00189083; (void)a00189083; gdcm::Attribute<0x0018,0x9084> a00189084; (void)a00189084; gdcm::Attribute<0x0018,0x9085> a00189085; (void)a00189085; gdcm::Attribute<0x0018,0x9087> a00189087; (void)a00189087; gdcm::Attribute<0x0018,0x9089> a00189089; (void)a00189089; gdcm::Attribute<0x0018,0x9090> a00189090; (void)a00189090; gdcm::Attribute<0x0018,0x9091> a00189091; (void)a00189091; gdcm::Attribute<0x0018,0x9093> a00189093; (void)a00189093; gdcm::Attribute<0x0018,0x9094> a00189094; (void)a00189094; gdcm::Attribute<0x0018,0x9095> a00189095; (void)a00189095; gdcm::Attribute<0x0018,0x9096> a00189096; (void)a00189096; gdcm::Attribute<0x0018,0x9101> a00189101; (void)a00189101; gdcm::Attribute<0x0018,0x9103> a00189103; (void)a00189103; gdcm::Attribute<0x0018,0x9104> a00189104; (void)a00189104; gdcm::Attribute<0x0018,0x9105> a00189105; (void)a00189105; gdcm::Attribute<0x0018,0x9106> a00189106; (void)a00189106; gdcm::Attribute<0x0018,0x9107> a00189107; (void)a00189107; gdcm::Attribute<0x0018,0x9112> a00189112; (void)a00189112; gdcm::Attribute<0x0018,0x9114> a00189114; (void)a00189114; gdcm::Attribute<0x0018,0x9115> a00189115; (void)a00189115; gdcm::Attribute<0x0018,0x9117> a00189117; (void)a00189117; gdcm::Attribute<0x0018,0x9118> a00189118; (void)a00189118; gdcm::Attribute<0x0018,0x9119> a00189119; (void)a00189119; gdcm::Attribute<0x0018,0x9125> a00189125; (void)a00189125; gdcm::Attribute<0x0018,0x9126> a00189126; (void)a00189126; gdcm::Attribute<0x0018,0x9127> a00189127; (void)a00189127; gdcm::Attribute<0x0018,0x9147> a00189147; (void)a00189147; gdcm::Attribute<0x0018,0x9151> a00189151; (void)a00189151; gdcm::Attribute<0x0018,0x9152> a00189152; (void)a00189152; gdcm::Attribute<0x0018,0x9155> a00189155; (void)a00189155; gdcm::Attribute<0x0018,0x9159> a00189159; (void)a00189159; gdcm::Attribute<0x0018,0x9166> a00189166; (void)a00189166; gdcm::Attribute<0x0018,0x9168> a00189168; (void)a00189168; gdcm::Attribute<0x0018,0x9169> a00189169; (void)a00189169; gdcm::Attribute<0x0018,0x9170> a00189170; (void)a00189170; gdcm::Attribute<0x0018,0x9171> a00189171; (void)a00189171; gdcm::Attribute<0x0018,0x9172> a00189172; (void)a00189172; gdcm::Attribute<0x0018,0x9173> a00189173; (void)a00189173; gdcm::Attribute<0x0018,0x9174> a00189174; (void)a00189174; gdcm::Attribute<0x0018,0x9175> a00189175; (void)a00189175; gdcm::Attribute<0x0018,0x9176> a00189176; (void)a00189176; gdcm::Attribute<0x0018,0x9177> a00189177; (void)a00189177; gdcm::Attribute<0x0018,0x9178> a00189178; (void)a00189178; gdcm::Attribute<0x0018,0x9179> a00189179; (void)a00189179; gdcm::Attribute<0x0018,0x9180> a00189180; (void)a00189180; gdcm::Attribute<0x0018,0x9181> a00189181; (void)a00189181; gdcm::Attribute<0x0018,0x9182> a00189182; (void)a00189182; gdcm::Attribute<0x0018,0x9183> a00189183; (void)a00189183; gdcm::Attribute<0x0018,0x9184> a00189184; (void)a00189184; gdcm::Attribute<0x0018,0x9185> a00189185; (void)a00189185; gdcm::Attribute<0x0018,0x9186> a00189186; (void)a00189186; gdcm::Attribute<0x0018,0x9195> a00189195; (void)a00189195; gdcm::Attribute<0x0018,0x9196> a00189196; (void)a00189196; gdcm::Attribute<0x0018,0x9197> a00189197; (void)a00189197; gdcm::Attribute<0x0018,0x9198> a00189198; (void)a00189198; gdcm::Attribute<0x0018,0x9199> a00189199; (void)a00189199; gdcm::Attribute<0x0018,0x9200> a00189200; (void)a00189200; gdcm::Attribute<0x0018,0x9214> a00189214; (void)a00189214; gdcm::Attribute<0x0018,0x9217> a00189217; (void)a00189217; gdcm::Attribute<0x0018,0x9218> a00189218; (void)a00189218; gdcm::Attribute<0x0018,0x9219> a00189219; (void)a00189219; gdcm::Attribute<0x0018,0x9220> a00189220; (void)a00189220; gdcm::Attribute<0x0018,0x9226> a00189226; (void)a00189226; gdcm::Attribute<0x0018,0x9227> a00189227; (void)a00189227; gdcm::Attribute<0x0018,0x9231> a00189231; (void)a00189231; gdcm::Attribute<0x0018,0x9232> a00189232; (void)a00189232; gdcm::Attribute<0x0018,0x9234> a00189234; (void)a00189234; gdcm::Attribute<0x0018,0x9236> a00189236; (void)a00189236; gdcm::Attribute<0x0018,0x9239> a00189239; (void)a00189239; gdcm::Attribute<0x0018,0x9240> a00189240; (void)a00189240; gdcm::Attribute<0x0018,0x9241> a00189241; (void)a00189241; gdcm::Attribute<0x0018,0x9295> a00189295; (void)a00189295; gdcm::Attribute<0x0018,0x9296> a00189296; (void)a00189296; gdcm::Attribute<0x0018,0x9301> a00189301; (void)a00189301; gdcm::Attribute<0x0018,0x9302> a00189302; (void)a00189302; gdcm::Attribute<0x0018,0x9303> a00189303; (void)a00189303; gdcm::Attribute<0x0018,0x9304> a00189304; (void)a00189304; gdcm::Attribute<0x0018,0x9305> a00189305; (void)a00189305; gdcm::Attribute<0x0018,0x9306> a00189306; (void)a00189306; gdcm::Attribute<0x0018,0x9307> a00189307; (void)a00189307; gdcm::Attribute<0x0018,0x9308> a00189308; (void)a00189308; gdcm::Attribute<0x0018,0x9309> a00189309; (void)a00189309; gdcm::Attribute<0x0018,0x9310> a00189310; (void)a00189310; gdcm::Attribute<0x0018,0x9311> a00189311; (void)a00189311; gdcm::Attribute<0x0018,0x9312> a00189312; (void)a00189312; gdcm::Attribute<0x0018,0x9313> a00189313; (void)a00189313; gdcm::Attribute<0x0018,0x9314> a00189314; (void)a00189314; gdcm::Attribute<0x0018,0x9315> a00189315; (void)a00189315; gdcm::Attribute<0x0018,0x9316> a00189316; (void)a00189316; gdcm::Attribute<0x0018,0x9317> a00189317; (void)a00189317; gdcm::Attribute<0x0018,0x9318> a00189318; (void)a00189318; gdcm::Attribute<0x0018,0x9319> a00189319; (void)a00189319; gdcm::Attribute<0x0018,0x9320> a00189320; (void)a00189320; gdcm::Attribute<0x0018,0x9321> a00189321; (void)a00189321; gdcm::Attribute<0x0018,0x9322> a00189322; (void)a00189322; gdcm::Attribute<0x0018,0x9323> a00189323; (void)a00189323; gdcm::Attribute<0x0018,0x9324> a00189324; (void)a00189324; gdcm::Attribute<0x0018,0x9325> a00189325; (void)a00189325; gdcm::Attribute<0x0018,0x9326> a00189326; (void)a00189326; gdcm::Attribute<0x0018,0x9327> a00189327; (void)a00189327; gdcm::Attribute<0x0018,0x9328> a00189328; (void)a00189328; gdcm::Attribute<0x0018,0x9329> a00189329; (void)a00189329; gdcm::Attribute<0x0018,0x9330> a00189330; (void)a00189330; gdcm::Attribute<0x0018,0x9332> a00189332; (void)a00189332; gdcm::Attribute<0x0018,0x9333> a00189333; (void)a00189333; gdcm::Attribute<0x0018,0x9334> a00189334; (void)a00189334; gdcm::Attribute<0x0018,0x9335> a00189335; (void)a00189335; gdcm::Attribute<0x0018,0x9337> a00189337; (void)a00189337; gdcm::Attribute<0x0018,0x9338> a00189338; (void)a00189338; gdcm::Attribute<0x0018,0x9340> a00189340; (void)a00189340; gdcm::Attribute<0x0018,0x9341> a00189341; (void)a00189341; gdcm::Attribute<0x0018,0x9342> a00189342; (void)a00189342; gdcm::Attribute<0x0018,0x9343> a00189343; (void)a00189343; gdcm::Attribute<0x0018,0x9344> a00189344; (void)a00189344; gdcm::Attribute<0x0018,0x9345> a00189345; (void)a00189345; gdcm::Attribute<0x0018,0x9346> a00189346; (void)a00189346; gdcm::Attribute<0x0018,0x9351> a00189351; (void)a00189351; gdcm::Attribute<0x0018,0x9352> a00189352; (void)a00189352; gdcm::Attribute<0x0018,0x9360> a00189360; (void)a00189360; gdcm::Attribute<0x0018,0x9401> a00189401; (void)a00189401; gdcm::Attribute<0x0018,0x9402> a00189402; (void)a00189402; gdcm::Attribute<0x0018,0x9403> a00189403; (void)a00189403; gdcm::Attribute<0x0018,0x9404> a00189404; (void)a00189404; gdcm::Attribute<0x0018,0x9405> a00189405; (void)a00189405; gdcm::Attribute<0x0018,0x9406> a00189406; (void)a00189406; gdcm::Attribute<0x0018,0x9407> a00189407; (void)a00189407; gdcm::Attribute<0x0018,0x9412> a00189412; (void)a00189412; gdcm::Attribute<0x0018,0x9417> a00189417; (void)a00189417; gdcm::Attribute<0x0018,0x9420> a00189420; (void)a00189420; gdcm::Attribute<0x0018,0x9423> a00189423; (void)a00189423; gdcm::Attribute<0x0018,0x9424> a00189424; (void)a00189424; gdcm::Attribute<0x0018,0x9425> a00189425; (void)a00189425; gdcm::Attribute<0x0018,0x9426> a00189426; (void)a00189426; gdcm::Attribute<0x0018,0x9427> a00189427; (void)a00189427; gdcm::Attribute<0x0018,0x9429> a00189429; (void)a00189429; gdcm::Attribute<0x0018,0x9430> a00189430; (void)a00189430; gdcm::Attribute<0x0018,0x9432> a00189432; (void)a00189432; gdcm::Attribute<0x0018,0x9433> a00189433; (void)a00189433; gdcm::Attribute<0x0018,0x9434> a00189434; (void)a00189434; gdcm::Attribute<0x0018,0x9435> a00189435; (void)a00189435; gdcm::Attribute<0x0018,0x9436> a00189436; (void)a00189436; gdcm::Attribute<0x0018,0x9437> a00189437; (void)a00189437; gdcm::Attribute<0x0018,0x9438> a00189438; (void)a00189438; gdcm::Attribute<0x0018,0x9439> a00189439; (void)a00189439; gdcm::Attribute<0x0018,0x9440> a00189440; (void)a00189440; gdcm::Attribute<0x0018,0x9441> a00189441; (void)a00189441; gdcm::Attribute<0x0018,0x9442> a00189442; (void)a00189442; gdcm::Attribute<0x0018,0x9447> a00189447; (void)a00189447; gdcm::Attribute<0x0018,0x9449> a00189449; (void)a00189449; gdcm::Attribute<0x0018,0x9451> a00189451; (void)a00189451; gdcm::Attribute<0x0018,0x9452> a00189452; (void)a00189452; gdcm::Attribute<0x0018,0x9455> a00189455; (void)a00189455; gdcm::Attribute<0x0018,0x9456> a00189456; (void)a00189456; gdcm::Attribute<0x0018,0x9457> a00189457; (void)a00189457; gdcm::Attribute<0x0018,0x9462> a00189462; (void)a00189462; gdcm::Attribute<0x0018,0x9463> a00189463; (void)a00189463; gdcm::Attribute<0x0018,0x9464> a00189464; (void)a00189464; gdcm::Attribute<0x0018,0x9465> a00189465; (void)a00189465; gdcm::Attribute<0x0018,0x9466> a00189466; (void)a00189466; gdcm::Attribute<0x0018,0x9467> a00189467; (void)a00189467; gdcm::Attribute<0x0018,0x9468> a00189468; (void)a00189468; gdcm::Attribute<0x0018,0x9469> a00189469; (void)a00189469; gdcm::Attribute<0x0018,0x9470> a00189470; (void)a00189470; gdcm::Attribute<0x0018,0x9471> a00189471; (void)a00189471; gdcm::Attribute<0x0018,0x9472> a00189472; (void)a00189472; gdcm::Attribute<0x0018,0x9473> a00189473; (void)a00189473; gdcm::Attribute<0x0018,0x9474> a00189474; (void)a00189474; gdcm::Attribute<0x0018,0x9476> a00189476; (void)a00189476; gdcm::Attribute<0x0018,0x9477> a00189477; (void)a00189477; gdcm::Attribute<0x0018,0x9504> a00189504; (void)a00189504; gdcm::Attribute<0x0018,0x9506> a00189506; (void)a00189506; gdcm::Attribute<0x0018,0x9507> a00189507; (void)a00189507; gdcm::Attribute<0x0018,0x9508> a00189508; (void)a00189508; gdcm::Attribute<0x0018,0x9509> a00189509; (void)a00189509; gdcm::Attribute<0x0018,0x9510> a00189510; (void)a00189510; gdcm::Attribute<0x0018,0x9511> a00189511; (void)a00189511; gdcm::Attribute<0x0018,0x9514> a00189514; (void)a00189514; gdcm::Attribute<0x0018,0x9515> a00189515; (void)a00189515; gdcm::Attribute<0x0018,0x9516> a00189516; (void)a00189516; gdcm::Attribute<0x0018,0x9517> a00189517; (void)a00189517; gdcm::Attribute<0x0018,0x9524> a00189524; (void)a00189524; gdcm::Attribute<0x0018,0x9525> a00189525; (void)a00189525; gdcm::Attribute<0x0018,0x9526> a00189526; (void)a00189526; gdcm::Attribute<0x0018,0x9527> a00189527; (void)a00189527; gdcm::Attribute<0x0018,0x9528> a00189528; (void)a00189528; gdcm::Attribute<0x0018,0x9530> a00189530; (void)a00189530; gdcm::Attribute<0x0018,0x9531> a00189531; (void)a00189531; gdcm::Attribute<0x0018,0x9538> a00189538; (void)a00189538; gdcm::Attribute<0x0018,0x9601> a00189601; (void)a00189601; gdcm::Attribute<0x0018,0x9602> a00189602; (void)a00189602; gdcm::Attribute<0x0018,0x9603> a00189603; (void)a00189603; gdcm::Attribute<0x0018,0x9604> a00189604; (void)a00189604; gdcm::Attribute<0x0018,0x9605> a00189605; (void)a00189605; gdcm::Attribute<0x0018,0x9606> a00189606; (void)a00189606; gdcm::Attribute<0x0018,0x9607> a00189607; (void)a00189607; gdcm::Attribute<0x0018,0xa001> a0018a001; (void)a0018a001; gdcm::Attribute<0x0018,0xa002> a0018a002; (void)a0018a002; gdcm::Attribute<0x0018,0xa003> a0018a003; (void)a0018a003; gdcm::Attribute<0x0020,0x000d> a0020000d; (void)a0020000d; gdcm::Attribute<0x0020,0x000e> a0020000e; (void)a0020000e; gdcm::Attribute<0x0020,0x0010> a00200010; (void)a00200010; gdcm::Attribute<0x0020,0x0011> a00200011; (void)a00200011; gdcm::Attribute<0x0020,0x0012> a00200012; (void)a00200012; gdcm::Attribute<0x0020,0x0013> a00200013; (void)a00200013; gdcm::Attribute<0x0020,0x0014> a00200014; (void)a00200014; gdcm::Attribute<0x0020,0x0015> a00200015; (void)a00200015; gdcm::Attribute<0x0020,0x0016> a00200016; (void)a00200016; gdcm::Attribute<0x0020,0x0017> a00200017; (void)a00200017; gdcm::Attribute<0x0020,0x0018> a00200018; (void)a00200018; gdcm::Attribute<0x0020,0x0019> a00200019; (void)a00200019; gdcm::Attribute<0x0020,0x0020> a00200020; (void)a00200020; gdcm::Attribute<0x0020,0x0022> a00200022; (void)a00200022; gdcm::Attribute<0x0020,0x0024> a00200024; (void)a00200024; gdcm::Attribute<0x0020,0x0026> a00200026; (void)a00200026; gdcm::Attribute<0x0020,0x0030> a00200030; (void)a00200030; gdcm::Attribute<0x0020,0x0032> a00200032; (void)a00200032; gdcm::Attribute<0x0020,0x0035> a00200035; (void)a00200035; gdcm::Attribute<0x0020,0x0037> a00200037; (void)a00200037; gdcm::Attribute<0x0020,0x0050> a00200050; (void)a00200050; gdcm::Attribute<0x0020,0x0052> a00200052; (void)a00200052; gdcm::Attribute<0x0020,0x0060> a00200060; (void)a00200060; gdcm::Attribute<0x0020,0x0062> a00200062; (void)a00200062; gdcm::Attribute<0x0020,0x0070> a00200070; (void)a00200070; gdcm::Attribute<0x0020,0x0080> a00200080; (void)a00200080; gdcm::Attribute<0x0020,0x0100> a00200100; (void)a00200100; gdcm::Attribute<0x0020,0x0105> a00200105; (void)a00200105; gdcm::Attribute<0x0020,0x0110> a00200110; (void)a00200110; gdcm::Attribute<0x0020,0x0200> a00200200; (void)a00200200; gdcm::Attribute<0x0020,0x1000> a00201000; (void)a00201000; gdcm::Attribute<0x0020,0x1001> a00201001; (void)a00201001; gdcm::Attribute<0x0020,0x1002> a00201002; (void)a00201002; gdcm::Attribute<0x0020,0x1003> a00201003; (void)a00201003; gdcm::Attribute<0x0020,0x1004> a00201004; (void)a00201004; gdcm::Attribute<0x0020,0x1005> a00201005; (void)a00201005; gdcm::Attribute<0x0020,0x1020> a00201020; (void)a00201020; gdcm::Attribute<0x0020,0x1040> a00201040; (void)a00201040; gdcm::Attribute<0x0020,0x1041> a00201041; (void)a00201041; gdcm::Attribute<0x0020,0x1070> a00201070; (void)a00201070; gdcm::Attribute<0x0020,0x1200> a00201200; (void)a00201200; gdcm::Attribute<0x0020,0x1202> a00201202; (void)a00201202; gdcm::Attribute<0x0020,0x1204> a00201204; (void)a00201204; gdcm::Attribute<0x0020,0x1206> a00201206; (void)a00201206; gdcm::Attribute<0x0020,0x1208> a00201208; (void)a00201208; gdcm::Attribute<0x0020,0x1209> a00201209; (void)a00201209; gdcm::Attribute<0x0020,0x3401> a00203401; (void)a00203401; gdcm::Attribute<0x0020,0x3402> a00203402; (void)a00203402; gdcm::Attribute<0x0020,0x3403> a00203403; (void)a00203403; gdcm::Attribute<0x0020,0x3404> a00203404; (void)a00203404; gdcm::Attribute<0x0020,0x3405> a00203405; (void)a00203405; gdcm::Attribute<0x0020,0x3406> a00203406; (void)a00203406; gdcm::Attribute<0x0020,0x4000> a00204000; (void)a00204000; gdcm::Attribute<0x0020,0x5000> a00205000; (void)a00205000; gdcm::Attribute<0x0020,0x5002> a00205002; (void)a00205002; gdcm::Attribute<0x0020,0x9056> a00209056; (void)a00209056; gdcm::Attribute<0x0020,0x9057> a00209057; (void)a00209057; gdcm::Attribute<0x0020,0x9071> a00209071; (void)a00209071; gdcm::Attribute<0x0020,0x9072> a00209072; (void)a00209072; gdcm::Attribute<0x0020,0x9111> a00209111; (void)a00209111; gdcm::Attribute<0x0020,0x9113> a00209113; (void)a00209113; gdcm::Attribute<0x0020,0x9116> a00209116; (void)a00209116; gdcm::Attribute<0x0020,0x9128> a00209128; (void)a00209128; gdcm::Attribute<0x0020,0x9153> a00209153; (void)a00209153; gdcm::Attribute<0x0020,0x9156> a00209156; (void)a00209156; gdcm::Attribute<0x0020,0x9157> a00209157; (void)a00209157; gdcm::Attribute<0x0020,0x9158> a00209158; (void)a00209158; gdcm::Attribute<0x0020,0x9161> a00209161; (void)a00209161; gdcm::Attribute<0x0020,0x9162> a00209162; (void)a00209162; gdcm::Attribute<0x0020,0x9163> a00209163; (void)a00209163; gdcm::Attribute<0x0020,0x9164> a00209164; (void)a00209164; gdcm::Attribute<0x0020,0x9165> a00209165; (void)a00209165; gdcm::Attribute<0x0020,0x9167> a00209167; (void)a00209167; gdcm::Attribute<0x0020,0x9213> a00209213; (void)a00209213; gdcm::Attribute<0x0020,0x9221> a00209221; (void)a00209221; gdcm::Attribute<0x0020,0x9222> a00209222; (void)a00209222; gdcm::Attribute<0x0020,0x9228> a00209228; (void)a00209228; gdcm::Attribute<0x0020,0x9238> a00209238; (void)a00209238; gdcm::Attribute<0x0020,0x9241> a00209241; (void)a00209241; gdcm::Attribute<0x0020,0x9245> a00209245; (void)a00209245; gdcm::Attribute<0x0020,0x9246> a00209246; (void)a00209246; gdcm::Attribute<0x0020,0x9247> a00209247; (void)a00209247; gdcm::Attribute<0x0020,0x9248> a00209248; (void)a00209248; gdcm::Attribute<0x0020,0x9249> a00209249; (void)a00209249; gdcm::Attribute<0x0020,0x9250> a00209250; (void)a00209250; gdcm::Attribute<0x0020,0x9251> a00209251; (void)a00209251; gdcm::Attribute<0x0020,0x9252> a00209252; (void)a00209252; gdcm::Attribute<0x0020,0x9253> a00209253; (void)a00209253; gdcm::Attribute<0x0020,0x9254> a00209254; (void)a00209254; gdcm::Attribute<0x0020,0x9255> a00209255; (void)a00209255; gdcm::Attribute<0x0020,0x9256> a00209256; (void)a00209256; gdcm::Attribute<0x0020,0x9257> a00209257; (void)a00209257; gdcm::Attribute<0x0020,0x9421> a00209421; (void)a00209421; gdcm::Attribute<0x0020,0x9450> a00209450; (void)a00209450; gdcm::Attribute<0x0020,0x9453> a00209453; (void)a00209453; gdcm::Attribute<0x0020,0x9518> a00209518; (void)a00209518; gdcm::Attribute<0x0020,0x9529> a00209529; (void)a00209529; gdcm::Attribute<0x0020,0x9536> a00209536; (void)a00209536; gdcm::Attribute<0x0022,0x0001> a00220001; (void)a00220001; gdcm::Attribute<0x0022,0x0002> a00220002; (void)a00220002; gdcm::Attribute<0x0022,0x0003> a00220003; (void)a00220003; gdcm::Attribute<0x0022,0x0004> a00220004; (void)a00220004; gdcm::Attribute<0x0022,0x0005> a00220005; (void)a00220005; gdcm::Attribute<0x0022,0x0006> a00220006; (void)a00220006; gdcm::Attribute<0x0022,0x0007> a00220007; (void)a00220007; gdcm::Attribute<0x0022,0x0008> a00220008; (void)a00220008; gdcm::Attribute<0x0022,0x0009> a00220009; (void)a00220009; gdcm::Attribute<0x0022,0x000a> a0022000a; (void)a0022000a; gdcm::Attribute<0x0022,0x000b> a0022000b; (void)a0022000b; gdcm::Attribute<0x0022,0x000c> a0022000c; (void)a0022000c; gdcm::Attribute<0x0022,0x000d> a0022000d; (void)a0022000d; gdcm::Attribute<0x0022,0x000e> a0022000e; (void)a0022000e; gdcm::Attribute<0x0022,0x0010> a00220010; (void)a00220010; gdcm::Attribute<0x0022,0x0011> a00220011; (void)a00220011; gdcm::Attribute<0x0022,0x0012> a00220012; (void)a00220012; gdcm::Attribute<0x0022,0x0013> a00220013; (void)a00220013; gdcm::Attribute<0x0022,0x0014> a00220014; (void)a00220014; gdcm::Attribute<0x0022,0x0015> a00220015; (void)a00220015; gdcm::Attribute<0x0022,0x0016> a00220016; (void)a00220016; gdcm::Attribute<0x0022,0x0017> a00220017; (void)a00220017; gdcm::Attribute<0x0022,0x0018> a00220018; (void)a00220018; gdcm::Attribute<0x0022,0x0019> a00220019; (void)a00220019; gdcm::Attribute<0x0022,0x001a> a0022001a; (void)a0022001a; gdcm::Attribute<0x0022,0x001b> a0022001b; (void)a0022001b; gdcm::Attribute<0x0022,0x001c> a0022001c; (void)a0022001c; gdcm::Attribute<0x0022,0x001d> a0022001d; (void)a0022001d; gdcm::Attribute<0x0022,0x0020> a00220020; (void)a00220020; gdcm::Attribute<0x0022,0x0021> a00220021; (void)a00220021; gdcm::Attribute<0x0022,0x0022> a00220022; (void)a00220022; gdcm::Attribute<0x0022,0x0030> a00220030; (void)a00220030; gdcm::Attribute<0x0022,0x0031> a00220031; (void)a00220031; gdcm::Attribute<0x0022,0x0032> a00220032; (void)a00220032; gdcm::Attribute<0x0022,0x0035> a00220035; (void)a00220035; gdcm::Attribute<0x0022,0x0036> a00220036; (void)a00220036; gdcm::Attribute<0x0022,0x0037> a00220037; (void)a00220037; gdcm::Attribute<0x0022,0x0038> a00220038; (void)a00220038; gdcm::Attribute<0x0022,0x0039> a00220039; (void)a00220039; gdcm::Attribute<0x0022,0x0041> a00220041; (void)a00220041; gdcm::Attribute<0x0022,0x0042> a00220042; (void)a00220042; gdcm::Attribute<0x0022,0x0048> a00220048; (void)a00220048; gdcm::Attribute<0x0022,0x0049> a00220049; (void)a00220049; gdcm::Attribute<0x0022,0x004e> a0022004e; (void)a0022004e; gdcm::Attribute<0x0022,0x0055> a00220055; (void)a00220055; gdcm::Attribute<0x0022,0x0056> a00220056; (void)a00220056; gdcm::Attribute<0x0022,0x0057> a00220057; (void)a00220057; gdcm::Attribute<0x0022,0x0058> a00220058; (void)a00220058; gdcm::Attribute<0x0028,0x0002> a00280002; (void)a00280002; gdcm::Attribute<0x0028,0x0003> a00280003; (void)a00280003; gdcm::Attribute<0x0028,0x0004> a00280004; (void)a00280004; gdcm::Attribute<0x0028,0x0005> a00280005; (void)a00280005; gdcm::Attribute<0x0028,0x0006> a00280006; (void)a00280006; gdcm::Attribute<0x0028,0x0008> a00280008; (void)a00280008; gdcm::Attribute<0x0028,0x0009> a00280009; (void)a00280009; gdcm::Attribute<0x0028,0x000a> a0028000a; (void)a0028000a; gdcm::Attribute<0x0028,0x0010> a00280010; (void)a00280010; gdcm::Attribute<0x0028,0x0011> a00280011; (void)a00280011; gdcm::Attribute<0x0028,0x0012> a00280012; (void)a00280012; gdcm::Attribute<0x0028,0x0014> a00280014; (void)a00280014; gdcm::Attribute<0x0028,0x0030> a00280030; (void)a00280030; gdcm::Attribute<0x0028,0x0031> a00280031; (void)a00280031; gdcm::Attribute<0x0028,0x0032> a00280032; (void)a00280032; gdcm::Attribute<0x0028,0x0034> a00280034; (void)a00280034; gdcm::Attribute<0x0028,0x0040> a00280040; (void)a00280040; gdcm::Attribute<0x0028,0x0050> a00280050; (void)a00280050; gdcm::Attribute<0x0028,0x0051> a00280051; (void)a00280051; gdcm::Attribute<0x0028,0x005f> a0028005f; (void)a0028005f; gdcm::Attribute<0x0028,0x0060> a00280060; (void)a00280060; gdcm::Attribute<0x0028,0x0061> a00280061; (void)a00280061; gdcm::Attribute<0x0028,0x0062> a00280062; (void)a00280062; gdcm::Attribute<0x0028,0x0063> a00280063; (void)a00280063; gdcm::Attribute<0x0028,0x0065> a00280065; (void)a00280065; gdcm::Attribute<0x0028,0x0066> a00280066; (void)a00280066; gdcm::Attribute<0x0028,0x0068> a00280068; (void)a00280068; gdcm::Attribute<0x0028,0x0069> a00280069; (void)a00280069; gdcm::Attribute<0x0028,0x0070> a00280070; (void)a00280070; gdcm::Attribute<0x0028,0x0080> a00280080; (void)a00280080; gdcm::Attribute<0x0028,0x0081> a00280081; (void)a00280081; gdcm::Attribute<0x0028,0x0082> a00280082; (void)a00280082; gdcm::Attribute<0x0028,0x0090> a00280090; (void)a00280090; gdcm::Attribute<0x0028,0x0091> a00280091; (void)a00280091; gdcm::Attribute<0x0028,0x0092> a00280092; (void)a00280092; gdcm::Attribute<0x0028,0x0093> a00280093; (void)a00280093; gdcm::Attribute<0x0028,0x0094> a00280094; (void)a00280094; gdcm::Attribute<0x0028,0x0100> a00280100; (void)a00280100; gdcm::Attribute<0x0028,0x0101> a00280101; (void)a00280101; gdcm::Attribute<0x0028,0x0102> a00280102; (void)a00280102; gdcm::Attribute<0x0028,0x0103> a00280103; (void)a00280103; gdcm::Attribute<0x0028,0x0200> a00280200; (void)a00280200; gdcm::Attribute<0x0028,0x0300> a00280300; (void)a00280300; gdcm::Attribute<0x0028,0x0301> a00280301; (void)a00280301; gdcm::Attribute<0x0028,0x0400> a00280400; (void)a00280400; gdcm::Attribute<0x0028,0x0401> a00280401; (void)a00280401; gdcm::Attribute<0x0028,0x0402> a00280402; (void)a00280402; gdcm::Attribute<0x0028,0x0403> a00280403; (void)a00280403; gdcm::Attribute<0x0028,0x0404> a00280404; (void)a00280404; gdcm::Attribute<0x0028,0x0700> a00280700; (void)a00280700; gdcm::Attribute<0x0028,0x0701> a00280701; (void)a00280701; gdcm::Attribute<0x0028,0x0702> a00280702; (void)a00280702; gdcm::Attribute<0x0028,0x0710> a00280710; (void)a00280710; gdcm::Attribute<0x0028,0x0720> a00280720; (void)a00280720; gdcm::Attribute<0x0028,0x0721> a00280721; (void)a00280721; gdcm::Attribute<0x0028,0x0722> a00280722; (void)a00280722; gdcm::Attribute<0x0028,0x0730> a00280730; (void)a00280730; gdcm::Attribute<0x0028,0x0740> a00280740; (void)a00280740; gdcm::Attribute<0x0028,0x0a02> a00280a02; (void)a00280a02; gdcm::Attribute<0x0028,0x0a04> a00280a04; (void)a00280a04; gdcm::Attribute<0x0028,0x1040> a00281040; (void)a00281040; gdcm::Attribute<0x0028,0x1041> a00281041; (void)a00281041; gdcm::Attribute<0x0028,0x1050> a00281050; (void)a00281050; gdcm::Attribute<0x0028,0x1051> a00281051; (void)a00281051; gdcm::Attribute<0x0028,0x1052> a00281052; (void)a00281052; gdcm::Attribute<0x0028,0x1053> a00281053; (void)a00281053; gdcm::Attribute<0x0028,0x1054> a00281054; (void)a00281054; gdcm::Attribute<0x0028,0x1055> a00281055; (void)a00281055; gdcm::Attribute<0x0028,0x1056> a00281056; (void)a00281056; gdcm::Attribute<0x0028,0x1080> a00281080; (void)a00281080; gdcm::Attribute<0x0028,0x1090> a00281090; (void)a00281090; gdcm::Attribute<0x0028,0x1199> a00281199; (void)a00281199; gdcm::Attribute<0x0028,0x1201> a00281201; (void)a00281201; gdcm::Attribute<0x0028,0x1202> a00281202; (void)a00281202; gdcm::Attribute<0x0028,0x1203> a00281203; (void)a00281203; gdcm::Attribute<0x0028,0x1211> a00281211; (void)a00281211; gdcm::Attribute<0x0028,0x1212> a00281212; (void)a00281212; gdcm::Attribute<0x0028,0x1213> a00281213; (void)a00281213; gdcm::Attribute<0x0028,0x1214> a00281214; (void)a00281214; gdcm::Attribute<0x0028,0x1221> a00281221; (void)a00281221; gdcm::Attribute<0x0028,0x1222> a00281222; (void)a00281222; gdcm::Attribute<0x0028,0x1223> a00281223; (void)a00281223; gdcm::Attribute<0x0028,0x1300> a00281300; (void)a00281300; gdcm::Attribute<0x0028,0x1350> a00281350; (void)a00281350; gdcm::Attribute<0x0028,0x1351> a00281351; (void)a00281351; gdcm::Attribute<0x0028,0x1352> a00281352; (void)a00281352; gdcm::Attribute<0x0028,0x135a> a0028135a; (void)a0028135a; gdcm::Attribute<0x0028,0x2000> a00282000; (void)a00282000; gdcm::Attribute<0x0028,0x2110> a00282110; (void)a00282110; gdcm::Attribute<0x0028,0x2112> a00282112; (void)a00282112; gdcm::Attribute<0x0028,0x2114> a00282114; (void)a00282114; gdcm::Attribute<0x0028,0x3000> a00283000; (void)a00283000; gdcm::Attribute<0x0028,0x3003> a00283003; (void)a00283003; gdcm::Attribute<0x0028,0x3004> a00283004; (void)a00283004; gdcm::Attribute<0x0028,0x3010> a00283010; (void)a00283010; gdcm::Attribute<0x0028,0x3110> a00283110; (void)a00283110; gdcm::Attribute<0x0028,0x4000> a00284000; (void)a00284000; gdcm::Attribute<0x0028,0x5000> a00285000; (void)a00285000; gdcm::Attribute<0x0028,0x6010> a00286010; (void)a00286010; gdcm::Attribute<0x0028,0x6020> a00286020; (void)a00286020; gdcm::Attribute<0x0028,0x6022> a00286022; (void)a00286022; gdcm::Attribute<0x0028,0x6023> a00286023; (void)a00286023; gdcm::Attribute<0x0028,0x6030> a00286030; (void)a00286030; gdcm::Attribute<0x0028,0x6040> a00286040; (void)a00286040; gdcm::Attribute<0x0028,0x6100> a00286100; (void)a00286100; gdcm::Attribute<0x0028,0x6101> a00286101; (void)a00286101; gdcm::Attribute<0x0028,0x6102> a00286102; (void)a00286102; gdcm::Attribute<0x0028,0x6110> a00286110; (void)a00286110; gdcm::Attribute<0x0028,0x6112> a00286112; (void)a00286112; gdcm::Attribute<0x0028,0x6114> a00286114; (void)a00286114; gdcm::Attribute<0x0028,0x6120> a00286120; (void)a00286120; gdcm::Attribute<0x0028,0x6190> a00286190; (void)a00286190; gdcm::Attribute<0x0028,0x7fe0> a00287fe0; (void)a00287fe0; gdcm::Attribute<0x0028,0x9001> a00289001; (void)a00289001; gdcm::Attribute<0x0028,0x9002> a00289002; (void)a00289002; gdcm::Attribute<0x0028,0x9003> a00289003; (void)a00289003; gdcm::Attribute<0x0028,0x9099> a00289099; (void)a00289099; gdcm::Attribute<0x0028,0x9108> a00289108; (void)a00289108; gdcm::Attribute<0x0028,0x9110> a00289110; (void)a00289110; gdcm::Attribute<0x0028,0x9132> a00289132; (void)a00289132; gdcm::Attribute<0x0028,0x9145> a00289145; (void)a00289145; gdcm::Attribute<0x0028,0x9235> a00289235; (void)a00289235; gdcm::Attribute<0x0028,0x9411> a00289411; (void)a00289411; gdcm::Attribute<0x0028,0x9415> a00289415; (void)a00289415; gdcm::Attribute<0x0028,0x9416> a00289416; (void)a00289416; gdcm::Attribute<0x0028,0x9422> a00289422; (void)a00289422; gdcm::Attribute<0x0028,0x9443> a00289443; (void)a00289443; gdcm::Attribute<0x0028,0x9444> a00289444; (void)a00289444; gdcm::Attribute<0x0028,0x9445> a00289445; (void)a00289445; gdcm::Attribute<0x0028,0x9446> a00289446; (void)a00289446; gdcm::Attribute<0x0028,0x9454> a00289454; (void)a00289454; gdcm::Attribute<0x0028,0x9474> a00289474; (void)a00289474; gdcm::Attribute<0x0028,0x9520> a00289520; (void)a00289520; gdcm::Attribute<0x0028,0x9537> a00289537; (void)a00289537; gdcm::Attribute<0x0032,0x000a> a0032000a; (void)a0032000a; gdcm::Attribute<0x0032,0x000c> a0032000c; (void)a0032000c; gdcm::Attribute<0x0032,0x0012> a00320012; (void)a00320012; gdcm::Attribute<0x0032,0x0032> a00320032; (void)a00320032; gdcm::Attribute<0x0032,0x0033> a00320033; (void)a00320033; gdcm::Attribute<0x0032,0x0034> a00320034; (void)a00320034; gdcm::Attribute<0x0032,0x0035> a00320035; (void)a00320035; gdcm::Attribute<0x0032,0x1000> a00321000; (void)a00321000; gdcm::Attribute<0x0032,0x1001> a00321001; (void)a00321001; gdcm::Attribute<0x0032,0x1010> a00321010; (void)a00321010; gdcm::Attribute<0x0032,0x1011> a00321011; (void)a00321011; gdcm::Attribute<0x0032,0x1020> a00321020; (void)a00321020; gdcm::Attribute<0x0032,0x1021> a00321021; (void)a00321021; gdcm::Attribute<0x0032,0x1030> a00321030; (void)a00321030; gdcm::Attribute<0x0032,0x1031> a00321031; (void)a00321031; gdcm::Attribute<0x0032,0x1032> a00321032; (void)a00321032; gdcm::Attribute<0x0032,0x1033> a00321033; (void)a00321033; gdcm::Attribute<0x0032,0x1040> a00321040; (void)a00321040; gdcm::Attribute<0x0032,0x1041> a00321041; (void)a00321041; gdcm::Attribute<0x0032,0x1050> a00321050; (void)a00321050; gdcm::Attribute<0x0032,0x1051> a00321051; (void)a00321051; gdcm::Attribute<0x0032,0x1055> a00321055; (void)a00321055; gdcm::Attribute<0x0032,0x1060> a00321060; (void)a00321060; gdcm::Attribute<0x0032,0x1064> a00321064; (void)a00321064; gdcm::Attribute<0x0032,0x1070> a00321070; (void)a00321070; gdcm::Attribute<0x0032,0x4000> a00324000; (void)a00324000; gdcm::Attribute<0x0038,0x0004> a00380004; (void)a00380004; gdcm::Attribute<0x0038,0x0008> a00380008; (void)a00380008; gdcm::Attribute<0x0038,0x0010> a00380010; (void)a00380010; gdcm::Attribute<0x0038,0x0011> a00380011; (void)a00380011; gdcm::Attribute<0x0038,0x0016> a00380016; (void)a00380016; gdcm::Attribute<0x0038,0x001a> a0038001a; (void)a0038001a; gdcm::Attribute<0x0038,0x001b> a0038001b; (void)a0038001b; gdcm::Attribute<0x0038,0x001c> a0038001c; (void)a0038001c; gdcm::Attribute<0x0038,0x001d> a0038001d; (void)a0038001d; gdcm::Attribute<0x0038,0x001e> a0038001e; (void)a0038001e; gdcm::Attribute<0x0038,0x0020> a00380020; (void)a00380020; gdcm::Attribute<0x0038,0x0021> a00380021; (void)a00380021; gdcm::Attribute<0x0038,0x0030> a00380030; (void)a00380030; gdcm::Attribute<0x0038,0x0032> a00380032; (void)a00380032; gdcm::Attribute<0x0038,0x0040> a00380040; (void)a00380040; gdcm::Attribute<0x0038,0x0044> a00380044; (void)a00380044; gdcm::Attribute<0x0038,0x0050> a00380050; (void)a00380050; gdcm::Attribute<0x0038,0x0060> a00380060; (void)a00380060; gdcm::Attribute<0x0038,0x0061> a00380061; (void)a00380061; gdcm::Attribute<0x0038,0x0062> a00380062; (void)a00380062; gdcm::Attribute<0x0038,0x0100> a00380100; (void)a00380100; gdcm::Attribute<0x0038,0x0300> a00380300; (void)a00380300; gdcm::Attribute<0x0038,0x0400> a00380400; (void)a00380400; gdcm::Attribute<0x0038,0x0500> a00380500; (void)a00380500; gdcm::Attribute<0x0038,0x0502> a00380502; (void)a00380502; gdcm::Attribute<0x0038,0x4000> a00384000; (void)a00384000; gdcm::Attribute<0x003a,0x0004> a003a0004; (void)a003a0004; gdcm::Attribute<0x003a,0x0005> a003a0005; (void)a003a0005; gdcm::Attribute<0x003a,0x0010> a003a0010; (void)a003a0010; gdcm::Attribute<0x003a,0x001a> a003a001a; (void)a003a001a; gdcm::Attribute<0x003a,0x0020> a003a0020; (void)a003a0020; gdcm::Attribute<0x003a,0x0200> a003a0200; (void)a003a0200; gdcm::Attribute<0x003a,0x0202> a003a0202; (void)a003a0202; gdcm::Attribute<0x003a,0x0203> a003a0203; (void)a003a0203; gdcm::Attribute<0x003a,0x0205> a003a0205; (void)a003a0205; gdcm::Attribute<0x003a,0x0208> a003a0208; (void)a003a0208; gdcm::Attribute<0x003a,0x0209> a003a0209; (void)a003a0209; gdcm::Attribute<0x003a,0x020a> a003a020a; (void)a003a020a; gdcm::Attribute<0x003a,0x020c> a003a020c; (void)a003a020c; gdcm::Attribute<0x003a,0x0210> a003a0210; (void)a003a0210; gdcm::Attribute<0x003a,0x0211> a003a0211; (void)a003a0211; gdcm::Attribute<0x003a,0x0212> a003a0212; (void)a003a0212; gdcm::Attribute<0x003a,0x0213> a003a0213; (void)a003a0213; gdcm::Attribute<0x003a,0x0214> a003a0214; (void)a003a0214; gdcm::Attribute<0x003a,0x0215> a003a0215; (void)a003a0215; gdcm::Attribute<0x003a,0x0218> a003a0218; (void)a003a0218; gdcm::Attribute<0x003a,0x021a> a003a021a; (void)a003a021a; gdcm::Attribute<0x003a,0x0220> a003a0220; (void)a003a0220; gdcm::Attribute<0x003a,0x0221> a003a0221; (void)a003a0221; gdcm::Attribute<0x003a,0x0222> a003a0222; (void)a003a0222; gdcm::Attribute<0x003a,0x0223> a003a0223; (void)a003a0223; gdcm::Attribute<0x003a,0x0230> a003a0230; (void)a003a0230; gdcm::Attribute<0x003a,0x0231> a003a0231; (void)a003a0231; gdcm::Attribute<0x003a,0x0240> a003a0240; (void)a003a0240; gdcm::Attribute<0x003a,0x0241> a003a0241; (void)a003a0241; gdcm::Attribute<0x003a,0x0242> a003a0242; (void)a003a0242; gdcm::Attribute<0x003a,0x0244> a003a0244; (void)a003a0244; gdcm::Attribute<0x003a,0x0245> a003a0245; (void)a003a0245; gdcm::Attribute<0x003a,0x0246> a003a0246; (void)a003a0246; gdcm::Attribute<0x003a,0x0247> a003a0247; (void)a003a0247; gdcm::Attribute<0x003a,0x0248> a003a0248; (void)a003a0248; gdcm::Attribute<0x003a,0x0300> a003a0300; (void)a003a0300; gdcm::Attribute<0x003a,0x0301> a003a0301; (void)a003a0301; gdcm::Attribute<0x003a,0x0302> a003a0302; (void)a003a0302; gdcm::Attribute<0x0040,0x0001> a00400001; (void)a00400001; gdcm::Attribute<0x0040,0x0002> a00400002; (void)a00400002; gdcm::Attribute<0x0040,0x0003> a00400003; (void)a00400003; gdcm::Attribute<0x0040,0x0004> a00400004; (void)a00400004; gdcm::Attribute<0x0040,0x0005> a00400005; (void)a00400005; gdcm::Attribute<0x0040,0x0006> a00400006; (void)a00400006; gdcm::Attribute<0x0040,0x0007> a00400007; (void)a00400007; gdcm::Attribute<0x0040,0x0008> a00400008; (void)a00400008; gdcm::Attribute<0x0040,0x0009> a00400009; (void)a00400009; gdcm::Attribute<0x0040,0x000a> a0040000a; (void)a0040000a; gdcm::Attribute<0x0040,0x000b> a0040000b; (void)a0040000b; gdcm::Attribute<0x0040,0x0010> a00400010; (void)a00400010; gdcm::Attribute<0x0040,0x0011> a00400011; (void)a00400011; gdcm::Attribute<0x0040,0x0012> a00400012; (void)a00400012; gdcm::Attribute<0x0040,0x0020> a00400020; (void)a00400020; gdcm::Attribute<0x0040,0x0100> a00400100; (void)a00400100; gdcm::Attribute<0x0040,0x0220> a00400220; (void)a00400220; gdcm::Attribute<0x0040,0x0241> a00400241; (void)a00400241; gdcm::Attribute<0x0040,0x0242> a00400242; (void)a00400242; gdcm::Attribute<0x0040,0x0243> a00400243; (void)a00400243; gdcm::Attribute<0x0040,0x0244> a00400244; (void)a00400244; gdcm::Attribute<0x0040,0x0245> a00400245; (void)a00400245; gdcm::Attribute<0x0040,0x0250> a00400250; (void)a00400250; gdcm::Attribute<0x0040,0x0251> a00400251; (void)a00400251; gdcm::Attribute<0x0040,0x0252> a00400252; (void)a00400252; gdcm::Attribute<0x0040,0x0253> a00400253; (void)a00400253; gdcm::Attribute<0x0040,0x0254> a00400254; (void)a00400254; gdcm::Attribute<0x0040,0x0255> a00400255; (void)a00400255; gdcm::Attribute<0x0040,0x0260> a00400260; (void)a00400260; gdcm::Attribute<0x0040,0x0270> a00400270; (void)a00400270; gdcm::Attribute<0x0040,0x0275> a00400275; (void)a00400275; gdcm::Attribute<0x0040,0x0280> a00400280; (void)a00400280; gdcm::Attribute<0x0040,0x0281> a00400281; (void)a00400281; gdcm::Attribute<0x0040,0x0293> a00400293; (void)a00400293; gdcm::Attribute<0x0040,0x0294> a00400294; (void)a00400294; gdcm::Attribute<0x0040,0x0295> a00400295; (void)a00400295; gdcm::Attribute<0x0040,0x0296> a00400296; (void)a00400296; gdcm::Attribute<0x0040,0x0300> a00400300; (void)a00400300; gdcm::Attribute<0x0040,0x0301> a00400301; (void)a00400301; gdcm::Attribute<0x0040,0x0302> a00400302; (void)a00400302; gdcm::Attribute<0x0040,0x0306> a00400306; (void)a00400306; gdcm::Attribute<0x0040,0x0307> a00400307; (void)a00400307; gdcm::Attribute<0x0040,0x030e> a0040030e; (void)a0040030e; gdcm::Attribute<0x0040,0x0310> a00400310; (void)a00400310; gdcm::Attribute<0x0040,0x0312> a00400312; (void)a00400312; gdcm::Attribute<0x0040,0x0314> a00400314; (void)a00400314; gdcm::Attribute<0x0040,0x0316> a00400316; (void)a00400316; gdcm::Attribute<0x0040,0x0318> a00400318; (void)a00400318; gdcm::Attribute<0x0040,0x0320> a00400320; (void)a00400320; gdcm::Attribute<0x0040,0x0321> a00400321; (void)a00400321; gdcm::Attribute<0x0040,0x0324> a00400324; (void)a00400324; gdcm::Attribute<0x0040,0x0330> a00400330; (void)a00400330; gdcm::Attribute<0x0040,0x0340> a00400340; (void)a00400340; gdcm::Attribute<0x0040,0x0400> a00400400; (void)a00400400; gdcm::Attribute<0x0040,0x0440> a00400440; (void)a00400440; gdcm::Attribute<0x0040,0x0441> a00400441; (void)a00400441; gdcm::Attribute<0x0040,0x050a> a0040050a; (void)a0040050a; gdcm::Attribute<0x0040,0x0550> a00400550; (void)a00400550; gdcm::Attribute<0x0040,0x0551> a00400551; (void)a00400551; gdcm::Attribute<0x0040,0x0552> a00400552; (void)a00400552; gdcm::Attribute<0x0040,0x0553> a00400553; (void)a00400553; gdcm::Attribute<0x0040,0x0555> a00400555; (void)a00400555; gdcm::Attribute<0x0040,0x0556> a00400556; (void)a00400556; gdcm::Attribute<0x0040,0x059a> a0040059a; (void)a0040059a; gdcm::Attribute<0x0040,0x06fa> a004006fa; (void)a004006fa; gdcm::Attribute<0x0040,0x071a> a0040071a; (void)a0040071a; gdcm::Attribute<0x0040,0x072a> a0040072a; (void)a0040072a; gdcm::Attribute<0x0040,0x073a> a0040073a; (void)a0040073a; gdcm::Attribute<0x0040,0x074a> a0040074a; (void)a0040074a; gdcm::Attribute<0x0040,0x08d8> a004008d8; (void)a004008d8; gdcm::Attribute<0x0040,0x08da> a004008da; (void)a004008da; gdcm::Attribute<0x0040,0x08ea> a004008ea; (void)a004008ea; gdcm::Attribute<0x0040,0x09f8> a004009f8; (void)a004009f8; gdcm::Attribute<0x0040,0x1001> a00401001; (void)a00401001; gdcm::Attribute<0x0040,0x1002> a00401002; (void)a00401002; gdcm::Attribute<0x0040,0x1003> a00401003; (void)a00401003; gdcm::Attribute<0x0040,0x1004> a00401004; (void)a00401004; gdcm::Attribute<0x0040,0x1005> a00401005; (void)a00401005; gdcm::Attribute<0x0040,0x1006> a00401006; (void)a00401006; gdcm::Attribute<0x0040,0x1007> a00401007; (void)a00401007; gdcm::Attribute<0x0040,0x1008> a00401008; (void)a00401008; gdcm::Attribute<0x0040,0x1009> a00401009; (void)a00401009; gdcm::Attribute<0x0040,0x100a> a0040100a; (void)a0040100a; gdcm::Attribute<0x0040,0x1010> a00401010; (void)a00401010; gdcm::Attribute<0x0040,0x1011> a00401011; (void)a00401011; gdcm::Attribute<0x0040,0x1101> a00401101; (void)a00401101; gdcm::Attribute<0x0040,0x1102> a00401102; (void)a00401102; gdcm::Attribute<0x0040,0x1103> a00401103; (void)a00401103; gdcm::Attribute<0x0040,0x1400> a00401400; (void)a00401400; gdcm::Attribute<0x0040,0x2001> a00402001; (void)a00402001; gdcm::Attribute<0x0040,0x2004> a00402004; (void)a00402004; gdcm::Attribute<0x0040,0x2005> a00402005; (void)a00402005; gdcm::Attribute<0x0040,0x2006> a00402006; (void)a00402006; gdcm::Attribute<0x0040,0x2007> a00402007; (void)a00402007; gdcm::Attribute<0x0040,0x2008> a00402008; (void)a00402008; gdcm::Attribute<0x0040,0x2009> a00402009; (void)a00402009; gdcm::Attribute<0x0040,0x2010> a00402010; (void)a00402010; gdcm::Attribute<0x0040,0x2016> a00402016; (void)a00402016; gdcm::Attribute<0x0040,0x2017> a00402017; (void)a00402017; gdcm::Attribute<0x0040,0x2400> a00402400; (void)a00402400; gdcm::Attribute<0x0040,0x3001> a00403001; (void)a00403001; gdcm::Attribute<0x0040,0x4001> a00404001; (void)a00404001; gdcm::Attribute<0x0040,0x4002> a00404002; (void)a00404002; gdcm::Attribute<0x0040,0x4003> a00404003; (void)a00404003; gdcm::Attribute<0x0040,0x4004> a00404004; (void)a00404004; gdcm::Attribute<0x0040,0x4005> a00404005; (void)a00404005; gdcm::Attribute<0x0040,0x4006> a00404006; (void)a00404006; gdcm::Attribute<0x0040,0x4007> a00404007; (void)a00404007; gdcm::Attribute<0x0040,0x4009> a00404009; (void)a00404009; gdcm::Attribute<0x0040,0x4010> a00404010; (void)a00404010; gdcm::Attribute<0x0040,0x4011> a00404011; (void)a00404011; gdcm::Attribute<0x0040,0x4015> a00404015; (void)a00404015; gdcm::Attribute<0x0040,0x4016> a00404016; (void)a00404016; gdcm::Attribute<0x0040,0x4018> a00404018; (void)a00404018; gdcm::Attribute<0x0040,0x4019> a00404019; (void)a00404019; gdcm::Attribute<0x0040,0x4020> a00404020; (void)a00404020; gdcm::Attribute<0x0040,0x4021> a00404021; (void)a00404021; gdcm::Attribute<0x0040,0x4022> a00404022; (void)a00404022; gdcm::Attribute<0x0040,0x4023> a00404023; (void)a00404023; gdcm::Attribute<0x0040,0x4025> a00404025; (void)a00404025; gdcm::Attribute<0x0040,0x4026> a00404026; (void)a00404026; gdcm::Attribute<0x0040,0x4027> a00404027; (void)a00404027; gdcm::Attribute<0x0040,0x4028> a00404028; (void)a00404028; gdcm::Attribute<0x0040,0x4029> a00404029; (void)a00404029; gdcm::Attribute<0x0040,0x4030> a00404030; (void)a00404030; gdcm::Attribute<0x0040,0x4031> a00404031; (void)a00404031; gdcm::Attribute<0x0040,0x4032> a00404032; (void)a00404032; gdcm::Attribute<0x0040,0x4033> a00404033; (void)a00404033; gdcm::Attribute<0x0040,0x4034> a00404034; (void)a00404034; gdcm::Attribute<0x0040,0x4035> a00404035; (void)a00404035; gdcm::Attribute<0x0040,0x4036> a00404036; (void)a00404036; gdcm::Attribute<0x0040,0x4037> a00404037; (void)a00404037; gdcm::Attribute<0x0040,0x8302> a00408302; (void)a00408302; gdcm::Attribute<0x0040,0x9094> a00409094; (void)a00409094; gdcm::Attribute<0x0040,0x9096> a00409096; (void)a00409096; gdcm::Attribute<0x0040,0x9098> a00409098; (void)a00409098; gdcm::Attribute<0x0040,0x9210> a00409210; (void)a00409210; gdcm::Attribute<0x0040,0x9212> a00409212; (void)a00409212; gdcm::Attribute<0x0040,0x9224> a00409224; (void)a00409224; gdcm::Attribute<0x0040,0x9225> a00409225; (void)a00409225; gdcm::Attribute<0x0040,0xa010> a0040a010; (void)a0040a010; gdcm::Attribute<0x0040,0xa027> a0040a027; (void)a0040a027; gdcm::Attribute<0x0040,0xa030> a0040a030; (void)a0040a030; gdcm::Attribute<0x0040,0xa032> a0040a032; (void)a0040a032; gdcm::Attribute<0x0040,0xa040> a0040a040; (void)a0040a040; gdcm::Attribute<0x0040,0xa043> a0040a043; (void)a0040a043; gdcm::Attribute<0x0040,0xa050> a0040a050; (void)a0040a050; gdcm::Attribute<0x0040,0xa073> a0040a073; (void)a0040a073; gdcm::Attribute<0x0040,0xa075> a0040a075; (void)a0040a075; gdcm::Attribute<0x0040,0xa078> a0040a078; (void)a0040a078; gdcm::Attribute<0x0040,0xa07a> a0040a07a; (void)a0040a07a; gdcm::Attribute<0x0040,0xa07c> a0040a07c; (void)a0040a07c; gdcm::Attribute<0x0040,0xa080> a0040a080; (void)a0040a080; gdcm::Attribute<0x0040,0xa082> a0040a082; (void)a0040a082; gdcm::Attribute<0x0040,0xa084> a0040a084; (void)a0040a084; gdcm::Attribute<0x0040,0xa088> a0040a088; (void)a0040a088; gdcm::Attribute<0x0040,0xa090> a0040a090; (void)a0040a090; gdcm::Attribute<0x0040,0xa0b0> a0040a0b0; (void)a0040a0b0; gdcm::Attribute<0x0040,0xa120> a0040a120; (void)a0040a120; gdcm::Attribute<0x0040,0xa121> a0040a121; (void)a0040a121; gdcm::Attribute<0x0040,0xa122> a0040a122; (void)a0040a122; gdcm::Attribute<0x0040,0xa123> a0040a123; (void)a0040a123; gdcm::Attribute<0x0040,0xa124> a0040a124; (void)a0040a124; gdcm::Attribute<0x0040,0xa130> a0040a130; (void)a0040a130; gdcm::Attribute<0x0040,0xa132> a0040a132; (void)a0040a132; gdcm::Attribute<0x0040,0xa136> a0040a136; (void)a0040a136; gdcm::Attribute<0x0040,0xa138> a0040a138; (void)a0040a138; gdcm::Attribute<0x0040,0xa13a> a0040a13a; (void)a0040a13a; gdcm::Attribute<0x0040,0xa160> a0040a160; (void)a0040a160; gdcm::Attribute<0x0040,0xa168> a0040a168; (void)a0040a168; gdcm::Attribute<0x0040,0xa170> a0040a170; (void)a0040a170; gdcm::Attribute<0x0040,0xa180> a0040a180; (void)a0040a180; gdcm::Attribute<0x0040,0xa195> a0040a195; (void)a0040a195; gdcm::Attribute<0x0040,0xa300> a0040a300; (void)a0040a300; gdcm::Attribute<0x0040,0xa301> a0040a301; (void)a0040a301; gdcm::Attribute<0x0040,0xa30a> a0040a30a; (void)a0040a30a; gdcm::Attribute<0x0040,0xa353> a0040a353; (void)a0040a353; gdcm::Attribute<0x0040,0xa354> a0040a354; (void)a0040a354; gdcm::Attribute<0x0040,0xa360> a0040a360; (void)a0040a360; gdcm::Attribute<0x0040,0xa370> a0040a370; (void)a0040a370; gdcm::Attribute<0x0040,0xa372> a0040a372; (void)a0040a372; gdcm::Attribute<0x0040,0xa375> a0040a375; (void)a0040a375; gdcm::Attribute<0x0040,0xa385> a0040a385; (void)a0040a385; gdcm::Attribute<0x0040,0xa390> a0040a390; (void)a0040a390; gdcm::Attribute<0x0040,0xa491> a0040a491; (void)a0040a491; gdcm::Attribute<0x0040,0xa492> a0040a492; (void)a0040a492; gdcm::Attribute<0x0040,0xa493> a0040a493; (void)a0040a493; gdcm::Attribute<0x0040,0xa494> a0040a494; (void)a0040a494; gdcm::Attribute<0x0040,0xa504> a0040a504; (void)a0040a504; gdcm::Attribute<0x0040,0xa525> a0040a525; (void)a0040a525; gdcm::Attribute<0x0040,0xa730> a0040a730; (void)a0040a730; gdcm::Attribute<0x0040,0xb020> a0040b020; (void)a0040b020; gdcm::Attribute<0x0040,0xdb00> a0040db00; (void)a0040db00; gdcm::Attribute<0x0040,0xdb06> a0040db06; (void)a0040db06; gdcm::Attribute<0x0040,0xdb07> a0040db07; (void)a0040db07; gdcm::Attribute<0x0040,0xdb0b> a0040db0b; (void)a0040db0b; gdcm::Attribute<0x0040,0xdb0c> a0040db0c; (void)a0040db0c; gdcm::Attribute<0x0040,0xdb0d> a0040db0d; (void)a0040db0d; gdcm::Attribute<0x0040,0xdb73> a0040db73; (void)a0040db73; gdcm::Attribute<0x0040,0xe001> a0040e001; (void)a0040e001; gdcm::Attribute<0x0040,0xe004> a0040e004; (void)a0040e004; gdcm::Attribute<0x0040,0xe006> a0040e006; (void)a0040e006; gdcm::Attribute<0x0040,0xe010> a0040e010; (void)a0040e010; gdcm::Attribute<0x0042,0x0010> a00420010; (void)a00420010; gdcm::Attribute<0x0042,0x0011> a00420011; (void)a00420011; gdcm::Attribute<0x0042,0x0012> a00420012; (void)a00420012; gdcm::Attribute<0x0042,0x0013> a00420013; (void)a00420013; gdcm::Attribute<0x0042,0x0014> a00420014; (void)a00420014; gdcm::Attribute<0x0044,0x0001> a00440001; (void)a00440001; gdcm::Attribute<0x0044,0x0002> a00440002; (void)a00440002; gdcm::Attribute<0x0044,0x0003> a00440003; (void)a00440003; gdcm::Attribute<0x0044,0x0004> a00440004; (void)a00440004; gdcm::Attribute<0x0044,0x0007> a00440007; (void)a00440007; gdcm::Attribute<0x0044,0x0008> a00440008; (void)a00440008; gdcm::Attribute<0x0044,0x0009> a00440009; (void)a00440009; gdcm::Attribute<0x0044,0x000a> a0044000a; (void)a0044000a; gdcm::Attribute<0x0044,0x000b> a0044000b; (void)a0044000b; gdcm::Attribute<0x0044,0x0010> a00440010; (void)a00440010; gdcm::Attribute<0x0044,0x0011> a00440011; (void)a00440011; gdcm::Attribute<0x0044,0x0012> a00440012; (void)a00440012; gdcm::Attribute<0x0044,0x0013> a00440013; (void)a00440013; gdcm::Attribute<0x0044,0x0019> a00440019; (void)a00440019; gdcm::Attribute<0x0050,0x0004> a00500004; (void)a00500004; gdcm::Attribute<0x0050,0x0010> a00500010; (void)a00500010; gdcm::Attribute<0x0050,0x0014> a00500014; (void)a00500014; gdcm::Attribute<0x0050,0x0016> a00500016; (void)a00500016; gdcm::Attribute<0x0050,0x0017> a00500017; (void)a00500017; gdcm::Attribute<0x0050,0x0018> a00500018; (void)a00500018; gdcm::Attribute<0x0050,0x0019> a00500019; (void)a00500019; gdcm::Attribute<0x0050,0x0020> a00500020; (void)a00500020; gdcm::Attribute<0x0054,0x0010> a00540010; (void)a00540010; gdcm::Attribute<0x0054,0x0011> a00540011; (void)a00540011; gdcm::Attribute<0x0054,0x0012> a00540012; (void)a00540012; gdcm::Attribute<0x0054,0x0013> a00540013; (void)a00540013; gdcm::Attribute<0x0054,0x0014> a00540014; (void)a00540014; gdcm::Attribute<0x0054,0x0015> a00540015; (void)a00540015; gdcm::Attribute<0x0054,0x0016> a00540016; (void)a00540016; gdcm::Attribute<0x0054,0x0017> a00540017; (void)a00540017; gdcm::Attribute<0x0054,0x0018> a00540018; (void)a00540018; gdcm::Attribute<0x0054,0x0020> a00540020; (void)a00540020; gdcm::Attribute<0x0054,0x0021> a00540021; (void)a00540021; gdcm::Attribute<0x0054,0x0022> a00540022; (void)a00540022; gdcm::Attribute<0x0054,0x0030> a00540030; (void)a00540030; gdcm::Attribute<0x0054,0x0031> a00540031; (void)a00540031; gdcm::Attribute<0x0054,0x0032> a00540032; (void)a00540032; gdcm::Attribute<0x0054,0x0033> a00540033; (void)a00540033; gdcm::Attribute<0x0054,0x0036> a00540036; (void)a00540036; gdcm::Attribute<0x0054,0x0038> a00540038; (void)a00540038; gdcm::Attribute<0x0054,0x0039> a00540039; (void)a00540039; gdcm::Attribute<0x0054,0x0050> a00540050; (void)a00540050; gdcm::Attribute<0x0054,0x0051> a00540051; (void)a00540051; gdcm::Attribute<0x0054,0x0052> a00540052; (void)a00540052; gdcm::Attribute<0x0054,0x0053> a00540053; (void)a00540053; gdcm::Attribute<0x0054,0x0060> a00540060; (void)a00540060; gdcm::Attribute<0x0054,0x0061> a00540061; (void)a00540061; gdcm::Attribute<0x0054,0x0062> a00540062; (void)a00540062; gdcm::Attribute<0x0054,0x0063> a00540063; (void)a00540063; gdcm::Attribute<0x0054,0x0070> a00540070; (void)a00540070; gdcm::Attribute<0x0054,0x0071> a00540071; (void)a00540071; gdcm::Attribute<0x0054,0x0072> a00540072; (void)a00540072; gdcm::Attribute<0x0054,0x0073> a00540073; (void)a00540073; gdcm::Attribute<0x0054,0x0080> a00540080; (void)a00540080; gdcm::Attribute<0x0054,0x0081> a00540081; (void)a00540081; gdcm::Attribute<0x0054,0x0090> a00540090; (void)a00540090; gdcm::Attribute<0x0054,0x0100> a00540100; (void)a00540100; gdcm::Attribute<0x0054,0x0101> a00540101; (void)a00540101; gdcm::Attribute<0x0054,0x0200> a00540200; (void)a00540200; gdcm::Attribute<0x0054,0x0202> a00540202; (void)a00540202; gdcm::Attribute<0x0054,0x0210> a00540210; (void)a00540210; gdcm::Attribute<0x0054,0x0211> a00540211; (void)a00540211; gdcm::Attribute<0x0054,0x0220> a00540220; (void)a00540220; gdcm::Attribute<0x0054,0x0222> a00540222; (void)a00540222; gdcm::Attribute<0x0054,0x0300> a00540300; (void)a00540300; gdcm::Attribute<0x0054,0x0302> a00540302; (void)a00540302; gdcm::Attribute<0x0054,0x0304> a00540304; (void)a00540304; gdcm::Attribute<0x0054,0x0306> a00540306; (void)a00540306; gdcm::Attribute<0x0054,0x0308> a00540308; (void)a00540308; gdcm::Attribute<0x0054,0x0400> a00540400; (void)a00540400; gdcm::Attribute<0x0054,0x0410> a00540410; (void)a00540410; gdcm::Attribute<0x0054,0x0412> a00540412; (void)a00540412; gdcm::Attribute<0x0054,0x0414> a00540414; (void)a00540414; gdcm::Attribute<0x0054,0x0500> a00540500; (void)a00540500; gdcm::Attribute<0x0054,0x1000> a00541000; (void)a00541000; gdcm::Attribute<0x0054,0x1001> a00541001; (void)a00541001; gdcm::Attribute<0x0054,0x1002> a00541002; (void)a00541002; gdcm::Attribute<0x0054,0x1004> a00541004; (void)a00541004; gdcm::Attribute<0x0054,0x1100> a00541100; (void)a00541100; gdcm::Attribute<0x0054,0x1101> a00541101; (void)a00541101; gdcm::Attribute<0x0054,0x1102> a00541102; (void)a00541102; gdcm::Attribute<0x0054,0x1103> a00541103; (void)a00541103; gdcm::Attribute<0x0054,0x1104> a00541104; (void)a00541104; gdcm::Attribute<0x0054,0x1105> a00541105; (void)a00541105; gdcm::Attribute<0x0054,0x1200> a00541200; (void)a00541200; gdcm::Attribute<0x0054,0x1201> a00541201; (void)a00541201; gdcm::Attribute<0x0054,0x1202> a00541202; (void)a00541202; gdcm::Attribute<0x0054,0x1203> a00541203; (void)a00541203; gdcm::Attribute<0x0054,0x1210> a00541210; (void)a00541210; gdcm::Attribute<0x0054,0x1220> a00541220; (void)a00541220; gdcm::Attribute<0x0054,0x1300> a00541300; (void)a00541300; gdcm::Attribute<0x0054,0x1310> a00541310; (void)a00541310; gdcm::Attribute<0x0054,0x1311> a00541311; (void)a00541311; gdcm::Attribute<0x0054,0x1320> a00541320; (void)a00541320; gdcm::Attribute<0x0054,0x1321> a00541321; (void)a00541321; gdcm::Attribute<0x0054,0x1322> a00541322; (void)a00541322; gdcm::Attribute<0x0054,0x1323> a00541323; (void)a00541323; gdcm::Attribute<0x0054,0x1324> a00541324; (void)a00541324; gdcm::Attribute<0x0054,0x1330> a00541330; (void)a00541330; gdcm::Attribute<0x0054,0x1400> a00541400; (void)a00541400; gdcm::Attribute<0x0054,0x1401> a00541401; (void)a00541401; gdcm::Attribute<0x0060,0x3000> a00603000; (void)a00603000; gdcm::Attribute<0x0060,0x3002> a00603002; (void)a00603002; gdcm::Attribute<0x0060,0x3008> a00603008; (void)a00603008; gdcm::Attribute<0x0060,0x3010> a00603010; (void)a00603010; gdcm::Attribute<0x0060,0x3020> a00603020; (void)a00603020; gdcm::Attribute<0x0062,0x0001> a00620001; (void)a00620001; gdcm::Attribute<0x0062,0x0002> a00620002; (void)a00620002; gdcm::Attribute<0x0062,0x0003> a00620003; (void)a00620003; gdcm::Attribute<0x0062,0x0004> a00620004; (void)a00620004; gdcm::Attribute<0x0062,0x0005> a00620005; (void)a00620005; gdcm::Attribute<0x0062,0x0006> a00620006; (void)a00620006; gdcm::Attribute<0x0062,0x0008> a00620008; (void)a00620008; gdcm::Attribute<0x0062,0x0009> a00620009; (void)a00620009; gdcm::Attribute<0x0062,0x000a> a0062000a; (void)a0062000a; gdcm::Attribute<0x0062,0x000b> a0062000b; (void)a0062000b; gdcm::Attribute<0x0062,0x000c> a0062000c; (void)a0062000c; gdcm::Attribute<0x0062,0x000d> a0062000d; (void)a0062000d; gdcm::Attribute<0x0062,0x000e> a0062000e; (void)a0062000e; gdcm::Attribute<0x0062,0x000f> a0062000f; (void)a0062000f; gdcm::Attribute<0x0062,0x0010> a00620010; (void)a00620010; gdcm::Attribute<0x0064,0x0002> a00640002; (void)a00640002; gdcm::Attribute<0x0064,0x0003> a00640003; (void)a00640003; gdcm::Attribute<0x0064,0x0005> a00640005; (void)a00640005; gdcm::Attribute<0x0064,0x0007> a00640007; (void)a00640007; gdcm::Attribute<0x0064,0x0008> a00640008; (void)a00640008; gdcm::Attribute<0x0064,0x0009> a00640009; (void)a00640009; gdcm::Attribute<0x0064,0x000f> a0064000f; (void)a0064000f; gdcm::Attribute<0x0064,0x0010> a00640010; (void)a00640010; gdcm::Attribute<0x0070,0x0001> a00700001; (void)a00700001; gdcm::Attribute<0x0070,0x0002> a00700002; (void)a00700002; gdcm::Attribute<0x0070,0x0003> a00700003; (void)a00700003; gdcm::Attribute<0x0070,0x0004> a00700004; (void)a00700004; gdcm::Attribute<0x0070,0x0005> a00700005; (void)a00700005; gdcm::Attribute<0x0070,0x0006> a00700006; (void)a00700006; gdcm::Attribute<0x0070,0x0008> a00700008; (void)a00700008; gdcm::Attribute<0x0070,0x0009> a00700009; (void)a00700009; gdcm::Attribute<0x0070,0x0010> a00700010; (void)a00700010; gdcm::Attribute<0x0070,0x0011> a00700011; (void)a00700011; gdcm::Attribute<0x0070,0x0012> a00700012; (void)a00700012; gdcm::Attribute<0x0070,0x0014> a00700014; (void)a00700014; gdcm::Attribute<0x0070,0x0015> a00700015; (void)a00700015; gdcm::Attribute<0x0070,0x0020> a00700020; (void)a00700020; gdcm::Attribute<0x0070,0x0021> a00700021; (void)a00700021; gdcm::Attribute<0x0070,0x0022> a00700022; (void)a00700022; gdcm::Attribute<0x0070,0x0023> a00700023; (void)a00700023; gdcm::Attribute<0x0070,0x0024> a00700024; (void)a00700024; gdcm::Attribute<0x0070,0x0040> a00700040; (void)a00700040; gdcm::Attribute<0x0070,0x0041> a00700041; (void)a00700041; gdcm::Attribute<0x0070,0x0042> a00700042; (void)a00700042; gdcm::Attribute<0x0070,0x0050> a00700050; (void)a00700050; gdcm::Attribute<0x0070,0x0051> a00700051; (void)a00700051; gdcm::Attribute<0x0070,0x0052> a00700052; (void)a00700052; gdcm::Attribute<0x0070,0x0053> a00700053; (void)a00700053; gdcm::Attribute<0x0070,0x005a> a0070005a; (void)a0070005a; gdcm::Attribute<0x0070,0x0060> a00700060; (void)a00700060; gdcm::Attribute<0x0070,0x0062> a00700062; (void)a00700062; gdcm::Attribute<0x0070,0x0066> a00700066; (void)a00700066; gdcm::Attribute<0x0070,0x0067> a00700067; (void)a00700067; gdcm::Attribute<0x0070,0x0068> a00700068; (void)a00700068; gdcm::Attribute<0x0070,0x0080> a00700080; (void)a00700080; gdcm::Attribute<0x0070,0x0081> a00700081; (void)a00700081; gdcm::Attribute<0x0070,0x0082> a00700082; (void)a00700082; gdcm::Attribute<0x0070,0x0083> a00700083; (void)a00700083; gdcm::Attribute<0x0070,0x0084> a00700084; (void)a00700084; gdcm::Attribute<0x0070,0x0086> a00700086; (void)a00700086; gdcm::Attribute<0x0070,0x0100> a00700100; (void)a00700100; gdcm::Attribute<0x0070,0x0101> a00700101; (void)a00700101; gdcm::Attribute<0x0070,0x0102> a00700102; (void)a00700102; gdcm::Attribute<0x0070,0x0103> a00700103; (void)a00700103; gdcm::Attribute<0x0070,0x0306> a00700306; (void)a00700306; gdcm::Attribute<0x0070,0x0308> a00700308; (void)a00700308; gdcm::Attribute<0x0070,0x0309> a00700309; (void)a00700309; gdcm::Attribute<0x0070,0x030a> a0070030a; (void)a0070030a; gdcm::Attribute<0x0070,0x030c> a0070030c; (void)a0070030c; gdcm::Attribute<0x0070,0x030d> a0070030d; (void)a0070030d; gdcm::Attribute<0x0070,0x030f> a0070030f; (void)a0070030f; gdcm::Attribute<0x0070,0x0310> a00700310; (void)a00700310; gdcm::Attribute<0x0070,0x0311> a00700311; (void)a00700311; gdcm::Attribute<0x0070,0x0312> a00700312; (void)a00700312; gdcm::Attribute<0x0070,0x0314> a00700314; (void)a00700314; gdcm::Attribute<0x0070,0x0318> a00700318; (void)a00700318; gdcm::Attribute<0x0070,0x031a> a0070031a; (void)a0070031a; gdcm::Attribute<0x0070,0x031c> a0070031c; (void)a0070031c; gdcm::Attribute<0x0070,0x031e> a0070031e; (void)a0070031e; gdcm::Attribute<0x0070,0x0401> a00700401; (void)a00700401; gdcm::Attribute<0x0070,0x0402> a00700402; (void)a00700402; gdcm::Attribute<0x0070,0x0403> a00700403; (void)a00700403; gdcm::Attribute<0x0070,0x0404> a00700404; (void)a00700404; gdcm::Attribute<0x0070,0x0405> a00700405; (void)a00700405; gdcm::Attribute<0x0072,0x0002> a00720002; (void)a00720002; gdcm::Attribute<0x0072,0x0004> a00720004; (void)a00720004; gdcm::Attribute<0x0072,0x0006> a00720006; (void)a00720006; gdcm::Attribute<0x0072,0x0008> a00720008; (void)a00720008; gdcm::Attribute<0x0072,0x000a> a0072000a; (void)a0072000a; gdcm::Attribute<0x0072,0x000c> a0072000c; (void)a0072000c; gdcm::Attribute<0x0072,0x000e> a0072000e; (void)a0072000e; gdcm::Attribute<0x0072,0x0010> a00720010; (void)a00720010; gdcm::Attribute<0x0072,0x0012> a00720012; (void)a00720012; gdcm::Attribute<0x0072,0x0014> a00720014; (void)a00720014; gdcm::Attribute<0x0072,0x0020> a00720020; (void)a00720020; gdcm::Attribute<0x0072,0x0022> a00720022; (void)a00720022; gdcm::Attribute<0x0072,0x0024> a00720024; (void)a00720024; gdcm::Attribute<0x0072,0x0026> a00720026; (void)a00720026; gdcm::Attribute<0x0072,0x0028> a00720028; (void)a00720028; gdcm::Attribute<0x0072,0x0030> a00720030; (void)a00720030; gdcm::Attribute<0x0072,0x0032> a00720032; (void)a00720032; gdcm::Attribute<0x0072,0x0034> a00720034; (void)a00720034; gdcm::Attribute<0x0072,0x0038> a00720038; (void)a00720038; gdcm::Attribute<0x0072,0x003a> a0072003a; (void)a0072003a; gdcm::Attribute<0x0072,0x003c> a0072003c; (void)a0072003c; gdcm::Attribute<0x0072,0x003e> a0072003e; (void)a0072003e; gdcm::Attribute<0x0072,0x0040> a00720040; (void)a00720040; gdcm::Attribute<0x0072,0x0050> a00720050; (void)a00720050; gdcm::Attribute<0x0072,0x0052> a00720052; (void)a00720052; gdcm::Attribute<0x0072,0x0054> a00720054; (void)a00720054; gdcm::Attribute<0x0072,0x0056> a00720056; (void)a00720056; gdcm::Attribute<0x0072,0x0060> a00720060; (void)a00720060; gdcm::Attribute<0x0072,0x0062> a00720062; (void)a00720062; gdcm::Attribute<0x0072,0x0064> a00720064; (void)a00720064; gdcm::Attribute<0x0072,0x0066> a00720066; (void)a00720066; gdcm::Attribute<0x0072,0x0068> a00720068; (void)a00720068; gdcm::Attribute<0x0072,0x006a> a0072006a; (void)a0072006a; gdcm::Attribute<0x0072,0x006c> a0072006c; (void)a0072006c; gdcm::Attribute<0x0072,0x006e> a0072006e; (void)a0072006e; gdcm::Attribute<0x0072,0x0070> a00720070; (void)a00720070; gdcm::Attribute<0x0072,0x0072> a00720072; (void)a00720072; gdcm::Attribute<0x0072,0x0074> a00720074; (void)a00720074; gdcm::Attribute<0x0072,0x0076> a00720076; (void)a00720076; gdcm::Attribute<0x0072,0x0078> a00720078; (void)a00720078; gdcm::Attribute<0x0072,0x007a> a0072007a; (void)a0072007a; gdcm::Attribute<0x0072,0x007c> a0072007c; (void)a0072007c; gdcm::Attribute<0x0072,0x007e> a0072007e; (void)a0072007e; gdcm::Attribute<0x0072,0x0080> a00720080; (void)a00720080; gdcm::Attribute<0x0072,0x0100> a00720100; (void)a00720100; gdcm::Attribute<0x0072,0x0102> a00720102; (void)a00720102; gdcm::Attribute<0x0072,0x0104> a00720104; (void)a00720104; gdcm::Attribute<0x0072,0x0106> a00720106; (void)a00720106; gdcm::Attribute<0x0072,0x0108> a00720108; (void)a00720108; gdcm::Attribute<0x0072,0x010a> a0072010a; (void)a0072010a; gdcm::Attribute<0x0072,0x010c> a0072010c; (void)a0072010c; gdcm::Attribute<0x0072,0x010e> a0072010e; (void)a0072010e; gdcm::Attribute<0x0072,0x0200> a00720200; (void)a00720200; gdcm::Attribute<0x0072,0x0202> a00720202; (void)a00720202; gdcm::Attribute<0x0072,0x0203> a00720203; (void)a00720203; gdcm::Attribute<0x0072,0x0204> a00720204; (void)a00720204; gdcm::Attribute<0x0072,0x0206> a00720206; (void)a00720206; gdcm::Attribute<0x0072,0x0208> a00720208; (void)a00720208; gdcm::Attribute<0x0072,0x0210> a00720210; (void)a00720210; gdcm::Attribute<0x0072,0x0212> a00720212; (void)a00720212; gdcm::Attribute<0x0072,0x0214> a00720214; (void)a00720214; gdcm::Attribute<0x0072,0x0216> a00720216; (void)a00720216; gdcm::Attribute<0x0072,0x0218> a00720218; (void)a00720218; gdcm::Attribute<0x0072,0x0300> a00720300; (void)a00720300; gdcm::Attribute<0x0072,0x0302> a00720302; (void)a00720302; gdcm::Attribute<0x0072,0x0304> a00720304; (void)a00720304; gdcm::Attribute<0x0072,0x0306> a00720306; (void)a00720306; gdcm::Attribute<0x0072,0x0308> a00720308; (void)a00720308; gdcm::Attribute<0x0072,0x0310> a00720310; (void)a00720310; gdcm::Attribute<0x0072,0x0312> a00720312; (void)a00720312; gdcm::Attribute<0x0072,0x0314> a00720314; (void)a00720314; gdcm::Attribute<0x0072,0x0316> a00720316; (void)a00720316; gdcm::Attribute<0x0072,0x0318> a00720318; (void)a00720318; gdcm::Attribute<0x0072,0x0320> a00720320; (void)a00720320; gdcm::Attribute<0x0072,0x0330> a00720330; (void)a00720330; gdcm::Attribute<0x0072,0x0400> a00720400; (void)a00720400; gdcm::Attribute<0x0072,0x0402> a00720402; (void)a00720402; gdcm::Attribute<0x0072,0x0404> a00720404; (void)a00720404; gdcm::Attribute<0x0072,0x0406> a00720406; (void)a00720406; gdcm::Attribute<0x0072,0x0500> a00720500; (void)a00720500; gdcm::Attribute<0x0072,0x0510> a00720510; (void)a00720510; gdcm::Attribute<0x0072,0x0512> a00720512; (void)a00720512; gdcm::Attribute<0x0072,0x0514> a00720514; (void)a00720514; gdcm::Attribute<0x0072,0x0516> a00720516; (void)a00720516; gdcm::Attribute<0x0072,0x0520> a00720520; (void)a00720520; gdcm::Attribute<0x0072,0x0600> a00720600; (void)a00720600; gdcm::Attribute<0x0072,0x0602> a00720602; (void)a00720602; gdcm::Attribute<0x0072,0x0604> a00720604; (void)a00720604; gdcm::Attribute<0x0072,0x0700> a00720700; (void)a00720700; gdcm::Attribute<0x0072,0x0702> a00720702; (void)a00720702; gdcm::Attribute<0x0072,0x0704> a00720704; (void)a00720704; gdcm::Attribute<0x0072,0x0706> a00720706; (void)a00720706; gdcm::Attribute<0x0072,0x0710> a00720710; (void)a00720710; gdcm::Attribute<0x0072,0x0712> a00720712; (void)a00720712; gdcm::Attribute<0x0072,0x0714> a00720714; (void)a00720714; gdcm::Attribute<0x0072,0x0716> a00720716; (void)a00720716; gdcm::Attribute<0x0072,0x0717> a00720717; (void)a00720717; gdcm::Attribute<0x0072,0x0718> a00720718; (void)a00720718; gdcm::Attribute<0x0074,0x1000> a00741000; (void)a00741000; gdcm::Attribute<0x0074,0x1002> a00741002; (void)a00741002; gdcm::Attribute<0x0074,0x1004> a00741004; (void)a00741004; gdcm::Attribute<0x0074,0x1006> a00741006; (void)a00741006; gdcm::Attribute<0x0074,0x1008> a00741008; (void)a00741008; gdcm::Attribute<0x0074,0x100a> a0074100a; (void)a0074100a; gdcm::Attribute<0x0074,0x100c> a0074100c; (void)a0074100c; gdcm::Attribute<0x0074,0x100e> a0074100e; (void)a0074100e; gdcm::Attribute<0x0074,0x1020> a00741020; (void)a00741020; gdcm::Attribute<0x0074,0x1022> a00741022; (void)a00741022; gdcm::Attribute<0x0074,0x1024> a00741024; (void)a00741024; gdcm::Attribute<0x0074,0x1030> a00741030; (void)a00741030; gdcm::Attribute<0x0074,0x1032> a00741032; (void)a00741032; gdcm::Attribute<0x0074,0x1034> a00741034; (void)a00741034; gdcm::Attribute<0x0074,0x1036> a00741036; (void)a00741036; gdcm::Attribute<0x0074,0x1038> a00741038; (void)a00741038; gdcm::Attribute<0x0074,0x103a> a0074103a; (void)a0074103a; gdcm::Attribute<0x0074,0x1040> a00741040; (void)a00741040; gdcm::Attribute<0x0074,0x1042> a00741042; (void)a00741042; gdcm::Attribute<0x0074,0x1044> a00741044; (void)a00741044; gdcm::Attribute<0x0074,0x1046> a00741046; (void)a00741046; gdcm::Attribute<0x0074,0x1048> a00741048; (void)a00741048; gdcm::Attribute<0x0074,0x104a> a0074104a; (void)a0074104a; gdcm::Attribute<0x0074,0x104c> a0074104c; (void)a0074104c; gdcm::Attribute<0x0074,0x104e> a0074104e; (void)a0074104e; gdcm::Attribute<0x0074,0x1050> a00741050; (void)a00741050; gdcm::Attribute<0x0074,0x1052> a00741052; (void)a00741052; gdcm::Attribute<0x0074,0x1054> a00741054; (void)a00741054; gdcm::Attribute<0x0074,0x1056> a00741056; (void)a00741056; gdcm::Attribute<0x0074,0x1200> a00741200; (void)a00741200; gdcm::Attribute<0x0074,0x1202> a00741202; (void)a00741202; gdcm::Attribute<0x0074,0x1204> a00741204; (void)a00741204; gdcm::Attribute<0x0074,0x1210> a00741210; (void)a00741210; gdcm::Attribute<0x0074,0x1212> a00741212; (void)a00741212; gdcm::Attribute<0x0074,0x1216> a00741216; (void)a00741216; gdcm::Attribute<0x0074,0x1220> a00741220; (void)a00741220; gdcm::Attribute<0x0074,0x1222> a00741222; (void)a00741222; gdcm::Attribute<0x0074,0x1230> a00741230; (void)a00741230; gdcm::Attribute<0x0074,0x1234> a00741234; (void)a00741234; gdcm::Attribute<0x0074,0x1236> a00741236; (void)a00741236; gdcm::Attribute<0x0074,0x1238> a00741238; (void)a00741238; gdcm::Attribute<0x0074,0x1242> a00741242; (void)a00741242; gdcm::Attribute<0x0074,0x1244> a00741244; (void)a00741244; gdcm::Attribute<0x0074,0x1246> a00741246; (void)a00741246; gdcm::Attribute<0x0088,0x0130> a00880130; (void)a00880130; gdcm::Attribute<0x0088,0x0140> a00880140; (void)a00880140; gdcm::Attribute<0x0088,0x0200> a00880200; (void)a00880200; gdcm::Attribute<0x0088,0x0904> a00880904; (void)a00880904; gdcm::Attribute<0x0088,0x0906> a00880906; (void)a00880906; gdcm::Attribute<0x0088,0x0910> a00880910; (void)a00880910; gdcm::Attribute<0x0100,0x0410> a01000410; (void)a01000410; gdcm::Attribute<0x0100,0x0420> a01000420; (void)a01000420; gdcm::Attribute<0x0100,0x0424> a01000424; (void)a01000424; gdcm::Attribute<0x0100,0x0426> a01000426; (void)a01000426; gdcm::Attribute<0x0400,0x0005> a04000005; (void)a04000005; gdcm::Attribute<0x0400,0x0010> a04000010; (void)a04000010; gdcm::Attribute<0x0400,0x0015> a04000015; (void)a04000015; gdcm::Attribute<0x0400,0x0020> a04000020; (void)a04000020; gdcm::Attribute<0x0400,0x0100> a04000100; (void)a04000100; gdcm::Attribute<0x0400,0x0105> a04000105; (void)a04000105; gdcm::Attribute<0x0400,0x0110> a04000110; (void)a04000110; gdcm::Attribute<0x0400,0x0115> a04000115; (void)a04000115; gdcm::Attribute<0x0400,0x0120> a04000120; (void)a04000120; gdcm::Attribute<0x0400,0x0305> a04000305; (void)a04000305; gdcm::Attribute<0x0400,0x0310> a04000310; (void)a04000310; gdcm::Attribute<0x0400,0x0401> a04000401; (void)a04000401; gdcm::Attribute<0x0400,0x0402> a04000402; (void)a04000402; gdcm::Attribute<0x0400,0x0403> a04000403; (void)a04000403; gdcm::Attribute<0x0400,0x0404> a04000404; (void)a04000404; gdcm::Attribute<0x0400,0x0500> a04000500; (void)a04000500; gdcm::Attribute<0x0400,0x0510> a04000510; (void)a04000510; gdcm::Attribute<0x0400,0x0520> a04000520; (void)a04000520; gdcm::Attribute<0x0400,0x0550> a04000550; (void)a04000550; gdcm::Attribute<0x0400,0x0561> a04000561; (void)a04000561; gdcm::Attribute<0x0400,0x0562> a04000562; (void)a04000562; gdcm::Attribute<0x0400,0x0563> a04000563; (void)a04000563; gdcm::Attribute<0x0400,0x0564> a04000564; (void)a04000564; gdcm::Attribute<0x0400,0x0565> a04000565; (void)a04000565; gdcm::Attribute<0x2000,0x0010> a20000010; (void)a20000010; gdcm::Attribute<0x2000,0x001e> a2000001e; (void)a2000001e; gdcm::Attribute<0x2000,0x0020> a20000020; (void)a20000020; gdcm::Attribute<0x2000,0x0030> a20000030; (void)a20000030; gdcm::Attribute<0x2000,0x0040> a20000040; (void)a20000040; gdcm::Attribute<0x2000,0x0050> a20000050; (void)a20000050; gdcm::Attribute<0x2000,0x0060> a20000060; (void)a20000060; gdcm::Attribute<0x2000,0x0061> a20000061; (void)a20000061; gdcm::Attribute<0x2000,0x0062> a20000062; (void)a20000062; gdcm::Attribute<0x2000,0x0063> a20000063; (void)a20000063; gdcm::Attribute<0x2000,0x0065> a20000065; (void)a20000065; gdcm::Attribute<0x2000,0x0067> a20000067; (void)a20000067; gdcm::Attribute<0x2000,0x0069> a20000069; (void)a20000069; gdcm::Attribute<0x2000,0x006a> a2000006a; (void)a2000006a; gdcm::Attribute<0x2000,0x00a0> a200000a0; (void)a200000a0; gdcm::Attribute<0x2000,0x00a1> a200000a1; (void)a200000a1; gdcm::Attribute<0x2000,0x00a2> a200000a2; (void)a200000a2; gdcm::Attribute<0x2000,0x00a4> a200000a4; (void)a200000a4; gdcm::Attribute<0x2000,0x00a8> a200000a8; (void)a200000a8; gdcm::Attribute<0x2000,0x0500> a20000500; (void)a20000500; gdcm::Attribute<0x2000,0x0510> a20000510; (void)a20000510; gdcm::Attribute<0x2010,0x0010> a20100010; (void)a20100010; gdcm::Attribute<0x2010,0x0030> a20100030; (void)a20100030; gdcm::Attribute<0x2010,0x0040> a20100040; (void)a20100040; gdcm::Attribute<0x2010,0x0050> a20100050; (void)a20100050; gdcm::Attribute<0x2010,0x0052> a20100052; (void)a20100052; gdcm::Attribute<0x2010,0x0054> a20100054; (void)a20100054; gdcm::Attribute<0x2010,0x0060> a20100060; (void)a20100060; gdcm::Attribute<0x2010,0x0080> a20100080; (void)a20100080; gdcm::Attribute<0x2010,0x00a6> a201000a6; (void)a201000a6; gdcm::Attribute<0x2010,0x00a7> a201000a7; (void)a201000a7; gdcm::Attribute<0x2010,0x00a8> a201000a8; (void)a201000a8; gdcm::Attribute<0x2010,0x00a9> a201000a9; (void)a201000a9; gdcm::Attribute<0x2010,0x0100> a20100100; (void)a20100100; gdcm::Attribute<0x2010,0x0110> a20100110; (void)a20100110; gdcm::Attribute<0x2010,0x0120> a20100120; (void)a20100120; gdcm::Attribute<0x2010,0x0130> a20100130; (void)a20100130; gdcm::Attribute<0x2010,0x0140> a20100140; (void)a20100140; gdcm::Attribute<0x2010,0x0150> a20100150; (void)a20100150; gdcm::Attribute<0x2010,0x0152> a20100152; (void)a20100152; gdcm::Attribute<0x2010,0x0154> a20100154; (void)a20100154; gdcm::Attribute<0x2010,0x015e> a2010015e; (void)a2010015e; gdcm::Attribute<0x2010,0x0160> a20100160; (void)a20100160; gdcm::Attribute<0x2010,0x0376> a20100376; (void)a20100376; gdcm::Attribute<0x2010,0x0500> a20100500; (void)a20100500; gdcm::Attribute<0x2010,0x0510> a20100510; (void)a20100510; gdcm::Attribute<0x2010,0x0520> a20100520; (void)a20100520; gdcm::Attribute<0x2020,0x0010> a20200010; (void)a20200010; gdcm::Attribute<0x2020,0x0020> a20200020; (void)a20200020; gdcm::Attribute<0x2020,0x0030> a20200030; (void)a20200030; gdcm::Attribute<0x2020,0x0040> a20200040; (void)a20200040; gdcm::Attribute<0x2020,0x0050> a20200050; (void)a20200050; gdcm::Attribute<0x2020,0x00a0> a202000a0; (void)a202000a0; gdcm::Attribute<0x2020,0x00a2> a202000a2; (void)a202000a2; gdcm::Attribute<0x2020,0x0110> a20200110; (void)a20200110; gdcm::Attribute<0x2020,0x0111> a20200111; (void)a20200111; gdcm::Attribute<0x2020,0x0130> a20200130; (void)a20200130; gdcm::Attribute<0x2020,0x0140> a20200140; (void)a20200140; gdcm::Attribute<0x2030,0x0010> a20300010; (void)a20300010; gdcm::Attribute<0x2030,0x0020> a20300020; (void)a20300020; gdcm::Attribute<0x2040,0x0010> a20400010; (void)a20400010; gdcm::Attribute<0x2040,0x0020> a20400020; (void)a20400020; gdcm::Attribute<0x2040,0x0060> a20400060; (void)a20400060; gdcm::Attribute<0x2040,0x0070> a20400070; (void)a20400070; gdcm::Attribute<0x2040,0x0072> a20400072; (void)a20400072; gdcm::Attribute<0x2040,0x0074> a20400074; (void)a20400074; gdcm::Attribute<0x2040,0x0080> a20400080; (void)a20400080; gdcm::Attribute<0x2040,0x0082> a20400082; (void)a20400082; gdcm::Attribute<0x2040,0x0090> a20400090; (void)a20400090; gdcm::Attribute<0x2040,0x0100> a20400100; (void)a20400100; gdcm::Attribute<0x2040,0x0500> a20400500; (void)a20400500; gdcm::Attribute<0x2050,0x0010> a20500010; (void)a20500010; gdcm::Attribute<0x2050,0x0020> a20500020; (void)a20500020; gdcm::Attribute<0x2050,0x0500> a20500500; (void)a20500500; gdcm::Attribute<0x2100,0x0010> a21000010; (void)a21000010; gdcm::Attribute<0x2100,0x0020> a21000020; (void)a21000020; gdcm::Attribute<0x2100,0x0030> a21000030; (void)a21000030; gdcm::Attribute<0x2100,0x0040> a21000040; (void)a21000040; gdcm::Attribute<0x2100,0x0050> a21000050; (void)a21000050; gdcm::Attribute<0x2100,0x0070> a21000070; (void)a21000070; gdcm::Attribute<0x2100,0x0140> a21000140; (void)a21000140; gdcm::Attribute<0x2100,0x0160> a21000160; (void)a21000160; gdcm::Attribute<0x2100,0x0170> a21000170; (void)a21000170; gdcm::Attribute<0x2100,0x0500> a21000500; (void)a21000500; gdcm::Attribute<0x2110,0x0010> a21100010; (void)a21100010; gdcm::Attribute<0x2110,0x0020> a21100020; (void)a21100020; gdcm::Attribute<0x2110,0x0030> a21100030; (void)a21100030; gdcm::Attribute<0x2110,0x0099> a21100099; (void)a21100099; gdcm::Attribute<0x2120,0x0010> a21200010; (void)a21200010; gdcm::Attribute<0x2120,0x0050> a21200050; (void)a21200050; gdcm::Attribute<0x2120,0x0070> a21200070; (void)a21200070; gdcm::Attribute<0x2130,0x0010> a21300010; (void)a21300010; gdcm::Attribute<0x2130,0x0015> a21300015; (void)a21300015; gdcm::Attribute<0x2130,0x0030> a21300030; (void)a21300030; gdcm::Attribute<0x2130,0x0040> a21300040; (void)a21300040; gdcm::Attribute<0x2130,0x0050> a21300050; (void)a21300050; gdcm::Attribute<0x2130,0x0060> a21300060; (void)a21300060; gdcm::Attribute<0x2130,0x0080> a21300080; (void)a21300080; gdcm::Attribute<0x2130,0x00a0> a213000a0; (void)a213000a0; gdcm::Attribute<0x2130,0x00c0> a213000c0; (void)a213000c0; gdcm::Attribute<0x2200,0x0001> a22000001; (void)a22000001; gdcm::Attribute<0x2200,0x0002> a22000002; (void)a22000002; gdcm::Attribute<0x2200,0x0003> a22000003; (void)a22000003; gdcm::Attribute<0x2200,0x0004> a22000004; (void)a22000004; gdcm::Attribute<0x2200,0x0005> a22000005; (void)a22000005; gdcm::Attribute<0x2200,0x0006> a22000006; (void)a22000006; gdcm::Attribute<0x2200,0x0007> a22000007; (void)a22000007; gdcm::Attribute<0x2200,0x0008> a22000008; (void)a22000008; gdcm::Attribute<0x2200,0x0009> a22000009; (void)a22000009; gdcm::Attribute<0x2200,0x000a> a2200000a; (void)a2200000a; gdcm::Attribute<0x2200,0x000b> a2200000b; (void)a2200000b; gdcm::Attribute<0x2200,0x000c> a2200000c; (void)a2200000c; gdcm::Attribute<0x2200,0x000d> a2200000d; (void)a2200000d; gdcm::Attribute<0x2200,0x000e> a2200000e; (void)a2200000e; gdcm::Attribute<0x2200,0x000f> a2200000f; (void)a2200000f; gdcm::Attribute<0x2200,0x0020> a22000020; (void)a22000020; gdcm::Attribute<0x3002,0x0002> a30020002; (void)a30020002; gdcm::Attribute<0x3002,0x0003> a30020003; (void)a30020003; gdcm::Attribute<0x3002,0x0004> a30020004; (void)a30020004; gdcm::Attribute<0x3002,0x000a> a3002000a; (void)a3002000a; gdcm::Attribute<0x3002,0x000c> a3002000c; (void)a3002000c; gdcm::Attribute<0x3002,0x000d> a3002000d; (void)a3002000d; gdcm::Attribute<0x3002,0x000e> a3002000e; (void)a3002000e; gdcm::Attribute<0x3002,0x0010> a30020010; (void)a30020010; gdcm::Attribute<0x3002,0x0011> a30020011; (void)a30020011; gdcm::Attribute<0x3002,0x0012> a30020012; (void)a30020012; gdcm::Attribute<0x3002,0x0020> a30020020; (void)a30020020; gdcm::Attribute<0x3002,0x0022> a30020022; (void)a30020022; gdcm::Attribute<0x3002,0x0024> a30020024; (void)a30020024; gdcm::Attribute<0x3002,0x0026> a30020026; (void)a30020026; gdcm::Attribute<0x3002,0x0028> a30020028; (void)a30020028; gdcm::Attribute<0x3002,0x0029> a30020029; (void)a30020029; gdcm::Attribute<0x3002,0x0030> a30020030; (void)a30020030; gdcm::Attribute<0x3002,0x0032> a30020032; (void)a30020032; gdcm::Attribute<0x3002,0x0034> a30020034; (void)a30020034; gdcm::Attribute<0x3002,0x0040> a30020040; (void)a30020040; gdcm::Attribute<0x3002,0x0041> a30020041; (void)a30020041; gdcm::Attribute<0x3002,0x0042> a30020042; (void)a30020042; gdcm::Attribute<0x3004,0x0001> a30040001; (void)a30040001; gdcm::Attribute<0x3004,0x0002> a30040002; (void)a30040002; gdcm::Attribute<0x3004,0x0004> a30040004; (void)a30040004; gdcm::Attribute<0x3004,0x0006> a30040006; (void)a30040006; gdcm::Attribute<0x3004,0x0008> a30040008; (void)a30040008; gdcm::Attribute<0x3004,0x000a> a3004000a; (void)a3004000a; gdcm::Attribute<0x3004,0x000c> a3004000c; (void)a3004000c; gdcm::Attribute<0x3004,0x000e> a3004000e; (void)a3004000e; gdcm::Attribute<0x3004,0x0010> a30040010; (void)a30040010; gdcm::Attribute<0x3004,0x0012> a30040012; (void)a30040012; gdcm::Attribute<0x3004,0x0040> a30040040; (void)a30040040; gdcm::Attribute<0x3004,0x0042> a30040042; (void)a30040042; gdcm::Attribute<0x3004,0x0050> a30040050; (void)a30040050; gdcm::Attribute<0x3004,0x0052> a30040052; (void)a30040052; gdcm::Attribute<0x3004,0x0054> a30040054; (void)a30040054; gdcm::Attribute<0x3004,0x0056> a30040056; (void)a30040056; gdcm::Attribute<0x3004,0x0058> a30040058; (void)a30040058; gdcm::Attribute<0x3004,0x0060> a30040060; (void)a30040060; gdcm::Attribute<0x3004,0x0062> a30040062; (void)a30040062; gdcm::Attribute<0x3004,0x0070> a30040070; (void)a30040070; gdcm::Attribute<0x3004,0x0072> a30040072; (void)a30040072; gdcm::Attribute<0x3004,0x0074> a30040074; (void)a30040074; gdcm::Attribute<0x3006,0x0002> a30060002; (void)a30060002; gdcm::Attribute<0x3006,0x0004> a30060004; (void)a30060004; gdcm::Attribute<0x3006,0x0006> a30060006; (void)a30060006; gdcm::Attribute<0x3006,0x0008> a30060008; (void)a30060008; gdcm::Attribute<0x3006,0x0009> a30060009; (void)a30060009; gdcm::Attribute<0x3006,0x0010> a30060010; (void)a30060010; gdcm::Attribute<0x3006,0x0012> a30060012; (void)a30060012; gdcm::Attribute<0x3006,0x0014> a30060014; (void)a30060014; gdcm::Attribute<0x3006,0x0016> a30060016; (void)a30060016; gdcm::Attribute<0x3006,0x0020> a30060020; (void)a30060020; gdcm::Attribute<0x3006,0x0022> a30060022; (void)a30060022; gdcm::Attribute<0x3006,0x0024> a30060024; (void)a30060024; gdcm::Attribute<0x3006,0x0026> a30060026; (void)a30060026; gdcm::Attribute<0x3006,0x0028> a30060028; (void)a30060028; gdcm::Attribute<0x3006,0x002a> a3006002a; (void)a3006002a; gdcm::Attribute<0x3006,0x002c> a3006002c; (void)a3006002c; gdcm::Attribute<0x3006,0x0030> a30060030; (void)a30060030; gdcm::Attribute<0x3006,0x0033> a30060033; (void)a30060033; gdcm::Attribute<0x3006,0x0036> a30060036; (void)a30060036; gdcm::Attribute<0x3006,0x0038> a30060038; (void)a30060038; gdcm::Attribute<0x3006,0x0039> a30060039; (void)a30060039; gdcm::Attribute<0x3006,0x0040> a30060040; (void)a30060040; gdcm::Attribute<0x3006,0x0042> a30060042; (void)a30060042; gdcm::Attribute<0x3006,0x0044> a30060044; (void)a30060044; gdcm::Attribute<0x3006,0x0045> a30060045; (void)a30060045; gdcm::Attribute<0x3006,0x0046> a30060046; (void)a30060046; gdcm::Attribute<0x3006,0x0048> a30060048; (void)a30060048; gdcm::Attribute<0x3006,0x0049> a30060049; (void)a30060049; gdcm::Attribute<0x3006,0x0050> a30060050; (void)a30060050; gdcm::Attribute<0x3006,0x0080> a30060080; (void)a30060080; gdcm::Attribute<0x3006,0x0082> a30060082; (void)a30060082; gdcm::Attribute<0x3006,0x0084> a30060084; (void)a30060084; gdcm::Attribute<0x3006,0x0085> a30060085; (void)a30060085; gdcm::Attribute<0x3006,0x0086> a30060086; (void)a30060086; gdcm::Attribute<0x3006,0x0088> a30060088; (void)a30060088; gdcm::Attribute<0x3006,0x00a0> a300600a0; (void)a300600a0; gdcm::Attribute<0x3006,0x00a4> a300600a4; (void)a300600a4; gdcm::Attribute<0x3006,0x00a6> a300600a6; (void)a300600a6; gdcm::Attribute<0x3006,0x00b0> a300600b0; (void)a300600b0; gdcm::Attribute<0x3006,0x00b2> a300600b2; (void)a300600b2; gdcm::Attribute<0x3006,0x00b4> a300600b4; (void)a300600b4; gdcm::Attribute<0x3006,0x00b6> a300600b6; (void)a300600b6; gdcm::Attribute<0x3006,0x00b7> a300600b7; (void)a300600b7; gdcm::Attribute<0x3006,0x00b8> a300600b8; (void)a300600b8; gdcm::Attribute<0x3006,0x00c0> a300600c0; (void)a300600c0; gdcm::Attribute<0x3006,0x00c2> a300600c2; (void)a300600c2; gdcm::Attribute<0x3006,0x00c4> a300600c4; (void)a300600c4; gdcm::Attribute<0x3006,0x00c6> a300600c6; (void)a300600c6; gdcm::Attribute<0x3006,0x00c8> a300600c8; (void)a300600c8; gdcm::Attribute<0x3008,0x0010> a30080010; (void)a30080010; gdcm::Attribute<0x3008,0x0012> a30080012; (void)a30080012; gdcm::Attribute<0x3008,0x0014> a30080014; (void)a30080014; gdcm::Attribute<0x3008,0x0016> a30080016; (void)a30080016; gdcm::Attribute<0x3008,0x0020> a30080020; (void)a30080020; gdcm::Attribute<0x3008,0x0021> a30080021; (void)a30080021; gdcm::Attribute<0x3008,0x0022> a30080022; (void)a30080022; gdcm::Attribute<0x3008,0x0024> a30080024; (void)a30080024; gdcm::Attribute<0x3008,0x0025> a30080025; (void)a30080025; gdcm::Attribute<0x3008,0x002a> a3008002a; (void)a3008002a; gdcm::Attribute<0x3008,0x002b> a3008002b; (void)a3008002b; gdcm::Attribute<0x3008,0x002c> a3008002c; (void)a3008002c; gdcm::Attribute<0x3008,0x0030> a30080030; (void)a30080030; gdcm::Attribute<0x3008,0x0032> a30080032; (void)a30080032; gdcm::Attribute<0x3008,0x0033> a30080033; (void)a30080033; gdcm::Attribute<0x3008,0x0036> a30080036; (void)a30080036; gdcm::Attribute<0x3008,0x0037> a30080037; (void)a30080037; gdcm::Attribute<0x3008,0x003a> a3008003a; (void)a3008003a; gdcm::Attribute<0x3008,0x003b> a3008003b; (void)a3008003b; gdcm::Attribute<0x3008,0x0040> a30080040; (void)a30080040; gdcm::Attribute<0x3008,0x0041> a30080041; (void)a30080041; gdcm::Attribute<0x3008,0x0042> a30080042; (void)a30080042; gdcm::Attribute<0x3008,0x0044> a30080044; (void)a30080044; gdcm::Attribute<0x3008,0x0045> a30080045; (void)a30080045; gdcm::Attribute<0x3008,0x0046> a30080046; (void)a30080046; gdcm::Attribute<0x3008,0x0047> a30080047; (void)a30080047; gdcm::Attribute<0x3008,0x0048> a30080048; (void)a30080048; gdcm::Attribute<0x3008,0x0050> a30080050; (void)a30080050; gdcm::Attribute<0x3008,0x0052> a30080052; (void)a30080052; gdcm::Attribute<0x3008,0x0054> a30080054; (void)a30080054; gdcm::Attribute<0x3008,0x0056> a30080056; (void)a30080056; gdcm::Attribute<0x3008,0x005a> a3008005a; (void)a3008005a; gdcm::Attribute<0x3008,0x0060> a30080060; (void)a30080060; gdcm::Attribute<0x3008,0x0061> a30080061; (void)a30080061; gdcm::Attribute<0x3008,0x0062> a30080062; (void)a30080062; gdcm::Attribute<0x3008,0x0063> a30080063; (void)a30080063; gdcm::Attribute<0x3008,0x0064> a30080064; (void)a30080064; gdcm::Attribute<0x3008,0x0065> a30080065; (void)a30080065; gdcm::Attribute<0x3008,0x0066> a30080066; (void)a30080066; gdcm::Attribute<0x3008,0x0068> a30080068; (void)a30080068; gdcm::Attribute<0x3008,0x006a> a3008006a; (void)a3008006a; gdcm::Attribute<0x3008,0x0070> a30080070; (void)a30080070; gdcm::Attribute<0x3008,0x0072> a30080072; (void)a30080072; gdcm::Attribute<0x3008,0x0074> a30080074; (void)a30080074; gdcm::Attribute<0x3008,0x0076> a30080076; (void)a30080076; gdcm::Attribute<0x3008,0x0078> a30080078; (void)a30080078; gdcm::Attribute<0x3008,0x007a> a3008007a; (void)a3008007a; gdcm::Attribute<0x3008,0x0080> a30080080; (void)a30080080; gdcm::Attribute<0x3008,0x0082> a30080082; (void)a30080082; gdcm::Attribute<0x3008,0x0090> a30080090; (void)a30080090; gdcm::Attribute<0x3008,0x0092> a30080092; (void)a30080092; gdcm::Attribute<0x3008,0x00a0> a300800a0; (void)a300800a0; gdcm::Attribute<0x3008,0x00b0> a300800b0; (void)a300800b0; gdcm::Attribute<0x3008,0x00c0> a300800c0; (void)a300800c0; gdcm::Attribute<0x3008,0x00d0> a300800d0; (void)a300800d0; gdcm::Attribute<0x3008,0x00e0> a300800e0; (void)a300800e0; gdcm::Attribute<0x3008,0x00f0> a300800f0; (void)a300800f0; gdcm::Attribute<0x3008,0x00f2> a300800f2; (void)a300800f2; gdcm::Attribute<0x3008,0x00f4> a300800f4; (void)a300800f4; gdcm::Attribute<0x3008,0x00f6> a300800f6; (void)a300800f6; gdcm::Attribute<0x3008,0x0100> a30080100; (void)a30080100; gdcm::Attribute<0x3008,0x0105> a30080105; (void)a30080105; gdcm::Attribute<0x3008,0x0110> a30080110; (void)a30080110; gdcm::Attribute<0x3008,0x0116> a30080116; (void)a30080116; gdcm::Attribute<0x3008,0x0120> a30080120; (void)a30080120; gdcm::Attribute<0x3008,0x0122> a30080122; (void)a30080122; gdcm::Attribute<0x3008,0x0130> a30080130; (void)a30080130; gdcm::Attribute<0x3008,0x0132> a30080132; (void)a30080132; gdcm::Attribute<0x3008,0x0134> a30080134; (void)a30080134; gdcm::Attribute<0x3008,0x0136> a30080136; (void)a30080136; gdcm::Attribute<0x3008,0x0138> a30080138; (void)a30080138; gdcm::Attribute<0x3008,0x013a> a3008013a; (void)a3008013a; gdcm::Attribute<0x3008,0x013c> a3008013c; (void)a3008013c; gdcm::Attribute<0x3008,0x0140> a30080140; (void)a30080140; gdcm::Attribute<0x3008,0x0142> a30080142; (void)a30080142; gdcm::Attribute<0x3008,0x0150> a30080150; (void)a30080150; gdcm::Attribute<0x3008,0x0152> a30080152; (void)a30080152; gdcm::Attribute<0x3008,0x0160> a30080160; (void)a30080160; gdcm::Attribute<0x3008,0x0162> a30080162; (void)a30080162; gdcm::Attribute<0x3008,0x0164> a30080164; (void)a30080164; gdcm::Attribute<0x3008,0x0166> a30080166; (void)a30080166; gdcm::Attribute<0x3008,0x0168> a30080168; (void)a30080168; gdcm::Attribute<0x3008,0x0200> a30080200; (void)a30080200; gdcm::Attribute<0x3008,0x0202> a30080202; (void)a30080202; gdcm::Attribute<0x3008,0x0220> a30080220; (void)a30080220; gdcm::Attribute<0x3008,0x0223> a30080223; (void)a30080223; gdcm::Attribute<0x3008,0x0224> a30080224; (void)a30080224; gdcm::Attribute<0x3008,0x0230> a30080230; (void)a30080230; gdcm::Attribute<0x3008,0x0240> a30080240; (void)a30080240; gdcm::Attribute<0x3008,0x0250> a30080250; (void)a30080250; gdcm::Attribute<0x3008,0x0251> a30080251; (void)a30080251; gdcm::Attribute<0x300a,0x0002> a300a0002; (void)a300a0002; gdcm::Attribute<0x300a,0x0003> a300a0003; (void)a300a0003; gdcm::Attribute<0x300a,0x0004> a300a0004; (void)a300a0004; gdcm::Attribute<0x300a,0x0006> a300a0006; (void)a300a0006; gdcm::Attribute<0x300a,0x0007> a300a0007; (void)a300a0007; gdcm::Attribute<0x300a,0x0009> a300a0009; (void)a300a0009; gdcm::Attribute<0x300a,0x000a> a300a000a; (void)a300a000a; gdcm::Attribute<0x300a,0x000b> a300a000b; (void)a300a000b; gdcm::Attribute<0x300a,0x000c> a300a000c; (void)a300a000c; gdcm::Attribute<0x300a,0x000e> a300a000e; (void)a300a000e; gdcm::Attribute<0x300a,0x0010> a300a0010; (void)a300a0010; gdcm::Attribute<0x300a,0x0012> a300a0012; (void)a300a0012; gdcm::Attribute<0x300a,0x0013> a300a0013; (void)a300a0013; gdcm::Attribute<0x300a,0x0014> a300a0014; (void)a300a0014; gdcm::Attribute<0x300a,0x0015> a300a0015; (void)a300a0015; gdcm::Attribute<0x300a,0x0016> a300a0016; (void)a300a0016; gdcm::Attribute<0x300a,0x0018> a300a0018; (void)a300a0018; gdcm::Attribute<0x300a,0x001a> a300a001a; (void)a300a001a; gdcm::Attribute<0x300a,0x0020> a300a0020; (void)a300a0020; gdcm::Attribute<0x300a,0x0021> a300a0021; (void)a300a0021; gdcm::Attribute<0x300a,0x0022> a300a0022; (void)a300a0022; gdcm::Attribute<0x300a,0x0023> a300a0023; (void)a300a0023; gdcm::Attribute<0x300a,0x0025> a300a0025; (void)a300a0025; gdcm::Attribute<0x300a,0x0026> a300a0026; (void)a300a0026; gdcm::Attribute<0x300a,0x0027> a300a0027; (void)a300a0027; gdcm::Attribute<0x300a,0x0028> a300a0028; (void)a300a0028; gdcm::Attribute<0x300a,0x002a> a300a002a; (void)a300a002a; gdcm::Attribute<0x300a,0x002b> a300a002b; (void)a300a002b; gdcm::Attribute<0x300a,0x002c> a300a002c; (void)a300a002c; gdcm::Attribute<0x300a,0x002d> a300a002d; (void)a300a002d; gdcm::Attribute<0x300a,0x0040> a300a0040; (void)a300a0040; gdcm::Attribute<0x300a,0x0042> a300a0042; (void)a300a0042; gdcm::Attribute<0x300a,0x0043> a300a0043; (void)a300a0043; gdcm::Attribute<0x300a,0x0044> a300a0044; (void)a300a0044; gdcm::Attribute<0x300a,0x0046> a300a0046; (void)a300a0046; gdcm::Attribute<0x300a,0x0048> a300a0048; (void)a300a0048; gdcm::Attribute<0x300a,0x004a> a300a004a; (void)a300a004a; gdcm::Attribute<0x300a,0x004b> a300a004b; (void)a300a004b; gdcm::Attribute<0x300a,0x004c> a300a004c; (void)a300a004c; gdcm::Attribute<0x300a,0x004e> a300a004e; (void)a300a004e; gdcm::Attribute<0x300a,0x004f> a300a004f; (void)a300a004f; gdcm::Attribute<0x300a,0x0050> a300a0050; (void)a300a0050; gdcm::Attribute<0x300a,0x0051> a300a0051; (void)a300a0051; gdcm::Attribute<0x300a,0x0052> a300a0052; (void)a300a0052; gdcm::Attribute<0x300a,0x0053> a300a0053; (void)a300a0053; gdcm::Attribute<0x300a,0x0055> a300a0055; (void)a300a0055; gdcm::Attribute<0x300a,0x0070> a300a0070; (void)a300a0070; gdcm::Attribute<0x300a,0x0071> a300a0071; (void)a300a0071; gdcm::Attribute<0x300a,0x0072> a300a0072; (void)a300a0072; gdcm::Attribute<0x300a,0x0078> a300a0078; (void)a300a0078; gdcm::Attribute<0x300a,0x0079> a300a0079; (void)a300a0079; gdcm::Attribute<0x300a,0x007a> a300a007a; (void)a300a007a; gdcm::Attribute<0x300a,0x007b> a300a007b; (void)a300a007b; gdcm::Attribute<0x300a,0x0080> a300a0080; (void)a300a0080; gdcm::Attribute<0x300a,0x0082> a300a0082; (void)a300a0082; gdcm::Attribute<0x300a,0x0084> a300a0084; (void)a300a0084; gdcm::Attribute<0x300a,0x0086> a300a0086; (void)a300a0086; gdcm::Attribute<0x300a,0x0088> a300a0088; (void)a300a0088; gdcm::Attribute<0x300a,0x0089> a300a0089; (void)a300a0089; gdcm::Attribute<0x300a,0x008a> a300a008a; (void)a300a008a; gdcm::Attribute<0x300a,0x00a0> a300a00a0; (void)a300a00a0; gdcm::Attribute<0x300a,0x00a2> a300a00a2; (void)a300a00a2; gdcm::Attribute<0x300a,0x00a4> a300a00a4; (void)a300a00a4; gdcm::Attribute<0x300a,0x00b0> a300a00b0; (void)a300a00b0; gdcm::Attribute<0x300a,0x00b2> a300a00b2; (void)a300a00b2; gdcm::Attribute<0x300a,0x00b3> a300a00b3; (void)a300a00b3; gdcm::Attribute<0x300a,0x00b4> a300a00b4; (void)a300a00b4; gdcm::Attribute<0x300a,0x00b6> a300a00b6; (void)a300a00b6; gdcm::Attribute<0x300a,0x00b8> a300a00b8; (void)a300a00b8; gdcm::Attribute<0x300a,0x00ba> a300a00ba; (void)a300a00ba; gdcm::Attribute<0x300a,0x00bb> a300a00bb; (void)a300a00bb; gdcm::Attribute<0x300a,0x00bc> a300a00bc; (void)a300a00bc; gdcm::Attribute<0x300a,0x00be> a300a00be; (void)a300a00be; gdcm::Attribute<0x300a,0x00c0> a300a00c0; (void)a300a00c0; gdcm::Attribute<0x300a,0x00c2> a300a00c2; (void)a300a00c2; gdcm::Attribute<0x300a,0x00c3> a300a00c3; (void)a300a00c3; gdcm::Attribute<0x300a,0x00c4> a300a00c4; (void)a300a00c4; gdcm::Attribute<0x300a,0x00c6> a300a00c6; (void)a300a00c6; gdcm::Attribute<0x300a,0x00c7> a300a00c7; (void)a300a00c7; gdcm::Attribute<0x300a,0x00c8> a300a00c8; (void)a300a00c8; gdcm::Attribute<0x300a,0x00ca> a300a00ca; (void)a300a00ca; gdcm::Attribute<0x300a,0x00cc> a300a00cc; (void)a300a00cc; gdcm::Attribute<0x300a,0x00ce> a300a00ce; (void)a300a00ce; gdcm::Attribute<0x300a,0x00d0> a300a00d0; (void)a300a00d0; gdcm::Attribute<0x300a,0x00d1> a300a00d1; (void)a300a00d1; gdcm::Attribute<0x300a,0x00d2> a300a00d2; (void)a300a00d2; gdcm::Attribute<0x300a,0x00d3> a300a00d3; (void)a300a00d3; gdcm::Attribute<0x300a,0x00d4> a300a00d4; (void)a300a00d4; gdcm::Attribute<0x300a,0x00d5> a300a00d5; (void)a300a00d5; gdcm::Attribute<0x300a,0x00d6> a300a00d6; (void)a300a00d6; gdcm::Attribute<0x300a,0x00d7> a300a00d7; (void)a300a00d7; gdcm::Attribute<0x300a,0x00d8> a300a00d8; (void)a300a00d8; gdcm::Attribute<0x300a,0x00d9> a300a00d9; (void)a300a00d9; gdcm::Attribute<0x300a,0x00da> a300a00da; (void)a300a00da; gdcm::Attribute<0x300a,0x00db> a300a00db; (void)a300a00db; gdcm::Attribute<0x300a,0x00dc> a300a00dc; (void)a300a00dc; gdcm::Attribute<0x300a,0x00dd> a300a00dd; (void)a300a00dd; gdcm::Attribute<0x300a,0x00e0> a300a00e0; (void)a300a00e0; gdcm::Attribute<0x300a,0x00e1> a300a00e1; (void)a300a00e1; gdcm::Attribute<0x300a,0x00e2> a300a00e2; (void)a300a00e2; gdcm::Attribute<0x300a,0x00e3> a300a00e3; (void)a300a00e3; gdcm::Attribute<0x300a,0x00e4> a300a00e4; (void)a300a00e4; gdcm::Attribute<0x300a,0x00e5> a300a00e5; (void)a300a00e5; gdcm::Attribute<0x300a,0x00e6> a300a00e6; (void)a300a00e6; gdcm::Attribute<0x300a,0x00e7> a300a00e7; (void)a300a00e7; gdcm::Attribute<0x300a,0x00e8> a300a00e8; (void)a300a00e8; gdcm::Attribute<0x300a,0x00e9> a300a00e9; (void)a300a00e9; gdcm::Attribute<0x300a,0x00ea> a300a00ea; (void)a300a00ea; gdcm::Attribute<0x300a,0x00eb> a300a00eb; (void)a300a00eb; gdcm::Attribute<0x300a,0x00ec> a300a00ec; (void)a300a00ec; gdcm::Attribute<0x300a,0x00ed> a300a00ed; (void)a300a00ed; gdcm::Attribute<0x300a,0x00ee> a300a00ee; (void)a300a00ee; gdcm::Attribute<0x300a,0x00f0> a300a00f0; (void)a300a00f0; gdcm::Attribute<0x300a,0x00f2> a300a00f2; (void)a300a00f2; gdcm::Attribute<0x300a,0x00f3> a300a00f3; (void)a300a00f3; gdcm::Attribute<0x300a,0x00f4> a300a00f4; (void)a300a00f4; gdcm::Attribute<0x300a,0x00f5> a300a00f5; (void)a300a00f5; gdcm::Attribute<0x300a,0x00f6> a300a00f6; (void)a300a00f6; gdcm::Attribute<0x300a,0x00f7> a300a00f7; (void)a300a00f7; gdcm::Attribute<0x300a,0x00f8> a300a00f8; (void)a300a00f8; gdcm::Attribute<0x300a,0x00f9> a300a00f9; (void)a300a00f9; gdcm::Attribute<0x300a,0x00fa> a300a00fa; (void)a300a00fa; gdcm::Attribute<0x300a,0x00fb> a300a00fb; (void)a300a00fb; gdcm::Attribute<0x300a,0x00fc> a300a00fc; (void)a300a00fc; gdcm::Attribute<0x300a,0x00fe> a300a00fe; (void)a300a00fe; gdcm::Attribute<0x300a,0x0100> a300a0100; (void)a300a0100; gdcm::Attribute<0x300a,0x0102> a300a0102; (void)a300a0102; gdcm::Attribute<0x300a,0x0104> a300a0104; (void)a300a0104; gdcm::Attribute<0x300a,0x0106> a300a0106; (void)a300a0106; gdcm::Attribute<0x300a,0x0107> a300a0107; (void)a300a0107; gdcm::Attribute<0x300a,0x0108> a300a0108; (void)a300a0108; gdcm::Attribute<0x300a,0x0109> a300a0109; (void)a300a0109; gdcm::Attribute<0x300a,0x010a> a300a010a; (void)a300a010a; gdcm::Attribute<0x300a,0x010c> a300a010c; (void)a300a010c; gdcm::Attribute<0x300a,0x010e> a300a010e; (void)a300a010e; gdcm::Attribute<0x300a,0x0110> a300a0110; (void)a300a0110; gdcm::Attribute<0x300a,0x0111> a300a0111; (void)a300a0111; gdcm::Attribute<0x300a,0x0112> a300a0112; (void)a300a0112; gdcm::Attribute<0x300a,0x0114> a300a0114; (void)a300a0114; gdcm::Attribute<0x300a,0x0115> a300a0115; (void)a300a0115; gdcm::Attribute<0x300a,0x0116> a300a0116; (void)a300a0116; gdcm::Attribute<0x300a,0x0118> a300a0118; (void)a300a0118; gdcm::Attribute<0x300a,0x011a> a300a011a; (void)a300a011a; gdcm::Attribute<0x300a,0x011c> a300a011c; (void)a300a011c; gdcm::Attribute<0x300a,0x011e> a300a011e; (void)a300a011e; gdcm::Attribute<0x300a,0x011f> a300a011f; (void)a300a011f; gdcm::Attribute<0x300a,0x0120> a300a0120; (void)a300a0120; gdcm::Attribute<0x300a,0x0121> a300a0121; (void)a300a0121; gdcm::Attribute<0x300a,0x0122> a300a0122; (void)a300a0122; gdcm::Attribute<0x300a,0x0123> a300a0123; (void)a300a0123; gdcm::Attribute<0x300a,0x0124> a300a0124; (void)a300a0124; gdcm::Attribute<0x300a,0x0125> a300a0125; (void)a300a0125; gdcm::Attribute<0x300a,0x0126> a300a0126; (void)a300a0126; gdcm::Attribute<0x300a,0x0128> a300a0128; (void)a300a0128; gdcm::Attribute<0x300a,0x0129> a300a0129; (void)a300a0129; gdcm::Attribute<0x300a,0x012a> a300a012a; (void)a300a012a; gdcm::Attribute<0x300a,0x012c> a300a012c; (void)a300a012c; gdcm::Attribute<0x300a,0x012e> a300a012e; (void)a300a012e; gdcm::Attribute<0x300a,0x0130> a300a0130; (void)a300a0130; gdcm::Attribute<0x300a,0x0134> a300a0134; (void)a300a0134; gdcm::Attribute<0x300a,0x0140> a300a0140; (void)a300a0140; gdcm::Attribute<0x300a,0x0142> a300a0142; (void)a300a0142; gdcm::Attribute<0x300a,0x0144> a300a0144; (void)a300a0144; gdcm::Attribute<0x300a,0x0146> a300a0146; (void)a300a0146; gdcm::Attribute<0x300a,0x0148> a300a0148; (void)a300a0148; gdcm::Attribute<0x300a,0x014a> a300a014a; (void)a300a014a; gdcm::Attribute<0x300a,0x014c> a300a014c; (void)a300a014c; gdcm::Attribute<0x300a,0x014e> a300a014e; (void)a300a014e; gdcm::Attribute<0x300a,0x0180> a300a0180; (void)a300a0180; gdcm::Attribute<0x300a,0x0182> a300a0182; (void)a300a0182; gdcm::Attribute<0x300a,0x0183> a300a0183; (void)a300a0183; gdcm::Attribute<0x300a,0x0184> a300a0184; (void)a300a0184; gdcm::Attribute<0x300a,0x0190> a300a0190; (void)a300a0190; gdcm::Attribute<0x300a,0x0192> a300a0192; (void)a300a0192; gdcm::Attribute<0x300a,0x0194> a300a0194; (void)a300a0194; gdcm::Attribute<0x300a,0x0196> a300a0196; (void)a300a0196; gdcm::Attribute<0x300a,0x0198> a300a0198; (void)a300a0198; gdcm::Attribute<0x300a,0x0199> a300a0199; (void)a300a0199; gdcm::Attribute<0x300a,0x019a> a300a019a; (void)a300a019a; gdcm::Attribute<0x300a,0x01a0> a300a01a0; (void)a300a01a0; gdcm::Attribute<0x300a,0x01a2> a300a01a2; (void)a300a01a2; gdcm::Attribute<0x300a,0x01a4> a300a01a4; (void)a300a01a4; gdcm::Attribute<0x300a,0x01a6> a300a01a6; (void)a300a01a6; gdcm::Attribute<0x300a,0x01a8> a300a01a8; (void)a300a01a8; gdcm::Attribute<0x300a,0x01b0> a300a01b0; (void)a300a01b0; gdcm::Attribute<0x300a,0x01b2> a300a01b2; (void)a300a01b2; gdcm::Attribute<0x300a,0x01b4> a300a01b4; (void)a300a01b4; gdcm::Attribute<0x300a,0x01b6> a300a01b6; (void)a300a01b6; gdcm::Attribute<0x300a,0x01b8> a300a01b8; (void)a300a01b8; gdcm::Attribute<0x300a,0x01ba> a300a01ba; (void)a300a01ba; gdcm::Attribute<0x300a,0x01bc> a300a01bc; (void)a300a01bc; gdcm::Attribute<0x300a,0x01d0> a300a01d0; (void)a300a01d0; gdcm::Attribute<0x300a,0x01d2> a300a01d2; (void)a300a01d2; gdcm::Attribute<0x300a,0x01d4> a300a01d4; (void)a300a01d4; gdcm::Attribute<0x300a,0x01d6> a300a01d6; (void)a300a01d6; gdcm::Attribute<0x300a,0x0200> a300a0200; (void)a300a0200; gdcm::Attribute<0x300a,0x0202> a300a0202; (void)a300a0202; gdcm::Attribute<0x300a,0x0206> a300a0206; (void)a300a0206; gdcm::Attribute<0x300a,0x0210> a300a0210; (void)a300a0210; gdcm::Attribute<0x300a,0x0212> a300a0212; (void)a300a0212; gdcm::Attribute<0x300a,0x0214> a300a0214; (void)a300a0214; gdcm::Attribute<0x300a,0x0216> a300a0216; (void)a300a0216; gdcm::Attribute<0x300a,0x0218> a300a0218; (void)a300a0218; gdcm::Attribute<0x300a,0x021a> a300a021a; (void)a300a021a; gdcm::Attribute<0x300a,0x0222> a300a0222; (void)a300a0222; gdcm::Attribute<0x300a,0x0224> a300a0224; (void)a300a0224; gdcm::Attribute<0x300a,0x0226> a300a0226; (void)a300a0226; gdcm::Attribute<0x300a,0x0228> a300a0228; (void)a300a0228; gdcm::Attribute<0x300a,0x0229> a300a0229; (void)a300a0229; gdcm::Attribute<0x300a,0x022a> a300a022a; (void)a300a022a; gdcm::Attribute<0x300a,0x022b> a300a022b; (void)a300a022b; gdcm::Attribute<0x300a,0x022c> a300a022c; (void)a300a022c; gdcm::Attribute<0x300a,0x022e> a300a022e; (void)a300a022e; gdcm::Attribute<0x300a,0x0230> a300a0230; (void)a300a0230; gdcm::Attribute<0x300a,0x0232> a300a0232; (void)a300a0232; gdcm::Attribute<0x300a,0x0234> a300a0234; (void)a300a0234; gdcm::Attribute<0x300a,0x0236> a300a0236; (void)a300a0236; gdcm::Attribute<0x300a,0x0238> a300a0238; (void)a300a0238; gdcm::Attribute<0x300a,0x0240> a300a0240; (void)a300a0240; gdcm::Attribute<0x300a,0x0242> a300a0242; (void)a300a0242; gdcm::Attribute<0x300a,0x0244> a300a0244; (void)a300a0244; gdcm::Attribute<0x300a,0x0250> a300a0250; (void)a300a0250; gdcm::Attribute<0x300a,0x0260> a300a0260; (void)a300a0260; gdcm::Attribute<0x300a,0x0262> a300a0262; (void)a300a0262; gdcm::Attribute<0x300a,0x0263> a300a0263; (void)a300a0263; gdcm::Attribute<0x300a,0x0264> a300a0264; (void)a300a0264; gdcm::Attribute<0x300a,0x0266> a300a0266; (void)a300a0266; gdcm::Attribute<0x300a,0x026a> a300a026a; (void)a300a026a; gdcm::Attribute<0x300a,0x026c> a300a026c; (void)a300a026c; gdcm::Attribute<0x300a,0x0280> a300a0280; (void)a300a0280; gdcm::Attribute<0x300a,0x0282> a300a0282; (void)a300a0282; gdcm::Attribute<0x300a,0x0284> a300a0284; (void)a300a0284; gdcm::Attribute<0x300a,0x0286> a300a0286; (void)a300a0286; gdcm::Attribute<0x300a,0x0288> a300a0288; (void)a300a0288; gdcm::Attribute<0x300a,0x028a> a300a028a; (void)a300a028a; gdcm::Attribute<0x300a,0x028c> a300a028c; (void)a300a028c; gdcm::Attribute<0x300a,0x0290> a300a0290; (void)a300a0290; gdcm::Attribute<0x300a,0x0291> a300a0291; (void)a300a0291; gdcm::Attribute<0x300a,0x0292> a300a0292; (void)a300a0292; gdcm::Attribute<0x300a,0x0294> a300a0294; (void)a300a0294; gdcm::Attribute<0x300a,0x0296> a300a0296; (void)a300a0296; gdcm::Attribute<0x300a,0x0298> a300a0298; (void)a300a0298; gdcm::Attribute<0x300a,0x029c> a300a029c; (void)a300a029c; gdcm::Attribute<0x300a,0x029e> a300a029e; (void)a300a029e; gdcm::Attribute<0x300a,0x02a0> a300a02a0; (void)a300a02a0; gdcm::Attribute<0x300a,0x02a2> a300a02a2; (void)a300a02a2; gdcm::Attribute<0x300a,0x02a4> a300a02a4; (void)a300a02a4; gdcm::Attribute<0x300a,0x02b0> a300a02b0; (void)a300a02b0; gdcm::Attribute<0x300a,0x02b2> a300a02b2; (void)a300a02b2; gdcm::Attribute<0x300a,0x02b3> a300a02b3; (void)a300a02b3; gdcm::Attribute<0x300a,0x02b4> a300a02b4; (void)a300a02b4; gdcm::Attribute<0x300a,0x02b8> a300a02b8; (void)a300a02b8; gdcm::Attribute<0x300a,0x02ba> a300a02ba; (void)a300a02ba; gdcm::Attribute<0x300a,0x02c8> a300a02c8; (void)a300a02c8; gdcm::Attribute<0x300a,0x02d0> a300a02d0; (void)a300a02d0; gdcm::Attribute<0x300a,0x02d2> a300a02d2; (void)a300a02d2; gdcm::Attribute<0x300a,0x02d4> a300a02d4; (void)a300a02d4; gdcm::Attribute<0x300a,0x02d6> a300a02d6; (void)a300a02d6; gdcm::Attribute<0x300a,0x02e0> a300a02e0; (void)a300a02e0; gdcm::Attribute<0x300a,0x02e1> a300a02e1; (void)a300a02e1; gdcm::Attribute<0x300a,0x02e2> a300a02e2; (void)a300a02e2; gdcm::Attribute<0x300a,0x02e3> a300a02e3; (void)a300a02e3; gdcm::Attribute<0x300a,0x02e4> a300a02e4; (void)a300a02e4; gdcm::Attribute<0x300a,0x02e5> a300a02e5; (void)a300a02e5; gdcm::Attribute<0x300a,0x02e6> a300a02e6; (void)a300a02e6; gdcm::Attribute<0x300a,0x02e7> a300a02e7; (void)a300a02e7; gdcm::Attribute<0x300a,0x02e8> a300a02e8; (void)a300a02e8; gdcm::Attribute<0x300a,0x02ea> a300a02ea; (void)a300a02ea; gdcm::Attribute<0x300a,0x02eb> a300a02eb; (void)a300a02eb; gdcm::Attribute<0x300a,0x0302> a300a0302; (void)a300a0302; gdcm::Attribute<0x300a,0x0304> a300a0304; (void)a300a0304; gdcm::Attribute<0x300a,0x0306> a300a0306; (void)a300a0306; gdcm::Attribute<0x300a,0x0308> a300a0308; (void)a300a0308; gdcm::Attribute<0x300a,0x030a> a300a030a; (void)a300a030a; gdcm::Attribute<0x300a,0x030c> a300a030c; (void)a300a030c; gdcm::Attribute<0x300a,0x030d> a300a030d; (void)a300a030d; gdcm::Attribute<0x300a,0x030f> a300a030f; (void)a300a030f; gdcm::Attribute<0x300a,0x0312> a300a0312; (void)a300a0312; gdcm::Attribute<0x300a,0x0314> a300a0314; (void)a300a0314; gdcm::Attribute<0x300a,0x0316> a300a0316; (void)a300a0316; gdcm::Attribute<0x300a,0x0318> a300a0318; (void)a300a0318; gdcm::Attribute<0x300a,0x0320> a300a0320; (void)a300a0320; gdcm::Attribute<0x300a,0x0322> a300a0322; (void)a300a0322; gdcm::Attribute<0x300a,0x0330> a300a0330; (void)a300a0330; gdcm::Attribute<0x300a,0x0332> a300a0332; (void)a300a0332; gdcm::Attribute<0x300a,0x0334> a300a0334; (void)a300a0334; gdcm::Attribute<0x300a,0x0336> a300a0336; (void)a300a0336; gdcm::Attribute<0x300a,0x0338> a300a0338; (void)a300a0338; gdcm::Attribute<0x300a,0x033a> a300a033a; (void)a300a033a; gdcm::Attribute<0x300a,0x033c> a300a033c; (void)a300a033c; gdcm::Attribute<0x300a,0x0340> a300a0340; (void)a300a0340; gdcm::Attribute<0x300a,0x0342> a300a0342; (void)a300a0342; gdcm::Attribute<0x300a,0x0344> a300a0344; (void)a300a0344; gdcm::Attribute<0x300a,0x0346> a300a0346; (void)a300a0346; gdcm::Attribute<0x300a,0x0348> a300a0348; (void)a300a0348; gdcm::Attribute<0x300a,0x034a> a300a034a; (void)a300a034a; gdcm::Attribute<0x300a,0x034c> a300a034c; (void)a300a034c; gdcm::Attribute<0x300a,0x0350> a300a0350; (void)a300a0350; gdcm::Attribute<0x300a,0x0352> a300a0352; (void)a300a0352; gdcm::Attribute<0x300a,0x0354> a300a0354; (void)a300a0354; gdcm::Attribute<0x300a,0x0356> a300a0356; (void)a300a0356; gdcm::Attribute<0x300a,0x0358> a300a0358; (void)a300a0358; gdcm::Attribute<0x300a,0x035a> a300a035a; (void)a300a035a; gdcm::Attribute<0x300a,0x0360> a300a0360; (void)a300a0360; gdcm::Attribute<0x300a,0x0362> a300a0362; (void)a300a0362; gdcm::Attribute<0x300a,0x0364> a300a0364; (void)a300a0364; gdcm::Attribute<0x300a,0x0366> a300a0366; (void)a300a0366; gdcm::Attribute<0x300a,0x0370> a300a0370; (void)a300a0370; gdcm::Attribute<0x300a,0x0372> a300a0372; (void)a300a0372; gdcm::Attribute<0x300a,0x0374> a300a0374; (void)a300a0374; gdcm::Attribute<0x300a,0x0380> a300a0380; (void)a300a0380; gdcm::Attribute<0x300a,0x0382> a300a0382; (void)a300a0382; gdcm::Attribute<0x300a,0x0384> a300a0384; (void)a300a0384; gdcm::Attribute<0x300a,0x0386> a300a0386; (void)a300a0386; gdcm::Attribute<0x300a,0x0388> a300a0388; (void)a300a0388; gdcm::Attribute<0x300a,0x038a> a300a038a; (void)a300a038a; gdcm::Attribute<0x300a,0x0390> a300a0390; (void)a300a0390; gdcm::Attribute<0x300a,0x0392> a300a0392; (void)a300a0392; gdcm::Attribute<0x300a,0x0394> a300a0394; (void)a300a0394; gdcm::Attribute<0x300a,0x0396> a300a0396; (void)a300a0396; gdcm::Attribute<0x300a,0x0398> a300a0398; (void)a300a0398; gdcm::Attribute<0x300a,0x039a> a300a039a; (void)a300a039a; gdcm::Attribute<0x300a,0x03a0> a300a03a0; (void)a300a03a0; gdcm::Attribute<0x300a,0x03a2> a300a03a2; (void)a300a03a2; gdcm::Attribute<0x300a,0x03a4> a300a03a4; (void)a300a03a4; gdcm::Attribute<0x300a,0x03a6> a300a03a6; (void)a300a03a6; gdcm::Attribute<0x300a,0x03a8> a300a03a8; (void)a300a03a8; gdcm::Attribute<0x300a,0x03aa> a300a03aa; (void)a300a03aa; gdcm::Attribute<0x300a,0x03ac> a300a03ac; (void)a300a03ac; gdcm::Attribute<0x300a,0x0401> a300a0401; (void)a300a0401; gdcm::Attribute<0x300a,0x0402> a300a0402; (void)a300a0402; gdcm::Attribute<0x300a,0x0410> a300a0410; (void)a300a0410; gdcm::Attribute<0x300a,0x0412> a300a0412; (void)a300a0412; gdcm::Attribute<0x300a,0x0420> a300a0420; (void)a300a0420; gdcm::Attribute<0x300a,0x0421> a300a0421; (void)a300a0421; gdcm::Attribute<0x300a,0x0422> a300a0422; (void)a300a0422; gdcm::Attribute<0x300a,0x0423> a300a0423; (void)a300a0423; gdcm::Attribute<0x300a,0x0424> a300a0424; (void)a300a0424; gdcm::Attribute<0x300c,0x0002> a300c0002; (void)a300c0002; gdcm::Attribute<0x300c,0x0004> a300c0004; (void)a300c0004; gdcm::Attribute<0x300c,0x0006> a300c0006; (void)a300c0006; gdcm::Attribute<0x300c,0x0007> a300c0007; (void)a300c0007; gdcm::Attribute<0x300c,0x0008> a300c0008; (void)a300c0008; gdcm::Attribute<0x300c,0x0009> a300c0009; (void)a300c0009; gdcm::Attribute<0x300c,0x000a> a300c000a; (void)a300c000a; gdcm::Attribute<0x300c,0x000c> a300c000c; (void)a300c000c; gdcm::Attribute<0x300c,0x000e> a300c000e; (void)a300c000e; gdcm::Attribute<0x300c,0x0020> a300c0020; (void)a300c0020; gdcm::Attribute<0x300c,0x0022> a300c0022; (void)a300c0022; gdcm::Attribute<0x300c,0x0040> a300c0040; (void)a300c0040; gdcm::Attribute<0x300c,0x0042> a300c0042; (void)a300c0042; gdcm::Attribute<0x300c,0x0050> a300c0050; (void)a300c0050; gdcm::Attribute<0x300c,0x0051> a300c0051; (void)a300c0051; gdcm::Attribute<0x300c,0x0055> a300c0055; (void)a300c0055; gdcm::Attribute<0x300c,0x0060> a300c0060; (void)a300c0060; gdcm::Attribute<0x300c,0x006a> a300c006a; (void)a300c006a; gdcm::Attribute<0x300c,0x0080> a300c0080; (void)a300c0080; gdcm::Attribute<0x300c,0x00a0> a300c00a0; (void)a300c00a0; gdcm::Attribute<0x300c,0x00b0> a300c00b0; (void)a300c00b0; gdcm::Attribute<0x300c,0x00c0> a300c00c0; (void)a300c00c0; gdcm::Attribute<0x300c,0x00d0> a300c00d0; (void)a300c00d0; gdcm::Attribute<0x300c,0x00e0> a300c00e0; (void)a300c00e0; gdcm::Attribute<0x300c,0x00f0> a300c00f0; (void)a300c00f0; gdcm::Attribute<0x300c,0x00f2> a300c00f2; (void)a300c00f2; gdcm::Attribute<0x300c,0x00f4> a300c00f4; (void)a300c00f4; gdcm::Attribute<0x300c,0x00f6> a300c00f6; (void)a300c00f6; gdcm::Attribute<0x300c,0x0100> a300c0100; (void)a300c0100; gdcm::Attribute<0x300c,0x0102> a300c0102; (void)a300c0102; gdcm::Attribute<0x300c,0x0104> a300c0104; (void)a300c0104; gdcm::Attribute<0x300e,0x0002> a300e0002; (void)a300e0002; gdcm::Attribute<0x300e,0x0004> a300e0004; (void)a300e0004; gdcm::Attribute<0x300e,0x0005> a300e0005; (void)a300e0005; gdcm::Attribute<0x300e,0x0008> a300e0008; (void)a300e0008; gdcm::Attribute<0x4000,0x0010> a40000010; (void)a40000010; gdcm::Attribute<0x4000,0x4000> a40004000; (void)a40004000; gdcm::Attribute<0x4008,0x0040> a40080040; (void)a40080040; gdcm::Attribute<0x4008,0x0042> a40080042; (void)a40080042; gdcm::Attribute<0x4008,0x0050> a40080050; (void)a40080050; gdcm::Attribute<0x4008,0x0100> a40080100; (void)a40080100; gdcm::Attribute<0x4008,0x0101> a40080101; (void)a40080101; gdcm::Attribute<0x4008,0x0102> a40080102; (void)a40080102; gdcm::Attribute<0x4008,0x0103> a40080103; (void)a40080103; gdcm::Attribute<0x4008,0x0108> a40080108; (void)a40080108; gdcm::Attribute<0x4008,0x0109> a40080109; (void)a40080109; gdcm::Attribute<0x4008,0x010a> a4008010a; (void)a4008010a; gdcm::Attribute<0x4008,0x010b> a4008010b; (void)a4008010b; gdcm::Attribute<0x4008,0x010c> a4008010c; (void)a4008010c; gdcm::Attribute<0x4008,0x0111> a40080111; (void)a40080111; gdcm::Attribute<0x4008,0x0112> a40080112; (void)a40080112; gdcm::Attribute<0x4008,0x0113> a40080113; (void)a40080113; gdcm::Attribute<0x4008,0x0114> a40080114; (void)a40080114; gdcm::Attribute<0x4008,0x0115> a40080115; (void)a40080115; gdcm::Attribute<0x4008,0x0117> a40080117; (void)a40080117; gdcm::Attribute<0x4008,0x0118> a40080118; (void)a40080118; gdcm::Attribute<0x4008,0x0119> a40080119; (void)a40080119; gdcm::Attribute<0x4008,0x011a> a4008011a; (void)a4008011a; gdcm::Attribute<0x4008,0x0200> a40080200; (void)a40080200; gdcm::Attribute<0x4008,0x0202> a40080202; (void)a40080202; gdcm::Attribute<0x4008,0x0210> a40080210; (void)a40080210; gdcm::Attribute<0x4008,0x0212> a40080212; (void)a40080212; gdcm::Attribute<0x4008,0x0300> a40080300; (void)a40080300; gdcm::Attribute<0x4008,0x4000> a40084000; (void)a40084000; gdcm::Attribute<0x4ffe,0x0001> a4ffe0001; (void)a4ffe0001; gdcm::Attribute<0x5000,0x0005> a50000005; (void)a50000005; gdcm::Attribute<0x5000,0x0010> a50000010; (void)a50000010; gdcm::Attribute<0x5000,0x0020> a50000020; (void)a50000020; gdcm::Attribute<0x5000,0x0022> a50000022; (void)a50000022; gdcm::Attribute<0x5000,0x0030> a50000030; (void)a50000030; gdcm::Attribute<0x5000,0x0040> a50000040; (void)a50000040; gdcm::Attribute<0x5000,0x0103> a50000103; (void)a50000103; gdcm::Attribute<0x5000,0x0104> a50000104; (void)a50000104; gdcm::Attribute<0x5000,0x0105> a50000105; (void)a50000105; gdcm::Attribute<0x5000,0x0106> a50000106; (void)a50000106; gdcm::Attribute<0x5000,0x0110> a50000110; (void)a50000110; gdcm::Attribute<0x5000,0x0112> a50000112; (void)a50000112; gdcm::Attribute<0x5000,0x0114> a50000114; (void)a50000114; gdcm::Attribute<0x5000,0x1001> a50001001; (void)a50001001; gdcm::Attribute<0x5000,0x2000> a50002000; (void)a50002000; gdcm::Attribute<0x5000,0x2002> a50002002; (void)a50002002; gdcm::Attribute<0x5000,0x2004> a50002004; (void)a50002004; gdcm::Attribute<0x5000,0x2006> a50002006; (void)a50002006; gdcm::Attribute<0x5000,0x2008> a50002008; (void)a50002008; gdcm::Attribute<0x5000,0x200a> a5000200a; (void)a5000200a; gdcm::Attribute<0x5000,0x200e> a5000200e; (void)a5000200e; gdcm::Attribute<0x5000,0x2500> a50002500; (void)a50002500; gdcm::Attribute<0x5000,0x2600> a50002600; (void)a50002600; gdcm::Attribute<0x5000,0x2610> a50002610; (void)a50002610; gdcm::Attribute<0x5200,0x9229> a52009229; (void)a52009229; gdcm::Attribute<0x5200,0x9230> a52009230; (void)a52009230; gdcm::Attribute<0x5400,0x0100> a54000100; (void)a54000100; gdcm::Attribute<0x5400,0x1004> a54001004; (void)a54001004; gdcm::Attribute<0x5400,0x1006> a54001006; (void)a54001006; gdcm::Attribute<0x5600,0x0010> a56000010; (void)a56000010; gdcm::Attribute<0x5600,0x0020> a56000020; (void)a56000020; gdcm::Attribute<0x6000,0x0010> a60000010; (void)a60000010; gdcm::Attribute<0x6000,0x0011> a60000011; (void)a60000011; gdcm::Attribute<0x6000,0x0012> a60000012; (void)a60000012; gdcm::Attribute<0x6000,0x0015> a60000015; (void)a60000015; gdcm::Attribute<0x6000,0x0022> a60000022; (void)a60000022; gdcm::Attribute<0x6000,0x0040> a60000040; (void)a60000040; gdcm::Attribute<0x6000,0x0045> a60000045; (void)a60000045; gdcm::Attribute<0x6000,0x0050> a60000050; (void)a60000050; gdcm::Attribute<0x6000,0x0051> a60000051; (void)a60000051; gdcm::Attribute<0x6000,0x0052> a60000052; (void)a60000052; gdcm::Attribute<0x6000,0x0060> a60000060; (void)a60000060; gdcm::Attribute<0x6000,0x0061> a60000061; (void)a60000061; gdcm::Attribute<0x6000,0x0062> a60000062; (void)a60000062; gdcm::Attribute<0x6000,0x0063> a60000063; (void)a60000063; gdcm::Attribute<0x6000,0x0066> a60000066; (void)a60000066; gdcm::Attribute<0x6000,0x0068> a60000068; (void)a60000068; gdcm::Attribute<0x6000,0x0069> a60000069; (void)a60000069; gdcm::Attribute<0x6000,0x0100> a60000100; (void)a60000100; gdcm::Attribute<0x6000,0x0102> a60000102; (void)a60000102; gdcm::Attribute<0x6000,0x0110> a60000110; (void)a60000110; gdcm::Attribute<0x6000,0x0200> a60000200; (void)a60000200; gdcm::Attribute<0x6000,0x0800> a60000800; (void)a60000800; gdcm::Attribute<0x6000,0x0802> a60000802; (void)a60000802; gdcm::Attribute<0x6000,0x0803> a60000803; (void)a60000803; gdcm::Attribute<0x6000,0x0804> a60000804; (void)a60000804; gdcm::Attribute<0x6000,0x1001> a60001001; (void)a60001001; gdcm::Attribute<0x6000,0x1100> a60001100; (void)a60001100; gdcm::Attribute<0x6000,0x1101> a60001101; (void)a60001101; gdcm::Attribute<0x6000,0x1102> a60001102; (void)a60001102; gdcm::Attribute<0x6000,0x1103> a60001103; (void)a60001103; gdcm::Attribute<0x6000,0x1200> a60001200; (void)a60001200; gdcm::Attribute<0x6000,0x1201> a60001201; (void)a60001201; gdcm::Attribute<0x6000,0x1202> a60001202; (void)a60001202; gdcm::Attribute<0x6000,0x1203> a60001203; (void)a60001203; gdcm::Attribute<0x6000,0x1301> a60001301; (void)a60001301; gdcm::Attribute<0x6000,0x1302> a60001302; (void)a60001302; gdcm::Attribute<0x6000,0x1303> a60001303; (void)a60001303; gdcm::Attribute<0x6000,0x1500> a60001500; (void)a60001500; gdcm::Attribute<0x6000,0x4000> a60004000; (void)a60004000; gdcm::Attribute<0x7fe0,0x0020> a7fe00020; (void)a7fe00020; gdcm::Attribute<0x7fe0,0x0030> a7fe00030; (void)a7fe00030; gdcm::Attribute<0x7fe0,0x0040> a7fe00040; (void)a7fe00040; gdcm::Attribute<0x7f00,0x0011> a7f000011; (void)a7f000011; gdcm::Attribute<0x7f00,0x0020> a7f000020; (void)a7f000020; gdcm::Attribute<0x7f00,0x0030> a7f000030; (void)a7f000030; gdcm::Attribute<0x7f00,0x0040> a7f000040; (void)a7f000040; gdcm::Attribute<0xfffa,0xfffa> afffafffa; (void)afffafffa; gdcm::Attribute<0xfffc,0xfffc> afffcfffc; (void)afffcfffc; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestAttribute4.cxx000664 001766 001770 00000002336 14517730450 033010 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAttribute.h" int main() { gdcm::Attribute<0x0018,0x1182, gdcm::VR::IS, gdcm::VM::VM1> fd = {0}; fd.Print( std::cout ); /* bool b = gdcm::VR::OB & gdcm::VR::UL; std::cout << b << std::endl; gdcm::VR vr = fd.GetVR(); gdcm::VR dictvr = fd.GetDictVR(); b = vr & dictvr; std::cout << vr << " " << dictvr << std::endl; std::cout << b << std::endl; gdcm::VM vm = fd.GetVM(); gdcm::VM dictvm = fd.GetDictVM(); b = vm & dictvm; std::cout << vm << " " << dictvm << std::endl; std::cout << b << std::endl; // Let's if we can construct a private element: gdcm::Attribute<0x1233,0x5678, gdcm::VR::IS, gdcm::VM::VM1> fd2 = {0}; */ return 0; } Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestReaderSelectedPrivateGroups.cxx000664 001766 001770 00000004631 14517730450 036310 0ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmFileMetaInformation.h" #include "gdcmFile.h" #include "gdcmTesting.h" #include "gdcmMediaStorage.h" #include "gdcmSystem.h" #include "gdcmDirectory.h" int TestReadSelectedPrivateGroups(const char* filename, bool verbose = false) { if( verbose ) std::cout << "TestRead: " << filename << std::endl; std::ifstream is( filename, std::ios::binary ); gdcm::Reader reader; reader.SetStream( is ); gdcm::PrivateTag group9(0x9,0x10,"GEMS_IDEN_01"); std::set selectedtags; selectedtags.insert ( group9 ); if ( !reader.ReadSelectedPrivateTags( selectedtags ) ) { std::cerr << "TestReadSelectedGroups: Failed to read: " << filename << std::endl; return 1; } std::streamoff outStreamOffset = is.tellg(); gdcm::File & file = reader.GetFile(); gdcm::DataSet & ds = file.GetDataSet(); if( verbose ) std::cout << ds << std::endl; const bool found = ds.FindDataElement(group9); if(verbose) std::cout << "{ \"" << filename << "\"," << outStreamOffset << " }," << std::endl; std::streamoff refoffset = gdcm::Testing::GetSelectedPrivateGroupOffsetFromFile(filename); if( refoffset != outStreamOffset ) { std::cerr << filename << ": " << outStreamOffset << " should be " << refoffset << " found: " << found << std::endl; return 1; } is.close(); return 0; } int TestReaderSelectedPrivateGroups(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestReadSelectedPrivateGroups(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestReadSelectedPrivateGroups( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestFragment.cxx000664 001766 001770 00000001336 14517730450 032523 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFragment.h" int TestFragment(int argc, char *argv[]) { (void)argc; (void)argv; gdcm::Fragment frag; std::cout << frag << std::endl; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestImplicitDataElement.cxx000664 001766 001770 00000006413 14517730450 034637 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmImplicitDataElement.h" #include "gdcmStringStream.h" #include "gdcmSwapper.h" int TestImplicitDataElement1(const uint16_t group, const uint16_t element, const uint32_t vl) { const char *str; std::stringstream ss; str = reinterpret_cast(&group); ss.write(str, sizeof(group)); str = reinterpret_cast(&element); ss.write(str, sizeof(element)); str = reinterpret_cast(&vl); ss.write(str, sizeof(vl)); gdcm::ImplicitDataElement de; if( !de.Read(ss) ) { std::cerr << de << std::endl; return 1; } if( de.GetTag().GetGroup() != group || de.GetTag().GetElement() != element || de.GetVL() != vl ) { std::cerr << de << std::endl; return 1; } std::cout << de << std::endl; return 0; } int TestImplicitDataElement2(const uint16_t group, const uint16_t element, const char *value) { const char *str; const uint32_t vl = strlen(value); std::stringstream ss; str = reinterpret_cast(&group); ss.write(str, sizeof(group)); str = reinterpret_cast(&element); ss.write(str, sizeof(element)); str = reinterpret_cast(&vl); ss.write(str, sizeof(vl)); str = value; ss.write(str, vl); gdcm::ImplicitDataElement de; if( !de.Read(ss) ) { std::cerr << de << std::endl; return 1; } if( de.GetTag().GetGroup() != group || de.GetTag().GetElement() != element || de.GetVL() != vl ) { std::cerr << de << std::endl; return 1; } const gdcm::ByteValue *bv = dynamic_cast(&de.GetValue()); if( !bv ) { return 1; } if( !(gdcm::ByteValue(value, vl) == *bv ) ) { return 1; } std::cout << de << std::endl; return 0; } inline void WriteRead(gdcm::DataElement const &w, gdcm::DataElement &r) { // w will be written // r will be read back std::stringstream ss; w.Write(ss); r.Read(ss); } int TestImplicitDataElement(int, char *[]) { const uint16_t group = 0x0010; const uint16_t element = 0x0012; const uint32_t vl = 0x0; const char value[] = "GDCM"; int r = 0; r += TestImplicitDataElement1(group, element, vl); r += TestImplicitDataElement2(group, element, value); gdcm::ImplicitDataElement de1(gdcm::Tag(0x1234, 0x5678), 0x4321); gdcm::ImplicitDataElement de2(gdcm::Tag(0x1234, 0x6789), 0x9876); WriteRead(de1, de2); if( !(de1 == de2) ) { std::cerr << de1 << std::endl; std::cerr << de2 << std::endl; return 1; } return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestAttribute6.cxx000664 001766 001770 00000002336 14517730450 033012 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAttribute.h" int main() { gdcm::Attribute<0x0018,0x1182, gdcm::VR::IS, gdcm::VM::VM1> fd = {0}; fd.Print( std::cout ); /* bool b = gdcm::VR::OB & gdcm::VR::UL; std::cout << b << std::endl; gdcm::VR vr = fd.GetVR(); gdcm::VR dictvr = fd.GetDictVR(); b = vr & dictvr; std::cout << vr << " " << dictvr << std::endl; std::cout << b << std::endl; gdcm::VM vm = fd.GetVM(); gdcm::VM dictvm = fd.GetDictVM(); b = vm & dictvm; std::cout << vm << " " << dictvm << std::endl; std::cout << b << std::endl; // Let's if we can construct a private element: gdcm::Attribute<0x1233,0x5678, gdcm::VR::IS, gdcm::VM::VM1> fd2 = {0}; */ return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestReader2.cxx000664 001766 001770 00000003572 14517730450 032250 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmAttribute.h" #include "gdcmElement.h" #include "gdcmTesting.h" // D_CLUNIE_CT1_J2KI.dcm // int TestReader2(int , char *[]) { //const char *filename = argv[1]; std::string dataroot = gdcm::Testing::GetDataRoot(); std::string filename = dataroot + "/012345.002.050.dcm"; gdcm::Reader reader; reader.SetFileName( filename.c_str() ); if ( !reader.Read() ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } const gdcm::DataSet &ds = reader.GetFile().GetDataSet(); //gdcm::Attribute<0x0008,0x0008> a1; //a1.Set( ds[ gdcm::Tag(0x0008,0x0008) ].GetValue() ); //a1.Print( std::cout ); gdcm::Attribute<0x0020,0x0037> a2; a2.SetFromDataElement( ds[ gdcm::Tag(0x0020,0x0037) ] ); a2.Print( std::cout ); std::cout << std::endl; /* // (0043,1013) SS 107\21\4\2\20 # 10, 5 ReconKernelParameters gdcm::Element el1; el1.Set( ds[ gdcm::Tag(0x0043,0x1013) ].GetValue() ); el1.Print( std::cout ); std::cout << std::endl; // (0043,1031) DS [-11.200000\9.700000] # 20, 2 RACoordOfTargetReconCentre gdcm::Element el2; el2.Set( ds[ gdcm::Tag(0x0043,0x1031) ].GetValue() ); el2.Print( std::cout ); std::cout << std::endl; */ return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestFileMetaInformation.cxx000664 001766 001770 00000004736 14517730450 034663 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFileMetaInformation.h" #include "gdcmReader.h" #include "gdcmTesting.h" int TestFileMetaInformation(int, char *[]) { std::string dataroot = gdcm::Testing::GetDataRoot(); std::string filename = dataroot + "/012345.002.050.dcm"; gdcm::Reader reader; reader.SetFileName(filename.c_str()); if ( !reader.Read() ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } const gdcm::File& fi = reader.GetFile(); const gdcm::FileMetaInformation& hd = fi.GetHeader(); std::stringstream ss; hd.Write(ss); gdcm::FileMetaInformation hd2; // FAIL //hd2.Read(ss); // WORKS //ss.ignore(132); //hd2.Read(ss); return 0; } int TestFileMetaInformationCopyConstructor(int, char* []) { std::string dataroot = gdcm::Testing::GetDataRoot(); std::string filename = dataroot + "/012345.002.050.dcm"; gdcm::Reader reader; reader.SetFileName(filename.c_str()); if (!reader.Read()) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } const gdcm::File& fi = reader.GetFile(); const gdcm::FileMetaInformation& hd = fi.GetHeader(); const gdcm::FileMetaInformation hd_of_copy(hd); if (hd.IsEmpty()) return 1; if (hd_of_copy.Size() != hd.Size()) return 1; return 0; } int TestFileMetaInformationAssignmentOperator(int, char* []) { std::string dataroot = gdcm::Testing::GetDataRoot(); std::string filename = dataroot + "/012345.002.050.dcm"; gdcm::Reader reader; reader.SetFileName(filename.c_str()); if (!reader.Read()) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } const gdcm::File& fi = reader.GetFile(); const gdcm::FileMetaInformation& hd = fi.GetHeader(); gdcm::File file_copy; file_copy.SetHeader(hd); //Assignment Operator inside gdcm::FileMetaInformation& hd_of_copy = file_copy.GetHeader(); if (hd.IsEmpty()) return 1; if (hd_of_copy.Size() != hd.Size()) return 1; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestPrivateTag.cxx000664 001766 001770 00000007127 14517730450 033032 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmPrivateTag.h" #include "gdcmDataSet.h" int TestPrivateTag(int , char * []) { gdcm::PrivateTag pt(0x29,0x1018,"SIEMENS CSA HEADER"); if( pt != gdcm::Tag(0x0029,0x18) ) { std::cerr << pt << std::endl; return 1; } if( pt.GetOwner() != std::string("SIEMENS CSA HEADER") ) { std::cerr << "[" << pt.GetOwner() << "]" << std::endl; return 1; } gdcm::PrivateTag pt2(0x29,0x1018,"SIEMENS CSA HEADER"); if( pt != pt2 ) return 1; gdcm::PrivateTag pt3(0x29,0x1018,"SIEMENS CXA HEADER"); if( pt == pt3 ) return 1; if( pt3 < pt ) return 1; const char str[] = "0029,1019,SIEMENS CSA HEADER"; if( !pt.ReadFromCommaSeparatedString( str ) ) return 1; if( pt != gdcm::Tag(0x0029,0x19) ) { std::cerr << pt << std::endl; return 1; } if( pt.GetOwner() != std::string("SIEMENS CSA HEADER") ) { std::cerr << "[" << pt.GetOwner() << "]" << std::endl; return 1; } const char strc[] = "4453,0d,DR Systems, Inc."; if( !pt.ReadFromCommaSeparatedString( strc ) ) return 1; if( pt != gdcm::Tag(0x4453,0x0d) ) { std::cerr << pt << std::endl; return 1; } if( pt.GetOwner() != std::string("DR Systems, Inc.") ) { std::cerr << "[" << pt.GetOwner() << "]" << std::endl; return 1; } const gdcm::PrivateTag pt1(0x1,0x2,"BLA"); const char str0[] = ""; const char str1[] = "1,2,BLA"; const char str2[] = "1,65536,BLU"; const char str3[] = "65536,2,BLU"; const char str4[] = "65536,2"; const char str5[] = "0028,1019,SIEMENS CSA HEADER"; const char str6[] = "0029,1019,SIEMENS\\CSA HEADER"; const char str7[] = "0029,1019,SIEMENS\"CSA HEADER"; if( pt.ReadFromCommaSeparatedString( nullptr ) ) { return 1; } if( pt.ReadFromCommaSeparatedString( str0 ) ) { return 1; } if( !pt.ReadFromCommaSeparatedString( str1 ) ) { return 1; } if( pt != pt1 ) { return 1; } if( pt.ReadFromCommaSeparatedString( str2 ) ) { return 1; } if( pt.ReadFromCommaSeparatedString( str3 ) ) { return 1; } if( pt.ReadFromCommaSeparatedString( str4 ) ) { return 1; } if( pt.ReadFromCommaSeparatedString( str5 ) ) { return 1; } if( pt.ReadFromCommaSeparatedString( str6 ) ) { return 1; } if( !pt.ReadFromCommaSeparatedString( str7 ) ) { return 1; } gdcm::PrivateTag null(0x0,0x0,nullptr); if( null.GetOwner() == nullptr ) { return 1; } const gdcm::PrivateTag nospaces(0x12,0x34,"Philips MR Imaging DD 001"); gdcm::PrivateTag spaces(0x12,0x34," Philips MR Imaging DD 001 "); if( nospaces != spaces ) return 1; spaces.SetOwner(" Philips MR Imaging DD 001 "); if( nospaces != spaces ) return 1; { // hand-craft Dataset fragment gdcm::DataSet ds; gdcm::DataElement de(gdcm::Tag(0x0029,0x0011), 0,gdcm::VR::LO); ds.Insert(de); // get private tag gdcm::PrivateTag pt0(0x0029, 0x0023, "Titi"); if(ds.FindDataElement(pt0)) return 1; auto de0 = ds.GetDataElement(pt0); } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestElement3.cxx000664 001766 001770 00000021656 14517730450 032443 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include #include #include #include struct AE { char Internal[16+1]; void Print(std::ostream &os) { os << Internal; } }; typedef enum { DAY = 'D', WEEK = 'W', MONTH = 'M', YEAR = 'Y' } DateFormat; //template struct ASValid; //template <> struct ASValid<'Y'> { }; struct AS { unsigned short N; unsigned char Format; void Print(std::ostream &os) { if( N < 1000 && (Format == 'D' || Format == 'W' || Format == 'M' || Format == 'Y' )) { os << std::setw(3) << std::setfill('0') << N << Format; } else { os << ""; } } }; struct AT { // Tag Internal; }; struct CS { char Internal[16]; }; struct DA { unsigned short Year : 12; unsigned short Month : 4; unsigned short Day : 5; void Print(std::ostream &os) { os << std::setw(4) << std::setfill('0') << Year; os << std::setw(2) << std::setfill('0') << Month; os << std::setw(2) << std::setfill('0') << Day; } }; struct date { unsigned short day : 5; // 1 to 31 unsigned short month : 4; // 1 to 12 unsigned short year : 12; /* 0 to 9999 (technically :11 should be enough for a couple of years...) */ void Print(std::ostream &os) { os << year << "." << (int)month << "." << (int)day; } }; struct DS { double Internal; // 16 bytes as integer would mean we can have 10^16 as max int // which only double can hold }; struct FL { float Internal; }; struct FD { double Internal; }; struct IS { int Internal; void Print(std::ostream &os) { os << Internal; } }; struct LO { char Internal[64]; void Print(std::ostream &os) { os << Internal; } }; struct LT { std::string Internal; void Print(std::ostream &os) { os << Internal.size(); os << std::endl; os << Internal; } }; struct OB { explicit OB(const char *array = 0, uint32_t length = 0):Internal(array),Length(length) {} void Print( std::ostream &os ) { const char *p = Internal; const char *end = Internal+Length; while(p != end) { os << "\\" << (int)*p++; } } private: const char *Internal; uint32_t Length; }; struct OF; struct OW; struct PN { char Component[5][64]; void Print(std::ostream &os) { //os << "Family Name Complex: " << Component[0] << std::endl; //os << "Given Name Complex: " << Component[1] << std::endl; //os << "Middle Name : " << Component[2] << std::endl; //os << "Name Suffix : " << Component[3] << std::endl; //os << "Name Prefix : " << Component[4] << std::endl; os << Component[0] << "^"; os << Component[1] << "^"; os << Component[2] << "^"; os << Component[3] << "^"; os << Component[4]; } }; struct SH { char Internal[16+1]; }; struct SL { signed long Internal; }; struct SQ; struct SS { signed short Internal; }; struct ST { std::string Internal; }; struct TM { unsigned short hours:5; unsigned short minutes:6; unsigned short seconds:6; unsigned int fracseconds:20; void Print(std::ostream &os) { os << std::setw(2) << std::setfill('0') << hours; os << std::setw(2) << std::setfill('0') << minutes; os << std::setw(2) << std::setfill('0') << seconds; os << "."; os << std::setw(6) << std::setfill('0') << fracseconds; } }; struct Tri { short Internal:2; //operator void *() const { return Internal; } operator short () const { return Internal; } }; struct DT { DA da; TM tm; Tri OffsetSign; unsigned short Hours:5; unsigned short Minutes:6; // YYYYMMDDHHMMSS.FFFFFF&ZZZZ void Print ( std::ostream &os) { da.Print( os ); tm.Print( os ); if( OffsetSign ) { if ( OffsetSign == -1 ) os << "-"; else if ( OffsetSign == +1 ) os << "+"; else return; os << std::setw(2) << std::setfill('0') << Hours; os << std::setw(2) << std::setfill('0') << Minutes; } } }; struct UI { char Internal[64+1]; void Print(std::ostream &os) { os << strlen(Internal) << std::endl; os << Internal; } }; struct UL { unsigned long Internal; }; struct UN { std::vector Internal; }; struct US { unsigned short Internal; }; struct UT { std::string Internal; }; struct S { union { char s[2]; } Internal; //unsigned short Internal; void Print( std::ostream &os ) { os << strlen( Internal.s ) << std::endl; os << Internal.s; } }; int main() { AE ae = { "application enti" }; ae.Print( std::cout ); std::cout << std::endl; AS as = { 1, 'Y' }; as.Print( std::cout ); std::cout << std::endl; DA da = { 10978, 11, 32 }; da.Print( std::cout ); std::cout << std::endl; std::cout << "DA:" << sizeof (DA) << std::endl; double dd = 10*10*10*10*10*10*10*10; std::cout << dd << std::endl; DS ds = { 10*10*10*10*10*10*10*10 + 1 }; std::cout << ds.Internal << std::endl; DT dt = { 1979, 7, 6 }; dt.Print( std::cout << "DT: " ); std::cout << std::endl; DT dt1 = { 1979, 7, 6, 23, 59, 59, 999999 }; dt1.Print( std::cout << "DT: " ); std::cout << std::endl; DT dt2 = { 1979, 7, 6, 23, 59, 59, 999999, -1, 12, 42 }; dt2.Print( std::cout << "DT: " ); std::cout << std::endl; DT dt3 = { 1979, 7, 6, 23, 59, 59, 999999, +1, 12, 42 }; dt3.Print( std::cout << "DT: " ); std::cout << std::endl; IS is = { 2 << 30 }; is.Print( std::cout ); std::cout << std::endl; //std::cout << 8*8 << std::endl; //std::cout << 8*8*8*8 << std::endl; date d = {31, 12, 1978 }; d.Print( std::cout ); std::cout << std::endl; std::cout << "date:" << sizeof (date) << std::endl; LO lo = { "coucou" }; lo.Print( std::cout ); std::cout << std::endl; LT lt = { "very long text\0hello mathieu" }; lt.Print( std::cout ); std::cout << std::endl; OB ob("\0\1", 2); ob.Print( std::cout ); std::cout << std::endl; PN pn1 = { "abc123", "def", "ghi", "klm", "opq" }; pn1.Print( std::cout ); std::cout << std::endl; PN pn2 = { "malaterre", "mathieu olivier patrick"}; pn2.Print( std::cout ); std::cout << std::endl; // Rev. John Robert Quincy Adams, B.A. M.Div. “Adams^John Robert Quincy^^Rev.^B.A. M.Div.” [One family name; three given names; no middle name; one prefix; two suffixes.] PN pn3 = { "Adams", "John Robert Quincy", "", "Rev.", "B.A. M.Div." }; pn3.Print( std::cout ); std::cout << std::endl; // Susan Morrison-Jones, Ph.D., Chief Executive Officer “Morrison-Jones^Susan^^^Ph.D., Chief Executive Officer” [Two family names; one given name; no middle name; no prefix; two suffixes.] PN pn4 = { "Morrison-Jones", "Susan", "", "", "Ph.D., Chief Executive Officer" }; pn4.Print( std::cout ); std::cout << std::endl; // John Doe “Doe^John” [One family name; one given name; no middle name, prefix, or suffix. Delimiters have been omitted for the three trailing null components.] PN pn5 = { "Doe", "John" }; pn5.Print( std::cout ); std::cout << std::endl; // (for examples of the encoding of Person Names using multi-byte character sets see Annex H) // Smith^Fluffy [A cat, rather than a //human, whose responsible party family name is Smith, and whose own name is Fluffy] PN pn6 = { "Smith", "Fluffy" }; pn6.Print( std::cout ); std::cout << std::endl; //ABC Farms^Running on Water [A horse whose responsible organization is named ABC Farms, and whose name is “Running On Water”] PN pn7 = { "ABC Farms", "Running on Water" }; pn7.Print( std::cout ); std::cout << std::endl; std::cout << "TM:" << sizeof (TM) << std::endl; TM tm1 = { 7, 12, 49, 999999 }; tm1.Print( std::cout ); std::cout << std::endl; TM tm2 = { 23, 59, 59, 999999 }; tm2.Print( std::cout ); std::cout << std::endl; TM tm3 = { 0, 0, 0, 0 }; tm3.Print( std::cout ); std::cout << std::endl; UI ui = { "1234567890.1234567890.1234567890.1234567890.1234567890.123456789" }; ui.Print( std::cout ); std::cout << std::endl; //S s = "10"; S s = { '1' }; s.Print(std::cout); std::cout << std::endl; std::cout << "Tri:" << std::endl; Tri t1 = { 0 }; std::cout << t1.Internal << std::endl; Tri t2 = { 1 }; std::cout << t2.Internal << std::endl; Tri t3 = { 2 }; std::cout << t3.Internal << std::endl; Tri t4 = { 3 }; std::cout << t4.Internal << std::endl; Tri t5 = { '+' }; std::cout << t5.Internal << std::endl; Tri t6 = { '-' }; std::cout << t6.Internal << std::endl; Tri t7 = { -1 }; std::cout << t7.Internal << std::endl; //DateFormat df = 'Y'; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestSequenceOfItems3.cxx000664 001766 001770 00000003217 14517730450 034102 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSequenceOfItems.h" #include "gdcmReader.h" #include "gdcmTesting.h" int TestSequenceOfItems3Func(const char * filename, bool verbose = false) { (void)verbose; gdcm::Reader r; r.SetFileName( filename ); if( !r.Read() ) { return 1; } gdcm::DataSet const& ds = r.GetFile().GetDataSet(); gdcm::DataSet::ConstIterator it = ds.Begin(); for( ; it != ds.End(); ++it) { const gdcm::DataElement &de = *it; gdcm::SmartPointer sqi = de.GetValueAsSQ(); if( sqi ) { std::stringstream ss; sqi->Print( ss ); // debug invalid read/write } } return 0; } int TestSequenceOfItems3(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestSequenceOfItems3Func(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestSequenceOfItems3Func( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestByteSwapFilter.cxx000664 001766 001770 00000001301 14517730450 033654 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmByteSwapFilter.h" int TestByteSwapFilter(int, char *[]) { gdcm::DataSet ds; gdcm::ByteSwapFilter bsf( ds ); return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestInvalidDICOMFiles.cxx000664 001766 001770 00000011327 14517730450 034106 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmWriter.h" #include "gdcmFileMetaInformation.h" #include "gdcmFile.h" #include "gdcmTesting.h" #include "gdcmMediaStorage.h" #include "gdcmSystem.h" struct element { const char *in; const char *inmd5; const char *outmd5; size_t outlen; }; // non of the input file can be read by DCMTK // output file was check against DCMTK on Aug 12 2010 (MM) static const element list[] = { { "Enhanced_MR_Image_Storage_PixelSpacingNotIn_0028_0030.dcm", "854653ae806c224bfae3f196af250311", "e6d42da08e33e526dab4626864a1580e", 26851994 }, { "Siemens_CT_Sensation64_has_VR_RT.dcm", "3388c4f8e35cdb3d9512823f71e2415b", "cc57ee3ff427b859d3022071c8f1be95", 526460 }, { "ITK-GDCM-1.2.2.saysExplicitVR-butIsImplicitVR.dcm", "1158160333e00c0d1f8a7fdcbe352cac", "7fb2ef887fa29b9a793242b28d4e8258", 199218 }, { "MR_Philips_Intera_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm", "a8091f92ae895c2ef70143487e29b7d3", "6bf002815fad665392acab24f09caa5e", 138596 }, { "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm", // still an issue !!! "aa07de9c01765602fe722e9ef2d8b92a", "aa07de9c01765602fe722e9ef2d8b92a", 2106660 }, { "MR_Philips_Intera_PrivateSequenceExplicitVR.dcm", "a8091f92ae895c2ef70143487e29b7d3", "6bf002815fad665392acab24f09caa5e", 138596 }, { "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm", "3bbffc4c87f4f5554fafad5f8a002552", "df0e01aae299317db1719e4de72b8937", 2106428 }, { "illegal_UN_stands_for_SQ.dcm", // JPR ?? "2e1aa4fbebd08bbdf252f57b8343a79a", "4c6832a4378f5d953c1e92fdcbe43666", 33972 }, }; int TestInvalidDICOMFiles(int , char *[]) { int r = 0; gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); const char *extradataroot = gdcm::Testing::GetDataExtraRoot(); if( !extradataroot ) { return 1; } if( !gdcm::System::FileIsDirectory(extradataroot) ) { std::cerr << "No such directory: " << extradataroot << std::endl; return 1; } static const size_t n = sizeof( list ) / sizeof( element ); for( size_t i = 0; i < n; ++i ) { const element &el = list[i]; std::string sfilename = extradataroot; sfilename += "/gdcmSampleData/images_of_interest/"; sfilename += el.in; // dcmdump --disable-cp246 ... const char *filename = sfilename.c_str(); if( !gdcm::System::FileExists(filename) ) { std::cerr << "No such file: " << filename << std::endl; return 1; } gdcm::Reader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { std::cerr << "TestReadError: Failed to read: " << filename << std::endl; return 1; } //const char *ref = gdcm::Testing::GetMediaStorageFromFile(filename); //std::cerr << "ref:" << ref << std::endl; char digest_str[33]; bool b = gdcm::Testing::ComputeFileMD5(filename, digest_str); if( !b ) return 1; std::string md5ref = el.inmd5; if( md5ref != digest_str ) { std::cerr << "pb: " << md5ref << " vs " << digest_str << std::endl; ++r; } const char subdir[] = "TestInvalidDICOMFiles"; // Create directory first: std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { gdcm::System::MakeDirectory( tmpdir.c_str() ); } std::string outfilename = gdcm::Testing::GetTempFilename( filename, subdir ); std::cout << "Corrected to: " << outfilename << std::endl; gdcm::Writer writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); writer.SetCheckFileMetaInformation( false ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; ++r; } char digest_str2[33]; bool b2 = gdcm::Testing::ComputeFileMD5(outfilename.c_str(), digest_str2); if( !b2 ) return 1; std::string md5ref2 = el.outmd5; if( md5ref2 != digest_str2 ) { std::cerr << "pb: " << md5ref2 << " vs " << digest_str2 << std::endl; ++r; } // paranoid: size_t s = gdcm::System::FileSize(outfilename.c_str()); if ( s != el.outlen ) // identical in size ! { std::cerr << "pb size: " << s << std::endl; ++r; } } return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestAttribute2.cxx000664 001766 001770 00000006516 14517730450 033012 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAttribute.h" /* (0008,0000) UL 38 (0008,0001) UL 262302 (0008,0010) LO [ACRNEMA_LIBIDO_1.1] (0028,0000) UL 100 (0028,0005) US 2 (0028,0010) US 512 (0028,0011) US 512 (0028,0015) ?? 00\00 (0028,0016) ?? 00\00 (0028,0100) US 8 (0028,0101) US 8 (0028,0102) US 7 (0028,0103) US 0 (0028,0199) ?? 70\00 (7fe0,0000) UL 262152 (7fe0,0010) OW ea00\eaea\e9e9\e9e9\e9e9\e */ int main(int argc, char *argv[]) { const char *filename; if( argc < 2 ) { filename = "/tmp/dummy.dcm"; } else { filename = argv[1]; } //std::cout << "Reading: " << filename << std::endl; std::ifstream is(filename, std::ios::binary ); gdcm::Attribute<0x0008,0x0000, gdcm::VR::UL, gdcm::VM::VM1> a; a.Read(is); a.Print( std::cout << std::endl ); gdcm::Attribute<0x0008,0x0001, gdcm::VR::UL, gdcm::VM::VM1> b; b.Read(is); b.Print( std::cout << std::endl ); gdcm::Attribute<0x0008,0x0010, gdcm::VR::LO, gdcm::VM::VM24> c = {}; c.Read(is); c.Print( std::cout << std::endl ); gdcm::Attribute<0x0028,0x0000, gdcm::VR::UL, gdcm::VM::VM1> d; d.Read(is); d.Print( std::cout << std::endl ); gdcm::Attribute<0x0028,0x0005, gdcm::VR::US, gdcm::VM::VM1> e; e.Read(is); e.Print( std::cout << std::endl ); gdcm::Attribute<0x0028,0x0010, gdcm::VR::US, gdcm::VM::VM1> f; f.Read(is); f.Print( std::cout << std::endl ); gdcm::Attribute<0x0028,0x0011, gdcm::VR::US, gdcm::VM::VM1> g; g.Read(is); g.Print( std::cout << std::endl ); // 0028 0015 US 1 UsedNbX ACR Special (RET) // 0028 0016 US 1 UsedNbY ACR Special (RET) gdcm::Attribute<0x0028,0x0015, gdcm::VR::US, gdcm::VM::VM1> h; h.Read(is); h.Print( std::cout << std::endl ); gdcm::Attribute<0x0028,0x0016, gdcm::VR::US, gdcm::VM::VM1> i; i.Read(is); i.Print( std::cout << std::endl ); gdcm::Attribute<0x0028,0x0100, gdcm::VR::US, gdcm::VM::VM1> j; j.Read(is); j.Print( std::cout << std::endl ); gdcm::Attribute<0x0028,0x0101, gdcm::VR::US, gdcm::VM::VM1> k; k.Read(is); k.Print( std::cout << std::endl ); gdcm::Attribute<0x0028,0x0102, gdcm::VR::US, gdcm::VM::VM1> l; l.Read(is); l.Print( std::cout << std::endl ); gdcm::Attribute<0x0028,0x0103, gdcm::VR::US, gdcm::VM::VM1> m; m.Read(is); m.Print( std::cout << std::endl ); // 0028 0199 US 1 Special Code (RET) gdcm::Attribute<0x0028,0x0199, gdcm::VR::US, gdcm::VM::VM1> n; n.Read(is); n.Print( std::cout << std::endl ); gdcm::Attribute<0x7fe0,0x0000, gdcm::VR::UL, gdcm::VM::VM1> o; o.Read(is); o.Print( std::cout << std::endl ); gdcm::Attribute<0x7fe0,0x0010, gdcm::VR::OW, gdcm::VM::VM1> p; // char bytes[512*512]; p.SetBytes(bytes, 512*512); p.Read(is); p.Print( std::cout << std::endl ); std::streampos pos = is.tellg(); std::cout << "Pos=" << (int)pos << std::endl; is.close(); return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestCopyValue.cxx000664 001766 001770 00000004263 14517730450 032671 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmValue.h" #include "gdcmByteValue.h" #include //namespace std { namespace tr1 = Boost; } void RawPtr(const char *array, const size_t len) { std::cout << "RawPtr" << std::endl; gdcm::ByteValue *bv1 = new gdcm::ByteValue(array, len); std::cout << *bv1 << std::endl; gdcm::ByteValue *bv2 = new gdcm::ByteValue(array, len); std::cout << *bv2 << std::endl; const gdcm::Value &ref1 = *bv1; std::cout << ref1 << std::endl; const gdcm::Value &ref2 = *bv2; std::cout << ref2 << std::endl; // Need to delete: delete bv1; delete bv2; } typedef std::tr1::shared_ptr ValuePtr; void SharedPtr(const char *array, const size_t len) { std::cout << "SharedPtr" << std::endl; //ValuePtr w; //std::cout << w << std::endl; ValuePtr bv1 ( new gdcm::ByteValue(array, len) ); std::cout << *bv1 << std::endl; ValuePtr bv2 ( new gdcm::ByteValue(array, len) ); std::cout << *bv2 << std::endl; const gdcm::Value &ref1 = *bv1; std::cout << ref1 << std::endl; const gdcm::Value &ref2 = *bv2; std::cout << ref2 << std::endl; // No need to delete :) } int TestCopyValue(int , char *[]) { const char array[] = "GDCM is yet another DICOM library."; const size_t len = strlen( array ); RawPtr(array, len); SharedPtr(array, len); std::vector v; v.push_back( ValuePtr(new gdcm::ByteValue(array, len) )); v.push_back( ValuePtr(new gdcm::ByteValue(array, len) )); v.push_back( ValuePtr(new gdcm::ByteValue(array, len) )); v.push_back( ValuePtr(new gdcm::ByteValue(array, len) )); v.push_back( ValuePtr(new gdcm::ByteValue(array, len) )); // no delete :) return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestReaderCanRead.cxx000664 001766 001770 00000011310 14517730450 033371 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmTesting.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmWriter.h" #include "gdcmDirectory.h" int TestReadCanRead(const char *subdir, const char* filename, bool verbose = false) { if( verbose ) std::cout << "TestReadCanRead: " << filename << std::endl; bool b1, b2; gdcm::Reader reader; reader.SetFileName( filename ); b1 = reader.CanRead(); b2 = reader.Read(); gdcm::Filename fn( filename ); const char *name = fn.GetName(); int ret = 1; const char dicomdir_bad[] = "gdcmSampleData/ForSeriesTesting/Perfusion/DICOMDIR"; if( fn.EndWith( dicomdir_bad ) ) { ret = 0; } // This is not an error if you are in the black list: if( strcmp(name, "BuggedDicomWorksImage_Hopeless.dcm" ) == 0 || strcmp(name, "Philips_Wrong_Terminator_XX_0277" ) == 0 || strcmp(name, "DICOMDIR_noPATIENT_noSTUDY" ) == 0 || strcmp(name, "JpegLosslessMultiframePapyrus.pap" ) == 0 || strcmp(name, "Fish-1.img" ) == 0 || strcmp(name, "NM_FromJulius_Caesar.dcm" ) == 0 || strcmp(name, "Siemens-leonardo-bugged.dcm" ) == 0 || strcmp(name, "illegal_UN_stands_for_OB.dcm" ) == 0 || strcmp(name, "MR_PHILIPS_LargePreamble.dcm" ) == 0 || strcmp(name, "illegal_UN_stands_for_OB.dcm.secu" ) == 0 ) { ret = 0; } if ( (b1 && !b2) || (!b1 && b2) ) { std::cerr << "TestReadCanRead: incompatible result " << filename << std::endl; if( b1 ) std::cerr << "TestReadCanRead: CanRead was true: " << filename << std::endl; //assert( !ret ); return ret; } // Create directory first: std::string tmpdir = gdcm::Testing::GetTempDirectory( subdir ); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() ) ) { gdcm::System::MakeDirectory( tmpdir.c_str() ); //return 1; } std::string outfilename = gdcm::Testing::GetTempFilename( filename, subdir ); if( b1 && b2 ) { gdcm::Writer writer; writer.SetFileName( outfilename.c_str() ); writer.GetFile().GetHeader().SetDataSetTransferSyntax( reader.GetFile().GetHeader().GetDataSetTransferSyntax() ); writer.GetFile().SetDataSet( reader.GetFile().GetDataSet() ); writer.SetCheckFileMetaInformation( false ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } gdcm::Reader reader2; reader2.SetFileName( outfilename.c_str() ); b1 = reader2.CanRead( ); //reader2.GetFile().GetHeader().GetPreamble().Remove(); //assert( reader2.GetFile().GetHeader().GetPreamble().IsEmpty() ); b2 = reader2.Read(); if ( (b1 && !b2) || (!b1 && b2) ) { std::cerr << "TestReadCanRead|Write: incompatible result " << outfilename << std::endl; if( b1 ) std::cerr << "TestReadCanRead|Write: CanRead was true: " << outfilename << std::endl; return 1; } } return 0; } int TestReadCanReadExtra() { const char *extradataroot = gdcm::Testing::GetDataExtraRoot(); if( !extradataroot ) { return 0; } if( !gdcm::System::FileIsDirectory(extradataroot) ) { std::cerr << "No such directory: " << extradataroot << std::endl; return 0; } gdcm::Directory d; unsigned int nfiles = d.Load( extradataroot, true ); // no recursion std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::Directory::FilenamesType const & fns = d.GetFilenames(); int r = 0; for( gdcm::Directory::FilenamesType::const_iterator it = fns.begin(); it != fns.end(); ++it ) { const char *filename = it->c_str(); r += TestReadCanRead( "TestReaderCanReadExtra", filename ); } return r; } int TestReaderCanRead(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestReadCanRead(argv[0], filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestReadCanRead( argv[0], filename ); ++i; } //int r2 = TestReadCanReadExtra(); //r += r2; return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestCSAElement.cxx000664 001766 001770 00000001235 14517730450 032676 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmCSAElement.h" int TestCSAElement(int , char * []) { gdcm::CSAElement el; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestVRDS.cxx000664 001766 001770 00000005275 14517730450 031544 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmVR.h" #include "gdcmAttribute.h" #include "gdcmByteValue.h" #include #include #include template std::string TestVRDSFunc(const char *str) { std::istringstream is( str ); T d; is >> d; std::ostringstream os; os << std::setprecision(MAXBYTES); os << d; std::cout << std::setprecision(MAXBYTES); std::cout << d << std::endl; std::string copy = os.str(); return copy; } /* * Test to make sure that double precision ieee 'double' is ok for DICOM VR = 'DS' */ int TestVRDS(int, char *[]) { const unsigned int dsmaxbytes = 16; const char str0[dsmaxbytes+1] = "0.123456789123"; std::string copy; // Let's demonstrate the float can easily fails; if( (copy = TestVRDSFunc(str0)) == str0 ) { std::cerr << "Float works:" << copy << " vs " << str0 << std::endl; return 1; } // Repeat with double, it works this time if( (copy = TestVRDSFunc(str0)) != str0 ) { std::cerr << "Double does not work:" << copy << " vs " << str0 << std::endl; return 1; } const double d1 = -118.242525316066; const double d2 = 0.00149700609543456; const double d3 = 0.059303515816892; gdcm::Attribute<0x20,0x32> at; at.SetValue( d1, 0); at.SetValue( d2, 1); at.SetValue( d3, 2); gdcm::DataElement de = at.GetAsDataElement(); std::cout << de << std::endl; const gdcm::ByteValue* bv = de.GetByteValue(); { std::string str = bv->GetPointer(); std::string::size_type pos1 = str.find("\\"); std::string::size_type pos2 = str.find("\\", pos1 + 1); if( pos1 > dsmaxbytes ) { std::string s = str.substr(0, pos1); std::cout << "Problem with: " << s << " " << s.size() << std::endl; return 1; } if( (pos2 - pos1) > dsmaxbytes ) { std::string s = str.substr(pos1 + 1, pos2 - pos1 - 1); std::cout << "Problem with: " << s << " " << s.size() << std::endl; return 1; } if( (str.size() - pos2) > dsmaxbytes ) { std::string s = str.substr(pos2 + 1); std::cout << "Problem with: " << s << " " << s.size() << std::endl; return 1; } } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestCodeString.cxx000664 001766 001770 00000007220 14517730450 033017 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmCodeString.h" #include "gdcmAttribute.h" #include int TestCodeString(int , char *[]) { { gdcm::Attribute<0x0008,0x0008> at3; static const gdcm::CSComp values[] = {"DERIVED","SECONDARY"}; at3.SetValues( values, 2, true ); if( at3.GetNumberOfValues() != 2 ) return 1; } const char fn1[] = "IMG01"; gdcm::Attribute< 0x0004, 0x1500 > at; at.SetNumberOfValues( 1 ); at.SetValue( fn1 ); unsigned int n = at.GetNumberOfValues(); if( n != 1 ) return 1; { const char fn2[] = "SUBDIR\\IMG01"; at.SetNumberOfValues( 2 ); at.SetValue( fn2 ); n = at.GetNumberOfValues(); if( n != 2 ) return 1; } const char fn3[] = "SUBDIR1\\SUBDIR2\\IMG01 "; { gdcm::DataElement de( at.GetTag() ); de.SetByteValue( fn3, (uint32_t)strlen(fn3) ); at.SetFromDataElement( de ); n = at.GetNumberOfValues(); //std::cout << n << std::endl; if( n != 3 ) return 1; for( unsigned int i = 0; i < n; ++i) { gdcm::CodeString cs = at.GetValue( i ); if( !cs.IsValid() ) { std::cerr << "Invalid CS: " << cs << std::endl; return 1; } } } const char fn4[] = "SUBDIR1\\SUBDIR2\\IMG01"; { std::string copy = fn4; if( copy.size() % 2 ) { copy.push_back( ' ' ); } gdcm::DataElement de( at.GetTag() ); de.SetByteValue( copy.c_str(), (uint32_t)copy.size() ); at.SetFromDataElement( de ); n = at.GetNumberOfValues(); //std::cout << n << std::endl; if( n != 3 ) return 1; for( unsigned int i = 0; i < n; ++i) { gdcm::CodeString cs = at.GetValue( i ); if( !cs.IsValid() ) { std::cerr << "Invalid CS: " << cs << std::endl; return 1; } } } const char fn5[] = R"(SUBDIR1\SUBDIR2\LONGSUBDIR\IMG01)"; { std::string copy = fn5; if( copy.size() % 2 ) { copy.push_back( ' ' ); } gdcm::DataElement de( at.GetTag() ); de.SetByteValue( copy.c_str(), (uint32_t)copy.size() ); at.SetFromDataElement( de ); n = at.GetNumberOfValues(); //std::cout << n << std::endl; if( n != 4 ) return 1; for( unsigned int i = 0; i < n; ++i) { gdcm::CodeString cs = at.GetValue( i ); if( !cs.IsValid() ) { std::cerr << "Invalid CS: " << cs << std::endl; return 1; } } if( strlen(at.GetValue(2) ) < 8 ) { return 1; } } { gdcm::CodeString cs0 = " SUB\\DIR "; if( cs0.IsValid() ) return 1; gdcm::CodeString cs1 = " SUBDIR "; if( !cs1.IsValid() ) return 1; gdcm::CodeString cs2 = " SUBDIR_0123456789 "; // len == 19 => invalid if( cs2.IsValid() ) return 1; gdcm::CodeString cs3 = " IMG_0123456789 "; if( !cs3.IsValid() ) return 1; // cstor should trim on the fly: gdcm::CodeString cs4 = " IMG_0123456789 "; if( !cs4.IsValid() ) return 1; if( !(cs3 == cs4) ) return 1; if( cs3 != cs4 ) return 1; gdcm::CodeString cs5 = "IMG"; if( cs5 != "IMG ") return 1; // Begin ugly internals. } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestAttribute7.cxx000664 001766 001770 00000003354 14517730450 033014 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAttribute.h" int TestAttribute7(int, char *[]) { { const char bytes[] = "\030\000e\020"; gdcm::DataElement de( gdcm::Tag(0x28,0x9) ); de.SetVR( gdcm::VR::INVALID ); de.SetByteValue( bytes, 4 ); gdcm::Attribute<0x28,0x9, gdcm::VR::AT, gdcm::VM::VM1 > at; at.SetFromDataElement( de ); std::cout << at.GetValue() << std::endl; gdcm::Attribute<0x3004, 0x0014> tissue; //std::cout << tissue.GetVR() << std::endl; if( tissue.GetVR() != gdcm::VR::CS ) return 1; } { gdcm::Attribute<0x8,0x8> imagetype; imagetype.SetNumberOfValues(0); if( imagetype.GetNumberOfValues() != 0 ) return 1; const char bytes[] = "ORIGINAL\\PRIMARY"; gdcm::DataElement de( gdcm::Tag(0x8,0x8) ); de.SetVR( gdcm::VR::INVALID ); de.SetByteValue( bytes, (uint32_t)strlen(bytes) ); gdcm::DataSet ds; imagetype.SetFromDataSet( ds ); if( imagetype.GetNumberOfValues() != 0 ) return 1; ds.Insert( de ); imagetype.SetFromDataSet( ds ); if( imagetype.GetNumberOfValues() != 2 ) return 1; imagetype.SetNumberOfValues(0); if( imagetype.GetNumberOfValues() != 0 ) return 1; imagetype.SetFromDataSet( ds ); if( imagetype.GetNumberOfValues() != 2 ) return 1; } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestComposite.cxx000664 001766 001770 00000001257 14517730450 032724 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ //#include "gdcmSequenceOfItems.h" int TestComposite(int argc, char *argv[]) { (void)argc; (void)argv; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestWriter2.cxx000664 001766 001770 00000006572 14517730450 032325 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmWriter.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmTesting.h" namespace gdcm { /* * we are only testing that we can convert an implicit dataset to explicit all the time... */ int TestWrite2(const char *subdir, const char* filename, bool ) { Reader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { std::cerr << "Failed to read: " << filename << std::endl; return 1; } // Create directory first: std::string tmpdir = Testing::GetTempDirectory( subdir ); if( !System::FileIsDirectory( tmpdir.c_str() ) ) { System::MakeDirectory( tmpdir.c_str() ); } std::string outfilename = Testing::GetTempFilename( filename, subdir ); // Invert Transfer Syntax just for fun: const TransferSyntax &ts = reader.GetFile().GetHeader().GetDataSetTransferSyntax(); if( ts.IsExplicit() && ts == TransferSyntax::ExplicitVRLittleEndian ) { reader.GetFile().GetHeader().SetDataSetTransferSyntax( gdcm::TransferSyntax::ImplicitVRLittleEndian ); } else if( ts.IsImplicit() ) { gdcm::FileMetaInformation &fmi = reader.GetFile().GetHeader(); gdcm::TransferSyntax ts2 = gdcm::TransferSyntax::ImplicitVRLittleEndian; ts2 = gdcm::TransferSyntax::ExplicitVRLittleEndian; const char *tsuid = gdcm::TransferSyntax::GetTSString( ts2 ); gdcm::DataElement de( gdcm::Tag(0x0002,0x0010) ); de.SetByteValue( tsuid, (uint32_t)strlen(tsuid) ); de.SetVR( VR::UI ); //gdcm::Attribute<0x0002, 0x0010>::GetVR() ); fmi.Replace( de ); reader.GetFile().GetHeader().SetDataSetTransferSyntax( gdcm::TransferSyntax::ExplicitVRLittleEndian ); } else { // nothing to test return 0; } const char str[] = "1.2.3.4.5.6.8.9.0"; DataElement xde; xde.SetByteValue(str, (uint32_t)strlen(str)); xde.SetVR( VR::UI ); xde.SetTag( Tag(0x0008,0x0018) ); reader.GetFile().GetDataSet().Insert( xde ); Writer writer; writer.SetFileName( outfilename.c_str() ); writer.SetFile( reader.GetFile() ); //writer.SetCheckFileMetaInformation( true ); if( !writer.Write() ) { std::cerr << "Failed to write: " << outfilename << std::endl; return 1; } Reader reader2; reader2.SetFileName( outfilename.c_str() ); if ( !reader2.Read() ) { std::cerr << "Failed to re-read: " << outfilename << std::endl; return 1; } return 0; } } int TestWriter2(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return gdcm::TestWrite2(argv[0], filename, false ); } // else int r = 0, i = 0; gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += gdcm::TestWrite2(argv[0], filename, false ); ++i; } return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestElement5.cxx000664 001766 001770 00000003441 14517730450 032435 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmElement.h" #include "gdcmVR.h" #include int TestLO() { gdcm::Element el; const char str[] = "WINDOW1\\WINDOW2\\WINDOW3"; const size_t lenstr = strlen(str); std::stringstream ss; ss.str( str ); size_t count = gdcm::VM::GetNumberOfElementsFromArray(str, lenstr); gdcm::VR vr = gdcm::VR::LO; //gdcm::VM vm = gdcm::VM::VM2; //gdcm::VR vr = gdcm::VR::DS; //if( len != vr.GetSizeof() * vm.GetLength() ) // { // return 1; // } el.SetLength( count * vr.GetSizeof() ); el.Read( ss ); std::cout << el.GetLength() << std::endl; std::cout << el.GetValue(0) << std::endl; std::cout << el.GetValue(1) << std::endl; return 1; } int TestElement5(int , char *[]) { gdcm::Element spacing; const char strspacing[] = "1.2345\\6.7890"; std::stringstream ss; ss.str( strspacing ); unsigned int len = 2 * sizeof(double); gdcm::VM vm = gdcm::VM::VM2; gdcm::VR vr = gdcm::VR::DS; if( len != vr.GetSizeof() * vm.GetLength() ) { return 1; } spacing.SetLength( len ); spacing.Read( ss ); std::cout << spacing.GetValue() << std::endl; std::cout << spacing.GetValue(1) << std::endl; //int res = TestLO(); return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestValue.cxx000664 001766 001770 00000002724 14517730450 032036 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmByteValue.h" #include "gdcmSequenceOfItems.h" #include "gdcmStringStream.h" #include "gdcmSwapper.h" void PrintStream(IStream &is) { char c; while(is.get(c)) { std::cout << (int)c << std::endl; } } int CheckStream(IStream &is, int size) { char c; int t = 0; while(is.get(c) && (int)c == t) { std::cerr << (int)c << std::endl; ++t; } return t != size; } int TestValue(int , char *[]) { int r = 0; gdcm::Value *v; gdcm::SequenceOfItems si; gdcm::ByteValue bv; v = &si; v = &bv; const int size = 128; char buffer[size]; for(int i=0; i(i); } std::stringstream ss; ss.write(buffer, size); //PrintStream(ss); v->SetLength( size ); v->Read(ss); std::stringstream ss2; v->Write(ss2); //PrintStream(ss2); r += CheckStream(ss2, size); return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestByteValue.cxx000664 001766 001770 00000002775 14517730450 032670 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmByteValue.h" #include "gdcmSwapper.h" int TestByteValue(int, char *[]) { const char array[] = "GDCM"; const size_t len = strlen(array); gdcm::ByteValue bv1( array, len ); std::cout << bv1 << std::endl; if( memcmp(bv1.GetPointer(), array, len ) != 0 ) { return 1; } std::stringstream ss( array ); gdcm::ByteValue bv2; bv2.SetLength( len ); bv2.Read( ss ); std::cout << bv2 << std::endl; if( memcmp(bv2.GetPointer(), array, len ) != 0 ) { return 1; } if( !(bv1 == bv2) ) { return 1; } gdcm::ByteValue bv3(bv2); if( memcmp(bv3.GetPointer(), array, len ) != 0 ) { return 1; } if( !(bv3 == bv1) ) { return 1; } gdcm::ByteValue bv4 = bv3; if( memcmp(bv4.GetPointer(), array, len ) != 0 ) { return 1; } if( !(bv4 == bv1) ) { return 1; } gdcm::ByteValue bv5; if( bv5 == bv1 ) { return 1; } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestReaderUpToTag2.cxx000664 001766 001770 00000007120 14517730450 033505 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmFileMetaInformation.h" #include "gdcmFile.h" #include "gdcmTesting.h" #include "gdcmMediaStorage.h" #include "gdcmSystem.h" #include "gdcmDirectory.h" static int TestReadUpToTag2(const char* filename, bool verbose = false) { if( verbose ) std::cout << "TestRead: " << filename << std::endl; std::ifstream is( filename, std::ios::binary ); gdcm::Reader reader; reader.SetStream( is ); // Let's read up to end gdcm::Tag maxDataSetTag(0xffff,0xffff); gdcm::Tag pixeldata (0x7fe0,0x0010); std::set skiptags; // ... but do not read Pixel Data attribute (to skip mem allocation) skiptags.insert( pixeldata ); if ( !reader.ReadUpToTag( maxDataSetTag, skiptags) ) { std::cerr << "TestReadError: Failed to read: " << filename << std::endl; return 1; } std::streamoff outStreamOffset = is.tellg(); bool iseof = is.eof(); //commenting out for warning avoidance //const gdcm::FileMetaInformation &h = reader.GetFile().GetHeader(); const gdcm::DataSet &ds = reader.GetFile().GetDataSet(); //std::cout << ds << std::endl; if( ds.FindDataElement( pixeldata ) ) { std::cerr << "Found Pixel Data for: " << filename << std::endl; return 1; } if( !iseof ) { std::cerr << "Lost in out of space: " << outStreamOffset << " -> " << filename << std::endl; return 1; } if(verbose) std::cout << "{ \"" << filename << "\"," << outStreamOffset << " }," << std::endl; const std::streamoff refoffset = -1; if( refoffset != outStreamOffset ) { std::cerr << filename << ": " << outStreamOffset << " " << iseof << " should be " << refoffset << std::endl; return 1; } is.close(); return 0; } static int TestReadUpToTag2Extra() { const char *extradataroot = gdcm::Testing::GetDataExtraRoot(); if( !extradataroot ) { return 1; } if( !gdcm::System::FileIsDirectory(extradataroot) ) { std::cerr << "No such directory: " << extradataroot << std::endl; return 1; } gdcm::Directory d; unsigned int nfiles = d.Load( extradataroot, true ); // no recursion std::cout << "done retrieving file list. " << nfiles << " files found." << std::endl; gdcm::Directory::FilenamesType const & fns = d.GetFilenames(); int r = 0; for( gdcm::Directory::FilenamesType::const_iterator it = fns.begin(); it != fns.end(); ++it ) { const char *filename = it->c_str(); r += TestReadUpToTag2( filename ); } return r; } int TestReaderUpToTag2(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestReadUpToTag2(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); gdcm::Trace::ErrorOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestReadUpToTag2( filename ); ++i; } // puposely discard gdcmDataExtra test, this is just an 'extra' test... int b2 = TestReadUpToTag2Extra(); (void)b2; return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestReader.cxx000664 001766 001770 00000004724 14517730450 032166 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmReader.h" #include "gdcmFileMetaInformation.h" #include "gdcmFile.h" #include "gdcmTesting.h" #include "gdcmMediaStorage.h" int TestRead(const char* filename, bool verbose = false) { if( verbose ) std::cout << "TestRead: " << filename << std::endl; gdcm::Reader reader; reader.SetFileName( filename ); if ( !reader.Read() ) { std::cerr << "TestReadError: Failed to read: " << filename << std::endl; return 1; } //commenting out the fmi and ds to avoid warnings //const gdcm::FileMetaInformation &h = reader.GetFile().GetHeader(); //std::cout << h << std::endl; //const gdcm::DataSet &ds = reader.GetFile().GetDataSet(); //std::cout << ds << std::endl; const char *ref = gdcm::Testing::GetMediaStorageFromFile(filename); gdcm::MediaStorage ms; ms.SetFromFile( reader.GetFile() ); if( !ref ) { std::cerr << "TestReadError: Missing MediaStorage: " << filename << std::endl; std::cerr << "It should be: " << ms << std::endl; return 1; } if( ms.IsUndefined() && ref && *ref != 0 ) { std::cerr << "TestReadError: MediaStorage: " << filename << std::endl; std::cerr << "It should be instead: " << ref << std::endl; return 1; } // Make sure it is the right one: if( ref && *ref != 0 && ms != gdcm::MediaStorage::GetMSType(ref) ) { std::cerr << "Error: Found MediaStorage: " << ms << " for " << filename << std::endl; std::cerr << "It should be instead: " << ref << std::endl; return 1; } return 0; } int TestReader(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; return TestRead(filename, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { r += TestRead( filename ); ++i; } return r; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestElement6.cxx000664 001766 001770 00000002700 14517730450 032433 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmAttribute.h" #include "gdcmElement.h" #include "gdcmVR.h" #include int TestElement6(int , char *[]) { gdcm::Attribute<0x18,0x1310> at = {{ 0, 256, 256, 0 }}; gdcm::DataElement de = at.GetAsDataElement(); const gdcm::Tag & t = at.GetTag(); (void)t; const gdcm::VM vm = gdcm::VM::VM4; // mimic string filter behavior: const char input[] = R"(0\256\256\0)"; const char * value = input; const size_t len = strlen( input ); std::istringstream is; std::ostringstream os; std::string s(value,value+len); is.str( s ); gdcm::VL vl = 8; gdcm::Element el; el.SetLength( vl ); for(unsigned int i = 0; i < vm.GetLength(); ++i) { is >> el.GetValue(i); is.get(); std::cout << el.GetValue(i) << std::endl; } el.Write(os); std::string s2 = os.str(); std::cout << s2.size() << std::endl; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestMediaStorage.cxx000664 001766 001770 00000006312 14517730450 033323 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmMediaStorage.h" #include "gdcmFile.h" #include "gdcmDataElement.h" int TestMediaStorage(int argc, char *argv[]) { (void)argc; (void)argv; gdcm::MediaStorage ms; if( !ms.IsUndefined() ) { std::cerr << "ms.IsUndefined" << std::endl; return 1; } ms = gdcm::MediaStorage::SecondaryCaptureImageStorage; if( ms != gdcm::MediaStorage::SecondaryCaptureImageStorage ) { std::cerr << "SecondaryCaptureImageStorage" << std::endl; return 1; } ms.GuessFromModality( "MR" ); if( ms != gdcm::MediaStorage::MRImageStorage ) { std::cerr << "MRImageStorage" << std::endl; return 1; } ms.GuessFromModality( "MR" , 3 ); if( ms != gdcm::MediaStorage::EnhancedMRImageStorage ) { std::cerr << "EnhancedMRImageStorage" << std::endl; return 1; } //checks *MSStrings[] and MSModalityTypes[] length gdcm::MediaStorage::MSType mst; for ( mst = gdcm::MediaStorage::MediaStorageDirectoryStorage; mst < gdcm::MediaStorage::MS_END; mst = (gdcm::MediaStorage::MSType)(mst + 1) ) { if ( gdcm::MediaStorage::GetMSString(mst) == nullptr ) { std::cerr << "GetMSString" << std::endl; return 1; } } mst = gdcm::MediaStorage::MS_END; if ( gdcm::MediaStorage::GetMSString(mst) != nullptr ) { std::cerr << "2: GetMSString" << std::endl; return 1; } gdcm::MediaStorage ms2; if ( ms2.GetModality() ) { return 1; } // MediaStorage is really poorly implemented. We need to add a test to avoid dev shooting themself in the foot. unsigned int nMSType = gdcm::MediaStorage::GetNumberOfMSType(); unsigned int nMSString = gdcm::MediaStorage::GetNumberOfMSString(); unsigned int nMSMod = gdcm::MediaStorage::GetNumberOfModality(); if( nMSType != nMSString || nMSType != nMSMod ) { std::cerr << "you are shooting yourself in the foot, dear.: " << nMSType << "," << nMSString << "," << nMSMod << std::endl; return 1; } { gdcm::File f; gdcm::DataSet &ds = f.GetDataSet(); gdcm::DataElement de; de.SetTag( gdcm::Tag(0x8,0x16) ); ds.Insert( de ); gdcm::MediaStorage ms3; ms3.SetFromFile( f ); if( ms3 != gdcm::MediaStorage::SecondaryCaptureImageStorage ) { std::cerr << "SecondaryCaptureImageStorage" << std::endl; return 1; } } { gdcm::File f; gdcm::FileMetaInformation &fmi = f.GetHeader(); gdcm::DataElement de; de.SetTag( gdcm::Tag(0x2,0x2) ); // de.SetByteValue( "", 0 ); fmi.Insert( de ); gdcm::MediaStorage ms4; ms4.SetFromFile( f ); if( ms4 != gdcm::MediaStorage::SecondaryCaptureImageStorage ) { std::cerr << "SecondaryCaptureImageStorage" << std::endl; return 1; } } return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestParseException.cxx000664 001766 001770 00000001246 14517730450 033711 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmParseException.h" int TestParseException(int, char *[]) { gdcm::ParseException pe; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestLO.cxx000664 001766 001770 00000002211 14517730450 031263 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmLO.h" #include int TestLO(int , char *[]) { gdcm::LO lo = "hello world !"; if( !lo.IsValid() ) return 1; const char str[] = "this is LO1 \\this is LO2 \\ this is LO 3 "; gdcm::LO lo1, lo2, lo3; std::stringstream ss; ss << str; ss >> lo1; ss.get(); std::cout << lo1 << std::endl; ss >> lo2; ss.get(); std::cout << lo2 << std::endl; ss >> lo3; ss.get(); std::cout << lo3 << std::endl; std::string toolong(65, ' '); gdcm::LO lo4 = gdcm::LO(toolong); std::cout << lo4.size() << std::endl; if ( lo4.IsValid() ) return 1; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestSequenceOfFragments.cxx000664 001766 001770 00000001326 14517730450 034663 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSequenceOfFragments.h" int TestSequenceOfFragments(int, char *[]) { gdcm::SequenceOfFragments sf; std::cout << sf << std::endl; return 0; } gdcm-3.0.22/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestParser.cxx000664 001766 001770 00000003721 14517730450 032214 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* * Pseudo code for ultimately a SAX-like (Simple API for DICOM) */ #include "gdcmParser.h" #include #include #include // for putchar namespace gdcm { // FIXME #define XML_FMT_INT_MOD "l" static void startElement(void *userData, const Tag &name, const char *atts[]) { int i; int *depthPtr = (int *)userData; for (i = 0; i < *depthPtr; i++) putchar('\t'); std::cout << name << std::endl; *depthPtr += 1; } static void endElement(void *userData, const Tag &name) { int *depthPtr = (int *)userData; *depthPtr -= 1; } } // end namespace gdcm int TestParser(int argc, char *argv[]) { if( argc < 2 ) { return 1; } std::string filename = argv[1]; std::ifstream is( filename.c_str(), std::ios::binary ); std::cout << "---------------------------Parsing file :[" << filename << "]" << std::endl; char buf[BUFSIZ]; gdcm::Parser parser; bool done; int depth = 0; parser.SetUserData(&depth); parser.SetElementHandler(gdcm::startElement, gdcm::endElement); do { is.read(buf, sizeof(buf)); size_t len = is.gcount(); done = len < sizeof(buf); if ( parser.Parse(buf, len, done) ) { fprintf(stderr, "%s at line %" XML_FMT_INT_MOD "u\n", gdcm::Parser::GetErrorString(parser.GetErrorCode()), parser.GetCurrentByteIndex()); return 1; } } while (!done); is.close(); return 0; } gdcm-3.0.22/Testing/Source/Common/000775 001766 001770 00000000000 14517731550 021164 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/Common/CMakeLists.txt000664 001766 001770 00000000117 14517730450 023721 0ustar00mmalaterremmalaterre000000 000000 add_subdirectory(Cxx) if(GDCM_WRAP_PYTHON) add_subdirectory(Python) endif() gdcm-3.0.22/Testing/Source/Common/Python/000775 001766 001770 00000000000 14517731550 022445 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/Common/Python/CMakeLists.txt000664 001766 001770 00000000536 14517730450 025207 0ustar00mmalaterremmalaterre000000 000000 # Define the tests for gdcm-python set(GDCM_PYTHON_TEST_SRCS TestTesting ) if(GDCM_DATA_ROOT) set(GDCM_PYTHON_TEST_SRCS ${GDCM_PYTHON_TEST_SRCS} TestDirectory ) endif() # Loop over files and create executables foreach(name ${GDCM_PYTHON_TEST_SRCS}) ADD_PYTHON_TEST(${name}Python ${name}.py ${GDCM_DATA_ROOT}/test.acr) endforeach() gdcm-3.0.22/Testing/Source/Common/Python/TestTesting.py000664 001766 001770 00000001463 14517730450 025276 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys t = gdcm.Testing() nfiles = t.GetNumberOfFileNames() print(nfiles) for i in range(0,nfiles): print(t.GetFileName(i)) print(t.GetFileName(10000)) print(t.GetDataRoot()) # Test succeed ? #sys.exit(success != 1) gdcm-3.0.22/Testing/Source/Common/Python/TestDirectory.py000664 001766 001770 00000001641 14517730450 025623 0ustar00mmalaterremmalaterre000000 000000 ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ import gdcm import os,sys dir = gdcm.Directory() t = gdcm.Testing() dataroot = t.GetDataRoot() system = gdcm.System() if not system.FileIsDirectory(dataroot): sys.exit(1) nfiles = dir.Load(dataroot) if nfiles == 0: sys.exit(1) #print dir.GetFilenames() for file in dir.GetFilenames(): print(file) # Test succeed ? #sys.exit(success != 1) gdcm-3.0.22/Testing/Source/Common/Cxx/000775 001766 001770 00000000000 14517731550 021726 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Testing/Source/Common/Cxx/TestSystem1.cxx000664 001766 001770 00000026730 14517730450 024665 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSystem.h" #include "gdcmTesting.h" #include "gdcmFilename.h" #include #include #include // strlen #include int TestGetTimeOfDay() { time_t t = time(nullptr); char date[22]; if( !gdcm::System::GetCurrentDateTime(date) ) { std::cerr << "Error" << std::endl; return 1; } char time_date[22]; if( !gdcm::System::FormatDateTime(time_date, t) ) { std::cerr << "Error" << std::endl; return 1; } //std::cout << date << std::endl; //std::cout << time_date << std::endl; if ( strncmp( date, time_date, strlen("20090511172802.") ) != 0 ) { std::cerr << "Error" << std::endl; return 1; } return 0; } int TestMakeDirectory() { std::string tmpdir = gdcm::Testing::GetTempDirectory(); if( !gdcm::System::FileIsDirectory( tmpdir.c_str() )) return 1; const char subpath[] = "TestSystem1"; std::string subdir = gdcm::Testing::GetTempDirectory(subpath); if( !gdcm::System::MakeDirectory( subdir.c_str() )) return 1; if( !gdcm::System::FileIsDirectory( subdir.c_str() )) return 1; const char multipath[] = "TestSystem42/another/dir"; std::string subdir2 = gdcm::Testing::GetTempDirectory(multipath); if( !gdcm::System::MakeDirectory( subdir2.c_str() )) return 1; if( !gdcm::System::FileIsDirectory( subdir2.c_str() )) return 1; return 0; } int TestSystem1(int, char *[]) { const char s1[] = "HELLO, wORLD !"; const char s2[] = "Hello, World !"; if( gdcm::System::StrCaseCmp(s1,s2) != 0 ) { return 1; } if( gdcm::System::StrNCaseCmp(s1,s2, strlen(s1)) != 0 ) { return 1; } const char s3[] = "Hello, World ! "; if( gdcm::System::StrCaseCmp(s1,s3) == 0 ) { return 1; } if( gdcm::System::StrNCaseCmp(s1,s3, strlen(s1)) != 0 ) { return 1; } if( gdcm::System::StrNCaseCmp(s1,s3, strlen(s3)) == 0 ) { return 1; } // struct stat { // off_t st_size; /* total size, in bytes */ // } //unsigned long size1 = sizeof(off_t); unsigned long size2 = sizeof(size_t); unsigned long size4 = sizeof(std::streamsize); #if 0 if( size1 > size2 ) { std::cerr << "size_t is not appropriate on this system" << std::endl; // fails on some macosx return 1; } unsigned long size3 = sizeof(uintmax_t); if( size2 != size3 ) { std::cerr << "size_t is diff from uintmax_t: " << size2 << " " << size3 << std::endl; return 1; } #endif if( size2 != size4 ) { std::cerr << "size_t is diff from std::streamsize: " << size2 << " " << size4 << std::endl; //return 1; } char datetime[22]; bool bres = gdcm::System::GetCurrentDateTime(datetime); if( !bres ) { std::cerr << "bres" << std::endl; return 1; } assert( datetime[21] == 0 ); std::cerr << datetime << std::endl; const char *cwd = gdcm::System::GetCWD(); std::cerr << "cwd:" << cwd << std::endl; // GDCM_EXECUTABLE_OUTPUT_PATH "/../" "/Testing/Source/Common/Cxx" /* * I can do this kind of testing here since I know testing: * - cannot be installed (no rule in cmakelists) * - they cannot be moved around since cmake is not relocatable * thus this is safe to assume that current process directory is actually the executable output * path as computed by cmake: * * TODO: there can be trailing slash... */ const char *path = gdcm::System::GetCurrentProcessFileName(); if( !path ) { std::cerr << "Missing implemnetation for GetCurrentProcessFileName" << std::endl; return 1; } gdcm::Filename fn( path ); //std::cerr << path << std::endl; if( strncmp(GDCM_EXECUTABLE_OUTPUT_PATH, fn.GetPath(), strlen(GDCM_EXECUTABLE_OUTPUT_PATH)) != 0 ) { std::cerr << GDCM_EXECUTABLE_OUTPUT_PATH << " != " << fn.GetPath() << std::endl; gdcm::Filename fn_debug1( GDCM_EXECUTABLE_OUTPUT_PATH ); gdcm::Filename fn_debug2( fn.GetPath() ); std::cerr << fn_debug1.GetFileName() << " , " << fn_debug2.GetFileName() << std::endl; std::cerr << std::boolalpha << fn_debug1.IsIdentical( fn_debug2 ) << std::endl; return 1; } // gdcmCommonTests const char exename[] = "gdcmCommonTests"; if( strncmp(exename, fn.GetName(), strlen(exename)) != 0 ) { std::cerr << exename << " != " << fn.GetName() << std::endl; return 1; } { char date[22]; if( !gdcm::System::GetCurrentDateTime( date ) ) { std::cerr << "GetCurrentDateTime: " << date << std::endl; return 1; } assert( date[21] == 0 ); time_t timep; long milliseconds; if( !gdcm::System::ParseDateTime(timep, milliseconds, date) ) { std::cerr << "Could not re-parse: " << date << std::endl; return 1; } char date2[22]; if( !gdcm::System::FormatDateTime(date2, timep, milliseconds) ) { return 1; } assert( date2[21] == 0 ); if( strcmp( date, date2 ) != 0 ) { std::cerr << "date1=" << date << std::endl; std::cerr << "date2=" << date2 << std::endl; return 1; } } // Skip millisecond this time: { char date[22+1]; if( !gdcm::System::GetCurrentDateTime( date ) ) { std::cerr << "GetCurrentDateTime: " << date << std::endl; return 1; } date[14] = 0; std::cout << date << std::endl; time_t timep; if( !gdcm::System::ParseDateTime(timep, date) ) { std::cerr << "ParseDateTime" << std::endl; return 1; } char date2[22+1]; date2[22] = 0; if( !gdcm::System::FormatDateTime(date2, timep) ) { std::cerr << "FormatDateTime" << std::endl; return 1; } // FormatDateTime always print millisecond, only compare the date up to the millisecond: if( strncmp( date, date2, strlen(date) ) != 0 ) { std::cerr << "date1=" << date << std::endl; std::cerr << "date2=" << date2 << std::endl; return 1; } } // Check some valid date { // YYYYMMDDHHMMSS.FFFFFF&ZZXX static const char *dates[] = { "2001", "200101", "20010102", "2001010203", "200101020304", "20010102030405", "20010102030405", "20010102030405.01", "20010102030405.0101", "20010102030405.010101", }; for(int i = 0; i < 10; ++i ) { const char *date = dates[i]; time_t timep; long milliseconds; if( !gdcm::System::ParseDateTime(timep, milliseconds, date) ) { std::cerr << "Should accept: " << date << std::endl; return 1; } } } // Check some invalid date { // YYYYMMDDHHMMSS.FFFFFF&ZZXX static const char *dates[] = { "200", "200121", "20010142", "2001010233", "200101020374", "20010102030485", "20010102030405.", "20010102030405-0000000", "20010102030405.0000001", "20010102030405.0000001", }; for(int i = 0; i < 10; ++i ) { const char *date = dates[i]; time_t timep; long milliseconds; if( gdcm::System::ParseDateTime(timep, milliseconds, date) ) { char buffer[22]; gdcm::System::FormatDateTime(buffer, timep, milliseconds); std::cerr << "Should not accept: " << date << std::endl; std::cerr << "rendered as: " << buffer << std::endl; return 1; } } } //const char long_str8[] = " 0123456789"; //long l = 0; //int n = sscanf( long_str8, "%8ld", &l ); //std::cout << "Long:" << l << std::endl; char hostname[255+1]; hostname[255] = 0; if( gdcm::System::GetHostName( hostname ) ) { std::cout << "Host:" << hostname << std::endl; } else { std::cerr << "cannot get Hostname" << std::endl; return 1; } //time_t t = gdcm::System::FileTime("/etc/debian_version"); //char date3[22]; //gdcm::System::FormatDateTime(date3, t); //std::cout << date3 << std::endl; std::cout << "Check dates:" << std::endl; const char fixed_date[] = "20090428172557.515500"; if( strlen( fixed_date ) != 21 ) { std::cerr << "fixed_date" << std::endl; return 1; } time_t fixed_timep; long fixed_milliseconds; if( !gdcm::System::ParseDateTime(fixed_timep, fixed_milliseconds, fixed_date) ) { std::cerr << "ParseDateTime" << std::endl; return 1; } if( fixed_milliseconds != 515500 ) { std::cerr << "fixed_milliseconds" << std::endl; return 1; } char fixed_date2[22]; if( !gdcm::System::FormatDateTime(fixed_date2, fixed_timep, fixed_milliseconds) ) { std::cerr << "FormatDateTime" << std::endl; return 1; } assert( fixed_date2[21] == 0 ); if( strcmp( fixed_date, fixed_date2 ) != 0 ) { std::cerr << "fixed_date | fixed_date2" << std::endl; return 1; } const char invalid_date1[] = "20090428172557."; if( gdcm::System::ParseDateTime(fixed_timep, fixed_milliseconds, invalid_date1) ) { std::cerr << "should reject:" << invalid_date1 << std::endl; return 1; } const char invalid_date2[] = "200"; if( gdcm::System::ParseDateTime(fixed_timep, fixed_milliseconds, invalid_date2) ) { std::cerr << "should reject:" << invalid_date2 << std::endl; return 1; } // const char invalid_date3[] = "17890714172557"; //if( gdcm::System::ParseDateTime(fixed_timep, fixed_milliseconds, invalid_date3) ) //{ //std::cerr << "should reject:" << invalid_date3 << std::endl; //char buffer[22]; //gdcm::System::FormatDateTime( buffer, fixed_timep, fixed_milliseconds ); //std::cerr << "Found" << buffer << std::endl; //return 1; //} // const char invalid_date4[] = "19891714172557"; //if( gdcm::System::ParseDateTime(fixed_timep, fixed_milliseconds, invalid_date4) ) //{ //std::cerr << "should reject:" << invalid_date4 << std::endl; //char buffer[22]; //gdcm::System::FormatDateTime( buffer, fixed_timep, fixed_milliseconds ); //std::cerr << "Found" << buffer << std::endl; // //return 1; //} // const char invalid_date5[] = "19890014172557"; //if( gdcm::System::ParseDateTime(fixed_timep, fixed_milliseconds, invalid_date5) ) //{ //std::cerr << "should reject:" << invalid_date5 << std::endl; //char buffer[22]; //gdcm::System::FormatDateTime( buffer, fixed_timep, fixed_milliseconds ); //std::cerr << "Found" << buffer << std::endl; // //return 1; //} const char valid_date1[] = "19890714172557"; if( !gdcm::System::ParseDateTime(fixed_timep, fixed_milliseconds, valid_date1) ) { std::cerr << "should accept:" << valid_date1 << std::endl; return 1; } std::cout << "End Check dates" << std::endl; int res = 0; res += TestGetTimeOfDay(); std::cout << "res = " << res << std::endl; res += TestMakeDirectory(); std::cout << "res = " << res << std::endl; const char * testfilesize = gdcm::Testing::GetTempFilename( "filesize.bin" ); if( gdcm::System::FileExists( testfilesize ) ) { gdcm::System::RemoveFile(testfilesize); } size_t ss1 = gdcm::System::FileSize( testfilesize ); if( ss1 != 0 ) { std::cerr << "found:" << ss1 << std::endl; ++res; } std::ofstream os( testfilesize, std::ios::binary ); const char coucou[] = "coucou"; os << coucou; os.flush(); os.close(); size_t ss2 = gdcm::System::FileSize( testfilesize ); if( ss2 != strlen( coucou ) ) { std::cerr << "found:" << ss2 << std::endl; res++; } const char *codeset = gdcm::System::GetLocaleCharset(); if( !codeset ) { std::cerr << "Could not find Charset on your system. Please report." << std::endl; res++; } return res; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestMD5.cxx000664 001766 001770 00000046572 14517730450 023713 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmMD5.h" #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmTrace.h" #include "gdcmTesting.h" #include #include // strcmp static const char * const gdcmMD5SumFiles[][2] = { { "f5ae1418f6ec07ae13522c18ff1e067a" , "00191113.dcm" }, { "c2fdbb35ba2a179939a8608e1320c7ac" , "012345.002.050.dcm" }, { "4b8bed2f8da2fa6a260764e62eb3731b" , "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm" }, { "a01a44c67a88d5a98ecdc214e412c585" , "05148044-mr-siemens-avanto-syngo.dcm" }, { "7ddb7cc42cf3191a248a60f66661b380" , "3E768EB7.dcm" }, { "a0452c3bb9303ad8ebc7f8a166cc8190" , "ACUSON-24-YBR_FULL-RLE-b.dcm" }, { "916b12bdf36d60a0b0ae39451d86ddb4" , "ACUSON-24-YBR_FULL-RLE.dcm" }, { "a4d1faf3a3a4c8b0cdf8605ef0ab48b5" , "ALOKA_SSD-8-MONO2-RLE-SQ.dcm" }, { "00c78123ea2d8a9f1452f0da37383d85" , "BugGDCM2_UndefItemWrongVL.dcm" }, { "0b4cfdaebfa3944940bed290c0a29a5b" , "CR-MONO1-10-chest.dcm" }, { "d4f286ee295ac03856370e4ff0fe60a9" , "CT_16b_signed-UsedBits13.dcm" }, { "0e03332d250a8a1a5d3c0699b1cf6b1d" , "CT-MONO2-12-lomb-an2.acr" }, { "102528014fa6ff9758c76745090b7550" , "CT-MONO2-16-ankle.dcm" }, { "a21649de46e5f5609ef6e227999a1dc8" , "CT-MONO2-16-brain.dcm" }, { "56caa0050cd61dee0bfb41559dbd6a33" , "CT-MONO2-16-chest.dcm" }, { "5e8efa7ebe3a4c47c01a64f80b244b2c" , "CT-MONO2-16-ort.dcm" }, { "abe6a2e0b1a1d636b6a775291b44b7d0" , "CT-MONO2-8-abdo.dcm" }, { "442e1966eba2fd0eb8fab685c99cc388" , "CT-SIEMENS-Icone-With-PaletteColor.dcm" }, { "7dbc75bccddcb7177796c1fa3509ab09" , "CT-SIEMENS-MissingPixelDataInIconSQ.dcm" }, { "6155e751818ede1db17aa848d882beda" , "D_CLUNIE_CT1_J2KI.dcm" }, { "7e59d70ed013175815a6c8a498d481f1" , "D_CLUNIE_CT1_J2KR.dcm" }, { "073960e6c249b45bd6341e3397637478" , "D_CLUNIE_CT1_JPLL.dcm" }, { "53d722b71a881e386005ec3c83bd78a1" , "D_CLUNIE_CT1_RLE.dcm" }, { "8577a89b3906c01731641e177dda0f88" , "D_CLUNIE_CT2_JPLL.dcm" }, { "681c50b2a496cb5c2d7bb964108649d2" , "D_CLUNIE_CT2_RLE.dcm" }, { "64f39d9d812d999b689cb9dad069ed3a" , "D_CLUNIE_MR1_JPLL.dcm" }, { "c14fd84b399f305ddd71a547ecbaaa13" , "D_CLUNIE_MR1_JPLY.dcm" }, { "45346d785b6c3a8be12b271abb745b13" , "D_CLUNIE_MR1_RLE.dcm" }, { "82093a4fc15b10b791b3d884a1cdc9c6" , "D_CLUNIE_MR2_JPLL.dcm" }, { "43867bf684f5c8eb56e7595c76e02e7a" , "D_CLUNIE_MR2_JPLY.dcm" }, { "072779b40d39e704ec4c002226bdfceb" , "D_CLUNIE_MR2_RLE.dcm" }, { "60852d347647758175d8f65d2c81e7a6" , "D_CLUNIE_MR3_JPLL.dcm" }, { "8e60bb51feba032aa141385f48465ef8" , "D_CLUNIE_MR3_JPLY.dcm" }, { "cf1e84527b2a6095037a8c2cfe801335" , "D_CLUNIE_MR3_RLE.dcm" }, { "caa51957b182d1048f1077af1c3d99fb" , "D_CLUNIE_MR4_JPLL.dcm" }, { "810033c798a3168f051389e0a0a8bcb7" , "D_CLUNIE_MR4_JPLY.dcm" }, { "af6b015679b368bb0e066874730a5cb9" , "D_CLUNIE_MR4_RLE.dcm" }, { "9a1008f0b45537614523e1fc8dce1b37" , "D_CLUNIE_NM1_JPLL.dcm" }, { "dbd2aedf74ca7297ea213d7d19934bba" , "D_CLUNIE_NM1_JPLY.dcm" }, { "01b95bc55f4684d0d7f2cb990a4c870f" , "D_CLUNIE_NM1_RLE.dcm" }, { "510e107dc1ca40a577af88a20f71a0b4" , "D_CLUNIE_RG1_JPLL.dcm" }, { "418bef1f3e70cb02205999bce74fed8e" , "D_CLUNIE_RG1_RLE.dcm" }, { "7596cda97de4782951827104f616f7ea" , "D_CLUNIE_RG2_JPLL.dcm" }, { "f03d1b8dc233c8c902c9fb4800ec6fe2" , "D_CLUNIE_RG2_JPLY.dcm" }, { "2fbc6e918c2d4ad7115addf46d870e78" , "D_CLUNIE_RG2_RLE.dcm" }, { "9966b6dbec23248fb2b6da9e7769ba20" , "D_CLUNIE_RG3_JPLL.dcm" }, { "6867e0e4f8a1feb871a1ee8dcfac838e" , "D_CLUNIE_RG3_JPLY.dcm" }, { "4ed3c3920c7763b883c234bf8bf95662" , "D_CLUNIE_RG3_RLE.dcm" }, { "41dc2884a4f98d484da80c2bdb7e5fcc" , "D_CLUNIE_SC1_JPLY.dcm" }, { "ec344a1d113d5070cabebf17c0fa3330" , "D_CLUNIE_SC1_RLE.dcm" }, { "14f4e54540008a39b53725800962f703" , "D_CLUNIE_US1_RLE.dcm" }, { "44a550cd8bccba4f157dd825489a5e87" , "D_CLUNIE_VL1_RLE.dcm" }, { "f4274cbe83a3368d99ee8332421448fe" , "D_CLUNIE_VL2_RLE.dcm" }, { "ea3d6a0fe2a65244c285c31eac5066ab" , "D_CLUNIE_VL3_RLE.dcm" }, { "6452ff527ac71f780445cf5ff083b0af" , "D_CLUNIE_VL4_RLE.dcm" }, { "53be8cfa8cb9709c08732908bb37410a" , "D_CLUNIE_VL6_RLE.dcm" }, { "9178b1d061641464ecaf271fc4328948" , "D_CLUNIE_XA1_JPLL.dcm" }, { "1f050eec29d9eeed3d406570ea1b9168" , "D_CLUNIE_XA1_JPLY.dcm" }, { "99040c48b80d40d6f7d6eed6a3cbc824" , "D_CLUNIE_XA1_RLE.dcm" }, { "9cf394a4dde294fc740e7577529ba5ca" , "D_CLUNIE_CT1_JLSL.dcm" }, { "b4d14dc9e820e6f1cf17730833a0373a" , "D_CLUNIE_CT1_JLSN.dcm" }, { "de20088d529a3bb211933c2d3b7604aa" , "DCMTK_JPEGExt_12Bits.dcm" }, { "e959b1f056d40bb4b21d0cbff1f67310" , "DermaColorLossLess.dcm" }, { "dee54ccedfed2d4d5562b52a1a7a5cfc" , "DICOMDIR" }, { "81ba5ff6f512289c30efdc757c6de231" , "dicomdir_Acusson_WithPrivate_WithSR" }, { "7c75c6a8957298bd70bf9b51efd39da1" , "DICOMDIR_MR_B_VA12A" }, { "7339affc644067bbd4be9134b597c515" , "DICOMDIR-Philips-EasyVision-4200-Entries" }, { "de270e5b601d5f9e235ea651932b546c" , "dicomdir_Pms_With_heavy_embedded_sequence" }, { "1ef216d2a08420432172581e0b4b9ffa" , "dicomdir_Pms_WithVisit_WithPrivate_WithStudyComponents" }, { "19c0a3e4ba48de7b35f19013bf7ceaa7" , "dicomdir_With_embedded_icons" }, { "33e6ad84c695d0d2c8be46ae79cfb5be" , "DMCPACS_ExplicitImplicit_BogusIOP.dcm" }, { "e692180e794a05a284edc985728af12b" , "DX_GE_FALCON_SNOWY-VOI.dcm" }, { "4838485dda77a0ff1a51463e1742f1c1" , "DX_J2K_0Padding.dcm" }, { "16f951766461b7cf1ec318f53c396c3b" , "ELSCINT1_JP2vsJ2K.dcm" }, { "e1e3c870656147b186361ab2439379ae" , "ELSCINT1_LOSSLESS_RICE.dcm" }, { "c5a985457952a33a10c90139c5812e56" , "ELSCINT1_PMSCT_RLE1.dcm" }, { "f2429f2bf3d2d7951a358e94a848977b" , "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm" }, { "b92edb08527b520df5f624f6753fb47a" , "fffc0000UN.dcm" }, { "40cff8d72a15be2b91d3c972b5c8a481" , "FUJI-10-MONO1-ACR_NEMA_2.dcm" }, { "74fc5c1975c8c8277a2900a803e56260" , "gdcm-ACR-LibIDO.acr" }, { "bd4c340a9d225c16f1507dbc9013ff47" , "gdcm-CR-DCMTK-16-NonSamplePerPix.dcm" }, { "04528010e8679cd668ee3e89cb9b7058" , "gdcm-JPEG-Extended.dcm" }, { "95953bc725582368ac5ddac7eb73e73f" , "gdcm-JPEG-LossLess3a.dcm" }, { "f715e4b9f640ff3b3b98b87d10f81c36" , "gdcm-JPEG-LossLessThoravision.dcm" }, { "06fc6d07dc486b2cb87077ea74774220" , "gdcm-MR-PHILIPS-16-Multi-Seq.dcm" }, { "4b09787d27dbd36a02a0ae7d4d3abe16" , "gdcm-MR-PHILIPS-16-NonSquarePixels.dcm" }, { "765d1cae48ebac57f675193734f6477c" , "gdcm-MR-SIEMENS-16-2.acr" }, { "20e289bad9be67e22d179174f3bc1694" , "gdcm-US-ALOKA-16.dcm" }, { "64e2f50c3e3b9b7400f3f29e144b4a34" , "GE_CT_With_Private_compressed-icon.dcm" }, { "012993a90206a659e92f6af305889f0b" , "GE_DLX-8-MONO2-Multiframe.dcm" }, { "1bec471d81dcb3a39852c03d261c22cd" , "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm" }, { "44f09f83983a2b45a6cd42deb1cbcf0a" , "GE_DLX-8-MONO2-PrivateSyntax.dcm" }, { "1ef5dca6cda8c21b01ff779e6aa67692" , "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm" }, { "34483fff69d88d647a2edfd8d55210a3" , "GE_GENESIS-16-MONO2-WrongLengthItem.dcm" }, { "1a7c56cb02d6e742cc9c856a8ac182e3" , "GE_LOGIQBook-8-RGB-HugePreview.dcm" }, { "7285d6a7261889c33626310e1d581ef8" , "GE_MR_0025xx1bProtocolDataBlock.dcm" }, { "309d063fbe3bd73dad534e72de032f97" , "GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm" }, { "76d57d019a5af8cd5a7cd2afb1e40f4b" , "IM-0001-0066.dcm" }, { "b479bb01798444128d75d90d37cf8546" , "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm" }, { "1bb147010022b15e021eabe0eae1a231" , "JDDICOM_Sample2.dcm" }, { "cd9afab2d9d31de0029bf4ed1995186c" , "JDDICOM_Sample2-dcmdjpeg.dcm" }, { "e4b43fa2fdb4dde13e2a7fd018323241" , "JPEG_LossyYBR.dcm" }, { "118dc6986862bf76326ba542813049d2" , "KODAK-12-MONO1-Odd_Terminated_Sequence.dcm" }, { "499661b964e8df08860655c8dcc17661" , "KODAK_CompressedIcon.dcm" }, { "21de4aa50000b4ed74e4531c2b1d0cc1" , "LEADTOOLS_FLOWERS-16-MONO2-JpegLossless.dcm" }, { "042ca0b7551bd96b501fbbdd4275342f" , "LEADTOOLS_FLOWERS-16-MONO2-RLE.dcm" }, { "31c7e4c1a2f39871b886c443c6376ba7" , "LEADTOOLS_FLOWERS-16-MONO2-Uncompressed.dcm" }, { "9f884f686020c37be9f41a617b9ec8e8" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossless.dcm" }, { "bc38dd9c27150dd3d67250830644e609" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossy.dcm" }, { "32ad312f99c425b1631e6e05881e3e33" , "LEADTOOLS_FLOWERS-24-RGB-Uncompressed.dcm" }, { "82c2343f6f4b55bf6a31f6cc0f9cf83e" , "LEADTOOLS_FLOWERS-8-MONO2-JpegLossy.dcm" }, { "f78abbd1df9ef87ba21d805083d6e3b3" , "LEADTOOLS_FLOWERS-8-MONO2-RLE.dcm" }, { "afe156b36b3af19b6a889d640296c710" , "LEADTOOLS_FLOWERS-8-MONO2-Uncompressed.dcm" }, { "deaf5e62e2132996ebe759a438195f95" , "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm" }, { "6b04366e28facddd808b9ea149745309" , "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm" }, { "f1b63522a4d6ae89eb6bc728cebc14ff" , "libido1.0-vol.acr" }, { "b90b87245eddfcb53b26e61cfaa40fcc" , "LIBIDO-16-ACR_NEMA-Volume.dcm" }, { "454accc7d6688c0478461f575461c607" , "LIBIDO-24-ACR_NEMA-Rectangle.dcm" }, { "3d8ee51f870495bf22b7a51ba0661f90" , "LIBIDO-8-ACR_NEMA-Lena_128_128.acr" }, { "9c8b67c4205880f78347b751268af0fa" , "LJPEG_BuginGDCM12.dcm" }, { "335428b3dde0d390dbd8bb49f32c673c" , "MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm" }, { "abd7b36703f82e3b491e4b3b95cc1c43" , "MAROTECH_CT_JP2Lossy.dcm" }, { "63f178c91a573f13e28aabe8b7eaf1bd" , "MR-Brucker-CineTagging-NonSquarePixels.dcm" }, { "746a17465b70119264762ead8f1a6763" , "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm" }, { "c87dd2eac7b55cb3eade01eaa373b4e3" , "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm" }, { "ca8cd1b0a7c64139919deba04dbddfc9" , "MR-MONO2-12-an2.acr" }, { "cb32c2e0c3f9c52939440d39f9fe7b4f" , "MR-MONO2-12-angio-an1.acr" }, { "fb0565a0a591ed83106e90d5b76e0cfe" , "MR-MONO2-12-shoulder.dcm" }, { "97d9f3dcc35e54478522ead748e24956" , "MR-MONO2-16-head.dcm" }, { "fc72513cfea2caf6035dd8910c53bb9a" , "MR-MONO2-8-16x-heart.dcm" }, { "1a2e4f0aa20448fdd7783ff938bf99e6" , "MR_Philips-Intera_BreaksNOSHADOW.dcm" }, { "aa07de9c01765602fe722e9ef2d8b92a" , "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm" }, { "a8091f92ae895c2ef70143487e29b7d3" , "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm" }, { "5d893aee8147f12b975cde73abdb5d84" , "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm" }, { "3bbffc4c87f4f5554fafad5f8a002552" , "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm" }, { "32f899e8f1506bc3fa155da22e9c8813" , "MR-SIEMENS-DICOM-WithOverlays.dcm" }, { "db7370f6d18ce7a9c8ab05179eb82cc6" , "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm" }, { "15ef679db745d4a3a59cab0456a82ace" , "MR_SIEMENS_forceLoad29-1010_29-1020.dcm" }, { "be2ce86e93fe5a0cc33c2351b6a4ac66" , "MR_Spectroscopy_SIEMENS_OF.dcm" }, { "473dd7ad8ec7c50dbd20470b525eb859" , "NM-MONO2-16-13x-heart.dcm" }, { "cc1dd93cd2e2fc19815b015663ea8e66" , "OT-MONO2-8-a7.dcm" }, { "61dfde4beae2ecd7fd4acc9cab412daa" , "OT-PAL-8-face.dcm" }, { "d97af0d265cee784f3fd6391f17cf8fd" , "PET-cardio-Multiframe-Papyrus.dcm" }, { "826226301791aaa2e1dfacb9f56775ae" , "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm" }, { "fe35f6ff5e85392143c7216a9e4bc92d" , "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" }, { "d6ea0b68da84829a1b4cbd07d7cf6ef5" , "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm" }, { "cc8bbb35c017acd32ba29d20df12ac8b" , "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm" }, { "f80468faedc918845fc31accc247125f" , "PHILIPS_Intera-16-MONO2-Uncompress.dcm" }, { "43469b245a5fbbea69db6ed9507a86e4" , "PICKER-16-MONO2-Nested_icon.dcm" }, { "2cd10ed50b409549a6a25c4feaa5a989" , "PICKER-16-MONO2-No_DicomV3_Preamble.dcm" }, { "9d4f1c087ababf655297bf2129c01911" , "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm" }, { "8e902a2371c37b9e6f636c3c53ef1f5c" , "RadBWLossLess.dcm" }, { "a0e664672011dab175f593bf61026ffc" , "rle16loo.dcm" }, { "f35d850d15021800175c585f856a8f54" , "rle16sti.dcm" }, { "148b28cb580e6f56d9adce46a985c692" , "SIEMENS-12-Jpeg_Process_2_4-Lossy-a.dcm" }, { "90336859a2e275900931d54c41fe033a" , "SIEMENS_CSA2.dcm" }, { "4b1498f0edd79cc0f5273f22a4e03615" , "SIEMENS_GBS_III-16-ACR_NEMA_1.acr" }, { "c54eb37190f783c79504554990761efd" , "SIEMENS_GBS_III-16-ACR_NEMA_1-ULis2Bytes.dcm" }, { "bf49f9fdab81e97482b8fe6f579bc3f7" , "SIEMENS_ImageLocationUN.dcm" }, { "765d1cae48ebac57f675193734f6477c" , "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm" }, { "6884e1143f2edf6188643e896e796463" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm" }, { "340b9006e47d48bd6d5abe5af628026b" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm" }, { "59cc16618e978026cff79e61e17174ec" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm" }, { "fde3a66d449ae3788b4c431fde7a7a50" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm" }, { "6facfeecd3c531b3a536064aa046fa9e" , "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm" }, { "ba687ec0b2e49f5eedd3e22573ba2094" , "SIEMENS_MAGNETOM-12-MONO2-Uncompressed.dcm" }, { "7e00f1e50bd0bedc5db64dff0dea3848" , "SIEMENS_MAGNETOM-12-MONO2-VRUN.dcm" }, { "c80b1be0d50619955e54d81bca451a05" , "SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm" }, { "544a1fde6df0817ef03ad56f7ff539a8" , "SIEMENS-MR-RGB-16Bits.dcm" }, { "33f4765c31a5d2f61f4e3fa4571e2f88" , "SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs.acr" }, { "08443d1e07d98554a695c482ecba2014" , "SIEMENS_Sonata-12-MONO2-SQ.dcm" }, { "f49aeced38187d9d8502cf79fb690e0d" , "SIEMENS_Sonata-16-MONO2-Value_Multiplicity.dcm" }, { "fd22f759b7dd4b8cccd64f5f5096887b" , "SignedShortLosslessBug.dcm" }, { "c8c3e1d395aa50795ca831e12051d9d0" , "simpleImageWithIcon.dcm" }, { "c634e9e559b61ea65d222a1d5c5a9d5e" , "test.acr" }, { "fc733f08120936e25cb11af6df6f65bf" , "TG18-CH-2k-01.dcm" }, { "47a35db3d33ab798e7b41449e22d1120" , "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm" }, { "d85505c6a7be835b482175fbed85ce98" , "TheralysGDCM120Bug.dcm" }, { "db53b838d4ed4aca22999d6c70558305" , "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm" }, { "b3bc682102873b761491839df5686adf" , "undefined_length_un_vr.dcm" }, { "98473e5af6a5694ae08d63780bcea96c" , "US-GE-4AICL142.dcm" }, { "1b12a27ca6075d55000d1d170949b789" , "US-IRAD-NoPreambleStartWith0003.dcm" }, { "44f97431146a33e320ae08fb7dc09a59" , "US-IRAD-NoPreambleStartWith0005.dcm" }, { "1006e4c95b63539608adf62060d7fc46" , "US-MONO2-8-8x-execho.dcm" }, { "83574afcb319337222472db44f91cbd8" , "US-PAL-8-10x-echo.dcm" }, { "0b3ae440e8dbb144205074a664228c1e" , "US-RGB-8-epicard.dcm" }, { "0ae1d92cc14706add796368622deaa26" , "US-RGB-8-esopecho.dcm" }, { "d23db052b02b2a2c510104486cdf40b2" , "XA-MONO2-8-12x-catheter.dcm" }, { "231bb6c25d482422745bb839d6f8610a" , "PHILIPS_GDCM12xBug2.dcm" }, { "e2558e4e01d937bfac33b7e0fb07b7b5" , "PHILIPS_GDCM12xBug.dcm" }, { "434c7aa1172ce3af0c306d9a2cb28c17" , "AMIInvalidPrivateDefinedLengthSQasUN.dcm" }, { "346ba438ade47d75c41e637858a419f8" , "OsirixFake16BitsStoredFakeSpacing.dcm" }, { "efe1ff2da3fc0bfcc5df834fa390d5cf" , "MR16BitsAllocated_8BitsStored.dcm" }, { "7900d059078278ad0387f7c4aaf2027d" , "JPEGDefinedLengthSequenceOfFragments.dcm" }, { "dacb240b2fc701416d80193ad18baad5" , "IM-0001-0066.CommandTag00.dcm" }, { "7f2f84d3adef913bb5531f583eceb004" , "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" }, { "f4bf27280aad0ff38d1fe3871a0a8afb" , "GDCMJ2K_TextGBR.dcm" }, { "f445a6dc674e2c12c14bf3583c6c3e6f" , "NM_Kakadu44_SOTmarkerincons.dcm" }, { "7c0c4eb0c73b4dc5b3a4d961653fc4e2" , "PhilipsInteraSeqTermInvLen.dcm" }, { "64528209839b0369c2da530249f4ca58" , "TOSHIBA_J2K_SIZ1_PixRep0.dcm" }, { "2498ca4aaf62991c8a1f629a804bfa44" , "TOSHIBA_J2K_OpenJPEGv2Regression.dcm" }, { "e4d559b6db04679b54bea40c763b09e4" , "TOSHIBA_J2K_SIZ0_PixRep1.dcm" }, { "3d4d7a22442b21477dfc3ba8ac6cac06" , "NM-PAL-16-PixRep1.dcm" }, { "deb7e4ee592efca5d475aaa6fab06459" , "MEDILABInvalidCP246_EVRLESQasUN.dcm" }, { "52f727de4f831ff2bae850fdd8b1413a" , "JPEGInvalidSecondFrag.dcm" }, { "027faefc8031768dad1afc100f7aee27" , "SC16BitsAllocated_8BitsStoredJ2K.dcm" }, { "f7c4fbb93b0347101e21e36f223b4d46" , "SC16BitsAllocated_8BitsStoredJPEG.dcm" }, { "af580e6202a240005a5a05adc5c691f2" , "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" }, { "236713383dd9d315415f3a5957707ad1" , "JPEGNote_empty.dcm" }, { "5b6f7f59dbefd679aa29e9082f100ff5" , "JPEGLS_CharLS_10742.dcm" }, { "66fe7d517941802364e7ad8dee7149e7" , "JPEGLosslessYBR_FULL_422.dcm" }, { "dcb4b29b7e0f0da441ab3e5cdcb506b4" , "JPEGNote_missing.dcm" }, { "2c30e74ee3db1895027932bb0566f54e" , "JPEGNote_bogus.dcm" }, { "c71a2cf95325395264c4dc6e15a898bd" , "RLEDebianBug816607Orig.dcm" }, { "e49c403278663d9739014ad1d57c276f" , "IllegalGroup2ImplicitTS.dcm" }, { "299df0175ea4d3ab1f02651f88ffe9f3" , "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm" }, { "9add5fd3c83cc0946633e792f448f732" , "LengthOfItemLarger.dcm" }, { "b9fdef839a6b6ab33486bfd6b35de3a8" , "GE_MR_0025xx1bProtocolDataBlockXML.dcm" }, { "fd6ba97f247f5b8ef70f407f5c1b5f11" , "EmptyIcon_Bug417.dcm" }, { "271d71dde59c0cad76baab36c909a43a" , "EnhancedWithIPPPerFrameIOPShared.dcm" }, { "2fd5ad3e9265861be43b6a341314cc52" , "FUJI-ffff-MONO1-J2K.dcm" }, { "69648b9be35a621e9e5b447df656ab18" , "JPEGLosslessSeNonZero.dcm" }, { "c0ee318130c0fcf35b0f57670a8f1e0d" , "US-YBR_FULL_422-EVRLE.dcm" }, { "3d873e4c19bf5513959c6cc1a184e2df" , "Osirix10vs8BitsStored.dcm" }, { "5141fe286ad2e39259dac231e3d10b41" , "Bug_Siemens_PrivateIconNoItem.dcm" }, { "3155af485dc3f490cc9e212f95499615" , "HardcopyColor_YBR_RCT_J2K_PC1.dcm" }, { "ab93bd11ce0f48e2e9e1c700df160a30" , "PET-GE-dicomwrite-PixelDataSQUNv2.dcm" }, { "8425e60ca4d6745e8a39c437cae25b74" , "MEDILABValidCP246_EVRLESQasOB.dcm" }, { nullptr, nullptr} }; int TestMD5Func(const char* filename, const char *md5ref, bool verbose = false) { if( !filename || !md5ref) return 1; if( verbose ) std::cout << "TestRead: " << filename << std::endl; const char *dataroot = gdcm::Testing::GetDataRoot(); std::string path = dataroot; path += "/"; path += filename; path = filename; char md5[2*16+1] = {}; bool b = gdcm::MD5::ComputeFile( path.c_str(), md5); if( !b ) { std::cerr << "Fail ComputeFile: " << path << std::endl; return 1; } if( strcmp( md5, md5ref) != 0 ) { std::cout << "Problem with: " << path << std::endl; std::cout << "Ref: " << md5ref << " vs " << md5 << std::endl; // Let's remove this buggy file: //std::cout << "Removing: " << path << std::endl; //gdcm::System::RemoveFile(path.c_str()); return 1; } return 0; } static const char *GetMD5Sum(const char *filename) { using md5pair = const char *const (*)[2]; const char *md5filename; md5pair md5filenames = gdcmMD5SumFiles; int i = 0; while( ( md5filename = md5filenames[i][1] ) ) { gdcm::Filename fn( filename ); if( strcmp( md5filename, fn.GetName() ) == 0 ) { return md5filenames[i][0]; } ++i; } std::cerr << "Missing Md5 for: " << filename << std::endl; return nullptr; } int TestMD5(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; const char *md5 = GetMD5Sum( filename ); return TestMD5Func(filename, md5, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { const char *md5 = GetMD5Sum( filename ); r += TestMD5Func( filename, md5 ); ++i; } return r; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestObject.cxx000664 001766 001770 00000001231 14517730450 024513 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmObject.h" int TestObject(int, char *[]) { gdcm::Object o; (void)o; return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/CMakeLists.txt000664 001766 001770 00000002451 14517730450 024466 0ustar00mmalaterremmalaterre000000 000000 # Define the tests for Common # Common set(Common_TEST_SRCS TestVersion.cxx TestCommand.cxx TestCryptographicMessageSyntax.cxx TestDummyValueGenerator.cxx TestASN1.cxx TestTesting.cxx TestSystem3.cxx TestSwapper.cxx TestByteSwap.cxx TestString1.cxx TestString2.cxx TestTerminal.cxx TestFilenameGenerator.cxx TestObject.cxx TestSmartPointer.cxx TestSwapCode.cxx TestSystem1.cxx TestSystem2.cxx TestTrace.cxx TestTypes.cxx TestUnpacker12Bits.cxx TestBase64.cxx TestLog2.cxx ) if(GDCM_DATA_ROOT) list(APPEND Common_TEST_SRCS TestDirectory.cxx TestFilename.cxx TestMD5.cxx ) if(GDCM_USE_SYSTEM_OPENSSL) list(APPEND Common_TEST_SRCS TestSHA1.cxx) endif() endif() # Add the include paths include_directories( "${GDCM_BINARY_DIR}/Source/Common" "${GDCM_SOURCE_DIR}/Source/Common" "${GDCM_SOURCE_DIR}/Source/DataStructureAndEncodingDefinition" ) create_test_sourcelist(CommonTests gdcmCommonTests.cxx ${Common_TEST_SRCS} EXTRA_INCLUDE gdcmTestDriver.h ) add_executable(gdcmCommonTests ${CommonTests}) target_link_libraries(gdcmCommonTests gdcmCommon) # Loop over files and create executables foreach(name ${Common_TEST_SRCS}) get_filename_component(testname ${name} NAME_WE) add_test(NAME ${testname} COMMAND gdcmCommonTests ${testname}) endforeach() gdcm-3.0.22/Testing/Source/Common/Cxx/TestString2.cxx000664 001766 001770 00000003025 14517730450 024640 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmString.h" #include #include // strlen int TestString2(int , char *[]) { gdcm::String<> s1 = "coucou"; std::cout << s1 << " -> " << s1.size() << std::endl; gdcm::String<> s2 = "coucou!"; std::cout << s2 << " -> " << s2.size() << std::endl; gdcm::String<'\0',64,0> s3 = "coucou"; std::cout << s3.c_str() << " -> " << s3.size() << std::endl; gdcm::String<'\0',64,0> s4 = "coucou!"; std::cout << s4.c_str() << " -> " << s4.size() << std::endl; const char *s = "coucou!"; gdcm::String<'\0',64,0> s5( s, strlen(s) ); std::cout << s5.c_str() << " -> " << s5.size() << std::endl; std::string ss = "coucou!"; gdcm::String<'\0',64,0> s6( ss ); std::cout << s6.c_str() << " -> " << s6.size() << std::endl; gdcm::String<'\0',64,0> s7( ss, 1, 5 ); std::cout << s7.c_str() << " -> " << s7.size() << std::endl; gdcm::String<'\0',64,0> s8( ss, 1, 6 ); std::cout << s8.c_str() << " -> " << s8.size() << std::endl; return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestSystem3.cxx000664 001766 001770 00000003260 14517730450 024660 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSystem.h" #include "gdcmTesting.h" #include // strdup #include int TestSystem3(int, char *[]) { const char isostr[] = "\\ISO 2022 IR 13\\ISO 2022 IR 87"; const char delim[] = "\\"; char *token; { char *query = strdup( isostr ); char *str1; char *saveptr1; std::vector< std::string > v; for (str1 = query; ; str1 = nullptr) { token = gdcm::System::StrTokR(str1, delim, &saveptr1); if (token == nullptr) break; //std::cout << "[" << token << "]" << std::endl; v.emplace_back(token ); } free( query ); if( v.size() != 2 ) return 1; if( v[0] != "ISO 2022 IR 13" ) return 1; if( v[1] != "ISO 2022 IR 87" ) return 1; } { std::vector< std::string > v; char *string = strdup( isostr ); if(!string) return 1; char *copy = string; while ((token = gdcm::System::StrSep(&string, delim)) != nullptr) { //printf("token=%s\n", token); v.emplace_back(token ); } free( copy ); if( v.size() != 3 ) return 1; if( !v[0].empty() ) return 1; if( v[1] != "ISO 2022 IR 13" ) return 1; if( v[2] != "ISO 2022 IR 87" ) return 1; } return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestVersion.cxx000664 001766 001770 00000002067 14517730450 024742 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmVersion.h" int TestVersion(int, char *[]) { // The following statements just test whether those functions are callable: const char *version = gdcm::Version::GetVersion(); (void)version; const int majorVersion = gdcm::Version::GetMajorVersion(); (void)majorVersion; const int minorVersion = gdcm::Version::GetMinorVersion(); (void)minorVersion; const int buildVersion = gdcm::Version::GetBuildVersion(); (void)buildVersion; gdcm::Version v; v.Print( std::cout ); return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestTrace.cxx000664 001766 001770 00000005743 14517730450 024357 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTrace.h" #include int TestTrace(int, char *[]) { gdcm::Trace t; //initializes all macros to 'off' gdcmDebugMacro( "DebugKO" ); gdcmWarningMacro( "WarningKO" ); gdcmErrorMacro( "ErrorKO" ); // test the SetStream interface std::ostringstream useros; gdcm::Trace::SetStream( useros ); gdcmDebugMacro( "DebugOK_OFF" ); gdcmWarningMacro( "WarningOK_OFF" ); gdcmErrorMacro( "ErrorOK_OFF" ); gdcm::Trace::DebugOn(); gdcm::Trace::WarningOn(); gdcm::Trace::ErrorOn(); gdcmDebugMacro( "DebugOK_ON" ); gdcmWarningMacro( "WarningOK_ON" ); gdcmErrorMacro( "ErrorOK_ON" ); //in release mode, tracing just doesn't work any more, so this test isn't valid. #ifndef NDEBUG std::string result = useros.str(); if( result.find( "KO" ) != std::string::npos ) { std::cerr << result << std::endl; return 1; } if( result.find( "OFF" ) != std::string::npos ) { std::cerr << result << std::endl; return 1; } // opposite: if( result.find( "OK" ) == std::string::npos ) { std::cerr << result << std::endl; return 1; } if( result.find( "ON" ) == std::string::npos ) { std::cerr << result << std::endl; return 1; } #endif // Test Debug/Warning/Error interface: std::ostringstream debug; std::ostringstream warning; std::ostringstream error; gdcm::Trace::SetDebugStream( debug ); gdcm::Trace::SetWarningStream( warning ); gdcm::Trace::SetErrorStream( error ); gdcmDebugMacro( "Debug1234" ); gdcmWarningMacro( "Warning1234" ); gdcmErrorMacro( "Error1234" ); #ifndef NDEBUG std::string result1 = debug.str(); std::string result2 = warning.str(); std::string result3 = error.str(); if( result1.find( "Debug1234" ) == std::string::npos ) { std::cerr << result1 << std::endl; return 1; } if( result2.find( "Warning1234" ) == std::string::npos ) { std::cerr << result2 << std::endl; return 1; } if( result3.find( "Error1234" ) == std::string::npos ) { std::cerr << result3 << std::endl; return 1; } if( result1.find( "Warning1234" ) != std::string::npos ) { std::cerr << result1 << std::endl; return 1; } if( result2.find( "Error1234" ) != std::string::npos ) { std::cerr << result2 << std::endl; return 1; } if( result3.find( "Debug1234" ) != std::string::npos ) { std::cerr << result3 << std::endl; return 1; } #endif return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestSmartPointer.cxx000664 001766 001770 00000004272 14517730450 025744 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSmartPointer.h" #include "gdcmObject.h" #include using gdcm::Object; using gdcm::SmartPointer; class Foo : public Object { public: void foo() { // Does exist in Object as far as I know :) std::cout << "foo" << std::endl; } }; class Containter { public: Containter():Instance(nullptr) {} SmartPointer Instance; }; void Fill(SmartPointer &p) { SmartPointer in = new Foo; // p = in; Foo & rp = *in; p = &rp; } static SmartPointer gf; SmartPointer TestReturn(int i) { static int n = 0; if( !n ) { ++n; gf = new Foo; } if( i == 0 ) { return gf; } else if( i == 1 ) { SmartPointer f = new Foo; return f; } else if( i == 2 ) { return new Foo; } return nullptr; } //class Object2 : public Foo {}; int TestSmartPointer(int, char *[]) { SmartPointer p = new Object; SmartPointer p2 = new Foo; p2->foo(); SmartPointer p3 = new Foo; //p3->foo(); // should not compile //std::cout << p << std::endl; //std::cout << p2 << std::endl; //std::cout << p3 << std::endl; if( p == p2 || p == p3 || p2 == p3 ) { return 1; } // SmartPointer SmartPointer p4 = p2; SmartPointer p5 = p3; // Pointer: SmartPointer p6 = &(*p2); SmartPointer p7; Fill(p7); Foo &foo = *p7; foo.foo(); Containter c1; Containter c2; c2 = c1; // TODO: //SmartPointer s = new Foo; //delete s; for(int i = 0; i < 5; ++i) { SmartPointer f = TestReturn(i); if( f ) { f->foo(); } } return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestDummyValueGenerator.cxx000664 001766 001770 00000002341 14517730450 027247 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDummyValueGenerator.h" #include "gdcmTesting.h" int TestDummyValueGenerator(int , char *[]) { gdcm::DummyValueGenerator dvg; (void)dvg; const char patientid1[] = "hello"; const char patientid2[] = "hello "; // Because patientid1 & patientid2 are equivalent in DICOM we need to be able to generate // identical replacement value in case of de-identifier operation: const char *ptr1 = gdcm::DummyValueGenerator::Generate( patientid1 ); const char *ptr2 = gdcm::DummyValueGenerator::Generate( patientid2 ); if( !ptr1 || !ptr2 ) return 1; std::string str1 = ptr1; std::string str2 = ptr2; if( str1 != str2 ) { return 1; } return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestDirectory.cxx000664 001766 001770 00000003405 14517730450 025256 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmDirectory.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include // atoi int TestOneDirectory(const char *path, bool recursive = false ) { if( !gdcm::System::FileIsDirectory(path) ) { std::cerr << path << " is not a directory" << std::endl; return 1; } gdcm::Directory d; d.Load( path, recursive ); //d.Print( std::cout ); if( d.GetToplevel() != path ) { std::cerr << d.GetToplevel() << " != " << path << std::endl; return 1; } gdcm::Directory::FilenamesType const &files = d.GetFilenames(); for(gdcm::Directory::FilenamesType::const_iterator it = files.begin(); it != files.end(); ++it ) { const char *filename = it->c_str(); if( !gdcm::System::FileExists(filename) ) { return 1; } } return 0; } int TestDirectory(int argc, char *argv[]) { int res = 0; if( argc > 1 ) { bool recursive = false; if ( argc > 2 ) { recursive = (atoi(argv[2]) > 0 ? true : false); } res += TestOneDirectory( argv[1], recursive); } else { const char *path = gdcm::Testing::GetDataRoot(); res += TestOneDirectory( path ); } //res += TestOneDirectory( "" ); return res; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestASN1.cxx000664 001766 001770 00000001607 14517730450 024016 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmASN1.h" struct MyASN1 : public gdcm::ASN1 { int TestPBKDF2() { return this->gdcm::ASN1::TestPBKDF2(); } }; int TestASN1(int argc, char *argv[]) { if( argc < 1 ) { return 1; } const char *filename = argv[1]; MyASN1 asn1; asn1.ParseDumpFile( filename ); asn1.TestPBKDF2(); return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestTerminal.cxx000664 001766 001770 00000005412 14517730450 025065 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTerminal.h" #include namespace term = gdcm::terminal; void TestAll() { std::cout << term::setattribute( term::bright ) << "bright" << std::endl; std::cout << term::setattribute( term::dim ) << "dim" << std::endl; std::cout << term::setattribute( term::underline ) << "underline" << std::endl; std::cout << term::setattribute( term::blink ) << "blink" << std::endl; std::cout << term::setattribute( term::reverse ) << "reverse" << std::endl; std::cout << term::setattribute( term::reset ) << "reset" << std::endl; std::cout << term::setfgcolor( term::black ) << "fg:black" << std::endl; std::cout << term::setfgcolor( term::red ) << "fg:red " << std::endl; std::cout << term::setfgcolor( term::green ) << "fg:green" << std::endl; std::cout << term::setfgcolor( term::yellow ) << "fg:yellow" << std::endl; std::cout << term::setfgcolor( term::blue ) << "fg:blue" << std::endl; std::cout << term::setfgcolor( term::magenta ) << "fg:magenta" << std::endl; std::cout << term::setfgcolor( term::cyan ) << "fg:cyan" << std::endl; std::cout << term::setfgcolor( term::white ) << "fg:white" << std::endl; std::cout << term::setattribute( term::reverse ) << term::setfgcolor( term::white ) << "fg:white" << std::endl; std::cout << term::setbgcolor( term::black ) << "bg:black" << std::endl; std::cout << term::setbgcolor( term::red ) << "bg:red " << std::endl; std::cout << term::setbgcolor( term::green ) << "bg:green" << std::endl; std::cout << term::setbgcolor( term::yellow ) << "bg:yellow" << std::endl; std::cout << term::setbgcolor( term::blue ) << "bg:blue" << std::endl; std::cout << term::setbgcolor( term::magenta ) << "bg:magenta" << std::endl; std::cout << term::setbgcolor( term::cyan ) << "bg:cyan" << std::endl; std::cout << term::setbgcolor( term::white ) << "bg:white" << std::endl; std::cout << term::setattribute( term::reset ) << "reset" << std::endl; //std::cerr << term::setbgcolor( term::blue ) << "cerr:bg:blue" << std::endl; } int TestTerminal(int , char *[]) { // Typically for WIN32 term::setmode( term::CONSOLE ); TestAll(); // For all *NIX // rxvt is WIN32 app, but is a VT100 compatible TERM term::setmode( term::VT100 ); TestAll(); return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestString1.cxx000664 001766 001770 00000005407 14517730450 024645 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmString.h" #include using CSComp = gdcm::String<'\\', 64>; static void Print(CSComp v) { std::cout << v << std::endl; } int TestString1(int , char *[]) { { gdcm::String<'\\'> s = "coucou"; std::cout << s << std::endl; const char str[] = "WINDOW1\\WINDOW2\\WINDOW3"; //const size_t lenstr = strlen(str); gdcm::String<'\\'> ms1, ms2, ms3; std::stringstream ss; ss << str; ss >> ms1; ss.get(); // discard backslash std::cout << ms1 << std::endl; if( ms1 != "WINDOW1" ) return 1; ss >> ms2; ss.get(); std::cout << ms2 << std::endl; if( ms2 != "WINDOW2" ) return 1; ss >> ms3; ss.get(); std::cout << ms3 << std::endl; if( ms3 != "WINDOW3" ) return 1; // we are at the end: if( !!ss ) { std::cerr << "not at the end" << std::endl; return 1; } } { gdcm::String<'^'> s = "coucou"; std::cout << s << std::endl; const char str[] = "WINDOW1^WINDOW2^WINDOW3"; //const size_t lenstr = strlen(str); gdcm::String<'^'> ms1, ms2, ms3; std::stringstream ss; ss << str; ss >> ms1; ss.get(); // discard backslash std::cout << ms1 << std::endl; if( ms1 != "WINDOW1" ) return 1; ss >> ms2; ss.get(); std::cout << ms2 << std::endl; if( ms2 != "WINDOW2" ) return 1; ss >> ms3; ss.get(); std::cout << ms3 << std::endl; if( ms3 != "WINDOW3" ) return 1; // we are at the end: if( !!ss ) return 1; } { gdcm::String<> s = "coucou"; std::cout << s << std::endl; const char str[] = "WINDOW1^WINDOW2^WINDOW3"; //const size_t lenstr = strlen(str); gdcm::String<> ms1; std::stringstream ss; ss << str; ss >> ms1; std::cout << ms1 << std::endl; ss.get(); // discard \n if ( ms1 != str ) return 1; // we are at the end: if( !!ss ) return 1; } std::string privatecreator = " CREATOR SMS-AX "; std::cout << "[" << privatecreator << "]" << std::endl; privatecreator.erase(privatecreator.find_last_not_of(' ') + 1); std::cout << "[" << privatecreator << "]" << std::endl; static const CSComp values[] = {"DERIVED","SECONDARY"}; std::cout << values[0] << std::endl; Print( values[0] ); const char trim[] = "8 "; gdcm::String<> strim( trim ); std::cout << "|" << strim.Trim() << "|" << std::endl; return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestBase64.cxx000664 001766 001770 00000005374 14517730450 024345 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmBase64.h" #include "gdcmTesting.h" #include "gdcmSystem.h" #include int TestBase64(int , char *[]) { const char str[] = "GDCM Test Base64 Encoding"; //const char str64[] = "R0RDTSBUZXN0IEJhc2U2NCBFbmNvZGluZwA="; (contains trailing \0 ) const char str64[] = "R0RDTSBUZXN0IEJhc2U2NCBFbmNvZGluZw=="; //std::cout << "sizeof:" << sizeof(str) << std::endl; //std::cout << "strlen:" << strlen(str) << std::endl; const size_t l1 = gdcm::Base64::GetEncodeLength( str, strlen(str) ); if( l1 != 36 ) { std::cerr << "Fail 1: " << l1 << std::endl; return 1; } char buffer[256] = {}; if( l1 > sizeof(buffer) ) { std::cerr << "Fail 2" << std::endl; return 1; } size_t l2 = gdcm::Base64::Encode( buffer, sizeof(buffer), str, strlen(str) ); if( l2 == 0 ) { std::cerr << "Fail 3: " << l2 << std::endl; return 1; } if( strcmp( buffer, str64 ) != 0 ) { std::cerr << "Found: " << buffer << " instead of " << str64 << std::endl; return 1; } size_t lbuffer = strlen(buffer); if( lbuffer != l1 ) { std::cerr << "Fail 4" << std::endl; return 1; } const size_t l3 = gdcm::Base64::GetDecodeLength( buffer, l1 ); if( l3 != 25 ) { std::cerr << "Fail 5: " << l3 << std::endl; return 1; } if( l3 != sizeof(str) - 1 ) { std::cerr << "Fail 6" << std::endl; return 1; } char buffer2[256]; if( l3 > sizeof(buffer2) ) { std::cerr << "Fail 7" << std::endl; return 1; } const size_t l4 = gdcm::Base64::Decode( buffer2, sizeof(buffer2), buffer, l1); if( l4 == 0 ) { std::cerr << "Fail 8" << std::endl; return 1; } if( strncmp( str, buffer2, strlen(str) ) != 0 ) { std::cerr << "Fail 9: " << str << " vs " << buffer2 << std::endl; return 1; } const unsigned char bin[] = { 0x00, 0x00, 0xc8, 0x43 }; const char bin64[] = "AADIQw=="; const size_t l5 = gdcm::Base64::Decode( buffer2, sizeof(buffer2), bin64, strlen(bin64) ); if( l5 == 0 ) { std::cerr << "Fail 10" << std::endl; return 1; } if( memcmp( bin, buffer2, sizeof(bin) ) != 0 ) { std::cerr << "Fail 11" << std::endl; return 1; } return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestSwapCode.cxx000664 001766 001770 00000001177 14517730450 025023 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSwapCode.h" int TestSwapCode(int, char *[]) { return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestSystem2.cxx000664 001766 001770 00000003220 14517730450 024653 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSystem.h" #include "gdcmTesting.h" // The GNU C library (glibc) requires this be defined to have fseeko() and ftello(). #ifdef __GNU_LIBRARY__ #define _FILE_OFFSET_BITS 64 #endif #include static bool mybool; static size_t actualde; static bool check( const int64_t inslen ) { std::cerr << "check:" << inslen << std::endl; if( inslen < 0 ) return true; return false; } static bool append( size_t len ) { off_t newlen = (off_t)len; #if 1 newlen -= (off_t)actualde; return check( newlen ); #else return check( newlen - actualde ); #endif } int TestSystem2(int, char *[]) { const int soff = sizeof( off_t ); std::cerr << soff << std::endl; mybool = true; actualde = 26; off_t o0 = -1; off_t o1 = 0; //off_t o2 = 1; std::cerr << "t:" << o0 << std::endl; if( o0 > o1 ) { std::cerr << "Not a long value" << std::endl; return 1; } int val1 = 5; int val2 = 10; size_t size = 2; const off_t o = (off_t)size; if( !check( o + val1 - val2 ) ) { return 1; } if( !append( 2 ) ) { return 1; } return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestFilename.cxx000664 001766 001770 00000015764 14517730450 025045 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFilename.h" #include "gdcmSystem.h" #include "gdcmTesting.h" #include #include #include // EXIT_FAILURE int TestFilename(int argc, char *argv[]) { (void)argc;(void)argv; std::string path = "/gdcm/is/a/dicom/"; std::string name = "library.dcm"; std::string fullpath = path; fullpath += '/'; fullpath += name; gdcm::Filename f( fullpath.c_str() ); std::cout << f.GetPath() << std::endl; std::cout << f.GetName() << std::endl; std::cout << f.GetExtension() << std::endl; std::cout << f << std::endl; if( f.GetPath() != path ) { std::cerr << "Wrong path" << std::endl; return 1; } if( f.GetName() != name) { std::cerr << "Wrong name" << std::endl; return 1; } if( f.GetExtension() != std::string( ".dcm" ) ) { std::cerr << "Wrong extension" << std::endl; return 1; } // if( std::string( "/tmp/debug.dcm" ) != f ) // { // return 1; // } std::string dataroot = gdcm::Testing::GetDataRoot(); std::string current = dataroot + "/test.acr"; if( !gdcm::System::FileExists( current.c_str() ) ) { std::cerr << "File does not exist: " << current << std::endl; return 1; } std::cerr << "Current:" << current << std::endl; gdcm::Filename fn0(current.c_str()); std::cerr << fn0.GetPath() << std::endl; std::string current2 = fn0.GetPath(); current2 += "/./"; current2 += fn0.GetName(); std::cerr << current2 << std::endl; if( current2 == current ) { return 1; } gdcm::Filename fn2(current2.c_str()); if( !fn0.IsIdentical(fn2)) { return 1; } { const char *curprocfn = gdcm::System::GetCurrentProcessFileName(); if( curprocfn ) { gdcm::Filename fn( curprocfn ); std::string str = fn.GetPath(); std::cout << str << std::endl; } } { #ifdef GDCM_HAVE_WCHAR_IFSTREAM const wchar_t ifn[] = L"UnicodeFileName.dcm"; const wchar_t* fn = gdcm::Testing::GetTempFilenameW(ifn); std::ofstream outputFileStream( fn ); if ( ! outputFileStream.is_open() ) { std::wcerr << "Failed to read UTF-16: " << fn << std::endl; return EXIT_FAILURE; } outputFileStream.close(); #else //char ifn2[] = "α.dcm"; //MM: I do not think this is legal C++... const char ifn2[] = "\xCE\xB1.dcm"; // this is the proper way to write it (portable) const char ifn1[] = { (char)0xCE, (char)0xB1, '.', 'd', 'c', 'm', 0}; // trailing NULL char std::string sfn1 = gdcm::Testing::GetTempFilename(ifn1); const char *csfn1 = sfn1.c_str(); std::string sfn2 = gdcm::Testing::GetTempFilename(ifn2); const char *csfn2 = sfn2.c_str(); std::ofstream outputFileStream( csfn1 ); if ( ! outputFileStream.is_open() ) { std::cerr << "Failed to create UTF-8 file: " << csfn1 << std::endl; return EXIT_FAILURE; } const char secret[]= "My_secret_pass_phrase"; outputFileStream << secret; outputFileStream.close(); if( !gdcm::System::FileExists(csfn1) ) { std::cerr << "File does not exist: " << csfn1 << std::endl; return EXIT_FAILURE; } // Now open version 2 (different encoding) std::ifstream inputFileStream( csfn2 ); if ( ! inputFileStream.is_open() ) { std::cerr << "Failed to open UTF-8 file: " << csfn2 << std::endl; return EXIT_FAILURE; } std::string ssecret; inputFileStream >> ssecret; inputFileStream.close(); if( ssecret != secret ) { std::cerr << "Found: " << ssecret << " should have been " << secret << std::endl; return EXIT_FAILURE; } if( !gdcm::System::RemoveFile(csfn1) ) { std::cerr << "Could not remove #1: " << csfn1 << std::endl; return EXIT_FAILURE; } // cannot remove twice the same file: if( gdcm::System::RemoveFile(csfn2) ) { std::cerr << "Could remove #2 a second time...seriously " << csfn2 << std::endl; return EXIT_FAILURE; } #endif } { //#define TESTLONGPATHNAMES #ifdef TESTLONGPATHNAMES //why are we testing this? This is the operating system's deal, not GDCM's. //GDCM is not responsible for long path names, and cannot fix this issue. //if we want to move this to a configuration option (ie, test for long pathnames), //then we can--otherwise, windows users should just beware of this issue. //This path limit has been the case since Windows 95, and is unlikely to change any time soon. // Apparently there is an issue with long pathanem i nWin32 system: // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath // The only way to work around the 260 byte limitation it appears as if we // have to deal with universal naming convention (UNC) path. const char subdir[] = "very/long/pathname/foobar/hello_world/toreproduceabugindpkg/pleaseconsider/" "very/long/pathname/foobar/hello_world/toreproduceabugindpkg/pleaseconsider/" "very/long/pathname/foobar/hello_world/toreproduceabugindpkg/pleaseconsider/" "very/long/pathname/foobar/hello_world/toreproduceabugindpkg/pleaseconsider/"; const char *directory_ = gdcm::Testing::GetTempDirectory(subdir); #ifdef _WIN32 gdcm::Filename mydir( directory_ ); std::string unc = "\\\\?\\";//on Windows, to use UNC, you need to: //a) append this string //b) use a network drive (ie, the gdcm file is made on a network drive) that //c) you have access to. //I don't think this is a good or useful test. mmr unc += mydir.ToWindowsSlashes(); const char *directory = unc.c_str(); #else const char *directory = directory_; #endif if( !gdcm::System::MakeDirectory(directory)) { std::cerr << "Failed to create directory with long path: " << directory << std::endl; return EXIT_FAILURE; } std::string sfn = gdcm::Testing::GetTempFilename( "dummy.dcm", subdir ); std::cerr << "Long path is: " << sfn.size() << std::endl; std::cerr << "Long path is: " << sfn << std::endl; if( sfn.size() > 260 ) { const char *fn = sfn.c_str(); // Should demontrate the issue std::ofstream outputFileStream( fn ); if ( ! outputFileStream.is_open() ) { std::cerr << "Failed to create file with long path: " << fn << std::endl; return EXIT_FAILURE; } outputFileStream.close(); if( !gdcm::System::FileExists(fn) ) { std::cerr << "File does not exist: " << fn << std::endl; return EXIT_FAILURE; } if( !gdcm::System::RemoveFile(fn) ) { std::cerr << "Could not remove: " << fn << std::endl; return EXIT_FAILURE; } } else { std::cerr << "seriously " << fn << std::endl; return EXIT_FAILURE; } #endif //TESTLONGPATHNAMES } return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestCommand.cxx000664 001766 001770 00000002020 14517730450 024660 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmCommand.h" #include "gdcmEvent.h" #include "gdcmSmartPointer.h" using gdcm::SmartPointer; struct Watcher {}; void foo(gdcm::Command *c) { c->Execute((gdcm::Subject*)nullptr, gdcm::AnyEvent() ); } int TestCommand(int , char *[]) { SmartPointer > mc = gdcm::MemberCommand::New(); foo(mc); SmartPointer > smc = gdcm::SimpleMemberCommand::New(); foo(smc); return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestByteSwap.cxx000664 001766 001770 00000007142 14517730450 025052 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTypes.h" #include "gdcmSwapCode.h" #include "gdcmByteSwap.h" #include // memcpy int myfunc() { char vl_str[4]; const char raw[] = "\000\000\000\004"; memcpy(vl_str, raw, 4); uint32_t vl; memcpy(&vl, vl_str, 4); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem(&vl, gdcm::SwapCode::BigEndian, 1); if( vl != 0x00000004 ) { std::cerr << std::hex << "vl: " << vl << std::endl; return 1; } gdcm::ByteSwap::SwapFromSwapCodeIntoSystem(vl, gdcm::SwapCode::LittleEndian); if( vl != 0x00000004 ) { std::cerr << std::hex << "vl: " << vl << std::endl; return 1; } gdcm::ByteSwap::SwapFromSwapCodeIntoSystem(vl, gdcm::SwapCode::BigEndian); if( vl != 0x4000000 ) { std::cerr << std::hex << "vl: " << vl << std::endl; return 1; } return 0; } int TestByteSwap(int , char *[]) { gdcm::SwapCode sc = gdcm::SwapCode::Unknown; if ( gdcm::ByteSwap::SystemIsBigEndian() ) { sc = gdcm::SwapCode::BigEndian; } else if ( gdcm::ByteSwap::SystemIsLittleEndian() ) { sc = gdcm::SwapCode::LittleEndian; } if( sc == gdcm::SwapCode::Unknown ) { std::cerr << "unk" << std::endl; return 1; } //std::cout << "sc: " << sc << std::endl; uint16_t t = 0x1234; gdcm::ByteSwap::SwapFromSwapCodeIntoSystem(t, sc); if( sc == gdcm::SwapCode::BigEndian ) { if( t != 0x3412 ) { std::cerr << std::hex << "t: " << t << std::endl; return 1; } // ok test pass rest value to old one t = 0x1234; } else if ( sc == gdcm::SwapCode::LittleEndian ) { if( t != 0x1234 ) { std::cerr << std::hex << "t: " << t << std::endl; return 1; } } union { char n[2]; uint16_t tn; } u16; memcpy(u16.n, &t, 2 ); gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem(&u16.tn, sc, 1); uint16_t tn = u16.tn; if( sc == gdcm::SwapCode::BigEndian ) { if( tn != 0x3412 ) { std::cerr << std::hex << "tn: " << tn << std::endl; return 1; } // ok test pass rest value to old one t = 0x1234; } else if ( sc == gdcm::SwapCode::LittleEndian ) { if( tn != 0x1234 ) { std::cerr << std::hex << "tn: " << tn << std::endl; return 1; } } gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem(&u16.tn, gdcm::SwapCode::BigEndian, 1); tn = u16.tn; if( sc == gdcm::SwapCode::LittleEndian ) { if( tn != 0x3412 ) { std::cerr << std::hex << "tn: " << tn << std::endl; return 1; } } else if ( sc == gdcm::SwapCode::BigEndian ) { if( tn != 0x1234 ) { std::cerr << std::hex << "tn: " << tn << std::endl; return 1; } } if( myfunc() ) { return 1; } uint16_t array[] = { 0x1234 }; gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem(array, gdcm::SwapCode::BigEndian,1); if ( array[0] != 0x3412 ) { std::cerr << std::hex << "array: " << array[0] << std::endl; return 1; } return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestFilenameGenerator.cxx000664 001766 001770 00000002043 14517730450 026676 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmFilenameGenerator.h" #include int TestFilenameGenerator(int , char *[]) { gdcm::FilenameGenerator fg; const char pattern[] = "/tmp/bla%01d"; const unsigned int nfiles = 11; fg.SetPattern( pattern ); fg.SetNumberOfFilenames( nfiles ); if( !fg.Generate() ) { std::cerr << "Could not generate" << std::endl; return 1; } for( unsigned int i = 0; i < nfiles; ++i ) { std::cout << fg.GetFilename( i ) << std::endl; } return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestCryptographicMessageSyntax.cxx000664 001766 001770 00000026741 14517730450 030654 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmCryptoFactory.h" #include #include #include #include #include "gdcmFilename.h" #include "gdcmTesting.h" static bool LoadFile(const char * filename, char* & buffer, size_t & bufLen) { FILE * f = fopen(filename, "rb"); if (f == nullptr) { //gdcmErrorMacro("Couldn't open the file: " << filename); return false; } fseek(f, 0L, SEEK_END); long sz = ftell(f); rewind(f); buffer = new char[sz]; bufLen = sz; while (sz) sz -= (long)fread(buffer + bufLen - sz, sizeof(char), sz, f); return true; } static const gdcm::CryptographicMessageSyntax::CipherTypes ciphers[] = { gdcm::CryptographicMessageSyntax::AES128_CIPHER, gdcm::CryptographicMessageSyntax::AES192_CIPHER, gdcm::CryptographicMessageSyntax::AES256_CIPHER, gdcm::CryptographicMessageSyntax::DES3_CIPHER }; static std::pair cip2str_data[] = { std::make_pair(gdcm::CryptographicMessageSyntax::AES128_CIPHER, "AES128"), std::make_pair(gdcm::CryptographicMessageSyntax::AES192_CIPHER, "AES192"), std::make_pair(gdcm::CryptographicMessageSyntax::AES256_CIPHER, "AES256"), std::make_pair(gdcm::CryptographicMessageSyntax::DES3_CIPHER, "3DES") }; static std::map cip2str(cip2str_data, cip2str_data + sizeof cip2str_data / sizeof cip2str_data[0]); const char * const tstr = "12345"; const size_t tstr_l = strlen(tstr); #define BUFSZ 5000 bool TestCMSProvider(gdcm::CryptographicMessageSyntax& cms, const char * provName) { const std::string certpath = gdcm::Filename::Join(gdcm::Testing::GetSourceDirectory(), "/Testing/Source/Data/certificate.pem" ); const std::string keypath = gdcm::Filename::Join(gdcm::Testing::GetSourceDirectory(), "/Testing/Source/Data/privatekey.pem" ); const std::string encrypted_vector = gdcm::Filename::Join(gdcm::Testing::GetSourceDirectory(), "/Testing/Source/Data/encrypted_text" ); bool ret = true; for (unsigned int i = 0; i < 4; i++) { char encout[BUFSZ] = {0}, decout[BUFSZ] = {0}; size_t encoutlen = BUFSZ, decoutlen = BUFSZ; cms.SetCipherType(ciphers[i]); bool encryptSuccess = cms.Encrypt(encout, encoutlen, tstr, tstr_l); if (!encryptSuccess) { std::cerr << provName << " using " << cip2str[ciphers[i]] << ": encryption failed" << std::endl; ret = false; continue; } bool decryptSuccess = cms.Decrypt(decout, decoutlen, encout, encoutlen); if (!decryptSuccess) { std::cerr << provName << " using " << cip2str[ciphers[i]] << ": decryption failed" << std::endl; ret = false; continue; } if (decoutlen != tstr_l) { std::cerr << provName << " using " << cip2str[ciphers[i]] << ": decryted length different from original (" << decoutlen << " != " << tstr_l << ")" << std::endl; ret = false; continue; } if (memcmp(tstr, decout, tstr_l) != 0) { std::cerr << provName << " using " << cip2str[ciphers[i]] << ": decryted data different from original" << std::endl; ret = false; continue; } } return ret; } bool TestCMSVector(gdcm::CryptographicMessageSyntax& cms, const char * provName) { char decout[BUFSZ] = {0}; size_t decoutlen = BUFSZ; std::string encrypted_filename = gdcm::Filename::Join(gdcm::Testing::GetSourceDirectory(), "/Testing/Source/Data/encrypted_text" ); const char * tv_plaintext = "1234567890abcdefghijklmnopqrstuvwxyz"; size_t tv_plaintext_len = strlen(tv_plaintext); char * test_vector; // FIXME : should I delete test_vector ? size_t tvlen; if (!LoadFile(encrypted_filename.c_str(), test_vector, tvlen)) { std::cerr << "Couldn't load encrypted file: " << encrypted_filename << std::endl; return false; } bool decryptSuccess = cms.Decrypt(decout, decoutlen, test_vector, tvlen); if (!decryptSuccess) { std::cerr << provName << " test vector decryption failed" << std::endl; return false; } if (decoutlen != tv_plaintext_len) { std::cerr << provName << " test vector decryted length different from original (" << decoutlen << " != " << tstr_l << ")" << std::endl; return false; } if (memcmp(tv_plaintext, decout, tv_plaintext_len) != 0) { std::cerr << provName << " test vector decryted data different from original" << std::endl; return false; } return true; } bool TestCMSCompatibility(gdcm::CryptographicMessageSyntax& cms1, const char * provName1, gdcm::CryptographicMessageSyntax& cms2, const char * provName2) { const std::string encrypted_vector = gdcm::Filename::Join(gdcm::Testing::GetSourceDirectory(), "/Testing/Source/Data/encrypted_text" ); bool ret = true; for (int i = 0; i < 4; i++) { char encout[BUFSZ] = {0}, decout[BUFSZ] = {0}; size_t encoutlen = BUFSZ, decoutlen = BUFSZ; cms1.SetCipherType(ciphers[i]); cms2.SetCipherType(ciphers[i]); bool encryptSuccess = cms1.Encrypt(encout, encoutlen, tstr, tstr_l); if (!encryptSuccess) { std::cerr << provName1 << " & " << provName2 << " using " << cip2str[ciphers[i]] << ": encryption failed" << std::endl; ret = false; break; } bool decryptSuccess = cms2.Decrypt(decout, decoutlen, encout, encoutlen); if (!decryptSuccess) { std::cerr << provName1 << " & " << provName2 << " using " << cip2str[ciphers[i]] << ": decryption failed" << std::endl; ret = false; break; } if (decoutlen != tstr_l) { std::cerr << provName1 << " & " << provName2 << " using " << cip2str[ciphers[i]] << ": decryted length different from original (" << decoutlen << " != " << tstr_l << ")" << std::endl; ret = false; break; } if (memcmp(tstr, decout, tstr_l) != 0) { std::cerr << provName1 << " & " << provName2 << " using " << cip2str[ciphers[i]] << ": decryted data different from original" << std::endl; ret = false; break; } } /* char encout[BUFSZ] = {0}, decout[BUFSZ] = {0}; size_t encoutlen = BUFSZ, decoutlen = BUFSZ; for (int i = 0; i < 4; i++) { bool ret = true; char encout[BUFSZ] = {0}, decout[BUFSZ] = {0}; size_t encoutlen = BUFSZ, decoutlen = BUFSZ; cms1.SetCipherType(ciphers[i]); cms2.SetCipherType(ciphers[i]); //cms2.Encrypt(encout, encoutlen, tstr, tstr_l); //cms1.Decrypt(decout, decoutlen, encout, encoutlen); //assert(decoutlen == tstr_l); //assert(memcmp(tstr, decout, tstr_l) == 0); bool encryptSuccess = cms1.Encrypt(encout, encoutlen, tstr, tstr_l); if (!encryptSuccess) { std::cerr << provName1 << " & " << provName2 << " using " << cip2str[ciphers[i]] << ": encryption failed" << std::endl; ret = false; break; } bool decryptSuccess = cms2.Decrypt(decout, decoutlen, encout, encoutlen); if (!decryptSuccess) { std::cerr << provName1 << " & " << provName2 << " using " << cip2str[ciphers[i]] << ": decryption failed" << std::endl; ret = false; break; } if (decoutlen != tstr_l) { std::cerr << provName1 << " & " << provName2 << " using " << cip2str[ciphers[i]] << ": decryted length different from original (" << decoutlen << " != " << tstr_l << ")" << std::endl; ret = false; break; } if (memcmp(tstr, decout, tstr_l) != 0) { std::cerr << provName1 << " & " << provName2 << " using " << cip2str[ciphers[i]] << ": decryted data different from original" << std::endl; ret = false; break; } }*/ return ret; } int TestCryptographicMessageSyntax(int, char *[]) { std::string certpath = gdcm::Filename::Join(gdcm::Testing::GetSourceDirectory(), "/Testing/Source/Data/certificate.pem" ); std::string keypath = gdcm::Filename::Join(gdcm::Testing::GetSourceDirectory(), "/Testing/Source/Data/privatekey.pem" ); bool bret = true; //typedef std::tuple StringCMSPairType; std::vector availableCMS; std::vector availableCMSName; #ifdef GDCM_USE_SYSTEM_OPENSSL gdcm::CryptoFactory* osslp7 = gdcm::CryptoFactory::GetFactoryInstance(gdcm::CryptoFactory::OPENSSLP7); std::unique_ptr ocmsp7(osslp7->CreateCMSProvider()); ocmsp7->ParseKeyFile(keypath.c_str()); ocmsp7->ParseCertificateFile(certpath.c_str()); bret = TestCMSProvider(*ocmsp7, "OpenSSL PKCS7") && bret; bret = TestCMSVector(*ocmsp7, "OpenSSL PKCS7") && bret; availableCMS.push_back(ocmsp7.get()); availableCMSName.push_back("OpenSSL PKCS7"); #endif #ifdef GDCM_USE_SYSTEM_OPENSSL #ifdef GDCM_HAVE_CMS_RECIPIENT_PASSWORD gdcm::CryptoFactory* ossl = gdcm::CryptoFactory::GetFactoryInstance(gdcm::CryptoFactory::OPENSSL); std::unique_ptr ocms(ossl->CreateCMSProvider()); ocms->ParseKeyFile(keypath.c_str()); ocms->ParseCertificateFile(certpath.c_str()); bret = TestCMSProvider(*ocms, "OpenSSL CMS") && bret; bret = TestCMSVector(*ocms, "OpenSSL CMS") && bret; availableCMS.push_back(ocms.get()); availableCMSName.push_back("OpenSSL CMS"); #endif #endif #ifdef WIN32 gdcm::CryptoFactory* capi = gdcm::CryptoFactory::GetFactoryInstance(gdcm::CryptoFactory::CAPI); std::unique_ptr ccms(capi->CreateCMSProvider()); ccms->ParseCertificateFile(certpath.c_str()); ccms->ParseKeyFile(keypath.c_str()); bret = TestCMSProvider(*ccms, "CAPI") && bret; bret = TestCMSVector(*ccms, "CAPI") && bret; availableCMS.push_back(ccms.get()); availableCMSName.push_back("CAPI"); #endif for (size_t i = 0; i < availableCMS.size(); ++i) for (size_t j = i+1; j < availableCMS.size(); ++j) bret = TestCMSCompatibility(*availableCMS[i], availableCMSName[i].c_str(), *availableCMS[j], availableCMSName[j].c_str()) && bret; return (bret ? 0 : 1); } int TestPasswordBasedEncryption(int, char *[]) { const char *directory = gdcm::Testing::GetDataRoot(); std::string encrypted_dicomdir = gdcm::Filename::Join(directory, "/securedicomfileset/DICOMDIR" ); std::string encrypted_image = gdcm::Filename::Join(directory, "/securedicomfileset/IMAGES/IMAGE1" ); #ifdef GDCM_USE_SYSTEM_OPENSSL gdcm::CryptoFactory* ossl = gdcm::CryptoFactory::GetFactoryInstance(gdcm::CryptoFactory::OPENSSL); std::unique_ptr ocms(ossl->CreateCMSProvider()); ocms->SetPassword("password", strlen("password")); if (!TestCMSProvider(*ocms, "OpenSSL")) return 1; char decout[BUFSZ] = {0}; size_t decoutlen = BUFSZ; char * ddir = new char[5000]; size_t ddirlen = 5000; LoadFile(encrypted_dicomdir.c_str(), ddir, ddirlen); bool decryptSuccess = ocms->Decrypt(decout, decoutlen, ddir, ddirlen); if (!decryptSuccess) { std::cerr << "OpenSSL sample DICOMDIR decryption failed" << std::endl; return 1; } if (decoutlen == 0) { std::cerr << "OpenSSL sample DICOMDIR decrypted length == 0" << std::endl; return 1; } #endif return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestTesting.cxx000664 001766 001770 00000002501 14517730450 024723 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTesting.h" #include "gdcmSystem.h" int TestTesting(int , char *[]) { gdcm::Testing testing; testing.Print( std::cout ); const char *f = gdcm::Testing::GetFileName( 100000 ); if( f ) return 1; std::cout << "Num:" << gdcm::Testing::GetNumberOfFileNames() << std::endl; const char * const * md5 = gdcm::Testing::GetMD5DataImage( 100000 ); if( !md5 ) return 1; if( md5[0] || md5[1] ) return 1; const char * const *null = gdcm::Testing::GetMD5DataImage(1000000000u); if( null[0] != nullptr || null[1] != nullptr ) { return 1; } const char *tmp = gdcm::Testing::GetTempDirectory(); if( !gdcm::System::FileExists(tmp) ) { return 1; } if( !gdcm::System::FileIsDirectory(tmp) ) { return 1; } return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestSHA1.cxx000664 001766 001770 00000051246 14517730450 024014 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSHA1.h" #include "gdcmFilename.h" #include "gdcmTrace.h" #include "gdcmTesting.h" #include #include // strcmp static const char * const gdcmSHA1SumFiles[][2] = { { "265465a2e3b204ab9a094f2de56bbec96d55ab74" , "00191113.dcm" }, { "ab316e51539a56053e216017c8445a246a978590" , "012345.002.050.dcm" }, { "750ff7a9df7a12c13f7149c514664db7c68c3125" , "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm" }, { "4efeffa6a7b535df85dda198a26e074866b0ed88" , "05148044-mr-siemens-avanto-syngo.dcm" }, { "9d1e3fdf69f8d5b46105e4c259b3d84e7f281a45" , "3E768EB7.dcm" }, { "f08ff36b45cd50d4349f4c6c17a75b3f653bb11e" , "ACUSON-24-YBR_FULL-RLE-b.dcm" }, { "dac2ffa6ccf59f2d91e78f632e45b08d1537715c" , "ACUSON-24-YBR_FULL-RLE.dcm" }, { "cf749c5323866c343255805cf781ae87e6bb598a" , "ALOKA_SSD-8-MONO2-RLE-SQ.dcm" }, { "7202bfac6d4196aeb2655e879bc91e4dcf40a463" , "BugGDCM2_UndefItemWrongVL.dcm" }, { "1d227106140c2a24dbe8c6becd4649761dd117a2" , "CR-MONO1-10-chest.dcm" }, { "74e7de8b0f5903b8571294e2d8f960dc7329a0ca" , "CT_16b_signed-UsedBits13.dcm" }, { "c0e08333984692bcef149c946e23bb46e01b9b7c" , "CT-MONO2-12-lomb-an2.acr" }, { "594ce3215ca94f640fd7502d614651cc755a9d7e" , "CT-MONO2-16-ankle.dcm" }, { "ce0bd0c9635db3f04b4996648c1d41e10daffa77" , "CT-MONO2-16-brain.dcm" }, { "f9ad8311fa69835c55314e740ca55ab71e038c17" , "CT-MONO2-16-chest.dcm" }, { "507fdef01d9357dfb99981ae6c18ab88931271b5" , "CT-MONO2-16-ort.dcm" }, { "ad5c2b6d0816761d5f5dc1fcc83e44f3eea4666d" , "CT-MONO2-8-abdo.dcm" }, { "76e6ae295b326a46d37f1ad5056ee18b6ee3d6f2" , "CT-SIEMENS-Icone-With-PaletteColor.dcm" }, { "7bce2465ca918a5d2a9b8f9c6a9cce1b6b94b44b" , "CT-SIEMENS-MissingPixelDataInIconSQ.dcm" }, { "1b75f84318351449b5d841d094297d7975e8ac5b" , "D_CLUNIE_CT1_J2KI.dcm" }, { "1d40f08bf78a29e0729742ff5f5731477ab5a9ff" , "D_CLUNIE_CT1_J2KR.dcm" }, { "6f6027b38ec184af8cdf31077cd669bd35270ccb" , "D_CLUNIE_CT1_JPLL.dcm" }, { "3df887253b24f3296f078fc618e6a682cae4c1d6" , "D_CLUNIE_CT1_RLE.dcm" }, { "5336a791f09fe080688b5c1fad04691b39588978" , "D_CLUNIE_CT2_JPLL.dcm" }, { "37beaf412c74e435cfdf351cc95f02b62820e3ea" , "D_CLUNIE_CT2_RLE.dcm" }, { "fa118c4661e14878a9113032b6549dc7666b773b" , "D_CLUNIE_MR1_JPLL.dcm" }, { "f464c45fceb6f5dc234150064c1b7999cd0db2ff" , "D_CLUNIE_MR1_JPLY.dcm" }, { "4f6a484fd77238f8bc245fbfadc449cb3ec40a75" , "D_CLUNIE_MR1_RLE.dcm" }, { "111bed6926dbf4ad3f61bd9c95e36095475265a1" , "D_CLUNIE_MR2_JPLL.dcm" }, { "eec3ed081ec196e036d2cac9e0043bef1038665e" , "D_CLUNIE_MR2_JPLY.dcm" }, { "c2ab10273241fe18401f4584a42c76c5257219f0" , "D_CLUNIE_MR2_RLE.dcm" }, { "fb04e8143117a8ecdd9cece68c08d4ee3b3ed040" , "D_CLUNIE_MR3_JPLL.dcm" }, { "ef2d3fe28424e42963ca52f097b3d1309c95f43d" , "D_CLUNIE_MR3_JPLY.dcm" }, { "08dd62d2f452e145dea7905b64e43836504c8a2e" , "D_CLUNIE_MR3_RLE.dcm" }, { "e2fa66c4074e9f75b582eb6cf5261a6ac064c5cb" , "D_CLUNIE_MR4_JPLL.dcm" }, { "7426ae6aa6cb2f13138878a68183d69ed8d42b1e" , "D_CLUNIE_MR4_JPLY.dcm" }, { "2cf735f7ced248c20d4bd8af760523e8b1c88c44" , "D_CLUNIE_MR4_RLE.dcm" }, { "f0632988a652cf186a2c1199bb19389534617952" , "D_CLUNIE_NM1_JPLL.dcm" }, { "8e4a062c60bda83a7a118b505f9da29454eb77e1" , "D_CLUNIE_NM1_JPLY.dcm" }, { "0933067b799d0b4407e190e0b3a58f0e97c92371" , "D_CLUNIE_NM1_RLE.dcm" }, { "c72d14184a995b367682f42c3e3b62de7a5b4c7e" , "D_CLUNIE_RG1_JPLL.dcm" }, { "b71f33df55502266ca2f4966cd5fc88b2b766385" , "D_CLUNIE_RG1_RLE.dcm" }, { "8c337359cca8d2bf1002209589ff19699e530908" , "D_CLUNIE_RG2_JPLL.dcm" }, { "c6188f2ae06a55d596d4d6b4d914b404f7bf5786" , "D_CLUNIE_RG2_JPLY.dcm" }, { "5035a6298cf8590932605cb4bb10f128df971fcb" , "D_CLUNIE_RG2_RLE.dcm" }, { "d2a56de2e035095c3dea9be80878f9607c63728d" , "D_CLUNIE_RG3_JPLL.dcm" }, { "c90b8543259ca7189fa76201f864c2f32e6ebef3" , "D_CLUNIE_RG3_JPLY.dcm" }, { "eb417a88c6b3fe6c5768ab705990fc0d54558816" , "D_CLUNIE_RG3_RLE.dcm" }, { "8e27c853a156038e1f6daebb04f2c9059ebfbd82" , "D_CLUNIE_SC1_JPLY.dcm" }, { "6a6ca811ae87ae1ca4549f49724b58562eea714b" , "D_CLUNIE_SC1_RLE.dcm" }, { "94737b44e512c8b84e1fb880e04b0ae6f069bd96" , "D_CLUNIE_US1_RLE.dcm" }, { "6cc2ad34df402a9aa5c6a2c5436ff0e775a59768" , "D_CLUNIE_VL1_RLE.dcm" }, { "4432f4bba584c5bf93264050a0aef0237c8cc9a5" , "D_CLUNIE_VL2_RLE.dcm" }, { "c11e1487e94b332f32c041d7e8889d1fe91c2db6" , "D_CLUNIE_VL3_RLE.dcm" }, { "345bde73f67171cc6f90cd890d67108aa6039656" , "D_CLUNIE_VL4_RLE.dcm" }, { "e52694c1e9be0f4d1c44eab3ac44aa4225b593b0" , "D_CLUNIE_VL6_RLE.dcm" }, { "37bf802b1918f36fcf7c6fb89b40ee1da1124419" , "D_CLUNIE_XA1_JPLL.dcm" }, { "ff7b9c99731732b55bcff577037542689efe9c72" , "D_CLUNIE_XA1_JPLY.dcm" }, { "f384b5f1ae912d97e7784558d5519dc74b853f10" , "D_CLUNIE_XA1_RLE.dcm" }, { "cc3641d1f25549a0ee06d2a5e87081cf6c407bf0" , "D_CLUNIE_CT1_JLSL.dcm" }, { "ac9f4592e6cfad438de5c928b9e01591006683d8" , "D_CLUNIE_CT1_JLSN.dcm" }, { "cc72ee9f3e671321e231103eb562063078b67bf8" , "DCMTK_JPEGExt_12Bits.dcm" }, { "fb9da9ae84e5da97c992398ac0222fffafa028f6" , "DermaColorLossLess.dcm" }, { "6f53ebd046c0c39ad04b7aa3767ced2647b02c83" , "DICOMDIR" }, { "436f0de1319089bc203b699a6e64687a9b27fd8c" , "dicomdir_Acusson_WithPrivate_WithSR" }, { "3c73737e44852b9f30cc4fe4e8cc600cdf63ee0a" , "DICOMDIR_MR_B_VA12A" }, { "86687243468f6e8243081adbff3374c8fbeb1166" , "DICOMDIR-Philips-EasyVision-4200-Entries" }, { "623523dedebccddb38ab6fbb76e01c1458bd0d98" , "dicomdir_Pms_With_heavy_embedded_sequence" }, { "0c0c0b72d980a6675897fc50854c98176582e7d5" , "dicomdir_Pms_WithVisit_WithPrivate_WithStudyComponents" }, { "9a90f8c949d99f9e9e7523f442b8995bb2b2ae3d" , "dicomdir_With_embedded_icons" }, { "eb0b632f7feccde2b7d88d6a82f51857ef5de521" , "DMCPACS_ExplicitImplicit_BogusIOP.dcm" }, { "abb8fb269447e046fe10306e4e5f54fe988a0069" , "DX_GE_FALCON_SNOWY-VOI.dcm" }, { "861ff0760754f6ebb0056f52adcdcd60f0cd3bfa" , "DX_J2K_0Padding.dcm" }, { "8275a7e217807273fb0027a64f46cba8656f699a" , "ELSCINT1_JP2vsJ2K.dcm" }, { "399e80d60843e62b817322ba9e82278258f9a222" , "ELSCINT1_LOSSLESS_RICE.dcm" }, { "3598e59bf8ff6cb5217473f9f23ad763638a27e0" , "ELSCINT1_PMSCT_RLE1.dcm" }, { "3514c92127b0c78b63efce1fb6053e202da86d3f" , "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm" }, { "cc80ee94edf9b3d7fd4c1402b2c6ae99eb832685" , "fffc0000UN.dcm" }, { "374bf25ac4279a7458d848b595b23ed50580400b" , "FUJI-10-MONO1-ACR_NEMA_2.dcm" }, { "ada05095c6d64767af77eafeb2e6fc305f2ba2c8" , "gdcm-ACR-LibIDO.acr" }, { "f2d333278c7ebb985916011ecb808342205b9815" , "gdcm-CR-DCMTK-16-NonSamplePerPix.dcm" }, { "09f0d023545047704beb2fa8168bd7fadca845e2" , "gdcm-JPEG-Extended.dcm" }, { "70da750cb898c6510ba079a1e71b4869faf66dd7" , "gdcm-JPEG-LossLess3a.dcm" }, { "736c14572e7ee964d24b2b5c5b2a607ca50ebc05" , "gdcm-JPEG-LossLessThoravision.dcm" }, { "765541a6e32671891fc0787e69c4917c7166a77a" , "gdcm-MR-PHILIPS-16-Multi-Seq.dcm" }, { "b7d171ebfcb288ec44647f3000515f3683dfef50" , "gdcm-MR-PHILIPS-16-NonSquarePixels.dcm" }, { "6f1e68d6a8586862c31ac7d7a2d2c8d317865263" , "gdcm-MR-SIEMENS-16-2.acr" }, { "a525344659d1767787c6929bb2b080286106e881" , "gdcm-US-ALOKA-16.dcm" }, { "5b8c8d45b6c06f5d2fb90df6205606accfedfc6c" , "GE_CT_With_Private_compressed-icon.dcm" }, { "58c81390cbb3a033c0f1fe15760bd14d87ca8313" , "GE_DLX-8-MONO2-Multiframe.dcm" }, { "53b514276db021a5a8e26cddd3f09c43dad49747" , "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm" }, { "86ae2ce4b9676110db10ebc6aaba1d49bfa26537" , "GE_DLX-8-MONO2-PrivateSyntax.dcm" }, { "34a42605c83313dbd6d0af4670c2dfabaf270319" , "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm" }, { "a3f130a256fea9804cc2b9e05dedb4b3af517421" , "GE_GENESIS-16-MONO2-WrongLengthItem.dcm" }, { "da85472c37599dc02c83f2e4c24e3fd5a2617f92" , "GE_LOGIQBook-8-RGB-HugePreview.dcm" }, { "a47f7d0d1d40c213666ccc67d3ce83464a5fa9b8" , "GE_MR_0025xx1bProtocolDataBlock.dcm" }, { "36bcff2d268dbf8e92b296a9cd0894f5b4dcb5ed" , "GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm" }, { "f84803d8879bc0a461f03c39ec896704796d8376" , "IM-0001-0066.dcm" }, { "fb563954a0b3e8f521248cfac294233e85c517c9" , "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm" }, { "5a21779c6db335b0f6a989c292b66e2d1939aaae" , "JDDICOM_Sample2.dcm" }, { "9f2559b3e74c09e04c1ccca0424f6bbb3480fe9e" , "JDDICOM_Sample2-dcmdjpeg.dcm" }, { "9af362dd8ba13c358b869ebaf9c70dd2c34a9b49" , "JPEG_LossyYBR.dcm" }, { "e99bd082c18b4f0a150737d5f1a18e00c6bb73d8" , "KODAK-12-MONO1-Odd_Terminated_Sequence.dcm" }, { "12fc320b12b35822da90155a2b92586f8ff4adf0" , "KODAK_CompressedIcon.dcm" }, { "3e554827c2110cd94ab29f65ea4bb8155ae11be8" , "LEADTOOLS_FLOWERS-16-MONO2-JpegLossless.dcm" }, { "1b8c958f48da2aaa1bbc085aec4410f5c2545875" , "LEADTOOLS_FLOWERS-16-MONO2-RLE.dcm" }, { "7be91a03cca70febe383fd4df821f5475cc02c8d" , "LEADTOOLS_FLOWERS-16-MONO2-Uncompressed.dcm" }, { "f6046930f93017ac0586f389d2f69cc47d139615" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossless.dcm" }, { "7de6449beccbeda52d95b027d24448abad1194bc" , "LEADTOOLS_FLOWERS-24-RGB-JpegLossy.dcm" }, { "6a8f88021d04488bf1d8f5160b49bc9245a5da2c" , "LEADTOOLS_FLOWERS-24-RGB-Uncompressed.dcm" }, { "d5b043ad7c367c4ac5156c8137125d481201f8b6" , "LEADTOOLS_FLOWERS-8-MONO2-JpegLossy.dcm" }, { "3f3d48adcbbe43cd88ec4dd38c0eabac1518cbb1" , "LEADTOOLS_FLOWERS-8-MONO2-RLE.dcm" }, { "a6e1d158e76362545a32d90adfdbc06d0a795aa8" , "LEADTOOLS_FLOWERS-8-MONO2-Uncompressed.dcm" }, { "53e1a8442e52b8e7fb0024f38a3ba47cd1557af4" , "LEADTOOLS_FLOWERS-8-PAL-RLE.dcm" }, { "f1cf42d9fbd847f7bebaa2b2e05ad669401bceeb" , "LEADTOOLS_FLOWERS-8-PAL-Uncompressed.dcm" }, { "5c768b7fa2940546d9f3c49e76d8734ebae41b9b" , "libido1.0-vol.acr" }, { "fe7170c9acf67f99977f12ab41429e082bca4440" , "LIBIDO-16-ACR_NEMA-Volume.dcm" }, { "4d3d23112591bcbbf130e2d83768c59af69c6740" , "LIBIDO-24-ACR_NEMA-Rectangle.dcm" }, { "971bf05ef2a29cdddfb28279b73444fd5dedb046" , "LIBIDO-8-ACR_NEMA-Lena_128_128.acr" }, { "f6cf7fb8470a33f82beef9dcf55b7379464db068" , "LJPEG_BuginGDCM12.dcm" }, { "483032c54da529824e6d1f587dba9a9c5c6f4888" , "MARCONI_MxTWin-12-MONO2-JpegLossless-ZeroLengthSQ.dcm" }, { "9033fd528b9008273cbb277f0adb21abe8a1d35a" , "MAROTECH_CT_JP2Lossy.dcm" }, { "88534f6f5c247a198b860108c4d3a5b5f7fb7048" , "MR-Brucker-CineTagging-NonSquarePixels.dcm" }, { "73817e417b440a961dfcc273eeae6007fc004f61" , "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm" }, { "2f210cc06d8e05b762b8fd996ac730f2442b258a" , "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm" }, { "73eae004f6305c3ef10f710dd51ef750b7ced8ab" , "MR-MONO2-12-an2.acr" }, { "80cb279b9cfe4cd5f8209dc1fd81a0de789fb561" , "MR-MONO2-12-angio-an1.acr" }, { "30a35164282f20ffc38eeb4d0a94b74159f72a38" , "MR-MONO2-12-shoulder.dcm" }, { "c6376ebdfda8ca05bb3d2f2796b2f4ce4cf5417a" , "MR-MONO2-16-head.dcm" }, { "e4b6f0ea147335d048ef1cf271f1f8ea9b3a947a" , "MR-MONO2-8-16x-heart.dcm" }, { "482282eab5270a9b49da1fe52955029c90665318" , "MR_Philips-Intera_BreaksNOSHADOW.dcm" }, { "0edaefb39107ede69cbfef9fa5d646734859560a" , "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm" }, { "002496c378b8d74cde8034c8e64ac06278aaac64" , "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm" }, { "7b32e317ab15df08cbc22e5c71c19be0236c4a71" , "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm" }, { "d201a0399638b90dab2d147e8505b12dc3f22abf" , "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm" }, { "f86689b7eacfa0c477168f6d95e5f554ba9db2f6" , "MR-SIEMENS-DICOM-WithOverlays.dcm" }, { "4ca412d03202693ea4dbe5189681afb25341e7d7" , "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm" }, { "ddc7ed9fc533413dec8795c35c0dc45485a64422" , "MR_SIEMENS_forceLoad29-1010_29-1020.dcm" }, { "af658128f2acfb72b95892435a34d983194adb85" , "MR_Spectroscopy_SIEMENS_OF.dcm" }, { "a28aa38246dbce06692f5a977ca320cf26bb9260" , "NM-MONO2-16-13x-heart.dcm" }, { "5ca8093b12ff8c78875af95091a96965a94acb19" , "OT-MONO2-8-a7.dcm" }, { "9bf3ca1db0420baede3c257e9c102fe5d27a0554" , "OT-PAL-8-face.dcm" }, { "38a8505e4a5f4119c76636e6eaf754edff1e8122" , "PET-cardio-Multiframe-Papyrus.dcm" }, { "a011aaddce1295f42d9d8fbd14b1558ed04b0b6c" , "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm" }, { "cd88e741f78d2267a7c8a83a0fb4b009fce706f8" , "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" }, { "05fe55371a99bd6e233b4605eef8b47d5d21f243" , "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm" }, { "09a07901bb4b6ca120648c3fa478a4172811b4db" , "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm" }, { "d4a5ce137aac5d979a68b5a62593cf99096a485d" , "PHILIPS_Intera-16-MONO2-Uncompress.dcm" }, { "f64181bf0abfacf2853ce3eeb60149f2c3cf7507" , "PICKER-16-MONO2-Nested_icon.dcm" }, { "aef5bc2a2132e2c11a4f8fc5e1dd7655300d0c1f" , "PICKER-16-MONO2-No_DicomV3_Preamble.dcm" }, { "0fc0e0168128517472e3a4a69808331aaffe4bb5" , "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm" }, { "38e925d7c30ef5b0cf829ea520e271482ea89c7d" , "RadBWLossLess.dcm" }, { "7a57d75599fd8521210835f6506dd77204f16883" , "rle16loo.dcm" }, { "77d3e4e78f0452f4ebb0855fa367e19044014244" , "rle16sti.dcm" }, { "3d9e8bf00e3509fc7210a8a67c3d15622c03b15e" , "SIEMENS-12-Jpeg_Process_2_4-Lossy-a.dcm" }, { "292433a76c4ef0a8341c76b23d030950fbe7865a" , "SIEMENS_CSA2.dcm" }, { "b67eecea6c2099fa0bb0d558ad2fb281e0c14811" , "SIEMENS_GBS_III-16-ACR_NEMA_1.acr" }, { "89c6d755e1f183b18c3711ccce0bdb243d11f05c" , "SIEMENS_GBS_III-16-ACR_NEMA_1-ULis2Bytes.dcm" }, { "521b21eb0b5ec9ebb77de6d7730971a3d5ce5542" , "SIEMENS_ImageLocationUN.dcm" }, { "6f1e68d6a8586862c31ac7d7a2d2c8d317865263" , "SIEMENS_MAGNETOM-12-ACR_NEMA_2-Modern.dcm" }, { "32da5e531a2df100b4a6bc5334c0128a7603c62f" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm" }, { "f7cf7f2d62113863f76580bac6a0465638ebd050" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq1.dcm" }, { "8708d74b623b3317631a982b9c316c8521c1b220" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq2.dcm" }, { "461959350160a422e7806a9e8201146b29a3a21f" , "SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm" }, { "e5152fe2ada738f5b0c86af0858dc6d6b3ed9520" , "SIEMENS_MAGNETOM-12-MONO2-GDCM12-VRUN.dcm" }, { "bcba71eae5a0e3e43d836c410118e5992f6a6fb7" , "SIEMENS_MAGNETOM-12-MONO2-Uncompressed.dcm" }, { "38284e6f4591418be8a572aaa190a86b9487ed6f" , "SIEMENS_MAGNETOM-12-MONO2-VRUN.dcm" }, { "61b1b8768cde82a51fa8f5238713d65f16aeff68" , "SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm" }, { "a3646e926f9b8dd6a536b95ab8a86ee35f74f612" , "SIEMENS-MR-RGB-16Bits.dcm" }, { "542213ababb9f3410be5516d28adece7ca9aa4ad" , "SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs.acr" }, { "6d08c8b6f34de509166fa4d1e456e12861ab86e7" , "SIEMENS_Sonata-12-MONO2-SQ.dcm" }, { "4204cf122c096365f7fa14009a4dd62c49e9e5cf" , "SIEMENS_Sonata-16-MONO2-Value_Multiplicity.dcm" }, { "cd2c42d837702aab1f85de4dc000962dda1fe2f7" , "SignedShortLosslessBug.dcm" }, { "d6e3e55033bd06e8b3e67ef83168d7425cf63c2f" , "simpleImageWithIcon.dcm" }, { "55d4b449f51012c6bcad025a99eea672ba880a60" , "test.acr" }, { "918939283378898524dfa449fd9c9bc12b6dd189" , "TG18-CH-2k-01.dcm" }, { "d70be071b03866d8b561588588b9541ad4c370d7" , "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm" }, { "1f06affc50bfd1382efbf1960f5c601f79db841d" , "TheralysGDCM120Bug.dcm" }, { "16d9e8000e9b19dd3bdb36b3a829780aa43c8b74" , "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm" }, { "f188be58d7378e0949b0ee21ef72906ec1c7e236" , "undefined_length_un_vr.dcm" }, { "acf081a99759cef05711ec51d5da9e910396024d" , "US-GE-4AICL142.dcm" }, { "7330de615594148320e2f48a6aecb2e65607fa31" , "US-IRAD-NoPreambleStartWith0003.dcm" }, { "3ffd40a0aba42431d2b2deeed07013e66afb0328" , "US-IRAD-NoPreambleStartWith0005.dcm" }, { "035d7791c0fce801078854697fef86292a97eef1" , "US-MONO2-8-8x-execho.dcm" }, { "8e9ef1a7516ab9bc0fbe894e25c28c7d15dd848d" , "US-PAL-8-10x-echo.dcm" }, { "b401f77c8c78a82422baad6f6d42dcc275b7f0e0" , "US-RGB-8-epicard.dcm" }, { "f4368f3e10ebbd70fbe00c3d4b29d30df3adee85" , "US-RGB-8-esopecho.dcm" }, { "750f15609a6f442c0517173138e404894849b374" , "XA-MONO2-8-12x-catheter.dcm" }, { "cdc423e6abfb6fd678a3e65675cd5ce42f304b0d" , "PHILIPS_GDCM12xBug2.dcm" }, { "916938d82884fcb77a54dade49481e15049e50b6" , "PHILIPS_GDCM12xBug.dcm" }, { "0f058542379c201e26ef233a4b116862283bc81e" , "AMIInvalidPrivateDefinedLengthSQasUN.dcm" }, { "ec4a0d2ff24e9c2f3281b75c479914aff3215fb7" , "OsirixFake16BitsStoredFakeSpacing.dcm" }, { "27277c296a9703f22b2ef033ec326dd22b4bacc9" , "MR16BitsAllocated_8BitsStored.dcm" }, { "6260235b715af050f47494e098fcaa2ada3a11a5" , "JPEGDefinedLengthSequenceOfFragments.dcm" }, { "b1977dfddff0d88742bc6f6368d56eb9d3325dd9" , "IM-0001-0066.CommandTag00.dcm" }, { "f9d31313e26c335d26e4fd9126d88f1467425117" , "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" }, { "ac491044a7c69d3a365f31f163db3a4bf1085afa" , "GDCMJ2K_TextGBR.dcm" }, { "ed38be73d76c7a326012f86034c7472aa02d83ee" , "NM_Kakadu44_SOTmarkerincons.dcm" }, { "c06aae794ed5690ae82237f4f153ca7795ddd5b7" , "PhilipsInteraSeqTermInvLen.dcm" }, { "c14634b31dc52e4ed2b0c626aa61af4de207f6e4" , "TOSHIBA_J2K_SIZ1_PixRep0.dcm" }, { "bf68f33e0922508d6075f0893298d339d817aa86" , "TOSHIBA_J2K_OpenJPEGv2Regression.dcm" }, { "6d21ac7b5b4ad32b7d91750a70b574a732b679a7" , "TOSHIBA_J2K_SIZ0_PixRep1.dcm" }, { "3bfbd040e8b9a98b294e95cb6f3c06b2a5d8b008" , "NM-PAL-16-PixRep1.dcm" }, { "156463350047cada3ec091396695d3f3ef660c9a" , "MEDILABInvalidCP246_EVRLESQasUN.dcm" }, { "9775e8206011b9d5cedfcba16946060cb047f826" , "JPEGInvalidSecondFrag.dcm" }, { "d17a34f8ae066048442ab5b110d43c412472ea7e" , "SC16BitsAllocated_8BitsStoredJ2K.dcm" }, { "71517fce6c32625f1051b72085cfceeee58bd164" , "SC16BitsAllocated_8BitsStoredJPEG.dcm" }, { "0d19e4a98265afc3c782db02bc64bd32124ed2f6" , "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" }, { "5cb6c554e80b552ea68cad05409dce4fe92b6dd7" , "IllegalGroup2ImplicitTS.dcm" }, { "031f8cb2cbbe7b5e524b1f79aef6674a66e7f390" , "JPEGLosslessYBR_FULL_422.dcm" }, { "4710e6cfd86c0d349c61b60ae69a684b246db3ff" , "JPEGNote_bogus.dcm" }, { "197e47b5afeeeb75eccafe04e5a1bb0af1a7957a" , "JPEGNote_empty.dcm" }, { "08828e913a7a1ebbc0129c42974b64ce702814b6" , "JPEGNote_missing.dcm" }, { "99c169688190a66100b61319eaeefb3db1936125" , "RLEDebianBug816607Orig.dcm" }, { "f18f91631b59f0242b5daca547878e4c5cbf6a5b" , "GE_MR_0025xx1bProtocolDataBlockXML.dcm" }, { "8c46efd571b33264d7c0bed14fb6dd0282330b92" , "JPEGLS_CharLS_10742.dcm" }, { "f52cac75e6371a8a9b70b2146811b52593cef774" , "EmptyIcon_Bug417.dcm" }, { "fbca7c76d8c290d6a07aff378526463185b391d0" , "EnhancedWithIPPPerFrameIOPShared.dcm" }, { "566387063a28df033d891ac48a42dbb3f6b6a65f" , "FUJI-ffff-MONO1-J2K.dcm" }, { "cb4be6eb5b38940067a1b74ca0360bbb8c66c449" , "JPEGLosslessSeNonZero.dcm" }, { "53137beb3f73345771ff853d670addd81e58906e" , "US-YBR_FULL_422-EVRLE.dcm" }, { "78088c2bfe34911c46476f5fd110c9e0d9813044" , "Osirix10vs8BitsStored.dcm" }, { "31f0556c75829dee3850414e166863220f9e03da" , "Bug_Siemens_PrivateIconNoItem.dcm" }, { "129b3cebd15fd1edb55c8fae75976501f2601dce" , "HardcopyColor_YBR_RCT_J2K_PC1.dcm" }, { "2ac195a776c8cb9f0e6eb2e297bd2bf37bb11697" , "PET-GE-dicomwrite-PixelDataSQUNv2.dcm" }, { "18463186d3612a04a4338c12c7ac83da69ffaa49" , "MEDILABValidCP246_EVRLESQasOB.dcm" }, { NULL, NULL} }; int TestSHA1Func(const char* filename, const char *sha1ref, bool verbose = false) { if( !filename || !sha1ref) return 1; if( verbose ) std::cout << "TestRead: " << filename << std::endl; const char *dataroot = gdcm::Testing::GetDataRoot(); std::string path = dataroot; path += "/"; path += filename; path = filename; char sha1[2*20+1] = {}; bool b = gdcm::SHA1::ComputeFile( path.c_str(), sha1 ); if( !b ) { std::cerr << "Fail ComputeFile: " << path << std::endl; return 1; } if( strcmp( sha1, sha1ref) != 0 ) { std::cout << "Problem with: " << path << std::endl; std::cout << "Ref: " << sha1ref << " vs " << sha1 << std::endl; return 1; } return 0; } static const char *GetSHA1Sum(const char *filename) { typedef const char * const (*sha1pair)[2]; const char *sha1filename; sha1pair sha1filenames = gdcmSHA1SumFiles; int i = 0; while( ( sha1filename = sha1filenames[i][1] ) ) { gdcm::Filename fn( filename ); if( strcmp( sha1filename, fn.GetName() ) == 0 ) { return sha1filenames[i][0]; } ++i; } std::cerr << "Missing SHA1 for: " << filename << std::endl; return 0; } int TestSHA1(int argc, char *argv[]) { if( argc == 2 ) { const char *filename = argv[1]; const char *sha1 = GetSHA1Sum( filename ); return TestSHA1Func(filename, sha1, true); } // else gdcm::Trace::DebugOff(); gdcm::Trace::WarningOff(); int r = 0, i = 0; const char *filename; const char * const *filenames = gdcm::Testing::GetFileNames(); while( (filename = filenames[i]) ) { const char *sha1 = GetSHA1Sum( filename ); r += TestSHA1Func( filename, sha1 ); ++i; } return r; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestUnpacker12Bits.cxx000664 001766 001770 00000007130 14517730450 026046 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmUnpacker12Bits.h" #include #include #include #include int TestUnpacker12Bits(int, char *[]) { int res = 0; { const size_t len = (256 / 3 ) * 3; char *values = new char[len]; for( size_t i = 0; i < len; ++i) { values[i] = (char)i; } //const char values[] = {0, 1, 2}; //const size_t len = sizeof(values) / sizeof(*values); const size_t outlen = 16 * len / 12; char * output = new char[outlen]; bool b = gdcm::Unpacker12Bits::Unpack(output, values, len); if( b ) { std::set out; short * output_s = (short*)(void*)output; for( size_t i = 0; i < outlen / 2; ++i ) { const short &v = output_s[i]; // There is no way we can have values greater than a 12bits integer: if( v >= 4096 || v < 0 ) { std::cerr << "Too big:" << v << std::endl; res = 1; } // no duplicate possible std::pair< std::set::iterator, bool> p = out.insert( v ); if( p.second == false ) { std::cerr << "duplicate:" << v << std::endl; res = 1; } //std::cout << v << std::endl; } } else { res = 1; } delete[] values; delete[] output; } { const unsigned char values[] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab }; const size_t len = sizeof(values) / sizeof(*values); const size_t outlen = 16 * len / 12; void * output = malloc(outlen); // use malloc to get generous alignment, unlike new bool b = gdcm::Unpacker12Bits::Unpack((char *)output, (const char*)values, len); if (!b) res = 1; if( b ) { unsigned short * output_s = (unsigned short*)output; const unsigned short outputvalues[] = { 0x301, 0x452, 0x967, 0xab8 }; const size_t outputlen = sizeof(outputvalues) / sizeof(*outputvalues); assert( outlen / 2 == outputlen ); for(size_t i = 0; i < outputlen; ++i) { if( outputvalues[i] != output_s[i] ) { ++res; } } } free(output); } { const unsigned short input[] = { 0x301, 0x452, 0x967, 0xab8 }; unsigned char values[6] = {}; const unsigned char ref[] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab }; bool b = gdcm::Unpacker12Bits::Pack((char*)values, (const char*)input, 8); // 4 * sizeof(us) == 8 if(!b) { return 1; } for(size_t i = 0; i < 6; ++i) { if( values[i] != ref[i] ) { assert(0); ++res; } } } { //struct uint12_t { unsigned short v:12; }; std::vector v; for(uint16_t val = 0; val < 4096; ++val) { v.push_back( val ); } assert( v.size() == 4096 ); assert( v[0] == 0 ); const size_t outsize = 4096 / 2 * 3; unsigned char outvalues[outsize] = {}; gdcm::Unpacker12Bits::Pack( (char*)outvalues, (char*)v.data(), 4096 * sizeof(unsigned short) ); unsigned short outvalues2[4096] = {}; gdcm::Unpacker12Bits::Unpack( (char*)outvalues2, (char*)outvalues, outsize); for(uint16_t val = 0; val < 4096; ++val) { if( v[val] != outvalues2[val] ) { ++res; } } } return res; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestLog2.cxx000664 001766 001770 00000001645 14517730450 024121 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include static inline int log2( int n ) { int bits = 0; while (n > 0) { bits++; n >>= 1; } return bits; } int TestLog2(int , char *[]) { int v; v = log2(255); if( v != 8 ) return 1; v = log2(256); if( v != 9 ) return 1; v = log2(4095); if( v != 12 ) return 1; v = log2(4096); if( v != 13 ) return 1; return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestTypes.cxx000664 001766 001770 00000002011 14517730450 024406 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmTypes.h" int TestTypes(int argc, char *argv[]) { (void)argc; (void)argv; if( sizeof(int8_t) != 1 ) return 1; if( sizeof(int16_t) != 2 ) return 1; if( sizeof(int32_t) != 4 ) return 1; if( sizeof(uint8_t) != 1 ) return 1; if( sizeof(uint16_t) != 2 ) return 1; if( sizeof(uint32_t) != 4 ) return 1; if( sizeof(uint64_t) != 8 ) return 1; if( sizeof(float) != 4 ) return 1; if( sizeof(double) != 8 ) return 1; return 0; } gdcm-3.0.22/Testing/Source/Common/Cxx/TestSwapper.cxx000664 001766 001770 00000002133 14517730450 024730 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmSwapper.h" int TestSwapper(int argc, char *argv[]) { (void)argv; (void)argc; int res = 0; using testswapper = union { uint64_t v64; uint32_t v32[2]; uint16_t v16[4]; uint8_t v8[8]; }; testswapper t; for(uint_fast8_t i = 0; i < 8; ++i) t.v8[i] = i; testswapper val; val.v64 = gdcm::SwapperDoOp::Swap(t.v64); //for(int i = 0; i < 8; ++i) std::cout << (int)val.v8[i] << std::endl; for(int i = 0; i < 8; ++i) { if( val.v8[i] != 8 - i - 1) { ++res; } } return res; } gdcm-3.0.22/Testing/.NoDartCoverage000664 001766 001770 00000000047 14517730450 021337 0ustar00mmalaterremmalaterre000000 000000 # do not do coverage in this directory gdcm-3.0.22/CMakeLists.txt000664 001766 001770 00000126242 14517730450 017624 0ustar00mmalaterremmalaterre000000 000000 cmake_minimum_required(VERSION 3.9.2 FATAL_ERROR) set(GDCM_MAX_VALIDATED_CMAKE_VERSION "3.13.1") if("${CMAKE_VERSION}" VERSION_LESS_EQUAL "${GDCM_MAX_VALIDATED_CMAKE_VERSION}") # As of 2018-12-04 GDCM has been validated to build with cmake version 3.13.1 new policies. # Set and use the newest cmake policies that are validated to work set(GDCM_CMAKE_POLICY_VERSION "${CMAKE_VERSION}") else() set(GDCM_CMAKE_POLICY_VERSION "${GDCM_MAX_VALIDATED_CMAKE_VERSION}") endif() cmake_policy(VERSION ${GDCM_CMAKE_POLICY_VERSION}) # GDCM version 3.0.0 will only support C++11 and greater if(CMAKE_CXX_STANDARD EQUAL "98" ) message(FATAL_ERROR "CMAKE_CXX_STANDARD:STRING=98 is not supported in GDCM version 3.0.0 and greater.") endif() #---------------------------------------------------------------------------- project(GDCM VERSION 3.0.22 LANGUAGES CXX C ) ## NOTE: the "DESCRIPTION" feature of project() was introduced in cmake 3.10.0 set(PROJECT_DESCRIPTION "GDCM - Grassroots DICOM. GDCM is yet another DICOM library.") ## Set aliases for backwards compatibility. GDCM_VERSION_XXX are configured by the project() command set(GDCM_MAJOR_VERSION ${GDCM_VERSION_MAJOR}) set(GDCM_MINOR_VERSION ${GDCM_VERSION_MINOR}) set(GDCM_BUILD_VERSION ${GDCM_VERSION_PATCH}) set(GDCM_VERSION "${GDCM_VERSION_MAJOR}.${GDCM_VERSION_MINOR}.${GDCM_VERSION_PATCH}") # ${GDCM_VERSION_TWEAK} set(GDCM_SHORT_VERSION "${GDCM_VERSION_MAJOR}.${GDCM_VERSION_MINOR}") mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX) set(GDCM_CMAKE_DIR "${GDCM_SOURCE_DIR}/CMake" CACHE INTERNAL "") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${GDCM_CMAKE_DIR}") set(GDCM_PACKAGE_DESCRIPTION_SUMMARY ${PROJECT_DESCRIPTION}) set(GDCM_PACKAGE_CONTACT "GDCM Developers ") # TODO # http://www.vtk.org/pipermail/vtkusers/2007-May/090968.html # # False memory leak reports are caused by VTK dlls loading *before* MFC dlls. # You have to use the linker's /delayload flag to avoid this issue. # # The /delayload flag should be correct by default in the MFC examples if you # are using CVS VTK... If you are using a previous version of VTK (5.0 or # earlier) then you will have to figure out a way to link with that flag. # # See the CVS version of files in VTK/GUISupport/MFC for details. Or grep the # VTK source tree for "DELAYLOAD" # let advanced user the option to define GDCM_API_VERSION: if(NOT DEFINED GDCM_API_VERSION) set(GDCM_API_VERSION "${GDCM_VERSION_MAJOR}.${GDCM_VERSION_MINOR}") endif() set(GDCM_LIBRARY_PROPERTIES ${GDCM_LIBRARY_PROPERTIES} VERSION "${GDCM_VERSION}" SOVERSION "${GDCM_API_VERSION}" ) set(GDCM_EXECUTABLE_PROPERTIES) if(GDCM_NO_EXECUTABLE_PROPERTIES) set(GDCM_EXECUTABLE_PROPERTIES) set(python_site_package "python/dist-packages") else() set(python_site_package "") endif() set(GDCM_STANDALONE 0) # Top level project (eg. ITK) should set GDCM_TARGETS_NAME # to define a particular behavior where GDCM does not call # install(EXPORT...) # This sets the default value for GDCM_STANDALONE if(NOT GDCM_TARGETS_NAME) set(GDCM_TARGETS_NAME GDCMTargets) set(GDCM_STANDALONE 1) endif() #----------------------------------------------------------------------------- # PDB handling + Module handling include(${GDCM_SOURCE_DIR}/CMake/InstallMacros.cmake) #----------------------------------------------------------------------------- include(${GDCM_SOURCE_DIR}/CMake/UseCopyright.cmake) CREATE_COPYRIGHT_FILE(${CMAKE_CURRENT_BINARY_DIR}/Copyright.txt) APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt) APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/CMake/COPYING-CMAKE-SCRIPTS) #----------------------------------------------------------------------------- if(GDCM_VERSION_MINOR MATCHES "[02468]$") # Are we building a release branch / tag (read: even number)? # By default dashboard are expected to run with Design by Contract on # to trigger any of the assert, but on the other hand no user really # can figure out they need to change this value # So unless the user *specifically* requested a particular cmake_build_type # do the work internally and append the NDEBUG def flag (hopefully portable) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNDEBUG") endif() # Since we are on a release branch, chance is that people don't care about testing # let's disable it for them set(GDCM_BUILD_TESTING_DEFAULT OFF) else() set(GDCM_BUILD_TESTING_DEFAULT ON) endif() #----------------------------------------------------------------------------- # Disable deprecation warnings for standard C and STL functions in VS2005 # and later if(MSVC_VERSION EQUAL 1400 OR MSVC_VERSION GREATER 1400) add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS) endif() #----------------------------------------------------------------------------- # Build shared lib by default if(GDCM_STANDALONE) option(GDCM_BUILD_SHARED_LIBS "Build GDCM with shared libraries." OFF) set(BUILD_SHARED_LIBS ${GDCM_BUILD_SHARED_LIBS}) else() set(GDCM_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) endif() if(BUILD_SHARED_LIBS) set(NAMELINK_ONLY NAMELINK_ONLY) set(NAMELINK_SKIP NAMELINK_SKIP) endif() #----------------------------------------------------------------------------- if(NOT EXECUTABLE_OUTPUT_PATH) set(EXECUTABLE_OUTPUT_PATH ${GDCM_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables.") mark_as_advanced(EXECUTABLE_OUTPUT_PATH) endif() if(NOT LIBRARY_OUTPUT_PATH) set(LIBRARY_OUTPUT_PATH ${GDCM_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.") mark_as_advanced(LIBRARY_OUTPUT_PATH) endif() # TODO: The following should be used for CMake 3 and beyond, # EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH are deprecated set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}) #----------------------------------------------------------------------------- # Adding GDCM_DATA_ROOT if(GDCM_STANDALONE) find_path(GDCM_DATA_ROOT test.acr ${GDCM_SOURCE_DIR}/Testing/Data $ENV{GDCM_DATA_ROOT} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH ) mark_as_advanced(GDCM_DATA_ROOT) # You can define a path where you extra the famous D. Clunie spacing dataset # http://www.dclunie.com/images/pixelspacingtestimages.zip # for example: # find $HOME/pixelspacingtestimages # $HOME/pixelspacingtestimages # $HOME/pixelspacingtestimages/DISCIMG # $HOME/pixelspacingtestimages/DISCIMG/DICOMDIR # $HOME/pixelspacingtestimages/DISCIMG/IMAGES # $HOME/pixelspacingtestimages/DISCIMG/IMAGES/DXIMAGE # $HOME/pixelspacingtestimages/DISCIMG/IMAGES/MGIMAGE # $HOME/pixelspacingtestimages/DISCIMG/IMAGES/CRIMAGE mark_as_advanced(GDCM_PIXEL_SPACING_DATA_ROOT) #----------------------------------------------------------------------------- find_path(GDCM_DATA_EXTRA_ROOT gdcmData.tar.gz ${GDCM_SOURCE_DIR}/../gdcmDataExtra $ENV{GDCM_DATA_EXTRA_ROOT} $ENV{PUB_DICT_PATH}/../../gdcmDataExtra NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH ) mark_as_advanced(GDCM_DATA_EXTRA_ROOT) endif() # Define a temp directory in which we can output stuff set(GDCM_TEMP_DIRECTORY "${GDCM_BINARY_DIR}/Testing/Temporary" CACHE PATH "Path to a valid temp directory") mark_as_advanced(GDCM_TEMP_DIRECTORY) #----------------------------------------------------------------------------- include(${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) include(${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake) # Check if header file exists and add it to the list. macro(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE) CHECK_INCLUDE_FILES("${UUID_INCLUDES};${FILE}" ${VARIABLE}) if(${VARIABLE}) set(UUID_INCLUDES ${UUID_INCLUDES} ${FILE}) endif() endmacro() #include(${GDCM_SOURCE_DIR}/CMake/gdcmPlatformCxxTests.cmake) # #GDCM_PLATFORM_CXX_TEST(GDCM_CXX_HAS_FUNCTION # "Checking whether compiler has __FUNCTION__" DIRECT) # -------------------------------------------------------------------------- # Configure the export configuration # You will also need to define a value for the following variables: # GDCM_INSTALL_BIN_DIR - binary dir (executables) # GDCM_INSTALL_LIB_DIR - library dir (libs) # GDCM_INSTALL_DATA_DIR - share dir (say, examples, data, etc) # GDCM_INSTALL_INCLUDE_DIR - include dir (headers) # GDCM_INSTALL_PACKAGE_DIR - package/export configuration files # GDCM_VTK_INSTALL_PACKAGE_DIR - VTK package/export configuration files # GDCM_INSTALL_NO_DEVELOPMENT - do not install development files # GDCM_INSTALL_NO_RUNTIME - do not install runtime files # GDCM_INSTALL_NO_DOCUMENTATION - do not install documentation files # GDCM_INSTALL_PYTHONMODULE_DIR - Python Module install dir # GDCM_VTK_INSTALL_PYTHONMODULE_DIR - VTK/Python Module install dir # GDCM_INSTALL_CSHARPMODULE_DIR - C# Module install dir # GDCM_VTK_INSTALL_CSHARPMODULE_DIR - VTK/C# Module install dir # GDCM_INSTALL_JAVAMODULE_DIR - Java Module install dir (JNI glue) # GDCM_INSTALL_JARMODULE_DIR - Java Module install dir (JAR) # GDCM_VTK_INSTALL_JAVAMODULE_DIR - VTK/Java Module install dir (JNI glue) # GDCM_VTK_INSTALL_JARMODULE_DIR - VTK/Java Module install dir (JAR) # -------------------------------------------------------------------------- # Install directories string(TOLOWER ${PROJECT_NAME} projectname) set(subdir "${projectname}-${GDCM_VERSION_MAJOR}.${GDCM_VERSION_MINOR}") if(NOT GDCM_INSTALL_BIN_DIR) set(GDCM_INSTALL_BIN_DIR "bin") endif() if(NOT GDCM_INSTALL_LIB_DIR) #set(GDCM_INSTALL_LIB_DIR "lib/${PROJECT_NAME}") set(GDCM_INSTALL_LIB_DIR "lib") endif() if(NOT GDCM_INSTALL_DATA_DIR) set(GDCM_INSTALL_DATA_DIR "share/${subdir}") endif() if(NOT GDCM_INSTALL_INCLUDE_DIR) set(GDCM_INSTALL_INCLUDE_DIR "include/${subdir}") endif() if(NOT GDCM_INSTALL_DOC_DIR) set(GDCM_INSTALL_DOC_DIR "share/doc/${subdir}") endif() if(NOT GDCM_INSTALL_MAN_DIR) set(GDCM_INSTALL_MAN_DIR "share/man") endif() if(NOT GDCM_INSTALL_PACKAGE_DIR) set(GDCM_INSTALL_PACKAGE_DIR ${GDCM_INSTALL_LIB_DIR}/${subdir} CACHE INTERNAL "") endif() if(NOT GDCM_VTK_INSTALL_PACKAGE_DIR) set(GDCM_VTK_INSTALL_PACKAGE_DIR ${VTK_INSTALL_PACKAGE_DIR}) endif() if(NOT GDCM_INSTALL_NO_DEVELOPMENT) set(GDCM_INSTALL_NO_DEVELOPMENT 0) endif() if(NOT GDCM_INSTALL_NO_RUNTIME) set(GDCM_INSTALL_NO_RUNTIME 0) endif() if(NOT GDCM_INSTALL_NO_DOCUMENTATION) set(GDCM_INSTALL_NO_DOCUMENTATION 0) endif() set(GDCM_INSTALL_NO_LIBRARIES) if(GDCM_BUILD_SHARED_LIBS) if(GDCM_INSTALL_NO_RUNTIME AND GDCM_INSTALL_NO_DEVELOPMENT) set(GDCM_INSTALL_NO_LIBRARIES 1) endif() else() if(GDCM_INSTALL_NO_DEVELOPMENT) set(GDCM_INSTALL_NO_LIBRARIES 1) endif() endif() if(NOT GDCM_INSTALL_PYTHONMODULE_DIR) set(GDCM_INSTALL_PYTHONMODULE_DIR ${GDCM_INSTALL_LIB_DIR}/${python_site_package}) endif() if(NOT GDCM_VTK_INSTALL_PYTHONMODULE_DIR) set(GDCM_VTK_INSTALL_PYTHONMODULE_DIR ${GDCM_INSTALL_PYTHONMODULE_DIR}) endif() if(NOT GDCM_INSTALL_CSHARPMODULE_DIR) set(GDCM_INSTALL_CSHARPMODULE_DIR ${GDCM_INSTALL_LIB_DIR}) endif() if(NOT GDCM_VTK_INSTALL_CSHARPMODULE_DIR) set(GDCM_VTK_INSTALL_CSHARPMODULE_DIR ${GDCM_INSTALL_CSHARPMODULE_DIR}) endif() if(NOT GDCM_INSTALL_JAVAMODULE_DIR) set(GDCM_INSTALL_JAVAMODULE_DIR ${GDCM_INSTALL_LIB_DIR}) endif() if(NOT GDCM_VTK_INSTALL_JAVAMODULE_DIR) set(GDCM_VTK_INSTALL_JAVAMODULE_DIR ${GDCM_INSTALL_JAVAMODULE_DIR}) endif() if(NOT GDCM_INSTALL_JARMODULE_DIR) set(GDCM_INSTALL_JARMODULE_DIR ${GDCM_INSTALL_LIB_DIR}) endif() if(NOT GDCM_VTK_INSTALL_JARMODULE_DIR) set(GDCM_VTK_INSTALL_JARMODULE_DIR ${GDCM_INSTALL_JARMODULE_DIR}) endif() #----------------------------------------------------------------------------- #System stuff, mainly for packager or paranoid people with up-to-date lib moto option(GDCM_USE_SYSTEM_ZLIB "Use system zlib" OFF) option(GDCM_USE_SYSTEM_OPENSSL "Use system OpenSSL" OFF) if(UNIX) # Will search for the uuid_generate symbols. # Can be in libSystem.dylib or libuuid.so option(GDCM_USE_SYSTEM_UUID "Use system uuid" OFF) endif() option(GDCM_USE_SYSTEM_EXPAT "Use system expat" OFF) option(GDCM_USE_SYSTEM_JSON "Use system json" OFF) option(GDCM_USE_SYSTEM_PAPYRUS3 "Use system papyrus3" OFF) option(GDCM_USE_SYSTEM_SOCKETXX "Use system socket++" OFF) option(GDCM_USE_SYSTEM_LJPEG "Use system ljpeg (ijg lib)" OFF) option(GDCM_USE_SYSTEM_OPENJPEG "Use system openjpeg" OFF) option(GDCM_USE_SYSTEM_CHARLS "Use system CharLS" OFF) mark_as_advanced( GDCM_USE_SYSTEM_ZLIB GDCM_USE_SYSTEM_OPENSSL GDCM_USE_SYSTEM_UUID GDCM_USE_SYSTEM_EXPAT GDCM_USE_SYSTEM_JSON GDCM_USE_SYSTEM_PAPYRUS3 GDCM_USE_SYSTEM_SOCKETXX GDCM_USE_SYSTEM_LJPEG GDCM_USE_SYSTEM_OPENJPEG GDCM_USE_SYSTEM_CHARLS ) option(GDCM_USE_SYSTEM_POPPLER "Use system poppler (pdf)" OFF) if(GDCM_USE_SYSTEM_POPPLER) find_package(Poppler REQUIRED) endif() mark_as_advanced(GDCM_USE_SYSTEM_POPPLER) option(GDCM_USE_SYSTEM_LIBXML2 "Use LibXml2" OFF) if(GDCM_USE_SYSTEM_LIBXML2) find_package(LibXml2) endif() mark_as_advanced(GDCM_USE_SYSTEM_LIBXML2) if(GDCM_USE_SYSTEM_LJPEG) find_package(LJPEG REQUIRED) set(GDCM_LJPEG_LIBRARIES ${LJPEG_LIBRARIES}) else() set(GDCM_LJPEG_LIBRARIES gdcmjpeg8 gdcmjpeg12 gdcmjpeg16) endif() if(GDCM_USE_SYSTEM_CHARLS) find_package(CharLS 2.0.0 REQUIRED) set(GDCM_CHARLS_LIBRARIES ${CHARLS_LIBRARIES}) else() set(GDCM_CHARLS_LIBRARIES gdcmcharls) endif() if(GDCM_USE_SYSTEM_OPENJPEG) find_package(OpenJPEG 2.0.0 REQUIRED) set(GDCM_OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARIES}) else() set(GDCM_OPENJPEG_LIBRARIES gdcmopenjp2) endif() # Very advanced user option: # This will cause building of the broken JPEG library released by the Standford PVRG group: option(GDCM_USE_PVRG "Use pvrg lib, only turn it on if you know what you are doing." OFF) mark_as_advanced(GDCM_USE_PVRG) option(GDCM_USE_KAKADU "Use kakadu lib, only turn it on if you know what you are doing." OFF) mark_as_advanced(GDCM_USE_KAKADU) if(GDCM_USE_PVRG) option(GDCM_USE_SYSTEM_PVRG "Use system PVRG" OFF) mark_as_advanced(GDCM_USE_SYSTEM_PVRG) if(GDCM_USE_SYSTEM_PVRG) find_package(PVRGJPEG REQUIRED) endif() endif() # Very advanced behavior only use if you want to keep backward compatible # behavior but possibly incorrect behavior. option(GDCMV2_0_COMPATIBILITY "Preserve compatibility with GDCM 2.0 release" ON) mark_as_advanced(GDCMV2_0_COMPATIBILITY) if(GDCM_USE_KAKADU) option(GDCM_USE_SYSTEM_KAKADU "Use system KAKADU " ON) mark_as_advanced(GDCM_USE_SYSTEM_KAKADU) if(GDCM_USE_SYSTEM_KAKADU) find_package(KAKADU REQUIRED) else() message(FATAL_ERROR "Not Implemented") endif() endif() if(GDCM_USE_SYSTEM_ZLIB) # If user say so, then this is a requirement ! find_package(ZLIB REQUIRED) include_directories(${ZLIB_INCLUDE_DIR}) set(GDCM_ZLIB_LIBRARIES ${ZLIB_LIBRARIES}) else() set(GDCM_ZLIB_LIBRARIES "gdcmzlib") endif() if(GDCM_USE_SYSTEM_OPENSSL) find_package(OpenSSL REQUIRED) endif() if(GDCM_USE_SYSTEM_UUID) # If user say so, then this is a requirement ! find_package(UUID REQUIRED) set(GDCM_UUID_LIBRARIES ${UUID_LIBRARIES}) else() set(GDCM_UUID_LIBRARIES "gdcmuuid") endif() if(GDCM_USE_SYSTEM_EXPAT) # If user say so, then this is a requirement ! find_package(EXPAT REQUIRED) set(GDCM_EXPAT_LIBRARIES ${EXPAT_LIBRARIES}) else() set(GDCM_EXPAT_LIBRARIES "gdcmexpat") endif() if(GDCM_USE_SYSTEM_JSON) find_package(JSON REQUIRED) endif() if(GDCM_USE_SYSTEM_PAPYRUS3) find_package(PAPYRUS3 REQUIRED) endif() #----------------------------------------------------------------------------- if(GDCM_STANDALONE) option(GDCM_BUILD_EXAMPLES "Build GDCM examples." OFF) set(BUILD_EXAMPLES ${GDCM_BUILD_EXAMPLES}) else() set(GDCM_BUILD_EXAMPLES OFF) set(BUILD_EXAMPLES OFF) endif() #----------------------------------------------------------------------------- # Add the testing directories if(GDCM_STANDALONE) option(GDCM_BUILD_TESTING "Build testing." ${GDCM_BUILD_TESTING_DEFAULT}) set(BUILD_TESTING ${GDCM_BUILD_TESTING}) # CACHE BOOL "" FORCE) else() set(GDCM_BUILD_TESTING OFF) set(BUILD_TESTING OFF) endif() # Hide BUILD_TESTING as user tend to always turn all options on and then complains when something # does not work 'by default' mark_as_advanced(BUILD_TESTING) # GDCM_BUILD_TESTING) #----------------------------------------------------------------------------- if(GDCM_TESTING_USE_LC_NUMERIC) set(CMAKE_TESTDRIVER_BEFORE_TESTMAIN "setlocale(LC_ALL,\"fr_FR.UTF-8\");std::locale::global(std::locale(\"fr_FR.UTF-8\"));" ) endif() #----------------------------------------------------------------------------- # Python install #find_package(PythonInterp REQUIRED) #macro(GET_PYTHON_SITE_PACKAGE dir) # execute_process( # COMMAND ${PYTHON_EXECUTABLE} "-c" "from distutils import sysconfig; print sysconfig.get_python_lib()" # #WORKING_DIRECTORY @LIBRARY_OUTPUT_PATH@ # RESULT_VARIABLE import_res # OUTPUT_VARIABLE import_output # ERROR_VARIABLE import_error # OUTPUT_STRIP_TRAILING_WHITESPACE # ) # #set(dir ${import_output}) #endmacro() # # #GET_PYTHON_SITE_PACKAGE(python_site_package) #if(import_output) #string(LENGTH ${import_output} len) ## let's remove the "/usr/lib" part... #math(EXPR fileend "${len} - 9") #string(SUBSTRING ${import_output} 9 ${fileend} dummy1) #if(UNIX) # set(python_site_package ${dummy1}) # message(${python_site_package}) #endif() #endif() # On unix one have: "python2.4/site-packages" # while on Win32: "c:/Python24/Lib/site-packages/" # give up for now and place python modules stuff in a general 'python' subdir # Typical runtime env should be then # (assuming CMAKE_INSTALL_PREFIX:PATH=/tmp/local) # One would do: # export PYTHONPATH=/tmp/local/lib/python/site-packages/gdcm-2.1 # export LD_LIBRARY_PATH=/tmp/local/lib/ # python # > import gdcm #----------------------------------------------------------------------------- # Wrapping if(GDCM_STANDALONE) option(GDCM_WRAP_PYTHON "build gdcm/python wrapping" OFF) option(VTKGDCM_WRAP_PYTHON "build vtkgdcm/python wrapping" OFF) option(GDCM_WRAP_PERL "build perl wrapping (experimental !)" OFF) option(GDCM_WRAP_PHP "build php wrapping" OFF) option(GDCM_WRAP_JAVA "build gdcm/java wrapping" OFF) option(VTKGDCM_WRAP_JAVA "build vtkgdcm/java wrapping" OFF) option(GDCM_WRAP_CSHARP "build gdcm/csharp wrapping" OFF) option(VTKGDCM_WRAP_CSHARP "build vtkgdcm/csharp wrapping" OFF) mark_as_advanced(GDCM_WRAP_PHP) mark_as_advanced(GDCM_WRAP_PERL) mark_as_advanced(GDCM_USE_ACTIVIZ) option(GDCM_USE_JPEGLS "Build GDCM with JPEG-LS support" ON) mark_as_advanced(GDCM_USE_JPEGLS) if(NOT DEFINED GDCM_DEFAULT_PYTHON_VERSION) # override with cmake -DGDCM_DEFAULT_PYTHON_VERSION:STRING=2.7 if you dare set(GDCM_DEFAULT_PYTHON_VERSION 3.2) endif() if(NOT DEFINED GDCM_DEFAULT_JAVA_VERSION) # override with cmake -DGDCM_DEFAULT_JAVA_VERSION:STRING=1.5 if you dare set(GDCM_DEFAULT_JAVA_VERSION 1.7) endif() if(GDCM_WRAP_JAVA) set(GDCM_JAVA_SOURCE_VERSION "${GDCM_DEFAULT_JAVA_VERSION}" CACHE STRING "javac source version") set(GDCM_JAVA_TARGET_VERSION "${GDCM_DEFAULT_JAVA_VERSION}" CACHE STRING "javac target version") mark_as_advanced(GDCM_JAVA_SOURCE_VERSION GDCM_JAVA_TARGET_VERSION) endif() if(GDCM_WRAP_CSHARP) find_package(CSharp REQUIRED) include(${CSharp_USE_FILE}) endif() # Expose a way to pass -fPIC to static libs of gdcm core, while still build wrapped language as shared lib: if(NOT DEFINED GDCM_USE_PIC_FOR_STATIC_LIBS) if(GDCM_WRAP_JAVA) if(NOT BUILD_SHARED_LIBS) if(CMAKE_COMPILER_IS_GNUCXX) set(GDCM_USE_PIC_FOR_STATIC_LIBS ON) endif() endif() endif() endif() if(GDCM_USE_PIC_FOR_STATIC_LIBS) if(BUILD_SHARED_LIBS) message(FATAL_ERROR "Invalid configuration for static/shared lib") else() set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() endif() endif() set(GDCM_LIBRARY_DIR ${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}) set(GDCM_EXECUTABLE_DIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}) #----------------------------------------------------------------------------- # we need to link against CoreFoundation so that we can use CFBundle to get the executable path. if(APPLE) option(GDCM_USE_COREFOUNDATION_LIBRARY "Use COREFOUNDATION_LIBRARY?" ON) if(GDCM_USE_COREFOUNDATION_LIBRARY) find_library(COREFOUNDATION_LIBRARY CoreFoundation ) endif() endif() #----------------------------------------------------------------------------- # Allow user to set a postfix symbol to a target library name (eg. 'd') if(WIN32) set(GDCM_DEBUG_POSTFIX "" CACHE STRING "Globally append a debug postfix symbols on all libraries") if(GDCM_DEBUG_POSTFIX) set(CMAKE_DEBUG_POSTFIX "${GDCM_DEBUG_POSTFIX}") endif() mark_as_advanced(GDCM_DEBUG_POSTFIX) endif() #----------------------------------------------------------------------------- # Add a target so that the documentation can be build from the # root dir if(GDCM_DOCUMENTATION) if(NOT DEFINED GDCM_SKIP_DOXYGENDOC_ALL_RULE) add_custom_target(DoxygenDoc ALL) else() add_custom_target(DoxygenDoc) endif() endif() # Need to add_subdirectory in Source/Common before Wrapping # to have gdcmConfigure.h around if(GDCM_STANDALONE) set(BUILD_APPLICATIONS ${GDCM_BUILD_APPLICATIONS}) else() set(BUILD_APPLICATIONS OFF) endif() #----------------------------------------------------------------------------- # Need pthread for the following class: CHECK_INCLUDE_FILE("pthread.h" GDCM_HAVE_PTHREAD_H) # Big endian thing: if(GDCM_STANDALONE) include(TestBigEndian) TEST_BIG_ENDIAN(GDCM_WORDS_BIGENDIAN) endif() if(GDCM_STANDALONE) if(GDCM_BUILD_TESTING) configure_file(${GDCM_SOURCE_DIR}/CMake/CTestCustom.ctest.in ${GDCM_BINARY_DIR}/CMake/CTestCustom.ctest @ONLY) file(WRITE ${GDCM_BINARY_DIR}/CTestCustom.cmake "include(\"${GDCM_BINARY_DIR}/CMake/CTestCustom.ctest\")\n") mark_as_advanced(DART_TESTING_TIMEOUT) enable_testing() include(CTest) add_subdirectory(Testing) if(NOT GDCM_DATA_ROOT) message("If you want to build the test suite, you must set GDCM_DATA_ROOT (advanced option) " "to the full path name of the gdcmData directory; if you don't want, disable GDCM_BUILD_TESTING.\n" "What is gdcmData? Please read: http://gdcm.sourceforge.net/wiki/index.php/General_questions#What_is_gdcmData_.3F") endif() endif() endif() # After enable_testing() add_subdirectory(Utilities) add_subdirectory(Source) if(GDCM_STANDALONE) add_subdirectory(Wrapping) endif() if(GDCM_STANDALONE) # After Wrapping please if(BUILD_EXAMPLES) add_subdirectory(Examples) endif() endif() #----------------------------------------------------------------------------- if(GDCM_STANDALONE) option(GDCM_DOCUMENTATION "Build source documentation using doxygen." OFF) if(GDCM_DOCUMENTATION) option(GDCM_PDF_DOCUMENTATION "Build source doxygen using doxygen as pdf" ON) mark_as_advanced(GDCM_PDF_DOCUMENTATION) endif() endif() #----------------------------------------------------------------------------- if(GDCM_STANDALONE) option(GDCM_USE_VTK "vtk bridge ?" OFF) if(GDCM_USE_VTK AND GDCM_WRAP_CSHARP) option(GDCM_USE_ACTIVIZ "vtk/Activiz bridge ?" OFF) endif() if(GDCM_USE_VTK) option(GDCM_USE_PARAVIEW "paraview plugin ?" OFF) # needed here so that we have VTK_WRAP_PYTHON and al. available find_package(VTK REQUIRED) mark_as_advanced(VTK_DIR) set(GDCM_VTK_DIR ${VTK_DIR}) mark_as_advanced(GDCM_USE_PARAVIEW) set(VTKGDCM_NAME vtkgdcm CACHE STRING "vtk-gdcm lib name") mark_as_advanced(VTKGDCM_NAME) if(VTK_VERSION VERSION_LESS 8.90) add_subdirectory(Utilities/VTK) else() message(STATUS "Building Utilities/VTK as a VTK 9 Module") # TODO: use VTKGDCM_NAME instead of vtkgdcm option(VTKGDCM_VERSIONED_INSTALL "Install with versioned names." ON) mark_as_advanced(VTKGDCM_VERSIONED_INSTALL) if(VTKGDCM_VERSIONED_INSTALL) set(vtk_version_suffix "-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}") set(vtkgdcm_library_suffix "${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}") else() set(vtk_version_suffix "") set(vtkgdcm_library_suffix "") endif() if(DEFINED GDCM_CUSTOM_LIBRARY_SUFFIX) set(vtkgdcm_library_suffix "${GDCM_CUSTOM_LIBRARY_SUFFIX}") endif() vtk_module_scan( MODULE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Utilities/VTK/vtkgdcm.module" REQUEST_MODULES "GDCM::vtkgdcm" PROVIDES_MODULES vtkgdcm_modules ENABLE_TESTS "${GDCM_BUILD_TESTING}" ) # documented at https://vtk.org/doc/nightly/html/group__module.html vtk_module_build( MODULES ${vtkgdcm_modules} INSTALL_EXPORT GDCM ARCHIVE_DESTINATION "${GDCM_INSTALL_LIB_DIR}" HEADERS_DESTINATION "${GDCM_INSTALL_INCLUDE_DIR}/vtk${vtk_version_suffix}" CMAKE_DESTINATION "${GDCM_INSTALL_PACKAGE_DIR}" LICENSE_DESTINATION "${GDCM_INSTALL_DATA_DIR}/vtkgdcm-${GDCM_SHORT_VERSION}" HIERARCHY_DESTINATION "${GDCM_INSTALL_LIB_DIR}/vtk${vtk_version_suffix}/hierarchy/vtkgdcm" LIBRARY_NAME_SUFFIX "${vtkgdcm_library_suffix}" VERSION "${GDCM_VERSION}" SOVERSION "1" # TODO: these are probably not set as they should be #USE_EXTERNAL "${GDCM_USE_EXTERNAL}" #TEST_DATA_TARGET vtkgdcmData #TEST_INPUT_DATA_DIRECTORY "${vtkgdcm_test_data_directory_input}" #TEST_OUTPUT_DATA_DIRECTORY "${vtkgdcm_test_data_directory_output}" ) if(VTKGDCM_WRAP_PYTHON) find_package(PythonInterp ${VTK_PYTHON_VERSION} QUIET) vtk_module_wrap_python( MODULES ${vtkgdcm_modules} TARGET GDCM::vtkgdcmpython INSTALL_EXPORT vtkgdcmPython PYTHON_PACKAGE "vtkgdcm" CMAKE_DESTINATION "${GDCM_INSTALL_PACKAGE_DIR}" LIBRARY_DESTINATION "${GDCM_INSTALL_LIB_DIR}" MODULE_DESTINATION "${GDCM_VTK_INSTALL_PYTHONMODULE_DIR}" SOABI "${Python${VTK_PYTHON_VERSION}_SOABI}" BUILD_STATIC OFF ) file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/${GDCM_VTK_INSTALL_PYTHONMODULE_DIR}/vtkgdcm/__init__.py" CONTENT "from .vtkgdcm import *\n\n__all__ = ['vtkgdcm']\n__version__ = \"${GDCM_VERSION}\"\n") install( FILES "${CMAKE_BINARY_DIR}/${GDCM_VTK_INSTALL_PYTHONMODULE_DIR}/vtkgdcm/__init__.py" DESTINATION "${GDCM_VTK_INSTALL_PYTHONMODULE_DIR}/vtkgdcm/") export( EXPORT vtkgdcmPython NAMESPACE GDCM:: FILE "${GDCM_INSTALL_PACKAGE_DIR}/vtkgdcmPython-targets.cmake") install( EXPORT vtkgdcmPython NAMESPACE GDCM:: FILE vtkgdcmPython-targets.cmake DESTINATION "${GDCM_INSTALL_PACKAGE_DIR}") endif() if(VTKGDCM_WRAP_JAVA) # TODO: this is broken, incomplete, needs lots of work vtk_module_wrap_java( MODULES ${vtkgdcm_modules} WRAPPED_MODULES vtkgdcm_java_wrapped_modules JAVA_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles") endif() endif() endif() endif() #----------------------------------------------------------------------------- if(GDCM_STANDALONE) option(GDCM_BUILD_APPLICATIONS "apps ?" OFF) set(BUILD_APPLICATIONS ${GDCM_BUILD_APPLICATIONS}) if(BUILD_APPLICATIONS) add_subdirectory(Applications) endif() else() set(BUILD_APPLICATIONS OFF) set(GDCM_BUILD_APPLICATIONS OFF) endif() #----------------------------------------------------------------------------- if(GDCM_USE_VTK) if(WIN32) include(CMake/InstallRequiredVTKLibraries.cmake) endif() endif() # Make sure to run doxygen after everything else (in particular vtkgdcm): if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/doxygen) add_subdirectory(Utilities/doxygen) endif() #----------------------------------------------------------------------------- # CPack stuff if(GDCM_STANDALONE) # disabled for ITK distribution of gdcm if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") if(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake") set(CMAKE_INSTALL_MFC_LIBRARIES 0) set(CMAKE_INSTALL_DEBUG_LIBRARIES 0) if(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS) set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON) endif() include(${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake) endif() set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${GDCM_PACKAGE_DESCRIPTION_SUMMARY}) set(CPACK_PACKAGE_VENDOR "GDCM") set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_BINARY_DIR}/Copyright.txt") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/Copyright.txt") set(CPACK_PACKAGE_VERSION_MAJOR "${GDCM_VERSION_MAJOR}") set(CPACK_PACKAGE_VERSION_MINOR "${GDCM_VERSION_MINOR}") set(CPACK_PACKAGE_VERSION_PATCH "${GDCM_VERSION_PATCH}") set(CPACK_PACKAGE_INSTALL_DIRECTORY "GDCM ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") set(CPACK_SOURCE_PACKAGE_FILE_NAME "gdcm-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") if(WIN32 AND NOT UNIX) # There is a bug in NSIS that does not handle full UNIX paths properly. Make # sure there is at least one set of four (4) backlashes. set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\gdcmviewer.exe") set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") set(CPACK_NSIS_HELP_LINK "http://gdcm.sourceforge.net") set(CPACK_NSIS_URL_INFO_ABOUT "http://gdcm.sourceforge.net") set(CPACK_NSIS_MODIFY_PATH ON) # if(${CMAKE_INSTALL_PREFIX} MATCHES ${CPACK_PACKAGE_INSTALL_DIRECTORY}) # else() # string(REPLACE ${PROJECT_NAME} ${CPACK_PACKAGE_INSTALL_DIRECTORY} dummy ${CMAKE_INSTALL_PREFIX} ) # set(CMAKE_INSTALL_PREFIX ${dummy} CACHE PATH "" FORCE) # endif() else() set(CPACK_STRIP_FILES TRUE) set(CPACK_SOURCE_STRIP_FILES "") set(CPACK_PACKAGE_EXECUTABLES "gdcmviewer" "VIEWER") endif() # cygwin stff also copied from cmake #if(NOT DEFINED CPACK_PACKAGE_FILE_NAME) # # if the CPACK_PACKAGE_FILE_NAME is not defined by the cache # # default to source package - system, on cygwin system is not # # needed # if(CYGWIN) # set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}") # else() # set(CPACK_PACKAGE_FILE_NAME # "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}") # endif() #endif() #Cygwin stuff copied from cmake if(NOT DEFINED CPACK_SYSTEM_NAME) # make sure package is not Cygwin-unknown, for Cygwin just # cygwin is good for the system name if("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN") set(CPACK_SYSTEM_NAME Cygwin) else() #set(CMAKE_SYSTEM_PROCESSOR "x86_64") #set(CPACK_GENERATOR "TGZ;TBZ2") #set(CPACK_SOURCE_GENERATOR "TGZ;TBZ2") set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}) endif() endif() # Need to set the architecture for debian package set(CPACK_PACKAGE_CONTACT ${GDCM_PACKAGE_CONTACT}) set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libstdc++6 (>= 4.0.2-4), libuuid1, zlib1g (>= 1:1.2.1), libgcc1 (>= 1:4.0.2), libexpat1, swig") # bug: missing dep to python... set(CPACK_DEBIAN_PACKAGE_SUGGESTS "dcmtk") set(CPACK_SOURCE_IGNORE_FILES "/\\\\.gitmodules" "/\\\\.git/" "/\\\\.gitignore" "TODO" "/Testing/Data/") set(CPACK_IGNORE_FILES ${CPACK_SOURCE_IGNORE_FILES}) # List executables #set(CPACK_PACKAGE_EXECUTABLES "gdcmviewer" "VIEWER") if(CYGWIN) set(CPACK_CYGWIN_PATCH_NUMBER 1) set(CPACK_CYGWIN_BUILD_SCRIPT "${GDCM_BINARY_DIR}/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.sh") set(CPACK_CYGWIN_PATCH_FILE "${GDCM_BINARY_DIR}/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.patch") configure_file(${GDCM_SOURCE_DIR}/CMake/Release/cygwin-patch.diff.in ${CPACK_CYGWIN_PATCH_FILE}) configure_file(${GDCM_SOURCE_DIR}/CMake/Release/cygwin-package.sh.in ${CPACK_CYGWIN_BUILD_SCRIPT}) endif() # Tell CPack all of the components to install. The "ALL" # refers to the fact that this is the set of components that # will be included when CPack is instructed to put everything # into the binary installer (the default behavior). set(components) if(GDCM_BUILD_APPLICATIONS) list(APPEND components Applications) endif() list(APPEND components Libraries) list(APPEND components Headers) list(APPEND components DebugDevel) if(GDCM_WRAP_PYTHON) list(APPEND components PythonModule) endif() if(GDCM_WRAP_CSHARP) list(APPEND components CSharpModule) # https://cmake.org/cmake/help/latest/cpack_gen/nuget.html#cpack_gen:CPack%20NuGet%20Generator if (${CMAKE_VERSION} VERSION_GREATER "3.12.0") set(CPACK_BINARY_NUGET "ON") # ${CMAKE_CURRENT_BINARY_DIR}/Copyright.txt is too long (>4000 characters) set(CPACK_NUGET_PACKAGE_DESCRIPTION "Grassroots DiCoM is a C++ library for DICOM medical files. It is accessible from Python, C#, Java and PHP. It supports RAW, JPEG, JPEG 2000, JPEG-LS, RLE and deflated transfer syntax. It comes with a super fast scanner implementation to quickly scan hundreds of DICOM files. It supports SCU network operations (C-ECHO, C-FIND, C-STORE, C-MOVE). PS 3.3 & 3.6 are distributed as XML files. It also provides PS 3.15 certificates and password based mechanism to anonymize and de-identify DICOM datasets.") set(CPACK_NUGET_PACKAGE_LICENSEURL "http://gdcm.sourceforge.net/Copyright.html") set(CPACK_NUGET_PACKAGE_HOMEPAGE_URL "http://gdcm.sourceforge.net") set(CPACK_NUGET_PACKAGE_TAGS "dicom" "medical") set(CPACK_NUGET_PACKAGE_ICONURL "http://gdcm.sourceforge.net/images/logo_gdcm64x64.png") endif() endif() if(GDCM_WRAP_JAVA) list(APPEND components JavaModule) endif() if(GDCM_WRAP_PHP) list(APPEND components PHPModule) endif() if(GDCM_USE_VTK) foreach(comp ${components}) if( "${comp}" STREQUAL "PythonModule" ) if(VTK_WRAP_PYTHON AND VTKGDCM_WRAP_PYTHON) list(APPEND components VTK${comp}) endif() elseif( "${comp}" STREQUAL "JavaModule" ) if(VTK_WRAP_JAVA AND VTKGDCM_WRAP_JAVA) list(APPEND components VTK${comp}) endif() else() list(APPEND components VTK${comp}) endif() endforeach() endif() if(GDCM_USE_PARAVIEW) list(APPEND components ParaViewModule) endif() # Ok this is the complete list of all components: set(CPACK_COMPONENTS_ALL ${components}) # Set the displayed names for each of the components to install. # These will be displayed in the list of components inside the installer. set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "GDCM Applications") set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "GDCM Libraries") set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "GDCM C/C++ Headers") set(CPACK_COMPONENT_DEBUGDEVEL_DISPLAY_NAME "GDCM Debug Symbols (PDB)") set(CPACK_COMPONENT_PYTHONMODULE_DISPLAY_NAME "GDCM Python Module") set(CPACK_COMPONENT_CSHARPMODULE_DISPLAY_NAME "GDCM C# Module") set(CPACK_COMPONENT_JAVAMODULE_DISPLAY_NAME "GDCM Java Module") set(CPACK_COMPONENT_PHPMODULE_DISPLAY_NAME "GDCM PHP Module") set(CPACK_COMPONENT_VTKAPPLICATIONS_DISPLAY_NAME "VTK/GDCM Applications") set(CPACK_COMPONENT_VTKLIBRARIES_DISPLAY_NAME "VTK/GDCM Libraries") set(CPACK_COMPONENT_VTKHEADERS_DISPLAY_NAME "VTK/GDCM C/C++ Headers") set(CPACK_COMPONENT_VTKPYTHONMODULE_DISPLAY_NAME "VTK/GDCM Python Module") set(CPACK_COMPONENT_VTKCSHARPMODULE_DISPLAY_NAME "VTK/GDCM C# Module") set(CPACK_COMPONENT_VTKJAVAMODULE_DISPLAY_NAME "VTK/GDCM Java Module") set(CPACK_COMPONENT_VTKPHPMODULE_DISPLAY_NAME "VTK/GDCM PHP Module") set(CPACK_COMPONENT_PARAVIEWMODULE_DISPLAY_NAME "ParaView Module") # Provide descriptions for each of the components to install. # When the user hovers the mouse over the name of a component, # the description will be shown in the "Description" box in the # installer. If no descriptions are provided, the "Description" # box will be removed. set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "Command line applications that uses GDCM: gdcmconv, gdcmscu, gdcmdump, gdcminfo, gdcmscanner, gdcmimg, gdcmanon") set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "Libraries used to build programs with GDCM") set(CPACK_COMPONENT_HEADERS_DESCRIPTION "C/C++ header files for use with GDCM") set(CPACK_COMPONENT_DEBUGDEVEL_DESCRIPTION "Program Database files for use with GDCM") set(CPACK_COMPONENT_PYTHONMODULE_DESCRIPTION "Python Module for GDCM") set(CPACK_COMPONENT_CSHARPMODULE_DESCRIPTION "C# Module for GDCM") set(CPACK_COMPONENT_JAVAMODULE_DESCRIPTION "Java Module for GDCM") set(CPACK_COMPONENT_PHPMODULE_DESCRIPTION "PHP Module for GDCM") set(CPACK_COMPONENT_VTKAPPLICATIONS_DESCRIPTION "Command line applications that uses GDCM: gdcmviewer & gdcm2vtk") set(CPACK_COMPONENT_VTKLIBRARIES_DESCRIPTION "Libraries used to build programs with VTK/GDCM") set(CPACK_COMPONENT_VTKHEADERS_DESCRIPTION "C/C++ header files for use with VTK/GDCM") set(CPACK_COMPONENT_VTKPYTHONMODULE_DESCRIPTION "Python Module for VTK/GDCM") set(CPACK_COMPONENT_VTKCSHARPMODULE_DESCRIPTION "C# Module for VTK/GDCM") set(CPACK_COMPONENT_VTKJAVAMODULE_DESCRIPTION "Java Module for VTK/GDCM") set(CPACK_COMPONENT_VTKPHPMODULE_DESCRIPTION "PHP Module for VTK/GDCM") set(CPACK_COMPONENT_PARAVIEWMODULE_DESCRIPTION "ParaView Module for VTK/GDCM") # Put the components into two different groups: "Runtime" and "Development" set(CPACK_COMPONENT_APPLICATIONS_GROUP "Runtime") set(CPACK_COMPONENT_LIBRARIES_GROUP "Development") set(CPACK_COMPONENT_HEADERS_GROUP "Development") set(CPACK_COMPONENT_DEBUGDEVEL_GROUP "Development") set(CPACK_COMPONENT_PYTHONMODULE_GROUP "Runtime") set(CPACK_COMPONENT_CSHARPMODULE_GROUP "Runtime") set(CPACK_COMPONENT_JAVAMODULE_GROUP "Runtime") set(CPACK_COMPONENT_PHPMODULE_GROUP "Runtime") set(CPACK_COMPONENT_VTKAPPLICATIONS_GROUP "Runtime") set(CPACK_COMPONENT_VTKPYTHONMODULE_GROUP "Runtime") set(CPACK_COMPONENT_VTKCSHARPMODULE_GROUP "Runtime") set(CPACK_COMPONENT_VTKJAVAMODULE_GROUP "Runtime") set(CPACK_COMPONENT_VTKPHPMODULE_GROUP "Runtime") set(CPACK_COMPONENT_VTKLIBRARIES_GROUP "Development") set(CPACK_COMPONENT_VTKHEADERS_GROUP "Development") set(CPACK_COMPONENT_PARAVIEWMODULE_GROUP "Runtime") # Expand the "Development" group by default, since we have so few components. # Also, provide this group with a description. if(CMAKE_VERSION VERSION_EQUAL 2.8.3) # The following is needed for CMake 2.8.3 and above to preserve backward compat set(CPACK_MONOLITHIC_INSTALL 1) endif() set(CPACK_COMPONENT_GROUP_DEVELOPMENT_EXPANDED ON) set(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "All of the tools you'll ever need to develop software using GDCM") # It doesn't make sense to install the headers without the libraries # (because you could never use the headers!), so make the headers component # depend on the libraries component. set(CPACK_COMPONENT_HEADERS_DEPENDS Libraries) set(CPACK_COMPONENT_DEBUGDEVEL_DEPENDS Libraries) set(CPACK_COMPONENT_APPLICATIONS_DEPENDS Libraries) set(CPACK_COMPONENT_PYTHONMODULE_DEPENDS Libraries) set(CPACK_COMPONENT_CSHARPMODULE_DEPENDS Libraries) set(CPACK_COMPONENT_JAVAMODULE_DEPENDS Libraries) set(CPACK_COMPONENT_PHPMODULE_DEPENDS Libraries) set(CPACK_COMPONENT_VTKHEADERS_DEPENDS VTKLibraries) set(CPACK_COMPONENT_VTKLIBRARIES_DEPENDS Libraries) set(CPACK_COMPONENT_VTKAPPLICATIONS_DEPENDS VTKLibraries) set(CPACK_COMPONENT_VTKPYTHONMODULE_DEPENDS VTKLibraries) set(CPACK_COMPONENT_VTKCSHARPMODULE_DEPENDS VTKLibraries) set(CPACK_COMPONENT_VTKJAVAMODULE_DEPENDS VTKLibraries) set(CPACK_COMPONENT_VTKPHPMODULE_DEPENDS VTKLibraries) set(CPACK_COMPONENT_PARAVIEWMODULE_DEPENDS VTKLibraries) # Create two installation types with pre-selected components. # The "Developer" installation has just the library and headers, # while the "Full" installation has everything. set(CPACK_ALL_INSTALL_TYPES Full Developer) set(CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything") set(CPACK_COMPONENT_APPLICATIONS_INSTALL_TYPES Full) set(CPACK_COMPONENT_LIBRARIES_INSTALL_TYPES Developer Full) set(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full) set(CPACK_COMPONENT_DEBUGDEVEL_INSTALL_TYPES Developer Full) set(CPACK_COMPONENT_PYTHONMODULE_INSTALL_TYPES Developer Full) set(CPACK_COMPONENT_CSHARPMODULE_INSTALL_TYPES Developer Full) set(CPACK_COMPONENT_JAVAMODULE_INSTALL_TYPES Developer Full) set(CPACK_COMPONENT_PHPMODULE_INSTALL_TYPES Developer Full) set(CPACK_COMPONENT_VTKLIBRARIES_INSTALL_TYPES Developer Full) set(CPACK_COMPONENT_VTKHEADERS_INSTALL_TYPES Developer Full) set(CPACK_COMPONENT_VTKAPPLICATIONS_INSTALL_TYPES Full) set(CPACK_COMPONENT_VTKPYTHONMODULE_INSTALL_TYPES Developer Full) set(CPACK_COMPONENT_VTKCSHARPMODULE_INSTALL_TYPES Developer Full) set(CPACK_COMPONENT_VTKJAVAMODULE_INSTALL_TYPES Developer Full) set(CPACK_COMPONENT_VTKPHPMODULE_INSTALL_TYPES Developer Full) set(CPACK_COMPONENT_PARAVIEWMODULE_INSTALL_TYPES Developer Full) include(CPack) endif() endif() macro(PROCESSONEDIR DIRNAME myoutput) file(GLOB files ${DIRNAME}/* ) foreach(file ${files}) if(IS_DIRECTORY ${file}) if("${file}" MATCHES ".git") #message("${file} is git dir") else() #message("${file} is dir") PROCESSONEDIR(${file} mytests2) list(APPEND ${myoutput} ${mytests2}) endif() else() #message("${file} is file") get_filename_component(filename ${file} NAME) if("${filename}" MATCHES "Test" AND ${filename} MATCHES ".cxx") string(LENGTH ${filename} filename_length) #message("${filename} is test, ${filename_length}") math(EXPR fileend "${filename_length} - 4 - 4") # Need to remove 'Test' and '.cxx' string(SUBSTRING ${filename} 4 ${fileend} classname) #message("${classname} is tested") list(APPEND ${myoutput} ${classname}) endif() endif() endforeach() endmacro() #PROCESSONEDIR( # ${CMAKE_CURRENT_SOURCE_DIR}/Testing/Source/Common # theoutput #) #message("${theoutput}") # For DICOM Q/R testing if(GDCM_BUILD_TESTING) set(GDCM_DICOM_CLIENT_AETITLE "" CACHE STRING "DICOM CLIENT AETITLE") set(GDCM_DICOM_SERVER_AETITLE "" CACHE STRING "DICOM SERVER AETITLE") set(GDCM_DICOM_SERVER_PEER "" CACHE STRING "DICOM SERVER PEER") set(GDCM_DICOM_SERVER_PORT "" CACHE STRING "DICOM SERVER PORT") set(GDCM_DICOM_CLIENT_PORT "" CACHE STRING "DICOM CLIENT PORT") mark_as_advanced( GDCM_DICOM_CLIENT_AETITLE GDCM_DICOM_SERVER_AETITLE GDCM_DICOM_SERVER_PEER GDCM_DICOM_SERVER_PORT GDCM_DICOM_CLIENT_PORT ) endif() #----------------------------------------------------------------------------- # Need to be the last operation: set(GDCM_INCLUDE_PATH "${GDCM_SOURCE_DIR}/Source/Common" "${GDCM_BINARY_DIR}/Source/Common" "${GDCM_SOURCE_DIR}/Source/DataStructureAndEncodingDefinition" "${GDCM_SOURCE_DIR}/Source/MediaStorageAndFileFormat" "${GDCM_SOURCE_DIR}/Source/MessageExchangeDefinition" "${GDCM_SOURCE_DIR}/Source/DataDictionary" "${GDCM_SOURCE_DIR}/Source/InformationObjectDefinition" ) if(GDCM_USE_VTK) set(GDCM_INCLUDE_PATH ${GDCM_INCLUDE_PATH} "${GDCM_SOURCE_DIR}/Utilities/VTK" ) endif() set(GDCM_LIBRARY_DIRS ${LIBRARY_OUTPUT_PATH}) if(GDCM_STANDALONE) add_subdirectory(CMake/ExportConfiguration) endif() gdcm-3.0.22/.clang-tidy000664 001766 001770 00000007671 14517730450 017124 0ustar00mmalaterremmalaterre000000 000000 Checks: '-*, android-*, -android-cloexec-fopen, bugprone-*, -bugprone-narrowing-conversions, -bugprone-sizeof-expression, -bugprone-signed-char-misuse, -bugprone-branch-clone, -bugprone-easily-swappable-parameters, -bugprone-not-null-terminated-result, -bugprone-implicit-widening-of-multiplication-result, -bugprone-exception-escape, -bugprone-suspicious-memory-comparison, -bugprone-assignment-in-if-condition, -bugprone-unhandled-self-assignment, -bugprone-macro-parentheses, -bugprone-undefined-memory-manipulation, -bugprone-parent-virtual-call, -bugprone-reserved-identifier, cert-*, -cert-str34-c, -cert-err58-cpp, -cert-dcl37-c, -cert-dcl51-cpp, -cert-err34-c, -cert-msc30-c, -cert-msc50-cpp, -cert-dcl03-c, -cert-exp42-c, -cert-flp37-c, -cert-oop54-cpp, -cert-err33-c, -cert-msc32-c, -cert-msc51-cpp, clang-analyzer-*, -clang-analyzer-valist.Uninitialized, -clang-analyzer-alpha.clone.CloneChecker, -clang-analyzer-alpha.deadcode.UnreachableCode, -clang-analyzer-optin.cplusplus.VirtualCall, -clang-analyzer-core.StackAddressEscape, -clang-analyzer-deadcode.DeadStores, -clang-analyzer-cplusplus.NewDeleteLeaks, -clang-analyzer-cplusplus.NewDelete, -clang-analyzer-core.UndefinedBinaryOperatorResult, -clang-analyzer-core.CallAndMessage, -clang-analyzer-unix.cstring.NullArg, -clang-analyzer-optin.performance.Padding, -clang-analyzer-core.uninitialized.Assign, -clang-analyzer-security.insecureAPI.rand, -clang-analyzer-security.insecureAPI.strcpy, -clang-analyzer-core.uninitialized.UndefReturn, -clang-analyzer-core.DivideZero, -clang-analyzer-core.NullDereference, google-*, -google-readability-avoid-underscore-in-googletest-name, -google-readability-todo, -google-runtime-int, -google-readability-casting, -google-readability-braces-around-statements, -google-readability-namespace-comments, -google-build-using-namespace, -google-explicit-constructor, -google-default-arguments, -google-readability-function-size, hicpp-*, -hicpp-no-array-decay, -hicpp-avoid-c-arrays, -hicpp-vararg, -hicpp-no-malloc, -hicpp-special-member-functions, -hicpp-use-emplace, -hicpp-use-auto, -hicpp-member-init, -hicpp-deprecated-headers, -hicpp-uppercase-literal-suffix, -hicpp-signed-bitwise, -hicpp-named-parameter, -hicpp-braces-around-statements, -hicpp-exception-baseclass, -hicpp-explicit-conversions, -hicpp-static-assert, -hicpp-multiway-paths-covered, -hicpp-use-equals-default, -hicpp-function-size, misc-*, -misc-no-recursion, -misc-const-correctness, -misc-static-assert, -misc-non-private-member-variables-in-classes, -misc-unconventional-assign-operator, -misc-redundant-expression, performance-*, -performance-unnecessary-value-param, -performance-unnecessary-copy-initialization, readability-*, -readability-magic-numbers, -readability-else-after-return, -readability-identifier-length, -readability-implicit-bool-conversion, -readability-uppercase-literal-suffix, -readability-isolate-declaration, -readability-named-parameter, -readability-simplify-boolean-expr, -readability-suspicious-call-argument, -readability-container-data-pointer, -readability-braces-around-statements, -readability-static-accessed-through-instance, -readability-convert-member-functions-to-static, -readability-redundant-member-init, -readability-non-const-parameter, -readability-inconsistent-declaration-parameter-name, -readability-redundant-string-cstr, -readability-make-member-function-const, -readability-static-definition-in-anonymous-namespace, -readability-function-size, -readability-string-compare, -readability-redundant-preprocessor' CheckOptions: - key: readability-function-cognitive-complexity.IgnoreMacros value: 1 - key: readability-function-cognitive-complexity.Threshold value: 299 - key: bugprone-reserved-identifier.AllowedIdentifiers value: _FILE_OFFSET_BITS gdcm-3.0.22/CMake/000775 001766 001770 00000000000 14517731550 016037 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/CMake/UsePythonTest.cmake000664 001766 001770 00000006722 14517730450 021644 0ustar00mmalaterremmalaterre000000 000000 # Add a python test from a python file # One cannot simply do: # set(ENV{PYTHONPATH} ${LIBRARY_OUTPUT_PATH}) # set(my_test "from test_mymodule import *\;test_mymodule()") # add_test(PYTHON-TEST-MYMODULE python -c ${my_test}) # Since cmake is only transmitting the ADD_TEST line to ctest thus you are losing # the env var. The only way to store the env var is to physically write in the cmake script # whatever PYTHONPATH you want and then add the test as 'cmake -P python_test.cmake' # # Usage: # set_source_files_properties(test.py PROPERTIES PYTHONPATH # "${LIBRARY_OUTPUT_PATH}:${VTK_DIR}") # ADD_PYTHON_TEST(PYTHON-TEST test.py) # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # Need python interpreter: find_package(PythonInterp ${GDCM_DEFAULT_PYTHON_VERSION} REQUIRED) mark_as_advanced(PYTHON_EXECUTABLE) macro(ADD_PYTHON_TEST TESTNAME FILENAME) set(_sep ":") if(WIN32) set(_sep "\\;") endif() get_source_file_property(loc ${FILENAME} LOCATION) get_source_file_property(pyenv ${FILENAME} PYTHONPATH) if(CMAKE_CONFIGURATION_TYPES) # I cannot use CMAKE_CFG_INTDIR since it expand to "$(OutDir)" if(pyenv) set(pyenv "${pyenv};${LIBRARY_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}") else() set(pyenv ${LIBRARY_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}) #set(pyenv ${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}) #set(pyenv ${LIBRARY_OUTPUT_PATH}/${CMAKE_CONFIG_TYPE}) #set(pyenv ${LIBRARY_OUTPUT_PATH}/\${CMAKE_CONFIG_TYPE}) endif() else() if(pyenv) set(pyenv ${pyenv}${_sep}${LIBRARY_OUTPUT_PATH}) else() set(pyenv ${LIBRARY_OUTPUT_PATH}) endif() endif() string(REGEX REPLACE ";" " " wo_semicolumn "${ARGN}") file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${TESTNAME}.cmake " set(ENV{PYTHONPATH} ${pyenv}${_sep}\$ENV{PYTHONPATH}) set(ENV{LD_LIBRARY_PATH} ${pyenv}${_sep}\$ENV{LD_LIBRARY_PATH}) message(\"pyenv is: ${pyenv}\") message(\"py_exec is: ${PYTHON_EXECUTABLE}\") message(\"py_found is: ${PYTHONINTERP_FOUND}\") execute_process( COMMAND ${PYTHON_EXECUTABLE} ${loc} ${wo_semicolumn} RESULT_VARIABLE import_res OUTPUT_VARIABLE import_output ERROR_VARIABLE import_output ) # Pass the output back to ctest if(import_output) message(\"import_output is: \${import_output}\") endif() if(import_res) message(\"Import res: \${import_res}\") message(\"py_exec is: \${PYTHON_EXECUTABLE}\") message(\"loc is: \${loc}\") message(\"wo is: \${wo_semicolumn}\") execute_process( COMMAND ${PYTHON_EXECUTABLE} ${loc} ${wo_semicolumn} RESULT_VARIABLE import2_res OUTPUT_VARIABLE import2_output ERROR_VARIABLE import2_output ) message(\"\${import2_output}\") message(SEND_ERROR \"\${import_res}\") endif() " ) add_test(NAME ${TESTNAME} COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/${TESTNAME}.cmake) endmacro() # Byte compile recursively a directory (DIRNAME) macro(ADD_PYTHON_COMPILEALL_TEST DIRNAME) # First get the path: get_filename_component(temp_path "${PYTHON_LIBRARIES}" PATH) # Find the python script: get_filename_component(PYTHON_COMPILE_ALL_PY "${temp_path}/../compileall.py" ABSOLUTE) # add test, use DIRNAME to create uniq name for the test: add_test(COMPILE_ALL-${DIRNAME} ${PYTHON_EXECUTABLE} "${PYTHON_COMPILE_ALL_PY}" -q ${DIRNAME}) endmacro() gdcm-3.0.22/CMake/FindDCMTK.cmake000664 001766 001770 00000010033 14517730450 020477 0ustar00mmalaterremmalaterre000000 000000 # - find DCMTK libraries and applications # # DCMTK_INCLUDE_DIRS - Directories to include to use DCMTK # DCMTK_LIBRARIES - Files to link against to use DCMTK # DCMTK_FOUND - If false, don't try to use DCMTK # DCMTK_DIR - (optional) Source directory for DCMTK # # DCMTK_DIR can be used to make it simpler to find the various include # directories and compiled libraries if you've just compiled it in the # source tree. Just set it to the root of the tree where you extracted # the source (default to /usr/include/dcmtk/) #============================================================================= # Copyright 2004-2009 Kitware, Inc. # Copyright 2009-2011 Mathieu Malaterre # Copyright 2010 Thomas Sondergaard # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. # # This software is distributed WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= # (To distributed this file outside of CMake, substitute the full # License text for the above reference.) # # Written for VXL by Amitha Perera. # Upgraded for GDCM by Mathieu Malaterre. # Modified for EasyViz by Thomas Sondergaard. # if(NOT DCMTK_FOUND AND NOT DCMTK_DIR) set(DCMTK_DIR "/usr/include/dcmtk/" CACHE PATH "Root of DCMTK source tree (optional).") mark_as_advanced(DCMTK_DIR) endif() foreach(lib dcmdata dcmimage dcmimgle dcmjpeg dcmnet dcmpstat dcmqrdb dcmsign dcmsr dcmtls ijg12 ijg16 ijg8 ofstd) find_library(DCMTK_${lib}_LIBRARY ${lib} PATHS ${DCMTK_DIR}/${lib}/libsrc ${DCMTK_DIR}/${lib}/libsrc/Release ${DCMTK_DIR}/${lib}/libsrc/Debug ${DCMTK_DIR}/${lib}/Release ${DCMTK_DIR}/${lib}/Debug ${DCMTK_DIR}/lib) mark_as_advanced(DCMTK_${lib}_LIBRARY) if(DCMTK_${lib}_LIBRARY) list(APPEND DCMTK_LIBRARIES ${DCMTK_${lib}_LIBRARY}) endif() endforeach() set(DCMTK_config_TEST_HEADER osconfig.h) set(DCMTK_dcmdata_TEST_HEADER dctypes.h) set(DCMTK_dcmimage_TEST_HEADER dicoimg.h) set(DCMTK_dcmimgle_TEST_HEADER dcmimage.h) set(DCMTK_dcmjpeg_TEST_HEADER djdecode.h) set(DCMTK_dcmnet_TEST_HEADER assoc.h) set(DCMTK_dcmpstat_TEST_HEADER dcmpstat.h) set(DCMTK_dcmqrdb_TEST_HEADER dcmqrdba.h) set(DCMTK_dcmsign_TEST_HEADER sicert.h) set(DCMTK_dcmsr_TEST_HEADER dsrtree.h) set(DCMTK_dcmtls_TEST_HEADER tlslayer.h) set(DCMTK_ofstd_TEST_HEADER ofstdinc.h) foreach(dir config dcmdata dcmimage dcmimgle dcmjpeg dcmnet dcmpstat dcmqrdb dcmsign dcmsr dcmtls ofstd) find_path(DCMTK_${dir}_INCLUDE_DIR ${DCMTK_${dir}_TEST_HEADER} PATHS ${DCMTK_DIR}/${dir}/include ${DCMTK_DIR}/${dir} ${DCMTK_DIR}/include/${dir}) mark_as_advanced(DCMTK_${dir}_INCLUDE_DIR) if(DCMTK_${dir}_INCLUDE_DIR) list(APPEND DCMTK_INCLUDE_DIRS ${DCMTK_${dir}_INCLUDE_DIR}) endif() endforeach() if(WIN32) list(APPEND DCMTK_LIBRARIES netapi32 wsock32) endif() if(DCMTK_ofstd_INCLUDE_DIR) get_filename_component(DCMTK_dcmtk_INCLUDE_DIR ${DCMTK_ofstd_INCLUDE_DIR} PATH CACHE) list(APPEND DCMTK_INCLUDE_DIRS ${DCMTK_dcmtk_INCLUDE_DIR}) mark_as_advanced(DCMTK_dcmtk_INCLUDE_DIR) endif() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(DCMTK DEFAULT_MSG DCMTK_config_INCLUDE_DIR DCMTK_ofstd_INCLUDE_DIR DCMTK_ofstd_LIBRARY DCMTK_dcmdata_INCLUDE_DIR DCMTK_dcmdata_LIBRARY DCMTK_dcmimgle_INCLUDE_DIR DCMTK_dcmimgle_LIBRARY) # Compatibility: This variable is deprecated set(DCMTK_INCLUDE_DIR ${DCMTK_INCLUDE_DIRS}) foreach(executable dcmdump dcmdjpeg dcmdrle dcmdjpls storescu echoscu movescu findscu dcmqrscp) string(TOUPPER ${executable} EXECUTABLE) find_program(DCMTK_${EXECUTABLE}_EXECUTABLE ${executable} ${DCMTK_DIR}/bin) mark_as_advanced(DCMTK_${EXECUTABLE}_EXECUTABLE) endforeach() gdcm-3.0.22/CMake/FindUUID.cmake000664 001766 001770 00000003305 14517730450 020407 0ustar00mmalaterremmalaterre000000 000000 # - Find UUID # Find the native UUID includes and library # This module defines # UUID_INCLUDE_DIR, where to find jpeglib.h, etc. # UUID_LIBRARIES, the libraries needed to use UUID. # UUID_FOUND, If false, do not try to use UUID. # also defined, but not for general use are # UUID_LIBRARY, where to find the UUID library. # # Copyright (c) 2006-2016 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # On Mac OS X the uuid functions are in the System library. if(APPLE) set(UUID_LIBRARY_VAR System) else() # Linux type: set(UUID_LIBRARY_VAR uuid) endif() find_library(UUID_LIBRARY NAMES ${UUID_LIBRARY_VAR} PATHS /lib /usr/lib /usr/local/lib ) # Must be *after* the lib itself set(CMAKE_FIND_FRAMEWORK_SAVE ${CMAKE_FIND_FRAMEWORK}) set(CMAKE_FIND_FRAMEWORK NEVER) find_path(UUID_INCLUDE_DIR uuid/uuid.h /usr/local/include /usr/include ) if (UUID_LIBRARY AND UUID_INCLUDE_DIR) set(UUID_LIBRARIES ${UUID_LIBRARY}) set(UUID_FOUND "YES") else () set(UUID_FOUND "NO") endif () if (UUID_FOUND) if (NOT UUID_FIND_QUIETLY) message(STATUS "Found UUID: ${UUID_LIBRARIES}") endif () else () if (UUID_FIND_REQUIRED) message( "library: ${UUID_LIBRARY}" ) message( "include: ${UUID_INCLUDE_DIR}" ) message(FATAL_ERROR "Could not find UUID library") endif () endif () # Deprecated declarations. #set (NATIVE_UUID_INCLUDE_PATH ${UUID_INCLUDE_DIR} ) #get_filename_component (NATIVE_UUID_LIB_PATH ${UUID_LIBRARY} PATH) mark_as_advanced( UUID_LIBRARY UUID_INCLUDE_DIR ) set(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_SAVE}) gdcm-3.0.22/CMake/CMakeDetermineCSharpCompiler.cmake000664 001766 001770 00000004534 14517730450 024456 0ustar00mmalaterremmalaterre000000 000000 # determine the compiler to use for CSharp programs # NOTE, a generator may set CMAKE_CSharp_COMPILER before # loading this file to force a compiler. # use environment variable CSHARP first if defined by user, next use # the cmake variable CMAKE_GENERATOR_CSHARP which can be defined by a generator # as a default compiler # # Sets the following variables: # CMAKE_CSharp_COMPILER # CMAKE_AR # CMAKE_RANLIB # CMAKE_COMPILER_IS_GNUGNAT if(NOT CMAKE_CSharp_COMPILER) # prefer the environment variable CSHARP if($ENV{CSHARP} MATCHES ".+") get_filename_component(CMAKE_CSharp_COMPILER_INIT $ENV{CSHARP} PROGRAM PROGRAM_ARGS CMAKE_CSharp_FLAGS_ENV_INIT) if(CMAKE_CSharp_FLAGS_ENV_INIT) set(CMAKE_CSharp_COMPILER_ARG1 "${CMAKE_CSharp_FLAGS_ENV_INIT}" CACHE STRING "First argument to CSharp compiler") endif() if(NOT EXISTS ${CMAKE_CSharp_COMPILER_INIT}) message(FATAL_ERROR "Could not find compiler set in environment variable CSHARP:\n$ENV{CSHARP}.") endif() endif() # next prefer the generator-specified compiler if(CMAKE_GENERATOR_CSHARP) if(NOT CMAKE_CSharp_COMPILER_INIT) set(CMAKE_CSharp_COMPILER_INIT ${CMAKE_GENERATOR_CSHARP}) endif() endif() # finally list compilers to try if(CMAKE_CSharp_COMPILER_INIT) set(CMAKE_CSharp_COMPILER_LIST ${CMAKE_CSharp_COMPILER_INIT}) else() # Known compilers: # mcs/gmcs/smcs/dmcs # mono # see: https://www.mono-project.com/docs/about-mono/languages/csharp/ # csc: DotNet set(CMAKE_CSharp_COMPILER_LIST csc mcs gmcs smcs dmcs) endif() # Find the compiler. find_program(CMAKE_CSharp_COMPILER NAMES ${CMAKE_CSharp_COMPILER_LIST} DOC "CSharp compiler") if(CMAKE_CSharp_COMPILER_INIT AND NOT CMAKE_CSharp_COMPILER) set(CMAKE_CSharp_COMPILER "${CMAKE_CSharp_COMPILER_INIT}" CACHE FILEPATH "CSharp compiler" FORCE) endif() endif() mark_as_advanced(CMAKE_CSharp_COMPILER) get_filename_component(COMPILER_LOCATION "${CMAKE_CSharp_COMPILER}" PATH) #include(CMakeFindBinUtils) # configure variables set in this file for fast reload later on configure_file( #${CMAKE_ROOT}/Modules/CMakeCSharpCompiler.cmake.in ${CMAKE_MODULE_PATH}/CMakeCSharpCompiler.cmake.in # "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCSharpCompiler.cmake" ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCSharpCompiler.cmake @ONLY ) set(CMAKE_CSharp_COMPILER_ENV_VAR "CSC") gdcm-3.0.22/CMake/InstallMacros.cmake000664 001766 001770 00000005042 14517730450 021613 0ustar00mmalaterremmalaterre000000 000000 # # This module install PDB files. # # Based on users posts: # http://www.cmake.org/pipermail/cmake/2007-October/016924.html # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # macro(install_swig_module module_name module_type) # The following trick permits installation of module to the right destination: # binary path for dll (on windows) # library for non-dll platform if(WIN32) set(MODDST ${GDCM_INSTALL_BIN_DIR}) else() set(MODDST ${GDCM_INSTALL_LIB_DIR}) endif() string(TOUPPER ${module_type}Module MODTYPE) set(MODDIR GDCM_INSTALL_${MODTYPE}_DIR) # if user sets a GDCM_INSTALL_PYTHONMODULE_DIR if(${MODDIR}) set(MODDST "${${MODDIR}}") endif() if(NOT GDCM_INSTALL_NO_LIBRARIES) install(TARGETS ${SWIG_MODULE_${module_name}_REAL_NAME} RUNTIME DESTINATION ${MODDST} COMPONENT ${module_type}Module LIBRARY DESTINATION ${MODDST} COMPONENT ${module_type}Module ) endif() endmacro() macro(install_library library) if(NOT GDCM_INSTALL_NO_LIBRARIES) # Runtime install(TARGETS ${library} EXPORT ${GDCM_TARGETS_NAME} RUNTIME DESTINATION ${GDCM_INSTALL_BIN_DIR} COMPONENT Applications LIBRARY DESTINATION ${GDCM_INSTALL_LIB_DIR} COMPONENT Libraries ${NAMELINK_SKIP} INCLUDES DESTINATION ${GDCM_INSTALL_INCLUDE_DIR} ARCHIVE DESTINATION ${GDCM_INSTALL_LIB_DIR} COMPONENT DebugDevel ) # need recent cmake: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cbe7e8fa #export(EXPORT ${GDCM_TARGETS_NAME} APPEND FILE "${CMAKE_CURRENT_BINARY_DIR}/foo.cmake") #Development if(NAMELINK_ONLY) install(TARGETS ${library} EXPORT ${GDCM_TARGETS_NAME} LIBRARY DESTINATION ${GDCM_INSTALL_LIB_DIR} COMPONENT DebugDevel ${NAMELINK_ONLY} ) endif() endif() endmacro() macro (install_pdb library) if(BUILD_SHARED_LIBS) if (MSVC) install ( FILES "$" DESTINATION "${GDCM_INSTALL_BIN_DIR}" COMPONENT DebugDevel CONFIGURATIONS Debug RelWithDebInfo ) endif () endif () endmacro () # At least one argument is required macro (install_includes glob_expression) if(NOT GDCM_INSTALL_NO_DEVELOPMENT) file(GLOB header_files ${glob_expression} ${ARGN}) install(FILES ${header_files} DESTINATION ${GDCM_INSTALL_INCLUDE_DIR} COMPONENT Headers ) endif() endmacro () gdcm-3.0.22/CMake/Toolchain-gcc-arm-linux-gnueabi.cmake000664 001766 001770 00000002565 14517730450 025043 0ustar00mmalaterremmalaterre000000 000000 # http://wiki.debian.org/BuildingCrossCompilers # Usage: # # $ cmake ../gdcm -DCMAKE_TOOLCHAIN_FILE=../gdcm/CMake/Toolchain-gcc-arm-linux-gnueabi.cmake # # For gdcm you need at least the following three packages (squeeze suite) # # fix /etc/apt/source.lists # + deb http://www.emdebian.org/debian squeeze main # # // prebuilt Emdebian project # sudo apt-get install g++-4.4-arm-linux-gnueabi # # sudo xapt -S squeeze -M http://ftp.fr.debian.org/debian/ -a armel -m zlib1g-dev uuid-dev libexpat1-dev # # qemu-arm -L /usr/arm-linux-gnueabi/ ./bin/gdcminfo test.acr # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # the name of the target operating system set(CMAKE_SYSTEM_NAME Linux) # which compilers to use for C and C++ set(CMAKE_C_COMPILER arm-linux-gnueabi-gcc-4.4) set(CMAKE_CXX_COMPILER arm-linux-gnueabi-g++-4.4) # here is the target environment located set(CMAKE_FIND_ROOT_PATH /usr/arm-linux-gnueabi) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search # programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) gdcm-3.0.22/CMake/CMakeCSharpCompiler.cmake.in000664 001766 001770 00000003750 14517730450 023225 0ustar00mmalaterremmalaterre000000 000000 set(CMAKE_CSharp_COMPILER "@CMAKE_CSharp_COMPILER@") set(CMAKE_CSharp_COMPILER_ARG1 "@CMAKE_CSharp_COMPILER_ARG1@") #set(CMAKE_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@") #set(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@") #set(CMAKE_AR "@CMAKE_AR@") #set(CMAKE_RANLIB "@CMAKE_RANLIB@") # Should none on Win32, and 'mono' on unix set(CMAKE_CSharp_RUNTIME "@CMAKE_CSharp_RUNTIME@") set(CMAKE_CSharp_ARCHIVE "@CMAKE_CSharp_ARCHIVE@") # gacutil ?? set(CMAKE_CSharp_COMPILER_LOADED 1) set(CMAKE_CSharp_COMPILER_ENV_VAR "CSC") set(CMAKE_CSharp_SOURCE_FILE_EXTENSIONS cs;CS) set(CMAKE_CSharp_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) set(CMAKE_CSharp_LINKER_PREFERENCE 20) set(CMAKE_STATIC_LIBRARY_PREFIX_CSharp "") set(CMAKE_STATIC_LIBRARY_SUFFIX_CSharp ".dll") set(CMAKE_SHARED_LIBRARY_PREFIX_CSharp "") set(CMAKE_SHARED_LIBRARY_SUFFIX_CSharp ".dll") # FIXME ... where should it go #set(CMAKE_EXECUTABLE_SUFFIX ".exe") set(CMAKE_STATIC_LIBRARY_CREATE_CSharp_FLAGS "/target:library") set(CMAKE_STATIC_LIBRARY_CSharp_FLAGS "/target:library") #CMAKE_STATIC_LIBRARY_CSharp_FLAGS # partial library set(CMAKE_MODULE_LIBRARY_CREATE_CSharp_FLAGS "/target:module") set(CMAKE_MODULE_LIBRARY_CSharp_FLAGS "/target:module") # static set(CMAKE_SHARED_LIBRARY_CREATE_CSharp_FLAGS "/target:library") set(CMAKE_SHARED_LIBRARY_CSharp_FLAGS "/target:library") #set(CMAKE_SHARED_LIBRARY_LINK_CSharp_FLAGS "-r") #set(CMAKE_SHARED_LIBRARY_RUNTIME_CSharp_FLAG "-r") #set(CMAKE_SHARED_LIBRARY_LINK_CSharp_FLAGS "-r") # FIXME: CMAKE_LINK_LIBRARY_FILE_FLAG always add a space, so I cannot simply use "/r" because # I would need to remove the space, but instead use the -r that tolerate a space #set(CMAKE_LINK_LIBRARY_FILE_FLAG "") #set(CMAKE_LINK_LIBRARY_FLAG "-r") #set(CMAKE_CREATE_WIN32_EXE /target:winexe) #set(CMAKE_CREATE_CONSOLE_EXE /target:exe) #set(CMAKE_LINK_LIBRARY_FLAG "-l") #set(CMAKE_EXECUTABLE_RUNTIME_CSharp_FLAG "-foo") if(WIN32) else() set(CMAKE_CSHARP_INTERPRETER ${MONO_EXECUTABLE}) endif() gdcm-3.0.22/CMake/FindKAKADU.cmake000664 001766 001770 00000000620 14517730450 020576 0ustar00mmalaterremmalaterre000000 000000 # # this module looks for KAKADu # http://www.kakadusoftware.com/ # # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # find_program(KDU_EXPAND_EXECUTABLE kdu_expand ) mark_as_advanced( KDU_EXPAND_EXECUTABLE ) gdcm-3.0.22/CMake/Toolchain-gcc-m32.cmake000664 001766 001770 00000002371 14517730450 022113 0ustar00mmalaterremmalaterre000000 000000 # http://www.cmake.org/Wiki/CmakeMingw # Usage: # # $ cmake ../trunk -DCMAKE_TOOLCHAIN_FILE=../trunk/CMake/Toolchain-mingw32.cmake # # For gdcm you need at least the following three package (2008/08/19): # # apt-cross --arch i386 -i zlib1g-dev # apt-cross --arch i386 -i uuid-dev # apt-cross --arch i386 -i libexpat1-dev # # Do not forget to set to on the following: # GDCM_USE_SYSTEM_EXPAT / GDCM_USE_SYSTEM_ZLIB / GDCM_USE_SYSTEM_UUID # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # the name of the target operating system set(CMAKE_SYSTEM_NAME Linux) # which compilers to use for C and C++ set(CMAKE_C_COMPILER gcc) set(CMAKE_C_FLAGS -m32) set(CMAKE_CXX_COMPILER g++) set(CMAKE_CXX_FLAGS -m32) # here is the target environment located set(CMAKE_FIND_ROOT_PATH /usr/i486-linux-gnu ) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search # programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) gdcm-3.0.22/CMake/FindMONO.cmake000664 001766 001770 00000005026 14517730450 020413 0ustar00mmalaterremmalaterre000000 000000 # - Find MONO # This module finds an installed MONO. It sets the following variables: # MONO_FOUND - set to true if MONO is found # MONO_DIR - the directory where swig is installed # MONO_EXECUTABLE - the path to the swig executable # MONO_VERSION - the version number of the swig executable # # All information are collected from the MONO_EXECUTABLE so the # version to be found can be changed from the command line by # means of setting MONO_EXECUTABLE # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # set(MONO_FOUND FALSE) # apt-get install mono-jit mono-mcs mono-gac mono-gmcs # eg. # $ gmcs HelloWorld.cs # $ mono HelloWorld.exe # TODO: what are 'cscc' and 'ilrun' ? find_program(MONO_EXECUTABLE mono) find_program(MCS_EXECUTABLE mcs) # 1.0 (mono >= 2.11 => target all version) find_program(GMCS_EXECUTABLE mono-csc gmcs) # 2.0 find_program(SMCS_EXECUTABLE smcs) # 3.0 find_program(DMCS_EXECUTABLE dmcs) # 4.0 # mono-gac: /usr/bin/gacutil find_program(GACUTIL_EXECUTABLE gacutil) # gacutil - Global Assembly Cache management utility. # mono-1.0-devel: /usr/bin/ilasm find_program(ILASM_EXECUTABLE ilasm) # ilasm, ilasm2 - Mono IL assembler # mono-1.0-devel: /usr/bin/sn find_program(SN_EXECUTABLE sn) # sn - Digitally sign/verify/compare strongnames on CLR assemblies. # We decide to declare mono found when both interpreter and compiler 1.0 are found. if(MONO_EXECUTABLE AND MCS_EXECUTABLE) set(MONO_FOUND TRUE) # TODO get version # TODO: there are multiple 'mcs' command on unix, need to check this is Mono: # mcs --version should return "Mono C# compiler version 1.9.1.0" elseif(MONO_EXECUTABLE AND GMCS_EXECUTABLE) set(MONO_FOUND TRUE) elseif(MONO_EXECUTABLE AND SMCS_EXECUTABLE) set(MONO_FOUND TRUE) elseif(MONO_EXECUTABLE AND DMCS_EXECUTABLE) set(MONO_FOUND TRUE) endif() if(NOT MONO_FOUND) if(NOT MONO_FIND_QUIETLY) if(MONO_FIND_REQUIRED) message(FATAL_ERROR "MONO was not found. Please specify mono/mcs executable location") else() message(STATUS "MONO was not found. Please specify mono/mcs executable location") endif() endif() endif() get_filename_component(current_list_path ${CMAKE_CURRENT_LIST_FILE} PATH) set(MONO_USE_FILE ${current_list_path}/UseMONO.cmake) mark_as_advanced( MONO_EXECUTABLE MCS_EXECUTABLE GMCS_EXECUTABLE SMCS_EXECUTABLE DMCS_EXECUTABLE GACUTIL_EXECUTABLE ILASM_EXECUTABLE SN_EXECUTABLE ) gdcm-3.0.22/CMake/FindPHP5.cmake000664 001766 001770 00000002532 14517730450 020356 0ustar00mmalaterremmalaterre000000 000000 # - Find PHP5 # This module finds if PHP5 is installed and determines where the include files # and libraries are. It also determines what the name of the library is. This # code sets the following variables: # # PHP5_INCLUDE_PATH = path to where php.h can be found # PHP5_EXECUTABLE = full path to the php5 binary # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # set(PHP5_POSSIBLE_INCLUDE_PATHS /usr/include/php5 /usr/local/include/php5 /usr/include/php /usr/local/include/php /usr/local/apache/php ) set(PHP5_POSSIBLE_LIB_PATHS /usr/lib ) find_path(PHP5_FOUND_INCLUDE_PATH main/php.h ${PHP5_POSSIBLE_INCLUDE_PATHS}) if(PHP5_FOUND_INCLUDE_PATH) set(php5_paths "${PHP5_POSSIBLE_INCLUDE_PATHS}") foreach(php5_path Zend main TSRM) set(php5_paths ${php5_paths} "${PHP5_FOUND_INCLUDE_PATH}/${php5_path}") endforeach() set(PHP5_INCLUDE_PATH "${php5_paths}" CACHE INTERNAL "PHP5 include paths") endif() find_program(PHP5_EXECUTABLE NAMES php5 php ) mark_as_advanced( PHP5_EXECUTABLE PHP5_FOUND_INCLUDE_PATH ) include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(PHP5 DEFAULT_MSG PHP5_EXECUTABLE PHP5_INCLUDE_PATH) gdcm-3.0.22/CMake/FindJavaProperties.cmake000664 001766 001770 00000005513 14517730450 022602 0ustar00mmalaterremmalaterre000000 000000 # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # This module will populate the following cmake variables: # JavaProp_JAVA_LIBRARY_PATH # JavaProp_OS_ARCH # JavaProp_OS_NAME # JavaProp_JAVA_HOME # JavaProp_SUN_BOOT_LIBRARY_PATH # JavaProp_PATH_SEPARATOR # JavaProp_SUN_ARCH_DATA_MODEL # I can't get FindJNI.cmake to work, so instead re-write one more robust # which only requires javac and java being in the PATH get_filename_component(current_list_path ${CMAKE_CURRENT_LIST_FILE} PATH) find_package(Java 1.5 REQUIRED) # need to re-run every time the setting for Java has changed: # There is technically one caveat still, when one only modify # Java_JAVA_EXECUTABLE from cmake-gui, everything is re-run properly except the # FIND_PATH for jar and javac if(JavaProp_JAVA_HOME) get_filename_component(javarealpath ${Java_JAVA_EXECUTABLE} REALPATH ) get_filename_component(javahomesubdir ${JavaProp_JAVA_HOME} PATH ) string(REGEX MATCH "${javahomesubdir}" outputvar "${javarealpath}" ) if(NOT outputvar) message(STATUS "Need to re-execute JavaProp: ${outputvar}") file(REMOVE ${CMAKE_BINARY_DIR}/GetSystemProperty.class ) endif() endif() # For some reason I have to use two execute_process instead of a chained one... if(${current_list_path}/GetSystemProperty.java IS_NEWER_THAN ${CMAKE_BINARY_DIR}/GetSystemProperty.class) #message("${current_list_path}/GetSystemProperty.java") #message("${CMAKE_CURRENT_BINARY_DIR}/GetSystemProperty.class") execute_process( COMMAND ${Java_JAVAC_EXECUTABLE} -source ${GDCM_JAVA_SOURCE_VERSION} -target ${GDCM_JAVA_TARGET_VERSION} ${current_list_path}/GetSystemProperty.java -d ${CMAKE_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) # populate the following list of java properties into CMake properties: set(JAVA_PROPERTY_LIST java.library.path os.arch os.name java.home sun.boot.library.path path.separator # : / ; sun.arch.data.model # 32 / 64 ) foreach(property ${JAVA_PROPERTY_LIST}) string(TOUPPER ${property} property_upper) string(REPLACE "." "_" property_cmake_name ${property_upper}) execute_process( COMMAND ${Java_JAVA_EXECUTABLE} GetSystemProperty ${property} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_VARIABLE ${property_cmake_name} OUTPUT_STRIP_TRAILING_WHITESPACE ) #message(STATUS "${property} : ${property_cmake_name} : ${${property_cmake_name}}") set(JavaProp_${property_cmake_name} ${${property_cmake_name}} CACHE STRING "Java Prop Value for: ${property}" FORCE ) mark_as_advanced( JavaProp_${property_cmake_name} ) endforeach() endif() gdcm-3.0.22/CMake/FindSOCKET++.cmake000664 001766 001770 00000001642 14517730450 020761 0ustar00mmalaterremmalaterre000000 000000 # - Find socket++ # Find the native socket++ headers and libraries. # This module defines # SOCKETXX_INCLUDE_DIRS - the json include directory # SOCKETXX_LIBRARIES - the libraries needed to use json # SOCKETXX_FOUND - system has the json library # # Copyright (c) 2013 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. find_path(SOCKETXX_INCLUDE_DIR socket++.h /usr/include/socket++ ) find_library(SOCKETXX_LIBRARY NAMES Papyrus3) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(SOCKETXX DEFAULT_MSG SOCKETXX_LIBRARY SOCKETXX_INCLUDE_DIR ) if(SOCKETXX_FOUND) set(SOCKETXX_LIBRARIES ${SOCKETXX_LIBRARY}) set(SOCKETXX_INCLUDE_DIRS ${SOCKETXX_INCLUDE_DIR}) endif() mark_as_advanced( SOCKETXX_LIBRARY SOCKETXX_INCLUDE_DIR ) gdcm-3.0.22/CMake/dcmqrscp.cfg.in000664 001766 001770 00000000772 14517730450 020745 0ustar00mmalaterremmalaterre000000 000000 # http://support.dcmtk.org/docs/dcmqrscp.html # http://support.dcmtk.org/docs/file_dcmqrset.html NetworkType = "tcp" NetworkTCPPort = 5679 MaxPDUSize = 16384 MaxAssociations = 16 Display = "no" HostTable BEGIN gdcmdash = (GDCMDASH, @DCMQRSCP_HOSTNAME@, @DCMQRSCP_PORT@) gdcmcompany = gdcmdash HostTable END VendorTable BEGIN "GDCM Company" = gdcmcompany VendorTable END AETable BEGIN GDCM_STORE @DCMQRSCP_DIRECTORY@/GDCM_STORE RW (9, 1024mb) gdcmcompany AETable END gdcm-3.0.22/CMake/CMakeTestCSharpCompiler.cmake000664 001766 001770 00000004425 14517730450 023460 0ustar00mmalaterremmalaterre000000 000000 # This file is used by EnableLanguage in cmGlobalGenerator to # determine that that selected CShapr compiler can actually compile # and link the most basic of programs. If not, a fatal error # is set and cmake stops processing commands and will not generate # any makefiles or projects. if(NOT CMAKE_CSharp_COMPILER_WORKS) message(STATUS "Check for working CSharp compiler: ${CMAKE_CSharp_COMPILER}") file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCSharpCompiler.cs "class Dummy {\n" "static void Main() {\n" "}\n}\n") try_compile(CMAKE_CSharp_COMPILER_WORKS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCSharpCompiler.cs OUTPUT_VARIABLE OUTPUT) set(C_TEST_WAS_RUN 1) endif() if(NOT CMAKE_CSharp_COMPILER_WORKS) message(STATUS "Check for working CSharp compiler: ${CMAKE_CSharp_COMPILER} -- broken") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the CSharp compiler works failed with " "the following output:\n${OUTPUT}\n\n") message(FATAL_ERROR "The CSharp compiler \"${CMAKE_CSharp_COMPILER}\" " "is not able to compile a simple test program.\nIt fails " "with the following output:\n ${OUTPUT}\n\n" "CMake will not be able to correctly generate this project.") else() if(C_TEST_WAS_RUN) message(STATUS "Check for working CSharp compiler: ${CMAKE_CSharp_COMPILER} -- works") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the CSharp compiler works passed with " "the following output:\n${OUTPUT}\n\n") endif() set(CMAKE_CSharp_COMPILER_WORKS 1 CACHE INTERNAL "") if(CMAKE_CSharp_COMPILER_FORCED) # The compiler configuration was forced by the user. # Assume the user has configured all compiler information. else() # Try to identify the ABI and configure it into CMakeCSharpCompiler.cmake include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake) CMAKE_DETERMINE_COMPILER_ABI(C ${CMAKE_ROOT}/Modules/CMakeCSharpCompilerABI.c) configure_file( #${CMAKE_ROOT}/Modules/CMakeCSharpCompiler.cmake.in ${CMAKE_MODULE_PATH}/CMakeCSharpCompiler.cmake.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCSharpCompiler.cmake @ONLY ) endif() endif() gdcm-3.0.22/CMake/Toolchain-mingw32.cmake000664 001766 001770 00000002162 14517730450 022244 0ustar00mmalaterremmalaterre000000 000000 # http://www.cmake.org/Wiki/CmakeMingw # Usage: # # mingw32 does not seems to be updated in Debian, switch to mingw-w64 target # i686 instead: # # $ sudo apt-get install g++-mingw-w64-i686 # $ cmake -DCMAKE_TOOLCHAIN_FILE=../gdcm/CMake/Toolchain-mingw32.cmake ../gdcm # # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # the name of the target operating system set(CMAKE_SYSTEM_NAME Windows) # which compilers to use for C and C++ set(CMAKE_C_COMPILER i686-w64-mingw32-gcc) set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++) set(CMAKE_RC_COMPILER i686-w64-mingw32-windres) # here is the target environment located set(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search # programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) gdcm-3.0.22/CMake/ExportConfiguration/000775 001766 001770 00000000000 14517731550 022050 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/CMake/ExportConfiguration/CMakeLists.txt000664 001766 001770 00000007710 14517730450 024613 0ustar00mmalaterremmalaterre000000 000000 ### Build the configuration file for external projects using GDCM and cmake: configure_file( GDCMConfig.cmake.in ${GDCM_BINARY_DIR}/GDCMConfig.cmake @ONLY ) install( FILES ${GDCM_BINARY_DIR}/GDCMConfig.cmake DESTINATION ${GDCM_INSTALL_PACKAGE_DIR} COMPONENT Headers ) configure_file( GDCMConfigVersion.cmake.in ${GDCM_BINARY_DIR}/GDCMConfigVersion.cmake @ONLY ) install( FILES ${GDCM_BINARY_DIR}/GDCMConfigVersion.cmake DESTINATION ${GDCM_INSTALL_PACKAGE_DIR} COMPONENT Headers ) configure_file( UseGDCM.cmake.in ${GDCM_BINARY_DIR}/UseGDCM.cmake @ONLY ) install( FILES ${GDCM_BINARY_DIR}/UseGDCM.cmake DESTINATION ${GDCM_INSTALL_PACKAGE_DIR} COMPONENT Headers ) # install all targets referenced as ${GDCM_TARGETS_NAME} if(GDCM_STANDALONE) install(EXPORT ${GDCM_TARGETS_NAME} DESTINATION ${GDCM_INSTALL_PACKAGE_DIR} COMPONENT Headers) endif() # [Prevent viral CMake dep] # See the following ref, which explain this mess. # http://cmake.org/Bug/view.php?id=9822 # 0009822: Please expose: cmGlobalGenerator::GetExportSet at cmake level # I cannot retrieve the lists of exported targets, so read them from the file instead #set(gdcmtarget_cmake # "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Export/${GDCM_INSTALL_PACKAGE_DIR}/${GDCM_TARGETS_NAME}.cmake") #configure_file( # ${GDCM_BINARY_DIR}/CMakeCache.txt # ${CMAKE_CURRENT_BINARY_DIR}/gdcmtarget_cmake.dep #COPYONLY #) # CMake Error at CMake/ExportConfiguration/CMakeLists.txt:59 (export): # export given target "gdcmopenjpeg" which is not built by this project. #add_custom_command( # OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gdcmtarget_cmake.dep # COMMAND ${CMAKE_COMMAND} -E copy_if_different ${GDCM_BINARY_DIR}/CMakeCache.txt ${CMAKE_CURRENT_BINARY_DIR}/gdcmtarget_cmake.dep # COMMAND ${CMAKE_COMMAND} -E remove ${gdcmtarget_cmake} # COMMAND ${CMAKE_COMMAND} -E remove ${GDCM_BINARY_DIR}/GDCMExports.cmake # #DEPENDS ${GDCM_BINARY_DIR}/CMakeCache.txt # #DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gdcmtarget_cmake.dep # DEPENDS ${gdcmtarget_cmake} #) #add_custom_target(clean_t ALL # COMMAND echo "Execute" # #COMMAND ${CMAKE_COMMAND} -E remove ${gdcmtarget_cmake} # COMMAND ${CMAKE_COMMAND} -E remove ${GDCM_BINARY_DIR}/GDCMExports.cmake # DEPENDS ${gdcmtarget_cmake} ${GDCM_BINARY_DIR}/GDCMExports.cmake # COMMENT "Crazy" #) #set( targets ) ##file(REMOVE ${gdcmtarget_cmake}) #if(EXISTS ${gdcmtarget_cmake}) # #message( "reading: ${gdcmtarget_cmake}" ) # file(READ ${gdcmtarget_cmake} ENT) # string(REGEX REPLACE "\r?\n" ";" ENT "${ENT}") # foreach(line ${ENT}) # string(REGEX MATCH "ADD_LIBRARY\\(.*SHARED IMPORTED\\)" m ${line}) # if( m ) # string(REGEX REPLACE "ADD_LIBRARY\\((.*) SHARED IMPORTED\\)" "\\1" out ${m}) # list(APPEND targets ${out}) # endif() # endforeach() #endif() # #set( exports ) #set(gdcmexport_cmake ${GDCM_BINARY_DIR}/GDCMExports.cmake) #if(EXISTS ${gdcmexport_cmake}) # file(READ ${gdcmexport_cmake} ENT) # string(REGEX REPLACE "\r?\n" ";" ENT "${ENT}") # foreach(line ${ENT}) # string(REGEX MATCH "ADD_LIBRARY\\(.*SHARED IMPORTED\\)" m ${line}) # if( m ) # string(REGEX REPLACE "ADD_LIBRARY\\((.*) SHARED IMPORTED\\)" "\\1" out ${m}) # list(APPEND exports ${out}) # endif() # endforeach() #endif() #list(LENGTH targets targets_len) #list(LENGTH exports exports_len) #if( ${targets_len} EQUAL ${exports_len} ) # message("equal") #else() # message("diff") # message( "${targets}" ) # message( "${exports}" ) ##set(targets ${exports}) ## execute_process( ## COMMAND ${CMAKE_COMMAND} -E remove ${gdcmtarget_cmake} ## ) #endif() set(targets gdcmCommon gdcmDICT gdcmDSED gdcmIOD gdcmMSFF gdcmMEXD gdcmjpeg8 gdcmjpeg12 gdcmjpeg16 gdcmexpat gdcmopenjp2 gdcmcharls gdcmmd5 gdcmzlib gdcmuuid socketxx vtkgdcm php_vtkgdcm vtkgdcmsharpglue ) file(WRITE ${GDCM_BINARY_DIR}/GDCMExports.cmake "") foreach(target ${targets}) if(TARGET ${target}) export(TARGETS ${target} FILE ${GDCM_BINARY_DIR}/GDCMExports.cmake APPEND) endif() endforeach() gdcm-3.0.22/CMake/ExportConfiguration/UseGDCM.cmake.in000664 001766 001770 00000001542 14517730450 024646 0ustar00mmalaterremmalaterre000000 000000 # # This module is provided as GDCM_USE_FILE by GDCMConfig.cmake. # It can be INCLUDEd in a project to load the needed compiler and linker # settings to use GDCM: # find_package(GDCM REQUIRED) # include(${GDCM_USE_FILE}) if(NOT GDCM_USE_FILE_INCLUDED) set(GDCM_USE_FILE_INCLUDED 1) # Add include directories needed to use GDCM. include_directories(${GDCM_INCLUDE_DIRS}) # Add link directories needed to use GDCM. link_directories(${GDCM_LIBRARY_DIRS}) # Add cmake module path. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${GDCM_CMAKE_DIR}") # Use VTK. if(GDCM_USE_VTK) if(NOT GDCM_SKIP_USE_VTK) set(VTK_DIR ${GDCM_VTK_DIR}) find_package(VTK) if(VTK_FOUND) include(${VTK_USE_FILE}) else() message("VTK not found in GDCM_VTK_DIR=\"${GDCM_VTK_DIR}\".") endif() endif() endif() endif() gdcm-3.0.22/CMake/ExportConfiguration/GDCMConfig.cmake.in000664 001766 001770 00000003363 14517730450 025322 0ustar00mmalaterremmalaterre000000 000000 #----------------------------------------------------------------------------- # # GDCMConfig.cmake - CMake configuration file for external projects. # # This file is configured by GDCM and used by the UseGDCM.cmake # module to load GDCM's settings for an external project. @GDCM_CONFIG_INSTALL_ONLY@ # The GDCM version number. set(GDCM_MAJOR_VERSION "@GDCM_MAJOR_VERSION@") set(GDCM_MINOR_VERSION "@GDCM_MINOR_VERSION@") set(GDCM_BUILD_VERSION "@GDCM_BUILD_VERSION@") # The libraries. set(GDCM_LIBRARIES "@GDCM_LIBRARIES@") # The CMake macros dir. set(GDCM_CMAKE_DIR "@GDCM_CMAKE_DIR_CONFIG@") # The configuration options. set(GDCM_BUILD_SHARED_LIBS "@GDCM_BUILD_SHARED_LIBS@") if(NOT GDCM_SKIP_USE_VTK) set(GDCM_USE_VTK "@GDCM_USE_VTK@") else() set(GDCM_USE_VTK "OFF") endif() # The "use" file. set(GDCM_USE_FILE "@GDCM_USE_FILE_CONFIG@") # The VTK options. if(GDCM_USE_VTK) set(GDCM_VTK_DIR "@GDCM_VTK_DIR_CONFIG@") endif() get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) if(EXISTS ${SELF_DIR}/GDCMTargets.cmake) # This is an install tree include(${SELF_DIR}/GDCMTargets.cmake) get_filename_component(GDCM_INCLUDE_ROOT "${SELF_DIR}/../../@GDCM_INSTALL_INCLUDE_DIR@" ABSOLUTE) set(GDCM_INCLUDE_DIRS ${GDCM_INCLUDE_ROOT}) get_filename_component(GDCM_LIB_ROOT "${SELF_DIR}/../../@GDCM_INSTALL_LIB_DIR@" ABSOLUTE) set(GDCM_LIBRARY_DIRS ${GDCM_LIB_ROOT}) else() if(EXISTS ${SELF_DIR}/GDCMExports.cmake) # This is a build tree set( GDCM_INCLUDE_DIRS "@GDCM_INCLUDE_PATH@") set(GDCM_LIBRARY_DIRS "@GDCM_LIBRARY_DIR@") include(${SELF_DIR}/GDCMExports.cmake) else() message(FATAL_ERROR "ooops") endif() endif() set(GDCM_USE_FILE ${SELF_DIR}/UseGDCM.cmake) # Backward compatible part: set(GDCM_FOUND TRUE) gdcm-3.0.22/CMake/ExportConfiguration/GDCMConfigVersion.cmake.in000664 001766 001770 00000001443 14517730450 026665 0ustar00mmalaterremmalaterre000000 000000 # Test config file. # Version number set( GDCM_MAJOR_VERSION "@GDCM_MAJOR_VERSION@") set( GDCM_MINOR_VERSION "@GDCM_MINOR_VERSION@") set( GDCM_BUILD_VERSION "@GDCM_BUILD_VERSION@") set( GDCM_VERSION "@GDCM_VERSION@") set(PACKAGE_VERSION "${GDCM_VERSION}") if("${PACKAGE_FIND_VERSION}" STREQUAL "") # User did not request any particular version set(PACKAGE_VERSION_COMPATIBLE 1) elseif("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") # User did request exactly this version set(PACKAGE_VERSION_COMPATIBLE 1) set(PACKAGE_VERSION_EXACT 1) elseif("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") # User requested an older version set(PACKAGE_VERSION_COMPATIBLE 1) else() message("REQUESTING: [${PACKAGE_FIND_VERSION}] but found: ${PACKAGE_VERSION}") endif() gdcm-3.0.22/CMake/FindOpenSSL.cmake000664 001766 001770 00000010654 14517730450 021131 0ustar00mmalaterremmalaterre000000 000000 # - Try to find the OpenSSL encryption library # Once done this will define # # OPENSSL_ROOT_DIR - Set this variable to the root installation of OpenSSL # # Read-Only variables: # OPENSSL_FOUND - system has the OpenSSL library # OPENSSL_INCLUDE_DIR - the OpenSSL include directory # OPENSSL_LIBRARIES - The libraries needed to use OpenSSL #============================================================================= # Copyright 2006-2009 Kitware, Inc. # Copyright 2006 Alexander Neundorf # Copyright 2009-2011 Mathieu Malaterre # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. # # This software is distributed WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= # (To distributed this file outside of CMake, substitute the full # License text for the above reference.) # http://www.slproweb.com/products/Win32OpenSSL.html set(_OPENSSL_ROOT_HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]" ) set(_OPENSSL_ROOT_PATHS "C:/OpenSSL/" "C:/OpenSSL-Win32/" ) find_path(OPENSSL_ROOT_DIR NAMES include/openssl/ssl.h HINTS ${_OPENSSL_ROOT_HINTS} PATHS ${_OPENSSL_ROOT_PATHS} ) mark_as_advanced(OPENSSL_ROOT_DIR) # Re-use the previous path: find_path(OPENSSL_INCLUDE_DIR openssl/ssl.h PATHS ${OPENSSL_ROOT_DIR}/include ) if(WIN32 AND NOT CYGWIN) # MINGW should go here too if(MSVC) # /MD and /MDd are the standard values - if someone wants to use # others, the libnames have to change here too # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b # TODO: handle /MT and static lib # In Visual C++ naming convention each of these four kinds of Windows libraries has it's standard suffix: # * MD for dynamic-release # * MDd for dynamic-debug # * MT for static-release # * MTd for static-debug # Implementation details: # We are using the libraries located in the VC subdir instead of the parent directory even though : # libeay32MD.lib is identical to ../libeay32.lib, and # ssleay32MD.lib is identical to ../ssleay32.lib find_library(LIB_EAY_DEBUG NAMES libeay32MDd libeay32 PATHS ${OPENSSL_ROOT_DIR}/lib/VC ) find_library(LIB_EAY_RELEASE NAMES libeay32MD libeay32 PATHS ${OPENSSL_ROOT_DIR}/lib/VC ) find_library(SSL_EAY_DEBUG NAMES ssleay32MDd ssleay32 ssl PATHS ${OPENSSL_ROOT_DIR}/lib/VC ) find_library(SSL_EAY_RELEASE NAMES ssleay32MD ssleay32 ssl PATHS ${OPENSSL_ROOT_DIR}/lib/VC ) if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) set( OPENSSL_LIBRARIES optimized ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} debug ${SSL_EAY_DEBUG} ${LIB_EAY_DEBUG} ) else() set( OPENSSL_LIBRARIES ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} ) endif() mark_as_advanced(SSL_EAY_DEBUG SSL_EAY_RELEASE) mark_as_advanced(LIB_EAY_DEBUG LIB_EAY_RELEASE) elseif(MINGW) # same player, for MingW find_library(LIB_EAY NAMES libeay32 PATHS ${OPENSSL_ROOT_DIR}/lib/MinGW ) find_library(SSL_EAY NAMES ssleay32 PATHS ${OPENSSL_ROOT_DIR}/lib/MinGW ) mark_as_advanced(SSL_EAY LIB_EAY) set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} ) else() # Not sure what to pick for -say- intel, let's use the toplevel ones and hope someone report issues: find_library(LIB_EAY NAMES libeay32 PATHS ${OPENSSL_ROOT_DIR}/lib ) find_library(SSL_EAY NAMES ssleay32 PATHS ${OPENSSL_ROOT_DIR}/lib ) mark_as_advanced(SSL_EAY LIB_EAY) set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} ) endif() else() find_library(OPENSSL_SSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD) find_library(OPENSSL_CRYPTO_LIBRARIES NAMES crypto) mark_as_advanced(OPENSSL_CRYPTO_LIBRARIES OPENSSL_SSL_LIBRARIES) set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES}) endif() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(OpenSSL DEFAULT_MSG OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR ) mark_as_advanced(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) gdcm-3.0.22/CMake/CTestCustom.ctest.in000664 001766 001770 00000005253 14517730450 021730 0ustar00mmalaterremmalaterre000000 000000 # same as boost settings: #SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 1000) #SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000) ##SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 1000000) #SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 49152) #SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 49152) SET(CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION} "Utilities" "Utilities.gdcmopenjpeg.*warning C4101: '.*' : unreferenced local variable" "gdcm.*.cxx.obj : warning LNK4221: no public symbols found; archive member will be inaccessible" "/usr/bin/ranlib: for architecture: .* file: .* has no symbols" "gdcmcharls" "gdcmexpat" "warning CS0114:" "warning CS0108:" "warning CS0109:" "warning CS1591:" "gdcmJAVA_wrap.cxx" # swig generated "gdcmswigPYTHON_wrap.cxx" # swig generated "gdcmCSHARP_wrap.cxx" # swig generated "gdcmPythonFilter.cxx" # need some love "puff.c" # zlib code "/usr/bin/ld: warning: libjpeg.so.62" # needed by .*libvtkIO.so, may conflict with libjpeg.so.8 "/usr/bin/ld: warning: libavcodec.so.52" # needed by .*libvtkIO.so, may conflict with libavcodec.so.53 "/usr/bin/ld: warning: libavformat.so.52" #needed by libvtkIO.so, may conflict with libavformat.so.53 "/usr/bin/ld: warning: libavutil.so.49" # needed by .*libvtkIO.so, may conflict with libavutil.so.51 "/usr/bin/ld: warning: libswscale.so.0" # needed by .*libvtkIO.so, may conflict with libswscale.so.2 "CUSTOMBUILD : warning CS1668: Invalid search path" # appveyor ? "Returning a pointer or reference in a director method is not recommended." "Covariant return types not supported in Java." "Covariant return types not supported in C#." "Nested struct not currently supported" "bootstrap class path not set in conjunction with" "warning CS1699" "has been explicitly marked deprecated here" # clang-6.0: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=float-cast-overflow,integer-divide-by-zero,null,object-size,return,shift,signed-integer-overflow,unreachable,vla-bound [-Winvalid-command-line-argument] "the object size sanitizer has no effect at" ) # Disable dynamic analysis on some tests: SET(CTEST_CUSTOM_MEMCHECK_IGNORE ${CTEST_CUSTOM_MEMCHECK_IGNORE} "Python" "DCMDUMP" "DCDUMP" "DCMDJPEG" "DCMDRLE" "vtk" ) # ==3201== 8 bytes in 1 blocks are still reachable in loss record 2 of 8 # ==3201== at 0x4C20809: operator new(unsigned long) (vg_replace_malloc.c:230) # ==3201== by 0x405E28F: DJDecoderRegistration::registerCodecs(E_DecompressionColorSpaceConversion, E_UIDCreation, E_PlanarConfiguration, bool) (in /usr/lib/libdcmjpeg.so.1.0.0) # ==3201== by 0x402AB1: (within /usr/bin/dcmdjpeg) gdcm-3.0.22/CMake/InstallRequiredVTKLibraries.cmake000664 001766 001770 00000004625 14517730450 024377 0ustar00mmalaterremmalaterre000000 000000 # - Install VTK required libs for GDCM # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # if("${VTK_MAJOR_VERSION}" LESS 6) set(vtklist vtkCommon vtkFiltering vtkGraphics vtkHybrid vtkIO vtkImaging vtkRendering vtkWidgets # utilities vtkDICOMParser vtkNetCDF vtkNetCDF_cxx vtkexoIIc vtkexpat vtkfreetype vtkftgl vtkjpeg vtkmetaio vtkpng vtksys vtktiff vtkverdict vtkzlib ) foreach(el ${vtklist}) list(APPEND CMAKE_INSTALL_VTK_RUNTIME_LIBS ${VTK_DIR}/bin/${el}.dll) endforeach() if(CMAKE_INSTALL_VTK_RUNTIME_LIBS) if(NOT CMAKE_INSTALL_VTK_RUNTIME_LIBS_SKIP) if(NOT CMAKE_INSTALL_VTK_RUNTIME_DESTINATION) if(WIN32) set(CMAKE_INSTALL_VTK_RUNTIME_DESTINATION bin) else() set(CMAKE_INSTALL_VTK_RUNTIME_DESTINATION lib) endif() endif() install(PROGRAMS ${CMAKE_INSTALL_VTK_RUNTIME_LIBS} DESTINATION ${CMAKE_INSTALL_VTK_RUNTIME_DESTINATION} COMPONENT VTKLibraries ) endif() endif() else() set(vtkgdcm_LIBS vtkCommonCore vtkImagingCore vtkImagingSources vtkIOImage vtkIOLegacy vtksys ) set(vtkgdcm_COND_LIBS vtkIOMPIImage vtkInteractionStyle vtkRenderingCore vtkRenderingFreeType vtkRenderingFreeTypeOpenGL vtkRenderingOpenGL ) foreach(TMP_LIB ${VTK_LIBRARIES}) foreach(TRY_LIB ${vtkgdcm_COND_LIBS}) if("${TMP_LIB}" STREQUAL "${TRY_LIB}") set(vtkgdcm_LIBS ${vtkgdcm_LIBS} "${TRY_LIB}") endif() endforeach() endforeach() foreach(el ${vtkgdcm_LIBS}) list(APPEND CMAKE_INSTALL_VTK_RUNTIME_LIBS ${VTK_DIR}/../../../bin/${el}-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.dll) endforeach() if(CMAKE_INSTALL_VTK_RUNTIME_LIBS) if(NOT CMAKE_INSTALL_VTK_RUNTIME_LIBS_SKIP) if(NOT CMAKE_INSTALL_VTK_RUNTIME_DESTINATION) if(WIN32) set(CMAKE_INSTALL_VTK_RUNTIME_DESTINATION bin) else() set(CMAKE_INSTALL_VTK_RUNTIME_DESTINATION lib) endif() endif() install(PROGRAMS ${CMAKE_INSTALL_VTK_RUNTIME_LIBS} DESTINATION ${CMAKE_INSTALL_VTK_RUNTIME_DESTINATION} COMPONENT VTKLibraries ) endif() endif() endif() gdcm-3.0.22/CMake/FindSQLITE3.cmake000664 001766 001770 00000001126 14517730450 020724 0ustar00mmalaterremmalaterre000000 000000 # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # find_path(SQLITE3_INCLUDE_DIR sqlite3.h) find_library(SQLITE3_LIBRARY NAMES sqlite3) include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(SQLITE3 DEFAULT_MSG SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR) set(SQLITE3_LIBRARIES ${SQLITE3_LIBRARY}) set(SQLITE3_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIR}) mark_as_advanced(SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR ) gdcm-3.0.22/CMake/gdcmValgrind.supp000664 001766 001770 00000005161 14517730450 021352 0ustar00mmalaterremmalaterre000000 000000 { Memcheck:Param write(buf) fun:__write_nocancel obj:/usr/X11R6/lib/libX11.so.6.2 fun:_X11TransWrite obj:/usr/X11R6/lib/libX11.so.6.2 } { Memcheck:Free fun:free fun:__GI__dl_deallocate_tls fun:vgArch_thread_exit fun:thread_exit_wrapper } { Memcheck:Leak fun:malloc fun:__cxa_get_globals fun:_ZSt18uncaught_exceptionv fun:_ZNSo6sentryD1Ev } { Memcheck:Leak fun:malloc fun:XextCreateExtension fun:__glXInitialize fun:glXGetConfig } { Memcheck:Leak fun:calloc fun:_dlerror_run fun:dlsym fun:__errno_location } { Memcheck:Leak fun:malloc fun:OpenDriver fun:__glXRegisterExtensions fun:__glXNewIndirectAPI } { Memcheck:Leak fun:malloc fun:_dl_map_object_internal fun:openaux fun:_dl_catch_error_internal } { Memcheck:Leak fun:malloc fun:_dl_map_object_deps_internal fun:dl_open_worker fun:_dl_catch_error_internal } { Memcheck:Leak fun:malloc fun:__glXstrdup fun:OpenDriver fun:__glXRegisterExtensions } { Memcheck:Leak fun:malloc fun:_dl_map_object_internal fun:dl_open_worker fun:_dl_catch_error_internal } { Memcheck:Leak fun:malloc fun:_dl_new_object fun:_dl_map_object_from_fd fun:_dl_map_object_internal } { Memcheck:Leak fun:malloc fun:dl_open_worker fun:_dl_catch_error_internal fun:__GI__dl_open } { Memcheck:Leak fun:calloc fun:_dl_check_map_versions_internal fun:dl_open_worker fun:_dl_catch_error_internal } { Memcheck:Leak fun:calloc fun:_dl_new_object fun:_dl_map_object_from_fd fun:_dl_map_object_internal } { Memcheck:Leak fun:malloc fun:__glXNewIndirectAPI fun:glXMakeCurrent fun:_ZN22vtkXOpenGLRenderWindow11MakeCurrentEv } { Memcheck:Leak fun:malloc fun:__fgl_glapi_add_entrypoint fun:__driRegisterExtensions fun:__glXRegisterExtensions } { Memcheck:Cond obj:/lib/ld-2.3.6.so obj:/lib/ld-2.3.6.so obj:/lib/ld-2.3.6.so obj:/lib/ld-2.3.6.so obj:/lib/ld-2.3.6.so obj:/lib/ld-2.3.6.so } gdcm-3.0.22/CMake/UseCSharp.cmake000664 001766 001770 00000015315 14517730450 020701 0ustar00mmalaterremmalaterre000000 000000 # - C# module for CMake # Defines the following macros: # CSHARP_ADD_EXECUTABLE(name [ files ]) # - Define C# executable with given name # CSHARP_ADD_LIBRARY(name [ files ]) # - Define C# library with given name # CSHARP_LINK_LIBRARIES(name [ libraries ]) # - Link libraries to csharp library # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # TODO: # http://www.cs.nuim.ie/~jpower/Research/csharp/Index.html if(WIN32) include(${DotNETFrameworkSDK_USE_FILE}) # remap set(CMAKE_CSHARP1_COMPILER ${CSC_v1_EXECUTABLE}) set(CMAKE_CSHARP2_COMPILER ${CSC_v2_EXECUTABLE}) set(CMAKE_CSHARP3_COMPILER ${CSC_v3_EXECUTABLE}) set(CMAKE_CSHARP4_COMPILER ${CSC_v4_EXECUTABLE}) #set(CMAKE_CSHARP3_INTERPRETER ${MONO_EXECUTABLE}) else() include(${MONO_USE_FILE}) set(CMAKE_CSHARP1_COMPILER ${MCS_EXECUTABLE}) if(GMCS_EXECUTABLE) set(CMAKE_CSHARP2_COMPILER ${GMCS_EXECUTABLE}) elseif(MCS_EXECUTABLE) set(CMAKE_CSHARP2_COMPILER ${MCS_EXECUTABLE}) endif() if(SMCS_EXECUTABLE) set(CMAKE_CSHARP3_COMPILER ${SMCS_EXECUTABLE}) elseif(MCS_EXECUTABLE) set(CMAKE_CSHARP3_COMPILER ${MCS_EXECUTABLE}) endif() if(DMCS_EXECUTABLE) set(CMAKE_CSHARP4_COMPILER ${DMCS_EXECUTABLE}) elseif(MCS_EXECUTABLE) set(CMAKE_CSHARP4_COMPILER ${MCS_EXECUTABLE}) endif() set(CMAKE_CSHARP_INTERPRETER ${MONO_EXECUTABLE}) endif() set(DESIRED_CSHARP_COMPILER_VERSION 4 CACHE STRING "Pick a version for C# compiler to use: 1, 2, 3 or 4") mark_as_advanced(DESIRED_CSHARP_COMPILER_VERSION) # default to v1: if(DESIRED_CSHARP_COMPILER_VERSION MATCHES 1) set(CMAKE_CSHARP_COMPILER ${CMAKE_CSHARP1_COMPILER}) elseif(DESIRED_CSHARP_COMPILER_VERSION MATCHES 2) set(CMAKE_CSHARP_COMPILER ${CMAKE_CSHARP2_COMPILER}) elseif(DESIRED_CSHARP_COMPILER_VERSION MATCHES 3) set(CMAKE_CSHARP_COMPILER ${CMAKE_CSHARP3_COMPILER}) elseif(DESIRED_CSHARP_COMPILER_VERSION MATCHES 4) set(CMAKE_CSHARP_COMPILER ${CMAKE_CSHARP4_COMPILER}) else() message(FATAL_ERROR "Do not know this version") endif() # CMAKE_CSHARP_COMPILER /platform and anycpu if(WIN32) # There is a subttle issue when compiling on 64bits platform using a 32bits compiler # See bug ID: 3510023 (BadImageFormatException: An attempt was made to load a progr) set(CSC_ACCEPTS_PLATFORM_FLAG 0) if(CMAKE_CSHARP_COMPILER) execute_process(COMMAND "${CMAKE_CSHARP_COMPILER}" "/?" OUTPUT_VARIABLE CSC_HELP) # get version (no /version, so use /help output): if("${CSC_HELP}" MATCHES "Compiler version") string(REGEX REPLACE ".*Compiler version ([0-9\\.]+).*" "\\1" VERSION_STRING "${CSC_HELP}") message(STATUS "Comp version: ${VERSION_STRING}") endif() # when cmd locale is in French it displays: "/platform:" in english: "/platform:" # so only regex match in /platform: if("${CSC_HELP}" MATCHES "/platform:") set(CSC_ACCEPTS_PLATFORM_FLAG 1) endif() endif() if(NOT DEFINED CSC_PLATFORM_FLAG) set(CSC_PLATFORM_FLAG "") if(CSC_ACCEPTS_PLATFORM_FLAG) set(CSC_PLATFORM_FLAG "/platform:x86") if("${CMAKE_SIZEOF_VOID_P}" GREATER 4) set(CSC_PLATFORM_FLAG "/platform:x64") endif() endif() endif() endif() # Check something is found: if(NOT CMAKE_CSHARP_COMPILER) # status message only for now: message("Sorry C# v${DESIRED_CSHARP_COMPILER_VERSION} was not found on your system") else() #if (NOT CSHARP_FIND_QUIETLY) message(STATUS "Will be using C# v${DESIRED_CSHARP_COMPILER_VERSION}: ${CMAKE_CSHARP_COMPILER}") #endif () endif() macro(CSHARP_ADD_LIBRARY name) set(csharp_cs_sources) set(csharp_cs_sources_dep) foreach(it ${ARGN}) if(EXISTS ${it}) set(csharp_cs_sources "${csharp_cs_sources} ${it}") set(csharp_cs_sources_dep ${csharp_cs_sources_dep} ${it}) else() if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${it}) set(csharp_cs_sources "${csharp_cs_sources} ${CMAKE_CURRENT_SOURCE_DIR}/${it}") set(csharp_cs_sources_dep ${csharp_cs_sources_dep} ${CMAKE_CURRENT_SOURCE_DIR}/${it}) else() #message("Could not find: ${it}") set(csharp_cs_sources "${csharp_cs_sources} ${it}") endif() endif() endforeach() #set(SHARP #) separate_arguments(csharp_cs_sources) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}.dll COMMAND ${CMAKE_CSHARP_COMPILER} ARGS "/t:library" "/out:${name}.dll" ${csharp_cs_sources} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS "${csharp_cs_sources_dep}" COMMENT "Creating Csharp library ${name}.cs" ) add_custom_target(CSharp_${name} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${name}.dll ) endmacro() macro(CSHARP_ADD_EXECUTABLE name) set(csharp_cs_sources) foreach(it ${ARGN}) if(EXISTS ${it}) set(csharp_cs_sources "${csharp_cs_sources} ${it}") else() if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${it}) set(csharp_cs_sources "${csharp_cs_sources} ${CMAKE_CURRENT_SOURCE_DIR}/${it}") else() #message("Could not find: ${it}") set(csharp_cs_sources "${csharp_cs_sources} ${it}") endif() endif() endforeach() set(CSHARP_EXECUTABLE_${name}_ARGS #"/out:${name}.dll" ${csharp_cs_sources} #"/r:gdcm_csharp.dll" "/out:${name}.exe ${csharp_cs_sources}" ) endmacro() macro(CSHARP_LINK_LIBRARIES name) set(csharp_libraries) set(csharp_libraries_depends) foreach(it ${ARGN}) #if(EXISTS ${it}.dll) set(csharp_libraries "${csharp_libraries} /r:${it}.dll") # set(csharp_libraries_depends ${it}.dll) #else() # if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${it}.dll) # set(csharp_libraries "${csharp_libraries} /r:${it}.dll") # set(csharp_libraries_depends ${CMAKE_CURRENT_BINARY_DIR}/${it}.dll) # else() # message("Could not find: ${it}") # endif() #endif() endforeach() set(CSHARP_EXECUTABLE_${name}_ARGS " ${csharp_libraries} ${CSHARP_EXECUTABLE_${name}_ARGS}") #message( "DEBUG: ${CSHARP_EXECUTABLE_${name}_ARGS}" ) # BAD DESIGN ! # This should be in the _ADD_EXECUTABLE... separate_arguments(CSHARP_EXECUTABLE_${name}_ARGS) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}.exe COMMAND ${CMAKE_CSHARP_COMPILER} #ARGS "/r:gdcm_csharp.dll" "/out:${name}.exe" ${csharp_cs_sources} ARGS ${CSHARP_EXECUTABLE_${name}_ARGS} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} #DEPENDS ${csharp_cs_sources} COMMENT "Create ${name}.exe" ) #message("DEBUG2:${csharp_libraries_depends}") add_custom_target(CSHARP_EXECUTABLE_${name} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${name}.exe ${csharp_libraries_depends} ) endmacro() gdcm-3.0.22/CMake/UseCSharpTest.cmake000664 001766 001770 00000004424 14517730450 021540 0ustar00mmalaterremmalaterre000000 000000 # Add a python test from a python file # One cannot simply do: # set(ENV{PYTHONPATH} ${LIBRARY_OUTPUT_PATH}) # set(my_test "from test_mymodule import *\;test_mymodule()") # add_test(PYTHON-TEST-MYMODULE python -c ${my_test}) # Since cmake is only transmitting the ADD_TEST line to ctest thus you are losing # the env var. The only way to store the env var is to physically write in the cmake script # whatever PYTHONPATH you want and then add the test as 'cmake -P python_test.cmake' # # Usage: # set_source_files_properties(test.py PROPERTIES PYTHONPATH # "${LIBRARY_OUTPUT_PATH}:${VTK_DIR}") # ADD_PYTHON_TEST(PYTHON-TEST test.py) # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # UseCSharp.cmake macro(ADD_CSHARP_TEST TESTNAME FILENAME) get_source_file_property(loc ${FILENAME} LOCATION) get_source_file_property(pyenv ${FILENAME} RUNTIMEPATH) if(CMAKE_CONFIGURATION_TYPES) # I cannot use CMAKE_CFG_INTDIR since it expand to "$(OutDir)" if(pyenv) set(pyenv "${pyenv};${LIBRARY_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}") else() set(pyenv ${LIBRARY_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}) #set(pyenv ${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}) #set(pyenv ${LIBRARY_OUTPUT_PATH}/${CMAKE_CONFIG_TYPE}) #set(pyenv ${LIBRARY_OUTPUT_PATH}/\${CMAKE_CONFIG_TYPE}) endif() else() if(pyenv) set(pyenv ${pyenv}:${LIBRARY_OUTPUT_PATH}) else() set(pyenv ${LIBRARY_OUTPUT_PATH}) endif() endif() string(REGEX REPLACE ";" " " wo_semicolumn "${ARGN}") file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${TESTNAME}.cmake " set(ENV{LD_LIBRARY_PATH} ${pyenv}) set(ENV{MONO_PATH} ${pyenv}) message(\"${pyenv}\") execute_process( COMMAND ${CMAKE_CSHARP_INTERPRETER} ${loc} ${wo_semicolumn} RESULT_VARIABLE import_res OUTPUT_VARIABLE import_output ERROR_VARIABLE import_output ) # Pass the output back to ctest if(import_output) message(\"\${import_output}\") endif() if(import_res) message(SEND_ERROR \"\${import_res}\") endif() " ) add_test(NAME ${TESTNAME} COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/${TESTNAME}.cmake) endmacro() gdcm-3.0.22/CMake/Toolchain-gcc-powerpc.cmake000664 001766 001770 00000003273 14517730450 023173 0ustar00mmalaterremmalaterre000000 000000 # http://www.cmake.org/Wiki/CmakeMingw # http://doc.cliss21.com/index.php?title=QEMU # Usage: # # $ cmake ../trunk -DCMAKE_TOOLCHAIN_FILE=../trunk/CMake/Toolchain-mingw32.cmake # # For gdcm you need at least the following three package (2008/08/19): # # fix /etc/apt/source.lists # + deb http://www.emdebian.org/debian/ unstable main # # // prebuilt Emdebian project # sudo apt-get install g++-4.1-powerpc-linux-gnu # # apt-cross --arch powerpc -i zlib1g-dev # apt-cross --arch powerpc -i uuid-dev # apt-cross --arch powerpc -i libexpat1-dev # #I was getting: #$ qemu-ppc ./a.out #/lib/ld.so.1: No such file or directory # #Two approach for solving it: #1. #CMAKE_EXE_LINKER_FLAGS:STRING=-static #2. #$ qemu-ppc -L /usr/powerpc-linux-gnu/ ./a.out #Hello cross-compiling world! # # # Do not forget to set to on the following: # GDCM_USE_SYSTEM_EXPAT / GDCM_USE_SYSTEM_ZLIB / GDCM_USE_SYSTEM_UUID # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # the name of the target operating system set(CMAKE_SYSTEM_NAME Linux) # which compilers to use for C and C++ set(CMAKE_C_COMPILER powerpc-linux-gnu-gcc) set(CMAKE_CXX_COMPILER powerpc-linux-gnu-g++) # here is the target environment located set(CMAKE_FIND_ROOT_PATH /usr/powerpc-linux-gnu ) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search # programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) gdcm-3.0.22/CMake/GetSystemProperty.java000664 001766 001770 00000002404 14517730450 022371 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ import java.util.Properties; import java.util.Enumeration; /* * Java only allows setting properties from the command line not reading them * Let's create a small app for this specific task then: * * namely: */ public class GetSystemProperty { public static void main(String args[]) { if( args.length == 0 ) { Properties p = System.getProperties(); Enumeration keys = p.keys(); while (keys.hasMoreElements()) { String key = (String)keys.nextElement(); String value = (String)p.get(key); System.out.println(key + " : " + value); } } else { for (String key: args) { System.out.println(System.getProperty( key )); } } } } gdcm-3.0.22/CMake/FindKWStyle.cmake000664 001766 001770 00000001721 14517730450 021203 0ustar00mmalaterremmalaterre000000 000000 # # this module looks for KWStyle # https://kitware.github.io/KWStyle/ # # # Copyright (c) 2009-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # find_program(KWSTYLE_EXECUTABLE NAMES KWStyle PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Kitware Inc.\\KWStyle 1.0.0]/bin" ) # option(KWSTYLE_USE_VIM_FORMAT "Set KWStyle to generate errors with a VIM-compatible format." OFF) # option(KWSTYLE_USE_MSVC_FORMAT "Set KWStyle to generate errors with a VisualStudio-compatible format." OFF) # mark_as_advanced(KWSTYLE_USE_VIM_FORMAT) # mark_as_advanced(KWSTYLE_USE_MSVC_FORMAT) # # if(KWSTYLE_USE_VIM_FORMAT) # set(KWSTYLE_ARGUMENTS -vim ${KWSTYLE_ARGUMENTS}) # endif() # # if(KWSTYLE_USE_MSVC_FORMAT) # set(KWSTYLE_ARGUMENTS -msvc ${KWSTYLE_ARGUMENTS}) # endif() mark_as_advanced( KWSTYLE_EXECUTABLE ) gdcm-3.0.22/CMake/FindMAGIC.cmake000664 001766 001770 00000001764 14517730450 020470 0ustar00mmalaterremmalaterre000000 000000 # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # $ sudo apt-get install libmagic-dev # $ dpkg -L libmagic-dev # ... # /usr/include/magic.h # /usr/lib/libmagic.so find_path(MAGIC_INCLUDE_DIR magic.h /usr/local/include /usr/include ) find_library(MAGIC_LIBRARY NAMES magic PATHS /usr/lib /usr/local/lib ) if (MAGIC_LIBRARY AND MAGIC_INCLUDE_DIR) set(MAGIC_LIBRARIES ${MAGIC_LIBRARY}) set(MAGIC_INCLUDE_DIRS ${MAGIC_INCLUDE_DIR}) set(MAGIC_FOUND "YES") else () set(MAGIC_FOUND "NO") endif () if (MAGIC_FOUND) if (NOT MAGIC_FIND_QUIETLY) message(STATUS "Found MAGIC: ${MAGIC_LIBRARIES} ${MAGIC_INCLUDE_DIR}") endif () else () if (MAGIC_FIND_REQUIRED) message(FATAL_ERROR "Could not find MAGIC library") endif () endif () mark_as_advanced( MAGIC_LIBRARY MAGIC_INCLUDE_DIR ) gdcm-3.0.22/CMake/UseDebian.cmake000664 001766 001770 00000014536 14517730450 020707 0ustar00mmalaterremmalaterre000000 000000 # create .deb file # You need to setup CPack first ! # UGLY: I reuse CPACK_NSIS_CONTACT to get the contact name for the debian package... # TODO: How do I transmit the 'Depends' line ? # DOCUMENTATION; You need to fill these values to set the control file: # "Package: ${DEBIAN_PACKAGE_NAME} # Version: ${DEBIAN_PACKAGE_VERSION} # Architecture: ${DEBIAN_ARCHITECTURE} # Depends: ${DEBIAN_PACKAGE_DEPENDS} # Maintainer: ${CPACK_NSIS_CONTACT} # Description: ${CPACK_PACKAGE_DESCRIPTION_SUMMARY} # Thanks: # Eric Noulard for initial UseRpmTools used as template # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # if(UNIX) if (NOT CMAKE_AR) message(STATUS "No ar, cannot proceed") set(DEBIAN_FOUND FALSE) else () set(DEBIAN_FOUND TRUE) # Detect if CPack was included or not if (NOT DEFINED "CPACK_PACKAGE_NAME") message(FATAL_ERROR "CPack was not included, you should include CPack before Using UseDebian") endif () macro(ADD_DEBIAN_TARGETS DEBNAME) # $ ar tv cmake_2.4.5-1_i386.deb # rw-r--r-- 0/0 4 Dec 4 22:58 2006 debian-binary # rw-r--r-- 0/0 8981 Dec 4 22:58 2006 control.tar.gz # rw-r--r-- 0/0 4893146 Dec 4 22:58 2006 data.tar.gz # Need a newline: # dpkg-deb: archive has no newlines in header add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/debian-binary COMMAND ${CMAKE_COMMAND} ARGS -E echo "2.0" > ${CMAKE_BINARY_DIR}/debian-binary COMMENT "Generating debian-binary" VERBATIM) # seems better to ADD_CUSTOM_COMMAND this way debian-binary may # be regenerated when make is called. # file(WRITE ${CMAKE_BINARY_DIR}/debian-binary "2.0 #" ) # debian policy enforce lower case for package name if(NOT DEBIAN_PACKAGE_NAME) string(TOLOWER ${CPACK_PACKAGE_NAME} DEBIAN_PACKAGE_NAME ) endif() if(NOT DEBIAN_PACKAGE_DEPENDS) set(DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libgcc1 (>= 1:3.4.2-12)" ) endif() if(NOT DEBIAN_ARCHITECTURE) # There is no such thing as i686 architecture on debian, you should use i386 instead # $ dpkg --print-architecture set(DEBIAN_ARCHITECTURE i386) endif() if(NOT DEBIAN_PACKAGE_VERSION) set(DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}) endif() #message(${CMAKE_SYSTEM_PROCESSOR}) file(WRITE ${CMAKE_BINARY_DIR}/control "Package: ${DEBIAN_PACKAGE_NAME} Version: ${CPACK_PACKAGE_VERSION} Section: devel Priority: optional Architecture: ${DEBIAN_ARCHITECTURE} Depends: ${DEBIAN_PACKAGE_DEPENDS} Maintainer: ${CPACK_NSIS_CONTACT} Description: ${CPACK_PACKAGE_DESCRIPTION_SUMMARY} . ${DEBIAN_PACKAGE_NAME} was packaged by UseDebian and CMake. . ") # FIXME: # I have no friggin clue how cpack works, let's reinvent the wheel instead #include(${CMAKE_BINARY_DIR}/CPackConfig.cmake) #add_custom_target(data_tgz # COMMAND cpack -G TGZ --config CPackConfig.cmake ## TODO: How to get the cpack package name ? # COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${CPACK_PACKAGE_FILE_NAME}.tar.gz ${CMAKE_BINARY_DIR}/data.tar.gz #) # let's create a temp directory to call 'DESTDIR=... make install' into: # cleanup file(REMOVE ${CMAKE_BINARY_DIR}/debian_package) # make dir: file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/debian_package) # calling cmake -P cmake_install.cmake is the same as calling make install: add_custom_target(deb_destdir_install COMMAND ${CMAKE_MAKE_PROGRAM} DESTDIR=${CMAKE_BINARY_DIR}/debian_package install DEPENDS ${CMAKE_BINARY_DIR}/cmake_install.cmake COMMENT "Building debian_package directory with DESTDIR" ) add_dependencies(deb_destdir_install all preinstall) # create data.tar.gz from the make install stuff # all files starts with: ./usr add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/data.tar.gz COMMAND cmake -E tar ARGS cfz ${CMAKE_BINARY_DIR}/data.tar.gz . WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/debian_package DEPENDS ${CMAKE_BINARY_DIR}/debian_package COMMENT "Generating data.tar.gz" ) # get all the files to be installed: find_package(Md5sum REQUIRED) COMPUTE_MD5SUMS( ${CMAKE_BINARY_DIR}/debian_package ${CMAKE_BINARY_DIR}/md5sums ) # create a tarball (control.tar.gz) of control and md5sums # files need to be in relative path: ./md5sums ./control ... add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/control.tar.gz WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND cmake -E tar ARGS cfz ${CMAKE_BINARY_DIR}/control.tar.gz ./control ./md5sums DEPENDS ${CMAKE_BINARY_DIR}/control ${CMAKE_BINARY_DIR}/md5sums COMMENT "Generating control.tar.gz" ) # Warning order is important: # ar -r your-package-name.deb debian-binary control.tar.gz data.tar.gz # eg: cmake_2.4.5-1_i386.deb add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/${DEBIAN_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-1_${DEBIAN_ARCHITECTURE}.deb COMMAND ${CMAKE_AR} ARGS -r ${CMAKE_BINARY_DIR}/${DEBIAN_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-1_${DEBIAN_ARCHITECTURE}.deb ${CMAKE_BINARY_DIR}/debian-binary ${CMAKE_BINARY_DIR}/control.tar.gz ${CMAKE_BINARY_DIR}/data.tar.gz DEPENDS ${CMAKE_BINARY_DIR}/debian-binary ${CMAKE_BINARY_DIR}/control.tar.gz ${CMAKE_BINARY_DIR}/data.tar.gz COMMENT "Generating deb package" ) # the final target: add_custom_target(${DEBNAME}_deb DEPENDS ${CMAKE_BINARY_DIR}/${DEBIAN_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-1_${DEBIAN_ARCHITECTURE}.deb ) add_dependencies(${DEBNAME}_deb deb_destdir_install) # BUG: debian_package is not removed during a 'make clean': set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "debian-binary;control;md5sums;debian_package;") endmacro() endif () endif() gdcm-3.0.22/CMake/UseDotNETFrameworkSDK.cmake000664 001766 001770 00000000346 14517730450 023034 0ustar00mmalaterremmalaterre000000 000000 # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # gdcm-3.0.22/CMake/FindPVRGJPEG.cmake000664 001766 001770 00000001500 14517730450 021060 0ustar00mmalaterremmalaterre000000 000000 # # this module looks for PVRG-JPEG # # PVRG_JPEG_EXECUTABLE - the full path to pvrg-jpeg # PVRG_JPEG_FOUND - If false, don't attempt to use pvrg-jpeg # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # find_program(PVRGJPEG_EXECUTABLE pvrg-jpeg ) mark_as_advanced( PVRGJPEG_EXECUTABLE ) if (PVRGJPEG_EXECUTABLE) set(PVRGJPEG_FOUND "YES") else () set(PVRGJPEG_FOUND "NO") endif () if (PVRGJPEG_FOUND) if (NOT PVRGJPEG_FIND_QUIETLY) message(STATUS "Found PVRGJPEG: ${PVRGJPEG_EXECUTABLE}") endif () else () if (PVRGJPEG_FIND_REQUIRED) message(FATAL_ERROR "Could not find PVRGJPEG exe") endif () endif () gdcm-3.0.22/CMake/UseMONO.cmake000664 001766 001770 00000003006 14517730450 020263 0ustar00mmalaterremmalaterre000000 000000 # - MONO module for CMake # Defines the following macros: # MONO_ADD_MODULE(name language [ files ]) # - Define swig module with given name and specified language # MONO_LINK_LIBRARIES(name [ libraries ]) # - Link libraries to swig module # All other macros are for internal use only. # To get the actual name of the swig module, # use: ${MONO_MODULE_name_REAL_NAME}. # Set Source files properties such as CPLUSPLUS and MONO_FLAGS to specify # special behavior of MONO. Also global CMAKE_MONO_FLAGS can be used to add # special flags to all swig calls. # Another special variable is CMAKE_MONO_OUTDIR, it allows one to specify # where to write all the swig generated module (swig -outdir option) # The name-specific variable MONO_MODULE__EXTRA_DEPS may be used # to specify extra dependencies for the generated modules. # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # # Create Swig module # macro(MONO_ADD_MODULE name) set(swig_dot_i_sources) foreach(it ${ARGN}) set(swig_dot_i_sources ${swig_dot_i_sources} "${it}") endforeach() endmacro() # # Like TARGET_LINK_LIBRARIES but for swig modules # macro(MONO_LINK_LIBRARIES name) if(MONO_MODULE_${name}_REAL_NAME) target_link_libraries(${MONO_MODULE_${name}_REAL_NAME} ${ARGN}) else() message(SEND_ERROR "Cannot find Swig library \"${name}\".") endif() endmacro() gdcm-3.0.22/CMake/FindPoppler.cmake000664 001766 001770 00000001677 14517730450 021274 0ustar00mmalaterremmalaterre000000 000000 # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # find_path(POPPLER_INCLUDE_DIR poppler/poppler-config.h /usr/local/include /usr/include ) find_library(POPPLER_LIBRARY NAMES poppler PATHS /usr/lib /usr/local/lib ) if (POPPLER_LIBRARY AND POPPLER_INCLUDE_DIR) set(POPPLER_LIBRARIES ${POPPLER_LIBRARY}) set(POPPLER_INCLUDE_DIRS ${POPPLER_INCLUDE_DIR} ${POPPLER_INCLUDE_DIR}/poppler) set(POPPLER_FOUND "YES") else () set(POPPLER_FOUND "NO") endif () if (POPPLER_FOUND) if (NOT Poppler_FIND_QUIETLY) message(STATUS "Found POPPLER: ${POPPLER_LIBRARIES}") endif () else () if (Poppler_FIND_REQUIRED) message(FATAL_ERROR "Could not find POPPLER library") endif () endif () mark_as_advanced( POPPLER_LIBRARY POPPLER_INCLUDE_DIR ) gdcm-3.0.22/CMake/FindDotNETFrameworkSDK.cmake000664 001766 001770 00000003437 14517730450 023164 0ustar00mmalaterremmalaterre000000 000000 # - Find .NET Software Development Kit # This module finds an installed .NET Software Development Kit. It sets the following variables: # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # Note: # .NET Framework SDK Version 1.1 # http://www.microsoft.com/downloads/details.aspx?FamilyID=9b3a2ca6-3647-4070-9f41-a333c6b9181d&displaylang=en # .NET Framework 2.0 Software Development Kit (SDK) (x86) # http://www.microsoft.com/downloads/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=en # Microsoft .NET Framework 3.5 # http://www.microsoft.com/downloads/details.aspx?familyid=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en # Comparison Between C++ and C# # http://msdn.microsoft.com/en-us/library/yyaad03b(VS.71).aspx # http://www.akadia.com/services/dotnet_assemblies.html # Visual C# Language Concepts # Building from the Command Line # http://msdn.microsoft.com/en-us/library/1700bbwd(VS.71).aspx # FIXME, path are hardcoded. # http://www.walkernews.net/2007/07/30/how-to-verify-dot-net-framework-version/ find_program(CSC_v1_EXECUTABLE csc $ENV{windir}/Microsoft.NET/Framework/v1.1.4322/ ) find_program(CSC_v2_EXECUTABLE csc $ENV{windir}/Microsoft.NET/Framework/v2.0.50727/ ) find_program(CSC_v3_EXECUTABLE csc $ENV{windir}/Microsoft.NET/Framework/v3.5/ ) find_program(CSC_v4_EXECUTABLE csc $ENV{windir}/Microsoft.NET/Framework/v4.0.30319/ ) get_filename_component(current_list_path ${CMAKE_CURRENT_LIST_FILE} PATH) set(DotNETFrameworkSDK_USE_FILE ${current_list_path}/UseDotNETFrameworkSDK.cmake) mark_as_advanced( CSC_v1_EXECUTABLE CSC_v2_EXECUTABLE CSC_v3_EXECUTABLE CSC_v4_EXECUTABLE ) gdcm-3.0.22/CMake/FindACTIVIZ.cmake000664 001766 001770 00000002762 14517730450 020760 0ustar00mmalaterremmalaterre000000 000000 # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # Testing on Linux with: # ActiViz.NET-5.4.0.455-Linux-x86_64-Personal # Note: # IMHO I cannot use FIND_LIBRARY on Linux because of the .dll extension... # instead switch to FIND_FILE find_file(ACTIVIZ_KITWARE_VTK_LIBRARY NAMES Kitware.VTK.dll PATHS /usr/lib /usr/local/lib /usr/lib/cli/activiz-cil /usr/lib/cli/ActiViz.NET "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Kitware\\ActiVizDotNet 5.2.1]/bin" $ENV{ACTIVIZ_ROOT}/bin ) find_file(ACTIVIZ_KITWARE_MUMMY_RUNTIME_LIBRARY NAMES Kitware.mummy.Runtime.dll PATHS /usr/lib /usr/local/lib /usr/lib/cli/activiz-cil /usr/lib/cli/Kitware.mummy.Runtime-1.0 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Kitware\\ActiVizDotNet 5.2.1]/bin" $ENV{ACTIVIZ_ROOT}/bin ) if (ACTIVIZ_KITWARE_VTK_LIBRARY AND ACTIVIZ_KITWARE_MUMMY_RUNTIME_LIBRARY) set(ACTIVIZ_LIBRARIES ${ACTIVIZ_KITWARE_MUMMY_RUNTIME_LIBRARY} ${ACTIVIZ_KITWARE_VTK_LIBRARY}) set(ACTIVIZ_FOUND "YES") else() set(ACTIVIZ_FOUND "NO") endif () if (ACTIVIZ_FOUND) if (NOT ACTIVIZ_FIND_QUIETLY) message(STATUS "Found ACTIVIZ: ${ACTIVIZ_LIBRARIES}") endif () else () if (ACTIVIZ_FIND_REQUIRED) message(FATAL_ERROR "Could not find ACTIVIZ library") endif () endif () mark_as_advanced( ACTIVIZ_KITWARE_VTK_LIBRARY ACTIVIZ_KITWARE_MUMMY_RUNTIME_LIBRARY ) gdcm-3.0.22/CMake/UseJavaTest.cmake000664 001766 001770 00000006254 14517730450 021244 0ustar00mmalaterremmalaterre000000 000000 # Add a java test from a java file # # Usage: # set_source_files_properties(test.py PROPERTIES PYTHONPATH # "${LIBRARY_OUTPUT_PATH}:${VTK_DIR}") # ADD_PYTHON_TEST(PYTHON-TEST test.py) # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # Need python interpreter: #find_package(PythonInterp REQUIRED) #mark_as_advanced(PYTHON_EXECUTABLE) # UseCSharp.cmake macro(ADD_JAVA_TEST TESTNAME FILENAME) set(_sep ":") if(WIN32) set(_sep "\\;") endif() get_source_file_property(loc ${FILENAME}.class LOCATION) get_source_file_property(pyenv ${FILENAME}.class RUNTIMEPATH) get_source_file_property(theclasspath ${FILENAME}.class CLASSPATH) get_filename_component(loc2 ${loc} NAME_WE) if(CMAKE_CONFIGURATION_TYPES) # I cannot use CMAKE_CFG_INTDIR since it expand to "$(OutDir)" if(pyenv) set(pyenv "${pyenv};${LIBRARY_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}") else() set(pyenv ${LIBRARY_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}) #set(pyenv ${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}) #set(pyenv ${LIBRARY_OUTPUT_PATH}/${CMAKE_CONFIG_TYPE}) #set(pyenv ${LIBRARY_OUTPUT_PATH}/\${CMAKE_CONFIG_TYPE}) endif() else() if(pyenv) set(pyenv ${pyenv}${_sep}${LIBRARY_OUTPUT_PATH}) else() set(pyenv ${LIBRARY_OUTPUT_PATH}) endif() endif() string(REGEX REPLACE ";" " " wo_semicolumn "${ARGN}") set(classpath) if(theclasspath) set(classpath "${theclasspath}${_sep}.") else() set(classpath ".") endif() set(theld_library_path $ENV{LD_LIBRARY_PATH}) set(ld_library_path) if(theld_library_path) set(ld_library_path ${theld_library_path}) endif() if(pyenv) set(ld_library_path ${ld_library_path}${_sep}${pyenv}) endif() file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${TESTNAME}.cmake " if(UNIX) set(ENV{LD_LIBRARY_PATH} ${ld_library_path}) set(ENV{DYLD_LIBRARY_PATH} ${ld_library_path}) #set(ENV{CLASSPATH} ${pyenv}/gdcm.jar${_sep}.) #message(\"pyenv: ${pyenv}\") else() #set(the_path $ENV{PATH}) set(ENV{PATH} ${ld_library_path}) endif() message(\"ld_library_path: ${ld_library_path}\") message(\"loc: ${loc}\") message(\"loc2: ${loc2}\") message(\"JavaProp_PATH_SEPARATOR: \"${JavaProp_PATH_SEPARATOR}\"\") message(\"classpath: \"${classpath}\"\") message(\"java runtime: ${Java_JAVA_EXECUTABLE}\") #message( \"wo_semicolumn: ${wo_semicolumn}\" ) execute_process( #COMMAND ${Java_JAVA_EXECUTABLE} -Djava.library.path=\"${GDCM_LIBRARY_DIR}\" -classpath \"${classpath}\" ${loc2} ${wo_semicolumn} COMMAND ${Java_JAVA_EXECUTABLE} -classpath \"${classpath}\" ${loc2} ${wo_semicolumn} WORKING_DIRECTORY \"${EXECUTABLE_OUTPUT_PATH}\" RESULT_VARIABLE import_res OUTPUT_VARIABLE import_output ERROR_VARIABLE import_output ) # Pass the output back to ctest if(import_output) message(STATUS \"\${import_output}\") endif() if(import_res) message(SEND_ERROR \"\${import_res}\") endif() " ) add_test(NAME ${TESTNAME} COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/${TESTNAME}.cmake) endmacro() gdcm-3.0.22/CMake/FindDICOM3TOOLS.cmake000664 001766 001770 00000002560 14517730450 021402 0ustar00mmalaterremmalaterre000000 000000 # # this module looks for Dicom3Tools, well right now only dciodvfy, dcuncat, # dcmulti # # DCIODVFY_EXECUTABLE - the full path to the dciodvfy # DCIODVFY_FOUND - If false, don't attempt to use dciodvfy # dicom3tools are funny to build you'll need imake # Anyway in order not to pollute your system, you can do an in-source build and # install which should be clean enough: # # ./Configure # imake -I./config -DInstallInTopDir # make World # make install (will copy in ./bin) # # then all you need to do is export an env var DICOM3TOOLS pointing to that dir # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # find_program(DCIODVFY_EXECUTABLE dciodvfy "/tmp/" "$ENV{DICOM3TOOLS}/bin" "$ENV{DICOM3TOOLS}/bin/1.2.6.8." ) find_program(DCDUMP_EXECUTABLE dcdump "/tmp/" "$ENV{DICOM3TOOLS}/bin" "$ENV{DICOM3TOOLS}/bin/1.2.6.8." ) find_program(DCUNCAT_EXECUTABLE dcuncat "$ENV{DICOM3TOOLS}/bin" ) find_program(DCMULTI_EXECUTABLE dcmulti "$ENV{DICOM3TOOLS}/bin" ) mark_as_advanced( DCIODVFY_EXECUTABLE DCDUMP_EXECUTABLE DCUNCAT_EXECUTABLE DCMULTI_EXECUTABLE ) #if (NOT DCIODVFY_EXECUTABLE) # set(DCIODVFY_FOUND "NO") #else () # set(DCIODVFY_FOUND "YES") #endif () gdcm-3.0.22/CMake/FindOpenJPEG.cmake000664 001766 001770 00000002305 14517730450 021207 0ustar00mmalaterremmalaterre000000 000000 # - Try to find the OpenJPEG (JPEG 2000) library # # Read-Only variables: # OPENJPEG_FOUND - system has the OpenJPEG library # OPENJPEG_INCLUDE_DIR - the OpenJPEG include directory # OPENJPEG_LIBRARIES - The libraries needed to use OpenJPEG #============================================================================= # Copyright 2006-2011 Mathieu Malaterre # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. # # This software is distributed WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) # Try with pkg-config first find_package(PkgConfig) pkg_check_modules(OPENJPEG libopenjp2) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(OpenJPEG REQUIRED_VARS OPENJPEG_LIBRARIES OPENJPEG_INCLUDE_DIRS VERSION_VAR OPENJPEG_VERSION ) mark_as_advanced( OPENJPEG_LIBRARIES OPENJPEG_INCLUDE_DIRS ) gdcm-3.0.22/CMake/COPYING-CMAKE-SCRIPTS000664 001766 001770 00000002456 14517730450 021042 0ustar00mmalaterremmalaterre000000 000000 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. gdcm-3.0.22/CMake/Toolchain-mingw64.cmake000664 001766 001770 00000002022 14517730450 022244 0ustar00mmalaterremmalaterre000000 000000 # http://www.cmake.org/Wiki/CmakeMingw # Usage: # # $ sudo apt-get install mingw-w64 # $ cmake -DCMAKE_TOOLCHAIN_FILE=../gdcm/CMake/Toolchain-mingw64.cmake ../gdcm # # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # the name of the target operating system set(CMAKE_SYSTEM_NAME Windows) # which compilers to use for C and C++ set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres) # here is the target environment located set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search # programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) gdcm-3.0.22/CMake/FindMd5sum.cmake000664 001766 001770 00000003402 14517730450 021011 0ustar00mmalaterremmalaterre000000 000000 # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # # find md5sum set(Md5sum_FOUND FALSE) find_program(Md5sum_EXECUTABLE md5sum) mark_as_advanced(Md5sum_EXECUTABLE) if (Md5sum_EXECUTABLE) set(Md5sum_FOUND TRUE) endif () # Compute the md5sums file by doing a recursion of directory: `DIRECTORY` macro(COMPUTE_MD5SUMS DIRECTORY OUTPUT_FILE) # Super ugly and barely readable but you need that in order to # work around a deficiency in EXECUTE_PROCESS which does not have dependencies scanning file(WRITE ${CMAKE_BINARY_DIR}/md5sum.cmake " file(GLOB_RECURSE MD5SUM_INPUT_FILES ${DIRECTORY}/* ) execute_process( COMMAND md5sum \${MD5SUM_INPUT_FILES} WORKING_DIRECTORY ${DIRECTORY} OUTPUT_VARIABLE md5sum_VAR # OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE md5sum_RES ) # apparently md5sums start with: usr/... string(REPLACE ${DIRECTORY}/ \"\" md5sum_VAR_clean \${md5sum_VAR}) file(WRITE ${CMAKE_BINARY_DIR}/md5sums \${md5sum_VAR_clean}) " ) add_custom_command( OUTPUT ${OUTPUT_FILE} COMMAND cmake ARGS -P ${CMAKE_BINARY_DIR}/md5sum.cmake WORKING_DIRECTORY ${CMAKE_BINARY_DIR} DEPENDS ${DIRECTORY} ${CMAKE_BINARY_DIR}/md5sum.cmake COMMENT "Generating md5sums" ) endmacro() # Report the results. if(NOT Md5sum_FOUND) set(Md5sum_DIR_MESSAGE "Md5sum was not found. Make sure the entries Md5sum_* are set.") if(NOT Md5sum_FIND_QUIETLY) message(STATUS "${Md5sum_DIR_MESSAGE}") else() if(Md5sum_FIND_REQUIRED) message(FATAL_ERROR "${Md5sum_DIR_MESSAGE}") endif() endif() endif() gdcm-3.0.22/CMake/Release/000775 001766 001770 00000000000 14517731550 017417 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/CMake/Release/cygwin-patch.diff.in000664 001766 001770 00000000000 14517730450 023237 0ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/CMake/Release/cygwin-package.sh.in000664 001766 001770 00000000000 14517730450 023235 0ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/CMake/Release/README.cygwin.in000664 001766 001770 00000000000 14517730450 022167 0ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/CMake/Release/cygwin-setup.hint.in000664 001766 001770 00000000000 14517730450 023332 0ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/CMake/FindJSON.cmake000664 001766 001770 00000002061 14517730450 020410 0ustar00mmalaterremmalaterre000000 000000 # - Find json # Find the native JSON headers and libraries. # This module defines # JSON_INCLUDE_DIRS - the json include directory # JSON_LIBRARIES - the libraries needed to use json # JSON_FOUND - system has the json library # # Copyright (c) 2013 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # See: # https://github.com/json-c/json-c/wiki # $ sudo apt-get install libjson0-dev # in sid: # $ sudo apt-get install libjson-c-dev find_path(JSON_INCLUDE_DIR NAMES json-c/json.h json/json.h) find_library(JSON_LIBRARY NAMES json-c json) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(JSON DEFAULT_MSG JSON_LIBRARY JSON_INCLUDE_DIR ) if(JSON_FOUND) set(JSON_LIBRARIES ${JSON_LIBRARY}) # hack to get old and new layout working: set(JSON_INCLUDE_DIRS ${JSON_INCLUDE_DIR}/json-c ${JSON_INCLUDE_DIR}/json) endif() mark_as_advanced( JSON_LIBRARY JSON_INCLUDE_DIR ) gdcm-3.0.22/CMake/FindCharLS.cmake000664 001766 001770 00000001607 14517730450 020760 0ustar00mmalaterremmalaterre000000 000000 # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # find_path(CHARLS_INCLUDE_DIR CharLS/charls.h /usr/local/include /usr/include ) find_library(CHARLS_LIBRARY NAMES CharLS PATHS /usr/lib /usr/local/lib ) if (CHARLS_LIBRARY AND CHARLS_INCLUDE_DIR) set(CHARLS_LIBRARIES ${CHARLS_LIBRARY}) set(CHARLS_INCLUDE_DIRS ${CHARLS_INCLUDE_DIR}) set(CHARLS_FOUND "YES") else () set(CHARLS_FOUND "NO") endif () if (CHARLS_FOUND) if (NOT CHARLS_FIND_QUIETLY) message(STATUS "Found CHARLS: ${CHARLS_LIBRARIES}") endif () else () if (CHARLS_FIND_REQUIRED) message(FATAL_ERROR "Could not find CHARLS library") endif () endif () mark_as_advanced( CHARLS_LIBRARY CHARLS_INCLUDE_DIR ) gdcm-3.0.22/CMake/FindRsync.cmake000664 001766 001770 00000001127 14517730450 020737 0ustar00mmalaterremmalaterre000000 000000 # # This module finds if rsync is installed # # RSYNC_EXECUTABLE = full path to the pike binary # # Typical usage for gdcm is: # rsync -avH --delete [options] rsync.creatis.insa-lyon.fr::module localdir # Compression option is: -z # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # find_program(RSYNC_EXECUTABLE NAMES rsync PATHS /usr/bin /usr/local/bin ) mark_as_advanced( RSYNC_EXECUTABLE ) gdcm-3.0.22/CMake/FindPAPYRUS3.cmake000664 001766 001770 00000001767 14517730450 021101 0ustar00mmalaterremmalaterre000000 000000 # - Find papyrus3 # Find the native PAPYRUS3 headers and libraries. # This module defines # PAPYRUS3_INCLUDE_DIRS - the json include directory # PAPYRUS3_LIBRARIES - the libraries needed to use json # PAPYRUS3_FOUND - system has the json library # # Copyright (c) 2013 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. set(PAPYRUS3_INCLUDE_DIRECTORIES /usr/include/ /usr/include/Papyrus3 ) find_path(PAPYRUS3_INCLUDE_DIR Papyrus3.h ${PAPYRUS3_INCLUDE_DIRECTORIES} ) find_library(PAPYRUS3_LIBRARY NAMES Papyrus3) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(PAPYRUS3 DEFAULT_MSG PAPYRUS3_LIBRARY PAPYRUS3_INCLUDE_DIR ) if(PAPYRUS3_FOUND) set(PAPYRUS3_LIBRARIES ${PAPYRUS3_LIBRARY}) set(PAPYRUS3_INCLUDE_DIRS ${PAPYRUS3_INCLUDE_DIR}) endif() mark_as_advanced( PAPYRUS3_LIBRARY PAPYRUS3_INCLUDE_DIR ) gdcm-3.0.22/CMake/CMakeCSharpInformation.cmake000664 001766 001770 00000006544 14517730450 023337 0ustar00mmalaterremmalaterre000000 000000 # This file sets the basic flags for the CSharp language in CMake. # It also loads the available platform file for the system-compiler # if it exists. #set(CMAKE_BASE_NAME) #get_filename_component(CMAKE_BASE_NAME ${CMAKE_CSharp_COMPILER} NAME_WE) #set(CMAKE_SYSTEM_AND_CSharp_COMPILER_INFO_FILE # #${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) # ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) #message(${CMAKE_SYSTEM_AND_CSharp_COMPILER_INFO_FILE}) #include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) # This should be included before the _INIT variables are # used to initialize the cache. Since the rule variables # have if blocks on them, users can still define them here. # But, it should still be after the platform file so changes can # be made to those values. if(CMAKE_USER_MAKE_RULES_OVERRIDE) include(${CMAKE_USER_MAKE_RULES_OVERRIDE}) endif() # Copy from CSharp, ref CXX ??? if(CMAKE_USER_MAKE_RULES_OVERRIDE_CSHARP) include(${CMAKE_USER_MAKE_RULES_OVERRIDE_CSHARP}) endif() # # the target without the suffix # # # # # # this is a place holder if java needed flags for javac they would go here. if(NOT CMAKE_CSharp_CREATE_STATIC_LIBRARY) # if(WIN32) # set(class_files_mask "*.class") # else() set(class_files_mask ".") # endif() set(CMAKE_CSharp_CREATE_STATIC_LIBRARY #" -cf -C ") " -out:") endif() # compile a CSharp file into an object file if(NOT CMAKE_CSharp_COMPILE_OBJECT) # there is no such thing as intermediate representation (object file) in C#. # Instead to avoid multiple recompilation of the same src file, I could use the .dll form, since # one can add src / .dll that same way # copy src version set(CMAKE_CSharp_COMPILE_OBJECT " -E copy ") endif() if(NOT CMAKE_CSharp_LINK_EXECUTABLE) set(CMAKE_CSharp_LINK_EXECUTABLE # I could not references 'SOURCES' so I simply copy all source to fake OBJECTS # .exe is required otherwise I get: # Unhandled Exception: System.ArgumentException: Module file name # 'cmTryCompileExec' must have file extension. #" -out:.exe ") " -out:.exe ") endif() if(NOT CMAKE_CSharp_CREATE_SHARED_LIBRARY) set(CMAKE_CSharp_CREATE_SHARED_LIBRARY #" /target:library -out:") " -out:") endif() # set java include flag option and the separator for multiple include paths #set(CMAKE_INCLUDE_FLAG_CSharp "-classpath ") #if(WIN32 AND NOT CYGWIN) # set(CMAKE_INCLUDE_FLAG_SEP_CSharp ";") #else() # set(CMAKE_INCLUDE_FLAG_SEP_CSharp ":") #endif() set(CMAKE_CSharp_FLAGS_INIT "$ENV{CSFLAGS} ${CMAKE_CSharp_FLAGS_INIT}") # avoid just having a space as the initial value for the cache if(CMAKE_CSharp_FLAGS_INIT STREQUAL " ") set(CMAKE_CSharp_FLAGS_INIT) endif() set (CMAKE_CSharp_FLAGS "${CMAKE_CSharp_FLAGS_INIT}" CACHE STRING "Flags used by the compiler during all build types.") gdcm-3.0.22/CMake/UseCopyright.cmake000664 001766 001770 00000001405 14517730450 021464 0ustar00mmalaterremmalaterre000000 000000 # Handy macro to gather all copyright in a single file (to pass to cpack) # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # macro(CREATE_COPYRIGHT_FILE name) # Always cleanup the file: file(WRITE ${name} "") set(COPYRIGHT_MODULE_FILENAME ${name}) endmacro() # Append copyright file macro(APPEND_COPYRIGHT) # need to raise an error if COPYRIGHT_MODULE_FILENAME is not set... if(EXISTS ${COPYRIGHT_MODULE_FILENAME} ) foreach(filename ${ARGN}) file(READ ${filename} content) file(APPEND ${COPYRIGHT_MODULE_FILENAME} ${content}) endforeach() endif() endmacro() gdcm-3.0.22/CMake/FindLJPEG.cmake000664 001766 001770 00000002100 14517730450 020472 0ustar00mmalaterremmalaterre000000 000000 # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # find_path(LJPEG_INCLUDE_DIR ljpeg-62/jpeglib.h /usr/local/include /usr/include ) find_library(LJPEG8_LIBRARY NAMES jpeg8 PATHS /usr/lib /usr/local/lib ) find_library(LJPEG12_LIBRARY NAMES jpeg12 PATHS /usr/lib /usr/local/lib ) find_library(LJPEG16_LIBRARY NAMES jpeg16 PATHS /usr/lib /usr/local/lib ) if (LJPEG8_LIBRARY AND LJPEG_INCLUDE_DIR) set(LJPEG_LIBRARIES ${LJPEG8_LIBRARY} ${LJPEG12_LIBRARY} ${LJPEG16_LIBRARY}) set(LJPEG_INCLUDE_DIRS ${LJPEG_INCLUDE_DIR}) set(LJPEG_FOUND "YES") else () set(LJPEG_FOUND "NO") endif () if (LJPEG_FOUND) if (NOT LJPEG_FIND_QUIETLY) message(STATUS "Found LJPEG: ${LJPEG_LIBRARIES}") endif () else () if (LJPEG_FIND_REQUIRED) message(FATAL_ERROR "Could not find LJPEG library") endif () endif () mark_as_advanced( LJPEG_LIBRARIES LJPEG_INCLUDE_DIR ) gdcm-3.0.22/CMake/FindCSharp.cmake000664 001766 001770 00000001207 14517730450 021020 0ustar00mmalaterremmalaterre000000 000000 # A C# Module for cmake # # TODO: # Should I inspect the ENV{CSC} var first ? # # # Copyright (c) 2006-2011 Mathieu Malaterre # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # if(WIN32) find_package(DotNETFrameworkSDK) else() #TODO handle CSharp_FIND_QUIETLY #TODO handle CSharp_FIND_REQUIRED find_package(MONO) endif() # http://public.kitware.com/Bug/view.php?id=7757 get_filename_component(current_list_path ${CMAKE_CURRENT_LIST_FILE} PATH) set(CSharp_USE_FILE ${current_list_path}/UseCSharp.cmake) gdcm-3.0.22/.gitattributes000664 001766 001770 00000000672 14517730450 017755 0ustar00mmalaterremmalaterre000000 000000 appveyor.yml merge=ours * -whitespace /Source/DataDictionary/gdcmDefaultDicts.cxx hooks-max-size=1500000 /Source/DataDictionary/gdcmPrivateDefaultDicts.cxx hooks-max-size=1500000 /Source/DataDictionary/gdcmTagToType.h hooks-max-size=1500000 /Source/InformationObjectDefinition/Part3.xml hooks-max-size=3000000 /Source/DataDictionary/privatedicts.xml hooks-max-size=1500000 /Utilities/gdcmopenjpeg/src/lib/openjp2/j2k.c hooks-max-size=750000 gdcm-3.0.22/Utilities/000775 001766 001770 00000000000 14517731550 017032 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Utilities/gdcm_zlib.h000664 001766 001770 00000001511 14517730450 021131 0ustar00mmalaterremmalaterre000000 000000 /*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #ifndef GDCM_ZLIB_H #define GDCM_ZLIB_H /* Use the zlib library configured for gdcm. */ #include "gdcmTypes.h" #ifdef GDCM_USE_SYSTEM_ZLIB // $ dpkg -S /usr/include/zlib.h // zlib1g-dev: /usr/include/zlib.h # include #else # include "gdcmzlib/zlib.h" #endif #endif gdcm-3.0.22/Utilities/dicom3tools/000775 001766 001770 00000000000 14517731550 021271 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Utilities/dicom3tools/process.sh000775 001766 001770 00000002260 14517730450 023304 0ustar00mmalaterremmalaterre000000 000000 #!/bin/sh -xe ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # # Copyright (c) 2006-2011 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notice for more information. # ############################################################################ # This script convert dicom3tools internal txt format into XML for GDCM # Usage: # $ process.sh agfa.tpl # remove empty lines sed '/^\s*$/d' $1 > /tmp/clean2.tpl # remove comments: sed '/^#/d' /tmp/clean2.tpl > /tmp/clean.tpl # convert to xml sed 's/^.*$/' /tmp/dummy.xml # add end: echo '' >> /tmp/dummy.xml # format and check if valid xml xmllint --format /tmp/dummy.xml -o `basename $1 tpl`xml gdcm-3.0.22/Utilities/doxygen/000775 001766 001770 00000000000 14517731550 020507 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Utilities/doxygen/vtk/000775 001766 001770 00000000000 14517731550 021313 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Utilities/doxygen/vtk/CMakeLists.txt000664 001766 001770 00000012162 14517730450 024053 0ustar00mmalaterremmalaterre000000 000000 # # Build the documentation # include (Documentation) if (BUILD_DOCUMENTATION) find_package(VTK REQUIRED) mark_as_advanced(VTK_DIR) set(VTKGDCM_FINAL_PATH ${GDCM_BINARY_DIR}/Utilities/doxygen/html) set (INCLUDE_QT_DOCUMENTATION OFF CACHE BOOL "Specify if Qt documentation should be linked to.") mark_as_advanced(INCLUDE_QT_DOCUMENTATION) if (INCLUDE_QT_DOCUMENTATION) set(QT_DOC_DIR CACHE FILEPATH "Path to the directory containing Qt html documentation.") find_program (DOXYTAG doxytag "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\doxygen_is1;Inno Setup: App Path]/bin" /Applications/Doxygen.app/Contents/Resources /Applications/Doxygen.app/Contents/MacOS ) mark_as_advanced(DOXYTAG QT_DOC_DIR) set (QT_TAG_FILE "${CMAKE_CURRENT_BINARY_DIR}/Qt.tag") endif () set(BUILD_DOXYGEN ON) set(DOCUMENTATION_DOWNLOAD_VTK_TAGFILE ON) set(DOCUMENTATION_HTML_TARZ ON) set(DOXYGEN_PROJECT_NAME "vtkgdcm") if(VTK_SOURCE_DIR) message(STATUS ${VTK_SOURCE_DIR}) #set(DOXYGEN_SOURCE_DIR "${vtkgdcm_SOURCE_DIR}/VTK/Utilities/Doxygen") set(DOXYGEN_SOURCE_DIR "${VTK_SOURCE_DIR}/Utilities/Doxygen") elseif(VTK_CMAKE_DIR) set(DOXYGEN_SOURCE_DIR "${VTK_CMAKE_DIR}/../Utilities/Doxygen") else() # sudo apt-get install vtk-doc if(EXISTS "/usr/share/doc/vtk-doc/html") set(DOXYGEN_SOURCE_DIR "/usr/share/doc/vtk-doc/html") elseif(EXISTS "/usr/share/doc/vtk6-doc/doxygen") set(DOXYGEN_SOURCE_DIR "/usr/share/doc/vtk6-doc/doxygen") else() message(ERROR "DOXYGEN_SOURCE_DIR need to be set.") endif() endif() set(DOXYGEN_PROJECT_SOURCE_DIR "${vtkgdcm_SOURCE_DIR}") set(VTK_DOXYGEN_HOME "${vtkgdcm_SOURCE_DIR}/VTK/Utilities/Doxygen") set(DOXYGEN_CVSWEB_CHECKOUT "http://public.kitware.com/cgi-bin/cvsweb.cgi/~checkout~/vtkgdcm/") set(DOXYGEN_CVSWEB_CHECKOUT_SUFFIX "?cvsroot=vtkgdcm") set(DOXYGEN_SOURCE_LOCATIONS_DIR "${vtkgdcm_SOURCE_DIR}") set(DOXYGEN_SOURCE_LOCATIONS "\"${vtkgdcm_SOURCE_DIR}\" \\ \"${vtkgdcm_SOURCE_DIR}/Utilities/Xdmf2/vtk\" \\ \"${vtkgdcm_SOURCE_DIR}/Utilities/VTKPythonWrapping/Executable\" \\ \"${vtkgdcm_SOURCE_DIR}/Utilities/VTKClientServer\" \\ \"${vtkgdcm_SOURCE_DIR}/Qt/Chart\" \\ \"${vtkgdcm_SOURCE_DIR}/Qt/Components\" \\ \"${vtkgdcm_SOURCE_DIR}/Qt/Core\" \\ \"${vtkgdcm_SOURCE_DIR}/Qt/Python\" \\ \"${vtkgdcm_SOURCE_DIR}/Qt/Widgets\" \\ \"${vtkgdcm_SOURCE_DIR}/Qt/Testing\" \\ \"${vtkgdcm_SOURCE_DIR}/Applications/Client\" \\ \"${vtkgdcm_SOURCE_DIR}/Applications/OverView\" \\ \"${vtkgdcm_SOURCE_DIR}/Applications/OverView/Core\" \\ \"${vtkgdcm_SOURCE_DIR}/Common/KWCommon\" \\ \"${vtkgdcm_SOURCE_DIR}/Servers/Common\" \\ \"${vtkgdcm_SOURCE_DIR}/Servers/Filters\" \\ \"${vtkgdcm_SOURCE_DIR}/Servers/ServerManager\"") set(DOXYGEN_BINARY_LOCATIONS_DIR "${vtkgdcm_BINARY_DIR}") set(DOXYGEN_BINARY_LOCATIONS "") set(DOXYGEN_PARSED_INPUT_DIRS " \"${CMAKE_CURRENT_BINARY_DIR}/dox\" \\ \"${CMAKE_CURRENT_BINARY_DIR}/dox/Utilities/Xdmf2/vtk\" \\ \"${CMAKE_CURRENT_BINARY_DIR}/dox/Utilities/VTKPythonWrapping/Executable\" \\ \"${vtkgdcm_SOURCE_DIR}/Utilities/VTKClientServer\" \\ \"${vtkgdcm_SOURCE_DIR}/Qt/Chart\" \\ \"${vtkgdcm_SOURCE_DIR}/Qt/Components\" \\ \"${vtkgdcm_SOURCE_DIR}/Qt/Core\" \\ \"${vtkgdcm_SOURCE_DIR}/Qt/Python\" \\ \"${vtkgdcm_SOURCE_DIR}/Qt/Widgets\" \\ \"${vtkgdcm_SOURCE_DIR}/Qt/Testing\" \\ \"${vtkgdcm_SOURCE_DIR}/Applications/Client\" \\ \"${vtkgdcm_SOURCE_DIR}/Applications/OverView\" \\ \"${vtkgdcm_SOURCE_DIR}/Applications/OverView/Core\" \\ \"${CMAKE_CURRENT_BINARY_DIR}/dox/Qt/Core\" \\ \"${CMAKE_CURRENT_BINARY_DIR}/dox/Common/KWCommon\" \\ \"${CMAKE_CURRENT_BINARY_DIR}/dox/Servers/Common\" \\ \"${CMAKE_CURRENT_BINARY_DIR}/dox/Servers/Filters\" \\ \"${CMAKE_CURRENT_BINARY_DIR}/dox/Servers/ServerManager\"") set(DOXYGEN_IGNORE_PREFIX "vtkPV vtkSM vtk pq") # # Configure the script and the doxyfile, then add target # if(NOT DOT_PATH) get_filename_component(DOT_PATH ${DOT} PATH) endif() set(TAGFILES "\"${CMAKE_CURRENT_BINARY_DIR}/vtkNightlyDoc.tag=http://www.vtk.org/doc/nightly/html\"") if(INCLUDE_QT_DOCUMENTATION) set (TAGFILES "${TAGFILES} \"${QT_TAG_FILE}=http://doc.trolltech.com/4.2\"") endif() configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doxyfile @ONLY ) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/doc_makeall.sh.in ${CMAKE_CURRENT_BINARY_DIR}/doc_makeall.sh @ONLY ) add_custom_target(${DOXYGEN_PROJECT_NAME}DoxygenDoc ${BASH} ${CMAKE_CURRENT_BINARY_DIR}/doc_makeall.sh) add_dependencies( ${DOXYGEN_PROJECT_NAME}DoxygenDoc GDCMDoxygenPDF ) add_dependencies(DoxygenDoc ${DOXYGEN_PROJECT_NAME}DoxygenDoc) if(INCLUDE_QT_DOCUMENTATION) add_custom_target(QtDoxygenTags COMMAND ${DOXYTAG} -t ${QT_TAG_FILE} ${QT_DOC_DIR}) add_dependencies(${DOXYGEN_PROJECT_NAME}DoxygenDoc QtDoxygenTags) endif() endif () gdcm-3.0.22/Utilities/doxygen/vtk/doc_makeall.sh.in000664 001766 001770 00000030726 14517730450 024515 0ustar00mmalaterremmalaterre000000 000000 # ------------------------------------------------------------------------- # Doxygen documentation batch # modified by S. Barre (Time-stamp: <2005-06-17 15:12:59 barre> # ------------------------------------------------------------------------- # Path to several tools (_PROG to avoid the typical GZIP env var pb) # Example: # DOXYGEN_PROG=@DOXYGEN@ (INCLUDE(FindDoxygen.cmake)) # GZIP_PROG=@GZIP@ (INCLUDE(FindCygwin.cmake)) # HHC_PROG=@HTML_HELP_COMPILER@ (INCLUDE(FindHTMLHelp.cmake)) # MV_PROG=@MV@ (INCLUDE(FindCygwin.cmake)) # PERL_PROG=@PERL@ (INCLUDE(FindPerl.cmake)) # RM_PROG=@RM@ (INCLUDE(FindCygwin.cmake)) # TAR_PROG=@TAR@ (INCLUDE(FindCygwin.cmake)) # WGET_PROG=@WGET@ (INCLUDE(FindWget.cmake)) # export DOXYGEN_PROG="@DOXYGEN@" # Doxygen export GZIP_PROG="@GZIP@" # gzip (Unix-like 'gzip compressor') export GNUPLOT_PROG="@GNUPLOT@" # gnuplot (data plotting program) export HHC_PROG="@HTML_HELP_COMPILER@" # HTML Help Compiler export MV_PROG="@MV@" # mv (Unix-like 'move/rename files') export CP_PROG="@CP@" # mv (Unix-like 'move/rename files') export PERL_PROG="@PERL@" # Perl export RM_PROG="@RM@" # rm (Unix-like 'remove files') export TAR_PROG="@TAR@" # tar (Unix-like 'archiver') export WGET_PROG="@WGET@" # wget (remote file retrieval) # PROJECT_NAME: # Documentation/project name. Used in some of the resulting file names and # xrefs to uniquify two or more projects linked together through their # Doxygen's tag files. Mandatory for each documentation set. # Note: might be the same as the doxyfile's PROJECT_NAME # Example: # PROJECT_NAME=VTK # export PROJECT_NAME=@DOXYGEN_PROJECT_NAME@ # PATH_TO_VTK_DOX_SCRIPTS: # Path to the directory holding the Perl scripts used to produce the VTK doc # in Doxygen format. You need the VTK source files or a local copy of # these scripts. # Example: # PATH_TO_VTK_DOX_SCRIPTS=@CMAKE_CURRENT_SOURCE_DIR@ # export PATH_TO_VTK_DOX_SCRIPTS="@DOXYGEN_SOURCE_DIR@" export PATH_TO_VTKGDCM_FINAL_PATH="@VTKGDCM_FINAL_PATH@" # SOURCE_DIR: # Source directory. The top directory of the source files. # Example: # SOURCE_DIR=@DOXYGEN_PROJECT_SOURCE_DIR@ # export SOURCE_DIR="@DOXYGEN_PROJECT_SOURCE_DIR@" # REL_PATH_TO_TOP: # Relative path from the top directory of the source files to the directory # (or top directory) holding the files to document. Useful if several parts # of the same source directory should be documented separately. # Example: # REL_PATH_TO_TOP=. # REL_PATH_TO_TOP=framework/src # export REL_PATH_TO_TOP=. # INTERMEDIATE_DOX_DIR: # Directory where the intermediate Doxygen files should be stored (mainly # these headers files converted from the VTK format to the Doxygen format). # This directory is erased at the end of this script, unless you comment # the corresponding line. # DOXTEMP might be used to simplify the syntax. # Example: # DOXTEMP=DOXTEMP=@CMAKE_CURRENT_BINARY_DIR@ # INTERMEDIATE_DOX_DIR=$DOXTEMP/dox # export DOXTEMP="@CMAKE_CURRENT_BINARY_DIR@" export INTERMEDIATE_DOX_DIR="$DOXTEMP/dox" # CVSWEB_CHECKOUT, CVSWEB_CHECKOUT_SUFFIX: # URL to the CVSWeb of the project, in checkout mode (i.e. appending a file # name to this URL will retrieve the contents of the file). In the same way # CVSWEB_CHECKOUT_SUFFIX is appended to the result. # Example: # CVSWEB_CHECKOUT=http://public.kitware.com/cgi-bin/cvsweb.cgi/~checkout~/VTK # CVSWEB_CHECKOUT_SUFFIX=?cvsroot=CMake # export CVSWEB_CHECKOUT="@DOXYGEN_CVSWEB_CHECKOUT@" export CVSWEB_CHECKOUT_SUFFIX="@DOXYGEN_CVSWEB_CHECKOUT_SUFFIX@" # DOXYFILE: # Path to the Doxygen configuration file (i.e. doxyfile). # Example: # DOXYFILE=$DOXTEMP/doxyfile # export DOXYFILE="$DOXTEMP/doxyfile" # OUTPUT_DIRECTORY ALLOW_ERASE_OUTPUT_DIRECTORY: # Path to the Doxygen output directory (where the resulting doc is stored). # Note: should be the same as your doxyfile's OUTPUT_DIRECTORY # If ON, allows the output directory to be erased when some advanced output # file have been produced (HTML Help, or TAR archive for example). # Example: # OUTPUT_DIRECTORY=$DOXTEMP/doc # ALLOW_ERASE_OUTPUT_DIRECTORY=ON # export OUTPUT_DIRECTORY="$DOXTEMP/doc" export ALLOW_ERASE_OUTPUT_DIRECTORY=ON # COMPILE_HTML_HELP RESULTING_HTML_HELP_FILE: # Compile the CHM (Compressed HTML) HTML Help file, name of the resulting # file. If set to ON and name is non-empty these options will actually # trigger the HTML-Help compiler to create the CHM. The resulting # file (usually index.chm) will be renamed to this name. # Note: if ON, the whole $OUTPUT_DIRECTORY will be erased at the end of # this script, since this file is considered to be one of the # advanced final output, unless ALLOW_ERASE_OUTPUT_DIRECTORY is OFF # Note: your doxyfile should be configured to enable HTML Help creation # (using GENERATE_HTML = YES, GENERATE_HTMLHELP = YES) # Example: # COMPILE_HTML_HELP=ON # COMPILE_HTML_HELP=@DOCUMENTATION_HTML_HELP@ # RESULTING_HTML_HELP_FILE=$DOXTEMP/vtk4.chm # export COMPILE_HTML_HELP=@DOCUMENTATION_HTML_HELP@ export RESULTING_HTML_HELP_FILE="$DOXTEMP/$PROJECT_NAME.chm" # CREATE_HTML_TARZ_ARCHIVE RESULTING_HTML_TARZ_ARCHIVE_FILE: # Create a compressed (gzip) tar archive of the html directory (located # under the OUTPUT_DIRECTORY), and name of the resulting archive file. # Note: your doxyfile should be configured to enable HTML creation # (using GENERATE_HTML = YES) # Example: # CREATE_HTML_TARZ_ARCHIVE=ON # CREATE_HTML_TARZ_ARCHIVE=@DOCUMENTATION_HTML_TARZ@ # RESULTING_HTML_TARZ_ARCHIVE_FILE=$DOXTEMP/vtk4-html.tar.gz # export CREATE_HTML_TARZ_ARCHIVE=@DOCUMENTATION_HTML_TARZ@ export RESULTING_HTML_TARZ_ARCHIVE_FILE="$DOXTEMP/$PROJECT_NAME-html.tar.gz" # DOWNLOAD_VTK_TAGFILE VTK_TAGFILE VTK_TAGFILE_REMOTE_DIR VTK_TAGFILE_DEST_DIR: # Download the VTK tag file, name, remote location and destination dir of this # tag file. If set to ON, the tag file is retrieved from its remote location # using wget and stored in the destination dir. # The tag file is expected to be compressed using gzip, but DO NOT include # the .gz extension in VTK_TAGFILE. # Note: your doxyfile must be tailored to make use-of or create this tag file. # (using TAGFILES = vtk4-nightly.tag=http://www.vtk.org/doc/nightly/html # or GENERATE_TAGFILE = "@FOO_BINARY_DIR@/Utilities/Doxygen/vtk4.tag") # Example: # DOWNLOAD_VTK_TAGFILE=OFF # VTK_TAGFILE=vtk4-nightly.tag # VTK_TAGFILE_REMOTE_DIR=http://www.vtk.org/doc/nightly/html # VTK_TAGFILE_DEST_DIR=$DOXTEMP # export DOWNLOAD_VTK_TAGFILE=@DOCUMENTATION_DOWNLOAD_VTK_TAGFILE@ export VTK_TAGFILE=vtkNightlyDoc.tag export VTK_TAGFILE_REMOTE_DIR="http://www.vtk.org/files/nightly" export VTK_TAGFILE_DEST_DIR="$DOXTEMP" echoexit() { echo "$1" exit 1 } cd "${DOXTEMP}" || echoexit "Cannot find Doxygen output directory: ${DOXTEMP}" # ---------------------------------------------------------------------------- # Convert the VTK headers to the Doxygen format. echo "Convert the VTK headers to the Doxygen format." if test "x$PERL_PROG" != "xNOTFOUND" ; then $PERL_PROG "$PATH_TO_VTK_DOX_SCRIPTS/doc_header2doxygen.pl" \ --to "$INTERMEDIATE_DOX_DIR" \ --relativeto "@DOXYGEN_SOURCE_LOCATIONS_DIR@" \ @DOXYGEN_SOURCE_LOCATIONS@ || echoexit "Problem converting VTK headers" if test "x@DOXYGEN_BINARY_LOCATIONS_DIR@" != "x"; then $PERL_PROG "$PATH_TO_VTK_DOX_SCRIPTS/doc_header2doxygen.pl" \ --to "$INTERMEDIATE_DOX_DIR" \ --relativeto "@DOXYGEN_BINARY_LOCATIONS_DIR@" \ @DOXYGEN_BINARY_LOCATIONS@ || echoexit "Problem converting VTK headers" fi fi echo "Convert the VTK headers to the Doxygen format - done" # ---------------------------------------------------------------------------- # Build the full-text index. echo "Build the full-text index." if test "x$PERL_PROG" != "xNOTFOUND" ; then $PERL_PROG "$PATH_TO_VTK_DOX_SCRIPTS/doc_index.pl" \ --project "$PROJECT_NAME" \ --stop "$PATH_TO_VTK_DOX_SCRIPTS/doc_index.stop" \ --store "doc_""$PROJECT_NAME""_index.dox" \ --to "$INTERMEDIATE_DOX_DIR" \ @DOXYGEN_SOURCE_LOCATIONS@ \ @DOXYGEN_BINARY_LOCATIONS@ || echoexit "Problem building full-text index" fi echo "Build the full-text index - done" # # ---------------------------------------------------------------------------- # # Generate the 'Class to Demos' page cross-linking each class to these # # demos that use that class. # if test "x$PERL_PROG" != "xNOTFOUND" ; then # $PERL_PROG $PATH_TO_VTK_DOX_SCRIPTS/doc_class2example.pl \ # --datamatch "\W((VTK|ParaView)_DATA_ROOT|(VTK|MedVIP)Data|(vtk)?GetDataRoot|ExpandDataFileName)\W" \ # --dataicon "paper-clip.gif" \ # --dirmatch "^demos$" \ # --label "Demos" \ # --project "$PROJECT_NAME" \ # --store "doc_""$PROJECT_NAME""_class2demos.dox" \ # --title "Class To Demos" \ # --to "$INTERMEDIATE_DOX_DIR" \ # --unique "d" \ # "$SOURCE_DIR/framework/demos" # fi # ---------------------------------------------------------------------------- # Retrieve the (gziped) VTK 4 tag file and decompress it if test "x$DOWNLOAD_VTK_TAGFILE" == "xON" ; then if test "x$VTK_TAGFILE" != "x" ; then if test "x$WGET_PROG" != "xNOTFOUND" ; then $WGET_PROG -nd -nH \ "$VTK_TAGFILE_REMOTE_DIR/$VTK_TAGFILE.gz" \ -O "$VTK_TAGFILE_DEST_DIR/$VTK_TAGFILE.gz" if test "x$GZIP_PROG" != "xNOTFOUND" ; then $GZIP_PROG -f -d "$VTK_TAGFILE_DEST_DIR/$VTK_TAGFILE.gz" fi fi fi fi # ---------------------------------------------------------------------------- # Create the Doxygen doc. if test "x$DOXYGEN_PROG" != "xNOTFOUND" ; then if test "x$RM_PROG" != "xNOTFOUND" ; then $RM_PROG -fr "$OUTPUT_DIRECTORY" fi $DOXYGEN_PROG "$DOXYFILE" || echoexit "Problem running doxygen" fi # ---------------------------------------------------------------------------- # Clean the HTML pages to remove the path to the intermediate Doxygen dir. if test "x$PERL_PROG" != "xNOTFOUND" ; then $PERL_PROG "$PATH_TO_VTK_DOX_SCRIPTS/doc_rmpath.pl" \ --to "$INTERMEDIATE_DOX_DIR" \ --html "$OUTPUT_DIRECTORY/html" || echoexit "Problem cleaning HTML pages" fi # ---------------------------------------------------------------------------- # Create the CHM HTML HELP doc. if test "x$COMPILE_HTML_HELP" == "xON" ; then if test "x$RESULTING_HTML_HELP_FILE" != "x" ; then cd "$OUTPUT_DIRECTORY/html" if test "x$HHC_PROG" != "xNOTFOUND" ; then $HHC_PROG index.hhp || echoexit "Problem generating CHM" if test "x$MV_PROG" != "xNOTFOUND" ; then $MV_PROG -f index.chm "$RESULTING_HTML_HELP_FILE" fi fi fi fi # ---------------------------------------------------------------------------- # Create the compressed tar archive. if test "x$CREATE_HTML_TARZ_ARCHIVE" == "xON" ; then if test "x$RESULTING_HTML_TARZ_ARCHIVE_FILE" != "x" ; then cd "$OUTPUT_DIRECTORY" if test "x$TAR_PROG" != "xNOTFOUND" ; then if test "x$RM_PROG" != "xNOTFOUND" ; then $RM_PROG -f html.tar fi $TAR_PROG -cf html.tar html if test "x$GZIP_PROG" != "xNOTFOUND" ; then if test "x$RM_PROG" != "xNOTFOUND" ; then $RM_PROG -f html.tar.gz fi $GZIP_PROG html.tar $MV_PROG -f html.tar.gz "$RESULTING_HTML_TARZ_ARCHIVE_FILE" fi fi fi fi # ---------------------------------------------------------------------------- # Let's overwrite any *vtk* file produce by our custom vtk/doxygen tool # on top of the existing doxygen one. if test "x$CP_PROG" != "xNOTFOUND" ; then $CP_PROG "$OUTPUT_DIRECTORY/html/"*vtk* "$PATH_TO_VTKGDCM_FINAL_PATH" fi # ---------------------------------------------------------------------------- # Clean-up. if test "x$RM_PROG" != "xNOTFOUND" ; then $RM_PROG -fr "$INTERMEDIATE_DOX_DIR" if test "x$DOWNLOAD_VTK_TAGFILE" == "xON" ; then if test "x$VTK_TAGFILE" != "x" ; then $RM_PROG -f "$VTK_TAGFILE_DEST_DIR/$VTK_TAGFILE" fi fi if test "x$COMPILE_HTML_HELP" == "xON" ; then if test "x$RESULTING_HTML_HELP_FILE" != "x" ; then if test "x$ALLOW_ERASE_OUTPUT_DIRECTORY" == "xON" ; then $RM_PROG -fr "$OUTPUT_DIRECTORY" fi fi fi fi gdcm-3.0.22/Utilities/doxygen/vtk/doxyfile.in000664 001766 001770 00000014400 14517730450 023463 0ustar00mmalaterremmalaterre000000 000000 # ------------------------------------------------------------------------- # doxyfile for generic project # modified by S. Barre (Time-stamp: <2005-11-07 11:45:05 barre> # ------------------------------------------------------------------------- PROJECT_NAME = @DOXYGEN_PROJECT_NAME@ FULL_PATH_NAMES = YES WARN_IF_UNDOCUMENTED = NO GENERATE_TREEVIEW = NO GENERATE_TODOLIST = YES GENERATE_BUGLIST = YES GENERATE_HTML = YES GENERATE_HTMLHELP = YES GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO GENERATE_TAGFILE = "@CMAKE_CURRENT_BINARY_DIR@/@DOXYGEN_PROJECT_NAME@.tag" PDF_HYPERLINKS = YES HAVE_DOT = YES #HAVE_DOT = NO DOT_PATH = "@DOT_PATH@" CLASS_GRAPH = YES COLLABORATION_GRAPH = YES TEMPLATE_RELATIONS = YES INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES CLASS_DIAGRAMS = YES GENERATE_LEGEND = YES GRAPHICAL_HIERARCHY = NO # would be too large for vtkObject ALLEXTERNALS = NO IMAGE_PATH = "@CMAKE_CURRENT_SOURCE_DIR@" OUTPUT_DIRECTORY = "@CMAKE_CURRENT_BINARY_DIR@/doc" INPUT = \ "@CMAKE_CURRENT_BINARY_DIR@/dox/doc_@DOXYGEN_PROJECT_NAME@_index.dox" \ @DOXYGEN_PARSED_INPUT_DIRS@ #TAGFILES = "@CMAKE_CURRENT_BINARY_DIR@/vtkNightlyDoc.tag=http://www.vtk.org/doc/nightly/html" TAGFILES = @TAGFILES@ EXTRACT_ALL = YES EXTRACT_PRIVATE = NO EXTRACT_STATIC = YES EXTRACT_LOCAL_CLASSES = NO HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_CLASSES = YES ALWAYS_DETAILED_SEC = NO SOURCE_BROWSER = YES INLINE_SOURCES = NO CASE_SENSE_NAMES = YES VERBATIM_HEADERS = NO SHOW_INCLUDE_FILES = YES JAVADOC_AUTOBRIEF = YES SORT_MEMBER_DOCS = NO DISTRIBUTE_GROUP_DOC = YES TAB_SIZE = 3 DETAILS_AT_TOP = YES SHORT_NAMES = @DOXYGEN_SHORT_NAMES@ # PAPER_TYPE = letter FILE_PATTERNS = *.h RECURSIVE = NO EXCLUDE = Common/vtkSetGet.h EXCLUDE_PATTERNS = HTML_ALIGN_MEMBERS = YES ALPHABETICAL_INDEX = YES COLS_IN_ALPHA_INDEX = 3 IGNORE_PREFIX = @DOXYGEN_IGNORE_PREFIX@ ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES SEARCH_INCLUDES = YES INCLUDE_PATH = EXPAND_ONLY_PREDEF = YES PREDEFINED = "vtkSetMacro(name,type)= \ virtual void Set##name (type);" \ "vtkGetMacro(name,type)= \ virtual type Get##name ();" \ "vtkSetStringMacro(name)= \ virtual void Set##name (const char*);" \ "vtkGetStringMacro(name)= \ virtual char* Get##name ();" \ "vtkSetClampMacro(name,type,min,max)= \ virtual void Set##name (type);" \ "vtkSetObjectMacro(name,type)= \ virtual void Set##name (type*);" \ "vtkGetObjectMacro(name,type)= \ virtual type *Get##name ();" \ "vtkBooleanMacro(name,type)= \ virtual void name##On (); \ virtual void name##Off ();" \ "vtkSetVector2Macro(name,type)= \ virtual void Set##name (type, type); \ void Set##name (type [2]);" \ "vtkGetVector2Macro(name,type)= \ virtual type *Get##name (); \ virtual void Get##name (type &, type &); \ virtual void Get##name (type [2]);" \ "vtkSetVector3Macro(name,type)= \ virtual void Set##name (type, type, type); \ virtual void Set##name (type [3]);" \ "vtkGetVector3Macro(name,type)= \ virtual type *Get##name (); \ virtual void Get##name (type &, type &, type &); \ virtual void Get##name (type [3]);" \ "vtkSetVector4Macro(name,type)= \ virtual void Set##name (type, type, type, type); \ virtual void Set##name (type [4]);" \ "vtkGetVector4Macro(name,type)= \ virtual type *Get##name (); \ virtual void Get##name (type &, type &, type &, type &); \ virtual void Get##name (type [4]);" \ "vtkSetVector6Macro(name,type)= \ virtual void Set##name (type, type, type, type, \ type, type); \ virtual void Set##name (type [6]);" \ "vtkGetVector6Macro(name,type)= \ virtual type *Get##name (); \ virtual void Get##name (type &, type &, type &, \ type &, type &, type &); \ virtual void Get##name (type [6]);" \ "vtkSetVectorMacro(name,type,count)= \ virtual void Set##name(type data[]);" \ "vtkGetVectorMacro(name,type,count)= \ virtual type *Get##name (); \ virtual void Get##name(type data[##count]);" \ "vtkWorldCoordinateMacro(name)= \ virtual vtkCoordinate *Get##name##Coordinate (); \ virtual void Set##name(float x[3]); \ virtual void Set##name(float x, float y, float z); \ virtual float *Get##name();" \ "vtkViewportCoordinateMacro(name)= \ virtual vtkCoordinate *Get##name##Coordinate (); \ virtual void Set##name(float x[2]); \ virtual void Set##name(float x, float y); \ virtual float *Get##name();" \ "vtkTypeMacro(thisClass,superclass)= \ typedef superclass Superclass; \ virtual const char *GetClassName(); \ static int IsTypeOf(const char *type); \ virtual int IsA(const char *type); \ static thisClass* SafeDownCast(vtkObject *o);" \ "vtkTypeRevisionMacro(thisClass,superclass)= \ typedef superclass Superclass; \ virtual const char *GetClassName(); \ static int IsTypeOf(const char *type); \ virtual int IsA(const char *type); \ static thisClass* SafeDownCast(vtkObject *o);" \ "VTK_LEGACY(x)= x" gdcm-3.0.22/Utilities/doxygen/CMakeLists.txt000664 001766 001770 00000032625 14517730450 023255 0ustar00mmalaterremmalaterre000000 000000 # Documentation # http://www.stack.nl/~dimitri/doxygen # http://www.stack.nl/~dimitri/doxygen/commands.html#cmdsa if(GDCM_DOCUMENTATION) find_package(Doxygen REQUIRED) if(GDCM_DOXYGEN_NO_FOOTER) set(GDCM_HTML_FOOTER) else() # Otherwise use gdcm/piwik/sf.net footer: set(GDCM_HTML_FOOTER ${GDCM_SOURCE_DIR}/Utilities/doxygen/footer.html) endif() configure_file( ${GDCM_SOURCE_DIR}/Utilities/doxygen/doxyfile.in ${GDCM_BINARY_DIR}/Utilities/doxygen/Doxyfile ) file(GLOB_RECURSE headerfiles "${GDCM_SOURCE_DIR}/Source/*.h" "${GDCM_SOURCE_DIR}/Wrapping/*.h" "${GDCM_SOURCE_DIR}/Utilities/VTK/*.h" #"${GDCM_SOURCE_DIR}/Utilities/doxygen/man/*.dox" ) list(REMOVE_ITEM headerfiles "${GDCM_SOURCE_DIR}/Source/DataDictionary/gdcmTagKeywords.h" "${GDCM_SOURCE_DIR}/Source/DataDictionary/gdcmTagToType.h" ) #message(${headerfiles}) # We are depending only on header files and README.txt but other files # could be needed for complete dependencies file(GLOB_RECURSE examplefiles "${GDCM_SOURCE_DIR}/Examples/*.cxx" "${GDCM_SOURCE_DIR}/Examples/*.cs" "${GDCM_SOURCE_DIR}/Examples/*.java" "${GDCM_SOURCE_DIR}/Examples/*.py" ) file(GLOB_RECURSE vtkexamplefiles "${GDCM_SOURCE_DIR}/Utilities/VTK/Examples/*.cxx" "${GDCM_SOURCE_DIR}/Utilities/VTK/Examples/*.cs" "${GDCM_SOURCE_DIR}/Utilities/VTK/Examples/*.java" "${GDCM_SOURCE_DIR}/Utilities/VTK/Examples/*.py" ) set(DOXYFILE_EXAMPLES) foreach(file ${examplefiles} ${vtkexamplefiles}) get_filename_component(f ${file} NAME) set(DOXYFILE_EXAMPLES "${DOXYFILE_EXAMPLES}\n\\example ${f}") endforeach() configure_file( ${GDCM_SOURCE_DIR}/Utilities/doxygen/TestsList.txt.in ${GDCM_BINARY_DIR}/Utilities/doxygen/TestsList.txt @ONLY ) if(GDCM_MINOR_VERSION MATCHES "[02468]$") set(GDCM_DOC_PDF_LINK "http://gdcm.sourceforge.net/${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}/gdcm-${GDCM_VERSION}.pdf" ) set(GDCM_DOC_TARBALL_LINK "http://gdcm.sourceforge.net/${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}/gdcm-${GDCM_VERSION}-doc.tar.gz" ) else() set(GDCM_DOC_PDF_LINK "http://gdcm.sourceforge.net/gdcm-${GDCM_VERSION}.pdf" ) set(GDCM_DOC_TARBALL_LINK "http://gdcm.sourceforge.net/gdcm-${GDCM_VERSION}-doc.tar.gz" ) endif() configure_file( ${GDCM_SOURCE_DIR}/Utilities/doxygen/README.txt.in ${GDCM_BINARY_DIR}/Utilities/doxygen/README.txt @ONLY ) set(GDCM_DOC_TARBALL ${CMAKE_CURRENT_BINARY_DIR}/gdcm-${GDCM_VERSION}-doc.tar.gz ) # epstopdf is needed: sudo apt-get install texlive-extra-utils # pdflatex is needed: sudo apt-get install texlive-latex-extra add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html ${CMAKE_CURRENT_BINARY_DIR}/latex/Makefile # let's create the tarball within the same custom command to avoid complex dep. rules. ${GDCM_DOC_TARBALL} ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.tex # output #1 (fake) # 1. first thing first let's run doxygen COMMAND ${DOXYGEN} ARGS ${GDCM_BINARY_DIR}/Utilities/doxygen/Doxyfile # 2. tarball gen. COMMAND ${CMAKE_COMMAND} ARGS -E tar cfz ${GDCM_DOC_TARBALL} html DEPENDS ${GDCM_BINARY_DIR}/Utilities/doxygen/Doxyfile ${GDCM_BINARY_DIR}/Utilities/doxygen/README.txt ${GDCM_BINARY_DIR}/Utilities/doxygen/TestsList.txt ${headerfiles} COMMENT "GDCM: Creating doxygen doc + tarball" #WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) # PDF building part: # When building latex, we have to run a custom command to produce the pdf file: if(UNIX AND GDCM_PDF_DOCUMENTATION) find_program(PDFOPT_EXECUTABLE pdfopt) find_program(SED_EXECUTABLE sed) find_package(LATEX REQUIRED) mark_as_advanced(PDFOPT_EXECUTABLE SED_EXECUTABLE) # Let's customize the pdf tags a little usind sed: # Apparently egrep is also needed... # BAD: there is a circular dependency where refman.tex depend on refman.tex in the sed steps... # hack our way in anyway by simply removing the dep... #add_custom_command( # ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/patchtex.cmake #) # TODO, foreach(*.tex) # sed -i -e "/home/mmalaterre/Projects/" ... string(REPLACE "/" "\\/" sed_gdcm_source_dir ${GDCM_SOURCE_DIR}) #message(${sed_gdcm_source_dir}) add_custom_command( OUTPUT #${CMAKE_CURRENT_BINARY_DIR}/latex/refman.tex # output #1 (fake) ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf # output #2 # Command #1 COMMAND ${SED_EXECUTABLE} ARGS -i.tmp -e "'s/]{hyperref}/]{hyperref}\\\\hypersetup{pdftitle={GDCM ${GDCM_VERSION} Reference Manual},pdfauthor={Mathieu Malaterre and co.},pdfsubject={Grassroots DICOM API reference},pdfkeywords={GDCM,DICOM,Network,Query\\/Retrieve,JPEG,Lossless JPEG,JPEG-LS,J2K,JPEG 2000,RLE},pdfpagemode={UseOutlines},bookmarks,bookmarksopen,pdfstartview={FitH},backref,colorlinks,linkcolor={black},citecolor={black},urlcolor={black},baseurl={http:\\/\\/gdcm.sourceforge.net}}\\\\hyperbaseurl{http:\\/\\/gdcm.sourceforge.net}/g'" ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.tex # Command #2 COMMAND ${SED_EXECUTABLE} ARGS -i.tmp -e "'s/${sed_gdcm_source_dir}/gdcm/g'" ${CMAKE_CURRENT_BINARY_DIR}/latex/*.tex # Command #3 COMMAND make ARGS -C ${CMAKE_CURRENT_BINARY_DIR}/latex DEPENDS #${CMAKE_CURRENT_BINARY_DIR}/latex/refman.tex ${CMAKE_CURRENT_BINARY_DIR}/latex/Makefile #${GDCM_DOC_TARBALL} COMMENT "GDCM: Creating (patched) pdf of documentation" ) if(PDFOPT_EXECUTABLE) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/latex/gdcm-${GDCM_VERSION}.pdf COMMAND ${PDFOPT_EXECUTABLE} ARGS ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf ${CMAKE_CURRENT_BINARY_DIR}/latex/gdcm-${GDCM_VERSION}.pdf DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf COMMENT "GDCM: Creating optimized pdf version of documentation" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/latex ) else() add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/latex/gdcm-${GDCM_VERSION}.pdf COMMAND ${CMAKE_COMMAND} -E copy ARGS ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf ${CMAKE_CURRENT_BINARY_DIR}/latex/gdcm-${GDCM_VERSION}.pdf DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf COMMENT "GDCM: Creating unoptimized pdf version of documentation" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/latex ) endif() # add target to 'ALL' add_custom_target(GDCMDoxygenPDF DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/latex/gdcm-${GDCM_VERSION}.pdf COMMENT "GDCM: Executing GDCMDoxygenPDF" ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/latex/gdcm-${GDCM_VERSION}.pdf DESTINATION ${GDCM_INSTALL_DOC_DIR} ) add_dependencies(DoxygenDoc GDCMDoxygenPDF) else() # make DoxygenDoc depends on the final tarball thus all file are garantee to be generated add_custom_target(GDCMDoxygenDoc DEPENDS ${GDCM_DOC_TARBALL} COMMENT "GDCM: Executing GDCMDoxygenDoc" ) add_dependencies(DoxygenDoc GDCMDoxygenDoc) endif() # Install html pages: #install(FILES # ${CMAKE_CURRENT_BINARY_DIR}/html/gdcm2vtk.html # ${CMAKE_CURRENT_BINARY_DIR}/html/gdcmconv.html # ${CMAKE_CURRENT_BINARY_DIR}/html/gdcmanon.html # ${CMAKE_CURRENT_BINARY_DIR}/html/gdcmgendir.html # ${CMAKE_CURRENT_BINARY_DIR}/html/gdcmdump.html # ${CMAKE_CURRENT_BINARY_DIR}/html/gdcmimg.html # ${CMAKE_CURRENT_BINARY_DIR}/html/gdcminfo.html # ${CMAKE_CURRENT_BINARY_DIR}/html/gdcmpdf.html # ${CMAKE_CURRENT_BINARY_DIR}/html/gdcmraw.html # ${CMAKE_CURRENT_BINARY_DIR}/html/gdcmscanner.html # ${CMAKE_CURRENT_BINARY_DIR}/html/gdcmtar.html # ${CMAKE_CURRENT_BINARY_DIR}/html/gdcmviewer.html # DESTINATION ${GDCM_INSTALL_DOC_DIR} COMPONENT DebugDevel #) #install(FILES # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcm2vtk.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcm2pnm.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcmconv.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcmpap3.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcmxml.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcmanon.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcmgendir.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcmdump.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcmdiff.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcmimg.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcminfo.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcmpdf.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcmraw.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcmscu.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcmscanner.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcmtar.1 # ${CMAKE_CURRENT_BINARY_DIR}/man/man1/gdcmviewer.1 # DESTINATION ${GDCM_INSTALL_MAN_DIR}/man1 COMPONENT DebugDevel #) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${GDCM_INSTALL_DOC_DIR} PATTERN "*.md5" EXCLUDE PATTERN "*.dot" EXCLUDE ) # http://lists.debian.org/debian-italian/2006/12/msg00878.html # man2txt : man man | col -b | less if(GDCM_USE_VTK) # Make this option a hidden option as vtkgdcm/doxygen stuff is a mess (copy/paste # from paraview). It always rerun -sigh- if(GDCM_VTK_DOCUMENTATION) set(BUILD_DOCUMENTATION 1) endif() add_subdirectory(vtk) endif() endif() option(GDCM_BUILD_DOCBOOK_MANPAGES "Build man pages from XML docbook ?" ON) mark_as_advanced(GDCM_BUILD_DOCBOOK_MANPAGES) if(GDCM_BUILD_DOCBOOK_MANPAGES) set(MANPAGES_XML gdcm2pnm gdcm2vtk gdcmanon gdcmclean gdcmconv gdcmdiff gdcmdump gdcmgendir gdcmimg gdcminfo gdcmpap3 gdcmpdf gdcmraw gdcmscanner gdcmscu gdcmtar gdcmviewer gdcmxml ) find_package(LibXslt) # need an XSLT 1.0 processor, use xsltproc, maybe add more implementations later if(LIBXSLT_XSLTPROC_EXECUTABLE) set(XSLT_PROCESSOR ${LIBXSLT_XSLTPROC_EXECUTABLE}) # http://docbook.sourceforge.net/release/xsl/current/doc/manpages/man.output.quietly.html set(XSLT_PROCESSOR_ARG --param man.output.quietly 1 --maxdepth 6000 ) # User can change the behavior at cmake time: if(NOT DEFINED GDCM_MANPAGES_USE_NONET) set(GDCM_MANPAGES_USE_NONET FALSE) # By default I want nonet on Debian (docbook-xsl-ns) # on fedora you need to install docbook-style-xsl if(EXISTS /etc/xml/catalog) # https://cmake.org/pipermail/cmake/2007-May/014317.html file(READ /etc/xml/catalog xml_catalog_in) # # string(REGEX REPLACE "\r?\n" ";" xml_catalog ${xml_catalog_in}) set(DOCBOOK_REWRITE_PREFIX_FOUND FALSE) foreach(line ${xml_catalog}) string(REGEX MATCH "^.*systemIdStartString=\"http://docbook.sourceforge.net/release/xsl-ns/\".*" out1 ${line}) string(REGEX REPLACE "^.*systemIdStartString=\"http://docbook.sourceforge.net/release/xsl-ns/\".*\"([A-Za-z ]*)\".*" "\\1" output_variable ${line}) if(out1) message(STATUS "Your docbook install was found here :${output_variable}") set(DOCBOOK_REWRITE_PREFIX_FOUND TRUE) endif() endforeach() # Need both the catalog and the docbook installation if(DOCBOOK_REWRITE_PREFIX_FOUND) set(GDCM_MANPAGES_USE_NONET TRUE) else() message(WARNING "Could not find the location of your docbook-xsl-ns installation. Please make sure your internet connection works. Or skip man pages generation: GDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF.") endif() else() message(STATUS "Could not find /etc/xml/catalog") endif() endif() if(GDCM_MANPAGES_USE_NONET) list(APPEND XSLT_PROCESSOR_ARG --nonet) endif() else() find_program(MSXSL_EXECUTABLE msxsl ) mark_as_advanced(MSXSL_EXECUTABLE) if(MSXSL_EXECUTABLE) set(XSLT_PROCESSOR ${MSXSL_EXECUTABLE}) set(XSLT_PROCESSOR_ARG "-pi") # msxsl.exe -pi gdcmimg.xml # #Error occurred while executing stylesheet 'http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl'. # #Code: 0x80004005 #Namespace 'http://exslt.org/common' does not contain any functions. # -> http://stackoverflow.com/a/16605034/136285 ?? endif() endif() if(XSLT_PROCESSOR) configure_file(version.txt.in version.txt @ONLY) foreach(docbook ${MANPAGES_XML}) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${docbook}.1 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/man/${docbook}.xml ${CMAKE_CURRENT_BINARY_DIR}/${docbook}.xml COMMAND ${XSLT_PROCESSOR} ${XSLT_PROCESSOR_ARG} ${CMAKE_CURRENT_BINARY_DIR}/${docbook}.xml DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/man/${docbook}.xml ) list(APPEND MANPAGES ${CMAKE_CURRENT_BINARY_DIR}/${docbook}.1 ) endforeach() add_custom_target(DOCBOOK_MANPAGES ALL DEPENDS ${MANPAGES} COMMENT "docbook manpages" ) install(FILES ${MANPAGES} DESTINATION ${GDCM_INSTALL_MAN_DIR}/man1 COMPONENT DebugDevel ) else() message(WARNING "Cannot build man page from docbook (need an XSL processor)") endif() endif() # GDCM_BUILD_DOCBOOK_MANPAGES gdcm-3.0.22/Utilities/doxygen/authors.xml000664 001766 001770 00000003516 14517730450 022721 0ustar00mmalaterremmalaterre000000 000000 Fabrice Bellet <bellet@users.sourceforge.net> Christina Roßmanith <chrrossmanith@users.sourceforge.net> Charles Pareto <chuckdawit@users.sourceforge.net> Charl P. Botha <cpbotha@users.sourceforge.net> Dean Inglis <deaninglis@users.sourceforge.net> Daniele E. Domenichelli <drdanz@users.sourceforge.net> Jean-Pierre Roux <jprx@users.sourceforge.net> Mathieu Malaterre <malat@users.sourceforge.net> Niels Dekker Rogue Research <rogueresearch@users.sourceforge.net> Shane Blackett <sablackett@users.sourceforge.net> Joel Spaltenstein <spalte@users.sourceforge.net> gdcm-3.0.22/Utilities/doxygen/man/000775 001766 001770 00000000000 14517731550 021262 5ustar00mmalaterremmalaterre000000 000000 gdcm-3.0.22/Utilities/doxygen/man/gdcmviewer.xml000664 001766 001770 00000010234 14517730450 024136 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmviewer 1 GDCM &version; DICOM Manipulation. gdcmviewer Simple DICOM viewer. SYNOPSIS gdcmviewer [options] file-in DESCRIPTION The gdcmviewer is a simple tool that show how to use vtkGDCMImageReader. The class that use gdcm to make a layer to VTK. gdcmviewer is basically only just a wrapper around VTK/GDCM. This tool is meant for testing integration of GDCM in VTK. You should see it as a demo tool. It does compile with VTK ranging from 4.2 to 5.10, but only with VTK 5.2 (or above) can play with the widgets (as described below). PARAMETERS file-in DICOM input filename OPTIONS specific options --force-rescale force rescale (advanced users) --force-spacing force spacing (advanced users) -r --recursive Recursively descend directory general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information Typical usage Simple usage For now gdcmviewer should be started from a command line prompt. The next argument should be the name of the DICOM file you wish to read. For instance: $ gdcmviewer -V 012345.002.050.dcm gdcmviewer will try to read your file, and then print the vtk information associated with this file. Basically what kind of image you are looking at. ScalarType is the DICOM Real World Value type Dimensions is the dimension of the image Spacing is the spacing of the image NumberOfScalarComponents should be 1 for grayscale & PALETTE COLOR and 3 for RGB, YBR data. Wiki Link The wiki page, with color pictures can be found at: http://gdcm.sourceforge.net/wiki/index.php/Gdcmviewer SEE ALSO gdcmdump(1), gdcm2vtk(1) gdcm-3.0.22/Utilities/doxygen/man/gdcmscu.xml000664 001766 001770 00000034361 14517730450 023436 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmscu 1 GDCM &version; DICOM Manipulation. gdcmscu Tool to execute a DICOM Query/Retrieve operation SYNOPSIS gdcmscu [OPTION]...[OPERATION]...HOSTNAME...[PORT]... Execute a DICOM Q/R operation to HOSTNAME, using port PORT (104 when not specified) DESCRIPTION The gdcmscu command line program is the tool to execute DICOM Query/Retrieve operation. It supports: C-ECHO (SCU) C-FIND (SCU) C-STORE (SCU) C-MOVE (SCU/SCP) C-MOVE operation are executed using two different ports (one for the SCU and one for the SCP). PARAMETERS OPTIONS specific options -H --hostname %s Hostname. -p --port %d Port number. --aetitle %s Set calling AE Title. --call %s Set called AE Title. mode options --echo C-ECHO (default when none). --store C-STORE. --find C-FIND. --move C-MOVE. C-STORE options -i --input %s DICOM filename -r --recursive recursively process (sub-)directories --store-query %s Store constructed query in file C-FIND/C-MOVE options --patientroot C-FIND Patient Root Model. --studyroot C-FIND Study Root Model. --patient C-FIND Query on Patient Info (cannot be used with --studyroot). --study C-FIND Query on Study Info. --series C-FIND Query on Series Info. --image C-FIND Query on Image Info. --key %d,%d[=%s] 0123,4567=VALUE for specifying search criteria (wildcard allowed) With --key, leave blank (ie, --key 10,20="" or --key 10,20) to retrieve values C-MOVE options -o --output %s DICOM filename / directory --port-scp %d Port for incoming associations --key %d,%d[=%s 0123,4567=VALUE for specifying search criteria (wildcard not allowed) Note that C-MOVE supports the same queries as C-FIND, but no wildcards are allowed general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information -L --log-file specify a filename where to write logs --queryhelp print query help environment variable GDCM_ROOT_UID Root UID C-ECHO usage gdcmscu is a great tool to test if a DICOM server is up. For example to send a C-ECHO to server dicom.example.com using port 104, use: $ gdcmscu dicom.example.com or if you prefer being explicit: $ gdcmscu --echo dicom.example.com 104 Using basic security your DICOM server might require that you set the appropriate called AE-TITLE $ gdcmscu --echo dicom.example.com 11112 --call SERVSCP If you want to specify your own AE-TITLE (default is GDCMSCU), simply use: $ gdcmscu --echo dicom.example.com 11112 --call SERVSCP --aetitle MYSCU For example you could test on the DICOM server provided by DICOMObject team: $ gdcmscu www.dicomserver.co.uk 11112 C-STORE usage C-STORE is the operation that allow sending a DICOM file to a remote DICOM server. For instance to send a file called myfile.dcm $ gdcmscu --store dicom.example.com 104 myfile.dcm or if you prefer being explicit: $ gdcmscu --store dicom.example.com 104 -i myfile.dcm You can even send multiple files using the same association: $ gdcmscu --store dicom.example.com 104 myfile1.dcm myfile2.dcm myfile3.dcm ... C-FIND usage gdcmscu also allow querying a DICOM server. This is the C-FIND operation, for example to find all DICOM Instance where PatientsName match a particular pattern, usage is simply: $ gdcmscu --find --patient dicom.example.com 11112 --patientroot --key 10,10,"A*" We also support a DCMTK compatible convention: $ gdcmscu --find --patient dicom.example.com 11112 --patientroot --key 10,10="A*" When an attribute is set without a value it will be part of the output result: $ gdcmscu --find --patient dicom.example.com 11112 --call MI2B2 --patientroot -k 10,10="A*" -k 10,20 C-MOVE usage C-MOVE is the operation to retrieve a DICOM instance from a remote DICOM server. Most of the time, it is a subsequent operation after a C-FIND query. To retrieve a DICOM instance where PatientID is ABCD1234, simply execute: $ gdcmscu --move --patient --aetitle ACME1 --call ACME_STORE dicom.example.com 5678 --patientroot -k 10,20="ABCD1234" --port-scp 1234 WARNING For this operation to work you need information from the DICOM server you are communicating with. Only the DICOM server you are sending a C-MOVE query will be responsible for sending back incoming associations (the actual C-STORE SCP). Therefore you need to make sure that you mapping of (AE-TITLE,PortNumber) is properly set on the DICOM server side as well as the port for incoming association (–port-scp). gdcmscu does not currently support external C-STORE association (C-STORE request sent to an external SCP application). patientroot notes The flag –patientroot is just simply a wrapper around the syntax –key 8,52=PATIENT For instance one would write using DCMTK syntax: $ findscu --patient dicom.example.com 11112 --key 8,52=PATIENT --key 10,10="F*" This would become using GDCM syntax: $ gdcmscu --find --patient dicom.example.com 11112 --patientroot --key 10,10="F*" Debugging This is sometime difficult to investigate why a connection to a remote DICOM server cannot be done. Some recommendations follows: Always try to do a simple C-ECHO at first. If you cannot get the C-ECHO to work none of the other operations will work Before trying to a C-MOVE operation, make sure you can execute the C-FIND equivalent query first. When doing a C-MOVE operation you really need to communicate with the PACS admin as the C-MOVE operation is different from the other lower level operation such as HTTP/GET. When doing a C-MOVE, the server will communicate back using another channel (could be different port) using it's internal database to map an AE-TITLE back to the destination IP. Indeed the C-MOVE operation by design does not always use your incoming IP address to send back the resulting dataset. Instead it uses a mapping of AE-TITLE to IP address to send back any results. So pay particular attention to the spelling of your AE-TITLE and your incoming port (which may be different from the port to connect to the server). Port Warning Watch out that port ranging [1-1024] are reserved for admin and not easily accessible unless granted special privileges. Therefore the default 104 DICOM port might not be accessible to all your users. C-STORE Warnings When constructing a C-STORE operation, gdcmscu will always use the Media Storage SOP Class UID as found in the file to be sent. For encapsulated DICOM file (eg. RLE Lossless) the receiving SCP server might not support this compression and will legitimately refuse the C-STORE operation. In this case users have to manually convert to a non-compressed form this particular file: $ gdcmconv --raw compressed.dcm non_compressed.dcm C-MOVE Warnings At the moment gdcmscu only supports non-compressed transfer syntax. It will always request DataSet using Implicit VR Little Endian Transfer Syntax during a C-MOVE operation (both incoming and outgoing associations). This make gdcmscu –move equivalent to DCMTK movescu syntax: $ movescu -xi +xi ... C-FIND IMAGE level (Composite Object Instance) One should pay attention that gdcmscu –find and findscu are not completely equivalent. Using gdcmscu –find, all Unique Keys will be added automatically. One can therefore execute something like this: $ gdcmscu --find --patientroot --image --key 8,18=1.2.3.4.5.6 dicom.example.com 11112 instead of the more explicit form $ gdcmscu --find --patientroot --image --key 8,18=1.2.3.4.5.6 dicom.example.com 11112 --key 10,20 --key 20,d --key 20,e This would also be equivalent to: $ findscu --patient --key 8,52=IMAGE --key 8,18=1.2.3.4.5.6 dicom.example.com 11112 --key 10,20 --key 20,d --key 20,e Storing the Query It is also possible to store the query: gdcmscu --find --patient --patientroot dicom.example.com 11112 --key 10,20="*" --key 10,10 --store-query query.dcm One can then check the DataSet values send for the query: $ gdcmdump query.dcm # Dicom-File-Format # Dicom-Meta-Information-Header # Used TransferSyntax: # Dicom-Data-Set # Used TransferSyntax: 1.2.840.10008.1.2 (0008,0005) ?? (CS) [ISO_IR 192] # 10,1-n Specific Character Set (0008,0052) ?? (CS) [PATIENT ] # 8,1 Query/Retrieve Level (0010,0010) ?? (PN) (no value) # 0,1 Patient's Name (0010,0020) ?? (LO) [* ] # 2,1 Patient ID The Specific Character Set was set to ISO_IR 192 as the locale encoding of the system was found automatically by gdcmscu to be UTF-8. This means that the following command line will properly setup the Query with the appropriate Charset to be executed correctly: $ gdcmscu --find --patient --patientroot dicom.example.com 11112 --key 10,10="*Jérôme*" The query is always executed on the server side (SCP), some implementations does not support string matching with different Character Set. DICOM Public Servers An up to date list of DICOM Public Servers can be found at: http://www.dclunie.com/medical-image-faq/html/part8.html#DICOMPublicServers SEE ALSO gdcmconv(1) gdcm-3.0.22/Utilities/doxygen/man/gdcmtar.xml000664 001766 001770 00000014670 14517730450 023433 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmtar 1 GDCM &version; DICOM Manipulation. gdcmtar Concatenate/Extract DICOM files. SYNOPSIS gdcmtar [options] file-in file-out DESCRIPTION The gdcmtar is a command line tool used to tar/untar multi-frames images (including SIEMENS MOSAIC file) PARAMETERS file-in DICOM input filename file-out DICOM output filename OPTIONS specific options --enhance Enhance (default) -U --unenhance Unenhance -M --mosaic Split SIEMENS Mosaic image into multiple frames. --mosaic-private When splitting SIEMENS Mosaic image into multiple frames, preserve private attributes (advanced user only). -p --pattern Specify trailing file pattern. --root-uid Root UID. general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information environment variable GDCM_ROOT_UID Root UID Typical usage SIEMENS Mosaic This option will turn a 2D frame containing sub-frame of a SIEMENS MOSAIC into a set of MR Image Storage (legacy). $ gdcminfo MR-sonata-3D-as-Tile.dcm MediaStorage is 1.2.840.10008.5.1.4.1.1.4 [MR Image Storage] TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian] NumberOfDimensions: 2 Dimensions: (384,384,1) ... $ gdcmtar --mosaic -i MR-sonata-3D-as-Tile.dcm -o mosaic --pattern %03d.dcm Will output: -rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic000.dcm -rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic001.dcm -rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic002.dcm -rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic003.dcm -rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic004.dcm -rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic005.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic006.dcm -rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic007.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic008.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic009.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic010.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic011.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic012.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic013.dcm -rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic014.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic015.dcm -rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic016.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic017.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic018.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic019.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic020.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic021.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic022.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic023.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic024.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic025.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic026.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic027.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic028.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic029.dcm -rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic030.dcm $ gdcminfo mosaic000.dcm MediaStorage is 1.2.840.10008.5.1.4.1.1.4 [MR Image Storage] TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian] NumberOfDimensions: 2 Dimensions: (64,64,1) ... By default all private attributes are removed since they may not match the newly generated SOP Instance. One way to preserve the private attributes is to use the --mosaic-private command line option $ gdcmtar --mosaic --mosaic-private -i MR-sonata-3D-as-Tile.dcm -o mosaic --pattern %03d.dcm SEE ALSO gdcmdump(1), gdcmraw(1), gdcminfo(1) gdcm-3.0.22/Utilities/doxygen/man/gdcm2vtk.xml000664 001766 001770 00000020425 14517730450 023526 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcm2vtk 1 GDCM &version; DICOM Manipulation. gdcm2vtk Convert a file supported by VTK into DICOM. SYNOPSIS gdcm2vtk [options] file-in file-out DESCRIPTION The gdcm2vtk takes as input any file supported by VTK (including DICOM file) and will generate as output a DICOM file. PARAMETERS file-in input filename (DICOM or VTK supported) file-out output filename (DICOM or VTK supported) OPTIONS specific options --force-rescale force rescale. --force-spacing force spacing. --palette-color when supported generate a PALETTE COLOR file. --argb when supported generate a ARGB file. --compress when supported generate a compressed file. --use-vtkdicom Use vtkDICOMImageReader (instead of GDCM). --modality set Modality. --lower-left set lower left. --shift set shift. --scale set scale. --compress set compression (MetaIO). -T --study-uid Study UID. -S --series-uid Series UID. --root-uid Root UID. --imageformat Image Format [1-8] (aka PhotometricInterpretation). --ipp-sort When input is directory, sort instances using IOP/IPP. compression options -J --jpeg Compress image in jpeg. -K --j2k Compress image in j2k. -L --jpegls Compress image in jpeg-ls. -R --rle Compress image in rle (lossless only). general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information environment variable GDCM_ROOT_UID Root UID DESCRIPTION Convert a file supported by VTK into DICOM. Typical usage is: $ gdcm2vtk inputfile output.dcm It uses the internal factory mechanism of VTK to recognize a file (CanRead function). See VTK supported file here: What image file formats can VTK read and write? http://www.vtk.org/Wiki/VTK_FAQ#What_image_file_formats_can_VTK_read_and_write.3F If your input file has 4 components, the 4th comp (alpha) will be removed from the output file as DICOM does not support alpha component anymore (see –argb option). Special care was taken for the following file format: 1. DICOM: Direction Cosines and vtkMedicalImageInformation are passed to the output 2. BMP: The file can be saved with a Lookup Table (see --palette-color) 3. GE Signa: vtkMedicalImageProperties is passed to the output 4. MINC: Direction Cosines is passed to the output 5. TIFF: vtkTIFFReader is currently in bad shape in VTK (different behavior in VTK 5.2 and git/master). Only use it, if you know what you are doing. CONVERT MetaImage (mhd, mha) $ gdcm2vtk inputfile output.mha This command will convert the input DICOM file: inputfile into a MetaImage .mha file. Same goes for .mhd file. CONVERT MHA/MHD $ gdcm2vtk inputfile output.mha or $ gdcm2vtk inputfile output.mhd This command will convert the input DICOM file: inputfile into a MetaImageData .mha/.mhd file. CONVERT VTI $ gdcm2vtk inputfile output.vti This command will convert the input DICOM file: inputfile into a XML VTK ImageData .vti file. CONVERT VTK $ gdcm2vtk inputfile output.vtk This command will convert the input DICOM file: inputfile into an old VTK Structured PointSets .vtk file. CONVERT DICOM $ gdcm2vtk input.dcm output.dcm vtkGDCMImageReader will be used to read in a DICOM file, not the default vtkDICOMImageReader. See option –use-vtkdicom to use vtkDICOMImageReader. RoundTrip DICOM to MHD to DICOM $ gdcm2vtk input_ybr.dcm output.mhd $ gdcm2vtk --modality US --imageformat 7 output.mhd output.dcm The above refsection shows how to convert a DICOM using the Photometric Interpretation of YBR_FULL (or even YBR_FULL_422 is lossy) into another file format: MetaImage (mhd). Since this file format does not handle color space, we have to explicitly set it using the –imageformat command line option. The –modality command line option is required in this case since the default Secondary Capture Image Storage Class family does not allow for YBR Photometric Interpretation. gdcm2vtk notes IMPORTANT NOTE: The internal VTK structured will be filled from the input DICOM, and then pass to the output DICOM writer. Some information might be lost during the conversion DICOM to VTK to DICOM. This option is mostly used to test the vtkGDCMImageReader/vtkGDCMImageWriter combination. IMPORTANT NOTE: When converting from a lossy format such as JPEG, the information of lossiness is important. The output DICOM will contains the required Lossy Image Compression attribute that indicates that image was lossy-compressed somewhere along the pipeline. See also gdcmimg (better handling of JPEG in general). IMPORTANT NOTE: When using –use-vtkdicom the output DICOM file will always be written as MR Image Storage as this information is not available from the reader itself. This allow setting the Image Orientation (Patient) properly. SEE ALSO gdcmdump(1), gdcmviewer(1), gdcmimg(1) gdcm-3.0.22/Utilities/doxygen/man/gdcm2pnm.xml000664 001766 001770 00000005650 14517730450 023517 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcm2pnm 1 GDCM &version; DICOM Manipulation. gdcm2pnm off-screen rendering of DICOM images SYNOPSIS gdcm2pnm [options] file-in bitmap-out DESCRIPTION The gdcm2pnm command line program takes as input a DICOM file and produces a rendered bitmap file. PARAMETERS file-in DICOM input filename bitmap-out Bitmap output filename OPTIONS specific options general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information Simple usage gdcm2pnm will take as input DICOM and render it into a bitmap file using the window/level attributes value. $ gdcm2pnm input.dcm output.png It is much different from the gdcmraw or gdcmimg command line tool as it will render a DICOM image. This means that the output will be rendered in 8bits ready for display. SEE ALSO gdcm2vtk(1), gdcmimg(1) gdcm-3.0.22/Utilities/doxygen/man/gdcmscanner.xml000664 001766 001770 00000010374 14517730450 024273 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmscanner 1 GDCM &version; DICOM Manipulation. gdcmscanner Scan a directory containing DICOM files. SYNOPSIS gdcmscanner [options] directory DESCRIPTION The gdcmscanner is a command line tool to quickly extract value from a set of DICOM attribute in a DICOM File-Set. PARAMETERS -d --dir DICOM directory -t --tag %d,%d DICOM tag(s) to look for -k --keyword %s DICOM keyword(s) to look for -P --private-tag %d,%d,%s DICOM private tag(s) to look for OPTIONS -p --print Print output. -r --recursive Recursively descend directory. --strict Use strict parser (faster but less tolerant with bogus DICOM files). --table Use Table output. general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information Typical usage Simple usage In order to display all the value for Patient Name (0010,0010) in the directory name gdcmData, simply do: $ gdcmscanner -t 10,10 -d gdcmData -p For private tag simply do: $ gdcmscanner -P "0029,60,SIEMENS MEDCOM HEADER2" -d gdcmData -p Table usage In order to display as CSV (see dicom3tools/dctable) all the values for SOP Instance / Study Instance / Series Instance UID(s) in the directory name gdcmData, simply do: $ gdcmscanner -k SOPInstanceUID -k StudyInstanceUID -k SeriesInstanceUID -d gdcmData -p --table Complex usage Because gdcmscanner does not support progress, you have to wait until all files are traversed to see any results. This is quite cumbersome, on UNIX this can be worked around with the following trick: $ find gdcmData -type d -exec gdcmscanner -t 10,10 -d {} -p ';' So all directory are locally traversed (no child directory are recursively traversed), which means results comes out much faster. SEE ALSO dctable(1), gdcmdump(1), gdcmraw(1) gdcm-3.0.22/Utilities/doxygen/man/gdcmanon.xml000664 001766 001770 00000034374 14517730450 023603 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmanon 1 GDCM &version; DICOM Manipulation. gdcmanon Tool to anonymize a DICOM file. SYNOPSIS gdcmanon [options] file-in file-out gdcmanon [options] dir-in dir-out DESCRIPTION The gdcmanon tool is an implementation of PS 3.15 / E.1 / Basic Application Level Confidentiality Profile (Implementation of E.1.1 De-identify & E.1.2 Re-identify) This tool is split into two very different operating mode: An implementation of PS 3.15, see -e and -d flags A dumb mode, see –dumb Dumb mode and PS 3.15 do not work well together, you should really only use one type of anonymization. In case of doubt, avoid using –dumb. In order to use the PS 3.15 implementation (-d & -e flag), you'll need a certificate to do de-identification operations, and the associated private key to do the re-identification operation. If you are only doing a one-shot anonymization and do not need to properly re-identify the DICOM file, you can safely discard the private key and only keep the certificate. See OpenSSL refsection below for an example on how to generate the private key/certificate pair. gdcmanon will exit early if OpenSSL was not configured/build properly into the library (see GDCM_USE_SYSTEM_OPENSSL in cmake). PARAMETERS file-in DICOM input filename file-out DICOM output filename or file-in DICOM input directory file-out DICOM output directory OPTIONS You need to specify at least one operating mode, from the following list (and only one): Required parameters -e --de-identify De-identify DICOM (default) -d --re-identify Re-identify DICOM --dumb Dumb mode anonymizer Warning when operating in dumb mode, you need to also specify an operation to do, such as 'remove' or 'empty' a tag, see below the dumb mode options. specific options -i --input DICOM filename / directory -o --output DICOM filename / directory -r --recursive recursively process (sub-)directories. --continue Do not stop when file found is not DICOM. --root-uid Root UID. --resources-path Resources path. -k --key Path to RSA Private Key. -c --certificate Path to Certificate. -p --password Encryption passphrase. Crypto library options --crypto= openssl OpenSSL (default on non-Windows systems). capi Microsoft CryptoAPI (default on Windows systems). openssl-p7 Old OpenSSL implementation. encryption options --des DES. --des3 Triple DES. --aes128 AES 128. --aes192 AES 192. --aes256 AES 256. dumb mode options --empty %d,%d DICOM tag(s) to empty %d,%d,%s DICOM private tag(s) to empty --clear %d,%d DICOM tag(s) to clear %d,%d,%s DICOM private tag(s) to clear --remove %d,%d DICOM tag(s) to remove %d,%d,%s DICOM private tag(s) to remove --replace %d,%d=%s DICOM tag(s) to replace %d,%d,%s=%s DICOM private tag(s) to replace general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information environment variable GDCM_ROOT_UID Root UID GDCM_RESOURCES_PATH path pointing to resources files (Part3.xml, ...) Typical usage De-identification (anonymization, encrypt) The only thing required for this operation is a certificate file (in PEM format). $ gdcmanon --certificate certificate.pem -e original.dcm original_anonymized.dcm You can use –asn1 option from gdcmdump to dump the generated DataSet as ASN1 structure (see gdcmdump(1) for example). Re-identification (de-anonymization,decrypt) The only thing required for this operation is a private key (in PEM format). It is required that the private key used for the re-identification process, was the actual private key used to generate the certificate file (certificate.pem) used during the de-identification step. $ gdcmanon --key privatekey.pem -d original_anonymized.dcm original_copy.dcm You can then check that original.dcm and original_copy.dcm are identical. Multiple files caveat It is very important to understand the following refsection, when anonymizing more than one single file. When anonymizing multiple DICOM files, you are required to use the directory input. You cannot call multiple time the gdcmanon command line tool. Indeed the tool stores in memory during the process only a hash table of conversion so that each time a particular value is found it get always replaced by the same de-identified value (think: consistent Series Instance UID). Dumb mode This functionality is not described in the DICOM standard. Users are advised that improper use of that mode is not recommended, meaning that important tag can be emptied/removed/replaced resulting in illegal/invalid DICOM file. Only use when you know what you are doing. If you delete a Type 1 attribute, chance is that your DICOM file will be not accepted in most DICOM third party viewer. Unfortunately this is often this mode that is implemented in popular DICOM Viewer, always prefer what the DICOM standard describes, and avoid the dumb mode. The following example shows how to use dumb mode and achieve 5 operations at the same time: Empty the tag (0010,0010) Patient's Name, Clear the tag (0010,0020) Patient ID, Remove the tag (0010,0040) Patient's Sex Remove the tag (0010,1010) Patient's Age Replace the tag (0010,1030) Patient's Weight with the value '10' You are required to check which DICOM attribute is Type 1 and Type 1C, before trying to 'Empty','Clear' or 'Remove' a particular DICOM attribute. For the same reason, you are required to check what are valid value in a replace operation. $ gdcmanon --dumb --empty 10,10 --clear 10,20 --remove 10,40 --remove 10,1010 --replace 10,1030,10 012345.002.050.dcm out.dcm In the following example a private tag (0029,20,SIEMENS MEDCOM HEADER) is cleared out (made empty only when present): $ gdcmanon --dumb --clear "0029,20,SIEMENS MEDCOM HEADER" input.dcm output.dcm Multiple operation of –dumb mode can take place, just reuse the output of the previous operation. Always use gdcmdump on the input and output file to check what was actually achieved. You can use a diff program to check only what changed (see gdcmdiff(1) for example). Irreversible Anonymization In some very rare cases, one would want to anonymize using the PS 3.15 mode so as to take benefit of the automatic conversion of all content that could contain Patient related information. In the end all Patient related information has been removed and has been secretly stored in the 0400,0500 DICOM attribute. However to make sure that no-one ever try to break that security using brute-force algorithm, one want want to remove completely this DICOM attribute. This will make the DICOM: Completely free of any Patient related information (as per PS 3.15 specification) Remove any mean of people to brute force attack the file to find out the identity of the Patient In this case one could simply do, as a first step execute the reversible anonymizer: $ gdcmanon -c certificate.pem input.dcm anonymized_reversible.dcm and now completely remove the DICOM attribute containing the secretly encrypted Patient related information: $ gdcmanon --dumb --remove 400,500 --remove 12,62 --remove 12,63 anonymized_reversible.dcm anonymized_irreversible.dcm Remarks: As mentioned in DICOM Sup 142, this anonymization is preferred over de-identification since: It is not required that the Encrypted Attributes Data Set be created; indeed, there may be circumstances where the Dataset is expected to be archived long enough that any contemporary encryption technology may be inadequate to provide long term protection against unauthorized recovery of identification OpenSSL On most system you can have access to OpenSSL to generate the Private Key/Certificate pair. Generating a Private Key Command line to generate a rsa key (512bit) $ openssl genrsa -out CA_key.pem Command line to generate a rsa key (2048bit) $ openssl genrsa -out CA_key.pem 2048 Command line to generate a rsa key (2048bit) + passphrase $ openssl genrsa -des3 -out CA_key.pem 2048 Generating a Certificate From your previously generated Private Key, you can now generate a certificate in PEM (DER format is currently not supported). $ openssl req -new -key CA_key.pem -x509 -days 365 -out CA_cert.cer DICOM Standard: Page to the DICOM Standard: http://dicom.nema.org/ The DICOM Standard at the time of releasing gdcmanon is: ftp://medical.nema.org/medical/dicom/2008/ Direct link to PS 3.15-2008: ftp://medical.nema.org/medical/dicom/2008/08_15pu.pdf Warnings Certain attributes may still contains Protected Health Information (PHI) after an anonymization step. This is typically the case for Patient's Address (0010,1040). The reason is that this particular attribute is not supposed to be in the composite IODs in the first place. DICOM Supp 142 includes it (however gdcmanon does not implement it). SEE ALSO gdcmconv(1), gdcmdump(1), gdcmdiff(1), openssl(1), dumpasn1(1) gdcm-3.0.22/Utilities/doxygen/man/gdcmpap3.xml000664 001766 001770 00000007556 14517730450 023515 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmpap3 1 GDCM &version; DICOM Manipulation. gdcmpap3 Tool to convert PAPYRUS 3.0 to DICOM. SYNOPSIS gdcmpap3 [options] file-in file-out DESCRIPTION The gdcmpap3 command line program takes as input a PAPYRUS 3.0 file (file-in) and process it to generate an output (pseudo) DICOM file (file-out). The command line option dictate the type of operation(s) gdcmpap3 will use to generate the output file. PARAMETERS file-in DICOM input filename file-out DICOM output filename OPTIONS -i --input DICOM filename -o --output DICOM filename specific options -S --split Split multiframes PAPYRUS 3.0 into multiples DICOM files --decomp-pap3 Use PAPYRUS 3.0 for decompressing (can be combined with --split). --check-iop Check that the Image Orientation (Patient) Attribute is ok (see --split). general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information environment variable GDCM_ROOT_UID Root UID Simple usage gdcmpap3 is a great tool to convert broken PAPYRUS 3.0 implementation into properly parsable DICOM file. Usage is simply: $ gdcmpap3 input.pa3 output.dcm or if you prefer being explicit: $ gdcmpap3 -i input.pa3 -o output.dcm Even though gdcmpap3 can overwrite directly on the same file (input.pa3 = output.dcm), it is recommended that user should first convert into a different file to make sure the bug is properly handled by GDCM. SEE ALSO gdcmdump(1), gdcmconv(1), gdcminfo(1) gdcm-3.0.22/Utilities/doxygen/man/gdcmdump.xml000664 001766 001770 00000143160 14517730450 023607 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmdump 1 GDCM &version; DICOM Manipulation. gdcmdump dumps a DICOM file, it will display the structure and values contained in the specified DICOM file. SYNOPSIS gdcmdump [options] dcm_file gdcmdump [options] dcm_directory DESCRIPTION The gdcmdump command line program dumps a DICOM file to the console. For those familiar with dcmdump (DCMTK) output, gdcmdump has some minor differences. Namely: For Implicit Transfer Syntax gdcmdump will print ?? instead of the dictionary VR gdcmdump has a limited private dictionary that is used to lookup private element whenever possible. PARAMETERS dcm_file DICOM input filename dcm_directory DICOM input directory OPTIONS specific options -x --xml-dict generate the XML dict (only private elements for now). -r --recursive recursive (input is a directory) -d --dump dump value (limited use). -p --print print value instead of simply dumping (default). -c --color print in color. -C --csa print SIEMENS CSA Header (0029,[12]0,SIEMENS CSA HEADER). --csa-asl print decoded SIEMENS CSA MR_ASL (base64). --csa-diffusion print decoded SIEMENS CSA MRDiffusion (base64). --mrprotocol print SIEMENS MrProtocol only (within ASCCONV BEGIN/END). or Phoenix Meta Protocol (0021,19,SIEMENS MR SDS 01). -P --pdb print GEMS Protocol Data Block (0025,1b,GEMS_SERS_01). --elscint print ELSCINT Protocol Information (01f7,26,ELSCINT1). --vepro print VEPRO Protocol Information (0055,20,VEPRO VIF 3.0 DATA). or VEPRO Protocol Information (0055,20,VEPRO VIM 5.0 DATA). --sds print Philips MR Series Data Storage (1.3.46.670589.11.0.0.12.2) Information (2005,32,Philips MR Imaging DD 002). --ct3 print CT Private Data 2 (7005,10,TOSHIBA_MEC_CT3). --pmtf print PMTF INFORMATION DATA sub-sequences (0029,01,PMTF INFORMATION DATA). or TOSHIBA_MEC_MR3 sub-sequences (0029,01,TOSHIBA_MEC_MR3). or CANON_MEC_MR3 sub-sequences (0029,01,CANON_MEC_MR3) --medcom print MedCom History Information as UTF-8 (0029,20,SIEMENS MEDCOM HEADER). --mr3 print Original Data as UTF-8 (700d,08,TOSHIBA_MEC_MR3). -A --asn1 print encapsulated ASN1 structure >(0400,0520). --map-uid-names map UID to names. general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information special options -I --ignore-errors dumps even if file is corrupted (advanced users only, see disclaimers). Typical usage Printing Implicit Transfer Syntax The VR are not found in the file, thus are presented with a (??), and right next to it (if found) the correct VR. Eg.: $ gdcmdump GE_DLX-8-MONO2-PrivateSyntax.dcm # Dicom-File-Format ... (0008,0000) ?? (UL) 434 # 4,1 Generic Group Length (0008,0005) ?? (CS) [ISO_IR 100] # 10,1-n Specific Character Set (0008,0008) ?? (CS) [ORIGINAL\\PRIMARY\\SINGLE PLANE ] # 30,2-n Image Type (0008,0016) ?? (UI) [1.2.840.10008.5.1.4.1.1.12.1] # 28,1 SOP Class UID (0008,0018) ?? (UI) [1.2.840.113619.2.16.1.0.906539207.1.24207] # 42,1 SOP Instance UID (0008,0020) ?? (DA) [19980923] # 8,1 Study Date (0008,0021) ?? (DA) [19980923] # 8,1 Series Date (0008,0022) ?? (DA) [19980923] # 8,1 Acquisition Date (0008,0023) ?? (DA) [19980923] # 8,1 Content Date (0008,0030) ?? (TM) [101229.000] # 10,1 Study Time (0008,0031) ?? (TM) [101229.000] # 10,1 Series Time (0008,0032) ?? (TM) [102653.000] # 10,1 Acquisition Time (0008,0033) ?? (TM) [102653.000] # 10,1 Content Time ... Print Private Attributes GDCM has a limited private dictionary. Whenever possible, it will try to lookup the private data element. $ gdcmdump 012345.002.050.dcm ... (0009,0010) LO [GEMS_IDEN_01] # 12,1 Private Creator (0009,1001) LO [GE_GENESIS_FF ] # 14,1 Full fidelity (0009,1002) SH [MRCV] # 4,1 Suite id (0009,1004) SH [SIGNA ] # 6,1 Product id (0009,1027) SL 985968524 # 4,1 Image actual date (0009,1030) SH [19356UMR2 ] # 10,1 Service id (0009,1031) SH [999 ] # 4,1 Mobile location number (0009,10e3) UI [1.2.840.113619.1.1.4.1762386977] # 32,1 Equipment UID (0009,10e6) SH [08] # 2,1 Genesis Version - now (0009,10e7) UL 2757786872 # 4,1 Exam Record checksum (0009,10e9) SL 985968523 # 4,1 Actual series data time stamp ... (0019,0000) UL 1208 # 4,1 Generic Group Length (0019,0010) LO [GEMS_ACQU_01] # 12,1 Private Creator (0019,100f) DS [424.399994] # 10,1 Horiz. Frame of ref. (0019,1011) SS 0 # 2,1 Series contrast ... (0019,10e0) DS [0.000000] # 8,1 User data 24 {# DTI Diffusion Dir., release 10.0 & above} (0019,10e2) DS [0.000000] # 8,1 Velocity Encode Scale (0019,10f2) SS 0 # 2,1 Fast phases (0019,10f9) DS [98] # 2,1 Transmit gain ... (0021,0000) UL 372 # 4,1 Generic Group Length (0021,0010) LO [GEMS_RELA_01] # 12,1 Private Creator (0021,1003) SS 0 # 2,1 Series from which Prescribed ... SIEMENS CSA Header Using this option it is possible to dump as a readable text what is contained in the private attribute as found in typical SIEMENS MR DICOM file. Eg.: $ gdcmdump --csa MR_SIEMENS_forceLoad29-1010_29-1020.dcm (0029,0010)siemens csa header Image shadow data (0029,xx10) 0 - 'EchoLinePosition' VM 1, VR IS, SyngoDT 6, NoOfItems 6, Data '64 ' 1 - 'EchoColumnPosition' VM 1, VR IS, SyngoDT 6, NoOfItems 6, Data '64 ' 2 - 'EchoPartitionPosition' VM 1, VR IS, SyngoDT 6, NoOfItems 6, Data '32 ' 3 - 'UsedChannelMask' VM 1, VR UL, SyngoDT 9, NoOfItems 6, Data '255 ' 4 - 'Actual3DImaPartNumber' VM 1, VR IS, SyngoDT 6, NoOfItems 0, Data 5 - 'ICE_Dims' VM 1, VR LO, SyngoDT 19, NoOfItems 6, Data 'X_1_1_1_1_1_1_31_1_1_1_1_19' 6 - 'B_value' VM 1, VR IS, SyngoDT 6, NoOfItems 6, Data '0 ' 7 - 'Filter1' VM 1, VR IS, SyngoDT 6, NoOfItems 0, Data 8 - 'Filter2' VM 1, VR IS, SyngoDT 6, NoOfItems 0, Data ... SIEMENS CSA Header: MR_ASL Using this option it is possible to dump a decoded (base64) version of MR_ASL contained in the CSA header. Eg.: $ gdcmdump --csa-asl ASL.dcm (0018,9251) SQ (Sequence with undefined length) # u/l,1 MR Arterial Spin Labeling Sequence (fffe,e000) na (Item with undefined length) (0018,9252) LO [2D pulsed ASL (EP2D)] # 20,1 ASL Technique Description (0018,9257) CS [LABEL ] # 6,1 ASL Context (0018,9259) CS [NO] # 2,1 ASL Crusher Flag (0018,925c) CS [YES ] # 4,1 ASL Bolus Cut-off Flag (0018,925d) SQ (Sequence with undefined length) # u/l,1 ASL Bolus Cut-off Timing Sequence (fffe,e000) na (Item with undefined length) (0018,925e) LO [Q2TIPS] # 6,1 ASL Bolus Cut-off Technique (0018,925f) IS (UL) [1990] # 4,1 ASL Bolus Cut-off Delay Time (fffe,e00d) (fffe,e0dd) (0018,9260) SQ (Sequence with undefined length) # u/l,1 ASL Slab Sequence (fffe,e000) na (Item with undefined length) (0018,9253) US 1 # 2,1 ASL Slab Number (0018,9254) FD 109.5 # 8,1 ASL Slab Thickness (0018,9255) FD 0\0\1 # 24,3 ASL Slab Orientation (0018,9256) FD 0\-23.9333\-70.9189 # 24,3 ASL Mid Slab Position (0018,9258) IS (UL) [10] # 2,1 ASL Pulse Train Duration (fffe,e00d) (fffe,e0dd) (fffe,e00d) (fffe,e0dd) This is completely equivalent to doing (by hand): $ gdcmdump --csa asl.dcm | grep -A 6 MR_ASL 98 - 'MR_ASL' VM 1, VR UT, SyngoDT 27, NoOfItems 6, Data 'GABRklNRAAD//////v8A4P////8YAFKSTE8UADJEIHB1bHNlZCBBU0wgKEVQMkQpGABXkkNT BgBMQUJFTCAYAGCSU1EAAP/////+/wDg/////xgAU5JVUwIAAQAYAFSSRkQIAAAAAAAAYFtA GABVkkZEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8D8YAFaSRkQYAAAAAAAAAAAAAAAAYOvu N8AAAACAzrpRwBgAWJJJUwIAMTD+/w3gAAAAAP7/3eAAAAAAGABZkkNTAgBOTxgAXJJDUwQA WUVTIBgAXZJTUQAA//////7/AOD/////GABekkxPBgBRMlRJUFMYAF+SSVMEADE5OTD+/w3g AAAAAP7/3eAAAAAA/v8N4AAAAAD+/93gAAAAAA== ' $ echo 'GABRklNRAAD//////v8A4P////8YAFKSTE8UADJEIHB1bHNlZCBBU0wgKEVQMkQpGABXkkNT BgBMQUJFTCAYAGCSU1EAAP/////+/wDg/////xgAU5JVUwIAAQAYAFSSRkQIAAAAAAAAYFtA GABVkkZEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8D8YAFaSRkQYAAAAAAAAAAAAAAAAYOvu N8AAAACAzrpRwBgAWJJJUwIAMTD+/w3gAAAAAP7/3eAAAAAAGABZkkNTAgBOTxgAXJJDUwQA WUVTIBgAXZJTUQAA//////7/AOD/////GABekkxPBgBRMlRJUFMYAF+SSVMEADE5OTD+/w3g AAAAAP7/3eAAAAAA/v8N4AAAAAD+/93gAAAAAA== ' | base64 -d > asl.dcm $ dcmdump -f asl.dcm One should pay attention that currently two attributes (0018,925f) and (0018,9258) are using a VR that is different from what the DICOM standard specifies. SIEMENS CSA Header: MRDiffusion Using this option it is possible to dump a decoded (base64) version of MRDiffusion contained in the CSA header. Eg.: $ gdcmdump --csa-diffusion DIFFUSION.dcm # Dicom-File-Format # Dicom-Meta-Information-Header # Used TransferSyntax: # Dicom-Data-Set # Used TransferSyntax: Unknown Transfer Syntax (0018,9117) SQ (Sequence with undefined length) # u/l,1 MR Diffusion Sequence (fffe,e000) na (Item with undefined length) (0018,9075) CS [ISOTROPIC ] # 10,1 Diffusion Directionality (0018,9087) FD 0 # 8,1 Diffusion b-value (fffe,e00d) (fffe,e0dd) SIEMENS CSA Header: MrProtocol Using this option it is possible to dump a sorted version of MrProtocol (extra '"' are trimmed). Eg.: $ gdcmdump --mrprotocol input.dcm MrProtocolVersion: 12510002 acFlowComp[0] : 1 adFlipAngleDegree[0] : 90 alTE[0] : 60000 alTR[0] : 3000000 dRefSNR : 181090.7706 dRefSNR_VOI : 181090.7706 lAverages : 1 lCombinedEchoes : 1 lContrasts : 1 lParadigmPeriodicity : 1 lRepetitions : 79 lScanTimeSec : 3 lTotalScanTimeSec : 246 sAdjFreSpec.ulMode : 0x1 sAdjShimSpec.ulMode : 0x2 sAdjWatSupSpec.ulMode : 0x1 sAngio.ucPCFlowMode : 0x2 sAngio.ucTOFInflow : 0x4 sAutoAlign.dAAMatrix[0] : 1 sAutoAlign.dAAMatrix[10] : 1 sAutoAlign.dAAMatrix[15] : 1 sAutoAlign.dAAMatrix[5] : 1 sCOIL_SELECT_MEAS.asList[0].lElementSelected : 1 sCOIL_SELECT_MEAS.asList[0].lRxChannelConnected : 1 sCOIL_SELECT_MEAS.asList[0].sCoilElementID.lCoilCopy : 1 sCOIL_SELECT_MEAS.asList[0].sCoilElementID.tCoilID : 8_Channel_Head sCOIL_SELECT_MEAS.asList[0].sCoilElementID.tElement : PH7 sCOIL_SELECT_MEAS.asList[1].lElementSelected : 1 sCOIL_SELECT_MEAS.asList[1].lRxChannelConnected : 2 sCOIL_SELECT_MEAS.asList[1].sCoilElementID.lCoilCopy : 1 sCOIL_SELECT_MEAS.asList[1].sCoilElementID.tCoilID : 8_Channel_Head sCOIL_SELECT_MEAS.asList[1].sCoilElementID.tElement : PH5 sCOIL_SELECT_MEAS.asList[2].lElementSelected : 1 sCOIL_SELECT_MEAS.asList[2].lRxChannelConnected : 3 sCOIL_SELECT_MEAS.asList[2].sCoilElementID.lCoilCopy : 1 sCOIL_SELECT_MEAS.asList[2].sCoilElementID.tCoilID : 8_Channel_Head sCOIL_SELECT_MEAS.asList[2].sCoilElementID.tElement : PH3 sCOIL_SELECT_MEAS.asList[3].lElementSelected : 1 sCOIL_SELECT_MEAS.asList[3].lRxChannelConnected : 4 sCOIL_SELECT_MEAS.asList[3].sCoilElementID.lCoilCopy : 1 sCOIL_SELECT_MEAS.asList[3].sCoilElementID.tCoilID : 8_Channel_Head sCOIL_SELECT_MEAS.asList[3].sCoilElementID.tElement : PH1 sCOIL_SELECT_MEAS.asList[4].lElementSelected : 1 sCOIL_SELECT_MEAS.asList[4].lRxChannelConnected : 5 sCOIL_SELECT_MEAS.asList[4].sCoilElementID.lCoilCopy : 1 sCOIL_SELECT_MEAS.asList[4].sCoilElementID.tCoilID : 8_Channel_Head sCOIL_SELECT_MEAS.asList[4].sCoilElementID.tElement : PH8 sCOIL_SELECT_MEAS.asList[5].lElementSelected : 1 sCOIL_SELECT_MEAS.asList[5].lRxChannelConnected : 6 sCOIL_SELECT_MEAS.asList[5].sCoilElementID.lCoilCopy : 1 sCOIL_SELECT_MEAS.asList[5].sCoilElementID.tCoilID : 8_Channel_Head sCOIL_SELECT_MEAS.asList[5].sCoilElementID.tElement : PH6 sCOIL_SELECT_MEAS.asList[6].lElementSelected : 1 sCOIL_SELECT_MEAS.asList[6].lRxChannelConnected : 7 sCOIL_SELECT_MEAS.asList[6].sCoilElementID.lCoilCopy : 1 sCOIL_SELECT_MEAS.asList[6].sCoilElementID.tCoilID : 8_Channel_Head sCOIL_SELECT_MEAS.asList[6].sCoilElementID.tElement : PH4 sCOIL_SELECT_MEAS.asList[7].lElementSelected : 1 sCOIL_SELECT_MEAS.asList[7].lRxChannelConnected : 8 sCOIL_SELECT_MEAS.asList[7].sCoilElementID.lCoilCopy : 1 sCOIL_SELECT_MEAS.asList[7].sCoilElementID.tCoilID : 8_Channel_Head sCOIL_SELECT_MEAS.asList[7].sCoilElementID.tElement : PH2 sCOIL_SELECT_MEAS.sCOILPLUGS.auiNmbrOfNibbles[0] : 0x2 sCOIL_SELECT_MEAS.sCOILPLUGS.auiNmbrOfNibbles[1] : 0x2 sCOIL_SELECT_MEAS.sCOILPLUGS.auiNmbrOfNibbles[2] : 0x2 sCOIL_SELECT_MEAS.sCOILPLUGS.auiNmbrOfNibbles[3] : 0x2 sCOIL_SELECT_MEAS.sCOILPLUGS.auiNmbrOfNibbles[4] : 0x2 sCOIL_SELECT_MEAS.sCOILPLUGS.aulPlugId[0] : 0xff sCOIL_SELECT_MEAS.sCOILPLUGS.aulPlugId[1] : 0xaa sCOIL_SELECT_MEAS.sCOILPLUGS.aulPlugId[2] : 0xee sCOIL_SELECT_MEAS.sCOILPLUGS.aulPlugId[3] : 0xee sCOIL_SELECT_MEAS.sCOILPLUGS.aulPlugId[4] : 0xa4 sDiffusion.ulMode : 0x1 sEFISPEC.bEFIDataValid : 1 sEllipticalFilter.ucMode : 0x1 sFastImaging.lEPIFactor : 128 sFastImaging.lSegments : 1 sFastImaging.lTurboFactor : 1 sGRADSPEC.alShimCurrent[0] : -166 sGRADSPEC.alShimCurrent[1] : 596 sGRADSPEC.alShimCurrent[2] : -516 sGRADSPEC.alShimCurrent[3] : 84 sGRADSPEC.alShimCurrent[4] : -295 sGRADSPEC.bB0CompensationValid : 1 sGRADSPEC.bCrossTermCompensationValid : 1 sGRADSPEC.bDelayValid : 1 sGRADSPEC.bEddyCompensationValid : 1 sGRADSPEC.bOffsetValid : 1 sGRADSPEC.bSensitivityValid : 1 sGRADSPEC.bShimCurrentValid : 1 sGRADSPEC.flGSWDMinRiseTime : 5 sGRADSPEC.flSensitivityX : 0.000353238 sGRADSPEC.flSensitivityY : 0.000364826 sGRADSPEC.flSensitivityZ : 0.000356804 sGRADSPEC.lDelayX : 14 sGRADSPEC.lDelayY : 15 sGRADSPEC.lDelayZ : 13 sGRADSPEC.lOffsetX : -10 sGRADSPEC.lOffsetY : 22 sGRADSPEC.lOffsetZ : 34 sGRADSPEC.sB0CompensationX.aflAmplitude[0] : -0.0110937 sGRADSPEC.sB0CompensationX.aflAmplitude[1] : -0.0276212 sGRADSPEC.sB0CompensationX.aflAmplitude[2] : 0.00261628 sGRADSPEC.sB0CompensationX.aflTimeConstant[0] : 1.86006 sGRADSPEC.sB0CompensationX.aflTimeConstant[1] : 0.0451358 sGRADSPEC.sB0CompensationX.aflTimeConstant[2] : 0.00199924 sGRADSPEC.sB0CompensationY.aflAmplitude[0] : 0.0647921 sGRADSPEC.sB0CompensationY.aflAmplitude[1] : 0.0207167 sGRADSPEC.sB0CompensationY.aflAmplitude[2] : -0.0131878 sGRADSPEC.sB0CompensationY.aflTimeConstant[0] : 0.852499 sGRADSPEC.sB0CompensationY.aflTimeConstant[1] : 0.0633158 sGRADSPEC.sB0CompensationY.aflTimeConstant[2] : 0.00199999 sGRADSPEC.sB0CompensationZ.aflAmplitude[0] : 0.119857 sGRADSPEC.sB0CompensationZ.aflAmplitude[1] : 0.0106907 sGRADSPEC.sB0CompensationZ.aflAmplitude[2] : -0.0159243 sGRADSPEC.sB0CompensationZ.aflTimeConstant[0] : 1.03958 sGRADSPEC.sB0CompensationZ.aflTimeConstant[1] : 0.019543 sGRADSPEC.sB0CompensationZ.aflTimeConstant[2] : 0.00141055 sGRADSPEC.sCrossTermCompensationXY.aflAmplitude[0] : 0.000779649 sGRADSPEC.sCrossTermCompensationXY.aflTimeConstant[0] : 0.609972 sGRADSPEC.sCrossTermCompensationXZ.aflAmplitude[0] : -0.000357764 sGRADSPEC.sCrossTermCompensationXZ.aflTimeConstant[0] : 0.757463 sGRADSPEC.sCrossTermCompensationYX.aflAmplitude[0] : 0.00028701 sGRADSPEC.sCrossTermCompensationYX.aflTimeConstant[0] : 0.692162 sGRADSPEC.sCrossTermCompensationYZ.aflAmplitude[0] : 0.000341002 sGRADSPEC.sCrossTermCompensationYZ.aflTimeConstant[0] : 0.643997 sGRADSPEC.sEddyCompensationX.aflAmplitude[0] : 0.00321033 sGRADSPEC.sEddyCompensationX.aflAmplitude[1] : 0.0764387 sGRADSPEC.sEddyCompensationX.aflAmplitude[2] : -0.0119296 sGRADSPEC.sEddyCompensationX.aflAmplitude[3] : 0.002806 sGRADSPEC.sEddyCompensationX.aflAmplitude[4] : 0.00131044 sGRADSPEC.sEddyCompensationX.aflTimeConstant[0] : 1.92825 sGRADSPEC.sEddyCompensationX.aflTimeConstant[1] : 0.530542 sGRADSPEC.sEddyCompensationX.aflTimeConstant[2] : 0.348189 sGRADSPEC.sEddyCompensationX.aflTimeConstant[3] : 0.0172583 sGRADSPEC.sEddyCompensationX.aflTimeConstant[4] : 0.00199055 sGRADSPEC.sEddyCompensationY.aflAmplitude[0] : 0.00129643 sGRADSPEC.sEddyCompensationY.aflAmplitude[1] : 0.0657945 sGRADSPEC.sEddyCompensationY.aflAmplitude[2] : -0.00875319 sGRADSPEC.sEddyCompensationY.aflAmplitude[3] : 0.00247817 sGRADSPEC.sEddyCompensationY.aflAmplitude[4] : 0.00136282 sGRADSPEC.sEddyCompensationY.aflTimeConstant[0] : 2.18733 sGRADSPEC.sEddyCompensationY.aflTimeConstant[1] : 0.554603 sGRADSPEC.sEddyCompensationY.aflTimeConstant[2] : 0.363992 sGRADSPEC.sEddyCompensationY.aflTimeConstant[3] : 0.0174167 sGRADSPEC.sEddyCompensationY.aflTimeConstant[4] : 0.0019934 sGRADSPEC.sEddyCompensationZ.aflAmplitude[0] : 0.0106364 sGRADSPEC.sEddyCompensationZ.aflAmplitude[1] : 0.0644895 sGRADSPEC.sEddyCompensationZ.aflAmplitude[2] : -0.0116849 sGRADSPEC.sEddyCompensationZ.aflAmplitude[3] : 0.00245425 sGRADSPEC.sEddyCompensationZ.aflAmplitude[4] : -0.000382604 sGRADSPEC.sEddyCompensationZ.aflTimeConstant[0] : 2.45763 sGRADSPEC.sEddyCompensationZ.aflTimeConstant[1] : 0.728919 sGRADSPEC.sEddyCompensationZ.aflTimeConstant[2] : 0.490303 sGRADSPEC.sEddyCompensationZ.aflTimeConstant[3] : 0.0146871 sGRADSPEC.sEddyCompensationZ.aflTimeConstant[4] : 0.00198729 sGRADSPEC.ucMode : 0x11 sGroupArray.anMember[10] : 10 sGroupArray.anMember[11] : 11 sGroupArray.anMember[12] : 12 sGroupArray.anMember[13] : 13 sGroupArray.anMember[14] : 14 sGroupArray.anMember[15] : 15 sGroupArray.anMember[16] : 16 sGroupArray.anMember[17] : 17 sGroupArray.anMember[18] : 18 sGroupArray.anMember[19] : 19 sGroupArray.anMember[1] : 1 sGroupArray.anMember[20] : 20 sGroupArray.anMember[21] : 21 sGroupArray.anMember[22] : 22 sGroupArray.anMember[23] : 23 sGroupArray.anMember[24] : 24 sGroupArray.anMember[25] : 25 sGroupArray.anMember[26] : 26 sGroupArray.anMember[27] : 27 sGroupArray.anMember[28] : 28 sGroupArray.anMember[29] : 29 sGroupArray.anMember[2] : 2 sGroupArray.anMember[30] : 30 sGroupArray.anMember[31] : -1 sGroupArray.anMember[3] : 3 sGroupArray.anMember[4] : 4 sGroupArray.anMember[5] : 5 sGroupArray.anMember[6] : 6 sGroupArray.anMember[7] : 7 sGroupArray.anMember[8] : 8 sGroupArray.anMember[9] : 9 sGroupArray.asGroup[0].dDistFact : 0.1 sGroupArray.asGroup[0].nSize : 31 sGroupArray.lSize : 1 sGroupArray.sPSat.dGap : 10 sGroupArray.sPSat.dThickness : 50 sKSpace.dPhaseResolution : 1 sKSpace.dSliceResolution : 1 sKSpace.lBaseResolution : 64 sKSpace.lImagesPerSlab : 64 sKSpace.lPartitions : 64 sKSpace.lPhaseEncodingLines : 64 sKSpace.ucAveragingMode : 0x2 sKSpace.ucDimension : 0x2 sKSpace.ucMultiSliceMode : 0x2 sKSpace.ucPhasePartialFourier : 0x10 sKSpace.ucSlicePartialFourier : 0x10 sKSpace.unReordering : 0x1 sNavigatorPara.ucRespComp : 0x4 sPat.lAccelFact3D : 1 sPat.lAccelFactPE : 1 sPat.ucPATMode : 0x1 sPat.ucRefScanMode : 0x1 sPhysioImaging.lMethod1 : 1 sPhysioImaging.lMethod2 : 1 sPhysioImaging.lPhases : 1 sPhysioImaging.lRetroGatedImages : 16 sPhysioImaging.lSignal1 : 1 sPhysioImaging.lSignal2 : 1 sPhysioImaging.sPhysioECG.lArrhythmiaDetection : 1 sPhysioImaging.sPhysioECG.lCardiacGateOffThreshold : 700000 sPhysioImaging.sPhysioECG.lCardiacGateOnThreshold : 100000 sPhysioImaging.sPhysioECG.lTriggerPulses : 1 sPhysioImaging.sPhysioECG.lTriggerWindow : 5 sPhysioImaging.sPhysioExt.lCardiacGateOffThreshold : 700000 sPhysioImaging.sPhysioExt.lCardiacGateOnThreshold : 100000 sPhysioImaging.sPhysioExt.lTriggerPulses : 1 sPhysioImaging.sPhysioExt.lTriggerWindow : 5 sPhysioImaging.sPhysioPulse.lCardiacGateOffThreshold : 700000 sPhysioImaging.sPhysioPulse.lCardiacGateOnThreshold : 100000 sPhysioImaging.sPhysioPulse.lTriggerPulses : 1 sPhysioImaging.sPhysioPulse.lTriggerWindow : 5 sPhysioImaging.sPhysioResp.dGatingRatio : 0.3 sPhysioImaging.sPhysioResp.lRespGatePhase : 2 sPhysioImaging.sPhysioResp.lRespGateThreshold : 20 sPrepPulses.ucFatSat : 0x1 sPrepPulses.ucFatSatMode : 0x2 sPrepPulses.ucInversion : 0x4 sPrepPulses.ucSatRecovery : 0x1 sPrepPulses.ucWaterSat : 0x4 sProtConsistencyInfo.flGMax : 26 sProtConsistencyInfo.flNominalB0 : 1.494 sProtConsistencyInfo.flRiseTime : 5 sRXSPEC.aFFT_SCALE[0].bValid : 1 sRXSPEC.aFFT_SCALE[0].flFactor : 0.720612 sRXSPEC.aFFT_SCALE[0].lRxChannel : 1 sRXSPEC.aFFT_SCALE[1].bValid : 1 sRXSPEC.aFFT_SCALE[1].flFactor : 0.719059 sRXSPEC.aFFT_SCALE[1].lRxChannel : 2 sRXSPEC.aFFT_SCALE[2].bValid : 1 sRXSPEC.aFFT_SCALE[2].flFactor : 0.705708 sRXSPEC.aFFT_SCALE[2].lRxChannel : 3 sRXSPEC.aFFT_SCALE[3].bValid : 1 sRXSPEC.aFFT_SCALE[3].flFactor : 0.731533 sRXSPEC.aFFT_SCALE[3].lRxChannel : 4 sRXSPEC.aFFT_SCALE[4].bValid : 1 sRXSPEC.aFFT_SCALE[4].flFactor : 0.722418 sRXSPEC.aFFT_SCALE[4].lRxChannel : 5 sRXSPEC.aFFT_SCALE[5].bValid : 1 sRXSPEC.aFFT_SCALE[5].flFactor : 0.738751 sRXSPEC.aFFT_SCALE[5].lRxChannel : 6 sRXSPEC.aFFT_SCALE[6].bValid : 1 sRXSPEC.aFFT_SCALE[6].flFactor : 0.719098 sRXSPEC.aFFT_SCALE[6].lRxChannel : 7 sRXSPEC.aFFT_SCALE[7].bValid : 1 sRXSPEC.aFFT_SCALE[7].flFactor : 0.733029 sRXSPEC.aFFT_SCALE[7].lRxChannel : 8 sRXSPEC.alDwellTime[0] : 3000 sRXSPEC.bGainValid : 1 sRXSPEC.bVariCapVoltagesValid : 1 sRXSPEC.lGain : 1 sSliceArray.anAsc[10] : 10 sSliceArray.anAsc[11] : 11 sSliceArray.anAsc[12] : 12 sSliceArray.anAsc[13] : 13 sSliceArray.anAsc[14] : 14 sSliceArray.anAsc[15] : 15 sSliceArray.anAsc[16] : 16 sSliceArray.anAsc[17] : 17 sSliceArray.anAsc[18] : 18 sSliceArray.anAsc[19] : 19 sSliceArray.anAsc[1] : 1 sSliceArray.anAsc[20] : 20 sSliceArray.anAsc[21] : 21 sSliceArray.anAsc[22] : 22 sSliceArray.anAsc[23] : 23 sSliceArray.anAsc[24] : 24 sSliceArray.anAsc[25] : 25 sSliceArray.anAsc[26] : 26 sSliceArray.anAsc[27] : 27 sSliceArray.anAsc[28] : 28 sSliceArray.anAsc[29] : 29 sSliceArray.anAsc[2] : 2 sSliceArray.anAsc[30] : 30 sSliceArray.anAsc[3] : 3 sSliceArray.anAsc[4] : 4 sSliceArray.anAsc[5] : 5 sSliceArray.anAsc[6] : 6 sSliceArray.anAsc[7] : 7 sSliceArray.anAsc[8] : 8 sSliceArray.anAsc[9] : 9 sSliceArray.anPos[10] : 10 sSliceArray.anPos[11] : 11 sSliceArray.anPos[12] : 12 sSliceArray.anPos[13] : 13 sSliceArray.anPos[14] : 14 sSliceArray.anPos[15] : 15 sSliceArray.anPos[16] : 16 sSliceArray.anPos[17] : 17 sSliceArray.anPos[18] : 18 sSliceArray.anPos[19] : 19 sSliceArray.anPos[1] : 1 sSliceArray.anPos[20] : 20 sSliceArray.anPos[21] : 21 sSliceArray.anPos[22] : 22 sSliceArray.anPos[23] : 23 sSliceArray.anPos[24] : 24 sSliceArray.anPos[25] : 25 sSliceArray.anPos[26] : 26 sSliceArray.anPos[27] : 27 sSliceArray.anPos[28] : 28 sSliceArray.anPos[29] : 29 sSliceArray.anPos[2] : 2 sSliceArray.anPos[30] : 30 sSliceArray.anPos[3] : 3 sSliceArray.anPos[4] : 4 sSliceArray.anPos[5] : 5 sSliceArray.anPos[6] : 6 sSliceArray.anPos[7] : 7 sSliceArray.anPos[8] : 8 sSliceArray.anPos[9] : 9 sSliceArray.asSlice[0].dPhaseFOV : 230 sSliceArray.asSlice[0].dReadoutFOV : 230 sSliceArray.asSlice[0].dThickness : 4 sSliceArray.asSlice[0].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[0].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[0].sNormal.dTra : 0.992737636 sSliceArray.asSlice[0].sPosition.dCor : -52.65585315 sSliceArray.asSlice[0].sPosition.dSag : 2.24891108 sSliceArray.asSlice[0].sPosition.dTra : -26.94105767 sSliceArray.asSlice[10].dPhaseFOV : 230 sSliceArray.asSlice[10].dReadoutFOV : 230 sSliceArray.asSlice[10].dThickness : 4 sSliceArray.asSlice[10].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[10].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[10].sNormal.dTra : 0.992737636 sSliceArray.asSlice[10].sPosition.dCor : -48.78027355 sSliceArray.asSlice[10].sPosition.dSag : -1.356313999 sSliceArray.asSlice[10].sPosition.dTra : 16.73939831 sSliceArray.asSlice[11].dPhaseFOV : 230 sSliceArray.asSlice[11].dReadoutFOV : 230 sSliceArray.asSlice[11].dThickness : 4 sSliceArray.asSlice[11].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[11].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[11].sNormal.dTra : 0.992737636 sSliceArray.asSlice[11].sPosition.dCor : -48.39271559 sSliceArray.asSlice[11].sPosition.dSag : -1.716836507 sSliceArray.asSlice[11].sPosition.dTra : 21.10744391 sSliceArray.asSlice[12].dPhaseFOV : 230 sSliceArray.asSlice[12].dReadoutFOV : 230 sSliceArray.asSlice[12].dThickness : 4 sSliceArray.asSlice[12].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[12].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[12].sNormal.dTra : 0.992737636 sSliceArray.asSlice[12].sPosition.dCor : -48.00515763 sSliceArray.asSlice[12].sPosition.dSag : -2.077359015 sSliceArray.asSlice[12].sPosition.dTra : 25.47548951 sSliceArray.asSlice[13].dPhaseFOV : 230 sSliceArray.asSlice[13].dReadoutFOV : 230 sSliceArray.asSlice[13].dThickness : 4 sSliceArray.asSlice[13].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[13].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[13].sNormal.dTra : 0.992737636 sSliceArray.asSlice[13].sPosition.dCor : -47.61759967 sSliceArray.asSlice[13].sPosition.dSag : -2.437881523 sSliceArray.asSlice[13].sPosition.dTra : 29.84353511 sSliceArray.asSlice[14].dPhaseFOV : 230 sSliceArray.asSlice[14].dReadoutFOV : 230 sSliceArray.asSlice[14].dThickness : 4 sSliceArray.asSlice[14].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[14].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[14].sNormal.dTra : 0.992737636 sSliceArray.asSlice[14].sPosition.dCor : -47.23004171 sSliceArray.asSlice[14].sPosition.dSag : -2.798404031 sSliceArray.asSlice[14].sPosition.dTra : 34.21158071 sSliceArray.asSlice[15].dPhaseFOV : 230 sSliceArray.asSlice[15].dReadoutFOV : 230 sSliceArray.asSlice[15].dThickness : 4 sSliceArray.asSlice[15].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[15].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[15].sNormal.dTra : 0.992737636 sSliceArray.asSlice[15].sPosition.dCor : -46.84248375 sSliceArray.asSlice[15].sPosition.dSag : -3.158926539 sSliceArray.asSlice[15].sPosition.dTra : 38.57962631 sSliceArray.asSlice[16].dPhaseFOV : 230 sSliceArray.asSlice[16].dReadoutFOV : 230 sSliceArray.asSlice[16].dThickness : 4 sSliceArray.asSlice[16].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[16].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[16].sNormal.dTra : 0.992737636 sSliceArray.asSlice[16].sPosition.dCor : -46.45492579 sSliceArray.asSlice[16].sPosition.dSag : -3.519449047 sSliceArray.asSlice[16].sPosition.dTra : 42.9476719 sSliceArray.asSlice[17].dPhaseFOV : 230 sSliceArray.asSlice[17].dReadoutFOV : 230 sSliceArray.asSlice[17].dThickness : 4 sSliceArray.asSlice[17].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[17].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[17].sNormal.dTra : 0.992737636 sSliceArray.asSlice[17].sPosition.dCor : -46.06736783 sSliceArray.asSlice[17].sPosition.dSag : -3.879971555 sSliceArray.asSlice[17].sPosition.dTra : 47.3157175 sSliceArray.asSlice[18].dPhaseFOV : 230 sSliceArray.asSlice[18].dReadoutFOV : 230 sSliceArray.asSlice[18].dThickness : 4 sSliceArray.asSlice[18].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[18].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[18].sNormal.dTra : 0.992737636 sSliceArray.asSlice[18].sPosition.dCor : -45.67980987 sSliceArray.asSlice[18].sPosition.dSag : -4.240494063 sSliceArray.asSlice[18].sPosition.dTra : 51.6837631 sSliceArray.asSlice[19].dPhaseFOV : 230 sSliceArray.asSlice[19].dReadoutFOV : 230 sSliceArray.asSlice[19].dThickness : 4 sSliceArray.asSlice[19].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[19].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[19].sNormal.dTra : 0.992737636 sSliceArray.asSlice[19].sPosition.dCor : -45.29225191 sSliceArray.asSlice[19].sPosition.dSag : -4.601016571 sSliceArray.asSlice[19].sPosition.dTra : 56.0518087 sSliceArray.asSlice[1].dPhaseFOV : 230 sSliceArray.asSlice[1].dReadoutFOV : 230 sSliceArray.asSlice[1].dThickness : 4 sSliceArray.asSlice[1].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[1].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[1].sNormal.dTra : 0.992737636 sSliceArray.asSlice[1].sPosition.dCor : -52.26829519 sSliceArray.asSlice[1].sPosition.dSag : 1.888388572 sSliceArray.asSlice[1].sPosition.dTra : -22.57301207 sSliceArray.asSlice[20].dPhaseFOV : 230 sSliceArray.asSlice[20].dReadoutFOV : 230 sSliceArray.asSlice[20].dThickness : 4 sSliceArray.asSlice[20].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[20].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[20].sNormal.dTra : 0.992737636 sSliceArray.asSlice[20].sPosition.dCor : -44.90469395 sSliceArray.asSlice[20].sPosition.dSag : -4.961539079 sSliceArray.asSlice[20].sPosition.dTra : 60.4198543 sSliceArray.asSlice[21].dPhaseFOV : 230 sSliceArray.asSlice[21].dReadoutFOV : 230 sSliceArray.asSlice[21].dThickness : 4 sSliceArray.asSlice[21].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[21].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[21].sNormal.dTra : 0.992737636 sSliceArray.asSlice[21].sPosition.dCor : -44.51713599 sSliceArray.asSlice[21].sPosition.dSag : -5.322061587 sSliceArray.asSlice[21].sPosition.dTra : 64.7878999 sSliceArray.asSlice[22].dPhaseFOV : 230 sSliceArray.asSlice[22].dReadoutFOV : 230 sSliceArray.asSlice[22].dThickness : 4 sSliceArray.asSlice[22].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[22].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[22].sNormal.dTra : 0.992737636 sSliceArray.asSlice[22].sPosition.dCor : -44.12957804 sSliceArray.asSlice[22].sPosition.dSag : -5.682584095 sSliceArray.asSlice[22].sPosition.dTra : 69.15594549 sSliceArray.asSlice[23].dPhaseFOV : 230 sSliceArray.asSlice[23].dReadoutFOV : 230 sSliceArray.asSlice[23].dThickness : 4 sSliceArray.asSlice[23].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[23].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[23].sNormal.dTra : 0.992737636 sSliceArray.asSlice[23].sPosition.dCor : -43.74202008 sSliceArray.asSlice[23].sPosition.dSag : -6.043106603 sSliceArray.asSlice[23].sPosition.dTra : 73.52399109 sSliceArray.asSlice[24].dPhaseFOV : 230 sSliceArray.asSlice[24].dReadoutFOV : 230 sSliceArray.asSlice[24].dThickness : 4 sSliceArray.asSlice[24].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[24].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[24].sNormal.dTra : 0.992737636 sSliceArray.asSlice[24].sPosition.dCor : -43.35446212 sSliceArray.asSlice[24].sPosition.dSag : -6.403629111 sSliceArray.asSlice[24].sPosition.dTra : 77.89203669 sSliceArray.asSlice[25].dPhaseFOV : 230 sSliceArray.asSlice[25].dReadoutFOV : 230 sSliceArray.asSlice[25].dThickness : 4 sSliceArray.asSlice[25].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[25].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[25].sNormal.dTra : 0.992737636 sSliceArray.asSlice[25].sPosition.dCor : -42.96690416 sSliceArray.asSlice[25].sPosition.dSag : -6.764151619 sSliceArray.asSlice[25].sPosition.dTra : 82.26008229 sSliceArray.asSlice[26].dPhaseFOV : 230 sSliceArray.asSlice[26].dReadoutFOV : 230 sSliceArray.asSlice[26].dThickness : 4 sSliceArray.asSlice[26].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[26].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[26].sNormal.dTra : 0.992737636 sSliceArray.asSlice[26].sPosition.dCor : -42.5793462 sSliceArray.asSlice[26].sPosition.dSag : -7.124674127 sSliceArray.asSlice[26].sPosition.dTra : 86.62812789 sSliceArray.asSlice[27].dPhaseFOV : 230 sSliceArray.asSlice[27].dReadoutFOV : 230 sSliceArray.asSlice[27].dThickness : 4 sSliceArray.asSlice[27].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[27].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[27].sNormal.dTra : 0.992737636 sSliceArray.asSlice[27].sPosition.dCor : -42.19178824 sSliceArray.asSlice[27].sPosition.dSag : -7.485196635 sSliceArray.asSlice[27].sPosition.dTra : 90.99617349 sSliceArray.asSlice[28].dPhaseFOV : 230 sSliceArray.asSlice[28].dReadoutFOV : 230 sSliceArray.asSlice[28].dThickness : 4 sSliceArray.asSlice[28].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[28].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[28].sNormal.dTra : 0.992737636 sSliceArray.asSlice[28].sPosition.dCor : -41.80423028 sSliceArray.asSlice[28].sPosition.dSag : -7.845719143 sSliceArray.asSlice[28].sPosition.dTra : 95.36421908 sSliceArray.asSlice[29].dPhaseFOV : 230 sSliceArray.asSlice[29].dReadoutFOV : 230 sSliceArray.asSlice[29].dThickness : 4 sSliceArray.asSlice[29].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[29].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[29].sNormal.dTra : 0.992737636 sSliceArray.asSlice[29].sPosition.dCor : -41.41667232 sSliceArray.asSlice[29].sPosition.dSag : -8.206241651 sSliceArray.asSlice[29].sPosition.dTra : 99.73226468 sSliceArray.asSlice[2].dPhaseFOV : 230 sSliceArray.asSlice[2].dReadoutFOV : 230 sSliceArray.asSlice[2].dThickness : 4 sSliceArray.asSlice[2].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[2].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[2].sNormal.dTra : 0.992737636 sSliceArray.asSlice[2].sPosition.dCor : -51.88073723 sSliceArray.asSlice[2].sPosition.dSag : 1.527866064 sSliceArray.asSlice[2].sPosition.dTra : -18.20496647 sSliceArray.asSlice[30].dPhaseFOV : 230 sSliceArray.asSlice[30].dReadoutFOV : 230 sSliceArray.asSlice[30].dThickness : 4 sSliceArray.asSlice[30].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[30].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[30].sNormal.dTra : 0.992737636 sSliceArray.asSlice[30].sPosition.dCor : -41.02911436 sSliceArray.asSlice[30].sPosition.dSag : -8.566764159 sSliceArray.asSlice[30].sPosition.dTra : 104.1003103 sSliceArray.asSlice[3].dPhaseFOV : 230 sSliceArray.asSlice[3].dReadoutFOV : 230 sSliceArray.asSlice[3].dThickness : 4 sSliceArray.asSlice[3].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[3].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[3].sNormal.dTra : 0.992737636 sSliceArray.asSlice[3].sPosition.dCor : -51.49317927 sSliceArray.asSlice[3].sPosition.dSag : 1.167343556 sSliceArray.asSlice[3].sPosition.dTra : -13.83692088 sSliceArray.asSlice[4].dPhaseFOV : 230 sSliceArray.asSlice[4].dReadoutFOV : 230 sSliceArray.asSlice[4].dThickness : 4 sSliceArray.asSlice[4].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[4].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[4].sNormal.dTra : 0.992737636 sSliceArray.asSlice[4].sPosition.dCor : -51.10562131 sSliceArray.asSlice[4].sPosition.dSag : 0.8068210485 sSliceArray.asSlice[4].sPosition.dTra : -9.468875277 sSliceArray.asSlice[5].dPhaseFOV : 230 sSliceArray.asSlice[5].dReadoutFOV : 230 sSliceArray.asSlice[5].dThickness : 4 sSliceArray.asSlice[5].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[5].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[5].sNormal.dTra : 0.992737636 sSliceArray.asSlice[5].sPosition.dCor : -50.71806335 sSliceArray.asSlice[5].sPosition.dSag : 0.4462985405 sSliceArray.asSlice[5].sPosition.dTra : -5.100829679 sSliceArray.asSlice[6].dPhaseFOV : 230 sSliceArray.asSlice[6].dReadoutFOV : 230 sSliceArray.asSlice[6].dThickness : 4 sSliceArray.asSlice[6].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[6].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[6].sNormal.dTra : 0.992737636 sSliceArray.asSlice[6].sPosition.dCor : -50.33050539 sSliceArray.asSlice[6].sPosition.dSag : 0.08577603254 sSliceArray.asSlice[6].sPosition.dTra : -0.7327840804 sSliceArray.asSlice[7].dPhaseFOV : 230 sSliceArray.asSlice[7].dReadoutFOV : 230 sSliceArray.asSlice[7].dThickness : 4 sSliceArray.asSlice[7].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[7].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[7].sNormal.dTra : 0.992737636 sSliceArray.asSlice[7].sPosition.dCor : -49.94294743 sSliceArray.asSlice[7].sPosition.dSag : -0.2747464754 sSliceArray.asSlice[7].sPosition.dTra : 3.635261518 sSliceArray.asSlice[8].dPhaseFOV : 230 sSliceArray.asSlice[8].dReadoutFOV : 230 sSliceArray.asSlice[8].dThickness : 4 sSliceArray.asSlice[8].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[8].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[8].sNormal.dTra : 0.992737636 sSliceArray.asSlice[8].sPosition.dCor : -49.55538947 sSliceArray.asSlice[8].sPosition.dSag : -0.6352689834 sSliceArray.asSlice[8].sPosition.dTra : 8.003307116 sSliceArray.asSlice[9].dPhaseFOV : 230 sSliceArray.asSlice[9].dReadoutFOV : 230 sSliceArray.asSlice[9].dThickness : 4 sSliceArray.asSlice[9].sNormal.dCor : 0.08808135446 sSliceArray.asSlice[9].sNormal.dSag : -0.08193693363 sSliceArray.asSlice[9].sNormal.dTra : 0.992737636 sSliceArray.asSlice[9].sPosition.dCor : -49.16783151 sSliceArray.asSlice[9].sPosition.dSag : -0.9957914914 sSliceArray.asSlice[9].sPosition.dTra : 12.37135271 sSliceArray.lConc : 1 sSliceArray.lSize : 31 sSliceArray.sTSat.dThickness : 50 sSliceArray.ucMode : 0x4 sSpecPara.lDecouplingType : 1 sSpecPara.lExcitationType : 1 sSpecPara.lNOEType : 1 sSpecPara.lPhaseCyclingType : 1 sSpecPara.lPhaseEncodingType : 1 sSpecPara.lRFExcitationBandwidth : 1 sSpecPara.lSpectralSuppression : 1 sSpecPara.ucRemoveOversampling : 0x1 sTXSPEC.aRFPULSE[0].bAmplitudeValid : 0x1 sTXSPEC.aRFPULSE[0].flAmplitude : 263.068 sTXSPEC.aRFPULSE[0].tName : SincRFPulse sTXSPEC.aRFPULSE[1].bAmplitudeValid : 0x1 sTXSPEC.aRFPULSE[1].flAmplitude : 31.9334 sTXSPEC.aRFPULSE[1].tName : SLoopFCSatNS sTXSPEC.asNucleusInfo[0].bAmplitudeCorrectionValid : 1 sTXSPEC.asNucleusInfo[0].bFrequencyValid : 1 sTXSPEC.asNucleusInfo[0].bReferenceAmplitudeValid : 1 sTXSPEC.asNucleusInfo[0].flAmplitudeCorrection : 1 sTXSPEC.asNucleusInfo[0].flReferenceAmplitude : 259.084 sTXSPEC.asNucleusInfo[0].lFrequency : 63644057 sTXSPEC.asNucleusInfo[0].tNucleus : 1H sTXSPEC.asNucleusInfo[1].bAmplitudeCorrectionValid : 1 sTXSPEC.asNucleusInfo[1].bFrequencyValid : 1 sTXSPEC.asNucleusInfo[1].bReferenceAmplitudeValid : 1 sTXSPEC.bBTBValid : 1 sTXSPEC.bKDynValid : 1 sTXSPEC.flKDynMagnitudeClipHigh : 1.04 sTXSPEC.flKDynMagnitudeClipLow : 0.96 sTXSPEC.flKDynMagnitudeMax : 1.5 sTXSPEC.flKDynMagnitudeMin : 0.5 sTXSPEC.flKDynPhaseClip : 0.174533 sTXSPEC.flKDynPhaseMax : 0.698132 sTXSPEC.lBTB1ParallelCapacity : 9 sTXSPEC.lBTB1SerialCapacity : 16 sTXSPEC.lBTB2ParallelCapacity : 8 sTXSPEC.lBTB2SerialCapacity : 16 sTXSPEC.lNoOfTraPulses : 2 sTXSPEC.ucExcitMode : 0x1 sTXSPEC.ucRFPulseType : 0x2 sTXSPEC.ucSimultaneousExcitation : 0x1 tProtocolName : ep2d+AF8-BOLD+AF8-evntX4 tReferenceImage0 : 1.3.12.2.1107.5.2.12.21296.30000006070308044128100000804 tReferenceImage1 : 1.3.12.2.1107.5.2.12.21296.30000006070308044128100000798 tReferenceImage2 : 1.3.12.2.1107.5.2.12.21296.30000006070308044128100000797 tSequenceFileName : %SiemensSeq%\ep2d_pace tcurrentEVAProt : %CURRENTEVAPROT%\EVA6A.tmp tdefaultEVAProt : %SiemensEvaDefProt%\BOLD\t-test_10B10A_moco.evp ucDisableChangeStoreImages : 0x1 ucDixon : 0x1 ucOneSeriesForAllMeas : 0x1 ucPHAPSMode : 0x1 ucReconstructionMode : 0x1 ucScanRegionPosValid : 0x1 ulVersion : 0xbee332 GEMS Protocol Data Block Using this option it is possible to dump as a readable text what is contained in the private attribute as found in typical GEMS MR DICOM file. Protocol Data Block : 0025,xx1b,GEMS_SERS_01 $ gdcmdump --pdb GE_MR_0025xx1bProtocolDataBlock.dcm ENTRY "Head First" POSITION "Supine" ANREF "NA" COIL "HEAD" PLANE "OBLIQUE" SEDESCFLAG "1" SEDESC "AX FSE T2" IMODE "2D" PSEQ "FSE-XL" IOPT "FC, EDR, TRF, Fast" PLUG "22" FILTCHOICE "None" BWRT "-1" TRICKSIMG "1" TAG_SPACE "7" TAG_TYPE "None" ... ELSCINT Protocol Information Using this option it is possible to dump as a readable text what is contained in the private attribute as found in typical ELSCINT CT DICOM file. ELSCINT Protocol Information: (01f7,26,ELSCINT1) $ gdcmdump --elscint ELSCINT1_ProtocolInformation.dcm ELSCINT1 Dumping info from tag (01f7,26,elscint1) ELSCINT1/Item name: [] ApprovedStep [yes] RefSurview [1\0] STD-first-img-pos [11.5] current-step [yes] ntimed-steps [0] orig-n-slices [390] protocol-file [Head_Multi_1032_usr.proc] protocol-name [FACE-TRAUMA/Head/Hx] protocol-path [/usr/diamond.root/spr/] protocol-step [1] protocol-version [2.51] ELSCINT1/Item name: [doseright] ACS [n/a] ACS-bed-position [0] ACS-calc-mas [0] ACS-iq-parameter [0] ACS-learn-allowed [no] ACS-water-radius [-1.000000] ACS-water-radius-scan [-1] ... VEPRO Protocol Information Using this option it is possible to dump as a readable text what is contained in the private attribute as found in typical VEPRO CT DICOM file. ELSCINT Protocol Information: (0055,20,VEPRO VIM 5.0 DATA) $ gdcmdump --vepro VEPRO_ProtocolInformation.dcm VIMDATA2: (0055,20,VEPRO VIM 5.0 DATA) ID: VIM Version: 5.0 UserName: UserAdress1: Name of Institution UserAdress2: Street of Institution UserAdress3: City of Institution UserAdress4: UserAdress5: RecDate: 20101001 RecTime: 211321 RecPlace: RecSource: DICOM Distributor DF1: P-09/10-41808 DF2: Sultana Razia DF3: 19411001 DF4: F DF5: DF6: DF7: DF8: CT Scan Brain without Contrast DF9: 10/10-0034873 DF10: 10/10-00348 DF11: DF12: DF13: DF14: Head 0.5 DF15: 4 DF16: DF17: DF18: DF19: DF20: StudyUID: 1.2.392.200036.9116.2.6.1.48.1214228007.1285934880.206831 SeriesUID: 1.2.392.200036.9116.2.6.1.48.1214228007.1285935201.938653 Modality: CT Philips Private MR Series Data Storage (1.3.46.670589.11.0.0.12.2) Using this option it is possible to dump as a readable text what is contained in the private attribute as found in typical Philips Private MR Series Data Storage file. PMS Series Data Storage (2005,32,Philips MR Imaging DD 002) $ gdcmdump --sds PMS_SeriesDataStorage.dcm ... PMS/Item name: [PDF_CONTROL_GEN_PARS/IEEE_PDF/Y ] ... PMS/Item name: [PDF_CONTROL_PREP_PARS /IEEE_PDF/Y ] ... PMS/Item name: [PDF_CONTROL_RECON_PARS/IEEE_PDF/Y ] ... PMS/Item name: [PDF_CONTROL_SCAN_PARS /IEEE_PDF/Y ] ... PMS/Item name: [PDF_EXAM_PARS /IEEE_PDF/Y ] ... PMS/Item name: [PDF_HARDWARE_PARS /IEEE_PDF/Y ] ... PMS/Item name: [PDF_PREP_PARS /IEEE_PDF/Y ] ... PMS/Item name: [PDF_SPT_PARS/IEEE_PDF/Y ] SP_scan_resol [256\256] # 2 SP_pda_profiles [0\0] # 2 SP_filter [324074] # 1 SP_analyse_with_iqt [0] # 1 SP_main_system_type [3] # 1 SP_gradient_system [6] # 1 SP_coil_type [2\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0] # 16 SP_coil_id [2\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0] # 16 SP_coil_part [0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0] # 16 SP_act_q [0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0] # 16 SP_act_coil_freq [0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0] # 16 SP_coil_m_pos [255\255\255\0\0\0\0\0\0\0\0\0\0\0\0\255] # 16 SP_coil_t_pos [255\128\255\0\0\0\0\0\0\0\0\0\0\0\0\255] # 16 SP_surface_coil_con [0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0] # 16 SP_proton_freq [127801349] # 1 SP_tm_result [2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2] # 16 SP_f0_result [0] # 1 SP_as_result [0] # 1 SP_po_result [0] # 1 SP_rg_result [0] # 1 SP_dc_result [0] # 1 SP_ph_result [0] # 1 ... Encapsulated ASN1 Structure This option is mainly used for dumping the ASN1 structure of the encrypted Attribute (0040,0520) $ gdcmdump encrypted.dcm ... (0400,0500) SQ # u/l,1 Encrypted Attributes Sequence (fffe,e000) na (Item with undefined length) (0400,0510) UI [1.2.840.10008.1.2] # 18,1 Encrypted Content Transfer Syntax UID (0400,0520) OB 30\\82\\03\\ba\\06\\09\\2a\\86\\48\\55\\04\\08\\13 # 958,1 Encrypted Content (fffe,e00d) (fffe,e0dd) ... $ gdcmdump --asn1 encrypted.dcm 0:d=0 hl=4 l= 954 cons: SEQUENCE 4:d=1 hl=2 l= 9 prim: OBJECT :pkcs7-envelopedData 15:d=1 hl=4 l= 939 cons: cont [ 0 ] 19:d=2 hl=4 l= 935 cons: SEQUENCE 23:d=3 hl=2 l= 1 prim: INTEGER :00 26:d=3 hl=4 l= 366 cons: SET 30:d=4 hl=4 l= 362 cons: SEQUENCE 34:d=5 hl=2 l= 1 prim: INTEGER :00 37:d=5 hl=2 l= 82 cons: SEQUENCE 39:d=6 hl=2 l= 69 cons: SEQUENCE 41:d=7 hl=2 l= 11 cons: SET 43:d=8 hl=2 l= 9 cons: SEQUENCE 45:d=9 hl=2 l= 3 prim: OBJECT :countryName 50:d=9 hl=2 l= 2 prim: PRINTABLESTRING :AU 54:d=7 hl=2 l= 19 cons: SET 56:d=8 hl=2 l= 17 cons: SEQUENCE 58:d=9 hl=2 l= 3 prim: OBJECT :stateOrProvinceName 63:d=9 hl=2 l= 10 prim: PRINTABLESTRING :Some-State 75:d=7 hl=2 l= 33 cons: SET 77:d=8 hl=2 l= 31 cons: SEQUENCE 79:d=9 hl=2 l= 3 prim: OBJECT :organizationName 84:d=9 hl=2 l= 24 prim: PRINTABLESTRING :Internet Widgits Pty Ltd 110:d=6 hl=2 l= 9 prim: INTEGER :AC966D88787A51B4 121:d=5 hl=2 l= 13 cons: SEQUENCE 123:d=6 hl=2 l= 9 prim: OBJECT :rsaEncryption 134:d=6 hl=2 l= 0 prim: NULL 136:d=5 hl=4 l= 256 prim: OCTET STRING [HEX DUMP]:822368070285AD756C962ECB973514B291F946... 396:d=3 hl=4 l= 558 cons: SEQUENCE 400:d=4 hl=2 l= 9 prim: OBJECT :pkcs7-data 411:d=4 hl=2 l= 29 cons: SEQUENCE 413:d=5 hl=2 l= 9 prim: OBJECT :aes-256-cbc 424:d=5 hl=2 l= 16 prim: OCTET STRING [HEX DUMP]:3B49AFE71749F2BFF1519EBAEA95A393 442:d=4 hl=4 l= 512 prim: cont [ 0 ] SEE ALSO gdcmdump(1), gdcmraw(1), gdcmanon(1) gdcm-3.0.22/Utilities/doxygen/man/gdcmgendir.xml000664 001766 001770 00000010210 14517730450 024077 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmgendir 1 GDCM &version; DICOM Manipulation. gdcmgendir Tool to generate a DICOMDIR file from a File-Set. SYNOPSIS gdcmgendir [options] file-in file-out DESCRIPTION PARAMETERS file-in DICOM input filename file-out DICOM output filename OPTIONS Parameters specific options -i --input DICOM filename or directory -o --output DICOM filename or directory -r --recursive recursive. --descriptor descriptor. --root-uid Root UID. general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information environment variable GDCM_ROOT_UID Root UID Typical usage NOTE One may have to run some preliminary steps in order to get gdcmgendir to generate the DICOMDIR file. Namely two steps: Batch renaming of the DICOM filename into something compatible with ISO 9660 filename convention Convert all DICOM file into the Explicit VR Little Endian Uncompressed (1.2.840.10008.1.2.1) Step 1. can be solved in a numerous way. Eg. on UNIX environment this could either be solved using the mkisofs command line tool. Filenames should not contains any extension since the VR CS does not allow for the '.' character. Only upper case, digit 0-9, the space ' ' and the underscore '_' character are valid in VR CS, with a maximum of 8 bytes. Another simple tool that can be handy is 'rename' in conjunction with 'basename'. Step 2. can simply be achieved using the gdcmconv command line tool: $ for i in `ls IMG*`; do gdcmconv --raw --force $i /tmp/out/$i; done SEE ALSO gdcmconv(1), gdcmanon(1), rename(1), mkisofs(1) gdcm-3.0.22/Utilities/doxygen/man/gdcmdiff.xml000664 001766 001770 00000005516 14517730450 023554 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmdiff 1 GDCM &version; DICOM Manipulation. gdcmdiff dumps differences of two DICOM files SYNOPSIS gdcmdiff [options] file1 file2 DESCRIPTION The gdcmdiff command line program takes as input two DICOM files: file1 and file2. PARAMETERS file1 DICOM input filename file2 DICOM output filename OPTIONS specific options -m --meta Compare metainformation. Default is off. -t <n> --truncate <n> String values trimmed to n characters. general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information Simple usage gdcmdiff is a great tool to produce a diff in between two DICOM files. Usage is simply: $ gdcmdiff input1.dcm input2.dcm SEE ALSO gdcmdump(1), gdcminfo(1) gdcm-3.0.22/Utilities/doxygen/man/gdcmraw.xml000664 001766 001770 00000017710 14517730450 023434 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmraw 1 GDCM &version; DICOM Manipulation. gdcmraw Extract Data Element Value Field. SYNOPSIS gdcmraw [options] file-in file-out DESCRIPTION The gdcmraw tool is mostly used for development purpose. It is used to extract a specific binary field from a DICOM DataSet. PARAMETERS file-in DICOM input filename file-out output filename OPTIONS -i --input Input filename -o --output Output filename -t --tag Specify tag to extract value from. specific options -S --split-frags Split fragments into multiple files. -p --pattern Specify trailing file pattern (see split-frags). -P --pixel-data Pixel Data trailing 0. general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information Typical usage Copy Attribute Value to file This will extract the value at Tag (0025,101b): $ gdcmraw -i GE_MR_0025xx1bProtocolDataBlock.dcm -t 25,101b -o pdb.raw Extract Pixel Data If you do not specify any tag, the Pixel Data element is the default one. So for instance to grab the Pixel Data from an image: $ gdcmraw -i test.acr -o test.raw You can then for example compute the md5sum of this pixel data (very useful): $ md5sum test.raw f845c8f283d39a0204c325654493ba53 test.raw Encapsulated Syntax When the Pixel Data is encapsulated, multiple fragments can be used to store a single slice image: $ gdcmdump D_CLUNIE_CT1_J2KR.dcm ... (7fe0,0010) OB # u/l,1 Pixel Data (fffe,e000) ?? [] # 0,1 Item (fffe,e000) ?? ff\\4f\\ff\\51\\00\\29\\00\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\02\\00\\00\\00\\02\\00 # 65536,1 Item (fffe,e000) ?? 2c\\b7\\ee\\68\\de\\e3\\93\\2d\\b3\\b8\\ba\\90\\7b\\42\\3e\\f8\\42\\16\\64\\88\\46\\30\\37\\d4\\50\\95\\9b\\b6\\a5\\c7\\38\\9b # 65536,1 Item (fffe,e000) ?? 48\\3c\\03\\e8\\c4\\3f\\44\\e1\\8a\\5c\\73\\3b\\02\\0a\\ad\\a5\\8f\\e4\\0c\\81\\76\\a2\\d7\\1b\\7f\\b7\\cd\\bc\\30\\c6\\6a\\6a # 43308,1 Item (fffe,e0dd) 0 In order to create a J2K image out of it, we need to extract each fragments and concatenate them: $ gdcmraw -i D_CLUNIE_CT1_J2KR.dcm -o D_CLUNIE_CT1_J2KR.j2k This is a valid J2K file, using the Kakadu software package: $ kdu_expand -i D_CLUNIE_CT1_J2KR.j2k -o D_CLUNIE_CT1_J2KR.tiff -record D_CLUNIE_CT1_J2KR.txt $ cat D_CLUNIE_CT1_J2KR.txt Sprofile=PROFILE2 Scap=no Sextensions=0 Ssize={512,512} Sorigin={0,0} Stiles={512,512} Stile_origin={0,0} Scomponents=1 Ssigned=yes Sprecision=16 Ssampling={1,1} Sdims={512,512} Cycc=no Cmct=0 Clayers=1 Cuse_sop=no Cuse_eph=no Corder=LRCP Calign_blk_last={no,no} Clevels=5 Cads=0 Cdfs=0 Cdecomp=B(-:-:-) Creversible=yes Ckernels=W5X3 Catk=0 Cuse_precincts=no Cblk={64,64} Cmodes=0 Qguard=1 Qabs_ranges=18,19,19,20,19,19,20,19,19,20,19,19,20,19,19,20 >> New attributes for tile 0: Extract fragments as single file Sometimes each fragments is in fact a single slice, so we would not need to concatenate them: $ gdcmdump 00191113.dcm ... (7fe0,0010) OB # u/l,1 Pixel Data (fffe,e000) ?? 00\\00\\00\\00\\6b\\38\\01\\00\\10\\77\\02\\00\\37\\b6\\03\\00\\a7\\f4\\04\\00 # 20,1 Item (fffe,e000) ?? ff\\d8\\ff\\c3\\00\\0b\\08\\02\\00\\02\\00\\01\\00\\11\\00\\ff\\c4\\00\\1b\\00\\01\\01\\01\\01\\01\\01\\01\\01\\00\\00\\00\\00 # 79970,1 Item (fffe,e000) ?? ff\\d8\\ff\\c3\\00\\0b\\08\\02\\00\\02\\00\\01\\00\\11\\00\\ff\\c4\\00\\1b\\00\\01\\01\\01\\01\\01\\01\\01\\01\\00\\00\\00\\00 # 81564,1 Item (fffe,e000) ?? ff\\d8\\ff\\c3\\00\\0b\\08\\02\\00\\02\\00\\01\\00\\11\\00\\ff\\c4\\00\\1b\\00\\01\\01\\01\\01\\01\\01\\01\\01\\00\\00\\00\\00 # 81694,1 Item (fffe,e000) ?? ff\\d8\\ff\\c3\\00\\0b\\08\\02\\00\\02\\00\\01\\00\\11\\00\\ff\\c4\\00\\1b\\00\\01\\01\\01\\01\\01\\01\\01\\01\\00\\00\\00\\00 # 81511 (81512),1 Item (fffe,e0dd) 0 Let's try to extract those 4 individual Lossless jpeg individually: $ gdcmraw --split-frags -i 00191113.dcm -o jpeg --pattern %02d.ljpeg This will output 4 files: -rw-r--r-- 1 mathieu mathieu 81512 2008-08-08 22:10 jpeg03.ljpeg -rw-r--r-- 1 mathieu mathieu 81694 2008-08-08 22:10 jpeg02.ljpeg -rw-r--r-- 1 mathieu mathieu 81564 2008-08-08 22:10 jpeg01.ljpeg -rw-r--r-- 1 mathieu mathieu 79970 2008-08-08 22:10 jpeg00.ljpeg Footnote about JPEG files It is a common misunderstanding to interchange 'JPEG 8bits lossy' with simply JPEG file. The JPEG specification is much broader than simply the common lossy 8bits file (as found on internet). You can have: JPEG Lossy 8bits JPEG Lossy 12bits JPEG Lossless 2-16bits Those are what is defined in ITU-T T.81, ISO/IEC IS 10918-1. SEE ALSO gdcmdump(1), gdcmraw(1) gdcm-3.0.22/Utilities/doxygen/man/gdcmimg.xml000664 001766 001770 00000030217 14517730450 023414 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmimg 1 GDCM &version; DICOM Manipulation. gdcmimg Manipulate DICOM image file. gdcmimg is a low level tool to allow de-/encapsulation from/to DICOM image. This tool does not understand Transfer Syntax conversion. It will encapsulate the raw data as-is. This has some impact in some cases, see special warnings below. It is important to note that gdcmimg can only encapsulate proper input file, for instance JPG and or JP2 are accepted since an associated DICOM Transfer Syntax can be found. However input such as TIFF and/or PNG are not, since DICOM does not support those. See instead a tool such as gdcm2vtk. SYNOPSIS gdcmimg [options] file-in file-out DESCRIPTION The gdcmimg command line tool can be used in two fashions: 1. Converting a recognized file format into its encapsulated DICOM counterpart, 2. Anonymizing a rectangular portion of a DICOM file. PARAMETERS file-in input filename (non-DICOM) file-out DICOM output filename OPTIONS -i --input Input filename -o --output Output filename specific options --endian %s Endianness (LSB/MSB). -d --depth %d Depth (Either 8/16/32 or BitsAllocated eg. 12 when known). --sign %s Pixel sign (0/1). --spp %d Sample Per Pixel (1/3). --pc [01] Change planar configuration. --pi [str] Change photometric interpretation. --pf %d,%d,%d Change pixel format: (BA,BS,HB). -s --size %d,%d Size. --offset %ull Start Offset. -C --sop-class-uid SOP Class UID (name or value). -T --study-uid Study UID. -S --series-uid Series UID. --template Template DICOM file. --keep-meta Keep meta info from template file (advanced users only). --root-uid Root UID. fill options -R --region %d,%d Region. -F --fill %d Fill with pixel value specified. general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information environment variable GDCM_ROOT_UID Root UID Supported File Format (appropriate file extension) gdcmimg will base it's conversion process based on the file extension. Follows the list of recognized file extension. When no extension is found, DICOM file is assumed. input format * RAW (raw, rawl, gray, rgb) * RLE (rle) * PNM (pgm, pnm, ppm) * JPEG-LS (jls) * JPEG 2000 (jp2, j2k, j2c, jpx, jpc) * JPEG (jpg, jpeg, ljpg, ljpeg) * DICOM () output format: * PGM (pgm, pnm, ppm) * DICOM () For RAW file format, you should take special care of the –endian option. For the (old) JPEG file format, both the lossy and lossless format are supported, user should pay attention to the –sign option. For file format such as RLE or RAW, user is expected to fill in information required to find the dimension and type of input data as there is no other way to find this information. For all other file format, the properties are derived from the file format itself. PNM file are supposed to be big endian (important for depth > 8) Typical usage Remove a rectangular part of the image To fill the region [0,100]x[0,100] of a DICOM image simply do: $ gdcmimg --fill 0 --region 0,100,0,100 -i input.dcm -o output_black.dcm Warning: if the Pixel Data is compressed, the image is first decompressed so that pixel can be set to 0, but it is not re-compressed. Convert RAW to DICOM Recognized extension is .raw, .rawl, .gray or .rgb (case insensitive) $ gdcmimg --size 512,512 --depth 16 -i input.raw -o output.dcm the image will be a Secondary Capture. When the input is 3 component, one need to specify explicitly the Samples Per Pixel: $ gdcmimg --size 512,512 --spp 3 input_rgb.raw output_rgb.dcm When the filename contains .rgb as file extension output is automatically recognized as RGB no need to specify –spp $ gdcmimg --size 512,512 input.rgb output_rgb.dcm You can use the dd cmd line to skip any header you would like to discard, for instance, if you would like to skip the first 108 bytes, simply do: $ dd skip=108 bs=1 if=input.raw of=output.raw .raw and .rawl extension are equivalent. You need to explicitly specify the endianness manually: $ gdcmimg --endian MSB --size 512,512 --depth 16 -i input.raw -o output.dcm or $ gdcmimg --endian LSB --size 512,512 --depth 16 -i input.raw -o output.dcm Convert PGM/PNM/PPM to DICOM Recognized extensions are .pgm, .pnm, .ppm (case insensitive) $ gdcmimg -i input.pgm -o output.dcm the image will be a Secondary Capture Convert RLE to DICOM Recognized extension is .rle (case insensitive) $ gdcmimg --size 512,512 --depth 16 -i input.rle -o output.dcm the image will be a Secondary Capture Convert JPEG to DICOM Recognized extensions are .jpg, .jpeg, .ljpg, .ljpeg (case insensitive) $ gdcmimg -i input.ljpeg -o output.dcm the image will be a Secondary Capture Convert J2K to DICOM Recognized extensions are .j2k, .jp2, .jpc, jpx, j2c (case insensitive) $ gdcmimg -i input.j2k -o output.dcm the image will be a Secondary Capture. All Pixel information (Bits Stored/Allocated...) will be derived from the image itself, and not from the command line options. Specifying a SOP Class UID Instead of the default Secondary Capture Image Storage, one may want to specify, say VL Photographic Image Storage. $ gdcmimg --sop-class-uid 1.2.840.10008.5.1.4.1.1.77.1.4 input.jpg output.dcm Specifying a template DICOM file Instead of the default Secondary Capture Image Storage, generated with default values, one may want to specify a DICOM file that will serve as template to fill in the DICOM attributes. $ gdcmimg --sign 1 --template template.dcm input.jpg output.dcm Pay attention that any values from template.dcm that are not consistent with what is found inside the reference image will be overridden (eg. image size). On particular case should be of concern: the Pixel Representation for the JPEG family. Multiple Files gdcmimg handle nicely a set of files (for instance jpeg): $ gdcmimg -C 1.2.840.10008.5.1.4.1.1.12.1 1.jpg 2.jpg 3.jpg 4.jpg output.dcm It is important to specify an SOP Class that supports multi-frames images otherwise gdcmimg will fail. Start Offset In some case, one may want to create a 2D slice from an arbitrary volume (e.g 3D). In which case –offset becomes handy: $ gdcmimg --offset 4954104330 --size 1673,1673 Input3D_1673_1673_1775.raw slice_1770.dcm Warning There are a couple of issues with gdcmimg implementation: For RAW file, one should pay attention that when using –endian MSB the Pixel Data will be encapsulated as is (not touched by gdcmimg). Therefore the only possible transfer syntax available is Implicit VR Big Endian DLX (G.E Private). GDCM does handle this private Transfer Syntax. So if you need to convert this Transfer Syntax to another one (and allow Pixel Data manipulation), you can use: $ gdcmconv --raw --force input_big_endian_dlx.raw -o output_implicit_vr_little_endian.dcm For JFIF file and JP2 file (with header) the header is copied into the Pixel Data element which is illegal for JP2. Use gdcmconv to properly re-encode a JP2/JFIF file into J2K/JPG. $ gdcmimg input.jp2 output_jp2.dcm $ gdcmconv --j2k --force output_jp2.dcm output_j2k.dcm For RLE file, no check is done for crossing the row boundary. It is recommended to use gdcmconv –rle to re-encode into a proper RLE file in case of doubt. Of course if the compression is not ok with your setup, you can always de-encapsulated the DICOM file (typically JPEG) to a non-encapsulated form, using gdcmconv: $ gdcmconv --raw input_jpeg.dcm output_raw.dcm SEE ALSO gdcmdump(1), gdcm2vtk(1), gdcmraw(1), convert(1), dd(1) gdcm-3.0.22/Utilities/doxygen/man/gdcmpdf.xml000664 001766 001770 00000016342 14517730450 023414 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmpdf 1 GDCM &version; DICOM Manipulation. gdcmpdf Tool to convert PDF to PDF/DICOM. SYNOPSIS gdcmpdf [options] file-in file-out DESCRIPTION The gdcmpdf tool convert a PDF file (any PDF version) into an encapsulated PDF/DICOM file. By default it will try to read the PDF meta information stored in the PDF and convert this information to some specific DICOM fields (see below). However it may fails (eg. wrong password on encrypted PDF file) in which case empty value are used. PARAMETERS file-in PDF input filename file-out DICOM output filename OPTIONS general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information Usage Example $ wget http://gdcm.sourceforge.net/gdcm.pdf $ gdcmpdf gdcm.pdf gdcm.dcm To re-extract the encapsulated PDF file: $ gdcmraw -i gdcm.dcm -t 42,11 -o gdcm.dcm.pdf $ diff gdcm.pdf gdcm.dcm.pdf PDF Info Mapping Here is how the PDF info is mapped to DICOM information (typical pdfinfo output): Title: GDCM Reference Manual Subject: Grassroots DICOM API reference Keywords: GDCM,DICOM,JPEG,Lossless JPEG,JPEG-LS,J2K,JPEG 2000,RLE Author: Mathieu Malaterre and co. Creator: LaTeX with hyperref package Producer: pdfeTeX-1.21a CreationDate: Tue Apr 28 15:34:26 2009 Tagged: no Pages: 1188 Encrypted: no Page size: 612 x 792 pts (letter) File size: 13756841 bytes Optimized: yes PDF version: 1.4 Converted to DICOM this leads to: # Dicom-Data-Set # Used TransferSyntax: Little Endian Explicit (0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet (0008,0012) DA [20090428] # 8, 1 InstanceCreationDate (0008,0013) TM [182550.302631] # 14, 1 InstanceCreationTime (0008,0016) UI =EncapsulatedPDFStorage # 30, 1 SOPClassUID (0008,0018) UI [1.2.826.0.1.3680043.2.1143.776842935192792959289022034349197114] # 64, 1 SOPInstanceUID (0008,0020) DA [20090428] # 8, 1 StudyDate (0008,0023) DA [20090428] # 8, 1 ContentDate (0008,002a) DT [20090428153437.000000] # 22, 1 AcquisitionDateTime (0008,0030) TM [182550.302160] # 14, 1 StudyTime (0008,0033) TM [153426.000000] # 14, 1 ContentTime (0008,0050) SH (no value available) # 0, 0 AccessionNumber (0008,0060) CS [OT] # 2, 1 Modality (0008,0064) CS [WSD] # 4, 1 ConversionType (0008,0070) LO [LaTeX with hyperref package] # 28, 1 Manufacturer (0008,0090) PN (no value available) # 0, 0 ReferringPhysiciansName (0010,0010) PN [Mathieu Malaterre and co.] # 26, 1 PatientsName (0010,0020) LO (no value available) # 0, 0 PatientID (0010,0030) DA (no value available) # 0, 0 PatientsBirthDate (0010,0040) CS (no value available) # 0, 0 PatientsSex (0018,1020) LO [pdfeTeX-1.21a] # 14, 1 SoftwareVersions (0020,000d) UI [1.2.826.0.1.3680043.2.1143.1868121832223417351654232480755123133] # 64, 1 StudyInstanceUID (0020,000e) UI [1.2.826.0.1.3680043.2.1143.1330099150825746617507846107663964311] # 64, 1 SeriesInstanceUID (0020,0010) SH (no value available) # 0, 0 StudyID (0020,0011) IS [1] # 2, 1 SeriesNumber (0020,0013) IS [1] # 2, 1 InstanceNumber (0028,0301) CS [YES] # 4, 1 BurnedInAnnotation (0040,a043) SQ (Sequence with explicit length #=0) # 0, 1 ConceptNameCodeSequence (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem (0042,0010) ST [GDCM Reference Manual] # 22, 1 DocumentTitle (0042,0011) OB 25\\50\\44\\46\\2d\\31\\2e\\34\\0a\\25\\e7\\f3\\cf\\d3\\0a\\33\\32\\30\\37\\37\\20\\30... # 13756842, 1 EncapsulatedDocument (0042,0012) LO [application/pdf] # 16, 1 MIMETypeOfEncapsulatedDocument $ stat gdcm.pdf File: `gdcm.pdf' Size: 13756841 Blocks: 26912 IO Block: 4096 regular file Device: fe01h/65025d Inode: 2675750 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1002/mmalaterre) Gid: ( 1002/mmalaterre) Access: 2009-04-28 16:05:00.000000000 +0200 Modify: 2009-04-28 15:34:37.000000000 +0200 Change: 2009-04-28 16:05:00.000000000 +0200 Explanation for the different Date/Time mappings: Study Date/Time, Instance Creation Date/Time are both equal to the current time gdcmpdf tool was run, Acquisition Date Time is set to the Modify Time of the actual PDF file, Content Date/Time are set from the actual PDF header info: CreationDate. SEE ALSO gdcmconv(1), gdcmraw(1), pdfinfo(1) gdcm-3.0.22/Utilities/doxygen/man/gdcmclean.xml000664 001766 001770 00000015435 14517730450 023727 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmclean 1 GDCM &version; DICOM Manipulation. gdcmclean Tool to clean a DICOM file. SYNOPSIS gdcmclean [options] file-in file-out gdcmclean [options] dir-in dir-out DESCRIPTION The gdcmclean tool is an cleaning tool. PARAMETERS file-in DICOM input filename file-out DICOM output filename or file-in DICOM input directory file-out DICOM output directory OPTIONS You need to : specific options -i --input DICOM filename / directory -o --output DICOM filename / directory -r --recursive recursively process (sub-)directories. --continue Do not stop when file found is not DICOM. Editing mode options --empty %d,%d DICOM tag(s) to empty %d,%d,%s DICOM private tag(s) to empty %s DICOM keyword/path(s) to empty --remove %d,%d DICOM tag(s) to remove %d,%d,%s DICOM private tag(s) to remove %s DICOM keyword/path(s) to remove --scrub %d,%d DICOM tag(s) to scrub %d,%d,%s DICOM private tag(s) to scrub %s DICOM keyword/path(s) to scrub --preserve %s DICOM path(s) to preserve --preserve-missing-private-creator Whether or not preserve private attributes with missing private creator. --preserve-group-length Whether or not preserve deprecated group length attributes (will not be re-computed). --preserve-illegal Whether or not preserve illegal attributes (eg. group 0003...). general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information Typical usage Editing mode This functionality is not described in the DICOM standard. The following example shows how to use editing mode and achieve multiple operations at the same time: Preserve illegal attributes (removed by default), Empty any 'PN' attributes anywhere in the hierarchy tree, but preserve the DICOM attribute value only at location "0010,0010", Empty the tag (0010,0020) Patient ID, (only if keyword is know internally), Empty the tag (0070,0084), Remove the private attributes: (0029,20, SIEMENS MEDCOM HEADER) / (0033,02,MITRA OBJECT UTF8 ATTRIBUTES 1.0) / (0043,2a,GEMS_PARM_01). Since (0033,02,MITRA OBJECT UTF8 ATTRIBUTES 1.0) is defined internally in the private dictionary with Value Representation = PN, this attribute will be skipped (since redundant). Scrub the private attributes: (0029,10,SIEMENS CSA HEADER) / (0029,20,SIEMENS CSA HEADER) / (700d,08,TOSHIBA_MEC_MR3) / (0029,90,PMTF INFORMATION DATA) $ gdcmclean \ --recursive --continue \ --preserve-illegal \ --empty PN --preserve /0010,0010 \ --empty PatientID --empty "0070,0084" \ --remove "0029,20,SIEMENS MEDCOM HEADER" --remove "0033,02,MITRA OBJECT UTF8 ATTRIBUTES 1.0" --remove "0043,2a,GEMS_PARM_01" \ --scrub "0029,10,SIEMENS CSA HEADER" --scrub "0029,20,SIEMENS CSA HEADER" \ --scrub "700d,08,TOSHIBA_MEC_MR3" \ --scrub "0029,90,PMTF INFORMATION DATA" --scrub "0029,90,TOSHIBA_MEC_MR3" \ input_folder output_folder DICOM Path For ease of use on shell cmmand the syntax allow for the '/' separator in the DICOM Path notation. So the following is valid "/0040,0100/1/0040,0006" However Private Creator can use all of Value Representation LO definition. So in some case you will be required to use backslash as separator (since illegal in VR:LO): "\\4109,2,Applicare/Centricity Radiology Web/Version 1.0" Safe Private Attributes It is currently not possible to empty/remove any private attribute listed in the Safe Private Attributes table at: https://dicom.nema.org/medical/dicom/current/output/chtml/part15/sect_E.3.10.html#table_E.3.10-1 SEE ALSO gdcmanon(1), gdcmdump(1), gdcmdiff(1) gdcm-3.0.22/Utilities/doxygen/man/gdcmxml.xml000664 001766 001770 00000006601 14517730450 023440 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmxml 1 GDCM &version; DICOM Manipulation. gdcmxml provides a tool to convert a DICOM file into a XML infoset and vice-versa. SYNOPSIS gdcmxml [options] file-in[DICOM or XML] file-out[XML or DICOM] DESCRIPTION The gdcmxml command line program converts a DICOM file (DataSet) into an XML file (according to the Native DICOM Model) or vice-versa. For those familiar with DCMTK, this provides binary capabilities (i.e. functionality of both dcm2xml and xml2dcm). The XML infoset which is from the DICOM file gdcmXMLPrintet Class. This is in strict compliance with the Native DICOM Model as given in Supp 118. PARAMETERS file-in DICOM or XML input filename ( cannot be absent) file-out output filename (can be absent) OPTIONS -i --input DICOM filename -o --output DICOM filename Options for DICOM to XML: -B --loadBulkData Loads bulk data into a binary file named "UUID" (by default UUID are written). Options for XML to DICOM: -B --loadBulkData Loads bulk data from a binary file named as the "UUID" in XML file (by default UUID are written). -T --TransferSyntax Loads transfer syntax from file (default is LittleEndianImplicit) general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information SEE ALSO gdcmdump(1), gdcmconv(1) gdcm-3.0.22/Utilities/doxygen/man/gdcminfo.xml000664 001766 001770 00000015770 14517730450 023602 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcminfo 1 GDCM &version; DICOM Manipulation. gdcminfo Display meta info about the input DICOM file. gdcminfo file-in/dir-in DESCRIPTION The gdcminfo command line program takes as input a DICOM file, or a directory and process it to extract meta-information about the DICOM file(s) processed. PARAMETERS file-in/dir-in DICOM input filename/dirname OPTIONS specific options -r --recursive recursive traversal of an input directory -d --check-deflated check if file is proper deflated syntax. --resources-path Resources path. --md5sum Compute md5sum of Pixel Data attribute value. --check-compression check the encapsulated stream compression (lossless/lossy). --force-rescale force rescale. --force-spacing force spacing. --mosaic dump image information of MOSAIC. general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information environment variable GDCM_RESOURCES_PATH path pointing to resources files (Part3.xml, ...) Simple usage gdcmData Using data from gdcmData: $ gdcminfo gdcmData/012345.002.050.dcm MediaStorage is 1.2.840.10008.5.1.4.1.1.4 [MR Image Storage] NumberOfDimensions: 2 Dimensions: (256,256) Origin: (-85,21.6,108.7) Spacing: (0.664062,0.664062,1.5) DirectionCosines: (1,0,0,0,0,-1) Rescale Intercept/Slope: (0,1) SamplesPerPixel :1 BitsAllocated :16 BitsStored :16 HighBit :15 PixelRepresentation:1 Orientation Label: CORONAL Davie Clunie datasets: Using data from David Clunie datasets: $ gdcminfo BRTUM001.dcm MediaStorage is 1.2.840.10008.5.1.4.1.1.4.1 [Enhanced MR Image Storage] NumberOfDimensions: 3 Dimensions: (256,256,15) Origin: (40,-105,105) Spacing: (0.820312,0.820312,6) DirectionCosines: (0,1,0,0,0,-1) Rescale Intercept/Slope: (0,1) SamplesPerPixel :1 BitsAllocated :16 BitsStored :16 HighBit :15 PixelRepresentation:1 Orientation Label: SAGITTAL Checking the md5sum of the Pixel Data After compressing a DICOM file (see gdcmconv) using a lossless compression algorithm, it is fairly easy to compare the two files for differences at DICOM attribute level. However one operation is slightly easier to do: how to make sure the compression was actually lossless ? In this case one could use the –md5sum operation. Take an uncompressed DICOM image file: $ gdcminfo --md5sum SIEMENS_ImageLocationUN.dcm The tool return: 0621954acd5815e0b4f7b65fcc6506b1 Now compress this file: $ gdcmconv --jpegls SIEMENS_ImageLocationUN.dcm lossless_compressed.dcm and then check again the md5sum: $ gdcminfo --md5sum lossless_compressed.dcm The tool return: 0621954acd5815e0b4f7b65fcc6506b1 Checking if Pixel Data is lossless In some environment one wish to check whether or not the DICOM file is lossless. It is fairly easy to do that in most cases. Only on two occasions this is not clear from the sole DICOM Attributes. When the Transfer Syntax is JPEG 2000 Image Compression (1.2.840.10008.1.2.4.91) and when the Transfer Syntax is JPEG-LS Lossy (Near-Lossless) Image Compression (1.2.840.10008.1.2.4.81). In this case, the only solution is to open the Pixel Data element, read the specific JPEG header and check whether or not the JPEG transformation was lossless or not: $ gdcminfo --check-compression gdcmData/MAROTECH_CT_JP2Lossy.dcm The tool returns: Encapsulated Stream was found to be: lossy Pay attention that this tool also checks the Image Lossy Compression attribute (0028,2110). This means will also returns a value of lossy if a predecessor was found to be lossy compressed. Checking image as if MOSAIC Dump the image as if MOSAIC. If the input is really MOSAIC image, then print the information of the true underlying MOSAIC volume. $ gdcminfo --mosaic siemens_mosaic.dcm SEE ALSO gdcmdump(1), gdcmraw(1), gdcmconv(1) gdcm-3.0.22/Utilities/doxygen/man/gdcmconv.xml000664 001766 001770 00000043436 14517730450 023614 0ustar00mmalaterremmalaterre000000 000000 ]> MathieuMalaterreMain developer 20062011Mathieu Malaterre gdcmconv 1 GDCM &version; DICOM Manipulation. gdcmconv Tool to convert DICOM to DICOM. SYNOPSIS gdcmconv [options] file-in file-out DESCRIPTION The gdcmconv command line program takes as input a DICOM file (file-in) and process it to generate an output DICOM file (file-out). The command line option dictate the type of operation(s) gdcmconv will use to generate the output file. PARAMETERS file-in DICOM input filename file-out DICOM output filename OPTIONS -i --input DICOM filename -o --output DICOM filename specific options -X --explicit Change Transfer Syntax to explicit. -M --implicit Change Transfer Syntax to implicit. -U --use-dict Use dict for VR (only public by default). --with-private-dict Use private dict for VR (advanced user only). -C --check-meta Check File Meta Information (advanced user only). --root-uid Root UID. --remove-gl Remove group length (deprecated in DICOM 2008). --remove-private-tags Remove private tags. --remove-retired Remove retired tags. image options -l --apply-lut Apply LUT (non-standard, advanced user only). -8 --apply-lut8 Apply LUT/RGB8 (non-standard, advanced user only). --decompress-lut Decompress LUT (linearize segmented LUT). -P --photometric-interpretation %s Change Photometric Interpretation (when possible). -w --raw Decompress image. -d --deflated Compress using deflated (gzip). -J --jpeg Compress image in jpeg. -K --j2k Compress image in j2k. -L --jpegls Compress image in jpeg-ls. -R --rle Compress image in rle (lossless only). -F --force Force decompression/merging before recompression/splitting. --generate-icon Generate icon. --icon-minmax %d,%d Min/Max value for icon. --icon-auto-minmax Automatically compute best Min/Max values for icon. --compress-icon Decide whether icon follows main TransferSyntax or remains uncompressed. --planar-configuration [01] Change planar configuration. -Y --lossy Use the lossy (if possible) compressor. -S --split %d Write 2D image with multiple fragments (using max size) JPEG options -q --quality %*f set quality. JPEG-LS options -e --allowed-error %*i set allowed error. J2K options -r --rate %*f set rate. -q --quality %*f set quality. -t --tile %d,%d set tile size. -n --number-resolution %d set number of resolution. --irreversible set irreversible. general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information special options -I --ignore-errors convert even if file is corrupted (advanced users only, see disclaimers). environment variable GDCM_ROOT_UID Root UID Simple usage gdcmconv is a great tool to convert broken DICOM implementation into properly parsable DICOM file. Usage is simply: $ gdcmconv input.dcm output.dcm or if you prefer being explicit: $ gdcmconv -i input.dcm -o output.dcm Even though gdcmconv can overwrite directly on the same file (input.dcm = output.dcm), it is recommended that user should first convert into a different file to make sure the bug is properly handled by GDCM. Typical cases where you would want to use gdcmconv in its simple form: convert non-cp246 conforming file into conforming cp246, convert implicit little endian transfer syntax file meta header into proper explicit little endian transfer syntax, convert the GE-13 bytes bug, convert dual syntax file: implicit/explicit, convert Philips dual Little Endian/Big Endian file, convert GDCM 1.2.0 broken UN-2-bytes fields, ... All other broken files listed in the supported refsection. When no option other is used, only the dataset is inspected. So encapsulated Pixel Data, for instance, is not inspected for well known bugs. When doing this kind of work, this is usually a good idea to perform some kind of quality control, see gdcmconv Quality Control refsection (down below). Typical usage File Meta Header Running $ gdcmconv input.dcm output.dcm Is not enough to recompute file meta header, when input file is buggy. You may want to use: –check-meta $ gdcmconv --check-meta input.dcm output.dcm See typical cases such as: GE_DLX-8-MONO2-PrivateSyntax.dcm or PICKER-16-MONO2-No_DicomV3_Preamble.dcm from gdcmData. Conversion to Explicit Transfer Syntax To convert a file that was written using Implicit Transfer Syntax into Explicit Transfer Syntax simply use: $ gdcmconv --explicit uncompressed.dcm compressed.dcm Compressing to lossless JPEG To compress an uncompressed DICOM file to a JPEG Lossless encapsulated format: $ gdcmconv --jpeg uncompressed.dcm compressed.dcm Compressing to lossy JPEG To compress an uncompressed DICOM file to a JPEG Lossy encapsulated format: $ gdcmconv --lossy --jpeg -q 90 uncompressed.dcm compressed.dcm Note: -q is just one of the many way to specify lossy quality, you need to inspect the other cmd line flag to specify lossyness properties. Compressing to lossless JPEG-LS To compress an uncompressed DICOM file to a JPEG-LS Lossless encapsulated format: $ gdcmconv --jpegls uncompressed.dcm compressed.dcm Compressing to lossy JPEG-LS To compress an uncompressed DICOM file to a JPEG-LS Lossy encapsulated format: $ gdcmconv --lossy --jpegls -e 2 uncompressed.dcm lossy_compressed.dcm Note: -e (or –lossy-error) means that the maximum tolerate error is 2 for each pixel value Compressing to lossless J2K To compress an uncompressed DICOM file to a JPEG-2000 Lossless encapsulated format: $ gdcmconv --j2k uncompressed.dcm compressed.dcm Compressing to lossy J2K To compress an uncompressed DICOM file to a JPEG-2000 Lossy encapsulated format: $ gdcmconv --lossy -q 55,50,45 --j2k uncompressed.dcm lossy_compressed.dcm Note: -q is just one of the many way to specify lossy quality, you need to inspect the other cmd line flag to specify lossyness properties. Compressing to lossless RLE To compress an uncompressed DICOM file to a RLE Lossless encapsulated format: $ gdcmconv --rle uncompressed.dcm compressed.dcm There is no such thing as lossy RLE compression. Split encapsulated DICOM: To split an encapsulated stream into smaller chunk (1024 bytes each): $ gdcmconv --split 1024 rle.dcm rle_1024.dcm If an odd number of bytes is passed it will be rounded down to the next even number (eg. 1025 -> 1024) since DICOM only allow even number for Value Length. Forcing (re)compression Sometime it is necessary to use the –force option. By default when user specify –j2k and input file is already in JPEG 2000 encapsulated DICOM format then no operation takes places. By using –force you make sure that (re)compression operation takes places. Real life example of why you would use –force: When Pixel Data is missing data / is padded with junk When you would like to make sure GDCM can handle decompression & recompression cycle Decompressing a Compressed DICOM $ gdcmconv --raw compressed.dcm uncompressed.dcm In the case of uncompress file (Explicit and Implicit) the behavior is to keep the original Transfer Syntax (so Implicit remains Implit) Decompressing a Compressed DICOM as implicit $ gdcmconv --raw --implicit compressed.dcm uncompressed_implicit.dcm By symmetry it is also possible to use gdcmconv --raw --explicit to make sure that target file is always Explicit TS. Compressing an uncompressed Icon By default when compressing a DICOM Image file, gdcmconv will not compress the icon. A user option needs to be turned on to explicitly force the compression of the Icon Image Sequence Pixel Data For example, by default we will not compress the Icon Image Sequence Pixel Data attribute: $ gdcmconv --jpeg gdcmData/simpleImageWithIcon.dcm uncompressed_icon.dcm In the following example we will explicitly compress the Icon Image Sequence Pixel Data attibute. In that case the same Transfer Syntax is being used for both the main Pixel Data and the Pixel Data from the Icon Image Sequence: $ gdcmconv --jpeg --compress-icon gdcmData/simpleImageWithIcon.dcm compressed_icon.dcm Generating an Icon For some application it might be necessary to produce a small preview of the main image to be able to quickly load that short preview instead of the main image. In that case: $ gdcmconv --raw --generate-icon gdcmData/test.acr test_icon.dcm In some cases the main Pixel Data element is expressed as pixel defined on 16bits. Since Icon can only store at most pixel of size 8bits, a rescale operation needs to take place. In order to properly select a better interval for doing the rescale operation user can specify the min max used for the rescale operation: $ gdcmconv --raw --generate-icon --icon-minmax 0,192 gdcmData/012345.002.050.dcm icon_minmax.dcm Changing the planar Configuration Often RLE files are compressed using a different Planar Configuration (RRR ... GGG... BBB...) instead of the usual triplet (RGB ... RGB ... RGB ). So upon decompression the Planar Configuration is 1. This is perfectly legal in DICOM, however this is unconventional, and thus it may be a good idea to also change the planar configuration and set it to the default : $ gdcmconv --raw --planar-configuration 0 compressed.dcm uncompressed1.dcm To reinvert the planar configuration of file 'uncompressed1.dcm', simply do: $ gdcmconv --raw --planar-configuration 1 uncompressed1.dcm uncompressed2.dcm Lossless Conversion When talking about lossless conversion, there is an ambiguity that need to be understood. To achieve higher compression ratio, the RGB color space is usually not used, in favor of a YBR one. Changing from one color space to the other is (bit level) not lossless. For more detail, see what are the true lossless transformations as described: http://gdcm.sourceforge.net/wiki/index.php/Color_Space_Transformations Quality Control One important part when using gdcmconv it to have a way to quality control the output. You can use 3rd party tool to check the output of gdcmconv is correct. DCMTK / dicom3tools Using another DICOM implementation such as the one from DCMTK or dicom3tools can be a good process to check the output of gdcmconv. For DCMTK use: dcmdump For dicom3tools use: dcdump For reference, gdcmconv --raw will act as dcmdjpeg +cn +px, since it never tries to convert color space. VIM: vimdiff You can setup your favorite editor to compare the output, for instance in vim: autocmd BufReadPre *.dcm set ro autocmd BufReadPost *.dcm silent %!dcmdump -M +uc "%" then simply do: $ vimdiff input.dcm output.dcm vbindiff On UNIX you can visually compare binary file using the vbindiff command: $ vbindiff input.dcm output.dcm SEE ALSO gdcmdump(1), gdcmraw(1), gdcminfo(1), gdcmdiff(1) gdcm-3.0.22/Utilities/doxygen/footer.html000664 001766 001770 00000003023 14517730450 022667 0ustar00mmalaterremmalaterre000000 000000
Generated on $datetime for $projectname by doxygen $doxygenversion
SourceForge.net Logo gdcm-3.0.22/Utilities/doxygen/README.txt.in000664 001766 001770 00000000436 14517730450 022613 0ustar00mmalaterremmalaterre000000 000000 /** \mainpage GDCM Documentation This is the developpers documentation. A PDF version of this doxygen documentation can be found here: @GDCM_DOC_PDF_LINK@ A tarball version of this HTML doxygen documentation can be found here: @GDCM_DOC_TARBALL_LINK@ \author Mathieu Malaterre */ gdcm-3.0.22/Utilities/doxygen/README000664 001766 001770 00000001074 14517730450 021367 0ustar00mmalaterremmalaterre000000 000000 If you are reading this you are wondering what are ll those doxygen options: - I need HTML output for the doc at: http://gdcm.sourceforge.net/html/ - I need the MAN output for the generated man pages, for debian packaging this is a lintian error when a cmd line tool does not prodivde a man-page. - I need XML output for the python help page. See also the doxy2swig.py that is located in Wrapping/Python dir. - Specify a special FOOTER so that Piwik engine is on and will generate traffic to sf.net. The rest of the non-default options is currently not documented... gdcm-3.0.22/Utilities/doxygen/patchtex.cmake000664 001766 001770 00000000607 14517730450 023332 0ustar00mmalaterremmalaterre000000 000000 project(toto) file(READ ${CMAKE_CURRENT_SOURCE_DIR}/refman.tex refman_file) string(REPLACE "]{hyperref}" "]{hyperref}\\\\hypersetup{pdftitle={GDCM Reference Guide},pdfkeywords={DICOM},baseurl={http:\\/\\/gdcm.sourceforge.net}}\\\\hyperbaseurl{http:\\/\\/gdcm.sourceforge.net}" patched_refman_file ${refman_file} ) file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/patched.tex ${patched_refman_file}) gdcm-3.0.22/Utilities/doxygen/version.txt.in000664 001766 001770 00000000017 14517730450 023336 0ustar00mmalaterremmalaterre000000 000000 @GDCM_VERSION@ gdcm-3.0.22/Utilities/doxygen/TestsList.txt.in000664 001766 001770 00000000035 14517730450 023607 0ustar00mmalaterremmalaterre000000 000000 /** @DOXYFILE_EXAMPLES@ */ gdcm-3.0.22/Utilities/doxygen/doxyfile.in000664 001766 001770 00000316302 14517730450 022665 0ustar00mmalaterremmalaterre000000 000000 # Doxyfile 1.8.9.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv # for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = GDCM # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = @GDCM_VERSION@ # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = @GDCM_BINARY_DIR@/Utilities/doxygen # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = NO # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 2 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:\n" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: # Fortran. In the later case the parser tries to guess whether the code is fixed # or free formatted code, this is the default for Fortran type files), VHDL. For # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file # names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. HIDE_COMPOUND_REFERENCE= NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = YES # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = YES # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters # in a documented function, or documenting parameters that don't exist or using # markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong or incomplete # parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. # Note: If this tag is empty the current directory is searched. INPUT = @GDCM_SOURCE_DIR@/Source \ @GDCM_SOURCE_DIR@/Wrapping \ @GDCM_SOURCE_DIR@/Utilities/VTK \ @GDCM_SOURCE_DIR@/Utilities/doxygen/man \ @GDCM_BINARY_DIR@/Utilities/doxygen/README.txt \ @GDCM_BINARY_DIR@/Utilities/doxygen/TestsList.txt # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: http://www.gnu.org/software/libiconv) for the list of # possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank the # following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, # *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, # *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, # *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, # *.qsf, *.as and *.js. FILE_PATTERNS = *.h \ *.dox # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = @GDCM_SOURCE_DIR@/Source/DataDictionary/gdcmTagToType.h \ @GDCM_SOURCE_DIR@/Source/DataDictionary/gdcmTagKeywords.h \ @GDCM_SOURCE_DIR@/Source/Common/zipstreamimpl.h \ @GDCM_SOURCE_DIR@/Source/Common/zipstreamimpl.hpp \ @GDCM_SOURCE_DIR@/Source/MediaStorageAndFileFormat/gdcm_jp2.h \ @GDCM_SOURCE_DIR@/Source/MediaStorageAndFileFormat/gdcm_j2k.h # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = */.git/* \ */VTK4/* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = @GDCM_SOURCE_DIR@/Examples \ @GDCM_SOURCE_DIR@/Testing \ @GDCM_SOURCE_DIR@/Applications \ @GDCM_SOURCE_DIR@/Utilities/VTK/Examples \ @GDCM_SOURCE_DIR@/Utilities/VTK/Testing \ @GDCM_SOURCE_DIR@/Utilities/VTK/Applications # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = *.cxx \ *.py \ *.java \ *.cs # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = YES # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # function all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see http://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the config file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES # If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type # information. # Note: The availability of this option depends on whether or not doxygen was # compiled with the --with-libclang option. # The default value is: NO. CLANG_ASSISTED_PARSING = NO # If clang assisted parsing is enabled you can provide the compiler with command # line options that you would normally use when invoking the compiler. Note that # the include paths will already be set by doxygen for the files and directories # specified with INPUT and INCLUDE_PATH. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. CLANG_OPTIONS = #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = YES # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. # Minimum value: 1, maximum value: 20, default value: 5. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 3 # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .xhtml # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = @GDCM_HTML_FOOTER@ # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to YES can help to show when doxygen was last run and thus if the # documentation is up to date. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = NO # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: http://developer.apple.com/tools/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 1 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # http://docs.mathjax.org/en/latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from http://www.mathjax.org before deployment. # The default value is: http://cdn.mathjax.org/mathjax/latest. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /