Installation of Ubuntu + VTK

Sudo apt-get install libvtk5.2 libvtk5-qt4-dev sudo apt-get install libvtk5.2 libvtk5-qt4-dev
Different Ubuntu versions support different versions of VTK, here is Ubuntu 10.04, followed by QT4 support.
 
two
1. Download source code
Address: http://www.vtk.org/VTK/resources/software.html
The version is the latest
2. Unzip
The tar ZXVF… .
A VTK folder is created in the current directory
3. Install OpenGL
apt-get install mesa-common-dev libgl1-mesa-dev
4. Install ccmake
sudo apt-get install cmake-curses-gui
5.cd VTK
6.mkdir VTK-build
7.cd VTK-build
8.ccmake .. /
9. Press C to start the configuration and set VTK_USE_QT to ON. BUILD_SHARED_LIBS is set to ON
10. Press T to enter detailed setup, then locate QT_QMake_Executable, press ENTER to modify, and change QMAKE
The path of the input, for example:/home/zhang/QtSDK/Desktop/Qt/4.8.0/GCC/bin/qmake. Confirm and press Enter to exit the modification.
11. Press C to check the Settings.
12. Confirm by C.
13. Press G to generate makefile and exit CCMAKE automatically
14.make
15.sudo make install.
 
Add (.pro file) to the project
INCLUDEPATH =/usr/local/include/VTK to 5.10
LIBS + = L/usr/local/lib/VTK – 5.10 \
 
5.2
INCLUDEPATH =/usr/include/VTK to 5.2
LIBS += -L/usr/lib \
Select as needed at the end
-lvtkCommon -lvtksys -lQVTK -lvtkViews -lvtkWidgets -lvtkInfovis -lvtkRendering -lvtkGraphics -lvtkImaging -lvtkIO -lvtkFiltering -lvtklibxml2 -lvtkDICOMParser -lvtkpng -lvtkpng -lvtktiff -lvtkzlib -lvtkjpeg -lvtkalglib -lvtkexpat -lvtkverdict -lvtkmetaio -lvtkNetCDF -lvtksqlite -lvtkexoIIc -lvtkftgl -lvtkfreetype -lvtkHybrid
 
Command line compilation
G + + – o Cylinder – O3 – I/usr/include/VTK – 5.2 – L/usr/local/lib – Wno – deprecated – lvtkCommon lvtkDICOMParser – lvtkexoIIc – lvtkFiltering – LVTKFTGL – lvtkGenericFiltering lvtkGraphics — lvtkHybrid -lvtkImaging -lvtkIO -lvtkNetCDF -lvtkRendering -lvtksys -lvtkVolumeRendering -lvtkWidgets Cylinder.cxx
 
 

Read More: