python code to convert dcm extension to png code example
Example: Python convert dcm to png
med2image -i SAG-anon/0001-1.3.12.2.1107.5.2.19.45152.2013030808110258929186035.dcm \
-d dicom-results/tags \
-o %PatientName%PatientID%ProtocolName.jpg \
-s m