Analyse d'images biomédicales en Python
Stephen Bailey
Instructor
im[row, col]
vol[pln, row, col]

im[row, col, ch]

im_ts[time, row, col, ch]

import imageio.v2 as imageio import numpy as npim1=imageio.imread('chest-000.dcm') im2=imageio.imread('chest-001.dcm') im3=imageio.imread('chest-002.dcm')im1.shape
(512, 512)
vol = np.stack([im1, im2, im3])vol.shape
(3, 512, 512)
imageio.volread() :
import os
os.listdir('chest-data')
['chest-000.dcm',
'chest-001.dcm',
'chest-002.dcm',
...,
'chest-049.dcm']
import imageio.v2 as imageio vol = imageio.volread('chest-data', format='DICOM')vol.shape
(50, 512, 512)
Dimensions de l'image : nombre d'éléments par axe
import imageio.v2 as imageio
vol = imageio.volread(
'chest-data', format='DICOM')
# Dimensions (en voxels)
n0, n1, n2 = vol.shape
n0, n1, n2
(50, 512, 512)
Champ couvert : étendue physique couverte par axe
Pas d'échantillonnage : espace physique couvert par chaque élément
# Pas d'échantillonnage (en mm)
d0, d1, d2 = vol.meta['sampling']
d0, d1, d2
(2, 0.5, 0.5)
# Champ couvert (en mm)
n0 * d0, n1 * d1, n2 * d2
(100, 256, 256)
Analyse d'images biomédicales en Python