Assignment 1
Methods In Medical Image Analysis (16-725 : BioE 2630) - Spring 2020

Creative Commons License Introduction Assignment by John Galeotti is licensed under a Creative Commons Attribution 3.0 Unported License.  Permissions beyond the scope of this license may be available by sending email to itk


John Galeotti
Usually meets with students after class

10 points total

Due Date:  Committ your final submission by midnight (~11:59 PM EST) on Friday night, Feb. 7. (An exentsion for this particular assignment will be granted to those joining the class late.)

0. Directory Structure (0 points; helpful hint added Feb 3rd.)

Before you begin, create a new directory for this class to hold your (Simple)ITK and VTK libraries, etc., such as C:\MIMIA\ in a Windows environment or such as ~/MIMIA/ under Linux or OS X (Linux and Mac both recognize ~ as a shortcut for your home directory). You will probably find it convenient to keep all of your downloaded libraries (i.e., ITK, VTK, etc.) in this same MIMIA directory.

WARNING: If your username on your computer is longer than 8 characters, then do NOT put your MIMIA directory inside your standard "Documents" folder. Instead, you are strongly encouraged to put your MIMIA directory either in the top (root) folder of your hard drive (c:\MIMIA on Windows), or else maybe in the top of your user's home directory (i.e., the folder that contains your Documents folder, e.g. c:\Users\{your user name}\MIMIA).

WARNING: Do not include any special characters (such as - $ @ : ; / \ [ ] ( ) { }) in the directory path to your MIMIA folder. For example, do not do something like "Documents/16725 - Med Image Analysis/MIMIA". Such special characters can easily interfere with shell scripts such as those used by CMake.

For the rest of this class, C:\MIMIA\ should be taken to mean whichever directory you created in this step, e.g. if you use a Mac, then when assignments say C:\MIMIA\ then you should presumably use either ~/MIMIA/ or ~/Documents/MIMIA/ instead.

1. Using SVN & Preparing for this Assignment (5 points, apx. 30-45 minutes)

Usage of SVN was discussed in ITK Background Lecture, starting on slide 13. Note, if installing a GUI svn program such as TortiseSVN, then be sure to have it install the command-line svn tools as well. You will be required to submit your code for all remaining assignments using SVN. You should have received your SVN username and password either in class or via email. All of the instructions given here will be for the command line version of SVN. You may want to use a GUI instead (see the above-mentioned lecture slides), but it is up to you to learn the interface of the GUI of your choice.

Begin by confirming access to your SVN module, by listing the current contents of your module (the following {} denote something for you to replace, and the {} characters should not be typed):

svn list -R --verbose --username {Your_SVN_User_Name}{Your_SVN_User_Name}
{Provide your SVN password when prompted.}

Your password should be accepted, and you should not have any connection errors.

Note: If your OS asks you to save your svn password, you may have to enter your computer's login password to do so.

(If you are prompted about the server certificate beloning to insterad of, then please just permanantly accept the certificate. Alternately, you could just always use the svn server's primary name of instead of the shortcut, as follows{Your_SVN_User_Name}.)

Check out your personal SVN repository for this class:

Change to the directory you previously created (e.g. cd c:\MIMIA), and then checkout your module:

svn co --username {Your_SVN_User_Name}{Your_SVN_User_Name}
{SVN will probably remember your password for you, but if not then provide it again when requested.}

You should now have a new directory named C:\MIMIA\{Your_SVN_User_Name}. This directory should contain all of your code for the remainder of this class (but none of your binaries unless specifically instructed otherwise).

Now add a directory to your SVN module to contain this assignment. You must first create the directory locally, then tell SVN to add it to your module, and then commit your changes to the SVN server:

cd c:\MIMIA\{Your_SVN_User_Name}
mkdir hw_Intro
svn add hw_Intro 
svn ci hw_Intro -m "Setting up module for hw_Intro"

This is the general template you must follow to add any new file or directory to your SVN repository. When you change a file that already exists, you only need to run the last line above (the commit line) to update the server's copy of your file. Notice the -m option, followed by a quoted string. SVN requires that every committed change be given a brief description, and this is how to do it. (Warning: If you get strange errors when trying to commit, then make sure you are using the double-quote characters around your commit description.)

Now, to further test and exemplify things, you are going to create a directory for this part of the assignment, add a file containing the one word "Hello", commit the directory + file, change the file by adding the word "World" to the end, and then commit the change:

cd c:\MIMIA\{Your_SVN_User_Name}\hw_Intro
mkdir Part1
echo "Hello"> Part1\file.txt
svn add Part1
svn commit Part1 -m "Initializing Part 1"
echo "World">> Part1\file.txt
svn commit Part1 -m "Fixed file.txt"

In the above, if you prefer you could also use a text editor, such as Windows Notepad, instead of the echo commands. Also, as you may have noticed, running an svn command on a directory runs the command on all of the files and directories it contains. This can be nice...or not. Use with caution.

In the future, the source code for each part of each assignment should be in an appropriately numbered hw...\Part# directory structure, but...

NEVER build C++ source code inside your svn module. For C++ always do an out-of-source build!

Now, create a new svn directory structure for the rest of thi  assignment. Assuming you are currently in the directory c:\MIMIA\{Your_SVN_User_Name}\hw_Intro, this would look like:

mkdir Part2
svn add Part2 
svn ci Part2 -m "Setting up module for Part 2 of Intro hw"

2. Provide basic information about your self as a student in this class (5 points, apx. 15-45 minutes)

Create a text file named bio.txt (plain text, not a Word document). It should be in your Part2 folder, and contain the following information about yourself, each item on its own line.  (Note:  You should probably use a text editor like notepad or TextEdit to create Part2\bio.txt; don't use echo like you did above.)


Part2\photo.jpg:  Copy a head-and-shoulders photo of yourself to Part2\photo.jpg (not required, but requested; please crop to just your head and shoulders, and use jpeg format).

Be sure to use svn to add and commit your final version of bio.txt and photo.jpg.