Elastix compile on Linux

68 views
Skip to first unread message

Zhehao Zhang

unread,
Jan 27, 2022, 12:49:11 PM1/27/22
to elastix-imageregistration
Dear all,

I'm compiling Elastix with CMake on Linux. I have first successfully compile ITK-5.1.1 with option:
ITK_USE_64BITS_IDS = ON
ITK_LEGACY_REMOVE=ON
ITK_WRAP_PYTHON = ON
Module_ITKReview = ON
Module_RTK = ON
RTK_USE_CUDA = ON.

Then I try to compile Elastix with option:
CMAKE_BUILD_TYPE = Release
ELASTIX_USE_OPENCL = OFF

However, I got following error after I call make order:
[ 70%] Linking CXX executable ../bin/elastix
/usr/bin/ld: cannot find -lITKCudaCommon
collect2: error: ld returned 1 exit status
make[2]: *** [Core/CMakeFiles/elastix_exe.dir/build.make:405: bin/elastix] Error 1
make[1]: *** [CMakeFiles/Makefile2:4615: Core/CMakeFiles/elastix_exe.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

I have GPU on my server and cuda/11.0 is installed. I am wondering is there some conflicts between my ITK/RTK compile and Elastix compile? 

If someone knows what's happening here,  could you please give me some ideas to solve this problem? Appreciate for any help.

Best,
Zhehao

m.st...@lumc.nl

unread,
Jan 27, 2022, 2:06:10 PM1/27/22
to elastix-imag...@googlegroups.com

Dear Zhehao,


Could you try with an itk version with

Module_RTK = OFF
RTK_USE_CUDA = OFF
and I believe he ITKReview module is also not needed for elastix.

Best, Marius



From: elastix-imag...@googlegroups.com <elastix-imag...@googlegroups.com> on behalf of Zhehao Zhang <zhehao.z...@gmail.com>
Sent: 27 January 2022 6:49 PM
To: elastix-imageregistration
Subject: [elastix-imageregistration] Elastix compile on Linux
 
--
You received this message because you are subscribed to the Google Groups "elastix-imageregistration" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elastix-imageregis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elastix-imageregistration/383a4806-3fb5-4827-bf5f-0969e3d8df4an%40googlegroups.com.

Zhehao Zhang

unread,
Jan 28, 2022, 1:00:29 PM1/28/22
to elastix-imageregistration
Hi Marius,

Thanks for your reply. After I compiled with another ITK version with 
Module_RTK = OFF
RTK_USE_CUDA = OFF
ITK_WRAP_PYTHON = OFF,
Elastix can also be successfully compiled.

So this seems a resonable way for me to keep two different ITK versions.

But if you know how to use only one ITK compile (with RTK, RTK-Cuda and Python Wrapping) to compile Elastix, I would love to also have a try.

Best,
Zhehao

Reply all
Reply to author
Forward
0 new messages