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

vtkVolumeMapper.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkVolumeMapper.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 =========================================================================*/
00040 #ifndef __vtkVolumeMapper_h
00041 #define __vtkVolumeMapper_h
00042 
00043 #include "vtkAbstractVolumeMapper.h"
00044 
00045 class vtkRenderer;
00046 class vtkVolume;
00047 class vtkImageData;
00048 
00049 #define VTK_CROP_SUBVOLUME              0x0002000
00050 #define VTK_CROP_FENCE                  0x2ebfeba
00051 #define VTK_CROP_INVERTED_FENCE         0x5140145
00052 #define VTK_CROP_CROSS                  0x0417410
00053 #define VTK_CROP_INVERTED_CROSS         0x7be8bef
00054 
00055 class vtkWindow;
00056 class vtkImageClip;
00057 
00058 class VTK_RENDERING_EXPORT vtkVolumeMapper : public vtkAbstractVolumeMapper
00059 {
00060 public:
00061   vtkTypeRevisionMacro(vtkVolumeMapper,vtkAbstractVolumeMapper);
00062   void PrintSelf( ostream& os, vtkIndent indent );
00063 
00065 
00066   virtual void SetInput( vtkImageData * );
00067   virtual void SetInput( vtkDataSet * );
00068   vtkImageData *GetInput();
00070 
00072 
00074   vtkSetClampMacro(Cropping,int,0,1);
00075   vtkGetMacro(Cropping,int);
00076   vtkBooleanMacro(Cropping,int);
00078 
00080 
00083   vtkSetVector6Macro( CroppingRegionPlanes, double );
00084   vtkGetVectorMacro(  CroppingRegionPlanes, double, 6 );
00086 
00088 
00090   vtkGetVectorMacro( VoxelCroppingRegionPlanes, double, 6 );
00092   
00094 
00103   vtkSetClampMacro( CroppingRegionFlags, int, 0x0, 0x7ffffff );
00104   vtkGetMacro( CroppingRegionFlags, int );
00105   void SetCroppingRegionFlagsToSubVolume() 
00106     {this->SetCroppingRegionFlags( VTK_CROP_SUBVOLUME );};
00107   void SetCroppingRegionFlagsToFence() 
00108     {this->SetCroppingRegionFlags( VTK_CROP_FENCE );};
00109   void SetCroppingRegionFlagsToInvertedFence() 
00110     {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_FENCE );};
00111   void SetCroppingRegionFlagsToCross() 
00112     {this->SetCroppingRegionFlags( VTK_CROP_CROSS );};
00113   void SetCroppingRegionFlagsToInvertedCross() 
00114     {this->SetCroppingRegionFlags( VTK_CROP_INVERTED_CROSS );};
00116 
00117 //BTX  
00118 
00121   virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0;
00122 
00127   virtual void ReleaseGraphicsResources(vtkWindow *) {};
00128   
00129 //ETX
00130 
00132 
00134   virtual void SetUseImageClipper(int);
00135   vtkGetMacro(UseImageClipper, int );
00136   vtkBooleanMacro(UseImageClipper, int );
00138   
00139 protected:
00140   vtkVolumeMapper();
00141   ~vtkVolumeMapper();
00142 
00143   virtual void ReportReferences(vtkGarbageCollector*);
00144   virtual void RemoveReferences();
00145 
00146   // Cropping variables, and a method for converting the world
00147   // coordinate cropping region planes to voxel coordinates
00148   int                  Cropping;
00149   double               CroppingRegionPlanes[6];
00150   double               VoxelCroppingRegionPlanes[6];
00151   int                  CroppingRegionFlags;
00152   void ConvertCroppingRegionPlanesToVoxels();
00153   
00154   // Clipper used on input to ensure it is the right size
00155   int UseImageClipper;
00156   vtkImageClip        *ImageClipper;
00157   
00158   
00159 private:
00160   vtkVolumeMapper(const vtkVolumeMapper&);  // Not implemented.
00161   void operator=(const vtkVolumeMapper&);  // Not implemented.
00162 };
00163 
00164 
00165 #endif
00166 
00167