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

vtkVolumeProVP1000Mapper.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkVolumeProVP1000Mapper.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 =========================================================================*/
00060 #ifndef __vtkVolumeProVP1000Mapper_h
00061 #define __vtkVolumeProVP1000Mapper_h
00062 
00063 #include "vtkVolumeProMapper.h"
00064 
00065 #ifdef _WIN32
00066 #include "VolumePro1000/inc/vli.h" // Needed for VLI internal types
00067 #else
00068 #include "vli3/include/vli.h" // Needed for VLI internal types
00069 #endif
00070 
00071 #define VTK_VOLUME_16BIT 3
00072 #define VTK_VOLUME_32BIT 4
00073 
00074 class VTK_EXPORT vtkVolumeProVP1000Mapper : public vtkVolumeProMapper
00075 {
00076 public:
00077   vtkTypeRevisionMacro(vtkVolumeProVP1000Mapper,vtkVolumeProMapper);
00078   static vtkVolumeProVP1000Mapper *New();
00079   virtual void PrintSelf(ostream& os, vtkIndent indent);
00080 
00082 
00083   virtual void Render( vtkRenderer *, vtkVolume * );
00084   virtual int GetAvailableBoardMemory();
00085   virtual void GetLockSizesForBoardMemory(unsigned int type,
00086                                           unsigned int *xSize,
00087                                           unsigned int *ySize,
00088                                           unsigned int *zSize);
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   virtual void GetDepthBufferValues( vtkRenderer *vtkNotUsed(ren),
00134                                      int size[2],
00135                                      unsigned int *outData )
00136     { (void)outData; }
00137 
00138 #if ((VTK_MAJOR_VERSION == 3)&&(VTK_MINOR_VERSION == 2))
00139   vtkGetVectorMacro( VoxelCroppingRegionPlanes, float, 6 );
00140   void ConvertCroppingRegionPlanesToVoxels();
00141   float                VoxelCroppingRegionPlanes[6];
00142 #endif
00143 
00144   
00145   // Keep track of the size of the data loaded so we know if we can
00146   // simply update when a change occurs or if we need to release and
00147   // create again
00148   int LoadedDataSize[3];
00149 
00150   VLIImageBuffer *ImageBuffer;
00151   VLIDepthBuffer *DepthBuffer;
00152   
00153   VLIStatus CheckSubSampling(const VLIVolume *inVolume,
00154                              const VLIContext *inContext,
00155                              int &outImageWidth, int &outImageHeight);
00156   
00157   int DrawBoundingBox;
00158 
00159 private:
00160   vtkVolumeProVP1000Mapper(const vtkVolumeProVP1000Mapper&); // Not implemented
00161   void operator=(const vtkVolumeProVP1000Mapper&); // Not implemented
00162 };
00163 
00164 
00165 
00166 #endif
00167 
00168 
00169