Home Page > > Details

Help With COMP4424/COMP5424 IT in Biomedicine Assignment 2Help With Python Programming

IT in Biomedicine

(COMP4424/COMP5424)

Assignment 2

1. MIC Module Development

1.1   Summary Information

•  This assignment is worth 20% of your final assessment.

•  The mark of "COMP4424/COMP5424 Assignment: Medical Image Computing Module Development" will be given based on the file submitted on Canvas:

–  Canvas Submission [Due Date] 23:59 p.m. on 20 May, 2024 (Monday, Week 13).

•  Skeleton Code and Sample Data can be downloaded from the assignment page on Canvas. It is very important for you to download Skeleton Code first, as for your convenience, the  connection setup between Python and 3D slicer has been completed within the Skeleton Code  already. Within the Skeleton Code, there exist some empty blocks marked with comments  (between #Add your code below# and #Add your code above#), where you should fill in  your assignment code. Meanwhile, you should not modify any other completed parts of the  Skeleton Code.

•  Submission Deliverables

 You are asked to create a zip file of all deliverables, including the source code, image generated and technical report. Your assignment will only be marked if all deliverables can be accessed from the Canvas System, and they can be runnable from a Slicer with version 4.10.

 Your copy should include an Assignment Title Page, which can be downloaded from:

http://rp-www.it.usyd.edu.au/current_students/undergrad/guidelines/assignment_ sheet_individual.pdf

–  Late submission will not be accepted and a zero mark will be given.

1.2 Introduction

1.2   Introduction

Medical image computing (MIC) is an interdisciplinary field at the intersection of computer science, information engineering, electrical engineering, physics, mathematics and medicine.  This field develops computational and mathematical methods for solving problems pertaining to medical images and their use for biomedical research and clinical care. Within the MIC domain, there are three essential medical image analysis techniques, namely, medical image enhancement (MIE), medical image segmentation (MIS) and medical image registration (MIR). The fundamental ideas and practices, regarding MIE, MIS and MIR, have been taught and deployed in this unit of study, from week 5 to week 7.

1.3   COMP4424/COMP5424 Assignment 2: Medical Image Computing Module Development

In this assignment, you will build a fundamental MIC platform. to perform. three individual tasks on the sample data provided and observe the effects achieved by MIE, MIS and MIR respectively. To complete this assignment, you are expected to use 3D slicer with the programming skills learnt from this course, based on the skeleton code and sample data provided on Canvas.

R   For programming related tasks (Task A and Task B), you are suggested to remove all irrelevant module loading paths before you start to do these tasks. Additionally, please wait for your code to be processed, your Slice interface may be frozen as it may take some time to run your MIE and MIS code completely. Note: ideally your program should only take seconds to run, if you found your program needs longer time to run, it is possibly that you are not implement your methods efficiently (e.g., not using numpy functions to do the calculations, writing too many loops which are not necessary, and etc.).

1.3.1   Task A: Medical Image Enhancement (MIE)

R     Key Information:

•  Sample Data: Task A / MRHead.nrrd

•  Skeleton Code: Task A / MedicalImageEnhancement.py

•  Coding Deliverable: Completed solution code (MedicalImageEnhancement.py)

•  Report Deliverable: Corresponding section in the technical report, including the demon- stration of the results of 3D convolution performed with the (1) smoothing, (2) sharpening  and (3) edge detection filters.

You are expected to program an image filtering algorithm with Python, which performs a convolution on the 3D volume MRHead.nrrd. The filters to be used, include the smoothing (already implemented in the code given), sharpening and edge detection filters. Please refer to the lecture slides for the details of the image filtering algorithm. The skeleton code can be found in Canvas.

1.  Load data MRHead.nrrd to Slicer.

2.  Import the source code ‘MedicalImageEnhancement.py’ to Slicer. Then restart Slicer, and find this ‘Task A - MIE’ module in ‘Assignment’ .

3.  Open source code  ‘MedicalImageEnhancement.py’ and implement your solution.  Some instructions and tips are provided in the source code.

4. After modifying your code, save it and then click on the ‘Reload’ button to reload the module, so you don’t need to restart Slicer. 


5.  Change the layout to displace Red Slice only. Superimpose theMRHead ontoMRHead_filtered, and then change the opacity to see the difference between them.



1.3.2 Task B: Medical Image Segmentation (MIS)

R     Key Information:

•  Sample Data: Task B / MRBrainTumor.nrrd

•  Skeleton Code: Task B / MedicalImageSegmentation.py

•  Coding Deliverable: Completed solution code (MedicalImageSegmentation.py)

•  Report Deliverable: Corresponding section in the report, including (1) the demonstration of the 3D segmentation result of the tumor, (2) the demonstration of the experiments on different global and local parameters combinations and (3) the best global and local parameters found for this segmentation task.

Region-growing algorithm can perform medical image segmentation task via delineating ROIs  iteratively. Recall the dual-checking 2D region growing algorithm from the tutorial content of week 6, this task requires you to further extend the dual-checking region growing algorithm to the 3D  version with Python. Skeleton code and sample data for this task can be found in the files provided.

1.  Load ‘MRBrainTumor.nrrd’ from the files provided. Use ’Editor’ module to draw a single dot in the slice which tumor has a clear boundary.

2.  Import the source code ‘MedicalImageSegmentation.py’ to Slicer. Then restart Slicer, and find this ‘Task B - MIS’ module in ‘Assignment’ .

3.  Open source code  ‘MedicalImageSegmentation.py’ and implement your solution.  Some instructions and tips are provided in the source code.

4. After modifying your code, save it and then click on the ‘Reload’ button to reload the module, so you don’t need to restart Slicer.

5.  Click ‘Apply’ to see the results.   Tune the global and local parameters to find the best segmentation result.

 



Here are some hints for you to complete task2:

•  Try to run one iteration first by adding a breakin the ‘grow_from_seed’ function to stop the algorithm at certain iteration to check if the result is expected.

•  If you want to start the assignment based on Week 6’s solution, you should think about how to redesign the ‘find_new_voxels’ function to make it more efficient, depending on how you implement ‘find_new_voxels’ function, the time spent to run the algorithm for the whole 3D brain image will be different and you may experience a slicer ‘no responding’ period if your implementation is not efficient.



1.3.3   Task C: Medical Image Registration (MIR)

R     Key Information:

•  Sample Data: Task C / SubjectA_T1, SubjectA_T2, SubjectB_T1, SubjectB_T2.

•  Output Deliverable: Generated solution NRRD image (SubjectB_T2_registered.nrrd)

•  Report Deliverable:  Corresponding section in the technical report, including (1) the  demonstration of the registered brain images using at least two clearly-explained reg- istration paths and (2) the demonstration of the registration results (by overlaying Sub- jectB_T2_registered.nrrd on SubjectA_T1).

Rigid, affine and non-linear registration are the most commonly-adopted approaches within the  MIR domain.  This task requires you to use rigid and nonlinear registration methods to perform  two-step registrations on two structural MRI datasets acquired on two different subjects (Subject A  and Subject B). Each subject would contain two brain images, one T1 brain image (‘SubjectA_T1’ and ‘SubjectB_T1’) and one T2 brain image (‘SubjectA_T2’ and ‘SubjectB_T2’). This task does not  involve python programming. The demonstration of the data is shown below : 


Your task is to treat SubjectA_T1’ as your registration target and register SubjectB_T2’ to the same space of ‘SubjectA_T1’ . To achieve that, you should :

•  Carry out the intra-subject registration (same subject, different modalities) using affine regis- tration;

•  Carry out the inter-subject registration (different subjects, same modality) using nonlinear registration.

•  Remember to save the intermediate registration result, for your convenience.



The built-in module required for completing this task is "General Registration (BRAINS)" in Slicer. The recommended settings of parameters for the affine and non-linear registrations, are given in the images below (please zoom in to gain a clearer view), meanwhile you are also encouraged to explore your own parameter settings to achieve a better registration result.

You should save your output image as SubjectB_T2_registered.nrrd ’.

Acceptable registration results will align the bio-landmarks in the brains among different subject- s/modalities. One obvious bio-landmark, in this case, is the ventricle, which is marked in red in each subject in the sample registration outputs below (the sub-figures are ’SubjectA_T1’ and three registration results achieved on the same space of ’SubjectA_T1’) :



Hints: There could be more than one registration path available, and your task is to find the most appropriate path, which obtains the best registration result. You could check your registration results by overlaying the output on the target image. Acceptable registration result will align the ventricle in both images, as shown below (which is also shown as the bottom-right sub-figure in the previous image).


1.3.4   Technical Report

You are required to write a technical report for all corresponding sections in this assignment. Please refer to the Key Information - Report Deliverable in each task above to double-check the contents to be included in your technical report. You should use the following formatting for the technical report:

1.  Number of pages - At most 10 pages.

2.  Captions - Captions are requested for any figures presented in the report.

3.  Page Formatting:

•  page size: A4;

•  line space: 1.5 lines;

•  font size: 12;

•  font name: Times New Roman;

•  margin: 2.5cm in all direction




Contact Us - Email:99515681@qq.com    WeChat:codinghelp
Programming Assignment Help!