Open fvanzi opened 4 years ago
Hi @fvanzi as you have seen, there are complications with CMTK on windows and unfortunately I do not develop or test there. My previous recommendation was to install CMTK via cygwin but recently people have had success using the Windows Subsystem for Linux (WSL). See https://www.nitrc.org/forum/message.php?msg_id=29012. You would not be able to use this CMTK installation directly with the CMTK GUI, but you could edit the script files produced by CMTK gui to use that.
Hi @fvanzi as you have seen, there are complications with CMTK on windows and unfortunately I do not develop or test there. My previous recommendation was to install CMTK via cygwin but recently people have had success using the Windows Subsystem for Linux (WSL). See https://www.nitrc.org/forum/message.php?msg_id=29012. You would not be able to use this CMTK installation directly with the CMTK GUI, but you could edit the script files produced by CMTK gui to use that.
Hi, thank you so much for your prompt reply! I followed a suggestion (https://www.nitrc.org/forum/message.php?msg_id=29026) proposed in the thread you indicated and I did move forward to running a registration. It seems that most routines ran but I did not get the reformatted images at the end. I am running this on two-photon fluorescence stacks from zebrafish larva brains.
I paste below the shell results I got. Thanks again for all your help!!!
C:\CMTK_Registration\CMTKreg>perl C:\CMTK_Registration\CMTK\bin\munger -b C:\CMTK_Registration\CMTK\bin -a -w -r 010203 -A "--accuracy 0.8" -W "--accuracy 0.8" -s template/StackMIP318.nrrd images hostname = Francesco-HP; short hostname = Francesco-HP JOB ID = Root directory is C:\CMTK_Registration\CMTKreg Changing to root directory: C:\CMTK_Registration\CMTKreg Setting image root to: images Aff:StackMIP319 WARNING: image does not have valid orientation meta information; cannot reorient. WARNING: image does not have valid orientation meta information; cannot reorient. Entering resolution level 1 out of 3... Entering resolution level 1 out of 3... Entering resolution level 2 out of 3... Entering resolution level 2 out of 3... Entering resolution level 3 out of 3... Entering resolution level 3 out of 3... Resulting transformation parameters:
MYEXEC: CMD = C:\CMTK_Registration\CMTK\bin\registration -i -v --dofs 6 --dofs 9 --accuracy 0.8 -o Registration\affine\StackMIP318_StackMIP319_9dof.list template/StackMIP318.nrrd images/StackMIP319.nrrd exited with value 0 MYEXEC: CMD = md "Registration\warp\StackMIP318_StackMIP319_warp_m0g40c4e1e-1x16r3.list" exited with value 0 Warp StackMIP319,Reading input studylist Registration\affine\StackMIP318_StackMIP319_9dof.list WARNING: image does not have valid orientation meta information; cannot reorient. WARNING: image does not have valid orientation meta information; cannot reorient. Entering resolution level 1 out of 2... Setting step size to 12.8 [mm] Deactivated 5919 out of 14040 parameters. Setting step size to 6.4 [mm] Setting step size to 3.2 [mm] Setting step size to 1.6 [mm] Setting step size to 0.8 [mm] Entering resolution level 2 out of 2... Setting step size to 6.4 [mm] Deactivated 39573 out of 81585 parameters. Setting step size to 3.2 [mm] Setting step size to 1.6 [mm] Setting step size to 0.8 [mm] Entering resolution level 2 out of 2... Setting step size to 6.4 [mm] Deactivated 305505 out of 546345 parameters. Setting step size to 3.2 [mm] Setting step size to 1.6 [mm] Setting step size to 0.8 [mm] Entering resolution level 2 out of 2... Setting step size to 6.4 [mm] Deactivated 2512905 out of 3976929 parameters. Setting step size to 3.2 [mm] Setting step size to 1.6 [mm] Setting step size to 0.8 [mm] MYEXEC: CMD = C:\CMTK_Registration\CMTK\bin\warp -v --registration-metric nmi --jacobian-weight 0 --fast -e 16 --grid-spacing 40 --energy-weight 1e-1 --refine 3 --coarsest 4 --ic-weight 0 --output-intermediate --accuracy 0.8 -o Registration\warp\StackMIP318_StackMIP319_warp_m0g40c4e1e-1x16r3.list Registration\affine\StackMIP318_StackMIP319_9dof.list exited with value 0
Ran 0 initial affine registrations of which 0 failed Ran 1 affine registrations of which 0 failed Ran 1 warp registrations Reformatted 0 images
Unfortunately there are strict limitations on the input image filenames. They must end in 01.nrrd e.g. myfile01.nrrd myfile02.nrrd where 01 and 02 would denote different channels of the same image. If you only have one image channel, they must still be called myfile01.nrrd. This specifically affects the reformatting stage. Unfortunately you will probably have to restart the registration from scratch as renaming all of the intermediate files is quite fiddly. Best, Greg.
Hi Greg, thank you!!! With your suggestions I now have it running! Thank you very much for your help!!! Francesco
Hi, I am new to the forum so my apologies if I repeat something from previous posts. I have read all threads but could not find a solution to my problem. On PC, widnows10, I am trying to install CMTK following the instructions in: https://github.com/jefferis/fiji-cmtk-gui
When I select "Install CMTK" in plugins->CMTK Registration I get the following message: console: Failed to install '': java.nio.charset.UnsupportedCharsetException: cp0. [ERROR] Traceback (most recent call last): File "fiji-cmtk-gui-0.1.1/fiji-cmtk-gui-0.1.1/Install_CMTK.py", line 11, in
File "C:\PROGRA~1\FIJI-W~1\Fiji.app\plugins\CMTK_Registration\cmtkgui.py", line 5, in
import subprocess, re, urllib2, tempfile
File "C:\PROGRA~1\FIJI-W~1\Fiji.app\jars\jython-shaded-2.7.1.jar\Lib\subprocess.py", line 799, in
File "C:\PROGRA~1\FIJI-W~1\Fiji.app\jars\jython-shaded-2.7.1.jar\Lib\subprocess.py", line 1399, in Popen
File "C:\PROGRA~1\FIJI-W~1\Fiji.app\jars\jython-shaded-2.7.1.jar\Lib\ctypes__init.py", line 281, in getattr
File "C:\PROGRA~1\FIJI-W~1\Fiji.app\jars\jython-shaded-2.7.1.jar\Lib\ctypes\init.py", line 262, in init__
at org.scijava.jython.shaded.com.kenai.jffi.Foreign.newLoadError(Foreign.java:72)
at org.scijava.jython.shaded.com.kenai.jffi.Foreign.access$300(Foreign.java:42)
at org.scijava.jython.shaded.com.kenai.jffi.Foreign$InValidInstanceHolder.getForeign(Foreign.java:98)
at org.scijava.jython.shaded.com.kenai.jffi.Foreign.getInstance(Foreign.java:103)
at org.scijava.jython.shaded.com.kenai.jffi.Library.openLibrary(Library.java:157)
at org.scijava.jython.shaded.com.kenai.jffi.Library.getCachedInstance(Library.java:131)
at org.python.modules.jffi.DynamicLibrary.(DynamicLibrary.java:26)
at org.python.modules.jffi.jffi.dlopen(jffi.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: org.scijava.jython.shaded.com.kenai.jffi.Foreign.getVersion()I
Caused by: java.lang.UnsatisfiedLinkError: org.scijava.jython.shaded.com.kenai.jffi.Foreign.getVersion()I at org.scijava.jython.shaded.com.kenai.jffi.Foreign.newLoadError(Foreign.java:72) at org.scijava.jython.shaded.com.kenai.jffi.Foreign.access$300(Foreign.java:42) at org.scijava.jython.shaded.com.kenai.jffi.Foreign$InValidInstanceHolder.getForeign(Foreign.java:98) at org.scijava.jython.shaded.com.kenai.jffi.Foreign.getInstance(Foreign.java:103) at org.scijava.jython.shaded.com.kenai.jffi.Library.openLibrary(Library.java:157) at org.scijava.jython.shaded.com.kenai.jffi.Library.getCachedInstance(Library.java:131) at org.python.modules.jffi.DynamicLibrary.(DynamicLibrary.java:26)
at org.python.modules.jffi.jffi.dlopen(jffi.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.python.core.PyReflectedFunction.call(PyReflectedFunction.java:188)
... 84 more
Caused by: java.lang.UnsatisfiedLinkError: org.scijava.jython.shaded.com.kenai.jffi.Foreign.getVersion()I
at org.scijava.jython.shaded.com.kenai.jffi.Foreign.getVersion(Native Method)
at org.scijava.jython.shaded.com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:53)
at org.scijava.jython.shaded.com.kenai.jffi.Foreign$InstanceHolder.(Foreign.java:45)
at org.scijava.jython.shaded.com.kenai.jffi.Foreign.getInstance(Foreign.java:103)
at org.scijava.jython.shaded.com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242)
at org.scijava.jython.shaded.com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237)
at org.scijava.jython.shaded.com.kenai.jffi.Type.resolveSize(Type.java:155)
at org.scijava.jython.shaded.com.kenai.jffi.Type.size(Type.java:138)
at org.scijava.jython.shaded.jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:187)
at org.scijava.jython.shaded.jnr.ffi.provider.AbstractRuntime.(AbstractRuntime.java:48)
at org.scijava.jython.shaded.jnr.ffi.provider.jffi.NativeRuntime.(NativeRuntime.java:66)
at org.scijava.jython.shaded.jnr.ffi.provider.jffi.NativeRuntime.(NativeRuntime.java:41)
at org.scijava.jython.shaded.jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder.(NativeRuntime.java:62)
at org.scijava.jython.shaded.jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:58)
at org.scijava.jython.shaded.jnr.ffi.provider.jffi.Provider.(Provider.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at org.scijava.jython.shaded.jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:68)
at org.scijava.jython.shaded.jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.(FFIProvider.java:57)
at org.scijava.jython.shaded.jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35)
at org.scijava.jython.shaded.jnr.ffi.Library.loadLibrary(Library.java:114)
at org.scijava.jython.shaded.jnr.posix.POSIXFactory$DefaultLibCProvider$SingletonHolder.(POSIXFactory.java:279)
at org.scijava.jython.shaded.jnr.posix.POSIXFactory$DefaultLibCProvider.getLibC(POSIXFactory.java:283)
at org.scijava.jython.shaded.jnr.posix.BaseNativePOSIX.(BaseNativePOSIX.java:37)
at org.scijava.jython.shaded.jnr.posix.WindowsPOSIX.(WindowsPOSIX.java:132)
at org.scijava.jython.shaded.jnr.posix.POSIXFactory.loadWindowsPOSIX(POSIXFactory.java:163)
at org.scijava.jython.shaded.jnr.posix.POSIXFactory.loadNativePOSIX(POSIXFactory.java:136)
at org.scijava.jython.shaded.jnr.posix.POSIXFactory.loadPOSIX(POSIXFactory.java:90)
at org.scijava.jython.shaded.jnr.posix.LazyPOSIX.loadPOSIX(LazyPOSIX.java:38)
at org.scijava.jython.shaded.jnr.posix.LazyPOSIX.posix(LazyPOSIX.java:32)
at org.scijava.jython.shaded.jnr.posix.LazyPOSIX.isNative(LazyPOSIX.java:382)
at org.python.modules.posix.PosixModule.classDictInit(PosixModule.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.python.core.PyJavaType.init(PyJavaType.java:571)
at org.python.core.PyType.createType(PyType.java:1523)
at org.python.core.PyType.addFromClass(PyType.java:1462)
at org.python.core.PyType.fromClass(PyType.java:1551)
at org.python.core.imp.createFromClass(imp.java:469)
at org.python.core.imp.loadBuiltin(imp.java:578)
at org.python.core.imp.find_module(imp.java:534)
at org.python.core.imp.import_next(imp.java:838)
at org.python.core.imp.import_module_level(imp.java:957)
at org.python.core.imp.importName(imp.java:1057)
at org.python.core.ImportFunction.call(builtin.java:1280)
at org.python.core.PyObject.call(PyObject.java:450)
at org.python.core.builtin.import(builtin.java:1232)
at org.python.core.imp.importAll(imp.java:1176)
at os$py.f$0(C:/PROGRA~1/FIJI-W~1/Fiji.app/jars/jython-shaded-2.7.1.jar/Lib/os.py:726)
at os$py.call_function(C:/PROGRA~1/FIJI-W~1/Fiji.app/jars/jython-shaded-2.7.1.jar/Lib/os.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.util.importer.importer_load_module(importer.java:116)
at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:170)
at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.call(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.call(PyBuiltinMethodNarrow.java:46)
at org.python.core.imp.loadFromLoader(imp.java:593)
at org.python.core.imp.find_module(imp.java:547)
at org.python.core.imp.import_next(imp.java:838)
at org.python.core.imp.import_module_level(imp.java:957)
at org.python.core.imp.importName(imp.java:1057)
at org.python.core.ImportFunction.call(builtin.java:1280)
at org.python.core.PyObject.call(PyObject.java:450)
at org.python.core.builtin.import(builtin.java:1232)
at org.python.core.imp.importOne(imp.java:1076)
at site$py.f$0(C:/PROGRA~1/FIJI-W~1/Fiji.app/jars/jython-shaded-2.7.1.jar/Lib/site.py:637)
at site$py.call_function(C:/PROGRA~1/FIJI-W~1/Fiji.app/jars/jython-shaded-2.7.1.jar/Lib/site.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:436)
at org.python.core.util.importer.importer_load_module(importer.java:116)
at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:170)
at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.call(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.call(PyBuiltinMethodNarrow.java:46)
at org.python.core.imp.loadFromLoader(imp.java:593)
at org.python.core.imp.find_module(imp.java:547)
at org.python.core.imp.import_next(imp.java:838)
at org.python.core.imp.import_first(imp.java:863)
at org.python.core.imp.load(imp.java:721)
at org.python.core.Py.importSiteIfSelected(Py.java:1795)
at org.python.util.PythonInterpreter.(PythonInterpreter.java:116)
at org.python.util.PythonInterpreter.threadLocalStateInterpreter(PythonInterpreter.java:81)
at org.python.jsr223.PyScriptEngine.(PyScriptEngine.java:27)
at org.python.jsr223.PyScriptEngineFactory.getScriptEngine(PyScriptEngineFactory.java:85)
at org.scijava.script.AdaptedScriptLanguage.getScriptEngine(AdaptedScriptLanguage.java:140)
at org.scijava.script.ScriptModule.getEngine(ScriptModule.java:108)
at org.scijava.script.ScriptModule.run(ScriptModule.java:129)
... 8 more
I have seen something like this mentioned by others but could not find a solution posted by anyone. Any help will be greatly appreciated! Thanks!! Francesco