VTK
vtkVolumeProVP1000Mapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkVolumeProVP1000Mapper.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
56 #ifndef __vtkVolumeProVP1000Mapper_h
57 #define __vtkVolumeProVP1000Mapper_h
58 
59 #include "vtkVolumeProMapper.h"
60 
61 #ifdef _WIN32
62 #include "VolumePro1000/inc/vli.h" // Needed for VLI internal types
63 #else
64 #include "vli3/include/vli.h" // Needed for VLI internal types
65 #endif
66 
67 #define VTK_VOLUME_16BIT 3
68 #define VTK_VOLUME_32BIT 4
69 
71 {
72 public:
74  static vtkVolumeProVP1000Mapper *New();
75  virtual void PrintSelf(ostream& os, vtkIndent indent);
76 
78 
79  virtual void Render( vtkRenderer *, vtkVolume * );
80  virtual int GetAvailableBoardMemory();
81  virtual void GetLockSizesForBoardMemory(unsigned int type,
82  unsigned int *xSize,
83  unsigned int *ySize,
84  unsigned int *zSize);
86 
87  virtual void SetSuperSamplingFactor(double x, double y, double z);
88 
89  virtual void SetMipmapLevel(int level);
90 
91 protected:
94 
95  // Update the camera - set the camera matrix
96  void UpdateCamera( vtkRenderer *, vtkVolume * );
97 
98  // Update the lights
99  void UpdateLights( vtkRenderer *, vtkVolume * );
100 
101  // Update the properties of the volume including transfer functions
102  // and material properties
103  void UpdateProperties( vtkRenderer *, vtkVolume * );
104 
105  // Update the volume - create it if necessary
106  // Set the volume matrix.
107  void UpdateVolume( vtkRenderer *, vtkVolume * );
108 
109  // Set the crop box (as defined in the vtkVolumeMapper superclass)
110  void UpdateCropping( vtkRenderer *, vtkVolume * );
111 
112  // Set the cursor
113  void UpdateCursor( vtkRenderer *, vtkVolume * );
114 
115  // Update the cut plane
116  void UpdateCutPlane( vtkRenderer *, vtkVolume * );
117 
118  // Render the image buffer to the screen
119  // Defined in the specific graphics implementation.
120  virtual void RenderImageBuffer( vtkRenderer * vtkNotUsed(ren),
121  vtkVolume * vol,
122  int size[2],
123  unsigned int * outData )
124  {(void)vol; (void)size; (void)outData;}
125 
126  // Render a bounding box of the volume because the texture map would
127  // be too large.
128  virtual void RenderBoundingBox( vtkRenderer * vtkNotUsed(ren),
129  vtkVolume * vol )
130  {(void)vol;}
131 
132  // Get the depth buffer values
133 //BTX
134  virtual void GetDepthBufferValues( vtkRenderer *vtkNotUsed(ren),
135  int vtkNotUsed(size)[2],
136  unsigned int *outData )
137  { (void)outData; }
138 //ETX
139 
140 #if ((VTK_MAJOR_VERSION == 3)&&(VTK_MINOR_VERSION == 2))
141  vtkGetVectorMacro( VoxelCroppingRegionPlanes, float, 6 );
143  float VoxelCroppingRegionPlanes[6];
144 #endif
145 
146 
147  // Keep track of the size of the data loaded so we know if we can
148  // simply update when a change occurs or if we need to release and
149  // create again
150  int LoadedDataSize[3];
151 
152  VLIImageBuffer *ImageBuffer;
153  VLIDepthBuffer *DepthBuffer;
154 
155 //BTX
156  VLIStatus CheckSubSampling(const VLIVolume *inVolume,
157  const VLIContext *inContext,
158  int &outImageWidth, int &outImageHeight);
159 //ETX
160 
162 
163 private:
164  vtkVolumeProVP1000Mapper(const vtkVolumeProVP1000Mapper&); // Not implemented
165  void operator=(const vtkVolumeProVP1000Mapper&); // Not implemented
166 };
167 
168 
169 
170 #endif
171 
172 
173