Difference between revisions of "Documentation/Labs/OpenGLFilters"

From Slicer Wiki
Jump to: navigation, search
Line 1: Line 1:
Here we summurize some efforts for enabling image processing (filtering/smoothing) in VTK/Slicer using OpenGL.  
+
Here we summarize some efforts for enabling image processing (filtering/smoothing) in VTK/Slicer using OpenGL.  
  
The reason behind this page is trying to coordinate the variuos projects regarding this subject.
+
The reason behind this page is trying to coordinate the various projects regarding this subject.
  
= Reference =
+
= References =
  
 
* [[Developer_Meetings/20150609]]
 
* [[Developer_Meetings/20150609]]
Line 11: Line 11:
 
* [https://github.com/Kitware/VTK/blob/52d45496877b00852a08a5b9819d109c2fd9bfab/Imaging/General/vtkImageGaussianSmooth.h VTK/Imaging/General/vtkImageGaussianSmooth.h]
 
* [https://github.com/Kitware/VTK/blob/52d45496877b00852a08a5b9819d109c2fd9bfab/Imaging/General/vtkImageGaussianSmooth.h VTK/Imaging/General/vtkImageGaussianSmooth.h]
  
= Meeting =
+
= Meetings =
  
 
==  9th June 2016 ==
 
==  9th June 2016 ==
Attanded by: Davide Punzo, Jean-Christophe Fillion-Robin, Ken Martin.
+
Attended by: Davide Punzo, Jean-Christophe Fillion-Robin, Ken Martin.
  
In order to boost filtering, OpenGL solution seems the best that fits our needs:
+
In order to implement efficient filtering, OpenGL solution seems the best that fits our needs:
* no requirment on external library (CUDA or OpenCL).  
+
* no requirement on external library (CUDA or OpenCL).  
 
* performance boosting is fairly good to allow almost interactive filtering up to volume of ~10^8 voxels.
 
* performance boosting is fairly good to allow almost interactive filtering up to volume of ~10^8 voxels.
  
= Use Case =  
+
=== Use Case ===
based on the Steve Pieper implementation of the classes:
+
 
 +
Based on the Steve Pieper implementation of the classes:
  
 
<pre>
 
<pre>
Line 35: Line 36:
 
</pre>
 
</pre>
  
= Full integration in VTK =
+
=== Full integration in VTK ===
  
For a full integration of the openGLfilters pipeline in VTK, it will be ideally to have a general purpose class:
+
For a full integration of the openGLfilters pipeline in VTK, it will be ideal to have a general purpose class:
  
 
<pre>
 
<pre>
Line 44: Line 45:
  
 
this class will have the duty to:
 
this class will have the duty to:
* hanle the I/O comunication between the vtkImageData and the GPU Texture using fully the VTK shader infrastracure, since the shader infrastructure is already available in VTK (safe binding, automatic versioning, etc... http://www.vtk.org/Wiki/Shader_In_VTK).
+
* handle the I/O communication between the <code>vtkImageData</code> and the GPU Texture using fully the VTK shader infrastructure, since the shader infrastructure is already available in VTK (safe binding, automatic versioning, etc... http://www.vtk.org/Wiki/Shader_In_VTK).
 
* child classes will handle different approach (e.g. multipass/iterative filtering).
 
* child classes will handle different approach (e.g. multipass/iterative filtering).
  
= Action =  
+
=== Next steps ===
 
* Talk with Steve and getting his feedback.
 
* Talk with Steve and getting his feedback.
* Ken will be very happy to contribute writing the base class VTKOpenGLImageAlgorithm (in a couple of weeks after his vacation).
+
* Ken will be very happy to contribute a base class <code>vtkOpenGLImageAlgorithm</code>
 +
** Timeline: in 2-3 weeks after his vacation
 +
** Most likely derived from <code>vtkImageAlgorithm</code>, the class will integrate feature from [https://github.com/Kitware/VTK/blob/master/Rendering/OpenGL/vtkGaussianBlurPass.h VTK/Rendering/OpenGL/vtkGaussianBlurPass.h] to facilitate the use of custom shaders to implement GPU based filters.

Revision as of 19:32, 9 June 2016

Home < Documentation < Labs < OpenGLFilters

Here we summarize some efforts for enabling image processing (filtering/smoothing) in VTK/Slicer using OpenGL.

The reason behind this page is trying to coordinate the various projects regarding this subject.

References

Meetings

9th June 2016

Attended by: Davide Punzo, Jean-Christophe Fillion-Robin, Ken Martin.

In order to implement efficient filtering, OpenGL solution seems the best that fits our needs:

  • no requirement on external library (CUDA or OpenCL).
  • performance boosting is fairly good to allow almost interactive filtering up to volume of ~10^8 voxels.

Use Case

Based on the Steve Pieper implementation of the classes:

vtkOpenGLTextureImage
vtkOpenGLShaderComputation

here an Use case:

https://github.com/Punzo/SlicerAstro/tree/master/Smoothing/Logic
https://www.overleaf.com/read/jbxxsqtctpgv

Full integration in VTK

For a full integration of the openGLfilters pipeline in VTK, it will be ideal to have a general purpose class:

VTKOpenGLImageAlgorithm

this class will have the duty to:

  • handle the I/O communication between the vtkImageData and the GPU Texture using fully the VTK shader infrastructure, since the shader infrastructure is already available in VTK (safe binding, automatic versioning, etc... http://www.vtk.org/Wiki/Shader_In_VTK).
  • child classes will handle different approach (e.g. multipass/iterative filtering).

Next steps

  • Talk with Steve and getting his feedback.
  • Ken will be very happy to contribute a base class vtkOpenGLImageAlgorithm
    • Timeline: in 2-3 weeks after his vacation
    • Most likely derived from vtkImageAlgorithm, the class will integrate feature from VTK/Rendering/OpenGL/vtkGaussianBlurPass.h to facilitate the use of custom shaders to implement GPU based filters.