Starting from:

$30

CS463-516-Medical Image Processing Solved

Topics: Basic numpy, medical imaging modalities, SNR, and denoising 

In this assignment we will familiarize ourselves with basic numpy array manipulation, different imaging modalities, and gain understanding of some basic image features (contrast and SNR).   

 

Setup
First, install spyder (or any python IDE). If you are on windows, you will probably want to install anaconda first: https://docs.anaconda.com/anaconda/install/  

•     Note – you don’t need to use spyder (any python IDE is fine) but it will help a lot in this course because the attached console is very useful for debugging and visualization of intermediate results.  

Second, get the images (link below). This directory contains 6 images:

https://drive.google.com/file/d/15O0f9T2tadF7WK2uFrLT7SLG46vpHyNN/view?usp=sharing  

 

SWI (susceptibility weighted image):  

sub-01_ses-forrestgump_anat_sub-01_ses-forrestgump_acq-mag_veno.nii.gz TOF (time of flight): sub-01_ses-forrestgump_anat_sub-01_ses-forrestgump_angio.nii.gz T1 (T1-weighted image): sub-01_ses-forrestgump_anat_sub-01_ses-forrestgump_T1w.nii.gz T2 (T2-weighted image): 

sub-01_ses-forrestgump_anat_sub-01_ses-forrestgump_T2w.nii.gz DWI (Diffusion weighted image): 

sub-01_ses-forrestgump_dwi_sub-01_ses-forrestgump_dwi.nii.gz BOLD (Blood oxygen level dependent image): 

sub-01_ses-forrestgump_func_sub-01_ses-forrestgump_task-forrestgump_acq-dico_run-01_bold.nii.gz 

 

Part 1: (25%): simple plotting with matplotlib
a)       Basic plotting: replicate the figure below, but use the ‘jet’ colormap instead of the ‘gray’ colormap (which I used to create the figure below).  

 

Part 1a: plotting the middle z-slice for each image type.

  
b)      Use the np.min() and np.max() functions to create minimum and maximum intensity projections respectively (see below) of the SWI and the TOF. Show views from all 3 axes and use jet colormap to display your results. *hint for the SWI, you will probably want to restrict the MIP to ~50-100 slices, and use vmax=300 for the TOF (to better highlight the arteries).

 

Part 1b: plotting the maximum intensity projection and minimum intensity projection for TOF and SWI

  

Part 2 (25%): contrast estimation
Using numpy, get 3 different contrast measures for each image (root mean square, Michelson, and entropy, see lecture 3 slide 4, 5). Report the contrast (all 3 values) in the title of the plots in figure 1a. base your contrast estimation on the entire 3D or 4D image (not just the slice shown in the figures).  

 

Part 3 (25%): SNR estimation, quantifying noise
a)       Using the method outlined in the lecture 3 slide 7, report the SNR for each of the modalities. Which modality has the highest SNR and which has the lowest?  

b)      Plot histograms of the noise in each image. What type of distribution does the noise follow?  

 

To display the solution to part 3, create a new figure (as in part 1) and display the noise histogram of each image (instead of the image itself) in each sub plot. Show the SNR as the title above each histogram (along with the image name).

 

*caution – when selecting your noise patch, be sure the patch isn’t all zeros, otherwise your noise will be estimated as 0 and the SNR will be infinite*

 

Part 4 (25%): Denoising
a)       Using the Fourier transform method shown at end of assignment 1 video and the 3d gaussian, apply linear filtering to each image for 𝜎 = 2, 𝜎 = 4, and 𝜎 = 15. Create 3 new versions of the figure in part 1a, one figure for each sigma. Show the middle z-slice of the filtered image in all subplots.  

b)      Install the ‘dipy’ package and use nlmeans to denoise the images. Show, for each image, the following plots 1) noisy image 2) denoised image 3) method noise (noisy minus denoised), see below for an example on the T1.  

More products