Mercurial > hg > orthanc-tests
view Tests/GetPixelDataVR.py @ 658:31a7e52b3da6
split DICOM TLS in 2: check-client and no-check-client
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 17 Jun 2024 18:25:18 +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')