[SOLVED] CS463_516 Assignment1- Basic numpy, medical imaging modalities, SNR, and denoising

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Medical-Imaging-k2s4h0.zip (551.8 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
šŸ”’ Securely Powered by:
Secure Checkout
5/5 - (1 vote)

Topic: 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 ipython console is very useful for debugging and visualization of intermediate results.

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

Ā 

The images were all acquired using MRI scanner, with the exception of ct.nii.gz and meanpet.nii.gz, which are from CT and PET scanner, respectively. Most of the images are 3D, with the exception of cardiac_axial.nii.gz, cardiac_realtime.nii.gz, and fmri.nii.gz, which are 4D.

https://drive.google.com/file/d/10_bOHQmfe9WkTlK9Td5IhjVHhBp–s2ni/view?usp=sharing

Part 1: : simple plotting with matplotlib

  1. 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 subplot
  2. 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.

  • Medical-Imaging-k2s4h0.zip