00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkVolumeProVP1000Mapper.h,v $ 00005 Language: C++ 00006 00007 00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 00009 All rights reserved. 00010 00011 Redistribution and use in source and binary forms, with or without 00012 modification, are permitted provided that the following conditions are met: 00013 00014 * Redistributions of source code must retain the above copyright notice, 00015 this list of conditions and the following disclaimer. 00016 00017 * Redistributions in binary form must reproduce the above copyright notice, 00018 this list of conditions and the following disclaimer in the documentation 00019 and/or other materials provided with the distribution. 00020 00021 * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names 00022 of any contributors may be used to endorse or promote products derived 00023 from this software without specific prior written permission. 00024 00025 * Modified source versions must be plainly marked as such, and must not be 00026 misrepresented as being the original software. 00027 00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' 00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR 00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00038 00039 =========================================================================*/ 00077 #ifndef __vtkVolumeProVP1000Mapper_h 00078 #define __vtkVolumeProVP1000Mapper_h 00079 00080 #include "vtkVolumeProMapper.h" 00081 00082 #ifdef _WIN32 00083 #include "VolumePro1000/inc/vli.h" 00084 #else 00085 #include "vli3/include/vli.h" 00086 #endif 00087 00088 #define VTK_VOLUME_16BIT 3 00089 #define VTK_VOLUME_32BIT 4 00090 00091 class VTK_EXPORT vtkVolumeProVP1000Mapper : public vtkVolumeProMapper 00092 { 00093 public: 00094 vtkTypeMacro(vtkVolumeProVP1000Mapper,vtkVolumeProMapper); 00095 static vtkVolumeProVP1000Mapper *New(); 00097 00098 virtual void Render( vtkRenderer *, vtkVolume * ); 00099 virtual int GetAvailableBoardMemory(); 00100 virtual void GetLockSizesForBoardMemory( unsigned int type, 00101 unsigned int *xSize, 00102 unsigned int *ySize, 00103 unsigned int *zSize ); 00105 protected: 00106 vtkVolumeProVP1000Mapper(); 00107 ~vtkVolumeProVP1000Mapper(); 00108 vtkVolumeProVP1000Mapper(const vtkVolumeProVP1000Mapper&); 00109 void operator=(const vtkVolumeProVP1000Mapper&); 00110 00111 // Update the camera - set the camera matrix 00112 void UpdateCamera( vtkRenderer *, vtkVolume * ); 00113 00114 // Update the lights 00115 void UpdateLights( vtkRenderer *, vtkVolume * ); 00116 00117 // Update the properties of the volume including transfer functions 00118 // and material properties 00119 void UpdateProperties( vtkRenderer *, vtkVolume * ); 00120 00121 // Update the volume - create it if necessary 00122 // Set the volume matrix. 00123 void UpdateVolume( vtkRenderer *, vtkVolume * ); 00124 00125 // Set the crop box (as defined in the vtkVolumeMapper superclass) 00126 void UpdateCropping( vtkRenderer *, vtkVolume * ); 00127 00128 // Set the cursor 00129 void UpdateCursor( vtkRenderer *, vtkVolume * ); 00130 00131 // Update the cut plane 00132 void UpdateCutPlane( vtkRenderer *, vtkVolume * ); 00133 00134 // Render the image buffer to the screen 00135 // Defined in the specific graphics implementation. 00136 virtual void RenderImageBuffer( vtkRenderer * vtkNotUsed(ren), 00137 vtkVolume * vol, 00138 int size[2], 00139 unsigned int * outData ) 00140 {(void)vol; (void)size; (void)outData;} 00141 00142 // Get the depth buffer values 00143 virtual void GetDepthBufferValues( vtkRenderer *vtkNotUsed(ren), 00144 int size[2], 00145 unsigned int *outData ) 00146 { (void)outData; } 00147 00148 // Keep track of the size of the data loaded so we know if we can 00149 // simply update when a change occurs or if we need to release and 00150 // create again 00151 int LoadedDataSize[3]; 00152 00153 VLIImageBuffer *ImageBuffer; 00154 VLIDepthBuffer *DepthBuffer; 00155 }; 00156 00157 00158 00159 #endif 00160 00161 00162