Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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 =========================================================================*/
00027 #ifndef __vtkVolumeMapper_h
00028 #define __vtkVolumeMapper_h
00029 
00030 #include "vtkAbstractVolumeMapper.h"
00031 
00032 class vtkRenderer;
00033 class vtkVolume;
00034 class vtkImageData;
00035 
00036 #define VTK_CROP_SUBVOLUME              0x0002000
00037 #define VTK_CROP_FENCE                  0x2ebfeba
00038 #define VTK_CROP_INVERTED_FENCE         0x5140145
00039 #define VTK_CROP_CROSS                  0x0417410
00040 #define VTK_CROP_INVERTED_CROSS         0x7be8bef
00041 
00042 class vtkWindow;
00043 
00044 class VTK_VOLUMERENDERING_EXPORT vtkVolumeMapper : public vtkAbstractVolumeMapper
00045 {
00046 public:
00047   vtkTypeRevisionMacro(vtkVolumeMapper,vtkAbstractVolumeMapper);
00048   void PrintSelf( ostream& os, vtkIndent indent );
00049 
00051 
00052   virtual void SetInput( vtkImageData * );
00053   virtual void SetInput( vtkDataSet * );
00054   vtkImageData *GetInput();
00056 
00058 
00063   vtkSetMacro( BlendMode, int );
00064   void SetBlendModeToComposite()
00065     { this->SetBlendMode( vtkVolumeMapper::COMPOSITE_BLEND ); }
00066   void SetBlendModeToMaximumIntensity()
00067     { this->SetBlendMode( vtkVolumeMapper::MAXIMUM_INTENSITY_BLEND ); }
00068   vtkGetMacro( BlendMode, int );
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   enum 
00130   {
00131     COMPOSITE_BLEND,
00132     MAXIMUM_INTENSITY_BLEND
00133   };
00134 //ETX
00135 
00136 protected:
00137   vtkVolumeMapper();
00138   ~vtkVolumeMapper();
00139 
00140   int   BlendMode;
00141 
00142   // Cropping variables, and a method for converting the world
00143   // coordinate cropping region planes to voxel coordinates
00144   int                  Cropping;
00145   double               CroppingRegionPlanes[6];
00146   double               VoxelCroppingRegionPlanes[6];
00147   int                  CroppingRegionFlags;
00148   void ConvertCroppingRegionPlanesToVoxels();
00149   
00150   virtual int FillInputPortInformation(int, vtkInformation*);
00151   
00152 private:
00153   vtkVolumeMapper(const vtkVolumeMapper&);  // Not implemented.
00154   void operator=(const vtkVolumeMapper&);  // Not implemented.
00155 };
00156 
00157 
00158 #endif
00159 
00160 

Generated on Mon Jan 21 23:07:38 2008 for VTK by  doxygen 1.4.3-20050530