Starting from:

$25

CS463/516 Assignment 1 Basic Numpy, Medical Imaging Modalities, SNR, and Denoising Solved

Part 1: simple plotting with matplotlib
a)                Display all images middle z-slice (3rd dimension, axis=2) (as seen below). Use the ‘jet’ color scale (instead of the gray color scale that I use below in my example). Above each image, show the title of the modality. Remove the x/y axis labels (as I did below). Use plt.subplot

b)               display the minimum intensity projection (MIP) for the swi.nii.gz, and the maximum intensity projection (MIP) for the TOF (in jet color map).  

  

 

Left: part (a) – replicate this but use jet color map instead of gray.  

 

 

 

 

  

 

Left: part (b). note how the blood vessels are displayed prominently due to the projection. You will need to restrict the z-slices from the SWI to achieve a good MIP. Use np.min and np.max.  

 

 

 
Part 2: 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 versions) 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 SNR estimation, quantifying noise
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?  

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 : linear filtering
Using the Fourier transform method shown towards the end of lecture 2 video, 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 slice of the filtered image in all subplots.  

More products