VTK  9.0.3
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 =========================================================================*/
60 #ifndef vtkSobelGradientMagnitudePass_h
61 #define vtkSobelGradientMagnitudePass_h
62 
63 #include "vtkImageProcessingPass.h"
64 #include "vtkRenderingOpenGL2Module.h" // For export macro
65 
66 class vtkDepthPeelingPassLayerList; // Pimpl
68 class vtkOpenGLHelper;
70 class vtkTextureObject;
71 
72 class VTKRENDERINGOPENGL2_EXPORT vtkSobelGradientMagnitudePass : public vtkImageProcessingPass
73 {
74 public:
77  void PrintSelf(ostream& os, vtkIndent indent) override;
78 
83  void Render(const vtkRenderState* s) override;
84 
91 
92 protected:
97 
102 
107  vtkTextureObject* Pass1; // render target for the scene
108  vtkTextureObject* Gx1; // render target 0 for the first shader
109  vtkTextureObject* Gy1; // render target 1 for the first shader
110 
111  // Structures for the various cell types we render.
112  vtkOpenGLHelper* Program1; // shader to compute Gx1 and Gy1
113  vtkOpenGLHelper* Program2; // shader to compute |G| from Gx1 and Gy1
114 
115 private:
117  void operator=(const vtkSobelGradientMagnitudePass&) = delete;
118 };
119 
120 #endif
Convenient class for post-processing passes.
a simple class to control print indentation
Definition: vtkIndent.h:34
Internal class which encapsulates OpenGL FramebufferObject.
OpenGL rendering window.
Context in which a vtkRenderPass will render.
Implement a post-processing edge detection with a Sobel gradient magnitude render pass.
vtkSobelGradientMagnitudePass()
Default constructor.
void Render(const vtkRenderState *s) override
Perform rendering according to a render state s.
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
static vtkSobelGradientMagnitudePass * New()
vtkOpenGLFramebufferObject * FrameBufferObject
Graphics resources.
~vtkSobelGradientMagnitudePass() override
Destructor.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstracts an OpenGL texture object.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38