I have a set of 20 DICOM images, and I need to show the average of Window and Center of these 20 images.
Using pydicom I get the value of these tags, where the value of the 20 images are equal, WindowWidth = ['56', '3200']
and WindowCenter = ['29', '700']
.
How can I calculate this average value to Window and Center?
My simplified code, if it helps:
from dicom import read_file
ds = read_file("01.dcm")
print ds.WindowWidth # = ['56', '3200']
print ds.WindowCenter # = ['29', '700']