itksnap Command Line tool on Windows?

671 views
Skip to first unread message

David Wikström

unread,
Apr 25, 2018, 6:53:55 AM4/25/18
to itksnap-users
Hi,


I've installed ITK Snap 3.6.0 from the ITK Snap Downloads page on both Windows and Mac OS.

On MacOS, command line works just fine, but I can't seem to find any command line tools on Windows.

Is this an actual limitation of the Windows version, or am I simply doing something wrong?

/Thanks!

Paul Yushkevich

unread,
Apr 25, 2018, 1:51:57 PM4/25/18
to itksna...@googlegroups.com
The directory containing ITK-SNAP.exe needs to be added to your Windows path. Here is a little article for doing it on different Windows versions:


In your case, the directory will likely be C:\Program Files\ITK-SNAP 3.6\bin

The current "experimental" build of ITK-SNAP (version 3.8-alpha) will offer to do this for you during the installation process.

Paul

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-users+unsubscribe@googlegroups.com.
To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.



--
Paul A. Yushkevich, Ph.D.
Associate Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania

David Wikström

unread,
Apr 25, 2018, 2:35:44 PM4/25/18
to itksnap-users
Thanks Paul!

I know how to reference the full path of the exe, so it seems in the end the issue was simply that the options don't seem to be the same on Mac and Windows. I used -h on the Mac just as a simple test to see if command line was working, but is seems use -help on Windows...

Also kind of quirky that you seem to need to use itk-snap on Windows and itksnap on the Mac, but once you know it, it's obviously not a big deal.

Sarah Blackledge

unread,
Nov 21, 2022, 7:01:28 AM11/21/22
to itksnap-users
Hi,

I have a related issue with itk-snap version 4.0.0. I've installed this version on Windows 10. I can successfully open itk-snap from the command line by typing 'itk-snap' (with the hyphen) as suggested in this thread.

However, I'd like to open a specific itksnap workspace file from the command line. I can open the usage information from the command line by typing 'itksnap-wt' (no hyphen here weirdly enough). See below for an excerpt of the text that pops up in the command prompt:

itksnap_ws : ITK-SNAP Workspace Tool
Usage:
     itksnap_ws [commands]
I/O commands:
    -i <workspace>                               : Read workspace file
...


When I try to run itksnap_ws -i <workspace> from the command line (following the instructions above), I get the following error message:

'itksnap_ws' is not recognized as an internal or external command,
operable program or batch file.


Can anyone help me troubleshoot? Is there some additional exe that I need to download or add to the Windows path?

Many thanks,

Sarah

Paul Yushkevich

unread,
Nov 21, 2022, 7:51:10 AM11/21/22
to itksna...@googlegroups.com
Hi Sarah 

Thank you for reporting this issue. Note that itksnap-wt is a separate workspace management tool. To launch the main program you need to run itksnap. 

However it sounds like that program is not in your path which may be an issue with the windows build of 4.0.0

Thank you!
Paul

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/itksnap-users/33caef56-7f20-478b-9d77-aafc6076af0cn%40googlegroups.com.
--
--
Paul Yushkevich

Sarah Blackledge

unread,
Nov 21, 2022, 3:39:22 PM11/21/22
to itksnap-users
Hi Paul,

Thanks so much for getting back to me. I managed to figure out the problem. I was typing itksnap_ws [commands] (based on the usage information printed to the command prompt after typing itksnap-wt). 

However, I think the usage info contains a typo, as itksnap_ws doesn't exist. I managed to get it to work by typing itksnap-wt [commands]. I had to do quite a bit of trial and error with the right combination of hyphens/underscores/wt/ws, but managed to work it out in the end!

Best wishes,

Sarah

Sarah Blackledge

unread,
Nov 22, 2022, 5:55:54 AM11/22/22
to itksnap-users
Scratch that - I thought I had it working last night, but I really just got the absence of an error message.

In case anyone is interested, the following actually works:

itk-snap -w [commands]

Cheers!

Sarah
Reply all
Reply to author
Forward
0 new messages