Depending on what you have/have not installed you might need to install many other dependencies here.
sudo apt-get install libpng12-dev libtiff4-dev
Download source from: https://sourceforge.net/projects/itk/postdownload?source=dlp
tar xzvf InsightToolkit-4.13.0.tar.gz
mv InsightToolkit-4.13.0/ ITK/
cd ITK
mkdir build
cd build
cmake -DBUILD_DOXYGEN=OFF -DBUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_BACKWARDS_COMPATIBILITY=2.4 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_DOXYGEN=OFF -DITK_USE_KWSTYLE=OFF -DITK_BUILD_ALL_MODULES=ON -DModule_ITKVtkGlue=ON ..
sudo make -j6 sudo make install
git clone git://vtk.org/VTK.git VTK
cd VTK
mkdir build
sudo chmod +x qt-unified-linux-x64-3.0.1-online.run
./qt-unified-linux-x64-3.0.1-online.run
cmake -DVTK_QT_VERSION:STRING=5 -DQT_QMAKE_EXECUTABLE:PATH=/pathtoqt/5.7/gcc_64/bin/qmake -DVTK_Group_Qt:BOOL=ON -DCMAKE_PREFIX_PATH:PATH=/pathtoqt/5.7/gcc_64/lib/cmake -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release ..
make -j6
sudo make install