Mercurial > hg > orthanc-tests
view Tests/GetPixelDataVR.py @ 639:d5e355d9797c
test of worklists now working with Python 2
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 02 Apr 2024 20:11:09 +0200 |
parents | 7de5fd295025 |
children |
line wrap: on
line source
#!/usr/bin/env python3 import sys import pydicom if len(sys.argv) <= 1: print('Print the VR of the pixel data of a set of DICOM files') print('Usage: %s [list of DICOM files]' % sys.argv[0]) exit(-1) for f in sys.argv[1:]: try: ds = pydicom.dcmread(f) print(f, '=>', ds['PixelData'].VR) except: print(f, '=>', 'Unable to parse')