[Insight-users] Importing itk module generated by WrapITK is slow

Kalle Pahajoki kalpaha at st.jyu.fi
Tue Mar 28 12:29:04 EST 2006


Hi

After unsuccesful attempt at using MinGW, I moved my efforts to get ITK 
and WrapITK built to linux and everything was very painless. I only ran 
into two problems:

1. Enabling WRAP_rgb_unsigned_short in ccmake caused the "import itk" to 
fail, because the symbol NumericTraits<RGBPixel<unsigned short>> (or 
something to that effect) was not found.  Disabling the wrapping fixed 
the issue.

2. import itk from python interpreter takes a lot of time (generally in 
the range from ~120 seconds to ~150 seconds)

The first problem isn't a problem since I don't really need the 
datatype. The delay in loading the library on the other hand is not very 
desirable.

I'm not very well versed in using ITK and was looking forward to testing 
stuff from python. I guess I could do development in a way that the 
library was kept in memory and once I had something working, only wrap 
the classes that the code absolutely needs to keep the load time manageable.

Is there some other way to speed up the loading of the itk module than 
cutting down on stuff it contains?

Oh, in case it matters my GCC version is
gcc version 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)

I'd be happy to describe my setup further if it has anything to do with 
the issue.

Kalle Pahajoki




More information about the Insight-users mailing list