Mercurial > hg > orthanc-tests
view Tests/GetPixelDataVR.py @ 740:5d04bdbd4906 find-refactoring
fix forbidden access to file on mercurial server
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Fri, 15 Nov 2024 09:38:29 +0100 |
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')