Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

graphics/vtkVolumeMapper.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkVolumeMapper.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 =========================================================================*/
00055 #ifndef __vtkVolumeMapper_h
00056 #define __vtkVolumeMapper_h
00057 
00058 #include "vtkAbstractMapper3D.h"
00059 #include "vtkImageData.h"
00060 
00061 class vtkRenderer;
00062 class vtkVolume;
00063 
00064 #define VTK_RAYCAST_VOLUME_MAPPER        0
00065 #define VTK_FRAMEBUFFER_VOLUME_MAPPER    1
00066 #define VTK_SOFTWAREBUFFER_VOLUME_MAPPER 2
00067 
00068 #define VTK_CROP_SUBVOLUME              0x0002000
00069 #define VTK_CROP_FENCE                  0x2ebfeba
00070 #define VTK_CROP_INVERTED_FENCE         0x5140145
00071 #define VTK_CROP_CROSS                  0x0417410
00072 #define VTK_CROP_INVERTED_CROSS         0x7be8bef
00073 
00074 class vtkWindow;
00075 
00076 class VTK_EXPORT vtkVolumeMapper : public vtkAbstractMapper3D
00077 {
00078 public:
00079   vtkTypeMacro(vtkVolumeMapper,vtkAbstractMapper3D);
00080   void PrintSelf( ostream& os, vtkIndent index );
00081 
00083   virtual void Update();
00084 
00086   void SetInput( vtkImageData * );
00087   vtkImageData *GetInput();
00088 
00091   vtkSetMacro(Cropping,int);
00092   vtkGetMacro(Cropping,int);
00093   vtkBooleanMacro(Cropping,int);
00094 
00097   vtkSetVector6Macro( CroppingRegionPlanes, float );
00098   vtkGetVectorMacro(  CroppingRegionPlanes, float, 6 );
00099 
00109   vtkSetClampMacro( CroppingRegionFlags, int, 0x0, 0x7ffffff );
00110   vtkGetMacro( CroppingRegionFlags, int );
00111   void SetCroppingRegionFlagsToSubVolume() 
00112     {this->SetCroppingRegionFlags( VTK_CROP_SUBVOLUME );};
00113   void SetCroppingRegionFlagsToFence() 
00114     {this->SetCroppingRegionFlags( VTK_CROP_FENCE );};
00115   void SetCroppingRegionFlagsToInvertedFence() 
00116     {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_FENCE );};
00117   void SetCroppingRegionFlagsToCross() 
00118     {this->SetCroppingRegionFlags( VTK_CROP_CROSS );};
00119   void SetCroppingRegionFlagsToInvertedCross() 
00120     {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_CROSS );};
00121 
00123   void SetRGBTextureInput( vtkImageData *rgbTexture );
00124   virtual vtkImageData *GetRGBTextureInput();
00125 
00128   virtual float *GetBounds();
00129   virtual void GetBounds(float bounds[6])
00130     { this->vtkAbstractMapper3D::GetBounds(bounds); };
00131 
00132 
00133 //BTX
00135   virtual float GetGradientMagnitudeScale() {return 1.0;};
00136   virtual float GetGradientMagnitudeBias()  {return 0.0;};
00137   
00138 
00141   virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0;
00142 
00147   virtual void ReleaseGraphicsResources(vtkWindow *) {};
00148 
00151   virtual float *GetRGBAPixelData() {return NULL;};
00152 
00156   virtual int GetMapperType()=0;
00157 
00158 //ETX
00159 
00160 
00161 protected:
00162   vtkVolumeMapper();
00163   ~vtkVolumeMapper();
00164   vtkVolumeMapper(const vtkVolumeMapper&) {};
00165   void operator=(const vtkVolumeMapper&) {};
00166 
00167   int                  Cropping;
00168   float                CroppingRegionPlanes[6];
00169   int                  CroppingRegionFlags;
00170   vtkTimeStamp         BuildTime;
00171 };
00172 
00173 
00174 #endif
00175 
00176 

Generated on Wed Nov 21 12:27:04 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001