VTK
dox/Rendering/vtkSobelGradientMagnitudePass.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkSobelGradientMagnitudePass.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00062 #ifndef __vtkSobelGradientMagnitudePass_h
00063 #define __vtkSobelGradientMagnitudePass_h
00064 
00065 #include "vtkImageProcessingPass.h"
00066 
00067 class vtkOpenGLRenderWindow;
00068 class vtkDepthPeelingPassLayerList; // Pimpl
00069 class vtkShaderProgram2;
00070 class vtkShader2;
00071 class vtkFrameBufferObject;
00072 class vtkTextureObject;
00073 
00074 class VTK_RENDERING_EXPORT vtkSobelGradientMagnitudePass : public vtkImageProcessingPass
00075 {
00076 public:
00077   static vtkSobelGradientMagnitudePass *New();
00078   vtkTypeMacro(vtkSobelGradientMagnitudePass,vtkImageProcessingPass);
00079   void PrintSelf(ostream& os, vtkIndent indent);
00080 
00081   //BTX
00083 
00085   virtual void Render(const vtkRenderState *s);
00086   //ETX
00088   
00091   void ReleaseGraphicsResources(vtkWindow *w);
00092   
00093  protected:
00095   vtkSobelGradientMagnitudePass();
00096 
00098   virtual ~vtkSobelGradientMagnitudePass();
00099  
00101 
00102   vtkFrameBufferObject *FrameBufferObject;
00103   vtkTextureObject *Pass1; // render target for the scene
00104   vtkTextureObject *Gx1; // render target 0 for the first shader
00105   vtkTextureObject *Gy1; // render target 1 for the first shader
00106   vtkShaderProgram2 *Program1; // shader to compute Gx1 and Gy1
00107   vtkShaderProgram2 *Program2; // shader to compute |G| from Gx1 and Gy1
00109   
00110  private:
00111   vtkSobelGradientMagnitudePass(const vtkSobelGradientMagnitudePass&);  // Not implemented.
00112   void operator=(const vtkSobelGradientMagnitudePass&);  // Not implemented.
00113 };
00114 
00115 #endif