# # # How to obtain the source code # # The code is in the ITK's svn repositories at the following link http://www.na-mic.org/svn/NAMICSandBox/trunk/MultiImageRegistration/ If you dont have access to ITK's svn servers, you can get read access to the repository by simply downloading it according to the instructions in the following Wiki page: http://wiki.na-mic.org/Wiki/index.php/Engineering:SandBox # # # How to compile # # Libraries: ITK: The code was compiled with version 3.0 to obtain ITK libraries go to http://www.itk.org/HTML/Download.htm Compilation using cmake: The source code can be compiled using cmake. After downloading the code go to the folder where the code resides. The current parser in the code does not support folder names with spaces, so locate the folder in path without spaces. Type "ccmake ." in the command line. cmake will generate a makefile for the project. Cmake can be downloaded from http://www.cmake.org/HTML/Download.html. After running "ccmake ." type "make" in command line. This will compile the code and generate the following binaries GroupwiseRegistration - Binary for groupwise registration TransformImage - Transforms an image using a transformation file generated by binaries. CreateImageSetAffine - Applies random affine transforms to the input image and saves the output. Used to create a synthetic dataset for testing he code. CreateImageSetBspline - Applies random bspline transforms to the input image and saves the output. ComputeOutputs - Command line module to visualize registration results in 3D. This module outputs the transformed images, mean and standard deviation images along with central slices. # # # How to run testing # # Default testing makes use of the 3D images available at ITK's repositories. Cmake will ask you about the place of the folder "BrainWeb" Download the files at the link http://public.kitware.com/pub/itk/Data/BrainWeb/BrainPart1.tgz http://public.kitware.com/pub/itk/Data/BrainWeb/BrainPart2.tgz http://public.kitware.com/pub/itk/Data/BrainWeb/BrainPart3.tgz http://public.kitware.com/pub/itk/Data/DTI/Reconstructed/FAImage.tar.gz Extract the images at a folder and provide cmake with the name of the folder. After setting the name of the folder for BrainWeb data type "ctest" at the project folder. This will create synthetic data from the given sample image and will run the registration code. The results are placed under the folder (project folder)/Testing/Temporary # # # How to run the binary "GroupwiseRegistration" # # Type in the command line GroupwiseRegistration filenames.txt parameters.txt "filenames.txt" contains the names of the input files and the path for the output files. See files in folders \Testing\Temporary\ for examples. "parameters.txt" contains the parameters of the groupwise registration. It allows you to select which objective function and transformation model to use. For more information about the use of parameters check example files in folders \Testing\Temporary\. Most parameters have default values so only first few parameters at the beginning of file should be changed. When you run GroupwiseRegistration, it displays a bunch of information to std::cout. You will see output like this Iter number1 number2 number3 number1 denotes total number of iterations done by the program, number2 denotes total number of iterations done in current scale and transformation type number3 shows the value of the objective function.(As we use stochastic subsampling, this value might increase for some iterations) At the end of registration the binary will create a bunch of files and folders in the output folder specified in "filenames.txt" Foldername: Affine: Contains results for affine registration Bspline_Grid_#: Contains results for B-Spline registration with # denoting number of control points # # # About the implementation # # All metrics are implementing in a multi-threaded fashion. The algorithm will run faster on computers with multiple CPU's.