इमेज डेटा

Python में बायोमेडिकल इमेज विश्लेषण

Stephen Bailey

Instructor

बायोमेडिकल इमेजिंग: खोज का एक सदी से भी लंबा सफर

$$1895$$

विल्हेम रॉन्टगन द्वारा. - [1], पब्लिक डोमेन, https://commons.wikimedia.org/w/index.php?curid=5059748

$$2017$$

मिकाएल हेगस्ट्रॉम द्वारा - स्व-कार्य, CC0, https://commons.wikimedia.org/w/index.php?curid=61722886

Python में बायोमेडिकल इमेज विश्लेषण

कोर्स उद्देश्य

इमेज वर्कफ़्लो

टूलबॉक्स

  • ImageIO
  • NumPy
  • SciPy
  • matplotlib
Python में बायोमेडिकल इमेज विश्लेषण

इमेज लोड करना

  • imageio: इमेज पढ़ें और सेव करें
  • Image ऑब्जेक्ट NumPy arrays होते हैं.
import imageio.v2 as imageio
im = imageio.imread('body-001.dcm')

type(im)
imageio.core.Image
im
Image([[125, 135, ..., 110],
       [100, 130, ..., 100],
        ...,
       [100, 150, ..., 100]], 
          dtype=uint8)
Python में बायोमेडिकल इमेज विश्लेषण

इमेज लोड करना

  • हर उपलब्ध डाइमेंशन पर मान देकर array को slice करें.
im[0, 0]
125
im[0:2, 0:2]
Image([[125, 135],
       [100, 130]], 
       dtype=uint8)
Python में बायोमेडिकल इमेज विश्लेषण

मेटाडेटा

  • मेटाडेटा: इमेज हासिल करने का who, what, when, where, how

  • Image ऑब्जेक्ट में meta dictionary attribute से उपलब्ध

im.meta
im.meta['Modality']
im.meta.keys()
Dict([('StudyDate', '2017-01-01'),
      ('Modality', 'MR'),
      ('PatientSex', F),
      ...
      ('shape', (256, 256)])
'MR'
odict_keys(['StudyDate', 
            'SeriesDate', 
            'PatientSex',
             ...
             'shape'])
Python में बायोमेडिकल इमेज विश्लेषण

इमेज प्लॉट करना

  • Matplotlib का imshow() फंक्शन 2D इमेज डेटा दिखाता है

  • कई colormaps हैं, पर अक्सर grayscale (cmap='gray') में दिखाते हैं

  • Axis ticks और labels इमेज के लिए अक्सर उपयोगी नहीं होते

import matplotlib.pyplot as plt

plt.imshow(im, cmap='gray')
plt.axis('off')
plt.show()

coronal-slice

Python में बायोमेडिकल इमेज विश्लेषण

अभ्यास करते हैं!

Python में बायोमेडिकल इमेज विश्लेषण

Preparing Video For Download...