Skip to content

Instantly share code, notes, and snippets.

@pwighton
Created February 8, 2022 21:42
Show Gist options
  • Save pwighton/27ce824bd7d19368a26dcadb1848684a to your computer and use it in GitHub Desktop.
Save pwighton/27ce824bd7d19368a26dcadb1848684a to your computer and use it in GitHub Desktop.
Print dicom tags example
#!/usr/bin/env python3
import argparse
import pydicom
parser = argparse.ArgumentParser(description='Parse command line options')
parser.add_argument('input_file')
args = parser.parse_args()
dcm = pydicom.dcmread(args.input_file)
print(dcm[(0x0010,0x0010)].value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment