################################
Projet Majeure - 5IMI @CPELyon
Farineau Camille - Ranc Nicolas
################################
Please read the File "/misc/VirtualEndoscopy.pdf" for more details about the project
Link to the repository of the project: https://github.com/CamFarineau/VirtualEndoscopy
This project is part of our study in CPE Lyon in Image-Modelisation-Computing. The purpose of the project is to create a simple viewer for virtual endoscopy. The goal is to visualize the slices from DICOM files obtained with IRM or CT scans. And then it will reconstruct, with Marching Cubes, a particular isosurface in order to navigate into the 3D model of the patient and detect symptom of tumors etc. You can navigate into the 3D model with the keyboard or a controller.
Don't hesitate to look at the documentation inside the doc folder or to look at the documentation of VTK if you have any question.
This project was done and tested under Linux 16.04 environment.
VTK, QT and OpenGL need to be install
Lastest QT version need to be install.
In deed, VTK 8.1.0 need ressources and algorithms which run only with QT 5.
QT4 is not usable for this project.
https://download.qt.io/official_releases/qt/5.7/5.7.0/
Download : qt-opensource-linux-x64-5.7.0.run
chmod +x qt-opensource-linux-x64-5.2.1.run
./qt-opensource-linux-x64-5.2.1.run
Download : VTK-8.1.0.zip
VTK needs to be build with QT.
According to https://www.vtk.org/Wiki/VTK/Configure_and_Build :
$ cd path/to/vtk
$ mkdir build
$ cd build
$ cmake -DVTK_QT_VERSION:STRING=5 \
-DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt5.7.0-install/5.7.0/gcc_64/bin/qmake \
-DVTK_Group_Qt:BOOL=ON \
-DCMAKE_PREFIX_PATH:PATH=/path/to/qt.5.7.0-install/5.7.0/gcc_64/lib/cmake \
-DBUILD_SHARED_LIBS:BOOL=ON
/path/to/VTK
Please follow this link to install the DualShock 4 Controller for Ubuntu and map the controller to the keyboard: https://github.com/chrippa/ds4drv
An example of the config file (ds4drv.conf) we used for controller mapping is located inside the misc folder.
Important: Open the CMakeLists.txt located as the root of the VirtualEndoscopy folder. Change the 3 "set" command lines with you own location:
$ set(CMAKE_PREFIX_PATH /Path/To/VTK)
$ set(QT_QMAKE_EXECUTABLE /Path/To/qmake) (usually : /usr/lib/x86_64-linux-gnu/qt5/bin/qmake)
$ set(VTK_DIR /Path/To/VTK/Build/)
$ cd /location/of/VirtualEndoscopy/folder
$ mkdir build
$ cd build
$ cmake ..
$ make
$ ./VirtualEndoscopy /location/of/the/Folder/containing/DICOM/Files
!! You need to pass the location of the folder where all your DICOM files of interest are located as the first argument when you execute the program !!
You can download some test files from the Visible Human Project here: https://mri.radiology.uiowa.edu/visible_human_datasets.html
Left click and move : Change window and level
Right click and move : Zoom In and Out
Scroll wheel : Change the slice number
Left click and move : Controls the camera
Right click and move : Zoom In and Out
Place the cursor of the mouse at a desired location on a slice and press "P" : Will set the location of the camera of the 3D Viewer to the current mouse location on the slice
"Z" : Camera moves forward
"S" : Camera moves backward
"Arrow Keys" : Controls the orientation of the camera
Map your favorite controller (for example the DualShock 4 controller from Sony) to the keyboard: Arrows keys on one of the joypad, left mouse button to cross button on the controller etc. and navigate into the 3D viewer naturally with the controller.
Look at the config file inside the misc folder (ds4.conf) for more information how to map correctly the controller.
To look at the documentation open the "index.html" file inside the /doc/html folder.
All the datasets we used come from the Visible Human Project and can be found here: https://mri.radiology.uiowa.edu/visible_human_datasets.html
We looked and inspired from the 3D Slicer implementation of the endoscopy module: https://www.slicer.org/wiki/Documentation/4.8/Modules/Endoscopy
Some parts of the code come from the VTK documentation or VTK examples (details of the part used in the src files).
VTK: https://www.vtk.org/
VTK Examples in C++: https://lorensen.github.io/VTKExamples/site/Cxx/
VTK Marching Cubes: https://www.vtk.org/Wiki/VTK/Examples/Cxx/Modelling/MarchingCubes
VTK Four Pane Viewer: https://github.com/Kitware/VTK/tree/master/Examples/GUI/Qt/FourPaneViewer
https://blog.kitware.com/simple-parallel-computing-with-vtksmptools-2