users > error using CMTK Registration GUI
Showing 1-15 of 15 posts
Display:
Results per page:
May 16, 2017  11:05 PM | John Tuthill
error using CMTK Registration GUI
Encountering an error using CMTK Registration GUI to install/run CMTK on Ubuntu 14.04:

MYEXEC: CMD = /home/tuthill/Desktop/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/test_test_01_9dof.list refbrain/test_ref_01.nrrd images/test_01.nrrd exited with value 127
Aff:test_01 /home/tuthill/Desktop/Fiji.app/bin/cmtk/registration: error while loading shared libraries: libdcmdata.so.4: cannot open shared object file: No such file or directory
MYEXEC: CMD = /home/tuthill/Desktop/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/test_test_01_9dof.list refbrain/test_ref_01.nrrd images/test_01.nrrd exited with value 127
Ran 0 initial affine registrations of which 0 failed
Ran 2 affine registrations of which 2 failed
Ran 0 warp registrations
Reformatted 0 images
May 22, 2017  05:05 AM | Torsten Rohlfing
RE: error using CMTK Registration GUI
Hi John - 

Sorry for the delay.

Your problem seems to be that your CMTK binaries were linked against a shared DCMTK (that is, DICOM I/O) library, which does not exist on your system. It may also exist, but in a different (probably more recent) version.

It would also appear that you got CMTK bundled with Fiji, is that correct? If so, this seems to be an issue with the way the Fiji folks are building CMTK. So the ultimate solution for the problem would likely have to come from them.

That said, CMTK is fairly simple to build from source code, assuming you have CMake and a reasonably current C++ compiler installed. If you do build CMTK from source, you can either configure CMTK to build its own version of DCMTK (thus avoiding missing system libraries) or turn off DICOM support altogether. The remaining problem would then be how to configure and install CMTK's binaries into your Fiji installation so they work nicely together. That bit, unfortunately, I can not help with.

Best,
  Torsten
May 22, 2017  06:05 AM | Greg Jefferis
RE: error using CMTK Registration GUI
Thanks, Torsten. The Fiji distribution is just the current Linux build untarred into a folder inside the Fiji app. This used to work fine. Did something change so that a specific absolute path is now required?

Best,

Greg.

May 23, 2017  05:05 AM | Torsten Rohlfing
RE: error using CMTK Registration GUI
Greg -

sometimes a distribution updates a library to an incompatible new version, in which case the version number attached to the file name changes. This could have happened here and would require CMTK to be rebuilt using the new system library versions.

That said, John, I forgot to ask the most basic question first - did this ever work on your system, then stopped, or is this a new system which hasn't had Fiji/CMTK working before?

If it's a new system, the problem could also be that you simply don't have the DCMTK library installed. Since apparently (guess I should know that by know) Fiji is distributed outside the package system, there's no safeguard against missing dependencies.

I am not sure what the exact command is to install DCMTK on Ubuntu, but something like "sudo apt-get install dcmtk" might work.

Best,
  Torsten
May 25, 2017  08:05 PM | Josh Barrios
RE: error using CMTK Registration GUI
Hi Torsten,

I'm having the same error message on a new Ubuntu 16.04 system. Fresh Fiji CMTK install. I tried installing dcmtk using the command you suggested. The install seemed to work, but I am still getting the same error message John mentioned above. You mentioned two other solutions: 1. A fix from the developers making the Fiji CMTK distribution. Who is this and how do I notify them of this issue? 2. building cmtk from source. I am not an experienced Linux user. Is there a step-by-step guide somewhere for how to do this?

Thanks
May 27, 2017  06:05 PM | Torsten Rohlfing
RE: error using CMTK Registration GUI
Hi Josh -

So I guess it's a library incompatibility issue, not a missing dependency.

In that case I would suggest to pursue both the other two options, one to fix your immediate problem, and the other to get it fixed for other users and also for yourself in future installs.

Regarding how to build CMTK - you will need at least the GNU C++ compiler (should always be installed anyway, but just to mention it) and CMake (package name should be "cmake", so install by "sudo apt-get install cmake".

Then, for building, follow these steps:
  • Download the source code into a convenient directory from https://www.nitrc.org/frs/download.php/8...
  • Unpack the archive: tar -xzvf CMTK-3.3.1-Source.tar.gz
  • Make and change into a build directory: mkdir build; cd build
  • Configure CMTK (including optimizations for x86_64 CPUs): cmake -D CMAKE_BUILD_TYPE=Release -D BUILD_TESTING=OFF -D BUILD_CONTRIB=ON -D BUILD_CONTRIB_MUNGER=ON -C ../cmtk-3.1.1/config/gcc-x86_64-sse.cmake ../cmtk-3.3.1
  • Run build: make -j4

If all goes well, you should then find all binaries under bin/; hopefully copying that into your Fiji installation is going to make things work for you.

As for the Fiji folks, I'd probably just post a description of the problem in their forum: http://forum.imagej.net/tags/fiji - that place seems active enough that you should get a response quickly.

Best,
  Torsten
Aug 18, 2017  01:08 AM | John Tuthill
RE: error using CMTK Registration GUI
Had an issue with the build that I couldn't figure out.
Aug 18, 2017  01:08 AM | John Tuthill
RE: error using CMTK Registration GUI
Maybe you can make a suggestion from the error log?
Attachment: CMakeError.log
Aug 18, 2017  05:08 AM | Greg Jefferis
RE: error using CMTK Registration GUI
Not one I've seen before but maybe

https://stackoverflow.com/questions/1975...

Aug 18, 2017  03:08 PM | Torsten Rohlfing
RE: error using CMTK Registration GUI
I don't think ndir.h is the problem. That failed compilation is a test to check whether the file exists. Its failure is expected when the file isn't there.

What do you see on the console when you run cmake? Can you send the program output itself?
Aug 18, 2017  04:08 PM | John Tuthill
RE: error using CMTK Registration GUI
john@tuthill-218-1:~/build$ cmake -D CMAKE_BUILD_TYPE=Release -D BUILD_TESTING=OFF -D BUILD_CONTRIB=ON -D BUILD_CONTRIB_MUNGER=ON -C ../cmtk-3.1.1/config/gcc-x86_64-sse.cmake ../cmtk-3.3.1
loading initial cache file ../cmtk-3.1.1/config/gcc-x86_64-sse.cmake
CMake Error: Error processing file: ../cmtk-3.1.1/config/gcc-x86_64-sse.cmake
-- System is Linux-4.10.0-28-generic
CMake Warning (dev) at CMake/TestQnanhibit.cmake:10 (IF):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like "HAVE_QNANHIBIT_VALUE" will no longer be dereferenced
when the policy is set to NEW. Since the policy is not set the OLD
behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:170 (TEST_QNANHIBIT)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Using system zlib
-- Building bundled mxml due to outdated or broken system mxml (minimum version required is 2.7, version 2.8 is broken; installed version is 0.0)
-- Found system libbz2
-- Could NOT find LZMA (missing: LZMA_LIBRARIES LZMA_INCLUDE_DIRS)
-- Could NOT find DCMTK (missing: DCMTK_config_INCLUDE_DIR DCMTK_ofstd_INCLUDE_DIR DCMTK_ofstd_LIBRARY DCMTK_dcmdata_INCLUDE_DIR DCMTK_dcmdata_LIBRARY DCMTK_dcmimgle_INCLUDE_DIR DCMTK_dcmimgle_LIBRARY)
-- DCMTK library not found - defaulting to bundled version.
-- Building bundled DCMTK library for DICOM support.
CMake Warning (dev) at CMakeLists.txt:697 (EXPORT_LIBRARY_DEPENDENCIES):
Policy CMP0033 is not set: The export_library_dependencies command should
not be called. Run "cmake --help-policy CMP0033" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
See also "/home/john/build/CMakeFiles/CMakeOutput.log".
See also "/home/john/build/CMakeFiles/CMakeError.log".
Aug 18, 2017  04:08 PM | John Tuthill
RE: error using CMTK Registration GUI
An additional note: The relevant libraries (LZMA, DCMTK,etc) are all installed.
Aug 21, 2017  01:08 AM | Torsten Rohlfing
RE: error using CMTK Registration GUI
My suspicion is that this is your problem:

CMake Error: Error processing file: ../cmtk-3.1.1/config/gcc-x86_64-sse.cmake

See what "ls ../cmtk-3.1.1/config/" does in the same directory where you tried to run cmake.

As for the dependencies - if they aren't detected, it could be because you only are missing the "-devel" packages. That is, for "dcmtk", you'd also need "dcmtk-devel". Analogous for lzma etc.
Aug 21, 2017  01:08 AM | Torsten Rohlfing
RE: error using CMTK Registration GUI
Oh, I just noticed what exactly your problem is - I misspelled the config file path.

Try to use

../cmtk-3.3.1/config/gcc-x86_64-sse.cmake

that is, with "3.3.1" instead of "3.1.1." as I originally wrote. Sorry for the confusion.
Aug 21, 2017  05:08 PM | John Tuthill
RE: error using CMTK Registration GUI
That did the trick, thanks.