[Insight-developers] Using ITK with DCMTK

Bradley Lowekamp blowekamp at mail.nih.gov
Thu Nov 29 09:29:47 EST 2012


Hello,

I have narrowed down SimpleITK's issue[1] with building against that latest ITK with DCMTK to the following. After "find_package(ITK REQUIRED)" the following is defined:

ITK_LIBRARY_DIRS: 
ITK_INCLUDE_DIRS: /home/blowekamp/build/SimpleITK/ITK-prefix/include/ITK-4.3

But the libraries used on the command line are the following:

 -ldcmdata -ldcmimage -ldcmimgle -ldcmjpeg -ldcmjpls -ldcmnet -ldcmpstat -ldcmqrdb -ldcmsr -ldcmtls -lijg12 -lijg16 -lijg8 -loflog -lofstd 

Hence they are not found.

That is they are relative, not absolute like the other ITK libraries. So some how these either need to be changed to be absolute or the ITK_LIBRARIES_DIRS, needs to be updated to include the installed path.

Please note that SimpleITK is a little weird on how it uses ITK. It does not right away "include ( ${ITK_USE_FILE} )". And when the project is installed an includes it also does not include the ITK use file, it only export the LIBRARY_DIR path. This is because when you use SimpleITK from the C++ interface is does not expose any ITK headers, so it nicely encapsulated.

Thanks,
Brad

[1] http://open.cdash.org/viewBuildError.php?buildid=2688206



More information about the Insight-developers mailing list