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

Graphics/vtkContourFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkContourFilter.h,v $
00005   Language:  C++
00006 
00007 
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00009 All rights reserved.
00010 
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013 
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016 
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020 
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024 
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027 
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038 
00039 =========================================================================*/
00085 #ifndef __vtkContourFilter_h
00086 #define __vtkContourFilter_h
00087 
00088 #include "vtkDataSetToPolyDataFilter.h"
00089 #include "vtkContourValues.h"
00090 
00091 class vtkScalarTree;
00092 
00093 class VTK_GRAPHICS_EXPORT vtkContourFilter : public vtkDataSetToPolyDataFilter
00094 {
00095 public:
00096   vtkTypeMacro(vtkContourFilter,vtkDataSetToPolyDataFilter);
00097   void PrintSelf(ostream& os, vtkIndent indent);
00098 
00101   static vtkContourFilter *New();
00102 
00104 
00105   void SetValue(int i, float value);
00106   float GetValue(int i);
00107   float *GetValues();
00108   void GetValues(float *contourValues);
00109   void SetNumberOfContours(int number);
00110   int GetNumberOfContours();
00111   void GenerateValues(int numContours, float range[2]);
00112   void GenerateValues(int numContours, float rangeStart, float rangeEnd);
00114 
00116   unsigned long GetMTime();
00117 
00119 
00123   vtkSetMacro(ComputeNormals,int);
00124   vtkGetMacro(ComputeNormals,int);
00125   vtkBooleanMacro(ComputeNormals,int);
00127 
00129 
00135   vtkSetMacro(ComputeGradients,int);
00136   vtkGetMacro(ComputeGradients,int);
00137   vtkBooleanMacro(ComputeGradients,int);
00139 
00141 
00142   vtkSetMacro(ComputeScalars,int);
00143   vtkGetMacro(ComputeScalars,int);
00144   vtkBooleanMacro(ComputeScalars,int);
00146 
00148 
00149   vtkSetMacro(UseScalarTree,int);
00150   vtkGetMacro(UseScalarTree,int);
00151   vtkBooleanMacro(UseScalarTree,int);
00153 
00155 
00157   void SetLocator(vtkPointLocator *locator);
00158   vtkGetObjectMacro(Locator,vtkPointLocator);
00160 
00163   void CreateDefaultLocator();
00164 
00165 protected:
00166   vtkContourFilter();
00167   ~vtkContourFilter();
00168 
00169   void Execute();
00170 
00171   vtkContourValues *ContourValues;
00172   int ComputeNormals;
00173   int ComputeGradients;
00174   int ComputeScalars;
00175   vtkPointLocator *Locator;
00176   int UseScalarTree;
00177   vtkScalarTree *ScalarTree;
00178   
00179 private:
00180   vtkContourFilter(const vtkContourFilter&);  // Not implemented.
00181   void operator=(const vtkContourFilter&);  // Not implemented.
00182 };
00183 
00186 inline void vtkContourFilter::SetValue(int i, float value)
00187 {this->ContourValues->SetValue(i,value);}
00188 
00190 
00191 inline float vtkContourFilter::GetValue(int i)
00192 {return this->ContourValues->GetValue(i);}
00194 
00196 
00198 inline float *vtkContourFilter::GetValues()
00199 {return this->ContourValues->GetValues();}
00201 
00205 inline void vtkContourFilter::GetValues(float *contourValues)
00206 {this->ContourValues->GetValues(contourValues);}
00207 
00211 inline void vtkContourFilter::SetNumberOfContours(int number)
00212 {this->ContourValues->SetNumberOfContours(number);}
00213 
00215 
00216 inline int vtkContourFilter::GetNumberOfContours()
00217 {return this->ContourValues->GetNumberOfContours();}
00219 
00221 
00223 inline void vtkContourFilter::GenerateValues(int numContours, float range[2])
00224 {this->ContourValues->GenerateValues(numContours, range);}
00226 
00228 
00230 inline void vtkContourFilter::GenerateValues(int numContours, float
00231                                              rangeStart, float rangeEnd)
00232 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00234 
00235 
00236 #endif
00237 
00238 

Generated on Thu Mar 28 14:19:20 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001