feat(tutos): use qml and c++ for tuto 08 and 09
What does this MR do?
New version of the Tutorial 08 and 09 using qml and c++ (without XML configuration).
fwVTKQml:
New library to allow to display a VTK scene in qml
visuVTKQml: New bundle to initialize qml FrameBuffer
uiMedDataQml, uiImageQml, uiReconstructionQml:
New bundles containing service inherited from IQmlService
and the associated qml files.
Closes #2 (closed)
Documentation
How to test it?
Launch Tuto08GenericSceneQml
and Tuto09MesherWithGenericSceneQml
.
Tuto08:
- open an image and use the different editors/sliders
- open a model and a texture
Tuto09:
- open a 3D image mask
- generate a modelSeries
- play with the organ manager editor
Data
For Tuto08, you will need a 3D image, a model with texture coordinates and a texture image.
For Tuto09, you will need a 3D image mask.
You can find some data here For the texture, you can use this mesh: sphere_uv.vtk
Some results
Tuto08:
Tuto09:
Known issues
Snapshot:
The snapshot does not work, it produces a random colored image, as if the image buffer was not initialized:
with qml, the scene is rendered into a frameBuffer, I think that the snapshot adaptor does use this frameBuffer to snapshot the scene.
grabToImage()
.
Texture:
A vtk assert is raised when I load a texture in tuto08.
Assertion failed: (this->Handle), function Bind, file Dev/Builds/pkgs-dev-d/vtk/vtk-prefix/src/vtk/Rendering/OpenGL2/vtkTextureObject.cxx, line 545.
I think that the context of our vtkInternalOpenGLRenderWindow is not correctly given to the vtkTextureObject
in SMaterial.
vtkTextureObject
when using a vtkInternalOpenGLRenderWindow
Depends
-
sight-deps!1 : Qt 5.11 -
!15 (merged) : helper to manage services (AppManager) -
!16 (merged) : basic Qml integration (QmlEditor and QmlEngine)