open source, neuro, learning, collaboration, sound theory, solid results

updated ANTs compile instructions: ITKv4

latest ants binaries are here:   ANTs-Binaries

instructions for linux / osx type installation.   windows works too ( via cmake ) but i dont have specifics.

to compile ants from the source code, you first need: git, cmake and a c++ compiler

then in a terminal, do:

>  git clone git://github.com/stnava/ANTs.git

>  mkdir antsbin

> cd antsbin

>  ccmake ../ANTs

then go into cmake and type “c” and then “g”  then exit back to the
terminal.   then:

>  make -j 4

and wait a while.

to update an existing ANTs install, go to the ANTs directory and type “git pull origin master”

Don’t forget to toggle to advanced and turn off

SuperBuild_ANTS_USE_GIT_PROTOC if behind firewall

Advertisements

14 responses

  1. Don’t forget to toggle to advanced and turn off SuperBuild_ANTS_USE_GIT_PROTOC if behind firewall

    April 14, 2012 at 1:51 am

  2. Arno Klein Notes: it seems there are two missing steps at the end.

    1. to run the scripts, you need to copy the Scripts/* to antsbin/bin/

    2. set the ANTSPATH to point to the antsbin/bin/ directory. e.g. in your profile add:

    ANTSPATH=/home/myname/mycode/antsbin/bin/

    February 2, 2014 at 11:16 pm

  3. N. Khalilieh

    Hi, I keep getting this error right after the “make -j 4” step:

    “CMake Error at /usr/share/cmake-2.8/Modules/FindVTK.cmake:135 (message):
    VTK not found. Set the VTK_DIR cmake cache entry to the /directory
    containing VTKConfig.cmake. This is either the root of the build tree, or
    PREFIX/lib/vtk for an installation. For VTK 4.0, this is the location of
    UseVTK.cmake. This is either the root of the build tree or
    PREFIX/include/vtk for an installation.
    Call Stack (most recent call first):
    Modules/Bridge/VtkGlue/itk-module-init.cmake:4 (find_package)
    CMake/ITKModuleEnablement.cmake:315 (include)
    CMakeLists.txt:283 (include)

    — Configuring incomplete, errors occurred!
    make[2]: *** [ITKv4-prefix/src/ITKv4-stamp/ITKv4-configure] Error 1
    make[1]: *** [CMakeFiles/ITKv4.dir/all] Error 2
    make: *** [all] Error 2 ”

    I tried editing the CMakeCache.txt file where I added the line VTK_DIR under>

    //Build tools that depend on VTK
    USE_VTK:BOOL=OFF

    VTK_DIR:PATH=/h*/s*/s*/bioimagesuite/bioimagesuite3_base64/vtk52/lib/vtk-5.2/

    and replaced /usr/include in
    ZLIB_INCLUDE_DIR:PATH=/usr/include with the same Path mentioned above.

    None of this helped. Does anyone have a suggestion for a solution?
    thanks in advance!

    March 24, 2014 at 6:39 am

    • you might need a clean build – our vtk-related applications now depend on vtk-6. the ants discussion site might be a better place for such questions.

      March 24, 2014 at 8:11 am

      • N. Khalilieh

        Ok, Thanks for the quick reply.

        March 25, 2014 at 12:28 am

  4. hey there – are you sure ccmake is not a typo? should it not be just cmake?

    March 10, 2015 at 6:17 pm

  5. Hello again, I am just noticing that the ANTS build system has no install target. I would like to package ANTs for system-wide installation (on Gentoo) and this would greatly benefit from the software having an install target. Do you have or could you maybe write something like this? I know for a fact that NeuroDebian would also be very happy to have this. If not, could you maybe tell me which files/directories I might want to move to e.g. /opt/ants/ to be able to run ANTs system-wide? Also, would ANTs still work if it had no permission to write to the directory where it is installed?

    June 13, 2015 at 7:57 pm

    • read a little bit about make and you will see how to use it to install software or build packages for install.

      June 14, 2015 at 1:56 am

  6. VIVEK RUHELA

    I am getting the error again and again in the step “make -j4” . Even I also tried “sudo make -j4” but still I get the same following error:

    [ 5%] Performing download step (git clone) for ‘ITKv4’
    Cloning into ‘ITKv4’…
    fatal: unable to connect to itk.org:
    itk.org[0: 66.194.253.19]: errno=Connection refused

    Cloning into ‘ITKv4’…
    fatal: unable to connect to itk.org:
    itk.org[0: 66.194.253.19]: errno=Connection refused

    Cloning into ‘ITKv4’…
    fatal: unable to connect to itk.org:
    itk.org[0: 66.194.253.19]: errno=Connection refused

    — Had to git clone more than once:
    3 times.
    CMake Error at ITKv4-prefix/tmp/ITKv4-gitclone.cmake:40 (message):
    Failed to clone repository: ‘git://itk.org/ITK.git’

    CMakeFiles/ITKv4.dir/build.make:83: recipe for target ‘ITKv4-prefix/src/ITKv4-stamp/ITKv4-download’ failed
    make[2]: *** [ITKv4-prefix/src/ITKv4-stamp/ITKv4-download] Error 1
    CMakeFiles/Makefile2:653: recipe for target ‘CMakeFiles/ITKv4.dir/all’ failed
    make[1]: *** [CMakeFiles/ITKv4.dir/all] Error 2
    Makefile:106: recipe for target ‘all’ failed
    make: *** [all] Error 2

    I don’t know how to solve this problem. Any idea…?

    March 4, 2016 at 7:44 pm

    • set SuperBuild_ANTS_USE_GIT_PROTOCOL to OFF in make

      March 4, 2016 at 8:00 pm

    • set SuperBuild_ANTS_USE_GIT_PROTOCOL to OFF in cmake

      March 4, 2016 at 8:00 pm

  7. VIVEK RUHELA

    vivekruhela@vivekruhela-VPCEB46FG:~/antsbin$ sudo make -j4
    [ 5%] Performing download step (git clone) for ‘ITKv4’
    Cloning into ‘ITKv4’…
    fatal: unable to connect to itk.org:
    itk.org[0: 66.194.253.19]: errno=Connection refused

    Cloning into ‘ITKv4’…
    fatal: unable to connect to itk.org:
    itk.org[0: 66.194.253.19]: errno=Connection refused

    Cloning into ‘ITKv4’…
    fatal: unable to connect to itk.org:
    itk.org[0: 66.194.253.19]: errno=Connection refused

    — Had to git clone more than once:
    3 times.
    CMake Error at ITKv4-prefix/tmp/ITKv4-gitclone.cmake:40 (message):
    Failed to clone repository: ‘git://itk.org/ITK.git’

    CMakeFiles/ITKv4.dir/build.make:83: recipe for target ‘ITKv4-prefix/src/ITKv4-stamp/ITKv4-download’ failed
    make[2]: *** [ITKv4-prefix/src/ITKv4-stamp/ITKv4-download] Error 1
    CMakeFiles/Makefile2:653: recipe for target ‘CMakeFiles/ITKv4.dir/all’ failed
    make[1]: *** [CMakeFiles/ITKv4.dir/all] Error 2
    Makefile:106: recipe for target ‘all’ failed
    make: *** [all] Error 2

    Any idea how to solve this problem..

    March 4, 2016 at 7:46 pm

  8. VIVEK RUHELA

    What should be the minimum configuration of the laptop to run ANTs in a laptop. I have tried two time. I left it for 24 hours after the command “make -j4”, each time my system hangs so I have to troubleshoot the system ( no other way left). I have installed ANTs in ansbin folder and the size of ansbin folder is 519.6 MB (after troubleshooting and restarting). How to check if ANTs is installed completely and working well in my system.

    Thanks.

    March 5, 2016 at 10:51 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s