This document is meant to provide a brief overview on what does the registration code do and how to use it. The folder contains several registration utilities developped during my research in mamographic image registration. 1) DISCLAIMER The code has been extensibly tested (by me) but is not in any way guaranteed to be bug-free. I tried to program as clear as possible but in some cases did not succed. You can contact me for any doubts or problems that might arise. I believe that the methods included in the code can be redilly used as "black boxes" and can be modified with some time and patience. 2) SOURCES: ITK: The C++ code provided uses itk libraries. These libraries can be downloaded here: http://itk.org/ITK/resources/software.html To install itk (the libraries are already installed in some of the groups's computers) I recommend this tutorial: http://www.itk.org/CourseWare/Training/GettingStarted-I.pdf Be sure to add the "ITK_USE_OPTIMIZED_REGISTRATION" flag during itk installation. To do this you have to "Press [t] to toggle advanced mode" during itk configuration. Once you have done this itk will ask you to also set the " ITK_USE_REVIEW" flag on (do it!). I have installed itk several times, always under the linux Ubuntu operating system. Mostly the code presented is an adaptation of the examples in the itk users guide (section "Registration"): http://prdownloads.sourceforge.net/itk/ItkSoftwareGuide-2.4.0.pdf?download I have mostly divided the code in the examples in functions that I thought convenient (and there is a lot of improvement to be done concerning modularity), I have also extended some of the examples to include the exact features I needed. Each of these features is meant to be in a separate function. POLYRIGID: For polyrigid registration, we used the code provided in the web cited at this paper: Arsigny, V., Pennec, X., Ayache, N.: Polyrigid and polyaffine transformations: A novel geometrical tool to deal with non-rigid deformations application to the registration of histological slices. Medical Image Analysis 9(6) (December 2005) 507–523 This code is a bit difficult to follow and change and needs deeper insight into itk to modify (for example, to use another distance for optimization). 3) CONTENTS 3.1) C++ code: The following 2D registration methods are included: - Affine registration (file registreAfi.cxx) - Rigid registration (file registreRigid.cxx) - Bsplines registration (file registreFlexible.cxx) - Demons registration (file registreDemons.cxx) - PolyRigid registratino (file registrePoliRigid.cxx ) Also some use of multiresolution is made: - registreFlexibleMultiRes.cxx - registreAfiMultiRes.cxx Finally, some of these methods are used in combination (will be detailed in next point). 3.2) Bash shell scripts for executng registration methods (LINUX ONLY!) These are the scripts that you have to use if you want to use registration methods as "black boxes". These scripts provide a restricted amount of configurability but should be inmediate to use. For example, the "testadorAfi" script is called using, for example ./testadorAfi ~/principal/codi/c++/mamo/arpons/MOCKUPF027140/7.dcm ~/principal/codi/c++/mamo/arpons/MOCKUPF027140/8.dcm ./ 1000 Where the parameters stand for: fixed image = $1 moving image = $2 outputDir = $3 iterations = $4 There is a "metric parameter" where 0 stands for the Root Mean Square distance and 1 stands for the Mattes Mutual Informatino metric. Check the ouptput dir to see what files does registration produce (these include output image, checkerboard and difference images before and after registrationand, for "composite" registration, also all intermediate results). Each script has a line at its beginning with how it should be called (be careful, some of them might be out of date!). The scripts are: - testadorAfi -> Affine registration - testadorRigid -> Rigid registration - testadorFlexible -> Bsplines registration - testadorDemons -> demons registration - testadorPolirigid -> polyrigid registration - testadorAfiMultiRes -> MR affine registration - testadorFlexibletest_Afi_FlexMultiRes -> MR bsplines registration - test_Afi_Flex -> First affine registration then Bsplines registration - test_AfiMR_FlexMR -> First MR affine registration then MR Bsplines registration 3.3) Other bash shell scripts I will provide very little information on these scripts but they might still be worth taking a look at (if you need further details, contact me): - supertestadornou Reads a number of "flags" form command line and launches the testing scripts in the previous section in a certain directory structure (depends heavily on it), also sends progress e-mails (need to configure a mail server client for this). - ordenadorNou Traverses the same structur of directories, stores result files, modifies dicom tags, creates dicom dirs... - canviaTagsDicom Uses the dcmodify function from the dcmtk library to change dicom tags. http://support.dcmtk.org/docs/dcmodify.html - dicomdirmakerintern groups some files in a dicom dir using the dmtk dcmmkdir function. - netejador1 Traverses a certain directory structure and erases certain files (very dependent on my particular application) - sendmail sends e-mails (need to configure a mail server client for this. ************************************************************************************************************************************************************************************* And, that's it for now, I hope you find the code useful, do not hesitate to contact me if you have any doubts. Yago Diez Donoso Computer Vision and Robotics Group http://vicorob.udg.es/ E-mail: yago@eia.udg.es Phone: (int. code) 34 972418013 University of Girona