VTK
vtkSobelGradientMagnitudePass.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSobelGradientMagnitudePass.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
59 #ifndef vtkSobelGradientMagnitudePass_h
60 #define vtkSobelGradientMagnitudePass_h
61 
62 #include "vtkRenderingOpenGL2Module.h" // For export macro
63 #include "vtkImageProcessingPass.h"
64 
66 class vtkDepthPeelingPassLayerList; // Pimpl
68 class vtkTextureObject;
69 namespace vtkgl
70 {
71 class CellBO;
72 }
73 
74 
75 class VTKRENDERINGOPENGL2_EXPORT vtkSobelGradientMagnitudePass : public vtkImageProcessingPass
76 {
77 public:
78  static vtkSobelGradientMagnitudePass *New();
80  void PrintSelf(ostream& os, vtkIndent indent);
81 
82  //BTX
84 
86  virtual void Render(const vtkRenderState *s);
87  //ETX
89 
92  void ReleaseGraphicsResources(vtkWindow *w);
93 
94  protected:
97 
100 
102 
103  vtkFrameBufferObject *FrameBufferObject;
104  vtkTextureObject *Pass1; // render target for the scene
105  vtkTextureObject *Gx1; // render target 0 for the first shader
106  vtkTextureObject *Gy1; // render target 1 for the first shader
108 
109  // Structures for the various cell types we render.
110  vtkgl::CellBO *Program1; // shader to compute Gx1 and Gy1
111  vtkgl::CellBO *Program2; // shader to compute |G| from Gx1 and Gy1
112 
113  private:
115  void operator=(const vtkSobelGradientMagnitudePass&); // Not implemented.
116 };
117 
118 #endif
OpenGL rendering window.
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:632
Convenient class for post-processing passes. render pass.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:33
Context in which a vtkRenderPass will render.
GLubyte GLubyte GLubyte GLubyte w
Definition: vtkgl.h:12054
Implement a post-processing edge detection with a Sobel gradient magnitude render pass...
a simple class to control print indentation
Definition: vtkIndent.h:38
Definition: vtkgl.h:11267
internal class which encapsulates OpenGL frame buffer object. Not to be used directly.
abstracts an OpenGL texture object.
GLdouble s
Definition: vtkgl.h:11594