Aan de slagGa gratis aan de slag

Load volumes

ImageIO's volread() function can load multi-dimensional datasets and create 3D volumes from a folder of images. It can also aggregate metadata across these multiple images.

For this exercise, read in an entire volume of brain data from the "tcia-chest-ct" folder, which contains 25 DICOM images.

Deze oefening maakt deel uit van de cursus

Biomedical Image Analysis in Python

Cursus bekijken

Oefeninstructies

  • Use volread() to load the directory, "tcia-chest-ct".
  • Print the available metadata using the keys() method of vol.meta.
  • Print the shape of the volume.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Import ImageIO
____

# Load the "tcia-chest-ct" directory
vol = ____

# Print image attributes
print('Available metadata:', ____)
print('Shape of image array:', ____)
Code bewerken en uitvoeren