Commit 4fb16dbc authored by kulvait's avatar kulvait

Updated DICOM

parent f22dac26
playground
__pycache__
*pyc
scripts
......@@ -23,12 +23,18 @@ def timeToSeconds(naivetime):
totalsec = sec + 60 * mins + 60 * 60 * hod
return(totalsec)
#Get list of pydicom objects for each file with given suffix in the directory
def getDicoms(d, suffixes=["IMA"]):
def getDicomFiles(d, suffixes=["IMA"]):
dicomFiles = []
for s in suffixes:
dicomFiles.extend(glob.glob(os.path.join(d, "*.%s"%s)))
dicomFiles = glob.glob(os.path.join(d, "*.IMA"))
dicomFiles.sort()
return dicomFiles
#Get list of pydicom objects for each file with given suffix in the directory
def getDicoms(d, suffixes=["IMA"]):
dicomFiles = getDicomFiles(d, suffixes);
dicoms = [pydicom.read_file(x) for x in dicomFiles]
return dicoms
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment