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   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00053 #ifndef __vtkVolumeProVG500Mapper_h
00054 #define __vtkVolumeProVG500Mapper_h
00055 
00056 #include "vtkVolumeProMapper.h"
00057 
00058 #ifdef _WIN32
00059 // This ugly thing will prevent MS Visual Studio .NET from complaining
00060 // about mixing new and old IOStream. This is necessary due to lack of
00061 // platform independency in vli.h. It probably will not work or
00062 // anything, but it will at least compile.
00063 # if ( defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(_INC_IOSTREAM) )
00064 #   define _INC_IOSTREAM
00065 #   define _VTK_HACKED_UP_INCLUDE_BLOCKER
00066 # endif
00067 # include "VolumePro/inc/vli.h" // Needed for VLI internals
00068 # if defined(_VTK_HACKED_UP_INCLUDE_BLOCKER)
00069 #   undef _INC_IOSTREAM
00070 #   undef _VTK_HACKED_UP_INCLUDE_BLOCKER
00071 # endif
00072 #else
00073 # include "vli/include/vli.h" // Needed for VLI internals
00074 #endif
00075 
00076 #ifdef VTK_USE_VOLUMEPRO
00077 #define VTK_VOLUMEPRO_EXPORT VTK_RENDERING_EXPORT
00078 #else
00079 #define VTK_VOLUMEPRO_EXPORT 
00080 #endif
00081 
00082 class VTK_VOLUMEPRO_EXPORT vtkVolumeProVG500Mapper : public vtkVolumeProMapper
00083 {
00084 public:
00085   vtkTypeRevisionMacro(vtkVolumeProVG500Mapper,vtkVolumeProMapper);
00086   static vtkVolumeProVG500Mapper *New();
00087   virtual void PrintSelf(ostream& os, vtkIndent indent);
00088 
00090 
00091   virtual void Render( vtkRenderer *, vtkVolume * );
00092   virtual int GetAvailableBoardMemory();
00093   virtual void GetLockSizesForBoardMemory( unsigned int type,
00094                                            unsigned int *xSize,
00095                                            unsigned int *ySize,
00096                                            unsigned int *zSize );
00098 protected:
00099   vtkVolumeProVG500Mapper();
00100   ~vtkVolumeProVG500Mapper();
00101   
00102   // Update the camera - set the camera matrix
00103   void UpdateCamera( vtkRenderer *, vtkVolume * );
00104 
00105   // Update the lights
00106   void UpdateLights( vtkRenderer *, vtkVolume * );
00107 
00108   // Update the properties of the volume including transfer functions
00109   // and material properties
00110   void UpdateProperties( vtkRenderer *, vtkVolume * );
00111 
00112   // Update the volume - create it if necessary
00113   // Set the volume matrix.
00114   void UpdateVolume( vtkRenderer *, vtkVolume * );
00115 
00116   // Set the crop box (as defined in the vtkVolumeMapper superclass)
00117   void UpdateCropping( vtkRenderer *, vtkVolume * );
00118 
00119   // Set the cursor
00120   void UpdateCursor( vtkRenderer *, vtkVolume * );
00121 
00122   // Update the cut plane
00123   void UpdateCutPlane( vtkRenderer *, vtkVolume * );
00124 
00125   // Render the hexagon to the screen
00126   // Defined in the specific graphics implementation.
00127   virtual void RenderHexagon( vtkRenderer  * vtkNotUsed(ren), 
00128                               vtkVolume    * vtkNotUsed(vol),
00129                               VLIPixel     * vtkNotUsed(basePlane),
00130                               int          size[2],
00131                               VLIVector3D  hexagon[6], 
00132                               VLIVector2D  textureCoords[6] ) 
00133     {(void)size; (void)hexagon; (void)textureCoords;}
00134 
00135   // Make the base plane size a power of 2 for OpenGL
00136   void CorrectBasePlaneSize( VLIPixel *inBase, int inSize[2],
00137                              VLIPixel **outBase, int outSize[2],
00138                              VLIVector2D textureCoords[6] );
00139 
00140   // Keep track of the size of the data loaded so we know if we can
00141   // simply update when a change occurs or if we need to release and
00142   // create again
00143   int LoadedDataSize[3];
00144   
00145 private:
00146   vtkVolumeProVG500Mapper(const vtkVolumeProVG500Mapper&);  // Not implemented.
00147   void operator=(const vtkVolumeProVG500Mapper&);  // Not implemented.
00148 };
00149 
00150 
00151 
00152 #endif
00153 
00154 
00155