Building Slicer behind a firewall

Hi,
I am trying to build Slicer from the source. I have a centos 7.3 VM at home, and instructions things worked out well until the point it ran out of space during the superbuild of ITK.
Right now I am repeating the tasks on my work computer, and I am getting this error at the git svn rebase step:

URL access forbidden for unknown reason: Unable to connect to a repository at URL ‘http://svn.slicer.org/Slicer4/trunk’: Access to ‘http://svn.slicer.org/Slicer4/trunk’ forbidden at /usr/share/perl5/vendor_perl/Git/SVN.pm line 717.

which likely related to the proxy and firewall settings at work (didn’t have the issue at home). Is there an alternative way to do this?

You can skip the svn steps - those are only needed for people with commit access to svn. I’ll update the wiki to clarify.

If you do want to contribute fixes to the Slicer source tree you can do it with you a github pull request.

Thank Steve.

But now I am stuck with this error, which I think is real.
[ 40%] Performing download step (git clone) for 'DCMTK’
Cloning into ‘DCMTK’…
fatal: repository ‘http://git.dcmtk.org/dcmtk/’ not found
Cloning into ‘DCMTK’…
fatal: repository ‘http://git.dcmtk.org/dcmtk/’ not found
Cloning into ‘DCMTK’…
fatal: repository ‘http://git.dcmtk.org/dcmtk/’ not found
– Had to git clone more than once:
3 times.
CMake Error at DCMTK-prefix/tmp/DCMTK-gitclone.cmake:56 (message):
Failed to clone repository: ‘http://git.dcmtk.org/dcmtk

when I type git clone http://git.dcmtk.org/dcmtk on command line I get the same repository not found error.

So, it has something with using http instead of git. At home, where there is no proxy, it worked with git protocol.
At work, where I used the Slicer_USE_GIT_PROTOCOL=OFF, it fails.

Yes, I was just about to suggest that. Looks like git.dcmtk.org only support git protocol and not http.

I don’t use a proxy so I don’t really have a suggestion on that.

There was some error with the DCMTK repository (I had a build failure on my computer because of that, too). It got fixed later. If you still have problems then you may use an unofficial mirror on github, for example: https://github.com/commontk/DCMTK

Let us know so that we can update the fork. Currently the authoritative source for DCMTK is git.dcmtk.org/dcmtk

Thanks Andras, I will try that. I also asked our network folks to open up the git port on the firewall. You never know, they may agree.

I am toggling the USE_ANTS to on via the ccmake, but after configuring it goes to back to off. How can I enable ANTs support for Slicer?

Update Slicer\SuperBuild.cmake: change USE_ANTS:BOOL=OFF to USE_ANTS:BOOL=ON.

That change indeed made ccmake to configure and generate with ANTs on, but when I type make, I get the error
ANTS_SOURCE_DIR=’’ does not exist, and build fails.

From the message it is not clear to me whether it is asking the git repo to clone, or asking for existing local installation of ANTs.

As far as I can tell, SuperBuild.cmake does not contain any entry for ANTs repository.

Probably you have to download Ants and add a CMake variable ANTS_SOURCE_DIR:PATH=…

Thanks Andras.
I was thinking ANTs would become the part of the superbuild and will be downloaded. But it doesn’t matter as I already have the source.
I am not familiar with CMake variable syntax.
Would ANTS_SOURCE_DIR:PATH=/some/path
suffice and do I add this to SuperBuild.cmake?

For initial testing, you can add ANTS_SOURCE_DIR:PATH=/some/path directly into your SuperBuild.cmake (below USE_ANTS:BOOL=ON).

An alternative to using Ants through BrainsFit is to use it directly, similarly how I’ve added Elastix (similar ITK-based registration framework). See https://github.com/lassoan/SlicerElastix for details. The advantage of this approach is that you don’t need to modify anything in the Slicer core to make it work.

Hi Andras,

I have an ANTs specific workflow that I wanted to test within Slicer. I did exactly what you suggested, and this time I got a different error giving the same message ANTs_LIBRARY_DIR. While I can try to enter this to superbuid cmake the same way, am not sure what this should point to, because that’s not a variable I needed to set when I I built ANTs.

Also, on a different note, I tested the scissors tool with limits and works wonderfully. Thank you again!

In that case the easiest is to just write a Python wrapper around your executable - very similar to the Elastix Python wrapper. You don’t need to make Slicer build ANTs for you.