Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Rendering/vtkVolumeProVG500Mapper.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkVolumeProVG500Mapper.h,v $ 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 =========================================================================*/ 00049 #ifndef __vtkVolumeProVG500Mapper_h 00050 #define __vtkVolumeProVG500Mapper_h 00051 00052 #include "vtkVolumeProMapper.h" 00053 00054 #ifdef _WIN32 00055 // This ugly thing will prevent MS Visual Studio .NET from complaining 00056 // about mixing new and old IOStream. This is necessary due to lack of 00057 // platform independency in vli.h. It probably will not work or 00058 // anything, but it will at least compile. 00059 # if ( defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(_INC_IOSTREAM) ) 00060 # define _INC_IOSTREAM 00061 # define _VTK_HACKED_UP_INCLUDE_BLOCKER 00062 # endif 00063 # include "VolumePro/inc/vli.h" // Needed for VLI internals 00064 # if defined(_VTK_HACKED_UP_INCLUDE_BLOCKER) 00065 # undef _INC_IOSTREAM 00066 # undef _VTK_HACKED_UP_INCLUDE_BLOCKER 00067 # endif 00068 #else 00069 # include "vli/include/vli.h" // Needed for VLI internals 00070 #endif 00071 00072 #ifdef VTK_USE_VOLUMEPRO 00073 #define VTK_VOLUMEPRO_EXPORT VTK_RENDERING_EXPORT 00074 #else 00075 #define VTK_VOLUMEPRO_EXPORT 00076 #endif 00077 00078 class VTK_VOLUMEPRO_EXPORT vtkVolumeProVG500Mapper : public vtkVolumeProMapper 00079 { 00080 public: 00081 vtkTypeRevisionMacro(vtkVolumeProVG500Mapper,vtkVolumeProMapper); 00082 static vtkVolumeProVG500Mapper *New(); 00083 virtual void PrintSelf(ostream& os, vtkIndent indent); 00084 00086 00087 virtual void Render( vtkRenderer *, vtkVolume * ); 00088 virtual int GetAvailableBoardMemory(); 00089 virtual void GetLockSizesForBoardMemory( unsigned int type, 00090 unsigned int *xSize, 00091 unsigned int *ySize, 00092 unsigned int *zSize ); 00094 protected: 00095 vtkVolumeProVG500Mapper(); 00096 ~vtkVolumeProVG500Mapper(); 00097 00098 // Update the camera - set the camera matrix 00099 void UpdateCamera( vtkRenderer *, vtkVolume * ); 00100 00101 // Update the lights 00102 void UpdateLights( vtkRenderer *, vtkVolume * ); 00103 00104 // Update the properties of the volume including transfer functions 00105 // and material properties 00106 void UpdateProperties( vtkRenderer *, vtkVolume * ); 00107 00108 // Update the volume - create it if necessary 00109 // Set the volume matrix. 00110 void UpdateVolume( vtkRenderer *, vtkVolume * ); 00111 00112 // Set the crop box (as defined in the vtkVolumeMapper superclass) 00113 void UpdateCropping( vtkRenderer *, vtkVolume * ); 00114 00115 // Set the cursor 00116 void UpdateCursor( vtkRenderer *, vtkVolume * ); 00117 00118 // Update the cut plane 00119 void UpdateCutPlane( vtkRenderer *, vtkVolume * ); 00120 00121 // Render the hexagon to the screen 00122 // Defined in the specific graphics implementation. 00123 virtual void RenderHexagon( vtkRenderer * vtkNotUsed(ren), 00124 vtkVolume * vtkNotUsed(vol), 00125 VLIPixel * vtkNotUsed(basePlane), 00126 int size[2], 00127 VLIVector3D hexagon[6], 00128 VLIVector2D textureCoords[6] ) 00129 {(void)size; (void)hexagon; (void)textureCoords;} 00130 00131 // Make the base plane size a power of 2 for OpenGL 00132 void CorrectBasePlaneSize( VLIPixel *inBase, int inSize[2], 00133 VLIPixel **outBase, int outSize[2], 00134 VLIVector2D textureCoords[6] ); 00135 00136 // Keep track of the size of the data loaded so we know if we can 00137 // simply update when a change occurs or if we need to release and 00138 // create again 00139 int LoadedDataSize[3]; 00140 00141 private: 00142 vtkVolumeProVG500Mapper(const vtkVolumeProVG500Mapper&); // Not implemented. 00143 void operator=(const vtkVolumeProVG500Mapper&); // Not implemented. 00144 }; 00145 00146 00147 00148 #endif 00149 00150 00151