Since the code already depends on Numpy , we can use Numpy instead of creating and appending lists for scaling the image data from Dicom to improve the performance.
Before using Numpy for converting 10 files it took 98.287921104 s
After using Numpy the same task with same images takes 12.0352997347 s
Since the code already depends on Numpy , we can use Numpy instead of creating and appending lists for scaling the image data from Dicom to improve the performance.
Before using Numpy for converting 10 files it took 98.287921104 s After using Numpy the same task with same images takes 12.0352997347 s