2013 Summer Project Week:SinglePrecisionRegistrationITK
- UIowa: Ali Ghayoor, Hans, Dave
- NLM: Brad Lowekamp
The current registration framework of ITK just can process data using double precision. However, in some cases using 'float' type is enough for the precision of computations.
This feature allows CPU to process more data in its cache in a limited period of time, so it can increase the computations speed. Also, writing outputs to the disk using single precision needs much less memory rather than we save them by values in double precision. Saving the memory space is specially important when our outputs are huge files that need hundreds of giga bytes of memory disk. An example of such outputs is transforms files that contain several deformation fields.
To make ANTS capable to do its computations in single point precision, first, we need improve ITK for this purpose. Currently registration framework of ITK, just can use 'double' precision for its internal computations, so we should add single precision (float Type) as another possible option.
This project will be considered successfully executed when the following deliverables are accepted:
1- A new flag is added to antsRegistration to run it on single precision mode. For now, it can be called "--float".
2- A template parameters of "T", that defines the precision type, is added to all classes needed by antsRegistration if it cannot be extracted inside the class.
3- Currently ITK cannot be used in single precision. Necessary changes should be taken to make ITK be able to do its processing in single precision. (It is defined as a Sub-Task to this ticket).
4- Make sure that the ITK-Standalone is built based on new changes.
5- Build ANTS using the new local version of ITK when float mode is on.
6- Fix all possible compiler errors in ANTS codes or ITK new version codes when ANTS is compiling using the new ITK, and the float mode is on.
7- We can make sure that the ANTS and ITK are now compatible with single precision mode if the build process is done successfully (all compiler and linker errors are fixed).
8- Design a simple experiment to catch the running time errors (you may need to use GDB).
9- If antsRegistration can be run successfully, it is time to start evaluation steps. Evaluate the efficiency of new feature using the following criteria: I) Compare the running time of antsRegistration on the float mode with the case that it is run on double precision mode. Experiments should be run on the same system. II) Compare the precision of registration task between the single and double precision modes. We can run antsRegistration using the "print-similarity-measure-interval" flag that prints out the CC similarity metric measure on iterations intervals.
- ITK is built successfully, and all test pass, and no compiler warnings on Windows, Mac, Linux. Gerrit Review process (BIG THANKS TO BRAD LOWEKAMP!)
- ANTS tool build against this version successfully,
- BRAINSTools built agains this successfully,
- Slicer Built against this successfully
- Small regression in SimpleITK resolved with small patch to SimpleITK Gerrit Fix for SimpleITK
The last patch is sent to gerrit and it is under review.
This work will be delivered to the NA-MIC Kit as an improvement to the underlying ITK library. It provides opportutinity for CLI modules to take advantage of single precision registration and transformations where appropriate to provide potential significant speed increases. At least 1 test case showed 30% speed improvement.