[Insight-users] Hello World!

Benjamin King king.benjamin at mh-hannover.de
Fri Dec 3 08:12:16 EST 2004


Hi Satrish,

I'm sorry to hear that getting ITK up and running turns out so difficult. I 
assume that you already followed the instructions in the 'Getting 
Started'-turorial (http://www.itk.org/HTML/Tutorials.htm), so I'll just 
reiterate the necessary steps:


1) CMake must work. I think it does for you, so maybe there is just a 
misunderstanding.
You could download the binaries from here  
http://www.cmake.org/HTML/Download.html and just install them (recommended) 
or build CMake from source (not recommended).
For example, I downloaded the .tar.gz archive with the precompiled binaries 
into the directory /home/king/temp and proceeded as follows:

---- snipp
king at luna temp $ ls
cmake-2.0.5-x86-linux.tar.gz
king at luna temp $ tar xzf cmake-2.0.5-x86-linux.tar.gz
king at luna temp $ ls
cmake-2.0.5-x86-linux-files.tar  cmake-2.0.5-x86-linux.tar.gz  README
king at luna temp $ head README
CMake 2.0.5 binary for x86-linux
Extract the file "cmake-2.0.5-x86-linux-files.tar" into your
destination directory (typically /usr/local).  The following files will
be extracted:
share/CMake/include/cmCPluginAPI.h
share/CMake/Modules/CMakeBackwardCompatibilityC.cmake
share/CMake/Modules/CMakeBackwardCompatibilityCXX.cmake
share/CMake/Modules/CMakeBorlandFindMake.cmake
king at luna temp $ cd /usr/local
king at luna local $ su
Password:
root at luna local # tar xf /home/king/temp/cmake-2.0.5-x86-linux-files.tar
root at luna local # exit
exit
king at luna local $
---- snapp

The 'head' command writes the first few lines of a file and 'su' switches the 
active user to root. You must enter your root password on the prompt to 
proceed.

The 'tar' unpacks all necessary files in the current directory which is 
'/usr/local' in my example session.

When you're finished, 'exit' closes your session as root and returns to your 
previous user.

And that's it, no need for 'make' or 'make install'! You only need these 
commands, when you build something from source code.
To confirm that it works, you can enter 'ccmake --version'.


2) Get ITK to work. You have to compile it and to do this, you have to get the 
source code first. You already did that and stored it 
in /home/Satrish/ITK/InsightTool-1.8.0.
It's recommended that you create a second directory for the compiled (binary) 
version, for example:
 mkdir /home/Satrish/ITK/InsightTool-1.8.0-binary

Then change to that directory:
 cd /home/Satrish/ITK/InsightTool-1.8.0-binary

And from there, call ccmake with the source directory as an argument:
 ccmake  /home/Satrish/ITK/InsightTool-1.8.0

Press 'c' to configure - this does some initial setup based on what's 
available on your system. After that, you can toggle certain aspects of the 
build process, such as whether the examples should be build or not. They are 
build by default, so I'll advise you to just press 'c' again for a final 
configuration step and then 'g' to generate the Makefile. The Makefile tells 
- in a platform dependent way - what the 'make' command has to do to build 
ITK and the examples.

ccmake finishes after creating this file and you can start compiling by 
entering 'make'.

3) Follow Luis' generic advice and drink some coffee or beverage of choice 
while you wait for the compilation to finish.

4) When the compilation finished successfully, you find all the compiled 
examples in the 'bin' subdirectory which you can start from the command line, 
for example like this:
 cd /home/Satrish/ITK/InsightTool-1.8.0-binary/bin
 ./FilteringExamples


I hope this helps and works and everything, but feel free to ask again if you 
experience any problems.


cheers,
  Benjamin

-- 
Benjamin King
Institut für Medizinische Informatik
Medizinische Hochschule Hannover
Tel.: +49  511  532-2663


More information about the Insight-users mailing list