I have thousands of dicom images in a folder. I read them with pydicom
like this
import numpy as np
import dicom
folder = "/images"
imgs = [dicom.read_file(folder + '/' + s) for s in os.listdir(folder)]
I then want to stack all images as a numpy array, like this:
data = np.stack([i.pixel_array for i in imgs])
However, the images are or different size and therefore cannot be stacked.
How can I add a step that resizes all images to 1000x1000 ?