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 "vtkImagingHybridModule.h" // For export macro
39 #include "vtkImageAlgorithm.h"
40 
42 class vtkDataArray;
43 
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 
88  void SetSampleDimensions(int i, int j, int k);
89 
91 
92  void SetSampleDimensions(int dim[3]);
93  vtkGetVectorMacro(SampleDimensions,int,3);
95 
97 
99  void SetModelBounds(const double bounds[6]);
100  void SetModelBounds(double xMin, double xMax,
101  double yMin, double yMax,
102  double zMin, double zMax);
103  vtkGetVectorMacro(ModelBounds,double,6);
105 
107 
110  vtkSetMacro(Capping,int);
111  vtkGetMacro(Capping,int);
112  vtkBooleanMacro(Capping,int);
114 
116 
117  vtkSetMacro(CapValue,double);
118  vtkGetMacro(CapValue,double);
120 
122 
123  vtkSetMacro(ComputeNormals,int);
124  vtkGetMacro(ComputeNormals,int);
125  vtkBooleanMacro(ComputeNormals,int);
127 
129 
131  vtkSetStringMacro(ScalarArrayName);
132  vtkGetStringMacro(ScalarArrayName);
134 
136 
138  vtkSetStringMacro(NormalArrayName);
139  vtkGetStringMacro(NormalArrayName);
141 
143  unsigned long GetMTime();
144 
145 protected:
152 
154 
155  virtual void ReportReferences(vtkGarbageCollector*);
156 
158  virtual int RequestInformation (vtkInformation *,
161  void Cap(vtkDataArray *s);
162 
164  int SampleDimensions[3];
165  double ModelBounds[6];
166  int Capping;
167  double CapValue;
172 
173 private:
174  vtkSampleFunction(const vtkSampleFunction&); // Not implemented.
175  void operator=(const vtkSampleFunction&); // Not implemented.
176 };
177 
178 #endif
179 
180 
abstract interface for implicit functions
sample an implicit function over a structured point set
#define VTK_UNSIGNED_INT
Definition: vtkType.h:32
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
virtual void ExecuteDataWithInformation(vtkDataObject *output, vtkInformation *outInfo)
Detect and break reference loops.
virtual void ReportReferences(vtkGarbageCollector *)
#define VTK_DOUBLE
Definition: vtkType.h:36
void SetOutputScalarTypeToShort()
#define VTK_FLOAT
Definition: vtkType.h:35
void SetOutputScalarTypeToUnsignedShort()
void SetOutputScalarTypeToDouble()
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
#define VTK_SHORT
Definition: vtkType.h:29
void SetOutputScalarTypeToLong()
#define VTK_CHAR
Definition: vtkType.h:26
#define VTK_LONG
Definition: vtkType.h:33
void SetOutputScalarTypeToUnsignedLong()
vtkImplicitFunction * ImplicitFunction
void SetOutputScalarTypeToUnsignedChar()
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkAlgorithm * New()
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:34
#define VTKIMAGINGHYBRID_EXPORT
void SetOutputScalarTypeToFloat()
general representation of visualization data
Definition: vtkDataObject.h:64
void SetOutputScalarTypeToUnsignedInt()
#define VTK_INT
Definition: vtkType.h:31
void SetOutputScalarTypeToChar()