[Insight-users] How to reduce the compilation time

Ariel Hernán Curiale curiale at gmail.com
Sun Mar 10 17:31:08 EDT 2013


Hi,

I'm looking for some tips about how can I reduce the compilation time. I created some libraries Metric1.a, Metric2.a, Metric3.a, BlockMatching.a and MyRegistration.a to compile just the modified code and not all of it.

In my code, I use this main class:

#include <itkSymmetricForcesDemonsRegistrationFilter.h>
#include <itkMultiResolutionPDEDeformableRegistration.h>
#include <itkBSplineInterpolateImageFunction.h>
#include <itkMultiResolutionImageRegistrationMethod.h>
#include <itkMultiResolutionPyramidImageFilter.h>
#include <itkBSplineTransform.h>
#include <itkRegularStepGradientDescentOptimizer.h>
#include <itkLBFGSBOptimizer.h>
#include <itkConjugateGradientOptimizer.h>
#include <itkLinearInterpolateImageFunction.h>
#include <itkInterpolateImageFunction.h>
#include <itkResampleImageFilter.h>
#include <itkRecursiveMultiResolutionPyramidImageFilter.h>
#include <itkCovariantVector.h>
#include <itkMeanSquaresImageToImageMetric.h>
#include <itkBinaryDilateImageFilter.h>
#include <itkResampleImageFilter.h>
#include <itkExtractImageFilter.h>
#include <itkWarpImageFilter.h>
#include <itkMultiResolutionPDEDeformableRegistration.h>
#include <itkRescaleIntensityImageFilter.h>
#include <itkBinaryThresholdImageFilter.h>
#include <itkImageRandomConstIteratorWithIndex.h>

Also, I work with different types of pixels in 2D, 3D and 4D:
unsigned char
char
unsigned short
short
unsigned int
int
unsigned long
long
float
double


The main problem is that the code takes too much time to compile (I use itk-4.3,  vtk-5.10 and gcc 4.2). If anyone could give me some tips about how can I reduce the compiling time it would be really useful.

In the CMakeList.txt I link the libraries and the main code with ${ITK_LIBRARIES} (I couldn't find the ITKRegistrationCommon library to use just this library).

Regards,
__________________________________
| Ariel Hernán Curiale Ph.D Student
| ETSI Telecomunicación
| Universidad de Valladolid
| Campus Miguel Delibes
| 47011 Valladolid, Spain
| Phone: 983-423000 ext. 5590
| Web: www.curiale.com.ar
|_________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130310/e155e4e9/attachment.htm>


More information about the Insight-users mailing list