VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/VolumeOpenGL2/vtkOpenGLRayCastImageDisplayHelper.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkOpenGLRayCastImageDisplayHelper.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 =========================================================================*/
00015 
00026 #ifndef vtkOpenGLRayCastImageDisplayHelper_h
00027 #define vtkOpenGLRayCastImageDisplayHelper_h
00028 
00029 #include "vtkRenderingVolumeOpenGL2Module.h" // For export macro
00030 #include "vtkRayCastImageDisplayHelper.h"
00031 
00032 class vtkActor;
00033 class vtkFixedPointRayCastImage;
00034 class vtkOpenGLTexture;
00035 class vtkRenderer;
00036 class vtkVolume;
00037 class vtkWindow;
00038 class vtkTextureObject;
00039 
00040 class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkOpenGLRayCastImageDisplayHelper
00041   : public vtkRayCastImageDisplayHelper
00042 {
00043 public:
00044   static vtkOpenGLRayCastImageDisplayHelper *New();
00045   vtkTypeMacro(vtkOpenGLRayCastImageDisplayHelper,vtkRayCastImageDisplayHelper);
00046   virtual void PrintSelf(ostream& os, vtkIndent indent);
00047 
00048   void RenderTexture( vtkVolume *vol, vtkRenderer *ren,
00049                       int imageMemorySize[2],
00050                       int imageViewportSize[2],
00051                       int imageInUseSize[2],
00052                       int imageOrigin[2],
00053                       float requestedDepth,
00054                       unsigned char *image );
00055 
00056   void RenderTexture( vtkVolume *vol, vtkRenderer *ren,
00057                       int imageMemorySize[2],
00058                       int imageViewportSize[2],
00059                       int imageInUseSize[2],
00060                       int imageOrigin[2],
00061                       float requestedDepth,
00062                       unsigned short *image );
00063 
00064   void RenderTexture( vtkVolume *vol, vtkRenderer *ren,
00065                       vtkFixedPointRayCastImage *image,
00066                       float requestedDepth );
00067 
00068   virtual void ReleaseGraphicsResources(vtkWindow *win);
00069 
00070 protected:
00071   vtkOpenGLRayCastImageDisplayHelper();
00072   ~vtkOpenGLRayCastImageDisplayHelper();
00073 
00074   void RenderTextureInternal( vtkVolume *vol, vtkRenderer *ren,
00075                               int imageMemorySize[2],
00076                               int imageViewportSize[2],
00077                               int imageInUseSize[2],
00078                               int imageOrigin[2],
00079                               float requestedDepth,
00080                               int imageScalarType,
00081                               void *image );
00082 
00083   vtkActor *TextureActor;
00084   vtkOpenGLTexture* Texture;
00085   vtkTextureObject *TextureObject;
00086 
00087 private:
00088   vtkOpenGLRayCastImageDisplayHelper(const vtkOpenGLRayCastImageDisplayHelper&);  // Not implemented.
00089   void operator=(const vtkOpenGLRayCastImageDisplayHelper&);  // Not implemented.
00090 };
00091 
00092 #endif