$34.99
Instructions
Please show your solutions to each problem in full, writing them neatly. For computer programs, please remember to turn in your code through the course's blackboard session, as well as any plots / figures that are requested.
LEARNING GOALS:
- Working with Matlab and visualizing surface data.
- Input & Output of essential file-types (working with DICOM images) - Visualization of data using Visualization Tool Kit (VTK).
- Understanding Signal to Noise and Contrast to Noise
- Visualizing the output of an MRI scanner: Experiencing k-space in 2D!
1. (40 points): Write a Matlab script to read the DICOM medical image slices (HINT: dicomread function in Matlab!) provided with this assignment and write out a unified image volume file in the VTK file format. Use the .dcm files in PigDicom3.zip available in the Week 3 folder on Blackboard. Remember to record the image voxel spacing information in the DICOM image header (HINT: dicominfo function in Matlab!) and use this data in the VTK file that you write out!
First, visualize your DICOM data in ITK-SNAP
(www.itksnap.org/docs/viewtutorial.php?) – the open source image visualization GUI based on the Insight Tool-Kit (ITK). Please download and install ITK-SNAP for your personal computing devices for this assignment.
Code is provided on Blackboard to help you get started:
Starter code to write Volume Image in VTK file format: write_vtk_Volume
P.T.O
a) Explore the written VTK image volume interactively using the “Slice” Filter in Paraview and insert a snapshot of your work with your assignment submission showing a slice through the left-ventricle of the heart in the image volume which looks like this:
Left Ventricular chamber of the heart.
Matlab function to write VTK Volume (image) files provided with this assignment.
b) Use the “Contour” Filter in Paraview to create a iso-contour surface of the segmentation of the inner wall of the heart in the above image by adjusting the iso-surface value in the ‘Properties panel’. Note that “segmentation” is the process of extracting the outline of a geometry representing an anatomical surface of interest.
Now, save the resulting contour as an STL (binary) file using the – “File Save Data” menu. Submit your STL file and insert a snapshot of the Paraview rendering of the same in your report! HINT: it should look like this, with the background of the slice view from part (a):
Left Ventricular chamber of the heart.
c) (20 points):
FINALLY,
Crop down the STL geometry prepared in part (b) using a combination of the “Clip” filter and the Extract Subset” filter after figuring out how to use them, so that you end up with “just” the left ventricular chamber of the heart, which looks like the following, if viewed in the same exact orientation as the image above:
Note you will not be able to get as ‘smooth’ a result as shown above, but try to cut out as much of the extraneous surfaces as possible. Write the resulting surface as an STL file and submit this with your assignment report.
Read the STL file using the code written in Assignment Question 2 above and output a VTK surface which includes the normal vectors to the surface, at each vertex of the geometry.
Visualize the results of the Matlab code in Paraview again and insert the snapshots with this report. Remember to also submit your code!