jefferis / fiji-cmtk-gui

Simple GUI frontend for CMTK image registration tools in Fiji/ImageJ
12 stars 4 forks source link

CMTK gui does not install CMTK - Fedora #14

Open MarcusS90 opened 8 years ago

MarcusS90 commented 8 years ago

Hi, i'm trying to run your plugin on Fedora. Do you know someone who made it run on a linux-distribution? So, here is my problem: I downloaded a fresh Fiji, did all the updates, then updated Jython by adding IMCF Basel to update sites, then i added CMTK-Registration to the update sites and to that point, everything is fine. Clicking on install CMTK starts a selection window as it should, download starts but after that, nothing is in the folder Fiji.app/bin/cmtk. Console messages during installation are:

/home/marcus/Fiji.app/bin/cmtk Downloading CMTK-3.3.1-Linux-x86_64.tar.gz from url http://www.nitrc.org/frs/download.php/8201/CMTK-3.3.1-Linux-x86_64.tar.gz/?i_agree=1&download_now=1 to /home/marcus/Fiji.app/bin/cmtk Downloading http://www.nitrc.org/frs/download.php/8201/CMTK-3.3.1-Linux-x86_64.tar.gz/?i_agree=1&download_now=1 to /tmp/tmpIiOadpCMTK-3.3.1-Linux-x86_64.tar.gz Download size should be 56756200 Downloaded file has size 56756200 Cleaning up!

But thats all, so when i try to run a script, the munger-file and nothing of CMTK-installation is present in the Fiji.app folder or elsewhere.

So maybe a manual install of CMTK is the best solution, but I am confused of how this must be done exactly as the subfolders required seem to be different to your plugin requirements.

Edit: started Fiji from terminal with sudo and then this message shows up when I try to install CMTK:

/home/marcus/Fiji.app/bin/cmtk Downloading CMTK-3.2.3-Linux-x86_64.tar.gz from url http://www.nitrc.org/frs/download.php/7358/CMTK-3.2.3-Linux-x86_64.tar.gz/?i_agree=1&download_now=1 to /home/marcus/Fiji.app/bin/cmtk Downloading http://www.nitrc.org/frs/download.php/7358/CMTK-3.2.3-Linux-x86_64.tar.gz/?i_agree=1&download_now=1 to /tmp/tmpQZh_J5CMTK-3.2.3-Linux-x86_64.tar.gz Download size should be 54474636 Downloaded file has size 54474636 Traceback (most recent call last): File "/home/marcus/Fiji.app/plugins/CMTK_Registration/Install_CMTK.py", line 81, in <module> cmtkgui.download_and_untar_url(download_url,cmtkgui.install_dir(),untar_binaries,download_file) File "__pyclasspath__/cmtkgui$py.class", line 368, in download_and_untar_url File "/home/marcus/Fiji.app/plugins/CMTK_Registration/Install_CMTK.py", line 42, in untar_binaries tar.extractall(path=td,members=bin_files(tar)) File "/home/marcus/Fiji.app/jars/jython-shaded-2.7-b1.jar/Lib/tarfile.py", line 2048, in extractall File "/home/marcus/Fiji.app/jars/jython-shaded-2.7-b1.jar/Lib/tarfile.py", line 2085, in extract File "/home/marcus/Fiji.app/jars/jython-shaded-2.7-b1.jar/Lib/tarfile.py", line 2085, in extract File "/home/marcus/Fiji.app/jars/jython-shaded-2.7-b1.jar/Lib/tarfile.py", line 2175, in _extract_member File "/home/marcus/Fiji.app/jars/jython-shaded-2.7-b1.jar/Lib/tarfile.py", line 2263, in chown File "/home/marcus/Fiji.app/jars/jython-shaded-2.7-b1.jar/Lib/tarfile.py", line 2263, in chown File "/home/marcus/Fiji.app/jars/jython-shaded-2.7-b1.jar/Lib/grp.py", line 67, in getgrnam NotImplementedError: getgrnam unimplemented

Best, Marcus

jefferis commented 8 years ago

Hmm. There seems to be some kind of scoping issue with a python import, likely as a result of an update of the jython bundled with Fiji. Recent Fiji on mac gives an AttributeError for cmtkgui.log. Do you see this? I have an old version of Fiji and the current code runs fine.

I will look into this, but a workaround is to put all the cmtk executables (including the munger script) into

bin/cmtk

directory of Fiji.

Best, Greg.

jefferis commented 8 years ago

Try editing the start of cmtkgui.py so it looks like:

'''
cmtkgui module containing helper functions for Fiji CMTK GUI
'''
import os, sys, time, csv
import subprocess, re, urllib2, tempfile
import platform
import cmtkgui

i.e. adding the line import cmtkgui

Then delete cmtkgui$py.class, restart Fiji and see if it you can complete the install. Best,

Greg.

MarcusS90 commented 8 years ago

I tried both: your first option seems to work (they are 93files in total, right?), but now I am running into some new trouble: `Root directory is /home/marcus/sampleregister Changing to root directory: /home/marcus/sampleregister Setting image root to: images MYEXEC: CMD = mkdir -p Registration/affine/FCWB_TNB9RGH14raw01_9dof.list exited with value 0 Aff:TNB9RGH14raw01 /home/marcus/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/marcus/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/FCWB_TNB9RGH14raw01_9dof.list refbrain/FCWB.nrrd images/TNB9RGH14raw01.nrrd exited with value 127 Aff:TNB9RGH14raw01 /home/marcus/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/marcus/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/FCWB_TNB9RGH14raw01_9dof.list refbrain/FCWB.nrrd images/TNB9RGH14raw01.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 ` seems to be now a linux and library problem on its own.

your second idea, including 'import cmtkgui' did not help installing the cmtk-files So this still does not work.

fredlobster commented 7 years ago

Encountering this same error running 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

jadeyslau commented 7 years ago

Having the same issue on Ubuntu 16.04 LTS:

jade@samwise:~/Documents/regfolder$ ./commands/munger_2017-05-16_11.35.56.sh 
hostname = samwise; short hostname = samwise
User path is /home/jade/bin:/home/jade/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
Reference brain is refbrain/refbrain.nrrd
Reference brain stem is refbrain
JOB ID = 
Start time is: 1494931020 seconds
Root directory is /home/jade/Documents/regfolder
Changing to root directory: /home/jade/Documents/regfolder
Setting image root to: images
Found brain name F3_ 01 (images/F3_01.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
MYEXEC:  CMD = mkdir -p Registration/affine/refbrain_F3_01_9dof.list exited with value 0
A: Running affine reg with command: /home/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F3_01_9dof.list refbrain/refbrain.nrrd images/F3_01.nrrd
/home/jade/Downloads/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/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F3_01_9dof.list refbrain/refbrain.nrrd images/F3_01.nrrd exited with value 127
inlist = Registration/affine/refbrain_F3_01_9dof.list
W: outlist = Registration/warp/refbrain_F3_01_warp_m0g80c8e1e-1x26r4.list
Reformat:inlist would be: Registration/warp/refbrain_F3_01_warp_m0g80c8e1e-1x26r4.list
Found brain name F4_ 01 (images/F4_01.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
MYEXEC:  CMD = mkdir -p Registration/affine/refbrain_F4_01_9dof.list exited with value 0
A: Running affine reg with command: /home/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F4_01_9dof.list refbrain/refbrain.nrrd images/F4_01.nrrd
/home/jade/Downloads/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/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F4_01_9dof.list refbrain/refbrain.nrrd images/F4_01.nrrd exited with value 127
inlist = Registration/affine/refbrain_F4_01_9dof.list
W: outlist = Registration/warp/refbrain_F4_01_warp_m0g80c8e1e-1x26r4.list
Reformat:inlist would be: Registration/warp/refbrain_F4_01_warp_m0g80c8e1e-1x26r4.list
Found brain name F2_ 01 (images/F2_01.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
MYEXEC:  CMD = mkdir -p Registration/affine/refbrain_F2_01_9dof.list exited with value 0
A: Running affine reg with command: /home/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F2_01_9dof.list refbrain/refbrain.nrrd images/F2_01.nrrd
/home/jade/Downloads/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/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F2_01_9dof.list refbrain/refbrain.nrrd images/F2_01.nrrd exited with value 127
inlist = Registration/affine/refbrain_F2_01_9dof.list
W: outlist = Registration/warp/refbrain_F2_01_warp_m0g80c8e1e-1x26r4.list
Reformat:inlist would be: Registration/warp/refbrain_F2_01_warp_m0g80c8e1e-1x26r4.list
Found brain name F1_ 02 (images/F1_02.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
Reformat:inlist would be: Registration/warp/refbrain_F1_01_warp_m0g80c8e1e-1x26r4.list
Found brain name F3_ 02 (images/F3_02.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
Reformat:inlist would be: Registration/warp/refbrain_F3_01_warp_m0g80c8e1e-1x26r4.list
Found brain name F4_ 02 (images/F4_02.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
Reformat:inlist would be: Registration/warp/refbrain_F4_01_warp_m0g80c8e1e-1x26r4.list
Found brain name F1_ 01 (images/F1_01.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
MYEXEC:  CMD = mkdir -p Registration/affine/refbrain_F1_01_9dof.list exited with value 0
A: Running affine reg with command: /home/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F1_01_9dof.list refbrain/refbrain.nrrd images/F1_01.nrrd
/home/jade/Downloads/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/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F1_01_9dof.list refbrain/refbrain.nrrd images/F1_01.nrrd exited with value 127
inlist = Registration/affine/refbrain_F1_01_9dof.list
W: outlist = Registration/warp/refbrain_F1_01_warp_m0g80c8e1e-1x26r4.list
Reformat:inlist would be: Registration/warp/refbrain_F1_01_warp_m0g80c8e1e-1x26r4.list
Found brain name F2_ 02 (images/F2_02.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
Reformat:inlist would be: Registration/warp/refbrain_F2_01_warp_m0g80c8e1e-1x26r4.list
-------------------------
Rescanning images directory a second time
-------------------------
Found brain name F3_ 01 (images/F3_01.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
A: Running affine reg with command: /home/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F3_01_9dof.list refbrain/refbrain.nrrd images/F3_01.nrrd
/home/jade/Downloads/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/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F3_01_9dof.list refbrain/refbrain.nrrd images/F3_01.nrrd exited with value 127
inlist = Registration/affine/refbrain_F3_01_9dof.list
W: outlist = Registration/warp/refbrain_F3_01_warp_m0g80c8e1e-1x26r4.list
Reformat:inlist would be: Registration/warp/refbrain_F3_01_warp_m0g80c8e1e-1x26r4.list
Found brain name F4_ 01 (images/F4_01.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
A: Running affine reg with command: /home/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F4_01_9dof.list refbrain/refbrain.nrrd images/F4_01.nrrd
/home/jade/Downloads/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/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F4_01_9dof.list refbrain/refbrain.nrrd images/F4_01.nrrd exited with value 127
inlist = Registration/affine/refbrain_F4_01_9dof.list
W: outlist = Registration/warp/refbrain_F4_01_warp_m0g80c8e1e-1x26r4.list
Reformat:inlist would be: Registration/warp/refbrain_F4_01_warp_m0g80c8e1e-1x26r4.list
Found brain name F2_ 01 (images/F2_01.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
A: Running affine reg with command: /home/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F2_01_9dof.list refbrain/refbrain.nrrd images/F2_01.nrrd
/home/jade/Downloads/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/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F2_01_9dof.list refbrain/refbrain.nrrd images/F2_01.nrrd exited with value 127
inlist = Registration/affine/refbrain_F2_01_9dof.list
W: outlist = Registration/warp/refbrain_F2_01_warp_m0g80c8e1e-1x26r4.list
Reformat:inlist would be: Registration/warp/refbrain_F2_01_warp_m0g80c8e1e-1x26r4.list
Found brain name F1_ 02 (images/F1_02.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
Reformat:inlist would be: Registration/warp/refbrain_F1_01_warp_m0g80c8e1e-1x26r4.list
Found brain name F3_ 02 (images/F3_02.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
Reformat:inlist would be: Registration/warp/refbrain_F3_01_warp_m0g80c8e1e-1x26r4.list
Found brain name F4_ 02 (images/F4_02.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
Reformat:inlist would be: Registration/warp/refbrain_F4_01_warp_m0g80c8e1e-1x26r4.list
Found brain name F1_ 01 (images/F1_01.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
A: Running affine reg with command: /home/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F1_01_9dof.list refbrain/refbrain.nrrd images/F1_01.nrrd
/home/jade/Downloads/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/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F1_01_9dof.list refbrain/refbrain.nrrd images/F1_01.nrrd exited with value 127
inlist = Registration/affine/refbrain_F1_01_9dof.list
W: outlist = Registration/warp/refbrain_F1_01_warp_m0g80c8e1e-1x26r4.list
Reformat:inlist would be: Registration/warp/refbrain_F1_01_warp_m0g80c8e1e-1x26r4.list
Found brain name F2_ 02 (images/F2_02.nrrd)
New working directory is: /home/jade/Documents/regfolder, Old one was /home/jade/Documents/regfolder/images 
Reformat:inlist would be: Registration/warp/refbrain_F2_01_warp_m0g80c8e1e-1x26r4.list

Ran 0 initial affine registrations of which 0 failed
Ran 8 affine registrations of which 8 failed

Ran 0 warp registrations
Reformatted 0 images
jefferis commented 7 years ago

Hi @fredlobster I'm sorry missed your report earlier.

@jadeyslau and @fredlobster could you take this error to the NITRC mailing list.

https://www.nitrc.org/projects/cmtk/

A: Running affine reg with command: /home/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F4_01_9dof.list refbrain/refbrain.nrrd images/F4_01.nrrd /home/jade/Downloads/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/jade/Downloads/Fiji.app/bin/cmtk/registration -i -v --dofs 6 --dofs 9 --accuracy 0.4 -o Registration/affine/refbrain_F4_01_9dof.list refbrain/refbrain.nrrd images/F4_01.nrrd exited with value 127 inlist = Registration/affine/refbrain_F4_01_9dof.list

I think there may be a problem with the install of the latest linux version. I can't remember if the CMTK GUI confirms which file it is trying to install when it does the install. It should be something like CMTK-3.3.1-Linux-x86_64.tar.gz.