Biorad Writer plug-in for brain registration with cmtk GUI

46 views
Skip to first unread message

Huayi Wei

unread,
Jan 18, 2017, 6:18:06 PM1/18/17
to nat-user
Hi Gregory,

I'm trying to use the fiji CMTK GUI to register some of my nc-82 stained brains. I was referring to the protocol: http://cshprotocols.cshlp.org/content/2013/4/pdb.prot071738.full . It asks for converting all images into the Biorad format with the Biorad Write plug-in. However, I could no longer find it by googling. Do you have the plug-in available for download somewhere? Or it's no longer necessary to convert the files?

Cheers
Huayi 

Gregory Jefferis

unread,
Jan 19, 2017, 1:54:01 AM1/19/17
to Huayi Wei, nat-user
Dear Huayi Wei,

I am afraid that aspect of the protocol is out of date. We now use the nrrd format exclusively. You can save your images as nrrd with Fiji. The folder organisation and file naming conventions remain the same except that image files should end in nrrd not pic. Note that you may wish to save nrrds in compressed format by holding down the Alt key before choosing the relevant menu item.

Best,

Greg. 

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "nat-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nat-user+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/nat-user.
To view this discussion on the web, visit https://groups.google.com/d/msgid/nat-user/1aeb0373-b4e6-40ed-bccc-d8fe01c46731%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gregory Jefferis

unread,
Jan 19, 2017, 5:15:37 AM1/19/17
to Huayi Wei, nat-user
As an aside the Biorad_Writer plugin source code (which can be compiled and installed via the ImageJ Plugins menu is still available at:


Furthermore the standard version of Fiji comes with this plugin via the VIB protocol plugin


so you can choose do File ... Save as Biorad ... in Fiji.

Best wishes,

Greg. 

On 18 Jan 2017, at 23:18, Huayi Wei <hw1...@nyu.edu> wrote:

--
You received this message because you are subscribed to the Google Groups "nat-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nat-user+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/nat-user.
To view this discussion on the web, visit https://groups.google.com/d/msgid/nat-user/1aeb0373-b4e6-40ed-bccc-d8fe01c46731%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Gregory Jefferis, PhD
Division of Neurobiology
MRC Laboratory of Molecular Biology
Francis Crick Avenue
Cambridge Biomedical Campus
Cambridge, CB2 OQH, UK


Huayi Wei

unread,
Jan 19, 2017, 12:56:08 PM1/19/17
to nat-user, hw1...@nyu.edu
Thanks Greg. I found the new tutorial on CMTK GUI. So I followed it & tried it out on both Windows 10 & Fedora. But I always get this error:

Traceback (most recent call last):
  File "CMTK_Registration/CMTK_Registration_GUI.py", line 211, in <module>
  File "CMTK_Registration/CMTK_Registration_GUI.py", line 211, in <module>
  File "/home/huayi/Programs/Fiji.app/plugins/CMTK_Registration/cmtkgui.py", line 97, in makescript
    os.chmod(filepath,0755)
OSError: [Errno 20000] Unknown error: 20000: u'/home/huayi/Desktop/Nat_test/commands/munger_2017-01-19_12.39.57.sh'

And the file that generated in the 'commands' folder would be a .sh file that wouldn't run either through Cygwin(windows) or fedora terminal. The content as:

#!/bin/sh
# 2017-01-19_12.39.57
cd "/home/huayi/Desktop/Nat_test"
"/home/huayi/Programs/Fiji.app/bin/cmtk/munger" -b "/home/huayi/Programs/Fiji.app/bin/cmtk" -a -w -r 010203  -X 26 -C 8 -G 80 -R 4 -A '--accuracy 0.4' -W '--accuracy 0.4'  -T 2 -s "refbrain/NCD6RLH-rev_raw01.nrrd" images

I can't quite understand what might be wrong.
Huayi

Gregory Jefferis

unread,
Jan 19, 2017, 12:58:44 PM1/19/17
to Huayi Wei, nat-user

On 19 Jan 2017, at 17:56, Huayi Wei <hw1...@nyu.edu> wrote:

> Thanks Greg. I found the new tutorial on CMTK GUI. So I followed it & tried it out on both Windows 10 & Fedora. But I always get this error:
>
> Traceback (most recent call last):
> File "CMTK_Registration/CMTK_Registration_GUI.py", line 211, in <module>
> File "CMTK_Registration/CMTK_Registration_GUI.py", line 211, in <module>
> File "/home/huayi/Programs/Fiji.app/plugins/CMTK_Registration/cmtkgui.py", line 97, in makescript
> os.chmod(filepath,0755)
> OSError: [Errno 20000] Unknown error: 20000: u'/home/huayi/Desktop/Nat_test/commands/munger_2017-01-19_12.39.57.sh'

This is a bug in the jython distributed. It is very annoying but there is nothing I can do about it. That said it can be ignored. I think it relates to making the .sh script executable.

> And the file that generated in the 'commands' folder would be a .sh file that wouldn't run either through Cygwin(windows) or fedora terminal. The content as:
>
> #!/bin/sh
> # 2017-01-19_12.39.57
> cd "/home/huayi/Desktop/Nat_test"
> "/home/huayi/Programs/Fiji.app/bin/cmtk/munger" -b "/home/huayi/Programs/Fiji.app/bin/cmtk" -a -w -r 010203 -X 26 -C 8 -G 80 -R 4 -A '--accuracy 0.4' -W '--accuracy 0.4' -T 2 -s "refbrain/NCD6RLH-rev_raw01.nrrd" images

Why do you say this script does not run? What happens if you run

sh /path/to/my/mungerscript.sh

? Is there an error message?

Best,

Greg.

Huayi Wei

unread,
Jan 19, 2017, 1:10:45 PM1/19/17
to nat-user, hw1...@nyu.edu
Hi Greg,
Here's what I got on Fedora.

sh munger_2017-01-19_12.39.57.sh
munger_2017-01-19_12.39.57.sh: line 4: /home/huayi/Programs/Fiji.app/bin/cmtk/munger: No such file or directory

h

Gregory Jefferis

unread,
Jan 19, 2017, 1:11:58 PM1/19/17
to Huayi Wei, nat-user

On 19 Jan 2017, at 18:10, Huayi Wei <hw1...@nyu.edu> wrote:

> Hi Greg,
> Here's what I got on Fedora.
>
> sh munger_2017-01-19_12.39.57.sh
> munger_2017-01-19_12.39.57.sh: line 4: /home/huayi/Programs/Fiji.app/bin/cmtk/munger: No such file or directory


That means that CMTK is not installed. Did you run the menu item to install it?

best,

Huayi Wei

unread,
Jan 19, 2017, 5:16:51 PM1/19/17
to nat-user, hw1...@nyu.edu
Hi Greg,

So now I have installed. I could see all the files under bin/cmtk. But here's what I got when I run the code, through cygwin on windows:

: No such file or directorysh: line 3: cd: C:\Users\Huayi\Google Drive\Nat_Test
munger_2017-01-19_17.12.38.sh: line 4: C:\Fiji.app\bin\cmtk\munger: command not found

I could see the munger file under the cmtk folder. Maybe this is a problem related to indexing directories? 

huayi

Greg Jefferis

unread,
Jan 23, 2017, 9:48:26 AM1/23/17
to nat-user, hw1...@nyu.edu
Hi Huayi,

Can you send a recursive directory listing of the C:\Fiji.app\bin folder? Or just zip it up and send to me offlist. Best,

Greg.

Gregory Jefferis

unread,
Jan 24, 2017, 12:53:21 PM1/24/17
to Huayi Wei, nat-user
Dear Huayi,

I looked at the contents of the C:\Fiji.app\bin that you sent me off list.

Everything seems to be in the correct place. My impression is that the problem is with the paths. Are you running this script from inside a cygwin shell? Unfortunately I almost never use windows or cygwin so I forget if they will cope with both windows and unix style paths. The paths that are giving errors (lines 3 and 4 of your script) are Windows paths. I think you could try quoting the paths. 

By default cmtk gui writes scripts with double quotes around the paths. I think this may not work for windows paths in the cygwin shell. Do you want to try changing the double quotes to single quotes and seeing if that helps e.g. change:

cd "C:\Users\Huayi\Google Drive\Nat_Test"

to 

cd 'C:\Users\Huayi\Google Drive\Nat_Test'

Best wishes,

Greg.

--
You received this message because you are subscribed to the Google Groups "nat-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nat-user+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/nat-user.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages