VTK
|
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 =========================================================================*/ 00059 #ifndef vtkSobelGradientMagnitudePass_h 00060 #define vtkSobelGradientMagnitudePass_h 00061 00062 #include "vtkRenderingOpenGL2Module.h" // For export macro 00063 #include "vtkImageProcessingPass.h" 00064 00065 class vtkOpenGLRenderWindow; 00066 class vtkDepthPeelingPassLayerList; // Pimpl 00067 class vtkFrameBufferObject; 00068 class vtkTextureObject; 00069 namespace vtkgl 00070 { 00071 class CellBO; 00072 } 00073 00074 00075 class VTKRENDERINGOPENGL2_EXPORT vtkSobelGradientMagnitudePass : public vtkImageProcessingPass 00076 { 00077 public: 00078 static vtkSobelGradientMagnitudePass *New(); 00079 vtkTypeMacro(vtkSobelGradientMagnitudePass,vtkImageProcessingPass); 00080 void PrintSelf(ostream& os, vtkIndent indent); 00081 00082 //BTX 00084 00086 virtual void Render(const vtkRenderState *s); 00087 //ETX 00089 00092 void ReleaseGraphicsResources(vtkWindow *w); 00093 00094 protected: 00096 vtkSobelGradientMagnitudePass(); 00097 00099 virtual ~vtkSobelGradientMagnitudePass(); 00100 00102 00103 vtkFrameBufferObject *FrameBufferObject; 00104 vtkTextureObject *Pass1; // render target for the scene 00105 vtkTextureObject *Gx1; // render target 0 for the first shader 00106 vtkTextureObject *Gy1; // render target 1 for the first shader 00108 00109 // Structures for the various cell types we render. 00110 vtkgl::CellBO *Program1; // shader to compute Gx1 and Gy1 00111 vtkgl::CellBO *Program2; // shader to compute |G| from Gx1 and Gy1 00112 00113 private: 00114 vtkSobelGradientMagnitudePass(const vtkSobelGradientMagnitudePass&); // Not implemented. 00115 void operator=(const vtkSobelGradientMagnitudePass&); // Not implemented. 00116 }; 00117 00118 #endif