Due Date: You have almost 2 weeks to do this assignment. Your code must be checked into the svn repository by 12 PM Wednesday night, April 15. Always, try to finish early! E-mail your TA or instructor with questions or problems.
This is your segmentation assignment. It includes:
For further guidance you should consult the ITK software guide and the lecture slides, especially those from lectures 12&13, 14, 17, and 18.
Create a new svn directory structure for this assignment, following the pattern below exactly. Assuming you previously checked out your svn module to c:\MIIA\, this would look like:
cd c:\MIIA\{Your_SVN_User_Name} <-- This is the only line you might need to change.
mkdir hw4
mkdir hw4\Part1
mkdir hw4\Part2
mkdir hw4\Part3
svn add hw4
svn ci hw4 -m "Setting up module for hw4"
Now, download the image data set you will be using for this assignment, and unzip the archive somewhere convenient, but NOT in your SVN directory. (Please do NOT upload your copy of these downloaded images to SVN.)
Inside the resulting HW4 Images directory, you will find IM.mha, which is a small (64x64x64) piece of a much larger volumetric CT data. IM.mha has been cropped to include the ascending aorta, which will be your primary segmentation task for this assignment. In the same directory you will also find SegIM.mha, which is a coresponding expert segmentation for the ascending aorta, as visible in IM.mha. As noted in the included seed_data.txt, your automatic segmentations of this piece of the aorta should be initialized using the seed point (x=35,y=17,z=28).
Load both IM.mha and SegIM.mha into SNAP, to visualize them both as you did at the end of assignment 2; a screen-shot of what this should look like after you update SNAP's mesh is included in the file HW4-SNAP.jpg. Spend a little time using SNAP to look through the volumetric data, to get a feel for it.
Finally, inside the HW4 Images directory you will also find a subdirectory named LargeSet, which contains a much larger CT volume from which our small subset was taken, with coresponding expert segmentation and seed point. Use SNAP to look at this larger data set and segmentation as well.
Unless specifically told otherwise, you should use the small (64x64x64) data sets for each part of this assignment.
Begin by copying Examples/Segmentation/ConnectedThresholdImageFilter.cxx from your InsightToolkit directory to Part1\threshold.cxx. Copy and update your CMakeLists.txt file from HW3-part2 as well. When updating your CMakeLists.txt file, the compiled program should be named threshold and your TARGET_LINK_LIBRARIES line should include ITKNumerics and ITKIO (this is discernable by looking at the CMakeLists.txt file in the Examples/Segmentation directory). Add and commit your code (CMakeLists.txt is part of your code) to SVN.
Now, make the following changes to threshold.cxx, being sure to commit your changes to svn after you complete each step:
argc and argv. I strongly recommend testing to make sure this works before continuing.CurvatureFlowImageFilter, use one of the other Edge-Preserving Smoothing filters discussed in section 6.7.3 of the ITK Software Guide. (As a technical note, to keep the rest of the example code working, you will probably want to keep using the name smoothing for the smart-pointer to your smoothing filter.) Include a comment at the top of threshold.cxx indicating which smoothing filter you used, and why you set its parameters the way you did. You need to do some experimentation (preferably on the file below) to earn full credit. I encourage you to spend some time here, since you will be using this smoothing filter for the rest of the assignment.IM.mha, with the provided seed point, and compare your results with SegIM.mha. Experiment with different values for the upper and lower threshold. You can visualize your resulting segmentations using ITK Snap. Include a comment at the top of thresholdLevelSet.cxx indicating your best choice of upper and lower thresholds, as well as how you derived your answers. In the same comment, rate (on a scale of 1=bad to 10=perfect) how well you think this segmentation worked.Begin by copying Examples/Segmentation/ThresholdSegmentationLevelSetImageFilter.cxx from your InsightToolkit directory to Part2\thresholdLevelSet.cxx. Copy and update your CMakeLists.txt file from Part1 as well; the compiled program should be named thresholdLS. Add and commit your code to SVN.
Now, make the following changes to thresholdLevelSet.cxx, being sure to commit your changes to svn after you complete each step:
SetCurvatureScaling() using ITK's 2D image Examples/Data/BrainProtonDensitySlice256x256.png (this is the image used in the Software Guide example). Take note that you do not need to repeatedly recompile your code to experiment with SetCurvatureScaling(), because thresholdLevelSet.cxx already uses a command-line argument to your executable to read this value.thresholdLevelSet.cxx operate on 3-dimensional images. Be sure to make it read in and use the Z-coordinate of the seed point, and change as necessary all references to argc and argv. I strongly recommend testing to make sure this works before continuing.SetCurvatureScaling(), all of which can already be set using command-line arguments to your executable. You can visualize your result using ITK Snap. Include a comment at the top of thresholdLevelSet.cxx indicating your best choice of upper and lower thresholds and for SetCurvatureScaling(), as well as how you derived your answers. In the same comment, rate (on a scale of 1=bad to 10=perfect) how well you think this segmentation worked.thresholdLevelSet.cxx.Find and use another ITK segmentation algorithm to process the image from the LargeSet subdirectory, using the appropriate (new) seedpoint. I highly recommend using the ITK Software Guide to find example code to use. I also highly recommend starting with the small (64x64x64) volume for initial experimentation, and then only trying things that seem promising on the larger data set. Scoring for this part is as follows:
Since this part is a competition to see who can get the best segmentation, you are on your own. Neither the TA nor myself will help you choose or implement your segmentation algorithm. Feel free to use all other sources of help at your disposal, including internet mailing lists (but please be polite and only ask specific questions on the itk mailing list). Place your well-commented code in Part3\best_segmentation.cxx; include an appropriate CMakeLists.txt file.
Please note that I strongly discourage trying to use really complex segmention methods for this part. On such a large, branching data set they almost certainly will not work. If, contrary to my advice and in the spirit of competition, you feel compelled to try anyway, then I would suggest (1) lots of cafine, and (2) a 2-stage segmentation, where you only use an advanced segmentation method to refine the output of some other simpler and more robust method.