VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "vtkImagingHybridModule.h" // For export macro
39 #include "vtkImageAlgorithm.h"
40 
41 class vtkImplicitFunction;
42 class vtkDataArray;
43 
44 class VTKIMAGINGHYBRID_EXPORT vtkSampleFunction : public vtkImageAlgorithm
45 {
46 public:
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
53  static vtkSampleFunction *New();
54 
56 
57  virtual void SetImplicitFunction(vtkImplicitFunction*);
58  vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
60 
62 
63  vtkSetMacro(OutputScalarType,int);
64  vtkGetMacro(OutputScalarType,int);
66  {this->SetOutputScalarType(VTK_DOUBLE);}
68  {this->SetOutputScalarType(VTK_FLOAT);}
70  {this->SetOutputScalarType(VTK_LONG);}
72  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
74  {this->SetOutputScalarType(VTK_INT);}
76  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
78  {this->SetOutputScalarType(VTK_SHORT);}
80  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
82  {this->SetOutputScalarType(VTK_CHAR);}
84  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
86 
90  VTK_LEGACY(virtual void SetScalars(vtkDataArray *da));
91 
93  void SetSampleDimensions(int i, int j, int k);
94 
96 
97  void SetSampleDimensions(int dim[3]);
98  vtkGetVectorMacro(SampleDimensions,int,3);
100 
102 
104  void SetModelBounds(double bounds[6]);
105  void SetModelBounds(double xMin, double xMax,
106  double yMin, double yMax,
107  double zMin, double zMax);
108  vtkGetVectorMacro(ModelBounds,double,6);
110 
112 
115  vtkSetMacro(Capping,int);
116  vtkGetMacro(Capping,int);
117  vtkBooleanMacro(Capping,int);
119 
121 
122  vtkSetMacro(CapValue,double);
123  vtkGetMacro(CapValue,double);
125 
127 
128  vtkSetMacro(ComputeNormals,int);
129  vtkGetMacro(ComputeNormals,int);
130  vtkBooleanMacro(ComputeNormals,int);
132 
134 
136  vtkSetStringMacro(ScalarArrayName);
137  vtkGetStringMacro(ScalarArrayName);
139 
141 
143  vtkSetStringMacro(NormalArrayName);
144  vtkGetStringMacro(NormalArrayName);
146 
148  unsigned long GetMTime();
149 
150 protected:
157 
159 
160  virtual void ReportReferences(vtkGarbageCollector*);
161 
162  void ExecuteDataWithInformation(vtkDataObject *, vtkInformation *);
163  virtual int RequestInformation (vtkInformation *,
164  vtkInformationVector **,
165  vtkInformationVector *);
166  void Cap(vtkDataArray *s);
167 
169  int SampleDimensions[3];
170  double ModelBounds[6];
171  int Capping;
172  double CapValue;
173  vtkImplicitFunction *ImplicitFunction;
177 
178 private:
179  vtkSampleFunction(const vtkSampleFunction&); // Not implemented.
180  void operator=(const vtkSampleFunction&); // Not implemented.
181 };
182 
183 #endif
184 
185 
sample an implicit function over a structured point set
virtual void ExecuteDataWithInformation(vtkDataObject *output, vtkInformation *outInfo)
virtual void ReportReferences(vtkGarbageCollector *)
void SetOutputScalarTypeToShort()
void SetOutputScalarTypeToUnsignedShort()
void SetOutputScalarTypeToDouble()
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void SetOutputScalarTypeToLong()
void SetOutputScalarTypeToUnsignedLong()
vtkImplicitFunction * ImplicitFunction
void SetOutputScalarTypeToUnsignedChar()
Generic algorithm superclass for image algs.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkAlgorithm * New()
void SetOutputScalarTypeToFloat()
general representation of visualization data
Definition: vtkDataObject.h:64
void SetOutputScalarTypeToUnsignedInt()
void SetOutputScalarTypeToChar()