users > Current CMTK instructions for non-coders?
Showing 1-10 of 10 posts
Display:
Results per page:
Apr 14, 2022  01:04 PM | c_mckellar
Current CMTK instructions for non-coders?
Hi all, I'd like to help non-coders learn how to use CMTK, but it's been a few years since I've used it myself. Is the Fiji CMTK GUI the best way to go? Its instructions at https://github.com/jefferis/fiji-cmtk-gu... rely on Fiji's "update sites", but the latest Fiji doesn't seem to have that type of updater. The instructions' link to the Jefferis Lab Wiki also seems to be down. If there are up-to-date protocols for installation and basic use for non-coders (or at least explicit instructions for people new to command lines), could someone please point me to them? Thank you!
Apr 14, 2022  02:04 PM | Greg Jefferis
Current CMTK instructions for non-coders?


Hi Claire,

I didn’t realise that the update sites no longer work with Fiji. The current Fiji plug-in can work without them but actually I’d suggest that you take a look at:

https://github.com/sandorbx/Parallel-Fij...

Sandor Kovacs is signed up to the list and may have more to add. I need to get our wiki visible again when I’m back. All the best,
Greg.

Apr 15, 2022  05:04 PM | Torsten Rohlfing
RE: Current CMTK instructions for non-coders?
Originally posted by c_mckellar:
Hi all, I'd like to help non-coders learn how to use CMTK, but it's been a few years since I've used it myself. Is the Fiji CMTK GUI the best way to go? Its instructions at https://github.com/jefferis/fiji-cmtk-gu... rely on Fiji's "update sites", but the latest Fiji doesn't seem to have that type of updater. The instructions' link to the Jefferis Lab Wiki also seems to be down. If there are up-to-date protocols for installation and basic use for non-coders (or at least explicit instructions for people new to command lines), could someone please point me to them? Thank you!

FWIW, if you are looking for instructions on how to use the command lines of some essential CMTK tools directly, there is a "User Guide" in the "Documents" section here on NITRC: https://www.nitrc.org/docman/index.php?group_id=212&selected_doc_group_id=710&language_id=1#folder

PDF is attached for convenience.

Best,
  Torsten
Attachment: UserGuideCMTK.pdf
Apr 19, 2022  12:04 AM | c_mckellar
RE: Current CMTK instructions for non-coders?
Thanks, I did glance through that User Guide but I don't think there are any sections in it that would help a non-coder. Here's how explicit I'm trying to make the instructions to align fly brains, below. I haven't been able to find any instructions for the CMTK interface in Fiji, since the link to the flybrain wiki is down. Haven't been able to get CMTK to work from Fiji, myself. Using the "Registration Parameter Preset" of the full brain and changing no other settings, the Log just says "Registration warp failed, Registration affine failed." So I currently only wrote pre-prep instructions:

Here's the type of thing I'm trying to write:
Follow the instructions at:
https://github.com/sandorbx/Parallel-Fij...
(This will require typing a few things into a command line but don't worry if you're not a coder, it will tell you what to do).
For the part that requires Ubuntu, note that it must be installed through the Microsoft Store, which can have problems if not recently updated through Windows Updates. Update, then reboot your computer.
When the instructions refer to the file named "Parallel_Fiji_CMTK_Registration***.ijm", that comes from a collection of files from the green "Code" button at the top of the instructions page. Download the ZIP then extract it, and move the relevant .ijm file for your operating system as outlined in the instructions.
If your confocal stack is not already separated out into different files for different channels, open it in Fiji. Scroll to a slice where you can see the brain.
>Image >Transform >Rotate >Check "Preview" >Change angle until brain is upright
Draw a box around brain but not too tightly
>Image >Crop
>Image >Color >Split channels
Select the nc82 reference channel image
>Save >NRRD >remove the leading characters that Fiji inserts, and give it a name ending in _01
Select the neuron stain image (e.g. GFP)
>Save >NRRD >choose exactly the same name as the reference image, but ending in _02
Check the FlyWire Gateway to see what template brains that site can work with, then download an appropriate one from:
https://www.janelia.org/open-science/jrc...
To run alignment in Fiji: >Plugins >Macros >Parallel Fiji CMTK Registration...
Apr 27, 2022  10:04 AM | Sandor Kovacs
RE: Current CMTK instructions for non-coders?
Hi, Lets just try to run CMTK and the Fiji GUI on your setup first, Probably I should add this to the readme but your problem could be that there is a space or a special character in any of the file paths, if not  can you tell me which operating system you want to use ?

 I think Torsten's guide is very useful when you use it while exploring CMTK in the command line, for example running the "cmtk --help" command, you can add the help options to any command to see what kind of operations and parameters you can use and what is the basic syntax, you can even find some basic explanations there. I encourage you to actually try the examples in the userguide, while reading the help pages, and experimenting with the options. CMTK real challange that it requires some understanding of the underlying image mathematics for effective use, coding is really just typing in the commands following the syntax on the help pages, maybe add some basic logic combining it with bash commands.



Originally posted by c_mckellar:
Thanks, I did glance through that User Guide but I don't think there are any sections in it that would help a non-coder. Here's how explicit I'm trying to make the instructions to align fly brains, below. I haven't been able to find any instructions for the CMTK interface in Fiji, since the link to the flybrain wiki is down. Haven't been able to get CMTK to work from Fiji, myself. Using the "Registration Parameter Preset" of the full brain and changing no other settings, the Log just says "Registration warp failed, Registration affine failed." So I currently only wrote pre-prep instructions:

Here's the type of thing I'm trying to write:
Follow the instructions at:
https://github.com/sandorbx/Parallel-Fij...
(This will require typing a few things into a command line but don't worry if you're not a coder, it will tell you what to do).
For the part that requires Ubuntu, note that it must be installed through the Microsoft Store, which can have problems if not recently updated through Windows Updates. Update, then reboot your computer.
When the instructions refer to the file named "Parallel_Fiji_CMTK_Registration***.ijm", that comes from a collection of files from the green "Code" button at the top of the instructions page. Download the ZIP then extract it, and move the relevant .ijm file for your operating system as outlined in the instructions.
If your confocal stack is not already separated out into different files for different channels, open it in Fiji. Scroll to a slice where you can see the brain.
>Image >Transform >Rotate >Check "Preview" >Change angle until brain is upright
Draw a box around brain but not too tightly
>Image >Crop
>Image >Color >Split channels
Select the nc82 reference channel image
>Save >NRRD >remove the leading characters that Fiji inserts, and give it a name ending in _01
Select the neuron stain image (e.g. GFP)
>Save >NRRD >choose exactly the same name as the reference image, but ending in _02
Check the FlyWire Gateway to see what template brains that site can work with, then download an appropriate one from:
https://www.janelia.org/open-science/jrc...
To run alignment in Fiji: >Plugins >Macros >Parallel Fiji CMTK Registration...
May 5, 2022  12:05 AM | c_mckellar
RE: Current CMTK instructions for non-coders?
Thanks for the reply! I'm using Windows 10. It would be great to have your help; how would we check whether it's just a problem with the file paths?
May 5, 2022  07:05 AM | Sandor Kovacs
RE: Current CMTK instructions for non-coders?
To check the file paths start the macro in Fiji, and take a look at the file paths under the "Input&Output options", if its empty choose the locations with the browse button first. For example for reference image it looks something like this , depending on where is yours   "C:\Users\admin\test_data\refbrain\JRC2018_UNISEX_20xHR.nrrd" , now check if there is any space character there, if yes change the folder or file name using your file explorer to do not contain spaces, then in the macro browse for the file or folder again before you run it. 

If further troubleshooting is needed use this test data

 https://www.dropbox.com/sh/54igm0xxmtlo4ei/AAA7EpGMZcoN_CMs8kG8zI26a?dl=0

-place test_data folder  on one of your internal hard drives directly like "C:\test_data" , use the images and the reference provided to run a registration.

-confirm that CMTK installed, open ubuntu terminal and type the command cmtk --help , after hitting enter you should see the cmtk help page.

- on windows 10 the macro has the limitation that it can just read files on the internal hard drives and not from network or external drive locations

Hope this will help.
May 7, 2022  11:05 PM | c_mckellar
RE: Current CMTK instructions for non-coders?
Thanks very much for your help, the issue was solved by removing spaces from the file paths! For posterity, here are basic instructions compiled for non-coders to install CTMK and align fly brains, with sections from your replies if that's okay:

Follow the instructions at:
https://github.com/sandorbx/Parallel-Fij...
(This will require typing a few things into a command line but don't worry if you're not a coder, it will tell you what to do).
Where it says for Windows, "Start powershell as admin", do the following:
Press Windows+R to open Run, and then type "powershell" in the text box but don't press Okay, press Ctrl+Shift+Enter.
For the part that requires Ubuntu, note that it must be installed through the Microsoft Store, which can have problems if not recently updated through Windows Updates. Then reboot your computer. https://www.microsoft.com/en-us/p/ubuntu...
When the instructions refer to the file named "Parallel_Fiji_CMTK_Registration***.ijm", that comes from a collection of files from the green "Code" button at the top of the instructions page. Download the ZIP then extract it, and move the relevant .ijm file for your operating system as outlined in the instructions.
If your confocal stack is not already separated out into different files for different channels, open it in Fiji. Scroll to a slice where you can see the brain.
>Image >Transform >Rotate >Check "Preview" >Change angle until brain is upright
Draw a box around brain but not too tightly
>Image >Crop
>Image >Color >Split channels
Select the nc82 reference channel image
>Save >NRRD >remove the leading characters that Fiji inserts, and give it a name ending in _01. Make sure there are no white spaces anywhere in the file path or name. On windows 10 the macro has the limitation that it can just read files on the internal hard drives and not from network or external drive locations.
Select the neuron stain image (e.g. GFP)
>Save >NRRD >choose exactly the same name as the reference image, but ending in _02
Check the FlyWire Gateway: https://flywiregateway.pniapps.org/ to see what template brains that site can work with, then download an appropriate one from:
https://www.janelia.org/open-science/jrc...
To run alignment in Fiji: >Plugins >Macros >Parallel Fiji CMTK Registration.
Choose an operation: Affine & warp registration
Registration parameter preset: Full Flybrain
Select desired output directory (no spaces in path names), template brain location & output directory.
Check "Show results list" and check "Reformat channel 01, 02, 03"
In the Log window, scroll to the bottom to see if it's running ("Please wait")
After a period of time (that can take quite a while), the aligned files will appear as stacks in the output directory you selected.
If troubleshooting is needed use this test data:
https://www.dropbox.com/sh/54igm0xxmtlo4...
-Place test_data folder on one of your internal hard drives directly like "C:\test_data" , use the images and the reference provided to run a registration.
-confirm that CMTK installed, open ubuntu terminal and type the command cmtk --help , after hitting enter you should see the cmtk help page.
May 9, 2022  05:05 PM | Sandor Kovacs
RE: Current CMTK instructions for non-coders?
I'm glad that it works now, instructions are looking good. 

Maybe using the skip final resolution option can be useful for home computers, especially with high res samples, the registration quality is not affected negatively usually, and the compute time can be considerably faster.

If this is for teaching material I'm happy to give more feedback on it or offer additional help, just write me an email.
May 9, 2022  10:05 PM | c_mckellar
RE: Current CMTK instructions for non-coders?
Thanks, Sandor! This is indeed for teaching purposes, in that I'm trying to provide resources for fly labs who use our FlyWire platform. I'd be happy to accept any additional input or edits to the instructions! If we do it here, rather than by email, then CMTK forum users will also have your guidance. : )