VTK
dox/VolumeRendering/vtkVolumeProVP1000Mapper.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkVolumeProVP1000Mapper.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 =========================================================================*/
00056 #ifndef __vtkVolumeProVP1000Mapper_h
00057 #define __vtkVolumeProVP1000Mapper_h
00058 
00059 #include "vtkVolumeProMapper.h"
00060 
00061 #ifdef _WIN32
00062 #include "VolumePro1000/inc/vli.h" // Needed for VLI internal types
00063 #else
00064 #include "vli3/include/vli.h" // Needed for VLI internal types
00065 #endif
00066 
00067 #define VTK_VOLUME_16BIT 3
00068 #define VTK_VOLUME_32BIT 4
00069 
00070 class VTK_VOLUMERENDERING_EXPORT vtkVolumeProVP1000Mapper : public vtkVolumeProMapper
00071 {
00072 public:
00073   vtkTypeMacro(vtkVolumeProVP1000Mapper,vtkVolumeProMapper);
00074   static vtkVolumeProVP1000Mapper *New();
00075   virtual void PrintSelf(ostream& os, vtkIndent indent);
00076 
00078 
00079   virtual void Render( vtkRenderer *, vtkVolume * );
00080   virtual int GetAvailableBoardMemory();
00081   virtual void GetLockSizesForBoardMemory(unsigned int type,
00082                                           unsigned int *xSize,
00083                                           unsigned int *ySize,
00084                                           unsigned int *zSize);
00086 
00087   virtual void SetSuperSamplingFactor(double x, double y, double z);
00088 
00089   virtual void SetMipmapLevel(int level);
00090 
00091 protected:
00092   vtkVolumeProVP1000Mapper();
00093   ~vtkVolumeProVP1000Mapper();
00094   
00095   // Update the camera - set the camera matrix
00096   void UpdateCamera( vtkRenderer *, vtkVolume * );
00097 
00098   // Update the lights
00099   void UpdateLights( vtkRenderer *, vtkVolume * );
00100 
00101   // Update the properties of the volume including transfer functions
00102   // and material properties
00103   void UpdateProperties( vtkRenderer *, vtkVolume * );
00104 
00105   // Update the volume - create it if necessary
00106   // Set the volume matrix.
00107   void UpdateVolume( vtkRenderer *, vtkVolume * );
00108 
00109   // Set the crop box (as defined in the vtkVolumeMapper superclass)
00110   void UpdateCropping( vtkRenderer *, vtkVolume * );
00111 
00112   // Set the cursor
00113   void UpdateCursor( vtkRenderer *, vtkVolume * );
00114 
00115   // Update the cut plane
00116   void UpdateCutPlane( vtkRenderer *, vtkVolume * );
00117 
00118   // Render the image buffer to the screen
00119   // Defined in the specific graphics implementation.
00120   virtual void RenderImageBuffer( vtkRenderer  * vtkNotUsed(ren),
00121                                   vtkVolume    * vol,
00122                                   int          size[2],
00123                                   unsigned int * outData )
00124     {(void)vol; (void)size; (void)outData;}
00125 
00126   // Render a bounding box of the volume because the texture map would
00127   // be too large.
00128   virtual void RenderBoundingBox( vtkRenderer * vtkNotUsed(ren),
00129                                   vtkVolume   * vol )
00130     {(void)vol;}
00131 
00132   // Get the depth buffer values
00133 //BTX
00134   virtual void GetDepthBufferValues( vtkRenderer *vtkNotUsed(ren),
00135                                      int vtkNotUsed(size)[2],
00136                                      unsigned int *outData )
00137     { (void)outData; }
00138 //ETX
00139 
00140 #if ((VTK_MAJOR_VERSION == 3)&&(VTK_MINOR_VERSION == 2))
00141   vtkGetVectorMacro( VoxelCroppingRegionPlanes, float, 6 );
00142   void ConvertCroppingRegionPlanesToVoxels();
00143   float                VoxelCroppingRegionPlanes[6];
00144 #endif
00145 
00146   
00147   // Keep track of the size of the data loaded so we know if we can
00148   // simply update when a change occurs or if we need to release and
00149   // create again
00150   int LoadedDataSize[3];
00151 
00152   VLIImageBuffer *ImageBuffer;
00153   VLIDepthBuffer *DepthBuffer;
00154   
00155 //BTX
00156   VLIStatus CheckSubSampling(const VLIVolume *inVolume,
00157                              const VLIContext *inContext,
00158                              int &outImageWidth, int &outImageHeight);
00159 //ETX
00160 
00161   int DrawBoundingBox;
00162 
00163 private:
00164   vtkVolumeProVP1000Mapper(const vtkVolumeProVP1000Mapper&); // Not implemented
00165   void operator=(const vtkVolumeProVP1000Mapper&); // Not implemented
00166 };
00167 
00168 
00169 
00170 #endif
00171 
00172 
00173