Medical Imaging Processing - Write a script using Python

Job ID: 33498169

Budget: €8 – €30 EUR

Because the PET-CT SCAN is larger than the 25MB limit, I'll have to email it to you.

You will write a general purpose python script to run analysis of a volumetric medical image dataset,
specifically a PET-CT scan.
Your code should:

1) Prompt the user via pop-up window to select the folder where both the CT and PET scans are located and load the images of each of the datasets as variables called “AxialCT” and “AxialPET”.
2) Display the following scan info; Patient Name, Patient Date of Birth, RescaleIntercept (for CT only), the Injected Activity (for PET only).
3) Correct the CT data to H.U. scale. Display before and after histograms to demonstrate change.
4) Perform a check to see if there is any metal detected in the image and display appropriate warning. Metal shows up as an artefact in the image.
5) Apply a median filter to the PET scan with the filter size set to “3”.
6) Create and apply a thresholding mask to the PET data that will only retain values that are within 25% of the max activity in the scan.
7) For a slice that contains a region with the max activity on a single figure display (see Tips below):
• The Original PET image.
• The median filtered image.
• The binary threshold mask.
• The mask applied.

8) On a new figure, for the slice you used previously in display:
• The original PET image
• The closest corresponding CT slice at that location.
Be aware that PET images may go feet to head, and the CT go head to feet, or vice-versa.
9) Ensure that your code:
• Runs without error.
• Is heavily commented throughout.
• Suitable titles and labels are included on any figures.
Tips:
• To access the metadata for injected dose you need code similar to the following;
RefPET.RadiopharmaceuticalInformationSequence[0].RadionuclideTotalDose
• You may wish to research the following functions to help to find max values/locations in array; numpy.amax , numpy.argmax and numpy.unravel_index
Related categories: Python Programming Image Processing