VTK  9.3.20240419
vtkSobelGradientMagnitudePass.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
51 #ifndef vtkSobelGradientMagnitudePass_h
52 #define vtkSobelGradientMagnitudePass_h
53 
54 #include "vtkImageProcessingPass.h"
55 #include "vtkRenderingOpenGL2Module.h" // For export macro
56 
57 VTK_ABI_NAMESPACE_BEGIN
58 class vtkDepthPeelingPassLayerList; // Pimpl
60 class vtkOpenGLHelper;
62 class vtkTextureObject;
63 
64 class VTKRENDERINGOPENGL2_EXPORT vtkSobelGradientMagnitudePass : public vtkImageProcessingPass
65 {
66 public:
69  void PrintSelf(ostream& os, vtkIndent indent) override;
70 
75  void Render(const vtkRenderState* s) override;
76 
83 
84 protected:
89 
94 
99  vtkTextureObject* Pass1; // render target for the scene
100  vtkTextureObject* Gx1; // render target 0 for the first shader
101  vtkTextureObject* Gy1; // render target 1 for the first shader
102 
103  // Structures for the various cell types we render.
104  vtkOpenGLHelper* Program1; // shader to compute Gx1 and Gy1
105  vtkOpenGLHelper* Program2; // shader to compute |G| from Gx1 and Gy1
106 
107 private:
109  void operator=(const vtkSobelGradientMagnitudePass&) = delete;
110 };
111 
112 VTK_ABI_NAMESPACE_END
113 #endif
Convenient class for post-processing passes.
a simple class to control print indentation
Definition: vtkIndent.h:108
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:48