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

# Imaging/vtkSampleFunction.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkSampleFunction.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00051 #ifndef __vtkSampleFunction_h
    00052 #define __vtkSampleFunction_h
    00053
    00054 #include "vtkImageSource.h"
    00055
    00056 class vtkImplicitFunction;
    00057 class vtkDataArray;
    00058
    00059 class VTK_IMAGING_EXPORT vtkSampleFunction : public vtkImageSource
    00060 {
    00061 public:
    00062   vtkTypeRevisionMacro(vtkSampleFunction,vtkImageSource);
    00063   void PrintSelf(ostream& os, vtkIndent indent);
    00064
    00068   static vtkSampleFunction *New();
    00069
    00071
    00072   virtual void SetImplicitFunction(vtkImplicitFunction*);
    00073   vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
    00075
    00077
    00078   vtkSetMacro(OutputScalarType,int);
    00079   vtkGetMacro(OutputScalarType,int);
    00080   void SetOutputScalarTypeToDouble()
    00081     {this->SetOutputScalarType(VTK_DOUBLE);}
    00082   void SetOutputScalarTypeToFloat()
    00083     {this->SetOutputScalarType(VTK_FLOAT);}
    00084   void SetOutputScalarTypeToLong()
    00085     {this->SetOutputScalarType(VTK_LONG);}
    00086   void SetOutputScalarTypeToUnsignedLong()
    00087     {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
    00088   void SetOutputScalarTypeToInt()
    00089     {this->SetOutputScalarType(VTK_INT);}
    00090   void SetOutputScalarTypeToUnsignedInt()
    00091     {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
    00092   void SetOutputScalarTypeToShort()
    00093     {this->SetOutputScalarType(VTK_SHORT);}
    00094   void SetOutputScalarTypeToUnsignedShort()
    00095     {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
    00096   void SetOutputScalarTypeToChar()
    00097     {this->SetOutputScalarType(VTK_CHAR);}
    00098   void SetOutputScalarTypeToUnsignedChar()
    00099     {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
    00101
    00105   virtual void SetScalars(vtkDataArray *da);
    00106
    00108   void SetSampleDimensions(int i, int j, int k);
    00109
    00111
    00112   void SetSampleDimensions(int dim[3]);
    00113   vtkGetVectorMacro(SampleDimensions,int,3);
    00115
    00117
    00118   vtkSetVector6Macro(ModelBounds,float);
    00119   vtkGetVectorMacro(ModelBounds,float,6);
    00121
    00123
    00126   vtkSetMacro(Capping,int);
    00127   vtkGetMacro(Capping,int);
    00128   vtkBooleanMacro(Capping,int);
    00130
    00132
    00133   vtkSetMacro(CapValue,float);
    00134   vtkGetMacro(CapValue,float);
    00136
    00138
    00139   vtkSetMacro(ComputeNormals,int);
    00140   vtkGetMacro(ComputeNormals,int);
    00141   vtkBooleanMacro(ComputeNormals,int);
    00143
    00145   unsigned long GetMTime();
    00146
    00147 protected:
    00148   vtkSampleFunction();
    00149   ~vtkSampleFunction();
    00150
    00151   void ExecuteData(vtkDataObject *);
    00152   void ExecuteInformation();
    00153   void Cap(vtkDataArray *s);
    00154
    00155   int OutputScalarType;
    00156   int SampleDimensions[3];
    00157   float ModelBounds[6];
    00158   int Capping;
    00159   float CapValue;
    00160   vtkImplicitFunction *ImplicitFunction;
    00161   int ComputeNormals;
    00162 private:
    00163   vtkSampleFunction(const vtkSampleFunction&);  // Not implemented.
    00164   void operator=(const vtkSampleFunction&);  // Not implemented.
    00165 };
    00166
    00167 #endif
    00168
    00169