Programming Tutorial Course - Exercises for Producing Visual Output
In this tutorial course, Michael Berks provides exercises that involve loading 3D data, displaying output, and visualizing images. Students are tasked with analyzing patient data, computing mean T1 values in tumor regions, identifying slices with the most tumor voxels, and displaying image outputs effectively using Python and MATLAB. The exercises aim to enhance participants' skills in processing medical imaging data and visualizing results.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Programming tutorial course michael.berks@manchester.ac.uk Exercises 6: Producing visual output
Exercises 1 loading 3D data This is an extension of last week s tutorial Download travastin.zip and unzip into your data folder The data contains 10 patients, each of which has 2 image visits In each visit folder there is: A post-contrast T1-weighted image A quantitative T1 map An ROI mask, with non-zero voxels specifying the tumour Loop through each patient data folder, and compute the mean T1- value (from the quantitative T1 map) in the tumour ROI Hint: The images are 3D Analyze format, so use niftiread in Matlab and the Nibabel module in python Use the loaded ROI mask as a logical (black-and-white) mask as you did for the vessel mask
Exercises 2 displaying output Go through the Travastin patient data again and for each visit Work out the slice with most tumour voxels Hint: use sum over the 1st and 2nd axes of the ROI mask Get the (x,y)-coordinates of the tumour in that slice Hint: use find (with 2 outputs) in Matlab or np.nonzero in python Display the slice in the post-contrast T1-weighted image and plot the location of the tumour voxels with red crosses
Exercises 3 displaying images Go through the script: visual_output.py Make sure understand the examples (the comments should help) Try changing the image/plot properties to create new examples