/usr/lib/python2.7/dist-packages/dicom/testcharsetfiles/charlist.py is in python-dicom 0.9.9-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | # charlist.py
"""List summary info for the test files in the charset directory"""
# Copyright (c) 2008-2012 Darcy Mason
# This file is part of pydicom, relased under an MIT license.
# See the file license.txt included with this distribution, also
# available at http://pydicom.googlecode.com
import logging
logging.basicConfig(level=logging.INFO,
format='%(message)s')
if __name__ == "__main__":
from glob import glob
import dicom
# Get list of all DICOM files
names = glob("*.dcm")
# Collect summary information from the files
files_info = []
for name in names:
ds = dicom.read_file(name)
ds.decode()
files_info.append((name, ds.SpecificCharacterSet, ds.PatientsName))
# Show the information
format = "%-16s %-40s %s"
logging.info(format % ("Filename", "Character Sets", "Patient's Name"))
logging.info(format % ("--------", "--------------", "--------------"))
for file_info in files_info:
logging.info(format % file_info)
if "chrFrenMulti.dcm" in names:
logging.info("\nOther\n=====")
logging.info(
"chrFrenMulti.dcm is a modified version of chrFren.dcm"
" with multi-valued PN and LO for testing decoding"
)
|