VTK
vtkSampleFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSampleFunction.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
35 #ifndef __vtkSampleFunction_h
36 #define __vtkSampleFunction_h
37 
38 #include "vtkImageAlgorithm.h"
39 
41 class vtkDataArray;
42 
44 {
45 public:
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
52  static vtkSampleFunction *New();
53 
55 
56  virtual void SetImplicitFunction(vtkImplicitFunction*);
57  vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
59 
61 
62  vtkSetMacro(OutputScalarType,int);
63  vtkGetMacro(OutputScalarType,int);
65  {this->SetOutputScalarType(VTK_DOUBLE);}
67  {this->SetOutputScalarType(VTK_FLOAT);}
69  {this->SetOutputScalarType(VTK_LONG);}
71  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
73  {this->SetOutputScalarType(VTK_INT);}
75  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
77  {this->SetOutputScalarType(VTK_SHORT);}
79  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
81  {this->SetOutputScalarType(VTK_CHAR);}
83  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
85 
89  virtual void SetScalars(vtkDataArray *da);
90 
92  void SetSampleDimensions(int i, int j, int k);
93 
95 
96  void SetSampleDimensions(int dim[3]);
97  vtkGetVectorMacro(SampleDimensions,int,3);
99 
101 
103  vtkSetVector6Macro(ModelBounds,double);
104  vtkGetVectorMacro(ModelBounds,double,6);
106 
108 
111  vtkSetMacro(Capping,int);
112  vtkGetMacro(Capping,int);
113  vtkBooleanMacro(Capping,int);
115 
117 
118  vtkSetMacro(CapValue,double);
119  vtkGetMacro(CapValue,double);
121 
123 
124  vtkSetMacro(ComputeNormals,int);
125  vtkGetMacro(ComputeNormals,int);
126  vtkBooleanMacro(ComputeNormals,int);
128 
130 
132  vtkSetStringMacro(ScalarArrayName);
133  vtkGetStringMacro(ScalarArrayName);
135 
137 
139  vtkSetStringMacro(NormalArrayName);
140  vtkGetStringMacro(NormalArrayName);
142 
144  unsigned long GetMTime();
145 
146 protected:
153 
155 
156  virtual void ReportReferences(vtkGarbageCollector*);
157 
158  void ExecuteData(vtkDataObject *);
159  virtual int RequestInformation (vtkInformation *,
162  void Cap(vtkDataArray *s);
163 
165  int SampleDimensions[3];
166  double ModelBounds[6];
167  int Capping;
168  double CapValue;
173 
174 private:
175  vtkSampleFunction(const vtkSampleFunction&); // Not implemented.
176  void operator=(const vtkSampleFunction&); // Not implemented.
177 };
178 
179 #endif
180 
181