Dump every tag with its VR and value; always the first step when debugging
dcmdump image.dcmEveryday DCMTK and dcm4che command line tools for dumping, converting, transferring and anonymizing files.
Dump every tag with its VR and value; always the first step when debugging
dcmdump image.dcmPrint only the given tag; repeat +P to select several tags
dcmdump +P 0010,0010 image.dcmSkip loading very long values such as pixel data for faster dumps
dcmdump -M image.dcmPrint long values completely; by default they are shortened
dcmdump +L image.dcmPrint the hierarchy as a tree, showing sequences and nested items
dcmdump +T image.dcmConvert values affected by Specific Character Set to UTF-8 for readable output
dcmdump +U8 image.dcmWrite Explicit VR Little Endian, the most widely supported transfer syntax
dcmconv +te in.dcm out.dcmCompressed pixel data needs a codec; conversion fails without one
Write Implicit VR Little Endian, common for legacy PACS and media
dcmconv +ti in.dcm out.dcmWrite Explicit VR Big Endian, only needed by a few legacy devices
dcmconv +tb in.dcm out.dcmWrite Deflated Explicit VR Little Endian to shrink the dataset
dcmconv +td in.dcm out.dcmExport a PNG preview; dcm2pnm is the older name of the same tool
dcm2img +on image.dcm slice.pngExport a lossy baseline JPEG, handy for thumbnails
dcm2img +oj image.dcm slice.jpgWrap a plain JPEG or BMP image into DICOM using a template dataset
img2dcm -df template.dcm photo.jpg photo.dcmBuild the template with dump2dcm from a dump text file first
Send a C-ECHO to verify connectivity and AE title configuration
echoscu -aet ECHO -aec PACS 10.0.0.12 11112Query by patient name; -P selects the Patient Root information model
findscu -P -k 0010,0010="DOE^JOHN" 10.0.0.12 11112Query studies by patient ID and a study date range
findscu -S -k 0010,0020=ID123 -k 0008,0020=20260101-20261231 10.0.0.12 11112Extract the responses as rsp0001.dcm and following files
findscu -P -k 0010,0010 -X 10.0.0.12 11112Send images; pointing it at a live PACS writes into the archive
storescu -aet SCU -aec STORAGE 10.0.0.12 11112 image.dcmCheck the peer with echoscu first, then send a small batch
Receive images locally and store them into the given directory
storescp -aet STORAGE -od /data/incoming 11112The output directory must already exist, otherwise receiving fails
Retrieve a whole study from the PACS by its Study Instance UID
movescu -P -k 0020,000D=1.2.840.113619 -aem STORESCP -od /data 10.0.0.12 11112Change the patient name in place, rewriting the original file
dcmodify -m "(0010,0010)=ANONYMOUS" image.dcmA .bak copy is created by default; delete it after verifying
Rewrite the patient ID of every *.dcm in place; this cannot be undone
dcmodify -m "(0010,0020)=ANON-001" *.dcmErase the birth date element from the file; erasure is permanent
dcmodify -e "(0010,0030)" image.dcmErase all private data from the file, a must for real de-identification
dcmodify -ep image.dcmPrivate tags often still hold device and patient information
Generate new Study, Series and SOP Instance UIDs for the file
dcmodify -gst -gse -gin image.dcmAfter changing UIDs, update the index and all referring records
Disable the backup and rewrite the file; there is no way back
dcmodify -nb -m "(0008,1030)=CT Head" image.dcmValidate mandatory attributes and encoding errors against the IOD
dciodvfy image.dcmShipped with dicom3tools, not part of the DCMTK package
Quickly inspect the file meta information and transfer syntax
dcmdump image.dcm | head -n 20Re-encoding once exposes structural damage in the dataset
dcmconv +te in.dcm check.dcmKeep printing even on parse errors, which helps diagnose broken files
dcmdump +E image.dcmDiff two tag dumps to locate exactly what changed
dcmdump -M a.dcm > a.txt && dcmdump -M b.dcm > b.txt && diff a.txt b.txtdcm4che passes the peer as AE@host:port via -c, unlike DCMTK
storescu -c STORAGE@10.0.0.12:11112 image.dcmdcm4che uses -m for matching keys and -L to pick the query level
findscu -c PACS@10.0.0.12:11112 -L STUDY -m PatientID=12345678Write DICOM JSON to stdout, with pixel data as a bulkdata reference
dcm2json image.dcm > image.jsonThe tool writes to stdout, so redirect it to save a file
Pretty-print the JSON with indentation for diffing and review
dcm2json -I image.dcm > image.jsonEncode DS and IS values as JSON numbers instead of strings
dcm2json -N image.dcm > image.jsonInline bulkdata such as pixel data, which can blow up the JSON size
dcm2json -b image.dcm > image.jsonAvoid it for large series; the output may reach hundreds of MB
This website uses cookies to ensure you get the best experience on our website. Privacy Policy.