# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
import os
import pydicom


#The .dcm dicon files are read 
ds1 = pydicom.dcmread("ttfm.dcm")

#Parsing the FileDataSet into a String
ds1=str(ds1)
outf=open("Output1.txt","w")
outf.write(ds1)
outf.close()

#The aforementioned actions are repeated i.e extracting .dcm file
ds2 = pydicom.dcmread("bmode.dcm")

#Parsing it to String datatype
ds2=str(ds2)
outf=open("Output2.txt","w")
outf.write(ds2)
outf.close()

StarcoderdataJupyterScriptsDedupFiltered