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

vtkSampleFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSampleFunction.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 =========================================================================*/
00035 #ifndef __vtkSampleFunction_h
00036 #define __vtkSampleFunction_h
00037 
00038 #include "vtkImageAlgorithm.h"
00039 
00040 class vtkImplicitFunction;
00041 class vtkDataArray;
00042 
00043 class VTK_IMAGING_EXPORT vtkSampleFunction : public vtkImageAlgorithm
00044 {
00045 public:
00046   vtkTypeRevisionMacro(vtkSampleFunction,vtkImageAlgorithm);
00047   void PrintSelf(ostream& os, vtkIndent indent);
00048 
00052   static vtkSampleFunction *New();
00053 
00055 
00056   virtual void SetImplicitFunction(vtkImplicitFunction*);
00057   vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
00059 
00061 
00062   vtkSetMacro(OutputScalarType,int);
00063   vtkGetMacro(OutputScalarType,int);
00064   void SetOutputScalarTypeToDouble()
00065     {this->SetOutputScalarType(VTK_DOUBLE);}
00066   void SetOutputScalarTypeToFloat()
00067     {this->SetOutputScalarType(VTK_FLOAT);}
00068   void SetOutputScalarTypeToLong()
00069     {this->SetOutputScalarType(VTK_LONG);}
00070   void SetOutputScalarTypeToUnsignedLong()
00071     {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00072   void SetOutputScalarTypeToInt()
00073     {this->SetOutputScalarType(VTK_INT);}
00074   void SetOutputScalarTypeToUnsignedInt()
00075     {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
00076   void SetOutputScalarTypeToShort()
00077     {this->SetOutputScalarType(VTK_SHORT);}
00078   void SetOutputScalarTypeToUnsignedShort()
00079     {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
00080   void SetOutputScalarTypeToChar()
00081     {this->SetOutputScalarType(VTK_CHAR);}
00082   void SetOutputScalarTypeToUnsignedChar()
00083     {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
00085 
00089   virtual void SetScalars(vtkDataArray *da);
00090 
00092   void SetSampleDimensions(int i, int j, int k);
00093 
00095 
00096   void SetSampleDimensions(int dim[3]);
00097   vtkGetVectorMacro(SampleDimensions,int,3);
00099 
00101 
00103   vtkSetVector6Macro(ModelBounds,double);
00104   vtkGetVectorMacro(ModelBounds,double,6);
00106 
00108 
00111   vtkSetMacro(Capping,int);
00112   vtkGetMacro(Capping,int);
00113   vtkBooleanMacro(Capping,int);
00115   
00117 
00118   vtkSetMacro(CapValue,double);
00119   vtkGetMacro(CapValue,double);
00121 
00123 
00124   vtkSetMacro(ComputeNormals,int);
00125   vtkGetMacro(ComputeNormals,int);
00126   vtkBooleanMacro(ComputeNormals,int);
00128 
00130   unsigned long GetMTime();
00131 
00132 protected:
00133   vtkSampleFunction();
00134   ~vtkSampleFunction();
00135 
00136   virtual void ReportReferences(vtkGarbageCollector*);
00137 
00138   void ExecuteData(vtkDataObject *);
00139   virtual int RequestInformation (vtkInformation *, 
00140                                   vtkInformationVector **,
00141                                   vtkInformationVector *);
00142   void Cap(vtkDataArray *s);
00143 
00144   int OutputScalarType;
00145   int SampleDimensions[3];
00146   double ModelBounds[6];
00147   int Capping;
00148   double CapValue;
00149   vtkImplicitFunction *ImplicitFunction;
00150   int ComputeNormals;
00151 private:
00152   vtkSampleFunction(const vtkSampleFunction&);  // Not implemented.
00153   void operator=(const vtkSampleFunction&);  // Not implemented.
00154 };
00155 
00156 #endif
00157 
00158 

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