VTK
dox/Rendering/vtkAbstractVolumeMapper.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkAbstractVolumeMapper.h
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 =========================================================================*/
00026 #ifndef __vtkAbstractVolumeMapper_h
00027 #define __vtkAbstractVolumeMapper_h
00028 
00029 #include "vtkAbstractMapper3D.h"
00030 
00031 class vtkRenderer;
00032 class vtkVolume;
00033 class vtkWindow;
00034 class vtkDataSet;
00035 
00036 class VTK_RENDERING_EXPORT vtkAbstractVolumeMapper : public vtkAbstractMapper3D
00037 {
00038 public:
00039   vtkTypeMacro(vtkAbstractVolumeMapper,vtkAbstractMapper3D);
00040   void PrintSelf( ostream& os, vtkIndent indent );
00041 
00043 
00044   virtual void SetInput( vtkDataSet * );
00045   vtkDataSet *GetDataSetInput();
00046   vtkDataObject *GetDataObjectInput();
00048   
00050 
00052   virtual double *GetBounds();
00053   virtual void GetBounds(double bounds[6])
00054     { this->vtkAbstractMapper3D::GetBounds(bounds); };
00056   
00058 
00067   vtkSetMacro(ScalarMode,int);
00068   vtkGetMacro(ScalarMode,int);
00069   void SetScalarModeToDefault() {
00070     this->SetScalarMode(VTK_SCALAR_MODE_DEFAULT);};
00071   void SetScalarModeToUsePointData() {
00072     this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_DATA);};
00073   void SetScalarModeToUseCellData() {
00074     this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_DATA);};
00075   void SetScalarModeToUsePointFieldData() {
00076     this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_FIELD_DATA);};
00077   void SetScalarModeToUseCellFieldData() {
00078     this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_FIELD_DATA);};
00080   
00082 
00086   virtual void SelectScalarArray(int arrayNum); 
00087   virtual void SelectScalarArray(const char* arrayName); 
00089   
00091 
00092   virtual char* GetArrayName() { return this->ArrayName; }
00093   virtual int GetArrayId() { return this->ArrayId; }
00094   virtual int GetArrayAccessMode() { return this->ArrayAccessMode; }
00096 
00098   const char *GetScalarModeAsString(); 
00099   
00100 //BTX
00102 
00103   virtual float GetGradientMagnitudeScale() {return 1.0f;};
00104   virtual float GetGradientMagnitudeBias()  {return 0.0f;};
00105   virtual float GetGradientMagnitudeScale(int) {return 1.0f;};
00106   virtual float GetGradientMagnitudeBias(int)  {return 0.0f;};
00108   
00109 
00112   virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0;
00113 
00118   virtual void ReleaseGraphicsResources(vtkWindow *) {};
00119   
00120 //ETX
00121 
00122 protected:
00123   vtkAbstractVolumeMapper();
00124   ~vtkAbstractVolumeMapper();
00125   
00126   // see algorithm for more info
00127   virtual int FillInputPortInformation(int port, vtkInformation* info);
00128 
00129   int         ScalarMode;
00130   char       *ArrayName;
00131   int         ArrayId;
00132   int         ArrayAccessMode;
00133   
00134 private:
00135   vtkAbstractVolumeMapper(const vtkAbstractVolumeMapper&);  // Not implemented.
00136   void operator=(const vtkAbstractVolumeMapper&);  // Not implemented.
00137 };
00138 
00139 
00140 #endif
00141 
00142